@salla.sa/twilight-components 2.14.596 → 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-MMeFYRaC.js → filepond-Dw1N5qBB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dd1aobB-.js → filepond-plugin-file-poster-C1ipzdpz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Be46s5wp.js → filepond-plugin-file-validate-size-DbTJ1H8k.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cf3OjTHE.js → filepond-plugin-file-validate-type-CDOD2WKz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BDX5qgng.js → filepond-plugin-image-edit-CP7JkpKx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ilZNc8J4.js → filepond-plugin-image-exif-orientation-Bm5i6zMO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C9c7tVEB.js → filepond-plugin-image-preview-INllb63L.js} +1 -1
- package/dist/cjs/{index-zv0p1Eys.js → index-DIEWuq3M.js} +2 -2
- package/dist/cjs/{intlTelInput-C8hiSJ_i.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 +50 -36
- 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 +44 -23
- 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-DRrOfZz0.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 +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 +8 -4
- 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 +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 +8 -4
- 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-okemUEVJ.js → filepond-DfLkIBAw.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-He-1QDcm.js → filepond-plugin-file-poster-D3ie06bz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BoQ9OZHK.js → filepond-plugin-file-validate-size-C_S_eFQe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BVxE-7xU.js → filepond-plugin-file-validate-type-BE7nqQRE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DJnNmArQ.js → filepond-plugin-image-edit-C6jDcMnX.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CgkqV9g5.js → filepond-plugin-image-exif-orientation-nKXdF-ae.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DxbixTNR.js → filepond-plugin-image-preview-Dzl44GI1.js} +1 -1
- package/dist/esm/{index-C1mBhG6Z.js → index-BmRQjBRH.js} +2 -2
- package/dist/esm/{intlTelInput-wxpsRy0u.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 +50 -36
- 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 +44 -23
- 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-CQEJbE9K.js → vanilla-picker-DRghK0RD.js} +1 -1
- package/dist/twilight/p-00e1f5fd.entry.js +4 -0
- package/dist/twilight/{p-da9bd7f6.entry.js → p-12338d19.entry.js} +1 -1
- package/dist/twilight/p-1557d0ca.entry.js +4 -0
- package/dist/twilight/{p-160476f0.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-c82f46a9.entry.js → p-1a8c7481.entry.js} +1 -1
- package/dist/twilight/p-1c8bf883.entry.js +4 -0
- package/dist/twilight/{p-d6d72996.entry.js → p-1c8dde1a.entry.js} +1 -1
- package/dist/twilight/p-1f2844db.entry.js +4 -0
- package/dist/twilight/{p-3a465851.entry.js → p-2cf7eb3b.entry.js} +1 -1
- package/dist/twilight/p-2de4c351.entry.js +4 -0
- package/dist/twilight/{p-fd787b30.entry.js → p-2de666d8.entry.js} +1 -1
- package/dist/twilight/p-33e769b3.entry.js +4 -0
- package/dist/twilight/{p-f8aa1b23.entry.js → p-3745be6d.entry.js} +1 -1
- package/dist/twilight/p-39a16468.entry.js +4 -0
- package/dist/twilight/{p-8eb75cf8.entry.js → p-3a996401.entry.js} +1 -1
- package/dist/twilight/{p-81596b48.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-b3abf071.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-ca7593c0.entry.js → p-4235b3c2.entry.js} +1 -1
- package/dist/twilight/{p-caee5b0d.entry.js → p-4aa07eca.entry.js} +1 -1
- package/dist/twilight/{p-1080831a.entry.js → p-4b111d7a.entry.js} +1 -1
- package/dist/twilight/{p-d75157e0.entry.js → p-51694dd2.entry.js} +1 -1
- package/dist/twilight/{p-8513fec2.entry.js → p-55b5158c.entry.js} +1 -1
- package/dist/twilight/{p-e4589779.entry.js → p-5617656f.entry.js} +1 -1
- package/dist/twilight/{p-ac20a6de.entry.js → p-58dcc966.entry.js} +1 -1
- package/dist/twilight/p-5f35b46a.entry.js +4 -0
- package/dist/twilight/{p-62653d93.entry.js → p-60e1fb1a.entry.js} +1 -1
- package/dist/twilight/{p-7ac91ace.entry.js → p-61956814.entry.js} +1 -1
- package/dist/twilight/p-6854e982.entry.js +4 -0
- package/dist/twilight/{p-fac4da2b.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-c28395c6.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-f47a1351.entry.js → p-7aa15258.entry.js} +1 -1
- package/dist/twilight/{p-d6508494.entry.js → p-7c7648d7.entry.js} +1 -1
- package/dist/twilight/p-7dfe99e6.entry.js +4 -0
- package/dist/twilight/{p-54bc613c.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-8ec0fc03.entry.js → p-87cedb04.entry.js} +1 -1
- package/dist/twilight/p-8b21158b.entry.js +4 -0
- package/dist/twilight/{p-844176cb.entry.js → p-8c10cb85.entry.js} +1 -1
- package/dist/twilight/p-8e2488fe.entry.js +4 -0
- package/dist/twilight/{p-c89282b0.entry.js → p-9108e712.entry.js} +1 -1
- package/dist/twilight/p-91326a74.entry.js +4 -0
- package/dist/twilight/{p-60d06105.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-CtcjG32v.js → p-B4fbRnFh.js} +1 -1
- package/dist/twilight/{p-BB23a2fo.js → p-BIToxPOg.js} +1 -1
- package/dist/twilight/{p-C1mBhG6Z.js → p-BmRQjBRH.js} +1 -1
- package/dist/twilight/{p-E2n9kJc8.js → p-C1XjCBHg.js} +1 -1
- package/dist/twilight/{p-DiU9tYvl.js → p-C48Rktr4.js} +1 -1
- package/dist/twilight/{p-Bm1ywp6t.js → p-CWismw4I.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-CJPWrlxL.js → p-DYEGhE1O.js} +1 -1
- package/dist/twilight/{p-Gxv67UlH.js → p-DnZfyhH5.js} +1 -1
- package/dist/twilight/{p-pzi0Osm7.js → p-OCGvfvVA.js} +1 -1
- package/dist/twilight/{p-672a709e.entry.js → p-a80acba3.entry.js} +1 -1
- package/dist/twilight/{p-474997dd.entry.js → p-ab1d320f.entry.js} +1 -1
- package/dist/twilight/{p-dbc1e40c.entry.js → p-ac7d45b6.entry.js} +1 -1
- package/dist/twilight/{p-e43c49e9.entry.js → p-aeafb519.entry.js} +1 -1
- package/dist/twilight/p-b5499627.entry.js +4 -0
- package/dist/twilight/{p-e98835e3.entry.js → p-b5829615.entry.js} +1 -1
- package/dist/twilight/p-b6c5435e.entry.js +4 -0
- package/dist/twilight/{p-5e426c78.entry.js → p-baaa3e72.entry.js} +1 -1
- package/dist/twilight/{p-5e099f96.entry.js → p-bfdde3db.entry.js} +1 -1
- package/dist/twilight/p-c22ea75b.entry.js +4 -0
- package/dist/twilight/{p-1a5d0b25.entry.js → p-c3d33aee.entry.js} +1 -1
- package/dist/twilight/{p-f130c67f.entry.js → p-c5d4f71c.entry.js} +1 -1
- package/dist/twilight/{p-a11b77df.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-f643bf2f.entry.js → p-cf1cc0d1.entry.js} +1 -1
- package/dist/twilight/{p-67d3ee58.entry.js → p-d034a3ba.entry.js} +1 -1
- package/dist/twilight/{p-dcb5ceda.entry.js → p-d307d40a.entry.js} +1 -1
- package/dist/twilight/p-d37e6c2f.entry.js +4 -0
- package/dist/twilight/{p-21ba0eac.entry.js → p-d3be7885.entry.js} +1 -1
- package/dist/twilight/{p-9d434410.entry.js → p-d542e647.entry.js} +1 -1
- package/dist/twilight/{p-f3985cfd.entry.js → p-db9994c2.entry.js} +1 -1
- package/dist/twilight/p-dd4bcce0.entry.js +4 -0
- package/dist/twilight/{p-de55326d.entry.js → p-de3c5f91.entry.js} +1 -1
- package/dist/twilight/{p-342b31ba.entry.js → p-e2d1d888.entry.js} +1 -1
- package/dist/twilight/{p-6602a61a.entry.js → p-e6bc3cf4.entry.js} +1 -1
- package/dist/twilight/{p-12a2b743.entry.js → p-e8d94147.entry.js} +1 -1
- package/dist/twilight/{p-e00ed6c9.entry.js → p-e9319448.entry.js} +1 -1
- package/dist/twilight/{p-4bde9c4e.entry.js → p-ec1589cf.entry.js} +1 -1
- package/dist/twilight/{p-58058ae9.entry.js → p-ece1fecd.entry.js} +1 -1
- package/dist/twilight/{p-97bb12a6.entry.js → p-f0180034.entry.js} +1 -1
- package/dist/twilight/{p-4b0eaa16.entry.js → p-f348601d.entry.js} +1 -1
- package/dist/twilight/{p-c28c53c3.entry.js → p-f5afeed8.entry.js} +1 -1
- package/dist/twilight/p-f70fa2e9.entry.js +4 -0
- package/dist/twilight/{p-80699771.entry.js → p-f76349b3.entry.js} +1 -1
- package/dist/twilight/{p-5babb989.entry.js → p-fa600113.entry.js} +1 -1
- package/dist/twilight/p-fde4cf31.entry.js +4 -0
- package/dist/twilight/{p-cb770a9e.entry.js → p-fe3645b0.entry.js} +1 -1
- package/dist/twilight/{p-8bdb7f71.entry.js → p-feb068a2.entry.js} +1 -1
- package/dist/twilight/{p-C57CqqgQ.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 +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 +2 -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-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-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-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
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
.s-order-branch-ready {
|
|
6
6
|
background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
|
|
7
7
|
}
|
|
8
|
+
.s-order-branch-instructions {
|
|
9
|
+
background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
|
10
|
+
}
|
|
11
|
+
.s-order-branch-instructions-content {
|
|
12
|
+
white-space: pre-wrap;
|
|
13
|
+
}
|
|
8
14
|
.filter {
|
|
9
15
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
10
16
|
}
|
|
@@ -226,6 +232,35 @@
|
|
|
226
232
|
line-height: 1.45;
|
|
227
233
|
color: var(--color-text-secondary,#666);
|
|
228
234
|
}
|
|
235
|
+
.s-order-branch-instructions {
|
|
236
|
+
border-radius: 0.5rem;
|
|
237
|
+
padding: 1rem;
|
|
238
|
+
text-align: start;
|
|
239
|
+
}
|
|
240
|
+
.s-order-branch-instructions-heading {
|
|
241
|
+
margin-bottom: 0.5rem;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 0.5rem;
|
|
245
|
+
font-size: 0.75rem;
|
|
246
|
+
line-height: 1rem;
|
|
247
|
+
line-height: 1.35;
|
|
248
|
+
}
|
|
249
|
+
.s-order-branch-instructions-heading i {
|
|
250
|
+
font-size: 0.875rem;
|
|
251
|
+
line-height: 1.25rem;
|
|
252
|
+
font-weight: 700;
|
|
253
|
+
--tw-text-opacity: 1;
|
|
254
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
255
|
+
}
|
|
256
|
+
.s-order-branch-instructions-content {
|
|
257
|
+
margin: 0px;
|
|
258
|
+
overflow-wrap: break-word;
|
|
259
|
+
font-size: 0.875rem;
|
|
260
|
+
line-height: 1.25rem;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
line-height: 1.6;
|
|
263
|
+
}
|
|
229
264
|
.s-order-branch-actions {
|
|
230
265
|
display: flex;
|
|
231
266
|
flex-shrink: 0;
|
|
@@ -14,10 +14,33 @@ export class SallaOrderBranch {
|
|
|
14
14
|
/** Stack the identity and contact cards vertically instead of side-by-side. */
|
|
15
15
|
this.stackCards = false;
|
|
16
16
|
this.isLoading = false;
|
|
17
|
+
/** Bilingual defaults for keys introduced by this component; store/central translations win. */
|
|
18
|
+
this.translationDefaults = {
|
|
19
|
+
'pages.orders.pickup_instructions': { ar: 'معلومات إرشادية', en: 'Pickup instructions' },
|
|
20
|
+
};
|
|
17
21
|
}
|
|
18
22
|
componentWillLoad() {
|
|
23
|
+
salla.lang.onLoaded?.(() => this.registerTranslationDefaults());
|
|
24
|
+
this.registerTranslationDefaults();
|
|
19
25
|
return this.getBranchData();
|
|
20
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Register bilingual (ar/en) defaults without overriding existing translations.
|
|
29
|
+
*/
|
|
30
|
+
registerTranslationDefaults() {
|
|
31
|
+
if (!salla?.lang?.addBulk)
|
|
32
|
+
return;
|
|
33
|
+
const missing = Object.entries(this.translationDefaults).reduce((acc, [key, value]) => {
|
|
34
|
+
// `get` returns the key itself when no translation is found.
|
|
35
|
+
if (salla.lang.get?.(key) === key) {
|
|
36
|
+
acc[key] = value;
|
|
37
|
+
}
|
|
38
|
+
return acc;
|
|
39
|
+
}, {});
|
|
40
|
+
if (Object.keys(missing).length) {
|
|
41
|
+
salla.lang.addBulk(missing);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
21
44
|
async getBranchData() {
|
|
22
45
|
const orderId = salla.config.get('page.id');
|
|
23
46
|
if (!orderId)
|
|
@@ -53,6 +76,11 @@ export class SallaOrderBranch {
|
|
|
53
76
|
label(key, fallback) {
|
|
54
77
|
return salla.lang.getWithDefault(key, fallback);
|
|
55
78
|
}
|
|
79
|
+
bilingualLabel(key) {
|
|
80
|
+
const entry = this.translationDefaults[key];
|
|
81
|
+
const locale = (salla.lang.locale || 'ar').startsWith('en') ? 'en' : 'ar';
|
|
82
|
+
return this.label(key, entry?.[locale] ?? entry?.ar ?? key);
|
|
83
|
+
}
|
|
56
84
|
get preparationText() {
|
|
57
85
|
const range = this.branchData?.preparation_time_range;
|
|
58
86
|
if (!range?.from || !range?.to)
|
|
@@ -100,6 +128,16 @@ export class SallaOrderBranch {
|
|
|
100
128
|
get phone() {
|
|
101
129
|
return getBranchPhone(this.branchData?.contacts);
|
|
102
130
|
}
|
|
131
|
+
get pickupInstructions() {
|
|
132
|
+
const instructions = this.branchData?.pickup_instructions;
|
|
133
|
+
return typeof instructions === 'string' && instructions.trim() ? instructions : '';
|
|
134
|
+
}
|
|
135
|
+
renderPickupInstructions() {
|
|
136
|
+
const instructions = this.pickupInstructions;
|
|
137
|
+
if (!instructions)
|
|
138
|
+
return null;
|
|
139
|
+
return (h("div", { class: "s-order-branch-instructions" }, h("div", { class: "s-order-branch-instructions-heading" }, h("span", { "aria-hidden": "true" }, h("i", { class: "sicon-info" })), h("span", null, this.bilingualLabel('pages.orders.pickup_instructions'))), h("p", { class: "s-order-branch-instructions-content" }, instructions)));
|
|
140
|
+
}
|
|
103
141
|
renderDetailsColumn() {
|
|
104
142
|
const phone = this.phone;
|
|
105
143
|
if (!phone)
|
|
@@ -110,13 +148,13 @@ export class SallaOrderBranch {
|
|
|
110
148
|
const items = this.workingHoursItems;
|
|
111
149
|
if (!items.length)
|
|
112
150
|
return null;
|
|
113
|
-
return (h("div", { class: "s-order-branch-info-card s-order-branch-hours-card" }, h("span", { class: "s-order-branch-info-icon", "aria-hidden": "true" }, h("i", { class: "sicon-calendar-alt" })), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.checkout.working_hours', 'ساعات العمل')), h("div", { class: "s-order-branch-hours-list" }, items.map(item => (h("span", { class: "s-order-branch-hours-item" }, item)))))));
|
|
151
|
+
return (h("div", { class: "s-order-branch-info-card s-order-branch-hours-card" }, h("span", { class: "s-order-branch-info-icon", "aria-hidden": "true" }, h("i", { class: "sicon-calendar-alt" })), h("div", { class: "s-order-branch-info-text" }, h("span", { class: "s-order-branch-info-label" }, this.label('pages.checkout.working_hours', 'ساعات العمل')), h("div", { class: "s-order-branch-hours-list" }, items.map((item, index) => (h("span", { key: `${item}-${index}`, class: "s-order-branch-hours-item" }, item)))))));
|
|
114
152
|
}
|
|
115
153
|
renderBranchIdentityCard() {
|
|
116
154
|
const branch = this.branchData;
|
|
117
155
|
const address = this.branchAddress;
|
|
118
156
|
const readyText = this.preparationText;
|
|
119
|
-
return (h("section", { class: "s-order-branch-card" }, h("div", { class: "s-order-branch-location" }, h("div", { class: "s-order-branch-identity" }, h("span", { class: "s-order-branch-store-icon" }, h("i", { class: "sicon-store", "aria-hidden": "true" })), h("div", { class: "s-order-branch-text" }, h("div", { class: "s-order-branch-name-row" }, branch?.name ? h("span", { class: "s-order-branch-name" }, branch.name) : null, readyText ? h("span", { class: "s-order-branch-ready" }, readyText) : null), address ? h("span", { class: "s-order-branch-address" }, address) : null)), this.mapUrl ? (h("div", { class: "s-order-branch-actions" }, h("a", { href: this.mapUrl, target: "_blank", rel: "noopener noreferrer", class: "s-order-branch-map-link" }, h("span", null, this.label('pages.orders.branch_map', 'موقع الفرع علي الخريطة')), h("span", { class: "s-order-branch-action-icon", innerHTML: navigationIcon })))) : null)));
|
|
157
|
+
return (h("section", { class: "s-order-branch-card" }, h("div", { class: "s-order-branch-location" }, h("div", { class: "s-order-branch-identity" }, h("span", { class: "s-order-branch-store-icon" }, h("i", { class: "sicon-store", "aria-hidden": "true" })), h("div", { class: "s-order-branch-text" }, h("div", { class: "s-order-branch-name-row" }, branch?.name ? h("span", { class: "s-order-branch-name" }, branch.name) : null, readyText ? h("span", { class: "s-order-branch-ready" }, readyText) : null), address ? h("span", { class: "s-order-branch-address" }, address) : null)), this.mapUrl ? (h("div", { class: "s-order-branch-actions" }, h("a", { href: this.mapUrl, target: "_blank", rel: "noopener noreferrer", class: "s-order-branch-map-link" }, h("span", null, this.label('pages.orders.branch_map', 'موقع الفرع علي الخريطة')), h("span", { class: "s-order-branch-action-icon", innerHTML: navigationIcon })))) : null), this.renderPickupInstructions()));
|
|
120
158
|
}
|
|
121
159
|
render() {
|
|
122
160
|
if (this.isLoading || !this.branchData) {
|
|
@@ -15,13 +15,15 @@ export class SallaOrderSummary {
|
|
|
15
15
|
this.isDigitalCard = (item) => item.product.type === 'codes';
|
|
16
16
|
this.isDigitalProduct = (item) => item.product.type === 'digital';
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
salla.lang.
|
|
18
|
+
connectedCallback() {
|
|
19
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
20
20
|
this.codes_text = salla.lang.get('pages.thank_you.codes');
|
|
21
21
|
this.copy_text = salla.lang.get('common.elements.copy');
|
|
22
22
|
this.files_text = salla.lang.get('pages.thank_you.files');
|
|
23
23
|
this.download_text = salla.lang.get('pages.thank_you.download');
|
|
24
24
|
});
|
|
25
|
+
}
|
|
26
|
+
async componentWillLoad() {
|
|
25
27
|
return await this.getOrderItems();
|
|
26
28
|
}
|
|
27
29
|
copyToClipboardHandler(code) {
|
|
@@ -59,10 +61,11 @@ export class SallaOrderSummary {
|
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
disconnectedCallback() {
|
|
64
|
+
this.langUnsubscribe?.();
|
|
62
65
|
this.copyCodeButtonTimeout && clearTimeout(this.copyCodeButtonTimeout);
|
|
63
66
|
}
|
|
64
67
|
render() {
|
|
65
|
-
return (h("ul", { key: '
|
|
68
|
+
return (h("ul", { key: 'b01089c3818be36fa4ff2341d7986269abdfd7c8', class: "s-order-summary-wrapper" }, this.noItemFound ? h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" })) :
|
|
66
69
|
this.order_items.map((item) => (this.isDigitalCard(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.codes_text, " (", item.name, ")"), item.codes.map((code) => (h("div", { key: code.code, class: "s-order-summary-code-item-wrapper" }, h("p", null, h("span", { innerHTML: iconCreditCard }), h("span", null, code.code)), h("salla-button", { class: `s-order-summary-item-copy-button ${this.codeCopied === code.code ? 'copied' : ''}`, onClick: () => this.copyToClipboardHandler(code.code), shape: "link" }, h("span", { innerHTML: this.codeCopied === code.code ? iconCheck : iconCopy }), h("span", null, this.copy_text))))))) :
|
|
67
70
|
this.isDigitalProduct(item) ? (h("li", { key: item.product.id, class: "s-order-summary-item" }, h("h2", { class: "s-order-summary-item-title" }, this.files_text, " (", item.name, ")"), h("ul", null, item.files.map((file) => (h("li", { class: "s-order-summary-digital-item-wrapper" }, h("div", null, h("span", { innerHTML: iconFileArchive }), h("span", null, file.name)), h("a", { href: file.url, target: "_blank", class: "s-order-summary-item-download" }, h("span", { innerHTML: iconDownload }), h("span", null, this.download_text)))))))) : null))));
|
|
68
71
|
}
|
|
@@ -46,7 +46,7 @@ export class SallaOrderTotalsCard {
|
|
|
46
46
|
this.renderTotalRow(salla.lang.get('pages.cart.order_options_total'), summary.options_total), summary.discounts && this.renderDiscountRow(), summary.cod_cost &&
|
|
47
47
|
this.renderTotalRow(salla.lang.get('pages.orders.cod_cost'), summary.cod_cost, ''), summary.shipping_cost &&
|
|
48
48
|
this.renderTotalRow(salla.lang.get('pages.orders.shipping_cost'), summary.shipping_cost, 's-order-totals-card-shipping'), summary.tax &&
|
|
49
|
-
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.paid_amount
|
|
49
|
+
this.renderTotalRow(`${salla.lang.get('pages.cart.tax')} ${summary.tax.percent}%`, summary.tax.amount, ''), summary.has_remaining_amount && summary.paid_amount
|
|
50
50
|
? this.renderTotalRow(salla.lang.get('pages.orders.partially_paid'), summary.paid_amount, '')
|
|
51
51
|
: null, summary.remaining_amount
|
|
52
52
|
? this.renderTotalRow(salla.lang.get('pages.orders.remaining_amount'), summary.remaining_amount, '')
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import Helper from "../../Helpers/Helper";
|
|
6
|
+
import { addMissingTranslations } from "../../Helpers/translate";
|
|
6
7
|
const FEEDBACK_STATUS_WAITING = 'waiting';
|
|
7
8
|
const TAB_QUERY_PARAM = 'tab';
|
|
8
9
|
const SHOW_EXTERNAL_ORDERS_FEATURE = 'show-external-orders';
|
|
@@ -52,7 +53,11 @@ export class SallaOrder {
|
|
|
52
53
|
this.reviewPoints = 0;
|
|
53
54
|
this.filterGeneration = 0;
|
|
54
55
|
this.showExternalOrders = false;
|
|
55
|
-
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
59
|
+
addMissingTranslations(LANG_DEFAULTS);
|
|
60
|
+
this.refreshReviewLabels();
|
|
56
61
|
this.languageCode = salla.lang.locale;
|
|
57
62
|
this.orderNumberText = salla.lang.get('pages.thank_you.order_id');
|
|
58
63
|
this.totalOrderText = salla.lang.get('pages.orders.total');
|
|
@@ -62,6 +67,9 @@ export class SallaOrder {
|
|
|
62
67
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
63
68
|
});
|
|
64
69
|
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.langUnsubscribe?.();
|
|
72
|
+
}
|
|
65
73
|
setLoadMoreLoading(isLoading = true) {
|
|
66
74
|
const buttonText = this.status?.querySelector('.s-button-text');
|
|
67
75
|
if (!buttonText || !this.btnLoader)
|
|
@@ -463,10 +471,6 @@ export class SallaOrder {
|
|
|
463
471
|
this.populateOrdersTableIfEmpty();
|
|
464
472
|
}
|
|
465
473
|
componentWillLoad() {
|
|
466
|
-
salla.lang.onLoaded(() => {
|
|
467
|
-
salla.lang.addBulk(LANG_DEFAULTS);
|
|
468
|
-
this.refreshReviewLabels();
|
|
469
|
-
});
|
|
470
474
|
return salla.onReady().then(() => {
|
|
471
475
|
this.setupLoyalty();
|
|
472
476
|
this.showExternalOrders = salla.config
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h, Host } from "@stencil/core";
|
|
4
|
+
import { h, Host, forceUpdate } from "@stencil/core";
|
|
5
5
|
import Inbox from "../../assets/svg/inbox.svg";
|
|
6
6
|
/**
|
|
7
7
|
* @slot title - The primary content of the placeholder.
|
|
@@ -22,10 +22,17 @@ export class SallaPlaceholder {
|
|
|
22
22
|
* The size of the icon. Defaults to [`md`] = 45px for font icon & width/height: 3.5rem for svg icon
|
|
23
23
|
*/
|
|
24
24
|
this.iconSize = 'md';
|
|
25
|
-
|
|
25
|
+
}
|
|
26
|
+
connectedCallback() {
|
|
27
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
26
28
|
this.translationLoaded = true;
|
|
29
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
30
|
+
forceUpdate(this);
|
|
27
31
|
});
|
|
28
32
|
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
this.langUnsubscribe?.();
|
|
35
|
+
}
|
|
29
36
|
alignmentClass() {
|
|
30
37
|
return {
|
|
31
38
|
's-placeholder-wrapper': true,
|
|
@@ -35,7 +42,7 @@ export class SallaPlaceholder {
|
|
|
35
42
|
};
|
|
36
43
|
}
|
|
37
44
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: 'e0ddbbcae1f1770e0aa1fde820b80f010b837c70', class: this.alignmentClass() }, h("div", { key: '42aaa39f4b5ff6e854d8752fd8b7f51967a61640', class: `s-placeholder-icon s-placeholder-icon-${this.iconSize}`, innerHTML: this.icon }), h("div", { key: '89b58694c6e8e52df2a6cfcf53f928e8e1be65cc', class: "s-placeholder-title" }, h("slot", { key: '810a0cbc0338a430f48e0478d855baef78368d30', name: 'title' }, h("span", { key: '29f370d5460607afd3ad8971afb8387e3ab8ccd7' }, salla.lang.get('common.elements.no_options')))), h("div", { key: 'daabc9a39c770605c2b0a18a8e32c9b77cd28387', class: "s-placeholder-description" }, h("slot", { key: 'b318ca5417191c0e78eaab5e814dbc393679b416', name: 'description' }, h("span", { key: '1f616f82f63bbe79d7f88ae83544ce0ab97aa9fb' }, salla.lang.get('common.errors.empty_results'))))));
|
|
39
46
|
}
|
|
40
47
|
static get is() { return "salla-placeholder"; }
|
|
41
48
|
static get originalStyleUrls() {
|
|
@@ -22,7 +22,7 @@ export class SallaPriceRange {
|
|
|
22
22
|
this.minPrice = this.filtersData.price.min;
|
|
23
23
|
this.maxPrice = this.filtersData.price.max;
|
|
24
24
|
}
|
|
25
|
-
salla.lang.
|
|
25
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
26
26
|
this.moreThanLabel = salla.lang.getWithDefault('common.elements.more_than', this.moreThanLabel);
|
|
27
27
|
this.lessThanLabel = salla.lang.getWithDefault('common.elements.less_than', this.lessThanLabel);
|
|
28
28
|
this.toLabel = salla.lang.getWithDefault('common.elements.to', this.toLabel);
|
|
@@ -49,6 +49,9 @@ export class SallaPriceRange {
|
|
|
49
49
|
// do whatever
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.langUnsubscribe?.();
|
|
54
|
+
}
|
|
52
55
|
/**
|
|
53
56
|
* reset the price range inputs
|
|
54
57
|
*/
|
|
@@ -146,9 +149,9 @@ export class SallaPriceRange {
|
|
|
146
149
|
this.maxPrice = value === undefined ? '' : value;
|
|
147
150
|
}
|
|
148
151
|
render() {
|
|
149
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: '58b6733af46dcfc2f58f6096a3054512aea0f13a' }, this.filterValues.map((filterValue, index) => {
|
|
150
153
|
return h("label", { class: "s-filters-label", htmlFor: `${this.option.key}-${index}`, key: index }, h("input", { id: `${this.option.key}-${index}`, name: "price", type: "radio", checked: this.isChecked(filterValue), class: "s-filters-radio", onChange: e => this.handleMinMaxPrice(e, filterValue) }), h("span", { innerHTML: this.getPriceLabel(filterValue) }));
|
|
151
|
-
}), h("div", { key: '
|
|
154
|
+
}), h("div", { key: 'ffac46ec70c43e8e6866c27e7885700d8b84e02e', class: "flex justify-center items-center" }, h("div", { key: 'a44f86c833a9311fdbd043bacab3c8e39a3798a3', class: "relative max-w-xl w-full" }, h("div", { key: '58da7b0ff0bd6599660ddf2aa2b6f1c06fbd4e3a', class: "s-price-range-inputs" }, h("div", { key: 'f6cc6ea7bc4fa74b962adc29fd0f496a81ff7f98', class: "s-price-range-relative" }, h("div", { key: 'c5dcb135e50a0eafb9662deb3adde895ea997fa9', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: 'ddc438e870e21a030984ba5422d686ee0d756b9a', type: "number", maxlength: "5", ref: el => this.minInput = el, onBlur: (e) => this.handleMinPrice(e), value: this.minPrice, placeholder: this.fromLabel, class: "s-price-range-number-input" })), h("div", { key: '713b4a7ba19e6c00a57b20978813dbd250acec6d', class: "s-price-range-gray-text" }, " -"), h("div", { key: '8a87cb916d418b898747b7dfe63d770419892ec1', class: "s-price-range-relative" }, h("div", { key: 'fb1790fdc5494925560a4ce8be907f980090ceff', class: "s-price-range-currency" }, " ", salla.config.currency().symbol), h("input", { key: '164c84322ccf6fdddc2cb93f40440e4ddab9c164', type: "number", maxlength: "5", ref: el => this.maxInput = el, onBlur: (e) => this.handleMaxPrice(e), value: this.maxPrice, placeholder: this.toLabel, class: "s-price-range-number-input", "aria-describedby": "price-currency" })), h("salla-button", { key: 'cfb8f9d06b1b66170bddfebcd5bc0fea6bdcb9ff', color: 'gray', shape: 'icon', size: 'small', fill: 'outline', onClick: (event) => this.changedEventHandler(event) }, h("span", { key: '1c1251cc2becb339ee3f286d3be50acc5ea159c0', innerHTML: this.isRTL ? arrowLeft : arrowRight })))))));
|
|
152
155
|
}
|
|
153
156
|
componentDidLoad() {
|
|
154
157
|
this.isReady = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { Host, h } from "@stencil/core";
|
|
4
|
+
import { Host, h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import BellRingIcon from "../../assets/svg/bell-ring.svg";
|
|
6
6
|
import Helper from "../../Helpers/Helper";
|
|
7
7
|
export class SallaProductAvailability {
|
|
@@ -45,11 +45,8 @@ export class SallaProductAvailability {
|
|
|
45
45
|
error?.classList.contains('s-product-availability-error-msg') && (error.innerText = '');
|
|
46
46
|
e.keyCode === 13 && this.submit();
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
51
|
-
this.modal?.setTitle(this.title_);
|
|
52
|
-
});
|
|
48
|
+
// Read before the guest path below strips the attribute; the lang subscriber runs later, from connectedCallback.
|
|
49
|
+
this.hostTitle = this.host.title;
|
|
53
50
|
if (!this.productId) {
|
|
54
51
|
this.productId = salla.config.get('page.id');
|
|
55
52
|
}
|
|
@@ -59,6 +56,18 @@ export class SallaProductAvailability {
|
|
|
59
56
|
this.title_ = this.host.title || salla.lang.get('pages.products.notify_availability_title');
|
|
60
57
|
this.host.removeAttribute('title');
|
|
61
58
|
}
|
|
59
|
+
connectedCallback() {
|
|
60
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
61
|
+
this.translationLoaded = true;
|
|
62
|
+
this.title_ = this.hostTitle || salla.lang.get('pages.products.notify_availability_title');
|
|
63
|
+
this.modal?.setTitle(this.title_);
|
|
64
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
65
|
+
forceUpdate(this);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
disconnectedCallback() {
|
|
69
|
+
this.langUnsubscribe?.();
|
|
70
|
+
}
|
|
62
71
|
channelsWatcher(newValue) {
|
|
63
72
|
// fall back to store-configured channels, reading config directly when the SDK helper is missing
|
|
64
73
|
let channels = newValue || salla.api.product.getAvailabilityChannels?.() || Helper.availabilityChannels();
|
|
@@ -137,7 +146,7 @@ export class SallaProductAvailability {
|
|
|
137
146
|
field.nextElementSibling['innerText'] = '* ' + errorMsg;
|
|
138
147
|
}
|
|
139
148
|
render() {
|
|
140
|
-
return (h(Host, { key: '
|
|
149
|
+
return (h(Host, { key: 'aa9fad186e8f24c5e27a1e9e6d5de75806226bce', class: "s-product-availability-wrap" }, this.isSubscribedToProduct
|
|
141
150
|
? h("div", { class: "s-product-availability-subscribed" }, h("span", { innerHTML: BellRingIcon, class: "s-product-availability-subs-icon" }), salla.lang.get('pages.products.notify_availability_success'))
|
|
142
151
|
:
|
|
143
152
|
h("salla-button", { width: "wide", onClick: () => this.isUser ? this.submit() : this.openModel() }, salla.lang.get('pages.products.notify_availability')), this.isUser || this.isSubscribedToProduct ? '' : this.renderModal()));
|
|
@@ -35,14 +35,6 @@ export class SallaProductCard {
|
|
|
35
35
|
salla.wishlist.event.onRemoved((_res, id) => this.toggleFavoriteIcon(false, id));
|
|
36
36
|
this.placeholder = salla.url.asset(salla.config.get('theme.settings.placeholder'));
|
|
37
37
|
});
|
|
38
|
-
// Language
|
|
39
|
-
salla.lang.onLoaded(() => {
|
|
40
|
-
this.remained = salla.lang.get('pages.products.remained');
|
|
41
|
-
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
42
|
-
this.startingPrice = salla.lang.get('pages.products.starting_price');
|
|
43
|
-
this.addToCart = salla.lang.get('pages.cart.add_to_cart');
|
|
44
|
-
this.outOfStock = salla.lang.get('pages.products.out_of_stock');
|
|
45
|
-
});
|
|
46
38
|
// Parse product data
|
|
47
39
|
if (!this.product) {
|
|
48
40
|
return;
|
|
@@ -54,6 +46,19 @@ export class SallaProductCard {
|
|
|
54
46
|
salla.log('Bad json passed via product prop');
|
|
55
47
|
}
|
|
56
48
|
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
// Language
|
|
51
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
52
|
+
this.remained = salla.lang.get('pages.products.remained');
|
|
53
|
+
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
54
|
+
this.startingPrice = salla.lang.get('pages.products.starting_price');
|
|
55
|
+
this.addToCart = salla.lang.get('pages.cart.add_to_cart');
|
|
56
|
+
this.outOfStock = salla.lang.get('pages.products.out_of_stock');
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
disconnectedCallback() {
|
|
60
|
+
this.langUnsubscribe?.();
|
|
61
|
+
}
|
|
57
62
|
// Private Methods
|
|
58
63
|
initCircleBar() {
|
|
59
64
|
let qty = this.productData.quantity, total = this.productData.quantity > 100 ? this.productData.quantity * 2 : 100, roundPercent = (qty / total) * 100, bar = this.pie.querySelector('.s-product-card-content-pie-svg-bar'), strokeDashOffsetValue = 100 - roundPercent;
|
|
@@ -212,7 +217,7 @@ export class SallaProductCard {
|
|
|
212
217
|
"optional": false,
|
|
213
218
|
"docs": {
|
|
214
219
|
"tags": [],
|
|
215
|
-
"text": "
|
|
220
|
+
"text": "The product data to display. Can be a JSON string or a product object containing id, name, image, price, etc."
|
|
216
221
|
},
|
|
217
222
|
"getter": false,
|
|
218
223
|
"setter": false,
|
|
@@ -231,7 +236,7 @@ export class SallaProductCard {
|
|
|
231
236
|
"optional": false,
|
|
232
237
|
"docs": {
|
|
233
238
|
"tags": [],
|
|
234
|
-
"text": "
|
|
239
|
+
"text": "Whether to display the card in horizontal (landscape) layout. Default is false (vertical layout)."
|
|
235
240
|
},
|
|
236
241
|
"getter": false,
|
|
237
242
|
"setter": false,
|
|
@@ -250,7 +255,7 @@ export class SallaProductCard {
|
|
|
250
255
|
"optional": false,
|
|
251
256
|
"docs": {
|
|
252
257
|
"tags": [],
|
|
253
|
-
"text": "
|
|
258
|
+
"text": "Whether to add a shadow effect on hover. Default is false."
|
|
254
259
|
},
|
|
255
260
|
"getter": false,
|
|
256
261
|
"setter": false,
|
|
@@ -269,7 +274,7 @@ export class SallaProductCard {
|
|
|
269
274
|
"optional": false,
|
|
270
275
|
"docs": {
|
|
271
276
|
"tags": [],
|
|
272
|
-
"text": "
|
|
277
|
+
"text": "Whether to hide the \"Add to Cart\" button. Default is false (button is shown)."
|
|
273
278
|
},
|
|
274
279
|
"getter": false,
|
|
275
280
|
"setter": false,
|
|
@@ -288,7 +293,7 @@ export class SallaProductCard {
|
|
|
288
293
|
"optional": false,
|
|
289
294
|
"docs": {
|
|
290
295
|
"tags": [],
|
|
291
|
-
"text": "
|
|
296
|
+
"text": "Whether to use a full-image card style where the image covers the entire card. Default is false."
|
|
292
297
|
},
|
|
293
298
|
"getter": false,
|
|
294
299
|
"setter": false,
|
|
@@ -307,7 +312,7 @@ export class SallaProductCard {
|
|
|
307
312
|
"optional": false,
|
|
308
313
|
"docs": {
|
|
309
314
|
"tags": [],
|
|
310
|
-
"text": "
|
|
315
|
+
"text": "Whether to use a minimal card style with reduced information. Default is false."
|
|
311
316
|
},
|
|
312
317
|
"getter": false,
|
|
313
318
|
"setter": false,
|
|
@@ -326,7 +331,7 @@ export class SallaProductCard {
|
|
|
326
331
|
"optional": false,
|
|
327
332
|
"docs": {
|
|
328
333
|
"tags": [],
|
|
329
|
-
"text": "
|
|
334
|
+
"text": "Whether this is a special/featured product card with additional styling (like quantity pie chart). Default is false."
|
|
330
335
|
},
|
|
331
336
|
"getter": false,
|
|
332
337
|
"setter": false,
|
|
@@ -345,7 +350,7 @@ export class SallaProductCard {
|
|
|
345
350
|
"optional": false,
|
|
346
351
|
"docs": {
|
|
347
352
|
"tags": [],
|
|
348
|
-
"text": "
|
|
353
|
+
"text": "Whether to show the product quantity in a badge. Default is false."
|
|
349
354
|
},
|
|
350
355
|
"getter": false,
|
|
351
356
|
"setter": false,
|
|
@@ -364,7 +369,7 @@ export class SallaProductCard {
|
|
|
364
369
|
"optional": false,
|
|
365
370
|
"docs": {
|
|
366
371
|
"tags": [],
|
|
367
|
-
"text": "
|
|
372
|
+
"text": "Whether to use a compact card layout suitable for drawers and lists. Default is false."
|
|
368
373
|
},
|
|
369
374
|
"getter": false,
|
|
370
375
|
"setter": false,
|
|
@@ -107,12 +107,6 @@ export class SallaProductOptions {
|
|
|
107
107
|
const completed = option.donation.target_amount <= option.donation.collected_amount;
|
|
108
108
|
return h("div", { class: { "s-product-options-donation-message": true, "s-product-options-donation-completed": completed, "s-product-options-donation-expired": !completed } }, h("p", null, option.donation.target_message), h("span", { innerHTML: completed ? salla.money(option.donation.target_amount) : '' }));
|
|
109
109
|
};
|
|
110
|
-
salla.lang.onLoaded(() => {
|
|
111
|
-
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
112
|
-
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
113
|
-
this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');
|
|
114
|
-
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
115
|
-
});
|
|
116
110
|
if (this.options) {
|
|
117
111
|
try {
|
|
118
112
|
this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));
|
|
@@ -133,6 +127,14 @@ export class SallaProductOptions {
|
|
|
133
127
|
});
|
|
134
128
|
}
|
|
135
129
|
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
132
|
+
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
133
|
+
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
134
|
+
this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');
|
|
135
|
+
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
136
138
|
/**
|
|
137
139
|
* Sets the options data for the product
|
|
138
140
|
* @param optionsData - Array of product options
|
|
@@ -513,6 +515,7 @@ export class SallaProductOptions {
|
|
|
513
515
|
return needsCartId ? salla.api.cart.getCurrentCartId(false, "salla-product-options") : null;
|
|
514
516
|
}
|
|
515
517
|
disconnectedCallback() {
|
|
518
|
+
this.langUnsubscribe?.();
|
|
516
519
|
if (this.pasteHandler) {
|
|
517
520
|
document.removeEventListener("paste", this.pasteHandler);
|
|
518
521
|
}
|
|
@@ -11,12 +11,17 @@ export class SallaProductSizeGuide {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
this.hasError = false;
|
|
13
13
|
salla.event.on('size-guide::open', (product_id) => this.open(product_id));
|
|
14
|
-
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
15
17
|
this.placeholder_title = salla.lang.get('pages.products.size_guide_placeholder');
|
|
16
18
|
this.placeholder_description = salla.lang.get('pages.products.size_guide_placeholder_info');
|
|
17
19
|
this.modal_title = salla.lang.get('pages.products.size_guides');
|
|
18
20
|
});
|
|
19
21
|
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
this.langUnsubscribe?.();
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
* Show the size-guide modal window
|
|
22
27
|
*/
|
|
@@ -45,11 +50,11 @@ export class SallaProductSizeGuide {
|
|
|
45
50
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
46
51
|
}
|
|
47
52
|
render() {
|
|
48
|
-
return (h("salla-modal", { key: '
|
|
53
|
+
return (h("salla-modal", { key: '587dbc28fa828df2a47a4db1c124df032fe719fa', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("span", { key: '822224aa89fb065c7262abf2f24914ed1fa3d8bb', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '84e14a400f9417aa9be851a07f0203348a560aec', slot: "loading" }, h("div", { key: '5cbdbcf560f08279543c4d25fd21416ce2da1314', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: 'e3139f2898256adc2c20fbb86e96a9f5d008a677', height: '15px', width: '25%' }), h("div", { key: '961f482bf358c5a4ca0d980561bafdcd7489fa68', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '1754361211a771952be69eeda9a4c9788aaff0e6', height: '40px' }), h("salla-skeleton", { key: '2ea3578f8751a2526947d5c067392ef95e3bcf44', height: '40px' }), h("salla-skeleton", { key: '32bba195c5f6a60ce9837b4d4cbfa302d6ddfb07', height: '40px' }), h("salla-skeleton", { key: '9888b01cd47c5acdc0a159ad49db228efd630d75', height: '40px' })), h("div", { key: 'd86e706b2393b17301f9f28b4b303f00bf743363', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: '02e0330958fd73288d5c654fce7169470cdf47cd', height: '15px', width: '25%' }), h("salla-skeleton", { key: 'cccb8bc372c6ccfdf707621190bba4bc38aecb99', height: '10px', width: '75%' }), h("salla-skeleton", { key: '95f8e83b3b1a54a52da1ff2e61a866239575cf7b', height: '10px', width: '50%' }), h("salla-skeleton", { key: '4880b1d82cea617cae837ad2d6dd4d627fe8d9e3', height: '10px', width: '75%' }), h("salla-skeleton", { key: '38980cc41e7388b41e35015ceed72d025bd82980', height: '10px', width: '100%' }), h("salla-skeleton", { key: 'bb1ad6a995e9e27b851007cae2c1f7204f3c2d91', height: '10px', width: '25%' }), h("salla-skeleton", { key: 'fc5cd1e7adafca96e00b9284123bb3eb9f892c9c', height: '10px', width: '60%' }), h("salla-skeleton", { key: '89bbd77ec6da0c8e03dd2fb9f60c929f49415c83', height: '10px', width: '45%' }), h("salla-skeleton", { key: '0666ce266b9411913ae4db64c61d3cfa44cf4245', height: '10px', width: '30%' })))), h("slot", { key: '31a338bdc12e2a4ea1f80ea4bd700e293020b840', name: "header" }), !this.hasError && !!this.guides ?
|
|
49
54
|
[
|
|
50
55
|
h("salla-tabs", null, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
51
56
|
]
|
|
52
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
57
|
+
: this.showPlaceholder(), h("slot", { key: '887b97cd58b442db20dad02db8ace42847bcef75', name: "footer" })));
|
|
53
58
|
}
|
|
54
59
|
static get is() { return "salla-product-size-guide"; }
|
|
55
60
|
static get originalStyleUrls() {
|
|
@@ -101,14 +101,14 @@ export class SallaProductsList {
|
|
|
101
101
|
this.includes = null;
|
|
102
102
|
}
|
|
103
103
|
Helper.setIncludes(this.includes);
|
|
104
|
-
|
|
104
|
+
}
|
|
105
|
+
connectedCallback() {
|
|
106
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
105
107
|
this.placeholderText = salla.lang.get('pages.categories.no_products');
|
|
106
108
|
this.endOfText = salla.lang.get('common.elements.end_of_content');
|
|
107
109
|
this.failedLoadMore = salla.lang.get('common.elements.failed_to_load_more');
|
|
108
110
|
this.currentPage = salla.config.get('page');
|
|
109
111
|
});
|
|
110
|
-
}
|
|
111
|
-
connectedCallback() {
|
|
112
112
|
//Override browser scroll restoration default behaviour
|
|
113
113
|
if ('scrollRestoration' in history)
|
|
114
114
|
history.scrollRestoration = 'manual';
|
|
@@ -119,6 +119,7 @@ export class SallaProductsList {
|
|
|
119
119
|
salla.event.on('wishlist::storage.synced', this.onWishlistStorageSynced);
|
|
120
120
|
}
|
|
121
121
|
disconnectedCallback() {
|
|
122
|
+
this.langUnsubscribe?.();
|
|
122
123
|
window.removeEventListener('DOMContentLoaded', this.boundScrollToLastViewedProduct);
|
|
123
124
|
window.removeEventListener('scroll', this.boundHandleScroll);
|
|
124
125
|
salla.event.off('wishlist::removed', this.onWishlistItemRemoved);
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
export class SallaProgressBar {
|
|
6
6
|
constructor() {
|
|
7
|
+
// set when the constructor builds the donation-target labels, so the subscriber can rebuild them
|
|
8
|
+
this.hasDonationTarget = false;
|
|
9
|
+
this.donationEndDate = null;
|
|
7
10
|
/**
|
|
8
11
|
* Set height for the wrapper.
|
|
9
12
|
*/
|
|
@@ -15,6 +18,8 @@ export class SallaProgressBar {
|
|
|
15
18
|
donationJson.target_end_date = donationJson.target_end_date == '0000-00-00' ? null : donationJson.target_end_date;
|
|
16
19
|
this.value = donationJson.collected_amount;
|
|
17
20
|
this.target = donationJson.target_amount;
|
|
21
|
+
this.hasDonationTarget = true;
|
|
22
|
+
this.donationEndDate = donationJson.target_end_date;
|
|
18
23
|
this.header = salla.lang.get('pages.products.target');
|
|
19
24
|
this.message = donationJson.target_end_date ? salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date : '';
|
|
20
25
|
}
|
|
@@ -29,10 +34,6 @@ export class SallaProgressBar {
|
|
|
29
34
|
catch (e) {
|
|
30
35
|
salla.log('Wrong donation json');
|
|
31
36
|
}
|
|
32
|
-
salla.lang.onLoaded(() => {
|
|
33
|
-
this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
|
|
34
|
-
this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
|
|
35
|
-
});
|
|
36
37
|
salla.onReady(() => {
|
|
37
38
|
this.color = this.color || salla.config.get('theme.color.primary', "#ffd5c4");
|
|
38
39
|
if (!this.unit) {
|
|
@@ -40,6 +41,21 @@ export class SallaProgressBar {
|
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
}
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
46
|
+
if (this.hasDonationTarget) {
|
|
47
|
+
// rebuilt each time: once translated, the text no longer holds the keys replaced below
|
|
48
|
+
this.header = salla.lang.get('pages.products.target');
|
|
49
|
+
this.message = this.donationEndDate ? salla.lang.get('pages.products.donation_target_date') + ' ' + this.donationEndDate : '';
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
|
|
53
|
+
this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.langUnsubscribe?.();
|
|
58
|
+
}
|
|
43
59
|
getPercentage() {
|
|
44
60
|
return (this.value / this.target) * 100;
|
|
45
61
|
}
|
|
@@ -79,10 +79,15 @@ export class SallaQuickBuy {
|
|
|
79
79
|
});
|
|
80
80
|
return true;
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
}
|
|
83
|
+
connectedCallback() {
|
|
84
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
83
85
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
84
86
|
});
|
|
85
87
|
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
this.langUnsubscribe?.();
|
|
90
|
+
}
|
|
86
91
|
quickBuyHandler() {
|
|
87
92
|
if (salla.config.isGuest() && !this.isGuestCheckout()) {
|
|
88
93
|
this.requireLogin.emit({ productId: this.productId });
|