@salla.sa/twilight-components 2.14.595 → 2.14.597
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-BmX7bEQk.js → filepond-Dw1N5qBB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Cs6e85Vn.js → filepond-plugin-file-poster-C1ipzdpz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CSk66JAo.js → filepond-plugin-file-validate-size-DbTJ1H8k.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Piu3p2Um.js → filepond-plugin-file-validate-type-CDOD2WKz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Ba9FBal4.js → filepond-plugin-image-edit-CP7JkpKx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-zwtgHyrT.js → filepond-plugin-image-exif-orientation-Bm5i6zMO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BmGjui8n.js → filepond-plugin-image-preview-INllb63L.js} +1 -1
- package/dist/cjs/{index-DkrDtx6i.js → index-DIEWuq3M.js} +2 -2
- package/dist/cjs/{intlTelInput-Bty1-N7J.js → intlTelInput-bnpl10H7.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 +79 -40
- 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 +67 -25
- 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 +1 -1
- 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 +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +10 -6
- 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 +14 -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 +8 -4
- package/dist/cjs/salla-user-menu.cjs.entry.js +7 -1
- 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-DgPfWupN.js → vanilla-picker-BaSDLxjI.js} +1 -1
- 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 +8 -2
- package/dist/collection/components/salla-comments/salla-comments.js +32 -5
- 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.css +3 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +36 -7
- 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-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 +1 -1
- package/dist/collection/components/salla-orders/salla-orders.js +9 -5
- 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 +22 -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.js +7 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +6 -0
- 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 +2 -2
- 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 +8 -2
- package/dist/components/salla-comments.js +32 -5
- package/dist/components/salla-contacts.js +9 -2
- package/dist/components/salla-count-down2.js +16 -11
- package/dist/components/salla-file-upload2.js +37 -8
- 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-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 +1 -1
- package/dist/components/salla-orders.js +9 -5
- 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 +13 -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 +7 -3
- package/dist/components/salla-user-menu.js +6 -0
- 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-DF26o67L.js → filepond-DfLkIBAw.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B4epzDDH.js → filepond-plugin-file-poster-D3ie06bz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DILJc03j.js → filepond-plugin-file-validate-size-C_S_eFQe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bic7dGts.js → filepond-plugin-file-validate-type-BE7nqQRE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DHfCLKK0.js → filepond-plugin-image-edit-C6jDcMnX.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C7y59Hrn.js → filepond-plugin-image-exif-orientation-nKXdF-ae.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-C-ZqWLeC.js → filepond-plugin-image-preview-Dzl44GI1.js} +1 -1
- package/dist/esm/{index-HRJpfiBN.js → index-BmRQjBRH.js} +2 -2
- package/dist/esm/{intlTelInput-DOVRUqFb.js → intlTelInput-dGrU4Iu9.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 +79 -40
- 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 +67 -25
- 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 +1 -1
- 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 +2 -2
- package/dist/esm/salla-orders.entry.js +10 -6
- 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 +14 -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 +8 -4
- package/dist/esm/salla-user-menu.entry.js +7 -1
- 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-DQKehCLa.js → vanilla-picker-DRghK0RD.js} +1 -1
- package/dist/twilight/p-00e1f5fd.entry.js +4 -0
- package/dist/twilight/{p-078e5ef8.entry.js → p-12338d19.entry.js} +1 -1
- package/dist/twilight/p-1557d0ca.entry.js +4 -0
- package/dist/twilight/{p-ef09a761.entry.js → p-15ab81d6.entry.js} +1 -1
- package/dist/twilight/p-182d7bab.entry.js +4 -0
- package/dist/twilight/p-1908ab44.entry.js +4 -0
- package/dist/twilight/p-19592be3.entry.js +4 -0
- package/dist/twilight/{p-75ed7d4e.entry.js → p-1a8c7481.entry.js} +1 -1
- package/dist/twilight/p-1c8bf883.entry.js +4 -0
- package/dist/twilight/{p-119aa7c1.entry.js → p-1c8dde1a.entry.js} +1 -1
- package/dist/twilight/p-1f2844db.entry.js +4 -0
- package/dist/twilight/{p-b66c664b.entry.js → p-2cf7eb3b.entry.js} +1 -1
- package/dist/twilight/p-2de4c351.entry.js +4 -0
- package/dist/twilight/{p-7f38cf0c.entry.js → p-2de666d8.entry.js} +1 -1
- package/dist/twilight/p-33e769b3.entry.js +4 -0
- package/dist/twilight/{p-84c56f4d.entry.js → p-3745be6d.entry.js} +1 -1
- package/dist/twilight/p-39a16468.entry.js +4 -0
- package/dist/twilight/{p-76f49fd8.entry.js → p-3a996401.entry.js} +1 -1
- package/dist/twilight/{p-6feb378a.entry.js → p-3bf933f6.entry.js} +1 -1
- package/dist/twilight/p-3d1842e4.entry.js +4 -0
- package/dist/twilight/p-3f373f1e.entry.js +4 -0
- package/dist/twilight/{p-8f0b6a64.entry.js → p-3f66f717.entry.js} +1 -1
- package/dist/twilight/p-3fdaf198.entry.js +4 -0
- package/dist/twilight/p-41248f5f.entry.js +4 -0
- package/dist/twilight/{p-c919171b.entry.js → p-4235b3c2.entry.js} +1 -1
- package/dist/twilight/{p-3c0be6b1.entry.js → p-4aa07eca.entry.js} +1 -1
- package/dist/twilight/{p-4e74c79f.entry.js → p-4b111d7a.entry.js} +1 -1
- package/dist/twilight/{p-2c13b5e8.entry.js → p-51694dd2.entry.js} +1 -1
- package/dist/twilight/{p-c8d4b211.entry.js → p-55b5158c.entry.js} +1 -1
- package/dist/twilight/{p-9a4a84b8.entry.js → p-5617656f.entry.js} +1 -1
- package/dist/twilight/{p-25ea21a6.entry.js → p-58dcc966.entry.js} +1 -1
- package/dist/twilight/p-5f35b46a.entry.js +4 -0
- package/dist/twilight/{p-a3009d00.entry.js → p-60e1fb1a.entry.js} +1 -1
- package/dist/twilight/{p-5134faef.entry.js → p-61956814.entry.js} +1 -1
- package/dist/twilight/p-6854e982.entry.js +4 -0
- package/dist/twilight/{p-1a684490.entry.js → p-68919916.entry.js} +1 -1
- package/dist/twilight/p-6b0d6b9b.entry.js +4 -0
- package/dist/twilight/p-71cbf7a4.entry.js +4 -0
- package/dist/twilight/{p-313dbe67.entry.js → p-730101ff.entry.js} +1 -1
- package/dist/twilight/p-737b93c2.entry.js +4 -0
- package/dist/twilight/p-74ccf675.entry.js +4 -0
- package/dist/twilight/{p-83edd1a1.entry.js → p-7aa15258.entry.js} +1 -1
- package/dist/twilight/{p-5b617110.entry.js → p-7c7648d7.entry.js} +1 -1
- package/dist/twilight/p-7dfe99e6.entry.js +4 -0
- package/dist/twilight/{p-07e1822a.entry.js → p-7e724019.entry.js} +1 -1
- package/dist/twilight/p-8248cecd.entry.js +4 -0
- package/dist/twilight/p-844ebeb6.entry.js +4 -0
- package/dist/twilight/{p-2413d450.entry.js → p-87cedb04.entry.js} +1 -1
- package/dist/twilight/p-8b21158b.entry.js +4 -0
- package/dist/twilight/{p-1b0da3b9.entry.js → p-8c10cb85.entry.js} +1 -1
- package/dist/twilight/p-8e2488fe.entry.js +4 -0
- package/dist/twilight/{p-33a64882.entry.js → p-9108e712.entry.js} +1 -1
- package/dist/twilight/p-91326a74.entry.js +4 -0
- package/dist/twilight/{p-100260a2.entry.js → p-96f9eb1f.entry.js} +1 -1
- package/dist/twilight/p-99463d58.entry.js +4 -0
- package/dist/twilight/p-9e196eb0.entry.js +4 -0
- package/dist/twilight/{p-BFMu9w68.js → p-B4fbRnFh.js} +1 -1
- package/dist/twilight/{p-BGUXYEQf.js → p-BIToxPOg.js} +1 -1
- package/dist/twilight/{p-HRJpfiBN.js → p-BmRQjBRH.js} +1 -1
- package/dist/twilight/{p-CliIfO7G.js → p-C1XjCBHg.js} +1 -1
- package/dist/twilight/{p-BdaR2plD.js → p-C48Rktr4.js} +1 -1
- package/dist/twilight/{p-O5jKs1Zb.js → p-CWismw4I.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-DlxVucku.js → p-DYEGhE1O.js} +1 -1
- package/dist/twilight/{p-CSRWBUvd.js → p-DnZfyhH5.js} +1 -1
- package/dist/twilight/{p-BCFB-lfz.js → p-OCGvfvVA.js} +1 -1
- package/dist/twilight/{p-9a723216.entry.js → p-a80acba3.entry.js} +1 -1
- package/dist/twilight/{p-61c8e3c6.entry.js → p-ab1d320f.entry.js} +1 -1
- package/dist/twilight/{p-5f0eca54.entry.js → p-ac7d45b6.entry.js} +1 -1
- package/dist/twilight/{p-fe72290f.entry.js → p-aeafb519.entry.js} +1 -1
- package/dist/twilight/p-b5499627.entry.js +4 -0
- package/dist/twilight/{p-f5e46494.entry.js → p-b5829615.entry.js} +1 -1
- package/dist/twilight/p-b6c5435e.entry.js +4 -0
- package/dist/twilight/{p-02d79968.entry.js → p-baaa3e72.entry.js} +1 -1
- package/dist/twilight/{p-7f58cf36.entry.js → p-bfdde3db.entry.js} +1 -1
- package/dist/twilight/p-c22ea75b.entry.js +4 -0
- package/dist/twilight/{p-768f5c26.entry.js → p-c3d33aee.entry.js} +1 -1
- package/dist/twilight/{p-943f3e5a.entry.js → p-c5d4f71c.entry.js} +1 -1
- package/dist/twilight/{p-ee8d13fd.entry.js → p-cc46f297.entry.js} +1 -1
- package/dist/twilight/p-cca10a34.entry.js +4 -0
- package/dist/twilight/p-cdbb6758.entry.js +4 -0
- package/dist/twilight/{p-96560ca2.entry.js → p-cf1cc0d1.entry.js} +1 -1
- package/dist/twilight/{p-73b8ed51.entry.js → p-d034a3ba.entry.js} +1 -1
- package/dist/twilight/{p-155f1fed.entry.js → p-d307d40a.entry.js} +1 -1
- package/dist/twilight/p-d37e6c2f.entry.js +4 -0
- package/dist/twilight/{p-eb6f86fb.entry.js → p-d3be7885.entry.js} +1 -1
- package/dist/twilight/{p-87d34b7c.entry.js → p-d542e647.entry.js} +1 -1
- package/dist/twilight/{p-c3afee2f.entry.js → p-db9994c2.entry.js} +1 -1
- package/dist/twilight/p-dd4bcce0.entry.js +4 -0
- package/dist/twilight/{p-c89d7291.entry.js → p-de3c5f91.entry.js} +1 -1
- package/dist/twilight/{p-df8c51c2.entry.js → p-e2d1d888.entry.js} +1 -1
- package/dist/twilight/{p-0e430b25.entry.js → p-e6bc3cf4.entry.js} +1 -1
- package/dist/twilight/{p-e4d76bce.entry.js → p-e8d94147.entry.js} +1 -1
- package/dist/twilight/{p-4e0dcb5c.entry.js → p-e9319448.entry.js} +1 -1
- package/dist/twilight/{p-ee23fbba.entry.js → p-ec1589cf.entry.js} +1 -1
- package/dist/twilight/{p-d8181149.entry.js → p-ece1fecd.entry.js} +1 -1
- package/dist/twilight/{p-231d4bf2.entry.js → p-f0180034.entry.js} +1 -1
- package/dist/twilight/{p-49e2f73d.entry.js → p-f348601d.entry.js} +1 -1
- package/dist/twilight/{p-6e8cb8fb.entry.js → p-f5afeed8.entry.js} +1 -1
- package/dist/twilight/p-f70fa2e9.entry.js +4 -0
- package/dist/twilight/{p-a2cbbc56.entry.js → p-f76349b3.entry.js} +1 -1
- package/dist/twilight/{p-49d6d82e.entry.js → p-fa600113.entry.js} +1 -1
- package/dist/twilight/p-fde4cf31.entry.js +4 -0
- package/dist/twilight/{p-14b78c6e.entry.js → p-fe3645b0.entry.js} +1 -1
- package/dist/twilight/{p-4cee6b43.entry.js → p-feb068a2.entry.js} +1 -1
- package/dist/twilight/{p-D1oXS6KY.js → p-imI5he7m.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- 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 +6 -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 +3 -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-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 +1 -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 +3 -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 +5 -5
- package/dist/cjs/translate-BeU1QX_r.js +0 -20
- package/dist/esm/translate-CrSV-tno.js +0 -18
- package/dist/twilight/p-117c8823.entry.js +0 -4
- package/dist/twilight/p-16b45c19.entry.js +0 -4
- package/dist/twilight/p-20d5665b.entry.js +0 -4
- package/dist/twilight/p-235f40b0.entry.js +0 -4
- package/dist/twilight/p-2f96a72f.entry.js +0 -4
- package/dist/twilight/p-312d231b.entry.js +0 -4
- package/dist/twilight/p-334fc442.entry.js +0 -4
- package/dist/twilight/p-3e232b09.entry.js +0 -4
- package/dist/twilight/p-3f376a9d.entry.js +0 -4
- package/dist/twilight/p-46ad2b0e.entry.js +0 -4
- package/dist/twilight/p-4e3a3c55.entry.js +0 -4
- package/dist/twilight/p-4f9da81b.entry.js +0 -4
- package/dist/twilight/p-5bc3f956.entry.js +0 -4
- package/dist/twilight/p-5fae444a.entry.js +0 -4
- package/dist/twilight/p-70c45a90.entry.js +0 -4
- package/dist/twilight/p-761e273c.entry.js +0 -4
- package/dist/twilight/p-7960e489.entry.js +0 -4
- package/dist/twilight/p-845e4790.entry.js +0 -4
- package/dist/twilight/p-8688c21f.entry.js +0 -4
- package/dist/twilight/p-8be3fa1c.entry.js +0 -4
- package/dist/twilight/p-8dc7ae26.entry.js +0 -4
- package/dist/twilight/p-8e0a33dd.entry.js +0 -4
- package/dist/twilight/p-8eabd62f.entry.js +0 -4
- package/dist/twilight/p-8fc42a50.entry.js +0 -4
- package/dist/twilight/p-96317fc8.entry.js +0 -4
- package/dist/twilight/p-97b51153.entry.js +0 -4
- package/dist/twilight/p-9c1bf3fb.entry.js +0 -4
- package/dist/twilight/p-CrSV-tno.js +0 -4
- package/dist/twilight/p-b202c2d3.entry.js +0 -4
- package/dist/twilight/p-b2b896d1.entry.js +0 -4
- package/dist/twilight/p-c327bc95.entry.js +0 -4
- package/dist/twilight/p-c699207a.entry.js +0 -4
- package/dist/twilight/p-d565b168.entry.js +0 -4
- package/dist/twilight/p-d7a70a29.entry.js +0 -4
- package/dist/twilight/p-d8a5198b.entry.js +0 -4
- package/dist/twilight/p-db27df13.entry.js +0 -4
- package/dist/twilight/p-f9abcf4f.entry.js +0 -4
- package/dist/twilight/p-fd0d136d.entry.js +0 -4
|
@@ -37,12 +37,17 @@ const SallaInfiniteScroll$1 = /*@__PURE__*/ proxyCustomElement(class SallaInfini
|
|
|
37
37
|
<span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>
|
|
38
38
|
</a>`;
|
|
39
39
|
this.btnLoader = this.status.querySelector('.s-button-loader');
|
|
40
|
-
|
|
40
|
+
}
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
41
43
|
this.status.querySelector('.s-button-text').innerHTML = this.loadMoreText ? this.loadMoreText : salla.lang.get('common.elements.load_more');
|
|
42
44
|
this.status.querySelector('.s-infinite-scroll-last').innerHTML = salla.lang.get('common.elements.end_of_content');
|
|
43
45
|
this.status.querySelector('.s-infinite-scroll-error').innerHTML = salla.lang.get('common.elements.failed_to_load_more');
|
|
44
46
|
});
|
|
45
47
|
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
this.langUnsubscribe?.();
|
|
50
|
+
}
|
|
46
51
|
loading(isLoading = true) {
|
|
47
52
|
let btnText = this.status.querySelector('.s-button-text');
|
|
48
53
|
Helper.toggleElementClassIf(btnText, 's-button-hide', 's-button-show', () => isLoading);
|
|
@@ -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 { d as defineCustomElement$6 } from './salla-button2.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './salla-loading2.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './salla-modal2.js';
|
|
@@ -91,6 +91,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
|
|
|
91
91
|
};
|
|
92
92
|
//here we will used the currency code instead of the symbol when current language is not arabic
|
|
93
93
|
this.arabicCurrencies = ["SAR", "AED", "KWD", "BHD", "QAR", "OMR", "EGP", "IQD", "LBP", "SYP", "TND", "DZD", "MAD", "YER"];
|
|
94
|
+
this.translationLoaded = false;
|
|
94
95
|
this.languages = [];
|
|
95
96
|
this.currencies = [];
|
|
96
97
|
this.hasError = false;
|
|
@@ -110,6 +111,17 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
|
|
|
110
111
|
this.languageSlot = this.host.querySelector('[slot="language"]')?.innerHTML || '<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>';
|
|
111
112
|
this.currencySlot = this.host.querySelector('[slot="currency"]')?.innerHTML || '<label class="s-localization-modal-label" for="currency-{code}"><span>{name}</span><small class="s-localization-modal-currency">{symbol}</small></label>';
|
|
112
113
|
}
|
|
114
|
+
connectedCallback() {
|
|
115
|
+
// re-render whenever translations (re)load, so the labels read via salla.lang.get() stay current
|
|
116
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
117
|
+
this.translationLoaded = true;
|
|
118
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
119
|
+
forceUpdate(this);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
disconnectedCallback() {
|
|
123
|
+
this.langUnsubscribe?.();
|
|
124
|
+
}
|
|
113
125
|
async componentWillLoad() {
|
|
114
126
|
await Salla.onReady();
|
|
115
127
|
await Salla.lang.onLoaded();
|
|
@@ -248,7 +260,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
|
|
|
248
260
|
this.showTrigger
|
|
249
261
|
? h("button", { type: "button", onClick: () => this.open(), class: "s-localization-modal-trigger-btn" }, h("span", null, this.getLanguageName()), h("span", { class: "s-localization-modal-trigger-separator" }, "|"), " ", h("span", { innerHTML: this.getCurrencySymbol() }))
|
|
250
262
|
: '',
|
|
251
|
-
h("salla-modal", { key: '
|
|
263
|
+
h("salla-modal", { key: '90691a08e6f504621d486093e0b4ce4dd6ade603', isLoading: true, class: "s-hidden", ref: modal => this.modal = modal, width: "xs" }, h("div", { key: '09c20e2dcf5840609eb6e1e124c2d8d3ceca0519', slot: 'loading' }, h("div", { key: '078f414c5c966000da4691000080912ab9e9d6e6', class: "s-localization-modal-skeleton" }, h("salla-skeleton", { key: 'd34d24597d5dca4f6e987b82886749388e118454', width: '25%', height: '15px' }), h("div", { key: '5350cec15f6091450b297ed7114638440bd4da16', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '255dd34dc36801e78ea0dd83dd9825e58de3c20f', width: '25%', height: '15px' }), h("div", { key: '2f1d1acbb0734b72f6806d3ec229ffd8fc71f9f5', class: "s-localization-modal-skeleton-content" }, [...Array(4)].map(() => h("div", { class: "s-localization-modal-skeleton-item" }, h("div", { class: "s-localization-modal-skeleton-item-flex" }, h("salla-skeleton", { type: 'circle', height: '16px', width: '16px' }), h("salla-skeleton", { height: '10px', width: '100px' })), h("salla-skeleton", { height: '15px', width: '20px' })))), h("salla-skeleton", { key: '8ffa9e5ddfe05ca91032e29f24ef9eaedd73980d', height: '40px', width: '100%' }))), !!this.hasError ?
|
|
252
264
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
253
265
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
254
266
|
h("div", { class: "s-localization-modal-section" }, h("label", { class: "s-localization-modal-title" }, Salla.lang.get('common.titles.language')), h("div", { class: "s-localization-modal-section-inner" }, this.languages.length < 6 ?
|
|
@@ -281,6 +293,7 @@ const SallaLocalizationModal$1 = /*@__PURE__*/ proxyCustomElement(class SallaLoc
|
|
|
281
293
|
"language": [1537],
|
|
282
294
|
"currency": [1537],
|
|
283
295
|
"showTrigger": [1540, "show-trigger"],
|
|
296
|
+
"translationLoaded": [32],
|
|
284
297
|
"languages": [32],
|
|
285
298
|
"currencies": [32],
|
|
286
299
|
"hasError": [32],
|
|
@@ -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
|
}
|
|
@@ -53,7 +53,7 @@ const SallaOrderTotalsCard$1 = /*@__PURE__*/ proxyCustomElement(class SallaOrder
|
|
|
53
53
|
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
|
|
54
54
|
this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
|
|
55
55
|
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
|
|
56
|
+
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.has_remaining_amount && summary.paid_amount
|
|
57
57
|
? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
58
58
|
: null, summary.remaining_amount
|
|
59
59
|
? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
|
|
@@ -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';
|
|
@@ -70,7 +71,11 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
70
71
|
this.reviewPoints = 0;
|
|
71
72
|
this.filterGeneration = 0;
|
|
72
73
|
this.showExternalOrders = false;
|
|
73
|
-
|
|
74
|
+
}
|
|
75
|
+
connectedCallback() {
|
|
76
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
77
|
+
addMissingTranslations(LANG_DEFAULTS);
|
|
78
|
+
this.refreshReviewLabels();
|
|
74
79
|
this.languageCode = salla.lang.locale;
|
|
75
80
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
76
81
|
this.totalOrderText = salla.lang.get('pages.orders.total');
|
|
@@ -80,6 +85,9 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
80
85
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
81
86
|
});
|
|
82
87
|
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
this.langUnsubscribe?.();
|
|
90
|
+
}
|
|
83
91
|
setLoadMoreLoading(isLoading = true) {
|
|
84
92
|
const buttonText = this.status?.querySelector('.s-button-text');
|
|
85
93
|
if (!buttonText || !this.btnLoader)
|
|
@@ -481,10 +489,6 @@ const SallaOrder = /*@__PURE__*/ proxyCustomElement(class SallaOrder extends HTM
|
|
|
481
489
|
this.populateOrdersTableIfEmpty();
|
|
482
490
|
}
|
|
483
491
|
componentWillLoad() {
|
|
484
|
-
salla.lang.onLoaded(() => {
|
|
485
|
-
salla.lang.addBulk(LANG_DEFAULTS);
|
|
486
|
-
this.refreshReviewLabels();
|
|
487
|
-
});
|
|
488
492
|
return salla.onReady().then(() => {
|
|
489
493
|
this.setupLoyalty();
|
|
490
494
|
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()));
|