@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
4
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { R as Rate } from './star2.js';
|
|
6
6
|
import { C as Cancel } from './cancel.js';
|
|
7
7
|
import { d as defineCustomElement$b } from './salla-button2.js';
|
|
@@ -95,16 +95,23 @@ const SallaLoyalty$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoyalty exten
|
|
|
95
95
|
salla.onReady(() => {
|
|
96
96
|
this.is_loggedin = salla.config.isUser();
|
|
97
97
|
});
|
|
98
|
-
salla.lang.onLoaded(() => {
|
|
99
|
-
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
100
|
-
this.translationLoaded = true;
|
|
101
|
-
});
|
|
102
98
|
salla.cart.event.onUpdated(cart => {
|
|
103
99
|
this.prizePoints = cart.loyalty.prize?.points;
|
|
104
100
|
this.prizeTitle = cart.loyalty.prize?.title;
|
|
105
101
|
this.customerPoints = cart.loyalty.customer_points || this.customerPoints;
|
|
106
102
|
});
|
|
107
103
|
}
|
|
104
|
+
connectedCallback() {
|
|
105
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
106
|
+
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
107
|
+
this.translationLoaded = true;
|
|
108
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
109
|
+
forceUpdate(this);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
disconnectedCallback() {
|
|
113
|
+
this.langUnsubscribe?.();
|
|
114
|
+
}
|
|
108
115
|
onTabSelected(event) {
|
|
109
116
|
const prize = this.loyaltyProgram?.prizes.find(p => p.title === event.detail?.name);
|
|
110
117
|
if (prize)
|
|
@@ -477,16 +477,21 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class SallaMap extends HTMLEle
|
|
|
477
477
|
* Sets map style.
|
|
478
478
|
*/
|
|
479
479
|
this.theme = 'light';
|
|
480
|
-
salla.
|
|
480
|
+
salla.onReady(() => {
|
|
481
|
+
this.apiKey = salla.config.get('store.settings.keys.maps');
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
connectedCallback() {
|
|
485
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
481
486
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
482
487
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
483
488
|
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
484
489
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
485
490
|
this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
|
|
486
491
|
});
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
492
|
+
}
|
|
493
|
+
disconnectedCallback() {
|
|
494
|
+
this.langUnsubscribe?.();
|
|
490
495
|
}
|
|
491
496
|
formatAddress(address) {
|
|
492
497
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -758,11 +763,11 @@ const SallaMap = /*@__PURE__*/ proxyCustomElement(class SallaMap extends HTMLEle
|
|
|
758
763
|
}
|
|
759
764
|
// render
|
|
760
765
|
render() {
|
|
761
|
-
return (h(Host, { key: '
|
|
766
|
+
return (h(Host, { key: '3200387d0b18f6ecc5f5b6c2a464cb02516268f9', class: "s-map-wrapper" }, h("salla-modal", { key: '1a0b0181945dc1c5fa3950f7bcdf56f4aed2be1c', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
762
767
|
this.locationModal = modal;
|
|
763
|
-
} }, this.getLocationModal()), h("slot", { key: '
|
|
768
|
+
} }, this.getLocationModal()), h("slot", { key: '474ba510d9c5cbf0abc473151674e6627f374458', name: "button" }, h("salla-button", { key: '3a08552e4be8f1306f679fd44231743a377064ea', onClick: () => {
|
|
764
769
|
this.open();
|
|
765
|
-
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '
|
|
770
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '0b17fd41e0563c52e7826534877df00adcbce777', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : SILocation }), 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) })));
|
|
766
771
|
}
|
|
767
772
|
get host() { return this; }
|
|
768
773
|
static get style() { return sallaMapCss; }
|
|
@@ -20,11 +20,16 @@ const SallaNotifications$1 = /*@__PURE__*/ proxyCustomElement(class SallaNotific
|
|
|
20
20
|
this.itemPerPage = 10;
|
|
21
21
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
22
22
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
23
|
-
|
|
23
|
+
}
|
|
24
|
+
connectedCallback() {
|
|
25
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
24
26
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
25
27
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
26
28
|
});
|
|
27
29
|
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.langUnsubscribe?.();
|
|
32
|
+
}
|
|
28
33
|
// Show/hide loading
|
|
29
34
|
loading(isLoading = true) {
|
|
30
35
|
let btnText = this.status?.querySelector('.s-button-text');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
4
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { t as translate } from './translate.js';
|
|
6
6
|
import { S as SpecialDiscountIcon } from './special-discount.js';
|
|
7
7
|
import { T as Tag } from './tag.js';
|
|
@@ -41,10 +41,6 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
41
41
|
this.translationLoaded = false;
|
|
42
42
|
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
43
43
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
44
|
-
salla.lang.onLoaded(() => {
|
|
45
|
-
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
46
|
-
this.translationLoaded = true;
|
|
47
|
-
});
|
|
48
44
|
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>`;
|
|
49
45
|
// this.productSlot = this.host.querySelector('[slot="product"]')?.innerHTML || this.defaultProductSlot();
|
|
50
46
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
@@ -56,6 +52,17 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
56
52
|
this.open(offer.product_id);
|
|
57
53
|
});
|
|
58
54
|
}
|
|
55
|
+
connectedCallback() {
|
|
56
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
57
|
+
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
58
|
+
this.translationLoaded = true;
|
|
59
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
60
|
+
forceUpdate(this);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
disconnectedCallback() {
|
|
64
|
+
this.langUnsubscribe?.();
|
|
65
|
+
}
|
|
59
66
|
/**
|
|
60
67
|
* Emits a promotion viewed event for analytics tracking
|
|
61
68
|
* @param offer - The offer being viewed in the modal
|
|
@@ -253,7 +260,7 @@ const SallaOfferModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaOfferModal
|
|
|
253
260
|
// '</div>';
|
|
254
261
|
// }
|
|
255
262
|
render() {
|
|
256
|
-
return h("salla-modal", { key: '
|
|
263
|
+
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
|
|
257
264
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
|
|
258
265
|
this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
259
266
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
@@ -69,8 +69,16 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
69
69
|
this.get_from_text = translate('pages.offer.get_from_categories', {}, 'احصل من:');
|
|
70
70
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
71
71
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
72
|
+
salla.onReady(() => {
|
|
73
|
+
this.currentPage = salla.config.get('page.slug');
|
|
74
|
+
const currencies = salla.config.get('currencies') || {};
|
|
75
|
+
const currencyCode = salla.config.get('user.currency_code');
|
|
76
|
+
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
connectedCallback() {
|
|
72
80
|
// Language
|
|
73
|
-
salla.lang.
|
|
81
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
74
82
|
this.offer_with_price_text = salla.lang.get('pages.offer.with_price');
|
|
75
83
|
this.with_discount_text = salla.lang.get('pages.products.with_a_discount');
|
|
76
84
|
this.product_discount_text = salla.lang.get('pages.products.discount');
|
|
@@ -86,12 +94,9 @@ const SallaOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaOffer extends H
|
|
|
86
94
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
87
95
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
88
96
|
});
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const currencyCode = salla.config.get('user.currency_code');
|
|
93
|
-
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
94
|
-
});
|
|
97
|
+
}
|
|
98
|
+
disconnectedCallback() {
|
|
99
|
+
this.langUnsubscribe?.();
|
|
95
100
|
}
|
|
96
101
|
async getEndpointByPageName() {
|
|
97
102
|
if (this.currentPage == PageType.Cart) {
|
|
@@ -63,7 +63,7 @@ var phoneTalkingIcon = `<!-- Generated by IcoMoon.io -->
|
|
|
63
63
|
</svg>
|
|
64
64
|
`;
|
|
65
65
|
|
|
66
|
-
const sallaOrderBranchCss = "/*!twlt*/:host{display:block}.s-order-branch-ready{background-color:color-mix(in srgb, var(--color-primary) 30%, transparent)}.filter{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)}.s-order-branch-wrapper{margin-bottom:1.5rem;display:flex;flex-direction:column;gap:1rem;font-family:inherit}.s-order-branch-container{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));align-items:stretch;gap:1rem}@media (min-width: 768px){.s-order-branch-container{grid-template-columns:repeat(2, minmax(0, 1fr))}}.s-order-branch-details{display:grid;align-content:stretch;gap:1rem}.s-order-branch-info-card{display:flex;min-height:68px;align-items:center;justify-content:space-between;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:0.75rem}.s-order-branch-info-text{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:3px;text-align:start}.s-order-branch-info-label{font-size:0.75rem;line-height:1rem;line-height:1.35;color:var(--color-text-secondary,#666)}.s-order-branch-info-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-hours-card .s-order-branch-info-text{gap:0.5rem}.s-order-branch-hours-list{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-hours-item{display:inline-flex;align-items:center;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-border,#eee);padding-left:0.625rem;padding-right:0.625rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-info-action{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:0.5rem;background-color:var(--color-surface-secondary,#f6f6f6);color:var(--color-text-primary,#2b2d34);text-decoration-line:none}.s-order-branch-info-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:22px;color:currentColor}.s-order-branch-info-icon svg{height:1.5rem;width:1.5rem;fill:currentColor}.s-order-branch-card{display:flex;flex-direction:column;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:1rem}@media (min-width: 768px){.s-order-branch-card{padding:1.25rem}}.s-order-branch-ready{display:inline-flex;flex-shrink:0;align-items:center;white-space:nowrap;border-radius:9999px;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary-dark,#0c2519)}.s-order-branch-location{display:flex;min-height:52px;flex-direction:column;align-items:stretch;justify-content:space-between;gap:1.5rem}@media (min-width: 768px){.s-order-branch-location{flex-direction:row;align-items:center}}.s-order-branch-identity{display:flex;min-width:0px;flex:1 1 0%;align-items:center;gap:0.75rem}.s-order-branch-store-icon{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:1.5rem;line-height:2rem;color:var(--color-text-primary,#2b2d34)}.s-order-branch-store-icon svg{height:1em;width:1em;fill:currentColor}.s-order-branch-text{display:flex;min-width:0px;flex-direction:column;gap:0.25rem;text-align:start}.s-order-branch-name-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;line-height:1.5rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#2b2d34)}.s-order-branch-address{overflow-wrap:break-word;font-size:0.75rem;line-height:1rem;line-height:1.45;color:var(--color-text-secondary,#666)}.s-order-branch-actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;gap:0.75rem}@media (min-width: 768px){.s-order-branch-actions{flex-wrap:nowrap}}.s-order-branch-map-link{display:inline-flex;min-height:2.25rem;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.875rem;padding-right:0.875rem;padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.2;color:var(--color-primary,#236e4c);text-decoration-line:none}.s-order-branch-action-icon{display:inline-flex;align-items:center;justify-content:center;font-size:0.875rem;line-height:1.25rem;color:currentColor}.s-order-branch-action-icon svg{height:1em;width:1em}";
|
|
66
|
+
const sallaOrderBranchCss = "/*!twlt*/:host{display:block}.s-order-branch-ready{background-color:color-mix(in srgb, var(--color-primary) 30%, transparent)}.s-order-branch-instructions{background-color:color-mix(in srgb, var(--color-primary) 10%, transparent)}.s-order-branch-instructions-content{white-space:pre-wrap}.filter{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)}.s-order-branch-wrapper{margin-bottom:1.5rem;display:flex;flex-direction:column;gap:1rem;font-family:inherit}.s-order-branch-container{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));align-items:stretch;gap:1rem}@media (min-width: 768px){.s-order-branch-container{grid-template-columns:repeat(2, minmax(0, 1fr))}}.s-order-branch-details{display:grid;align-content:stretch;gap:1rem}.s-order-branch-info-card{display:flex;min-height:68px;align-items:center;justify-content:space-between;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:0.75rem}.s-order-branch-info-text{display:flex;min-width:0px;flex:1 1 0%;flex-direction:column;gap:3px;text-align:start}.s-order-branch-info-label{font-size:0.75rem;line-height:1rem;line-height:1.35;color:var(--color-text-secondary,#666)}.s-order-branch-info-value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-hours-card .s-order-branch-info-text{gap:0.5rem}.s-order-branch-hours-list{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-hours-item{display:inline-flex;align-items:center;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-border,#eee);padding-left:0.625rem;padding-right:0.625rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#1d1d1d)}.s-order-branch-info-action{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;border-radius:0.5rem;background-color:var(--color-surface-secondary,#f6f6f6);color:var(--color-text-primary,#2b2d34);text-decoration-line:none}.s-order-branch-info-icon{display:inline-flex;height:3rem;width:3rem;align-items:center;justify-content:center;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:22px;color:currentColor}.s-order-branch-info-icon svg{height:1.5rem;width:1.5rem;fill:currentColor}.s-order-branch-card{display:flex;flex-direction:column;gap:0.75rem;border-radius:0.5rem;border-width:1px;border-color:var(--color-border,#eee);background-color:var(--color-surface,#fff);padding:1rem}@media (min-width: 768px){.s-order-branch-card{padding:1.25rem}}.s-order-branch-ready{display:inline-flex;flex-shrink:0;align-items:center;white-space:nowrap;border-radius:9999px;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:500;color:var(--color-primary-dark,#0c2519)}.s-order-branch-location{display:flex;min-height:52px;flex-direction:column;align-items:stretch;justify-content:space-between;gap:1.5rem}@media (min-width: 768px){.s-order-branch-location{flex-direction:row;align-items:center}}.s-order-branch-identity{display:flex;min-width:0px;flex:1 1 0%;align-items:center;gap:0.75rem}.s-order-branch-store-icon{display:inline-flex;height:3rem;width:3rem;flex-shrink:0;align-items:center;justify-content:center;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:1.5rem;line-height:2rem;color:var(--color-text-primary,#2b2d34)}.s-order-branch-store-icon svg{height:1em;width:1em;fill:currentColor}.s-order-branch-text{display:flex;min-width:0px;flex-direction:column;gap:0.25rem;text-align:start}.s-order-branch-name-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-order-branch-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem;line-height:1.5rem;font-weight:500;line-height:1.45;color:var(--color-text-primary,#2b2d34)}.s-order-branch-address{overflow-wrap:break-word;font-size:0.75rem;line-height:1rem;line-height:1.45;color:var(--color-text-secondary,#666)}.s-order-branch-instructions{border-radius:0.5rem;padding:1rem;text-align:start}.s-order-branch-instructions-heading{margin-bottom:0.5rem;display:flex;align-items:center;gap:0.5rem;font-size:0.75rem;line-height:1rem;line-height:1.35}.s-order-branch-instructions-heading i{font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.s-order-branch-instructions-content{margin:0px;overflow-wrap:break-word;font-size:0.875rem;line-height:1.25rem;font-weight:600;line-height:1.6}.s-order-branch-actions{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;gap:0.75rem}@media (min-width: 768px){.s-order-branch-actions{flex-wrap:nowrap}}.s-order-branch-map-link{display:inline-flex;min-height:2.25rem;align-items:center;justify-content:center;gap:0.5rem;white-space:nowrap;border-radius:0.375rem;border-width:1px;border-color:var(--color-primary,#236e4c);padding-left:0.875rem;padding-right:0.875rem;padding-top:0.5rem;padding-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;line-height:1.2;color:var(--color-primary,#236e4c);text-decoration-line:none}.s-order-branch-action-icon{display:inline-flex;align-items:center;justify-content:center;font-size:0.875rem;line-height:1.25rem;color:currentColor}.s-order-branch-action-icon svg{height:1em;width:1em}";
|
|
67
67
|
|
|
68
68
|
const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBranch extends HTMLElement {
|
|
69
69
|
constructor() {
|
|
@@ -72,10 +72,33 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
|
|
|
72
72
|
/** Stack the identity and contact cards vertically instead of side-by-side. */
|
|
73
73
|
this.stackCards = false;
|
|
74
74
|
this.isLoading = false;
|
|
75
|
+
/** Bilingual defaults for keys introduced by this component; store/central translations win. */
|
|
76
|
+
this.translationDefaults = {
|
|
77
|
+
'pages.orders.pickup_instructions': { ar: 'معلومات إرشادية', en: 'Pickup instructions' },
|
|
78
|
+
};
|
|
75
79
|
}
|
|
76
80
|
componentWillLoad() {
|
|
81
|
+
salla.lang.onLoaded?.(() => this.registerTranslationDefaults());
|
|
82
|
+
this.registerTranslationDefaults();
|
|
77
83
|
return this.getBranchData();
|
|
78
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
87
|
+
*/
|
|
88
|
+
registerTranslationDefaults() {
|
|
89
|
+
if (!salla?.lang?.addBulk)
|
|
90
|
+
return;
|
|
91
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
92
|
+
// `get` returns the key itself when no translation is found.
|
|
93
|
+
if (salla.lang.get?.(key) === key) {
|
|
94
|
+
acc[key] = value;
|
|
95
|
+
}
|
|
96
|
+
return acc;
|
|
97
|
+
}, {});
|
|
98
|
+
if (Object.keys(missing).length) {
|
|
99
|
+
salla.lang.addBulk(missing);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
79
102
|
async getBranchData() {
|
|
80
103
|
const orderId = salla.config.get('page.id');
|
|
81
104
|
if (!orderId)
|
|
@@ -111,6 +134,11 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
|
|
|
111
134
|
label(key, fallback) {
|
|
112
135
|
return salla.lang.getWithDefault(key, fallback);
|
|
113
136
|
}
|
|
137
|
+
bilingualLabel(key) {
|
|
138
|
+
const entry = this.translationDefaults[key];
|
|
139
|
+
const locale = (salla.lang.locale || 'ar').startsWith('en') ? 'en' : 'ar';
|
|
140
|
+
return this.label(key, entry?.[locale] ?? entry?.ar ?? key);
|
|
141
|
+
}
|
|
114
142
|
get preparationText() {
|
|
115
143
|
const range = this.branchData?.preparation_time_range;
|
|
116
144
|
if (!range?.from || !range?.to)
|
|
@@ -158,6 +186,16 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
|
|
|
158
186
|
get phone() {
|
|
159
187
|
return getBranchPhone(this.branchData?.contacts);
|
|
160
188
|
}
|
|
189
|
+
get pickupInstructions() {
|
|
190
|
+
const instructions = this.branchData?.pickup_instructions;
|
|
191
|
+
return typeof instructions === 'string' && instructions.trim() ? instructions : '';
|
|
192
|
+
}
|
|
193
|
+
renderPickupInstructions() {
|
|
194
|
+
const instructions = this.pickupInstructions;
|
|
195
|
+
if (!instructions)
|
|
196
|
+
return null;
|
|
197
|
+
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)));
|
|
198
|
+
}
|
|
161
199
|
renderDetailsColumn() {
|
|
162
200
|
const phone = this.phone;
|
|
163
201
|
if (!phone)
|
|
@@ -168,13 +206,13 @@ const SallaOrderBranch$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderBran
|
|
|
168
206
|
const items = this.workingHoursItems;
|
|
169
207
|
if (!items.length)
|
|
170
208
|
return null;
|
|
171
|
-
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)))))));
|
|
209
|
+
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)))))));
|
|
172
210
|
}
|
|
173
211
|
renderBranchIdentityCard() {
|
|
174
212
|
const branch = this.branchData;
|
|
175
213
|
const address = this.branchAddress;
|
|
176
214
|
const readyText = this.preparationText;
|
|
177
|
-
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)));
|
|
215
|
+
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()));
|
|
178
216
|
}
|
|
179
217
|
render() {
|
|
180
218
|
if (this.isLoading || !this.branchData) {
|
|
@@ -40,13 +40,15 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
|
|
|
40
40
|
this.isDigitalCard = (item) => item.product.type === 'codes';
|
|
41
41
|
this.isDigitalProduct = (item) => item.product.type === 'digital';
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
salla.lang.
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
45
45
|
this.codes_text = salla.lang.get('pages.thank_you.codes');
|
|
46
46
|
this.copy_text = salla.lang.get('common.elements.copy');
|
|
47
47
|
this.files_text = salla.lang.get('pages.thank_you.files');
|
|
48
48
|
this.download_text = salla.lang.get('pages.thank_you.download');
|
|
49
49
|
});
|
|
50
|
+
}
|
|
51
|
+
async componentWillLoad() {
|
|
50
52
|
return await this.getOrderItems();
|
|
51
53
|
}
|
|
52
54
|
copyToClipboardHandler(code) {
|
|
@@ -84,10 +86,11 @@ const SallaOrderSummary$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrderSum
|
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
disconnectedCallback() {
|
|
89
|
+
this.langUnsubscribe?.();
|
|
87
90
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
88
91
|
}
|
|
89
92
|
render() {
|
|
90
|
-
return (h("ul", { key: '
|
|
93
|
+
return (h("ul", { key: 'b01089c3818be36fa4ff2341d7986269abdfd7c8', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
91
94
|
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 ? IconVerified : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
92
95
|
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))));
|
|
93
96
|
}
|
|
@@ -43,21 +43,28 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
43
43
|
renderRefundRow(amount) {
|
|
44
44
|
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) })))));
|
|
45
45
|
}
|
|
46
|
+
/** Totals arrive either as a money object or a plain float, depending on the presenter. */
|
|
47
|
+
toAmount(value) {
|
|
48
|
+
return (typeof value === 'number' ? value : value?.amount) || 0;
|
|
49
|
+
}
|
|
46
50
|
render() {
|
|
47
51
|
if (!this.summary) {
|
|
48
52
|
return h(Host, { class: "s-order-totals-card-wrapper" });
|
|
49
53
|
}
|
|
50
54
|
const { summary } = this;
|
|
51
55
|
const hasOptions = Array.isArray(summary.options) ? summary.options.length > 0 : false;
|
|
56
|
+
const refundAmount = this.toAmount(summary.refund_amount);
|
|
57
|
+
// Independent of the refund: a partially refunded order can still owe a balance.
|
|
58
|
+
const isPartiallyPaid = summary.has_remaining_amount ?? this.toAmount(summary.remaining_amount) > 0;
|
|
52
59
|
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 &&
|
|
53
60
|
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
|
|
54
61
|
this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
|
|
55
62
|
this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
|
|
56
|
-
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
|
|
63
|
+
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), isPartiallyPaid && summary.paid_amount != null
|
|
57
64
|
? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
58
|
-
: null,
|
|
65
|
+
: null, isPartiallyPaid
|
|
59
66
|
? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
|
|
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)),
|
|
67
|
+
: 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)))));
|
|
61
68
|
}
|
|
62
69
|
static get watchers() { return {
|
|
63
70
|
"order": ["handleOrderChange"]
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
5
5
|
import { H as Helper } from './Helper.js';
|
|
6
|
+
import { a as addMissingTranslations } from './translate.js';
|
|
6
7
|
import { d as defineCustomElement$c } from './salla-attachment-view2.js';
|
|
7
8
|
import { d as defineCustomElement$b } from './salla-button2.js';
|
|
8
9
|
import { d as defineCustomElement$a } from './salla-file-upload2.js';
|
|
@@ -15,6 +16,34 @@ import { d as defineCustomElement$4 } from './salla-rating-stars2.js';
|
|
|
15
16
|
import { d as defineCustomElement$3 } from './salla-skeleton2.js';
|
|
16
17
|
import { d as defineCustomElement$2 } from './salla-slider2.js';
|
|
17
18
|
|
|
19
|
+
const escapeHtml = (value) => String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
20
|
+
/** Riyal icon swap, the same rule `salla.money()` applies when the store enables `use_sar_symbol`. */
|
|
21
|
+
const withSarIcon = (html) => salla?.config?.get?.('store.settings.use_sar_symbol') ? html.replace(/SAR|ر\.س\.?/g, '<i class=sicon-sar></i>') : html;
|
|
22
|
+
/**
|
|
23
|
+
* Money in a given currency as HTML, without ever borrowing another currency's symbol.
|
|
24
|
+
* `salla.money()` resolves currencies from the page config, which under Multimarket only holds the
|
|
25
|
+
* selected market's currencies, and silently falls back to them — so an order placed in SAR (or KWD)
|
|
26
|
+
* would show the current market's symbol. Known currencies keep `salla.money()`'s store formatting;
|
|
27
|
+
* unknown ones use the ISO symbol from `Intl`, separated by a non-breaking space.
|
|
28
|
+
*/
|
|
29
|
+
function moneyHtml(amount, currency) {
|
|
30
|
+
// Only bypass salla.money when the page's currency list is known and lacks this code.
|
|
31
|
+
const currencies = salla?.config?.get?.('currencies');
|
|
32
|
+
if (!currency || !currencies || typeof currencies !== 'object' || currencies[currency]) {
|
|
33
|
+
return salla.money({ amount, currency });
|
|
34
|
+
}
|
|
35
|
+
let symbol = currency;
|
|
36
|
+
try {
|
|
37
|
+
symbol = new Intl.NumberFormat(salla?.lang?.locale || 'ar', { style: 'currency', currency, currencyDisplay: 'narrowSymbol' })
|
|
38
|
+
.formatToParts(0)
|
|
39
|
+
.find(part => part.type === 'currency')?.value || currency;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
// unknown ISO code: show the code itself
|
|
43
|
+
}
|
|
44
|
+
return withSarIcon(`${escapeHtml(salla.helpers.number(amount))} ${escapeHtml(symbol)}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
18
47
|
const sallaOrdersCss = "/*!twlt*/:host{display:block}.s-orders-banner{display:flex;align-items:center;gap:0.625rem;width:100%;margin-top:1.5rem;margin-bottom:0.75rem;padding:0.75rem;border-radius:0.5rem;background-color:#E6F4EA}.s-orders-banner-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;color:#1B7F5C}.s-orders-banner-icon svg{width:1.5rem;height:1.5rem;fill:currentColor}.s-orders-banner-text{flex:1;margin:0;font-size:0.875rem;line-height:1.25rem;color:#1f2937}.s-orders-action-cell.s-orders-action-cell{display:flex;align-items:center;justify-content:flex-end}.s-orders-leave-review-btn .s-button-text{display:flex;align-items:center;gap:0.375rem}.s-orders-action-cell .s-orders-status-rated{margin-inline-start:auto}.relative{position:relative}.table{display:table}.outline{outline-style:solid}.filter{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)}.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-orders-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-orders-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-orders-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-orders-mobile-title{display:none}}.s-orders-reference-id{display:none}@media (min-width: 768px){.s-orders-reference-id{display:inline-block}}.s-orders-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-orders-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-orders-copy-to-clipboard-button{display:none}}.s-orders-copy-to-clipboard-button salla-button{position:relative}.s-orders-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-orders-copy-to-clipboard-button-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:0.25rem}.s-orders-copy-to-clipboard-button-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0.25rem}@media (min-width: 768px){.s-orders-status-container{margin-left:0px;margin-right:0px}}.s-orders-status-container:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.s-orders-status-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}.s-orders-status-container i{margin-top:0.25rem}.s-orders-status-container i:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.25rem}.s-orders-status-container i:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.25rem}.s-orders-status-rated{font-size:1.125rem;line-height:1.75rem}.s-orders-status-rated:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:1rem}.s-orders-status-rated:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:1rem}.s-orders-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-orders-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-orders-leave-review-btn{display:inline-flex;flex-shrink:0;align-items:center;gap:0.25rem;font-weight:700;color:var(--color-primary);transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-orders-leave-review-btn:hover{opacity:0.7}.s-orders-leave-review-btn:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:1rem}.s-orders-leave-review-btn:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:1rem}.s-orders-review-star-icon{font-size:1.125rem;line-height:1.75rem}.s-orders-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-orders-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-orders-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-orders-filters{margin-bottom:1rem;display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.s-orders-list-wrapper{position:relative}.s-orders-list-loading{position:absolute;inset:0px;z-index:10;display:flex;align-items:center;justify-content:center;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1));--tw-bg-opacity:0.1}.s-orders-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-orders-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-orders-table-fetching{pointer-events:none;opacity:0.4;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:200ms}.s-orders-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-orders-table-head{display:table-header-group}}.s-orders-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-orders-table-head-tr-th:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:left}.s-orders-table-head-tr-th:last-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:right}.s-orders-table-head-tr-th:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-orders-table-head-tr-th:last-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:left}.s-orders-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-orders-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-orders-table-tbody-tr-shadow:hover{box-shadow:5px 10px 30px #2b2d340d}.s-orders-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-orders-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-orders-table-tbody-tr-td{height:5rem;width:auto}.s-orders-table-tbody-tr-td:last-child{text-align:end}.s-orders-table-tbody-tr-td:first-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-orders-table-tbody-tr-td:first-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-orders-table-tbody-tr-td:first-child{font-weight:700}.s-orders-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem}@media (min-width: 768px){.s-orders-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-orders-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-orders-table-tbody-tr a:where([dir=\"ltr\"],[dir=\"ltr\"] *){left:0px}.s-orders-table-tbody-tr a:where([dir=\"rtl\"],[dir=\"rtl\"] *){right:0px}";
|
|
19
48
|
|
|
20
49
|
const sallaInfiniteScrollCss = "/*!twlt*/.s-button-btn{position:relative;display:inline-flex;flex:1 1 0%;user-select:none;flex-direction:row-reverse;align-items:center;justify-content:center;white-space:nowrap;border-radius:var(--s-radius, 0.25rem);border-style:solid;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-btn:hover{opacity:0.8}.s-button-primary{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-button-primary:hover{background-color:var(--color-primary-dark)}.s-button-text{pointer-events:none;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-button-loader{margin-left:0.5rem;margin-right:0.5rem;display:flex;align-items:center;justify-content:center;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-button-loader::before{display:inline-block;height:1rem;content:var(--tw-content);width:1rem}@keyframes spin{to{content:var(--tw-content);transform:rotate(360deg)}}.s-button-loader::before{animation:spin 1s linear infinite;border-radius:9999px;border-width:2px;border-style:solid;border-top-color:var(--color-primary);border-left-color:var(--color-primary);border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-border-opacity:1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-button-loader-center .s-button-loader{position:absolute;top:50%;left:50%;margin:0px !important;--tw-translate-y:-50%;--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-infinite-scroll-wrapper{margin-top:1rem;text-align:center}.s-infinite-scroll-last{margin:0px;text-align:center}.s-infinite-scroll-error{margin:0px;text-align:center}";
|
|
@@ -70,7 +99,11 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
70
99
|
this.reviewPoints = 0;
|
|
71
100
|
this.filterGeneration = 0;
|
|
72
101
|
this.showExternalOrders = false;
|
|
73
|
-
|
|
102
|
+
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
105
|
+
addMissingTranslations(LANG_DEFAULTS);
|
|
106
|
+
this.refreshReviewLabels();
|
|
74
107
|
this.languageCode = salla.lang.locale;
|
|
75
108
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
76
109
|
this.totalOrderText = salla.lang.get('pages.orders.total');
|
|
@@ -80,6 +113,9 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
80
113
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
81
114
|
});
|
|
82
115
|
}
|
|
116
|
+
disconnectedCallback() {
|
|
117
|
+
this.langUnsubscribe?.();
|
|
118
|
+
}
|
|
83
119
|
setLoadMoreLoading(isLoading = true) {
|
|
84
120
|
const buttonText = this.status?.querySelector('.s-button-text');
|
|
85
121
|
if (!buttonText || !this.btnLoader)
|
|
@@ -380,7 +416,9 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
380
416
|
span4.classList.add('s-orders-mobile-title');
|
|
381
417
|
span4.textContent = `${this.totalOrderText}:`;
|
|
382
418
|
const div4 = document.createElement('div');
|
|
383
|
-
|
|
419
|
+
// In the order's own currency: salla.money alone falls back to the selected market's currency
|
|
420
|
+
// when the page config does not list the order currency (Multimarket).
|
|
421
|
+
div4.innerHTML = moneyHtml(Number(order.total?.amount), order.total?.currency);
|
|
384
422
|
const anchor2 = document.createElement('a');
|
|
385
423
|
if (order.url)
|
|
386
424
|
anchor2.href = order.url;
|
|
@@ -481,10 +519,6 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
481
519
|
this.populateOrdersTableIfEmpty();
|
|
482
520
|
}
|
|
483
521
|
componentWillLoad() {
|
|
484
|
-
salla.lang.onLoaded(() => {
|
|
485
|
-
salla.lang.addBulk(LANG_DEFAULTS);
|
|
486
|
-
this.refreshReviewLabels();
|
|
487
|
-
});
|
|
488
522
|
return salla.onReady().then(() => {
|
|
489
523
|
this.setupLoyalty();
|
|
490
524
|
this.showExternalOrders = salla.config
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
4
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
|
|
6
6
|
var Inbox = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -29,10 +29,17 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
|
|
|
29
29
|
* The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon
|
|
30
30
|
*/
|
|
31
31
|
this.iconSize = 'md';
|
|
32
|
-
|
|
32
|
+
}
|
|
33
|
+
connectedCallback() {
|
|
34
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
33
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);
|
|
34
38
|
});
|
|
35
39
|
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.langUnsubscribe?.();
|
|
42
|
+
}
|
|
36
43
|
alignmentClass() {
|
|
37
44
|
return {
|
|
38
45
|
's-placeholder-wrapper': true,
|
|
@@ -42,7 +49,7 @@ const SallaPlaceholder = /*@__PURE__*/ proxyCustomElement(class SallaPlaceholder
|
|
|
42
49
|
};
|
|
43
50
|
}
|
|
44
51
|
render() {
|
|
45
|
-
return (h(Host, { key: '
|
|
52
|
+
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'))))));
|
|
46
53
|
}
|
|
47
54
|
static get style() { return sallaPlaceholderCss; }
|
|
48
55
|
}, [4, "salla-placeholder", {
|
|
@@ -29,7 +29,7 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
|
|
|
29
29
|
this.minPrice = this.filtersData.price.min;
|
|
30
30
|
this.maxPrice = this.filtersData.price.max;
|
|
31
31
|
}
|
|
32
|
-
salla.lang.
|
|
32
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
33
33
|
this.moreThanLabel = salla.lang.getWithDefault('common.elements.more_than', this.moreThanLabel);
|
|
34
34
|
this.lessThanLabel = salla.lang.getWithDefault('common.elements.less_than', this.lessThanLabel);
|
|
35
35
|
this.toLabel = salla.lang.getWithDefault('common.elements.to', this.toLabel);
|
|
@@ -56,6 +56,9 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
|
|
|
56
56
|
// do whatever
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
this.langUnsubscribe?.();
|
|
61
|
+
}
|
|
59
62
|
/**
|
|
60
63
|
* reset the price range inputs
|
|
61
64
|
*/
|
|
@@ -153,9 +156,9 @@ const SallaPriceRange = /*@__PURE__*/ proxyCustomElement(class SallaPriceRange e
|
|
|
153
156
|
this.maxPrice = value === undefined ? '' : value;
|
|
154
157
|
}
|
|
155
158
|
render() {
|
|
156
|
-
return (h(Host, { key: '
|
|
159
|
+
return (h(Host, { key: '58b6733af46dcfc2f58f6096a3054512aea0f13a' }, this.filterValues.map((filterValue, index) => {
|
|
157
160
|
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) }));
|
|
158
|
-
}), h("div", { key: '
|
|
161
|
+
}), 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 ? IconArrowLeft : arrowRight })))))));
|
|
159
162
|
}
|
|
160
163
|
componentDidLoad() {
|
|
161
164
|
this.isReady = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
4
|
+
import { proxyCustomElement, HTMLElement, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { B as BellRing } from './bell-ring.js';
|
|
6
6
|
import { H as Helper } from './Helper.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './salla-button2.js';
|
|
@@ -54,11 +54,8 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
|
|
|
54
54
|
error?.classList.contains('s-product-availability-error-msg') && (error.innerText = '');
|
|
55
55
|
e.keyCode === 13 && this.submit();
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
60
|
-
this.modal?.setTitle(this.title_);
|
|
61
|
-
});
|
|
57
|
+
// Read before the guest path below strips the attribute; the lang subscriber runs later, from connectedCallback.
|
|
58
|
+
this.hostTitle = this.host.title;
|
|
62
59
|
if (!this.productId) {
|
|
63
60
|
this.productId = salla.config.get('page.id');
|
|
64
61
|
}
|
|
@@ -68,6 +65,18 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
|
|
|
68
65
|
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
69
66
|
this.host.removeAttribute('title');
|
|
70
67
|
}
|
|
68
|
+
connectedCallback() {
|
|
69
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
70
|
+
this.translationLoaded = true;
|
|
71
|
+
this.title_ = this.hostTitle || salla.lang.get('pages.products.notify_availability_title');
|
|
72
|
+
this.modal?.setTitle(this.title_);
|
|
73
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
74
|
+
forceUpdate(this);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
disconnectedCallback() {
|
|
78
|
+
this.langUnsubscribe?.();
|
|
79
|
+
}
|
|
71
80
|
channelsWatcher(newValue) {
|
|
72
81
|
// fall back to store-configured channels, reading config directly when the SDK helper is missing
|
|
73
82
|
let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
|
|
@@ -146,7 +155,7 @@ const SallaProductAvailability = /*@__PURE__*/ proxyCustomElement(class SallaPro
|
|
|
146
155
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
147
156
|
}
|
|
148
157
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
158
|
+
return (h(Host, { key: 'aa9fad186e8f24c5e27a1e9e6d5de75806226bce', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
150
159
|
? 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'))
|
|
151
160
|
:
|
|
152
161
|
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()));
|