@salla.sa/twilight-components 2.14.551 → 2.14.553
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-C99K1KEB.js → filepond-i59nX3lz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CggRjTNg.js → filepond-plugin-file-poster-BYzX1aNf.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-B009kdAV.js → filepond-plugin-file-validate-size-DycWnZhG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-DZs9-bai.js → filepond-plugin-file-validate-type-z0JXBj53.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DNNheErX.js → filepond-plugin-image-edit-CJRUCqBQ.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-ChN0IpOy.js → filepond-plugin-image-exif-orientation-DxMxZUYg.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BZo2ftGo.js → filepond-plugin-image-preview-CjSIPPRf.js} +1 -1
- package/dist/cjs/{helpers-DHdDjm5V.js → helpers-Dm4BirHO.js} +2 -2
- package/dist/cjs/{index-0JUvtl0d.js → index-BDeMaV8l.js} +20 -24
- package/dist/cjs/{intlTelInput-D84-rI5D.js → intlTelInput-YxceQr88.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_2.cjs.entry.js → salla-bullet-delivery_3.cjs.entry.js} +60 -3
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-D8r5xyK7.js → vanilla-picker-BkTzr0I6.js} +1 -1
- package/dist/collection/collection-manifest.json +6 -4
- package/dist/collection/components/salla-bullet-delivery/helpers.js +2 -2
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +7 -1
- package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.css +70 -0
- package/dist/collection/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.js +77 -0
- 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/components/apple-pay-order-options.js +86 -0
- package/dist/components/helpers.js +2 -2
- package/dist/components/index.js +2 -2
- package/dist/components/salla-bullet-delivery-tag.d.ts +11 -0
- package/dist/components/salla-bullet-delivery-tag.js +76 -0
- package/dist/components/salla-bullet-delivery.js +7 -1
- 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/esm/apple-pay-order-options-Bg2HuLRr.js +86 -0
- package/dist/esm/{filepond-DuMUHI7t.js → filepond-OzvsJA0M.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-Dv25V2UU.js → filepond-plugin-file-poster-CDQfaOXY.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-Dxl4yPm6.js → filepond-plugin-file-validate-size-1vRv7vgS.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-C602myuq.js → filepond-plugin-file-validate-type-pajN7jZu.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DLd3ht_R.js → filepond-plugin-image-edit-93DCmlU_.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BaQ5DNLu.js → filepond-plugin-image-exif-orientation-CncCUIVb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-C-RFNs7l.js → filepond-plugin-image-preview-Mz81wKGp.js} +1 -1
- package/dist/esm/{helpers-BDChq2t4.js → helpers-CV6uPJEJ.js} +2 -2
- package/dist/esm/{index-BsIeN-bg.js → index-Dx4PTJFl.js} +20 -24
- package/dist/esm/{intlTelInput-Cf6zBu5Y.js → intlTelInput-DEYUtZO9.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_2.entry.js → salla-bullet-delivery_3.entry.js} +60 -4
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-S7qZ7YZm.js → vanilla-picker-43VIKXEr.js} +1 -1
- package/dist/twilight/{p-56f164bb.entry.js → p-01dde8da.entry.js} +1 -1
- package/dist/twilight/p-05333b72.entry.js +4 -0
- package/dist/twilight/{p-13c4b450.entry.js → p-05920338.entry.js} +1 -1
- package/dist/twilight/{p-906b36e3.entry.js → p-05ed463f.entry.js} +1 -1
- package/dist/twilight/{p-3c2cc4fe.entry.js → p-08c448e7.entry.js} +1 -1
- package/dist/twilight/{p-2331e63a.entry.js → p-0f475a9c.entry.js} +1 -1
- package/dist/twilight/{p-869fe4c0.entry.js → p-129d396b.entry.js} +1 -1
- package/dist/twilight/{p-847cdd79.entry.js → p-12a40f7d.entry.js} +1 -1
- package/dist/twilight/{p-22cb8a9c.entry.js → p-144a349d.entry.js} +1 -1
- package/dist/twilight/{p-a8316527.entry.js → p-15470633.entry.js} +1 -1
- package/dist/twilight/{p-fed3efba.entry.js → p-1627f8c5.entry.js} +1 -1
- package/dist/twilight/{p-5918dd8d.entry.js → p-16c9bb12.entry.js} +1 -1
- package/dist/twilight/{p-5cd4b67f.entry.js → p-1a0db854.entry.js} +1 -1
- package/dist/twilight/{p-9dd126e2.entry.js → p-204db13a.entry.js} +1 -1
- package/dist/twilight/{p-0e3d72ab.entry.js → p-21b5ef79.entry.js} +1 -1
- package/dist/twilight/{p-b1e0bc90.entry.js → p-21dfba32.entry.js} +1 -1
- package/dist/twilight/{p-07adeb89.entry.js → p-24950b7c.entry.js} +1 -1
- package/dist/twilight/{p-ea968ba3.entry.js → p-24a5e070.entry.js} +1 -1
- package/dist/twilight/{p-0944d367.entry.js → p-26bf1509.entry.js} +1 -1
- package/dist/twilight/{p-6f58ac6a.entry.js → p-2718a5f2.entry.js} +1 -1
- package/dist/twilight/{p-2a683382.entry.js → p-2941175d.entry.js} +1 -1
- package/dist/twilight/{p-aa8962f8.entry.js → p-2dfbb461.entry.js} +1 -1
- package/dist/twilight/{p-e3e2baa2.entry.js → p-2f137e63.entry.js} +1 -1
- package/dist/twilight/{p-211324e6.entry.js → p-360e4f8e.entry.js} +1 -1
- package/dist/twilight/{p-b238c74b.entry.js → p-378efeff.entry.js} +1 -1
- package/dist/twilight/{p-2bef08e8.entry.js → p-3b4e2cf3.entry.js} +1 -1
- package/dist/twilight/{p-eb3a095b.entry.js → p-3b9cf7e4.entry.js} +1 -1
- package/dist/twilight/{p-cdba9d35.entry.js → p-40e417f1.entry.js} +1 -1
- package/dist/twilight/{p-18a604c5.entry.js → p-422c19a5.entry.js} +1 -1
- package/dist/twilight/{p-a64771f7.entry.js → p-45f512a8.entry.js} +1 -1
- package/dist/twilight/{p-49738042.entry.js → p-4be292da.entry.js} +1 -1
- package/dist/twilight/{p-6c5a1ded.entry.js → p-50a2be61.entry.js} +1 -1
- package/dist/twilight/{p-8ebb86ce.entry.js → p-5197cc6a.entry.js} +1 -1
- package/dist/twilight/{p-2ff7bb22.entry.js → p-58ee3cea.entry.js} +1 -1
- package/dist/twilight/{p-ecdbd18f.entry.js → p-619a9a6e.entry.js} +1 -1
- package/dist/twilight/{p-aa91a230.entry.js → p-6343cd09.entry.js} +1 -1
- package/dist/twilight/{p-01406425.entry.js → p-6533ba39.entry.js} +1 -1
- package/dist/twilight/{p-6edd1008.entry.js → p-6b62d934.entry.js} +1 -1
- package/dist/twilight/{p-357b5593.entry.js → p-6ee230b4.entry.js} +1 -1
- package/dist/twilight/{p-a30390a7.entry.js → p-6fffb603.entry.js} +1 -1
- package/dist/twilight/{p-f4f355e5.entry.js → p-74510683.entry.js} +1 -1
- package/dist/twilight/{p-704553fb.entry.js → p-74a4437f.entry.js} +1 -1
- package/dist/twilight/{p-6a746b8a.entry.js → p-7709f0dd.entry.js} +1 -1
- package/dist/twilight/{p-1abe8321.entry.js → p-79b4ca8e.entry.js} +1 -1
- package/dist/twilight/{p-3fb485a6.entry.js → p-7d3355a8.entry.js} +1 -1
- package/dist/twilight/{p-68d754be.entry.js → p-8123e013.entry.js} +1 -1
- package/dist/twilight/{p-4ef06a6f.entry.js → p-8137113a.entry.js} +1 -1
- package/dist/twilight/{p-5ba2eb55.entry.js → p-8140d052.entry.js} +1 -1
- package/dist/twilight/p-8968b284.entry.js +4 -0
- package/dist/twilight/{p-9f431f78.entry.js → p-8a57a89a.entry.js} +1 -1
- package/dist/twilight/{p-8711224a.entry.js → p-8bb4da9c.entry.js} +1 -1
- package/dist/twilight/{p-6d787fa0.entry.js → p-8bb74e84.entry.js} +1 -1
- package/dist/twilight/{p-ebc6ba28.entry.js → p-8ff29a31.entry.js} +1 -1
- package/dist/twilight/{p-af348a67.entry.js → p-90677c84.entry.js} +1 -1
- package/dist/twilight/{p-ef145c1e.entry.js → p-919b40e3.entry.js} +1 -1
- package/dist/twilight/{p-6f3516a1.entry.js → p-92a471ea.entry.js} +1 -1
- package/dist/twilight/{p-a344db00.entry.js → p-955661c8.entry.js} +1 -1
- package/dist/twilight/{p-d5215891.entry.js → p-9c0e3e8f.entry.js} +1 -1
- package/dist/twilight/{p-9025e5d9.entry.js → p-9c5571a0.entry.js} +1 -1
- package/dist/twilight/{p-BRZVMxhy.js → p-B5U60WIk.js} +2 -2
- package/dist/twilight/{p-wqmCmzsY.js → p-BKvFlB2x.js} +1 -1
- package/dist/twilight/p-Bg2HuLRr.js +4 -0
- package/dist/twilight/{p-DNS31w5e.js → p-C1H-fEuk.js} +1 -1
- package/dist/twilight/{p-BDChq2t4.js → p-CV6uPJEJ.js} +1 -1
- package/dist/twilight/{p-mgSPapOV.js → p-Cgw3EhC4.js} +1 -1
- package/dist/twilight/{p-CPiqlSTo.js → p-ChQewA0U.js} +1 -1
- package/dist/twilight/{p-B3oo4tIx.js → p-Dccf61n9.js} +1 -1
- package/dist/twilight/{p-BsIeN-bg.js → p-Dx4PTJFl.js} +1 -1
- package/dist/twilight/{p-035DwuUC.js → p-HzrPs4_N.js} +1 -1
- package/dist/twilight/{p-DeX830vG.js → p-ILDsy-mr.js} +1 -1
- package/dist/twilight/{p-9fdbe8a0.entry.js → p-a2c2f78b.entry.js} +25 -25
- package/dist/twilight/{p-a3579980.entry.js → p-a2cae5fd.entry.js} +1 -1
- package/dist/twilight/{p-2a3d30d1.entry.js → p-a4d28c99.entry.js} +1 -1
- package/dist/twilight/{p-a46a9d28.entry.js → p-a7bdbeb1.entry.js} +1 -1
- package/dist/twilight/{p-be0ac755.entry.js → p-a7ee89d7.entry.js} +1 -1
- package/dist/twilight/{p-1118bee2.entry.js → p-a95b7da2.entry.js} +1 -1
- package/dist/twilight/{p-84cffb13.entry.js → p-a965c7da.entry.js} +1 -1
- package/dist/twilight/{p-e875f53e.entry.js → p-aa88c61e.entry.js} +1 -1
- package/dist/twilight/{p-a037e47d.entry.js → p-acff1e55.entry.js} +1 -1
- package/dist/twilight/{p-ff37c2af.entry.js → p-b1d3bdb6.entry.js} +1 -1
- package/dist/twilight/{p-2df31e90.entry.js → p-b54f9dd8.entry.js} +1 -1
- package/dist/twilight/{p-56845467.entry.js → p-b572b38c.entry.js} +1 -1
- package/dist/twilight/p-bdfceb12.entry.js +4 -0
- package/dist/twilight/{p-27456209.entry.js → p-be080eb3.entry.js} +1 -1
- package/dist/twilight/p-bfd1e64f.entry.js +4 -0
- package/dist/twilight/{p-b5a2342c.entry.js → p-c0ff19e0.entry.js} +1 -1
- package/dist/twilight/p-c2823b78.entry.js +4 -0
- package/dist/twilight/{p-18639885.entry.js → p-c2f2a752.entry.js} +1 -1
- package/dist/twilight/{p-523572e9.entry.js → p-c53d45d1.entry.js} +1 -1
- package/dist/twilight/{p-3aa6fa7d.entry.js → p-c653dbde.entry.js} +1 -1
- package/dist/twilight/{p-f037e508.entry.js → p-c6708390.entry.js} +1 -1
- package/dist/twilight/{p-efe6493f.entry.js → p-cabecab4.entry.js} +1 -1
- package/dist/twilight/{p-2c48bb97.entry.js → p-cadfb356.entry.js} +1 -1
- package/dist/twilight/{p-5dfd449d.entry.js → p-cddaa208.entry.js} +1 -1
- package/dist/twilight/{p-a9ef3c52.entry.js → p-d97e4c69.entry.js} +1 -1
- package/dist/twilight/{p-0a332226.entry.js → p-e1109a12.entry.js} +1 -1
- package/dist/twilight/{p-683db553.entry.js → p-e315d524.entry.js} +1 -1
- package/dist/twilight/{p-569c6d6c.entry.js → p-e4dd05a7.entry.js} +1 -1
- package/dist/twilight/{p-501c0798.entry.js → p-e5b29085.entry.js} +1 -1
- package/dist/twilight/{p-43f8f33b.entry.js → p-e97e121a.entry.js} +1 -1
- package/dist/twilight/{p-83a5b8a4.entry.js → p-f1587a83.entry.js} +1 -1
- package/dist/twilight/p-f4e80187.entry.js +4 -0
- package/dist/twilight/{p-a01f64e7.entry.js → p-f5cff7aa.entry.js} +1 -1
- package/dist/twilight/{p-CaCiueRc.js → p-lRRdZqp5.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/interfaces.d.ts +2 -0
- package/dist/types/components/salla-bullet-delivery-tag/salla-bullet-delivery-tag.d.ts +26 -0
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +29 -0
- package/dist/types/components.d.ts +77 -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-1bf18c56.entry.js +0 -4
- package/dist/twilight/p-47713dd1.entry.js +0 -4
- package/dist/twilight/p-49f9e536.entry.js +0 -4
- package/dist/twilight/p-54974d98.entry.js +0 -4
- package/dist/twilight/p-709c2184.entry.js +0 -4
- package/dist/twilight/p-90f29c99.entry.js +0 -4
- package/dist/twilight/p-a0ed97f5.entry.js +0 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SallaBulletDeliveryTag extends Components.SallaBulletDeliveryTag, HTMLElement {}
|
|
4
|
+
export const SallaBulletDeliveryTag: {
|
|
5
|
+
prototype: SallaBulletDeliveryTag;
|
|
6
|
+
new (): SallaBulletDeliveryTag;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
5
|
+
|
|
6
|
+
var FlashIcon = `<!-- Generated by IcoMoon.io -->
|
|
7
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
8
|
+
<title>flash</title>
|
|
9
|
+
<path d="M29.257 14.223c-0.188-0.533-0.692-0.889-1.257-0.889h-6.5l1.159-9.844c0.063-0.537-0.205-1.061-0.68-1.323-0.472-0.261-1.059-0.211-1.481 0.131l-17.333 14c-0.44 0.355-0.608 0.948-0.419 1.481 0.185 0.532 0.689 0.888 1.255 0.888h6.5l-1.159 9.844c-0.063 0.537 0.205 1.061 0.68 1.323 0.203 0.112 0.424 0.167 0.645 0.167 0.299 0 0.595-0.1 0.837-0.296l17.333-14c0.44-0.355 0.608-0.949 0.42-1.481zM12.373 25.575l0.951-8.085c0.044-0.379-0.075-0.757-0.328-1.041-0.252-0.285-0.615-0.448-0.996-0.448h-4.227l11.855-9.575-0.951 8.085c-0.044 0.379 0.075 0.757 0.328 1.041 0.251 0.285 0.613 0.448 0.995 0.448h4.227z"></path>
|
|
10
|
+
</svg>
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
const sallaBulletDeliveryTagCss = "/*!twlt*/.s-bullet-delivery-tag-wrapper{display:flex;width:100%}@media (min-width: 1024px){.s-bullet-delivery-tag-wrapper{display:inline-flex;width:auto}.s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-container{transform:skewX(-15deg)}.s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-icon,.s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-label{transform:skewX(15deg)}}.s-bullet-delivery-tag-wrapper .s-bullet-delivery-tag-icon svg{width:1rem;height:1rem;fill:currentColor}.hidden{display:none}.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)}.s-bullet-delivery-tag-container{display:flex;width:100%;align-items:center;justify-content:center;gap:0.5rem;border-radius:0px;--tw-bg-opacity:1;background-color:rgb(43 191 134 / var(--tw-bg-opacity, 1));padding-left:0.75rem;padding-right:0.75rem;padding-top:0.5rem;padding-bottom:0.5rem;--tw-text-opacity:1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 1024px){.s-bullet-delivery-tag-container{display:inline-flex;width:auto;gap:0.375rem;border-radius:0.375rem;padding-left:0.875rem;padding-right:0.875rem;padding-top:0.375rem;padding-bottom:0.375rem}}.s-bullet-delivery-tag-icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center}.s-bullet-delivery-tag-label{white-space:nowrap;font-size:0.875rem;line-height:1.25rem;font-weight:700}";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Backend eligibility flag (Store-Module StoreSettingsAction, PR #1627), nested under the
|
|
17
|
+
* store settings `shipping` attribute. True only when the store is on Pro, Quick Delivery
|
|
18
|
+
* (bullet-delivery) is accessible for customers, and the request carries a resolved scope
|
|
19
|
+
* allocation (the branch resolved during the login-cycle).
|
|
20
|
+
*/
|
|
21
|
+
const ELIGIBILITY_FLAG_KEY = 'store.shipping.has_bullet_delivery_tag';
|
|
22
|
+
const SallaBulletDeliveryTag$1 = /*@__PURE__*/ proxyCustomElement(class SallaBulletDeliveryTag extends HTMLElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.__registerHost();
|
|
26
|
+
/** Mirrors the backend `has_bullet_delivery_tag` flag; drives whether the tag renders. */
|
|
27
|
+
this.isEligible = false;
|
|
28
|
+
}
|
|
29
|
+
async componentWillLoad() {
|
|
30
|
+
try {
|
|
31
|
+
await salla.onReady();
|
|
32
|
+
await salla.lang.onLoaded();
|
|
33
|
+
this.isEligible = salla.config.get(ELIGIBILITY_FLAG_KEY) === true;
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
// Any read/await failure → stay hidden (fail-safe).
|
|
37
|
+
salla?.logger?.warn?.('salla-bullet-delivery-tag: init failed', e);
|
|
38
|
+
this.isEligible = false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Fixed tag copy. Localized via lang key when present, otherwise a language-aware default. */
|
|
42
|
+
getTagLabel() {
|
|
43
|
+
const fallback = salla.config.get('user.language_code') === 'en'
|
|
44
|
+
? 'Get it within 2 hours'
|
|
45
|
+
: 'توصيل خلال ساعتين';
|
|
46
|
+
return salla.lang.getWithDefault('pages.products.quick_delivery_tag', fallback);
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
if (!this.isEligible) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return (h(Host, { class: "s-bullet-delivery-tag-wrapper" }, h("span", { class: "s-bullet-delivery-tag-container", "data-testid": "bd-tag" }, h("span", { class: "s-bullet-delivery-tag-icon", innerHTML: FlashIcon }), h("span", { class: "s-bullet-delivery-tag-label" }, this.getTagLabel()))));
|
|
53
|
+
}
|
|
54
|
+
static get style() { return sallaBulletDeliveryTagCss; }
|
|
55
|
+
}, [0, "salla-bullet-delivery-tag", {
|
|
56
|
+
"isEligible": [32]
|
|
57
|
+
}]);
|
|
58
|
+
function defineCustomElement$1() {
|
|
59
|
+
if (typeof customElements === "undefined") {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const components = ["salla-bullet-delivery-tag"];
|
|
63
|
+
components.forEach(tagName => { switch (tagName) {
|
|
64
|
+
case "salla-bullet-delivery-tag":
|
|
65
|
+
if (!customElements.get(tagName)) {
|
|
66
|
+
customElements.define(tagName, SallaBulletDeliveryTag$1);
|
|
67
|
+
}
|
|
68
|
+
break;
|
|
69
|
+
} });
|
|
70
|
+
}
|
|
71
|
+
defineCustomElement$1();
|
|
72
|
+
|
|
73
|
+
const SallaBulletDeliveryTag = SallaBulletDeliveryTag$1;
|
|
74
|
+
const defineCustomElement = defineCustomElement$1;
|
|
75
|
+
|
|
76
|
+
export { SallaBulletDeliveryTag, defineCustomElement };
|
|
@@ -6054,6 +6054,8 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
6054
6054
|
id: b.id,
|
|
6055
6055
|
name: b.name,
|
|
6056
6056
|
city: b.city?.name,
|
|
6057
|
+
country: b.country?.name,
|
|
6058
|
+
district: b.district?.name,
|
|
6057
6059
|
latitude: lat,
|
|
6058
6060
|
longitude: lng,
|
|
6059
6061
|
};
|
|
@@ -6433,9 +6435,13 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
6433
6435
|
return null;
|
|
6434
6436
|
const isBranch = intent.type === "branch";
|
|
6435
6437
|
const isAddress = intent.type === "address";
|
|
6438
|
+
const branchName = intent.branch_details?.name?.trim();
|
|
6436
6439
|
return {
|
|
6440
|
+
// Suffix only when a name exists, else it renders a dangling "Pickup: ".
|
|
6437
6441
|
title: isBranch
|
|
6438
|
-
? Salla.lang.get("pages.checkout.pickup_option")
|
|
6442
|
+
? [Salla.lang.get("pages.checkout.pickup_option"), branchName]
|
|
6443
|
+
.filter(Boolean)
|
|
6444
|
+
.join(": ")
|
|
6439
6445
|
: Salla.lang.get("pages.checkout.delivery_option"),
|
|
6440
6446
|
subtitle: getIntentSubtitle(intent, Salla.lang.get("common.elements.to"), ""),
|
|
6441
6447
|
buttonText: Salla.lang.get("common.elements.edit"),
|
|
@@ -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);
|