@salla.sa/twilight-components 2.14.506 → 2.14.508

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 (342) hide show
  1. package/dist/cjs/catalog-recommendations-dtK9Dlfw.js +97 -0
  2. package/dist/cjs/{filepond-CQFqhIgb.js → filepond-C1mPvQ8T.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-poster-CTDc0IDu.js → filepond-plugin-file-poster-B-pZ8apM.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-size-DeXqfYrx.js → filepond-plugin-file-validate-size-CsE7s9Zn.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-file-validate-type-DoefblL8.js → filepond-plugin-file-validate-type-pm3Q3QSJ.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-edit-C99AhKIk.js → filepond-plugin-image-edit-DLXp4kE0.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-exif-orientation-BTZtq0LO.js → filepond-plugin-image-exif-orientation-hH92QKy-.js} +1 -1
  8. package/dist/cjs/{filepond-plugin-image-preview-CU543Avx.js → filepond-plugin-image-preview-CVbeEopx.js} +1 -1
  9. package/dist/cjs/{functions-Brh5XeCA.js → functions-CRoHuI_r.js} +1 -1
  10. package/dist/cjs/{index-9k1NC_jh.js → index-Bz-aFSt9.js} +1 -1
  11. package/dist/cjs/{index-Bo4N7lyD.js → index-hhUDuquL.js} +2 -2
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  15. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +2 -2
  16. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-booking-field_7.cjs.entry.js +10 -10
  23. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-comment-form_8.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-count-down_2.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  47. package/dist/cjs/salla-loyalty-banner.cjs.entry.js +2 -2
  48. package/dist/cjs/salla-loyalty-exchange-product-card_5.cjs.entry.js +3 -3
  49. package/dist/cjs/salla-loyalty-hero_2.cjs.entry.js +2 -2
  50. package/dist/cjs/salla-loyalty-panel.cjs.entry.js +3 -3
  51. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-loyalty-program.cjs.entry.js +3 -3
  55. package/dist/cjs/salla-loyalty-reward.cjs.entry.js +2 -2
  56. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  84. package/dist/cjs/salla-product-card_2.cjs.entry.js +1 -1
  85. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  86. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-quick-order.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-rating-modal.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  93. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-social-share.cjs.entry.js +10 -3
  96. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  102. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  104. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  105. package/dist/cjs/salla-wallet.cjs.entry.js +20 -5
  106. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  107. package/dist/cjs/{tracked-promise-D50-kn8O.js → tracked-promise--XbBsK1N.js} +1 -1
  108. package/dist/cjs/twilight.cjs.js +1 -1
  109. package/dist/cjs/{vanilla-picker-Bd-sUQLP.js → vanilla-picker-D_g2rKwM.js} +1 -1
  110. package/dist/collection/components/salla-social-share/salla-social-share.js +9 -2
  111. package/dist/collection/components/salla-wallet/salla-wallet.js +19 -4
  112. package/dist/collection/shared/catalog-recommendations.js +47 -41
  113. package/dist/components/catalog-recommendations.js +47 -41
  114. package/dist/components/index.js +2 -2
  115. package/dist/components/salla-social-share2.js +9 -2
  116. package/dist/components/salla-wallet.js +19 -4
  117. package/dist/esm/catalog-recommendations-CL7OPpYS.js +94 -0
  118. package/dist/esm/{filepond-DJlkJWaI.js → filepond-CA6zTz9c.js} +1 -1
  119. package/dist/esm/{filepond-plugin-file-poster-Cxg1C-ZT.js → filepond-plugin-file-poster-DOWZmTt9.js} +1 -1
  120. package/dist/esm/{filepond-plugin-file-validate-size-D7U4TtzO.js → filepond-plugin-file-validate-size-CW4aTVdl.js} +1 -1
  121. package/dist/esm/{filepond-plugin-file-validate-type-Bc55hyvc.js → filepond-plugin-file-validate-type-DiGUQ5qM.js} +1 -1
  122. package/dist/esm/{filepond-plugin-image-edit-BSZHdCO-.js → filepond-plugin-image-edit-BOu5ykhi.js} +1 -1
  123. package/dist/esm/{filepond-plugin-image-exif-orientation-DEVx9XUq.js → filepond-plugin-image-exif-orientation-C9OxiFhh.js} +1 -1
  124. package/dist/esm/{filepond-plugin-image-preview-B55MpdBs.js → filepond-plugin-image-preview-BCRRj5t-.js} +1 -1
  125. package/dist/esm/{functions-3aFA0yP9.js → functions-Cdhve8oP.js} +1 -1
  126. package/dist/esm/{index-B5uQvRDw.js → index-DMTmdoWu.js} +1 -1
  127. package/dist/esm/{index-DpB3UAAA.js → index-DWPgHXOD.js} +2 -2
  128. package/dist/esm/loader.js +2 -2
  129. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  130. package/dist/esm/salla-accordion_6.entry.js +1 -1
  131. package/dist/esm/salla-add-product-button_5.entry.js +2 -2
  132. package/dist/esm/salla-advertisement.entry.js +1 -1
  133. package/dist/esm/salla-alert_2.entry.js +1 -1
  134. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  135. package/dist/esm/salla-apps-icons.entry.js +1 -1
  136. package/dist/esm/salla-badge.entry.js +1 -1
  137. package/dist/esm/salla-basket-gap.entry.js +2 -2
  138. package/dist/esm/salla-booking-field_7.entry.js +10 -10
  139. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  140. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  141. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  142. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  143. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  144. package/dist/esm/salla-comment-factors.entry.js +1 -1
  145. package/dist/esm/salla-comment-form_8.entry.js +1 -1
  146. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  147. package/dist/esm/salla-contacts.entry.js +1 -1
  148. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  149. package/dist/esm/salla-count-down_2.entry.js +1 -1
  150. package/dist/esm/salla-custom-fields.entry.js +1 -1
  151. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  152. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  153. package/dist/esm/salla-filters-widget.entry.js +1 -1
  154. package/dist/esm/salla-filters.entry.js +1 -1
  155. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  156. package/dist/esm/salla-gifting.entry.js +1 -1
  157. package/dist/esm/salla-hook.entry.js +1 -1
  158. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  159. package/dist/esm/salla-installment.entry.js +1 -1
  160. package/dist/esm/salla-list-tile.entry.js +1 -1
  161. package/dist/esm/salla-localization-modal.entry.js +1 -1
  162. package/dist/esm/salla-login-modal.entry.js +1 -1
  163. package/dist/esm/salla-loyalty-banner.entry.js +2 -2
  164. package/dist/esm/salla-loyalty-exchange-product-card_5.entry.js +3 -3
  165. package/dist/esm/salla-loyalty-hero_2.entry.js +2 -2
  166. package/dist/esm/salla-loyalty-panel.entry.js +3 -3
  167. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  168. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-program.entry.js +3 -3
  171. package/dist/esm/salla-loyalty-reward.entry.js +2 -2
  172. package/dist/esm/salla-loyalty.entry.js +1 -1
  173. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  174. package/dist/esm/salla-map_2.entry.js +1 -1
  175. package/dist/esm/salla-menu.entry.js +1 -1
  176. package/dist/esm/salla-metadata.entry.js +1 -1
  177. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  178. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  179. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  180. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  181. package/dist/esm/salla-notification-item.entry.js +1 -1
  182. package/dist/esm/salla-notifications.entry.js +1 -1
  183. package/dist/esm/salla-offer-modal.entry.js +1 -1
  184. package/dist/esm/salla-offer.entry.js +1 -1
  185. package/dist/esm/salla-order-branch.entry.js +1 -1
  186. package/dist/esm/salla-order-cancel.entry.js +1 -1
  187. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  188. package/dist/esm/salla-order-details-options.entry.js +1 -1
  189. package/dist/esm/salla-order-details.entry.js +1 -1
  190. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  191. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  192. package/dist/esm/salla-order-edit.entry.js +1 -1
  193. package/dist/esm/salla-order-summary.entry.js +1 -1
  194. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  195. package/dist/esm/salla-orders.entry.js +1 -1
  196. package/dist/esm/salla-payments.entry.js +1 -1
  197. package/dist/esm/salla-placeholder.entry.js +1 -1
  198. package/dist/esm/salla-price-range.entry.js +1 -1
  199. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  200. package/dist/esm/salla-product-card_2.entry.js +1 -1
  201. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  202. package/dist/esm/salla-products-list.entry.js +1 -1
  203. package/dist/esm/salla-quick-order.entry.js +1 -1
  204. package/dist/esm/salla-rating-modal-v2.entry.js +1 -1
  205. package/dist/esm/salla-rating-modal.entry.js +1 -1
  206. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  207. package/dist/esm/salla-scopes.entry.js +1 -1
  208. package/dist/esm/salla-search.entry.js +1 -1
  209. package/dist/esm/salla-skeleton.entry.js +1 -1
  210. package/dist/esm/salla-slider.entry.js +1 -1
  211. package/dist/esm/salla-social-share.entry.js +10 -3
  212. package/dist/esm/salla-social.entry.js +1 -1
  213. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  214. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  215. package/dist/esm/salla-tooltip.entry.js +1 -1
  216. package/dist/esm/salla-trust-badges.entry.js +1 -1
  217. package/dist/esm/salla-user-menu.entry.js +1 -1
  218. package/dist/esm/salla-user-profile.entry.js +1 -1
  219. package/dist/esm/salla-user-settings.entry.js +1 -1
  220. package/dist/esm/salla-verify.entry.js +1 -1
  221. package/dist/esm/salla-wallet.entry.js +20 -5
  222. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  223. package/dist/esm/{tracked-promise-DIZYgNBp.js → tracked-promise-BCGZPTbE.js} +1 -1
  224. package/dist/esm/twilight.js +2 -2
  225. package/dist/esm/{vanilla-picker-DxRdT8WJ.js → vanilla-picker-DFTSHsGD.js} +1 -1
  226. package/dist/twilight/{p-250d3b32.entry.js → p-01a74537.entry.js} +1 -1
  227. package/dist/twilight/{p-b37d2e41.entry.js → p-04a34073.entry.js} +1 -1
  228. package/dist/twilight/{p-a75fab7d.entry.js → p-08c1f879.entry.js} +1 -1
  229. package/dist/twilight/{p-eb8ccf1d.entry.js → p-0b72c43b.entry.js} +1 -1
  230. package/dist/twilight/{p-31396c77.entry.js → p-0fd7d436.entry.js} +1 -1
  231. package/dist/twilight/{p-0e5abc9e.entry.js → p-123a3a37.entry.js} +1 -1
  232. package/dist/twilight/{p-7271d781.entry.js → p-12d9c95b.entry.js} +1 -1
  233. package/dist/twilight/{p-4ec9995f.entry.js → p-17c02185.entry.js} +1 -1
  234. package/dist/twilight/{p-d493d768.entry.js → p-196e416c.entry.js} +1 -1
  235. package/dist/twilight/{p-dae97b2d.entry.js → p-1b858716.entry.js} +1 -1
  236. package/dist/twilight/{p-e76c8fa2.entry.js → p-1d21e83d.entry.js} +1 -1
  237. package/dist/twilight/{p-0c23685b.entry.js → p-20c2aebb.entry.js} +1 -1
  238. package/dist/twilight/{p-d0849886.entry.js → p-2442ae2d.entry.js} +1 -1
  239. package/dist/twilight/{p-d7a160a7.entry.js → p-26cc4a6c.entry.js} +1 -1
  240. package/dist/twilight/{p-7f699be4.entry.js → p-2718fe0c.entry.js} +1 -1
  241. package/dist/twilight/{p-3cfb3db1.entry.js → p-27ccf3c2.entry.js} +1 -1
  242. package/dist/twilight/{p-4dc6b621.entry.js → p-29bad38b.entry.js} +1 -1
  243. package/dist/twilight/{p-612ba607.entry.js → p-2a2585f6.entry.js} +1 -1
  244. package/dist/twilight/{p-5aefa966.entry.js → p-2f131202.entry.js} +1 -1
  245. package/dist/twilight/{p-7d5a3995.entry.js → p-3039ea2d.entry.js} +1 -1
  246. package/dist/twilight/p-33314f4c.entry.js +4 -0
  247. package/dist/twilight/{p-591b2f9d.entry.js → p-34396806.entry.js} +1 -1
  248. package/dist/twilight/{p-b7c129de.entry.js → p-38656e34.entry.js} +1 -1
  249. package/dist/twilight/{p-f870575b.entry.js → p-39249883.entry.js} +1 -1
  250. package/dist/twilight/{p-aca94595.entry.js → p-3cab158c.entry.js} +1 -1
  251. package/dist/twilight/{p-ed9919cd.entry.js → p-3d7a7be6.entry.js} +1 -1
  252. package/dist/twilight/{p-afc29ef5.entry.js → p-3d973988.entry.js} +1 -1
  253. package/dist/twilight/{p-d004e1bb.entry.js → p-3e4915d1.entry.js} +1 -1
  254. package/dist/twilight/{p-DVsQiYvE.js → p-3fOwWicU.js} +1 -1
  255. package/dist/twilight/{p-224d0232.entry.js → p-409967bd.entry.js} +1 -1
  256. package/dist/twilight/{p-d22cfff8.entry.js → p-4810a1b1.entry.js} +1 -1
  257. package/dist/twilight/{p-47314e12.entry.js → p-48f7b6db.entry.js} +1 -1
  258. package/dist/twilight/{p-34166195.entry.js → p-4dde6f7b.entry.js} +1 -1
  259. package/dist/twilight/{p-9f90b7d2.entry.js → p-51e42995.entry.js} +1 -1
  260. package/dist/twilight/{p-98e25f3a.entry.js → p-5261d916.entry.js} +1 -1
  261. package/dist/twilight/{p-86f0ba20.entry.js → p-541f7f57.entry.js} +1 -1
  262. package/dist/twilight/{p-416f536b.entry.js → p-5bce4517.entry.js} +1 -1
  263. package/dist/twilight/{p-52086d78.entry.js → p-5cbea591.entry.js} +1 -1
  264. package/dist/twilight/{p-bedece0c.entry.js → p-66d7dc4b.entry.js} +1 -1
  265. package/dist/twilight/{p-ec9a05e6.entry.js → p-6a8c68d3.entry.js} +1 -1
  266. package/dist/twilight/{p-4a041952.entry.js → p-6d284b59.entry.js} +1 -1
  267. package/dist/twilight/{p-568dcceb.entry.js → p-6dc098ce.entry.js} +1 -1
  268. package/dist/twilight/{p-4ee5d25f.entry.js → p-6feca279.entry.js} +1 -1
  269. package/dist/twilight/{p-94fb9d40.entry.js → p-70adb6de.entry.js} +1 -1
  270. package/dist/twilight/{p-6e21cd17.entry.js → p-72aaf959.entry.js} +1 -1
  271. package/dist/twilight/{p-f879b71d.entry.js → p-72b9eac4.entry.js} +1 -1
  272. package/dist/twilight/{p-c6a4bb6b.entry.js → p-72e4cb1c.entry.js} +1 -1
  273. package/dist/twilight/{p-ea84a210.entry.js → p-74a27cf4.entry.js} +1 -1
  274. package/dist/twilight/{p-64bf5054.entry.js → p-793f5e44.entry.js} +1 -1
  275. package/dist/twilight/{p-c8f1b2b7.entry.js → p-7b2aed14.entry.js} +1 -1
  276. package/dist/twilight/{p-f00c30a1.entry.js → p-80207cbe.entry.js} +1 -1
  277. package/dist/twilight/{p-f5905f20.entry.js → p-80d9f3f2.entry.js} +1 -1
  278. package/dist/twilight/{p-f7177061.entry.js → p-82d622c6.entry.js} +1 -1
  279. package/dist/twilight/{p-246f44ed.entry.js → p-8308bef2.entry.js} +1 -1
  280. package/dist/twilight/{p-16ce4fef.entry.js → p-851d8872.entry.js} +1 -1
  281. package/dist/twilight/{p-f8f07022.entry.js → p-86f7baf1.entry.js} +1 -1
  282. package/dist/twilight/{p-74c99ff0.entry.js → p-88015898.entry.js} +1 -1
  283. package/dist/twilight/{p-f13e8759.entry.js → p-8b646ef9.entry.js} +1 -1
  284. package/dist/twilight/{p-e55c0663.entry.js → p-8e5d089a.entry.js} +1 -1
  285. package/dist/twilight/{p-c61cf7ef.entry.js → p-8e9b1b2b.entry.js} +1 -1
  286. package/dist/twilight/{p-b3dfff70.entry.js → p-8f5159fa.entry.js} +1 -1
  287. package/dist/twilight/{p-3541ed02.entry.js → p-911d2800.entry.js} +1 -1
  288. package/dist/twilight/{p-5e2920de.entry.js → p-9d021d6e.entry.js} +1 -1
  289. package/dist/twilight/{p-6c4504dc.entry.js → p-9fb43cf0.entry.js} +1 -1
  290. package/dist/twilight/{p-CSZ-P877.js → p-B2IpqWj1.js} +1 -1
  291. package/dist/twilight/{p-0sBrxdoA.js → p-BPbju0nD.js} +1 -1
  292. package/dist/twilight/{p-B7nGGDcs.js → p-BcTcBNfQ.js} +1 -1
  293. package/dist/twilight/p-CL7OPpYS.js +4 -0
  294. package/dist/twilight/{p-DshtSdt6.js → p-CPEhvySG.js} +1 -1
  295. package/dist/twilight/{p-INkBE6fU.js → p-CtvAJfAB.js} +1 -1
  296. package/dist/twilight/{p-DpB3UAAA.js → p-DWPgHXOD.js} +1 -1
  297. package/dist/twilight/{p-Cv5nxveF.js → p-Dd1m1dz2.js} +1 -1
  298. package/dist/twilight/{p-Di2RDF2Q.js → p-DuCwWaQ_.js} +1 -1
  299. package/dist/twilight/{p-CUT8CVCo.js → p-XUX4U548.js} +1 -1
  300. package/dist/twilight/{p-8961c821.entry.js → p-a138bee9.entry.js} +1 -1
  301. package/dist/twilight/{p-5ef6af67.entry.js → p-a8ddd1bb.entry.js} +1 -1
  302. package/dist/twilight/{p-89a74a55.entry.js → p-a9a85cfe.entry.js} +1 -1
  303. package/dist/twilight/{p-0b7cba6e.entry.js → p-ac7bd839.entry.js} +1 -1
  304. package/dist/twilight/{p-01061d2b.entry.js → p-ae695102.entry.js} +1 -1
  305. package/dist/twilight/{p-7776af70.entry.js → p-af7962e9.entry.js} +1 -1
  306. package/dist/twilight/{p-fcba9566.entry.js → p-b094fd03.entry.js} +1 -1
  307. package/dist/twilight/{p-68b0e437.entry.js → p-b6fd1b52.entry.js} +1 -1
  308. package/dist/twilight/{p-qtv65mC4.js → p-b7vjgdh1.js} +1 -1
  309. package/dist/twilight/p-bb05f144.entry.js +4 -0
  310. package/dist/twilight/{p-127fd5c4.entry.js → p-c069565d.entry.js} +1 -1
  311. package/dist/twilight/{p-0de7fca3.entry.js → p-c1b27d26.entry.js} +1 -1
  312. package/dist/twilight/{p-0916141f.entry.js → p-c8a60c05.entry.js} +1 -1
  313. package/dist/twilight/{p-3fddbb1a.entry.js → p-caa2055b.entry.js} +1 -1
  314. package/dist/twilight/{p-daeeea6d.entry.js → p-cadedd90.entry.js} +1 -1
  315. package/dist/twilight/{p-322c22ec.entry.js → p-ccb12c91.entry.js} +1 -1
  316. package/dist/twilight/{p-dd4f363e.entry.js → p-d140a35a.entry.js} +1 -1
  317. package/dist/twilight/{p-304c100d.entry.js → p-d263e364.entry.js} +1 -1
  318. package/dist/twilight/{p-75b51510.entry.js → p-de78fa6c.entry.js} +1 -1
  319. package/dist/twilight/{p-16d19553.entry.js → p-df2ac369.entry.js} +1 -1
  320. package/dist/twilight/{p-c10ff742.entry.js → p-e82fb471.entry.js} +1 -1
  321. package/dist/twilight/{p-d6d1f072.entry.js → p-ea20010a.entry.js} +1 -1
  322. package/dist/twilight/{p-25535800.entry.js → p-eb3706da.entry.js} +1 -1
  323. package/dist/twilight/{p-a82e0f9b.entry.js → p-ec75d885.entry.js} +1 -1
  324. package/dist/twilight/{p-ba11a528.entry.js → p-ee2fea82.entry.js} +1 -1
  325. package/dist/twilight/{p-7d197b66.entry.js → p-ee54773e.entry.js} +1 -1
  326. package/dist/twilight/{p-e1be7398.entry.js → p-f35812bf.entry.js} +1 -1
  327. package/dist/twilight/{p-ba7f4e42.entry.js → p-f5327d06.entry.js} +1 -1
  328. package/dist/twilight/{p-5db94199.entry.js → p-f5d273a4.entry.js} +1 -1
  329. package/dist/twilight/{p-c3db8509.entry.js → p-f83489a2.entry.js} +1 -1
  330. package/dist/twilight/{p-b8ecee79.entry.js → p-f98dd619.entry.js} +1 -1
  331. package/dist/twilight/{p-7c347d49.entry.js → p-f99acb35.entry.js} +1 -1
  332. package/dist/twilight/{p-tEBqC22E.js → p-zvJtEDoB.js} +1 -1
  333. package/dist/twilight/twilight.esm.js +1 -1
  334. package/dist/types/components/salla-social-share/salla-social-share.d.ts +1 -0
  335. package/dist/types/components/salla-wallet/salla-wallet.d.ts +1 -0
  336. package/dist/types/shared/catalog-recommendations.d.ts +12 -0
  337. package/package.json +5 -5
  338. package/dist/cjs/catalog-recommendations-B_DRy6NT.js +0 -91
  339. package/dist/esm/catalog-recommendations-CehbSKTM.js +0 -88
  340. package/dist/twilight/p-0a9a252a.entry.js +0 -4
  341. package/dist/twilight/p-CehbSKTM.js +0 -4
  342. package/dist/twilight/p-b394d2ff.entry.js +0 -4
@@ -4,6 +4,7 @@
4
4
  import { Host, h } from "@stencil/core";
5
5
  export class SallaWalletTable {
6
6
  constructor() {
7
+ this.transactionsArray = [];
7
8
  this.isLoading = false;
8
9
  this.nextPageUrl = '';
9
10
  this.handleClick = () => {
@@ -13,13 +14,26 @@ export class SallaWalletTable {
13
14
  componentWillLoad() {
14
15
  return salla.onReady().then(() => this.loadTransactions());
15
16
  }
17
+ // transactions is a plain array (web) or a Laravel paginator object (mobile/webview)
18
+ normalizeTransactions(transactions) {
19
+ if (Array.isArray(transactions)) {
20
+ return { list: transactions, nextPageUrl: '' };
21
+ }
22
+ const currentPage = transactions?.current_page ?? 1;
23
+ const lastPage = transactions?.last_page ?? currentPage;
24
+ const perPage = transactions?.per_page ?? 10;
25
+ // build a relative next-page path; the backend's absolute next_page_url points to salla.sa and fails in the webview
26
+ const nextPageUrl = currentPage < lastPage ? `/balance/wallet?per_page=${perPage}&page=${currentPage + 1}` : '';
27
+ return { list: transactions?.data ?? [], nextPageUrl };
28
+ }
16
29
  async loadTransactions() {
17
30
  this.isLoading = true;
18
31
  try {
19
32
  let url = `/balance/wallet?per_page=10&page=1`;
20
33
  let resp = await salla.api.request(url);
21
- this.nextPageUrl = resp.data.transactions.next_page_url;
22
- this.transactionsArray = resp.data.transactions;
34
+ const { list, nextPageUrl } = this.normalizeTransactions(resp.data.transactions);
35
+ this.nextPageUrl = nextPageUrl;
36
+ this.transactionsArray = list;
23
37
  this.balance = resp.data.balance;
24
38
  }
25
39
  catch (error) {
@@ -34,8 +48,9 @@ export class SallaWalletTable {
34
48
  try {
35
49
  let url = this.nextPageUrl || '/balance/wallet?page=2&per_page=10';
36
50
  let resp = await salla.api.request(url);
37
- this.nextPageUrl = resp.data.transactions.next_page_url;
38
- this.transactionsArray.push(...resp.data.transactions.data);
51
+ const { list, nextPageUrl } = this.normalizeTransactions(resp.data.transactions);
52
+ this.nextPageUrl = nextPageUrl;
53
+ this.transactionsArray = [...this.transactionsArray, ...list];
39
54
  this.balance = resp.data.balance;
40
55
  }
41
56
  catch (error) {
@@ -13,62 +13,67 @@ function getRecommendationsBaseUrl() {
13
13
  function getRecommendationsUrl(path) {
14
14
  return `${getRecommendationsBaseUrl()}${RECOMMENDATIONS_BASE_PATH}${path}`;
15
15
  }
16
- function parseHostname(value) {
17
- if (!value) {
18
- return null;
19
- }
20
- try {
21
- const normalized = value.startsWith('http') ? value : `https://${value}`;
22
- return new URL(normalized).hostname || null;
23
- }
24
- catch {
25
- const hostname = String(value).replace(/^https?:\/\//i, '').split('/')[0];
26
- return hostname || null;
27
- }
28
- }
29
- function getStoreOriginHostname() {
30
- const trackUrl = salla.config.get('jitsu.track_url');
31
- const trackHostname = trackUrl ? parseHostname(String(trackUrl)) : null;
32
- if (trackHostname) {
33
- return trackHostname;
34
- }
35
- for (const candidate of [salla.config.get('store.domain'), salla.config.get('store.url')]) {
36
- const hostname = candidate ? parseHostname(String(candidate)) : null;
37
- if (hostname && !hostname.includes('beta.salla.group')) {
38
- return hostname;
39
- }
40
- }
41
- return window.location.hostname;
42
- }
43
- function getRecommendationsRequestConfig(params) {
16
+ /**
17
+ * Minimal, CORS-allow-listed header set for the recommendations host.
18
+ *
19
+ * We deliberately do NOT go through `salla.api` here: axios injects default
20
+ * common headers (Authorization, UTM params, s-affiliate-code, allocation, …)
21
+ * that are not in the recommendations CORS allow-list and fail the preflight.
22
+ * Sending an explicit set via `fetch` avoids that whole class of failures.
23
+ * Store resolution uses the browser-set `Origin` header plus `s-store-id`.
24
+ *
25
+ * @internal exported for unit tests
26
+ */
27
+ export function getRecommendationsHeaders() {
44
28
  const headers = {
45
29
  's-store-id': String(salla.config.get('store.id')),
46
- origin: getStoreOriginHostname(),
47
30
  's-source': 'store',
48
31
  lang: salla.lang.getLocale(),
49
32
  };
50
- const scopeId = salla.api.getHeader('s-scope-id');
33
+ // Only `s-scope-id` is on the recommendations CORS allow-list — `s-scope-type`
34
+ // is NOT, and requesting it makes the browser reject the preflight.
35
+ const scopeId = salla.api.getHeader?.('s-scope-id');
51
36
  if (scopeId) {
52
37
  headers['s-scope-id'] = String(scopeId);
53
38
  }
54
- return { params, headers };
39
+ return headers;
55
40
  }
56
41
  function extractRecommendationIds(response) {
57
42
  return (response?.data ?? [])
58
43
  .map(item => item?.id)
59
44
  .filter((id) => Boolean(id));
60
45
  }
46
+ /** Salla product ids are always numeric; reject anything else before it reaches the URL. */
47
+ function toNumericId(value) {
48
+ const id = String(value);
49
+ return /^\d+$/.test(id) ? id : null;
50
+ }
61
51
  function fetchRecommendations(path, params) {
62
- const url = getRecommendationsUrl(path);
63
- const config = getRecommendationsRequestConfig(params);
64
- // Recommendations are a non-critical, best-effort feature; suppress the global
65
- // API error notifier so transient failures stay invisible and the consuming
66
- // component can silently hide its section via its own .catch().
67
- return salla.api.withoutNotifier(() => salla.api.request(url, config, 'get'))
68
- .then((response) => extractRecommendationIds(response));
52
+ const url = new URL(getRecommendationsUrl(path));
53
+ Object.entries(params).forEach(([key, value]) => url.searchParams.set(key, value));
54
+ // Native fetch (not salla.api) so only the explicit allow-listed headers are
55
+ // sent no axios default headers to trip the recommendations CORS preflight.
56
+ // Best-effort feature: callers hide their section via .catch(), so no notifier.
57
+ // The host is the hardcoded constant CATALOG_RECOMMENDATIONS_API and only
58
+ // validated numeric ids reach the query string, so there is no SSRF surface.
59
+ // nosemgrep
60
+ return fetch(url.toString(), {
61
+ method: 'GET',
62
+ headers: getRecommendationsHeaders(),
63
+ })
64
+ .then((response) => {
65
+ if (!response.ok) {
66
+ throw new Error(`Recommendations request failed: ${response.status}`);
67
+ }
68
+ return response.json();
69
+ })
70
+ .then((payload) => extractRecommendationIds(payload));
69
71
  }
70
72
  export function fetchCartBoughtTogether(productIds) {
71
- const ids = productIds.slice(0, CART_BOUGHT_TOGETHER_MAX_PRODUCT_IDS);
73
+ const ids = productIds
74
+ .map(toNumericId)
75
+ .filter((id) => id !== null)
76
+ .slice(0, CART_BOUGHT_TOGETHER_MAX_PRODUCT_IDS);
72
77
  if (!ids.length) {
73
78
  return Promise.resolve([]);
74
79
  }
@@ -77,10 +82,11 @@ export function fetchCartBoughtTogether(productIds) {
77
82
  });
78
83
  }
79
84
  export function fetchProductCustomersAlsoBought(productId) {
80
- if (!productId) {
85
+ const id = toNumericId(productId);
86
+ if (!id) {
81
87
  return Promise.resolve([]);
82
88
  }
83
89
  return fetchRecommendations('/products/customers-also-bought', {
84
- product_id: productId,
90
+ product_id: id,
85
91
  });
86
92
  }
@@ -13,62 +13,67 @@ function getRecommendationsBaseUrl() {
13
13
  function getRecommendationsUrl(path) {
14
14
  return `${getRecommendationsBaseUrl()}${RECOMMENDATIONS_BASE_PATH}${path}`;
15
15
  }
16
- function parseHostname(value) {
17
- if (!value) {
18
- return null;
19
- }
20
- try {
21
- const normalized = value.startsWith('http') ? value : `https://${value}`;
22
- return new URL(normalized).hostname || null;
23
- }
24
- catch {
25
- const hostname = String(value).replace(/^https?:\/\//i, '').split('/')[0];
26
- return hostname || null;
27
- }
28
- }
29
- function getStoreOriginHostname() {
30
- const trackUrl = salla.config.get('jitsu.track_url');
31
- const trackHostname = trackUrl ? parseHostname(String(trackUrl)) : null;
32
- if (trackHostname) {
33
- return trackHostname;
34
- }
35
- for (const candidate of [salla.config.get('store.domain'), salla.config.get('store.url')]) {
36
- const hostname = candidate ? parseHostname(String(candidate)) : null;
37
- if (hostname && !hostname.includes('beta.salla.group')) {
38
- return hostname;
39
- }
40
- }
41
- return window.location.hostname;
42
- }
43
- function getRecommendationsRequestConfig(params) {
16
+ /**
17
+ * Minimal, CORS-allow-listed header set for the recommendations host.
18
+ *
19
+ * We deliberately do NOT go through `salla.api` here: axios injects default
20
+ * common headers (Authorization, UTM params, s-affiliate-code, allocation, …)
21
+ * that are not in the recommendations CORS allow-list and fail the preflight.
22
+ * Sending an explicit set via `fetch` avoids that whole class of failures.
23
+ * Store resolution uses the browser-set `Origin` header plus `s-store-id`.
24
+ *
25
+ * @internal exported for unit tests
26
+ */
27
+ function getRecommendationsHeaders() {
44
28
  const headers = {
45
29
  's-store-id': String(salla.config.get('store.id')),
46
- origin: getStoreOriginHostname(),
47
30
  's-source': 'store',
48
31
  lang: salla.lang.getLocale(),
49
32
  };
50
- const scopeId = salla.api.getHeader('s-scope-id');
33
+ // Only `s-scope-id` is on the recommendations CORS allow-list — `s-scope-type`
34
+ // is NOT, and requesting it makes the browser reject the preflight.
35
+ const scopeId = salla.api.getHeader?.('s-scope-id');
51
36
  if (scopeId) {
52
37
  headers['s-scope-id'] = String(scopeId);
53
38
  }
54
- return { params, headers };
39
+ return headers;
55
40
  }
56
41
  function extractRecommendationIds(response) {
57
42
  return (response?.data ?? [])
58
43
  .map(item => item?.id)
59
44
  .filter((id) => Boolean(id));
60
45
  }
46
+ /** Salla product ids are always numeric; reject anything else before it reaches the URL. */
47
+ function toNumericId(value) {
48
+ const id = String(value);
49
+ return /^\d+$/.test(id) ? id : null;
50
+ }
61
51
  function fetchRecommendations(path, params) {
62
- const url = getRecommendationsUrl(path);
63
- const config = getRecommendationsRequestConfig(params);
64
- // Recommendations are a non-critical, best-effort feature; suppress the global
65
- // API error notifier so transient failures stay invisible and the consuming
66
- // component can silently hide its section via its own .catch().
67
- return salla.api.withoutNotifier(() => salla.api.request(url, config, 'get'))
68
- .then((response) => extractRecommendationIds(response));
52
+ const url = new URL(getRecommendationsUrl(path));
53
+ Object.entries(params).forEach(([key, value]) => url.searchParams.set(key, value));
54
+ // Native fetch (not salla.api) so only the explicit allow-listed headers are
55
+ // sent no axios default headers to trip the recommendations CORS preflight.
56
+ // Best-effort feature: callers hide their section via .catch(), so no notifier.
57
+ // The host is the hardcoded constant CATALOG_RECOMMENDATIONS_API and only
58
+ // validated numeric ids reach the query string, so there is no SSRF surface.
59
+ // nosemgrep
60
+ return fetch(url.toString(), {
61
+ method: 'GET',
62
+ headers: getRecommendationsHeaders(),
63
+ })
64
+ .then((response) => {
65
+ if (!response.ok) {
66
+ throw new Error(`Recommendations request failed: ${response.status}`);
67
+ }
68
+ return response.json();
69
+ })
70
+ .then((payload) => extractRecommendationIds(payload));
69
71
  }
70
72
  function fetchCartBoughtTogether(productIds) {
71
- const ids = productIds.slice(0, CART_BOUGHT_TOGETHER_MAX_PRODUCT_IDS);
73
+ const ids = productIds
74
+ .map(toNumericId)
75
+ .filter((id) => id !== null)
76
+ .slice(0, CART_BOUGHT_TOGETHER_MAX_PRODUCT_IDS);
72
77
  if (!ids.length) {
73
78
  return Promise.resolve([]);
74
79
  }
@@ -77,11 +82,12 @@ function fetchCartBoughtTogether(productIds) {
77
82
  });
78
83
  }
79
84
  function fetchProductCustomersAlsoBought(productId) {
80
- if (!productId) {
85
+ const id = toNumericId(productId);
86
+ if (!id) {
81
87
  return Promise.resolve([]);
82
88
  }
83
89
  return fetchRecommendations('/products/customers-also-bought', {
84
- product_id: productId,
90
+ product_id: id,
85
91
  });
86
92
  }
87
93