@salla.sa/twilight-components 2.14.586 → 2.14.588
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{filepond-D_6sbWQk.js → filepond-FHDuUT2A.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CVS8pOZw.js → filepond-plugin-file-poster-cswOK9iC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-o1y8Fye-.js → filepond-plugin-file-validate-size-BKHetR6q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-Djhh1ldw.js → filepond-plugin-file-validate-type-TR28icaL.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-0QzvFJme.js → filepond-plugin-image-edit-D-Wzkzl3.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-D8VMTsfT.js → filepond-plugin-image-exif-orientation-BF-uGQ3T.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-D77Y-dvk.js → filepond-plugin-image-preview-BMRguebr.js} +1 -1
- package/dist/cjs/{index-CReCU9cs.js → index-C3RW52t1.js} +4 -4
- package/dist/cjs/{intlTelInput-DpaOw5FS.js → intlTelInput-BwwLaGw1.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- 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 +99 -22
- 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 +30 -18
- 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 +3 -3
- package/dist/cjs/salla-contacts.cjs.entry.js +2 -2
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +123 -24
- package/dist/cjs/salla-count-down.cjs.entry.js +1 -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-gift-card-redeem.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
- 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-map_3.cjs.entry.js +1 -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-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +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 +24 -3
- 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-product-card.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/salla-search-product-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-search.cjs.entry.js +1 -1
- package/dist/cjs/salla-skeleton.cjs.entry.js +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/salla-wishlist-summary.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/cjs/{vanilla-picker-qPeQoSpS.js → vanilla-picker-BCVMDRc5.js} +1 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +29 -17
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.css +2 -13
- package/dist/collection/components/salla-conditional-offer/salla-conditional-offer.js +1 -1
- package/dist/collection/components/salla-contacts/salla-contacts.js +1 -1
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +3 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +121 -22
- package/dist/collection/components/salla-payments/salla-payments.css +3 -0
- package/dist/collection/components/salla-payments/salla-payments.js +22 -1
- package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +20 -6
- package/dist/components/index.js +4 -4
- package/dist/components/salla-bullet-delivery.js +29 -17
- package/dist/components/salla-conditional-offer.js +2 -2
- package/dist/components/salla-contacts.js +1 -1
- package/dist/components/salla-cookies-bar.js +122 -23
- package/dist/components/salla-payments.js +23 -2
- package/dist/components/salla-quick-buy2.js +98 -21
- package/dist/docs.json +1 -1
- package/dist/esm/{filepond-cGd_8brq.js → filepond-D9x8e0kN.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DmVMpWPg.js → filepond-plugin-file-poster-Dnc-RXWn.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-vJfZzddp.js → filepond-plugin-file-validate-size-CZkCBl_R.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DXfCY9T0.js → filepond-plugin-file-validate-type-C5Nsnz-Z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-DHBzZ_bY.js → filepond-plugin-image-edit-hv6HNezY.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-2sbvlxy2.js → filepond-plugin-image-exif-orientation-xKI5gBkW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-BnPTV3nB.js → filepond-plugin-image-preview-C1Lw27uf.js} +1 -1
- package/dist/esm/{index-CpfofV0a.js → index-BTR557QH.js} +4 -4
- package/dist/esm/{intlTelInput-DxmbJyWe.js → intlTelInput-HpgbsbG0.js} +1 -1
- package/dist/esm/loader.js +2 -2
- 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 +99 -22
- 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 +30 -18
- 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 +3 -3
- package/dist/esm/salla-contacts.entry.js +2 -2
- package/dist/esm/salla-cookies-bar.entry.js +123 -24
- package/dist/esm/salla-count-down.entry.js +1 -1
- 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-gift-card-redeem.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +1 -1
- 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-map_3.entry.js +1 -1
- 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-options-modal.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 +24 -3
- 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-product-card.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/salla-search-product-card.entry.js +1 -1
- package/dist/esm/salla-search.entry.js +1 -1
- package/dist/esm/salla-skeleton.entry.js +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/salla-wishlist-summary.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/esm/{vanilla-picker-nA0gc1Cv.js → vanilla-picker-Cwahuohu.js} +1 -1
- package/dist/twilight/p-025f158d.entry.js +4 -0
- package/dist/twilight/{p-af82356a.entry.js → p-0447c80d.entry.js} +1 -1
- package/dist/twilight/{p-73ecd2bc.entry.js → p-0f559883.entry.js} +1 -1
- package/dist/twilight/{p-a9d5b26c.entry.js → p-13186e26.entry.js} +1 -1
- package/dist/twilight/{p-42c011f5.entry.js → p-1b19b60d.entry.js} +1 -1
- package/dist/twilight/{p-0470406f.entry.js → p-1bd13cb1.entry.js} +1 -1
- package/dist/twilight/p-1d60d5cf.entry.js +4 -0
- package/dist/twilight/{p-85fb9e19.entry.js → p-1d93fdb7.entry.js} +1 -1
- package/dist/twilight/{p-ee056aef.entry.js → p-1e2aa94c.entry.js} +1 -1
- package/dist/twilight/{p-3ee5c715.entry.js → p-1e930884.entry.js} +1 -1
- package/dist/twilight/p-2158f53a.entry.js +4 -0
- package/dist/twilight/{p-0103d0dc.entry.js → p-28a76fa1.entry.js} +1 -1
- package/dist/twilight/{p-afe27025.entry.js → p-29992256.entry.js} +1 -1
- package/dist/twilight/{p-ea4f08bf.entry.js → p-2b088e94.entry.js} +1 -1
- package/dist/twilight/{p-41a26099.entry.js → p-2ffe4f20.entry.js} +1 -1
- package/dist/twilight/{p-8eb99a28.entry.js → p-34cae9d4.entry.js} +1 -1
- package/dist/twilight/{p-ea96f4ff.entry.js → p-34ea8023.entry.js} +1 -1
- package/dist/twilight/{p-0782f0a7.entry.js → p-39c0175f.entry.js} +1 -1
- package/dist/twilight/{p-2c92df45.entry.js → p-3d31cbfe.entry.js} +1 -1
- package/dist/twilight/{p-06724710.entry.js → p-3f6c6e95.entry.js} +1 -1
- package/dist/twilight/{p-d8bb98ed.entry.js → p-3f6e3bca.entry.js} +1 -1
- package/dist/twilight/{p-DY7GHkFV.js → p-3xURxQbt.js} +1 -1
- package/dist/twilight/{p-51ecb2d9.entry.js → p-41d66dbc.entry.js} +1 -1
- package/dist/twilight/{p-b7334ac9.entry.js → p-43a135f9.entry.js} +1 -1
- package/dist/twilight/{p-6f7fba84.entry.js → p-46a2bf53.entry.js} +1 -1
- package/dist/twilight/{p-9b27ca27.entry.js → p-48a3c4d0.entry.js} +1 -1
- package/dist/twilight/{p-50c8e72c.entry.js → p-4b6dc22a.entry.js} +1 -1
- package/dist/twilight/{p-dc89997e.entry.js → p-4cdfb0ed.entry.js} +1 -1
- package/dist/twilight/{p-4814b5d4.entry.js → p-4d4f5878.entry.js} +1 -1
- package/dist/twilight/{p-0df9bcc4.entry.js → p-4de41a53.entry.js} +1 -1
- package/dist/twilight/{p-dc3bdfef.entry.js → p-4ee88ae3.entry.js} +1 -1
- package/dist/twilight/{p-de880ecf.entry.js → p-52b0e3e5.entry.js} +1 -1
- package/dist/twilight/{p-43512641.entry.js → p-53b89833.entry.js} +1 -1
- package/dist/twilight/{p-d9758e1a.entry.js → p-54bdf670.entry.js} +1 -1
- package/dist/twilight/{p-33a611be.entry.js → p-5572c1bb.entry.js} +1 -1
- package/dist/twilight/{p-5ca9e30b.entry.js → p-58bfa710.entry.js} +1 -1
- package/dist/twilight/{p-e3a06384.entry.js → p-5b34281f.entry.js} +1 -1
- package/dist/twilight/{p-ea3bb7fb.entry.js → p-5d8f8d31.entry.js} +1 -1
- package/dist/twilight/{p-71e1f303.entry.js → p-5dfb4250.entry.js} +1 -1
- package/dist/twilight/{p-8ddf82ac.entry.js → p-5e48d054.entry.js} +1 -1
- package/dist/twilight/{p-4d7cf422.entry.js → p-6371ecfb.entry.js} +1 -1
- package/dist/twilight/{p-62555be5.entry.js → p-63997e17.entry.js} +1 -1
- package/dist/twilight/{p-7938aa97.entry.js → p-639ef336.entry.js} +1 -1
- package/dist/twilight/{p-523971f5.entry.js → p-65dac0dc.entry.js} +1 -1
- package/dist/twilight/{p-415eba06.entry.js → p-6972a912.entry.js} +1 -1
- package/dist/twilight/{p-a188bde3.entry.js → p-6c6cfa25.entry.js} +1 -1
- package/dist/twilight/{p-f3d84cf0.entry.js → p-7117a3df.entry.js} +1 -1
- package/dist/twilight/{p-f2e4492c.entry.js → p-730f67ce.entry.js} +1 -1
- package/dist/twilight/{p-ae85b377.entry.js → p-75316703.entry.js} +1 -1
- package/dist/twilight/{p-e58faf81.entry.js → p-791a4de0.entry.js} +1 -1
- package/dist/twilight/{p-ce4f7734.entry.js → p-79f75f23.entry.js} +1 -1
- package/dist/twilight/{p-547c2ed5.entry.js → p-7a5150ad.entry.js} +1 -1
- package/dist/twilight/{p-a35e39e5.entry.js → p-7bce8959.entry.js} +1 -1
- package/dist/twilight/{p-4c7190e3.entry.js → p-88aae8b5.entry.js} +1 -1
- package/dist/twilight/{p-c80c3bde.entry.js → p-891fd288.entry.js} +1 -1
- package/dist/twilight/{p-6d9c2c00.entry.js → p-89365ad7.entry.js} +1 -1
- package/dist/twilight/{p-dd96258c.entry.js → p-8da97f62.entry.js} +1 -1
- package/dist/twilight/{p-1bf5a9c5.entry.js → p-8de1f867.entry.js} +1 -1
- package/dist/twilight/{p-c2bd158e.entry.js → p-913e3175.entry.js} +1 -1
- package/dist/twilight/{p-9b2767b1.entry.js → p-9b95f107.entry.js} +1 -1
- package/dist/twilight/{p-d50badfc.entry.js → p-9bb8bd6c.entry.js} +1 -1
- package/dist/twilight/{p-f8858ab7.entry.js → p-9ca993de.entry.js} +1 -1
- package/dist/twilight/{p-cfa579ba.entry.js → p-9df8e4bd.entry.js} +1 -1
- package/dist/twilight/{p-5f41c9fe.entry.js → p-9e49d85f.entry.js} +1 -1
- package/dist/twilight/{p-BVZV3mwk.js → p-AWtDVHWY.js} +1 -1
- package/dist/twilight/{p-CpfofV0a.js → p-BTR557QH.js} +2 -2
- package/dist/twilight/{p-BeznJhTa.js → p-D82O5pkw.js} +1 -1
- package/dist/twilight/{p-D0cyuYs_.js → p-DXNyBG0s.js} +1 -1
- package/dist/twilight/{p-xMEM8S5Y.js → p-DdVH7VEz.js} +1 -1
- package/dist/twilight/{p-D1Wbg5r1.js → p-GQ-wuBin.js} +1 -1
- package/dist/twilight/{p-Dxk4zt55.js → p-X6DlYEXx.js} +1 -1
- package/dist/twilight/{p-CkkVp-q5.js → p-Y9R2faFd.js} +1 -1
- package/dist/twilight/{p-hBZ1atkH.js → p-Zr_Na9jM.js} +2 -2
- package/dist/twilight/{p-bcfd547b.entry.js → p-a0d251ec.entry.js} +1 -1
- package/dist/twilight/{p-228007cc.entry.js → p-a2df5f85.entry.js} +1 -1
- package/dist/twilight/p-a462cf60.entry.js +4 -0
- package/dist/twilight/{p-547d3b81.entry.js → p-a73f0f08.entry.js} +1 -1
- package/dist/twilight/{p-1075a4d0.entry.js → p-ac968f38.entry.js} +1 -1
- package/dist/twilight/{p-b137c970.entry.js → p-aca47dd5.entry.js} +1 -1
- package/dist/twilight/{p-944e0e08.entry.js → p-b0dee69a.entry.js} +1 -1
- package/dist/twilight/{p-555caba6.entry.js → p-b7a84f6a.entry.js} +1 -1
- package/dist/twilight/{p-5b1a2e44.entry.js → p-b8ba7d7a.entry.js} +1 -1
- package/dist/twilight/{p-3444b26e.entry.js → p-b8eead91.entry.js} +1 -1
- package/dist/twilight/{p-b65576d3.entry.js → p-bbb88414.entry.js} +1 -1
- package/dist/twilight/{p-d3876217.entry.js → p-c50f18ff.entry.js} +1 -1
- package/dist/twilight/{p-07bb37a5.entry.js → p-ca14d0e0.entry.js} +1 -1
- package/dist/twilight/{p-d680f719.entry.js → p-ce20fc73.entry.js} +1 -1
- package/dist/twilight/{p-8c44f4f2.entry.js → p-d09e982e.entry.js} +1 -1
- package/dist/twilight/{p-d6634a06.entry.js → p-d3977f2f.entry.js} +1 -1
- package/dist/twilight/{p-d92b735e.entry.js → p-d3a0ba94.entry.js} +1 -1
- package/dist/twilight/{p-a1619269.entry.js → p-d5d2b0fb.entry.js} +1 -1
- package/dist/twilight/{p-bde115c6.entry.js → p-d78b3444.entry.js} +1 -1
- package/dist/twilight/{p-2d6ac28f.entry.js → p-db30160d.entry.js} +1 -1
- package/dist/twilight/{p-a5ea67c7.entry.js → p-dd9260b4.entry.js} +1 -1
- package/dist/twilight/{p-8e2ea210.entry.js → p-e0bdbbff.entry.js} +1 -1
- package/dist/twilight/p-e551f928.entry.js +4 -0
- package/dist/twilight/{p-c956c5f0.entry.js → p-e8c637d0.entry.js} +1 -1
- package/dist/twilight/{p-d6fcc0ac.entry.js → p-ed7ffc7e.entry.js} +1 -1
- package/dist/twilight/{p-6713d7fd.entry.js → p-eee4a3dd.entry.js} +1 -1
- package/dist/twilight/{p-fd4272ca.entry.js → p-eeece90d.entry.js} +1 -1
- package/dist/twilight/{p-841f230a.entry.js → p-f2099ffc.entry.js} +1 -1
- package/dist/twilight/{p-c382d4e1.entry.js → p-f3abd84c.entry.js} +1 -1
- package/dist/twilight/{p-83df1e8e.entry.js → p-fa984e9c.entry.js} +1 -1
- package/dist/twilight/{p-c5d5b9e9.entry.js → p-fb4906f6.entry.js} +1 -1
- package/dist/twilight/{p-9974ecba.entry.js → p-fc146f87.entry.js} +1 -1
- package/dist/twilight/{p-b0350351.entry.js → p-fdb6d4c3.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +4 -0
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +53 -11
- package/dist/types/components/salla-quick-buy/salla-quick-buy.d.ts +9 -0
- package/package.json +5 -5
- package/dist/twilight/p-37861ce2.entry.js +0 -4
- package/dist/twilight/p-5fe757aa.entry.js +0 -4
- package/dist/twilight/p-68dd78bc.entry.js +0 -4
- package/dist/twilight/p-741c66e3.entry.js +0 -4
- package/dist/twilight/p-b5abf61f.entry.js +0 -4
|
@@ -22,7 +22,7 @@ export class SallaCookiesBar {
|
|
|
22
22
|
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
23
23
|
this.openRequestedHandler = () => this.open();
|
|
24
24
|
this.authLoggedInHandler = () => this.syncConsentAfterLogin();
|
|
25
|
-
this.authLoggedOutHandler = () => this.
|
|
25
|
+
this.authLoggedOutHandler = () => this.handleLogout();
|
|
26
26
|
/**
|
|
27
27
|
* Consent cookie names, matching the category keys the backend expects.
|
|
28
28
|
*/
|
|
@@ -31,6 +31,18 @@ export class SallaCookiesBar {
|
|
|
31
31
|
this.functionalCookieKey = 'functional_cookies';
|
|
32
32
|
this.advertisingCookieKey = 'advertising_cookies';
|
|
33
33
|
this.consentCookieDays = 365;
|
|
34
|
+
/**
|
|
35
|
+
* Storage keys for the consent choice. The persistent choice lives in `Salla.storage`
|
|
36
|
+
* (localStorage); after a logout a copy is kept in `Salla.storage.session` so the bar
|
|
37
|
+
* stays hidden until the browsing session ends.
|
|
38
|
+
*/
|
|
39
|
+
this.consentStorageKey = 'cookies-consent';
|
|
40
|
+
this.sessionConsentPointsKey = 'cookies-consent-points';
|
|
41
|
+
/**
|
|
42
|
+
* Set when the persistent choice was made (or attributed) while signed in, i.e. it
|
|
43
|
+
* belongs to that account and must never be carried over to whoever signs in next.
|
|
44
|
+
*/
|
|
45
|
+
this.consentByUserKey = 'cookies-consent-by-user';
|
|
34
46
|
/**
|
|
35
47
|
* Known first-party cookie names (a trailing `*` matches by prefix) set by common
|
|
36
48
|
* third-party scripts, grouped by the category they belong to. Only first-party
|
|
@@ -112,6 +124,14 @@ export class SallaCookiesBar {
|
|
|
112
124
|
this.functionsEnabled = false;
|
|
113
125
|
this.adsEnabled = false;
|
|
114
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Stores can share an origin (`salla.sa/store_one`, `salla.sa/store_two`), so the
|
|
129
|
+
* post-logout session copy and the signed-in marker are keyed by store id to stay out
|
|
130
|
+
* of the other stores.
|
|
131
|
+
*/
|
|
132
|
+
storeKey(key) {
|
|
133
|
+
return `${key}_${Salla.config.get('store.id')}`;
|
|
134
|
+
}
|
|
115
135
|
async componentWillLoad() {
|
|
116
136
|
await Salla.onReady();
|
|
117
137
|
await Salla.lang.onLoaded();
|
|
@@ -121,7 +141,7 @@ export class SallaCookiesBar {
|
|
|
121
141
|
Salla.event.on('auth::logged.out', this.authLoggedOutHandler);
|
|
122
142
|
this.unregisterAfterFetchMenuItemsHook = Salla.hooks.registerHook('salla-menu', 'afterFetchMenuItems', (menuComponent) => this.appendCookiesSettingsLink(menuComponent));
|
|
123
143
|
this.hydrateToggleState();
|
|
124
|
-
if (
|
|
144
|
+
if (this.currentConsentPoints()) {
|
|
125
145
|
this.isVisible = false;
|
|
126
146
|
}
|
|
127
147
|
// Keep tracking cookies enforced on every load/refresh, not just when the
|
|
@@ -190,23 +210,50 @@ export class SallaCookiesBar {
|
|
|
190
210
|
*/
|
|
191
211
|
applyConsent(points) {
|
|
192
212
|
this.writeLocalConsentCookies(points);
|
|
213
|
+
// A fresh choice is stored persistently, so any post-logout session copy is stale.
|
|
214
|
+
this.clearSessionConsent();
|
|
215
|
+
Salla.storage.set(this.storeKey(this.consentByUserKey), !Salla.config.isGuest());
|
|
193
216
|
this.sweepDisabledCategoryCookies(points);
|
|
194
217
|
if (!Salla.config.isGuest()) {
|
|
195
218
|
Salla.api.request('account/data-privacy', { points }, 'post').catch(() => { });
|
|
196
219
|
}
|
|
197
220
|
}
|
|
198
221
|
/**
|
|
199
|
-
* The currently known accepted categories
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
* choice has been made yet — the bar itself is the source of truth in that case,
|
|
203
|
-
* not a sweep.
|
|
222
|
+
* The currently known accepted categories: the persistent choice if there is one,
|
|
223
|
+
* otherwise the post-logout session copy. Returns `null` when no choice has been
|
|
224
|
+
* made yet — the bar itself is the source of truth in that case, not a sweep.
|
|
204
225
|
*/
|
|
205
226
|
currentConsentPoints() {
|
|
206
|
-
|
|
227
|
+
return this.persistentConsentPoints() ?? this.sessionConsentPoints();
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The accepted categories read from local cookies — there is no backend endpoint to
|
|
231
|
+
* read the customer's saved preference back, so the cookies written on save are the
|
|
232
|
+
* only source of truth we have.
|
|
233
|
+
*/
|
|
234
|
+
persistentConsentPoints() {
|
|
235
|
+
if (!Salla.storage.get(this.consentStorageKey))
|
|
207
236
|
return null;
|
|
208
237
|
return this.allCategoryKeys().filter(key => key === this.necessaryCookieKey || Salla.cookie.get(key) === 'true');
|
|
209
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* The choice carried over from before a logout, kept only for the current browsing
|
|
241
|
+
* session (see `handleLogout`). It belongs to the customer who logged out, so it only
|
|
242
|
+
* applies while the visitor is a guest — never to whoever signs in next.
|
|
243
|
+
*/
|
|
244
|
+
sessionConsentPoints() {
|
|
245
|
+
if (!Salla.config.isGuest())
|
|
246
|
+
return null;
|
|
247
|
+
if (!Salla.storage.session?.get(this.storeKey(this.consentStorageKey)))
|
|
248
|
+
return null;
|
|
249
|
+
const points = Salla.storage.session.get(this.storeKey(this.sessionConsentPointsKey));
|
|
250
|
+
const savedPoints = Array.isArray(points) ? points : [];
|
|
251
|
+
return this.allCategoryKeys().filter(key => key === this.necessaryCookieKey || savedPoints.includes(key));
|
|
252
|
+
}
|
|
253
|
+
clearSessionConsent() {
|
|
254
|
+
Salla.storage.session?.remove(this.storeKey(this.consentStorageKey));
|
|
255
|
+
Salla.storage.session?.remove(this.storeKey(this.sessionConsentPointsKey));
|
|
256
|
+
}
|
|
210
257
|
enforceCurrentConsent() {
|
|
211
258
|
const points = this.currentConsentPoints();
|
|
212
259
|
if (points)
|
|
@@ -226,31 +273,76 @@ export class SallaCookiesBar {
|
|
|
226
273
|
this.adsEnabled = points.includes(this.advertisingCookieKey);
|
|
227
274
|
}
|
|
228
275
|
/**
|
|
229
|
-
*
|
|
230
|
-
* browser, not the account — without this, whatever the previous customer chose
|
|
231
|
-
* be misread as "the visitor's own prior choice" and pushed to the next account
|
|
232
|
-
* logs in (or is created) on this same browser.
|
|
276
|
+
* On logout, stop keeping the choice persistently: local cookies/storage are scoped to
|
|
277
|
+
* the browser, not the account — without this, whatever the previous customer chose
|
|
278
|
+
* would be misread as "the visitor's own prior choice" and pushed to the next account
|
|
279
|
+
* that logs in (or is created) on this same browser.
|
|
280
|
+
*
|
|
281
|
+
* The choice is still honoured for the rest of the browsing session (copied to session
|
|
282
|
+
* storage), so the bar doesn't pop up again right after logging out; it shows again
|
|
283
|
+
* once the store is closed and reopened.
|
|
284
|
+
*
|
|
285
|
+
* A logout fired while the visitor is already a guest is the automatic `force_logout`
|
|
286
|
+
* cleanup (the session already ended server-side), not the customer's doing, so a choice
|
|
287
|
+
* the visitor made as a guest is kept as is. A choice made while signed in belongs to
|
|
288
|
+
* that account, so it's handled like any other logout.
|
|
233
289
|
*/
|
|
234
|
-
|
|
290
|
+
handleLogout() {
|
|
291
|
+
if (Salla.config.isGuest() && !Salla.storage.get(this.storeKey(this.consentByUserKey)))
|
|
292
|
+
return;
|
|
293
|
+
const state = Salla.storage.get(this.consentStorageKey);
|
|
294
|
+
const points = this.persistentConsentPoints();
|
|
295
|
+
if (state && points) {
|
|
296
|
+
Salla.storage.session?.set(this.storeKey(this.consentStorageKey), state);
|
|
297
|
+
Salla.storage.session?.set(this.storeKey(this.sessionConsentPointsKey), points);
|
|
298
|
+
}
|
|
235
299
|
for (const key of this.allCategoryKeys()) {
|
|
236
300
|
Salla.cookie.remove(key);
|
|
237
301
|
}
|
|
238
|
-
Salla.storage.remove(
|
|
239
|
-
|
|
240
|
-
// made a choice yet, so the bar should show again right away.
|
|
241
|
-
this.isVisible = true;
|
|
302
|
+
Salla.storage.remove(this.consentStorageKey);
|
|
303
|
+
Salla.storage.remove(this.storeKey(this.consentByUserKey));
|
|
242
304
|
}
|
|
243
305
|
/**
|
|
244
306
|
* Runs when a guest signs in. There is no backend endpoint to check whether the
|
|
245
307
|
* account already has a saved preference, so if the visitor already made a choice
|
|
246
308
|
* as a guest (guest choices are never sent server-side), attribute that local
|
|
247
309
|
* choice to the account now — this is the only source of truth available.
|
|
310
|
+
* The post-logout session copy belongs to the previous customer, so it's dropped here
|
|
311
|
+
* and never synced.
|
|
312
|
+
* `auth::logged.in` is dispatched even when the profile fetch fails, so a login that
|
|
313
|
+
* didn't resolve a user (still a guest) changes nothing.
|
|
248
314
|
*/
|
|
249
315
|
syncConsentAfterLogin() {
|
|
250
|
-
|
|
251
|
-
|
|
316
|
+
if (Salla.config.isGuest())
|
|
317
|
+
return;
|
|
318
|
+
this.clearSessionConsent();
|
|
319
|
+
const points = this.persistentConsentPoints();
|
|
320
|
+
if (!points) {
|
|
321
|
+
// Nothing chosen on this browser for the account that just signed in — e.g. after a
|
|
322
|
+
// logout that kept the bar hidden on this page — so ask them now.
|
|
323
|
+
this.step = 'consent';
|
|
324
|
+
this.isVisible = true;
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
// A choice that already belongs to an account isn't this visitor's to hand over.
|
|
328
|
+
if (Salla.storage.get(this.storeKey(this.consentByUserKey)))
|
|
252
329
|
return;
|
|
253
|
-
|
|
330
|
+
// Only once the account actually has the choice does it count as theirs; if the POST
|
|
331
|
+
// fails, a later login can try again. The response can arrive after the visitor logged
|
|
332
|
+
// out or chose again, so only mark it if it's still the same account and choice.
|
|
333
|
+
const userId = Salla.config.get('user.id');
|
|
334
|
+
Salla.api
|
|
335
|
+
.request('account/data-privacy', { points }, 'post')
|
|
336
|
+
.then(() => {
|
|
337
|
+
const currentPoints = this.persistentConsentPoints();
|
|
338
|
+
const unchanged = !Salla.config.isGuest() &&
|
|
339
|
+
Salla.config.get('user.id') === userId &&
|
|
340
|
+
currentPoints?.length === points.length &&
|
|
341
|
+
points.every(key => currentPoints.includes(key));
|
|
342
|
+
if (unchanged)
|
|
343
|
+
Salla.storage.set(this.storeKey(this.consentByUserKey), true);
|
|
344
|
+
})
|
|
345
|
+
.catch(() => { });
|
|
254
346
|
}
|
|
255
347
|
cookieNameMatchesPattern(cookieName, pattern) {
|
|
256
348
|
return pattern.endsWith('*')
|
|
@@ -277,8 +369,15 @@ export class SallaCookiesBar {
|
|
|
277
369
|
dismiss(eventName) {
|
|
278
370
|
this.isVisible = false;
|
|
279
371
|
//We will call event first because we need to compare between old and new data inside session
|
|
280
|
-
|
|
281
|
-
|
|
372
|
+
try {
|
|
373
|
+
Salla.event.emit(`salla-cookies-bar::${eventName}`);
|
|
374
|
+
}
|
|
375
|
+
finally {
|
|
376
|
+
// Listeners (themes, apps, third-party scripts) run synchronously and their errors
|
|
377
|
+
// propagate; always persist the choice so a throwing listener can't make the bar
|
|
378
|
+
// show again on the next page. The error is still rethrown after this.
|
|
379
|
+
Salla.storage.set(this.consentStorageKey, eventName);
|
|
380
|
+
}
|
|
282
381
|
}
|
|
283
382
|
/**
|
|
284
383
|
* Persist the customized per-category toggle choices, then dismiss.
|
|
@@ -65,9 +65,18 @@ export class SallaPayments {
|
|
|
65
65
|
return;
|
|
66
66
|
if (salla.config.get('page.slug') !== 'index')
|
|
67
67
|
return;
|
|
68
|
+
// Theme previews and editor frames are not what shoppers see.
|
|
69
|
+
if (salla.config.get('theme.mode') !== 'live' || window.self !== window.top)
|
|
70
|
+
return;
|
|
68
71
|
if (!salla.config.get('store.settings.commercial_number')
|
|
69
72
|
&& !salla.config.get('store.settings.freelance_number'))
|
|
70
73
|
return;
|
|
74
|
+
// Animations freeze while the page is hidden, so any hide in the window voids the check.
|
|
75
|
+
let pageWasHidden = false;
|
|
76
|
+
const trackVisibility = () => {
|
|
77
|
+
if (document.visibilityState !== 'visible')
|
|
78
|
+
pageWasHidden = true;
|
|
79
|
+
};
|
|
71
80
|
const isShown = (el) => {
|
|
72
81
|
const check = el.checkVisibility;
|
|
73
82
|
if (typeof check !== 'function')
|
|
@@ -83,6 +92,12 @@ export class SallaPayments {
|
|
|
83
92
|
&& rect.top < window.innerHeight && rect.left < window.innerWidth);
|
|
84
93
|
};
|
|
85
94
|
const verdict = () => {
|
|
95
|
+
trackVisibility();
|
|
96
|
+
if (pageWasHidden)
|
|
97
|
+
return null;
|
|
98
|
+
// Read late: the app flag comes from the analytics context, set after load.
|
|
99
|
+
if (salla.config.isMobileApp())
|
|
100
|
+
return null;
|
|
86
101
|
const badges = Array.from(document.querySelectorAll('salla-trust-badges'));
|
|
87
102
|
if (!badges.length)
|
|
88
103
|
return 'absent';
|
|
@@ -96,13 +111,19 @@ export class SallaPayments {
|
|
|
96
111
|
return;
|
|
97
112
|
SallaPayments.audited = true;
|
|
98
113
|
observer.disconnect();
|
|
114
|
+
trackVisibility();
|
|
115
|
+
document.addEventListener('visibilitychange', trackVisibility);
|
|
116
|
+
const stopTracking = () => document.removeEventListener('visibilitychange', trackVisibility);
|
|
99
117
|
// Settle first, so a footer still running its entrance animation is not read as a hide.
|
|
100
118
|
setTimeout(() => {
|
|
101
|
-
if (!verdict())
|
|
119
|
+
if (!verdict()) {
|
|
120
|
+
stopTracking();
|
|
102
121
|
return;
|
|
122
|
+
}
|
|
103
123
|
// Second look, so a late animation is not read as a hide.
|
|
104
124
|
setTimeout(async () => {
|
|
105
125
|
const cause = verdict();
|
|
126
|
+
stopTracking();
|
|
106
127
|
if (!cause || salla.storage.getWithTTL('salla::tb-audit'))
|
|
107
128
|
return;
|
|
108
129
|
try {
|
|
@@ -5,7 +5,7 @@ import { Host, h } from "@stencil/core";
|
|
|
5
5
|
import "@salla.sa/applepay/src/index";
|
|
6
6
|
import { resolveApplePayOrderOptions, appendOrderOptionsToPayload, reportProductOptionsValiditySync, } from "../salla-order-options-modal/apple-pay-order-options";
|
|
7
7
|
import { injectFreeProductsIntoPayload } from "../salla-order-options-modal/free-product-payload";
|
|
8
|
-
import { applePayMerchantId, canCompleteApplePay, ensureApplePaySdk } from "@salla.sa/applepay/src/apple-pay-support";
|
|
8
|
+
import { applePayMerchantId, canCompleteApplePay, ensureApplePaySdk, resolveApplePayNetworks } from "@salla.sa/applepay/src/apple-pay-support";
|
|
9
9
|
export class SallaQuickBuy {
|
|
10
10
|
constructor() {
|
|
11
11
|
/**
|
|
@@ -125,6 +125,17 @@ export class SallaQuickBuy {
|
|
|
125
125
|
resolveCheckoutType() {
|
|
126
126
|
return this.applePayOnly && !this.productId ? 'mini_checkout' : 'buy_now';
|
|
127
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* The backend's networks for this attempt, never widened with a default set.
|
|
130
|
+
* An empty array is the backend's answer, not a blank, so only an unset prop defers to config.
|
|
131
|
+
*
|
|
132
|
+
* The prop is typed `string[]`, but mini-checkout property-binds the raw backend value, which
|
|
133
|
+
* PHP serializes as an object when its keys are non-sequential — spreading that throws. Route
|
|
134
|
+
* it through the same normalizer the rest of the package uses.
|
|
135
|
+
*/
|
|
136
|
+
resolveSupportedNetworks() {
|
|
137
|
+
return resolveApplePayNetworks(this.supportedNetworks);
|
|
138
|
+
}
|
|
128
139
|
async settlePayment() {
|
|
129
140
|
//use this way to get quantity too
|
|
130
141
|
let data = this.host.getElementSallaData();
|
|
@@ -171,8 +182,7 @@ export class SallaQuickBuy {
|
|
|
171
182
|
currency: this.currency || salla.config.get('store.settings.buy_now.currency') || 'SAR', // SAR
|
|
172
183
|
requiredShippingContactFields: this.getRequiredShippingContactFields(),
|
|
173
184
|
shippingMethods: this.isRequireShipping ? [] : undefined,
|
|
174
|
-
supportedNetworks:
|
|
175
|
-
? this.supportedNetworks : salla.config.get('store.settings.buy_now.supportedNetworks'),
|
|
185
|
+
supportedNetworks: this.resolveSupportedNetworks(),
|
|
176
186
|
supportedCountries: (Array.isArray(this.supportedCountries) && this.supportedCountries.length)
|
|
177
187
|
? this.supportedCountries : salla.config.get('store.settings.buy_now.supportedCountries'),
|
|
178
188
|
countryCode: salla.config.get('store.store_country') || 'SA',
|
|
@@ -305,7 +315,10 @@ export class SallaQuickBuy {
|
|
|
305
315
|
const canMakePayments = typeof window !== 'undefined' && !!window.ApplePaySession?.canMakePayments?.();
|
|
306
316
|
const storeHasApplePay = salla?.config?.get?.('store.settings.payments')?.includes?.('apple_pay') ?? true;
|
|
307
317
|
const isSallaGateway = salla?.config?.get?.('store.settings.is_salla_gateway', false) ?? true;
|
|
308
|
-
|
|
318
|
+
// No networks means nothing to charge with, so don't show the button — canMakePayments()
|
|
319
|
+
// alone would light it up on Safari.
|
|
320
|
+
this.isApplePayActive = canMakePayments && storeHasApplePay && isSallaGateway
|
|
321
|
+
&& !!this.resolveSupportedNetworks().length;
|
|
309
322
|
const runInit = async () => {
|
|
310
323
|
if (!this.productId && salla?.config?.get && salla.url?.is_page) {
|
|
311
324
|
this.productId = salla.config.get('page.id');
|
|
@@ -344,7 +357,8 @@ export class SallaQuickBuy {
|
|
|
344
357
|
// (non-Safari browsers / non-Apple devices via the QR-code fallback). The
|
|
345
358
|
// helper loads Apple's JS SDK and awaits it before probing, so this is a
|
|
346
359
|
// stable answer on first load (no race against the async script fetch).
|
|
347
|
-
this.isApplePayActive = storeAllowsApplePay
|
|
360
|
+
this.isApplePayActive = storeAllowsApplePay
|
|
361
|
+
&& await canCompleteApplePay(this.currency, this.resolveSupportedNetworks());
|
|
348
362
|
};
|
|
349
363
|
return new Promise((resolve) => {
|
|
350
364
|
if (typeof salla?.onReady === 'function') {
|
|
@@ -356,7 +370,7 @@ export class SallaQuickBuy {
|
|
|
356
370
|
});
|
|
357
371
|
}
|
|
358
372
|
render() {
|
|
359
|
-
return h(Host, { key: '
|
|
373
|
+
return h(Host, { key: '8d1d37acada1f9cdbe6913d01a97fe881facc7af' }, this.quickBuyButton());
|
|
360
374
|
}
|
|
361
375
|
quickBuyButton() {
|
|
362
376
|
return h("apple-pay-button", { locale: salla?.config?.get?.('user.language_code') || 'ar', onClick: () => this.quickBuyHandler(), "data-quick-purchase": "applepay", class: "s-quick-buy-apple-pay", "data-is-applepay": "1", buttonstyle: "black", type: this.type });
|