@salla.sa/twilight-components 2.14.541 → 2.14.543

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 (343) hide show
  1. package/dist/cjs/{filepond-plugin-file-poster-Di_D3w89.js → filepond-plugin-file-poster-Dy-GRHf0.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-validate-size-BiRa98qd.js → filepond-plugin-file-validate-size-BWIBGLW-.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-type-Bolv-kyJ.js → filepond-plugin-file-validate-type-DEVtMF0l.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-image-edit-AN6huMV9.js → filepond-plugin-image-edit-DSDoJaLw.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-exif-orientation-Bwa8QtGo.js → filepond-plugin-image-exif-orientation-BdZit5hj.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-preview-CaVYLAvG.js → filepond-plugin-image-preview-Z3_zQyYR.js} +1 -1
  7. package/dist/cjs/{filepond-CNdvfaMJ.js → filepond-uhJt4caG.js} +1 -1
  8. package/dist/cjs/{index-DX2EKTCE.js → index-Bw3b6O6G.js} +14 -14
  9. package/dist/cjs/{intlTelInput-DnwdGAiP.js → intlTelInput-CXe3TkdL.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{mail-C9D8MHae.js → mail-CO8cFZH7.js} +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +8 -2
  15. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-alert_2.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-attachment-view_9.cjs.entry.js +10 -10
  20. package/dist/cjs/salla-badge.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-basket-gap.cjs.entry.js +1 -1
  22. package/dist/cjs/salla-bullet-delivery_2.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-cart-coupons.cjs.entry.js +1 -1
  24. package/dist/cjs/salla-cart-item-offers_2.cjs.entry.js +1 -1
  25. package/dist/cjs/salla-cart-summary-card.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-cashback-banner.cjs.entry.js +1 -1
  27. package/dist/cjs/salla-comment-factors.cjs.entry.js +1 -1
  28. package/dist/cjs/{salla-comment-form_8.cjs.entry.js → salla-comment-form_9.cjs.entry.js} +259 -3
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +3 -3
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +1 -1
  32. package/dist/cjs/salla-count-down.cjs.entry.js +1 -1
  33. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-delivery-promise.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-edit-order-button.cjs.entry.js +1 -1
  36. package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
  37. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  38. package/dist/cjs/salla-fulfillment-methods.cjs.entry.js +1 -1
  39. package/dist/cjs/salla-gifting.cjs.entry.js +1 -1
  40. package/dist/cjs/salla-hook.cjs.entry.js +1 -1
  41. package/dist/cjs/salla-infinite-scroll.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  43. package/dist/cjs/salla-list-tile.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-localization-modal.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-login-modal.cjs.entry.js +1 -1
  46. package/dist/cjs/salla-loyalty-banner_10.cjs.entry.js +3 -3
  47. package/dist/cjs/salla-loyalty-exchange-product-card.cjs.entry.js +1 -1
  48. package/dist/cjs/salla-loyalty-points-banner.cjs.entry.js +1 -1
  49. package/dist/cjs/salla-loyalty-points-history.cjs.entry.js +1 -1
  50. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
  51. package/dist/cjs/salla-loyalty.cjs.entry.js +1 -1
  52. package/dist/cjs/salla-maintenance-alert.cjs.entry.js +1 -1
  53. package/dist/cjs/salla-map_2.cjs.entry.js +1 -1
  54. package/dist/cjs/salla-menu.cjs.entry.js +1 -1
  55. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  56. package/dist/cjs/salla-multiple-bundle-product-cart_2.cjs.entry.js +1 -1
  57. package/dist/cjs/salla-multiple-bundle-product-options-modal_2.cjs.entry.js +1 -1
  58. package/dist/cjs/salla-multiple-bundle-product.cjs.entry.js +1 -1
  59. package/dist/cjs/salla-next-order-coupon.cjs.entry.js +1 -1
  60. package/dist/cjs/salla-notification-item_2.cjs.entry.js +1 -1
  61. package/dist/cjs/salla-offer-modal.cjs.entry.js +1 -1
  62. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  63. package/dist/cjs/salla-order-branch.cjs.entry.js +1 -1
  64. package/dist/cjs/salla-order-cancel.cjs.entry.js +1 -1
  65. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
  66. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  67. package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
  68. package/dist/cjs/salla-order-edit-item.cjs.entry.js +1 -1
  69. package/dist/cjs/salla-order-edit-product-card.cjs.entry.js +1 -1
  70. package/dist/cjs/salla-order-edit.cjs.entry.js +1 -1
  71. package/dist/cjs/salla-order-options-modal_2.cjs.entry.js +1 -1
  72. package/dist/cjs/salla-order-shipments.cjs.entry.js +1 -1
  73. package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
  74. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  75. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  76. package/dist/cjs/salla-payments.cjs.entry.js +1 -1
  77. package/dist/cjs/salla-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
  79. package/dist/cjs/salla-product-card-embed.cjs.entry.js +1 -1
  80. package/dist/cjs/salla-product-size-guide.cjs.entry.js +1 -1
  81. package/dist/cjs/salla-products-list.cjs.entry.js +1 -1
  82. package/dist/cjs/salla-products-slider.cjs.entry.js +1 -1
  83. package/dist/cjs/salla-quick-order.cjs.entry.js +3 -3
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +73 -14
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +22 -7
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +1 -1
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +1 -1
  88. package/dist/cjs/salla-scopes.cjs.entry.js +1 -1
  89. package/dist/cjs/salla-search.cjs.entry.js +1 -1
  90. package/dist/cjs/salla-skeleton.cjs.entry.js +1 -1
  91. package/dist/cjs/salla-slider.cjs.entry.js +1 -1
  92. package/dist/cjs/salla-social-share.cjs.entry.js +4 -4
  93. package/dist/cjs/salla-social.cjs.entry.js +1 -1
  94. package/dist/cjs/salla-tab-content_3.cjs.entry.js +1 -1
  95. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  96. package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
  97. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  98. package/dist/cjs/salla-user-menu.cjs.entry.js +1 -1
  99. package/dist/cjs/salla-user-profile.cjs.entry.js +1 -1
  100. package/dist/cjs/salla-user-settings.cjs.entry.js +1 -1
  101. package/dist/cjs/salla-verify.cjs.entry.js +3 -3
  102. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  103. package/dist/cjs/salla-wishlist-actions.cjs.entry.js +1 -1
  104. package/dist/cjs/twilight.cjs.js +2 -2
  105. package/dist/cjs/{vanilla-picker-BUFYPi-_.js → vanilla-picker-GTx-kpDm.js} +1 -1
  106. package/dist/collection/collection-manifest.json +14 -12
  107. package/dist/collection/components/salla-comments/interfaces.js +12 -0
  108. package/dist/collection/components/salla-comments/salla-comment-item.js +1 -1
  109. package/dist/collection/components/salla-comments/salla-comments.js +38 -5
  110. package/dist/collection/components/salla-product-options/salla-product-options.js +7 -1
  111. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +119 -16
  112. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +69 -10
  113. package/dist/collection/components/salla-verified-review/salla-verified-review.css +162 -0
  114. package/dist/collection/components/salla-verified-review/salla-verified-review.js +264 -0
  115. package/dist/components/index.js +2 -2
  116. package/dist/components/salla-comment-item2.js +1 -1
  117. package/dist/components/salla-comments.js +40 -1
  118. package/dist/components/salla-product-options2.js +7 -1
  119. package/dist/components/salla-rating-modal-v22.js +73 -12
  120. package/dist/components/salla-rating-modal.js +1 -591
  121. package/dist/components/salla-rating-modal2.js +613 -0
  122. package/dist/components/salla-verified-review.d.ts +11 -0
  123. package/dist/components/salla-verified-review.js +325 -0
  124. package/dist/esm/{filepond-CKsbRWmS.js → filepond-BcXR53L3.js} +1 -1
  125. package/dist/esm/{filepond-plugin-file-poster-B_gYCESq.js → filepond-plugin-file-poster-BTU_WzVu.js} +1 -1
  126. package/dist/esm/{filepond-plugin-file-validate-size-Bep6fNi3.js → filepond-plugin-file-validate-size-c_09APqP.js} +1 -1
  127. package/dist/esm/{filepond-plugin-file-validate-type-r3uRmGIr.js → filepond-plugin-file-validate-type-Dz2Lgh8V.js} +1 -1
  128. package/dist/esm/{filepond-plugin-image-edit-BJcOlOFL.js → filepond-plugin-image-edit-DK7eXs2p.js} +1 -1
  129. package/dist/esm/{filepond-plugin-image-exif-orientation-DJoDaRwQ.js → filepond-plugin-image-exif-orientation-DYBURwn_.js} +1 -1
  130. package/dist/esm/{filepond-plugin-image-preview-BsuTLPS0.js → filepond-plugin-image-preview-4WNiH-ie.js} +1 -1
  131. package/dist/esm/{index-BVqCTDsV.js → index-BW1au-Nh.js} +14 -14
  132. package/dist/esm/{intlTelInput-CD2FA0nI.js → intlTelInput-DvPcVtVG.js} +1 -1
  133. package/dist/esm/loader.js +3 -3
  134. package/dist/esm/{mail-DzAIgzdz.js → mail-DmgxDvXL.js} +2 -2
  135. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  136. package/dist/esm/salla-accordion_6.entry.js +1 -1
  137. package/dist/esm/salla-add-product-button_5.entry.js +8 -2
  138. package/dist/esm/salla-advertisement.entry.js +1 -1
  139. package/dist/esm/salla-alert_2.entry.js +1 -1
  140. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  141. package/dist/esm/salla-apps-icons.entry.js +1 -1
  142. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  143. package/dist/esm/salla-badge.entry.js +1 -1
  144. package/dist/esm/salla-basket-gap.entry.js +1 -1
  145. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  146. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  147. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  148. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  149. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  150. package/dist/esm/salla-comment-factors.entry.js +1 -1
  151. package/dist/esm/{salla-comment-form_8.entry.js → salla-comment-form_9.entry.js} +259 -4
  152. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  153. package/dist/esm/salla-contacts.entry.js +3 -3
  154. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  155. package/dist/esm/salla-count-down.entry.js +1 -1
  156. package/dist/esm/salla-custom-fields.entry.js +1 -1
  157. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  158. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  159. package/dist/esm/salla-filters-widget.entry.js +1 -1
  160. package/dist/esm/salla-filters.entry.js +1 -1
  161. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  162. package/dist/esm/salla-gifting.entry.js +1 -1
  163. package/dist/esm/salla-hook.entry.js +1 -1
  164. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  165. package/dist/esm/salla-installment.entry.js +1 -1
  166. package/dist/esm/salla-list-tile.entry.js +1 -1
  167. package/dist/esm/salla-localization-modal.entry.js +1 -1
  168. package/dist/esm/salla-login-modal.entry.js +1 -1
  169. package/dist/esm/salla-loyalty-banner_10.entry.js +3 -3
  170. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  171. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  172. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  173. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  174. package/dist/esm/salla-loyalty.entry.js +1 -1
  175. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  176. package/dist/esm/salla-map_2.entry.js +1 -1
  177. package/dist/esm/salla-menu.entry.js +1 -1
  178. package/dist/esm/salla-metadata.entry.js +1 -1
  179. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  180. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  181. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  182. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  183. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  184. package/dist/esm/salla-offer-modal.entry.js +1 -1
  185. package/dist/esm/salla-offer.entry.js +1 -1
  186. package/dist/esm/salla-order-branch.entry.js +1 -1
  187. package/dist/esm/salla-order-cancel.entry.js +1 -1
  188. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  189. package/dist/esm/salla-order-details-options.entry.js +1 -1
  190. package/dist/esm/salla-order-details.entry.js +1 -1
  191. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  192. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  193. package/dist/esm/salla-order-edit.entry.js +1 -1
  194. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  195. package/dist/esm/salla-order-shipments.entry.js +1 -1
  196. package/dist/esm/salla-order-summary.entry.js +1 -1
  197. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  198. package/dist/esm/salla-orders.entry.js +1 -1
  199. package/dist/esm/salla-payments.entry.js +1 -1
  200. package/dist/esm/salla-placeholder.entry.js +1 -1
  201. package/dist/esm/salla-price-range.entry.js +1 -1
  202. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  203. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  204. package/dist/esm/salla-products-list.entry.js +1 -1
  205. package/dist/esm/salla-products-slider.entry.js +1 -1
  206. package/dist/esm/salla-quick-order.entry.js +3 -3
  207. package/dist/esm/salla-rating-modal-v2.entry.js +73 -14
  208. package/dist/esm/salla-rating-modal.entry.js +22 -7
  209. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  210. package/dist/esm/salla-review-order-item.entry.js +1 -1
  211. package/dist/esm/salla-scopes.entry.js +1 -1
  212. package/dist/esm/salla-search.entry.js +1 -1
  213. package/dist/esm/salla-skeleton.entry.js +1 -1
  214. package/dist/esm/salla-slider.entry.js +1 -1
  215. package/dist/esm/salla-social-share.entry.js +4 -4
  216. package/dist/esm/salla-social.entry.js +1 -1
  217. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  218. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  219. package/dist/esm/salla-tooltip.entry.js +1 -1
  220. package/dist/esm/salla-trust-badges.entry.js +1 -1
  221. package/dist/esm/salla-user-menu.entry.js +1 -1
  222. package/dist/esm/salla-user-profile.entry.js +1 -1
  223. package/dist/esm/salla-user-settings.entry.js +1 -1
  224. package/dist/esm/salla-verify.entry.js +3 -3
  225. package/dist/esm/salla-wallet.entry.js +1 -1
  226. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  227. package/dist/esm/twilight.js +3 -3
  228. package/dist/esm/{vanilla-picker-Ba_za9Iy.js → vanilla-picker-CDk_knNu.js} +1 -1
  229. package/dist/twilight/p-03d77f90.entry.js +4 -0
  230. package/dist/twilight/{p-17940d8a.entry.js → p-07c013f9.entry.js} +1 -1
  231. package/dist/twilight/{p-1ec6e0fe.entry.js → p-10534171.entry.js} +1 -1
  232. package/dist/twilight/{p-ced4b7ac.entry.js → p-1187210a.entry.js} +1 -1
  233. package/dist/twilight/{p-c47ecca7.entry.js → p-1282e22a.entry.js} +1 -1
  234. package/dist/twilight/{p-a5d08af6.entry.js → p-13bf1c47.entry.js} +1 -1
  235. package/dist/twilight/{p-ee2b16d7.entry.js → p-13dbbbdc.entry.js} +1 -1
  236. package/dist/twilight/{p-f58d14ed.entry.js → p-16296dce.entry.js} +1 -1
  237. package/dist/twilight/{p-5115117b.entry.js → p-16ccbce5.entry.js} +1 -1
  238. package/dist/twilight/{p-2b0cf190.entry.js → p-1ba8fb02.entry.js} +1 -1
  239. package/dist/twilight/{p-90ee37c7.entry.js → p-1c82117c.entry.js} +1 -1
  240. package/dist/twilight/{p-39d9e02f.entry.js → p-26f8a482.entry.js} +1 -1
  241. package/dist/twilight/{p-6a3487de.entry.js → p-280e67f0.entry.js} +1 -1
  242. package/dist/twilight/{p-3961522a.entry.js → p-2a8f1ed4.entry.js} +1 -1
  243. package/dist/twilight/{p-87115499.entry.js → p-311a905b.entry.js} +1 -1
  244. package/dist/twilight/{p-bab59319.entry.js → p-315890b5.entry.js} +1 -1
  245. package/dist/twilight/{p-ee3ddc23.entry.js → p-362792d6.entry.js} +1 -1
  246. package/dist/twilight/{p-e2934193.entry.js → p-3ad55c42.entry.js} +1 -1
  247. package/dist/twilight/{p-56647774.entry.js → p-3b9dcb0f.entry.js} +1 -1
  248. package/dist/twilight/{p-d78998b7.entry.js → p-3c28560f.entry.js} +1 -1
  249. package/dist/twilight/{p-b389b1d3.entry.js → p-3cfd4fcd.entry.js} +1 -1
  250. package/dist/twilight/{p-96584590.entry.js → p-40555637.entry.js} +1 -1
  251. package/dist/twilight/{p-436dfe93.entry.js → p-46399dc8.entry.js} +1 -1
  252. package/dist/twilight/{p-743b79ae.entry.js → p-489d084c.entry.js} +1 -1
  253. package/dist/twilight/{p-1974f6da.entry.js → p-4b14e0f8.entry.js} +1 -1
  254. package/dist/twilight/{p-1a191989.entry.js → p-4be8900d.entry.js} +1 -1
  255. package/dist/twilight/p-4f052df8.entry.js +4 -0
  256. package/dist/twilight/{p-c48f5c6b.entry.js → p-50c0b6fa.entry.js} +1 -1
  257. package/dist/twilight/{p-878c2be2.entry.js → p-5335f307.entry.js} +1 -1
  258. package/dist/twilight/p-534e7760.entry.js +4 -0
  259. package/dist/twilight/{p-fbc075fe.entry.js → p-641cc01d.entry.js} +1 -1
  260. package/dist/twilight/{p-c53c2f59.entry.js → p-64f0c216.entry.js} +1 -1
  261. package/dist/twilight/{p-f195a63d.entry.js → p-65a86613.entry.js} +1 -1
  262. package/dist/twilight/{p-e4c9cef4.entry.js → p-664d428e.entry.js} +1 -1
  263. package/dist/twilight/{p-79444897.entry.js → p-66c7b9e4.entry.js} +1 -1
  264. package/dist/twilight/{p-723aeda4.entry.js → p-677bcf4c.entry.js} +1 -1
  265. package/dist/twilight/{p-89e9a91f.entry.js → p-68d6fa66.entry.js} +1 -1
  266. package/dist/twilight/{p-cf3365e2.entry.js → p-69f4a089.entry.js} +1 -1
  267. package/dist/twilight/{p-37d9f762.entry.js → p-6d3a4c41.entry.js} +1 -1
  268. package/dist/twilight/{p-13244c52.entry.js → p-6d6618f8.entry.js} +1 -1
  269. package/dist/twilight/{p-f2c688d6.entry.js → p-6e78ee63.entry.js} +1 -1
  270. package/dist/twilight/{p-978e4164.entry.js → p-72960bb3.entry.js} +1 -1
  271. package/dist/twilight/{p-659e2280.entry.js → p-75065cbf.entry.js} +1 -1
  272. package/dist/twilight/{p-97fc57c1.entry.js → p-7adefcd6.entry.js} +1 -1
  273. package/dist/twilight/{p-7b23dec7.entry.js → p-7afd066a.entry.js} +1 -1
  274. package/dist/twilight/{p-6d07d195.entry.js → p-80c11fae.entry.js} +1 -1
  275. package/dist/twilight/{p-f82cee0c.entry.js → p-821aa95a.entry.js} +1 -1
  276. package/dist/twilight/{p-e41e5fc7.entry.js → p-84679cc1.entry.js} +1 -1
  277. package/dist/twilight/{p-96a57e9c.entry.js → p-8643930a.entry.js} +1 -1
  278. package/dist/twilight/{p-dff6d623.entry.js → p-87af932a.entry.js} +1 -1
  279. package/dist/twilight/{p-50c90e0a.entry.js → p-87cc2e08.entry.js} +1 -1
  280. package/dist/twilight/{p-e3dab961.entry.js → p-89fe5237.entry.js} +1 -1
  281. package/dist/twilight/{p-fa17989b.entry.js → p-93c006fc.entry.js} +1 -1
  282. package/dist/twilight/{p-b6d5ae9b.entry.js → p-9b1403fc.entry.js} +1 -1
  283. package/dist/twilight/{p-D-zqM6k8.js → p-AncUY1nn.js} +1 -1
  284. package/dist/twilight/{p-CP29f7RQ.js → p-BUMDIRU5.js} +1 -1
  285. package/dist/twilight/{p-BVqCTDsV.js → p-BW1au-Nh.js} +1 -1
  286. package/dist/twilight/{p-JKh0XFIn.js → p-BjS2Vb6h.js} +1 -1
  287. package/dist/twilight/{p-DzW3U8TR.js → p-C6nX89oY.js} +1 -1
  288. package/dist/twilight/{p-DgwK96eP.js → p-CMWS1gyZ.js} +1 -1
  289. package/dist/twilight/{p-Cluq3aDa.js → p-D9Y6HNvi.js} +1 -1
  290. package/dist/twilight/{p-DJmqmO68.js → p-DPMPVhgw.js} +1 -1
  291. package/dist/twilight/{p-DzAIgzdz.js → p-DmgxDvXL.js} +1 -1
  292. package/dist/twilight/{p-B83s3cRn.js → p-UDPL8zGN.js} +2 -2
  293. package/dist/twilight/{p-CS-t4QAX.js → p-UIEwOe70.js} +1 -1
  294. package/dist/twilight/{p-0ea8365b.entry.js → p-a15b4245.entry.js} +1 -1
  295. package/dist/twilight/{p-eaf9d536.entry.js → p-a38dc391.entry.js} +1 -1
  296. package/dist/twilight/{p-75e692d1.entry.js → p-a3fdec51.entry.js} +1 -1
  297. package/dist/twilight/{p-fc5d5473.entry.js → p-a4436d17.entry.js} +1 -1
  298. package/dist/twilight/{p-14689252.entry.js → p-a7a10dbf.entry.js} +1 -1
  299. package/dist/twilight/p-a9674965.entry.js +4 -0
  300. package/dist/twilight/{p-34d5c7bf.entry.js → p-aa9fb9f5.entry.js} +1 -1
  301. package/dist/twilight/{p-1fcebaad.entry.js → p-ac794ed6.entry.js} +1 -1
  302. package/dist/twilight/{p-635265d1.entry.js → p-b1dfc455.entry.js} +1 -1
  303. package/dist/twilight/{p-bf4c2184.entry.js → p-b2b818a5.entry.js} +1 -1
  304. package/dist/twilight/{p-7bb24ad6.entry.js → p-b89d8c3c.entry.js} +1 -1
  305. package/dist/twilight/{p-333ea76b.entry.js → p-baa06c65.entry.js} +1 -1
  306. package/dist/twilight/{p-0a9093f1.entry.js → p-bcee5564.entry.js} +1 -1
  307. package/dist/twilight/{p-42952fac.entry.js → p-beaab93e.entry.js} +1 -1
  308. package/dist/twilight/{p-b862c670.entry.js → p-beb2110d.entry.js} +1 -1
  309. package/dist/twilight/{p-c34f8c08.entry.js → p-c214700a.entry.js} +1 -1
  310. package/dist/twilight/{p-f4ac8cae.entry.js → p-c23f7b95.entry.js} +1 -1
  311. package/dist/twilight/{p-85f95a58.entry.js → p-c7e980aa.entry.js} +1 -1
  312. package/dist/twilight/{p-598cadf4.entry.js → p-caa8d5ae.entry.js} +1 -1
  313. package/dist/twilight/{p-003499a8.entry.js → p-cbe760ce.entry.js} +1 -1
  314. package/dist/twilight/{p-cd805a38.entry.js → p-cc3a9188.entry.js} +1 -1
  315. package/dist/twilight/{p-daea3207.entry.js → p-ceb40475.entry.js} +1 -1
  316. package/dist/twilight/{p-f0a14b18.entry.js → p-cf4efddb.entry.js} +1 -1
  317. package/dist/twilight/{p-6ee096e8.entry.js → p-d018fc49.entry.js} +1 -1
  318. package/dist/twilight/{p-0ce2c41f.entry.js → p-d3692caf.entry.js} +1 -1
  319. package/dist/twilight/{p-9d18525b.entry.js → p-d54acab0.entry.js} +1 -1
  320. package/dist/twilight/{p-1174e53e.entry.js → p-d7a68f6c.entry.js} +1 -1
  321. package/dist/twilight/{p-86a1f616.entry.js → p-de83979a.entry.js} +1 -1
  322. package/dist/twilight/{p-3a4bb8de.entry.js → p-df202b1d.entry.js} +1 -1
  323. package/dist/twilight/{p-337cc9f6.entry.js → p-e184cd72.entry.js} +1 -1
  324. package/dist/twilight/{p-7d9288b0.entry.js → p-e1eb70d2.entry.js} +1 -1
  325. package/dist/twilight/{p-a774f6f0.entry.js → p-e29f28eb.entry.js} +7 -7
  326. package/dist/twilight/{p-409f95a8.entry.js → p-e8153a9a.entry.js} +1 -1
  327. package/dist/twilight/{p-a347e701.entry.js → p-edebecb3.entry.js} +1 -1
  328. package/dist/twilight/{p-36abc50f.entry.js → p-f0a04676.entry.js} +1 -1
  329. package/dist/twilight/{p-c19cf93c.entry.js → p-f3f9d1fb.entry.js} +1 -1
  330. package/dist/twilight/{p-cdd8ed7f.entry.js → p-f45f5f91.entry.js} +1 -1
  331. package/dist/twilight/{p-11ef8b82.entry.js → p-feb80402.entry.js} +1 -1
  332. package/dist/twilight/twilight.esm.js +1 -1
  333. package/dist/types/components/salla-comments/interfaces.d.ts +15 -0
  334. package/dist/types/components/salla-comments/salla-comments.d.ts +5 -2
  335. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +16 -3
  336. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +10 -2
  337. package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +51 -0
  338. package/dist/types/components.d.ts +45 -12
  339. package/package.json +5 -5
  340. package/dist/twilight/p-0974f6c6.entry.js +0 -4
  341. package/dist/twilight/p-98b1ff35.entry.js +0 -4
  342. package/dist/twilight/p-afaa0fbe.entry.js +0 -4
  343. package/dist/twilight/p-e04221de.entry.js +0 -4
@@ -0,0 +1,264 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { Host, h } from "@stencil/core";
5
+ import CheckCircle2 from "../../assets/svg/check-circle2.svg";
6
+ import Block from "../../assets/svg/block.svg";
7
+ export class SallaVerifiedReview {
8
+ constructor() {
9
+ this.ready = false;
10
+ this.eligible = false;
11
+ this.order = null;
12
+ this.productImage = '';
13
+ this.productImageAlt = '';
14
+ this.loyaltyPoints = 0;
15
+ this.titlePurchasedLabel = '';
16
+ this.titleNotPurchasedLabel = '';
17
+ this.subtitleLabel = '';
18
+ this.badgeLabel = '';
19
+ this.orderMetaLabel = '';
20
+ this.ctaLabel = '';
21
+ this.loyaltyLabel = '';
22
+ this.rateLimitMessage = '';
23
+ this.rateLimited = false;
24
+ this.rateLimitTitleLabel = '';
25
+ this.rateLimitDefaultMessageLabel = '';
26
+ this.rateLimitExitLabel = '';
27
+ this.resolvedProductId = null;
28
+ this.handleRateClick = () => {
29
+ if (salla.config.isGuest()) {
30
+ salla.event.dispatch('login::open');
31
+ return;
32
+ }
33
+ if (!this.eligible) {
34
+ return;
35
+ }
36
+ if (this.rateLimited) {
37
+ this.showRateLimitAlert();
38
+ return;
39
+ }
40
+ // Verified purchases pass their order id; unverified-but-eligible reviews
41
+ // pass `null` so the modal submits the review without an order.
42
+ const orderId = this.order?.id ?? null;
43
+ const modal = this.ensureRatingModal();
44
+ requestAnimationFrame(async () => {
45
+ await modal.setOrder?.(orderId, this.resolvedProductId);
46
+ modal.open?.();
47
+ });
48
+ };
49
+ }
50
+ async componentWillLoad() {
51
+ try {
52
+ await salla.onReady();
53
+ await salla.lang.onLoaded();
54
+ await this.loadTranslations();
55
+ this.resolvedProductId =
56
+ this.productId || this.host.dataset.productId || salla.config.get('page.id');
57
+ if (!this.resolvedProductId) {
58
+ return;
59
+ }
60
+ if (salla.config.isGuest()) {
61
+ return;
62
+ }
63
+ salla.event.on('rating::products-rated', (_response, payload) => {
64
+ if (String(payload?.product_id) === String(this.resolvedProductId)) {
65
+ this.eligible = false;
66
+ }
67
+ });
68
+ await Promise.all([this.loadProductImage(), this.loadEligibility()]);
69
+ this.ready = true;
70
+ }
71
+ catch (e) {
72
+ salla?.logger?.warn?.('salla-verified-review: init failed', e);
73
+ }
74
+ }
75
+ async loadTranslations() {
76
+ const setNestedAsync = (lang, key, value) => {
77
+ return new Promise(resolve => {
78
+ salla.helpers.setNested(salla.lang.messages[lang], key, value);
79
+ resolve(true);
80
+ });
81
+ };
82
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_purchased', 'جربت هذا المنتج؟');
83
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.title_purchased', 'You tried this product?');
84
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
85
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.title_not_purchased', 'Tried this product? Share your experience 🎉');
86
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.subtitle', 'شارك رأيك وساعد غيرك يختار بثقة.');
87
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.subtitle', 'Share your opinion and help others choose with confidence.');
88
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.badge', 'عملية شراء موثقة');
89
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.badge', 'Verified purchase');
90
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.order_meta', 'طلب #:id');
91
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.order_meta', 'Order #:id');
92
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.cta', 'تقييم المنتج');
93
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.cta', 'Rate product');
94
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
95
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.loyalty_points', '🏆 Earn +:points loyalty points by writing a review');
96
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_title', 'تم تقييد حسابك');
97
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_title', 'Your account has been restricted');
98
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
99
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_message', "You've exceeded the allowed limit for rating products you haven't purchased yet.");
100
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_exit', 'خروج');
101
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_exit', 'Exit');
102
+ this.titlePurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_purchased', 'اشتريت هذا! شارك تجربتك 🎉');
103
+ this.titleNotPurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
104
+ this.subtitleLabel = salla.lang.getWithDefault('pages.rating.verified_review.subtitle', 'ساعد المتسوقين الآخرين بمراجعة هذا المنتج. رأيك يهم.');
105
+ this.badgeLabel = salla.lang.getWithDefault('pages.rating.verified_review.badge', 'عملية شراء موثقة');
106
+ this.orderMetaLabel = salla.lang.getWithDefault('pages.rating.verified_review.order_meta', 'طلب #:id');
107
+ this.ctaLabel = salla.lang.getWithDefault('pages.rating.verified_review.cta', 'قيِّم المنتج');
108
+ this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
109
+ this.rateLimitTitleLabel = salla.lang.getWithDefault('pages.rating.rate_limit_title', 'تم تقييد حسابك');
110
+ this.rateLimitDefaultMessageLabel = salla.lang.getWithDefault('pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
111
+ this.rateLimitExitLabel = salla.lang.getWithDefault('pages.rating.rate_limit_exit', 'خروج');
112
+ }
113
+ async loadProductImage() {
114
+ try {
115
+ const response = await salla.api.withoutNotifier(() => salla.product.api.getDetails(this.resolvedProductId));
116
+ const product = response?.data;
117
+ this.productImage = product?.image?.url || salla.url.cdn('images/s-empty.png');
118
+ this.productImageAlt = product?.image?.alt || product?.name || '';
119
+ }
120
+ catch {
121
+ this.productImage = salla.url.cdn('images/s-empty.png');
122
+ }
123
+ }
124
+ async fetchEligibility(productId) {
125
+ const response = await salla.api.withoutNotifier(() => salla.rating.api.productEligibility(productId));
126
+ return response?.data;
127
+ }
128
+ async loadEligibility() {
129
+ if (!this.resolvedProductId) {
130
+ return;
131
+ }
132
+ const eligibility = await this.fetchEligibility(this.resolvedProductId);
133
+ if (!eligibility) {
134
+ this.eligible = false;
135
+ this.order = null;
136
+ return;
137
+ }
138
+ this.eligible = eligibility.eligible;
139
+ if (eligibility.code === 'community_review_daily_limit') {
140
+ this.rateLimitMessage = eligibility.message || this.rateLimitDefaultMessageLabel;
141
+ this.rateLimited = true;
142
+ this.eligible = true;
143
+ }
144
+ this.order =
145
+ this.eligible && eligibility.order_id
146
+ ? {
147
+ id: eligibility.order_id,
148
+ reference_id: eligibility.reference_id,
149
+ created_at: eligibility.created_at,
150
+ }
151
+ : null;
152
+ const loyaltyPoints = salla.config.get('store.settings.rating.rating_product_points');
153
+ this.loyaltyPoints = loyaltyPoints ? Number(loyaltyPoints) : 0;
154
+ }
155
+ getOrderMetaText() {
156
+ if (!this.order) {
157
+ return '';
158
+ }
159
+ const orderMetaLabel = this.orderMetaLabel.replace(':id', String(this.order.reference_id || this.order.id));
160
+ const orderCreatedAt = this.order.created_at ? new Date(this.order.created_at) : null;
161
+ return orderMetaLabel + (orderCreatedAt ? ` • ${this.formatOrderDate(orderCreatedAt)}` : '');
162
+ }
163
+ formatOrderDate(date) {
164
+ const month = date.toLocaleDateString(navigator.language, { month: 'short' });
165
+ const day = String(date.getDate()).padStart(2, '0');
166
+ return `${date.getFullYear()} ${month} ${day}`;
167
+ }
168
+ getLoyaltyText() {
169
+ if (!this.loyaltyPoints) {
170
+ return '';
171
+ }
172
+ if (!this.loyaltyLabel) {
173
+ this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
174
+ }
175
+ return this.loyaltyLabel.replace(':points', String(this.loyaltyPoints));
176
+ }
177
+ /**
178
+ * Shown when the shopper tries to rate a product after the eligibility
179
+ * check reported the community-review daily limit was hit.
180
+ */
181
+ showRateLimitAlert() {
182
+ requestAnimationFrame(() => {
183
+ this.rateLimitModal?.setTitle?.(this.rateLimitTitleLabel);
184
+ this.rateLimitModal?.open?.();
185
+ });
186
+ }
187
+ getRateLimitModal() {
188
+ return (h("salla-modal", { ref: modal => (this.rateLimitModal = modal), width: "xs", centered: true }, h("span", { slot: "icon", class: "s-modal-icon s-modal-bg-normal", innerHTML: Block }), h("p", { class: "s-verified-review-rate-limit-message" }, this.rateLimitMessage), h("div", { slot: "footer", class: "s-verified-review-rate-limit-footer" }, h("salla-button", { width: "wide", fill: "outline", color: "primary", onClick: () => this.rateLimitModal?.close?.() }, this.rateLimitExitLabel))));
189
+ }
190
+ ensureRatingModal() {
191
+ let modal = document.querySelector('salla-rating-modal');
192
+ if (!modal) {
193
+ modal = document.createElement('salla-rating-modal');
194
+ document.body.appendChild(modal);
195
+ }
196
+ return modal;
197
+ }
198
+ render() {
199
+ if (salla.config.isGuest() || !this.ready || !this.resolvedProductId) {
200
+ return null;
201
+ }
202
+ if (!this.eligible) {
203
+ return null;
204
+ }
205
+ const title = this.order ? this.titlePurchasedLabel : this.titleNotPurchasedLabel;
206
+ const loyaltyText = this.order ? this.getLoyaltyText() : null;
207
+ const orderMeta = this.getOrderMetaText();
208
+ return (h(Host, null, h("div", { class: "s-verified-review-container" }, h("div", { class: "s-verified-review-glow", "aria-hidden": "true" }), h("div", { class: "s-verified-review-media" }, h("img", { class: "s-verified-review-image", src: this.productImage, alt: this.productImageAlt, width: 72, height: 72, loading: "lazy", decoding: "async" })), h("div", { class: "s-verified-review-content" }, this.order ? (h("div", { class: "s-verified-review-meta" }, h("span", { class: "s-verified-review-badge" }, h("span", { class: "s-verified-review-badge-icon", innerHTML: CheckCircle2 }), this.badgeLabel), orderMeta ? h("span", { class: "s-verified-review-order" }, orderMeta) : null)) : null, h("h3", { class: "s-verified-review-title" }, title), h("p", { class: "s-verified-review-subtitle" }, this.subtitleLabel), loyaltyText ? h("p", { class: "s-verified-review-loyalty" }, loyaltyText) : null), h("div", { class: "s-verified-review-actions" }, h("salla-button", { class: "s-verified-review-cta", fill: "outline", color: "primary", size: "medium", onClick: this.handleRateClick }, this.ctaLabel))), this.getRateLimitModal()));
209
+ }
210
+ static get is() { return "salla-verified-review"; }
211
+ static get originalStyleUrls() {
212
+ return {
213
+ "$": ["salla-verified-review.scss"]
214
+ };
215
+ }
216
+ static get styleUrls() {
217
+ return {
218
+ "$": ["salla-verified-review.css"]
219
+ };
220
+ }
221
+ static get properties() {
222
+ return {
223
+ "productId": {
224
+ "type": "any",
225
+ "attribute": "product-id",
226
+ "mutable": false,
227
+ "complexType": {
228
+ "original": "number | string",
229
+ "resolved": "number | string",
230
+ "references": {}
231
+ },
232
+ "required": false,
233
+ "optional": true,
234
+ "docs": {
235
+ "tags": [],
236
+ "text": "Product id to check purchase eligibility for.\nFalls back to `data-product-id` or the current page id."
237
+ },
238
+ "getter": false,
239
+ "setter": false,
240
+ "reflect": true
241
+ }
242
+ };
243
+ }
244
+ static get states() {
245
+ return {
246
+ "ready": {},
247
+ "eligible": {},
248
+ "order": {},
249
+ "productImage": {},
250
+ "productImageAlt": {},
251
+ "loyaltyPoints": {},
252
+ "titlePurchasedLabel": {},
253
+ "titleNotPurchasedLabel": {},
254
+ "subtitleLabel": {},
255
+ "badgeLabel": {},
256
+ "orderMetaLabel": {},
257
+ "ctaLabel": {},
258
+ "loyaltyLabel": {},
259
+ "rateLimitMessage": {},
260
+ "rateLimited": {}
261
+ };
262
+ }
263
+ static get elementRef() { return "host"; }
264
+ }