@salla.sa/twilight-components 2.14.595 → 2.14.597
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-BmX7bEQk.js → filepond-Dw1N5qBB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Cs6e85Vn.js → filepond-plugin-file-poster-C1ipzdpz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-CSk66JAo.js → filepond-plugin-file-validate-size-DbTJ1H8k.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Piu3p2Um.js → filepond-plugin-file-validate-type-CDOD2WKz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Ba9FBal4.js → filepond-plugin-image-edit-CP7JkpKx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-zwtgHyrT.js → filepond-plugin-image-exif-orientation-Bm5i6zMO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BmGjui8n.js → filepond-plugin-image-preview-INllb63L.js} +1 -1
- package/dist/cjs/{index-DkrDtx6i.js → index-DIEWuq3M.js} +2 -2
- package/dist/cjs/{intlTelInput-Bty1-N7J.js → intlTelInput-bnpl10H7.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -18
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -15
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +26 -20
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +7 -2
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +79 -40
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +12 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +67 -25
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +10 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +17 -12
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +7 -4
- package/dist/cjs/salla-filters.cjs.entry.js +10 -5
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +12 -7
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +7 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +14 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +12 -5
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +39 -15
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +7 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +14 -7
- package/dist/cjs/salla-offer.cjs.entry.js +14 -9
- package/dist/cjs/salla-order-branch.cjs.entry.js +42 -4
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +7 -4
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +10 -6
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +10 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +7 -4
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +14 -9
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +9 -4
- package/dist/cjs/salla-products-list.cjs.entry.js +5 -4
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +7 -2
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +9 -3
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +9 -2
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +8 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +7 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +8 -4
- package/dist/cjs/salla-user-menu.cjs.entry.js +7 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +7 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +8 -3
- package/dist/cjs/salla-verify.cjs.entry.js +13 -6
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/translate-Cvomt6Jh.js +58 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DgPfWupN.js → vanilla-picker-BaSDLxjI.js} +1 -1
- package/dist/collection/Helpers/translate.js +36 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -2
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +10 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +23 -17
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +2 -0
- package/dist/collection/components/salla-button/salla-button.js +19 -27
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +10 -3
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +10 -5
- package/dist/collection/components/salla-comments/salla-comment-item.js +8 -2
- package/dist/collection/components/salla-comments/salla-comments.js +32 -5
- package/dist/collection/components/salla-contacts/salla-contacts.js +9 -2
- package/dist/collection/components/salla-count-down/salla-count-down.js +23 -18
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +4 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.css +3 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +36 -7
- package/dist/collection/components/salla-filters/salla-filters.js +10 -5
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +6 -3
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -6
- package/dist/collection/components/salla-hook/salla-hook.js +5 -1
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +15 -2
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -5
- package/dist/collection/components/salla-map/salla-map.js +12 -7
- package/dist/collection/components/salla-notifications/salla-notifications.js +6 -1
- package/dist/collection/components/salla-offer/salla-offer.js +12 -7
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +13 -6
- package/dist/collection/components/salla-order-branch/salla-order-branch.css +35 -0
- package/dist/collection/components/salla-order-branch/salla-order-branch.js +40 -2
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +6 -3
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +1 -1
- package/dist/collection/components/salla-orders/salla-orders.js +9 -5
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +10 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +6 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +16 -7
- package/dist/collection/components/salla-product-card/salla-product-card.js +22 -17
- package/dist/collection/components/salla-product-options/salla-product-options.js +9 -6
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +8 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -4
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +6 -1
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +6 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +8 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +16 -16
- package/dist/collection/components/salla-review-card/salla-review-card.js +5 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +6 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +9 -2
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +10 -10
- package/dist/collection/components/salla-slider/salla-slider.js +6 -3
- package/dist/collection/components/salla-social/salla-social.js +7 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +24 -19
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +6 -1
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +7 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +6 -0
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +6 -2
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +7 -2
- package/dist/collection/components/salla-verify/salla-verify.js +13 -6
- package/dist/components/index.js +2 -2
- package/dist/components/salla-add-product-button2.js +7 -2
- package/dist/components/salla-alert.js +2 -2
- package/dist/components/salla-apps-icons.js +6 -1
- package/dist/components/salla-booking-field2.js +10 -4
- package/dist/components/salla-bottom-alert.js +23 -17
- package/dist/components/salla-bullet-delivery.js +1 -1
- package/dist/components/salla-button2.js +9 -17
- package/dist/components/salla-cart-item-offers.js +10 -3
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-comment-form2.js +10 -5
- package/dist/components/salla-comment-item2.js +8 -2
- package/dist/components/salla-comments.js +32 -5
- package/dist/components/salla-contacts.js +9 -2
- package/dist/components/salla-count-down2.js +16 -11
- package/dist/components/salla-file-upload2.js +37 -8
- package/dist/components/salla-filters-widget2.js +6 -3
- package/dist/components/salla-filters.js +9 -4
- package/dist/components/salla-gifting.js +11 -6
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-infinite-scroll.js +6 -1
- package/dist/components/salla-localization-modal.js +15 -2
- package/dist/components/salla-loyalty.js +12 -5
- package/dist/components/salla-map2.js +12 -7
- package/dist/components/salla-notifications.js +6 -1
- package/dist/components/salla-offer-modal.js +13 -6
- package/dist/components/salla-offer.js +12 -7
- package/dist/components/salla-order-branch.js +41 -3
- package/dist/components/salla-order-summary.js +6 -3
- package/dist/components/salla-order-totals-card.js +1 -1
- package/dist/components/salla-orders.js +9 -5
- package/dist/components/salla-placeholder2.js +10 -3
- package/dist/components/salla-price-range2.js +6 -3
- package/dist/components/salla-product-availability2.js +16 -7
- package/dist/components/salla-product-card2.js +13 -8
- package/dist/components/salla-product-options2.js +9 -6
- package/dist/components/salla-product-size-guide.js +8 -3
- package/dist/components/salla-products-list2.js +4 -3
- package/dist/components/salla-progress-bar2.js +20 -4
- package/dist/components/salla-quick-buy2.js +6 -1
- package/dist/components/salla-quick-order.js +6 -1
- package/dist/components/salla-rating-modal2.js +8 -2
- package/dist/components/salla-rating-stars2.js +10 -10
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews.js +6 -1
- package/dist/components/salla-scopes.js +9 -2
- package/dist/components/salla-skeleton2.js +7 -7
- package/dist/components/salla-slider2.js +6 -3
- package/dist/components/salla-social.js +7 -2
- package/dist/components/salla-tab-header2.js +3 -3
- package/dist/components/salla-tel-input2.js +24 -19
- package/dist/components/salla-tiered-offer.js +6 -1
- package/dist/components/salla-trust-badges.js +7 -3
- package/dist/components/salla-user-menu.js +6 -0
- package/dist/components/salla-user-profile.js +6 -2
- package/dist/components/salla-user-settings.js +7 -2
- package/dist/components/salla-verify.js +13 -6
- package/dist/components/translate.js +37 -1
- package/dist/docs.json +44 -44
- package/dist/esm/{filepond-DF26o67L.js → filepond-DfLkIBAw.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-B4epzDDH.js → filepond-plugin-file-poster-D3ie06bz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-DILJc03j.js → filepond-plugin-file-validate-size-C_S_eFQe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Bic7dGts.js → filepond-plugin-file-validate-type-BE7nqQRE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DHfCLKK0.js → filepond-plugin-image-edit-C6jDcMnX.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-C7y59Hrn.js → filepond-plugin-image-exif-orientation-nKXdF-ae.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-C-ZqWLeC.js → filepond-plugin-image-preview-Dzl44GI1.js} +1 -1
- package/dist/esm/{index-HRJpfiBN.js → index-BmRQjBRH.js} +2 -2
- package/dist/esm/{intlTelInput-DOVRUqFb.js → intlTelInput-dGrU4Iu9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +10 -18
- package/dist/esm/salla-add-product-button_5.entry.js +37 -15
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +26 -20
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +7 -2
- package/dist/esm/salla-attachment-view_9.entry.js +79 -40
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +2 -2
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +12 -5
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +67 -25
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +10 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +17 -12
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +7 -4
- package/dist/esm/salla-filters.entry.js +10 -5
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +12 -7
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-infinite-scroll.entry.js +7 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +14 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +12 -5
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +39 -15
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +7 -2
- package/dist/esm/salla-offer-modal.entry.js +14 -7
- package/dist/esm/salla-offer.entry.js +14 -9
- package/dist/esm/salla-order-branch.entry.js +42 -4
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +7 -4
- package/dist/esm/salla-order-totals-card.entry.js +2 -2
- package/dist/esm/salla-orders.entry.js +10 -6
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +10 -3
- package/dist/esm/salla-price-range.entry.js +7 -4
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +14 -9
- package/dist/esm/salla-product-size-guide.entry.js +9 -4
- package/dist/esm/salla-products-list.entry.js +5 -4
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +7 -2
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +9 -3
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +9 -2
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +8 -8
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +8 -3
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +7 -2
- package/dist/esm/salla-trust-badges.entry.js +8 -4
- package/dist/esm/salla-user-menu.entry.js +7 -1
- package/dist/esm/salla-user-profile.entry.js +7 -3
- package/dist/esm/salla-user-settings.entry.js +8 -3
- package/dist/esm/salla-verify.entry.js +13 -6
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/translate-CxrJQ3Jf.js +54 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DQKehCLa.js → vanilla-picker-DRghK0RD.js} +1 -1
- package/dist/twilight/p-00e1f5fd.entry.js +4 -0
- package/dist/twilight/{p-078e5ef8.entry.js → p-12338d19.entry.js} +1 -1
- package/dist/twilight/p-1557d0ca.entry.js +4 -0
- package/dist/twilight/{p-ef09a761.entry.js → p-15ab81d6.entry.js} +1 -1
- package/dist/twilight/p-182d7bab.entry.js +4 -0
- package/dist/twilight/p-1908ab44.entry.js +4 -0
- package/dist/twilight/p-19592be3.entry.js +4 -0
- package/dist/twilight/{p-75ed7d4e.entry.js → p-1a8c7481.entry.js} +1 -1
- package/dist/twilight/p-1c8bf883.entry.js +4 -0
- package/dist/twilight/{p-119aa7c1.entry.js → p-1c8dde1a.entry.js} +1 -1
- package/dist/twilight/p-1f2844db.entry.js +4 -0
- package/dist/twilight/{p-b66c664b.entry.js → p-2cf7eb3b.entry.js} +1 -1
- package/dist/twilight/p-2de4c351.entry.js +4 -0
- package/dist/twilight/{p-7f38cf0c.entry.js → p-2de666d8.entry.js} +1 -1
- package/dist/twilight/p-33e769b3.entry.js +4 -0
- package/dist/twilight/{p-84c56f4d.entry.js → p-3745be6d.entry.js} +1 -1
- package/dist/twilight/p-39a16468.entry.js +4 -0
- package/dist/twilight/{p-76f49fd8.entry.js → p-3a996401.entry.js} +1 -1
- package/dist/twilight/{p-6feb378a.entry.js → p-3bf933f6.entry.js} +1 -1
- package/dist/twilight/p-3d1842e4.entry.js +4 -0
- package/dist/twilight/p-3f373f1e.entry.js +4 -0
- package/dist/twilight/{p-8f0b6a64.entry.js → p-3f66f717.entry.js} +1 -1
- package/dist/twilight/p-3fdaf198.entry.js +4 -0
- package/dist/twilight/p-41248f5f.entry.js +4 -0
- package/dist/twilight/{p-c919171b.entry.js → p-4235b3c2.entry.js} +1 -1
- package/dist/twilight/{p-3c0be6b1.entry.js → p-4aa07eca.entry.js} +1 -1
- package/dist/twilight/{p-4e74c79f.entry.js → p-4b111d7a.entry.js} +1 -1
- package/dist/twilight/{p-2c13b5e8.entry.js → p-51694dd2.entry.js} +1 -1
- package/dist/twilight/{p-c8d4b211.entry.js → p-55b5158c.entry.js} +1 -1
- package/dist/twilight/{p-9a4a84b8.entry.js → p-5617656f.entry.js} +1 -1
- package/dist/twilight/{p-25ea21a6.entry.js → p-58dcc966.entry.js} +1 -1
- package/dist/twilight/p-5f35b46a.entry.js +4 -0
- package/dist/twilight/{p-a3009d00.entry.js → p-60e1fb1a.entry.js} +1 -1
- package/dist/twilight/{p-5134faef.entry.js → p-61956814.entry.js} +1 -1
- package/dist/twilight/p-6854e982.entry.js +4 -0
- package/dist/twilight/{p-1a684490.entry.js → p-68919916.entry.js} +1 -1
- package/dist/twilight/p-6b0d6b9b.entry.js +4 -0
- package/dist/twilight/p-71cbf7a4.entry.js +4 -0
- package/dist/twilight/{p-313dbe67.entry.js → p-730101ff.entry.js} +1 -1
- package/dist/twilight/p-737b93c2.entry.js +4 -0
- package/dist/twilight/p-74ccf675.entry.js +4 -0
- package/dist/twilight/{p-83edd1a1.entry.js → p-7aa15258.entry.js} +1 -1
- package/dist/twilight/{p-5b617110.entry.js → p-7c7648d7.entry.js} +1 -1
- package/dist/twilight/p-7dfe99e6.entry.js +4 -0
- package/dist/twilight/{p-07e1822a.entry.js → p-7e724019.entry.js} +1 -1
- package/dist/twilight/p-8248cecd.entry.js +4 -0
- package/dist/twilight/p-844ebeb6.entry.js +4 -0
- package/dist/twilight/{p-2413d450.entry.js → p-87cedb04.entry.js} +1 -1
- package/dist/twilight/p-8b21158b.entry.js +4 -0
- package/dist/twilight/{p-1b0da3b9.entry.js → p-8c10cb85.entry.js} +1 -1
- package/dist/twilight/p-8e2488fe.entry.js +4 -0
- package/dist/twilight/{p-33a64882.entry.js → p-9108e712.entry.js} +1 -1
- package/dist/twilight/p-91326a74.entry.js +4 -0
- package/dist/twilight/{p-100260a2.entry.js → p-96f9eb1f.entry.js} +1 -1
- package/dist/twilight/p-99463d58.entry.js +4 -0
- package/dist/twilight/p-9e196eb0.entry.js +4 -0
- package/dist/twilight/{p-BFMu9w68.js → p-B4fbRnFh.js} +1 -1
- package/dist/twilight/{p-BGUXYEQf.js → p-BIToxPOg.js} +1 -1
- package/dist/twilight/{p-HRJpfiBN.js → p-BmRQjBRH.js} +1 -1
- package/dist/twilight/{p-CliIfO7G.js → p-C1XjCBHg.js} +1 -1
- package/dist/twilight/{p-BdaR2plD.js → p-C48Rktr4.js} +1 -1
- package/dist/twilight/{p-O5jKs1Zb.js → p-CWismw4I.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-DlxVucku.js → p-DYEGhE1O.js} +1 -1
- package/dist/twilight/{p-CSRWBUvd.js → p-DnZfyhH5.js} +1 -1
- package/dist/twilight/{p-BCFB-lfz.js → p-OCGvfvVA.js} +1 -1
- package/dist/twilight/{p-9a723216.entry.js → p-a80acba3.entry.js} +1 -1
- package/dist/twilight/{p-61c8e3c6.entry.js → p-ab1d320f.entry.js} +1 -1
- package/dist/twilight/{p-5f0eca54.entry.js → p-ac7d45b6.entry.js} +1 -1
- package/dist/twilight/{p-fe72290f.entry.js → p-aeafb519.entry.js} +1 -1
- package/dist/twilight/p-b5499627.entry.js +4 -0
- package/dist/twilight/{p-f5e46494.entry.js → p-b5829615.entry.js} +1 -1
- package/dist/twilight/p-b6c5435e.entry.js +4 -0
- package/dist/twilight/{p-02d79968.entry.js → p-baaa3e72.entry.js} +1 -1
- package/dist/twilight/{p-7f58cf36.entry.js → p-bfdde3db.entry.js} +1 -1
- package/dist/twilight/p-c22ea75b.entry.js +4 -0
- package/dist/twilight/{p-768f5c26.entry.js → p-c3d33aee.entry.js} +1 -1
- package/dist/twilight/{p-943f3e5a.entry.js → p-c5d4f71c.entry.js} +1 -1
- package/dist/twilight/{p-ee8d13fd.entry.js → p-cc46f297.entry.js} +1 -1
- package/dist/twilight/p-cca10a34.entry.js +4 -0
- package/dist/twilight/p-cdbb6758.entry.js +4 -0
- package/dist/twilight/{p-96560ca2.entry.js → p-cf1cc0d1.entry.js} +1 -1
- package/dist/twilight/{p-73b8ed51.entry.js → p-d034a3ba.entry.js} +1 -1
- package/dist/twilight/{p-155f1fed.entry.js → p-d307d40a.entry.js} +1 -1
- package/dist/twilight/p-d37e6c2f.entry.js +4 -0
- package/dist/twilight/{p-eb6f86fb.entry.js → p-d3be7885.entry.js} +1 -1
- package/dist/twilight/{p-87d34b7c.entry.js → p-d542e647.entry.js} +1 -1
- package/dist/twilight/{p-c3afee2f.entry.js → p-db9994c2.entry.js} +1 -1
- package/dist/twilight/p-dd4bcce0.entry.js +4 -0
- package/dist/twilight/{p-c89d7291.entry.js → p-de3c5f91.entry.js} +1 -1
- package/dist/twilight/{p-df8c51c2.entry.js → p-e2d1d888.entry.js} +1 -1
- package/dist/twilight/{p-0e430b25.entry.js → p-e6bc3cf4.entry.js} +1 -1
- package/dist/twilight/{p-e4d76bce.entry.js → p-e8d94147.entry.js} +1 -1
- package/dist/twilight/{p-4e0dcb5c.entry.js → p-e9319448.entry.js} +1 -1
- package/dist/twilight/{p-ee23fbba.entry.js → p-ec1589cf.entry.js} +1 -1
- package/dist/twilight/{p-d8181149.entry.js → p-ece1fecd.entry.js} +1 -1
- package/dist/twilight/{p-231d4bf2.entry.js → p-f0180034.entry.js} +1 -1
- package/dist/twilight/{p-49e2f73d.entry.js → p-f348601d.entry.js} +1 -1
- package/dist/twilight/{p-6e8cb8fb.entry.js → p-f5afeed8.entry.js} +1 -1
- package/dist/twilight/p-f70fa2e9.entry.js +4 -0
- package/dist/twilight/{p-a2cbbc56.entry.js → p-f76349b3.entry.js} +1 -1
- package/dist/twilight/{p-49d6d82e.entry.js → p-fa600113.entry.js} +1 -1
- package/dist/twilight/p-fde4cf31.entry.js +4 -0
- package/dist/twilight/{p-14b78c6e.entry.js → p-fe3645b0.entry.js} +1 -1
- package/dist/twilight/{p-4cee6b43.entry.js → p-feb068a2.entry.js} +1 -1
- package/dist/twilight/{p-D1oXS6KY.js → p-imI5he7m.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/translate.d.ts +17 -0
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -1
- package/dist/types/components/salla-alert/salla-alert.d.ts +3 -3
- package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +3 -0
- package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +3 -0
- package/dist/types/components/salla-bottom-alert/salla-bottom-alert.d.ts +3 -1
- package/dist/types/components/salla-button/salla-button.d.ts +10 -18
- package/dist/types/components/salla-cart-item-offers/salla-cart-item-offers.d.ts +3 -0
- package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +2 -2
- package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
- package/dist/types/components/salla-comments/salla-comments.d.ts +6 -0
- package/dist/types/components/salla-contacts/salla-contacts.d.ts +4 -0
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +17 -14
- package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +4 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +3 -0
- package/dist/types/components/salla-filters/salla-filters.d.ts +4 -1
- package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +2 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +3 -0
- package/dist/types/components/salla-hook/salla-hook.d.ts +4 -0
- package/dist/types/components/salla-infinite-scroll/salla-infinite-scroll.d.ts +3 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +4 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
- package/dist/types/components/salla-map/salla-map.d.ts +3 -0
- package/dist/types/components/salla-notifications/salla-notifications.d.ts +3 -1
- package/dist/types/components/salla-offer/salla-offer.d.ts +3 -0
- package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -0
- package/dist/types/components/salla-order-branch/interfaces.d.ts +1 -0
- package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +10 -1
- package/dist/types/components/salla-order-summary/salla-order-summary.d.ts +2 -0
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +1 -0
- package/dist/types/components/salla-orders/salla-orders.d.ts +3 -1
- package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -1
- package/dist/types/components/salla-price-range/salla-price-range.d.ts +2 -0
- package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +4 -0
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +12 -9
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
- package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +3 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
- package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +5 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +3 -1
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +3 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -0
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +14 -14
- package/dist/types/components/salla-review-card/salla-review-card.d.ts +4 -0
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +3 -0
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +3 -0
- package/dist/types/components/salla-skeleton/salla-skeleton.d.ts +6 -6
- package/dist/types/components/salla-slider/salla-slider.d.ts +2 -0
- package/dist/types/components/salla-social/salla-social.d.ts +3 -0
- package/dist/types/components/salla-tabs/salla-tab-header.d.ts +2 -2
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -1
- package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +3 -1
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +3 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +3 -0
- package/dist/types/components/salla-user-profile/salla-user-profile.d.ts +3 -1
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +3 -0
- package/dist/types/components/salla-verify/salla-verify.d.ts +3 -0
- package/dist/types/components.d.ts +128 -80
- package/package.json +5 -5
- package/dist/cjs/translate-BeU1QX_r.js +0 -20
- package/dist/esm/translate-CrSV-tno.js +0 -18
- package/dist/twilight/p-117c8823.entry.js +0 -4
- package/dist/twilight/p-16b45c19.entry.js +0 -4
- package/dist/twilight/p-20d5665b.entry.js +0 -4
- package/dist/twilight/p-235f40b0.entry.js +0 -4
- package/dist/twilight/p-2f96a72f.entry.js +0 -4
- package/dist/twilight/p-312d231b.entry.js +0 -4
- package/dist/twilight/p-334fc442.entry.js +0 -4
- package/dist/twilight/p-3e232b09.entry.js +0 -4
- package/dist/twilight/p-3f376a9d.entry.js +0 -4
- package/dist/twilight/p-46ad2b0e.entry.js +0 -4
- package/dist/twilight/p-4e3a3c55.entry.js +0 -4
- package/dist/twilight/p-4f9da81b.entry.js +0 -4
- package/dist/twilight/p-5bc3f956.entry.js +0 -4
- package/dist/twilight/p-5fae444a.entry.js +0 -4
- package/dist/twilight/p-70c45a90.entry.js +0 -4
- package/dist/twilight/p-761e273c.entry.js +0 -4
- package/dist/twilight/p-7960e489.entry.js +0 -4
- package/dist/twilight/p-845e4790.entry.js +0 -4
- package/dist/twilight/p-8688c21f.entry.js +0 -4
- package/dist/twilight/p-8be3fa1c.entry.js +0 -4
- package/dist/twilight/p-8dc7ae26.entry.js +0 -4
- package/dist/twilight/p-8e0a33dd.entry.js +0 -4
- package/dist/twilight/p-8eabd62f.entry.js +0 -4
- package/dist/twilight/p-8fc42a50.entry.js +0 -4
- package/dist/twilight/p-96317fc8.entry.js +0 -4
- package/dist/twilight/p-97b51153.entry.js +0 -4
- package/dist/twilight/p-9c1bf3fb.entry.js +0 -4
- package/dist/twilight/p-CrSV-tno.js +0 -4
- package/dist/twilight/p-b202c2d3.entry.js +0 -4
- package/dist/twilight/p-b2b896d1.entry.js +0 -4
- package/dist/twilight/p-c327bc95.entry.js +0 -4
- package/dist/twilight/p-c699207a.entry.js +0 -4
- package/dist/twilight/p-d565b168.entry.js +0 -4
- package/dist/twilight/p-d7a70a29.entry.js +0 -4
- package/dist/twilight/p-d8a5198b.entry.js +0 -4
- package/dist/twilight/p-db27df13.entry.js +0 -4
- package/dist/twilight/p-f9abcf4f.entry.js +0 -4
- package/dist/twilight/p-fd0d136d.entry.js +0 -4
|
@@ -5,6 +5,7 @@ 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;
|
|
9
10
|
export class SallaFileUpload {
|
|
10
11
|
/**
|
|
@@ -195,7 +196,9 @@ export class SallaFileUpload {
|
|
|
195
196
|
if (!this.name) {
|
|
196
197
|
this.name = 'file';
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
+
}
|
|
200
|
+
connectedCallback() {
|
|
201
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
199
202
|
this.host.querySelectorAll('.filepond--drop-label>label').forEach(label => label.innerHTML = this.getLabel());
|
|
200
203
|
if (this.filepond) {
|
|
201
204
|
this.filepond.labelFileTypeNotAllowed = salla.lang.get('common.uploader.invalid_type');
|
|
@@ -216,7 +219,7 @@ export class SallaFileUpload {
|
|
|
216
219
|
}
|
|
217
220
|
const setNestedAsync = (lang, key, value) => {
|
|
218
221
|
return new Promise((resolve) => {
|
|
219
|
-
|
|
222
|
+
setTranslationDefault(lang, key, value);
|
|
220
223
|
resolve(true);
|
|
221
224
|
});
|
|
222
225
|
};
|
|
@@ -342,6 +345,14 @@ export class SallaFileUpload {
|
|
|
342
345
|
}
|
|
343
346
|
return this.value || '';
|
|
344
347
|
}
|
|
348
|
+
isValidUploadResult(value) {
|
|
349
|
+
if (Array.isArray(value)) {
|
|
350
|
+
return value.length > 0 && value.every(item => typeof item === 'string' && this.isValidUploadResult(item));
|
|
351
|
+
}
|
|
352
|
+
// Keep relative paths and existing URL shapes; reject missing/coerced results.
|
|
353
|
+
return typeof value === 'string' && value.trim().length > 0 &&
|
|
354
|
+
!['undefined', 'null', '[object Object]'].includes(value.trim());
|
|
355
|
+
}
|
|
345
356
|
usesSplitCountLimits() {
|
|
346
357
|
return usesSplitCountLimits(this.maxImagesCount, this.maxVideosCount);
|
|
347
358
|
}
|
|
@@ -872,6 +883,7 @@ export class SallaFileUpload {
|
|
|
872
883
|
}
|
|
873
884
|
}
|
|
874
885
|
disconnectedCallback() {
|
|
886
|
+
this.langUnsubscribe?.();
|
|
875
887
|
if (this.previewFilesSyncRaf != null) {
|
|
876
888
|
cancelAnimationFrame(this.previewFilesSyncRaf);
|
|
877
889
|
this.previewFilesSyncRaf = null;
|
|
@@ -879,12 +891,12 @@ export class SallaFileUpload {
|
|
|
879
891
|
this.revokeAllPreviewObjectUrls();
|
|
880
892
|
}
|
|
881
893
|
render() {
|
|
882
|
-
return (h(Host, { key: '
|
|
894
|
+
return (h(Host, { key: '68b9fdc913b0e64080e71fe0e79d8bfb2e614ccb', class: {
|
|
883
895
|
"s-file-upload": true,
|
|
884
896
|
"s-file-upload-profile-image": this.profileImage,
|
|
885
897
|
"s-file-upload-multiple": this.allowMultiple,
|
|
886
898
|
"s-file-upload-has-gallery": this.usesGalleryPreview(),
|
|
887
|
-
} }, h("input", { key: '
|
|
899
|
+
} }, h("input", { key: '6594ba9b70d8b0be560ea461d32cf2d0139e75d3', 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: 'f462d17fa2ed78a95b486e1880f4d84a6cc937b3', class: "s-hidden", name: 'hidden-' + this.name, required: this.required, value: this.getHiddenInputValue(), ref: input => this.hiddenInput = input }), this.renderPreviewGallery()));
|
|
888
900
|
}
|
|
889
901
|
async componentDidLoad() {
|
|
890
902
|
await Salla.onReady();
|
|
@@ -948,8 +960,12 @@ export class SallaFileUpload {
|
|
|
948
960
|
}
|
|
949
961
|
},
|
|
950
962
|
onprocessfile: (error, file) => {
|
|
951
|
-
|
|
952
|
-
|
|
963
|
+
// A 2xx response without a usable upload result is still a failed upload.
|
|
964
|
+
const uploadError = error || (file.serverId == null
|
|
965
|
+
? { type: 'error', body: salla.lang.get('common.errors.error_occurred') }
|
|
966
|
+
: null);
|
|
967
|
+
if (uploadError) {
|
|
968
|
+
this.notifyUploadError(uploadError, file);
|
|
953
969
|
this.removeFailedFile(file);
|
|
954
970
|
if (this.usesGalleryPreview()) {
|
|
955
971
|
this.schedulePreviewFilesSync();
|
|
@@ -1026,10 +1042,21 @@ export class SallaFileUpload {
|
|
|
1026
1042
|
// @ts-ignore
|
|
1027
1043
|
process: {
|
|
1028
1044
|
onload: (response) => {
|
|
1029
|
-
let responseData
|
|
1045
|
+
let responseData;
|
|
1046
|
+
try {
|
|
1047
|
+
const result = JSON.parse(response);
|
|
1048
|
+
if (!result || result.success === false)
|
|
1049
|
+
return null;
|
|
1050
|
+
responseData = result.data;
|
|
1051
|
+
}
|
|
1052
|
+
catch {
|
|
1053
|
+
return null;
|
|
1054
|
+
}
|
|
1030
1055
|
if ((this.instantUpload || this.allowMultiple) && Array.isArray(responseData) && responseData.length > 0) {
|
|
1031
1056
|
const item = responseData[0];
|
|
1032
1057
|
const fileUrl = typeof item === 'object' && item !== null ? item.filePath || item.url : item;
|
|
1058
|
+
if (!this.isValidUploadResult(fileUrl))
|
|
1059
|
+
return null;
|
|
1033
1060
|
const fileId = this.generateUploadFileId();
|
|
1034
1061
|
// Store the upload result to be picked up by onprocessfile
|
|
1035
1062
|
this.uploadedFiles = [
|
|
@@ -1044,6 +1071,8 @@ export class SallaFileUpload {
|
|
|
1044
1071
|
const fileUrl = typeof responseData === 'object' && responseData !== null
|
|
1045
1072
|
? responseData.filePath || responseData.url
|
|
1046
1073
|
: responseData;
|
|
1074
|
+
if (!this.isValidUploadResult(fileUrl))
|
|
1075
|
+
return null;
|
|
1047
1076
|
const fileId = typeof responseData === 'object' && responseData !== null && responseData.id
|
|
1048
1077
|
? responseData.id
|
|
1049
1078
|
: this.generateUploadFileId();
|
|
@@ -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": {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from "@stencil/core";
|
|
4
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import Star2 from "../../assets/svg/star2.svg";
|
|
6
6
|
import Star3 from "../../assets/svg/star3.svg";
|
|
7
7
|
import CancelIcon from "../../assets/svg/cancel.svg";
|
|
@@ -34,16 +34,23 @@ export class SallaLoyalty {
|
|
|
34
34
|
salla.onReady(() => {
|
|
35
35
|
this.is_loggedin = salla.config.isUser();
|
|
36
36
|
});
|
|
37
|
-
salla.lang.onLoaded(() => {
|
|
38
|
-
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
39
|
-
this.translationLoaded = true;
|
|
40
|
-
});
|
|
41
37
|
salla.cart.event.onUpdated(cart => {
|
|
42
38
|
this.prizePoints = cart.loyalty.prize?.points;
|
|
43
39
|
this.prizeTitle = cart.loyalty.prize?.title;
|
|
44
40
|
this.customerPoints = cart.loyalty.customer_points || this.customerPoints;
|
|
45
41
|
});
|
|
46
42
|
}
|
|
43
|
+
connectedCallback() {
|
|
44
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
45
|
+
this.guestMessage = salla.lang.get('pages.loyalty_program.guest_message');
|
|
46
|
+
this.translationLoaded = true;
|
|
47
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
48
|
+
forceUpdate(this);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
this.langUnsubscribe?.();
|
|
53
|
+
}
|
|
47
54
|
onTabSelected(event) {
|
|
48
55
|
const prize = this.loyaltyProgram?.prizes.find(p => p.title === event.detail?.name);
|
|
49
56
|
if (prize)
|
|
@@ -46,16 +46,21 @@ export class SallaMap {
|
|
|
46
46
|
* Sets map style.
|
|
47
47
|
*/
|
|
48
48
|
this.theme = 'light';
|
|
49
|
-
salla.
|
|
49
|
+
salla.onReady(() => {
|
|
50
|
+
this.apiKey = salla.config.get('store.settings.keys.maps');
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
connectedCallback() {
|
|
54
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
50
55
|
this.modalActivityTitle = salla.lang.get('pages.checkout.select_your_address_from_map');
|
|
51
56
|
this.confirmButtonTitle = salla.lang.get('pages.checkout.confirm_address');
|
|
52
57
|
this.locateButtonTitle = salla.lang.get('pages.cart.detect_location');
|
|
53
58
|
this.locateButtonEdit = salla.lang.get('common.elements.edit');
|
|
54
59
|
this.searchPlaceholder = salla.lang.get('pages.checkout.search_for_address');
|
|
55
60
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
this.langUnsubscribe?.();
|
|
59
64
|
}
|
|
60
65
|
formatAddress(address) {
|
|
61
66
|
return address.length > 25 ? address.substring(0, 25) + '...' : address;
|
|
@@ -327,11 +332,11 @@ export class SallaMap {
|
|
|
327
332
|
}
|
|
328
333
|
// render
|
|
329
334
|
render() {
|
|
330
|
-
return (h(Host, { key: '
|
|
335
|
+
return (h(Host, { key: '3200387d0b18f6ecc5f5b6c2a464cb02516268f9', class: "s-map-wrapper" }, h("salla-modal", { key: '1a0b0181945dc1c5fa3950f7bcdf56f4aed2be1c', class: "s-map-modal-wrapper", noPadding: true, ref: modal => {
|
|
331
336
|
this.locationModal = modal;
|
|
332
|
-
} }, this.getLocationModal()), h("slot", { key: '
|
|
337
|
+
} }, this.getLocationModal()), h("slot", { key: '474ba510d9c5cbf0abc473151674e6627f374458', name: "button" }, h("salla-button", { key: '3a08552e4be8f1306f679fd44231743a377064ea', onClick: () => {
|
|
333
338
|
this.open();
|
|
334
|
-
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '
|
|
339
|
+
}, color: "primary", class: "s-map-location-button" }, h("span", { key: '0b17fd41e0563c52e7826534877df00adcbce777', class: "s-map-location-icon", innerHTML: this.formattedAddress ? Edit : Location }), this.formattedAddress ? (h("div", null, this.locateButtonEdit, " | ", this.formatAddress(this.formattedAddress))) : (this.locateButtonTitle))), h("input", { key: 'b097866bd2d4b29af0212064897d3fc5311534e2', class: "s-map-value-input", name: this.name, required: this.required, value: this.getLatLng(), tabIndex: -1, "aria-hidden": "true", ref: input => (this.mapInput = input) })));
|
|
335
340
|
}
|
|
336
341
|
static get is() { return "salla-map"; }
|
|
337
342
|
static get originalStyleUrls() {
|
|
@@ -11,11 +11,16 @@ export class SallaNotifications {
|
|
|
11
11
|
this.itemPerPage = 10;
|
|
12
12
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
13
13
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
14
|
-
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
15
17
|
this.no_notifications_trans = salla.lang.get('blocks.header.no_notifications');
|
|
16
18
|
this.load_more_text_trans = salla.lang.get('common.elements.load_more');
|
|
17
19
|
});
|
|
18
20
|
}
|
|
21
|
+
disconnectedCallback() {
|
|
22
|
+
this.langUnsubscribe?.();
|
|
23
|
+
}
|
|
19
24
|
// Show/hide loading
|
|
20
25
|
loading(isLoading = true) {
|
|
21
26
|
let btnText = this.status?.querySelector('.s-button-text');
|
|
@@ -52,8 +52,16 @@ export class SallaOffer {
|
|
|
52
52
|
this.get_from_text = translate('pages.offer.get_from_categories', {}, 'احصل من:');
|
|
53
53
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
54
54
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
55
|
+
salla.onReady(() => {
|
|
56
|
+
this.currentPage = salla.config.get('page.slug');
|
|
57
|
+
const currencies = salla.config.get('currencies') || {};
|
|
58
|
+
const currencyCode = salla.config.get('user.currency_code');
|
|
59
|
+
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
55
63
|
// Language
|
|
56
|
-
salla.lang.
|
|
64
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
57
65
|
this.offer_with_price_text = salla.lang.get('pages.offer.with_price');
|
|
58
66
|
this.with_discount_text = salla.lang.get('pages.products.with_a_discount');
|
|
59
67
|
this.product_discount_text = salla.lang.get('pages.products.discount');
|
|
@@ -69,12 +77,9 @@ export class SallaOffer {
|
|
|
69
77
|
this.payment_methods_text = translate('pages.offer.payment_methods', {}, 'طرق الدفع');
|
|
70
78
|
this.product_text = salla.lang.get('common.elements.product', 'منتج');
|
|
71
79
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const currencyCode = salla.config.get('user.currency_code');
|
|
76
|
-
this.userCurrency = currencies[currencyCode] || { symbol: '', code: currencyCode || 'SAR', name: '' };
|
|
77
|
-
});
|
|
80
|
+
}
|
|
81
|
+
disconnectedCallback() {
|
|
82
|
+
this.langUnsubscribe?.();
|
|
78
83
|
}
|
|
79
84
|
async getEndpointByPageName() {
|
|
80
85
|
if (this.currentPage == PageType.Cart) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h } from "@stencil/core";
|
|
4
|
+
import { h, forceUpdate } from "@stencil/core";
|
|
5
5
|
import { translate } from "../../Helpers/translate";
|
|
6
6
|
import SpecialDiscountIcon from "../../assets/svg/special-discount.svg";
|
|
7
7
|
import Tag from "../../assets/svg/tag.svg";
|
|
@@ -18,10 +18,6 @@ export class SallaOfferModal {
|
|
|
18
18
|
this.translationLoaded = false;
|
|
19
19
|
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
20
20
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
21
|
-
salla.lang.onLoaded(() => {
|
|
22
|
-
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
23
|
-
this.translationLoaded = true;
|
|
24
|
-
});
|
|
25
21
|
this.categorySlot = this.host.querySelector('[slot="category"]')?.innerHTML || `<span class="s-offer-modal-badge-icon">{tagIcon}</span><span class="s-offer-modal-badge-text">{name}</span>`;
|
|
26
22
|
// this.productSlot = this.host.querySelector('[slot="product"]')?.innerHTML || this.defaultProductSlot();
|
|
27
23
|
salla.event.on('offer-modal::open', product_id => this.open(product_id));
|
|
@@ -33,6 +29,17 @@ export class SallaOfferModal {
|
|
|
33
29
|
this.open(offer.product_id);
|
|
34
30
|
});
|
|
35
31
|
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
34
|
+
this.addToCartLabel = salla.lang.get("pages.cart.add_to_cart");
|
|
35
|
+
this.translationLoaded = true;
|
|
36
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
37
|
+
forceUpdate(this);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
disconnectedCallback() {
|
|
41
|
+
this.langUnsubscribe?.();
|
|
42
|
+
}
|
|
36
43
|
/**
|
|
37
44
|
* Emits a promotion viewed event for analytics tracking
|
|
38
45
|
* @param offer - The offer being viewed in the modal
|
|
@@ -230,7 +237,7 @@ export class SallaOfferModal {
|
|
|
230
237
|
// '</div>';
|
|
231
238
|
// }
|
|
232
239
|
render() {
|
|
233
|
-
return h("salla-modal", { key: '
|
|
240
|
+
return h("salla-modal", { key: 'beed061e843a93ff4dff12234d5bac13dde06023', "has-skeleton": true, "sub-title": this.offer_message, ref: modal => this.modal = modal, isLoading: true, class: `s-offer-modal-type-${this.offer_type ? this.offer_type : ''}` }, h("div", { key: '390f86b1c8fa2b2c278576784e0623051dddf969', slot: 'loading' }, h("div", { key: '923ac23aa2038cf64476af0b99a93a38bdd86766', class: "s-offer-modal-skeleton" }, h("div", { key: '3ec7335437554217a22aafcfe7d11b7ebf648335', class: "s-offer-modal-skeleton-header" }, h("salla-skeleton", { key: '48e244848f5c49c5b0d8406289ef71fc8dac3a90', type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { key: 'c0663ea07d3afa6e70645f4ceb8610f595d5f4ed', height: '15px', width: '50%' }), h("salla-skeleton", { key: '152b319f3932dea0bb5bb2f55cd9c43904ee412d', height: '10px', width: '30%' })), h("div", { key: 'c91455f90f133d346b71c6c7ac9d78c6d645f264', class: "s-offer-modal-skeleton-items" }, [...Array(3)].map(() => h("div", { class: "s-offer-modal-skeleton-item" }, h("salla-skeleton", { height: '9rem' }), h("div", { class: "s-offer-modal-skeleton-item-title" }, h("salla-skeleton", { height: '15px', width: '100%' })), h("div", { class: "s-offer-modal-skeleton-item-subtitle" }, h("salla-skeleton", { height: '9px', width: '50%' }), h("div", { innerHTML: Cart2 }))))), h("div", { key: '0657191d93e3929f74734c90b082fc272f189a83', class: "s-offer-modal-skeleton-footer" }, h("salla-skeleton", { key: '2ac022a4ca2b18182e24dd10124061d9ff068094', height: '15px', width: '50%' }), h("salla-skeleton", { key: '029fca022c898eb4b519fa8f0808ca9dba1bd07a', height: '15px', width: '30%' })))), !this.hasError && this.offer !== null
|
|
234
241
|
? [h("span", { slot: 'icon', class: "s-offer-modal-header-icon", innerHTML: SpecialDiscountIcon }), this.getOfferContent(),
|
|
235
242
|
this.getOfferConditions(), h("div", { class: "s-offer-modal-footer", slot: "footer" }, this.offer.formatted_date ?
|
|
236
243
|
h("p", { class: "s-offer-modal-expiry" }, salla.lang.get('pages.products.offer_expires_in'), " ", this.offer.formatted_date)
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
.s-order-branch-ready {
|
|
6
6
|
background-color: color-mix(in srgb, var(--color-primary) 30%, transparent);
|
|
7
7
|
}
|
|
8
|
+
.s-order-branch-instructions {
|
|
9
|
+
background-color: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
|
10
|
+
}
|
|
11
|
+
.s-order-branch-instructions-content {
|
|
12
|
+
white-space: pre-wrap;
|
|
13
|
+
}
|
|
8
14
|
.filter {
|
|
9
15
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
10
16
|
}
|
|
@@ -226,6 +232,35 @@
|
|
|
226
232
|
line-height: 1.45;
|
|
227
233
|
color: var(--color-text-secondary,#666);
|
|
228
234
|
}
|
|
235
|
+
.s-order-branch-instructions {
|
|
236
|
+
border-radius: 0.5rem;
|
|
237
|
+
padding: 1rem;
|
|
238
|
+
text-align: start;
|
|
239
|
+
}
|
|
240
|
+
.s-order-branch-instructions-heading {
|
|
241
|
+
margin-bottom: 0.5rem;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 0.5rem;
|
|
245
|
+
font-size: 0.75rem;
|
|
246
|
+
line-height: 1rem;
|
|
247
|
+
line-height: 1.35;
|
|
248
|
+
}
|
|
249
|
+
.s-order-branch-instructions-heading i {
|
|
250
|
+
font-size: 0.875rem;
|
|
251
|
+
line-height: 1.25rem;
|
|
252
|
+
font-weight: 700;
|
|
253
|
+
--tw-text-opacity: 1;
|
|
254
|
+
color: rgb(0 0 0 / var(--tw-text-opacity, 1));
|
|
255
|
+
}
|
|
256
|
+
.s-order-branch-instructions-content {
|
|
257
|
+
margin: 0px;
|
|
258
|
+
overflow-wrap: break-word;
|
|
259
|
+
font-size: 0.875rem;
|
|
260
|
+
line-height: 1.25rem;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
line-height: 1.6;
|
|
263
|
+
}
|
|
229
264
|
.s-order-branch-actions {
|
|
230
265
|
display: flex;
|
|
231
266
|
flex-shrink: 0;
|