@salla.sa/twilight-components 3.0.17 → 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-DSYelC4c.js → Helper-D2VNt6eb.js} +1 -1
- package/dist/cjs/{filepond-l9D0Yv7b.js → filepond-DkCudLhG.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-8SrbLptI.js → filepond-plugin-file-poster-C-uxFWfW.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-DGD6oJy0.js → filepond-plugin-file-validate-size-BikXTQW2.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BIvrhp3w.js → filepond-plugin-file-validate-type-Drs7PouU.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-4xKikdXG.js → filepond-plugin-image-edit-hxr0h9kt.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-C3BvwxQh.js → filepond-plugin-image-exif-orientation-CVZmWU_4.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-CBq_GY0V.js → filepond-plugin-image-preview-CBjPKx-d.js} +1 -1
- package/dist/cjs/free-shipping-timer-6QBe5BNS.js +156 -0
- package/dist/cjs/{index-BAwxpXnB.js → index-CTYg2zC6.js} +2 -2
- package/dist/cjs/{intlTelInput-xw-HaAEN.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 +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-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-Cm_uNdps.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-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 +2 -2
- 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-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-POCi7J93.js → Helper-C1T-oD4J.js} +1 -1
- package/dist/esm/{filepond-Ct76xW02.js → filepond-BoWJzHeN.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-C1OkzGRs.js → filepond-plugin-file-poster-B6MkMtuC.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-gdd-69cO.js → filepond-plugin-file-validate-size-Dds_462B.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BaZ2QTzl.js → filepond-plugin-file-validate-type-DrfGXNay.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CsoNvf0i.js → filepond-plugin-image-edit-CN7eGg-7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BHDSe3nH.js → filepond-plugin-image-exif-orientation-CyhxK_6R.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CD_S17z3.js → filepond-plugin-image-preview-DdKqAzT9.js} +1 -1
- package/dist/esm/free-shipping-timer-CnTwkF6y.js +150 -0
- package/dist/esm/{index-DmGAR42j.js → index-DgUQRYr2.js} +2 -2
- package/dist/esm/{intlTelInput-D76Q4XFx.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 +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-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-BlIXJyvJ.js → vanilla-picker-Buy50D7t.js} +1 -1
- package/dist/twilight/{p-4702959a.entry.js → p-027cbda6.entry.js} +1 -1
- package/dist/twilight/{p-e89a1905.entry.js → p-0418c2df.entry.js} +1 -1
- package/dist/twilight/{p-6757344a.entry.js → p-071aa0e7.entry.js} +1 -1
- package/dist/twilight/{p-a53e2c74.entry.js → p-08a15c81.entry.js} +1 -1
- package/dist/twilight/{p-acd48ae7.entry.js → p-0ba159db.entry.js} +1 -1
- package/dist/twilight/{p-a17784e6.entry.js → p-0d795b58.entry.js} +1 -1
- package/dist/twilight/{p-e81c4521.entry.js → p-0f25fedd.entry.js} +1 -1
- package/dist/twilight/{p-26fec98c.entry.js → p-12a25415.entry.js} +1 -1
- package/dist/twilight/p-1960020c.entry.js +4 -0
- package/dist/twilight/{p-b38c38fe.entry.js → p-1af9db24.entry.js} +1 -1
- package/dist/twilight/{p-24423a8d.entry.js → p-23772523.entry.js} +1 -1
- package/dist/twilight/{p-1982520c.entry.js → p-254cff9a.entry.js} +1 -1
- package/dist/twilight/{p-0225f396.entry.js → p-259c995a.entry.js} +1 -1
- package/dist/twilight/{p-7df4ee74.entry.js → p-26d2b28a.entry.js} +1 -1
- package/dist/twilight/{p-7a985c8c.entry.js → p-34148827.entry.js} +1 -1
- package/dist/twilight/{p-a5d2ad5e.entry.js → p-361f6033.entry.js} +1 -1
- package/dist/twilight/{p-ae9c0abe.entry.js → p-37192614.entry.js} +1 -1
- package/dist/twilight/{p-66f6d722.entry.js → p-3a632c69.entry.js} +1 -1
- package/dist/twilight/{p-14752d03.entry.js → p-3d8b77f7.entry.js} +1 -1
- package/dist/twilight/{p-4839d408.entry.js → p-3f842f32.entry.js} +1 -1
- package/dist/twilight/{p-c3c99d9e.entry.js → p-419d6d71.entry.js} +1 -1
- package/dist/twilight/{p-fae2a8d0.entry.js → p-481f52b1.entry.js} +1 -1
- package/dist/twilight/{p-b819de23.entry.js → p-487b4411.entry.js} +1 -1
- package/dist/twilight/{p-d495cce0.entry.js → p-4891c565.entry.js} +1 -1
- package/dist/twilight/{p-83ccad19.entry.js → p-4a3fa153.entry.js} +1 -1
- package/dist/twilight/{p-4057b692.entry.js → p-4ab5ee99.entry.js} +1 -1
- package/dist/twilight/{p-e5545546.entry.js → p-4b70e6c4.entry.js} +1 -1
- package/dist/twilight/{p-5d4fadd2.entry.js → p-516e4edc.entry.js} +1 -1
- package/dist/twilight/{p-90d4129f.entry.js → p-53735934.entry.js} +1 -1
- package/dist/twilight/{p-d68625f7.entry.js → p-5694edf1.entry.js} +1 -1
- package/dist/twilight/{p-7750bace.entry.js → p-5bbf17dd.entry.js} +1 -1
- package/dist/twilight/{p-783c6346.entry.js → p-5e8d019e.entry.js} +1 -1
- package/dist/twilight/{p-fce39869.entry.js → p-5f6fee0e.entry.js} +1 -1
- package/dist/twilight/{p-f10b887a.entry.js → p-66ad7a30.entry.js} +1 -1
- package/dist/twilight/{p-5d775867.entry.js → p-6af8a7b6.entry.js} +1 -1
- package/dist/twilight/{p-b66df976.entry.js → p-6b5de500.entry.js} +1 -1
- package/dist/twilight/{p-120b4694.entry.js → p-6ba3808a.entry.js} +1 -1
- package/dist/twilight/{p-3d5e862c.entry.js → p-6c3084c9.entry.js} +1 -1
- package/dist/twilight/{p-dc3ff1f0.entry.js → p-6dccd40f.entry.js} +1 -1
- package/dist/twilight/{p-bfb70998.entry.js → p-6e52b649.entry.js} +1 -1
- package/dist/twilight/{p-62ba0971.entry.js → p-70dfb2b4.entry.js} +1 -1
- package/dist/twilight/{p-f8ff074f.entry.js → p-76584a5b.entry.js} +1 -1
- package/dist/twilight/{p-2e8f95d0.entry.js → p-78a56dc6.entry.js} +1 -1
- package/dist/twilight/{p-eb160c2e.entry.js → p-79822d99.entry.js} +1 -1
- package/dist/twilight/{p-8b43035f.entry.js → p-7b5f97e7.entry.js} +1 -1
- package/dist/twilight/{p-2a3e2404.entry.js → p-7f97335a.entry.js} +1 -1
- package/dist/twilight/{p-184ea04c.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-622bfb21.entry.js → p-8c1d14f0.entry.js} +1 -1
- package/dist/twilight/{p-20939237.entry.js → p-8c40278d.entry.js} +1 -1
- package/dist/twilight/{p-f9b9af72.entry.js → p-92fd20a0.entry.js} +1 -1
- package/dist/twilight/{p-33ff7967.entry.js → p-9cf1cfd4.entry.js} +1 -1
- package/dist/twilight/{p-7e854633.entry.js → p-9d15f22d.entry.js} +1 -1
- package/dist/twilight/{p-9eb92980.entry.js → p-9e042cce.entry.js} +1 -1
- package/dist/twilight/{p-cc2c52bb.entry.js → p-9e0a9a5a.entry.js} +1 -1
- package/dist/twilight/{p-f034968b.entry.js → p-9e65451e.entry.js} +1 -1
- package/dist/twilight/{p-iCJI7qYe.js → p-BK9YeXWp.js} +1 -1
- package/dist/twilight/{p-Dhq3oJAe.js → p-BxQMWsr9.js} +1 -1
- package/dist/twilight/{p-CAc7tX2K.js → p-CBLWEyM9.js} +1 -1
- package/dist/twilight/{p-BbZqYBfp.js → p-CCwsxMbZ.js} +1 -1
- package/dist/twilight/{p-Nyk6-1lq.js → p-Ca_SZn0u.js} +1 -1
- package/dist/twilight/{p-BwzmoZpm.js → p-CgNJWeaK.js} +1 -1
- package/dist/twilight/p-CnTwkF6y.js +4 -0
- package/dist/twilight/{p-B7rn1taO.js → p-DMvhNbgN.js} +1 -1
- package/dist/twilight/{p-DVWVl151.js → p-De1tLqQF.js} +1 -1
- package/dist/twilight/{p-DmGAR42j.js → p-DgUQRYr2.js} +1 -1
- package/dist/twilight/{p-De2wEjqS.js → p-NqQdbGu6.js} +1 -1
- package/dist/twilight/{p-Dza6OBFg.js → p-Y2ZIN9Ok.js} +1 -1
- package/dist/twilight/{p-6c7cae8a.entry.js → p-a44670a9.entry.js} +1 -1
- package/dist/twilight/{p-509ad773.entry.js → p-a5b732b3.entry.js} +1 -1
- package/dist/twilight/{p-2153c6fd.entry.js → p-a95b0dc1.entry.js} +1 -1
- package/dist/twilight/{p-37b68ef3.entry.js → p-aa35cf98.entry.js} +1 -1
- package/dist/twilight/{p-d6c5bf2a.entry.js → p-ac736b30.entry.js} +1 -1
- package/dist/twilight/{p-d2c1457e.entry.js → p-af49191f.entry.js} +1 -1
- package/dist/twilight/{p-8b39a9f7.entry.js → p-b0d2e31f.entry.js} +1 -1
- package/dist/twilight/{p-31260fae.entry.js → p-b1f808f5.entry.js} +1 -1
- package/dist/twilight/{p-60f4357f.entry.js → p-b3ada3d0.entry.js} +1 -1
- package/dist/twilight/{p-4a1aa85f.entry.js → p-b5a45f87.entry.js} +1 -1
- package/dist/twilight/p-b9d67694.entry.js +4 -0
- package/dist/twilight/{p-64d49f5d.entry.js → p-ba6dd59c.entry.js} +1 -1
- package/dist/twilight/p-bac25e34.entry.js +4 -0
- package/dist/twilight/{p-fed66bcb.entry.js → p-bb8b2c85.entry.js} +1 -1
- package/dist/twilight/{p-49195cb6.entry.js → p-be6f8551.entry.js} +1 -1
- package/dist/twilight/{p-84d725d4.entry.js → p-bed54154.entry.js} +1 -1
- package/dist/twilight/{p-2a8d6e7e.entry.js → p-bed68e52.entry.js} +1 -1
- package/dist/twilight/{p-d63ce284.entry.js → p-bfd5e263.entry.js} +1 -1
- package/dist/twilight/{p-cd866be6.entry.js → p-c4cf0b4d.entry.js} +1 -1
- package/dist/twilight/{p-fe413496.entry.js → p-cb48a5ef.entry.js} +1 -1
- package/dist/twilight/{p-74f206cf.entry.js → p-cdeb9bcc.entry.js} +1 -1
- package/dist/twilight/{p-8e8e40bc.entry.js → p-d0aeeb7f.entry.js} +1 -1
- package/dist/twilight/{p-8f0af317.entry.js → p-d0ff9a3e.entry.js} +1 -1
- package/dist/twilight/{p-e8090773.entry.js → p-d1093a59.entry.js} +1 -1
- package/dist/twilight/{p-86ca22d5.entry.js → p-d1121b3f.entry.js} +1 -1
- package/dist/twilight/{p-3a3d4cb7.entry.js → p-d1204965.entry.js} +1 -1
- package/dist/twilight/p-d346dabd.entry.js +4 -0
- package/dist/twilight/{p-0a794d6f.entry.js → p-d4fb9921.entry.js} +1 -1
- package/dist/twilight/{p-4c801f91.entry.js → p-d8955835.entry.js} +1 -1
- package/dist/twilight/{p-f4411a04.entry.js → p-d9a1bf08.entry.js} +1 -1
- package/dist/twilight/{p-0c6a024f.entry.js → p-da0df10b.entry.js} +1 -1
- package/dist/twilight/p-e24fbbb4.entry.js +4 -0
- package/dist/twilight/{p-07450aed.entry.js → p-e38a6793.entry.js} +1 -1
- package/dist/twilight/{p-0e1248c4.entry.js → p-e457e68f.entry.js} +1 -1
- package/dist/twilight/{p-cd7029fc.entry.js → p-e9b03e9c.entry.js} +1 -1
- package/dist/twilight/{p-b9695308.entry.js → p-eaf0c514.entry.js} +1 -1
- package/dist/twilight/{p-b87ea253.entry.js → p-ee479819.entry.js} +1 -1
- package/dist/twilight/p-ee65c489.entry.js +4 -0
- package/dist/twilight/{p-7d337f25.entry.js → p-eefced26.entry.js} +1 -1
- package/dist/twilight/{p-a0a57259.entry.js → p-f7a58656.entry.js} +1 -1
- package/dist/twilight/{p-bf29daf3.entry.js → p-f7ab5825.entry.js} +1 -1
- package/dist/twilight/{p-57b93850.entry.js → p-f9587127.entry.js} +1 -1
- package/dist/twilight/{p-89cff0c8.entry.js → p-f9e5ed10.entry.js} +1 -1
- package/dist/twilight/{p-e4d90663.entry.js → p-fcb1009f.entry.js} +1 -1
- package/dist/twilight/{p-4f794057.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-12a8aed8.entry.js +0 -4
- package/dist/twilight/p-40083f25.entry.js +0 -4
- package/dist/twilight/p-4f443e36.entry.js +0 -4
- package/dist/twilight/p-5b81a3d9.entry.js +0 -4
- package/dist/twilight/p-93f26336.entry.js +0 -4
- package/dist/twilight/p-Brg4wsgg.js +0 -4
- package/dist/twilight/p-bab5d057.entry.js +0 -4
- package/dist/twilight/p-c7c868b4.entry.js +0 -4
- package/dist/twilight/p-d5a2ba68.entry.js +0 -4
|
@@ -403,6 +403,9 @@
|
|
|
403
403
|
.pointer-events-auto {
|
|
404
404
|
pointer-events: auto;
|
|
405
405
|
}
|
|
406
|
+
.visible {
|
|
407
|
+
visibility: visible;
|
|
408
|
+
}
|
|
406
409
|
.static {
|
|
407
410
|
position: static;
|
|
408
411
|
}
|
|
@@ -930,9 +933,21 @@
|
|
|
930
933
|
opacity: 1;
|
|
931
934
|
}
|
|
932
935
|
.s-gifting-textarea.shown {
|
|
933
|
-
height:
|
|
936
|
+
height: 142px;
|
|
934
937
|
opacity: 1;
|
|
935
938
|
}
|
|
939
|
+
.s-gifting-textarea-counter {
|
|
940
|
+
margin-top: 0.25rem;
|
|
941
|
+
text-align: end;
|
|
942
|
+
font-size: 0.75rem;
|
|
943
|
+
line-height: 1rem;
|
|
944
|
+
--tw-text-opacity: 1;
|
|
945
|
+
color: rgb(107 114 128 / var(--tw-text-opacity, 1));
|
|
946
|
+
}
|
|
947
|
+
.s-gifting-textarea-counter.limit {
|
|
948
|
+
--tw-text-opacity: 1;
|
|
949
|
+
color: rgb(239 68 68 / var(--tw-text-opacity, 1));
|
|
950
|
+
}
|
|
936
951
|
.s-gifting-calendar.hide {
|
|
937
952
|
pointer-events: none;
|
|
938
953
|
visibility: hidden;
|
|
@@ -460,7 +460,9 @@ export class SallaGifting {
|
|
|
460
460
|
this.showGiftText = customID;
|
|
461
461
|
if (dataID) {
|
|
462
462
|
this.selectedGiftTextOption = dataID;
|
|
463
|
-
|
|
463
|
+
// Returning to the custom option keeps whatever is still typed in the box,
|
|
464
|
+
// so the counter and the submitted payload match the visible text.
|
|
465
|
+
customID ? this.selectedText = this.textArea?.value || undefined : this.selectedText = event.target.value;
|
|
464
466
|
}
|
|
465
467
|
else {
|
|
466
468
|
// empty textarea value
|
|
@@ -851,7 +853,7 @@ export class SallaGifting {
|
|
|
851
853
|
}
|
|
852
854
|
render() {
|
|
853
855
|
return [
|
|
854
|
-
h("div", { key: '
|
|
856
|
+
h("div", { key: '3c86d3d5d9e610d9e6b802dce4355289c90329b0' }, h("salla-list-tile", { key: '5476098174aa8cb222c3240c8b07b3cbe757484e', class: this.generateClass() }, h("div", { key: '3759c2830dd8353c9a2294e936ae7b69d823ee36', slot: "title" }, this.vertical ? h("span", { innerHTML: GiftSharing }) : '', h("h3", { key: '603c25804e96cc80bbe2b8c802ae764947466ad2' }, !!this.widgetTitle ? this.widgetTitle : this.sectionTitle)), h("div", { key: '605f42d920a49ca2e761b99d6539cd404e89f498', slot: "subtitle" }, h("div", { key: 'd06dd23bf140007156dc2653653c809fd5c11feb' }, !!this.widgetSubtitle ? this.widgetSubtitle : this.sectionSubtitle)), h("div", { key: 'a344e34b453f1ff0289fc57ad08935434d774b4f', slot: "action" }, h("salla-button", { key: '2e6af7eabf350b60513edb9252fd110f0eccb4b7', color: "primary", fill: "outline", width: "wide", class: "s-gifting-widget-action", onClick: () => this.handleGiftButtonClick() }, h("slot", { key: '8bf491757bca99df94abbe2e6dacf54e15155e05', name: "widget-btn-content" }, h("div", { key: '9d45121e40c1f49936f9b2b6eb57a5605eca0e45', class: "s-gifting-widget-action-content" }, h("span", { key: '1a7524843066252c6148f1d57c6c08a255b2d70d', innerHTML: GiftSharing }), " \u00A0", h("span", { key: '5b82d168b21ee5651f28a80776303137af6cf81d' }, this.sectionBtnText)))))), h("salla-modal", { key: '7901154aa0aa9925ca79df482566b69e2c30ad0a', id: this.hostId, isLoading: true, class: "s-gifting-modal", width: "sm", ref: modal => this.modal = modal }, h("div", { key: '4de9f1e21e6bae9eac1a58a419809befeef4aa9b', slot: "loading" }, h("div", { key: '483d223daa491ebb09bcf6a814ef1f8de7ca2ada', class: "s-gifting-skeleton" }, h("div", { key: '495b5fc2978480dcc52abbba0d3da92b503901b4', class: "s-gifting-modal-header" }, h("salla-skeleton", { key: '993e9d6d0a9f7df11746b925296308576ea22cd2', type: 'circle', height: '5rem', width: '5rem' }), h("h2", { key: '08d6a35d3084a32c71437e4a00e789b154645f87', class: "s-gifting-modal-title" }, h("div", { key: '02a659c96a2039e4c7b28857348d2d5c246d4a40', class: "s-gifting-modal-badge-wrapper" }, h("salla-skeleton", { key: '3e1fb71d0cf7ed41f8dccd7dda035ed6c3463cbc', height: '15px', width: '150px' })))), h("div", { key: 'dd6a845ceff281683981b5685663b24c586abeb1', class: "s-gifting-skeleton-content" }, h("salla-skeleton", { key: 'f46a265bdb7e84e35ee7f78d8b039a29549ef235', height: '10px', width: '150px' }), h("salla-skeleton", { key: '6522ab7db38190320322d9cb7487d0873a03585a', height: '230px' }), h("salla-skeleton", { key: 'a17ae0ee2c71fa81ff346be989eb1db14d21c989', height: '10px', width: '150px' }), h("salla-skeleton", { key: '4f80b722d3b24ed9ee11e88b63e5f831b4eae377', height: '30px' }), h("salla-skeleton", { key: 'e4a9d769197cc6f58f96ce92affdf9dd2b38b8a6', height: '40px' })))), h("slot", { key: '7d76198a32dffd257d97873b0971ea8fa5aa8a0f', name: "header" }), !!this.hasError ?
|
|
855
857
|
h("salla-placeholder", { alignment: "center" }, h("span", { slot: "title" }, this.errorMessage || salla.lang.get('common.errors.empty_results')), h("span", { slot: "description" }, " "))
|
|
856
858
|
:
|
|
857
859
|
[
|
|
@@ -863,7 +865,10 @@ export class SallaGifting {
|
|
|
863
865
|
this.gift?.gift_images.map((item) => h("a", { class: "s-gifting-clickable s-gifting-image", onClick: () => this.setPreview(item) }, h("img", { src: item.url, alt: `${item.id}` }))) : ''))
|
|
864
866
|
: "")), this.gift && this.gift.show_texts ?
|
|
865
867
|
h("div", { class: "anime-item" }, h("div", { class: "s-gifting-modal-uploader-title s-gifting-text-title" }, this.giftText), h("div", { class: "s-form-group s-gifting-selectText", ref: el => this.textSelect = el }, h("select", { id: "gift-text-selection", name: "gift-text-selection", class: "s-form-control s-gifting-select", onChange: e => this.toggleGiftText(e) }, h("option", { "data-id": null, selected: !this.selectedGiftTextOption }, this.selectGiftMessage), this.gift && this.gift.gift_texts ?
|
|
866
|
-
this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id, selected: String(this.selectedGiftTextOption) === String(txt.id) }, txt.text)) : '', this.gift && this.gift.show_custom_text ? h("option", { "data-id": "custom", selected: this.selectedGiftTextOption === 'custom' }, this.giftCustomText) : null)), h("div", { class: this.showGiftText && this.gift && this.gift.show_custom_text ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" }))
|
|
868
|
+
this.gift?.gift_texts.map((txt) => h("option", { "data-id": txt.id, value: txt.text, key: txt.id, selected: String(this.selectedGiftTextOption) === String(txt.id) }, txt.text)) : '', this.gift && this.gift.show_custom_text ? h("option", { "data-id": "custom", selected: this.selectedGiftTextOption === 'custom' }, this.giftCustomText) : null)), h("div", { class: this.showGiftText && this.gift && this.gift.show_custom_text ? "s-form-group s-gifting-textarea shown" : "s-form-group s-gifting-textarea hide", ref: (el) => this.customTextArea = el }, h("label", { htmlFor: "gift-custom-text", class: "s-form-label" }, this.giftCustomText), h("div", { class: "mt-1" }, h("textarea", { onInput: (event) => this.handleTextAreaChange(event), rows: 4, maxLength: SallaGifting.CUSTOM_TEXT_MAX_LENGTH, ref: (el) => this.textArea = el, name: "gift-custom-text", id: "gift-custom-text", class: "s-form-control" })), h("p", { class: {
|
|
869
|
+
's-gifting-textarea-counter': true,
|
|
870
|
+
'limit': (this.selectedText?.length || 0) >= SallaGifting.CUSTOM_TEXT_MAX_LENGTH,
|
|
871
|
+
} }, SallaGifting.CUSTOM_TEXT_MAX_LENGTH, "/", this.selectedText?.length || 0))) : null, h("div", { class: "anime-item" }, h("salla-button", { color: "primary", width: "wide", onClick: () => this.goToStep2(!!this.gift?.show_texts) }, h("span", null, this.nextStep)))), h("div", { class: "s-gifting-step-two gift-step-2", style: this.skipStep1() ? { opacity: '1', transform: 'translateX(0)', position: 'relative' } : undefined, ref: el => this.step2Elems = el }, h("div", { class: this.step2ItemClass(this.errors?.['sender_name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "sender_name", class: "s-form-label" }, this.senderNameLabel), h("input", { type: "text", class: "s-form-control", name: "sender_name", id: "sender_name", value: this.senderName, onInput: (event) => this.handleSenderName(event), placeholder: "" }), this.errors && this.errors['sender_name'] ?
|
|
867
872
|
h("span", { class: "s-gifting-error" }, this.errors['sender_name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.name'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { htmlFor: "receiver_name", class: "s-form-label" }, this.receiverNameFieldLabel), h("input", { type: "text", class: "s-form-control", name: "receiver_name", id: "receiver_name", value: "", onInput: (event) => this.handleReceiverName(event), placeholder: "" }), this.errors && this.errors['receiver.name'] ?
|
|
868
873
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.name']) : ''), h("div", { class: this.step2ItemClass(this.errors?.['receiver.mobile'] ? 's-form-group s-form-has-error' : 's-form-group') }, h("label", { class: "s-form-label" }, this.receiverMobileFieldLabel), h("salla-tel-input", { class: "s-gifting-tel-input", phone: this.receiverMobile, countryCode: this.receiverCountryCode, onPhoneEntered: (e) => this.handlePhoneInputChange(e) }), this.errors && this.errors['receiver.mobile'] ?
|
|
869
874
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.mobile']) : ''), this.isPhysical() &&
|
|
@@ -874,7 +879,7 @@ export class SallaGifting {
|
|
|
874
879
|
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'] ?
|
|
875
880
|
h("span", { class: "s-gifting-error" }, this.errors['receiver.city_id']) : ''), this.isPhysical() && this.cityNoticeText() &&
|
|
876
881
|
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: LeftArrow, onClick: (e) => this.goToStep1(e) }), h("salla-button", { onClick: () => this.submitForm(), color: "primary", width: 'wide' }, h("span", null, this.sendGift)))))
|
|
877
|
-
], h("slot", { key: '
|
|
882
|
+
], h("slot", { key: '187d744793464098a2eb9592ec7ad8ec3777918f', name: "footer" })))
|
|
878
883
|
];
|
|
879
884
|
}
|
|
880
885
|
static get is() { return "salla-gifting"; }
|
|
@@ -1166,4 +1171,6 @@ export class SallaGifting {
|
|
|
1166
1171
|
}
|
|
1167
1172
|
}
|
|
1168
1173
|
SallaGifting.CITY_AJAX_THRESHOLD = 400;
|
|
1174
|
+
// Mirrors the API's `text => max:140` rule on AddItemAsGiftRequest.
|
|
1175
|
+
SallaGifting.CUSTOM_TEXT_MAX_LENGTH = 140;
|
|
1169
1176
|
SallaGifting.CITY_SEARCH_DEBOUNCE_MS = 100;
|
|
@@ -131,7 +131,7 @@ export class SallaProductsList {
|
|
|
131
131
|
* @param filters
|
|
132
132
|
*/
|
|
133
133
|
async setFilters(filters) {
|
|
134
|
-
if (!filters || JSON.stringify(filters) === JSON.stringify(this.parsedFilters)) {
|
|
134
|
+
if (this.filtersResults !== true || !filters || JSON.stringify(filters) === JSON.stringify(this.parsedFilters)) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
137
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
@@ -1042,8 +1042,9 @@ export class SallaProductsList {
|
|
|
1042
1042
|
// A theme's catalog default must not replace the relevance order used by the search popup.
|
|
1043
1043
|
// A shopper's explicit sort, and subsequent sortBy updates followed by reload(), still apply.
|
|
1044
1044
|
this.sortBy = this.isSearchPageList() ? requestedSort || undefined : this.sortBy || requestedSort;
|
|
1045
|
-
|
|
1046
|
-
|
|
1045
|
+
// Page filters belong to the main listing, not independently configured sections.
|
|
1046
|
+
this.parsedFilters = this.filtersResults === true ? Helper.extractFiltersFromUrl(searchParams) : {};
|
|
1047
|
+
if (this.filtersResults === true && this.parsedFilters?.category_id) {
|
|
1047
1048
|
this.currentCategoryIdFilter = this.toCategoryIdFilter(this.parsedFilters.category_id);
|
|
1048
1049
|
}
|
|
1049
1050
|
}
|
|
@@ -65,6 +65,7 @@ export class SallaRatingModalV2 {
|
|
|
65
65
|
this.stepsCount = 0;
|
|
66
66
|
this.currentIndex = 0;
|
|
67
67
|
this.submitted = [];
|
|
68
|
+
this.isSubmitting = false;
|
|
68
69
|
this.thanksCountdownInterval = null;
|
|
69
70
|
this.MAX_IMAGE_UPLOAD_LIMIT = MAX_IMAGE_UPLOAD_LIMIT;
|
|
70
71
|
this.MAX_VIDEO_UPLOAD_LIMIT = MAX_VIDEO_UPLOAD_LIMIT;
|
|
@@ -577,10 +578,11 @@ export class SallaRatingModalV2 {
|
|
|
577
578
|
this.showActiveStep();
|
|
578
579
|
}
|
|
579
580
|
async submit() {
|
|
580
|
-
if (this.hasUploadsInProgress)
|
|
581
|
+
if (this.hasUploadsInProgress || this.isSubmitting)
|
|
581
582
|
return;
|
|
582
|
-
this.
|
|
583
|
+
this.isSubmitting = true;
|
|
583
584
|
try {
|
|
585
|
+
this.refreshWizardRefs();
|
|
584
586
|
if (!this.submittedBefore()) {
|
|
585
587
|
this.validate();
|
|
586
588
|
}
|
|
@@ -603,6 +605,7 @@ export class SallaRatingModalV2 {
|
|
|
603
605
|
}
|
|
604
606
|
}
|
|
605
607
|
finally {
|
|
608
|
+
this.isSubmitting = false;
|
|
606
609
|
this.nextBtn?.stop();
|
|
607
610
|
salla.config.canLeave = true;
|
|
608
611
|
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
const HOUR = 60 * 60 * 1000;
|
|
5
|
+
const DAY = 24 * HOUR;
|
|
6
|
+
const MAX_TIMEOUT = 2 ** 31 - 1;
|
|
7
|
+
// Used only when storage is not available (private mode, blocked site data).
|
|
8
|
+
let memoryStartedAt = null;
|
|
9
|
+
const DEFAULT_COUNTDOWN_HOURS = 45;
|
|
10
|
+
const DEFAULT_HIDDEN_DAYS = 7;
|
|
11
|
+
const positive = (value, fallback) => {
|
|
12
|
+
const number = Number(value);
|
|
13
|
+
return Number.isFinite(number) && number > 0 ? number : fallback;
|
|
14
|
+
};
|
|
15
|
+
/** The countdown and hidden period, from the store settings with 45 hours and 7 days as the fallback. */
|
|
16
|
+
export function getTimerSettings() {
|
|
17
|
+
const settings = salla.config?.get?.('store.settings.free_shipping_banner');
|
|
18
|
+
return {
|
|
19
|
+
countdownMs: positive(settings?.countdown_hours, DEFAULT_COUNTDOWN_HOURS) * HOUR,
|
|
20
|
+
hiddenMs: positive(settings?.hidden_days, DEFAULT_HIDDEN_DAYS) * DAY,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/** The timer exists only for visitors the backend allowed the banner for. */
|
|
24
|
+
export function isTimerEnabled() {
|
|
25
|
+
return !!salla.config?.get?.('store.features')?.includes('free-shipping-banner');
|
|
26
|
+
}
|
|
27
|
+
const storageKey = () => `free-shipping-timer_${salla.config?.get?.('store.id')}`;
|
|
28
|
+
/** When the visitor first saw the banner, or null if they have not yet. */
|
|
29
|
+
export function getStartedAt() {
|
|
30
|
+
try {
|
|
31
|
+
const stored = Number(salla.storage.get(storageKey()));
|
|
32
|
+
if (Number.isFinite(stored) && stored > 0) {
|
|
33
|
+
return stored;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
catch (e) {
|
|
37
|
+
// fall through to the in-memory value
|
|
38
|
+
}
|
|
39
|
+
return memoryStartedAt;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Records the first time the visitor saw the banner. Does nothing when it is already recorded
|
|
43
|
+
* or when the feature is off.
|
|
44
|
+
*/
|
|
45
|
+
export function startTimerIfNeeded(now = Date.now()) {
|
|
46
|
+
if (!isTimerEnabled()) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
const existing = getStartedAt();
|
|
50
|
+
if (existing) {
|
|
51
|
+
return existing;
|
|
52
|
+
}
|
|
53
|
+
memoryStartedAt = now;
|
|
54
|
+
try {
|
|
55
|
+
salla.storage.set(storageKey(), now);
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
// keep the in-memory value
|
|
59
|
+
}
|
|
60
|
+
schedule();
|
|
61
|
+
notify();
|
|
62
|
+
return now;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Where the visitor is in the repeating cycle: `countdown` visible, then `hidden` hidden, again and again.
|
|
66
|
+
* Nothing but the first-seen time is stored, so changed settings apply on the next check.
|
|
67
|
+
*/
|
|
68
|
+
export function computeTimerState(startedAt, now, countdownMs, hiddenMs) {
|
|
69
|
+
const elapsed = Math.max(0, now - startedAt);
|
|
70
|
+
const position = elapsed % (countdownMs + hiddenMs);
|
|
71
|
+
if (position < countdownMs) {
|
|
72
|
+
return { visible: true, remainingMs: countdownMs - position, nextChangeMs: countdownMs - position };
|
|
73
|
+
}
|
|
74
|
+
return { visible: false, remainingMs: 0, nextChangeMs: countdownMs + hiddenMs - position };
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The state the banner and tags follow. `null` means there is nothing to follow: the feature is off
|
|
78
|
+
* or the visitor has not seen the banner yet.
|
|
79
|
+
*/
|
|
80
|
+
export function getFreeShippingTimerState(now = Date.now()) {
|
|
81
|
+
if (!isTimerEnabled()) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
const startedAt = getStartedAt();
|
|
85
|
+
if (!startedAt) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
const { countdownMs, hiddenMs } = getTimerSettings();
|
|
89
|
+
return computeTimerState(startedAt, now, countdownMs, hiddenMs);
|
|
90
|
+
}
|
|
91
|
+
const listeners = new Set();
|
|
92
|
+
let timeout;
|
|
93
|
+
function notify() {
|
|
94
|
+
listeners.forEach((listener) => listener());
|
|
95
|
+
}
|
|
96
|
+
// One timeout for the whole page, set for the next visible/hidden change.
|
|
97
|
+
function schedule() {
|
|
98
|
+
clearTimeout(timeout);
|
|
99
|
+
timeout = undefined;
|
|
100
|
+
if (!listeners.size) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const state = getFreeShippingTimerState();
|
|
104
|
+
if (!state) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
timeout = setTimeout(() => {
|
|
108
|
+
notify();
|
|
109
|
+
schedule();
|
|
110
|
+
}, Math.min(state.nextChangeMs + 50, MAX_TIMEOUT));
|
|
111
|
+
}
|
|
112
|
+
/** Calls back whenever the banner and tags have to show or hide. Returns the unsubscribe function. */
|
|
113
|
+
export function subscribeToFreeShippingTimer(listener) {
|
|
114
|
+
listeners.add(listener);
|
|
115
|
+
schedule();
|
|
116
|
+
return () => {
|
|
117
|
+
listeners.delete(listener);
|
|
118
|
+
if (!listeners.size) {
|
|
119
|
+
clearTimeout(timeout);
|
|
120
|
+
timeout = undefined;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** Test helper. */
|
|
125
|
+
export function resetFreeShippingTimer() {
|
|
126
|
+
memoryStartedAt = null;
|
|
127
|
+
listeners.clear();
|
|
128
|
+
clearTimeout(timeout);
|
|
129
|
+
timeout = undefined;
|
|
130
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Crafted with ❤ by Salla
|
|
3
|
+
*/
|
|
4
|
+
const cache = new Map();
|
|
5
|
+
async function request(productId) {
|
|
6
|
+
const endpoint = 'products/eligible-for-free-shipping' + (productId ? `/${productId}` : '');
|
|
7
|
+
try {
|
|
8
|
+
// 403 (feature off or plan not supported) and 410 (product gone) mean "not eligible",
|
|
9
|
+
// not a failure worth a toast.
|
|
10
|
+
const response = await salla.api.withoutNotifier(() => salla.api.request(endpoint));
|
|
11
|
+
return response?.data?.eligible === true;
|
|
12
|
+
}
|
|
13
|
+
catch (e) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Whether free shipping applies: to the store when no product is given (banner),
|
|
19
|
+
* or to the product (tag, product page banner). Same calls share one request.
|
|
20
|
+
*/
|
|
21
|
+
function isEligibleForFreeShipping(productId) {
|
|
22
|
+
const key = String(productId ?? '');
|
|
23
|
+
if (!cache.has(key)) {
|
|
24
|
+
cache.set(key, request(productId));
|
|
25
|
+
}
|
|
26
|
+
return cache.get(key);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const HOUR = 60 * 60 * 1000;
|
|
30
|
+
const DAY = 24 * HOUR;
|
|
31
|
+
const MAX_TIMEOUT = 2 ** 31 - 1;
|
|
32
|
+
// Used only when storage is not available (private mode, blocked site data).
|
|
33
|
+
let memoryStartedAt = null;
|
|
34
|
+
const DEFAULT_COUNTDOWN_HOURS = 45;
|
|
35
|
+
const DEFAULT_HIDDEN_DAYS = 7;
|
|
36
|
+
const positive = (value, fallback) => {
|
|
37
|
+
const number = Number(value);
|
|
38
|
+
return Number.isFinite(number) && number > 0 ? number : fallback;
|
|
39
|
+
};
|
|
40
|
+
/** The countdown and hidden period, from the store settings with 45 hours and 7 days as the fallback. */
|
|
41
|
+
function getTimerSettings() {
|
|
42
|
+
const settings = salla.config?.get?.('store.settings.free_shipping_banner');
|
|
43
|
+
return {
|
|
44
|
+
countdownMs: positive(settings?.countdown_hours, DEFAULT_COUNTDOWN_HOURS) * HOUR,
|
|
45
|
+
hiddenMs: positive(settings?.hidden_days, DEFAULT_HIDDEN_DAYS) * DAY,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/** The timer exists only for visitors the backend allowed the banner for. */
|
|
49
|
+
function isTimerEnabled() {
|
|
50
|
+
return !!salla.config?.get?.('store.features')?.includes('free-shipping-banner');
|
|
51
|
+
}
|
|
52
|
+
const storageKey = () => `free-shipping-timer_${salla.config?.get?.('store.id')}`;
|
|
53
|
+
/** When the visitor first saw the banner, or null if they have not yet. */
|
|
54
|
+
function getStartedAt() {
|
|
55
|
+
try {
|
|
56
|
+
const stored = Number(salla.storage.get(storageKey()));
|
|
57
|
+
if (Number.isFinite(stored) && stored > 0) {
|
|
58
|
+
return stored;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
// fall through to the in-memory value
|
|
63
|
+
}
|
|
64
|
+
return memoryStartedAt;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Records the first time the visitor saw the banner. Does nothing when it is already recorded
|
|
68
|
+
* or when the feature is off.
|
|
69
|
+
*/
|
|
70
|
+
function startTimerIfNeeded(now = Date.now()) {
|
|
71
|
+
if (!isTimerEnabled()) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
const existing = getStartedAt();
|
|
75
|
+
if (existing) {
|
|
76
|
+
return existing;
|
|
77
|
+
}
|
|
78
|
+
memoryStartedAt = now;
|
|
79
|
+
try {
|
|
80
|
+
salla.storage.set(storageKey(), now);
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
// keep the in-memory value
|
|
84
|
+
}
|
|
85
|
+
schedule();
|
|
86
|
+
notify();
|
|
87
|
+
return now;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Where the visitor is in the repeating cycle: `countdown` visible, then `hidden` hidden, again and again.
|
|
91
|
+
* Nothing but the first-seen time is stored, so changed settings apply on the next check.
|
|
92
|
+
*/
|
|
93
|
+
function computeTimerState(startedAt, now, countdownMs, hiddenMs) {
|
|
94
|
+
const elapsed = Math.max(0, now - startedAt);
|
|
95
|
+
const position = elapsed % (countdownMs + hiddenMs);
|
|
96
|
+
if (position < countdownMs) {
|
|
97
|
+
return { visible: true, remainingMs: countdownMs - position, nextChangeMs: countdownMs - position };
|
|
98
|
+
}
|
|
99
|
+
return { visible: false, remainingMs: 0, nextChangeMs: countdownMs + hiddenMs - position };
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The state the banner and tags follow. `null` means there is nothing to follow: the feature is off
|
|
103
|
+
* or the visitor has not seen the banner yet.
|
|
104
|
+
*/
|
|
105
|
+
function getFreeShippingTimerState(now = Date.now()) {
|
|
106
|
+
if (!isTimerEnabled()) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
const startedAt = getStartedAt();
|
|
110
|
+
if (!startedAt) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const { countdownMs, hiddenMs } = getTimerSettings();
|
|
114
|
+
return computeTimerState(startedAt, now, countdownMs, hiddenMs);
|
|
115
|
+
}
|
|
116
|
+
const listeners = new Set();
|
|
117
|
+
let timeout;
|
|
118
|
+
function notify() {
|
|
119
|
+
listeners.forEach((listener) => listener());
|
|
120
|
+
}
|
|
121
|
+
// One timeout for the whole page, set for the next visible/hidden change.
|
|
122
|
+
function schedule() {
|
|
123
|
+
clearTimeout(timeout);
|
|
124
|
+
timeout = undefined;
|
|
125
|
+
if (!listeners.size) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const state = getFreeShippingTimerState();
|
|
129
|
+
if (!state) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
timeout = setTimeout(() => {
|
|
133
|
+
notify();
|
|
134
|
+
schedule();
|
|
135
|
+
}, Math.min(state.nextChangeMs + 50, MAX_TIMEOUT));
|
|
136
|
+
}
|
|
137
|
+
/** Calls back whenever the banner and tags have to show or hide. Returns the unsubscribe function. */
|
|
138
|
+
function subscribeToFreeShippingTimer(listener) {
|
|
139
|
+
listeners.add(listener);
|
|
140
|
+
schedule();
|
|
141
|
+
return () => {
|
|
142
|
+
listeners.delete(listener);
|
|
143
|
+
if (!listeners.size) {
|
|
144
|
+
clearTimeout(timeout);
|
|
145
|
+
timeout = undefined;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export { isTimerEnabled as a, subscribeToFreeShippingTimer as b, getFreeShippingTimerState as g, isEligibleForFreeShipping as i, startTimerIfNeeded as s };
|