@salla.sa/twilight-components 2.14.552 → 2.14.554
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/apple-pay-order-options-DVyeUqBh.js +90 -0
- package/dist/cjs/{filepond-BTsLGLic.js → filepond-ENm3Nngf.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DSHHkMx8.js → filepond-plugin-file-poster-C18vZN4-.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BB6ltSRf.js → filepond-plugin-file-validate-size-DDdErCkO.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CNWlgtpi.js → filepond-plugin-file-validate-type-BIIIZDTF.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DuY72vJR.js → filepond-plugin-image-edit-Dy_kmMTy.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DWzZOyOL.js → filepond-plugin-image-exif-orientation-r9AvWT2R.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-ropJ4nYL.js → filepond-plugin-image-preview-DFS8KaQR.js} +1 -1
- package/dist/cjs/{index-CoSVCFSp.js → index-CdUTvkg8.js} +20 -24
- package/dist/cjs/{intlTelInput-BSHBNNPO.js → intlTelInput-D-fhnv0v.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 +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +5 -86
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
- 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 +1 -1
- package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
- package/dist/cjs/{salla-count-down.cjs.entry.js → salla-count-down_2.cjs.entry.js} +209 -1
- 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 +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +108 -5
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
- package/dist/cjs/{salla-slider.cjs.entry.js → salla-map_3.cjs.entry.js} +829 -1
- 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 +1 -1
- package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
- 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-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
- package/dist/cjs/{salla-order-options-modal_2.cjs.entry.js → salla-product-card.cjs.entry.js} +1 -209
- package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
- package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
- 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 +4 -2
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +42 -3
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DdIwY7TN.js → vanilla-picker-DkM8pn5M.js} +1 -1
- package/dist/collection/components/salla-gifting/salla-gifting.css +3 -0
- package/dist/collection/components/salla-gifting/salla-gifting.js +106 -3
- package/dist/collection/components/salla-scopes/salla-scopes.js +3 -1
- package/dist/collection/components/salla-user-settings/salla-user-settings.js +42 -2
- package/dist/collection/components/salla-wishlist-actions/salla-wishlist-actions.js +1 -1
- package/dist/components/apple-pay-order-options.js +86 -0
- package/dist/components/index.js +2 -2
- package/dist/components/salla-gifting.js +165 -20
- package/dist/components/salla-quick-buy2.js +1 -82
- package/dist/components/salla-scopes.js +3 -1
- package/dist/components/salla-user-settings.js +48 -2
- package/dist/components/salla-wishlist-actions.js +1 -1
- package/dist/esm/apple-pay-order-options-Bg2HuLRr.js +86 -0
- package/dist/esm/{filepond-CqbRA3Vl.js → filepond-CfR9FvSg.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Byt9onuT.js → filepond-plugin-file-poster-B6F5nK4V.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-C1P2OJEv.js → filepond-plugin-file-validate-size-BxIzTBd4.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BP2FLMsG.js → filepond-plugin-file-validate-type-DfUPdGXA.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-C69hhmiF.js → filepond-plugin-image-edit-Ddgh5YPx.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-B2QzeXLq.js → filepond-plugin-image-exif-orientation-BHjeleJe.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CR1odLVd.js → filepond-plugin-image-preview-Cp3-aadR.js} +1 -1
- package/dist/esm/{index-Q9lz4Iuq.js → index-ku9UdoB5.js} +20 -24
- package/dist/esm/{intlTelInput-DzbfeHCl.js → intlTelInput-BJzNl4Ic.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 +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +2 -83
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-alert_2.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +10 -10
- 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 +1 -1
- package/dist/esm/salla-cart-coupons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +1 -1
- package/dist/esm/{salla-count-down.entry.js → salla-count-down_2.entry.js} +209 -2
- 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 +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +108 -5
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/salla-maintenance-alert.entry.js +1 -1
- package/dist/esm/{salla-slider.entry.js → salla-map_3.entry.js} +828 -2
- 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 +1 -1
- package/dist/esm/salla-offer-modal.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-branch.entry.js +1 -1
- 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-shipments.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-placeholder.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-product-card-embed.entry.js +1 -1
- package/dist/esm/{salla-order-options-modal_2.entry.js → salla-product-card.entry.js} +2 -209
- package/dist/esm/salla-product-size-guide.entry.js +1 -1
- package/dist/esm/salla-products-list.entry.js +1 -1
- package/dist/esm/salla-products-slider.entry.js +1 -1
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
- package/dist/esm/salla-rating-modal.entry.js +1 -1
- 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 +4 -2
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +42 -3
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DZSS4OVz.js → vanilla-picker-BUvwVv9C.js} +1 -1
- package/dist/twilight/{p-d70c704f.entry.js → p-01484bf0.entry.js} +1 -1
- package/dist/twilight/{p-34dfff49.entry.js → p-02052c05.entry.js} +1 -1
- package/dist/twilight/{p-3c0705e2.entry.js → p-04a4ad1e.entry.js} +1 -1
- package/dist/twilight/{p-06109ef0.entry.js → p-04b36a74.entry.js} +1 -1
- package/dist/twilight/{p-00bb1a13.entry.js → p-0cd9ed66.entry.js} +1 -1
- package/dist/twilight/{p-bf860754.entry.js → p-0cf68108.entry.js} +1 -1
- package/dist/twilight/{p-DPu3dYaG.js → p-0eRD7FGW.js} +1 -1
- package/dist/twilight/{p-61ca8dd2.entry.js → p-123e9135.entry.js} +1 -1
- package/dist/twilight/{p-1dc63988.entry.js → p-14276775.entry.js} +1 -1
- package/dist/twilight/{p-4abffe52.entry.js → p-166165af.entry.js} +1 -1
- package/dist/twilight/{p-f632b2f7.entry.js → p-17fadc87.entry.js} +1 -1
- package/dist/twilight/{p-ea3480ff.entry.js → p-19160d81.entry.js} +1 -1
- package/dist/twilight/{p-92fbada7.entry.js → p-1936f917.entry.js} +1 -1
- package/dist/twilight/{p-d6a04817.entry.js → p-1a469fb0.entry.js} +1 -1
- package/dist/twilight/{p-89aad90f.entry.js → p-1ea8b6d8.entry.js} +1 -1
- package/dist/twilight/{p-e6b1dd40.entry.js → p-1eda5a96.entry.js} +1 -1
- package/dist/twilight/{p-aa1af88d.entry.js → p-26a18c7f.entry.js} +1 -1
- package/dist/twilight/{p-1242708e.entry.js → p-2726700f.entry.js} +1 -1
- package/dist/twilight/{p-ce8205e2.entry.js → p-2b21f1e9.entry.js} +1 -1
- package/dist/twilight/{p-f4207ccf.entry.js → p-2c575150.entry.js} +1 -1
- package/dist/twilight/{p-754af3dd.entry.js → p-3396b86e.entry.js} +1 -1
- package/dist/twilight/{p-729f3fa0.entry.js → p-34193547.entry.js} +1 -1
- package/dist/twilight/{p-462a49e4.entry.js → p-3ab74f2e.entry.js} +1 -1
- package/dist/twilight/p-3fb91980.entry.js +4 -0
- package/dist/twilight/{p-e305f635.entry.js → p-4046701a.entry.js} +1 -1
- package/dist/twilight/p-4c7e19cf.entry.js +4 -0
- package/dist/twilight/{p-49cbb9ed.entry.js → p-56ba07b9.entry.js} +1 -1
- package/dist/twilight/{p-eddf3ee5.entry.js → p-5ed3f495.entry.js} +1 -1
- package/dist/twilight/{p-7022989a.entry.js → p-5fc810c0.entry.js} +1 -1
- package/dist/twilight/{p-5470f52a.entry.js → p-5ff01328.entry.js} +1 -1
- package/dist/twilight/{p-c6ed3a34.entry.js → p-63b99e5f.entry.js} +1 -1
- package/dist/twilight/{p-25017fcd.entry.js → p-64180f95.entry.js} +1 -1
- package/dist/twilight/{p-7d3899e7.entry.js → p-6534ff1f.entry.js} +1 -1
- package/dist/twilight/{p-ae5ce421.entry.js → p-6be9d80d.entry.js} +1 -1
- package/dist/twilight/{p-56e93806.entry.js → p-6d9068ec.entry.js} +1 -1
- package/dist/twilight/{p-e69f6c43.entry.js → p-6fa2b72f.entry.js} +1 -1
- package/dist/twilight/{p-06abf9fb.entry.js → p-7401960d.entry.js} +1 -1
- package/dist/twilight/{p-382e5a40.entry.js → p-783dff94.entry.js} +1 -1
- package/dist/twilight/p-796820a1.entry.js +4 -0
- package/dist/twilight/{p-27176c04.entry.js → p-8437142d.entry.js} +1 -1
- package/dist/twilight/p-85a79d61.entry.js +4 -0
- package/dist/twilight/{p-5b94bea7.entry.js → p-85cffeba.entry.js} +1 -1
- package/dist/twilight/{p-c0599e5d.entry.js → p-89fd6c49.entry.js} +1 -1
- package/dist/twilight/{p-9f4fef0f.entry.js → p-8f8ac48b.entry.js} +1 -1
- package/dist/twilight/p-8fedad10.entry.js +4 -0
- package/dist/twilight/{p-9118b3cf.entry.js → p-9486e09e.entry.js} +1 -1
- package/dist/twilight/{p-bd389ba7.entry.js → p-94ee6712.entry.js} +1 -1
- package/dist/twilight/{p-54bdc583.entry.js → p-95e0a312.entry.js} +1 -1
- package/dist/twilight/{p-7dda74dd.entry.js → p-96fe4aab.entry.js} +1 -1
- package/dist/twilight/{p-bfa2b7c5.entry.js → p-99ff26ab.entry.js} +1 -1
- package/dist/twilight/{p-52e1754b.entry.js → p-9a0e1465.entry.js} +1 -1
- package/dist/twilight/{p-008dcf73.entry.js → p-9aa24215.entry.js} +1 -1
- package/dist/twilight/{p-c90ff0bf.entry.js → p-9c2b4ca2.entry.js} +1 -1
- package/dist/twilight/p-Bg2HuLRr.js +4 -0
- package/dist/twilight/{p-CPEEGqkw.js → p-C1-96ybF.js} +1 -1
- package/dist/twilight/{p-Ce0SoG8e.js → p-Cr4_0D5C.js} +1 -1
- package/dist/twilight/{p-WyyaE0fN.js → p-CzKSvXuO.js} +1 -1
- package/dist/twilight/{p-VPmzkmKU.js → p-Pyyf93a5.js} +1 -1
- package/dist/twilight/{p-sDtjU0pK.js → p-UhifliOR.js} +1 -1
- package/dist/twilight/{p-B31LPQuk.js → p-_vqDDk2C.js} +1 -1
- package/dist/twilight/{p-7d9e3032.entry.js → p-a24943e9.entry.js} +1 -1
- package/dist/twilight/p-a30c03f2.entry.js +4 -0
- package/dist/twilight/{p-c7482df4.entry.js → p-a8e3d089.entry.js} +1 -1
- package/dist/twilight/{p-a24168ae.entry.js → p-aa0fa973.entry.js} +1 -1
- package/dist/twilight/{p-79e2d7eb.entry.js → p-ad60b749.entry.js} +1 -1
- package/dist/twilight/p-b047487a.entry.js +4 -0
- package/dist/twilight/{p-25b7344e.entry.js → p-b0b3e350.entry.js} +1 -1
- package/dist/twilight/{p-8abf3859.entry.js → p-b574a386.entry.js} +1 -1
- package/dist/twilight/{p-ff6672b6.entry.js → p-ba461b3b.entry.js} +1 -1
- package/dist/twilight/{p-4b827efc.entry.js → p-bd5aa915.entry.js} +1 -1
- package/dist/twilight/{p-492c72eb.entry.js → p-be7ff867.entry.js} +1 -1
- package/dist/twilight/{p-0100262e.entry.js → p-c2b52564.entry.js} +1 -1
- package/dist/twilight/{p-31d03d8c.entry.js → p-c31a585e.entry.js} +1 -1
- package/dist/twilight/{p-2845de1c.entry.js → p-c4c39bd9.entry.js} +1 -1
- package/dist/twilight/{p-f0cefe50.entry.js → p-c5ce93d5.entry.js} +1 -1
- package/dist/twilight/{p-d7c03cf7.entry.js → p-c7910ae8.entry.js} +1 -1
- package/dist/twilight/{p-688b40b4.entry.js → p-c8fbf2b5.entry.js} +1 -1
- package/dist/twilight/{p-53e430c6.entry.js → p-cb0d5691.entry.js} +1 -1
- package/dist/twilight/{p-f7c2ff0f.entry.js → p-cf0a59a6.entry.js} +1 -1
- package/dist/twilight/{p-808fef3d.entry.js → p-d19c812d.entry.js} +1 -1
- package/dist/twilight/{p-7deba3f8.entry.js → p-d26a4d0a.entry.js} +1 -1
- package/dist/twilight/p-d756ea47.entry.js +4 -0
- package/dist/twilight/{p-40b70c18.entry.js → p-d87df6bb.entry.js} +1 -1
- package/dist/twilight/{p-f5485435.entry.js → p-dd9b7c3e.entry.js} +1 -1
- package/dist/twilight/{p-7f2bc499.entry.js → p-df068813.entry.js} +1 -1
- package/dist/twilight/{p-36aa4c09.entry.js → p-dfbdadbe.entry.js} +1 -1
- package/dist/twilight/{p-b881f716.entry.js → p-e3c03f82.entry.js} +1 -1
- package/dist/twilight/{p-a7417d3a.entry.js → p-e5a220c9.entry.js} +1 -1
- package/dist/twilight/{p-31394018.entry.js → p-e747bb48.entry.js} +1 -1
- package/dist/twilight/{p-8920aae0.entry.js → p-ea4c9415.entry.js} +1 -1
- package/dist/twilight/{p-6867eb35.entry.js → p-eae027c3.entry.js} +1 -1
- package/dist/twilight/{p-bbdec84a.entry.js → p-f1a054c6.entry.js} +1 -1
- package/dist/twilight/{p-b92af898.entry.js → p-f289cf85.entry.js} +1 -1
- package/dist/twilight/{p-0bb678e7.entry.js → p-f28f5f74.entry.js} +1 -1
- package/dist/twilight/{p-a0e73c0f.entry.js → p-f5de77c3.entry.js} +1 -1
- package/dist/twilight/{p-5d671536.entry.js → p-fb6d8401.entry.js} +1 -1
- package/dist/twilight/{p-7e8b2b0d.entry.js → p-fd6365cf.entry.js} +1 -1
- package/dist/twilight/{p-6f6d6f45.entry.js → p-fe2ab07f.entry.js} +1 -1
- package/dist/twilight/{p-e0868b92.entry.js → p-fe7e6ccf.entry.js} +1 -1
- package/dist/twilight/{p-fe34bfd0.entry.js → p-fee06d0a.entry.js} +1 -1
- package/dist/twilight/{p-CA-ne4vX.js → p-gtQbb5kC.js} +1 -1
- package/dist/twilight/{p-Q9lz4Iuq.js → p-ku9UdoB5.js} +1 -1
- package/dist/twilight/{p-BCwAi8HD.js → p-yevmK0Kl.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +29 -0
- package/dist/types/components/salla-user-settings/salla-user-settings.d.ts +13 -0
- package/package.json +5 -5
- package/dist/cjs/salla-map_2.cjs.entry.js +0 -835
- package/dist/esm/salla-map_2.entry.js +0 -832
- package/dist/twilight/p-171c1927.entry.js +0 -4
- package/dist/twilight/p-4941b3cd.entry.js +0 -4
- package/dist/twilight/p-4bac36be.entry.js +0 -4
- package/dist/twilight/p-67b60d33.entry.js +0 -4
- package/dist/twilight/p-6860331a.entry.js +0 -4
- package/dist/twilight/p-79451510.entry.js +0 -4
- package/dist/twilight/p-8bcf6db3.entry.js +0 -4
- package/dist/twilight/p-a70cbfe9.entry.js +0 -4
- package/dist/twilight/p-dfc67513.entry.js +0 -4
|
@@ -6,14 +6,22 @@ import { a as anime } from './anime.es.js';
|
|
|
6
6
|
import { I as IconArrowLeft } from './arrow-left.js';
|
|
7
7
|
import { C as Cancel } from './cancel.js';
|
|
8
8
|
import { S as SIGiftSharing } from './gift-sharing.js';
|
|
9
|
-
import {
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
9
|
+
import { b as appendOrderOptionsToPayload } from './apple-pay-order-options.js';
|
|
10
|
+
import { d as defineCustomElement$k } from './salla-attachment-view2.js';
|
|
11
|
+
import { d as defineCustomElement$j } from './salla-booking-field2.js';
|
|
12
|
+
import { d as defineCustomElement$i } from './salla-button2.js';
|
|
13
|
+
import { d as defineCustomElement$h } from './salla-color-picker2.js';
|
|
14
|
+
import { d as defineCustomElement$g } from './salla-conditional-fields2.js';
|
|
15
|
+
import { d as defineCustomElement$f } from './salla-datetime-picker2.js';
|
|
16
|
+
import { d as defineCustomElement$e } from './salla-file-upload2.js';
|
|
17
|
+
import { d as defineCustomElement$d } from './salla-list-tile2.js';
|
|
18
|
+
import { d as defineCustomElement$c } from './salla-loading2.js';
|
|
19
|
+
import { d as defineCustomElement$b } from './salla-map2.js';
|
|
20
|
+
import { d as defineCustomElement$a } from './salla-modal2.js';
|
|
21
|
+
import { d as defineCustomElement$9 } from './salla-order-options-modal2.js';
|
|
22
|
+
import { d as defineCustomElement$8 } from './salla-placeholder2.js';
|
|
23
|
+
import { d as defineCustomElement$7 } from './salla-product-options2.js';
|
|
24
|
+
import { d as defineCustomElement$6 } from './salla-progress-bar2.js';
|
|
17
25
|
import { d as defineCustomElement$5 } from './salla-searchable-dropdown2.js';
|
|
18
26
|
import { d as defineCustomElement$4 } from './salla-skeleton2.js';
|
|
19
27
|
import { d as defineCustomElement$3 } from './salla-slider2.js';
|
|
@@ -32,13 +40,17 @@ var Alert = `<!-- Generated by IcoMoon.io -->
|
|
|
32
40
|
</svg>
|
|
33
41
|
`;
|
|
34
42
|
|
|
35
|
-
const sallaGiftingCss = "/*!twlt*/.s-gifting-steps-wrapper{transition:height 0.8s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-1{margin-top:0.25rem}.inline{display:inline}.hidden{display:none}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.opacity-0{opacity:0}.outline{outline-style:solid}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-hidden{display:none}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-hidden{display:none}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-form-label{margin-bottom:0.25rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-group{margin-top:0.75rem;margin-bottom:0.75rem}.s-checkbox{cursor:pointer;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));appearance:none;background-color:#fff;margin:0;width:18px;height:18px;border-width:1px;border-radius:4px;display:grid;place-content:center}.s-checkbox:before{width:10px;height:10px;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);transform:scale(0);transform-origin:bottom left;transition:120ms transform ease-in-out;box-shadow:inset 1em 1em #444;background-color:#444}.s-checkbox:checked:before{transform:scale(1)}.s-checkbox::before{--tw-content:'';content:var(--tw-content)}.s-form-has-error .s-form-label{color:#ff443a}.s-form-has-error .s-form-control,.s-form-has-error .s-tel-input-control,.s-form-has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-gifting-widget .s-list-tile-item-icon{display:none}.s-gifting-widget-vertical .s-list-tile-item-icon{display:block}.s-gifting-widget-vertical .s-list-tile-item-title svg{fill:var(--color-primary)}.s-gifting-widget-vertical .s-list-tile-item-subtitle{padding-right:3.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-gifting-widget-vertical .s-list-tile-item{flex-wrap:wrap;padding:0px}@media (min-width: 1024px){.s-gifting-widget-vertical .s-list-tile-item-action{flex:1 1 0%}}.s-gifting-widget-vertical .widget-icon{--tw-translate-y:0.625rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;color:var(--color-primary)}.s-gifting-widget .s-button-text{display:flex}.s-gifting-widget .s-list-tile-item{flex-direction:column;justify-content:space-between;gap:1rem;border-radius:0.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:1.25rem;text-align:center}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item{text-align:left}}@media (min-width: 1024px){.s-gifting-widget .s-list-tile-item{flex-direction:row}}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}}.s-gifting-widget-horizontal .s-gifting-widget-action button{padding-left:2rem;padding-right:2rem;font-weight:400}.s-gifting-info{display:flex;align-items:center;gap:0.5rem;border-radius:0.5rem;--tw-border-opacity:1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1));padding:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.s-gifting-info svg{height:1.25rem;width:1.25rem;fill:#1d4ed8}.s-gifting-error{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-gifting-info span{font-size:0.75rem;line-height:1rem}.s-gifting-widget-action-content{display:flex;align-items:center}.s-gifting-widget-action-content svg{margin-left:0.5rem;margin-right:0.5rem}.s-gifting-modal-header{margin-bottom:1.25rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.s-gifting-modal .s-modal-header{display:block}.s-gifting-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;padding-bottom:2rem}@media (min-width: 640px){.s-gifting-modal .s-modal-body{padding-bottom:1.5rem}}.s-gifting-modal-icon{margin-bottom:1.25rem;display:flex;height:5rem;width:5rem;flex-direction:row;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));font-size:1.875rem;line-height:2.25rem}.s-gifting-modal-title{display:flex;width:100%;align-items:center;justify-content:space-between}.s-gifting-modal-title::before{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-title::after{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-badge-wrapper{display:flex;align-items:center;padding-left:0.75rem;padding-right:0.75rem}.s-gifting-modal-badge{margin-right:0.5rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-modal-badge:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.5rem}.s-gifting-modal-uploader.has-bg{position:relative}.s-gifting-modal-uploader.has-bg .s-gifting-remove-preview{pointer-events:auto;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-gifting-modal-uploader-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-steps-wrapper{position:relative}.s-gifting-steps-wrapper .s-button-wrap{pointer-events:auto !important}.is-current-step-2 .gift-step-1,.is-current-step-1 .gift-step-2{pointer-events:none;z-index:-1}.s-gifting-step-one{padding-top:1.25rem}.s-gifting-step-two{position:absolute;top:0px;left:0px;margin-left:auto;margin-right:auto;display:flex;width:100%;--tw-translate-x:-105%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));flex-direction:column;opacity:0}.s-gifting-step-one .swiper-wrapper{height:100px}.s-gifting-step-one .swiper-slide{width:auto !important}.s-gifting-step-one .filepond--list-scroller{overflow-y:hidden}.s-gifting-step-one .swiper-wrapper img{border-radius:0.375rem;object-fit:cover}.s-gifting-step-one .filepond--root{height:230px}.s-gifting-step-one .filepond--list{left:0px !important;height:100% !important}.s-gifting-step-one .filepond-bg{position:absolute;top:0px;z-index:10;height:100%;width:100%;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));background-size:cover}.s-gifting-step-one .s-slider-button-next{top:35% !important}.s-gifting-step-one .s-slider-button-next button{height:35px;width:35px;--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)}.s-gifting-step-one .s-slider-button-prev{top:35% !important}.s-gifting-step-one .s-slider-button-prev button{height:35px;width:35px;--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)}.s-gifting-tel-input .s-tel-input-control{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.s-gifting-tel-input .s-tel-input-error-msg{display:none}.s-gifting-step-two-footer{margin-top:1.25rem;display:flex;flex-direction:row;align-items:center;justify-content:center}.s-gifting-step-two-footer>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-step-two-footer:where([dir=\"rtl\"],[dir=\"rtl\"] *){flex-direction:row-reverse}.s-gifting-step-two-footer a{border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);fill:var(--color-primary);padding-top:8px;padding-bottom:8px;padding-left:25px;padding-right:25px}.s-gifting-step-two-footer a svg{height:1.25rem;width:1.25rem}.s-gifting-step-two .s-form-group.s-form-has-error .s-tel-input-control{--tw-border-opacity:1 !important;border-color:rgb(255 68 58 / var(--tw-border-opacity, 1)) !important}.s-gifting-selectText{margin-bottom:20px !important}.s-gifting-schedule .s-form-label{margin-bottom:0px !important}.s-gifting-schedule{margin-bottom:0.5rem;display:flex;align-items:center;justify-content:flex-start}.s-gifting-schedule>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-schedule:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-gifting-clickable{cursor:pointer}.s-gifting-remove-preview{pointer-events:none;position:absolute;top:-7px;left:-7px;z-index:10;display:flex;height:1.25rem;width:1.25rem;--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1));text-align:center;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-gifting-remove-preview:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:unset;right:-7px}.s-gifting-remove-preview svg{height:100%;width:15px;fill:#fff}.s-gifting-textarea{transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-gifting-calendar-hint{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-gifting-calendar.shown{margin-top:0.75rem;height:75px;opacity:1}.s-gifting-textarea.shown{height:122px;opacity:1}.s-gifting-calendar.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-textarea.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-filepond-placeholder-icon svg{margin-top:12px;margin-bottom:12px;margin-left:auto;margin-right:auto;height:4rem;width:3rem;fill:#e5e7eb}.s-gifting-filepond-placeholder-text{margin-left:auto;margin-right:auto;width:65%;min-width:18rem;font-size:0.75rem !important;line-height:1rem !important;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));margin-top:0.75rem;margin-bottom:0.75rem;font-family:var(--font-main), -apple-system, BlinkMacSystemFont}.s-gifting-skeleton-content salla-skeleton:nth-child(1){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(2){margin-bottom:1.25rem}.s-gifting-skeleton-content salla-skeleton:nth-child(3){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(4){margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-header salla-skeleton{margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-title{margin-bottom:1.25rem}.s-gifting-image{margin-left:5px;margin-right:5px}";
|
|
43
|
+
const sallaGiftingCss = "/*!twlt*/.s-gifting-steps-wrapper{transition:height 0.8s cubic-bezier(0.55, 0, 0.1, 1) 0s}.s-gifting-select{background-image:url(\"data:image/svg+xml;utf8,<svg version='1.1' fill='gray' xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><title>keyboard_arrow_down</title><path d='M9.875 11.104l6.125 6.125 6.125-6.125 1.875 1.875-8 8-8-8z'></path></svg>\");background-size:24px;background-repeat:no-repeat;background-position:99%;appearance:none}[dir=rtl] .s-gifting-select{background-position:5px}.s-gifting-widget-vertical .s-list-tile-item [slot=title]{display:flex;align-items:center;gap:1.5rem}.s-gifting-widget-vertical .s-list-tile-item-content{width:100%}.s-gifting-modal .s-searchable-dropdown-trigger{border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger:hover:not(.s-searchable-dropdown-trigger--disabled){border-color:#d1d5db}.s-gifting-modal .s-searchable-dropdown-trigger--open,.s-gifting-modal .s-searchable-dropdown-trigger:focus{border-color:var(--color-primary, #00897b);box-shadow:0 0 0 1px var(--color-primary, #00897b)}.s-gifting-modal .s-searchable-dropdown-trigger-placeholder{color:#000}.s-gifting-modal .s-gifting-image-section{margin-bottom:1.5rem}.s-gifting-modal .s-gifting-slider{margin-bottom:0.5rem}.s-gifting-modal .s-gifting-image{display:block}.s-gifting-modal .s-gifting-image img{display:block;width:auto;height:100px;object-fit:contain}.s-gifting-modal .s-gifting-image-section+.anime-item .s-gifting-text-title{margin-top:1rem}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.relative{position:relative}.mt-1{margin-top:0.25rem}.block{display:block}.inline{display:inline}.hidden{display:none}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.opacity-0{opacity:0}.outline{outline-style:solid}.transition{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-hidden{display:none}.has-error .s-form-label{color:#ff443a}.has-error .s-form-control,.has-error .s-tel-input-control,.has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-hidden{display:none}.s-form-control{display:block;width:100%;border-radius:var(--s-radius, 0.25rem);border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-control:focus{border-color:var(--color-primary);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000)}.s-form-label{margin-bottom:0.25rem;display:block;font-size:0.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.s-form-group{margin-top:0.75rem;margin-bottom:0.75rem}.s-checkbox{cursor:pointer;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1));appearance:none;background-color:#fff;margin:0;width:18px;height:18px;border-width:1px;border-radius:4px;display:grid;place-content:center}.s-checkbox:before{width:10px;height:10px;clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);transform:scale(0);transform-origin:bottom left;transition:120ms transform ease-in-out;box-shadow:inset 1em 1em #444;background-color:#444}.s-checkbox:checked:before{transform:scale(1)}.s-checkbox::before{--tw-content:'';content:var(--tw-content)}.s-form-has-error .s-form-label{color:#ff443a}.s-form-has-error .s-form-control,.s-form-has-error .s-tel-input-control,.s-form-has-error .s-datetime-picker-input{border-color:#ff443a;color:#ff443a}.s-gifting-widget .s-list-tile-item-icon{display:none}.s-gifting-widget-vertical .s-list-tile-item-icon{display:block}.s-gifting-widget-vertical .s-list-tile-item-title svg{fill:var(--color-primary)}.s-gifting-widget-vertical .s-list-tile-item-subtitle{padding-right:3.5rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-gifting-widget-vertical .s-list-tile-item{flex-wrap:wrap;padding:0px}@media (min-width: 1024px){.s-gifting-widget-vertical .s-list-tile-item-action{flex:1 1 0%}}.s-gifting-widget-vertical .widget-icon{--tw-translate-y:0.625rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:1.875rem;line-height:2.25rem;color:var(--color-primary)}.s-gifting-widget .s-button-text{display:flex}.s-gifting-widget .s-list-tile-item{flex-direction:column;justify-content:space-between;gap:1rem;border-radius:0.75rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:1.25rem;text-align:center}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item{text-align:left}}@media (min-width: 1024px){.s-gifting-widget .s-list-tile-item{flex-direction:row}}@media (min-width: 768px){.s-gifting-widget .s-list-tile-item:where([dir=\"rtl\"],[dir=\"rtl\"] *){text-align:right}}.s-gifting-widget-horizontal .s-gifting-widget-action button{padding-left:2rem;padding-right:2rem;font-weight:400}.s-gifting-info{display:flex;align-items:center;gap:0.5rem;border-radius:0.5rem;--tw-border-opacity:1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1));padding:1rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.s-gifting-info svg{height:1.25rem;width:1.25rem;fill:#1d4ed8}.s-gifting-error{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.s-gifting-info span{font-size:0.75rem;line-height:1rem}.s-gifting-widget-action-content{display:flex;align-items:center}.s-gifting-widget-action-content svg{margin-left:0.5rem;margin-right:0.5rem}.s-gifting-modal-header{margin-bottom:1.25rem;display:flex;flex-direction:column;align-items:center;justify-content:center}.s-gifting-modal .s-modal-header{display:block}.s-gifting-modal .s-modal-body{position:relative !important;left:unset !important;bottom:unset !important;padding-bottom:2rem}@media (min-width: 640px){.s-gifting-modal .s-modal-body{padding-bottom:1.5rem}}.s-gifting-modal-icon{margin-bottom:1.25rem;display:flex;height:5rem;width:5rem;flex-direction:row;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));font-size:1.875rem;line-height:2.25rem}.s-gifting-modal-title{display:flex;width:100%;align-items:center;justify-content:space-between}.s-gifting-modal-title::before{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-title::after{display:block;height:1px;flex:1 1 auto;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-gifting-modal-badge-wrapper{display:flex;align-items:center;padding-left:0.75rem;padding-right:0.75rem}.s-gifting-modal-badge{margin-right:0.5rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-modal-badge:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.5rem}.s-gifting-modal-uploader.has-bg{position:relative}.s-gifting-modal-uploader.has-bg .s-gifting-remove-preview{pointer-events:auto;--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-gifting-modal-uploader-title{margin-bottom:0.5rem;font-size:0.875rem;line-height:1.25rem}.s-gifting-steps-wrapper{position:relative}.s-gifting-steps-wrapper .s-button-wrap{pointer-events:auto !important}.is-current-step-2 .gift-step-1,.is-current-step-1 .gift-step-2{pointer-events:none;z-index:-1}.s-gifting-step-one{padding-top:1.25rem}.s-gifting-step-two{position:absolute;top:0px;left:0px;margin-left:auto;margin-right:auto;display:flex;width:100%;--tw-translate-x:-105%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));flex-direction:column;opacity:0}.s-gifting-step-one .swiper-wrapper{height:100px}.s-gifting-step-one .swiper-slide{width:auto !important}.s-gifting-step-one .filepond--list-scroller{overflow-y:hidden}.s-gifting-step-one .swiper-wrapper img{border-radius:0.375rem;object-fit:cover}.s-gifting-step-one .filepond--root{height:230px}.s-gifting-step-one .filepond--list{left:0px !important;height:100% !important}.s-gifting-step-one .filepond-bg{position:absolute;top:0px;z-index:10;height:100%;width:100%;border-radius:var(--s-radius, 0.25rem);--tw-bg-opacity:1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1));background-size:cover}.s-gifting-step-one .s-slider-button-next{top:35% !important}.s-gifting-step-one .s-slider-button-next button{height:35px;width:35px;--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)}.s-gifting-step-one .s-slider-button-prev{top:35% !important}.s-gifting-step-one .s-slider-button-prev button{height:35px;width:35px;--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)}.s-gifting-tel-input .s-tel-input-control{--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.s-gifting-tel-input .s-tel-input-error-msg{display:none}.s-gifting-step-two-footer{margin-top:1.25rem;display:flex;flex-direction:row;align-items:center;justify-content:center}.s-gifting-step-two-footer>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.625rem * var(--tw-space-x-reverse));margin-left:calc(0.625rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-step-two-footer:where([dir=\"rtl\"],[dir=\"rtl\"] *){flex-direction:row-reverse}.s-gifting-step-two-footer a{border-radius:0.375rem;border-width:1px;border-color:var(--color-primary);fill:var(--color-primary);padding-top:8px;padding-bottom:8px;padding-left:25px;padding-right:25px}.s-gifting-step-two-footer a svg{height:1.25rem;width:1.25rem}.s-gifting-step-two .s-form-group.s-form-has-error .s-tel-input-control{--tw-border-opacity:1 !important;border-color:rgb(255 68 58 / var(--tw-border-opacity, 1)) !important}.s-gifting-selectText{margin-bottom:20px !important}.s-gifting-schedule .s-form-label{margin-bottom:0px !important}.s-gifting-schedule{margin-bottom:0.5rem;display:flex;align-items:center;justify-content:flex-start}.s-gifting-schedule>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-gifting-schedule:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-gifting-clickable{cursor:pointer}.s-gifting-remove-preview{pointer-events:none;position:absolute;top:-7px;left:-7px;z-index:10;display:flex;height:1.25rem;width:1.25rem;--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));cursor:pointer;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1));text-align:center;font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));opacity:0;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-gifting-remove-preview:where([dir=\"rtl\"],[dir=\"rtl\"] *){left:unset;right:-7px}.s-gifting-remove-preview svg{height:100%;width:15px;fill:#fff}.s-gifting-textarea{transition-property:all;transition-duration:200ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-gifting-calendar-hint{font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.s-gifting-calendar.shown{margin-top:0.75rem;height:75px;opacity:1}.s-gifting-textarea.shown{height:122px;opacity:1}.s-gifting-calendar.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-textarea.hide{pointer-events:none;visibility:hidden;margin:0px;height:0px;opacity:0}.s-gifting-filepond-placeholder-icon svg{margin-top:12px;margin-bottom:12px;margin-left:auto;margin-right:auto;height:4rem;width:3rem;fill:#e5e7eb}.s-gifting-filepond-placeholder-text{margin-left:auto;margin-right:auto;width:65%;min-width:18rem;font-size:0.75rem !important;line-height:1rem !important;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1));margin-top:0.75rem;margin-bottom:0.75rem;font-family:var(--font-main), -apple-system, BlinkMacSystemFont}.s-gifting-skeleton-content salla-skeleton:nth-child(1){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(2){margin-bottom:1.25rem}.s-gifting-skeleton-content salla-skeleton:nth-child(3){margin-bottom:0.75rem}.s-gifting-skeleton-content salla-skeleton:nth-child(4){margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-header salla-skeleton{margin-bottom:1.25rem}.s-gifting-skeleton .s-gifting-modal-title{margin-bottom:1.25rem}.s-gifting-image{margin-left:5px;margin-right:5px}";
|
|
36
44
|
|
|
37
45
|
const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting extends HTMLElement {
|
|
38
46
|
constructor() {
|
|
39
47
|
super();
|
|
40
48
|
this.__registerHost();
|
|
41
49
|
this.defaultEvent = "gifting:open";
|
|
50
|
+
/** Order options picked in the pre-gift modal, sent as `order_options` with the gift payload. */
|
|
51
|
+
this.collectedOrderOptions = [];
|
|
52
|
+
/** Live PDP price, kept in sync by `onPriceUpdated`, used to seed the order-options total. */
|
|
53
|
+
this.livePrice = 0;
|
|
42
54
|
this.selectImageForYourGift = salla.lang.get('blocks.buy_as_gift.select_image_for_your_gift');
|
|
43
55
|
this.currentStep = 1;
|
|
44
56
|
this.showCalendar = false;
|
|
@@ -181,10 +193,12 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
181
193
|
return null;
|
|
182
194
|
}
|
|
183
195
|
componentDidLoad() {
|
|
184
|
-
salla.event.product.onPriceUpdated(() => {
|
|
196
|
+
salla.event.product.onPriceUpdated((response) => {
|
|
185
197
|
const quantityInput = document.querySelector(`.s-quantity-input-input`);
|
|
186
198
|
// @ts-ignore
|
|
187
199
|
this.quantity = quantityInput?.value;
|
|
200
|
+
// Seeds the order-options modal total so it reflects the current variant/quantity price.
|
|
201
|
+
this.livePrice = Number(response?.data?.price) || this.livePrice;
|
|
188
202
|
});
|
|
189
203
|
}
|
|
190
204
|
getFormDataFromForm() {
|
|
@@ -209,6 +223,93 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
209
223
|
}
|
|
210
224
|
return formData;
|
|
211
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Order-options gate. Two shapes, because the two gifting entry points already differ:
|
|
228
|
+
*
|
|
229
|
+
* - **Cart page**: the order-option forms are rendered inline and synced to the cart on change,
|
|
230
|
+
* so gifting reuses the cart-submit check — block on invalid, never re-ask in a modal.
|
|
231
|
+
* - **PDP**: nothing renders the options, so they're collected in the shared
|
|
232
|
+
* <salla-order-options-modal> *before* the gifting modal, the same modal and sequence the PDP
|
|
233
|
+
* uses for Quick Purchase and Apple Pay.
|
|
234
|
+
*
|
|
235
|
+
* Returns false when the buyer must fix something first (invalid inline form, or a dismissed
|
|
236
|
+
* modal); the gifting modal then stays closed and they retry from the widget button.
|
|
237
|
+
*/
|
|
238
|
+
async collectOrderOptions() {
|
|
239
|
+
this.collectedOrderOptions = [];
|
|
240
|
+
if (!this.productId) {
|
|
241
|
+
return this.validateInlineCartOptions();
|
|
242
|
+
}
|
|
243
|
+
const { products, basePrice } = this.getOrderOptionsTarget();
|
|
244
|
+
if (!products.length) {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
247
|
+
let response;
|
|
248
|
+
try {
|
|
249
|
+
response = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions(products));
|
|
250
|
+
}
|
|
251
|
+
catch (error) {
|
|
252
|
+
salla?.logger?.warn?.('order-options: fetch failed', error);
|
|
253
|
+
return true;
|
|
254
|
+
}
|
|
255
|
+
const orderOptions = response?.data?.order_options || [];
|
|
256
|
+
if (!orderOptions.length) {
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
const price = basePrice > 0 ? basePrice : Number(response?.data?.products?.[0]?.price?.amount) || 0;
|
|
260
|
+
try {
|
|
261
|
+
const result = await this.ensureOrderOptionsModal().open({ orderOptions, basePrice: price });
|
|
262
|
+
this.collectedOrderOptions = result?.orderOptions || [];
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
// dismissed — keep the gifting modal closed.
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Same check the theme runs on cart submit: every `form[id^="item-"]` (cart items *and* the
|
|
272
|
+
* inline order-option forms) must be valid. Values are already on the cart — each form syncs
|
|
273
|
+
* through `cart.updateItem` on change — so nothing is collected here, gifting is only blocked.
|
|
274
|
+
*/
|
|
275
|
+
validateInlineCartOptions() {
|
|
276
|
+
const forms = document.querySelectorAll('form[id^="item-"]');
|
|
277
|
+
let isValid = true;
|
|
278
|
+
forms.forEach(form => {
|
|
279
|
+
if (!form.reportValidity()) {
|
|
280
|
+
isValid = false;
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
if (!isValid) {
|
|
284
|
+
salla.error(salla.lang.get('common.messages.required_fields'));
|
|
285
|
+
}
|
|
286
|
+
return isValid;
|
|
287
|
+
}
|
|
288
|
+
/** What to ask order options for on the PDP. `basePrice` seeds the modal's live total. */
|
|
289
|
+
getOrderOptionsTarget() {
|
|
290
|
+
return {
|
|
291
|
+
products: [{ id: this.productId, quantity: this.getGiftQuantity() }],
|
|
292
|
+
basePrice: this.livePrice,
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
/** `quantity` state is only seeded on price updates, so fall back to the product form. */
|
|
296
|
+
getGiftQuantity() {
|
|
297
|
+
const fromState = Number(this.quantity);
|
|
298
|
+
if (Number.isFinite(fromState) && fromState > 0) {
|
|
299
|
+
return fromState;
|
|
300
|
+
}
|
|
301
|
+
const fromForm = Number(this.getFormDataFromForm()?.get('quantity'));
|
|
302
|
+
return Number.isFinite(fromForm) && fromForm > 0 ? fromForm : 1;
|
|
303
|
+
}
|
|
304
|
+
/** Get-or-create the singleton order-options modal on <body>. */
|
|
305
|
+
ensureOrderOptionsModal() {
|
|
306
|
+
let modal = document.querySelector('salla-order-options-modal');
|
|
307
|
+
if (!modal) {
|
|
308
|
+
modal = document.createElement('salla-order-options-modal');
|
|
309
|
+
document.body.appendChild(modal);
|
|
310
|
+
}
|
|
311
|
+
return modal;
|
|
312
|
+
}
|
|
212
313
|
/**
|
|
213
314
|
* Show / Open the gifting modal window
|
|
214
315
|
*/
|
|
@@ -218,6 +319,12 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
218
319
|
salla.event.dispatch('login::open', { withoutReload: true });
|
|
219
320
|
return;
|
|
220
321
|
}
|
|
322
|
+
// Required customizations can't be bypassed by gifting: the order-options modal runs first, and
|
|
323
|
+
// dismissing it keeps the gifting modal closed. Runs here (not in the button handler) so the
|
|
324
|
+
// `gifting:open` event and the after-login re-entry go through the same gate.
|
|
325
|
+
if (!(await this.collectOrderOptions())) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
221
328
|
// Reopen on step 1, but KEEP the user's selections (image / text / custom
|
|
222
329
|
// message / sender+receiver). The modal element is never destroyed, so its
|
|
223
330
|
// state and DOM survive close→reopen without a page refresh — we only reset
|
|
@@ -722,6 +829,9 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
722
829
|
formData = this.getFormDataFromForm() || new FormData();
|
|
723
830
|
formData = this.mergeObjectToFormData(giftPayload, formData);
|
|
724
831
|
}
|
|
832
|
+
// PDP flow only — the cart flow's options are already on the cart, and the API keeps existing
|
|
833
|
+
// selections when the request carries no `order_options`.
|
|
834
|
+
appendOrderOptionsToPayload(formData ?? giftPayload, this.collectedOrderOptions);
|
|
725
835
|
const addGiftMethod = this.productId
|
|
726
836
|
? () => salla.product.addProductGiftToCart(this.productId, formData, true)
|
|
727
837
|
: () => salla.cart.addCartGiftToCart(giftPayload, true);
|
|
@@ -774,7 +884,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
774
884
|
}
|
|
775
885
|
render() {
|
|
776
886
|
return [
|
|
777
|
-
h("div", { key: '
|
|
887
|
+
h("div", { key: 'fd15533a1dbb57c0bbf31d66046b7051b63221d7' }, h("salla-list-tile", { key: 'b6f298371176e3fc829a8f0a7de775adbc70f903', class: this.generateClass() }, h("div", { key: '46c0dfc5d7d89576d411b5765d92a72b3dd289ba', slot: "title" }, this.vertical ? h("span", { innerHTML: SIGiftSharing }) : '', h("h3", { key: 'd0b9bbd243458f9ea25aa7a970d3084d16ca56a8' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '0ac470d3daa813ca8177e9f92c9c0eec402784b0', slot: "subtitle" }, h("div", { key: 'a783624dfe67959544cd70b3a087ccd004fb517f' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'd76689c03fdff0aa9ff50323227a191e8aa7aa11', slot: "action" }, h("salla-button", { key: '1516f29ca50b92f78a8f7e5a07daa9e70740dae9', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '9d9b070b98e7a60736ca87347b0982a3034681a2', name: "widget-btn-content" }, h("div", { key: '4813d5f3bf85c3f5a0eefb5bd5478a009b6aceb2', class: "s-gifting-widget-action-content" }, h("span", { key: '738760ee256892c2f654ebae06877ca6cdaf0bec', innerHTML: SIGiftSharing }), " \u00A0", h("span", { key: 'bb181feda8126bd541517dabe107c44ab4da177a' }, this.sectionBtnText)))))), h("salla-modal", { key: '0d4478c6d9cf6bd1e75e81dca234c05af9303e0e', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: 'cea9b69f0af18a825f1cf4ac979fb571cc4b497f', slot: "loading" }, h("div", { key: '8190baa4b26d4de58ea98a4bd3662a54ca024e3a', class: "s-gifting-skeleton" }, h("div", { key: '6271ba338d1e85c5337f9b4956b2b0eb1c610669', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '77fb7f73e5dd748b69c9ed7263e3cefc9b24d643', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '4e436f8ad10aad25ffb84632973376855c0d803d', class: "s-gifting-modal-title" }, h("div", { key: '98c17840dd15e6d8495bd709a76d257001a3c2f3', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '9582b325011b36f5dbb7bf70a044554e339af05a', height: '15px', width: '150px' })))), h("div", { key: 'd95d5c41fb226a654e62c183fcababcf1a1af9b5', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: '73ee2dd11f30ad370261a9b88324f40a52607973', height: '10px', width: '150px' }), h("salla-skeleton", { key: '8b07be46818f49401a5c7aae8a19de0445e9785e', height: '230px' }), h("salla-skeleton", { key: '6a7a9ff47ad18efdfc51d2c70dba6cf89c572974', height: '10px', width: '150px' }), h("salla-skeleton", { key: 'f033c20b65077bfa99fb302415e10ff55f2d112d', height: '30px' }), h("salla-skeleton", { key: '60bf4740d16b9cf852536315b62d1abafc14e4d5', height: '40px' })))), h("slot", { key: 'eac7b126556b6895457fdd0c87f15b872975947f', name: "header" }), !!this.hasError ?
|
|
778
888
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
779
889
|
:
|
|
780
890
|
[
|
|
@@ -797,7 +907,7 @@ const SallaGifting$1 = /*@__PURE__*/ proxyCustomElement(class SallaGifting exten
|
|
|
797
907
|
h("div", { class: this.step2ItemClass(this.errors?.['receiver.city_id'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label", htmlFor: `${this.hostId}-city` }, this.receiverCityFieldLabel), h("salla-searchable-dropdown", { placeholder: this.selectCity, items: this.displayedCities, selectedItem: this.selectedCity, loading: this.loadingCities, searching: this.searchingCities, disabled: this.loadingCities || (this.isKSA && !this.selectedRegionId), required: true, inputId: `${this.hostId}-city`, searchQuery: this.citySearchQuery, clientSearch: !this.enableCityAjaxSearch, dropUp: true, keepParentScroll: true, onItemSelected: (e) => this.handleCitySelected(e.detail), onSearchInput: (e) => this.handleCitySearch(e.detail), onDropdownClosed: () => this.handleCityDropdownClosed() }), this.errors && this.errors['receiver.city_id'] ?
|
|
798
908
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
|
|
799
909
|
h("div", { class: this.step2ItemClass('s-gifting-info') }, h("span", { innerHTML: Alert }), h("span", null, this.cityNoticeText())), !this.isPhysical() && h("div", { class: this.step2ItemClass() }, h("label", { class: "s-gifting-schedule s-gifting-clickable", htmlFor: `schedule-${this.hostId}` }, h("input", { type: "checkbox", name: 'schedule', id: `schedule-${this.hostId}`, onChange: () => this.toggleCalendar(), class: "s-checkbox" }), h("span", { class: "s-form-label" }, " ", this.sendLater, " "))), h("div", { class: this.getCalendarClasses(), ref: (el) => this.calendarFormGroup = el }, h("label", { class: "s-form-label" }, this.selectSendDateAndTime), h("salla-datetime-picker", { value: this.deliveryDate, placeholder: this.selectSendDateAndTime, "enable-time": true, "date-format": "Y-m-d h:i K", onPicked: (event) => this.handleDateTimePicker(event) }), h("span", { class: "s-gifting-calendar-hint" }, this.canNotEditOrderAfterSelectDate)), h("div", { class: this.step2ItemClass('s-gifting-step-two-footer') }, !this.skipStep1() && h("a", { href: "#!", innerHTML: IconArrowLeft, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
800
|
-
], h("slot", { key: '
|
|
910
|
+
], h("slot", { key: '8f516d4a4275f867f0564ef7aa187fb2bcc1e32f', name: "footer" })))
|
|
801
911
|
];
|
|
802
912
|
}
|
|
803
913
|
static get style() { return sallaGiftingCss; }
|
|
@@ -890,7 +1000,7 @@ function defineCustomElement$1() {
|
|
|
890
1000
|
if (typeof customElements === "undefined") {
|
|
891
1001
|
return;
|
|
892
1002
|
}
|
|
893
|
-
const components = ["salla-gifting", "salla-attachment-view", "salla-button", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-modal", "salla-placeholder", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
|
|
1003
|
+
const components = ["salla-gifting", "salla-attachment-view", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-list-tile", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-placeholder", "salla-product-options", "salla-progress-bar", "salla-searchable-dropdown", "salla-skeleton", "salla-slider", "salla-tel-input"];
|
|
894
1004
|
components.forEach(tagName => { switch (tagName) {
|
|
895
1005
|
case "salla-gifting":
|
|
896
1006
|
if (!customElements.get(tagName)) {
|
|
@@ -899,40 +1009,75 @@ function defineCustomElement$1() {
|
|
|
899
1009
|
break;
|
|
900
1010
|
case "salla-attachment-view":
|
|
901
1011
|
if (!customElements.get(tagName)) {
|
|
902
|
-
defineCustomElement$
|
|
1012
|
+
defineCustomElement$k();
|
|
1013
|
+
}
|
|
1014
|
+
break;
|
|
1015
|
+
case "salla-booking-field":
|
|
1016
|
+
if (!customElements.get(tagName)) {
|
|
1017
|
+
defineCustomElement$j();
|
|
903
1018
|
}
|
|
904
1019
|
break;
|
|
905
1020
|
case "salla-button":
|
|
906
1021
|
if (!customElements.get(tagName)) {
|
|
907
|
-
defineCustomElement$
|
|
1022
|
+
defineCustomElement$i();
|
|
1023
|
+
}
|
|
1024
|
+
break;
|
|
1025
|
+
case "salla-color-picker":
|
|
1026
|
+
if (!customElements.get(tagName)) {
|
|
1027
|
+
defineCustomElement$h();
|
|
1028
|
+
}
|
|
1029
|
+
break;
|
|
1030
|
+
case "salla-conditional-fields":
|
|
1031
|
+
if (!customElements.get(tagName)) {
|
|
1032
|
+
defineCustomElement$g();
|
|
908
1033
|
}
|
|
909
1034
|
break;
|
|
910
1035
|
case "salla-datetime-picker":
|
|
911
1036
|
if (!customElements.get(tagName)) {
|
|
912
|
-
defineCustomElement$
|
|
1037
|
+
defineCustomElement$f();
|
|
913
1038
|
}
|
|
914
1039
|
break;
|
|
915
1040
|
case "salla-file-upload":
|
|
916
1041
|
if (!customElements.get(tagName)) {
|
|
917
|
-
defineCustomElement$
|
|
1042
|
+
defineCustomElement$e();
|
|
918
1043
|
}
|
|
919
1044
|
break;
|
|
920
1045
|
case "salla-list-tile":
|
|
921
1046
|
if (!customElements.get(tagName)) {
|
|
922
|
-
defineCustomElement$
|
|
1047
|
+
defineCustomElement$d();
|
|
923
1048
|
}
|
|
924
1049
|
break;
|
|
925
1050
|
case "salla-loading":
|
|
926
1051
|
if (!customElements.get(tagName)) {
|
|
927
|
-
defineCustomElement$
|
|
1052
|
+
defineCustomElement$c();
|
|
1053
|
+
}
|
|
1054
|
+
break;
|
|
1055
|
+
case "salla-map":
|
|
1056
|
+
if (!customElements.get(tagName)) {
|
|
1057
|
+
defineCustomElement$b();
|
|
928
1058
|
}
|
|
929
1059
|
break;
|
|
930
1060
|
case "salla-modal":
|
|
931
1061
|
if (!customElements.get(tagName)) {
|
|
932
|
-
defineCustomElement$
|
|
1062
|
+
defineCustomElement$a();
|
|
1063
|
+
}
|
|
1064
|
+
break;
|
|
1065
|
+
case "salla-order-options-modal":
|
|
1066
|
+
if (!customElements.get(tagName)) {
|
|
1067
|
+
defineCustomElement$9();
|
|
933
1068
|
}
|
|
934
1069
|
break;
|
|
935
1070
|
case "salla-placeholder":
|
|
1071
|
+
if (!customElements.get(tagName)) {
|
|
1072
|
+
defineCustomElement$8();
|
|
1073
|
+
}
|
|
1074
|
+
break;
|
|
1075
|
+
case "salla-product-options":
|
|
1076
|
+
if (!customElements.get(tagName)) {
|
|
1077
|
+
defineCustomElement$7();
|
|
1078
|
+
}
|
|
1079
|
+
break;
|
|
1080
|
+
case "salla-progress-bar":
|
|
936
1081
|
if (!customElements.get(tagName)) {
|
|
937
1082
|
defineCustomElement$6();
|
|
938
1083
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
5
5
|
import { a as axios } from './axios.js';
|
|
6
|
+
import { r as resolveApplePayOrderOptions, a as reportProductOptionsValiditySync, b as appendOrderOptionsToPayload } from './apple-pay-order-options.js';
|
|
6
7
|
import { d as defineCustomElement$e } from './salla-attachment-view2.js';
|
|
7
8
|
import { d as defineCustomElement$d } from './salla-booking-field2.js';
|
|
8
9
|
import { d as defineCustomElement$c } from './salla-button2.js';
|
|
@@ -1573,88 +1574,6 @@ if (typeof window !== 'undefined' && (SallaApplePay.canUseNative() || window.Pay
|
|
|
1573
1574
|
document.querySelectorAll('data-show-if-apple-pay-supported').forEach(element => element.style.display = 'none');
|
|
1574
1575
|
}
|
|
1575
1576
|
|
|
1576
|
-
/**
|
|
1577
|
-
* Order-options helpers for the Apple Pay quick-buy flow — keeps <salla-quick-buy> to thin AP wiring.
|
|
1578
|
-
* Apple Pay resolves options inside the session-started hook (single gesture), so the caller owns
|
|
1579
|
-
* the ApplePaySession and drives it via callbacks.
|
|
1580
|
-
*/
|
|
1581
|
-
/** Get-or-create the singleton order-options modal on <body>. */
|
|
1582
|
-
function ensureOrderOptionsModal() {
|
|
1583
|
-
let modal = document.querySelector('salla-order-options-modal');
|
|
1584
|
-
if (!modal) {
|
|
1585
|
-
modal = document.createElement('salla-order-options-modal');
|
|
1586
|
-
document.body.appendChild(modal);
|
|
1587
|
-
}
|
|
1588
|
-
return modal;
|
|
1589
|
-
}
|
|
1590
|
-
/** Sync PDP-option validity (an `await` would consume the Apple Pay gesture). Skips hidden/disabled inputs. */
|
|
1591
|
-
function reportProductOptionsValiditySync(productId) {
|
|
1592
|
-
const optionsElement = document.querySelector(`salla-product-options[product-id="${productId}"]`);
|
|
1593
|
-
if (!optionsElement)
|
|
1594
|
-
return true;
|
|
1595
|
-
const requiredInputs = optionsElement.querySelectorAll('[required]');
|
|
1596
|
-
let pass = true;
|
|
1597
|
-
requiredInputs.forEach((input) => {
|
|
1598
|
-
if (input.disabled || input.closest('.hidden'))
|
|
1599
|
-
return;
|
|
1600
|
-
if ('reportValidity' in input && !input.reportValidity())
|
|
1601
|
-
pass = false;
|
|
1602
|
-
});
|
|
1603
|
-
return pass;
|
|
1604
|
-
}
|
|
1605
|
-
/** Merge collected order-options into the quick-purchase payload (FormData or plain object). */
|
|
1606
|
-
function appendOrderOptionsToPayload(data, orderOptions) {
|
|
1607
|
-
if (!orderOptions.length)
|
|
1608
|
-
return;
|
|
1609
|
-
if (data && typeof data.append === 'function') {
|
|
1610
|
-
orderOptions.forEach((entry, i) => {
|
|
1611
|
-
data.append(`order_options[${i}][id]`, String(entry.id));
|
|
1612
|
-
data.append(`order_options[${i}][value]`, String(entry.value));
|
|
1613
|
-
});
|
|
1614
|
-
return;
|
|
1615
|
-
}
|
|
1616
|
-
if (data && typeof data === 'object') {
|
|
1617
|
-
data.order_options = orderOptions;
|
|
1618
|
-
}
|
|
1619
|
-
}
|
|
1620
|
-
/**
|
|
1621
|
-
* Fetch order options and, if any, collect them via the modal (apple-pay mode). Callbacks drive the
|
|
1622
|
-
* caller's pre-created session: `beginPendingSession` (no options), `discardPendingSession` (options
|
|
1623
|
-
* found — the modal's AP button starts a fresh one), `onSubmit` (submitted).
|
|
1624
|
-
*/
|
|
1625
|
-
async function resolveApplePayOrderOptions(opts) {
|
|
1626
|
-
let resp;
|
|
1627
|
-
try {
|
|
1628
|
-
resp = await salla.api.withoutNotifier(() => salla.product.api.getOrderOptions([{ id: opts.productId, quantity: opts.quantity }]));
|
|
1629
|
-
}
|
|
1630
|
-
catch (error) {
|
|
1631
|
-
salla?.logger?.warn?.('order-options: fetch failed', error);
|
|
1632
|
-
opts.beginPendingSession();
|
|
1633
|
-
return;
|
|
1634
|
-
}
|
|
1635
|
-
const items = resp?.data?.order_options || [];
|
|
1636
|
-
if (!items.length) {
|
|
1637
|
-
opts.beginPendingSession(); // begin() doesn't need a fresh gesture
|
|
1638
|
-
return;
|
|
1639
|
-
}
|
|
1640
|
-
opts.discardPendingSession(); // drop the unused session; the modal builds a fresh one
|
|
1641
|
-
const basePrice = Number(opts.amount) > 0
|
|
1642
|
-
? Number(opts.amount)
|
|
1643
|
-
: Number(resp?.data?.products?.[0]?.price?.amount) || 0;
|
|
1644
|
-
const modal = ensureOrderOptionsModal();
|
|
1645
|
-
try {
|
|
1646
|
-
await modal.open({
|
|
1647
|
-
orderOptions: items,
|
|
1648
|
-
basePrice,
|
|
1649
|
-
paymentMode: 'apple-pay',
|
|
1650
|
-
onSubmit: opts.onSubmit,
|
|
1651
|
-
});
|
|
1652
|
-
}
|
|
1653
|
-
catch {
|
|
1654
|
-
// dismissed — no live session
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
1577
|
const sallaQuickBuyCss = "/*!twlt*/.s-quick-buy-button .s-button-text{display:flex}apple-pay-button{--apple-pay-button-width:100%;--apple-pay-button-height:40px;--apple-pay-button-border-radius:.75rem;--apple-pay-button-box-sizing:content-box}.s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span{display:none}@media (min-width: 768px){.s-add-product-button-with-sticky-bar salla-quick-buy .s-quick-buy-button .s-button-text span{display:block}}.s-quick-buy-button svg{margin-right:0.375rem;height:1rem;width:1rem}.s-quick-buy-button svg:where([dir=\"rtl\"],[dir=\"rtl\"] *){margin-right:0px;margin-left:0.375rem}.s-quick-buy-apple-pay{display:block;width:100%}@media (min-width: 640px){.s-quick-buy-apple-pay{margin-top:0.625rem}}.s-quick-buy-apple-pay .apple-pay-btn-wrapper .apple-pay-btn{width:auto !important;border-radius:var(--s-radius, 0.25rem) !important}";
|
|
1659
1578
|
|
|
1660
1579
|
const SallaQuickBuy = /*@__PURE__*/ proxyCustomElement(class SallaQuickBuy extends HTMLElement {
|
|
@@ -58,7 +58,9 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class SallaScopees extends
|
|
|
58
58
|
? "blocks.scope.shopping_from_another_market"
|
|
59
59
|
: "blocks.scope.shopping_from_another_branch");
|
|
60
60
|
}
|
|
61
|
-
return salla.lang.get(
|
|
61
|
+
return salla.lang.get(isMultiCountries
|
|
62
|
+
? 'blocks.scope.search_for_availability_in_other_markets'
|
|
63
|
+
: 'blocks.scope.search_for_availability_in_other_branches');
|
|
62
64
|
};
|
|
63
65
|
salla.event.on('scopes::open', ({ mode = null, product_id = null } = {}) => {
|
|
64
66
|
this.open(mode, product_id);
|
|
@@ -14,6 +14,13 @@ var Bullhorn = `<!-- Generated by IcoMoon.io -->
|
|
|
14
14
|
</svg>
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
+
var UserOff = `<!-- Generated by IcoMoon.io -->
|
|
18
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
19
|
+
<title>user-off</title>
|
|
20
|
+
<path d="M10.837 19.309c-4.963 1.284-8.171 4.303-8.171 7.691v3.667c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v-3.667c0-2.101 2.48-4.155 6.172-5.109 0.713-0.184 1.141-0.912 0.957-1.625-0.184-0.711-0.908-1.137-1.625-0.956zM12.859 3.715c0.933-0.685 2.020-1.048 3.141-1.048 2.941 0 5.333 2.392 5.333 5.333 0 1.121-0.363 2.208-1.048 3.141-0.436 0.593-0.308 1.428 0.284 1.864 0.239 0.175 0.515 0.259 0.788 0.259 0.411 0 0.815-0.188 1.076-0.544 1.025-1.393 1.567-3.025 1.567-4.72 0-4.412-3.588-8-8-8-1.695 0-3.327 0.541-4.721 1.567-0.592 0.435-0.72 1.269-0.284 1.864 0.436 0.593 1.269 0.721 1.864 0.284zM31.609 29.724l-29.333-29.333c-0.521-0.521-1.364-0.521-1.885 0s-0.521 1.364 0 1.885l29.333 29.333c0.26 0.26 0.601 0.391 0.943 0.391s0.683-0.131 0.943-0.391c0.521-0.521 0.521-1.364 0-1.885z"></path>
|
|
21
|
+
</svg>
|
|
22
|
+
`;
|
|
23
|
+
|
|
17
24
|
var UserCancel = `<!-- Generated by IcoMoon.io -->
|
|
18
25
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
19
26
|
<title>user-cancel</title>
|
|
@@ -28,6 +35,20 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
28
35
|
super();
|
|
29
36
|
this.__registerHost();
|
|
30
37
|
this.otpInputs = [];
|
|
38
|
+
/**
|
|
39
|
+
* Gates the new OTP-verified delete-account flow. When disabled, falls back
|
|
40
|
+
* to the legacy deactivate-account flow (immediate deactivation, no OTP).
|
|
41
|
+
*/
|
|
42
|
+
this.isDeleteAccountEnabled = !!salla.config
|
|
43
|
+
.get('store.features', [])
|
|
44
|
+
?.includes('customer-account-deletion');
|
|
45
|
+
// Legacy deactivate-account texts (used when isDeleteAccountEnabled is false)
|
|
46
|
+
this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
|
|
47
|
+
this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
|
|
48
|
+
this.sorryForLeavingText = salla.lang.get('pages.profile.warning_for_deactivate');
|
|
49
|
+
this.warningText = salla.lang.get('pages.profile.sorry_for_leaving');
|
|
50
|
+
this.keepAccount = salla.lang.get('pages.profile.keep_account');
|
|
51
|
+
this.buttonLoading = false;
|
|
31
52
|
this.deletePendingDays = null;
|
|
32
53
|
this.currentStep = 'confirm';
|
|
33
54
|
this.isDeletePending = false;
|
|
@@ -109,7 +130,9 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
109
130
|
this.isHiddenName = salla.config.get('user.is_hidden_name');
|
|
110
131
|
this.isNotifiable = salla.config.get('user.is_notifiable');
|
|
111
132
|
this.canHideName = salla.config.get('store.settings.rating.can_customer_hide_name');
|
|
112
|
-
this.
|
|
133
|
+
if (this.isDeleteAccountEnabled) {
|
|
134
|
+
this.fetchDeleteRequestStatus();
|
|
135
|
+
}
|
|
113
136
|
if (!this.isNotifiable || !this.isHiddenName) {
|
|
114
137
|
salla.event.on('profile::info.fetched', res => {
|
|
115
138
|
this.isHiddenName = res.data.is_hidden_name;
|
|
@@ -171,6 +194,11 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
171
194
|
}
|
|
172
195
|
}
|
|
173
196
|
loadTranslations() {
|
|
197
|
+
this.deactivateAccount = salla.lang.get('pages.profile.deactivate_account');
|
|
198
|
+
this.deactivateDesc = salla.lang.get('pages.profile.deactivate_account_description');
|
|
199
|
+
this.sorryForLeavingText = salla.lang.get('pages.profile.warning_for_deactivate');
|
|
200
|
+
this.warningText = salla.lang.get('pages.profile.sorry_for_leaving');
|
|
201
|
+
this.keepAccount = salla.lang.get('pages.profile.keep_account');
|
|
174
202
|
this.deleteAccount = salla.lang.get('pages.profile.delete_account');
|
|
175
203
|
this.deleteAccountDesc = salla.lang.get('pages.profile.delete_account_description');
|
|
176
204
|
this.deleteConfirmTitle = salla.lang.get('pages.profile.delete_account_confirm_title');
|
|
@@ -230,6 +258,17 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
230
258
|
this.updateModalForStep();
|
|
231
259
|
this.confirmationModal.open();
|
|
232
260
|
}
|
|
261
|
+
openDeactivateModal() {
|
|
262
|
+
this.confirmationModal.setTitle(this.capitalizeText(this.deactivateAccount));
|
|
263
|
+
this.confirmationModal.open();
|
|
264
|
+
}
|
|
265
|
+
async confirmDeactivateAccount() {
|
|
266
|
+
this.buttonLoading = true;
|
|
267
|
+
await salla.profile.delete().finally(() => {
|
|
268
|
+
this.buttonLoading = false;
|
|
269
|
+
this.confirmationModal.close();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
233
272
|
closeDeleteModal() {
|
|
234
273
|
this.clearResendTimer();
|
|
235
274
|
this.confirmationModal?.close();
|
|
@@ -520,10 +559,17 @@ const SallaUserSettings$1 = /*@__PURE__*/ proxyCustomElement(class SallaUserSett
|
|
|
520
559
|
return (h("salla-button", { fill: "outline", color: "danger", shape: "btn", size: "medium", width: "normal", onClick: () => this.openDeleteModal() }, this.capitalizeText(this.deleteAccount)));
|
|
521
560
|
}
|
|
522
561
|
render() {
|
|
523
|
-
return (h(Host, { key: '
|
|
562
|
+
return (h(Host, { key: '8a30c7a63785447ce4b5a37233a851056489b7a0', class: "s-user-settings-wrapper" }, this.canHideName && (h("div", { key: 'df325aab1249e9c6fbae8c9218cebe44cf3c627a', class: "s-user-settings-section" }, h("salla-list-tile", { key: '00b155f3cbdb38b97baaebc81b2f3f8ae41926c9' }, h("div", { key: '79e8eaf77e59e8228bc8a68adb55975a1400aea0', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: '98e985a057595b1e136d77c8bda2951fb82b1d3e', innerHTML: UserCancel })), h("div", { key: '9c05bf47eda1764880948705b1c78af50b973c94', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.hideMyName)), h("div", { key: '4656a31e4818d1a0678400408c1082f5e738f764', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.hideMyNameDesc)), h("div", { key: '636e6882149c8b692c01cb97ece48014bf284631', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '5633324ba6128911e955fbf53774f324a37ff136', class: "s-toggle" }, h("input", { key: 'cae5ee95e39ffc7ff3a1ecb86ca8cae9dc9583d9', class: "s-toggle-input", checked: this.isHiddenName, onChange: e => this.toggleSetting('is_hidden_name', e), type: "checkbox" }), h("div", { key: 'd0cdd16ca6104f73f1653088cdf43d7a1d10da34', class: "s-toggle-switcher" })))))), h("div", { key: '781043a116e44c9e60c127faf121f59c010fad17', class: "s-user-settings-section" }, h("salla-list-tile", { key: '72784431a6acd24d12a2a66e9563c603900a1f4d' }, h("div", { key: '0f5ec3452bfb20918b44d99aad5146c2a8595286', slot: "icon", class: "s-user-settings-section-icon" }, h("span", { key: 'cef5ba0f4cd4e64f995e654b0f566a11ed2e2f48', innerHTML: Bullhorn })), h("div", { key: '8632c4f75da95d01a2cbb8a89c415c3bdd6c10ff', slot: "title", class: "s-user-settings-section-title" }, this.capitalizeText(this.promotionalMsgs)), h("div", { key: 'd93b1336e6d09e32d620376083bc704e1edac337', slot: "subtitle", class: "s-user-settings-section-subtitle" }, this.capitalizeText(this.promotionalMsgsDesc)), h("div", { key: '7c4f5a8102521d98a230dec0b92ded0a37ff8eea', slot: "action", class: "s-user-settings-section-action" }, h("label", { key: '1b3419f9c933f1e20540fc70a79bdeba338e3dc6', class: "s-toggle" }, h("input", { key: '87ceb43f847b99552566579e2d0d878dbc8bf80a', class: "s-toggle-input", checked: this.isNotifiable, onChange: e => this.toggleSetting('is_notifiable', e), type: "checkbox" }), h("div", { key: '15ddef5bcefe2b062983b0021cfaf03ad9f6cf95', 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))))))));
|
|
524
563
|
}
|
|
525
564
|
static get style() { return sallaUserSettingsCss; }
|
|
526
565
|
}, [0, "salla-user-settings", {
|
|
566
|
+
"isDeleteAccountEnabled": [32],
|
|
567
|
+
"deactivateAccount": [32],
|
|
568
|
+
"deactivateDesc": [32],
|
|
569
|
+
"sorryForLeavingText": [32],
|
|
570
|
+
"warningText": [32],
|
|
571
|
+
"keepAccount": [32],
|
|
572
|
+
"buttonLoading": [32],
|
|
527
573
|
"deleteAccount": [32],
|
|
528
574
|
"deleteAccountDesc": [32],
|
|
529
575
|
"deleteConfirmTitle": [32],
|