@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
|
@@ -33,16 +33,10 @@ export class SallaProductCard {
|
|
|
33
33
|
this.fitImageHeight = salla.config.get('store.settings.product.fit_type');
|
|
34
34
|
salla.wishlist.event.onAdded((_res, id) => this.toggleFavoriteIcon(true, id));
|
|
35
35
|
salla.wishlist.event.onRemoved((_res, id) => this.toggleFavoriteIcon(false, id));
|
|
36
|
+
// e.g. a guest signs into an account that already saved this product
|
|
37
|
+
salla.event.on('wishlist::storage.synced', () => this.productData && this.toggleFavoriteIcon(this.isInWishlist()));
|
|
36
38
|
this.placeholder = salla.url.asset(salla.config.get('theme.settings.placeholder'));
|
|
37
39
|
});
|
|
38
|
-
// Language
|
|
39
|
-
salla.lang.onLoaded(() => {
|
|
40
|
-
this.remained = salla.lang.get('pages.products.remained');
|
|
41
|
-
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
42
|
-
this.startingPrice = salla.lang.get('pages.products.starting_price');
|
|
43
|
-
this.addToCart = salla.lang.get('pages.cart.add_to_cart');
|
|
44
|
-
this.outOfStock = salla.lang.get('pages.products.out_of_stock');
|
|
45
|
-
});
|
|
46
40
|
// Parse product data
|
|
47
41
|
if (!this.product) {
|
|
48
42
|
return;
|
|
@@ -54,6 +48,19 @@ export class SallaProductCard {
|
|
|
54
48
|
salla.log('Bad json passed via product prop');
|
|
55
49
|
}
|
|
56
50
|
}
|
|
51
|
+
connectedCallback() {
|
|
52
|
+
// Language
|
|
53
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
54
|
+
this.remained = salla.lang.get('pages.products.remained');
|
|
55
|
+
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
56
|
+
this.startingPrice = salla.lang.get('pages.products.starting_price');
|
|
57
|
+
this.addToCart = salla.lang.get('pages.cart.add_to_cart');
|
|
58
|
+
this.outOfStock = salla.lang.get('pages.products.out_of_stock');
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
this.langUnsubscribe?.();
|
|
63
|
+
}
|
|
57
64
|
// Private Methods
|
|
58
65
|
initCircleBar() {
|
|
59
66
|
let qty = this.productData.quantity, total = this.productData.quantity > 100 ? this.productData.quantity * 2 : 100, roundPercent = (qty / total) * 100, bar = this.pie.querySelector('.s-product-card-content-pie-svg-bar'), strokeDashOffsetValue = 100 - roundPercent;
|
|
@@ -212,7 +219,7 @@ export class SallaProductCard {
|
|
|
212
219
|
"optional": false,
|
|
213
220
|
"docs": {
|
|
214
221
|
"tags": [],
|
|
215
|
-
"text": "
|
|
222
|
+
"text": "The product data to display. Can be a JSON string or a product object containing id, name, image, price, etc."
|
|
216
223
|
},
|
|
217
224
|
"getter": false,
|
|
218
225
|
"setter": false,
|
|
@@ -231,7 +238,7 @@ export class SallaProductCard {
|
|
|
231
238
|
"optional": false,
|
|
232
239
|
"docs": {
|
|
233
240
|
"tags": [],
|
|
234
|
-
"text": "
|
|
241
|
+
"text": "Whether to display the card in horizontal (landscape) layout. Default is false (vertical layout)."
|
|
235
242
|
},
|
|
236
243
|
"getter": false,
|
|
237
244
|
"setter": false,
|
|
@@ -250,7 +257,7 @@ export class SallaProductCard {
|
|
|
250
257
|
"optional": false,
|
|
251
258
|
"docs": {
|
|
252
259
|
"tags": [],
|
|
253
|
-
"text": "
|
|
260
|
+
"text": "Whether to add a shadow effect on hover. Default is false."
|
|
254
261
|
},
|
|
255
262
|
"getter": false,
|
|
256
263
|
"setter": false,
|
|
@@ -269,7 +276,7 @@ export class SallaProductCard {
|
|
|
269
276
|
"optional": false,
|
|
270
277
|
"docs": {
|
|
271
278
|
"tags": [],
|
|
272
|
-
"text": "
|
|
279
|
+
"text": "Whether to hide the \"Add to Cart\" button. Default is false (button is shown)."
|
|
273
280
|
},
|
|
274
281
|
"getter": false,
|
|
275
282
|
"setter": false,
|
|
@@ -288,7 +295,7 @@ export class SallaProductCard {
|
|
|
288
295
|
"optional": false,
|
|
289
296
|
"docs": {
|
|
290
297
|
"tags": [],
|
|
291
|
-
"text": "
|
|
298
|
+
"text": "Whether to use a full-image card style where the image covers the entire card. Default is false."
|
|
292
299
|
},
|
|
293
300
|
"getter": false,
|
|
294
301
|
"setter": false,
|
|
@@ -307,7 +314,7 @@ export class SallaProductCard {
|
|
|
307
314
|
"optional": false,
|
|
308
315
|
"docs": {
|
|
309
316
|
"tags": [],
|
|
310
|
-
"text": "
|
|
317
|
+
"text": "Whether to use a minimal card style with reduced information. Default is false."
|
|
311
318
|
},
|
|
312
319
|
"getter": false,
|
|
313
320
|
"setter": false,
|
|
@@ -326,7 +333,7 @@ export class SallaProductCard {
|
|
|
326
333
|
"optional": false,
|
|
327
334
|
"docs": {
|
|
328
335
|
"tags": [],
|
|
329
|
-
"text": "
|
|
336
|
+
"text": "Whether this is a special/featured product card with additional styling (like quantity pie chart). Default is false."
|
|
330
337
|
},
|
|
331
338
|
"getter": false,
|
|
332
339
|
"setter": false,
|
|
@@ -345,7 +352,7 @@ export class SallaProductCard {
|
|
|
345
352
|
"optional": false,
|
|
346
353
|
"docs": {
|
|
347
354
|
"tags": [],
|
|
348
|
-
"text": "
|
|
355
|
+
"text": "Whether to show the product quantity in a badge. Default is false."
|
|
349
356
|
},
|
|
350
357
|
"getter": false,
|
|
351
358
|
"setter": false,
|
|
@@ -364,7 +371,7 @@ export class SallaProductCard {
|
|
|
364
371
|
"optional": false,
|
|
365
372
|
"docs": {
|
|
366
373
|
"tags": [],
|
|
367
|
-
"text": "
|
|
374
|
+
"text": "Whether to use a compact card layout suitable for drawers and lists. Default is false."
|
|
368
375
|
},
|
|
369
376
|
"getter": false,
|
|
370
377
|
"setter": false,
|
|
@@ -107,12 +107,6 @@ export class SallaProductOptions {
|
|
|
107
107
|
const completed = option.donation.target_amount <= option.donation.collected_amount;
|
|
108
108
|
return h("div", { class: { "s-product-options-donation-message": true, "s-product-options-donation-completed": completed, "s-product-options-donation-expired": !completed } }, h("p", null, option.donation.target_message), h("span", { innerHTML: completed ? salla.money(option.donation.target_amount) : '' }));
|
|
109
109
|
};
|
|
110
|
-
salla.lang.onLoaded(() => {
|
|
111
|
-
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
112
|
-
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
113
|
-
this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');
|
|
114
|
-
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
115
|
-
});
|
|
116
110
|
if (this.options) {
|
|
117
111
|
try {
|
|
118
112
|
this.setOptionsData(Array.isArray(this.options) ? this.options : JSON.parse(this.options));
|
|
@@ -133,6 +127,14 @@ export class SallaProductOptions {
|
|
|
133
127
|
});
|
|
134
128
|
}
|
|
135
129
|
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
132
|
+
this.outOfStockText = salla.lang.get("pages.products.out_of_stock");
|
|
133
|
+
this.donationAmount = salla.lang.get('pages.products.donation_amount');
|
|
134
|
+
this.selectDonationAmount = salla.lang.getWithDefault('pages.products.select_donation_amount', 'تحديد مبلغ التبرع');
|
|
135
|
+
this.selectAmount = salla.lang.getWithDefault('pages.products.select_amount', 'اختر المبلغ');
|
|
136
|
+
});
|
|
137
|
+
}
|
|
136
138
|
/**
|
|
137
139
|
* Sets the options data for the product
|
|
138
140
|
* @param optionsData - Array of product options
|
|
@@ -513,6 +515,7 @@ export class SallaProductOptions {
|
|
|
513
515
|
return needsCartId ? salla.api.cart.getCurrentCartId(false, "salla-product-options") : null;
|
|
514
516
|
}
|
|
515
517
|
disconnectedCallback() {
|
|
518
|
+
this.langUnsubscribe?.();
|
|
516
519
|
if (this.pasteHandler) {
|
|
517
520
|
document.removeEventListener("paste", this.pasteHandler);
|
|
518
521
|
}
|
|
@@ -11,12 +11,17 @@ export class SallaProductSizeGuide {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
this.hasError = false;
|
|
13
13
|
salla.event.on('size-guide::open', (product_id) => this.open(product_id));
|
|
14
|
-
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
15
17
|
this.placeholder_title = salla.lang.get('pages.products.size_guide_placeholder');
|
|
16
18
|
this.placeholder_description = salla.lang.get('pages.products.size_guide_placeholder_info');
|
|
17
19
|
this.modal_title = salla.lang.get('pages.products.size_guides');
|
|
18
20
|
});
|
|
19
21
|
}
|
|
22
|
+
disconnectedCallback() {
|
|
23
|
+
this.langUnsubscribe?.();
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
* Show the size-guide modal window
|
|
22
27
|
*/
|
|
@@ -45,11 +50,11 @@ export class SallaProductSizeGuide {
|
|
|
45
50
|
return h("salla-placeholder", { alignment: "center", iconSize: "xl" }, h("div", { slot: "title" }, this.placeholder_title), h("div", { slot: "description" }, this.placeholder_description));
|
|
46
51
|
}
|
|
47
52
|
render() {
|
|
48
|
-
return (h("salla-modal", { key: '
|
|
53
|
+
return (h("salla-modal", { key: '587dbc28fa828df2a47a4db1c124df032fe719fa', class: "s-product-size-guide-wrapper", id: 'salla-product-size-guide-modal', isLoading: true, "has-skeleton": true, width: "md", ref: modal => this.modal = modal }, h("span", { key: '822224aa89fb065c7262abf2f24914ed1fa3d8bb', slot: 'icon', class: "s-product-size-guide-header-icon", innerHTML: PencilRuler }), h("div", { key: '84e14a400f9417aa9be851a07f0203348a560aec', slot: "loading" }, h("div", { key: '5cbdbcf560f08279543c4d25fd21416ce2da1314', class: "s-product-size-guide-skeleton" }, h("salla-skeleton", { key: 'e3139f2898256adc2c20fbb86e96a9f5d008a677', height: '15px', width: '25%' }), h("div", { key: '961f482bf358c5a4ca0d980561bafdcd7489fa68', class: "s-product-size-guide-skeleton-header" }, h("salla-skeleton", { key: '1754361211a771952be69eeda9a4c9788aaff0e6', height: '40px' }), h("salla-skeleton", { key: '2ea3578f8751a2526947d5c067392ef95e3bcf44', height: '40px' }), h("salla-skeleton", { key: '32bba195c5f6a60ce9837b4d4cbfa302d6ddfb07', height: '40px' }), h("salla-skeleton", { key: '9888b01cd47c5acdc0a159ad49db228efd630d75', height: '40px' })), h("div", { key: 'd86e706b2393b17301f9f28b4b303f00bf743363', class: "s-product-size-guide-skeleton-content" }, h("salla-skeleton", { key: '02e0330958fd73288d5c654fce7169470cdf47cd', height: '15px', width: '25%' }), h("salla-skeleton", { key: 'cccb8bc372c6ccfdf707621190bba4bc38aecb99', height: '10px', width: '75%' }), h("salla-skeleton", { key: '95f8e83b3b1a54a52da1ff2e61a866239575cf7b', height: '10px', width: '50%' }), h("salla-skeleton", { key: '4880b1d82cea617cae837ad2d6dd4d627fe8d9e3', height: '10px', width: '75%' }), h("salla-skeleton", { key: '38980cc41e7388b41e35015ceed72d025bd82980', height: '10px', width: '100%' }), h("salla-skeleton", { key: 'bb1ad6a995e9e27b851007cae2c1f7204f3c2d91', height: '10px', width: '25%' }), h("salla-skeleton", { key: 'fc5cd1e7adafca96e00b9284123bb3eb9f892c9c', height: '10px', width: '60%' }), h("salla-skeleton", { key: '89bbd77ec6da0c8e03dd2fb9f60c929f49415c83', height: '10px', width: '45%' }), h("salla-skeleton", { key: '0666ce266b9411913ae4db64c61d3cfa44cf4245', height: '10px', width: '30%' })))), h("slot", { key: '31a338bdc12e2a4ea1f80ea4bd700e293020b840', name: "header" }), !this.hasError && !!this.guides ?
|
|
49
54
|
[
|
|
50
55
|
h("salla-tabs", null, this.guides.map((guide) => h("salla-tab-header", { slot: "header", name: guide.name }, h("span", null, guide.name))), this.guides.map((guide) => h("salla-tab-content", { slot: "content", name: guide.name }, h("div", { innerHTML: guide.description }))))
|
|
51
56
|
]
|
|
52
|
-
: this.showPlaceholder(), h("slot", { key: '
|
|
57
|
+
: this.showPlaceholder(), h("slot", { key: '887b97cd58b442db20dad02db8ace42847bcef75', name: "footer" })));
|
|
53
58
|
}
|
|
54
59
|
static get is() { return "salla-product-size-guide"; }
|
|
55
60
|
static get originalStyleUrls() {
|
|
@@ -101,14 +101,14 @@ export class SallaProductsList {
|
|
|
101
101
|
this.includes = null;
|
|
102
102
|
}
|
|
103
103
|
Helper.setIncludes(this.includes);
|
|
104
|
-
|
|
104
|
+
}
|
|
105
|
+
connectedCallback() {
|
|
106
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
105
107
|
this.placeholderText = salla.lang.get('pages.categories.no_products');
|
|
106
108
|
this.endOfText = salla.lang.get('common.elements.end_of_content');
|
|
107
109
|
this.failedLoadMore = salla.lang.get('common.elements.failed_to_load_more');
|
|
108
110
|
this.currentPage = salla.config.get('page');
|
|
109
111
|
});
|
|
110
|
-
}
|
|
111
|
-
connectedCallback() {
|
|
112
112
|
//Override browser scroll restoration default behaviour
|
|
113
113
|
if ('scrollRestoration' in history)
|
|
114
114
|
history.scrollRestoration = 'manual';
|
|
@@ -119,6 +119,7 @@ export class SallaProductsList {
|
|
|
119
119
|
salla.event.on('wishlist::storage.synced', this.onWishlistStorageSynced);
|
|
120
120
|
}
|
|
121
121
|
disconnectedCallback() {
|
|
122
|
+
this.langUnsubscribe?.();
|
|
122
123
|
window.removeEventListener('DOMContentLoaded', this.boundScrollToLastViewedProduct);
|
|
123
124
|
window.removeEventListener('scroll', this.boundHandleScroll);
|
|
124
125
|
salla.event.off('wishlist::removed', this.onWishlistItemRemoved);
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
export class SallaProgressBar {
|
|
6
6
|
constructor() {
|
|
7
|
+
// set when the constructor builds the donation-target labels, so the subscriber can rebuild them
|
|
8
|
+
this.hasDonationTarget = false;
|
|
9
|
+
this.donationEndDate = null;
|
|
7
10
|
/**
|
|
8
11
|
* Set height for the wrapper.
|
|
9
12
|
*/
|
|
@@ -15,6 +18,8 @@ export class SallaProgressBar {
|
|
|
15
18
|
donationJson.target_end_date = donationJson.target_end_date == '0000-00-00' ? null : donationJson.target_end_date;
|
|
16
19
|
this.value = donationJson.collected_amount;
|
|
17
20
|
this.target = donationJson.target_amount;
|
|
21
|
+
this.hasDonationTarget = true;
|
|
22
|
+
this.donationEndDate = donationJson.target_end_date;
|
|
18
23
|
this.header = salla.lang.get('pages.products.target');
|
|
19
24
|
this.message = donationJson.target_end_date ? salla.lang.get('pages.products.donation_target_date') + ' ' + donationJson.target_end_date : '';
|
|
20
25
|
}
|
|
@@ -29,10 +34,6 @@ export class SallaProgressBar {
|
|
|
29
34
|
catch (e) {
|
|
30
35
|
salla.log('Wrong donation json');
|
|
31
36
|
}
|
|
32
|
-
salla.lang.onLoaded(() => {
|
|
33
|
-
this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
|
|
34
|
-
this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
|
|
35
|
-
});
|
|
36
37
|
salla.onReady(() => {
|
|
37
38
|
this.color = this.color || salla.config.get('theme.color.primary', "#ffd5c4");
|
|
38
39
|
if (!this.unit) {
|
|
@@ -40,6 +41,21 @@ export class SallaProgressBar {
|
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
}
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
46
|
+
if (this.hasDonationTarget) {
|
|
47
|
+
// rebuilt each time: once translated, the text no longer holds the keys replaced below
|
|
48
|
+
this.header = salla.lang.get('pages.products.target');
|
|
49
|
+
this.message = this.donationEndDate ? salla.lang.get('pages.products.donation_target_date') + ' ' + this.donationEndDate : '';
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.header = this.header?.replace('pages.products.target', salla.lang.get('pages.products.target'));
|
|
53
|
+
this.message = this.message?.replace('pages.products.donation_target_date', salla.lang.get('pages.products.donation_target_date'));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
disconnectedCallback() {
|
|
57
|
+
this.langUnsubscribe?.();
|
|
58
|
+
}
|
|
43
59
|
getPercentage() {
|
|
44
60
|
return (this.value / this.target) * 100;
|
|
45
61
|
}
|
|
@@ -79,10 +79,15 @@ export class SallaQuickBuy {
|
|
|
79
79
|
});
|
|
80
80
|
return true;
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
}
|
|
83
|
+
connectedCallback() {
|
|
84
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
83
85
|
this.quickBuy = salla.lang.get('pages.products.buy_now');
|
|
84
86
|
});
|
|
85
87
|
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
this.langUnsubscribe?.();
|
|
90
|
+
}
|
|
86
91
|
quickBuyHandler() {
|
|
87
92
|
if (salla.config.isGuest() && !this.isGuestCheckout()) {
|
|
88
93
|
this.requireLogin.emit({ productId: this.productId });
|
|
@@ -53,7 +53,9 @@ export class SallaQuickOrder {
|
|
|
53
53
|
salla.onReady(() => {
|
|
54
54
|
this.productId = this.productId || salla.config.get('page.id');
|
|
55
55
|
});
|
|
56
|
-
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
57
59
|
this.placeHolderEmail = salla.lang.get('common.elements.email');
|
|
58
60
|
this.emailOptional = salla.lang.get('common.elements.optional');
|
|
59
61
|
this.agreementShowText = salla.lang.get('pages.checkout.show_full_agreement');
|
|
@@ -61,6 +63,9 @@ export class SallaQuickOrder {
|
|
|
61
63
|
this.userNameLabel = salla.lang.get('pages.products.your_name');
|
|
62
64
|
});
|
|
63
65
|
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
this.langUnsubscribe?.();
|
|
68
|
+
}
|
|
64
69
|
getBtnColor() {
|
|
65
70
|
return this.quickOrderStyle === 'default' ? 'light' : 'primary';
|
|
66
71
|
}
|
|
@@ -10,6 +10,7 @@ import ShippingFast from "../../assets/svg/shipping-fast.svg";
|
|
|
10
10
|
import Star from "../../assets/svg/star.svg";
|
|
11
11
|
import WhatsappIcon from "../../assets/svg/whatsapp2.svg";
|
|
12
12
|
import Helper from "../../Helpers/Helper";
|
|
13
|
+
import { setTranslationDefault } from "../../Helpers/translate";
|
|
13
14
|
export class SallaRatingModal {
|
|
14
15
|
constructor() {
|
|
15
16
|
this.hasError = false;
|
|
@@ -85,11 +86,13 @@ export class SallaRatingModal {
|
|
|
85
86
|
salla.onReady(() => {
|
|
86
87
|
this.orderId = salla.config.get('page.id');
|
|
87
88
|
});
|
|
88
|
-
|
|
89
|
+
}
|
|
90
|
+
connectedCallback() {
|
|
91
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
89
92
|
this.contactUsLabel = salla.lang.get('blocks.footer.social');
|
|
90
93
|
const setNestedAsync = (lang, key, value) => {
|
|
91
94
|
return new Promise((resolve) => {
|
|
92
|
-
|
|
95
|
+
setTranslationDefault(lang, key, value);
|
|
93
96
|
resolve(true);
|
|
94
97
|
});
|
|
95
98
|
};
|
|
@@ -139,6 +142,9 @@ export class SallaRatingModal {
|
|
|
139
142
|
setTranslations();
|
|
140
143
|
});
|
|
141
144
|
}
|
|
145
|
+
disconnectedCallback() {
|
|
146
|
+
this.langUnsubscribe?.();
|
|
147
|
+
}
|
|
142
148
|
getV2Ref() {
|
|
143
149
|
return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
|
|
144
150
|
}
|
|
@@ -11,24 +11,24 @@ export class SallaRatingStars {
|
|
|
11
11
|
this.reviewLabel = '';
|
|
12
12
|
this.selectedStar = 0;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* The name attribute for the rating input (used in forms). Default is 'rating'.
|
|
15
|
+
*/
|
|
16
16
|
this.name = 'rating';
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* The size of the star icons. Can be 'large', 'medium', 'small', or 'mini'. Default is 'medium'.
|
|
19
|
+
*/
|
|
20
20
|
this.size = 'medium';
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* The number of reviews to display next to the stars. Default is 0 (hidden).
|
|
23
|
+
*/
|
|
24
24
|
this.reviews = 0;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
* Render the description label before the stars instead of after.
|
|
27
|
+
*/
|
|
28
28
|
this.labelBeforeStars = false;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* Whether the rating is interactive/editable by the user. Default is false (display-only).
|
|
31
|
+
*/
|
|
32
32
|
this.editable = false;
|
|
33
33
|
this.tag = true;
|
|
34
34
|
}
|
|
@@ -215,7 +215,7 @@ export class SallaRatingStars {
|
|
|
215
215
|
"optional": false,
|
|
216
216
|
"docs": {
|
|
217
217
|
"tags": [],
|
|
218
|
-
"text": "
|
|
218
|
+
"text": "The name attribute for the rating input (used in forms). Default is 'rating'."
|
|
219
219
|
},
|
|
220
220
|
"getter": false,
|
|
221
221
|
"setter": false,
|
|
@@ -235,7 +235,7 @@ export class SallaRatingStars {
|
|
|
235
235
|
"optional": false,
|
|
236
236
|
"docs": {
|
|
237
237
|
"tags": [],
|
|
238
|
-
"text": "
|
|
238
|
+
"text": "The size of the star icons. Can be 'large', 'medium', 'small', or 'mini'. Default is 'medium'."
|
|
239
239
|
},
|
|
240
240
|
"getter": false,
|
|
241
241
|
"setter": false,
|
|
@@ -255,7 +255,7 @@ export class SallaRatingStars {
|
|
|
255
255
|
"optional": false,
|
|
256
256
|
"docs": {
|
|
257
257
|
"tags": [],
|
|
258
|
-
"text": "The rating value."
|
|
258
|
+
"text": "The current rating value (0-5). Used to display filled stars."
|
|
259
259
|
},
|
|
260
260
|
"getter": false,
|
|
261
261
|
"setter": false,
|
|
@@ -274,7 +274,7 @@ export class SallaRatingStars {
|
|
|
274
274
|
"optional": false,
|
|
275
275
|
"docs": {
|
|
276
276
|
"tags": [],
|
|
277
|
-
"text": "
|
|
277
|
+
"text": "The number of reviews to display next to the stars. Default is 0 (hidden)."
|
|
278
278
|
},
|
|
279
279
|
"getter": false,
|
|
280
280
|
"setter": false,
|
|
@@ -294,7 +294,7 @@ export class SallaRatingStars {
|
|
|
294
294
|
"optional": false,
|
|
295
295
|
"docs": {
|
|
296
296
|
"tags": [],
|
|
297
|
-
"text": "
|
|
297
|
+
"text": "Whether to show a descriptive label (e.g., \"Excellent\", \"Good\") next to the rating. Default is false."
|
|
298
298
|
},
|
|
299
299
|
"getter": false,
|
|
300
300
|
"setter": false,
|
|
@@ -333,7 +333,7 @@ export class SallaRatingStars {
|
|
|
333
333
|
"optional": false,
|
|
334
334
|
"docs": {
|
|
335
335
|
"tags": [],
|
|
336
|
-
"text": "
|
|
336
|
+
"text": "Whether the rating is interactive/editable by the user. Default is false (display-only)."
|
|
337
337
|
},
|
|
338
338
|
"getter": false,
|
|
339
339
|
"setter": false,
|
|
@@ -6,6 +6,10 @@ import IconVerified from "../../assets/svg/check.svg";
|
|
|
6
6
|
import IconStar2 from "../../assets/svg/star-02.svg";
|
|
7
7
|
import IconStar2Muted from "../../assets/svg/star-02-muted.svg";
|
|
8
8
|
import IconFire2 from "../../assets/svg/fire-02.svg";
|
|
9
|
+
/**
|
|
10
|
+
* The `salla-review-card` component displays a product review with images, ratings, and product info.
|
|
11
|
+
* Supports image carousel with swipe gestures.
|
|
12
|
+
*/
|
|
9
13
|
export class SallaReviewCard {
|
|
10
14
|
constructor() {
|
|
11
15
|
this.currentSlide = 0;
|
|
@@ -158,7 +162,7 @@ export class SallaReviewCard {
|
|
|
158
162
|
return (h("a", { href: this.review?.product?.url, class: "s-review-card-product-container" }, h("img", { alt: product.image?.alt || "Product", src: product.image?.url, class: "s-review-card-product-image", width: 60, height: 60, loading: "lazy", decoding: "async", draggable: false }), h("div", { class: "s-review-card-product-details" }, h("p", { class: "s-review-card-product-details-name" }, product.name), this.showPurchaseCount ? h("p", { class: "s-review-card-product-details-purchase-count" }, h("span", { innerHTML: IconFire2 }), this.purchasedCount) : null)));
|
|
159
163
|
}
|
|
160
164
|
render() {
|
|
161
|
-
return h("div", { key: '
|
|
165
|
+
return h("div", { key: '5d214b55ba611ae39a8a3352e67c1c0c74749cae', class: "s-review-card-container" }, this.renderSlider(), this.renderSingleImage(), renderDivider(), h("div", { key: '8f761e54645173d887eaecc50bbc6e1f9664a861', class: "s-review-card-content" }, this.renderHeader(), h("p", { key: 'a75cbc58c4631f96aa112f9cd522a7ad43629b27', class: "s-review-card-review-content", innerHTML: this.review?.content }), renderDivider(), this.renderProductInfo()));
|
|
162
166
|
}
|
|
163
167
|
static get is() { return "salla-review-card"; }
|
|
164
168
|
static get originalStyleUrls() {
|
|
@@ -52,11 +52,16 @@ export class SallaReviews {
|
|
|
52
52
|
this.displayAllURL = salla.url.get('testimonials');
|
|
53
53
|
this.isRTL = salla.config.get('theme.is_rtl', true);
|
|
54
54
|
});
|
|
55
|
-
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
56
58
|
this.testimonialText = salla.lang.get('blocks.home.testimonials');
|
|
57
59
|
this.displayAllLinkText = salla.lang.get('blocks.home.display_all');
|
|
58
60
|
});
|
|
59
61
|
}
|
|
62
|
+
disconnectedCallback() {
|
|
63
|
+
this.langUnsubscribe?.();
|
|
64
|
+
}
|
|
60
65
|
fetchReviews() {
|
|
61
66
|
if (this.source === 'json') {
|
|
62
67
|
return Promise.resolve(JSON.parse(this.sourceValue));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { h, Host } from "@stencil/core";
|
|
4
|
+
import { h, Host, forceUpdate } from "@stencil/core";
|
|
5
5
|
import StoreAlt from "../../assets/svg/store-alt.svg";
|
|
6
6
|
import Search from "../../assets/svg/search.svg";
|
|
7
7
|
import { ModeType } from "./interfaces";
|
|
@@ -46,10 +46,17 @@ export class SallaScopees {
|
|
|
46
46
|
salla.event.on('scopes::open', ({ mode = null, product_id = null } = {}) => {
|
|
47
47
|
this.open(mode, product_id);
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
}
|
|
50
|
+
connectedCallback() {
|
|
51
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
50
52
|
this.translationLoaded = true;
|
|
53
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
54
|
+
forceUpdate(this);
|
|
51
55
|
});
|
|
52
56
|
}
|
|
57
|
+
disconnectedCallback() {
|
|
58
|
+
this.langUnsubscribe?.();
|
|
59
|
+
}
|
|
53
60
|
/**
|
|
54
61
|
* Whether to hand scope selection to the native app instead of rendering the web modal.
|
|
55
62
|
* Delegates only inside the native SPA webview (Salla.mobile.isSpaWebview() — bridge live AND
|
|
@@ -5,16 +5,16 @@ import { h, Host } from "@stencil/core";
|
|
|
5
5
|
export class SallaSkeleton {
|
|
6
6
|
constructor() {
|
|
7
7
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
* The shape type of the skeleton. 'circle' for circular skeletons (e.g., avatars), 'normal' for rectangular shapes. Default is 'normal'.
|
|
9
|
+
*/
|
|
10
10
|
this.type = 'normal';
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* The width of the skeleton. Can be any CSS width value (e.g., '100%', '50px', '2rem'). Default is '100%'.
|
|
13
|
+
*/
|
|
14
14
|
this.width = '100%';
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
* The height of the skeleton. Can be any CSS height value (e.g., '100%', '50px', '2rem'). Default is '100%'.
|
|
17
|
+
*/
|
|
18
18
|
this.height = '100%';
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
@@ -22,7 +22,7 @@ export class SallaSkeleton {
|
|
|
22
22
|
's-skeleton-item': true,
|
|
23
23
|
's-skeleton-item-circular': this.type == 'circle',
|
|
24
24
|
};
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '7a1ce16742202fd5e2e37eded505d94e03079137', class: "s-skeleton-wrapper", style: { width: this.width, height: this.height } }, h("div", { key: '8fb06aebef2322b52ad83f7524f42d8908c4b5b0', class: classes }, "\u00A0")));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "salla-skeleton"; }
|
|
28
28
|
static get originalStyleUrls() {
|
|
@@ -50,7 +50,7 @@ export class SallaSkeleton {
|
|
|
50
50
|
"optional": false,
|
|
51
51
|
"docs": {
|
|
52
52
|
"tags": [],
|
|
53
|
-
"text": "
|
|
53
|
+
"text": "The shape type of the skeleton. 'circle' for circular skeletons (e.g., avatars), 'normal' for rectangular shapes. Default is 'normal'."
|
|
54
54
|
},
|
|
55
55
|
"getter": false,
|
|
56
56
|
"setter": false,
|
|
@@ -70,7 +70,7 @@ export class SallaSkeleton {
|
|
|
70
70
|
"optional": false,
|
|
71
71
|
"docs": {
|
|
72
72
|
"tags": [],
|
|
73
|
-
"text": "
|
|
73
|
+
"text": "The width of the skeleton. Can be any CSS width value (e.g., '100%', '50px', '2rem'). Default is '100%'."
|
|
74
74
|
},
|
|
75
75
|
"getter": false,
|
|
76
76
|
"setter": false,
|
|
@@ -90,7 +90,7 @@ export class SallaSkeleton {
|
|
|
90
90
|
"optional": false,
|
|
91
91
|
"docs": {
|
|
92
92
|
"tags": [],
|
|
93
|
-
"text": "
|
|
93
|
+
"text": "The height of the skeleton. Can be any CSS height value (e.g., '100%', '50px', '2rem'). Default is '100%'."
|
|
94
94
|
},
|
|
95
95
|
"getter": false,
|
|
96
96
|
"setter": false,
|
|
@@ -325,14 +325,16 @@ export class SallaSlider {
|
|
|
325
325
|
isStaticWhenSingle() {
|
|
326
326
|
return this.staticWhenSingle && this.host.querySelector('[slot="items"]')?.children?.length === 1;
|
|
327
327
|
}
|
|
328
|
+
connectedCallback() {
|
|
329
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
330
|
+
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
331
|
+
});
|
|
332
|
+
}
|
|
328
333
|
async componentWillLoad() {
|
|
329
334
|
if (this.isStaticWhenSingle()) {
|
|
330
335
|
this.host.classList.add('s-slider-single-mode');
|
|
331
336
|
return;
|
|
332
337
|
}
|
|
333
|
-
salla.lang.onLoaded(() => {
|
|
334
|
-
this.displayAllTitle = salla.lang.get('blocks.home.display_all');
|
|
335
|
-
});
|
|
336
338
|
this.hasThumbSlot = !!this.host.querySelector('[slot="thumbs"]');
|
|
337
339
|
if (this.listenToThumbnailsOption) {
|
|
338
340
|
salla.event.on('product-options::change', data => {
|
|
@@ -617,6 +619,7 @@ export class SallaSlider {
|
|
|
617
619
|
this.viewportMediaQuery.addEventListener('change', this.onViewportChange);
|
|
618
620
|
}
|
|
619
621
|
disconnectedCallback() {
|
|
622
|
+
this.langUnsubscribe?.();
|
|
620
623
|
if (this.isStaticWhenSingle()) {
|
|
621
624
|
return;
|
|
622
625
|
}
|
|
@@ -17,10 +17,15 @@ export class SallaSocial {
|
|
|
17
17
|
this.iconsList = { instagram, twitter, facebook, youtube, snapchat, tiktok };
|
|
18
18
|
this.socialSlot = this.host.querySelector('[slot="social-item"]')?.innerHTML ||
|
|
19
19
|
`<a href={link} rel="noopener" target="_blank" title={type} aria-label={type}><span class="s-social-icon">{icon}</span></a>`;
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
connectedCallback() {
|
|
22
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
21
23
|
this.links = salla.config.get('store.social');
|
|
22
24
|
});
|
|
23
25
|
}
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
this.langUnsubscribe?.();
|
|
28
|
+
}
|
|
24
29
|
getLinksArray() {
|
|
25
30
|
return this.links ? Object.entries(this.links)
|
|
26
31
|
.filter(([key, value]) => !!value && key !== 'whatsapp')
|
|
@@ -31,7 +36,7 @@ export class SallaSocial {
|
|
|
31
36
|
}
|
|
32
37
|
render() {
|
|
33
38
|
const linksArray = this.getLinksArray();
|
|
34
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'ce42d3f37cc3c9b9753f9431b43267e4a49153a3' }, h("ul", { key: '515e3effaf234de3b639bc5276559f05de06e755', class: "s-social-list" }, linksArray.map((link) => (h("li", { class: "s-social-link" }, h("div", { id: "social-slot", innerHTML: this.socialSlot
|
|
35
40
|
.replace(/\{icon\}/g, this.iconsList[link.type])
|
|
36
41
|
.replace(/\{type\}/g, link.type)
|
|
37
42
|
.replace(/\{link\}/g, link.value.toString()) })))))));
|