@salla.sa/twilight-components 2.14.587 → 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-BF8Q2gfH.js → filepond-FHDuUT2A.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CDZXoVge.js → filepond-plugin-file-poster-cswOK9iC.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-M6dKiRMH.js → filepond-plugin-file-validate-size-BKHetR6q.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-BSTQI9uG.js → filepond-plugin-file-validate-type-TR28icaL.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-h3hJm3qv.js → filepond-plugin-image-edit-D-Wzkzl3.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-CXkq3_oT.js → filepond-plugin-image-exif-orientation-BF-uGQ3T.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-BP4-WdE7.js → filepond-plugin-image-preview-BMRguebr.js} +1 -1
- package/dist/cjs/{index-DN51eLtp.js → index-C3RW52t1.js} +4 -4
- package/dist/cjs/{intlTelInput-Cgao3Jc8.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 +1 -1
- 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 +1 -1
- 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 +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 +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-BAqDsAyV.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-cookies-bar/salla-cookies-bar.css +3 -0
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +121 -22
- 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-cookies-bar.js +122 -23
- package/dist/docs.json +1 -1
- package/dist/esm/{filepond-Xi2-pJA0.js → filepond-D9x8e0kN.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DduYF-sA.js → filepond-plugin-file-poster-Dnc-RXWn.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-BkPirl0j.js → filepond-plugin-file-validate-size-CZkCBl_R.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-BIX8_1CI.js → filepond-plugin-file-validate-type-C5Nsnz-Z.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit--1Sv5xxH.js → filepond-plugin-image-edit-hv6HNezY.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-Dss_DgF7.js → filepond-plugin-image-exif-orientation-xKI5gBkW.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CaA89Pn1.js → filepond-plugin-image-preview-C1Lw27uf.js} +1 -1
- package/dist/esm/{index-BtdIfJF8.js → index-BTR557QH.js} +4 -4
- package/dist/esm/{intlTelInput-DxHIK3cL.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 +1 -1
- 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 +1 -1
- 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 +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 +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-CdDrNNAM.js → vanilla-picker-Cwahuohu.js} +1 -1
- package/dist/twilight/p-025f158d.entry.js +4 -0
- package/dist/twilight/{p-3b566d5d.entry.js → p-0447c80d.entry.js} +1 -1
- package/dist/twilight/{p-7944abc5.entry.js → p-0f559883.entry.js} +1 -1
- package/dist/twilight/{p-c571954d.entry.js → p-13186e26.entry.js} +1 -1
- package/dist/twilight/{p-6ed2c97c.entry.js → p-1b19b60d.entry.js} +1 -1
- package/dist/twilight/{p-f32f8e51.entry.js → p-1bd13cb1.entry.js} +1 -1
- package/dist/twilight/p-1d60d5cf.entry.js +4 -0
- package/dist/twilight/{p-c3d67706.entry.js → p-1d93fdb7.entry.js} +1 -1
- package/dist/twilight/{p-646d3f8f.entry.js → p-1e2aa94c.entry.js} +1 -1
- package/dist/twilight/{p-a0ad482e.entry.js → p-1e930884.entry.js} +1 -1
- package/dist/twilight/p-2158f53a.entry.js +4 -0
- package/dist/twilight/{p-e9ab3ead.entry.js → p-28a76fa1.entry.js} +1 -1
- package/dist/twilight/{p-f3cd8cf5.entry.js → p-29992256.entry.js} +1 -1
- package/dist/twilight/{p-97ead14b.entry.js → p-2b088e94.entry.js} +1 -1
- package/dist/twilight/{p-98c519f7.entry.js → p-2ffe4f20.entry.js} +1 -1
- package/dist/twilight/{p-6de41bdc.entry.js → p-34cae9d4.entry.js} +1 -1
- package/dist/twilight/{p-af6932b0.entry.js → p-34ea8023.entry.js} +1 -1
- package/dist/twilight/{p-58a66109.entry.js → p-39c0175f.entry.js} +1 -1
- package/dist/twilight/{p-5afc95a7.entry.js → p-3d31cbfe.entry.js} +1 -1
- package/dist/twilight/{p-a9857ca3.entry.js → p-3f6c6e95.entry.js} +1 -1
- package/dist/twilight/{p-14545c2e.entry.js → p-3f6e3bca.entry.js} +1 -1
- package/dist/twilight/{p-ShShhGeu.js → p-3xURxQbt.js} +1 -1
- package/dist/twilight/{p-84588994.entry.js → p-41d66dbc.entry.js} +1 -1
- package/dist/twilight/{p-f318c73c.entry.js → p-43a135f9.entry.js} +1 -1
- package/dist/twilight/{p-cbe828f7.entry.js → p-46a2bf53.entry.js} +1 -1
- package/dist/twilight/{p-bd84e964.entry.js → p-48a3c4d0.entry.js} +1 -1
- package/dist/twilight/{p-b199478b.entry.js → p-4b6dc22a.entry.js} +1 -1
- package/dist/twilight/{p-89cbcd3c.entry.js → p-4cdfb0ed.entry.js} +1 -1
- package/dist/twilight/{p-26479dee.entry.js → p-4d4f5878.entry.js} +1 -1
- package/dist/twilight/{p-506f1716.entry.js → p-4de41a53.entry.js} +1 -1
- package/dist/twilight/{p-a6c0154a.entry.js → p-4ee88ae3.entry.js} +1 -1
- package/dist/twilight/{p-e519da79.entry.js → p-52b0e3e5.entry.js} +1 -1
- package/dist/twilight/{p-cf1ea038.entry.js → p-53b89833.entry.js} +1 -1
- package/dist/twilight/{p-c61fce7a.entry.js → p-54bdf670.entry.js} +1 -1
- package/dist/twilight/{p-c317b529.entry.js → p-5572c1bb.entry.js} +1 -1
- package/dist/twilight/{p-e9174da7.entry.js → p-58bfa710.entry.js} +1 -1
- package/dist/twilight/{p-573899dc.entry.js → p-5b34281f.entry.js} +1 -1
- package/dist/twilight/{p-9661b909.entry.js → p-5d8f8d31.entry.js} +1 -1
- package/dist/twilight/{p-340621ed.entry.js → p-5dfb4250.entry.js} +1 -1
- package/dist/twilight/{p-20b122f5.entry.js → p-5e48d054.entry.js} +1 -1
- package/dist/twilight/{p-b5b70b36.entry.js → p-6371ecfb.entry.js} +1 -1
- package/dist/twilight/{p-565f74fe.entry.js → p-63997e17.entry.js} +1 -1
- package/dist/twilight/{p-bce91b93.entry.js → p-639ef336.entry.js} +1 -1
- package/dist/twilight/{p-20edfe7d.entry.js → p-65dac0dc.entry.js} +1 -1
- package/dist/twilight/{p-56f3be75.entry.js → p-6972a912.entry.js} +1 -1
- package/dist/twilight/{p-d3a3216f.entry.js → p-6c6cfa25.entry.js} +1 -1
- package/dist/twilight/{p-410af88a.entry.js → p-7117a3df.entry.js} +1 -1
- package/dist/twilight/{p-5f7532b3.entry.js → p-730f67ce.entry.js} +1 -1
- package/dist/twilight/{p-b677ddca.entry.js → p-75316703.entry.js} +1 -1
- package/dist/twilight/{p-e3a2bf70.entry.js → p-791a4de0.entry.js} +1 -1
- package/dist/twilight/{p-15b4d61d.entry.js → p-79f75f23.entry.js} +1 -1
- package/dist/twilight/{p-c1caf8cb.entry.js → p-7a5150ad.entry.js} +1 -1
- package/dist/twilight/{p-cec14ad5.entry.js → p-7bce8959.entry.js} +1 -1
- package/dist/twilight/{p-a244a4f2.entry.js → p-88aae8b5.entry.js} +1 -1
- package/dist/twilight/{p-d46adde4.entry.js → p-891fd288.entry.js} +1 -1
- package/dist/twilight/{p-799027c5.entry.js → p-89365ad7.entry.js} +1 -1
- package/dist/twilight/{p-a71b30fa.entry.js → p-8da97f62.entry.js} +1 -1
- package/dist/twilight/{p-b492dd6a.entry.js → p-8de1f867.entry.js} +1 -1
- package/dist/twilight/{p-93064a1f.entry.js → p-913e3175.entry.js} +1 -1
- package/dist/twilight/{p-5d8cc35c.entry.js → p-9b95f107.entry.js} +1 -1
- package/dist/twilight/{p-f97885ed.entry.js → p-9bb8bd6c.entry.js} +1 -1
- package/dist/twilight/{p-8bf2a280.entry.js → p-9ca993de.entry.js} +1 -1
- package/dist/twilight/{p-fcbd0395.entry.js → p-9df8e4bd.entry.js} +1 -1
- package/dist/twilight/{p-41b0367e.entry.js → p-9e49d85f.entry.js} +1 -1
- package/dist/twilight/{p-7Z5IAwod.js → p-AWtDVHWY.js} +1 -1
- package/dist/twilight/{p-BtdIfJF8.js → p-BTR557QH.js} +2 -2
- package/dist/twilight/{p-DetotZcx.js → p-D82O5pkw.js} +1 -1
- package/dist/twilight/p-DXNyBG0s.js +9 -0
- package/dist/twilight/{p-CKp7_rq_.js → p-DdVH7VEz.js} +1 -1
- package/dist/twilight/{p-DwNLIufU.js → p-GQ-wuBin.js} +1 -1
- package/dist/twilight/{p-BjKw2hiE.js → p-X6DlYEXx.js} +1 -1
- package/dist/twilight/{p-Bc26pjHG.js → p-Y9R2faFd.js} +1 -1
- package/dist/twilight/{p-BiGEqBIB.js → p-Zr_Na9jM.js} +2 -2
- package/dist/twilight/{p-b1f146d6.entry.js → p-a0d251ec.entry.js} +1 -1
- package/dist/twilight/{p-072455fd.entry.js → p-a2df5f85.entry.js} +1 -1
- package/dist/twilight/{p-c64aaef9.entry.js → p-a462cf60.entry.js} +1 -1
- package/dist/twilight/{p-ae543e87.entry.js → p-a73f0f08.entry.js} +1 -1
- package/dist/twilight/{p-344e9465.entry.js → p-ac968f38.entry.js} +1 -1
- package/dist/twilight/{p-bbfa65b5.entry.js → p-aca47dd5.entry.js} +1 -1
- package/dist/twilight/{p-3212b345.entry.js → p-b0dee69a.entry.js} +1 -1
- package/dist/twilight/{p-0b975744.entry.js → p-b7a84f6a.entry.js} +1 -1
- package/dist/twilight/{p-be824cd2.entry.js → p-b8ba7d7a.entry.js} +1 -1
- package/dist/twilight/{p-c495c15f.entry.js → p-b8eead91.entry.js} +1 -1
- package/dist/twilight/{p-773de9cc.entry.js → p-bbb88414.entry.js} +1 -1
- package/dist/twilight/{p-e583bb7d.entry.js → p-c50f18ff.entry.js} +1 -1
- package/dist/twilight/{p-3b37eccc.entry.js → p-ca14d0e0.entry.js} +1 -1
- package/dist/twilight/{p-80a7d4af.entry.js → p-ce20fc73.entry.js} +1 -1
- package/dist/twilight/{p-49d4a3c2.entry.js → p-d09e982e.entry.js} +1 -1
- package/dist/twilight/{p-8dac352c.entry.js → p-d3977f2f.entry.js} +1 -1
- package/dist/twilight/{p-5710d065.entry.js → p-d3a0ba94.entry.js} +1 -1
- package/dist/twilight/{p-1f48b187.entry.js → p-d5d2b0fb.entry.js} +1 -1
- package/dist/twilight/{p-7c1d3130.entry.js → p-d78b3444.entry.js} +1 -1
- package/dist/twilight/{p-09f65942.entry.js → p-db30160d.entry.js} +1 -1
- package/dist/twilight/{p-d720d65e.entry.js → p-dd9260b4.entry.js} +1 -1
- package/dist/twilight/{p-4e5bde43.entry.js → p-e0bdbbff.entry.js} +1 -1
- package/dist/twilight/{p-24ebf9d6.entry.js → p-e551f928.entry.js} +1 -1
- package/dist/twilight/{p-0d58eb8e.entry.js → p-e8c637d0.entry.js} +1 -1
- package/dist/twilight/{p-357c7c69.entry.js → p-ed7ffc7e.entry.js} +1 -1
- package/dist/twilight/{p-f4d02219.entry.js → p-eee4a3dd.entry.js} +1 -1
- package/dist/twilight/{p-60a35744.entry.js → p-eeece90d.entry.js} +1 -1
- package/dist/twilight/{p-80818114.entry.js → p-f2099ffc.entry.js} +1 -1
- package/dist/twilight/{p-32f6ea11.entry.js → p-f3abd84c.entry.js} +1 -1
- package/dist/twilight/{p-67a08021.entry.js → p-fa984e9c.entry.js} +1 -1
- package/dist/twilight/{p-2a5844fa.entry.js → p-fb4906f6.entry.js} +1 -1
- package/dist/twilight/{p-22bf309f.entry.js → p-fc146f87.entry.js} +1 -1
- package/dist/twilight/{p-9d3d89f8.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/package.json +5 -5
- package/dist/twilight/p-56b50c65.entry.js +0 -4
- package/dist/twilight/p-6b9c1c5d.entry.js +0 -4
- package/dist/twilight/p-D9PZqqzV.js +0 -9
- package/dist/twilight/p-df4e13e9.entry.js +0 -4
|
@@ -462,8 +462,9 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
462
462
|
else {
|
|
463
463
|
this.activeTab = 'address';
|
|
464
464
|
}
|
|
465
|
-
//
|
|
466
|
-
this.
|
|
465
|
+
// Map SDK + token only when the opening view actually renders the map (fire-and-forget).
|
|
466
|
+
if (this.needsMap)
|
|
467
|
+
this.fetchAddressToken();
|
|
467
468
|
// Load countries always; load saved addresses only when address tab is active (lazy tab data).
|
|
468
469
|
if (this.isLoggedIn && this.activeTab === "address") {
|
|
469
470
|
this.loadingSavedAddresses = true;
|
|
@@ -1311,24 +1312,23 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
1311
1312
|
}
|
|
1312
1313
|
// ─── Map methods ───
|
|
1313
1314
|
async fetchAddressToken() {
|
|
1314
|
-
|
|
1315
|
+
// The token and Maps JS only serve map mode (setting on + maps key); otherwise they are ~180KB of unused JS.
|
|
1316
|
+
if (!this.canUseMap || this.addressToken || this.loadingToken)
|
|
1315
1317
|
return;
|
|
1316
1318
|
this.loadingToken = true;
|
|
1317
1319
|
try {
|
|
1318
1320
|
const mapsKey = salla.config.get('store.settings.keys.maps');
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
window.addEventListener('load', bootMaps, { once: true });
|
|
1331
|
-
}
|
|
1321
|
+
const bootMaps = () => import('./index2.js')
|
|
1322
|
+
.then(({ load }) => load({
|
|
1323
|
+
key: mapsKey,
|
|
1324
|
+
libraries: ['marker', 'places'],
|
|
1325
|
+
language: salla.config.get('user.language_code') || 'ar',
|
|
1326
|
+
}))
|
|
1327
|
+
.catch(err => log('Failed to load Google Maps SDK', err));
|
|
1328
|
+
if (document.readyState === 'complete')
|
|
1329
|
+
bootMaps();
|
|
1330
|
+
else
|
|
1331
|
+
window.addEventListener('load', bootMaps, { once: true });
|
|
1332
1332
|
this.addressToken = await bulletDeliveryAPI.getAddressToken();
|
|
1333
1333
|
}
|
|
1334
1334
|
catch {
|
|
@@ -1405,7 +1405,17 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
1405
1405
|
return Salla.config.get('store.settings.bullet_delivery.settings.map_enabled');
|
|
1406
1406
|
}
|
|
1407
1407
|
get isMapModeAvailable() {
|
|
1408
|
-
return this.
|
|
1408
|
+
return this.canUseMap && !!this.addressToken;
|
|
1409
|
+
}
|
|
1410
|
+
/** Store config allows map mode (independent of whether the token has loaded yet). */
|
|
1411
|
+
get canUseMap() {
|
|
1412
|
+
return !!this.isMapSettingEnabled && !!salla.config.get('store.settings.keys.maps');
|
|
1413
|
+
}
|
|
1414
|
+
/** The current view will render <gmap-map>: guest delivery tab, or the add-address view. */
|
|
1415
|
+
get needsMap() {
|
|
1416
|
+
return (this.canUseMap &&
|
|
1417
|
+
this.activeTab === 'address' &&
|
|
1418
|
+
(this.viewMode === 'add-address' || !this.isLoggedIn));
|
|
1409
1419
|
}
|
|
1410
1420
|
/** In map mode and a pin has already been dropped (as opposed to still using the dropdowns), regardless of login state. */
|
|
1411
1421
|
get isMapPick() {
|
|
@@ -1470,6 +1480,8 @@ const SallaBulletDelivery$1 = /*@__PURE__*/ proxyCustomElement(class SallaBullet
|
|
|
1470
1480
|
this.selectedCountry = this.countries[0];
|
|
1471
1481
|
}
|
|
1472
1482
|
}
|
|
1483
|
+
if (tab === "address" && this.needsMap)
|
|
1484
|
+
this.fetchAddressToken();
|
|
1473
1485
|
// Load appropriate data when switching tabs if country is selected
|
|
1474
1486
|
if (this.selectedCountry) {
|
|
1475
1487
|
if (tab === "branch") {
|
|
@@ -17,7 +17,7 @@ var OfferType;
|
|
|
17
17
|
OfferType["PRODUCT_PURCHASE"] = "order_amount";
|
|
18
18
|
})(OfferType || (OfferType = {}));
|
|
19
19
|
|
|
20
|
-
const sallaConditionalOfferCss = "/*!twlt*/:host{display:block}.fixed{position:fixed}.absolute{position:absolute}.-top-2{top:-0.5rem}.left-0{left:0px}.mb-1{margin-bottom:0.25rem}.
|
|
20
|
+
const sallaConditionalOfferCss = "/*!twlt*/:host{display:block}.fixed{position:fixed}.absolute{position:absolute}.-top-2{top:-0.5rem}.left-0{left:0px}.mb-1{margin-bottom:0.25rem}.flex{display:flex}.h-12{height:3rem}.w-12{width:3rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-3{gap:0.75rem}.rounded-lg{border-radius:0.5rem}.object-cover{object-fit:cover}.text-start{text-align:start}.text-xs{font-size:0.75rem;line-height:1rem}.leading-tight{line-height:1.25}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-conditional-offer-container{position:relative;display:inline-flex;width:100%;flex-direction:column;align-items:center;justify-content:flex-start;gap:1.25rem;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding-left:1.25rem;padding-right:1.25rem;padding-top:1rem;padding-bottom:4rem}@media (min-width: 768px){.s-conditional-offer-container{padding-left:2.5rem;padding-right:2.5rem;padding-top:2rem;padding-bottom:2rem}}.s-conditional-offer-title-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;align-self:stretch}.s-conditional-offer-title{text-align:center;font-size:1.25rem;line-height:1.75rem;font-weight:700;color:var(--color-primary-dark)}.s-conditional-offer-subtitle{display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;align-self:stretch;text-align:center;font-size:0.75rem;line-height:1rem;font-weight:400;--tw-text-opacity:1;color:rgb(64 64 64 / var(--tw-text-opacity, 1))}.s-conditional-offer-subtitle i{position:relative}.s-conditional-offer-progress-line{height:1px;align-self:stretch;background-color:var(--color-primary)}.s-conditional-offer-checkpoint-border{display:flex;height:60px;min-width:60px;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px;--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.s-conditional-offer-checkpoint-border-colored{border-color:var(--color-primary);color:var(--color-primary-dark)}.s-conditional-offer-product-link{display:grid;aspect-ratio:1 / 1;height:58px;place-content:center;overflow:hidden;border-radius:9999px}.s-conditional-offer-checkpoint-image-content{height:58px;width:58px;object-fit:cover}.s-conditional-offer-progress-container{position:relative;margin-bottom:2rem;display:flex;height:8rem;width:100%;align-items:center;overflow-x:auto}@media (min-width: 768px){.s-conditional-offer-progress-container{height:4rem;overflow:visible}}.s-conditional-offer-item-avatar-content{text-align:center;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-conditional-offer-item-avatar-content.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint{position:relative;display:flex;height:60px;width:60px;flex-shrink:0;flex-direction:column;align-items:center;justify-content:center;border-radius:9999px;border-width:1px}.s-conditional-offer-progress-line-container{display:grid;width:100%;overflow:hidden;grid-template-areas:'progress-line'}.s-conditional-offer-progress-line-inactive{height:1.5px;width:100%;--tw-bg-opacity:1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-progress-line-active{height:1.5px;width:0%;background-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);grid-area:progress-line}.s-conditional-offer-checkpoint-label{position:absolute;top:100%;left:50%;width:max-content;--tw-translate-x:-50%;--tw-translate-y:20%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.active{color:var(--color-primary-dark);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-checkpoint-label.first-checkpoint{--tw-translate-y:132%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir=\"ltr\"],[dir=\"ltr\"] *){--tw-translate-x:0%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-label.first-checkpoint:where([dir=\"rtl\"],[dir=\"rtl\"] *){--tw-translate-x:-100%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.s-conditional-offer-checkpoint-container{position:relative;display:flex;align-items:center}.s-conditional-offer-active-checkpoint{display:flex;justify-content:center;border-color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.s-conditional-offer-skeleton-inner-container{margin-bottom:2rem;width:100%}@media (min-width: 768px){.s-conditional-offer-skeleton-inner-container{margin-bottom:0px}}.s-conditional-offer-skeleton-title{margin-bottom:1rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-subtitle{margin-bottom:1.5rem;display:flex;justify-content:center}.s-conditional-offer-skeleton-checkpoints-wrapper{display:flex;align-items:center}";
|
|
21
21
|
|
|
22
22
|
const SallaConditionalOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaConditionalOffer extends HTMLElement {
|
|
23
23
|
constructor() {
|
|
@@ -154,7 +154,7 @@ const SallaConditionalOffer$1 = /*@__PURE__*/ proxyCustomElement(class SallaCond
|
|
|
154
154
|
h("div", { key: "progress-line", class: "s-conditional-offer-progress-line-container" }, h("div", { class: "s-conditional-offer-progress-line-inactive" }), h("div", { class: "s-conditional-offer-progress-line-active", style: { width: `${progressPercentage}%` } })),
|
|
155
155
|
h("div", { key: "checkpoint", class: `s-conditional-offer-checkpoint ${isActive ? "s-conditional-offer-active-checkpoint" : ""}` }, h("div", { class: `s-conditional-offer-item-avatar-content ${isActive ? "active" : ""}`, id: discount.type === DiscountType.FREE_PRODUCT ? `avatar-product-${discount.value}` : `avatar-${discount.value ?? index}` }, this.products && this.getCheckpointContent(discount)), this.products && discount.type === DiscountType.FREE_PRODUCT && this.renderTooltip(discount), h("div", { class: `s-conditional-offer-checkpoint-label ${isActive ? "active" : ""}`, innerHTML: this.getOfferType(discount) }))
|
|
156
156
|
] :
|
|
157
|
-
h("div", { key: "label", class: { "s-conditional-offer-checkpoint-label": true, "first-checkpoint": index === 0, active: isActive
|
|
157
|
+
h("div", { key: "label", class: { "s-conditional-offer-checkpoint-label": true, "first-checkpoint": index === 0, active: isActive }, innerHTML: this.getOfferType(discount) })));
|
|
158
158
|
}
|
|
159
159
|
getLoadingSkeletonView() {
|
|
160
160
|
return h(Host, { class: "s-conditional-offer-container" }, h("div", { class: "s-conditional-offer-skeleton-inner-container" }, h("div", { class: "s-conditional-offer-skeleton-subtitle" }, h("salla-skeleton", { height: "16px", width: "30%" })), h("div", { class: "s-conditional-offer-skeleton-subtitle" }, h("salla-skeleton", { height: "16px", width: "35%" })), h("div", { class: "s-conditional-offer-skeleton-checkpoints-wrapper" }, Array(3).fill(null).map(() => ([h("salla-skeleton", { key: "checkpoint-line", height: "8px" }), h("div", { key: "checkpoint" }, h("salla-skeleton", { height: "60px", width: "60px", type: "circle" }))])))));
|
|
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
|
|
|
5
5
|
import { C as Cancel } from './cancel.js';
|
|
6
6
|
import { d as defineCustomElement$2 } from './salla-button2.js';
|
|
7
7
|
|
|
8
|
-
const sallaCookiesBarCss = "/*!twlt*/:host{display:block;overflow:visible}.s-cookies-bar{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);z-index:100;background-color:#fff;border-radius:1rem;padding:1.25rem;width:calc(100% - 2rem);max-width:48rem;box-shadow:0 10px 30px -5px rgba(0, 0, 0, 0.2)}.s-cookies-bar-consent{display:flex;flex-direction:row;align-items:center;gap:1rem;flex-wrap:wrap}@media (max-width: 640px){.s-cookies-bar-consent{flex-direction:column;align-items:end}}.s-cookies-bar-consent-actions{display:flex;align-items:center;gap:0.75rem;flex-shrink:0}.s-cookies-bar-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.s-cookies-bar-title{font-size:1rem;font-weight:bold;color:#1f2937}.s-cookies-bar-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;background:transparent;cursor:pointer;flex-shrink:0}.s-cookies-bar-close svg{width:1.125rem;height:1.125rem;fill:currentColor}.s-cookies-bar-close:hover{color:#4b5563}.s-cookies-bar-categories{display:flex;flex-direction:column;gap:1rem}.s-cookies-bar-category{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.s-cookies-bar-category .s-toggle{flex-shrink:0}.s-cookies-bar-category .s-toggle--disabled{cursor:not-allowed}.s-cookies-bar-category-title-row{display:flex;align-items:center;gap:0.5rem}.s-cookies-bar-category-title{font-size:0.875rem;font-weight:500;color:#1f2937}.s-cookies-bar-category-description{font-size:0.75rem;color:#9ca3af;margin-top:0.25rem}.s-cookies-bar-badge{display:inline-flex;align-items:center;padding:0.0625rem 0.5rem;border-radius:9999px;background-color:#f3f4f6;color:#6b7280;font-size:0.6875rem;font-weight:500;white-space:nowrap}.s-cookies-bar-footer{display:flex;align-items:center;gap:0.75rem;margin-top:1.25rem;padding-top:1.25rem;border-top:1px solid #e5e7eb}.s-cookies-bar-message{flex:1;font-size:0.75rem;line-height:1.625;font-weight:700}.s-cookies-bar-btn--save{flex-shrink:0}.visible{visibility:visible}.invisible{visibility:hidden}.m-0{margin:0px}.ms-1{margin-inline-start:0.25rem}.resize{resize:both}.text-primary{color:var(--color-primary)}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.toggle-checkbox .s-toggle-input{position:absolute;visibility:hidden}.toggle-checkbox .s-toggle-switcher{display:inline-block;background:#ccc;border-radius:16px;width:40px;height:25px;position:relative;vertical-align:middle;transition:background 0.25s}.toggle-checkbox .s-toggle-switcher:before,.toggle-checkbox .s-toggle-switcher:after{content:\"\"}.toggle-checkbox .s-toggle-switcher:before{display:block;background:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,0.25);width:20px;height:21px;position:absolute;top:2.2px;left:1px;transition:left 0.25s}.toggle-checkbox .s-toggle-input:checked+div{background:#30D158}.toggle-checkbox .s-toggle-input:checked+div:before{left:18px}.s-toggle{cursor:pointer;display:inline-block}.s-toggle .s-toggle-input{position:absolute;visibility:hidden}.s-toggle .s-toggle-label{margin-left:5px;position:relative;top:2px}.s-toggle .s-toggle-switcher{display:inline-block;background:#ccc;border-radius:16px;width:40px;height:25px;position:relative;vertical-align:middle;transition:background 0.25s}.s-toggle .s-toggle-switcher:before,.s-toggle .s-toggle-switcher:after{content:\"\"}.s-toggle .s-toggle-switcher:before{display:block;background:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,0.25);width:20px;height:21px;position:absolute;top:2.2px;left:1px;transition:left 0.25s}.s-toggle .s-toggle-input:checked+div{background:#30D158}.s-toggle .s-toggle-input:checked+div:before{left:18px}";
|
|
8
|
+
const sallaCookiesBarCss = "/*!twlt*/:host{display:block;overflow:visible}.s-cookies-bar{position:fixed;bottom:1rem;left:50%;transform:translateX(-50%);z-index:100;background-color:#fff;border-radius:1rem;padding:1.25rem;width:calc(100% - 2rem);max-width:48rem;box-shadow:0 10px 30px -5px rgba(0, 0, 0, 0.2)}.s-cookies-bar-consent{display:flex;flex-direction:row;align-items:center;gap:1rem;flex-wrap:wrap}@media (max-width: 640px){.s-cookies-bar-consent{flex-direction:column;align-items:end}}.s-cookies-bar-consent-actions{display:flex;align-items:center;gap:0.75rem;flex-shrink:0}.s-cookies-bar-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}.s-cookies-bar-title{font-size:1rem;font-weight:bold;color:#1f2937}.s-cookies-bar-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0;border:none;background:transparent;cursor:pointer;flex-shrink:0}.s-cookies-bar-close svg{width:1.125rem;height:1.125rem;fill:currentColor}.s-cookies-bar-close:hover{color:#4b5563}.s-cookies-bar-categories{display:flex;flex-direction:column;gap:1rem}.s-cookies-bar-category{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.s-cookies-bar-category .s-toggle{flex-shrink:0}.s-cookies-bar-category .s-toggle--disabled{cursor:not-allowed}.s-cookies-bar-category-title-row{display:flex;align-items:center;gap:0.5rem}.s-cookies-bar-category-title{font-size:0.875rem;font-weight:500;color:#1f2937}.s-cookies-bar-category-description{font-size:0.75rem;color:#9ca3af;margin-top:0.25rem}.s-cookies-bar-badge{display:inline-flex;align-items:center;padding:0.0625rem 0.5rem;border-radius:9999px;background-color:#f3f4f6;color:#6b7280;font-size:0.6875rem;font-weight:500;white-space:nowrap}.s-cookies-bar-footer{display:flex;align-items:center;gap:0.75rem;margin-top:1.25rem;padding-top:1.25rem;border-top:1px solid #e5e7eb}.s-cookies-bar-message{flex:1;font-size:0.75rem;line-height:1.625;font-weight:700}.s-cookies-bar-btn--save{flex-shrink:0}.visible{visibility:visible}.invisible{visibility:hidden}.m-0{margin:0px}.ms-1{margin-inline-start:0.25rem}.hidden{display:none}.resize{resize:both}.text-primary{color:var(--color-primary)}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.toggle-checkbox .s-toggle-input{position:absolute;visibility:hidden}.toggle-checkbox .s-toggle-switcher{display:inline-block;background:#ccc;border-radius:16px;width:40px;height:25px;position:relative;vertical-align:middle;transition:background 0.25s}.toggle-checkbox .s-toggle-switcher:before,.toggle-checkbox .s-toggle-switcher:after{content:\"\"}.toggle-checkbox .s-toggle-switcher:before{display:block;background:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,0.25);width:20px;height:21px;position:absolute;top:2.2px;left:1px;transition:left 0.25s}.toggle-checkbox .s-toggle-input:checked+div{background:#30D158}.toggle-checkbox .s-toggle-input:checked+div:before{left:18px}.s-toggle{cursor:pointer;display:inline-block}.s-toggle .s-toggle-input{position:absolute;visibility:hidden}.s-toggle .s-toggle-label{margin-left:5px;position:relative;top:2px}.s-toggle .s-toggle-switcher{display:inline-block;background:#ccc;border-radius:16px;width:40px;height:25px;position:relative;vertical-align:middle;transition:background 0.25s}.s-toggle .s-toggle-switcher:before,.s-toggle .s-toggle-switcher:after{content:\"\"}.s-toggle .s-toggle-switcher:before{display:block;background:#fff;border-radius:50%;box-shadow:0 0 0 1px rgba(0,0,0,0.25);width:20px;height:21px;position:absolute;top:2.2px;left:1px;transition:left 0.25s}.s-toggle .s-toggle-input:checked+div{background:#30D158}.s-toggle .s-toggle-input:checked+div:before{left:18px}";
|
|
9
9
|
|
|
10
10
|
const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -28,7 +28,7 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
28
28
|
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
29
29
|
this.openRequestedHandler = () => this.open();
|
|
30
30
|
this.authLoggedInHandler = () => this.syncConsentAfterLogin();
|
|
31
|
-
this.authLoggedOutHandler = () => this.
|
|
31
|
+
this.authLoggedOutHandler = () => this.handleLogout();
|
|
32
32
|
/**
|
|
33
33
|
* Consent cookie names, matching the category keys the backend expects.
|
|
34
34
|
*/
|
|
@@ -37,6 +37,18 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
37
37
|
this.functionalCookieKey = 'functional_cookies';
|
|
38
38
|
this.advertisingCookieKey = 'advertising_cookies';
|
|
39
39
|
this.consentCookieDays = 365;
|
|
40
|
+
/**
|
|
41
|
+
* Storage keys for the consent choice. The persistent choice lives in `Salla.storage`
|
|
42
|
+
* (localStorage); after a logout a copy is kept in `Salla.storage.session` so the bar
|
|
43
|
+
* stays hidden until the browsing session ends.
|
|
44
|
+
*/
|
|
45
|
+
this.consentStorageKey = 'cookies-consent';
|
|
46
|
+
this.sessionConsentPointsKey = 'cookies-consent-points';
|
|
47
|
+
/**
|
|
48
|
+
* Set when the persistent choice was made (or attributed) while signed in, i.e. it
|
|
49
|
+
* belongs to that account and must never be carried over to whoever signs in next.
|
|
50
|
+
*/
|
|
51
|
+
this.consentByUserKey = 'cookies-consent-by-user';
|
|
40
52
|
/**
|
|
41
53
|
* Known first-party cookie names (a trailing `*` matches by prefix) set by common
|
|
42
54
|
* third-party scripts, grouped by the category they belong to. Only first-party
|
|
@@ -118,6 +130,14 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
118
130
|
this.functionsEnabled = false;
|
|
119
131
|
this.adsEnabled = false;
|
|
120
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Stores can share an origin (`salla.sa/store_one`, `salla.sa/store_two`), so the
|
|
135
|
+
* post-logout session copy and the signed-in marker are keyed by store id to stay out
|
|
136
|
+
* of the other stores.
|
|
137
|
+
*/
|
|
138
|
+
storeKey(key) {
|
|
139
|
+
return `${key}_${Salla.config.get('store.id')}`;
|
|
140
|
+
}
|
|
121
141
|
async componentWillLoad() {
|
|
122
142
|
await Salla.onReady();
|
|
123
143
|
await Salla.lang.onLoaded();
|
|
@@ -127,7 +147,7 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
127
147
|
Salla.event.on('auth::logged.out', this.authLoggedOutHandler);
|
|
128
148
|
this.unregisterAfterFetchMenuItemsHook = Salla.hooks.registerHook('salla-menu', 'afterFetchMenuItems', (menuComponent) => this.appendCookiesSettingsLink(menuComponent));
|
|
129
149
|
this.hydrateToggleState();
|
|
130
|
-
if (
|
|
150
|
+
if (this.currentConsentPoints()) {
|
|
131
151
|
this.isVisible = false;
|
|
132
152
|
}
|
|
133
153
|
// Keep tracking cookies enforced on every load/refresh, not just when the
|
|
@@ -196,23 +216,50 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
196
216
|
*/
|
|
197
217
|
applyConsent(points) {
|
|
198
218
|
this.writeLocalConsentCookies(points);
|
|
219
|
+
// A fresh choice is stored persistently, so any post-logout session copy is stale.
|
|
220
|
+
this.clearSessionConsent();
|
|
221
|
+
Salla.storage.set(this.storeKey(this.consentByUserKey), !Salla.config.isGuest());
|
|
199
222
|
this.sweepDisabledCategoryCookies(points);
|
|
200
223
|
if (!Salla.config.isGuest()) {
|
|
201
224
|
Salla.api.request('account/data-privacy', { points }, 'post').catch(() => { });
|
|
202
225
|
}
|
|
203
226
|
}
|
|
204
227
|
/**
|
|
205
|
-
* The currently known accepted categories
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* choice has been made yet — the bar itself is the source of truth in that case,
|
|
209
|
-
* not a sweep.
|
|
228
|
+
* The currently known accepted categories: the persistent choice if there is one,
|
|
229
|
+
* otherwise the post-logout session copy. Returns `null` when no choice has been
|
|
230
|
+
* made yet — the bar itself is the source of truth in that case, not a sweep.
|
|
210
231
|
*/
|
|
211
232
|
currentConsentPoints() {
|
|
212
|
-
|
|
233
|
+
return this.persistentConsentPoints() ?? this.sessionConsentPoints();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The accepted categories read from local cookies — there is no backend endpoint to
|
|
237
|
+
* read the customer's saved preference back, so the cookies written on save are the
|
|
238
|
+
* only source of truth we have.
|
|
239
|
+
*/
|
|
240
|
+
persistentConsentPoints() {
|
|
241
|
+
if (!Salla.storage.get(this.consentStorageKey))
|
|
213
242
|
return null;
|
|
214
243
|
return this.allCategoryKeys().filter(key => key === this.necessaryCookieKey || Salla.cookie.get(key) === 'true');
|
|
215
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* The choice carried over from before a logout, kept only for the current browsing
|
|
247
|
+
* session (see `handleLogout`). It belongs to the customer who logged out, so it only
|
|
248
|
+
* applies while the visitor is a guest — never to whoever signs in next.
|
|
249
|
+
*/
|
|
250
|
+
sessionConsentPoints() {
|
|
251
|
+
if (!Salla.config.isGuest())
|
|
252
|
+
return null;
|
|
253
|
+
if (!Salla.storage.session?.get(this.storeKey(this.consentStorageKey)))
|
|
254
|
+
return null;
|
|
255
|
+
const points = Salla.storage.session.get(this.storeKey(this.sessionConsentPointsKey));
|
|
256
|
+
const savedPoints = Array.isArray(points) ? points : [];
|
|
257
|
+
return this.allCategoryKeys().filter(key => key === this.necessaryCookieKey || savedPoints.includes(key));
|
|
258
|
+
}
|
|
259
|
+
clearSessionConsent() {
|
|
260
|
+
Salla.storage.session?.remove(this.storeKey(this.consentStorageKey));
|
|
261
|
+
Salla.storage.session?.remove(this.storeKey(this.sessionConsentPointsKey));
|
|
262
|
+
}
|
|
216
263
|
enforceCurrentConsent() {
|
|
217
264
|
const points = this.currentConsentPoints();
|
|
218
265
|
if (points)
|
|
@@ -232,31 +279,76 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
232
279
|
this.adsEnabled = points.includes(this.advertisingCookieKey);
|
|
233
280
|
}
|
|
234
281
|
/**
|
|
235
|
-
*
|
|
236
|
-
* browser, not the account — without this, whatever the previous customer chose
|
|
237
|
-
* be misread as "the visitor's own prior choice" and pushed to the next account
|
|
238
|
-
* logs in (or is created) on this same browser.
|
|
282
|
+
* On logout, stop keeping the choice persistently: local cookies/storage are scoped to
|
|
283
|
+
* the browser, not the account — without this, whatever the previous customer chose
|
|
284
|
+
* would be misread as "the visitor's own prior choice" and pushed to the next account
|
|
285
|
+
* that logs in (or is created) on this same browser.
|
|
286
|
+
*
|
|
287
|
+
* The choice is still honoured for the rest of the browsing session (copied to session
|
|
288
|
+
* storage), so the bar doesn't pop up again right after logging out; it shows again
|
|
289
|
+
* once the store is closed and reopened.
|
|
290
|
+
*
|
|
291
|
+
* A logout fired while the visitor is already a guest is the automatic `force_logout`
|
|
292
|
+
* cleanup (the session already ended server-side), not the customer's doing, so a choice
|
|
293
|
+
* the visitor made as a guest is kept as is. A choice made while signed in belongs to
|
|
294
|
+
* that account, so it's handled like any other logout.
|
|
239
295
|
*/
|
|
240
|
-
|
|
296
|
+
handleLogout() {
|
|
297
|
+
if (Salla.config.isGuest() && !Salla.storage.get(this.storeKey(this.consentByUserKey)))
|
|
298
|
+
return;
|
|
299
|
+
const state = Salla.storage.get(this.consentStorageKey);
|
|
300
|
+
const points = this.persistentConsentPoints();
|
|
301
|
+
if (state && points) {
|
|
302
|
+
Salla.storage.session?.set(this.storeKey(this.consentStorageKey), state);
|
|
303
|
+
Salla.storage.session?.set(this.storeKey(this.sessionConsentPointsKey), points);
|
|
304
|
+
}
|
|
241
305
|
for (const key of this.allCategoryKeys()) {
|
|
242
306
|
Salla.cookie.remove(key);
|
|
243
307
|
}
|
|
244
|
-
Salla.storage.remove(
|
|
245
|
-
|
|
246
|
-
// made a choice yet, so the bar should show again right away.
|
|
247
|
-
this.isVisible = true;
|
|
308
|
+
Salla.storage.remove(this.consentStorageKey);
|
|
309
|
+
Salla.storage.remove(this.storeKey(this.consentByUserKey));
|
|
248
310
|
}
|
|
249
311
|
/**
|
|
250
312
|
* Runs when a guest signs in. There is no backend endpoint to check whether the
|
|
251
313
|
* account already has a saved preference, so if the visitor already made a choice
|
|
252
314
|
* as a guest (guest choices are never sent server-side), attribute that local
|
|
253
315
|
* choice to the account now — this is the only source of truth available.
|
|
316
|
+
* The post-logout session copy belongs to the previous customer, so it's dropped here
|
|
317
|
+
* and never synced.
|
|
318
|
+
* `auth::logged.in` is dispatched even when the profile fetch fails, so a login that
|
|
319
|
+
* didn't resolve a user (still a guest) changes nothing.
|
|
254
320
|
*/
|
|
255
321
|
syncConsentAfterLogin() {
|
|
256
|
-
|
|
257
|
-
|
|
322
|
+
if (Salla.config.isGuest())
|
|
323
|
+
return;
|
|
324
|
+
this.clearSessionConsent();
|
|
325
|
+
const points = this.persistentConsentPoints();
|
|
326
|
+
if (!points) {
|
|
327
|
+
// Nothing chosen on this browser for the account that just signed in — e.g. after a
|
|
328
|
+
// logout that kept the bar hidden on this page — so ask them now.
|
|
329
|
+
this.step = 'consent';
|
|
330
|
+
this.isVisible = true;
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
// A choice that already belongs to an account isn't this visitor's to hand over.
|
|
334
|
+
if (Salla.storage.get(this.storeKey(this.consentByUserKey)))
|
|
258
335
|
return;
|
|
259
|
-
|
|
336
|
+
// Only once the account actually has the choice does it count as theirs; if the POST
|
|
337
|
+
// fails, a later login can try again. The response can arrive after the visitor logged
|
|
338
|
+
// out or chose again, so only mark it if it's still the same account and choice.
|
|
339
|
+
const userId = Salla.config.get('user.id');
|
|
340
|
+
Salla.api
|
|
341
|
+
.request('account/data-privacy', { points }, 'post')
|
|
342
|
+
.then(() => {
|
|
343
|
+
const currentPoints = this.persistentConsentPoints();
|
|
344
|
+
const unchanged = !Salla.config.isGuest() &&
|
|
345
|
+
Salla.config.get('user.id') === userId &&
|
|
346
|
+
currentPoints?.length === points.length &&
|
|
347
|
+
points.every(key => currentPoints.includes(key));
|
|
348
|
+
if (unchanged)
|
|
349
|
+
Salla.storage.set(this.storeKey(this.consentByUserKey), true);
|
|
350
|
+
})
|
|
351
|
+
.catch(() => { });
|
|
260
352
|
}
|
|
261
353
|
cookieNameMatchesPattern(cookieName, pattern) {
|
|
262
354
|
return pattern.endsWith('*')
|
|
@@ -283,8 +375,15 @@ const SallaCookiesBar$1 = /*@__PURE__*/ proxyCustomElement(class SallaCookiesBar
|
|
|
283
375
|
dismiss(eventName) {
|
|
284
376
|
this.isVisible = false;
|
|
285
377
|
//We will call event first because we need to compare between old and new data inside session
|
|
286
|
-
|
|
287
|
-
|
|
378
|
+
try {
|
|
379
|
+
Salla.event.emit(`salla-cookies-bar::${eventName}`);
|
|
380
|
+
}
|
|
381
|
+
finally {
|
|
382
|
+
// Listeners (themes, apps, third-party scripts) run synchronously and their errors
|
|
383
|
+
// propagate; always persist the choice so a throwing listener can't make the bar
|
|
384
|
+
// show again on the next page. The error is still rethrown after this.
|
|
385
|
+
Salla.storage.set(this.consentStorageKey, eventName);
|
|
386
|
+
}
|
|
288
387
|
}
|
|
289
388
|
/**
|
|
290
389
|
* Persist the customized per-category toggle choices, then dismiss.
|
package/dist/docs.json
CHANGED