@salla.sa/twilight-components 2.14.546 → 2.14.548

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 (348) hide show
  1. package/dist/cjs/{filepond-CbpPZZga.js → filepond-CGA4aTUA.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-BmWPw2D9.js → filepond-plugin-file-poster-DyVz7vP9.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-De7XZguT.js → filepond-plugin-file-validate-size-CgzYDBcU.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-BHdxCuXU.js → filepond-plugin-file-validate-type-Dx2CbMZ9.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DJZbgt5_.js → filepond-plugin-image-edit-D3aTsFmD.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BtLJO8iG.js → filepond-plugin-image-exif-orientation-BW3usWts.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-BRUyTRh3.js → filepond-plugin-image-preview-Bb7_UNPY.js} +1 -1
  8. package/dist/cjs/{index-EoqYCrI-.js → index-BssNhL-x.js} +30 -26
  9. package/dist/cjs/{intlTelInput-CxKIlDCD.js → intlTelInput-B7QYiZ0d.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 +12 -5
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +1 -1
  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} +264 -4
  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 +208 -103
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +23 -8
  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-ClshNzKX.js → vanilla-picker-H1di5S1s.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 +42 -5
  110. package/dist/collection/components/salla-modal/salla-modal.css +11 -0
  111. package/dist/collection/components/salla-modal/salla-modal.js +33 -6
  112. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +253 -104
  113. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +34 -21
  114. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +69 -10
  115. package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +5 -0
  116. package/dist/collection/components/salla-verified-review/salla-verified-review.css +162 -0
  117. package/dist/collection/components/salla-verified-review/salla-verified-review.js +264 -0
  118. package/dist/components/index.js +18 -14
  119. package/dist/components/salla-comment-item2.js +1 -1
  120. package/dist/components/salla-comments.js +44 -1
  121. package/dist/components/salla-modal2.js +12 -4
  122. package/dist/components/salla-rating-modal-v22.js +208 -101
  123. package/dist/components/salla-rating-modal.js +1 -591
  124. package/dist/components/salla-rating-modal2.js +613 -0
  125. package/dist/components/salla-rating-stars2.js +1 -1
  126. package/dist/components/salla-verified-review.d.ts +11 -0
  127. package/dist/components/salla-verified-review.js +325 -0
  128. package/dist/esm/{filepond-CF5m44bJ.js → filepond-CXmbiROU.js} +1 -1
  129. package/dist/esm/{filepond-plugin-file-poster-CcB1Ah8E.js → filepond-plugin-file-poster-DrmkMK37.js} +1 -1
  130. package/dist/esm/{filepond-plugin-file-validate-size-BwVhV38u.js → filepond-plugin-file-validate-size-fRXLDtKY.js} +1 -1
  131. package/dist/esm/{filepond-plugin-file-validate-type-GBCLCzPk.js → filepond-plugin-file-validate-type-9x4CtZKy.js} +1 -1
  132. package/dist/esm/{filepond-plugin-image-edit-CrBe3Dh3.js → filepond-plugin-image-edit-BTjvSjn9.js} +1 -1
  133. package/dist/esm/{filepond-plugin-image-exif-orientation-C2Cj5Jrc.js → filepond-plugin-image-exif-orientation-CnSOx2Lm.js} +1 -1
  134. package/dist/esm/{filepond-plugin-image-preview-YVKQw3-Q.js → filepond-plugin-image-preview-Cy0Nd8Xr.js} +1 -1
  135. package/dist/esm/{index-FwRU05yW.js → index-B64o_70M.js} +30 -26
  136. package/dist/esm/{intlTelInput-B1_kbUW3.js → intlTelInput-FF2eKbuC.js} +1 -1
  137. package/dist/esm/loader.js +3 -3
  138. package/dist/esm/{mail-DzAIgzdz.js → mail-DmgxDvXL.js} +2 -2
  139. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  140. package/dist/esm/salla-accordion_6.entry.js +12 -5
  141. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  142. package/dist/esm/salla-advertisement.entry.js +1 -1
  143. package/dist/esm/salla-alert_2.entry.js +1 -1
  144. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  145. package/dist/esm/salla-apps-icons.entry.js +1 -1
  146. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  147. package/dist/esm/salla-badge.entry.js +1 -1
  148. package/dist/esm/salla-basket-gap.entry.js +1 -1
  149. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  150. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  151. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  152. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  153. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  154. package/dist/esm/salla-comment-factors.entry.js +1 -1
  155. package/dist/esm/{salla-comment-form_8.entry.js → salla-comment-form_9.entry.js} +264 -5
  156. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  157. package/dist/esm/salla-contacts.entry.js +3 -3
  158. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  159. package/dist/esm/salla-count-down.entry.js +1 -1
  160. package/dist/esm/salla-custom-fields.entry.js +1 -1
  161. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  162. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  163. package/dist/esm/salla-filters-widget.entry.js +1 -1
  164. package/dist/esm/salla-filters.entry.js +1 -1
  165. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  166. package/dist/esm/salla-gifting.entry.js +1 -1
  167. package/dist/esm/salla-hook.entry.js +1 -1
  168. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  169. package/dist/esm/salla-installment.entry.js +1 -1
  170. package/dist/esm/salla-list-tile.entry.js +1 -1
  171. package/dist/esm/salla-localization-modal.entry.js +1 -1
  172. package/dist/esm/salla-login-modal.entry.js +1 -1
  173. package/dist/esm/salla-loyalty-banner_10.entry.js +3 -3
  174. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  175. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  176. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  177. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  178. package/dist/esm/salla-loyalty.entry.js +1 -1
  179. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  180. package/dist/esm/salla-map_2.entry.js +1 -1
  181. package/dist/esm/salla-menu.entry.js +1 -1
  182. package/dist/esm/salla-metadata.entry.js +1 -1
  183. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  184. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  185. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  186. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  187. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  188. package/dist/esm/salla-offer-modal.entry.js +1 -1
  189. package/dist/esm/salla-offer.entry.js +1 -1
  190. package/dist/esm/salla-order-branch.entry.js +1 -1
  191. package/dist/esm/salla-order-cancel.entry.js +1 -1
  192. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  193. package/dist/esm/salla-order-details-options.entry.js +1 -1
  194. package/dist/esm/salla-order-details.entry.js +1 -1
  195. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  196. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  197. package/dist/esm/salla-order-edit.entry.js +1 -1
  198. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  199. package/dist/esm/salla-order-shipments.entry.js +1 -1
  200. package/dist/esm/salla-order-summary.entry.js +1 -1
  201. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  202. package/dist/esm/salla-orders.entry.js +1 -1
  203. package/dist/esm/salla-payments.entry.js +1 -1
  204. package/dist/esm/salla-placeholder.entry.js +1 -1
  205. package/dist/esm/salla-price-range.entry.js +1 -1
  206. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  207. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  208. package/dist/esm/salla-products-list.entry.js +1 -1
  209. package/dist/esm/salla-products-slider.entry.js +1 -1
  210. package/dist/esm/salla-quick-order.entry.js +3 -3
  211. package/dist/esm/salla-rating-modal-v2.entry.js +208 -103
  212. package/dist/esm/salla-rating-modal.entry.js +23 -8
  213. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  214. package/dist/esm/salla-review-order-item.entry.js +1 -1
  215. package/dist/esm/salla-scopes.entry.js +1 -1
  216. package/dist/esm/salla-search.entry.js +1 -1
  217. package/dist/esm/salla-skeleton.entry.js +1 -1
  218. package/dist/esm/salla-slider.entry.js +1 -1
  219. package/dist/esm/salla-social-share.entry.js +4 -4
  220. package/dist/esm/salla-social.entry.js +1 -1
  221. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  222. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  223. package/dist/esm/salla-tooltip.entry.js +1 -1
  224. package/dist/esm/salla-trust-badges.entry.js +1 -1
  225. package/dist/esm/salla-user-menu.entry.js +1 -1
  226. package/dist/esm/salla-user-profile.entry.js +1 -1
  227. package/dist/esm/salla-user-settings.entry.js +1 -1
  228. package/dist/esm/salla-verify.entry.js +3 -3
  229. package/dist/esm/salla-wallet.entry.js +1 -1
  230. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  231. package/dist/esm/twilight.js +3 -3
  232. package/dist/esm/{vanilla-picker-oTEQUNmA.js → vanilla-picker-DMNociUd.js} +1 -1
  233. package/dist/twilight/{p-74bee051.entry.js → p-003648b5.entry.js} +1 -1
  234. package/dist/twilight/{p-52f4642b.entry.js → p-04cc5898.entry.js} +1 -1
  235. package/dist/twilight/{p-BcYofOgx.js → p-0MyCcOKI.js} +1 -1
  236. package/dist/twilight/{p-71ff2062.entry.js → p-0c7bdda5.entry.js} +1 -1
  237. package/dist/twilight/{p-b389fa5c.entry.js → p-0dfd760b.entry.js} +1 -1
  238. package/dist/twilight/{p-904ca909.entry.js → p-13978ff2.entry.js} +1 -1
  239. package/dist/twilight/{p-d11f2263.entry.js → p-1485dedd.entry.js} +1 -1
  240. package/dist/twilight/{p-c4be5709.entry.js → p-1628c63c.entry.js} +1 -1
  241. package/dist/twilight/{p-a7346ee5.entry.js → p-177e9071.entry.js} +1 -1
  242. package/dist/twilight/{p-e7819b7b.entry.js → p-19b03612.entry.js} +1 -1
  243. package/dist/twilight/{p-df48abfb.entry.js → p-1ad71324.entry.js} +1 -1
  244. package/dist/twilight/{p-2dd4ddc7.entry.js → p-1ce848ab.entry.js} +1 -1
  245. package/dist/twilight/{p-3250ee03.entry.js → p-1edbb249.entry.js} +1 -1
  246. package/dist/twilight/{p-ceceeaed.entry.js → p-233b9115.entry.js} +1 -1
  247. package/dist/twilight/{p-a3897cf4.entry.js → p-26c750c8.entry.js} +1 -1
  248. package/dist/twilight/p-2ddabee9.entry.js +4 -0
  249. package/dist/twilight/{p-b95b3bf0.entry.js → p-2f64c3b3.entry.js} +1 -1
  250. package/dist/twilight/{p-682f00d1.entry.js → p-309f771b.entry.js} +1 -1
  251. package/dist/twilight/{p-5df95bdb.entry.js → p-37b73a97.entry.js} +1 -1
  252. package/dist/twilight/{p-f55eb61c.entry.js → p-3b7cbf05.entry.js} +1 -1
  253. package/dist/twilight/{p-1286f679.entry.js → p-3eb853f9.entry.js} +1 -1
  254. package/dist/twilight/{p-5cfc9f8c.entry.js → p-3f460184.entry.js} +1 -1
  255. package/dist/twilight/{p-e71c064e.entry.js → p-40d4ccbb.entry.js} +1 -1
  256. package/dist/twilight/{p-34f38efd.entry.js → p-440687a4.entry.js} +1 -1
  257. package/dist/twilight/{p-d8313f41.entry.js → p-441ee14a.entry.js} +1 -1
  258. package/dist/twilight/{p-06335f34.entry.js → p-49c7dc56.entry.js} +1 -1
  259. package/dist/twilight/{p-e7a672b4.entry.js → p-522fb030.entry.js} +1 -1
  260. package/dist/twilight/{p-b9634ee2.entry.js → p-52607d64.entry.js} +1 -1
  261. package/dist/twilight/{p-49117243.entry.js → p-5273dbb2.entry.js} +1 -1
  262. package/dist/twilight/{p-981da139.entry.js → p-55cbacd7.entry.js} +1 -1
  263. package/dist/twilight/{p-b0730cef.entry.js → p-569ad58b.entry.js} +1 -1
  264. package/dist/twilight/{p-ad30742f.entry.js → p-56e553e4.entry.js} +1 -1
  265. package/dist/twilight/p-5ab11313.entry.js +4 -0
  266. package/dist/twilight/{p-c078fb93.entry.js → p-5c9e4502.entry.js} +1 -1
  267. package/dist/twilight/{p-13fc84ad.entry.js → p-5f860460.entry.js} +1 -1
  268. package/dist/twilight/{p-7fafe29c.entry.js → p-5f9b8ada.entry.js} +1 -1
  269. package/dist/twilight/{p-f7b8430f.entry.js → p-602e632c.entry.js} +1 -1
  270. package/dist/twilight/{p-d550f1f9.entry.js → p-63a2ee05.entry.js} +1 -1
  271. package/dist/twilight/{p-26ae2623.entry.js → p-63acbca7.entry.js} +1 -1
  272. package/dist/twilight/{p-158e1872.entry.js → p-63cebaef.entry.js} +1 -1
  273. package/dist/twilight/{p-51add824.entry.js → p-6451e759.entry.js} +1 -1
  274. package/dist/twilight/{p-767d37bb.entry.js → p-647832d9.entry.js} +1 -1
  275. package/dist/twilight/{p-d76abd6d.entry.js → p-660a552a.entry.js} +1 -1
  276. package/dist/twilight/{p-6081d494.entry.js → p-66ece3d6.entry.js} +1 -1
  277. package/dist/twilight/{p-92175855.entry.js → p-6cd863b9.entry.js} +1 -1
  278. package/dist/twilight/{p-ada73e68.entry.js → p-74a1a32f.entry.js} +1 -1
  279. package/dist/twilight/{p-1a7b7e21.entry.js → p-74c7cc02.entry.js} +1 -1
  280. package/dist/twilight/{p-53184934.entry.js → p-77fa0f9f.entry.js} +1 -1
  281. package/dist/twilight/{p-d295757a.entry.js → p-7c2a0a8b.entry.js} +1 -1
  282. package/dist/twilight/{p-662a5816.entry.js → p-7ce5c2cd.entry.js} +1 -1
  283. package/dist/twilight/{p-dfdf96be.entry.js → p-7eca6506.entry.js} +1 -1
  284. package/dist/twilight/{p-b7ae6c1c.entry.js → p-840dd411.entry.js} +1 -1
  285. package/dist/twilight/{p-eeb89f05.entry.js → p-87227eb2.entry.js} +1 -1
  286. package/dist/twilight/{p-79e3d1dd.entry.js → p-897b8824.entry.js} +1 -1
  287. package/dist/twilight/{p-bc98ccad.entry.js → p-8e293878.entry.js} +1 -1
  288. package/dist/twilight/{p-87ba263e.entry.js → p-8e631629.entry.js} +1 -1
  289. package/dist/twilight/{p-b98fb8ae.entry.js → p-923a35da.entry.js} +1 -1
  290. package/dist/twilight/{p-c3208f6d.entry.js → p-971b8ff5.entry.js} +1 -1
  291. package/dist/twilight/p-991fa4ad.entry.js +4 -0
  292. package/dist/twilight/{p-cac60dea.entry.js → p-9a617c41.entry.js} +1 -1
  293. package/dist/twilight/{p-298b9d8a.entry.js → p-9ae25175.entry.js} +1 -1
  294. package/dist/twilight/{p-682dc578.entry.js → p-9dbf3ff4.entry.js} +1 -1
  295. package/dist/twilight/p-B64o_70M.js +5 -0
  296. package/dist/twilight/{p-DyxHX342.js → p-BK166pHQ.js} +1 -1
  297. package/dist/twilight/{p-j-4Intu2.js → p-BcGXp0zm.js} +1 -1
  298. package/dist/twilight/{p-B9dZFOmF.js → p-Bh11vKua.js} +1 -1
  299. package/dist/twilight/{p-qzPm0si4.js → p-DBnECOny.js} +2 -2
  300. package/dist/twilight/{p-BxHJHdpj.js → p-DWqu98fW.js} +1 -1
  301. package/dist/twilight/{p-DzAIgzdz.js → p-DmgxDvXL.js} +1 -1
  302. package/dist/twilight/{p-CiKg2aqy.js → p-DrJZdc5M.js} +1 -1
  303. package/dist/twilight/{p-CCPvqpeZ.js → p-GwasjFLA.js} +1 -1
  304. package/dist/twilight/{p-BLBFg-He.js → p-UxfFm_QX.js} +1 -1
  305. package/dist/twilight/{p-df069a34.entry.js → p-a0e8ca67.entry.js} +1 -1
  306. package/dist/twilight/{p-176b9746.entry.js → p-a5199e7d.entry.js} +1 -1
  307. package/dist/twilight/{p-61953ae7.entry.js → p-a7fccb9c.entry.js} +1 -1
  308. package/dist/twilight/{p-ae8cbf4f.entry.js → p-a867beee.entry.js} +1 -1
  309. package/dist/twilight/{p-65be2237.entry.js → p-ace041b9.entry.js} +1 -1
  310. package/dist/twilight/{p-f6493289.entry.js → p-b0500232.entry.js} +1 -1
  311. package/dist/twilight/{p-3446e76a.entry.js → p-b0a87a8d.entry.js} +1 -1
  312. package/dist/twilight/{p-55aa8c39.entry.js → p-b16264a3.entry.js} +1 -1
  313. package/dist/twilight/{p-718a5f9b.entry.js → p-b17c6f84.entry.js} +1 -1
  314. package/dist/twilight/{p-75de4995.entry.js → p-b4d47e7c.entry.js} +1 -1
  315. package/dist/twilight/{p-f63aecb0.entry.js → p-b4f2f280.entry.js} +1 -1
  316. package/dist/twilight/{p-179625fd.entry.js → p-b4fda5f4.entry.js} +1 -1
  317. package/dist/twilight/{p-f15f6265.entry.js → p-b8cd26a7.entry.js} +1 -1
  318. package/dist/twilight/{p-736e9843.entry.js → p-ba32a9d2.entry.js} +1 -1
  319. package/dist/twilight/{p-61ae00d6.entry.js → p-be916b5f.entry.js} +1 -1
  320. package/dist/twilight/{p-e2df9129.entry.js → p-c26f1183.entry.js} +1 -1
  321. package/dist/twilight/{p-7df2c1d5.entry.js → p-c5d1b2e4.entry.js} +1 -1
  322. package/dist/twilight/{p-bcf3d118.entry.js → p-c8dae54b.entry.js} +1 -1
  323. package/dist/twilight/{p-0fc9be21.entry.js → p-c9b1ad01.entry.js} +1 -1
  324. package/dist/twilight/{p-72dba918.entry.js → p-cacf3c75.entry.js} +1 -1
  325. package/dist/twilight/{p-2862c6bb.entry.js → p-cb02e6db.entry.js} +1 -1
  326. package/dist/twilight/{p-a32bad0b.entry.js → p-d0847af9.entry.js} +1 -1
  327. package/dist/twilight/{p-01e01e63.entry.js → p-d7e4f0f8.entry.js} +1 -1
  328. package/dist/twilight/{p-c2980ef7.entry.js → p-db4dc7cc.entry.js} +1 -1
  329. package/dist/twilight/{p-a91c674c.entry.js → p-e0f3e985.entry.js} +1 -1
  330. package/dist/twilight/{p-2dfd3810.entry.js → p-e354292f.entry.js} +1 -1
  331. package/dist/twilight/{p-110bd105.entry.js → p-e4db462b.entry.js} +1 -1
  332. package/dist/twilight/{p-2f6ba6f1.entry.js → p-e826d3aa.entry.js} +1 -1
  333. package/dist/twilight/{p-cb737c93.entry.js → p-f12f8db3.entry.js} +1 -1
  334. package/dist/twilight/{p-e73bab6b.entry.js → p-f99550d8.entry.js} +1 -1
  335. package/dist/twilight/{p-46d047ac.entry.js → p-fa0467a7.entry.js} +1 -1
  336. package/dist/twilight/twilight.esm.js +1 -1
  337. package/dist/types/components/salla-comments/interfaces.d.ts +15 -0
  338. package/dist/types/components/salla-comments/salla-comments.d.ts +5 -2
  339. package/dist/types/components/salla-modal/salla-modal.d.ts +7 -2
  340. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +20 -5
  341. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +10 -2
  342. package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +51 -0
  343. package/dist/types/components.d.ts +59 -16
  344. package/package.json +5 -5
  345. package/dist/twilight/p-96826106.entry.js +0 -4
  346. package/dist/twilight/p-FwRU05yW.js +0 -5
  347. package/dist/twilight/p-cc8209fc.entry.js +0 -4
  348. package/dist/twilight/p-dcf9417c.entry.js +0 -4
@@ -5,7 +5,7 @@ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal
5
5
  import { R as Rate } from './star2.js';
6
6
  import { H as Helper } from './Helper.js';
7
7
 
8
- const sallaRatingStarsCss = "/*!twlt*/:host{display:inline-flex;vertical-align:middle}.s-rating-stars-wrapper{display:inline-flex;align-items:center;gap:0.5rem;min-height:1.75rem}.s-rating-stars-wrapper--with-label{min-height:1.75rem}.s-rating-stars-element{display:inline-flex;align-items:center;flex-shrink:0}.s-rating-stars-label,.s-rating-stars-label-without-tag{flex-shrink:0;min-width:5.5rem;min-height:1.25rem;line-height:1.25rem;text-align:end;transition:opacity 0.15s ease}.s-rating-stars-label--empty,.s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-stars-btn-star{flex-shrink:0}.hidden{display:none}.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0.375rem;flex-direction:column;align-items:center}@media (min-width: 640px){.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0px;flex-direction:row;gap:0px}}.s-rating-modal-stars-company .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center;gap:0.5rem}.s-rating-stars-wrapper{display:inline-flex;align-items:center}.s-rating-stars-btn-star{border-width:0px;fill:#d1d5db;padding-left:0.125rem;padding-right:0.125rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-rating-stars-large svg{height:1.75rem;width:1.75rem}.s-rating-stars-medium svg{height:1.25rem;width:1.25rem}.s-rating-stars-small svg{height:1rem;width:1rem}.s-rating-stars-mini svg{height:0.75rem;width:0.75rem}.s-rating-stars-hovered{fill:#fbbf24}.s-rating-stars-selected{fill:#fbbf24}.s-rating-stars-element{display:flex}.s-rating-stars-reviews{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-stars-label{margin-left:0.5rem;margin-right:0.5rem;display:flex;height:fit-content;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-reviews-summary-header .s-rating-stars-selected{fill:var(--color-primary)}.s-reviews-summary-header .s-rating-stars-btn-star{padding:0px}";
8
+ const sallaRatingStarsCss = "/*!twlt*/:host{display:inline-flex;vertical-align:middle}.s-rating-stars-wrapper{display:inline-flex;align-items:center;gap:0.5rem;min-height:1.75rem}.s-rating-stars-wrapper--with-label{min-height:1.75rem}.s-rating-stars-element{display:inline-flex;align-items:center;flex-shrink:0}.s-rating-stars-label,.s-rating-stars-label-without-tag{flex-shrink:0;min-width:5.5rem;min-height:1.25rem;line-height:1.25rem;text-align:end;transition:opacity 0.15s ease}.s-rating-stars-label--empty,.s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-stars-btn-star{flex-shrink:0}.hidden{display:none}.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0.375rem;flex-direction:column;align-items:center}@media (min-width: 640px){.s-rating-modal-product-details-main .s-rating-stars-wrapper{margin-bottom:0px;flex-direction:row;gap:0px}}.s-rating-modal-stars-company .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center;gap:0.5rem}.s-rating-modal-stars-product .s-rating-stars-wrapper{flex-direction:column;align-items:center;justify-content:center}.s-rating-stars-wrapper{display:inline-flex;align-items:center}.s-rating-stars-btn-star{border-width:0px;fill:#d1d5db;padding-left:0.125rem;padding-right:0.125rem;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.s-rating-stars-large svg{height:1.75rem;width:1.75rem}.s-rating-stars-medium svg{height:1.25rem;width:1.25rem}.s-rating-stars-small svg{height:1rem;width:1rem}.s-rating-stars-mini svg{height:0.75rem;width:0.75rem}.s-rating-stars-hovered{fill:#fbbf24}.s-rating-stars-selected{fill:#fbbf24}.s-rating-stars-element{display:flex}.s-rating-stars-reviews{--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-stars-label{margin-left:0.5rem;margin-right:0.5rem;display:flex;height:fit-content;flex-shrink:0;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding-left:0.5rem;padding-right:0.5rem;padding-top:0.25rem;padding-bottom:0.25rem;font-size:0.75rem;line-height:1rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-reviews-summary-header .s-rating-stars-selected{fill:var(--color-primary)}.s-reviews-summary-header .s-rating-stars-btn-star{padding:0px}";
9
9
 
10
10
  const SallaRatingStars = /*@__PURE__*/ proxyCustomElement(class SallaRatingStars extends HTMLElement {
11
11
  constructor() {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SallaVerifiedReview extends Components.SallaVerifiedReview, HTMLElement {}
4
+ export const SallaVerifiedReview: {
5
+ prototype: SallaVerifiedReview;
6
+ new (): SallaVerifiedReview;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,325 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+ import { C as CheckCircle2 } from './check-circle2.js';
6
+ import { d as defineCustomElement$c } from './salla-attachment-view2.js';
7
+ import { d as defineCustomElement$b } from './salla-button2.js';
8
+ import { d as defineCustomElement$a } from './salla-file-upload2.js';
9
+ import { d as defineCustomElement$9 } from './salla-loading2.js';
10
+ import { d as defineCustomElement$8 } from './salla-modal2.js';
11
+ import { d as defineCustomElement$7 } from './salla-placeholder2.js';
12
+ import { d as defineCustomElement$6 } from './salla-rating-modal2.js';
13
+ import { d as defineCustomElement$5 } from './salla-rating-modal-v22.js';
14
+ import { d as defineCustomElement$4 } from './salla-rating-stars2.js';
15
+ import { d as defineCustomElement$3 } from './salla-skeleton2.js';
16
+ import { d as defineCustomElement$2 } from './salla-slider2.js';
17
+
18
+ var Block = `<!-- Generated by IcoMoon.io -->
19
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
20
+ <title>block</title>
21
+ <path d="M27.313 4.687c-6.24-6.239-16.388-6.239-22.628 0-6.239 6.239-6.239 16.389 0 22.628 3.12 3.119 7.216 4.679 11.313 4.679s8.195-1.559 11.313-4.679c6.24-6.239 6.24-16.391 0.001-22.628zM6.572 6.572c2.6-2.6 6.012-3.899 9.428-3.899 2.996 0 5.992 1.001 8.437 3.004l-18.76 18.76c-4.284-5.232-3.987-12.985 0.895-17.865zM25.428 25.428c-4.883 4.879-12.635 5.179-17.867 0.895l18.761-18.76c4.284 5.232 3.987 12.985-0.895 17.865z"></path>
22
+ </svg>
23
+ `;
24
+
25
+ const sallaVerifiedReviewCss = "/*!twlt*/salla-verified-review:empty{display:none}.s-verified-review-container{position:relative;display:flex;flex-direction:column;gap:1rem;width:100%;margin-bottom:0.5rem;margin-top:1.25rem;padding:1rem;overflow:hidden;border:1px solid #e5e7eb;border-radius:1rem;background:#fff}@media (min-width: 768px){.s-verified-review-container{flex-direction:row;align-items:center;gap:1.25rem;padding:1.25rem}}.s-verified-review-glow{pointer-events:none;position:absolute;top:-4rem;inset-inline-end:-2.5rem;width:10rem;height:10rem;border-radius:9999px;background:var(--color-primary, #008c56);opacity:0.12;filter:blur(2rem)}.s-verified-review-media{position:relative;z-index:1;flex-shrink:0}.s-verified-review-image{width:72px;height:72px;border-radius:0.75rem;object-fit:cover;background:#f3f4f6}.s-verified-review-content{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;gap:0.375rem;min-width:0}.s-verified-review-meta{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;margin-bottom:0.25rem}.s-verified-review-badge{display:inline-flex;align-items:center;gap:0.25rem;padding:0.25rem 0.625rem;border-radius:9999px;background:color-mix(in srgb, var(--color-primary, #008c56) 10%, transparent);color:var(--color-primary, #008c56);font-size:0.75rem;font-weight:500}.s-verified-review-badge-icon{display:inline-flex;align-items:center;justify-content:center;width:0.875rem;height:0.875rem}.s-verified-review-badge-icon svg{width:0.875rem;height:0.875rem;fill:currentColor}.s-verified-review-order{font-size:0.75rem;color:#6b7280}.s-verified-review-title{margin:0;color:#111827;font-size:1rem;font-weight:700;line-height:1.375}@media (min-width: 768px){.s-verified-review-title{font-size:1.125rem}}.s-verified-review-subtitle{margin:0;color:#6b7280;font-size:0.875rem;line-height:1.625}.s-verified-review-loyalty{margin:0.125rem 0 0;color:var(--color-primary, #008c56);font-size:0.875rem;font-weight:600}.s-verified-review-actions{position:relative;z-index:1;flex-shrink:0}@media (min-width: 768px){.s-verified-review-actions{margin-inline-start:auto}}.s-verified-review-cta{width:100%}@media (min-width: 768px){.s-verified-review-cta{width:auto}}.s-verified-review-rate-limit-message{text-align:center;color:#6b7280;font-size:0.875rem;margin-top:-1rem}.s-verified-review-rate-limit-footer{margin-top:1rem}.outline{outline-style:solid}";
26
+
27
+ const SallaVerifiedReview$1 = /*@__PURE__*/ proxyCustomElement(class SallaVerifiedReview extends HTMLElement {
28
+ constructor() {
29
+ super();
30
+ this.__registerHost();
31
+ this.ready = false;
32
+ this.eligible = false;
33
+ this.order = null;
34
+ this.productImage = '';
35
+ this.productImageAlt = '';
36
+ this.loyaltyPoints = 0;
37
+ this.titlePurchasedLabel = '';
38
+ this.titleNotPurchasedLabel = '';
39
+ this.subtitleLabel = '';
40
+ this.badgeLabel = '';
41
+ this.orderMetaLabel = '';
42
+ this.ctaLabel = '';
43
+ this.loyaltyLabel = '';
44
+ this.rateLimitMessage = '';
45
+ this.rateLimited = false;
46
+ this.rateLimitTitleLabel = '';
47
+ this.rateLimitDefaultMessageLabel = '';
48
+ this.rateLimitExitLabel = '';
49
+ this.resolvedProductId = null;
50
+ this.handleRateClick = () => {
51
+ if (salla.config.isGuest()) {
52
+ salla.event.dispatch('login::open');
53
+ return;
54
+ }
55
+ if (!this.eligible) {
56
+ return;
57
+ }
58
+ if (this.rateLimited) {
59
+ this.showRateLimitAlert();
60
+ return;
61
+ }
62
+ // Verified purchases pass their order id; unverified-but-eligible reviews
63
+ // pass `null` so the modal submits the review without an order.
64
+ const orderId = this.order?.id ?? null;
65
+ const modal = this.ensureRatingModal();
66
+ requestAnimationFrame(async () => {
67
+ await modal.setOrder?.(orderId, this.resolvedProductId);
68
+ modal.open?.();
69
+ });
70
+ };
71
+ }
72
+ async componentWillLoad() {
73
+ try {
74
+ await salla.onReady();
75
+ await salla.lang.onLoaded();
76
+ await this.loadTranslations();
77
+ this.resolvedProductId =
78
+ this.productId || this.host.dataset.productId || salla.config.get('page.id');
79
+ if (!this.resolvedProductId) {
80
+ return;
81
+ }
82
+ if (salla.config.isGuest()) {
83
+ return;
84
+ }
85
+ salla.event.on('rating::products-rated', (_response, payload) => {
86
+ if (String(payload?.product_id) === String(this.resolvedProductId)) {
87
+ this.eligible = false;
88
+ }
89
+ });
90
+ await Promise.all([this.loadProductImage(), this.loadEligibility()]);
91
+ this.ready = true;
92
+ }
93
+ catch (e) {
94
+ salla?.logger?.warn?.('salla-verified-review: init failed', e);
95
+ }
96
+ }
97
+ async loadTranslations() {
98
+ const setNestedAsync = (lang, key, value) => {
99
+ return new Promise(resolve => {
100
+ salla.helpers.setNested(salla.lang.messages[lang], key, value);
101
+ resolve(true);
102
+ });
103
+ };
104
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_purchased', 'جربت هذا المنتج؟');
105
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.title_purchased', 'You tried this product?');
106
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
107
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.title_not_purchased', 'Tried this product? Share your experience 🎉');
108
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.subtitle', 'شارك رأيك وساعد غيرك يختار بثقة.');
109
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.subtitle', 'Share your opinion and help others choose with confidence.');
110
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.badge', 'عملية شراء موثقة');
111
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.badge', 'Verified purchase');
112
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.order_meta', 'طلب #:id');
113
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.order_meta', 'Order #:id');
114
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.cta', 'تقييم المنتج');
115
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.cta', 'Rate product');
116
+ await setNestedAsync('ar.trans', 'pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
117
+ await setNestedAsync('en.trans', 'pages.rating.verified_review.loyalty_points', '🏆 Earn +:points loyalty points by writing a review');
118
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_title', 'تم تقييد حسابك');
119
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_title', 'Your account has been restricted');
120
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
121
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_message', "You've exceeded the allowed limit for rating products you haven't purchased yet.");
122
+ await setNestedAsync('ar.trans', 'pages.rating.rate_limit_exit', 'خروج');
123
+ await setNestedAsync('en.trans', 'pages.rating.rate_limit_exit', 'Exit');
124
+ this.titlePurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_purchased', 'اشتريت هذا! شارك تجربتك 🎉');
125
+ this.titleNotPurchasedLabel = salla.lang.getWithDefault('pages.rating.verified_review.title_not_purchased', 'جربت هذا المنتج؟ شارك تجربتك 🎉');
126
+ this.subtitleLabel = salla.lang.getWithDefault('pages.rating.verified_review.subtitle', 'ساعد المتسوقين الآخرين بمراجعة هذا المنتج. رأيك يهم.');
127
+ this.badgeLabel = salla.lang.getWithDefault('pages.rating.verified_review.badge', 'عملية شراء موثقة');
128
+ this.orderMetaLabel = salla.lang.getWithDefault('pages.rating.verified_review.order_meta', 'طلب #:id');
129
+ this.ctaLabel = salla.lang.getWithDefault('pages.rating.verified_review.cta', 'قيِّم المنتج');
130
+ this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
131
+ this.rateLimitTitleLabel = salla.lang.getWithDefault('pages.rating.rate_limit_title', 'تم تقييد حسابك');
132
+ this.rateLimitDefaultMessageLabel = salla.lang.getWithDefault('pages.rating.rate_limit_message', 'تجاوزت الحد المسموح لتقييم منتجات لم تشتريها بعد.');
133
+ this.rateLimitExitLabel = salla.lang.getWithDefault('pages.rating.rate_limit_exit', 'خروج');
134
+ }
135
+ async loadProductImage() {
136
+ try {
137
+ const response = await salla.api.withoutNotifier(() => salla.product.api.getDetails(this.resolvedProductId));
138
+ const product = response?.data;
139
+ this.productImage = product?.image?.url || salla.url.cdn('images/s-empty.png');
140
+ this.productImageAlt = product?.image?.alt || product?.name || '';
141
+ }
142
+ catch {
143
+ this.productImage = salla.url.cdn('images/s-empty.png');
144
+ }
145
+ }
146
+ async fetchEligibility(productId) {
147
+ const response = await salla.api.withoutNotifier(() => salla.rating.api.productEligibility(productId));
148
+ return response?.data;
149
+ }
150
+ async loadEligibility() {
151
+ if (!this.resolvedProductId) {
152
+ return;
153
+ }
154
+ const eligibility = await this.fetchEligibility(this.resolvedProductId);
155
+ if (!eligibility) {
156
+ this.eligible = false;
157
+ this.order = null;
158
+ return;
159
+ }
160
+ this.eligible = eligibility.eligible;
161
+ if (eligibility.code === 'community_review_daily_limit') {
162
+ this.rateLimitMessage = eligibility.message || this.rateLimitDefaultMessageLabel;
163
+ this.rateLimited = true;
164
+ this.eligible = true;
165
+ }
166
+ this.order =
167
+ this.eligible && eligibility.order_id
168
+ ? {
169
+ id: eligibility.order_id,
170
+ reference_id: eligibility.reference_id,
171
+ created_at: eligibility.created_at,
172
+ }
173
+ : null;
174
+ const loyaltyPoints = salla.config.get('store.settings.rating.rating_product_points');
175
+ this.loyaltyPoints = loyaltyPoints ? Number(loyaltyPoints) : 0;
176
+ }
177
+ getOrderMetaText() {
178
+ if (!this.order) {
179
+ return '';
180
+ }
181
+ const orderMetaLabel = this.orderMetaLabel.replace(':id', String(this.order.reference_id || this.order.id));
182
+ const orderCreatedAt = this.order.created_at ? new Date(this.order.created_at) : null;
183
+ return orderMetaLabel + (orderCreatedAt ? ` • ${this.formatOrderDate(orderCreatedAt)}` : '');
184
+ }
185
+ formatOrderDate(date) {
186
+ const month = date.toLocaleDateString(navigator.language, { month: 'short' });
187
+ const day = String(date.getDate()).padStart(2, '0');
188
+ return `${date.getFullYear()} ${month} ${day}`;
189
+ }
190
+ getLoyaltyText() {
191
+ if (!this.loyaltyPoints) {
192
+ return '';
193
+ }
194
+ if (!this.loyaltyLabel) {
195
+ this.loyaltyLabel = salla.lang.getWithDefault('pages.rating.verified_review.loyalty_points', 'اكسب +:points نقطة ولاء بكتابة مراجعة 🏆');
196
+ }
197
+ return this.loyaltyLabel.replace(':points', String(this.loyaltyPoints));
198
+ }
199
+ /**
200
+ * Shown when the shopper tries to rate a product after the eligibility
201
+ * check reported the community-review daily limit was hit.
202
+ */
203
+ showRateLimitAlert() {
204
+ requestAnimationFrame(() => {
205
+ this.rateLimitModal?.setTitle?.(this.rateLimitTitleLabel);
206
+ this.rateLimitModal?.open?.();
207
+ });
208
+ }
209
+ getRateLimitModal() {
210
+ 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))));
211
+ }
212
+ ensureRatingModal() {
213
+ let modal = document.querySelector('salla-rating-modal');
214
+ if (!modal) {
215
+ modal = document.createElement('salla-rating-modal');
216
+ document.body.appendChild(modal);
217
+ }
218
+ return modal;
219
+ }
220
+ render() {
221
+ if (salla.config.isGuest() || !this.ready || !this.resolvedProductId) {
222
+ return null;
223
+ }
224
+ if (!this.eligible) {
225
+ return null;
226
+ }
227
+ const title = this.order ? this.titlePurchasedLabel : this.titleNotPurchasedLabel;
228
+ const loyaltyText = this.order ? this.getLoyaltyText() : null;
229
+ const orderMeta = this.getOrderMetaText();
230
+ 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()));
231
+ }
232
+ get host() { return this; }
233
+ static get style() { return sallaVerifiedReviewCss; }
234
+ }, [0, "salla-verified-review", {
235
+ "productId": [520, "product-id"],
236
+ "ready": [32],
237
+ "eligible": [32],
238
+ "order": [32],
239
+ "productImage": [32],
240
+ "productImageAlt": [32],
241
+ "loyaltyPoints": [32],
242
+ "titlePurchasedLabel": [32],
243
+ "titleNotPurchasedLabel": [32],
244
+ "subtitleLabel": [32],
245
+ "badgeLabel": [32],
246
+ "orderMetaLabel": [32],
247
+ "ctaLabel": [32],
248
+ "loyaltyLabel": [32],
249
+ "rateLimitMessage": [32],
250
+ "rateLimited": [32]
251
+ }]);
252
+ function defineCustomElement$1() {
253
+ if (typeof customElements === "undefined") {
254
+ return;
255
+ }
256
+ const components = ["salla-verified-review", "salla-attachment-view", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-modal", "salla-rating-modal-v2", "salla-rating-stars", "salla-skeleton", "salla-slider"];
257
+ components.forEach(tagName => { switch (tagName) {
258
+ case "salla-verified-review":
259
+ if (!customElements.get(tagName)) {
260
+ customElements.define(tagName, SallaVerifiedReview$1);
261
+ }
262
+ break;
263
+ case "salla-attachment-view":
264
+ if (!customElements.get(tagName)) {
265
+ defineCustomElement$c();
266
+ }
267
+ break;
268
+ case "salla-button":
269
+ if (!customElements.get(tagName)) {
270
+ defineCustomElement$b();
271
+ }
272
+ break;
273
+ case "salla-file-upload":
274
+ if (!customElements.get(tagName)) {
275
+ defineCustomElement$a();
276
+ }
277
+ break;
278
+ case "salla-loading":
279
+ if (!customElements.get(tagName)) {
280
+ defineCustomElement$9();
281
+ }
282
+ break;
283
+ case "salla-modal":
284
+ if (!customElements.get(tagName)) {
285
+ defineCustomElement$8();
286
+ }
287
+ break;
288
+ case "salla-placeholder":
289
+ if (!customElements.get(tagName)) {
290
+ defineCustomElement$7();
291
+ }
292
+ break;
293
+ case "salla-rating-modal":
294
+ if (!customElements.get(tagName)) {
295
+ defineCustomElement$6();
296
+ }
297
+ break;
298
+ case "salla-rating-modal-v2":
299
+ if (!customElements.get(tagName)) {
300
+ defineCustomElement$5();
301
+ }
302
+ break;
303
+ case "salla-rating-stars":
304
+ if (!customElements.get(tagName)) {
305
+ defineCustomElement$4();
306
+ }
307
+ break;
308
+ case "salla-skeleton":
309
+ if (!customElements.get(tagName)) {
310
+ defineCustomElement$3();
311
+ }
312
+ break;
313
+ case "salla-slider":
314
+ if (!customElements.get(tagName)) {
315
+ defineCustomElement$2();
316
+ }
317
+ break;
318
+ } });
319
+ }
320
+ defineCustomElement$1();
321
+
322
+ const SallaVerifiedReview = SallaVerifiedReview$1;
323
+ const defineCustomElement = defineCustomElement$1;
324
+
325
+ export { SallaVerifiedReview, defineCustomElement };
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { d as getDefaultExportFromCjs } from './index-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.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-FwRU05yW.js';
4
+ import { d as getDefaultExportFromCjs } from './index-B64o_70M.js';
5
5
 
6
6
  function _mergeNamespaces(n, m) {
7
7
  m.forEach(function (e) {