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