@salla.sa/twilight-components 2.14.596 → 2.14.597
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-MMeFYRaC.js → filepond-Dw1N5qBB.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-Dd1aobB-.js → filepond-plugin-file-poster-C1ipzdpz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-Be46s5wp.js → filepond-plugin-file-validate-size-DbTJ1H8k.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Cf3OjTHE.js → filepond-plugin-file-validate-type-CDOD2WKz.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-BDX5qgng.js → filepond-plugin-image-edit-CP7JkpKx.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ilZNc8J4.js → filepond-plugin-image-exif-orientation-Bm5i6zMO.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C9c7tVEB.js → filepond-plugin-image-preview-INllb63L.js} +1 -1
- package/dist/cjs/{index-zv0p1Eys.js → index-DIEWuq3M.js} +2 -2
- package/dist/cjs/{intlTelInput-C8hiSJ_i.js → intlTelInput-bnpl10H7.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +10 -18
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +37 -15
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +26 -20
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-applied-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +7 -2
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +50 -36
- package/dist/cjs/salla-badge.cjs.entry.js +1 -1
- package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
- package/dist/cjs/salla-bullet-delivery_3.cjs.entry.js +2 -2
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +12 -5
- package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
- package/dist/cjs/salla-comment-form_9.cjs.entry.js +44 -23
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +10 -3
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/salla-count-down.cjs.entry.js +17 -12
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
- package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +7 -4
- package/dist/cjs/salla-filters.cjs.entry.js +10 -5
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +12 -7
- package/dist/cjs/salla-hook.cjs.entry.js +2 -2
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +7 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +14 -2
- package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty.cjs.entry.js +12 -5
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-map_3.cjs.entry.js +39 -15
- package/dist/cjs/salla-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item_2.cjs.entry.js +7 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +14 -7
- package/dist/cjs/salla-offer.cjs.entry.js +14 -9
- package/dist/cjs/salla-order-branch.cjs.entry.js +42 -4
- package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +7 -4
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +2 -2
- package/dist/cjs/salla-orders.cjs.entry.js +10 -6
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +10 -3
- package/dist/cjs/salla-price-range.cjs.entry.js +7 -4
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card.cjs.entry.js +14 -9
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +9 -4
- package/dist/cjs/salla-products-list.cjs.entry.js +5 -4
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +7 -2
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +9 -3
- package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-scopes.cjs.entry.js +9 -2
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +8 -8
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +8 -3
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +4 -4
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +7 -2
- package/dist/cjs/salla-trust-badges.cjs.entry.js +8 -4
- package/dist/cjs/salla-user-menu.cjs.entry.js +7 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +7 -3
- package/dist/cjs/salla-user-settings.cjs.entry.js +8 -3
- package/dist/cjs/salla-verify.cjs.entry.js +13 -6
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/translate-Cvomt6Jh.js +58 -0
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DRrOfZz0.js → vanilla-picker-BaSDLxjI.js} +1 -1
- package/dist/collection/Helpers/translate.js +36 -0
- package/dist/collection/components/salla-add-product-button/salla-add-product-button.js +7 -2
- package/dist/collection/components/salla-alert/salla-alert.js +5 -5
- package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +6 -1
- package/dist/collection/components/salla-booking-field/salla-booking-field.js +10 -4
- package/dist/collection/components/salla-bottom-alert/salla-bottom-alert.js +23 -17
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.css +2 -0
- package/dist/collection/components/salla-button/salla-button.js +19 -27
- package/dist/collection/components/salla-cart-item-offers/salla-cart-item-offers.js +10 -3
- package/dist/collection/components/salla-cart-summary/salla-cart-summary.js +2 -2
- package/dist/collection/components/salla-comment-form/salla-comment-form.js +10 -5
- package/dist/collection/components/salla-comments/salla-comment-item.js +8 -2
- package/dist/collection/components/salla-comments/salla-comments.js +9 -3
- package/dist/collection/components/salla-contacts/salla-contacts.js +9 -2
- package/dist/collection/components/salla-count-down/salla-count-down.js +23 -18
- package/dist/collection/components/salla-custom-fields/salla-custom-fields.js +4 -0
- package/dist/collection/components/salla-file-upload/salla-file-upload.js +8 -4
- package/dist/collection/components/salla-filters/salla-filters.js +10 -5
- package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +6 -3
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -6
- package/dist/collection/components/salla-hook/salla-hook.js +5 -1
- package/dist/collection/components/salla-infinite-scroll/salla-infinite-scroll.js +6 -1
- package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +15 -2
- package/dist/collection/components/salla-loyalty/salla-loyalty.js +12 -5
- package/dist/collection/components/salla-map/salla-map.js +12 -7
- package/dist/collection/components/salla-notifications/salla-notifications.js +6 -1
- package/dist/collection/components/salla-offer/salla-offer.js +12 -7
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +13 -6
- package/dist/collection/components/salla-order-branch/salla-order-branch.css +35 -0
- package/dist/collection/components/salla-order-branch/salla-order-branch.js +40 -2
- package/dist/collection/components/salla-order-summary/salla-order-summary.js +6 -3
- package/dist/collection/components/salla-order-totals-card/salla-order-totals-card.js +1 -1
- package/dist/collection/components/salla-orders/salla-orders.js +9 -5
- package/dist/collection/components/salla-placeholder/salla-placeholder.js +10 -3
- package/dist/collection/components/salla-price-range/salla-price-range.js +6 -3
- package/dist/collection/components/salla-product-availability/salla-product-availability.js +16 -7
- package/dist/collection/components/salla-product-card/salla-product-card.js +22 -17
- package/dist/collection/components/salla-product-options/salla-product-options.js +9 -6
- package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +8 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
- package/dist/collection/components/salla-progress-bar/salla-progress-bar.js +20 -4
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +6 -1
- package/dist/collection/components/salla-quick-order/salla-quick-order.js +6 -1
- package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +8 -2
- package/dist/collection/components/salla-rating-stars/salla-rating-stars.js +16 -16
- package/dist/collection/components/salla-review-card/salla-review-card.js +5 -1
- package/dist/collection/components/salla-reviews/salla-reviews.js +6 -1
- package/dist/collection/components/salla-scopes/salla-scopes.js +9 -2
- package/dist/collection/components/salla-skeleton/salla-skeleton.js +10 -10
- package/dist/collection/components/salla-slider/salla-slider.js +6 -3
- package/dist/collection/components/salla-social/salla-social.js +7 -2
- package/dist/collection/components/salla-tabs/salla-tab-header.js +3 -3
- package/dist/collection/components/salla-tel-input/salla-tel-input.js +24 -19
- package/dist/collection/components/salla-tiered-offer/salla-tiered-offer.js +6 -1
- package/dist/collection/components/salla-trust-badges/salla-trust-badges.js +7 -3
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +6 -0
- package/dist/collection/components/salla-user-profile/salla-user-profile.js +6 -2
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +7 -2
- package/dist/collection/components/salla-verify/salla-verify.js +13 -6
- package/dist/components/index.js +2 -2
- package/dist/components/salla-add-product-button2.js +7 -2
- package/dist/components/salla-alert.js +2 -2
- package/dist/components/salla-apps-icons.js +6 -1
- package/dist/components/salla-booking-field2.js +10 -4
- package/dist/components/salla-bottom-alert.js +23 -17
- package/dist/components/salla-bullet-delivery.js +1 -1
- package/dist/components/salla-button2.js +9 -17
- package/dist/components/salla-cart-item-offers.js +10 -3
- package/dist/components/salla-cart-summary.js +1 -1
- package/dist/components/salla-comment-form2.js +10 -5
- package/dist/components/salla-comment-item2.js +8 -2
- package/dist/components/salla-comments.js +9 -3
- package/dist/components/salla-contacts.js +9 -2
- package/dist/components/salla-count-down2.js +16 -11
- package/dist/components/salla-file-upload2.js +8 -4
- package/dist/components/salla-filters-widget2.js +6 -3
- package/dist/components/salla-filters.js +9 -4
- package/dist/components/salla-gifting.js +11 -6
- package/dist/components/salla-hook.js +1 -1
- package/dist/components/salla-infinite-scroll.js +6 -1
- package/dist/components/salla-localization-modal.js +15 -2
- package/dist/components/salla-loyalty.js +12 -5
- package/dist/components/salla-map2.js +12 -7
- package/dist/components/salla-notifications.js +6 -1
- package/dist/components/salla-offer-modal.js +13 -6
- package/dist/components/salla-offer.js +12 -7
- package/dist/components/salla-order-branch.js +41 -3
- package/dist/components/salla-order-summary.js +6 -3
- package/dist/components/salla-order-totals-card.js +1 -1
- package/dist/components/salla-orders.js +9 -5
- package/dist/components/salla-placeholder2.js +10 -3
- package/dist/components/salla-price-range2.js +6 -3
- package/dist/components/salla-product-availability2.js +16 -7
- package/dist/components/salla-product-card2.js +13 -8
- package/dist/components/salla-product-options2.js +9 -6
- package/dist/components/salla-product-size-guide.js +8 -3
- package/dist/components/salla-products-list2.js +4 -3
- package/dist/components/salla-progress-bar2.js +20 -4
- package/dist/components/salla-quick-buy2.js +6 -1
- package/dist/components/salla-quick-order.js +6 -1
- package/dist/components/salla-rating-modal2.js +8 -2
- package/dist/components/salla-rating-stars2.js +10 -10
- package/dist/components/salla-review-card2.js +1 -1
- package/dist/components/salla-reviews.js +6 -1
- package/dist/components/salla-scopes.js +9 -2
- package/dist/components/salla-skeleton2.js +7 -7
- package/dist/components/salla-slider2.js +6 -3
- package/dist/components/salla-social.js +7 -2
- package/dist/components/salla-tab-header2.js +3 -3
- package/dist/components/salla-tel-input2.js +24 -19
- package/dist/components/salla-tiered-offer.js +6 -1
- package/dist/components/salla-trust-badges.js +7 -3
- package/dist/components/salla-user-menu.js +6 -0
- package/dist/components/salla-user-profile.js +6 -2
- package/dist/components/salla-user-settings.js +7 -2
- package/dist/components/salla-verify.js +13 -6
- package/dist/components/translate.js +37 -1
- package/dist/docs.json +44 -44
- package/dist/esm/{filepond-okemUEVJ.js → filepond-DfLkIBAw.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-He-1QDcm.js → filepond-plugin-file-poster-D3ie06bz.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BoQ9OZHK.js → filepond-plugin-file-validate-size-C_S_eFQe.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BVxE-7xU.js → filepond-plugin-file-validate-type-BE7nqQRE.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DJnNmArQ.js → filepond-plugin-image-edit-C6jDcMnX.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-CgkqV9g5.js → filepond-plugin-image-exif-orientation-nKXdF-ae.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-DxbixTNR.js → filepond-plugin-image-preview-Dzl44GI1.js} +1 -1
- package/dist/esm/{index-C1mBhG6Z.js → index-BmRQjBRH.js} +2 -2
- package/dist/esm/{intlTelInput-wxpsRy0u.js → intlTelInput-dGrU4Iu9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +10 -18
- package/dist/esm/salla-add-product-button_5.entry.js +37 -15
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +26 -20
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-applied-filters.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +7 -2
- package/dist/esm/salla-attachment-view_9.entry.js +50 -36
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-bullet-delivery_3.entry.js +2 -2
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +12 -5
- package/dist/esm/salla-cart-summary-card.entry.js +1 -1
- package/dist/esm/salla-cashback-banner.entry.js +1 -1
- package/dist/esm/salla-comment-factors.entry.js +1 -1
- package/dist/esm/salla-comment-form_9.entry.js +44 -23
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +10 -3
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/salla-count-down.entry.js +17 -12
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-delivery-promise.entry.js +1 -1
- package/dist/esm/salla-edit-order-button.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +7 -4
- package/dist/esm/salla-filters.entry.js +10 -5
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +12 -7
- package/dist/esm/salla-hook.entry.js +2 -2
- package/dist/esm/salla-infinite-scroll.entry.js +7 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +14 -2
- package/dist/esm/salla-login-modal.entry.js +1 -1
- package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
- package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
- package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty.entry.js +12 -5
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/salla-map_3.entry.js +39 -15
- package/dist/esm/salla-menu.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
- package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-next-order-coupon.entry.js +1 -1
- package/dist/esm/salla-notification-item_2.entry.js +7 -2
- package/dist/esm/salla-offer-modal.entry.js +14 -7
- package/dist/esm/salla-offer.entry.js +14 -9
- package/dist/esm/salla-order-branch.entry.js +42 -4
- package/dist/esm/salla-order-cancel.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-edit-item.entry.js +1 -1
- package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
- package/dist/esm/salla-order-edit.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +7 -4
- package/dist/esm/salla-order-totals-card.entry.js +2 -2
- package/dist/esm/salla-orders.entry.js +10 -6
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +10 -3
- package/dist/esm/salla-price-range.entry.js +7 -4
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/salla-product-card.entry.js +14 -9
- package/dist/esm/salla-product-size-guide.entry.js +9 -4
- package/dist/esm/salla-products-list.entry.js +5 -4
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +7 -2
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +9 -3
- package/dist/esm/salla-review-factors-tags.entry.js +1 -1
- package/dist/esm/salla-review-order-item.entry.js +1 -1
- package/dist/esm/salla-scopes.entry.js +9 -2
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +8 -8
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +8 -3
- package/dist/esm/salla-tab-content_3.entry.js +4 -4
- package/dist/esm/salla-tiered-offer.entry.js +7 -2
- package/dist/esm/salla-trust-badges.entry.js +8 -4
- package/dist/esm/salla-user-menu.entry.js +7 -1
- package/dist/esm/salla-user-profile.entry.js +7 -3
- package/dist/esm/salla-user-settings.entry.js +8 -3
- package/dist/esm/salla-verify.entry.js +13 -6
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/translate-CxrJQ3Jf.js +54 -0
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-CQEJbE9K.js → vanilla-picker-DRghK0RD.js} +1 -1
- package/dist/twilight/p-00e1f5fd.entry.js +4 -0
- package/dist/twilight/{p-da9bd7f6.entry.js → p-12338d19.entry.js} +1 -1
- package/dist/twilight/p-1557d0ca.entry.js +4 -0
- package/dist/twilight/{p-160476f0.entry.js → p-15ab81d6.entry.js} +1 -1
- package/dist/twilight/p-182d7bab.entry.js +4 -0
- package/dist/twilight/p-1908ab44.entry.js +4 -0
- package/dist/twilight/p-19592be3.entry.js +4 -0
- package/dist/twilight/{p-c82f46a9.entry.js → p-1a8c7481.entry.js} +1 -1
- package/dist/twilight/p-1c8bf883.entry.js +4 -0
- package/dist/twilight/{p-d6d72996.entry.js → p-1c8dde1a.entry.js} +1 -1
- package/dist/twilight/p-1f2844db.entry.js +4 -0
- package/dist/twilight/{p-3a465851.entry.js → p-2cf7eb3b.entry.js} +1 -1
- package/dist/twilight/p-2de4c351.entry.js +4 -0
- package/dist/twilight/{p-fd787b30.entry.js → p-2de666d8.entry.js} +1 -1
- package/dist/twilight/p-33e769b3.entry.js +4 -0
- package/dist/twilight/{p-f8aa1b23.entry.js → p-3745be6d.entry.js} +1 -1
- package/dist/twilight/p-39a16468.entry.js +4 -0
- package/dist/twilight/{p-8eb75cf8.entry.js → p-3a996401.entry.js} +1 -1
- package/dist/twilight/{p-81596b48.entry.js → p-3bf933f6.entry.js} +1 -1
- package/dist/twilight/p-3d1842e4.entry.js +4 -0
- package/dist/twilight/p-3f373f1e.entry.js +4 -0
- package/dist/twilight/{p-b3abf071.entry.js → p-3f66f717.entry.js} +1 -1
- package/dist/twilight/p-3fdaf198.entry.js +4 -0
- package/dist/twilight/p-41248f5f.entry.js +4 -0
- package/dist/twilight/{p-ca7593c0.entry.js → p-4235b3c2.entry.js} +1 -1
- package/dist/twilight/{p-caee5b0d.entry.js → p-4aa07eca.entry.js} +1 -1
- package/dist/twilight/{p-1080831a.entry.js → p-4b111d7a.entry.js} +1 -1
- package/dist/twilight/{p-d75157e0.entry.js → p-51694dd2.entry.js} +1 -1
- package/dist/twilight/{p-8513fec2.entry.js → p-55b5158c.entry.js} +1 -1
- package/dist/twilight/{p-e4589779.entry.js → p-5617656f.entry.js} +1 -1
- package/dist/twilight/{p-ac20a6de.entry.js → p-58dcc966.entry.js} +1 -1
- package/dist/twilight/p-5f35b46a.entry.js +4 -0
- package/dist/twilight/{p-62653d93.entry.js → p-60e1fb1a.entry.js} +1 -1
- package/dist/twilight/{p-7ac91ace.entry.js → p-61956814.entry.js} +1 -1
- package/dist/twilight/p-6854e982.entry.js +4 -0
- package/dist/twilight/{p-fac4da2b.entry.js → p-68919916.entry.js} +1 -1
- package/dist/twilight/p-6b0d6b9b.entry.js +4 -0
- package/dist/twilight/p-71cbf7a4.entry.js +4 -0
- package/dist/twilight/{p-c28395c6.entry.js → p-730101ff.entry.js} +1 -1
- package/dist/twilight/p-737b93c2.entry.js +4 -0
- package/dist/twilight/p-74ccf675.entry.js +4 -0
- package/dist/twilight/{p-f47a1351.entry.js → p-7aa15258.entry.js} +1 -1
- package/dist/twilight/{p-d6508494.entry.js → p-7c7648d7.entry.js} +1 -1
- package/dist/twilight/p-7dfe99e6.entry.js +4 -0
- package/dist/twilight/{p-54bc613c.entry.js → p-7e724019.entry.js} +1 -1
- package/dist/twilight/p-8248cecd.entry.js +4 -0
- package/dist/twilight/p-844ebeb6.entry.js +4 -0
- package/dist/twilight/{p-8ec0fc03.entry.js → p-87cedb04.entry.js} +1 -1
- package/dist/twilight/p-8b21158b.entry.js +4 -0
- package/dist/twilight/{p-844176cb.entry.js → p-8c10cb85.entry.js} +1 -1
- package/dist/twilight/p-8e2488fe.entry.js +4 -0
- package/dist/twilight/{p-c89282b0.entry.js → p-9108e712.entry.js} +1 -1
- package/dist/twilight/p-91326a74.entry.js +4 -0
- package/dist/twilight/{p-60d06105.entry.js → p-96f9eb1f.entry.js} +1 -1
- package/dist/twilight/p-99463d58.entry.js +4 -0
- package/dist/twilight/p-9e196eb0.entry.js +4 -0
- package/dist/twilight/{p-CtcjG32v.js → p-B4fbRnFh.js} +1 -1
- package/dist/twilight/{p-BB23a2fo.js → p-BIToxPOg.js} +1 -1
- package/dist/twilight/{p-C1mBhG6Z.js → p-BmRQjBRH.js} +1 -1
- package/dist/twilight/{p-E2n9kJc8.js → p-C1XjCBHg.js} +1 -1
- package/dist/twilight/{p-DiU9tYvl.js → p-C48Rktr4.js} +1 -1
- package/dist/twilight/{p-Bm1ywp6t.js → p-CWismw4I.js} +1 -1
- package/dist/twilight/p-CxrJQ3Jf.js +4 -0
- package/dist/twilight/{p-CJPWrlxL.js → p-DYEGhE1O.js} +1 -1
- package/dist/twilight/{p-Gxv67UlH.js → p-DnZfyhH5.js} +1 -1
- package/dist/twilight/{p-pzi0Osm7.js → p-OCGvfvVA.js} +1 -1
- package/dist/twilight/{p-672a709e.entry.js → p-a80acba3.entry.js} +1 -1
- package/dist/twilight/{p-474997dd.entry.js → p-ab1d320f.entry.js} +1 -1
- package/dist/twilight/{p-dbc1e40c.entry.js → p-ac7d45b6.entry.js} +1 -1
- package/dist/twilight/{p-e43c49e9.entry.js → p-aeafb519.entry.js} +1 -1
- package/dist/twilight/p-b5499627.entry.js +4 -0
- package/dist/twilight/{p-e98835e3.entry.js → p-b5829615.entry.js} +1 -1
- package/dist/twilight/p-b6c5435e.entry.js +4 -0
- package/dist/twilight/{p-5e426c78.entry.js → p-baaa3e72.entry.js} +1 -1
- package/dist/twilight/{p-5e099f96.entry.js → p-bfdde3db.entry.js} +1 -1
- package/dist/twilight/p-c22ea75b.entry.js +4 -0
- package/dist/twilight/{p-1a5d0b25.entry.js → p-c3d33aee.entry.js} +1 -1
- package/dist/twilight/{p-f130c67f.entry.js → p-c5d4f71c.entry.js} +1 -1
- package/dist/twilight/{p-a11b77df.entry.js → p-cc46f297.entry.js} +1 -1
- package/dist/twilight/p-cca10a34.entry.js +4 -0
- package/dist/twilight/p-cdbb6758.entry.js +4 -0
- package/dist/twilight/{p-f643bf2f.entry.js → p-cf1cc0d1.entry.js} +1 -1
- package/dist/twilight/{p-67d3ee58.entry.js → p-d034a3ba.entry.js} +1 -1
- package/dist/twilight/{p-dcb5ceda.entry.js → p-d307d40a.entry.js} +1 -1
- package/dist/twilight/p-d37e6c2f.entry.js +4 -0
- package/dist/twilight/{p-21ba0eac.entry.js → p-d3be7885.entry.js} +1 -1
- package/dist/twilight/{p-9d434410.entry.js → p-d542e647.entry.js} +1 -1
- package/dist/twilight/{p-f3985cfd.entry.js → p-db9994c2.entry.js} +1 -1
- package/dist/twilight/p-dd4bcce0.entry.js +4 -0
- package/dist/twilight/{p-de55326d.entry.js → p-de3c5f91.entry.js} +1 -1
- package/dist/twilight/{p-342b31ba.entry.js → p-e2d1d888.entry.js} +1 -1
- package/dist/twilight/{p-6602a61a.entry.js → p-e6bc3cf4.entry.js} +1 -1
- package/dist/twilight/{p-12a2b743.entry.js → p-e8d94147.entry.js} +1 -1
- package/dist/twilight/{p-e00ed6c9.entry.js → p-e9319448.entry.js} +1 -1
- package/dist/twilight/{p-4bde9c4e.entry.js → p-ec1589cf.entry.js} +1 -1
- package/dist/twilight/{p-58058ae9.entry.js → p-ece1fecd.entry.js} +1 -1
- package/dist/twilight/{p-97bb12a6.entry.js → p-f0180034.entry.js} +1 -1
- package/dist/twilight/{p-4b0eaa16.entry.js → p-f348601d.entry.js} +1 -1
- package/dist/twilight/{p-c28c53c3.entry.js → p-f5afeed8.entry.js} +1 -1
- package/dist/twilight/p-f70fa2e9.entry.js +4 -0
- package/dist/twilight/{p-80699771.entry.js → p-f76349b3.entry.js} +1 -1
- package/dist/twilight/{p-5babb989.entry.js → p-fa600113.entry.js} +1 -1
- package/dist/twilight/p-fde4cf31.entry.js +4 -0
- package/dist/twilight/{p-cb770a9e.entry.js → p-fe3645b0.entry.js} +1 -1
- package/dist/twilight/{p-8bdb7f71.entry.js → p-feb068a2.entry.js} +1 -1
- package/dist/twilight/{p-C57CqqgQ.js → p-imI5he7m.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/Helpers/translate.d.ts +17 -0
- package/dist/types/components/salla-add-product-button/salla-add-product-button.d.ts +2 -1
- package/dist/types/components/salla-alert/salla-alert.d.ts +3 -3
- package/dist/types/components/salla-apps-icons/salla-apps-icons.d.ts +3 -0
- package/dist/types/components/salla-booking-field/salla-booking-field.d.ts +3 -0
- package/dist/types/components/salla-bottom-alert/salla-bottom-alert.d.ts +3 -1
- package/dist/types/components/salla-button/salla-button.d.ts +10 -18
- package/dist/types/components/salla-cart-item-offers/salla-cart-item-offers.d.ts +3 -0
- package/dist/types/components/salla-cart-summary/salla-cart-summary.d.ts +2 -2
- package/dist/types/components/salla-comment-form/salla-comment-form.d.ts +3 -0
- package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
- package/dist/types/components/salla-comments/salla-comments.d.ts +3 -0
- package/dist/types/components/salla-contacts/salla-contacts.d.ts +4 -0
- package/dist/types/components/salla-count-down/salla-count-down.d.ts +17 -14
- package/dist/types/components/salla-custom-fields/salla-custom-fields.d.ts +4 -0
- package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +2 -0
- package/dist/types/components/salla-filters/salla-filters.d.ts +4 -1
- package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +2 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +3 -0
- package/dist/types/components/salla-hook/salla-hook.d.ts +4 -0
- package/dist/types/components/salla-infinite-scroll/salla-infinite-scroll.d.ts +3 -0
- package/dist/types/components/salla-localization-modal/salla-localization-modal.d.ts +4 -0
- package/dist/types/components/salla-loyalty/salla-loyalty.d.ts +3 -0
- package/dist/types/components/salla-map/salla-map.d.ts +3 -0
- package/dist/types/components/salla-notifications/salla-notifications.d.ts +3 -1
- package/dist/types/components/salla-offer/salla-offer.d.ts +3 -0
- package/dist/types/components/salla-offer-modal/salla-offer-modal.d.ts +3 -0
- package/dist/types/components/salla-order-branch/interfaces.d.ts +1 -0
- package/dist/types/components/salla-order-branch/salla-order-branch.d.ts +10 -1
- package/dist/types/components/salla-order-summary/salla-order-summary.d.ts +2 -0
- package/dist/types/components/salla-order-totals-card/interfaces.d.ts +1 -0
- package/dist/types/components/salla-orders/salla-orders.d.ts +3 -1
- package/dist/types/components/salla-placeholder/salla-placeholder.d.ts +3 -1
- package/dist/types/components/salla-price-range/salla-price-range.d.ts +2 -0
- package/dist/types/components/salla-product-availability/salla-product-availability.d.ts +4 -0
- package/dist/types/components/salla-product-card/salla-product-card.d.ts +12 -9
- package/dist/types/components/salla-product-options/salla-product-options.d.ts +2 -0
- package/dist/types/components/salla-product-size-guide/salla-product-size-guide.d.ts +3 -0
- package/dist/types/components/salla-products-list/salla-products-list.d.ts +1 -0
- package/dist/types/components/salla-progress-bar/salla-progress-bar.d.ts +5 -0
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +3 -1
- package/dist/types/components/salla-quick-order/salla-quick-order.d.ts +3 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +3 -0
- package/dist/types/components/salla-rating-stars/salla-rating-stars.d.ts +14 -14
- package/dist/types/components/salla-review-card/salla-review-card.d.ts +4 -0
- package/dist/types/components/salla-reviews/salla-reviews.d.ts +3 -0
- package/dist/types/components/salla-scopes/salla-scopes.d.ts +3 -0
- package/dist/types/components/salla-skeleton/salla-skeleton.d.ts +6 -6
- package/dist/types/components/salla-slider/salla-slider.d.ts +2 -0
- package/dist/types/components/salla-social/salla-social.d.ts +3 -0
- package/dist/types/components/salla-tabs/salla-tab-header.d.ts +2 -2
- package/dist/types/components/salla-tel-input/salla-tel-input.d.ts +3 -1
- package/dist/types/components/salla-tiered-offer/salla-tiered-offer.d.ts +3 -1
- package/dist/types/components/salla-trust-badges/salla-trust-badges.d.ts +3 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +3 -0
- package/dist/types/components/salla-user-profile/salla-user-profile.d.ts +3 -1
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +3 -0
- package/dist/types/components/salla-verify/salla-verify.d.ts +3 -0
- package/dist/types/components.d.ts +128 -80
- package/package.json +5 -5
- package/dist/cjs/translate-BeU1QX_r.js +0 -20
- package/dist/esm/translate-CrSV-tno.js +0 -18
- package/dist/twilight/p-020eb2a1.entry.js +0 -4
- package/dist/twilight/p-06799084.entry.js +0 -4
- package/dist/twilight/p-0a3abfd4.entry.js +0 -4
- package/dist/twilight/p-0ef388be.entry.js +0 -4
- package/dist/twilight/p-1f99db23.entry.js +0 -4
- package/dist/twilight/p-232c39e9.entry.js +0 -4
- package/dist/twilight/p-305ed224.entry.js +0 -4
- package/dist/twilight/p-3a4cf66c.entry.js +0 -4
- package/dist/twilight/p-3c4702bb.entry.js +0 -4
- package/dist/twilight/p-3dcb5129.entry.js +0 -4
- package/dist/twilight/p-43d0c80e.entry.js +0 -4
- package/dist/twilight/p-50bbbd18.entry.js +0 -4
- package/dist/twilight/p-51c26ce7.entry.js +0 -4
- package/dist/twilight/p-54054ab9.entry.js +0 -4
- package/dist/twilight/p-5c1a36ab.entry.js +0 -4
- package/dist/twilight/p-5cf3929c.entry.js +0 -4
- package/dist/twilight/p-8028be6f.entry.js +0 -4
- package/dist/twilight/p-82939afe.entry.js +0 -4
- package/dist/twilight/p-85cff524.entry.js +0 -4
- package/dist/twilight/p-8dfdd6c9.entry.js +0 -4
- package/dist/twilight/p-92f6aa52.entry.js +0 -4
- package/dist/twilight/p-CrSV-tno.js +0 -4
- package/dist/twilight/p-a4aac112.entry.js +0 -4
- package/dist/twilight/p-a52bfa57.entry.js +0 -4
- package/dist/twilight/p-a9aadc0b.entry.js +0 -4
- package/dist/twilight/p-bc26490f.entry.js +0 -4
- package/dist/twilight/p-bef93c52.entry.js +0 -4
- package/dist/twilight/p-c30bfc0b.entry.js +0 -4
- package/dist/twilight/p-cbcca1ff.entry.js +0 -4
- package/dist/twilight/p-d81bcfb3.entry.js +0 -4
- package/dist/twilight/p-e67b2aa8.entry.js +0 -4
- package/dist/twilight/p-e9ce8dec.entry.js +0 -4
- package/dist/twilight/p-eb718f6b.entry.js +0 -4
- package/dist/twilight/p-ec361a66.entry.js +0 -4
- package/dist/twilight/p-f32de457.entry.js +0 -4
- package/dist/twilight/p-f626ef96.entry.js +0 -4
- package/dist/twilight/p-f6df7f8a.entry.js +0 -4
- package/dist/twilight/p-fd3bb3f2.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BmRQjBRH.js';
|
|
5
5
|
import { A as ArrowDown } from './keyboard_arrow_down-DCZbpt2a.js';
|
|
6
6
|
import { B as BellRing } from './bell-ring-D3mWkc-3.js';
|
|
7
7
|
import { C as Cart } from './cart-gFG8By9O.js';
|
|
@@ -113,6 +113,12 @@ const SallaUserMenu = class {
|
|
|
113
113
|
profile: UserCircle
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
this.langUnsubscribe = salla.lang.subscribe(() => this.loadTranslations());
|
|
118
|
+
}
|
|
119
|
+
disconnectedCallback() {
|
|
120
|
+
this.langUnsubscribe?.();
|
|
121
|
+
}
|
|
116
122
|
async componentWillLoad() {
|
|
117
123
|
await salla.onReady();
|
|
118
124
|
await salla.lang.onLoaded();
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h } from './index-
|
|
4
|
+
import { r as registerInstance, h } from './index-BmRQjBRH.js';
|
|
5
5
|
import { G as Genders } from './interfaces-OF8QcbMM.js';
|
|
6
6
|
|
|
7
7
|
const sallaUserProfileCss = "/*!twlt*/:host{display:block}.form-input{height:2.5rem;width:100%;border-radius:0.375rem;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.form-input:focus{border-color:var(--color-primary);--tw-ring-color:transparent}.form-input:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.form-input:focus:is(.dark *){border-color:var(--color-primary)}@media (min-width: 640px){.form-input{font-size:0.875rem;line-height:1.25rem}}.s-user-profile-wrapper{display:grid;grid-template-columns:repeat(1, minmax(0, 1fr));gap:1.5rem}@media (min-width: 640px){.s-user-profile-wrapper{grid-template-columns:repeat(2, minmax(0, 1fr));gap:2rem}}.s-user-profile-field-label{margin-bottom:0.5rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.s-user-profile-field-error{--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-user-profile-submit{margin-top:1.5rem;width:100%}.s-user-profile-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-user-profile-filepond-placeholder-icon{margin-bottom:0.25rem}.s-user-profile-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-user-profile-skeleton-wrapper{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));grid-template-rows:repeat(3, minmax(0, 1fr));gap:3rem}";
|
|
8
8
|
|
|
9
9
|
const SallaUserProfile = class {
|
|
10
|
-
// Constructor
|
|
11
10
|
constructor(hostRef) {
|
|
12
11
|
registerInstance(this, hostRef);
|
|
13
12
|
/**
|
|
@@ -36,8 +35,10 @@ const SallaUserProfile = class {
|
|
|
36
35
|
this.invalid_email_trans = salla.lang.get('pages.error.invalid_value', {
|
|
37
36
|
attribute: 'email',
|
|
38
37
|
});
|
|
38
|
+
}
|
|
39
|
+
connectedCallback() {
|
|
39
40
|
// Localization setup when the language is loaded
|
|
40
|
-
salla.lang.
|
|
41
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
41
42
|
// Assigning translated strings to state properties
|
|
42
43
|
// These translations are fetched from the localization object
|
|
43
44
|
this.first_name_trans = salla.lang.get('pages.profile.first_name');
|
|
@@ -59,6 +60,9 @@ const SallaUserProfile = class {
|
|
|
59
60
|
});
|
|
60
61
|
});
|
|
61
62
|
}
|
|
63
|
+
disconnectedCallback() {
|
|
64
|
+
this.langUnsubscribe?.();
|
|
65
|
+
}
|
|
62
66
|
// Event handler for phone number field changes
|
|
63
67
|
phoneNumberFieldEventHandler(data) {
|
|
64
68
|
if (!data.detail.number) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BmRQjBRH.js';
|
|
5
5
|
|
|
6
6
|
var Bullhorn = `<!-- Generated by IcoMoon.io -->
|
|
7
7
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
@@ -135,11 +135,16 @@ const SallaUserSettings = class {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
|
-
|
|
138
|
+
}
|
|
139
|
+
connectedCallback() {
|
|
140
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
139
141
|
this.registerTranslationDefaults();
|
|
140
142
|
this.loadTranslations();
|
|
141
143
|
});
|
|
142
144
|
}
|
|
145
|
+
disconnectedCallback() {
|
|
146
|
+
this.langUnsubscribe?.();
|
|
147
|
+
}
|
|
143
148
|
getDaysUntilExecution(executionAt) {
|
|
144
149
|
const executionMs = executionAt > 1e12 ? executionAt : executionAt * 1000;
|
|
145
150
|
return Math.max(0, Math.ceil((executionMs - Date.now()) / 86400000));
|
|
@@ -554,7 +559,7 @@ const SallaUserSettings = class {
|
|
|
554
559
|
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
|
|
555
560
|
}
|
|
556
561
|
render() {
|
|
557
|
-
return (h(Host, { key: '
|
|
562
|
+
return (h(Host, { key: '371350c4fcfd92a9434000b1390cb5ab01a92cc5', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: '4e4ade371cc81d7e4c5750f5341f30bfcfc082a6', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'fd23340814c525c686f9c94e17bc6a3d2182ac1e' }, h("div", { key: 'd0cfc9df3a6072335133ac2817ed9afa34ea489e', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '17546bf4c7931fafdb769168c6cb1788303a6312', innerHTML: UserCancel })), h("div", { key: '09ec636514d69b741a3cd1a91d5599d0ff34cca1', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: 'f69abae297492ed509475590b2623745efb30f03', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '17c0191aae2401b8a1cd22942a5acecc0dfe1c62', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '6b55ddc3ec0a01767f870e279ae7bfad9f43663e', class: "s-toggle" }, h("input", { key: '18af334c71b48528543de61a9c3a71a73dc054b5', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'c90548df6ff7dc5beceeb2347545923ea4de096e', class: "s-toggle-switcher" })))))), h("div", { key: 'c471b3a73abbfbc1a894e5f2c9fcb8af4ea085f5', class: "s-user-settings-section" }, h("salla-list-tile", { key: 'a906c43c0b227d6f757ec919047cfade9192cdc4' }, h("div", { key: '7e4c1375e64883c3465393f855a9faa987137bc1', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '5d8ee4cb69ddf765ddb6c108594c7de4cbedd078', innerHTML: Bullhorn })), h("div", { key: '4e0e5b84822e98234be621eab4150c48581e104b', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'ac8521a039e4e869cb1aeea7213df8b70ce87bb7', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '6caa3b3d1fe8eadc194ad44a4e2299f9a95018ea', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '37a26623047ef4cb98f7bbdb8715b515488c5ac0', class: "s-toggle" }, h("input", { key: 'f74fbb125afb8743fc981672ffa56b129c4ed2ed', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '45b367693d63424e859d4dce5538a2ee37ff76a7', class: "s-toggle-switcher" }))))), this.isDeleteAccountEnabled ? (h("div", { class: "s-user-settings-section s-user-settings-section-delete-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, this.renderUserDeleteIcon()), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deleteAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.isDeletePending ? this.deleteAccountPending : this.deleteAccountDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, this.renderDeleteSectionAction())))) : (h("div", { class: "s-user-settings-section s-user-settings-section-deactivate-user" }, h("salla-list-tile", null, h("div", { slot: "icon", class: "s-user-settings-section-icon" }, h("span", { innerHTML: UserOff })), h("div", { slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.deactivateAccount)), h("div", { slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.deactivateDesc)), h("div", { slot: "action", class: "s-user-settings-section-action" }, h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeactivateModal() }, this.capitalizeText(this.deactivateAccount)))))), this.isDeleteAccountEnabled ? (h("salla-modal", { id: "salla-user-settings-delete-modal", width: "xs", centered: true, showBack: this.currentStep === 'otp', isClosable: this.currentStep !== 'success', iconStyle: this.currentStep === 'success' ? 'success' : undefined, onModalVisibilityChanged: e => this.handleModalVisibilityChanged(e), onModalBack: () => this.goBackFromOtp(), ref: modal => (this.confirmationModal = modal) }, this.currentStep !== 'success' ? (h("span", { slot: "icon", class: "s-user-settings-delete-icon" }, this.renderUserDeleteIcon())) : null, h("div", { key: this.currentStep, class: "s-user-settings-delete-step" }, this.renderDeleteStep()))) : (h("salla-modal", { width: "sm", subTitle: this.capitalizeText(this.sorryForLeavingText), ref: modal => (this.confirmationModal = modal) }, h("span", { slot: "icon", class: "s-user-settings-confirmation-icon", innerHTML: UserOff }), h("div", { class: "s-user-settings-confirmation" }, h("div", { class: "s-user-settings-confirmation-warning" }, this.capitalizeText(this.warningText)), h("div", { class: "s-user-settings-confirmation-actions" }, h("salla-button", { width: "wide", onClick: () => this.confirmationModal.close() }, this.capitalizeText(this.keepAccount)), h("salla-button", { fill: "outline", loading: this.buttonLoading, width: "wide", onClick: () => this.confirmDeactivateAccount() }, this.capitalizeText(this.deactivateAccount))))))));
|
|
558
563
|
}
|
|
559
564
|
};
|
|
560
565
|
SallaUserSettings.style = sallaUserSettingsCss;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-BmRQjBRH.js';
|
|
5
5
|
import { M as MailIcon } from './mail-DmgxDvXL.js';
|
|
6
6
|
|
|
7
7
|
var AndroidPhoneIcon = `<!-- Generated by IcoMoon.io -->
|
|
@@ -39,11 +39,6 @@ const SallaVerify = class {
|
|
|
39
39
|
* to use: `salla.api.auth.verify` or `salla.profile.verify`
|
|
40
40
|
*/
|
|
41
41
|
this.isProfileVerify = false;
|
|
42
|
-
salla.lang.onLoaded(() => {
|
|
43
|
-
this.translationLoaded = true;
|
|
44
|
-
this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + this.type);
|
|
45
|
-
this.modal?.setTitle(this.title);
|
|
46
|
-
});
|
|
47
42
|
if (this.display == 'inline') {
|
|
48
43
|
this.modal = { open: () => '', close: () => '', setTitle: () => '' };
|
|
49
44
|
return;
|
|
@@ -69,6 +64,18 @@ const SallaVerify = class {
|
|
|
69
64
|
this.timer.innerHTML = '30 : 00';
|
|
70
65
|
});
|
|
71
66
|
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.langUnsubscribe = salla.lang.subscribe(() => {
|
|
69
|
+
this.translationLoaded = true;
|
|
70
|
+
this.title = salla.lang.get('pages.profile.verify_title') + salla.lang.get('common.elements.' + this.type);
|
|
71
|
+
this.modal?.setTitle(this.title);
|
|
72
|
+
// translationLoaded is already true on later calls, so force the render that refreshes the labels read in render()
|
|
73
|
+
forceUpdate(this);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
disconnectedCallback() {
|
|
77
|
+
this.langUnsubscribe?.();
|
|
78
|
+
}
|
|
72
79
|
splitNumber(e) {
|
|
73
80
|
this.resetError();
|
|
74
81
|
let data = e.data || e.target.value; // Chrome doesn't get the e.data, it's always empty, fallback to value then.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BmRQjBRH.js';
|
|
5
5
|
|
|
6
6
|
const sallaWalletCss = "/*!twlt*/@charset \"UTF-8\";.s-wallet-table{min-width:100%}.s-wallet-table-balance-container{display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:1rem}.s-wallet-table-balance-icon{border-radius:50%;width:52px;height:52px;font-size:25px;padding:16px 13px;background:var(--color-primary-reverse);color:var(--color-primary)}.s-wallet-table-empty-state{display:flex;flex-direction:column;align-items:center}.s-wallet-table-empty-state i{font-size:80px;margin:4rem 0 2rem;color:var(--infinte-color)}.s-wallet-table-transaction-status{padding:6px 19px !important;border-radius:20px;width:max-content;display:flex;align-items:center}.s-wallet-table-transaction-status-default{background:#fff6eb;color:#a46f29}.s-wallet-table-transaction-status-cashback{background:#effbf6;color:#00af6c}.s-wallet-table-transaction-status-refund{background:#ecf3fe;color:#5196f3}.s-wallet-table-transaction-status-purchase{background:#feecec;color:#f55157}.s-wallet-table-transaction-status-icons-success{color:#00af6c}.s-wallet-summary{display:flex;align-items:stretch;gap:16px;margin-bottom:28px}.s-wallet-balance-card{flex:0 0 34%;max-width:240px;background:#fff;border-radius:12px;padding:20px;box-sizing:border-box}.s-wallet-balance-mark{width:48px;height:48px;border-radius:9999px;background:var(--color-primary-reverse, #eaf7f0);color:var(--color-primary, #2e8b57);display:inline-flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:12px}.s-wallet-balance-figure{font-size:18px;font-weight:700;color:#1c1c1c}.s-wallet-balance-label{margin-top:2px;font-size:12px;color:#9aa0a6}.s-wallet-amount{display:inline-flex;align-items:center;gap:4px;font-weight:700;white-space:nowrap}.s-wallet-amount-credit{color:#00af6c}.s-wallet-amount-debit{color:#f55157}.s-wallet-transaction-type{display:flex;align-items:center;color:#4b5563}@media screen and (min-width: 768px){.s-wallet-balance-card{display:flex;flex-direction:column;justify-content:center}}@media screen and (max-width: 767px){.s-wallet-summary{gap:12px;margin-bottom:20px}.s-wallet-balance-card{flex:0 0 38%;padding:16px;text-align:center}.s-wallet-balance-mark{margin-bottom:8px}}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.table{display:table}.hidden{display:none}.items-center{align-items:center}.p-3{padding:0.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.625rem * var(--tw-space-y-reverse))}@media (min-width: 768px){.s-wallet-container>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}}.s-wallet-mobile-title{display:inline-block;width:8rem;font-weight:400;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.s-wallet-mobile-title{display:none}}.s-wallet-reference-id{display:none}@media (min-width: 768px){.s-wallet-reference-id{display:inline-block}}.s-wallet-buy-as-gift-icon{margin-left:0.25rem;margin-right:0.25rem;display:inline-block;color:var(--color-primary)}.s-wallet-copy-to-clipboard-button{display:flex;align-items:center}@media (min-width: 768px){.s-wallet-copy-to-clipboard-button{display:none}}.s-wallet-copy-to-clipboard-button salla-button{position:relative}.s-wallet-copy-to-clipboard-button-icon{pointer-events:none;font-size:0.75rem;line-height:1rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:0.25rem}.s-wallet-copy-to-clipboard-button-icon:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0.25rem}@media (min-width: 768px){.s-wallet-status-container{margin-left:0px;margin-right:0px}}.s-wallet-status-container:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.s-wallet-status-container:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}.s-wallet-status-container i{margin-top:0.25rem}.s-wallet-status-container i:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:0.25rem}.s-wallet-status-container i:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:0.25rem}.s-wallet-rated-text{--tw-text-opacity:1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.s-wallet-unrated-text{--tw-text-opacity:1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.s-wallet-no-content{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;padding-top:2.5rem;padding-bottom:5rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-wallet-no-content .icon{margin-bottom:1rem;display:flex;height:8rem;width:8rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));font-size:3rem;line-height:1;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-wallet-no-content p{margin-bottom:1rem;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-wallet-table{min-width:100%;border-collapse:separate}@media (min-width: 768px){.s-wallet-table{margin-bottom:-0.75rem;--tw-border-spacing-y:1.25rem;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}}.s-wallet-table-head{margin-bottom:1.25rem;display:none;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}@media (min-width: 768px){.s-wallet-table-head{display:table-header-group}}.s-wallet-table-head-tr-th{padding-left:1.5rem;padding-right:1.5rem;text-align:start;font-size:0.875rem;line-height:1.25rem;font-weight:500;text-transform:uppercase;letter-spacing:0.05em}.s-wallet-table-head-tr-th:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:left}.s-wallet-table-head-tr-th:last-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){text-align:right}.s-wallet-table-head-tr-th:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}.s-wallet-table-head-tr-th:last-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:left}.s-wallet-table-tbody-tr{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;overflow:hidden;border-radius:var(--s-radius, 0.25rem);border-bottom-width:8px;border-top-width:8px;--tw-border-opacity:1;border-color:rgb(249 250 251 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}@media (min-width: 768px){.s-wallet-table-tbody-tr{display:table-row;flex-direction:row;flex-wrap:nowrap;padding:0px}}.s-wallet-table-tbody-tr-td{width:100%;white-space:nowrap;font-size:0.875rem;line-height:1.25rem}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}@media (min-width: 768px){.s-wallet-table-tbody-tr-td{height:5rem;width:auto}.s-wallet-table-tbody-tr-td:last-child{text-align:end}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"ltr\"],[dir=\"ltr\"] *){border-top-left-radius:0.375rem;border-bottom-left-radius:0.375rem}.s-wallet-table-tbody-tr-td:first-child:where([dir=\"rtl\"],[dir=\"rtl\"] *){border-top-right-radius:0.375rem;border-bottom-right-radius:0.375rem}}.s-wallet-table-tbody-tr-td:first-child{font-weight:700}.s-wallet-table-tbody-tr-td-content{position:relative;display:flex;align-items:center;justify-content:space-between;padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem}@media (min-width: 768px){.s-wallet-table-tbody-tr-td-content{padding-left:1.5rem;padding-right:1.5rem;padding-top:1.5rem;padding-bottom:1.5rem}}.s-wallet-table-tbody-tr-td-content:where([dir=\"ltr\"],[dir=\"ltr\"] *){padding-right:0.5rem}.s-wallet-table-tbody-tr-td-content:where([dir=\"rtl\"],[dir=\"rtl\"] *){padding-left:0.5rem}.s-wallet-table-tbody-tr a{position:absolute;top:0px;bottom:0px;display:block;width:100%}.s-wallet-table-tbody-tr a:where([dir=\"ltr\"],[dir=\"ltr\"] *){left:0px}.s-wallet-table-tbody-tr a:where([dir=\"rtl\"],[dir=\"rtl\"] *){right:0px}@media (min-width: 768px){.md\\:mx-0{margin-left:0px;margin-right:0px}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}}.ltr\\:ml-auto:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-left:auto}.ltr\\:mr-4:where([dir=\"ltr\"],[dir=\"ltr\"] *){margin-right:1rem}.rtl\\:ml-4:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-left:1rem}.rtl\\:mr-auto:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:auto}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host, a as getElement } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-BmRQjBRH.js';
|
|
5
5
|
|
|
6
6
|
const sallaWishlistActionsCss = "/*!twlt*/:host{display:block}.s-wishlist-actions-menu{min-width:200px;inset-inline-end:0;inset-inline-start:auto;list-style:none;margin:0;padding:4px 0;box-shadow:0 4px 16px rgba(0, 0, 0, 0.12)}.s-wishlist-actions-menu-item{display:block;width:100%;padding:10px 16px;text-align:start;font-size:0.875rem;color:#374151;background:transparent;cursor:pointer;white-space:nowrap}.s-wishlist-actions-menu-item:hover{background-color:#f3f4f6;color:var(--color-primary)}.s-wishlist-actions-panel{box-shadow:0 1px 3px rgba(0, 0, 0, 0.08)}.s-wishlist-actions-panel-select-all{user-select:none}.s-wishlist-actions-select-all:indeterminate,.s-wishlist-actions-select-all:indeterminate:hover,.s-wishlist-actions-select-all:indeterminate:focus{background-color:var(--color-primary);border-color:var(--color-primary)}.s-wishlist-actions-select-all:indeterminate::after{content:\"\";position:absolute;top:50%;left:50%;width:10px;height:2px;background:#fff;border:none;transform:translate(-50%, -50%)}.s-wishlist-actions-social-anchor{display:none}h1.s-wishlist-actions-page-title{text-align:start !important}.static{position:static}.absolute{position:absolute}.relative{position:relative}.z-20{z-index:20}.mb-3{margin-bottom:0.75rem}.mt-1{margin-top:0.25rem}.mt-3{margin-top:0.75rem}.flex{display:flex}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:0.5rem}.gap-3{gap:0.75rem}.gap-4{gap:1rem}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:0.5rem}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.p-4{padding:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
4
|
+
import { r as registerInstance, h, H as Host } from './index-BmRQjBRH.js';
|
|
5
5
|
import { H as Heart } from './heart-00vBRoH3.js';
|
|
6
6
|
import { H as Helper } from './Helper-BQ-wOE14.js';
|
|
7
7
|
import './anime.es-CgtvEd63.js';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Translate with a real fallback.
|
|
6
|
+
*
|
|
7
|
+
* `salla.lang.get(key, replacements, locale)` takes a LOCALE as its third
|
|
8
|
+
* argument, not a fallback, and lang.js echoes the key back when it has no
|
|
9
|
+
* translation. Passing a fallback there silently asks for a nonsense locale and
|
|
10
|
+
* still renders the raw key to the customer, which is what a store shows while
|
|
11
|
+
* its translation bundle has not yet picked up newly added keys.
|
|
12
|
+
*/
|
|
13
|
+
function translate(key, replacements, fallback) {
|
|
14
|
+
const value = salla.lang.get(key, replacements);
|
|
15
|
+
return !value || value === key ? fallback : value;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The value stored for `key` in one locale bucket of `salla.lang.messages` (e.g. `'en.trans'`).
|
|
19
|
+
* Read the bucket directly: `salla.lang.get()` falls back to English, so it can't tell which locale is missing.
|
|
20
|
+
*/
|
|
21
|
+
function getLocaleTranslation(locale, key) {
|
|
22
|
+
return key.split('.').reduce((node, part) => node?.[part], salla.lang.messages?.[locale]);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Register bundled ar/en defaults only where a locale has no translation for the key yet.
|
|
26
|
+
*
|
|
27
|
+
* `salla.lang.addBulk()` overwrites, and a `salla.lang.subscribe()` callback runs again on every
|
|
28
|
+
* `salla.lang.setMessages()`, so adding unconditionally would replace the store's own text for these keys.
|
|
29
|
+
*/
|
|
30
|
+
function addMissingTranslations(defaults) {
|
|
31
|
+
const missing = Object.entries(defaults).reduce((acc, [key, translations]) => {
|
|
32
|
+
Object.entries(translations).forEach(([locale, value]) => {
|
|
33
|
+
if (getLocaleTranslation(`${locale}.trans`, key) === undefined) {
|
|
34
|
+
(acc[key] = acc[key] || {})[locale] = value;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return acc;
|
|
38
|
+
}, {});
|
|
39
|
+
if (Object.keys(missing).length) {
|
|
40
|
+
salla.lang.addBulk(missing);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Set a bundled default in one locale bucket of `salla.lang.messages` (e.g. `'en.trans'`), unless that key
|
|
45
|
+
* already has a value there. Same reason as {@link addMissingTranslations}: `setNested()` overwrites.
|
|
46
|
+
*/
|
|
47
|
+
function setTranslationDefault(locale, key, value) {
|
|
48
|
+
const messages = salla.lang.messages?.[locale];
|
|
49
|
+
if (messages && getLocaleTranslation(locale, key) === undefined) {
|
|
50
|
+
salla.helpers.setNested(messages, key, value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { addMissingTranslations as a, setTranslationDefault as s, translate as t };
|