@salla.sa/twilight-components 2.14.596 → 2.14.598
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-MMeFYRaC.js → filepond-Yrcu23Ew.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dd1aobB-.js → filepond-plugin-file-poster-DRez16xM.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Be46s5wp.js → filepond-plugin-file-validate-size-H6Ijvhk2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cf3OjTHE.js → filepond-plugin-file-validate-type-ozbX9Tb-.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BDX5qgng.js → filepond-plugin-image-edit-CynCgK8H.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ilZNc8J4.js → filepond-plugin-image-exif-orientation-C18fCqoh.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C9c7tVEB.js → filepond-plugin-image-preview-FiRPNiZp.js} +1 -1
- package/dist/cjs/{index-zv0p1Eys.js → index-CpkvCUQ3.js} +7 -7
- package/dist/cjs/{intlTelInput-C8hiSJ_i.js → intlTelInput-dW1ObsSS.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -18
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -15
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +26 -20
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +7 -2
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +111 -37
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +12 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +47 -24
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +10 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +17 -12
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +7 -4
- package/dist/cjs/salla-filters.cjs.entry.js +10 -5
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +12 -7
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +7 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +14 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +14 -3
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +12 -5
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +39 -15
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +7 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +14 -7
- package/dist/cjs/salla-offer.cjs.entry.js +14 -9
- package/dist/cjs/salla-order-branch.cjs.entry.js +42 -4
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +7 -4
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +11 -4
- package/dist/cjs/salla-orders.cjs.entry.js +41 -7
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +10 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +7 -4
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +16 -9
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +9 -4
- package/dist/cjs/salla-products-list.cjs.entry.js +5 -4
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +7 -2
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +9 -3
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +9 -2
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +8 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +7 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +9 -5
- package/dist/cjs/salla-user-menu.cjs.entry.js +39 -2
- package/dist/cjs/salla-user-profile.cjs.entry.js +7 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +8 -3
- package/dist/cjs/salla-verify.cjs.entry.js +13 -6
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/translate-Cvomt6Jh.js +58 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DRrOfZz0.js → vanilla-picker-CSaDVE6R.js} +1 -1
- package/dist/collection/Helpers/money-text.js +37 -0
- package/dist/collection/Helpers/translate.js +36 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -2
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +10 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +23 -17
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +2 -0
- package/dist/collection/components/salla-button/salla-button.js +19 -27
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +10 -3
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +10 -5
- package/dist/collection/components/salla-comments/salla-comment-item.js +11 -3
- package/dist/collection/components/salla-comments/salla-comments.js +9 -3
- package/dist/collection/components/salla-contacts/salla-contacts.js +9 -2
- package/dist/collection/components/salla-count-down/salla-count-down.js +23 -18
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +4 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +69 -5
- package/dist/collection/components/salla-filters/salla-filters.js +10 -5
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +6 -3
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -6
- package/dist/collection/components/salla-hook/salla-hook.js +5 -1
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +15 -2
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +3 -0
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +12 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -5
- package/dist/collection/components/salla-map/salla-map.js +12 -7
- package/dist/collection/components/salla-notifications/salla-notifications.js +6 -1
- package/dist/collection/components/salla-offer/salla-offer.js +12 -7
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +13 -6
- package/dist/collection/components/salla-order-branch/salla-order-branch.css +35 -0
- package/dist/collection/components/salla-order-branch/salla-order-branch.js +40 -2
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +6 -3
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +10 -3
- package/dist/collection/components/salla-orders/salla-orders.js +13 -6
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +10 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +6 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +16 -7
- package/dist/collection/components/salla-product-card/salla-product-card.js +24 -17
- package/dist/collection/components/salla-product-options/salla-product-options.js +9 -6
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +8 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -4
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +6 -1
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +6 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +8 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +16 -16
- package/dist/collection/components/salla-review-card/salla-review-card.js +5 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +6 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +9 -2
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +10 -10
- package/dist/collection/components/salla-slider/salla-slider.js +6 -3
- package/dist/collection/components/salla-social/salla-social.js +7 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +24 -19
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +6 -1
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +17 -12
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +7 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +38 -1
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +6 -2
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +7 -2
- package/dist/collection/components/salla-verify/salla-verify.js +13 -6
- package/dist/components/index.js +3 -3
- package/dist/components/salla-add-product-button2.js +7 -2
- package/dist/components/salla-alert.js +2 -2
- package/dist/components/salla-apps-icons.js +6 -1
- package/dist/components/salla-booking-field2.js +10 -4
- package/dist/components/salla-bottom-alert.js +23 -17
- package/dist/components/salla-bullet-delivery.js +1 -1
- package/dist/components/salla-button2.js +9 -17
- package/dist/components/salla-cart-item-offers.js +10 -3
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-comment-form2.js +10 -5
- package/dist/components/salla-comment-item2.js +11 -3
- package/dist/components/salla-comments.js +9 -3
- package/dist/components/salla-contacts.js +9 -2
- package/dist/components/salla-count-down2.js +16 -11
- package/dist/components/salla-file-upload2.js +69 -5
- package/dist/components/salla-filters-widget2.js +6 -3
- package/dist/components/salla-filters.js +9 -4
- package/dist/components/salla-gifting.js +11 -6
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-infinite-scroll.js +6 -1
- package/dist/components/salla-localization-modal.js +15 -2
- package/dist/components/salla-login-modal2.js +13 -2
- package/dist/components/salla-loyalty.js +12 -5
- package/dist/components/salla-map2.js +12 -7
- package/dist/components/salla-notifications.js +6 -1
- package/dist/components/salla-offer-modal.js +13 -6
- package/dist/components/salla-offer.js +12 -7
- package/dist/components/salla-order-branch.js +41 -3
- package/dist/components/salla-order-summary.js +6 -3
- package/dist/components/salla-order-totals-card.js +10 -3
- package/dist/components/salla-orders.js +40 -6
- package/dist/components/salla-placeholder2.js +10 -3
- package/dist/components/salla-price-range2.js +6 -3
- package/dist/components/salla-product-availability2.js +16 -7
- package/dist/components/salla-product-card2.js +15 -8
- package/dist/components/salla-product-options2.js +9 -6
- package/dist/components/salla-product-size-guide.js +8 -3
- package/dist/components/salla-products-list2.js +4 -3
- package/dist/components/salla-progress-bar2.js +20 -4
- package/dist/components/salla-quick-buy2.js +6 -1
- package/dist/components/salla-quick-order.js +6 -1
- package/dist/components/salla-rating-modal2.js +8 -2
- package/dist/components/salla-rating-stars2.js +10 -10
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews.js +6 -1
- package/dist/components/salla-scopes.js +9 -2
- package/dist/components/salla-skeleton2.js +7 -7
- package/dist/components/salla-slider2.js +6 -3
- package/dist/components/salla-social.js +7 -2
- package/dist/components/salla-tab-header2.js +3 -3
- package/dist/components/salla-tel-input2.js +24 -19
- package/dist/components/salla-tiered-offer.js +6 -1
- package/dist/components/salla-trust-badges.js +8 -4
- package/dist/components/salla-user-menu.js +38 -1
- package/dist/components/salla-user-profile.js +6 -2
- package/dist/components/salla-user-settings.js +7 -2
- package/dist/components/salla-verify.js +13 -6
- package/dist/components/translate.js +37 -1
- package/dist/docs.json +44 -44
- package/dist/esm/{filepond-okemUEVJ.js → filepond-Cqatu146.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-He-1QDcm.js → filepond-plugin-file-poster-DbVXhgv4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BoQ9OZHK.js → filepond-plugin-file-validate-size-BpJPambh.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BVxE-7xU.js → filepond-plugin-file-validate-type-3Qrskyxw.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DJnNmArQ.js → filepond-plugin-image-edit-Cjy7cOV1.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CgkqV9g5.js → filepond-plugin-image-exif-orientation-DYM12Yp-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DxbixTNR.js → filepond-plugin-image-preview-C9nMEHVX.js} +1 -1
- package/dist/esm/{index-C1mBhG6Z.js → index-noRE1pbw.js} +7 -7
- package/dist/esm/{intlTelInput-wxpsRy0u.js → intlTelInput-CiinYrbq.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +10 -18
- package/dist/esm/salla-add-product-button_5.entry.js +37 -15
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +26 -20
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +7 -2
- package/dist/esm/salla-attachment-view_9.entry.js +111 -37
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +2 -2
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +12 -5
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +47 -24
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +10 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +17 -12
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +7 -4
- package/dist/esm/salla-filters.entry.js +10 -5
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +12 -7
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-infinite-scroll.entry.js +7 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +14 -2
- package/dist/esm/salla-login-modal.entry.js +14 -3
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +12 -5
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +39 -15
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +7 -2
- package/dist/esm/salla-offer-modal.entry.js +14 -7
- package/dist/esm/salla-offer.entry.js +14 -9
- package/dist/esm/salla-order-branch.entry.js +42 -4
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +7 -4
- package/dist/esm/salla-order-totals-card.entry.js +11 -4
- package/dist/esm/salla-orders.entry.js +41 -7
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +10 -3
- package/dist/esm/salla-price-range.entry.js +7 -4
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +16 -9
- package/dist/esm/salla-product-size-guide.entry.js +9 -4
- package/dist/esm/salla-products-list.entry.js +5 -4
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +7 -2
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +9 -3
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +9 -2
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +8 -8
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +8 -3
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +7 -2
- package/dist/esm/salla-trust-badges.entry.js +9 -5
- package/dist/esm/salla-user-menu.entry.js +39 -2
- package/dist/esm/salla-user-profile.entry.js +7 -3
- package/dist/esm/salla-user-settings.entry.js +8 -3
- package/dist/esm/salla-verify.entry.js +13 -6
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/translate-CxrJQ3Jf.js +54 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CQEJbE9K.js → vanilla-picker-BWBrgMJQ.js} +1 -1
- package/dist/twilight/{p-c28395c6.entry.js → p-03e89cb1.entry.js} +1 -1
- package/dist/twilight/{p-5babb989.entry.js → p-07dc637e.entry.js} +1 -1
- package/dist/twilight/p-0859fe23.entry.js +4 -0
- package/dist/twilight/p-0b54834f.entry.js +4 -0
- package/dist/twilight/{p-e00ed6c9.entry.js → p-0c9f5232.entry.js} +1 -1
- package/dist/twilight/p-0ca1a782.entry.js +4 -0
- package/dist/twilight/p-0cb548be.entry.js +4 -0
- package/dist/twilight/{p-8ec0fc03.entry.js → p-138d6214.entry.js} +1 -1
- package/dist/twilight/p-141218a3.entry.js +4 -0
- package/dist/twilight/p-15b8fa7f.entry.js +4 -0
- package/dist/twilight/{p-ac20a6de.entry.js → p-15f5d424.entry.js} +1 -1
- package/dist/twilight/{p-21ba0eac.entry.js → p-16072449.entry.js} +1 -1
- package/dist/twilight/{p-dcb5ceda.entry.js → p-16b2f58b.entry.js} +1 -1
- package/dist/twilight/{p-f643bf2f.entry.js → p-18aff2d5.entry.js} +1 -1
- package/dist/twilight/{p-7ac91ace.entry.js → p-1930b915.entry.js} +1 -1
- package/dist/twilight/p-1cbbdcea.entry.js +4 -0
- package/dist/twilight/{p-d75157e0.entry.js → p-1fe92c36.entry.js} +1 -1
- package/dist/twilight/{p-f130c67f.entry.js → p-221e47a5.entry.js} +1 -1
- package/dist/twilight/p-2636c473.entry.js +4 -0
- package/dist/twilight/p-27712ed1.entry.js +4 -0
- package/dist/twilight/{p-fac4da2b.entry.js → p-2eea4245.entry.js} +1 -1
- package/dist/twilight/{p-d6d72996.entry.js → p-3263103c.entry.js} +1 -1
- package/dist/twilight/{p-ca7593c0.entry.js → p-341a7ab8.entry.js} +1 -1
- package/dist/twilight/{p-1080831a.entry.js → p-3b4f66d3.entry.js} +1 -1
- package/dist/twilight/p-3c45c49f.entry.js +4 -0
- package/dist/twilight/{p-e98835e3.entry.js → p-3f730d01.entry.js} +1 -1
- package/dist/twilight/{p-12a2b743.entry.js → p-40c8b553.entry.js} +1 -1
- package/dist/twilight/p-4333c630.entry.js +4 -0
- package/dist/twilight/{p-1a5d0b25.entry.js → p-454b32f0.entry.js} +1 -1
- package/dist/twilight/{p-8bdb7f71.entry.js → p-475d01e2.entry.js} +1 -1
- package/dist/twilight/{p-f8aa1b23.entry.js → p-4962d869.entry.js} +1 -1
- package/dist/twilight/{p-4b0eaa16.entry.js → p-4ce97595.entry.js} +1 -1
- package/dist/twilight/p-4d1582f8.entry.js +4 -0
- package/dist/twilight/{p-5e426c78.entry.js → p-4d482ee4.entry.js} +1 -1
- package/dist/twilight/{p-67d3ee58.entry.js → p-5110433d.entry.js} +1 -1
- package/dist/twilight/p-517807b2.entry.js +4 -0
- package/dist/twilight/p-52a7dbb7.entry.js +4 -0
- package/dist/twilight/{p-160476f0.entry.js → p-5360d082.entry.js} +1 -1
- package/dist/twilight/p-53bf1d54.entry.js +4 -0
- package/dist/twilight/p-540a7588.entry.js +4 -0
- package/dist/twilight/{p-9d434410.entry.js → p-5a6c4fdf.entry.js} +1 -1
- package/dist/twilight/{p-5e099f96.entry.js → p-5ac2e6ab.entry.js} +1 -1
- package/dist/twilight/{p-de55326d.entry.js → p-64158678.entry.js} +1 -1
- package/dist/twilight/p-67ecb74a.entry.js +4 -0
- package/dist/twilight/{p-342b31ba.entry.js → p-6e53afc6.entry.js} +1 -1
- package/dist/twilight/{p-474997dd.entry.js → p-6f66a0f2.entry.js} +1 -1
- package/dist/twilight/p-721819ee.entry.js +4 -0
- package/dist/twilight/p-76d11b5c.entry.js +4 -0
- package/dist/twilight/p-78b86647.entry.js +4 -0
- package/dist/twilight/p-7f0bdf0e.entry.js +4 -0
- package/dist/twilight/{p-caee5b0d.entry.js → p-7f882abf.entry.js} +1 -1
- package/dist/twilight/{p-6602a61a.entry.js → p-826ed1c6.entry.js} +1 -1
- package/dist/twilight/{p-8eb75cf8.entry.js → p-82d59bf3.entry.js} +1 -1
- package/dist/twilight/p-856ed222.entry.js +4 -0
- package/dist/twilight/{p-4bde9c4e.entry.js → p-87b3c231.entry.js} +1 -1
- package/dist/twilight/p-87dcc9d8.entry.js +4 -0
- package/dist/twilight/{p-58058ae9.entry.js → p-8876efa6.entry.js} +1 -1
- package/dist/twilight/{p-81596b48.entry.js → p-88d64b87.entry.js} +1 -1
- package/dist/twilight/p-88f650da.entry.js +4 -0
- package/dist/twilight/p-8e248aa7.entry.js +4 -0
- package/dist/twilight/p-919dd049.entry.js +4 -0
- package/dist/twilight/{p-62653d93.entry.js → p-950634d1.entry.js} +1 -1
- package/dist/twilight/{p-a11b77df.entry.js → p-9ce917a6.entry.js} +1 -1
- package/dist/twilight/{p-672a709e.entry.js → p-9e084610.entry.js} +1 -1
- package/dist/twilight/{p-8513fec2.entry.js → p-9ed52621.entry.js} +1 -1
- package/dist/twilight/{p-60d06105.entry.js → p-9fcc7eeb.entry.js} +1 -1
- package/dist/twilight/{p-Gxv67UlH.js → p-B867dk1j.js} +1 -1
- package/dist/twilight/{p-CJPWrlxL.js → p-BT5AJCX9.js} +1 -1
- package/dist/twilight/{p-CtcjG32v.js → p-CADeV7A-.js} +1 -1
- package/dist/twilight/{p-E2n9kJc8.js → p-CbJEogz0.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-C57CqqgQ.js → p-CyV163V_.js} +1 -1
- package/dist/twilight/{p-DiU9tYvl.js → p-D98H4WeK.js} +1 -1
- package/dist/twilight/p-DN2opqoB.js +9 -0
- package/dist/twilight/{p-pzi0Osm7.js → p-DWkNp24H.js} +1 -1
- package/dist/twilight/{p-Bm1ywp6t.js → p-DomdkzLW.js} +1 -1
- package/dist/twilight/{p-c28c53c3.entry.js → p-a030da8e.entry.js} +1 -1
- package/dist/twilight/{p-3a465851.entry.js → p-a2de7999.entry.js} +1 -1
- package/dist/twilight/{p-c89282b0.entry.js → p-a8408d51.entry.js} +1 -1
- package/dist/twilight/p-aabc57e3.entry.js +4 -0
- package/dist/twilight/p-b1a35349.entry.js +4 -0
- package/dist/twilight/{p-fd787b30.entry.js → p-ba76a96a.entry.js} +1 -1
- package/dist/twilight/{p-d6508494.entry.js → p-ba9ee435.entry.js} +1 -1
- package/dist/twilight/{p-f47a1351.entry.js → p-be7dcc25.entry.js} +1 -1
- package/dist/twilight/{p-54bc613c.entry.js → p-c41c1eff.entry.js} +1 -1
- package/dist/twilight/p-c589a326.entry.js +4 -0
- package/dist/twilight/{p-e43c49e9.entry.js → p-c5d4682b.entry.js} +1 -1
- package/dist/twilight/p-c631e2cd.entry.js +4 -0
- package/dist/twilight/{p-97bb12a6.entry.js → p-c6af4f05.entry.js} +1 -1
- package/dist/twilight/{p-da9bd7f6.entry.js → p-c8d269df.entry.js} +1 -1
- package/dist/twilight/{p-e4589779.entry.js → p-cab2f22a.entry.js} +1 -1
- package/dist/twilight/{p-f3985cfd.entry.js → p-ce120ce6.entry.js} +1 -1
- package/dist/twilight/{p-80699771.entry.js → p-ce981b2f.entry.js} +1 -1
- package/dist/twilight/p-d09b6b8c.entry.js +4 -0
- package/dist/twilight/{p-b3abf071.entry.js → p-d13f5256.entry.js} +1 -1
- package/dist/twilight/{p-c82f46a9.entry.js → p-d306b947.entry.js} +1 -1
- package/dist/twilight/p-d986aa18.entry.js +4 -0
- package/dist/twilight/{p-844176cb.entry.js → p-e4c88bee.entry.js} +1 -1
- package/dist/twilight/p-e7fc0d63.entry.js +4 -0
- package/dist/twilight/p-eef846fa.entry.js +4 -0
- package/dist/twilight/{p-dbc1e40c.entry.js → p-f03f893c.entry.js} +1 -1
- package/dist/twilight/p-f5f0246f.entry.js +4 -0
- package/dist/twilight/p-f6f633fc.entry.js +4 -0
- package/dist/twilight/p-f9fbcb8d.entry.js +4 -0
- package/dist/twilight/p-fc717703.entry.js +4 -0
- package/dist/twilight/{p-C1mBhG6Z.js → p-noRE1pbw.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/money-text.d.ts +13 -0
- package/dist/types/Helpers/translate.d.ts +17 -0
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -1
- package/dist/types/components/salla-alert/salla-alert.d.ts +3 -3
- package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +3 -0
- package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +3 -0
- package/dist/types/components/salla-bottom-alert/salla-bottom-alert.d.ts +3 -1
- package/dist/types/components/salla-button/salla-button.d.ts +10 -18
- package/dist/types/components/salla-cart-item-offers/salla-cart-item-offers.d.ts +3 -0
- package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +2 -2
- package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
- package/dist/types/components/salla-comments/salla-comments.d.ts +3 -0
- package/dist/types/components/salla-contacts/salla-contacts.d.ts +4 -0
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +17 -14
- package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +4 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +12 -0
- package/dist/types/components/salla-filters/salla-filters.d.ts +4 -1
- package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +2 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +3 -0
- package/dist/types/components/salla-hook/salla-hook.d.ts +4 -0
- package/dist/types/components/salla-infinite-scroll/salla-infinite-scroll.d.ts +3 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +4 -0
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +3 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
- package/dist/types/components/salla-map/salla-map.d.ts +3 -0
- package/dist/types/components/salla-notifications/salla-notifications.d.ts +3 -1
- package/dist/types/components/salla-offer/salla-offer.d.ts +3 -0
- package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -0
- package/dist/types/components/salla-order-branch/interfaces.d.ts +1 -0
- package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +10 -1
- package/dist/types/components/salla-order-summary/salla-order-summary.d.ts +2 -0
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +4 -3
- package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +2 -0
- package/dist/types/components/salla-orders/salla-orders.d.ts +3 -1
- package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -1
- package/dist/types/components/salla-price-range/salla-price-range.d.ts +2 -0
- package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +4 -0
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +12 -9
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
- package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +3 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
- package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +5 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +3 -1
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +3 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -0
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +14 -14
- package/dist/types/components/salla-review-card/salla-review-card.d.ts +4 -0
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +3 -0
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +3 -0
- package/dist/types/components/salla-skeleton/salla-skeleton.d.ts +6 -6
- package/dist/types/components/salla-slider/salla-slider.d.ts +2 -0
- package/dist/types/components/salla-social/salla-social.d.ts +3 -0
- package/dist/types/components/salla-tabs/salla-tab-header.d.ts +2 -2
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -1
- package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +3 -1
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +3 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +16 -0
- package/dist/types/components/salla-user-profile/salla-user-profile.d.ts +3 -1
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +3 -0
- package/dist/types/components/salla-verify/salla-verify.d.ts +3 -0
- package/dist/types/components.d.ts +128 -80
- package/package.json +19 -19
- package/dist/cjs/translate-BeU1QX_r.js +0 -20
- package/dist/esm/translate-CrSV-tno.js +0 -18
- package/dist/twilight/p-020eb2a1.entry.js +0 -4
- package/dist/twilight/p-06799084.entry.js +0 -4
- package/dist/twilight/p-0a3abfd4.entry.js +0 -4
- package/dist/twilight/p-0ef388be.entry.js +0 -4
- package/dist/twilight/p-1f99db23.entry.js +0 -4
- package/dist/twilight/p-232c39e9.entry.js +0 -4
- package/dist/twilight/p-305ed224.entry.js +0 -4
- package/dist/twilight/p-3a4cf66c.entry.js +0 -4
- package/dist/twilight/p-3c4702bb.entry.js +0 -4
- package/dist/twilight/p-3dcb5129.entry.js +0 -4
- package/dist/twilight/p-43d0c80e.entry.js +0 -4
- package/dist/twilight/p-50bbbd18.entry.js +0 -4
- package/dist/twilight/p-51c26ce7.entry.js +0 -4
- package/dist/twilight/p-54054ab9.entry.js +0 -4
- package/dist/twilight/p-5c1a36ab.entry.js +0 -4
- package/dist/twilight/p-5cf3929c.entry.js +0 -4
- package/dist/twilight/p-8028be6f.entry.js +0 -4
- package/dist/twilight/p-82939afe.entry.js +0 -4
- package/dist/twilight/p-85cff524.entry.js +0 -4
- package/dist/twilight/p-8dfdd6c9.entry.js +0 -4
- package/dist/twilight/p-92f6aa52.entry.js +0 -4
- package/dist/twilight/p-BB23a2fo.js +0 -9
- package/dist/twilight/p-CrSV-tno.js +0 -4
- package/dist/twilight/p-a4aac112.entry.js +0 -4
- package/dist/twilight/p-a52bfa57.entry.js +0 -4
- package/dist/twilight/p-a9aadc0b.entry.js +0 -4
- package/dist/twilight/p-bc26490f.entry.js +0 -4
- package/dist/twilight/p-bef93c52.entry.js +0 -4
- package/dist/twilight/p-c30bfc0b.entry.js +0 -4
- package/dist/twilight/p-cb770a9e.entry.js +0 -4
- package/dist/twilight/p-cbcca1ff.entry.js +0 -4
- package/dist/twilight/p-d81bcfb3.entry.js +0 -4
- package/dist/twilight/p-e67b2aa8.entry.js +0 -4
- package/dist/twilight/p-e9ce8dec.entry.js +0 -4
- package/dist/twilight/p-eb718f6b.entry.js +0 -4
- package/dist/twilight/p-ec361a66.entry.js +0 -4
- package/dist/twilight/p-f32de457.entry.js +0 -4
- package/dist/twilight/p-f626ef96.entry.js +0 -4
- package/dist/twilight/p-f6df7f8a.entry.js +0 -4
- package/dist/twilight/p-fd3bb3f2.entry.js +0 -4
|
@@ -31,6 +31,7 @@ export class SallaLoginModal {
|
|
|
31
31
|
this.scrolling = 'no';
|
|
32
32
|
this.direction = document.dir;
|
|
33
33
|
this.canRenderIframe = false;
|
|
34
|
+
this.loginSucceeded = false;
|
|
34
35
|
salla.event.on('login::open', (data) => this.onLoginOpen(data));
|
|
35
36
|
salla.event.on('modal::close', (data) => {
|
|
36
37
|
if (this.iframe)
|
|
@@ -125,6 +126,7 @@ export class SallaLoginModal {
|
|
|
125
126
|
}
|
|
126
127
|
// temporary condition until we handle both cases separately
|
|
127
128
|
if (action == 'authenticated' || action == 'authenticated_web_auth') {
|
|
129
|
+
this.loginSucceeded = true;
|
|
128
130
|
!value?.withoutClose && this.close();
|
|
129
131
|
return salla.auth.api.handlAfterAuthenticatedResponse(value, this.supportWebAuth)
|
|
130
132
|
.then(() => !(value?.withoutReload || this.withoutReload) && setTimeout(() => window.location.reload(), 1000));
|
|
@@ -178,6 +180,14 @@ export class SallaLoginModal {
|
|
|
178
180
|
// Fire an event if withoutReload is true
|
|
179
181
|
return;
|
|
180
182
|
}
|
|
183
|
+
/** Tell the listeners waiting for a login (e.g. `requireLoginThen`) that the popup was closed without one. */
|
|
184
|
+
onVisibilityChanged(visible) {
|
|
185
|
+
if (visible) {
|
|
186
|
+
this.loginSucceeded = false;
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
!this.loginSucceeded && Salla.event.emit('salla-login::dismissed');
|
|
190
|
+
}
|
|
181
191
|
close() {
|
|
182
192
|
Salla.event.emit('salla-login::closing');
|
|
183
193
|
this.modal.close();
|
|
@@ -229,6 +239,7 @@ export class SallaLoginModal {
|
|
|
229
239
|
}
|
|
230
240
|
});
|
|
231
241
|
if (token) {
|
|
242
|
+
this.loginSucceeded = true;
|
|
232
243
|
this.modal.close();
|
|
233
244
|
Salla.auth.event.tokenFetched(token);
|
|
234
245
|
try {
|
|
@@ -343,7 +354,7 @@ export class SallaLoginModal {
|
|
|
343
354
|
if (this.inline) {
|
|
344
355
|
return this.getLoginDom();
|
|
345
356
|
}
|
|
346
|
-
return (h("salla-modal", { class: "s-login-modal", ref: modal => this.modal = modal, width: "xs" }, this.getLoginDom()));
|
|
357
|
+
return (h("salla-modal", { class: "s-login-modal", ref: modal => this.modal = modal, width: "xs", onModalVisibilityChanged: e => this.onVisibilityChanged(e.detail) }, this.getLoginDom()));
|
|
347
358
|
}
|
|
348
359
|
getLoginDom() {
|
|
349
360
|
if (!this.canRenderIframe) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from "@stencil/core";
|
|
4
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import Star2 from "../../assets/svg/star2.svg";
|
|
6
6
|
import Star3 from "../../assets/svg/star3.svg";
|
|
7
7
|
import CancelIcon from "../../assets/svg/cancel.svg";
|
|
@@ -34,16 +34,23 @@ export class SallaLoyalty {
|
|
|
34
34
|
salla.onReady(() => {
|
|
35
35
|
this.is_loggedin = salla.config.isUser();
|
|
36
36
|
});
|
|
37
|
-
salla.lang.onLoaded(() => {
|
|
38
|
-
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
39
|
-
this.translationLoaded = true;
|
|
40
|
-
});
|
|
41
37
|
salla.cart.event.onUpdated(cart => {
|
|
42
38
|
this.prizePoints = cart.loyalty.prize?.points;
|
|
43
39
|
this.prizeTitle = cart.loyalty.prize?.title;
|
|
44
40
|
this.customerPoints = cart.loyalty.customer_points || this.customerPoints;
|
|
45
41
|
});
|
|
46
42
|
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
45
|
+
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
46
|
+
this.translationLoaded = true;
|
|
47
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
48
|
+
forceUpdate(this);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
this.langUnsubscribe?.();
|
|
53
|
+
}
|
|
47
54
|
onTabSelected(event) {
|
|
48
55
|
const prize = this.loyaltyProgram?.prizes.find(p => p.title === event.detail?.name);
|
|
49
56
|
if (prize)
|
|
@@ -46,16 +46,21 @@ export class SallaMap {
|
|
|
46
46
|
* Sets map style.
|
|
47
47
|
*/
|
|
48
48
|
this.theme = 'light';
|
|
49
|
-
salla.
|
|
49
|
+
salla.onReady(() => {
|
|
50
|
+
this.apiKey = salla.config.get('store.settings.keys.maps');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
connectedCallback() {
|
|
54
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
50
55
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
51
56
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
52
57
|
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
53
58
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
54
59
|
this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
|
|
55
60
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
this.langUnsubscribe?.();
|
|
59
64
|
}
|
|
60
65
|
formatAddress(address) {
|
|
61
66
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -327,11 +332,11 @@ export class SallaMap {
|
|
|
327
332
|
}
|
|
328
333
|
// render
|
|
329
334
|
render() {
|
|
330
|
-
return (h(Host, { key: '
|
|
335
|
+
return (h(Host, { key: '3200387d0b18f6ecc5f5b6c2a464cb02516268f9', class: "s-map-wrapper" }, h("salla-modal", { key: '1a0b0181945dc1c5fa3950f7bcdf56f4aed2be1c', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
331
336
|
this.locationModal = modal;
|
|
332
|
-
} }, this.getLocationModal()), h("slot", { key: '
|
|
337
|
+
} }, this.getLocationModal()), h("slot", { key: '474ba510d9c5cbf0abc473151674e6627f374458', name: "button" }, h("salla-button", { key: '3a08552e4be8f1306f679fd44231743a377064ea', onClick: () => {
|
|
333
338
|
this.open();
|
|
334
|
-
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '
|
|
339
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '0b17fd41e0563c52e7826534877df00adcbce777', 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: 'b097866bd2d4b29af0212064897d3fc5311534e2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
|
|
335
340
|
}
|
|
336
341
|
static get is() { return "salla-map"; }
|
|
337
342
|
static get originalStyleUrls() {
|
|
@@ -11,11 +11,16 @@ export class SallaNotifications {
|
|
|
11
11
|
this.itemPerPage = 10;
|
|
12
12
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
13
13
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
14
|
-
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
15
17
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
16
18
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
17
19
|
});
|
|
18
20
|
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this.langUnsubscribe?.();
|
|
23
|
+
}
|
|
19
24
|
// Show/hide loading
|
|
20
25
|
loading(isLoading = true) {
|
|
21
26
|
let btnText = this.status?.querySelector('.s-button-text');
|
|
@@ -52,8 +52,16 @@ export class SallaOffer {
|
|
|
52
52
|
this.get_from_text = translate('pages.offer.get_from_categories', {}, 'احصل من:');
|
|
53
53
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
54
54
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
55
|
+
salla.onReady(() => {
|
|
56
|
+
this.currentPage = salla.config.get('page.slug');
|
|
57
|
+
const currencies = salla.config.get('currencies') || {};
|
|
58
|
+
const currencyCode = salla.config.get('user.currency_code');
|
|
59
|
+
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
55
63
|
// Language
|
|
56
|
-
salla.lang.
|
|
64
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
57
65
|
this.offer_with_price_text = salla.lang.get('pages.offer.with_price');
|
|
58
66
|
this.with_discount_text = salla.lang.get('pages.products.with_a_discount');
|
|
59
67
|
this.product_discount_text = salla.lang.get('pages.products.discount');
|
|
@@ -69,12 +77,9 @@ export class SallaOffer {
|
|
|
69
77
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
70
78
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
71
79
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const currencyCode = salla.config.get('user.currency_code');
|
|
76
|
-
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
77
|
-
});
|
|
80
|
+
}
|
|
81
|
+
disconnectedCallback() {
|
|
82
|
+
this.langUnsubscribe?.();
|
|
78
83
|
}
|
|
79
84
|
async getEndpointByPageName() {
|
|
80
85
|
if (this.currentPage == PageType.Cart) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from "@stencil/core";
|
|
4
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import { translate } from "../../Helpers/translate";
|
|
6
6
|
import SpecialDiscountIcon from "../../assets/svg/special-discount.svg";
|
|
7
7
|
import Tag from "../../assets/svg/tag.svg";
|
|
@@ -18,10 +18,6 @@ export class SallaOfferModal {
|
|
|
18
18
|
this.translationLoaded = false;
|
|
19
19
|
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
20
20
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
21
|
-
salla.lang.onLoaded(() => {
|
|
22
|
-
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
23
|
-
this.translationLoaded = true;
|
|
24
|
-
});
|
|
25
21
|
this.categorySlot = this.host.querySelector('[slot="category"]')?.innerHTML || `<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>`;
|
|
26
22
|
// this.productSlot = this.host.querySelector('[slot="product"]')?.innerHTML || this.defaultProductSlot();
|
|
27
23
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
@@ -33,6 +29,17 @@ export class SallaOfferModal {
|
|
|
33
29
|
this.open(offer.product_id);
|
|
34
30
|
});
|
|
35
31
|
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
34
|
+
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
35
|
+
this.translationLoaded = true;
|
|
36
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
37
|
+
forceUpdate(this);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.langUnsubscribe?.();
|
|
42
|
+
}
|
|
36
43
|
/**
|
|
37
44
|
* Emits a promotion viewed event for analytics tracking
|
|
38
45
|
* @param offer - The offer being viewed in the modal
|
|
@@ -230,7 +237,7 @@ export class SallaOfferModal {
|
|
|
230
237
|
// '</div>';
|
|
231
238
|
// }
|
|
232
239
|
render() {
|
|
233
|
-
return h("salla-modal", { key: '
|
|
240
|
+
return h("salla-modal", { key: 'beed061e843a93ff4dff12234d5bac13dde06023', "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: '390f86b1c8fa2b2c278576784e0623051dddf969', slot: 'loading' }, h("div", { key: '923ac23aa2038cf64476af0b99a93a38bdd86766', class: "s-offer-modal-skeleton" }, h("div", { key: '3ec7335437554217a22aafcfe7d11b7ebf648335', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: '48e244848f5c49c5b0d8406289ef71fc8dac3a90', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: 'c0663ea07d3afa6e70645f4ceb8610f595d5f4ed', height: '15px', width: '50%' }), h("salla-skeleton", { key: '152b319f3932dea0bb5bb2f55cd9c43904ee412d', height: '10px', width: '30%' })), h("div", { key: 'c91455f90f133d346b71c6c7ac9d78c6d645f264', 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: '0657191d93e3929f74734c90b082fc272f189a83', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '2ac022a4ca2b18182e24dd10124061d9ff068094', height: '15px', width: '50%' }), h("salla-skeleton", { key: '029fca022c898eb4b519fa8f0808ca9dba1bd07a', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
234
241
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
|
|
235
242
|
this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
236
243
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
.s-order-branch-ready {
|
|
6
6
|
background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
|
|
7
7
|
}
|
|
8
|
+
.s-order-branch-instructions {
|
|
9
|
+
background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
|
10
|
+
}
|
|
11
|
+
.s-order-branch-instructions-content {
|
|
12
|
+
white-space: pre-wrap;
|
|
13
|
+
}
|
|
8
14
|
.filter {
|
|
9
15
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
10
16
|
}
|
|
@@ -226,6 +232,35 @@
|
|
|
226
232
|
line-height: 1.45;
|
|
227
233
|
color: var(--color-text-secondary,#666);
|
|
228
234
|
}
|
|
235
|
+
.s-order-branch-instructions {
|
|
236
|
+
border-radius: 0.5rem;
|
|
237
|
+
padding: 1rem;
|
|
238
|
+
text-align: start;
|
|
239
|
+
}
|
|
240
|
+
.s-order-branch-instructions-heading {
|
|
241
|
+
margin-bottom: 0.5rem;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 0.5rem;
|
|
245
|
+
font-size: 0.75rem;
|
|
246
|
+
line-height: 1rem;
|
|
247
|
+
line-height: 1.35;
|
|
248
|
+
}
|
|
249
|
+
.s-order-branch-instructions-heading i {
|
|
250
|
+
font-size: 0.875rem;
|
|
251
|
+
line-height: 1.25rem;
|
|
252
|
+
font-weight: 700;
|
|
253
|
+
--tw-text-opacity: 1;
|
|
254
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
255
|
+
}
|
|
256
|
+
.s-order-branch-instructions-content {
|
|
257
|
+
margin: 0px;
|
|
258
|
+
overflow-wrap: break-word;
|
|
259
|
+
font-size: 0.875rem;
|
|
260
|
+
line-height: 1.25rem;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
line-height: 1.6;
|
|
263
|
+
}
|
|
229
264
|
.s-order-branch-actions {
|
|
230
265
|
display: flex;
|
|
231
266
|
flex-shrink: 0;
|
|
@@ -14,10 +14,33 @@ export class SallaOrderBranch {
|
|
|
14
14
|
/** Stack the identity and contact cards vertically instead of side-by-side. */
|
|
15
15
|
this.stackCards = false;
|
|
16
16
|
this.isLoading = false;
|
|
17
|
+
/** Bilingual defaults for keys introduced by this component; store/central translations win. */
|
|
18
|
+
this.translationDefaults = {
|
|
19
|
+
'pages.orders.pickup_instructions': { ar: 'معلومات إرشادية', en: 'Pickup instructions' },
|
|
20
|
+
};
|
|
17
21
|
}
|
|
18
22
|
componentWillLoad() {
|
|
23
|
+
salla.lang.onLoaded?.(() => this.registerTranslationDefaults());
|
|
24
|
+
this.registerTranslationDefaults();
|
|
19
25
|
return this.getBranchData();
|
|
20
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
29
|
+
*/
|
|
30
|
+
registerTranslationDefaults() {
|
|
31
|
+
if (!salla?.lang?.addBulk)
|
|
32
|
+
return;
|
|
33
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
34
|
+
// `get` returns the key itself when no translation is found.
|
|
35
|
+
if (salla.lang.get?.(key) === key) {
|
|
36
|
+
acc[key] = value;
|
|
37
|
+
}
|
|
38
|
+
return acc;
|
|
39
|
+
}, {});
|
|
40
|
+
if (Object.keys(missing).length) {
|
|
41
|
+
salla.lang.addBulk(missing);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
21
44
|
async getBranchData() {
|
|
22
45
|
const orderId = salla.config.get('page.id');
|
|
23
46
|
if (!orderId)
|
|
@@ -53,6 +76,11 @@ export class SallaOrderBranch {
|
|
|
53
76
|
label(key, fallback) {
|
|
54
77
|
return salla.lang.getWithDefault(key, fallback);
|
|
55
78
|
}
|
|
79
|
+
bilingualLabel(key) {
|
|
80
|
+
const entry = this.translationDefaults[key];
|
|
81
|
+
const locale = (salla.lang.locale || 'ar').startsWith('en') ? 'en' : 'ar';
|
|
82
|
+
return this.label(key, entry?.[locale] ?? entry?.ar ?? key);
|
|
83
|
+
}
|
|
56
84
|
get preparationText() {
|
|
57
85
|
const range = this.branchData?.preparation_time_range;
|
|
58
86
|
if (!range?.from || !range?.to)
|
|
@@ -100,6 +128,16 @@ export class SallaOrderBranch {
|
|
|
100
128
|
get phone() {
|
|
101
129
|
return getBranchPhone(this.branchData?.contacts);
|
|
102
130
|
}
|
|
131
|
+
get pickupInstructions() {
|
|
132
|
+
const instructions = this.branchData?.pickup_instructions;
|
|
133
|
+
return typeof instructions === 'string' && instructions.trim() ? instructions : '';
|
|
134
|
+
}
|
|
135
|
+
renderPickupInstructions() {
|
|
136
|
+
const instructions = this.pickupInstructions;
|
|
137
|
+
if (!instructions)
|
|
138
|
+
return null;
|
|
139
|
+
return (h("div", { class: "s-order-branch-instructions" }, h("div", { class: "s-order-branch-instructions-heading" }, h("span", { "aria-hidden": "true" }, h("i", { class: "sicon-info" })), h("span", null, this.bilingualLabel('pages.orders.pickup_instructions'))), h("p", { class: "s-order-branch-instructions-content" }, instructions)));
|
|
140
|
+
}
|
|
103
141
|
renderDetailsColumn() {
|
|
104
142
|
const phone = this.phone;
|
|
105
143
|
if (!phone)
|
|
@@ -110,13 +148,13 @@ export class SallaOrderBranch {
|
|
|
110
148
|
const items = this.workingHoursItems;
|
|
111
149
|
if (!items.length)
|
|
112
150
|
return null;
|
|
113
|
-
return (h("div", { class: "s-order-branch-info-card s-order-branch-hours-card" }, h("span", { class: "s-order-branch-info-icon", "aria-hidden": "true" }, h("i", { class: "sicon-calendar-alt" })), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.checkout.working_hours', 'ساعات العمل')), h("div", { class: "s-order-branch-hours-list" }, items.map(item => (h("span", { class: "s-order-branch-hours-item" }, item)))))));
|
|
151
|
+
return (h("div", { class: "s-order-branch-info-card s-order-branch-hours-card" }, h("span", { class: "s-order-branch-info-icon", "aria-hidden": "true" }, h("i", { class: "sicon-calendar-alt" })), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.checkout.working_hours', 'ساعات العمل')), h("div", { class: "s-order-branch-hours-list" }, items.map((item, index) => (h("span", { key: `${item}-${index}`, class: "s-order-branch-hours-item" }, item)))))));
|
|
114
152
|
}
|
|
115
153
|
renderBranchIdentityCard() {
|
|
116
154
|
const branch = this.branchData;
|
|
117
155
|
const address = this.branchAddress;
|
|
118
156
|
const readyText = this.preparationText;
|
|
119
|
-
return (h("section", { class: "s-order-branch-card" }, h("div", { class: "s-order-branch-location" }, h("div", { class: "s-order-branch-identity" }, h("span", { class: "s-order-branch-store-icon" }, h("i", { class: "sicon-store", "aria-hidden": "true" })), h("div", { class: "s-order-branch-text" }, h("div", { class: "s-order-branch-name-row" }, branch?.name ? h("span", { class: "s-order-branch-name" }, branch.name) : null, readyText ? h("span", { class: "s-order-branch-ready" }, readyText) : null), address ? h("span", { class: "s-order-branch-address" }, address) : null)), this.mapUrl ? (h("div", { class: "s-order-branch-actions" }, h("a", { href: this.mapUrl, target: "_blank", rel: "noopener noreferrer", class: "s-order-branch-map-link" }, h("span", null, this.label('pages.orders.branch_map', 'موقع الفرع علي الخريطة')), h("span", { class: "s-order-branch-action-icon", innerHTML: navigationIcon })))) : null)));
|
|
157
|
+
return (h("section", { class: "s-order-branch-card" }, h("div", { class: "s-order-branch-location" }, h("div", { class: "s-order-branch-identity" }, h("span", { class: "s-order-branch-store-icon" }, h("i", { class: "sicon-store", "aria-hidden": "true" })), h("div", { class: "s-order-branch-text" }, h("div", { class: "s-order-branch-name-row" }, branch?.name ? h("span", { class: "s-order-branch-name" }, branch.name) : null, readyText ? h("span", { class: "s-order-branch-ready" }, readyText) : null), address ? h("span", { class: "s-order-branch-address" }, address) : null)), this.mapUrl ? (h("div", { class: "s-order-branch-actions" }, h("a", { href: this.mapUrl, target: "_blank", rel: "noopener noreferrer", class: "s-order-branch-map-link" }, h("span", null, this.label('pages.orders.branch_map', 'موقع الفرع علي الخريطة')), h("span", { class: "s-order-branch-action-icon", innerHTML: navigationIcon })))) : null), this.renderPickupInstructions()));
|
|
120
158
|
}
|
|
121
159
|
render() {
|
|
122
160
|
if (this.isLoading || !this.branchData) {
|
|
@@ -15,13 +15,15 @@ export class SallaOrderSummary {
|
|
|
15
15
|
this.isDigitalCard = (item) => item.product.type === 'codes';
|
|
16
16
|
this.isDigitalProduct = (item) => item.product.type === 'digital';
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
salla.lang.
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
20
20
|
this.codes_text = salla.lang.get('pages.thank_you.codes');
|
|
21
21
|
this.copy_text = salla.lang.get('common.elements.copy');
|
|
22
22
|
this.files_text = salla.lang.get('pages.thank_you.files');
|
|
23
23
|
this.download_text = salla.lang.get('pages.thank_you.download');
|
|
24
24
|
});
|
|
25
|
+
}
|
|
26
|
+
async componentWillLoad() {
|
|
25
27
|
return await this.getOrderItems();
|
|
26
28
|
}
|
|
27
29
|
copyToClipboardHandler(code) {
|
|
@@ -59,10 +61,11 @@ export class SallaOrderSummary {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
disconnectedCallback() {
|
|
64
|
+
this.langUnsubscribe?.();
|
|
62
65
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
63
66
|
}
|
|
64
67
|
render() {
|
|
65
|
-
return (h("ul", { key: '
|
|
68
|
+
return (h("ul", { key: 'b01089c3818be36fa4ff2341d7986269abdfd7c8', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
66
69
|
this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? iconCheck : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
67
70
|
this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
|
|
68
71
|
}
|
|
@@ -36,21 +36,28 @@ export class SallaOrderTotalsCard {
|
|
|
36
36
|
renderRefundRow(amount) {
|
|
37
37
|
return (h("div", { class: "s-order-totals-card-row" }, h("div", { class: "s-order-totals-card-row-inner" }, h("dt", { class: "s-order-totals-card-refund-label" }, h("span", { class: "s-order-totals-card-refund-icon" }, h("i", { class: "sicon-info" })), h("span", null, " ", salla.lang.get('pages.orders.refund_amount'))), h("dd", { class: "s-order-totals-card-refund-value" }, h("b", { innerHTML: salla.money(amount) })))));
|
|
38
38
|
}
|
|
39
|
+
/** Totals arrive either as a money object or a plain float, depending on the presenter. */
|
|
40
|
+
toAmount(value) {
|
|
41
|
+
return (typeof value === 'number' ? value : value?.amount) || 0;
|
|
42
|
+
}
|
|
39
43
|
render() {
|
|
40
44
|
if (!this.summary) {
|
|
41
45
|
return h(Host, { class: "s-order-totals-card-wrapper" });
|
|
42
46
|
}
|
|
43
47
|
const { summary } = this;
|
|
44
48
|
const hasOptions = Array.isArray(summary.options) ? summary.options.length > 0 : false;
|
|
49
|
+
const refundAmount = this.toAmount(summary.refund_amount);
|
|
50
|
+
// Independent of the refund: a partially refunded order can still owe a balance.
|
|
51
|
+
const isPartiallyPaid = summary.has_remaining_amount ?? this.toAmount(summary.remaining_amount) > 0;
|
|
45
52
|
return (h(Host, { class: "s-order-totals-card-wrapper" }, h("div", { class: "s-order-totals-card-panel" }, h("h2", { id: "summary-heading", class: "s-order-totals-card-heading" }, salla.lang.get('pages.orders.summary')), h("div", { class: "s-order-totals-card-flow" }, h("dl", { class: "s-order-totals-card-list" }, this.renderTotalRow(salla.lang.get('pages.cart.items_total'), summary.sub_total), hasOptions &&
|
|
46
53
|
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
|
|
47
54
|
this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
|
|
48
55
|
this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
|
|
49
|
-
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
|
|
56
|
+
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), isPartiallyPaid && summary.paid_amount != null
|
|
50
57
|
? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
51
|
-
: null,
|
|
58
|
+
: null, isPartiallyPaid
|
|
52
59
|
? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
|
|
53
|
-
: null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)),
|
|
60
|
+
: null, h("div", { class: "s-order-totals-card-total" }, this.renderTotalRow(salla.lang.get('pages.orders.final_total'), summary.total, 's-order-totals-card-total-label', 's-order-totals-card-total-value', true)), refundAmount > 0 ? (h("div", { class: "s-order-totals-card-refund" }, this.renderRefundRow(summary.refund_amount))) : null)))));
|
|
54
61
|
}
|
|
55
62
|
static get is() { return "salla-order-totals-card"; }
|
|
56
63
|
static get originalStyleUrls() {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
import { moneyHtml } from "../../Helpers/money-text";
|
|
7
|
+
import { addMissingTranslations } from "../../Helpers/translate";
|
|
6
8
|
const FEEDBACK_STATUS_WAITING = 'waiting';
|
|
7
9
|
const TAB_QUERY_PARAM = 'tab';
|
|
8
10
|
const SHOW_EXTERNAL_ORDERS_FEATURE = 'show-external-orders';
|
|
@@ -52,7 +54,11 @@ export class SallaOrder {
|
|
|
52
54
|
this.reviewPoints = 0;
|
|
53
55
|
this.filterGeneration = 0;
|
|
54
56
|
this.showExternalOrders = false;
|
|
55
|
-
|
|
57
|
+
}
|
|
58
|
+
connectedCallback() {
|
|
59
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
60
|
+
addMissingTranslations(LANG_DEFAULTS);
|
|
61
|
+
this.refreshReviewLabels();
|
|
56
62
|
this.languageCode = salla.lang.locale;
|
|
57
63
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
58
64
|
this.totalOrderText = salla.lang.get('pages.orders.total');
|
|
@@ -62,6 +68,9 @@ export class SallaOrder {
|
|
|
62
68
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
63
69
|
});
|
|
64
70
|
}
|
|
71
|
+
disconnectedCallback() {
|
|
72
|
+
this.langUnsubscribe?.();
|
|
73
|
+
}
|
|
65
74
|
setLoadMoreLoading(isLoading = true) {
|
|
66
75
|
const buttonText = this.status?.querySelector('.s-button-text');
|
|
67
76
|
if (!buttonText || !this.btnLoader)
|
|
@@ -362,7 +371,9 @@ export class SallaOrder {
|
|
|
362
371
|
span4.classList.add('s-orders-mobile-title');
|
|
363
372
|
span4.textContent = `${this.totalOrderText}:`;
|
|
364
373
|
const div4 = document.createElement('div');
|
|
365
|
-
|
|
374
|
+
// In the order's own currency: salla.money alone falls back to the selected market's currency
|
|
375
|
+
// when the page config does not list the order currency (Multimarket).
|
|
376
|
+
div4.innerHTML = moneyHtml(Number(order.total?.amount), order.total?.currency);
|
|
366
377
|
const anchor2 = document.createElement('a');
|
|
367
378
|
if (order.url)
|
|
368
379
|
anchor2.href = order.url;
|
|
@@ -463,10 +474,6 @@ export class SallaOrder {
|
|
|
463
474
|
this.populateOrdersTableIfEmpty();
|
|
464
475
|
}
|
|
465
476
|
componentWillLoad() {
|
|
466
|
-
salla.lang.onLoaded(() => {
|
|
467
|
-
salla.lang.addBulk(LANG_DEFAULTS);
|
|
468
|
-
this.refreshReviewLabels();
|
|
469
|
-
});
|
|
470
477
|
return salla.onReady().then(() => {
|
|
471
478
|
this.setupLoyalty();
|
|
472
479
|
this.showExternalOrders = salla.config
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h, Host } from "@stencil/core";
|
|
4
|
+
import { h, Host, forceUpdate } from "@stencil/core";
|
|
5
5
|
import Inbox from "../../assets/svg/inbox.svg";
|
|
6
6
|
/**
|
|
7
7
|
* @slot title - The primary content of the placeholder.
|
|
@@ -22,10 +22,17 @@ export class SallaPlaceholder {
|
|
|
22
22
|
* The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon
|
|
23
23
|
*/
|
|
24
24
|
this.iconSize = 'md';
|
|
25
|
-
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
26
28
|
this.translationLoaded = true;
|
|
29
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
30
|
+
forceUpdate(this);
|
|
27
31
|
});
|
|
28
32
|
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.langUnsubscribe?.();
|
|
35
|
+
}
|
|
29
36
|
alignmentClass() {
|
|
30
37
|
return {
|
|
31
38
|
's-placeholder-wrapper': true,
|
|
@@ -35,7 +42,7 @@ export class SallaPlaceholder {
|
|
|
35
42
|
};
|
|
36
43
|
}
|
|
37
44
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'e0ddbbcae1f1770e0aa1fde820b80f010b837c70', class: this.alignmentClass() }, h("div", { key: '42aaa39f4b5ff6e854d8752fd8b7f51967a61640', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '89b58694c6e8e52df2a6cfcf53f928e8e1be65cc', class: "s-placeholder-title" }, h("slot", { key: '810a0cbc0338a430f48e0478d855baef78368d30', name: 'title' }, h("span", { key: '29f370d5460607afd3ad8971afb8387e3ab8ccd7' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'daabc9a39c770605c2b0a18a8e32c9b77cd28387', class: "s-placeholder-description" }, h("slot", { key: 'b318ca5417191c0e78eaab5e814dbc393679b416', name: 'description' }, h("span", { key: '1f616f82f63bbe79d7f88ae83544ce0ab97aa9fb' }, salla.lang.get('common.errors.empty_results'))))));
|
|
39
46
|
}
|
|
40
47
|
static get is() { return "salla-placeholder"; }
|
|
41
48
|
static get originalStyleUrls() {
|
|
@@ -22,7 +22,7 @@ export class SallaPriceRange {
|
|
|
22
22
|
this.minPrice = this.filtersData.price.min;
|
|
23
23
|
this.maxPrice = this.filtersData.price.max;
|
|
24
24
|
}
|
|
25
|
-
salla.lang.
|
|
25
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
26
26
|
this.moreThanLabel = salla.lang.getWithDefault('common.elements.more_than', this.moreThanLabel);
|
|
27
27
|
this.lessThanLabel = salla.lang.getWithDefault('common.elements.less_than', this.lessThanLabel);
|
|
28
28
|
this.toLabel = salla.lang.getWithDefault('common.elements.to', this.toLabel);
|
|
@@ -49,6 +49,9 @@ export class SallaPriceRange {
|
|
|
49
49
|
// do whatever
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.langUnsubscribe?.();
|
|
54
|
+
}
|
|
52
55
|
/**
|
|
53
56
|
* reset the price range inputs
|
|
54
57
|
*/
|
|
@@ -146,9 +149,9 @@ export class SallaPriceRange {
|
|
|
146
149
|
this.maxPrice = value === undefined ? '' : value;
|
|
147
150
|
}
|
|
148
151
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: '58b6733af46dcfc2f58f6096a3054512aea0f13a' }, this.filterValues.map((filterValue, index) => {
|
|
150
153
|
return h("label", { class: "s-filters-label", htmlFor: `${this.option.key}-${index}`, key: index }, h("input", { id: `${this.option.key}-${index}`, name: "price", type: "radio", checked: this.isChecked(filterValue), class: "s-filters-radio", onChange: e => this.handleMinMaxPrice(e, filterValue) }), h("span", { innerHTML: this.getPriceLabel(filterValue) }));
|
|
151
|
-
}), h("div", { key: '
|
|
154
|
+
}), h("div", { key: 'ffac46ec70c43e8e6866c27e7885700d8b84e02e', class: "flex justify-center items-center" }, h("div", { key: 'a44f86c833a9311fdbd043bacab3c8e39a3798a3', class: "relative max-w-xl w-full" }, h("div", { key: '58da7b0ff0bd6599660ddf2aa2b6f1c06fbd4e3a', class: "s-price-range-inputs" }, h("div", { key: 'f6cc6ea7bc4fa74b962adc29fd0f496a81ff7f98', class: "s-price-range-relative" }, h("div", { key: 'c5dcb135e50a0eafb9662deb3adde895ea997fa9', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'ddc438e870e21a030984ba5422d686ee0d756b9a', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '713b4a7ba19e6c00a57b20978813dbd250acec6d', class: "s-price-range-gray-text" }, " -"), h("div", { key: '8a87cb916d418b898747b7dfe63d770419892ec1', class: "s-price-range-relative" }, h("div", { key: 'fb1790fdc5494925560a4ce8be907f980090ceff', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '164c84322ccf6fdddc2cb93f40440e4ddab9c164', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: 'cfb8f9d06b1b66170bddfebcd5bc0fea6bdcb9ff', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '1c1251cc2becb339ee3f286d3be50acc5ea159c0', innerHTML: this.isRTL ? arrowLeft : arrowRight })))))));
|
|
152
155
|
}
|
|
153
156
|
componentDidLoad() {
|
|
154
157
|
this.isReady = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { Host, h } from "@stencil/core";
|
|
4
|
+
import { Host, h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import BellRingIcon from "../../assets/svg/bell-ring.svg";
|
|
6
6
|
import Helper from "../../Helpers/Helper";
|
|
7
7
|
export class SallaProductAvailability {
|
|
@@ -45,11 +45,8 @@ export class SallaProductAvailability {
|
|
|
45
45
|
error?.classList.contains('s-product-availability-error-msg') && (error.innerText = '');
|
|
46
46
|
e.keyCode === 13 && this.submit();
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
51
|
-
this.modal?.setTitle(this.title_);
|
|
52
|
-
});
|
|
48
|
+
// Read before the guest path below strips the attribute; the lang subscriber runs later, from connectedCallback.
|
|
49
|
+
this.hostTitle = this.host.title;
|
|
53
50
|
if (!this.productId) {
|
|
54
51
|
this.productId = salla.config.get('page.id');
|
|
55
52
|
}
|
|
@@ -59,6 +56,18 @@ export class SallaProductAvailability {
|
|
|
59
56
|
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
60
57
|
this.host.removeAttribute('title');
|
|
61
58
|
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
61
|
+
this.translationLoaded = true;
|
|
62
|
+
this.title_ = this.hostTitle || salla.lang.get('pages.products.notify_availability_title');
|
|
63
|
+
this.modal?.setTitle(this.title_);
|
|
64
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
65
|
+
forceUpdate(this);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this.langUnsubscribe?.();
|
|
70
|
+
}
|
|
62
71
|
channelsWatcher(newValue) {
|
|
63
72
|
// fall back to store-configured channels, reading config directly when the SDK helper is missing
|
|
64
73
|
let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
|
|
@@ -137,7 +146,7 @@ export class SallaProductAvailability {
|
|
|
137
146
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
138
147
|
}
|
|
139
148
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: 'aa9fad186e8f24c5e27a1e9e6d5de75806226bce', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
141
150
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
142
151
|
:
|
|
143
152
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
|