@salla.sa/twilight-components 3.0.16 → 3.0.18
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/{Helper-BV6HUQzI.js → Helper-D2VNt6eb.js} +1 -1
- package/dist/cjs/{filepond-hJcaHnfM.js → filepond-DkCudLhG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DDkDXFOe.js → filepond-plugin-file-poster-C-uxFWfW.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-BBZimb8J.js → filepond-plugin-file-validate-size-BikXTQW2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-B5VDnf33.js → filepond-plugin-file-validate-type-Drs7PouU.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-Cmuqwdn1.js → filepond-plugin-image-edit-hxr0h9kt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BFjHgWMS.js → filepond-plugin-image-exif-orientation-CVZmWU_4.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-C7Ow81pR.js → filepond-plugin-image-preview-CBjPKx-d.js} +1 -1
- package/dist/cjs/free-shipping-timer-6QBe5BNS.js +156 -0
- package/dist/cjs/{index-PB4iLztN.js → index-CTYg2zC6.js} +8 -8
- package/dist/cjs/{intlTelInput-Ds-AW6H6.js → intlTelInput-C9X0hKXV.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 +2 -2
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-attachment-view_9.cjs.entry.js +11 -11
- 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 +166 -16
- 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 +2 -2
- 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 +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 +2 -2
- package/dist/cjs/salla-filters.cjs.entry.js +2 -2
- package/dist/cjs/salla-free-shipping-banner.cjs.entry.js +95 -9
- package/dist/cjs/salla-free-shipping-tag.cjs.entry.js +18 -5
- package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
- package/dist/cjs/salla-gift-card-redeem_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-gifting.cjs.entry.js +13 -6
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-infinite-scroll.cjs.entry.js +2 -2
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
- package/dist/cjs/salla-localization-modal.cjs.entry.js +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 +2 -2
- package/dist/cjs/salla-offer-modal.cjs.entry.js +8 -4
- package/dist/cjs/salla-offer.cjs.entry.js +7 -3
- 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-items.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-options-modal.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-payment.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-rewards.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 +2 -2
- 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-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 +6 -5
- package/dist/cjs/salla-products-slider.cjs.entry.js +2 -2
- package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
- package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +7 -4
- package/dist/cjs/salla-rating-modal.cjs.entry.js +2 -2
- 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 +2 -2
- 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-thank-you-header.cjs.entry.js +1 -1
- package/dist/cjs/salla-thank-you-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.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 +2 -2
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-ZsewI4gd.js → vanilla-picker-BsLm8rHT.js} +1 -1
- package/dist/collection/components/salla-bullet-delivery/salla-bullet-delivery.js +72 -16
- package/dist/collection/components/salla-bullet-delivery/selector-tracker.js +106 -0
- package/dist/collection/components/salla-free-shipping-banner/salla-free-shipping-banner.css +18 -4
- package/dist/collection/components/salla-free-shipping-banner/salla-free-shipping-banner.js +94 -11
- package/dist/collection/components/salla-free-shipping-tag/salla-free-shipping-tag.css +6 -0
- package/dist/collection/components/salla-free-shipping-tag/salla-free-shipping-tag.js +18 -2
- package/dist/collection/components/salla-gifting/salla-gifting.css +16 -1
- package/dist/collection/components/salla-gifting/salla-gifting.js +11 -4
- package/dist/collection/components/salla-offer/salla-offer.js +6 -2
- package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +7 -3
- package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
- package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +5 -2
- package/dist/collection/shared/free-shipping-timer.js +130 -0
- package/dist/components/free-shipping-timer.js +150 -0
- package/dist/components/index.js +8 -8
- package/dist/components/salla-bullet-delivery.js +165 -15
- package/dist/components/salla-free-shipping-banner.js +95 -8
- package/dist/components/salla-free-shipping-tag.js +17 -3
- package/dist/components/salla-gifting.js +12 -5
- package/dist/components/salla-offer-modal.js +7 -3
- package/dist/components/salla-offer.js +6 -2
- package/dist/components/salla-products-list2.js +4 -3
- package/dist/components/salla-rating-modal-v22.js +5 -2
- package/dist/docs.json +25 -5
- package/dist/esm/{Helper-CsyfMJLx.js → Helper-C1T-oD4J.js} +1 -1
- package/dist/esm/{filepond-Cla3ae_2.js → filepond-BoWJzHeN.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-BO0nARSu.js → filepond-plugin-file-poster-B6MkMtuC.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CrcZ7P5c.js → filepond-plugin-file-validate-size-Dds_462B.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-Cci8f5e3.js → filepond-plugin-file-validate-type-DrfGXNay.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-y0q-Gkyo.js → filepond-plugin-image-edit-CN7eGg-7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-WYrkP26J.js → filepond-plugin-image-exif-orientation-CyhxK_6R.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-Bz0ZRBQp.js → filepond-plugin-image-preview-DdKqAzT9.js} +1 -1
- package/dist/esm/free-shipping-timer-CnTwkF6y.js +150 -0
- package/dist/esm/{index-DJuBNP7w.js → index-DgUQRYr2.js} +8 -8
- package/dist/esm/{intlTelInput-Dcl0COqn.js → intlTelInput-SwlavcFB.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 +2 -2
- package/dist/esm/salla-add-product-button_5.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-attachment-view_9.entry.js +11 -11
- 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 +166 -16
- 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 +2 -2
- 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 +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 +2 -2
- package/dist/esm/salla-filters.entry.js +2 -2
- package/dist/esm/salla-free-shipping-banner.entry.js +94 -8
- package/dist/esm/salla-free-shipping-tag.entry.js +17 -4
- package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
- package/dist/esm/salla-gift-card-redeem_2.entry.js +1 -1
- package/dist/esm/salla-gifting.entry.js +13 -6
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-infinite-scroll.entry.js +2 -2
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-list-tile.entry.js +1 -1
- package/dist/esm/salla-localization-modal.entry.js +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 +2 -2
- package/dist/esm/salla-offer-modal.entry.js +8 -4
- package/dist/esm/salla-offer.entry.js +7 -3
- 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-items.entry.js +1 -1
- package/dist/esm/salla-order-options-modal.entry.js +1 -1
- package/dist/esm/salla-order-payment.entry.js +1 -1
- package/dist/esm/salla-order-rewards.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 +2 -2
- 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-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 +6 -5
- package/dist/esm/salla-products-slider.entry.js +2 -2
- package/dist/esm/salla-quick-order.entry.js +1 -1
- package/dist/esm/salla-rating-modal-v2.entry.js +7 -4
- package/dist/esm/salla-rating-modal.entry.js +2 -2
- 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 +2 -2
- 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-thank-you-header.entry.js +1 -1
- package/dist/esm/salla-thank-you-page.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.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 +2 -2
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-DPvEywPm.js → vanilla-picker-Buy50D7t.js} +1 -1
- package/dist/twilight/{p-134692f5.entry.js → p-027cbda6.entry.js} +1 -1
- package/dist/twilight/{p-48fb615e.entry.js → p-0418c2df.entry.js} +1 -1
- package/dist/twilight/{p-792f1e05.entry.js → p-071aa0e7.entry.js} +1 -1
- package/dist/twilight/{p-be203bd9.entry.js → p-08a15c81.entry.js} +1 -1
- package/dist/twilight/{p-5f5c4f3c.entry.js → p-0ba159db.entry.js} +1 -1
- package/dist/twilight/{p-c657883d.entry.js → p-0d795b58.entry.js} +1 -1
- package/dist/twilight/{p-9f9ab89c.entry.js → p-0f25fedd.entry.js} +1 -1
- package/dist/twilight/{p-15098cb1.entry.js → p-12a25415.entry.js} +1 -1
- package/dist/twilight/p-1960020c.entry.js +4 -0
- package/dist/twilight/{p-f1037da9.entry.js → p-1af9db24.entry.js} +1 -1
- package/dist/twilight/p-23772523.entry.js +4 -0
- package/dist/twilight/{p-67bb5e0c.entry.js → p-254cff9a.entry.js} +1 -1
- package/dist/twilight/{p-a8f88ea6.entry.js → p-259c995a.entry.js} +1 -1
- package/dist/twilight/{p-3f701181.entry.js → p-26d2b28a.entry.js} +1 -1
- package/dist/twilight/{p-8a7bce99.entry.js → p-34148827.entry.js} +1 -1
- package/dist/twilight/{p-8e6bc10e.entry.js → p-361f6033.entry.js} +1 -1
- package/dist/twilight/{p-43700093.entry.js → p-37192614.entry.js} +1 -1
- package/dist/twilight/{p-1e7a0a4f.entry.js → p-3a632c69.entry.js} +1 -1
- package/dist/twilight/{p-b90d0e51.entry.js → p-3d8b77f7.entry.js} +1 -1
- package/dist/twilight/{p-615edf90.entry.js → p-3f842f32.entry.js} +1 -1
- package/dist/twilight/{p-788c0264.entry.js → p-419d6d71.entry.js} +1 -1
- package/dist/twilight/{p-b891f863.entry.js → p-481f52b1.entry.js} +1 -1
- package/dist/twilight/{p-343f57ea.entry.js → p-487b4411.entry.js} +1 -1
- package/dist/twilight/{p-19bf11c5.entry.js → p-4891c565.entry.js} +1 -1
- package/dist/twilight/{p-cfe523ab.entry.js → p-4a3fa153.entry.js} +1 -1
- package/dist/twilight/{p-33689489.entry.js → p-4ab5ee99.entry.js} +1 -1
- package/dist/twilight/{p-558f8ee0.entry.js → p-4b70e6c4.entry.js} +1 -1
- package/dist/twilight/{p-96be66eb.entry.js → p-516e4edc.entry.js} +1 -1
- package/dist/twilight/{p-9f920812.entry.js → p-53735934.entry.js} +1 -1
- package/dist/twilight/{p-e66f1b70.entry.js → p-5694edf1.entry.js} +1 -1
- package/dist/twilight/{p-9e8c583a.entry.js → p-5bbf17dd.entry.js} +1 -1
- package/dist/twilight/{p-43a4e000.entry.js → p-5e8d019e.entry.js} +1 -1
- package/dist/twilight/{p-8278e31a.entry.js → p-5f6fee0e.entry.js} +1 -1
- package/dist/twilight/{p-1436b465.entry.js → p-66ad7a30.entry.js} +1 -1
- package/dist/twilight/p-6af8a7b6.entry.js +4 -0
- package/dist/twilight/{p-96e16a6b.entry.js → p-6b5de500.entry.js} +1 -1
- package/dist/twilight/{p-951f1af4.entry.js → p-6ba3808a.entry.js} +1 -1
- package/dist/twilight/{p-ebb756bc.entry.js → p-6c3084c9.entry.js} +1 -1
- package/dist/twilight/{p-72092eff.entry.js → p-6dccd40f.entry.js} +1 -1
- package/dist/twilight/{p-70d5d802.entry.js → p-6e52b649.entry.js} +1 -1
- package/dist/twilight/{p-caac5694.entry.js → p-70dfb2b4.entry.js} +1 -1
- package/dist/twilight/{p-75015061.entry.js → p-76584a5b.entry.js} +1 -1
- package/dist/twilight/{p-f46da712.entry.js → p-78a56dc6.entry.js} +1 -1
- package/dist/twilight/{p-aa210c8a.entry.js → p-79822d99.entry.js} +1 -1
- package/dist/twilight/{p-5aa8ec0a.entry.js → p-7b5f97e7.entry.js} +1 -1
- package/dist/twilight/{p-9e24dec9.entry.js → p-7f97335a.entry.js} +1 -1
- package/dist/twilight/{p-3cbcec7c.entry.js → p-7fd9dc36.entry.js} +1 -1
- package/dist/twilight/p-84b0e7a9.entry.js +4 -0
- package/dist/twilight/p-8766e236.entry.js +4 -0
- package/dist/twilight/{p-a9a8a819.entry.js → p-8c1d14f0.entry.js} +1 -1
- package/dist/twilight/{p-a92e5068.entry.js → p-8c40278d.entry.js} +1 -1
- package/dist/twilight/{p-5b52ef24.entry.js → p-92fd20a0.entry.js} +1 -1
- package/dist/twilight/{p-f24a477c.entry.js → p-9cf1cfd4.entry.js} +1 -1
- package/dist/twilight/{p-f2062f34.entry.js → p-9d15f22d.entry.js} +1 -1
- package/dist/twilight/{p-8907ef61.entry.js → p-9e042cce.entry.js} +1 -1
- package/dist/twilight/{p-74238c01.entry.js → p-9e0a9a5a.entry.js} +1 -1
- package/dist/twilight/{p-8cb6dfd9.entry.js → p-9e65451e.entry.js} +1 -1
- package/dist/twilight/{p-BgGU8BXX.js → p-BK9YeXWp.js} +1 -1
- package/dist/twilight/{p-Do-w5Os8.js → p-BxQMWsr9.js} +1 -1
- package/dist/twilight/{p-DCUZjQXX.js → p-CBLWEyM9.js} +1 -1
- package/dist/twilight/{p-pOFi82Pb.js → p-CCwsxMbZ.js} +1 -1
- package/dist/twilight/{p-DliR9Sp1.js → p-Ca_SZn0u.js} +1 -1
- package/dist/twilight/{p-CqENl4Wm.js → p-CgNJWeaK.js} +1 -1
- package/dist/twilight/p-CnTwkF6y.js +4 -0
- package/dist/twilight/{p-DHk7-wXk.js → p-DMvhNbgN.js} +1 -1
- package/dist/twilight/{p-BPjqOy84.js → p-De1tLqQF.js} +1 -1
- package/dist/twilight/p-DgUQRYr2.js +5 -0
- package/dist/twilight/{p-CRYD9K0S.js → p-NqQdbGu6.js} +1 -1
- package/dist/twilight/{p-C9eNuCn7.js → p-Y2ZIN9Ok.js} +1 -1
- package/dist/twilight/{p-3b3f1838.entry.js → p-a44670a9.entry.js} +1 -1
- package/dist/twilight/{p-2ce991e8.entry.js → p-a5b732b3.entry.js} +1 -1
- package/dist/twilight/{p-5e8b7483.entry.js → p-a95b0dc1.entry.js} +1 -1
- package/dist/twilight/{p-20642013.entry.js → p-aa35cf98.entry.js} +1 -1
- package/dist/twilight/{p-1267d95a.entry.js → p-ac736b30.entry.js} +1 -1
- package/dist/twilight/{p-e651c3ee.entry.js → p-af49191f.entry.js} +1 -1
- package/dist/twilight/{p-82d50064.entry.js → p-b0d2e31f.entry.js} +1 -1
- package/dist/twilight/{p-8b72b7a2.entry.js → p-b1f808f5.entry.js} +1 -1
- package/dist/twilight/{p-b798788b.entry.js → p-b3ada3d0.entry.js} +1 -1
- package/dist/twilight/{p-03e6d42b.entry.js → p-b5a45f87.entry.js} +1 -1
- package/dist/twilight/p-b9d67694.entry.js +4 -0
- package/dist/twilight/{p-dcfd3688.entry.js → p-ba6dd59c.entry.js} +1 -1
- package/dist/twilight/p-bac25e34.entry.js +4 -0
- package/dist/twilight/{p-05e1fc6a.entry.js → p-bb8b2c85.entry.js} +1 -1
- package/dist/twilight/{p-b1aa33f3.entry.js → p-be6f8551.entry.js} +1 -1
- package/dist/twilight/{p-91ef7c89.entry.js → p-bed54154.entry.js} +1 -1
- package/dist/twilight/{p-4a3d4c28.entry.js → p-bed68e52.entry.js} +1 -1
- package/dist/twilight/{p-a7d2613b.entry.js → p-bfd5e263.entry.js} +1 -1
- package/dist/twilight/{p-63053048.entry.js → p-c4cf0b4d.entry.js} +1 -1
- package/dist/twilight/{p-189fa3c4.entry.js → p-cb48a5ef.entry.js} +1 -1
- package/dist/twilight/{p-370924c0.entry.js → p-cdeb9bcc.entry.js} +1 -1
- package/dist/twilight/{p-9b46c1ab.entry.js → p-d0aeeb7f.entry.js} +1 -1
- package/dist/twilight/{p-537748de.entry.js → p-d0ff9a3e.entry.js} +1 -1
- package/dist/twilight/{p-86db3fe8.entry.js → p-d1093a59.entry.js} +1 -1
- package/dist/twilight/{p-4be6e307.entry.js → p-d1121b3f.entry.js} +1 -1
- package/dist/twilight/{p-be84879f.entry.js → p-d1204965.entry.js} +1 -1
- package/dist/twilight/p-d346dabd.entry.js +4 -0
- package/dist/twilight/{p-3b6efc6e.entry.js → p-d4fb9921.entry.js} +1 -1
- package/dist/twilight/{p-52749db7.entry.js → p-d8955835.entry.js} +1 -1
- package/dist/twilight/{p-1c2d9885.entry.js → p-d9a1bf08.entry.js} +1 -1
- package/dist/twilight/{p-e67fdc9d.entry.js → p-da0df10b.entry.js} +1 -1
- package/dist/twilight/p-e24fbbb4.entry.js +4 -0
- package/dist/twilight/{p-a16f2376.entry.js → p-e38a6793.entry.js} +1 -1
- package/dist/twilight/{p-4a843e15.entry.js → p-e457e68f.entry.js} +1 -1
- package/dist/twilight/{p-382dc313.entry.js → p-e9b03e9c.entry.js} +1 -1
- package/dist/twilight/{p-c33be542.entry.js → p-eaf0c514.entry.js} +1 -1
- package/dist/twilight/{p-5b60ebdf.entry.js → p-ee479819.entry.js} +1 -1
- package/dist/twilight/p-ee65c489.entry.js +4 -0
- package/dist/twilight/{p-a6ba5168.entry.js → p-eefced26.entry.js} +1 -1
- package/dist/twilight/{p-a36e2dcf.entry.js → p-f7a58656.entry.js} +1 -1
- package/dist/twilight/{p-4a07e070.entry.js → p-f7ab5825.entry.js} +1 -1
- package/dist/twilight/{p-927d1967.entry.js → p-f9587127.entry.js} +1 -1
- package/dist/twilight/{p-09c651a2.entry.js → p-f9e5ed10.entry.js} +1 -1
- package/dist/twilight/{p-5f1b28e3.entry.js → p-fcb1009f.entry.js} +1 -1
- package/dist/twilight/{p-de458068.entry.js → p-fddf1997.entry.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-bullet-delivery/salla-bullet-delivery.d.ts +9 -1
- package/dist/types/components/salla-bullet-delivery/selector-tracker.d.ts +30 -0
- package/dist/types/components/salla-free-shipping-banner/salla-free-shipping-banner.d.ts +19 -5
- package/dist/types/components/salla-free-shipping-tag/salla-free-shipping-tag.d.ts +6 -1
- package/dist/types/components/salla-gifting/salla-gifting.d.ts +1 -0
- package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +1 -0
- package/dist/types/components.d.ts +11 -25
- package/dist/types/shared/free-shipping-timer.d.ts +36 -0
- package/package.json +5 -5
- package/dist/cjs/free-shipping-DkIKD6ch.js +0 -31
- package/dist/components/free-shipping.js +0 -29
- package/dist/esm/free-shipping-Brg4wsgg.js +0 -29
- package/dist/twilight/p-0c292c9a.entry.js +0 -4
- package/dist/twilight/p-1a7b0a2b.entry.js +0 -4
- package/dist/twilight/p-3b4aa865.entry.js +0 -4
- package/dist/twilight/p-3f713fc0.entry.js +0 -4
- package/dist/twilight/p-6a8d04d9.entry.js +0 -4
- package/dist/twilight/p-86ade991.entry.js +0 -4
- package/dist/twilight/p-9b02e779.entry.js +0 -4
- package/dist/twilight/p-Brg4wsgg.js +0 -4
- package/dist/twilight/p-DJuBNP7w.js +0 -5
- package/dist/twilight/p-bf12f616.entry.js +0 -4
- package/dist/twilight/p-d5b394c9.entry.js +0 -4
- package/dist/twilight/p-def7b9c4.entry.js +0 -4
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const cache = new Map();
|
|
7
|
+
async function request(productId) {
|
|
8
|
+
const endpoint = 'products/eligible-for-free-shipping' + (productId ? `/${productId}` : '');
|
|
9
|
+
try {
|
|
10
|
+
// 403 (feature off or plan not supported) and 410 (product gone) mean "not eligible",
|
|
11
|
+
// not a failure worth a toast.
|
|
12
|
+
const response = await salla.api.withoutNotifier(() => salla.api.request(endpoint));
|
|
13
|
+
return response?.data?.eligible === true;
|
|
14
|
+
}
|
|
15
|
+
catch (e) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Whether free shipping applies: to the store when no product is given (banner),
|
|
21
|
+
* or to the product (tag, product page banner). Same calls share one request.
|
|
22
|
+
*/
|
|
23
|
+
function isEligibleForFreeShipping(productId) {
|
|
24
|
+
const key = String(productId ?? '');
|
|
25
|
+
if (!cache.has(key)) {
|
|
26
|
+
cache.set(key, request(productId));
|
|
27
|
+
}
|
|
28
|
+
return cache.get(key);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const HOUR = 60 * 60 * 1000;
|
|
32
|
+
const DAY = 24 * HOUR;
|
|
33
|
+
const MAX_TIMEOUT = 2 ** 31 - 1;
|
|
34
|
+
// Used only when storage is not available (private mode, blocked site data).
|
|
35
|
+
let memoryStartedAt = null;
|
|
36
|
+
const DEFAULT_COUNTDOWN_HOURS = 45;
|
|
37
|
+
const DEFAULT_HIDDEN_DAYS = 7;
|
|
38
|
+
const positive = (value, fallback) => {
|
|
39
|
+
const number = Number(value);
|
|
40
|
+
return Number.isFinite(number) && number > 0 ? number : fallback;
|
|
41
|
+
};
|
|
42
|
+
/** The countdown and hidden period, from the store settings with 45 hours and 7 days as the fallback. */
|
|
43
|
+
function getTimerSettings() {
|
|
44
|
+
const settings = salla.config?.get?.('store.settings.free_shipping_banner');
|
|
45
|
+
return {
|
|
46
|
+
countdownMs: positive(settings?.countdown_hours, DEFAULT_COUNTDOWN_HOURS) * HOUR,
|
|
47
|
+
hiddenMs: positive(settings?.hidden_days, DEFAULT_HIDDEN_DAYS) * DAY,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** The timer exists only for visitors the backend allowed the banner for. */
|
|
51
|
+
function isTimerEnabled() {
|
|
52
|
+
return !!salla.config?.get?.('store.features')?.includes('free-shipping-banner');
|
|
53
|
+
}
|
|
54
|
+
const storageKey = () => `free-shipping-timer_${salla.config?.get?.('store.id')}`;
|
|
55
|
+
/** When the visitor first saw the banner, or null if they have not yet. */
|
|
56
|
+
function getStartedAt() {
|
|
57
|
+
try {
|
|
58
|
+
const stored = Number(salla.storage.get(storageKey()));
|
|
59
|
+
if (Number.isFinite(stored) && stored > 0) {
|
|
60
|
+
return stored;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
// fall through to the in-memory value
|
|
65
|
+
}
|
|
66
|
+
return memoryStartedAt;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Records the first time the visitor saw the banner. Does nothing when it is already recorded
|
|
70
|
+
* or when the feature is off.
|
|
71
|
+
*/
|
|
72
|
+
function startTimerIfNeeded(now = Date.now()) {
|
|
73
|
+
if (!isTimerEnabled()) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
const existing = getStartedAt();
|
|
77
|
+
if (existing) {
|
|
78
|
+
return existing;
|
|
79
|
+
}
|
|
80
|
+
memoryStartedAt = now;
|
|
81
|
+
try {
|
|
82
|
+
salla.storage.set(storageKey(), now);
|
|
83
|
+
}
|
|
84
|
+
catch (e) {
|
|
85
|
+
// keep the in-memory value
|
|
86
|
+
}
|
|
87
|
+
schedule();
|
|
88
|
+
notify();
|
|
89
|
+
return now;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Where the visitor is in the repeating cycle: `countdown` visible, then `hidden` hidden, again and again.
|
|
93
|
+
* Nothing but the first-seen time is stored, so changed settings apply on the next check.
|
|
94
|
+
*/
|
|
95
|
+
function computeTimerState(startedAt, now, countdownMs, hiddenMs) {
|
|
96
|
+
const elapsed = Math.max(0, now - startedAt);
|
|
97
|
+
const position = elapsed % (countdownMs + hiddenMs);
|
|
98
|
+
if (position < countdownMs) {
|
|
99
|
+
return { visible: true, remainingMs: countdownMs - position, nextChangeMs: countdownMs - position };
|
|
100
|
+
}
|
|
101
|
+
return { visible: false, remainingMs: 0, nextChangeMs: countdownMs + hiddenMs - position };
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The state the banner and tags follow. `null` means there is nothing to follow: the feature is off
|
|
105
|
+
* or the visitor has not seen the banner yet.
|
|
106
|
+
*/
|
|
107
|
+
function getFreeShippingTimerState(now = Date.now()) {
|
|
108
|
+
if (!isTimerEnabled()) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
const startedAt = getStartedAt();
|
|
112
|
+
if (!startedAt) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
const { countdownMs, hiddenMs } = getTimerSettings();
|
|
116
|
+
return computeTimerState(startedAt, now, countdownMs, hiddenMs);
|
|
117
|
+
}
|
|
118
|
+
const listeners = new Set();
|
|
119
|
+
let timeout;
|
|
120
|
+
function notify() {
|
|
121
|
+
listeners.forEach((listener) => listener());
|
|
122
|
+
}
|
|
123
|
+
// One timeout for the whole page, set for the next visible/hidden change.
|
|
124
|
+
function schedule() {
|
|
125
|
+
clearTimeout(timeout);
|
|
126
|
+
timeout = undefined;
|
|
127
|
+
if (!listeners.size) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const state = getFreeShippingTimerState();
|
|
131
|
+
if (!state) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
timeout = setTimeout(() => {
|
|
135
|
+
notify();
|
|
136
|
+
schedule();
|
|
137
|
+
}, Math.min(state.nextChangeMs + 50, MAX_TIMEOUT));
|
|
138
|
+
}
|
|
139
|
+
/** Calls back whenever the banner and tags have to show or hide. Returns the unsubscribe function. */
|
|
140
|
+
function subscribeToFreeShippingTimer(listener) {
|
|
141
|
+
listeners.add(listener);
|
|
142
|
+
schedule();
|
|
143
|
+
return () => {
|
|
144
|
+
listeners.delete(listener);
|
|
145
|
+
if (!listeners.size) {
|
|
146
|
+
clearTimeout(timeout);
|
|
147
|
+
timeout = undefined;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
exports.getFreeShippingTimerState = getFreeShippingTimerState;
|
|
153
|
+
exports.isEligibleForFreeShipping = isEligibleForFreeShipping;
|
|
154
|
+
exports.isTimerEnabled = isTimerEnabled;
|
|
155
|
+
exports.startTimerIfNeeded = startTimerIfNeeded;
|
|
156
|
+
exports.subscribeToFreeShippingTimer = subscribeToFreeShippingTimer;
|