@salla.sa/twilight-components 2.14.539 → 2.14.540
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-CIpOpiw6.js → filepond-U8F_iDbp.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-CPV_SZrj.js → filepond-plugin-file-poster-CAJAmCHU.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-C_XGylG1.js → filepond-plugin-file-validate-size-Dxgl8Gdz.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-CmVS48lk.js → filepond-plugin-file-validate-type-BPhw8zXs.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-KfqhH5F9.js → filepond-plugin-image-edit-DNKfSuCy.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-BfRIDxO-.js → filepond-plugin-image-exif-orientation-NCmUtKOd.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-DlvO4sHZ.js → filepond-plugin-image-preview-jRCd9jSG.js} +1 -1
- package/dist/cjs/{index-CMDyFi6Q.js → index-F_FURF-0.js} +2 -2
- package/dist/cjs/{intlTelInput-BK34b4sR.js → intlTelInput-yt9noy9U.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
- package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
- package/dist/cjs/salla-add-product-button_5.cjs.entry.js +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-apps-icons.cjs.entry.js +1 -1
- 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-booking-field_7.cjs.entry.js +10 -10
- package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
- 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_8.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-cookies-bar.cjs.entry.js +303 -26
- 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-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_2.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_2.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-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-scopes.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-slider.cjs.entry.js +1 -1
- package/dist/cjs/salla-social-share.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
- package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +2 -2
- package/dist/cjs/{vanilla-picker-DYTpjTDj.js → vanilla-picker-DXgSpklI.js} +1 -1
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +206 -56
- package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +322 -30
- package/dist/components/index.js +2 -2
- package/dist/components/salla-cookies-bar.js +319 -27
- package/dist/esm/{filepond-DMUE9Fyj.js → filepond-Bxzb6RRZ.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-DBZQTm7s.js → filepond-plugin-file-poster-CZfrjnEX.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CrKxdsNW.js → filepond-plugin-file-validate-size-Dqa69lX7.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-DvEJrucY.js → filepond-plugin-file-validate-type-C_76nxDb.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-C6ptCg9o.js → filepond-plugin-image-edit-BvzVMeMY.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-IcgeTieF.js → filepond-plugin-image-exif-orientation-Br4ANTi7.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-CDMh74os.js → filepond-plugin-image-preview-e54xZ08P.js} +1 -1
- package/dist/esm/{index-CjQzkU95.js → index-5UtJVEzd.js} +2 -2
- package/dist/esm/{intlTelInput-Dsx2z7pR.js → intlTelInput-BQXch__5.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/salla-accordion-body_2.entry.js +1 -1
- package/dist/esm/salla-accordion_6.entry.js +1 -1
- package/dist/esm/salla-add-product-button_5.entry.js +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-apps-icons.entry.js +1 -1
- package/dist/esm/salla-badge.entry.js +1 -1
- package/dist/esm/salla-basket-gap.entry.js +1 -1
- package/dist/esm/salla-booking-field_7.entry.js +10 -10
- package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
- 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_8.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-cookies-bar.entry.js +303 -26
- 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-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_2.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_2.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-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-scopes.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-slider.entry.js +1 -1
- package/dist/esm/salla-social-share.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tab-content_3.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-user-menu.entry.js +1 -1
- package/dist/esm/salla-user-profile.entry.js +1 -1
- package/dist/esm/salla-user-settings.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/salla-wishlist-actions.entry.js +1 -1
- package/dist/esm/twilight.js +3 -3
- package/dist/esm/{vanilla-picker-oYjMgYry.js → vanilla-picker-lLULIehu.js} +1 -1
- package/dist/twilight/{p-9b6db6a7.entry.js → p-02df1c31.entry.js} +1 -1
- package/dist/twilight/{p-250d7ab2.entry.js → p-02e821a0.entry.js} +1 -1
- package/dist/twilight/{p-152c657e.entry.js → p-088c1ab3.entry.js} +1 -1
- package/dist/twilight/{p-9c7fcbb0.entry.js → p-0895958b.entry.js} +1 -1
- package/dist/twilight/{p-58184ae2.entry.js → p-0bc1c246.entry.js} +1 -1
- package/dist/twilight/{p-82c12191.entry.js → p-0ecbe43b.entry.js} +1 -1
- package/dist/twilight/{p-3052178c.entry.js → p-1578cbe5.entry.js} +1 -1
- package/dist/twilight/{p-437fe6f1.entry.js → p-16c09de9.entry.js} +1 -1
- package/dist/twilight/{p-e020f1c3.entry.js → p-18d7763b.entry.js} +1 -1
- package/dist/twilight/{p-BiyhYWus.js → p-1YJa6YaH.js} +1 -1
- package/dist/twilight/{p-80ff5572.entry.js → p-1bc7ab28.entry.js} +1 -1
- package/dist/twilight/{p-40217fcc.entry.js → p-1c049149.entry.js} +1 -1
- package/dist/twilight/{p-49e6fe86.entry.js → p-1c66fdb3.entry.js} +1 -1
- package/dist/twilight/{p-2babb4bd.entry.js → p-1ee008c3.entry.js} +1 -1
- package/dist/twilight/{p-997c4966.entry.js → p-200a9c11.entry.js} +1 -1
- package/dist/twilight/{p-a3f00389.entry.js → p-21e9a475.entry.js} +1 -1
- package/dist/twilight/{p-9fa351ab.entry.js → p-271a2d55.entry.js} +1 -1
- package/dist/twilight/{p-67e88dc4.entry.js → p-2a9a4e12.entry.js} +1 -1
- package/dist/twilight/{p-b0e86201.entry.js → p-2d62c356.entry.js} +1 -1
- package/dist/twilight/{p-f1eebeda.entry.js → p-3024f859.entry.js} +1 -1
- package/dist/twilight/{p-1dd1fef0.entry.js → p-3136d942.entry.js} +1 -1
- package/dist/twilight/{p-48db7b95.entry.js → p-397acd73.entry.js} +1 -1
- package/dist/twilight/{p-5bbf829e.entry.js → p-3af52c82.entry.js} +1 -1
- package/dist/twilight/{p-298ff716.entry.js → p-3b0032e4.entry.js} +1 -1
- package/dist/twilight/{p-236f371d.entry.js → p-3b821dc9.entry.js} +1 -1
- package/dist/twilight/{p-a802826b.entry.js → p-40a0baa7.entry.js} +1 -1
- package/dist/twilight/{p-84f35767.entry.js → p-46d2375b.entry.js} +1 -1
- package/dist/twilight/{p-cc2b960c.entry.js → p-497cc3a6.entry.js} +1 -1
- package/dist/twilight/{p-b1812d5c.entry.js → p-49c2e935.entry.js} +1 -1
- package/dist/twilight/{p-c254b6fa.entry.js → p-4c34e1fd.entry.js} +1 -1
- package/dist/twilight/{p-8fa84b87.entry.js → p-4cff8533.entry.js} +1 -1
- package/dist/twilight/{p-faaf4423.entry.js → p-4dabd999.entry.js} +1 -1
- package/dist/twilight/{p-6ed4c9bb.entry.js → p-4e2e4e92.entry.js} +1 -1
- package/dist/twilight/{p-2e43ddf0.entry.js → p-4e71dacc.entry.js} +1 -1
- package/dist/twilight/{p-b69e98a8.entry.js → p-524aabd2.entry.js} +1 -1
- package/dist/twilight/{p-7c74dc6e.entry.js → p-538a1642.entry.js} +1 -1
- package/dist/twilight/{p-b3fe5e44.entry.js → p-575b3b4c.entry.js} +1 -1
- package/dist/twilight/{p-1c31cec0.entry.js → p-582247b3.entry.js} +1 -1
- package/dist/twilight/{p-CjQzkU95.js → p-5UtJVEzd.js} +1 -1
- package/dist/twilight/{p-5d01f25c.entry.js → p-5a26fb06.entry.js} +1 -1
- package/dist/twilight/{p-dd5800dd.entry.js → p-5cbbf472.entry.js} +1 -1
- package/dist/twilight/{p-b193c991.entry.js → p-5f1b8510.entry.js} +1 -1
- package/dist/twilight/{p-BtymczNp.js → p-5njrWPq2.js} +2 -2
- package/dist/twilight/{p-699bea26.entry.js → p-64ee420e.entry.js} +1 -1
- package/dist/twilight/{p-331679d8.entry.js → p-66313db6.entry.js} +1 -1
- package/dist/twilight/{p-db02986a.entry.js → p-66448f0f.entry.js} +1 -1
- package/dist/twilight/p-6757a647.entry.js +4 -0
- package/dist/twilight/{p-1fb46b43.entry.js → p-693d012f.entry.js} +1 -1
- package/dist/twilight/{p-51a860bc.entry.js → p-6c4cef7a.entry.js} +1 -1
- package/dist/twilight/{p-664f0936.entry.js → p-6e766b2a.entry.js} +1 -1
- package/dist/twilight/{p-f7298462.entry.js → p-71731e63.entry.js} +1 -1
- package/dist/twilight/{p-bf183f3a.entry.js → p-73607393.entry.js} +1 -1
- package/dist/twilight/{p-1c369bcf.entry.js → p-7a17138f.entry.js} +1 -1
- package/dist/twilight/{p-68c8772a.entry.js → p-7e9d67f2.entry.js} +1 -1
- package/dist/twilight/{p-5e9fb02d.entry.js → p-891009e2.entry.js} +1 -1
- package/dist/twilight/{p-91b4a1a0.entry.js → p-8dab94d8.entry.js} +1 -1
- package/dist/twilight/{p-1d2804ac.entry.js → p-900ee42a.entry.js} +1 -1
- package/dist/twilight/{p-0a1271e1.entry.js → p-913d4965.entry.js} +1 -1
- package/dist/twilight/{p-1470e96a.entry.js → p-95224232.entry.js} +1 -1
- package/dist/twilight/{p-54d0db9a.entry.js → p-963d34af.entry.js} +1 -1
- package/dist/twilight/{p-187a502c.entry.js → p-9af31040.entry.js} +1 -1
- package/dist/twilight/{p-C6w35AiQ.js → p-CXv4fDWa.js} +1 -1
- package/dist/twilight/{p-C1wu6qA1.js → p-Cf5WZwC9.js} +1 -1
- package/dist/twilight/{p-D2uiOzVz.js → p-CkJpLPBM.js} +1 -1
- package/dist/twilight/{p-CGDRqU6i.js → p-Dke2dnYe.js} +1 -1
- package/dist/twilight/{p-B9VKgTTF.js → p-Dso9PQdO.js} +1 -1
- package/dist/twilight/{p-CmQyEOxJ.js → p-WDLGvEaR.js} +1 -1
- package/dist/twilight/{p-27a0a4cc.entry.js → p-a5afb821.entry.js} +1 -1
- package/dist/twilight/{p-14c72ffd.entry.js → p-a9e276fa.entry.js} +1 -1
- package/dist/twilight/{p-e701a3dc.entry.js → p-aaa37ca1.entry.js} +1 -1
- package/dist/twilight/{p-4868c03c.entry.js → p-ac9a54cc.entry.js} +1 -1
- package/dist/twilight/{p-bbe79568.entry.js → p-acd1a9d8.entry.js} +1 -1
- package/dist/twilight/{p-cb179aba.entry.js → p-ad54610c.entry.js} +1 -1
- package/dist/twilight/{p-3f26f1c5.entry.js → p-b16c1eac.entry.js} +1 -1
- package/dist/twilight/{p-1754903f.entry.js → p-b5c90151.entry.js} +1 -1
- package/dist/twilight/{p-8ae7bf96.entry.js → p-b639f062.entry.js} +1 -1
- package/dist/twilight/{p-2c6c0844.entry.js → p-b7f1bad9.entry.js} +1 -1
- package/dist/twilight/{p-7f73ff43.entry.js → p-b9477568.entry.js} +1 -1
- package/dist/twilight/{p-4058b619.entry.js → p-b9b32feb.entry.js} +1 -1
- package/dist/twilight/{p-665bca88.entry.js → p-bb7bc52f.entry.js} +1 -1
- package/dist/twilight/{p-a669483e.entry.js → p-c05513ae.entry.js} +1 -1
- package/dist/twilight/{p-37413a02.entry.js → p-c138132c.entry.js} +1 -1
- package/dist/twilight/{p-fa28a89f.entry.js → p-c224fa3a.entry.js} +1 -1
- package/dist/twilight/{p-ae536a61.entry.js → p-c8c36233.entry.js} +1 -1
- package/dist/twilight/{p-31c36417.entry.js → p-ce941081.entry.js} +1 -1
- package/dist/twilight/{p-116e7555.entry.js → p-d4e1a8f7.entry.js} +1 -1
- package/dist/twilight/{p-3bdba697.entry.js → p-d505caaf.entry.js} +1 -1
- package/dist/twilight/{p-8ef3693b.entry.js → p-d6b6f984.entry.js} +1 -1
- package/dist/twilight/{p-fe7990b7.entry.js → p-d8a69feb.entry.js} +1 -1
- package/dist/twilight/{p-3c22551b.entry.js → p-dcf53c45.entry.js} +1 -1
- package/dist/twilight/{p-aeb76c46.entry.js → p-e4cb5ee8.entry.js} +1 -1
- package/dist/twilight/{p-a1494e64.entry.js → p-e6007706.entry.js} +1 -1
- package/dist/twilight/{p-44cfb2c2.entry.js → p-ed9899c0.entry.js} +1 -1
- package/dist/twilight/{p-8bce41c8.entry.js → p-f17fa83f.entry.js} +1 -1
- package/dist/twilight/{p-3b6b3c54.entry.js → p-f27472f4.entry.js} +1 -1
- package/dist/twilight/{p-2e112687.entry.js → p-f3771ebc.entry.js} +1 -1
- package/dist/twilight/{p-1151ebd7.entry.js → p-f5747d3c.entry.js} +1 -1
- package/dist/twilight/{p-3bc64439.entry.js → p-fb2c863d.entry.js} +1 -1
- package/dist/twilight/{p-8230c543.entry.js → p-fbb156e8.entry.js} +1 -1
- package/dist/twilight/{p-5b03dca8.entry.js → p-fe222cbe.entry.js} +1 -1
- package/dist/twilight/{p-DfJdKB52.js → p-yEKxvrPt.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +117 -12
- package/dist/types/components.d.ts +4 -4
- package/package.json +6 -6
- package/dist/twilight/p-f4bdf19e.entry.js +0 -4
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
4
|
import { h, Host } from "@stencil/core";
|
|
5
|
+
import CancelIcon from "../../assets/svg/cancel.svg";
|
|
5
6
|
export class SallaCookiesBar {
|
|
6
7
|
constructor() {
|
|
7
8
|
/**
|
|
8
9
|
* Whether the cookies bar is visible.
|
|
9
10
|
*/
|
|
10
11
|
this.isVisible = true;
|
|
12
|
+
/**
|
|
13
|
+
* Which step of the bar is shown: the initial consent message with
|
|
14
|
+
* accept/customize actions, or the per-category customization panel.
|
|
15
|
+
*/
|
|
16
|
+
this.step = 'consent';
|
|
11
17
|
/**
|
|
12
18
|
* Whether the viewport is mobile width (updates on resize).
|
|
13
19
|
*/
|
|
@@ -15,24 +21,141 @@ export class SallaCookiesBar {
|
|
|
15
21
|
this.mobileBreakpoint = 768;
|
|
16
22
|
this.mobileQueryHandler = (e) => (this.isMobile = e.matches);
|
|
17
23
|
this.openRequestedHandler = () => this.open();
|
|
18
|
-
this.
|
|
24
|
+
this.authLoggedInHandler = () => this.syncConsentAfterLogin();
|
|
25
|
+
this.authLoggedOutHandler = () => this.clearLocalConsent();
|
|
26
|
+
/**
|
|
27
|
+
* Consent cookie names, matching the category keys the backend expects.
|
|
28
|
+
*/
|
|
29
|
+
this.necessaryCookieKey = 'necessary_cookies';
|
|
30
|
+
this.performanceCookieKey = 'performance_cookies';
|
|
31
|
+
this.functionalCookieKey = 'functional_cookies';
|
|
32
|
+
this.advertisingCookieKey = 'advertising_cookies';
|
|
33
|
+
this.consentCookieDays = 365;
|
|
34
|
+
/**
|
|
35
|
+
* Known first-party cookie names (a trailing `*` matches by prefix) set by common
|
|
36
|
+
* third-party scripts, grouped by the category they belong to. Only first-party
|
|
37
|
+
* cookies (set on the store's own domain) can actually be read/removed from here —
|
|
38
|
+
* cookies scoped to a third-party domain (e.g. doubleclick.net) are invisible to us.
|
|
39
|
+
*/
|
|
40
|
+
this.trackingCookiesByCategory = {
|
|
41
|
+
performance_cookies: [
|
|
42
|
+
// Google Analytics
|
|
43
|
+
'_ga',
|
|
44
|
+
'_ga_*',
|
|
45
|
+
'_gid',
|
|
46
|
+
'_gat',
|
|
47
|
+
'_gat_gtag_*',
|
|
48
|
+
// Hotjar
|
|
49
|
+
'_hjSessionUser_*',
|
|
50
|
+
'_hjSession_*',
|
|
51
|
+
'_hjIncludedInSessionSample_*',
|
|
52
|
+
'_hjAbsoluteSessionInProgress',
|
|
53
|
+
'_hjFirstSeen',
|
|
54
|
+
// Microsoft Clarity
|
|
55
|
+
'_clck',
|
|
56
|
+
'_clsk',
|
|
57
|
+
'MUID',
|
|
58
|
+
'MR',
|
|
59
|
+
'ANONCHK',
|
|
60
|
+
// Yandex Metrica
|
|
61
|
+
'_ym_uid',
|
|
62
|
+
'_ym_d',
|
|
63
|
+
'_ym_isad',
|
|
64
|
+
],
|
|
65
|
+
advertising_cookies: [
|
|
66
|
+
// Google Ads / DoubleClick
|
|
67
|
+
'_gcl_au',
|
|
68
|
+
'_gcl_aw',
|
|
69
|
+
'_gcl_dc',
|
|
70
|
+
'IDE',
|
|
71
|
+
'test_cookie',
|
|
72
|
+
'1P_JAR',
|
|
73
|
+
'NID',
|
|
74
|
+
// Meta (Facebook) Pixel
|
|
75
|
+
'_fbp',
|
|
76
|
+
'_fbc',
|
|
77
|
+
'fr',
|
|
78
|
+
// TikTok Pixel
|
|
79
|
+
'_ttp',
|
|
80
|
+
// Snapchat Pixel
|
|
81
|
+
'_scid',
|
|
82
|
+
'sc_at',
|
|
83
|
+
// Twitter/X
|
|
84
|
+
'personalization_id',
|
|
85
|
+
'guest_id',
|
|
86
|
+
'muc_ads',
|
|
87
|
+
// Pinterest
|
|
88
|
+
'_pin_unauth',
|
|
89
|
+
'_pinterest_ct_ua',
|
|
90
|
+
// LinkedIn Insight Tag
|
|
91
|
+
'li_sugr',
|
|
92
|
+
'bcookie',
|
|
93
|
+
'lidc',
|
|
94
|
+
'UserMatchHistory',
|
|
95
|
+
'AnalyticsSyncHistory',
|
|
96
|
+
],
|
|
97
|
+
functional_cookies: [
|
|
98
|
+
// Intercom
|
|
99
|
+
'intercom-id-*',
|
|
100
|
+
'intercom-session-*',
|
|
101
|
+
// Zendesk Chat
|
|
102
|
+
'__zlcmid',
|
|
103
|
+
// Crisp
|
|
104
|
+
'crisp-client%2Fsession%2F*',
|
|
105
|
+
// YouTube embeds
|
|
106
|
+
'YSC',
|
|
107
|
+
'VISITOR_INFO1_LIVE',
|
|
108
|
+
'PREF',
|
|
109
|
+
],
|
|
110
|
+
};
|
|
111
|
+
this.performanceEnabled = false;
|
|
112
|
+
this.functionsEnabled = false;
|
|
113
|
+
this.adsEnabled = false;
|
|
19
114
|
}
|
|
20
115
|
async componentWillLoad() {
|
|
21
116
|
await Salla.onReady();
|
|
22
117
|
await Salla.lang.onLoaded();
|
|
23
118
|
this.loadTranslations();
|
|
24
|
-
this.selectedConsent = this.getStoredConsentChoice();
|
|
25
119
|
Salla.event.on('salla-cookies-bar::open', this.openRequestedHandler);
|
|
120
|
+
Salla.event.on('auth::logged.in', this.authLoggedInHandler);
|
|
121
|
+
Salla.event.on('auth::logged.out', this.authLoggedOutHandler);
|
|
26
122
|
this.unregisterAfterFetchMenuItemsHook = Salla.hooks.registerHook('salla-menu', 'afterFetchMenuItems', (menuComponent) => this.appendCookiesSettingsLink(menuComponent));
|
|
123
|
+
this.hydrateToggleState();
|
|
27
124
|
if (Salla.storage.get('cookies-consent')) {
|
|
28
125
|
this.isVisible = false;
|
|
29
126
|
}
|
|
127
|
+
// Keep tracking cookies enforced on every load/refresh, not just when the
|
|
128
|
+
// customer actively changes their choice in the bar.
|
|
129
|
+
this.enforceCurrentConsent();
|
|
130
|
+
}
|
|
131
|
+
isArabicLocale() {
|
|
132
|
+
const locale = Salla.lang.getLocale?.() ?? document.documentElement.lang ?? 'ar';
|
|
133
|
+
return locale.toLowerCase().startsWith('ar');
|
|
134
|
+
}
|
|
135
|
+
// TODO: remove the fallback defaults once the `common.cookies.*` keys below are added to the language files.
|
|
136
|
+
translate(key, arFallback, enFallback) {
|
|
137
|
+
const value = Salla.lang.get(key);
|
|
138
|
+
if (value && value !== key)
|
|
139
|
+
return value;
|
|
140
|
+
return this.isArabicLocale() ? arFallback : enFallback;
|
|
30
141
|
}
|
|
31
142
|
loadTranslations() {
|
|
143
|
+
this.titleLabel = this.translate('common.cookies.settings_title', 'تخصيص إعدادات ملفات تعريف الارتباط', 'Customize Cookie Preferences Settings');
|
|
144
|
+
this.saveLabel = this.translate('common.cookies.save', 'حفظ الخيارات', 'Save Options');
|
|
32
145
|
this.messageLabel = Salla.lang.get('common.cookies.message');
|
|
33
146
|
this.linkLabel = Salla.lang.get('common.cookies.link');
|
|
34
|
-
this.acceptLabel =
|
|
35
|
-
this.
|
|
147
|
+
this.acceptLabel = this.translate('common.cookies.accept', 'قبول', 'Accept');
|
|
148
|
+
this.acceptAllLabel = this.translate('common.cookies.accept_all', 'قبول الكل', 'Accept All');
|
|
149
|
+
this.customizeLabel = this.translate('common.cookies.customize', 'تخصيص', 'Customize');
|
|
150
|
+
this.essentialTitleLabel = this.translate('common.cookies.categories.essential.title', 'ملفات تعريف الارتباط الضرورية', 'Essential Cookies');
|
|
151
|
+
this.essentialDescriptionLabel = this.translate('common.cookies.categories.essential.description', 'ضروريه لتشغيل الوظائف الأساسية للموقع الإلكتروني.', "Required for the website's basic functions.");
|
|
152
|
+
this.essentialBadgeLabel = this.translate('common.cookies.categories.essential.badge', 'إجباري', 'Required');
|
|
153
|
+
this.performanceTitleLabel = this.translate('common.cookies.categories.performance.title', 'ملفات تعريف الارتباط الخاصة بالأداء', 'Performance Cookies');
|
|
154
|
+
this.performanceDescriptionLabel = this.translate('common.cookies.categories.performance.description', 'تساعدنا في تحليل كيفية استخدامك للموقع وتحسين أدائه.', 'Help us analyze site usage and improve performance.');
|
|
155
|
+
this.functionsTitleLabel = this.translate('common.cookies.categories.functions.title', 'ملفات تعريف الارتباط الوظيفية', 'Functional Cookies');
|
|
156
|
+
this.functionsDescriptionLabel = this.translate('common.cookies.categories.functions.description', 'تُتيح لك تجربة مخصصة وتفعيل ميزات متقدمة داخل الموقع.', 'Enable enhanced functionality and personalization.');
|
|
157
|
+
this.adsTitleLabel = this.translate('common.cookies.categories.ads.title', 'ملفات تعريف الارتباط الإعلانية', 'Advertising Cookies');
|
|
158
|
+
this.adsDescriptionLabel = this.translate('common.cookies.categories.ads.description', 'تُستخدم لعرض محتوى تسويقي مخصص يناسب اهتماماتك.', 'Allow personalized content.');
|
|
36
159
|
}
|
|
37
160
|
componentDidLoad() {
|
|
38
161
|
this.mobileQuery = window.matchMedia(`(max-width: ${this.mobileBreakpoint - 1}px)`);
|
|
@@ -42,57 +165,187 @@ export class SallaCookiesBar {
|
|
|
42
165
|
disconnectedCallback() {
|
|
43
166
|
this.mobileQuery?.removeEventListener('change', this.mobileQueryHandler);
|
|
44
167
|
Salla.event.off('salla-cookies-bar::open', this.openRequestedHandler);
|
|
168
|
+
Salla.event.off('auth::logged.in', this.authLoggedInHandler);
|
|
169
|
+
Salla.event.off('auth::logged.out', this.authLoggedOutHandler);
|
|
45
170
|
this.unregisterAfterFetchMenuItemsHook?.();
|
|
46
171
|
this.unregisterAfterFetchMenuItemsHook = undefined;
|
|
47
172
|
}
|
|
173
|
+
allCategoryKeys() {
|
|
174
|
+
return [
|
|
175
|
+
this.necessaryCookieKey,
|
|
176
|
+
this.performanceCookieKey,
|
|
177
|
+
this.functionalCookieKey,
|
|
178
|
+
this.advertisingCookieKey,
|
|
179
|
+
];
|
|
180
|
+
}
|
|
181
|
+
writeLocalConsentCookies(points) {
|
|
182
|
+
for (const key of this.allCategoryKeys()) {
|
|
183
|
+
Salla.cookie.set(key, String(key === this.necessaryCookieKey || points.includes(key)), this.consentCookieDays);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
48
186
|
/**
|
|
49
|
-
*
|
|
187
|
+
* Store the accepted categories as local cookies (works for guests too), then, for
|
|
188
|
+
* signed-in customers, replace their saved preference server-side.
|
|
189
|
+
* `points` is a full replace: any category left out is stored as declined.
|
|
50
190
|
*/
|
|
51
|
-
|
|
52
|
-
this.
|
|
191
|
+
applyConsent(points) {
|
|
192
|
+
this.writeLocalConsentCookies(points);
|
|
193
|
+
this.sweepDisabledCategoryCookies(points);
|
|
194
|
+
if (!Salla.config.isGuest()) {
|
|
195
|
+
Salla.api.request('account/data-privacy', { points }, 'post').catch(() => { });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The currently known accepted categories, read from local cookies — there is no
|
|
200
|
+
* backend endpoint to read the customer's saved preference back, so the cookies
|
|
201
|
+
* written on save are the only source of truth we have. Returns `null` when no
|
|
202
|
+
* choice has been made yet — the bar itself is the source of truth in that case,
|
|
203
|
+
* not a sweep.
|
|
204
|
+
*/
|
|
205
|
+
currentConsentPoints() {
|
|
206
|
+
if (!Salla.storage.get('cookies-consent'))
|
|
207
|
+
return null;
|
|
208
|
+
return this.allCategoryKeys().filter(key => key === this.necessaryCookieKey || Salla.cookie.get(key) === 'true');
|
|
209
|
+
}
|
|
210
|
+
enforceCurrentConsent() {
|
|
211
|
+
const points = this.currentConsentPoints();
|
|
212
|
+
if (points)
|
|
213
|
+
this.sweepDisabledCategoryCookies(points);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Reflect the currently known choice (server record, or local cookies for a guest)
|
|
217
|
+
* in the toggles, so reopening the settings panel shows what was actually saved
|
|
218
|
+
* instead of resetting to all-off.
|
|
219
|
+
*/
|
|
220
|
+
hydrateToggleState() {
|
|
221
|
+
const points = this.currentConsentPoints();
|
|
222
|
+
if (!points)
|
|
223
|
+
return;
|
|
224
|
+
this.performanceEnabled = points.includes(this.performanceCookieKey);
|
|
225
|
+
this.functionsEnabled = points.includes(this.functionalCookieKey);
|
|
226
|
+
this.adsEnabled = points.includes(this.advertisingCookieKey);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Wipe the locally-stored choice on logout. Local cookies/storage are scoped to the
|
|
230
|
+
* browser, not the account — without this, whatever the previous customer chose would
|
|
231
|
+
* be misread as "the visitor's own prior choice" and pushed to the next account that
|
|
232
|
+
* logs in (or is created) on this same browser.
|
|
233
|
+
*/
|
|
234
|
+
clearLocalConsent() {
|
|
235
|
+
for (const key of this.allCategoryKeys()) {
|
|
236
|
+
Salla.cookie.remove(key);
|
|
237
|
+
}
|
|
238
|
+
Salla.storage.remove('cookies-consent');
|
|
239
|
+
// Whoever continues on this browser next (guest or a different account) hasn't
|
|
240
|
+
// made a choice yet, so the bar should show again right away.
|
|
241
|
+
this.isVisible = true;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Runs when a guest signs in. There is no backend endpoint to check whether the
|
|
245
|
+
* account already has a saved preference, so if the visitor already made a choice
|
|
246
|
+
* as a guest (guest choices are never sent server-side), attribute that local
|
|
247
|
+
* choice to the account now — this is the only source of truth available.
|
|
248
|
+
*/
|
|
249
|
+
syncConsentAfterLogin() {
|
|
250
|
+
const points = this.currentConsentPoints();
|
|
251
|
+
if (!points)
|
|
252
|
+
return;
|
|
253
|
+
Salla.api.request('account/data-privacy', { points }, 'post').catch(() => { });
|
|
254
|
+
}
|
|
255
|
+
cookieNameMatchesPattern(cookieName, pattern) {
|
|
256
|
+
return pattern.endsWith('*')
|
|
257
|
+
? cookieName.startsWith(pattern.slice(0, -1))
|
|
258
|
+
: cookieName === pattern;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Remove known first-party tracking cookies for any category the customer just
|
|
262
|
+
* declined. Cookies scoped to a third-party domain (e.g. doubleclick.net) can't be
|
|
263
|
+
* reached from here — only cookies the tracking script set on the store's own domain.
|
|
264
|
+
*/
|
|
265
|
+
sweepDisabledCategoryCookies(points) {
|
|
266
|
+
const disabledCategories = Object.keys(this.trackingCookiesByCategory).filter(category => !points.includes(category));
|
|
267
|
+
if (!disabledCategories.length)
|
|
268
|
+
return;
|
|
269
|
+
const patterns = disabledCategories.flatMap(category => this.trackingCookiesByCategory[category]);
|
|
270
|
+
const currentCookieNames = document.cookie
|
|
271
|
+
.split(';')
|
|
272
|
+
.map(cookie => cookie.split('=')[0].trim());
|
|
273
|
+
currentCookieNames
|
|
274
|
+
.filter(cookieName => patterns.some(pattern => this.cookieNameMatchesPattern(cookieName, pattern)))
|
|
275
|
+
.forEach(cookieName => Salla.cookie.remove(cookieName));
|
|
276
|
+
}
|
|
277
|
+
dismiss(eventName) {
|
|
53
278
|
this.isVisible = false;
|
|
54
279
|
//We will call event first because we need to compare between old and new data inside session
|
|
55
|
-
Salla.event.emit(
|
|
56
|
-
Salla.storage.set('cookies-consent',
|
|
280
|
+
Salla.event.emit(`salla-cookies-bar::${eventName}`);
|
|
281
|
+
Salla.storage.set('cookies-consent', eventName);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Persist the customized per-category toggle choices, then dismiss.
|
|
285
|
+
*/
|
|
286
|
+
savePreferences() {
|
|
287
|
+
const points = [this.necessaryCookieKey];
|
|
288
|
+
if (this.performanceEnabled)
|
|
289
|
+
points.push(this.performanceCookieKey);
|
|
290
|
+
if (this.functionsEnabled)
|
|
291
|
+
points.push(this.functionalCookieKey);
|
|
292
|
+
if (this.adsEnabled)
|
|
293
|
+
points.push(this.advertisingCookieKey);
|
|
294
|
+
this.applyConsent(points);
|
|
295
|
+
this.dismiss('accepted');
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Accept cookies consent.
|
|
299
|
+
*/
|
|
300
|
+
async accept() {
|
|
301
|
+
this.applyConsent(this.allCategoryKeys());
|
|
302
|
+
this.dismiss('accepted');
|
|
57
303
|
return this.host;
|
|
58
304
|
}
|
|
59
305
|
/**
|
|
60
306
|
* Reject cookies consent.
|
|
61
307
|
*/
|
|
62
308
|
async reject() {
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
65
|
-
//We will call event first because we need to compare between old and new data inside session
|
|
66
|
-
Salla.event.emit('salla-cookies-bar::rejected');
|
|
67
|
-
Salla.storage.set('cookies-consent', 'rejected');
|
|
309
|
+
this.applyConsent([this.necessaryCookieKey]);
|
|
310
|
+
this.dismiss('rejected');
|
|
68
311
|
return this.host;
|
|
69
312
|
}
|
|
70
313
|
/**
|
|
71
|
-
* Show cookies settings bar to allow updating consent.
|
|
314
|
+
* Show cookies settings bar to allow updating consent. Always opens on the initial
|
|
315
|
+
* consent step, same as first load — the customer picks "customize" to reach the
|
|
316
|
+
* per-category panel.
|
|
72
317
|
*/
|
|
73
318
|
async open() {
|
|
74
|
-
this.
|
|
319
|
+
this.hydrateToggleState();
|
|
320
|
+
this.step = 'consent';
|
|
75
321
|
this.isVisible = true;
|
|
76
322
|
return this.host;
|
|
77
323
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Move from the initial consent step to the per-category customization panel.
|
|
326
|
+
*/
|
|
327
|
+
openPreferences() {
|
|
328
|
+
this.hydrateToggleState();
|
|
329
|
+
this.step = 'preferences';
|
|
81
330
|
}
|
|
82
331
|
isRtl() {
|
|
83
332
|
return Salla.config.get('theme.is_rtl', true);
|
|
84
333
|
}
|
|
85
334
|
appendCookiesSettingsLink(menuComponent) {
|
|
86
335
|
const websiteCookiesEnabled = Salla.config.get('store.features')?.includes('website-cookies');
|
|
87
|
-
if (!websiteCookiesEnabled ||
|
|
336
|
+
if (!websiteCookiesEnabled ||
|
|
337
|
+
!menuComponent?.withCookiePreferences ||
|
|
338
|
+
menuComponent?.source !== 'footer')
|
|
88
339
|
return;
|
|
89
340
|
const settingsHref = '#cookies-settings';
|
|
90
|
-
const hasSettingsLink = menuComponent?.menus.some(
|
|
341
|
+
const hasSettingsLink = menuComponent?.menus.some(m => m?.url === settingsHref);
|
|
91
342
|
if (hasSettingsLink)
|
|
92
343
|
return;
|
|
93
344
|
// IMPORTANT: avoid mutating @State arrays in-place (Stencil reactivity).
|
|
94
345
|
// Always create a new array reference.
|
|
95
|
-
menuComponent.menus = [
|
|
346
|
+
menuComponent.menus = [
|
|
347
|
+
...menuComponent.menus,
|
|
348
|
+
{
|
|
96
349
|
id: 'cookies-settings',
|
|
97
350
|
order: null,
|
|
98
351
|
title: Salla.lang.get('common.cookies.settings'),
|
|
@@ -102,13 +355,37 @@ export class SallaCookiesBar {
|
|
|
102
355
|
children: [],
|
|
103
356
|
image: null,
|
|
104
357
|
callback: () => Salla.event.emit('salla-cookies-bar::open'),
|
|
105
|
-
}
|
|
358
|
+
},
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
renderToggle(checked, disabled, label, onToggle) {
|
|
362
|
+
return (h("label", { class: { 's-toggle': true, 's-toggle--disabled': disabled } }, h("input", { class: "s-toggle-input", type: "checkbox", checked: checked, disabled: disabled, "aria-label": label, onChange: () => onToggle?.() }), h("div", { class: "s-toggle-switcher" })));
|
|
363
|
+
}
|
|
364
|
+
renderCategory(title, description, toggle, badge) {
|
|
365
|
+
return (h("div", { class: "s-cookies-bar-category" }, h("div", { class: "s-cookies-bar-category-content" }, h("div", { class: "s-cookies-bar-category-title-row" }, h("span", { class: "s-cookies-bar-category-title" }, title), badge && h("span", { class: "s-cookies-bar-badge" }, badge)), h("p", { class: "s-cookies-bar-category-description m-0" }, description)), toggle));
|
|
366
|
+
}
|
|
367
|
+
renderMessage() {
|
|
368
|
+
return (h("p", { class: "s-cookies-bar-message m-0" }, this.messageLabel, Salla.config.get('policy_url') && (h("a", { href: Salla.config.get('policy_url'), target: "_blank", class: "s-cookies-bar-link text-primary ms-1" }, ' ', this.linkLabel))));
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Step 1: the initial bar — consent message plus accept/customize actions.
|
|
372
|
+
* Accepting here accepts every category outright; customizing moves on to
|
|
373
|
+
* the per-category panel without deciding anything yet.
|
|
374
|
+
*/
|
|
375
|
+
renderConsentStep() {
|
|
376
|
+
return (h("div", { class: "s-cookies-bar-consent" }, this.renderMessage(), h("div", { class: "s-cookies-bar-consent-actions" }, h("salla-button", { class: "s-cookies-bar-btn--customize", color: "primary", fill: "outline", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.openPreferences() }, this.customizeLabel), h("salla-button", { class: "s-cookies-bar-btn--accept", color: "primary", fill: "solid", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.accept() }, this.acceptAllLabel))));
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Step 2: the per-category customization panel.
|
|
380
|
+
*/
|
|
381
|
+
renderPreferencesStep() {
|
|
382
|
+
return (h("div", null, h("div", { class: "s-cookies-bar-header" }, h("h3", { class: "s-cookies-bar-title m-0" }, this.titleLabel), h("button", { type: "button", class: "s-cookies-bar-close", "aria-label": this.titleLabel, onClick: () => this.reject() }, h("span", { innerHTML: CancelIcon }))), h("div", { class: "s-cookies-bar-categories" }, this.renderCategory(this.essentialTitleLabel, this.essentialDescriptionLabel, this.renderToggle(true, true, this.essentialTitleLabel), this.essentialBadgeLabel), this.renderCategory(this.performanceTitleLabel, this.performanceDescriptionLabel, this.renderToggle(this.performanceEnabled, false, this.performanceTitleLabel, () => (this.performanceEnabled = !this.performanceEnabled))), this.renderCategory(this.functionsTitleLabel, this.functionsDescriptionLabel, this.renderToggle(this.functionsEnabled, false, this.functionsTitleLabel, () => (this.functionsEnabled = !this.functionsEnabled))), this.renderCategory(this.adsTitleLabel, this.adsDescriptionLabel, this.renderToggle(this.adsEnabled, false, this.adsTitleLabel, () => (this.adsEnabled = !this.adsEnabled)))), h("div", { class: "s-cookies-bar-footer" }, this.renderMessage(), h("salla-button", { class: "s-cookies-bar-btn--save", color: "primary", fill: "solid", type: "button", size: this.isMobile ? 'small' : 'medium', onClick: () => this.savePreferences() }, this.saveLabel))));
|
|
106
383
|
}
|
|
107
384
|
render() {
|
|
108
385
|
if (!this.isVisible) {
|
|
109
386
|
return h(Host, null);
|
|
110
387
|
}
|
|
111
|
-
return (h(Host, null, h("div", { dir: this.isRtl() ? 'rtl' : 'ltr', class: "s-cookies-bar
|
|
388
|
+
return (h(Host, null, h("div", { dir: this.isRtl() ? 'rtl' : 'ltr', class: "s-cookies-bar" }, this.step === 'consent' ? this.renderConsentStep() : this.renderPreferencesStep())));
|
|
112
389
|
}
|
|
113
390
|
static get is() { return "salla-cookies-bar"; }
|
|
114
391
|
static get originalStyleUrls() {
|
|
@@ -124,19 +401,34 @@ export class SallaCookiesBar {
|
|
|
124
401
|
static get states() {
|
|
125
402
|
return {
|
|
126
403
|
"isVisible": {},
|
|
404
|
+
"step": {},
|
|
127
405
|
"isMobile": {},
|
|
406
|
+
"titleLabel": {},
|
|
407
|
+
"saveLabel": {},
|
|
128
408
|
"messageLabel": {},
|
|
129
409
|
"linkLabel": {},
|
|
130
410
|
"acceptLabel": {},
|
|
131
|
-
"
|
|
132
|
-
"
|
|
411
|
+
"acceptAllLabel": {},
|
|
412
|
+
"customizeLabel": {},
|
|
413
|
+
"essentialTitleLabel": {},
|
|
414
|
+
"essentialDescriptionLabel": {},
|
|
415
|
+
"essentialBadgeLabel": {},
|
|
416
|
+
"performanceTitleLabel": {},
|
|
417
|
+
"performanceDescriptionLabel": {},
|
|
418
|
+
"performanceEnabled": {},
|
|
419
|
+
"functionsTitleLabel": {},
|
|
420
|
+
"functionsDescriptionLabel": {},
|
|
421
|
+
"functionsEnabled": {},
|
|
422
|
+
"adsTitleLabel": {},
|
|
423
|
+
"adsDescriptionLabel": {},
|
|
424
|
+
"adsEnabled": {}
|
|
133
425
|
};
|
|
134
426
|
}
|
|
135
427
|
static get methods() {
|
|
136
428
|
return {
|
|
137
429
|
"accept": {
|
|
138
430
|
"complexType": {
|
|
139
|
-
"signature": "() => Promise<HTMLElement>",
|
|
431
|
+
"signature": "() => Promise<HTMLElement | undefined>",
|
|
140
432
|
"parameters": [],
|
|
141
433
|
"references": {
|
|
142
434
|
"Promise": {
|
|
@@ -157,7 +449,7 @@ export class SallaCookiesBar {
|
|
|
157
449
|
},
|
|
158
450
|
"reject": {
|
|
159
451
|
"complexType": {
|
|
160
|
-
"signature": "() => Promise<HTMLElement>",
|
|
452
|
+
"signature": "() => Promise<HTMLElement | undefined>",
|
|
161
453
|
"parameters": [],
|
|
162
454
|
"references": {
|
|
163
455
|
"Promise": {
|
|
@@ -178,7 +470,7 @@ export class SallaCookiesBar {
|
|
|
178
470
|
},
|
|
179
471
|
"open": {
|
|
180
472
|
"complexType": {
|
|
181
|
-
"signature": "() => Promise<HTMLElement>",
|
|
473
|
+
"signature": "() => Promise<HTMLElement | undefined>",
|
|
182
474
|
"parameters": [],
|
|
183
475
|
"references": {
|
|
184
476
|
"Promise": {
|
|
@@ -193,7 +485,7 @@ export class SallaCookiesBar {
|
|
|
193
485
|
"return": "Promise<HTMLElement>"
|
|
194
486
|
},
|
|
195
487
|
"docs": {
|
|
196
|
-
"text": "Show cookies settings bar to allow updating consent.",
|
|
488
|
+
"text": "Show cookies settings bar to allow updating consent. Always opens on the initial\nconsent step, same as first load \u2014 the customer picks \"customize\" to reach the\nper-category panel.",
|
|
197
489
|
"tags": []
|
|
198
490
|
}
|
|
199
491
|
}
|