@salla.sa/twilight-components 2.14.545 → 2.14.547

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 (350) hide show
  1. package/dist/cjs/{filepond-B5aWlI3l.js → filepond-DFvIrFhD.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-BYq39KHd.js → filepond-plugin-file-poster-CHg39XJj.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-Bi3TAsJv.js → filepond-plugin-file-validate-size-kGmw5h8R.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-Ck6S5TuZ.js → filepond-plugin-file-validate-type-CQSi2A-P.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-DbsdnH5j.js → filepond-plugin-image-edit-M4teY-We.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-x7TfJR-2.js → filepond-plugin-image-exif-orientation-gBQo0ofe.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-CrU7vIRk.js → filepond-plugin-image-preview-DTmK0D_I.js} +1 -1
  8. package/dist/cjs/{index-DGpOR-TH.js → index-kkUUTdZu.js} +14 -14
  9. package/dist/cjs/{intlTelInput-DKAXRecW.js → intlTelInput-CVOJSgbc.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 +7 -4
  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-DQDSSf6Q.js → vanilla-picker-itKa_-k9.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-gifting/salla-gifting.js +6 -3
  111. package/dist/collection/components/salla-modal/salla-modal.css +11 -0
  112. package/dist/collection/components/salla-modal/salla-modal.js +33 -6
  113. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +253 -104
  114. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +34 -21
  115. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +69 -10
  116. package/dist/collection/components/salla-rating-stars/salla-rating-stars.css +5 -0
  117. package/dist/collection/components/salla-verified-review/salla-verified-review.css +162 -0
  118. package/dist/collection/components/salla-verified-review/salla-verified-review.js +264 -0
  119. package/dist/components/index.js +2 -2
  120. package/dist/components/salla-comment-item2.js +1 -1
  121. package/dist/components/salla-comments.js +44 -1
  122. package/dist/components/salla-gifting.js +6 -3
  123. package/dist/components/salla-modal2.js +12 -4
  124. package/dist/components/salla-rating-modal-v22.js +208 -101
  125. package/dist/components/salla-rating-modal.js +1 -591
  126. package/dist/components/salla-rating-modal2.js +613 -0
  127. package/dist/components/salla-rating-stars2.js +1 -1
  128. package/dist/components/salla-verified-review.d.ts +11 -0
  129. package/dist/components/salla-verified-review.js +325 -0
  130. package/dist/esm/{filepond-wd7_MQSV.js → filepond-VE8WYfjh.js} +1 -1
  131. package/dist/esm/{filepond-plugin-file-poster-CkWxCmZT.js → filepond-plugin-file-poster-B5RS-KUm.js} +1 -1
  132. package/dist/esm/{filepond-plugin-file-validate-size-DlWS-oUK.js → filepond-plugin-file-validate-size-BdgcVHpq.js} +1 -1
  133. package/dist/esm/{filepond-plugin-file-validate-type-mdpFM1TG.js → filepond-plugin-file-validate-type-CmH44b6j.js} +1 -1
  134. package/dist/esm/{filepond-plugin-image-edit-BqPLKgZU.js → filepond-plugin-image-edit-B-XPDjr0.js} +1 -1
  135. package/dist/esm/{filepond-plugin-image-exif-orientation-CMqFjPu7.js → filepond-plugin-image-exif-orientation-ENeGT6qs.js} +1 -1
  136. package/dist/esm/{filepond-plugin-image-preview-DjCwk-CI.js → filepond-plugin-image-preview-D9RKj5A_.js} +1 -1
  137. package/dist/esm/{index-CHZfg_a9.js → index-RGVg6FYq.js} +14 -14
  138. package/dist/esm/{intlTelInput-B5Q8rrU9.js → intlTelInput-ClLDqBrH.js} +1 -1
  139. package/dist/esm/loader.js +3 -3
  140. package/dist/esm/{mail-DzAIgzdz.js → mail-DmgxDvXL.js} +2 -2
  141. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  142. package/dist/esm/salla-accordion_6.entry.js +12 -5
  143. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  144. package/dist/esm/salla-advertisement.entry.js +1 -1
  145. package/dist/esm/salla-alert_2.entry.js +1 -1
  146. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  147. package/dist/esm/salla-apps-icons.entry.js +1 -1
  148. package/dist/esm/salla-attachment-view_9.entry.js +10 -10
  149. package/dist/esm/salla-badge.entry.js +1 -1
  150. package/dist/esm/salla-basket-gap.entry.js +1 -1
  151. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  152. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  153. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  154. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  155. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  156. package/dist/esm/salla-comment-factors.entry.js +1 -1
  157. package/dist/esm/{salla-comment-form_8.entry.js → salla-comment-form_9.entry.js} +264 -5
  158. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  159. package/dist/esm/salla-contacts.entry.js +3 -3
  160. package/dist/esm/salla-cookies-bar.entry.js +1 -1
  161. package/dist/esm/salla-count-down.entry.js +1 -1
  162. package/dist/esm/salla-custom-fields.entry.js +1 -1
  163. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  164. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  165. package/dist/esm/salla-filters-widget.entry.js +1 -1
  166. package/dist/esm/salla-filters.entry.js +1 -1
  167. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  168. package/dist/esm/salla-gifting.entry.js +7 -4
  169. package/dist/esm/salla-hook.entry.js +1 -1
  170. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  171. package/dist/esm/salla-installment.entry.js +1 -1
  172. package/dist/esm/salla-list-tile.entry.js +1 -1
  173. package/dist/esm/salla-localization-modal.entry.js +1 -1
  174. package/dist/esm/salla-login-modal.entry.js +1 -1
  175. package/dist/esm/salla-loyalty-banner_10.entry.js +3 -3
  176. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  177. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  178. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  179. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  180. package/dist/esm/salla-loyalty.entry.js +1 -1
  181. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  182. package/dist/esm/salla-map_2.entry.js +1 -1
  183. package/dist/esm/salla-menu.entry.js +1 -1
  184. package/dist/esm/salla-metadata.entry.js +1 -1
  185. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  186. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  187. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  188. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  189. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  190. package/dist/esm/salla-offer-modal.entry.js +1 -1
  191. package/dist/esm/salla-offer.entry.js +1 -1
  192. package/dist/esm/salla-order-branch.entry.js +1 -1
  193. package/dist/esm/salla-order-cancel.entry.js +1 -1
  194. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  195. package/dist/esm/salla-order-details-options.entry.js +1 -1
  196. package/dist/esm/salla-order-details.entry.js +1 -1
  197. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  198. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  199. package/dist/esm/salla-order-edit.entry.js +1 -1
  200. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  201. package/dist/esm/salla-order-shipments.entry.js +1 -1
  202. package/dist/esm/salla-order-summary.entry.js +1 -1
  203. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  204. package/dist/esm/salla-orders.entry.js +1 -1
  205. package/dist/esm/salla-payments.entry.js +1 -1
  206. package/dist/esm/salla-placeholder.entry.js +1 -1
  207. package/dist/esm/salla-price-range.entry.js +1 -1
  208. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  209. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  210. package/dist/esm/salla-products-list.entry.js +1 -1
  211. package/dist/esm/salla-products-slider.entry.js +1 -1
  212. package/dist/esm/salla-quick-order.entry.js +3 -3
  213. package/dist/esm/salla-rating-modal-v2.entry.js +208 -103
  214. package/dist/esm/salla-rating-modal.entry.js +23 -8
  215. package/dist/esm/salla-review-factors-tags.entry.js +1 -1
  216. package/dist/esm/salla-review-order-item.entry.js +1 -1
  217. package/dist/esm/salla-scopes.entry.js +1 -1
  218. package/dist/esm/salla-search.entry.js +1 -1
  219. package/dist/esm/salla-skeleton.entry.js +1 -1
  220. package/dist/esm/salla-slider.entry.js +1 -1
  221. package/dist/esm/salla-social-share.entry.js +4 -4
  222. package/dist/esm/salla-social.entry.js +1 -1
  223. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  224. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  225. package/dist/esm/salla-tooltip.entry.js +1 -1
  226. package/dist/esm/salla-trust-badges.entry.js +1 -1
  227. package/dist/esm/salla-user-menu.entry.js +1 -1
  228. package/dist/esm/salla-user-profile.entry.js +1 -1
  229. package/dist/esm/salla-user-settings.entry.js +1 -1
  230. package/dist/esm/salla-verify.entry.js +3 -3
  231. package/dist/esm/salla-wallet.entry.js +1 -1
  232. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  233. package/dist/esm/twilight.js +3 -3
  234. package/dist/esm/{vanilla-picker-uNDULydX.js → vanilla-picker-DWGLcuLb.js} +1 -1
  235. package/dist/twilight/{p-f07bbbc7.entry.js → p-01dee064.entry.js} +1 -1
  236. package/dist/twilight/{p-72ee7071.entry.js → p-03de43a3.entry.js} +1 -1
  237. package/dist/twilight/{p-5d9a85b0.entry.js → p-067e7e32.entry.js} +1 -1
  238. package/dist/twilight/{p-c9146d50.entry.js → p-08fa1534.entry.js} +1 -1
  239. package/dist/twilight/{p-84380d4a.entry.js → p-0adea51c.entry.js} +1 -1
  240. package/dist/twilight/{p-8fc6e860.entry.js → p-15fea4e9.entry.js} +1 -1
  241. package/dist/twilight/{p-25d9f1b2.entry.js → p-1c40b212.entry.js} +1 -1
  242. package/dist/twilight/{p-63b01300.entry.js → p-1cef7ea2.entry.js} +1 -1
  243. package/dist/twilight/{p-346366ba.entry.js → p-1f7d964d.entry.js} +1 -1
  244. package/dist/twilight/{p-832f3a98.entry.js → p-25c61f91.entry.js} +1 -1
  245. package/dist/twilight/{p-12836275.entry.js → p-272857bd.entry.js} +1 -1
  246. package/dist/twilight/{p-6d961d73.entry.js → p-2ae585c9.entry.js} +1 -1
  247. package/dist/twilight/{p-766a3291.entry.js → p-2ba184be.entry.js} +1 -1
  248. package/dist/twilight/{p-788fd019.entry.js → p-2d2e29fe.entry.js} +1 -1
  249. package/dist/twilight/{p-8780a467.entry.js → p-3286bfc2.entry.js} +1 -1
  250. package/dist/twilight/{p-345532e5.entry.js → p-36359288.entry.js} +1 -1
  251. package/dist/twilight/{p-2d01a4f5.entry.js → p-3713dbff.entry.js} +1 -1
  252. package/dist/twilight/{p-dd823fde.entry.js → p-380b8531.entry.js} +1 -1
  253. package/dist/twilight/{p-391a2ec6.entry.js → p-3ffe6fa7.entry.js} +1 -1
  254. package/dist/twilight/{p-0495bfac.entry.js → p-44595831.entry.js} +1 -1
  255. package/dist/twilight/{p-0749cc55.entry.js → p-45734a3b.entry.js} +1 -1
  256. package/dist/twilight/{p-d0d3609c.entry.js → p-459ce78a.entry.js} +1 -1
  257. package/dist/twilight/{p-419499d6.entry.js → p-4663f4da.entry.js} +1 -1
  258. package/dist/twilight/{p-28248b6b.entry.js → p-4d12b009.entry.js} +1 -1
  259. package/dist/twilight/{p-74529abb.entry.js → p-4e904400.entry.js} +1 -1
  260. package/dist/twilight/{p-67b91397.entry.js → p-541bf8ef.entry.js} +1 -1
  261. package/dist/twilight/{p-32e3daa3.entry.js → p-57516065.entry.js} +1 -1
  262. package/dist/twilight/{p-5ded000f.entry.js → p-5819795e.entry.js} +1 -1
  263. package/dist/twilight/{p-51a062cd.entry.js → p-582d081e.entry.js} +1 -1
  264. package/dist/twilight/{p-c816b198.entry.js → p-5b6fd8b5.entry.js} +1 -1
  265. package/dist/twilight/p-61bc2e97.entry.js +4 -0
  266. package/dist/twilight/{p-93aa1b67.entry.js → p-6288de29.entry.js} +1 -1
  267. package/dist/twilight/{p-9d224252.entry.js → p-66ca510c.entry.js} +1 -1
  268. package/dist/twilight/{p-f1d8729d.entry.js → p-696cb80c.entry.js} +1 -1
  269. package/dist/twilight/{p-35557962.entry.js → p-6971174e.entry.js} +1 -1
  270. package/dist/twilight/{p-3672d4f7.entry.js → p-6cc61a70.entry.js} +1 -1
  271. package/dist/twilight/{p-90e5c3ab.entry.js → p-6ec304ac.entry.js} +1 -1
  272. package/dist/twilight/{p-c287e498.entry.js → p-70ef6b79.entry.js} +1 -1
  273. package/dist/twilight/{p-e36f62a9.entry.js → p-8f1e13c5.entry.js} +1 -1
  274. package/dist/twilight/{p-afb03ee5.entry.js → p-9340d397.entry.js} +1 -1
  275. package/dist/twilight/{p-b279e0bb.entry.js → p-93ac34c7.entry.js} +1 -1
  276. package/dist/twilight/{p-64efbb2c.entry.js → p-95519dae.entry.js} +1 -1
  277. package/dist/twilight/{p-235d7596.entry.js → p-97a7d4cf.entry.js} +1 -1
  278. package/dist/twilight/{p-1419a93d.entry.js → p-9a8a1b47.entry.js} +1 -1
  279. package/dist/twilight/{p-c948a8a8.entry.js → p-9b791c53.entry.js} +1 -1
  280. package/dist/twilight/{p-c603722c.entry.js → p-9fafcedd.entry.js} +1 -1
  281. package/dist/twilight/{p-PCp-0mbL.js → p-BFco-_Zl.js} +1 -1
  282. package/dist/twilight/{p-ryHWESoh.js → p-BVamrCNR.js} +1 -1
  283. package/dist/twilight/{p-DtV7npW9.js → p-B_QMCKVO.js} +1 -1
  284. package/dist/twilight/{p-BPkSO6gd.js → p-C8tT82U5.js} +1 -1
  285. package/dist/twilight/{p-CdgES2Of.js → p-CkrRlrjj.js} +1 -1
  286. package/dist/twilight/{p-D9VjvNQq.js → p-D42LpeIl.js} +2 -2
  287. package/dist/twilight/{p-BWvO3cE-.js → p-DT4oJGXj.js} +1 -1
  288. package/dist/twilight/{p-DzAIgzdz.js → p-DmgxDvXL.js} +1 -1
  289. package/dist/twilight/{p-DO7S0QBX.js → p-DqHR-XSp.js} +1 -1
  290. package/dist/twilight/{p-ZinKLSYw.js → p-DvDYmxRj.js} +1 -1
  291. package/dist/twilight/{p-CHZfg_a9.js → p-RGVg6FYq.js} +2 -2
  292. package/dist/twilight/{p-17d49c87.entry.js → p-a0543daf.entry.js} +1 -1
  293. package/dist/twilight/p-a32e7b62.entry.js +4 -0
  294. package/dist/twilight/{p-b33392c6.entry.js → p-a4e382fb.entry.js} +1 -1
  295. package/dist/twilight/{p-fb1ad954.entry.js → p-a56851b0.entry.js} +1 -1
  296. package/dist/twilight/{p-5933ba05.entry.js → p-a8af052d.entry.js} +1 -1
  297. package/dist/twilight/{p-88f50d7e.entry.js → p-a9476bc3.entry.js} +1 -1
  298. package/dist/twilight/p-acd88f45.entry.js +4 -0
  299. package/dist/twilight/{p-aa4daadf.entry.js → p-ad884517.entry.js} +1 -1
  300. package/dist/twilight/{p-06d9e1c5.entry.js → p-aea12a46.entry.js} +1 -1
  301. package/dist/twilight/{p-2db5e829.entry.js → p-af39795f.entry.js} +1 -1
  302. package/dist/twilight/{p-0573a498.entry.js → p-aff22960.entry.js} +1 -1
  303. package/dist/twilight/{p-c81bce54.entry.js → p-b02c4a37.entry.js} +1 -1
  304. package/dist/twilight/{p-2305edcc.entry.js → p-b164cb76.entry.js} +1 -1
  305. package/dist/twilight/p-b73e784e.entry.js +4 -0
  306. package/dist/twilight/{p-82fe9f82.entry.js → p-b9a8f977.entry.js} +1 -1
  307. package/dist/twilight/{p-72f54055.entry.js → p-bbc8f3dd.entry.js} +1 -1
  308. package/dist/twilight/{p-f168109d.entry.js → p-bc9585d0.entry.js} +1 -1
  309. package/dist/twilight/{p-87e10a68.entry.js → p-bef1df8a.entry.js} +1 -1
  310. package/dist/twilight/{p-b38c4e39.entry.js → p-c1be2f63.entry.js} +1 -1
  311. package/dist/twilight/{p-69119c00.entry.js → p-c353a96a.entry.js} +1 -1
  312. package/dist/twilight/{p-5074de7d.entry.js → p-c6859fd3.entry.js} +1 -1
  313. package/dist/twilight/{p-a785b49f.entry.js → p-c7abf516.entry.js} +1 -1
  314. package/dist/twilight/{p-1ea25389.entry.js → p-cdad8f41.entry.js} +1 -1
  315. package/dist/twilight/{p-25f51a7e.entry.js → p-cf488159.entry.js} +1 -1
  316. package/dist/twilight/{p-37163aef.entry.js → p-d02688da.entry.js} +1 -1
  317. package/dist/twilight/{p-c26043ff.entry.js → p-d03e6073.entry.js} +1 -1
  318. package/dist/twilight/{p-f1dfe18b.entry.js → p-d2c1f52b.entry.js} +1 -1
  319. package/dist/twilight/{p-54e2d320.entry.js → p-d40958e4.entry.js} +1 -1
  320. package/dist/twilight/{p-ec281904.entry.js → p-d46ef139.entry.js} +1 -1
  321. package/dist/twilight/{p-2de58591.entry.js → p-d67b4059.entry.js} +1 -1
  322. package/dist/twilight/{p-c92edd6f.entry.js → p-d6ea5ca7.entry.js} +1 -1
  323. package/dist/twilight/{p-2d62c947.entry.js → p-d835a5dd.entry.js} +1 -1
  324. package/dist/twilight/{p-6c18cc72.entry.js → p-dd507247.entry.js} +1 -1
  325. package/dist/twilight/{p-c2fe2dbe.entry.js → p-df8d9655.entry.js} +1 -1
  326. package/dist/twilight/{p-98108ebe.entry.js → p-e304b491.entry.js} +1 -1
  327. package/dist/twilight/{p-ffdf5f92.entry.js → p-e9b2c4a5.entry.js} +1 -1
  328. package/dist/twilight/{p-4ac9a3b6.entry.js → p-eab06e84.entry.js} +1 -1
  329. package/dist/twilight/{p-d9b0fa64.entry.js → p-eefcc343.entry.js} +1 -1
  330. package/dist/twilight/{p-a0561bd1.entry.js → p-ef10024f.entry.js} +1 -1
  331. package/dist/twilight/{p-989f2adb.entry.js → p-f5f420c4.entry.js} +1 -1
  332. package/dist/twilight/{p-3f5bc617.entry.js → p-f8609873.entry.js} +1 -1
  333. package/dist/twilight/{p-bead6e6f.entry.js → p-f8e6aaac.entry.js} +1 -1
  334. package/dist/twilight/{p-3a8be7df.entry.js → p-f93cab86.entry.js} +1 -1
  335. package/dist/twilight/{p-93dabb47.entry.js → p-fcc66e23.entry.js} +1 -1
  336. package/dist/twilight/{p-6ff53523.entry.js → p-fd94973d.entry.js} +1 -1
  337. package/dist/twilight/{p-279a1661.entry.js → p-fd9d7372.entry.js} +1 -1
  338. package/dist/twilight/twilight.esm.js +1 -1
  339. package/dist/types/components/salla-comments/interfaces.d.ts +15 -0
  340. package/dist/types/components/salla-comments/salla-comments.d.ts +5 -2
  341. package/dist/types/components/salla-modal/salla-modal.d.ts +7 -2
  342. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +20 -5
  343. package/dist/types/components/salla-rating-modal/salla-rating-modal.d.ts +10 -2
  344. package/dist/types/components/salla-verified-review/salla-verified-review.d.ts +51 -0
  345. package/dist/types/components.d.ts +59 -16
  346. package/package.json +5 -5
  347. package/dist/twilight/p-0ae39262.entry.js +0 -4
  348. package/dist/twilight/p-12f61ae1.entry.js +0 -4
  349. package/dist/twilight/p-ab41d26c.entry.js +0 -4
  350. package/dist/twilight/p-e5a3b689.entry.js +0 -4
@@ -0,0 +1,613 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+ import { a as anime } from './anime.es.js';
6
+ import { C as CheckCircle2 } from './check-circle2.js';
7
+ import { I as ImageIcon } from './image.js';
8
+ import { M as MailIcon } from './mail.js';
9
+ import { d as defineCustomElement$4, S as ShippingFast } from './salla-rating-modal-v22.js';
10
+ import { W as WishListIcon } from './star.js';
11
+ import { W as WhatsappIcon } from './whatsapp2.js';
12
+ import { H as Helper } from './Helper.js';
13
+ import { d as defineCustomElement$a } from './salla-attachment-view2.js';
14
+ import { d as defineCustomElement$9 } from './salla-button2.js';
15
+ import { d as defineCustomElement$8 } from './salla-file-upload2.js';
16
+ import { d as defineCustomElement$7 } from './salla-loading2.js';
17
+ import { d as defineCustomElement$6 } from './salla-modal2.js';
18
+ import { d as defineCustomElement$5 } from './salla-placeholder2.js';
19
+ import { d as defineCustomElement$3 } from './salla-rating-stars2.js';
20
+ import { d as defineCustomElement$2 } from './salla-skeleton2.js';
21
+ import { d as defineCustomElement$1 } from './salla-slider2.js';
22
+
23
+ const sallaRatingModalCss = "/*!twlt*/.s-rating-modal-uploader{overflow:visible}.s-rating-modal-uploader.is-opened{height:auto !important;opacity:1 !important;overflow:visible;pointer-events:auto !important;margin-bottom:1rem}.s-rating-modal-uploader .s-file-upload-gallery{overflow:visible}.s-rating-modal-edit-wrapper,.s-rating-modal-wrapper{transition:height 0.15s ease}.s-rating-modal-product-details{padding-bottom:0.5rem}.s-rating-modal-comment{margin-top:0.35rem}.s-rating-modal-product{margin-bottom:1rem}.s-rating-modal-product-img{position:absolute !important;inset:0;display:block;width:100% !important;max-width:100% !important;height:100% !important;object-fit:cover}.s-rating-modal-product-title{font-size:0.95rem;font-weight:600;line-height:1.5;margin:0}.s-rating-modal-stars-product{margin-top:0.5rem}.s-rating-modal-loyalty-points-note-container{display:flex;align-items:center;gap:0.625rem;width:100%;margin-top:1.5rem;margin-bottom:0.75rem;padding:0.75rem;border-radius:0.5rem;background-color:#E6F4EA}.s-rating-modal-loyalty-points-note-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;color:#1B7F5C}.s-rating-modal-loyalty-points-note-icon svg{width:1.5rem;height:1.5rem;fill:currentColor}.s-rating-modal-loyalty-points-note-text{flex:1;margin:0;font-size:0.875rem;line-height:1.25rem;color:#1f2937}.s-rating-modal-product-details-main{display:flex;align-items:center;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-info-row{display:flex;align-items:center;gap:0.6rem;margin-bottom:0.5rem;padding-bottom:0;border-bottom:0}.s-rating-modal-product-main-review{width:100%;text-align:right}.s-rating-modal-product-rating-rows{display:grid;gap:0.45rem;margin:0.2rem 0 0.7rem}.s-rating-modal-product-rating-row{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:2rem}.s-rating-modal-product-rating-row salla-rating-stars{flex-shrink:0}.s-rating-modal-product-rating-row .s-rating-stars-wrapper{align-items:center;min-height:1.75rem}.s-rating-modal-product-rating-row .s-rating-stars-label,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag{min-width:auto;min-height:1.25rem;line-height:1.25rem;font-size:0.8rem;color:#5b6470;white-space:nowrap;text-align:end;transition:opacity 0.15s ease}.s-rating-modal-product-rating-row .s-rating-stars-label--empty,.s-rating-modal-product-rating-row .s-rating-stars-label-without-tag--empty{opacity:0}.s-rating-modal-product-factor-name{color:#5b6470;font-size:0.9rem;line-height:1.25}.s-rating-modal-product-factor-required{color:#f87171;margin-inline-start:0.2rem}.s-rating-modal-product-img-wrap{position:relative;width:5rem !important;min-width:5rem !important;max-width:5rem !important;height:3.5rem !important;flex-shrink:0 !important;overflow:hidden;border-radius:0.375rem;background:#f3f4f6}.mt-0{margin-top:0px}.block{display:block}.hidden{display:none}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.outline{outline-style:solid}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.s-comments-item-like-btn{margin-top:0.5rem}.s-comments-item-like-btn .s-button-text{display:flex;flex-direction:row-reverse;gap:0.5rem}.s-comments-item-like-btn span svg{height:0.75rem;width:0.75rem}.s-rating-modal-wrapper{margin-bottom:1.5rem;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-edit-wrapper{margin-top:0.625rem}.s-rating-modal-footer{position:relative;display:flex;align-items:center;justify-content:space-between}.s-rating-modal-footer salla-button button{padding-left:1rem !important;padding-right:1rem !important;font-size:0.75rem !important}.s-rating-modal-btn{height:2.5rem;padding-left:1rem;padding-right:1rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;color:var(--color-primary);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-btn:hover{color:var(--color-primary-dark)}.s-rating-modal-dots{display:flex;flex-shrink:0;flex-grow:1;justify-content:center}.s-rating-modal-dots>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.375rem * var(--tw-space-x-reverse));margin-left:calc(0.375rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-dots{text-align:center}.s-rating-modal-dots:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-step-dot{height:0.625rem;width:0.625rem;border-radius:9999px;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:300ms}.s-rating-modal-step{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-active{--tw-translate-x:0px;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:1}.s-rating-modal-unactive{--tw-translate-x:0.75rem;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));opacity:0}.s-rating-modal-hidden{display:none !important}.s-rating-modal-unvisiable{pointer-events:none;opacity:0}.s-rating-modal-step-wrap{position:relative;display:flex;flex-direction:column;align-items:center;padding-bottom:1rem}.s-rating-modal-product-details{position:relative;display:flex;flex:1 1 0%;flex-direction:column;padding-bottom:1rem}.s-rating-modal-product-details-main{display:flex;align-items:flex-start;justify-content:space-between}.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-rounded-icon{position:relative;margin-bottom:0.25rem;display:flex;height:6rem;width:6rem;align-items:center;justify-content:center;overflow:hidden;border-radius:9999px;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.s-rating-modal-title{margin-bottom:0.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:700}.s-rating-modal-subtitle{margin-bottom:0.25rem;padding-left:0.5rem;padding-right:0.5rem;text-align:center;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-rating-modal-store-logo{width:4rem;object-fit:contain}.s-rating-modal-shipping-logo{height:100%;width:100%;object-fit:contain}.s-rating-modal-shipping-icon{font-size:3rem;line-height:1;color:var(--color-primary)}.s-rating-modal-comment{margin-bottom:0.5rem;height:5rem !important;width:100%;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));padding:0.75rem;font-size:0.875rem;line-height:1.25rem;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-modal-comment:focus{border-color:var(--color-primary)}.s-rating-modal-comment:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.s-rating-modal-validation-msg{margin-top:-3px;line-height:1rem;--tw-text-opacity:1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.s-rating-modal-product{margin-bottom:1.5rem}.s-rating-modal-product:last-child{margin-bottom:0px}.s-rating-modal-product .rating-outer-form{display:flex}.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}@media (min-width: 640px){.s-rating-modal-product .rating-outer-form>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}}.s-rating-modal-product .rating-outer-form:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-product-img-wrap{height:3.5rem;width:auto;overflow:hidden;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.s-rating-modal-product-img-wrap{width:5rem}}.s-rating-modal-product-img{position:relative;height:100%;width:100%;object-fit:cover;font-size:0px}.s-rating-modal-product-img::before{position:absolute;top:0px;left:0px;height:100%;width:100%;--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));--tw-content:'';content:var(--tw-content)}.s-rating-modal-product-title{margin-bottom:0.375rem;font-size:0.875rem;font-weight:700;line-height:1.25rem}.s-rating-modal-thanks{padding-left:2rem;padding-right:2rem;text-align:center;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:500ms}.s-rating-modal-icon{display:inline-flex;height:5rem;width:5rem;align-items:center;justify-content:center;border-radius:9999px;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));color:var(--color-primary)}.s-rating-modal-icon svg{height:1.75rem;width:1.75rem;fill:var(--color-primary)}.s-rating-modal-thanks-title{margin-top:1rem;font-weight:700}.s-rating-modal-thanks-msg{margin-bottom:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-thanks-btn{height:2.5rem;flex:none;display:inline-flex;flex:1 1 0%;align-items:center;justify-content:center;white-space:nowrap;border-radius:0.375rem;padding-left:1.5rem;padding-right:1.5rem;padding-bottom:0.625rem;padding-top:0.5rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms}.s-rating-modal-thanks-btn:hover{opacity:0.8}.s-rating-modal-thanks-btn{border-width:1px;border-color:var(--color-primary);background-color:var(--color-primary);color:var(--color-primary-reverse)}.s-rating-modal-thanks-time{margin-top:0.75rem;display:block;height:1.5rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.s-rating-modal-product-factors-card{margin-bottom:1rem;border-radius:0.5rem;--tw-bg-opacity:1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));padding:1rem}.s-rating-modal-product-factors-heading{margin-bottom:0.75rem;font-size:0.875rem;line-height:1.25rem;font-weight:700;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-stars-company{margin-bottom:1.25rem}.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-modal-upload-count{font-size:0.875rem;line-height:1.25rem;font-weight:500}.s-rating-modal-bg-gray{--tw-bg-opacity:1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.s-rating-modal-bg-primary{background-color:var(--color-primary)}unicode{unicode-bidi:plaintext}.s-rating-modal-wrap .s-modal-body{position:relative !important}.s-rating-modal-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-skeleton salla-skeleton:nth-child(1){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(2){margin-bottom:0.75rem}.s-rating-modal-skeleton salla-skeleton:nth-child(3){margin-bottom:1.25rem}.s-rating-modal-skeleton salla-skeleton:nth-child(4){margin-bottom:2rem}.s-rating-modal-skeleton-footer{margin-top:1.5rem;display:flex;width:100%;justify-content:flex-end}.s-rating-modal-skeleton-footer salla-skeleton{margin-bottom:0px !important}.s-rating-modal-skeleton-stars{margin-bottom:0.75rem;display:flex;align-items:center}.s-rating-modal-skeleton-stars>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.5rem * var(--tw-space-x-reverse));margin-left:calc(0.5rem * calc(1 - var(--tw-space-x-reverse)))}.s-rating-modal-skeleton-stars:where([dir=\"rtl\"],[dir=\"rtl\"] *)>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.s-rating-modal-skeleton-stars div svg{width:25px;fill:currentColor;--tw-text-opacity:1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.s-rating-modal-uploader{height:0px;opacity:0;transition-property:all;transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.s-rating-modal-uploader.is-opened{margin-bottom:1.5rem;overflow:visible}.s-rating-modal-uploader.is-closed{pointer-events:none;z-index:0}.s-rating-modal-uploader .filepond--drop-label{--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.s-rating-modal-uploader .filepond--file-status .filepond--file-status-main{font-size:11px}.s-rating-modal-uploader .filepond--file-info-main{font-size:11px}.s-rating-modal-uploader li[data-filepond-item-state='load-invalid'] .filepond--file-info{display:none}.s-rating-modal-filepond-placeholder-text{font-size:0.75rem !important;line-height:1rem !important}.s-rating-modal-filepond-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center}.s-rating-modal-filepond-placeholder-icon{margin-bottom:0.25rem}.s-rating-modal-filepond-placeholder-icon svg{height:1.5rem;width:1.5rem;fill:#7c8082}.s-rating-modal-contact{margin-bottom:1rem;display:flex;align-items:center;justify-content:space-between;border-radius:0.375rem;--tw-bg-opacity:1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1));padding:0.5rem}.s-rating-modal-contact p{font-size:1rem;line-height:1.5rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-contact-icons{display:flex;align-items:center;gap:0.5rem}.s-rating-modal-contact-icons span{display:flex;cursor:pointer;align-items:center;justify-content:center;border-radius:0.375rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1));--tw-bg-opacity:1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1));padding:0.375rem}.s-rating-modal-contact-icons span svg{height:1rem;width:1rem;fill:var(--color-primary)}.s-rating-modal-footer-end{justify-content:flex-end}.s-rating-modal-delete-wrapper{text-align:center}.s-rating-modal-delete-wrapper h3{margin-top:1.25rem;font-size:1.125rem;line-height:1.75rem;--tw-text-opacity:1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-wrapper p{margin-top:1.25rem;font-size:0.875rem;line-height:1.25rem;--tw-text-opacity:1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.s-rating-modal-delete-actions{margin-top:1.25rem;display:flex;align-items:center;gap:0.625rem}.s-rating-modal-delete-actions salla-button{width:100%}.s-rating-modal-delete-actions salla-button button{width:100%}";
24
+
25
+ const SallaRatingModal = /*@__PURE__*/ proxyCustomElement(class SallaRatingModal extends HTMLElement {
26
+ constructor() {
27
+ super();
28
+ this.__registerHost();
29
+ this.hasError = false;
30
+ this.showContactWidget = true;
31
+ this.images = [];
32
+ this.productImages = {};
33
+ this.editItemImages = [];
34
+ this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_subject', { store, id, customer });
35
+ this.editMode = false;
36
+ this.defaultMode = false;
37
+ this.deleteMode = false;
38
+ this.shouldOpenDeleteModal = false;
39
+ this.editItem = null;
40
+ this.loyaltyImageRatingPoints = 0;
41
+ this.enableNewPopUp = true;
42
+ this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
43
+ this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
44
+ this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
45
+ this.allowedImagesTypesLabel = salla.lang.get('common.uploader.allowed_images_types');
46
+ this.addImagesLabel = salla.lang.get('pages.rating.add_images');
47
+ this.editImagesLabel = salla.lang.get('pages.rating.edit_images');
48
+ this.threeImagesMax = salla.lang.get('common.uploader.max_three_images');
49
+ this.areYouSureLabel = salla.lang.get('pages.rating.are_you_sure_you_want_to_delete_review');
50
+ this.confirmDeletionLabel = salla.lang.get('pages.rating.confirm_deletion');
51
+ this.cancelLabel = salla.lang.get('common.elements.cancel');
52
+ this.confirmDeleteBtn = salla.lang.get('common.elements.confirm_delete');
53
+ this.updatedSuccessfullyLabel = salla.lang.get("pages.rating.review_updated_successfully");
54
+ this.deletedSuccessfullyLabel = salla.lang.get("pages.rating.review_deleted_successfully");
55
+ this.contactUsLabel = salla.lang.get('blocks.footer.social');
56
+ this.loyaltyPointsForImagesLabel = salla.lang.get('pages.rating.loyalty_points_for_images', { points: ':points' });
57
+ this.allowAttachImages = salla.config.get('store.settings.rating.allow_attach_images');
58
+ this.allowContactSupport = salla.config.get('store.settings.rating.allow_contact_support');
59
+ this.contentRefs = [];
60
+ this.hiddenInputs = [];
61
+ this.isOpen = [];
62
+ this.stepsCount = 0;
63
+ this.currentIndex = 0;
64
+ this.submitted = [];
65
+ this.MAX_UPLOAD_LIMIT = 3;
66
+ this.onOpen = (index) => {
67
+ return new Promise((resolve) => {
68
+ anime({
69
+ targets: this.contentRefs[index],
70
+ duration: 100,
71
+ height: this.contentRefs[index].scrollHeight,
72
+ opacity: [0, 1],
73
+ easing: 'easeOutQuart',
74
+ complete: () => resolve(),
75
+ });
76
+ });
77
+ };
78
+ this.onClose = (index) => {
79
+ return new Promise((resolve) => {
80
+ anime({
81
+ targets: this.contentRefs[index],
82
+ duration: 100,
83
+ height: 0,
84
+ opacity: [1, 0],
85
+ easing: 'easeOutQuart',
86
+ complete: () => resolve(),
87
+ });
88
+ });
89
+ };
90
+ this.toggleUploader = async (index) => {
91
+ this.isOpen[index] = !this.isOpen[index];
92
+ Helper.toggleElementClassIf(this.contentRefs[index], 'is-closed', 'is-opened', () => !this.isOpen[index]);
93
+ await (this.isOpen[index] ? this.onOpen(index) : this.onClose(index));
94
+ await new Promise((resolve) => setTimeout(resolve, 101));
95
+ if (this.body && this.currentTab) {
96
+ setTimeout(() => this.body.setAttribute('style', `height:${this.currentTab.offsetHeight + (this.editMode ? 60 : 0)}px`));
97
+ }
98
+ };
99
+ salla.onReady(() => {
100
+ this.orderId = salla.config.get('page.id');
101
+ });
102
+ salla.lang.onLoaded(() => {
103
+ this.contactUsLabel = salla.lang.get('blocks.footer.social');
104
+ const setNestedAsync = (lang, key, value) => {
105
+ return new Promise((resolve) => {
106
+ salla.helpers.setNested(salla.lang.messages[lang], key, value);
107
+ resolve(true);
108
+ });
109
+ };
110
+ const setTranslations = async () => {
111
+ await setNestedAsync('ar.trans', 'common.uploader.drag_and_drop_files', 'اسحب الملفات وأفلتها هنا');
112
+ await setNestedAsync('en.trans', 'common.uploader.drag_and_drop_files', 'Drag and drop files here');
113
+ await setNestedAsync('ar.trans', 'common.uploader.allowed_images_types', ' .jpg أو jpeg أو png يُسمح بإضافة صور بصيغة');
114
+ await setNestedAsync('en.trans', 'common.uploader.allowed_images_types', 'Images in jpg, jpeg, or png format are allowed.');
115
+ await setNestedAsync('ar.trans', 'pages.rating.add_images', 'اضافة صور');
116
+ await setNestedAsync('en.trans', 'pages.rating.add_images', 'Add Images');
117
+ await setNestedAsync('ar.trans', 'pages.rating.edit_images', 'تعديل الصور');
118
+ await setNestedAsync('en.trans', 'pages.rating.edit_images', 'Edit Images');
119
+ await setNestedAsync('ar.trans', 'pages.rating.edit_review', 'تعديل التقييم');
120
+ await setNestedAsync('en.trans', 'pages.rating.edit_review', 'Edit review');
121
+ await setNestedAsync('ar.trans', 'pages.rating.confirm_deletion', 'تأكيد حذف التقييم');
122
+ await setNestedAsync('en.trans', 'pages.rating.confirm_deletion', 'Confirm review deletion');
123
+ await setNestedAsync('ar.trans', 'pages.rating.are_you_sure_you_want_to_delete_review', 'هل أنت متأكد من حذف تقييمك؟');
124
+ await setNestedAsync('en.trans', 'pages.rating.are_you_sure_you_want_to_delete_review', 'Are you sure you want to delete your review?');
125
+ await setNestedAsync('ar.trans', 'pages.rating.review_updated_successfully', 'تم تعديل التقييم بنجاح');
126
+ await setNestedAsync('en.trans', 'pages.rating.review_updated_successfully', 'The review has been successfully updated.');
127
+ await setNestedAsync('ar.trans', 'pages.rating.review_deleted_successfully', 'تم حذف التقييم بنجاح');
128
+ await setNestedAsync('en.trans', 'pages.rating.review_deleted_successfully', 'The review has been successfully deleted.');
129
+ await setNestedAsync('ar.trans', 'pages.rating.images_count', 'الصور ( :current من أصل :total )');
130
+ await setNestedAsync('en.trans', 'pages.rating.images_count', 'Images ( :current of :total )');
131
+ await setNestedAsync('ar.trans', 'pages.rating.loyalty_points_for_images', 'اكسب :points نقطة ولاء عند إضافة صور لتقييمك!');
132
+ await setNestedAsync('en.trans', 'pages.rating.loyalty_points_for_images', 'Earn :points loyalty points when adding photos to your review!');
133
+ await setNestedAsync('ar.trans', 'common.uploader.max_three_images', `.أضف ${this.MAX_UPLOAD_LIMIT} صور كحد أقصى`);
134
+ await setNestedAsync('en.trans', 'common.uploader.max_three_images', `Add up to ${this.MAX_UPLOAD_LIMIT} images maximum.`);
135
+ await setNestedAsync('ar.trans', 'common.elements.confirm_delete', 'تأكيد الحذف');
136
+ await setNestedAsync('en.trans', 'common.elements.confirm_delete', 'Confirm deletion');
137
+ this.dragAndDropFilesLabel = salla.lang.get('common.uploader.drag_and_drop_files');
138
+ this.allowedImagesTypesLabel = salla.lang.get('common.uploader.allowed_images_types');
139
+ this.addImagesLabel = salla.lang.get('pages.rating.add_images');
140
+ this.threeImagesMax = salla.lang.get('common.uploader.max_three_images');
141
+ this.contactSubjectLabel = salla.lang.get('pages.rating.contact_subject');
142
+ this.editReviewLabel = salla.lang.get('pages.rating.edit_review');
143
+ this.editImagesLabel = salla.lang.get('pages.rating.edit_images');
144
+ this.areYouSureLabel = salla.lang.get('pages.rating.are_you_sure_you_want_to_delete_review');
145
+ this.confirmDeletionLabel = salla.lang.get('pages.rating.confirm_deletion');
146
+ this.cancelLabel = salla.lang.get("common.elements.cancel");
147
+ this.updatedSuccessfullyLabel = salla.lang.get("pages.rating.review_updated_successfully");
148
+ this.deletedSuccessfullyLabel = salla.lang.get("pages.rating.review_deleted_successfully");
149
+ this.confirmDeleteBtn = salla.lang.get("common.elements.confirm_delete");
150
+ this.loyaltyPointsForImagesLabel = salla.lang.get('pages.rating.loyalty_points_for_images', { points: ':points' });
151
+ this.contact_body = (store, id, customer) => salla.lang.get('pages.rating.contact_body', { store, id, customer });
152
+ };
153
+ setTranslations();
154
+ });
155
+ }
156
+ getV2Ref() {
157
+ return this.v2Ref ?? this.host.querySelector('salla-rating-modal-v2');
158
+ }
159
+ syncNewPopUpFlag() {
160
+ // Enable the new pop-up to all consumers:
161
+ this.enableNewPopUp = true;
162
+ }
163
+ /**
164
+ * Point the modal at a different order/product and invalidate any cached
165
+ * order so the next open() re-fetches instead of reusing stale data.
166
+ * Pass `orderId` as `null` for an eligible-but-unverified product review.
167
+ */
168
+ async setOrder(orderId, productId) {
169
+ this.orderId = orderId;
170
+ this.productId = productId;
171
+ this.order = undefined;
172
+ await this.getV2Ref()?.setOrder(orderId, productId);
173
+ }
174
+ /**
175
+ * Show the rating modal
176
+ */
177
+ async open() {
178
+ await salla.onReady();
179
+ this.syncNewPopUpFlag();
180
+ if (this.enableNewPopUp) {
181
+ return this.getV2Ref()?.open();
182
+ }
183
+ this.defaultMode = true;
184
+ return new Promise((resolve) => {
185
+ setTimeout(() => {
186
+ this.modal.open().then(() => this.order || salla.api.withoutNotifier(() => salla.rating.api.order(this.orderId ? this.orderId : salla.config.get('page.id'))).then(res => this.order = res.data))
187
+ .then(() => this.readyUpLoyaltyPoints())
188
+ .then(() => this.modal.setTitle(`${salla.lang.get('pages.rating.rate_order')} <span class="unicode">(#${this.order.id})</span>`))
189
+ .then(() => {
190
+ // Initialize productImages for all products
191
+ const initialImages = {};
192
+ if (this.order?.products) {
193
+ for (const item of this.order.products) {
194
+ initialImages[item.product.id] = [];
195
+ }
196
+ }
197
+ this.productImages = initialImages;
198
+ })
199
+ .then(() => this.modal.stopLoading())
200
+ .then(() => this.stepsCount = [this.order.testimonials_enabled, this.order.products_enabled, this.order.shipping_enabled].filter(enabled => enabled).length)
201
+ .then(() => setTimeout(() => this.handleWizard(), 100))
202
+ .catch(e => {
203
+ resolve(false);
204
+ this.hasError = true;
205
+ this.errorMessage = e.response?.data?.error?.message || e.response?.data;
206
+ this.modal.stopLoading();
207
+ });
208
+ resolve(true);
209
+ }, 50);
210
+ });
211
+ }
212
+ async openEditModal(params) {
213
+ await salla.onReady();
214
+ this.syncNewPopUpFlag();
215
+ if (this.enableNewPopUp) {
216
+ return this.getV2Ref()?.openEditModal(params);
217
+ }
218
+ this.defaultMode = false;
219
+ this.editMode = true;
220
+ this.editType = params.type;
221
+ this.editFeedbackId = params.feedback_id;
222
+ try {
223
+ await this.fetchEditItem(params.feedback_id);
224
+ await this.readyUpLoyaltyPoints();
225
+ this.editModal.open();
226
+ }
227
+ catch (e) {
228
+ this.hasError = true;
229
+ this.errorMessage = e.response?.data?.error?.message || e.response?.data;
230
+ }
231
+ }
232
+ async fetchEditItem(feedbackId) {
233
+ const endpoint = `rating/${feedbackId}/show`;
234
+ const response = await salla.api.request(endpoint);
235
+ this.editItem = response.data;
236
+ if (this.allowAttachImages && this.editType == "product" && this.editItem.images.length) {
237
+ this.editItemImages = this.editItem.images.map(img => ({ id: img, url: img }));
238
+ }
239
+ }
240
+ async editReview() {
241
+ const data = {};
242
+ this.editModal.querySelectorAll('[name]').forEach((input) => {
243
+ const inputData = salla.helpers.inputData(input.name, input.value, data);
244
+ data[inputData.name] = inputData.value;
245
+ });
246
+ data.images && (data.images = data.images.split(','));
247
+ const endpoint = `rating/${this.editFeedbackId}`;
248
+ await salla.api.request(endpoint, data, 'put').then((res) => {
249
+ this.editModal.close();
250
+ salla.notify.success(res.message || this.updatedSuccessfullyLabel);
251
+ setTimeout(() => {
252
+ window.location.reload();
253
+ }, 500);
254
+ });
255
+ }
256
+ async openDeleteModal(params) {
257
+ await salla.onReady();
258
+ this.syncNewPopUpFlag();
259
+ if (this.enableNewPopUp) {
260
+ return this.getV2Ref()?.openDeleteModal(params);
261
+ }
262
+ this.defaultMode = false;
263
+ this.deleteMode = true;
264
+ this.deleteFeedbackId = params.feedback_id;
265
+ this.shouldOpenDeleteModal = true;
266
+ return new Promise((resolve) => {
267
+ setTimeout(() => {
268
+ this.deleteModal.open().then(() => resolve(true));
269
+ }, 50);
270
+ });
271
+ }
272
+ async deleteReview() {
273
+ const endpoint = `rating/${this.deleteFeedbackId}`;
274
+ await salla.api.request(endpoint, null, 'delete').then(() => {
275
+ this.deleteModal.close();
276
+ salla.notify.success(this.deletedSuccessfullyLabel);
277
+ setTimeout(() => {
278
+ window.location.reload();
279
+ }, 500);
280
+ });
281
+ }
282
+ /**
283
+ * Show the rating modal
284
+ */
285
+ async close() {
286
+ if (this.enableNewPopUp) {
287
+ return this.getV2Ref()?.close();
288
+ }
289
+ return this.modal.close();
290
+ }
291
+ // handle wizard
292
+ handleWizard() {
293
+ this.steps = this.modal.querySelectorAll(".s-rating-modal-step");
294
+ this.dots = this.modal.querySelectorAll(".s-rating-modal-step-dot");
295
+ this.showActiveStep();
296
+ }
297
+ showActiveStep(current = null) {
298
+ this.currentTab = current || this.steps[this.currentIndex];
299
+ Helper.toggleClassIf('.s-rating-modal-step-dot', 's-rating-modal-bg-gray', 's-rating-modal-bg-primary', dot => dot != this.dots[this.currentIndex])
300
+ .toggleClassIf('.s-rating-modal-step', 's-rating-modal-active', 's-rating-modal-hidden', tab => tab == this.currentTab);
301
+ if (this.currentIndex !== 0) {
302
+ // the animation
303
+ Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-unactive', 's-rating-modal-hidden', () => true);
304
+ setTimeout(() => Helper.toggleElementClassIf(this.currentTab, 's-rating-modal-active', 's-rating-modal-unactive', () => true), 300);
305
+ }
306
+ // Btn text
307
+ const nextType = this.steps[this.currentIndex + 1]?.dataset.type;
308
+ this.nextBtn?.setText(nextType ? `${salla.lang.get('pages.rating.rate')} ${salla.lang.get(`pages.rating.${nextType}`)}`
309
+ : salla.lang.get('pages.rating.send_ratings'));
310
+ setTimeout(() => this.body?.setAttribute('style', `height:${this.currentTab?.offsetHeight}px`));
311
+ }
312
+ previousTab() {
313
+ this.currentIndex > 0 && this.currentIndex--;
314
+ Helper.toggleElementClassIf(this.backBtn, 's-rating-modal-unvisiable', 'block', () => this.currentIndex == 0);
315
+ this.showActiveStep();
316
+ }
317
+ submit() {
318
+ this.submittedBefore() || this.validate();
319
+ salla.config.canLeave = false;
320
+ this.nextBtn.load()
321
+ .then(() => this.submittedBefore() || this.sendFeedback())
322
+ .then(() => this.currentTab.querySelectorAll('[name],.s-rating-modal-btn-star').forEach(el => el.setAttribute('disabled', '')))
323
+ .then(() => this.currentIndex < this.stepsCount && this.currentIndex++)
324
+ .then(() => this.showActiveStep())
325
+ .then(() => Helper.toggleClassIf('#prev-btn', 'block', 's-rating-modal-unvisiable', () => true))
326
+ .finally(() => {
327
+ this.nextBtn.stop();
328
+ salla.config.canLeave = true;
329
+ if (this.currentIndex == this.stepsCount) {
330
+ this.showThankYou();
331
+ this.showContactWidget = false;
332
+ }
333
+ // this.modal.isClosable = false;
334
+ });
335
+ }
336
+ submittedBefore() {
337
+ return this.submitted.includes(this.currentIndex);
338
+ }
339
+ validate(rating = null, type = null) {
340
+ if (!rating && this.currentTab.dataset.type === 'products') {
341
+ const ratingForms = this.currentTab.querySelectorAll('.rating-outer-form');
342
+ ratingForms.forEach(ratingForm => this.validate(ratingForm, 'product'));
343
+ return;
344
+ }
345
+ rating = rating || this.currentTab;
346
+ const stars = rating.querySelector('.rating_hidden_input').value;
347
+ const validationMessage = rating.querySelector('.s-rating-modal-validation-msg');
348
+ type = type || rating.dataset.type;
349
+ if (!stars) {
350
+ validationMessage.innerHTML = salla.lang.get(`pages.rating.rate_${type}_stars`).replace(' (:item)', '');
351
+ throw new Error(validationMessage.innerHTML);
352
+ }
353
+ validationMessage.innerHTML = '';
354
+ }
355
+ sendFeedback() {
356
+ const data = {};
357
+ this.currentTab.querySelectorAll('[name]').forEach((input) => {
358
+ //decode names like `<input name="jamal[inner]" value="hi">` to be {name:jamal, value: {inner:"hi"}}
359
+ const inputData = salla.helpers.inputData(input.name, input.value, data);
360
+ data[inputData.name] = inputData.value;
361
+ });
362
+ if (this.allowAttachImages && data.products) {
363
+ for (let productIndex in data.products) {
364
+ if (data.products[productIndex].images) {
365
+ data.products[productIndex].images = data.products[productIndex].images.split(',');
366
+ }
367
+ }
368
+ }
369
+ if (Object.keys(data).length == 0) {
370
+ return;
371
+ }
372
+ data.order_id = this.orderId;
373
+ data.type = this.currentTab.dataset.type;
374
+ return salla.rating.api[this.currentTab.dataset.type](data).then((res) => {
375
+ this.submitted.push(this.currentIndex);
376
+ return res;
377
+ });
378
+ }
379
+ showThankYou() {
380
+ let seconds = 10;
381
+ let timeToClose = setInterval(() => {
382
+ this.thanksTime.innerHTML = `00:0${seconds--}`;
383
+ if (seconds > 0) {
384
+ return;
385
+ }
386
+ clearInterval(timeToClose);
387
+ this.thanksTime.remove();
388
+ this.close().then(() => window.location.reload());
389
+ }, 1000);
390
+ this.modal.querySelector('.s-rating-modal-footer').classList.add('s-rating-modal-unvisiable');
391
+ this.showActiveStep(this.thanksTab);
392
+ }
393
+ getFilepondPlaceholder() {
394
+ return `<div class="s-rating-modal-filepond-placeholder"><span class="s-rating-modal-filepond-placeholder-icon">${ImageIcon}</span><p class="s-rating-modal-filepond-placeholder-text">${this.dragAndDropFilesLabel}<br>
395
+ <span> ${this.allowedImagesTypesLabel} <br> ${this.threeImagesMax} </span></p></div>`;
396
+ }
397
+ getCustomerName() {
398
+ let firstName = salla.config.get('user.first_name') || salla.storage.get('user.first_name') || '';
399
+ let lasName = salla.config.get('user.last_name') || salla.storage.get('user.last_name') || '';
400
+ return `${firstName} ${lasName}`;
401
+ }
402
+ handleSendEmail() {
403
+ const subject = `${this.contactSubjectLabel} #${this.order.id}`;
404
+ const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
405
+ const mailtoLink = `mailto:${salla.config.get('store.contacts.email')}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
406
+ window.open(mailtoLink, '_blank');
407
+ }
408
+ handleSendWhatsApp() {
409
+ const body = this.contact_body(salla.config.get('store.name'), this.order.id, this.getCustomerName());
410
+ const whatsappLink = `https://wa.me/${salla.config.get('store.contacts.whatsapp')}?text=${encodeURIComponent(body)}`;
411
+ window.open(whatsappLink, '_blank');
412
+ }
413
+ resetData(isOpen) {
414
+ if (isOpen.detail) {
415
+ return;
416
+ }
417
+ this.modal?.close();
418
+ this.editItem = null;
419
+ this.editItemImages = [];
420
+ this.hiddenInputs[1] && (this.hiddenInputs[1].value = '');
421
+ this.deleteFeedbackId = null;
422
+ this.editFeedbackId = null;
423
+ this.shouldOpenDeleteModal = false;
424
+ this.editMode = false;
425
+ this.deleteMode = false;
426
+ this.defaultMode = false;
427
+ this.loyaltyImageRatingPoints = 0;
428
+ }
429
+ async readyUpLoyaltyPoints() {
430
+ const featureEnabled = salla.loyalty?.isFeatureEnabled?.();
431
+ if (!featureEnabled) {
432
+ this.loyaltyImageRatingPoints = 0;
433
+ return;
434
+ }
435
+ const rating_product_points = salla.config.get('store.settings.rating.rating_product_points') || 0;
436
+ const rating_product_with_image_points = salla.config.get('store.settings.rating.rating_product_with_image_points') || 0;
437
+ this.loyaltyImageRatingPoints = Number(rating_product_with_image_points) + Number(rating_product_points);
438
+ }
439
+ loyaltyPointsNote() {
440
+ if (!this.loyaltyImageRatingPoints || !this.loyaltyPointsForImagesLabel) {
441
+ return null;
442
+ }
443
+ const svgIcon = (h("svg", { width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M10 0C13.6819 0 16.6667 2.98477 16.6667 6.66664C16.6667 9.37047 15.057 11.6984 12.7437 12.7444C11.6978 15.0575 9.3701 16.6666 6.66668 16.6666C2.98477 16.6666 0 13.6819 0 9.99998C0 7.29656 1.60918 4.96894 3.92195 3.92276C4.96827 1.60964 7.29618 0 10 0ZM6.66668 5C3.90524 5 1.66667 7.23856 1.66667 9.99998C1.66667 12.7614 3.90524 15 6.66668 15C9.4281 15 11.6667 12.7614 11.6667 9.99998C11.6667 7.23856 9.4281 5 6.66668 5ZM7.50002 5.83333V6.66664H9.16668V8.33331H5.83333C5.60322 8.33331 5.41667 8.51989 5.41667 8.74998C5.41667 8.95456 5.56407 9.12464 5.75844 9.15998L5.83333 9.16664H7.50002C8.6506 9.16664 9.58335 10.0994 9.58335 11.25C9.58335 12.4006 8.6506 13.3333 7.50002 13.3333V14.1666H5.83333V13.3333H4.16667V11.6666H7.50002C7.7301 11.6666 7.91668 11.4801 7.91668 11.25C7.91668 11.0455 7.76927 10.8753 7.57493 10.8401L7.50002 10.8333H5.83333C4.68274 10.8333 3.75 9.90056 3.75 8.74998C3.75 7.59939 4.68274 6.66664 5.83333 6.66664V5.83333H7.50002ZM10 1.66667C8.51377 1.66667 7.17893 2.31513 6.26313 3.34457C6.39704 3.33736 6.53138 3.33333 6.66668 3.33333C10.3486 3.33333 13.3333 6.3181 13.3333 9.99998C13.3333 10.1356 13.3293 10.2702 13.3213 10.4037C14.3513 9.48814 15 8.15314 15 6.66664C15 3.90524 12.7614 1.66667 10 1.66667Z", fill: "#008C56" })));
444
+ return (h("div", { class: "s-rating-modal-loyalty-points-note-container" }, h("span", { class: "s-rating-modal-loyalty-points-note-icon" }, svgIcon), h("p", { class: "s-rating-modal-loyalty-points-note-text" }, this.loyaltyPointsForImagesLabel.replace(':points', String(this.loyaltyImageRatingPoints)))));
445
+ }
446
+ getDeleteModal() {
447
+ return (h("salla-modal", { ref: modal => this.deleteModal = modal, width: "xs", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-delete-wrapper", ref: el => this.body = el }, h("h3", null, this.confirmDeletionLabel), h("p", null, this.areYouSureLabel), h("div", { class: "s-rating-modal-delete-actions" }, h("salla-button", { loaderPosition: 'center', onClick: () => this.deleteReview() }, this.confirmDeleteBtn), h("salla-button", { color: 'danger', fill: 'outline', onClick: () => this.deleteModal.close() }, this.cancelLabel)))));
448
+ }
449
+ renderUploadedImagesCount(productId) {
450
+ // In edit mode, use editItemImages; in default mode, use productImages
451
+ const imageCount = this.editMode ? this.editItemImages.length : (this.productImages[productId] || []).length;
452
+ return (h("span", { class: "s-rating-modal-upload-count" }, salla.lang.choice("pages.rating.images_count", imageCount, { current: imageCount, total: this.MAX_UPLOAD_LIMIT })));
453
+ }
454
+ getEditModal() {
455
+ return (h("salla-modal", { ref: modal => this.editModal = modal, width: "md", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen) }, h("div", { class: "s-rating-modal-edit-wrapper", ref: el => this.body = el }, this.editType === "store" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "store", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", value: this.editItem.content, class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType === "shipping" && this.editItem ? (h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step", "data-type": "shipping", ref: currentTab => this.currentTab = currentTab }, this.editItem.shipping.logo
456
+ ? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.editItem.shipping.logo, class: "s-rating-modal-shipping-logo", alt: this.editItem.shipping.name }))
457
+ : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.editItem.shipping.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large", editable: true, value: this.editItem.stars })), h("textarea", { name: "content", class: "s-rating-modal-comment", value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))) : null, this.editType == "product" && this.editItem ? h("section", { class: "s-rating-modal-step", "data-type": "products", ref: currentTab => this.currentTab = currentTab }, h("div", { class: "s-rating-modal-product" }, this.allowAttachImages && this.loyaltyPointsNote(), h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: this.editItem.product.image.url, alt: this.editItem.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", this.editItem.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", editable: true, value: this.editItem.stars }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(1) }, h("span", null, this.editItemImages.length ? this.editImagesLabel : this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("textarea", { value: this.editItem.content, placeholder: salla.lang.get('pages.rating.write_product_rate'), name: "content", class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[1] = el) }, h("salla-file-upload", { name: "images", allowMultiple: true, maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, filePosterHeight: 117, "instant-upload": true, type: "feedback", files: JSON.stringify(this.editItemImages), payloadName: "files[]", id: `file-${this.editItem.product.id}`, title: this.editItem.product.name, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
458
+ this.editItemImages = [...this.editItemImages, e.detail];
459
+ this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
460
+ }, onRemoved: (e) => {
461
+ const removedId = e.detail;
462
+ if (!removedId)
463
+ return;
464
+ this.editItemImages = this.editItemImages.filter(img => img.id !== removedId);
465
+ this.hiddenInputs[1].value = this.editItemImages.map(img => img.url).join();
466
+ }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: "images", value: this.editItem.images.join(','), ref: (el) => (this.hiddenInputs[1] = el) }), this.renderUploadedImagesCount(this.editItem.product.id)))))
467
+ : null, h("div", { class: "s-rating-modal-footer s-rating-modal-footer-end" }, h("salla-button", { "loader-position": 'center', onClick: () => this.editReview() }, this.editReviewLabel)))));
468
+ }
469
+ render() {
470
+ if (this.enableNewPopUp) {
471
+ return (h(Host, { class: "s-rating-modal" }, h("salla-rating-modal-v2", { ref: (el) => (this.v2Ref = el), orderId: this.orderId, productId: this.productId })));
472
+ }
473
+ if (this.deleteMode) {
474
+ return h(Host, { class: "s-rating-modal" }, this.getDeleteModal());
475
+ }
476
+ if (this.editMode) {
477
+ return h(Host, { class: "s-rating-modal" }, this.getEditModal());
478
+ }
479
+ if (this.defaultMode) {
480
+ return (h(Host, { class: "s-rating-modal" }, h("salla-modal", { class: "s-rating-modal-wrap", onModalVisibilityChanged: (isOpen) => this.resetData(isOpen), isLoading: true, width: "md", ref: modal => this.modal = modal }, h("div", { slot: 'loading' }, h("div", { class: "s-rating-modal-skeleton" }, h("salla-skeleton", { type: 'circle', height: '80px', width: '80px' }), h("salla-skeleton", { height: '15px', width: '60%' }), h("salla-skeleton", { height: '10px', width: '30%' }), h("div", { class: "s-rating-modal-skeleton-stars" }, [...Array(5)].map((v) => h("div", { key: v, innerHTML: WishListIcon }))), h("salla-skeleton", { height: '100px', width: '100%' }), h("div", { class: "s-rating-modal-skeleton-footer" }, h("salla-skeleton", { height: '40px', width: '30%' })))), !this.hasError && this.order
481
+ ? [h("div", { class: "s-rating-modal-wrapper", ref: el => this.body = el }, this.order?.testimonials_enabled ?
482
+ h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "store" }, h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: salla.config.get('store.logo', 'https://assets.salla.sa/cp/assets/images/logo-new.png'), alt: "store name", class: "s-rating-modal-store-logo" })), h("h2", { class: "s-rating-modal-title" }, salla.lang.get('pages.rating.rate_the_store')), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_store_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
483
+ : '', this.order.products_enabled
484
+ ? h("section", { class: "s-rating-modal-step s-rating-modal-hidden", "data-type": "products" }, this.allowAttachImages && this.loyaltyPointsNote(), this.order.products.map((item, index) => h("div", { class: "s-rating-modal-product", key: index }, h("div", { class: "rating-outer-form", "data-stars-error": salla.lang.get('pages.rating.rate_product_stars') }, h("div", { class: "s-rating-modal-product-img-wrap" }, h("img", { src: item.product.thumbnail, alt: item.product.name, class: "s-rating-modal-product-img" })), h("div", { class: "s-rating-modal-product-details" }, h("div", { class: "s-rating-modal-product-details-main" }, h("div", null, h("h3", { class: "s-rating-modal-product-title" }, " ", item.product.name), h("div", { class: "s-rating-modal-stars-product" }, h("salla-rating-stars", { withLabel: true, size: "small", name: `products[${index}][rating]` }))), this.allowAttachImages && h("salla-button", { class: "s-comments-item-like-btn mt-0", loaderPosition: 'center', fill: 'outline', size: 'small', onClick: () => this.toggleUploader(index) }, h("span", null, this.addImagesLabel), h("span", { innerHTML: ImageIcon }))), h("input", { type: "hidden", name: `products[${index}][product_id]`, value: item.product.id }), h("textarea", { placeholder: salla.lang.get('pages.rating.write_product_rate'), name: `products[${index}][comment]`, class: "s-rating-modal-comment" }), h("small", { class: "s-rating-modal-validation-msg" }))), this.allowAttachImages && (h("div", { class: "s-rating-modal-uploader is-closed", ref: (el) => (this.contentRefs[index] = el) }, h("salla-file-upload", { name: "image", maxFilesCount: this.MAX_UPLOAD_LIMIT, imagePreviewHeight: 117, "instant-upload": true, type: "feedback", payloadName: "files[]", id: `file-${item.product.id}`, title: item.product.name, allowMultiple: true, instantUpload: true, accept: "image/png, image/jpeg, image/jpg", url: salla.url.api('upload'), onUploaded: (e) => {
485
+ this.productImages = {
486
+ ...this.productImages,
487
+ [item.product.id]: [...(this.productImages[item.product.id] || []), e.detail]
488
+ };
489
+ this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
490
+ }, onRemoved: (e) => {
491
+ const removedId = e.detail;
492
+ if (!removedId || !this.productImages[item.product.id])
493
+ return;
494
+ this.productImages = {
495
+ ...this.productImages,
496
+ [item.product.id]: this.productImages[item.product.id].filter(img => img.id !== removedId)
497
+ };
498
+ this.hiddenInputs[index].value = this.productImages[item.product.id].map(img => img.url).join(',');
499
+ }, labelIdle: this.getFilepondPlaceholder() }), h("input", { type: "hidden", name: `products[${index}][images]`, value: (this.productImages[item.product.id] || []).map(img => img.url).join(','), ref: (el) => (this.hiddenInputs[index] = el) }), this.renderUploadedImagesCount(item.product.id))))))
500
+ : '', this.order.shipping_enabled && this.order.shipping?.company
501
+ ? h("div", { class: "rating-outer-form s-rating-modal-step-wrap s-rating-modal-step s-rating-modal-hidden", "data-type": "shipping" }, h("input", { type: "hidden", name: "shipping_company_id", value: this.order.shipping.company.id }), this.order.shipping.company.logo
502
+ ? h("div", { class: "s-rating-modal-rounded-icon" }, h("img", { src: this.order.shipping.company.logo, class: "s-rating-modal-shipping-logo", alt: this.order.shipping.company.name }))
503
+ : h("span", { class: "s-rating-modal-icon", innerHTML: ShippingFast }), h("div", { class: "s-rating-modal-title" }, " ", `${salla.lang.get('pages.rating.rate_shipping')} ${this.order.shipping.company.name}`), h("div", { class: "s-rating-modal-stars-company" }, h("salla-rating-stars", { withLabel: true, size: "large" })), h("textarea", { name: "comment", class: "s-rating-modal-comment", placeholder: salla.lang.get('pages.rating.write_shipping_rate') }), h("small", { class: "s-rating-modal-validation-msg" }))
504
+ : '', h("div", { class: "s-rating-modal-thanks s-rating-modal-hidden", ref: el => this.thanksTab = el }, h("span", { class: "s-rating-modal-icon", innerHTML: CheckCircle2 }), h("h3", { class: "s-rating-modal-thanks-title" }, salla.lang.get('pages.rating.thanks')), h("div", { class: "s-rating-modal-thanks-msg", innerHTML: this.order.thanks_message }), h("time", { class: "s-rating-modal-thanks-time", ref: el => this.thanksTime = el }))), this.allowContactSupport && this.showContactWidget && (salla.config.get('store.contacts.whatsapp') || salla.config.get('store.contacts.email')) ? h("div", { class: "s-rating-modal-contact" }, h("p", null, this.contactUsLabel), h("div", { class: "s-rating-modal-contact-icons" }, salla.config.get('store.contacts.whatsapp') && h("span", { onClick: () => this.handleSendWhatsApp(), innerHTML: WhatsappIcon }), salla.config.get('store.contacts.email') && h("span", { onClick: () => this.handleSendEmail(), innerHTML: MailIcon }))) : '', h("div", { class: "s-rating-modal-footer" }, h("button", { ref: el => this.backBtn = el, onClick: () => this.previousTab(), class: "s-rating-modal-btn s-rating-modal-unvisiable" }, salla.lang.get('common.elements.back')), this.stepsCount > 1 ? h("ul", { class: "s-rating-modal-dots" }, [0, 1, 2].slice(0, this.stepsCount).map((v) => h("li", { key: v, class: 's-rating-modal-bg-gray s-rating-modal-step-dot' }))) : '', h("salla-button", { "loader-position": 'center', ref: el => this.nextBtn = el, onClick: () => this.submit() }, salla.lang.get('common.elements.next')))]
505
+ : h("salla-placeholder", { alignment: "center" }))));
506
+ }
507
+ }
508
+ async componentWillLoad() {
509
+ salla.event.on('rating::open', (params) => {
510
+ const orderId = params?.orderId || salla.config.get('page.id');
511
+ this.setOrder(orderId, params?.productId).then(() => this.open());
512
+ });
513
+ salla.event.on('rating::edit', (params) => this.openEditModal(params));
514
+ salla.event.on('rating::delete', (params) => this.openDeleteModal(params));
515
+ await salla.onReady();
516
+ this.syncNewPopUpFlag();
517
+ }
518
+ componentDidLoad() {
519
+ salla.event.dispatch('rating::ready', this);
520
+ }
521
+ get host() { return this; }
522
+ static get style() { return sallaRatingModalCss; }
523
+ }, [0, "salla-rating-modal", {
524
+ "orderId": [1032, "order-id"],
525
+ "productId": [1032, "product-id"],
526
+ "order": [32],
527
+ "hasError": [32],
528
+ "showContactWidget": [32],
529
+ "errorMessage": [32],
530
+ "images": [32],
531
+ "productImages": [32],
532
+ "editItemImages": [32],
533
+ "contact_body": [32],
534
+ "editMode": [32],
535
+ "defaultMode": [32],
536
+ "deleteMode": [32],
537
+ "shouldOpenDeleteModal": [32],
538
+ "editType": [32],
539
+ "editFeedbackId": [32],
540
+ "deleteFeedbackId": [32],
541
+ "editItem": [32],
542
+ "loyaltyImageRatingPoints": [32],
543
+ "enableNewPopUp": [32],
544
+ "setOrder": [64],
545
+ "open": [64],
546
+ "close": [64]
547
+ }]);
548
+ function defineCustomElement() {
549
+ if (typeof customElements === "undefined") {
550
+ return;
551
+ }
552
+ const components = ["salla-rating-modal", "salla-attachment-view", "salla-button", "salla-file-upload", "salla-loading", "salla-modal", "salla-placeholder", "salla-rating-modal-v2", "salla-rating-stars", "salla-skeleton", "salla-slider"];
553
+ components.forEach(tagName => { switch (tagName) {
554
+ case "salla-rating-modal":
555
+ if (!customElements.get(tagName)) {
556
+ customElements.define(tagName, SallaRatingModal);
557
+ }
558
+ break;
559
+ case "salla-attachment-view":
560
+ if (!customElements.get(tagName)) {
561
+ defineCustomElement$a();
562
+ }
563
+ break;
564
+ case "salla-button":
565
+ if (!customElements.get(tagName)) {
566
+ defineCustomElement$9();
567
+ }
568
+ break;
569
+ case "salla-file-upload":
570
+ if (!customElements.get(tagName)) {
571
+ defineCustomElement$8();
572
+ }
573
+ break;
574
+ case "salla-loading":
575
+ if (!customElements.get(tagName)) {
576
+ defineCustomElement$7();
577
+ }
578
+ break;
579
+ case "salla-modal":
580
+ if (!customElements.get(tagName)) {
581
+ defineCustomElement$6();
582
+ }
583
+ break;
584
+ case "salla-placeholder":
585
+ if (!customElements.get(tagName)) {
586
+ defineCustomElement$5();
587
+ }
588
+ break;
589
+ case "salla-rating-modal-v2":
590
+ if (!customElements.get(tagName)) {
591
+ defineCustomElement$4();
592
+ }
593
+ break;
594
+ case "salla-rating-stars":
595
+ if (!customElements.get(tagName)) {
596
+ defineCustomElement$3();
597
+ }
598
+ break;
599
+ case "salla-skeleton":
600
+ if (!customElements.get(tagName)) {
601
+ defineCustomElement$2();
602
+ }
603
+ break;
604
+ case "salla-slider":
605
+ if (!customElements.get(tagName)) {
606
+ defineCustomElement$1();
607
+ }
608
+ break;
609
+ } });
610
+ }
611
+ defineCustomElement();
612
+
613
+ export { SallaRatingModal as S, defineCustomElement as d };