@salla.sa/twilight-components 2.14.596 → 2.14.598
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-MMeFYRaC.js → filepond-Yrcu23Ew.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dd1aobB-.js → filepond-plugin-file-poster-DRez16xM.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Be46s5wp.js → filepond-plugin-file-validate-size-H6Ijvhk2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cf3OjTHE.js → filepond-plugin-file-validate-type-ozbX9Tb-.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BDX5qgng.js → filepond-plugin-image-edit-CynCgK8H.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ilZNc8J4.js → filepond-plugin-image-exif-orientation-C18fCqoh.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C9c7tVEB.js → filepond-plugin-image-preview-FiRPNiZp.js} +1 -1
- package/dist/cjs/{index-zv0p1Eys.js → index-CpkvCUQ3.js} +7 -7
- package/dist/cjs/{intlTelInput-C8hiSJ_i.js → intlTelInput-dW1ObsSS.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -18
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -15
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +26 -20
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +7 -2
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +111 -37
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +12 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +47 -24
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +10 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +17 -12
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +7 -4
- package/dist/cjs/salla-filters.cjs.entry.js +10 -5
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +12 -7
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +7 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +14 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +14 -3
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +12 -5
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +39 -15
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +7 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +14 -7
- package/dist/cjs/salla-offer.cjs.entry.js +14 -9
- package/dist/cjs/salla-order-branch.cjs.entry.js +42 -4
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +7 -4
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +11 -4
- package/dist/cjs/salla-orders.cjs.entry.js +41 -7
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +10 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +7 -4
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +16 -9
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +9 -4
- package/dist/cjs/salla-products-list.cjs.entry.js +5 -4
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +7 -2
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +9 -3
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +9 -2
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +8 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +7 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +9 -5
- package/dist/cjs/salla-user-menu.cjs.entry.js +39 -2
- package/dist/cjs/salla-user-profile.cjs.entry.js +7 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +8 -3
- package/dist/cjs/salla-verify.cjs.entry.js +13 -6
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/translate-Cvomt6Jh.js +58 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DRrOfZz0.js → vanilla-picker-CSaDVE6R.js} +1 -1
- package/dist/collection/Helpers/money-text.js +37 -0
- package/dist/collection/Helpers/translate.js +36 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -2
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +10 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +23 -17
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +2 -0
- package/dist/collection/components/salla-button/salla-button.js +19 -27
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +10 -3
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +10 -5
- package/dist/collection/components/salla-comments/salla-comment-item.js +11 -3
- package/dist/collection/components/salla-comments/salla-comments.js +9 -3
- package/dist/collection/components/salla-contacts/salla-contacts.js +9 -2
- package/dist/collection/components/salla-count-down/salla-count-down.js +23 -18
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +4 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +69 -5
- package/dist/collection/components/salla-filters/salla-filters.js +10 -5
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +6 -3
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -6
- package/dist/collection/components/salla-hook/salla-hook.js +5 -1
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +15 -2
- package/dist/collection/components/salla-login-modal/salla-login-modal.css +3 -0
- package/dist/collection/components/salla-login-modal/salla-login-modal.js +12 -1
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -5
- package/dist/collection/components/salla-map/salla-map.js +12 -7
- package/dist/collection/components/salla-notifications/salla-notifications.js +6 -1
- package/dist/collection/components/salla-offer/salla-offer.js +12 -7
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +13 -6
- package/dist/collection/components/salla-order-branch/salla-order-branch.css +35 -0
- package/dist/collection/components/salla-order-branch/salla-order-branch.js +40 -2
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +6 -3
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +10 -3
- package/dist/collection/components/salla-orders/salla-orders.js +13 -6
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +10 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +6 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +16 -7
- package/dist/collection/components/salla-product-card/salla-product-card.js +24 -17
- package/dist/collection/components/salla-product-options/salla-product-options.js +9 -6
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +8 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -4
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +6 -1
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +6 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +8 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +16 -16
- package/dist/collection/components/salla-review-card/salla-review-card.js +5 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +6 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +9 -2
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +10 -10
- package/dist/collection/components/salla-slider/salla-slider.js +6 -3
- package/dist/collection/components/salla-social/salla-social.js +7 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +24 -19
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +6 -1
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.css +17 -12
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +7 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +38 -1
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +6 -2
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +7 -2
- package/dist/collection/components/salla-verify/salla-verify.js +13 -6
- package/dist/components/index.js +3 -3
- package/dist/components/salla-add-product-button2.js +7 -2
- package/dist/components/salla-alert.js +2 -2
- package/dist/components/salla-apps-icons.js +6 -1
- package/dist/components/salla-booking-field2.js +10 -4
- package/dist/components/salla-bottom-alert.js +23 -17
- package/dist/components/salla-bullet-delivery.js +1 -1
- package/dist/components/salla-button2.js +9 -17
- package/dist/components/salla-cart-item-offers.js +10 -3
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-comment-form2.js +10 -5
- package/dist/components/salla-comment-item2.js +11 -3
- package/dist/components/salla-comments.js +9 -3
- package/dist/components/salla-contacts.js +9 -2
- package/dist/components/salla-count-down2.js +16 -11
- package/dist/components/salla-file-upload2.js +69 -5
- package/dist/components/salla-filters-widget2.js +6 -3
- package/dist/components/salla-filters.js +9 -4
- package/dist/components/salla-gifting.js +11 -6
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-infinite-scroll.js +6 -1
- package/dist/components/salla-localization-modal.js +15 -2
- package/dist/components/salla-login-modal2.js +13 -2
- package/dist/components/salla-loyalty.js +12 -5
- package/dist/components/salla-map2.js +12 -7
- package/dist/components/salla-notifications.js +6 -1
- package/dist/components/salla-offer-modal.js +13 -6
- package/dist/components/salla-offer.js +12 -7
- package/dist/components/salla-order-branch.js +41 -3
- package/dist/components/salla-order-summary.js +6 -3
- package/dist/components/salla-order-totals-card.js +10 -3
- package/dist/components/salla-orders.js +40 -6
- package/dist/components/salla-placeholder2.js +10 -3
- package/dist/components/salla-price-range2.js +6 -3
- package/dist/components/salla-product-availability2.js +16 -7
- package/dist/components/salla-product-card2.js +15 -8
- package/dist/components/salla-product-options2.js +9 -6
- package/dist/components/salla-product-size-guide.js +8 -3
- package/dist/components/salla-products-list2.js +4 -3
- package/dist/components/salla-progress-bar2.js +20 -4
- package/dist/components/salla-quick-buy2.js +6 -1
- package/dist/components/salla-quick-order.js +6 -1
- package/dist/components/salla-rating-modal2.js +8 -2
- package/dist/components/salla-rating-stars2.js +10 -10
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews.js +6 -1
- package/dist/components/salla-scopes.js +9 -2
- package/dist/components/salla-skeleton2.js +7 -7
- package/dist/components/salla-slider2.js +6 -3
- package/dist/components/salla-social.js +7 -2
- package/dist/components/salla-tab-header2.js +3 -3
- package/dist/components/salla-tel-input2.js +24 -19
- package/dist/components/salla-tiered-offer.js +6 -1
- package/dist/components/salla-trust-badges.js +8 -4
- package/dist/components/salla-user-menu.js +38 -1
- package/dist/components/salla-user-profile.js +6 -2
- package/dist/components/salla-user-settings.js +7 -2
- package/dist/components/salla-verify.js +13 -6
- package/dist/components/translate.js +37 -1
- package/dist/docs.json +44 -44
- package/dist/esm/{filepond-okemUEVJ.js → filepond-Cqatu146.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-He-1QDcm.js → filepond-plugin-file-poster-DbVXhgv4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BoQ9OZHK.js → filepond-plugin-file-validate-size-BpJPambh.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BVxE-7xU.js → filepond-plugin-file-validate-type-3Qrskyxw.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DJnNmArQ.js → filepond-plugin-image-edit-Cjy7cOV1.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CgkqV9g5.js → filepond-plugin-image-exif-orientation-DYM12Yp-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DxbixTNR.js → filepond-plugin-image-preview-C9nMEHVX.js} +1 -1
- package/dist/esm/{index-C1mBhG6Z.js → index-noRE1pbw.js} +7 -7
- package/dist/esm/{intlTelInput-wxpsRy0u.js → intlTelInput-CiinYrbq.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +10 -18
- package/dist/esm/salla-add-product-button_5.entry.js +37 -15
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +26 -20
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +7 -2
- package/dist/esm/salla-attachment-view_9.entry.js +111 -37
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +2 -2
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +12 -5
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +47 -24
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +10 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +17 -12
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +7 -4
- package/dist/esm/salla-filters.entry.js +10 -5
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +12 -7
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-infinite-scroll.entry.js +7 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +14 -2
- package/dist/esm/salla-login-modal.entry.js +14 -3
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +12 -5
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +39 -15
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +7 -2
- package/dist/esm/salla-offer-modal.entry.js +14 -7
- package/dist/esm/salla-offer.entry.js +14 -9
- package/dist/esm/salla-order-branch.entry.js +42 -4
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +7 -4
- package/dist/esm/salla-order-totals-card.entry.js +11 -4
- package/dist/esm/salla-orders.entry.js +41 -7
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +10 -3
- package/dist/esm/salla-price-range.entry.js +7 -4
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +16 -9
- package/dist/esm/salla-product-size-guide.entry.js +9 -4
- package/dist/esm/salla-products-list.entry.js +5 -4
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +7 -2
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +9 -3
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +9 -2
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +8 -8
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +8 -3
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +7 -2
- package/dist/esm/salla-trust-badges.entry.js +9 -5
- package/dist/esm/salla-user-menu.entry.js +39 -2
- package/dist/esm/salla-user-profile.entry.js +7 -3
- package/dist/esm/salla-user-settings.entry.js +8 -3
- package/dist/esm/salla-verify.entry.js +13 -6
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/translate-CxrJQ3Jf.js +54 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CQEJbE9K.js → vanilla-picker-BWBrgMJQ.js} +1 -1
- package/dist/twilight/{p-c28395c6.entry.js → p-03e89cb1.entry.js} +1 -1
- package/dist/twilight/{p-5babb989.entry.js → p-07dc637e.entry.js} +1 -1
- package/dist/twilight/p-0859fe23.entry.js +4 -0
- package/dist/twilight/p-0b54834f.entry.js +4 -0
- package/dist/twilight/{p-e00ed6c9.entry.js → p-0c9f5232.entry.js} +1 -1
- package/dist/twilight/p-0ca1a782.entry.js +4 -0
- package/dist/twilight/p-0cb548be.entry.js +4 -0
- package/dist/twilight/{p-8ec0fc03.entry.js → p-138d6214.entry.js} +1 -1
- package/dist/twilight/p-141218a3.entry.js +4 -0
- package/dist/twilight/p-15b8fa7f.entry.js +4 -0
- package/dist/twilight/{p-ac20a6de.entry.js → p-15f5d424.entry.js} +1 -1
- package/dist/twilight/{p-21ba0eac.entry.js → p-16072449.entry.js} +1 -1
- package/dist/twilight/{p-dcb5ceda.entry.js → p-16b2f58b.entry.js} +1 -1
- package/dist/twilight/{p-f643bf2f.entry.js → p-18aff2d5.entry.js} +1 -1
- package/dist/twilight/{p-7ac91ace.entry.js → p-1930b915.entry.js} +1 -1
- package/dist/twilight/p-1cbbdcea.entry.js +4 -0
- package/dist/twilight/{p-d75157e0.entry.js → p-1fe92c36.entry.js} +1 -1
- package/dist/twilight/{p-f130c67f.entry.js → p-221e47a5.entry.js} +1 -1
- package/dist/twilight/p-2636c473.entry.js +4 -0
- package/dist/twilight/p-27712ed1.entry.js +4 -0
- package/dist/twilight/{p-fac4da2b.entry.js → p-2eea4245.entry.js} +1 -1
- package/dist/twilight/{p-d6d72996.entry.js → p-3263103c.entry.js} +1 -1
- package/dist/twilight/{p-ca7593c0.entry.js → p-341a7ab8.entry.js} +1 -1
- package/dist/twilight/{p-1080831a.entry.js → p-3b4f66d3.entry.js} +1 -1
- package/dist/twilight/p-3c45c49f.entry.js +4 -0
- package/dist/twilight/{p-e98835e3.entry.js → p-3f730d01.entry.js} +1 -1
- package/dist/twilight/{p-12a2b743.entry.js → p-40c8b553.entry.js} +1 -1
- package/dist/twilight/p-4333c630.entry.js +4 -0
- package/dist/twilight/{p-1a5d0b25.entry.js → p-454b32f0.entry.js} +1 -1
- package/dist/twilight/{p-8bdb7f71.entry.js → p-475d01e2.entry.js} +1 -1
- package/dist/twilight/{p-f8aa1b23.entry.js → p-4962d869.entry.js} +1 -1
- package/dist/twilight/{p-4b0eaa16.entry.js → p-4ce97595.entry.js} +1 -1
- package/dist/twilight/p-4d1582f8.entry.js +4 -0
- package/dist/twilight/{p-5e426c78.entry.js → p-4d482ee4.entry.js} +1 -1
- package/dist/twilight/{p-67d3ee58.entry.js → p-5110433d.entry.js} +1 -1
- package/dist/twilight/p-517807b2.entry.js +4 -0
- package/dist/twilight/p-52a7dbb7.entry.js +4 -0
- package/dist/twilight/{p-160476f0.entry.js → p-5360d082.entry.js} +1 -1
- package/dist/twilight/p-53bf1d54.entry.js +4 -0
- package/dist/twilight/p-540a7588.entry.js +4 -0
- package/dist/twilight/{p-9d434410.entry.js → p-5a6c4fdf.entry.js} +1 -1
- package/dist/twilight/{p-5e099f96.entry.js → p-5ac2e6ab.entry.js} +1 -1
- package/dist/twilight/{p-de55326d.entry.js → p-64158678.entry.js} +1 -1
- package/dist/twilight/p-67ecb74a.entry.js +4 -0
- package/dist/twilight/{p-342b31ba.entry.js → p-6e53afc6.entry.js} +1 -1
- package/dist/twilight/{p-474997dd.entry.js → p-6f66a0f2.entry.js} +1 -1
- package/dist/twilight/p-721819ee.entry.js +4 -0
- package/dist/twilight/p-76d11b5c.entry.js +4 -0
- package/dist/twilight/p-78b86647.entry.js +4 -0
- package/dist/twilight/p-7f0bdf0e.entry.js +4 -0
- package/dist/twilight/{p-caee5b0d.entry.js → p-7f882abf.entry.js} +1 -1
- package/dist/twilight/{p-6602a61a.entry.js → p-826ed1c6.entry.js} +1 -1
- package/dist/twilight/{p-8eb75cf8.entry.js → p-82d59bf3.entry.js} +1 -1
- package/dist/twilight/p-856ed222.entry.js +4 -0
- package/dist/twilight/{p-4bde9c4e.entry.js → p-87b3c231.entry.js} +1 -1
- package/dist/twilight/p-87dcc9d8.entry.js +4 -0
- package/dist/twilight/{p-58058ae9.entry.js → p-8876efa6.entry.js} +1 -1
- package/dist/twilight/{p-81596b48.entry.js → p-88d64b87.entry.js} +1 -1
- package/dist/twilight/p-88f650da.entry.js +4 -0
- package/dist/twilight/p-8e248aa7.entry.js +4 -0
- package/dist/twilight/p-919dd049.entry.js +4 -0
- package/dist/twilight/{p-62653d93.entry.js → p-950634d1.entry.js} +1 -1
- package/dist/twilight/{p-a11b77df.entry.js → p-9ce917a6.entry.js} +1 -1
- package/dist/twilight/{p-672a709e.entry.js → p-9e084610.entry.js} +1 -1
- package/dist/twilight/{p-8513fec2.entry.js → p-9ed52621.entry.js} +1 -1
- package/dist/twilight/{p-60d06105.entry.js → p-9fcc7eeb.entry.js} +1 -1
- package/dist/twilight/{p-Gxv67UlH.js → p-B867dk1j.js} +1 -1
- package/dist/twilight/{p-CJPWrlxL.js → p-BT5AJCX9.js} +1 -1
- package/dist/twilight/{p-CtcjG32v.js → p-CADeV7A-.js} +1 -1
- package/dist/twilight/{p-E2n9kJc8.js → p-CbJEogz0.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-C57CqqgQ.js → p-CyV163V_.js} +1 -1
- package/dist/twilight/{p-DiU9tYvl.js → p-D98H4WeK.js} +1 -1
- package/dist/twilight/p-DN2opqoB.js +9 -0
- package/dist/twilight/{p-pzi0Osm7.js → p-DWkNp24H.js} +1 -1
- package/dist/twilight/{p-Bm1ywp6t.js → p-DomdkzLW.js} +1 -1
- package/dist/twilight/{p-c28c53c3.entry.js → p-a030da8e.entry.js} +1 -1
- package/dist/twilight/{p-3a465851.entry.js → p-a2de7999.entry.js} +1 -1
- package/dist/twilight/{p-c89282b0.entry.js → p-a8408d51.entry.js} +1 -1
- package/dist/twilight/p-aabc57e3.entry.js +4 -0
- package/dist/twilight/p-b1a35349.entry.js +4 -0
- package/dist/twilight/{p-fd787b30.entry.js → p-ba76a96a.entry.js} +1 -1
- package/dist/twilight/{p-d6508494.entry.js → p-ba9ee435.entry.js} +1 -1
- package/dist/twilight/{p-f47a1351.entry.js → p-be7dcc25.entry.js} +1 -1
- package/dist/twilight/{p-54bc613c.entry.js → p-c41c1eff.entry.js} +1 -1
- package/dist/twilight/p-c589a326.entry.js +4 -0
- package/dist/twilight/{p-e43c49e9.entry.js → p-c5d4682b.entry.js} +1 -1
- package/dist/twilight/p-c631e2cd.entry.js +4 -0
- package/dist/twilight/{p-97bb12a6.entry.js → p-c6af4f05.entry.js} +1 -1
- package/dist/twilight/{p-da9bd7f6.entry.js → p-c8d269df.entry.js} +1 -1
- package/dist/twilight/{p-e4589779.entry.js → p-cab2f22a.entry.js} +1 -1
- package/dist/twilight/{p-f3985cfd.entry.js → p-ce120ce6.entry.js} +1 -1
- package/dist/twilight/{p-80699771.entry.js → p-ce981b2f.entry.js} +1 -1
- package/dist/twilight/p-d09b6b8c.entry.js +4 -0
- package/dist/twilight/{p-b3abf071.entry.js → p-d13f5256.entry.js} +1 -1
- package/dist/twilight/{p-c82f46a9.entry.js → p-d306b947.entry.js} +1 -1
- package/dist/twilight/p-d986aa18.entry.js +4 -0
- package/dist/twilight/{p-844176cb.entry.js → p-e4c88bee.entry.js} +1 -1
- package/dist/twilight/p-e7fc0d63.entry.js +4 -0
- package/dist/twilight/p-eef846fa.entry.js +4 -0
- package/dist/twilight/{p-dbc1e40c.entry.js → p-f03f893c.entry.js} +1 -1
- package/dist/twilight/p-f5f0246f.entry.js +4 -0
- package/dist/twilight/p-f6f633fc.entry.js +4 -0
- package/dist/twilight/p-f9fbcb8d.entry.js +4 -0
- package/dist/twilight/p-fc717703.entry.js +4 -0
- package/dist/twilight/{p-C1mBhG6Z.js → p-noRE1pbw.js} +2 -2
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/money-text.d.ts +13 -0
- package/dist/types/Helpers/translate.d.ts +17 -0
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -1
- package/dist/types/components/salla-alert/salla-alert.d.ts +3 -3
- package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +3 -0
- package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +3 -0
- package/dist/types/components/salla-bottom-alert/salla-bottom-alert.d.ts +3 -1
- package/dist/types/components/salla-button/salla-button.d.ts +10 -18
- package/dist/types/components/salla-cart-item-offers/salla-cart-item-offers.d.ts +3 -0
- package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +2 -2
- package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
- package/dist/types/components/salla-comments/salla-comments.d.ts +3 -0
- package/dist/types/components/salla-contacts/salla-contacts.d.ts +4 -0
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +17 -14
- package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +4 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +12 -0
- package/dist/types/components/salla-filters/salla-filters.d.ts +4 -1
- package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +2 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +3 -0
- package/dist/types/components/salla-hook/salla-hook.d.ts +4 -0
- package/dist/types/components/salla-infinite-scroll/salla-infinite-scroll.d.ts +3 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +4 -0
- package/dist/types/components/salla-login-modal/salla-login-modal.d.ts +3 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
- package/dist/types/components/salla-map/salla-map.d.ts +3 -0
- package/dist/types/components/salla-notifications/salla-notifications.d.ts +3 -1
- package/dist/types/components/salla-offer/salla-offer.d.ts +3 -0
- package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -0
- package/dist/types/components/salla-order-branch/interfaces.d.ts +1 -0
- package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +10 -1
- package/dist/types/components/salla-order-summary/salla-order-summary.d.ts +2 -0
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +4 -3
- package/dist/types/components/salla-order-totals-card/salla-order-totals-card.d.ts +2 -0
- package/dist/types/components/salla-orders/salla-orders.d.ts +3 -1
- package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -1
- package/dist/types/components/salla-price-range/salla-price-range.d.ts +2 -0
- package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +4 -0
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +12 -9
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
- package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +3 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
- package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +5 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +3 -1
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +3 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -0
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +14 -14
- package/dist/types/components/salla-review-card/salla-review-card.d.ts +4 -0
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +3 -0
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +3 -0
- package/dist/types/components/salla-skeleton/salla-skeleton.d.ts +6 -6
- package/dist/types/components/salla-slider/salla-slider.d.ts +2 -0
- package/dist/types/components/salla-social/salla-social.d.ts +3 -0
- package/dist/types/components/salla-tabs/salla-tab-header.d.ts +2 -2
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -1
- package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +3 -1
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +3 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +16 -0
- package/dist/types/components/salla-user-profile/salla-user-profile.d.ts +3 -1
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +3 -0
- package/dist/types/components/salla-verify/salla-verify.d.ts +3 -0
- package/dist/types/components.d.ts +128 -80
- package/package.json +19 -19
- package/dist/cjs/translate-BeU1QX_r.js +0 -20
- package/dist/esm/translate-CrSV-tno.js +0 -18
- package/dist/twilight/p-020eb2a1.entry.js +0 -4
- package/dist/twilight/p-06799084.entry.js +0 -4
- package/dist/twilight/p-0a3abfd4.entry.js +0 -4
- package/dist/twilight/p-0ef388be.entry.js +0 -4
- package/dist/twilight/p-1f99db23.entry.js +0 -4
- package/dist/twilight/p-232c39e9.entry.js +0 -4
- package/dist/twilight/p-305ed224.entry.js +0 -4
- package/dist/twilight/p-3a4cf66c.entry.js +0 -4
- package/dist/twilight/p-3c4702bb.entry.js +0 -4
- package/dist/twilight/p-3dcb5129.entry.js +0 -4
- package/dist/twilight/p-43d0c80e.entry.js +0 -4
- package/dist/twilight/p-50bbbd18.entry.js +0 -4
- package/dist/twilight/p-51c26ce7.entry.js +0 -4
- package/dist/twilight/p-54054ab9.entry.js +0 -4
- package/dist/twilight/p-5c1a36ab.entry.js +0 -4
- package/dist/twilight/p-5cf3929c.entry.js +0 -4
- package/dist/twilight/p-8028be6f.entry.js +0 -4
- package/dist/twilight/p-82939afe.entry.js +0 -4
- package/dist/twilight/p-85cff524.entry.js +0 -4
- package/dist/twilight/p-8dfdd6c9.entry.js +0 -4
- package/dist/twilight/p-92f6aa52.entry.js +0 -4
- package/dist/twilight/p-BB23a2fo.js +0 -9
- package/dist/twilight/p-CrSV-tno.js +0 -4
- package/dist/twilight/p-a4aac112.entry.js +0 -4
- package/dist/twilight/p-a52bfa57.entry.js +0 -4
- package/dist/twilight/p-a9aadc0b.entry.js +0 -4
- package/dist/twilight/p-bc26490f.entry.js +0 -4
- package/dist/twilight/p-bef93c52.entry.js +0 -4
- package/dist/twilight/p-c30bfc0b.entry.js +0 -4
- package/dist/twilight/p-cb770a9e.entry.js +0 -4
- package/dist/twilight/p-cbcca1ff.entry.js +0 -4
- package/dist/twilight/p-d81bcfb3.entry.js +0 -4
- package/dist/twilight/p-e67b2aa8.entry.js +0 -4
- package/dist/twilight/p-e9ce8dec.entry.js +0 -4
- package/dist/twilight/p-eb718f6b.entry.js +0 -4
- package/dist/twilight/p-ec361a66.entry.js +0 -4
- package/dist/twilight/p-f32de457.entry.js +0 -4
- package/dist/twilight/p-f626ef96.entry.js +0 -4
- package/dist/twilight/p-f6df7f8a.entry.js +0 -4
- package/dist/twilight/p-fd3bb3f2.entry.js +0 -4
|
@@ -6,6 +6,7 @@ import { CommentType, buildCommentSortOptions, isFeatureEnabled } from "./interf
|
|
|
6
6
|
import anime from "animejs";
|
|
7
7
|
import Helper from "../../Helpers/Helper";
|
|
8
8
|
import ChatBubbles from "../../assets/svg/chat-bubbles.svg";
|
|
9
|
+
import { addMissingTranslations, setTranslationDefault } from "../../Helpers/translate";
|
|
9
10
|
export class SallaComments {
|
|
10
11
|
constructor() {
|
|
11
12
|
/**
|
|
@@ -37,8 +38,10 @@ export class SallaComments {
|
|
|
37
38
|
this.allowLikes = salla.config.get('store.settings.rating.allow_likes');
|
|
38
39
|
this.showRatingSummary = salla.config.get('store.settings.rating.show_rating_summary');
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
}
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
44
|
+
addMissingTranslations({
|
|
42
45
|
"blocks.comments.overall_rating": { ar: "التقييم العام", en: "Overall rating" }
|
|
43
46
|
});
|
|
44
47
|
this.comment_title = salla.lang.get('blocks.comments.overall_rating');
|
|
@@ -46,7 +49,7 @@ export class SallaComments {
|
|
|
46
49
|
this.noComments = salla.lang.get('pages.rating.no_ratings');
|
|
47
50
|
const setNestedAsync = (lang, key, value) => {
|
|
48
51
|
return new Promise((resolve) => {
|
|
49
|
-
|
|
52
|
+
setTranslationDefault(lang, key, value);
|
|
50
53
|
resolve(true);
|
|
51
54
|
});
|
|
52
55
|
};
|
|
@@ -64,6 +67,9 @@ export class SallaComments {
|
|
|
64
67
|
setTranslations();
|
|
65
68
|
});
|
|
66
69
|
}
|
|
70
|
+
disconnectedCallback() {
|
|
71
|
+
this.langUnsubscribe?.();
|
|
72
|
+
}
|
|
67
73
|
resetInfiniteScroll() {
|
|
68
74
|
clearTimeout(this.initialDataTimer);
|
|
69
75
|
if (this.infiniteScroll) {
|
|
@@ -18,10 +18,17 @@ export class SallaContacts {
|
|
|
18
18
|
salla.onReady(() => {
|
|
19
19
|
this.contacts = salla.config.get('store.contacts');
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
}
|
|
22
|
+
connectedCallback() {
|
|
23
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
24
|
+
if (!this.contactsTitle || this.contactsTitle === this.langTitle) {
|
|
25
|
+
this.contactsTitle = this.langTitle = salla.lang.get('blocks.footer.social');
|
|
26
|
+
}
|
|
23
27
|
});
|
|
24
28
|
}
|
|
29
|
+
disconnectedCallback() {
|
|
30
|
+
this.langUnsubscribe?.();
|
|
31
|
+
}
|
|
25
32
|
getContactsArray() {
|
|
26
33
|
return Object.entries(this.contacts)
|
|
27
34
|
.filter(([_key, value]) => value !== '')
|
|
@@ -5,16 +5,16 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
export class SallaCountDown {
|
|
6
6
|
constructor() {
|
|
7
7
|
/**
|
|
8
|
-
* The size of the
|
|
9
|
-
|
|
8
|
+
* The size of the countdown display. Can be 'sm', 'md', or 'lg'. Default is 'md'.
|
|
9
|
+
*/
|
|
10
10
|
this.size = 'md';
|
|
11
11
|
/**
|
|
12
|
-
* The color of the
|
|
13
|
-
|
|
12
|
+
* The color theme of the countdown. Can be 'primary', 'light', or 'dark'. Default is 'dark'.
|
|
13
|
+
*/
|
|
14
14
|
this.color = 'dark';
|
|
15
15
|
/**
|
|
16
|
-
* The digits
|
|
17
|
-
|
|
16
|
+
* The language/format for displaying digits. 'en' for English numerals, 'auto' for localized numerals. Default is 'auto'.
|
|
17
|
+
*/
|
|
18
18
|
this.digits = 'auto';
|
|
19
19
|
/**
|
|
20
20
|
* If true, hides days segment when days = 0, and hides hours segment when both days and hours = 0.
|
|
@@ -35,7 +35,12 @@ export class SallaCountDown {
|
|
|
35
35
|
this.hours = this.number(0);
|
|
36
36
|
this.minutes = this.number(0);
|
|
37
37
|
this.seconds = this.number(0);
|
|
38
|
-
|
|
38
|
+
if (this.date && this.isValidDate(this.date)) {
|
|
39
|
+
this.startCountDown();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
connectedCallback() {
|
|
43
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
39
44
|
this.daysLabel = salla.lang.getWithDefault('pages.checkout.day', 'يوم');
|
|
40
45
|
this.hoursLabel = salla.lang.getWithDefault('pages.checkout.hour', 'ساعة');
|
|
41
46
|
this.minutesLabel = salla.lang.getWithDefault('pages.checkout.minute', 'دقيقة');
|
|
@@ -43,9 +48,9 @@ export class SallaCountDown {
|
|
|
43
48
|
this.secondsLabel = salla.lang.getWithDefault('pages.checkout.second', 'ثانية');
|
|
44
49
|
this.endLabel = salla.lang.getWithDefault('pages.checkout.offer_ended', 'انتهت مدة العرض');
|
|
45
50
|
});
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
}
|
|
52
|
+
disconnectedCallback() {
|
|
53
|
+
this.langUnsubscribe?.();
|
|
49
54
|
}
|
|
50
55
|
/**
|
|
51
56
|
* End the count down
|
|
@@ -229,7 +234,7 @@ export class SallaCountDown {
|
|
|
229
234
|
return this.renderCountDown();
|
|
230
235
|
}
|
|
231
236
|
render() {
|
|
232
|
-
return (h(Host, { key: '
|
|
237
|
+
return (h(Host, { key: '6d42cb8b06464f722d078ab4eb7117c7f698f3c3', class: `s-count-down-wrapper ${this.preOrder && this.isValidDate(this.date) ? 's-count-down-pre-order' : ''} ${this.horizontal ? 's-count-down-horizontal' : ''} ${this.withButton ? 's-count-down-with-button' : ''} ${this.offerEnded ? 's-count-down-ended' : ''}` }, this.renderPrefixText(), this.renderContent(), this.offerEnded && this.renderOfferEnded(), this.renderButton()));
|
|
233
238
|
}
|
|
234
239
|
static get is() { return "salla-count-down"; }
|
|
235
240
|
static get originalStyleUrls() {
|
|
@@ -414,7 +419,7 @@ export class SallaCountDown {
|
|
|
414
419
|
"optional": false,
|
|
415
420
|
"docs": {
|
|
416
421
|
"tags": [],
|
|
417
|
-
"text": "
|
|
422
|
+
"text": "Whether to display countdown numbers in boxed containers. Default is false."
|
|
418
423
|
},
|
|
419
424
|
"getter": false,
|
|
420
425
|
"setter": false,
|
|
@@ -433,7 +438,7 @@ export class SallaCountDown {
|
|
|
433
438
|
"optional": false,
|
|
434
439
|
"docs": {
|
|
435
440
|
"tags": [],
|
|
436
|
-
"text": "The size of the
|
|
441
|
+
"text": "The size of the countdown display. Can be 'sm', 'md', or 'lg'. Default is 'md'."
|
|
437
442
|
},
|
|
438
443
|
"getter": false,
|
|
439
444
|
"setter": false,
|
|
@@ -453,7 +458,7 @@ export class SallaCountDown {
|
|
|
453
458
|
"optional": false,
|
|
454
459
|
"docs": {
|
|
455
460
|
"tags": [],
|
|
456
|
-
"text": "The color of the
|
|
461
|
+
"text": "The color theme of the countdown. Can be 'primary', 'light', or 'dark'. Default is 'dark'."
|
|
457
462
|
},
|
|
458
463
|
"getter": false,
|
|
459
464
|
"setter": false,
|
|
@@ -473,7 +478,7 @@ export class SallaCountDown {
|
|
|
473
478
|
"optional": false,
|
|
474
479
|
"docs": {
|
|
475
480
|
"tags": [],
|
|
476
|
-
"text": "
|
|
481
|
+
"text": "Whether to show labels (day, hour, minute, second) below each countdown number. Default is false."
|
|
477
482
|
},
|
|
478
483
|
"getter": false,
|
|
479
484
|
"setter": false,
|
|
@@ -492,7 +497,7 @@ export class SallaCountDown {
|
|
|
492
497
|
"optional": false,
|
|
493
498
|
"docs": {
|
|
494
499
|
"tags": [],
|
|
495
|
-
"text": "
|
|
500
|
+
"text": "Custom text to display when the countdown ends. If not provided, uses the default localized message."
|
|
496
501
|
},
|
|
497
502
|
"getter": false,
|
|
498
503
|
"setter": false,
|
|
@@ -568,7 +573,7 @@ export class SallaCountDown {
|
|
|
568
573
|
"optional": false,
|
|
569
574
|
"docs": {
|
|
570
575
|
"tags": [],
|
|
571
|
-
"text": "The digits
|
|
576
|
+
"text": "The language/format for displaying digits. 'en' for English numerals, 'auto' for localized numerals. Default is 'auto'."
|
|
572
577
|
},
|
|
573
578
|
"getter": false,
|
|
574
579
|
"setter": false,
|
|
@@ -588,7 +593,7 @@ export class SallaCountDown {
|
|
|
588
593
|
"optional": false,
|
|
589
594
|
"docs": {
|
|
590
595
|
"tags": [],
|
|
591
|
-
"text": "
|
|
596
|
+
"text": "Whether to set the countdown end time to the end of the specified day (23:59:59). Default is false."
|
|
592
597
|
},
|
|
593
598
|
"getter": false,
|
|
594
599
|
"setter": false,
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
import { h, } from "@stencil/core";
|
|
5
5
|
import CameraIcon from "../../assets/svg/camera.svg";
|
|
6
6
|
import { FormFieldTypes, } from "../salla-user-profile/interfaces";
|
|
7
|
+
/**
|
|
8
|
+
* The `salla-custom-fields` component renders custom form fields with validation support.
|
|
9
|
+
* Supports text and file upload fields with real-time validation.
|
|
10
|
+
*/
|
|
7
11
|
export class SallaCustomFields {
|
|
8
12
|
constructor() {
|
|
9
13
|
/** Whether the fields can be edited by the user. */
|
|
@@ -5,7 +5,10 @@ import { h, Host } from "@stencil/core";
|
|
|
5
5
|
import { formatDuration, formatBytesAsSize, getFilePondMaxFileSize, getMaxImagesCount, getMaxVideosCount, getTotalMaxFiles, getUploadErrorMessage, isImageMimeType, isVideoMimeType, parseSizeToBytes, shouldCountGalleryFile, shouldCountGalleryLimit, usesSplitCountLimits, } from "./upload-limits";
|
|
6
6
|
import CancelIcon from "../../assets/svg/cancel.svg";
|
|
7
7
|
import PlayIcon from "../../assets/svg/play-circle.svg";
|
|
8
|
+
import { setTranslationDefault } from "../../Helpers/translate";
|
|
8
9
|
const VIDEO_METADATA_TIMEOUT_MS = 10000;
|
|
10
|
+
// store feature (`store.features`) that switches profile avatars to the `upload` endpoint + url-only `profile/update`
|
|
11
|
+
const AVATAR_UPLOAD_FEATURE = 'avatar-upload-endpoint';
|
|
9
12
|
export class SallaFileUpload {
|
|
10
13
|
/**
|
|
11
14
|
* Lazy load FilePond and all plugins
|
|
@@ -37,6 +40,12 @@ export class SallaFileUpload {
|
|
|
37
40
|
}
|
|
38
41
|
constructor() {
|
|
39
42
|
this.filePondLoaded = false;
|
|
43
|
+
/** true when the uploaded url must be saved on the profile as the avatar (avatar upload endpoint flag is on) */
|
|
44
|
+
this.savesAvatarOnUpload = false;
|
|
45
|
+
/** the profile image uses the default `profile/update` url (no custom `url` given) */
|
|
46
|
+
this.usesDefaultProfileUrl = false;
|
|
47
|
+
this.avatarSaveGeneration = 0; // bumped when the avatar is removed, so pending saves are dropped
|
|
48
|
+
this.avatarSaveQueue = Promise.resolve();
|
|
40
49
|
this.max_images_count = (count) => salla.lang.get('common.uploader.max_images_count', { count });
|
|
41
50
|
this.max_videos_count = (count) => salla.lang.get('common.uploader.max_videos_count', { count });
|
|
42
51
|
this.max_count_hint = (count) => salla.lang.get('common.uploader.max_count_hint', { count });
|
|
@@ -188,14 +197,19 @@ export class SallaFileUpload {
|
|
|
188
197
|
this.instantUpload = true;
|
|
189
198
|
}
|
|
190
199
|
if (!this.url && this.profileImage) {
|
|
200
|
+
// default: the file goes straight to `profile/update`. With the `avatar-upload-endpoint` store feature
|
|
201
|
+
// the url is switched to the `upload` endpoint once the store features are known (see componentDidLoad).
|
|
191
202
|
this.url = salla.url.api('profile/update');
|
|
192
203
|
this.instantUpload = true;
|
|
193
204
|
this.host.hasAttribute('name') || (this.name = 'avatar');
|
|
205
|
+
this.usesDefaultProfileUrl = true;
|
|
194
206
|
}
|
|
195
207
|
if (!this.name) {
|
|
196
208
|
this.name = 'file';
|
|
197
209
|
}
|
|
198
|
-
|
|
210
|
+
}
|
|
211
|
+
connectedCallback() {
|
|
212
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
199
213
|
this.host.querySelectorAll('.filepond--drop-label>label').forEach(label => label.innerHTML = this.getLabel());
|
|
200
214
|
if (this.filepond) {
|
|
201
215
|
this.filepond.labelFileTypeNotAllowed = salla.lang.get('common.uploader.invalid_type');
|
|
@@ -216,7 +230,7 @@ export class SallaFileUpload {
|
|
|
216
230
|
}
|
|
217
231
|
const setNestedAsync = (lang, key, value) => {
|
|
218
232
|
return new Promise((resolve) => {
|
|
219
|
-
|
|
233
|
+
setTranslationDefault(lang, key, value);
|
|
220
234
|
resolve(true);
|
|
221
235
|
});
|
|
222
236
|
};
|
|
@@ -548,6 +562,19 @@ export class SallaFileUpload {
|
|
|
548
562
|
notifyUploadError(error, file) {
|
|
549
563
|
salla.notify?.error?.(this.getUploadErrorMessageForFile(error, file));
|
|
550
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Save an already uploaded avatar url on the customer profile (text-only request).
|
|
567
|
+
*/
|
|
568
|
+
async saveProfileAvatar(url) {
|
|
569
|
+
try {
|
|
570
|
+
await salla.profile.update({ avatar: url });
|
|
571
|
+
return true;
|
|
572
|
+
}
|
|
573
|
+
catch (error) {
|
|
574
|
+
salla.notify?.error?.(error?.response?.data?.error?.message || salla.lang.get('common.errors.error_occurred'));
|
|
575
|
+
return false;
|
|
576
|
+
}
|
|
577
|
+
}
|
|
551
578
|
removeFailedFile(file) {
|
|
552
579
|
if (!this.filepond?.getFiles().some(pondFile => pondFile.id === file.id)) {
|
|
553
580
|
return;
|
|
@@ -880,6 +907,7 @@ export class SallaFileUpload {
|
|
|
880
907
|
}
|
|
881
908
|
}
|
|
882
909
|
disconnectedCallback() {
|
|
910
|
+
this.langUnsubscribe?.();
|
|
883
911
|
if (this.previewFilesSyncRaf != null) {
|
|
884
912
|
cancelAnimationFrame(this.previewFilesSyncRaf);
|
|
885
913
|
this.previewFilesSyncRaf = null;
|
|
@@ -887,16 +915,23 @@ export class SallaFileUpload {
|
|
|
887
915
|
this.revokeAllPreviewObjectUrls();
|
|
888
916
|
}
|
|
889
917
|
render() {
|
|
890
|
-
return (h(Host, { key: '
|
|
918
|
+
return (h(Host, { key: 'af7edd83879313df0a142890044c2bb02d5de73b', class: {
|
|
891
919
|
"s-file-upload": true,
|
|
892
920
|
"s-file-upload-profile-image": this.profileImage,
|
|
893
921
|
"s-file-upload-multiple": this.allowMultiple,
|
|
894
922
|
"s-file-upload-has-gallery": this.usesGalleryPreview(),
|
|
895
|
-
} }, h("input", { key: '
|
|
923
|
+
} }, h("input", { key: 'ea630bd56caac801e7f69f602d3553321cd81b17', type: "file", name: this.name, ref: ele => this.fileUploader = ele, required: this.required, class: "s-file-upload-wrapper s-file-upload-input", accept: this.accept }), this.allowMultiple && this.showMaxCountHint ? h("div", { class: "s-file-upload-hint s-hidden" }, this.max_count_hint(this.getTotalMaxFiles())) : '', h("input", { key: '884b42abe4b9cd832ab1d078af93c9cbe4164112', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.getHiddenInputValue(), ref: input => this.hiddenInput = input }), this.renderPreviewGallery()));
|
|
896
924
|
}
|
|
897
925
|
async componentDidLoad() {
|
|
898
926
|
await Salla.onReady();
|
|
899
927
|
await Salla.lang.onLoaded();
|
|
928
|
+
if (this.usesDefaultProfileUrl && Salla.config.get('store.features', []).includes(AVATAR_UPLOAD_FEATURE)) {
|
|
929
|
+
// Avatars are uploaded to the store `upload` endpoint first (`files[]` + `type`, images only),
|
|
930
|
+
// then saved on the profile as a plain URL, so `profile/update` never receives a file part.
|
|
931
|
+
this.url = salla.url.api('upload');
|
|
932
|
+
this.host.hasAttribute('accept') || (this.accept = 'image/png, image/jpeg, image/jpg'); // upload only allows jpg/png
|
|
933
|
+
this.savesAvatarOnUpload = true;
|
|
934
|
+
}
|
|
900
935
|
if (this.profileImage && !this.value) {
|
|
901
936
|
this.value = Salla.config.get('user.avatar');
|
|
902
937
|
}
|
|
@@ -992,6 +1027,9 @@ export class SallaFileUpload {
|
|
|
992
1027
|
}
|
|
993
1028
|
},
|
|
994
1029
|
onremovefile: (_error, file) => {
|
|
1030
|
+
if (this.savesAvatarOnUpload) {
|
|
1031
|
+
this.avatarSaveGeneration++;
|
|
1032
|
+
}
|
|
995
1033
|
if (this.usesGalleryPreview()) {
|
|
996
1034
|
if (file) {
|
|
997
1035
|
this.emitRemovedFile(file);
|
|
@@ -1048,6 +1086,26 @@ export class SallaFileUpload {
|
|
|
1048
1086
|
catch {
|
|
1049
1087
|
return null;
|
|
1050
1088
|
}
|
|
1089
|
+
if (this.savesAvatarOnUpload) {
|
|
1090
|
+
// `upload` answers with a list of urls
|
|
1091
|
+
const item = Array.isArray(responseData) ? responseData[0] : responseData;
|
|
1092
|
+
const avatarUrl = typeof item === 'object' && item !== null ? item.filePath || item.url : item;
|
|
1093
|
+
if (!this.isValidUploadResult(avatarUrl))
|
|
1094
|
+
return null;
|
|
1095
|
+
const generation = this.avatarSaveGeneration;
|
|
1096
|
+
// saves run one after the other so an older upload can never overwrite a newer one
|
|
1097
|
+
this.avatarSaveQueue = this.avatarSaveQueue.then(async () => {
|
|
1098
|
+
if (generation !== this.avatarSaveGeneration)
|
|
1099
|
+
return; // removed while waiting in the queue
|
|
1100
|
+
const saved = await this.saveProfileAvatar(avatarUrl);
|
|
1101
|
+
// expose the value and emit `uploaded` only once the profile holds this avatar (unless it was removed meanwhile)
|
|
1102
|
+
if (saved && generation === this.avatarSaveGeneration) {
|
|
1103
|
+
this.value = { id: this.generateUploadFileId(), url: avatarUrl };
|
|
1104
|
+
this.uploadedHandler();
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
return avatarUrl;
|
|
1108
|
+
}
|
|
1051
1109
|
if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
|
|
1052
1110
|
const item = responseData[0];
|
|
1053
1111
|
const fileUrl = typeof item === 'object' && item !== null ? item.filePath || item.url : item;
|
|
@@ -1090,7 +1148,13 @@ export class SallaFileUpload {
|
|
|
1090
1148
|
}
|
|
1091
1149
|
},
|
|
1092
1150
|
ondata: formData => {
|
|
1093
|
-
if (this.
|
|
1151
|
+
if (this.savesAvatarOnUpload) {
|
|
1152
|
+
const avatarFormData = new FormData();
|
|
1153
|
+
formData.forEach((value) => avatarFormData.append('files[]', value));
|
|
1154
|
+
avatarFormData.append('type', 'avatar');
|
|
1155
|
+
formData = avatarFormData; // continue below so `payloadParams` / `formData` are still applied
|
|
1156
|
+
}
|
|
1157
|
+
else if (this.allowMultiple) {
|
|
1094
1158
|
const newFormData = new FormData();
|
|
1095
1159
|
// ? This line suppose to send all files in one request but its not working properly
|
|
1096
1160
|
// const filesArray = this.filepond.getFiles().map(file => file.file);
|
|
@@ -10,9 +10,6 @@ export class SallaFilters {
|
|
|
10
10
|
this.isInitialFetch = true; //the base-category auto-append may only run on the first filters::fetched
|
|
11
11
|
this.filtersData = {};
|
|
12
12
|
salla.event.on('filters::hidden', () => this.host.style.display = 'none');
|
|
13
|
-
salla.lang.onLoaded(() => {
|
|
14
|
-
this.apply = salla.lang.get('pages.checkout.apply');
|
|
15
|
-
});
|
|
16
13
|
salla.event.on('filters::fetched', ({ filters }) => {
|
|
17
14
|
this.host.style.display = '';
|
|
18
15
|
let freshFilterData = {};
|
|
@@ -50,6 +47,14 @@ export class SallaFilters {
|
|
|
50
47
|
this.host.childNodes.forEach(async (widget) => widget.setWidgetHeight && await widget.setWidgetHeight());
|
|
51
48
|
});
|
|
52
49
|
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
52
|
+
this.apply = salla.lang.get('pages.checkout.apply');
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
disconnectedCallback() {
|
|
56
|
+
this.langUnsubscribe?.();
|
|
57
|
+
}
|
|
53
58
|
async componentWillLoad() {
|
|
54
59
|
try {
|
|
55
60
|
const searchParams = new URLSearchParams(window.location.search);
|
|
@@ -211,7 +216,7 @@ export class SallaFilters {
|
|
|
211
216
|
this.applyFilters();
|
|
212
217
|
}
|
|
213
218
|
render() {
|
|
214
|
-
return h(Host, { key: '
|
|
219
|
+
return h(Host, { key: '7e2df6367c28317e81c8904d545e79f39e80f132' }, this.filters?.map(option => h("salla-filters-widget", { option: option, filtersData: this.filtersData, onChanged: ({ detail: { event, option, value } }) => {
|
|
215
220
|
this.handleOptionChange(event, option, value);
|
|
216
221
|
} })));
|
|
217
222
|
}
|
|
@@ -250,7 +255,7 @@ export class SallaFilters {
|
|
|
250
255
|
"optional": true,
|
|
251
256
|
"docs": {
|
|
252
257
|
"tags": [],
|
|
253
|
-
"text": "Array of filter options"
|
|
258
|
+
"text": "Array of filter options to display. Each filter contains key, label, type, and values for filtering products."
|
|
254
259
|
},
|
|
255
260
|
"getter": false,
|
|
256
261
|
"setter": false
|
|
@@ -24,11 +24,14 @@ export class SallaFiltersWidget {
|
|
|
24
24
|
salla.onReady(() => {
|
|
25
25
|
this.page = salla.config.get('page');
|
|
26
26
|
});
|
|
27
|
-
salla.lang.
|
|
27
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
28
28
|
this.showMoreLabel = salla.lang.getWithDefault('common.titles.more', this.showMoreLabel);
|
|
29
29
|
this.showLessLabel = salla.lang.getWithDefault('common.elements.show_less', this.showLessLabel);
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
+
disconnectedCallback() {
|
|
33
|
+
this.langUnsubscribe?.();
|
|
34
|
+
}
|
|
32
35
|
componentDidLoad() {
|
|
33
36
|
// Use fixed height per item for predictable calculations
|
|
34
37
|
// Each item is approximately 20px, so we calculate based on item count
|
|
@@ -170,12 +173,12 @@ export class SallaFiltersWidget {
|
|
|
170
173
|
return h("span", { class: "s-filters-option-name" }, label);
|
|
171
174
|
}
|
|
172
175
|
render() {
|
|
173
|
-
return (h(Host, { key: '
|
|
176
|
+
return (h(Host, { key: '1e0a234fe279cd77dbdb957d1e9852d1f59b39f4', class: "s-filters-widget-container" }, h("h3", { key: 'b2b16a758d5e3c9fc97d2bfab8aee9e98cb3eae7', class: "s-filters-widget-title", onClick: () => this.toggleWidget() }, h("span", { key: 'af2738f683dc3455adc99d6e271ed7c5217c9626' }, this.option.label), h("span", { key: '6dd325fe1977e7e1cc3e72de495bcef51a4978b4', class: `s-filters-widget-plusminus ${this.isOpen ? 's-filters-widget-plusminus-active' : ''}` })), h("div", { key: '87f90e444bc15193c631a6223b45b5d5d82b512c', class: "s-filters-widget-content", ref: (el) => this.widgetContent = el }, Array.isArray(this.option.values) && this.option.values.length > 5 && (h("div", { key: 'bde65a20317127d415c66c06e6bc1d060f959751', class: "s-filters-widget-search-wrapper", style: { padding: '8px 0', marginBottom: '8px' } }, h("input", { key: '3c06b2b5158b59652a8f91649e18922111ba8f55', type: "text", class: "s-filters-widget-search-input", placeholder: salla.lang.get('blocks.header.search_placeholder') || 'بحث...', value: this.searchQuery, onInput: (e) => this.searchQuery = e.target.value }))), h("div", { key: 'b38f4c7033259152e950d3c86ee17aeea1fcfcb8', class: "s-filters-widget-values", ref: (el) => this.widgetValues = el }, h("slot", { key: '58a69066c1fd57b3f2d034d883b3c20c14df6154' }), this.option.type !== FilterOptionTypes.RANGE
|
|
174
177
|
? this.renderFilterOption(this.option)
|
|
175
178
|
: h("salla-price-range", { onChanged: (event) => {
|
|
176
179
|
this.changed.emit(event.detail);
|
|
177
180
|
}, ref: price => this.priceRange = price, filtersData: this.filtersData, option: this.option })), this.withLoadMore && (!this.searchQuery || this.filteredCount > this.initialItemCount) &&
|
|
178
|
-
h("a", { key: '
|
|
181
|
+
h("a", { key: '5124f0e1f14cdec0af61106161b769d67dc8f82f', class: "s-filters-widget-more", onClick: () => this.showMore() }, !this.isShowMore ? this.showMoreLabel : this.showLessLabel))));
|
|
179
182
|
}
|
|
180
183
|
static get is() { return "salla-filters-widget"; }
|
|
181
184
|
static get originalStyleUrls() {
|
|
@@ -104,7 +104,12 @@ export class SallaGifting {
|
|
|
104
104
|
};
|
|
105
105
|
this.handleCountryDropdownClosed = () => { };
|
|
106
106
|
this.handleRegionDropdownClosed = () => { };
|
|
107
|
-
salla.
|
|
107
|
+
salla.event.on(this.defaultEvent, () => {
|
|
108
|
+
this.open();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
connectedCallback() {
|
|
112
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
108
113
|
this.selectImageOrUpload = salla.lang.get('blocks.buy_as_gift.select_image_or_upload');
|
|
109
114
|
this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
|
|
110
115
|
this.sectionTitle = salla.lang.get('blocks.buy_as_gift.gift_the_one_you_love');
|
|
@@ -138,9 +143,9 @@ export class SallaGifting {
|
|
|
138
143
|
this.donationRequired = salla.lang.get('pages.products.donation_amount_required');
|
|
139
144
|
this.currentLang = salla.lang.locale;
|
|
140
145
|
});
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
}
|
|
147
|
+
disconnectedCallback() {
|
|
148
|
+
this.langUnsubscribe?.();
|
|
144
149
|
}
|
|
145
150
|
isPhysical() {
|
|
146
151
|
return this.physicalProducts || this.physical;
|
|
@@ -852,7 +857,7 @@ export class SallaGifting {
|
|
|
852
857
|
}
|
|
853
858
|
render() {
|
|
854
859
|
return [
|
|
855
|
-
h("div", { key: '
|
|
860
|
+
h("div", { key: '2b599846ae0abb92b699be0a3dbee0d3d5f3638a' }, h("salla-list-tile", { key: '1f08c01b96dab20e82a3260e23836d56f5bcf630', class: this.generateClass() }, h("div", { key: '1f4d04b7112be42587fc35a9fa6c322321a92482', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '8ce56efcb34d19433babde1f191e4301f4c2c8d0' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '6f035a3ee40a77a554492bde74bc834caa2e9a9a', slot: "subtitle" }, h("div", { key: '1e454d9ae0b95fd5b4ee05401f3edf0161338d43' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: '98df402ea7ddda379fe10897453e61acf3166559', slot: "action" }, h("salla-button", { key: '7d7c49e3d0749cf8ed86ce17709f718fece6349c', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '6411376640ba3de3d36277981e04253fdcaaf135', name: "widget-btn-content" }, h("div", { key: '8fef0671cfa1335d6a5ab028c2fc0e978eaa11e2', class: "s-gifting-widget-action-content" }, h("span", { key: '820674db5e37dd1f3e1c3f7708bff7396955960a', innerHTML: GiftSharing }), " \u00A0", h("span", { key: 'ef3ee899f2231863f984ca13708382e273e38e0a' }, this.sectionBtnText)))))), h("salla-modal", { key: '0728b976c0f20f3713c9363e1c06b9da528da9ca', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '924fad1dbb5cb1ff039328bed201c07608b5e95d', slot: "loading" }, h("div", { key: '35907d0949afb5ed389fc2ee147ef73f388dc962', class: "s-gifting-skeleton" }, h("div", { key: 'c2252de89f09c4bfc1e2691b6da246408cd98003', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '1440fcf0b2dc5c3dd1d209604636bca1d68b2fd2', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '80527a48ec97624873100e91806d206194f4666c', class: "s-gifting-modal-title" }, h("div", { key: '095732ce0ca81c125ff7664e215c4a286bba4cd6', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9e385f2e21fa305782d7c7d40df31498dfab856d', height: '15px', width: '150px' })))), h("div", { key: 'e530926826192430f094cd227a11bb9c6aee38f7', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '35a5d4bd57461b5edf69c19f27a85da2131b0545', height: '10px', width: '150px' }), h("salla-skeleton", { key: '747893f9ab1cc35d7fccb62dbd64e7a3a57b4a98', height: '230px' }), h("salla-skeleton", { key: '80ddf6036a735901a1295c3abd5e208c0cc92ca7', height: '10px', width: '150px' }), h("salla-skeleton", { key: '98720c569e326a5d2d04a37839d2064688f00a47', height: '30px' }), h("salla-skeleton", { key: '65f9deca24700906e43d34612b01ed95c86fae00', height: '40px' })))), h("slot", { key: '82e3b8afc2a736bdee08ef906a1824fc4a16ce5a', name: "header" }), !!this.hasError ?
|
|
856
861
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
857
862
|
:
|
|
858
863
|
[
|
|
@@ -875,7 +880,7 @@ export class SallaGifting {
|
|
|
875
880
|
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
|
|
876
881
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
|
|
877
882
|
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: LeftArrow, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
878
|
-
], h("slot", { key: '
|
|
883
|
+
], h("slot", { key: '1d08c0a88ae9d95dd4c740d42451ddab1fffcfdc', name: "footer" })))
|
|
879
884
|
];
|
|
880
885
|
}
|
|
881
886
|
static get is() { return "salla-gifting"; }
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { Host, h } from "@stencil/core";
|
|
5
|
+
/**
|
|
6
|
+
* The `salla-hook` component serves as a placeholder for dynamic content injection.
|
|
7
|
+
* Used by the Salla hooks system to mount elements at specific locations.
|
|
8
|
+
*/
|
|
5
9
|
export class SallaHook {
|
|
6
10
|
/**
|
|
7
11
|
* Mounts a given HTML element into the hook position.
|
|
@@ -11,7 +15,7 @@ export class SallaHook {
|
|
|
11
15
|
this.host.before(element);
|
|
12
16
|
}
|
|
13
17
|
render() {
|
|
14
|
-
return h(Host, { key: '
|
|
18
|
+
return h(Host, { key: '7784823f34808c715180741263cf7e7edf9c9d5f' });
|
|
15
19
|
}
|
|
16
20
|
async componentDidLoad() {
|
|
17
21
|
// Register this component for hooks system, already on it logic to run componentDidLoad trigger
|
|
@@ -34,12 +34,17 @@ export class SallaInfiniteScroll {
|
|
|
34
34
|
<span class="s-button-loader s-button-loader-center s-infinite-scroll-btn-loader" style="display: none"></span>
|
|
35
35
|
</a>`;
|
|
36
36
|
this.btnLoader = this.status.querySelector('.s-button-loader');
|
|
37
|
-
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
38
40
|
this.status.querySelector('.s-button-text').innerHTML = this.loadMoreText ? this.loadMoreText : salla.lang.get('common.elements.load_more');
|
|
39
41
|
this.status.querySelector('.s-infinite-scroll-last').innerHTML = salla.lang.get('common.elements.end_of_content');
|
|
40
42
|
this.status.querySelector('.s-infinite-scroll-error').innerHTML = salla.lang.get('common.elements.failed_to_load_more');
|
|
41
43
|
});
|
|
42
44
|
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
this.langUnsubscribe?.();
|
|
47
|
+
}
|
|
43
48
|
loading(isLoading = true) {
|
|
44
49
|
let btnText = this.status.querySelector('.s-button-text');
|
|
45
50
|
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 { h } from "@stencil/core";
|
|
4
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
5
5
|
/**
|
|
6
6
|
* @slot header - The top of the modal.
|
|
7
7
|
* @slot footer - Replaces the bottom button.
|
|
@@ -87,6 +87,7 @@ export class SallaLocalizationModal {
|
|
|
87
87
|
};
|
|
88
88
|
//here we will used the currency code instead of the symbol when current language is not arabic
|
|
89
89
|
this.arabicCurrencies = ["SAR", "AED", "KWD", "BHD", "QAR", "OMR", "EGP", "IQD", "LBP", "SYP", "TND", "DZD", "MAD", "YER"];
|
|
90
|
+
this.translationLoaded = false;
|
|
90
91
|
this.languages = [];
|
|
91
92
|
this.currencies = [];
|
|
92
93
|
this.hasError = false;
|
|
@@ -106,6 +107,17 @@ export class SallaLocalizationModal {
|
|
|
106
107
|
this.languageSlot = this.host.querySelector('[slot="language"]')?.innerHTML || '<label class="s-localization-modal-label" for="lang-{code}"><span>{name}</span></label>';
|
|
107
108
|
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>';
|
|
108
109
|
}
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
// re-render whenever translations (re)load, so the labels read via salla.lang.get() stay current
|
|
112
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
113
|
+
this.translationLoaded = true;
|
|
114
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
115
|
+
forceUpdate(this);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
disconnectedCallback() {
|
|
119
|
+
this.langUnsubscribe?.();
|
|
120
|
+
}
|
|
109
121
|
async componentWillLoad() {
|
|
110
122
|
await Salla.onReady();
|
|
111
123
|
await Salla.lang.onLoaded();
|
|
@@ -244,7 +256,7 @@ export class SallaLocalizationModal {
|
|
|
244
256
|
this.showTrigger
|
|
245
257
|
? 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() }))
|
|
246
258
|
: '',
|
|
247
|
-
h("salla-modal", { key: '
|
|
259
|
+
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 ?
|
|
248
260
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "description" }, this.errorMessage)) :
|
|
249
261
|
h("div", { class: "s-localization-modal-inner" }, this.languages.length > 1 ?
|
|
250
262
|
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 ?
|
|
@@ -346,6 +358,7 @@ export class SallaLocalizationModal {
|
|
|
346
358
|
}
|
|
347
359
|
static get states() {
|
|
348
360
|
return {
|
|
361
|
+
"translationLoaded": {},
|
|
349
362
|
"languages": {},
|
|
350
363
|
"currencies": {},
|
|
351
364
|
"hasError": {},
|