@salla.sa/twilight-components 2.14.539 → 2.14.541

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 (401) hide show
  1. package/dist/cjs/{filepond-CIpOpiw6.js → filepond-CNdvfaMJ.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-CPV_SZrj.js → filepond-plugin-file-poster-Di_D3w89.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-C_XGylG1.js → filepond-plugin-file-validate-size-BiRa98qd.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-CmVS48lk.js → filepond-plugin-file-validate-type-Bolv-kyJ.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-KfqhH5F9.js → filepond-plugin-image-edit-AN6huMV9.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-BfRIDxO-.js → filepond-plugin-image-exif-orientation-Bwa8QtGo.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-DlvO4sHZ.js → filepond-plugin-image-preview-CaVYLAvG.js} +1 -1
  8. package/dist/cjs/helpers-ClOJIAG8.js +89 -0
  9. package/dist/cjs/{index-CMDyFi6Q.js → index-DX2EKTCE.js} +18 -14
  10. package/dist/cjs/{intlTelInput-BK34b4sR.js → intlTelInput-DnwdGAiP.js} +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/salla-accordion-body_2.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-accordion_6.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-add-product-button_5.cjs.entry.js +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-booking-field_7.cjs.entry.js → salla-attachment-view_9.cjs.entry.js} +1003 -40
  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 +2 -2
  28. package/dist/cjs/salla-comment-form_8.cjs.entry.js +14 -5
  29. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  30. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-cookies-bar.cjs.entry.js +303 -26
  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 +1 -1
  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 +1 -1
  84. package/dist/cjs/salla-rating-modal-v2.cjs.entry.js +420 -84
  85. package/dist/cjs/salla-rating-modal.cjs.entry.js +3 -5
  86. package/dist/cjs/salla-review-factors-tags.cjs.entry.js +4 -83
  87. package/dist/cjs/salla-review-order-item.cjs.entry.js +125 -0
  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 +1 -1
  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 +1 -1
  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/upload-limits-C3RarAPN.js +136 -0
  106. package/dist/cjs/{vanilla-picker-DYTpjTDj.js → vanilla-picker-BUFYPi-_.js} +1 -1
  107. package/dist/collection/collection-manifest.json +16 -11
  108. package/dist/collection/components/salla-attachment-view/salla-attachment-view.css +164 -0
  109. package/dist/collection/components/salla-attachment-view/salla-attachment-view.js +250 -0
  110. package/dist/collection/components/salla-attachments/salla-attachments.css +69 -0
  111. package/dist/collection/components/salla-attachments/salla-attachments.js +375 -0
  112. package/dist/collection/components/salla-comments/salla-comment-item.js +13 -3
  113. package/dist/collection/components/salla-comments/salla-comments.css +7 -0
  114. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.css +206 -56
  115. package/dist/collection/components/salla-cookies-bar/salla-cookies-bar.js +322 -30
  116. package/dist/collection/components/salla-datetime-picker/salla-datetime-picker.js +1 -1
  117. package/dist/collection/components/salla-file-upload/salla-file-upload.css +149 -0
  118. package/dist/collection/components/salla-file-upload/salla-file-upload.js +784 -42
  119. package/dist/collection/components/salla-file-upload/upload-limits.js +127 -0
  120. package/dist/collection/components/salla-products-slider/salla-products-slider.js +1 -1
  121. package/dist/collection/components/salla-rating-modal/rating-modal-media.js +85 -0
  122. package/dist/collection/components/salla-rating-modal/salla-rating-modal-v2.js +348 -85
  123. package/dist/collection/components/salla-rating-modal/salla-rating-modal.css +17 -7
  124. package/dist/collection/components/salla-rating-modal/salla-rating-modal.js +1 -3
  125. package/dist/collection/components/salla-review-factors-tags/helpers.js +8 -7
  126. package/dist/collection/components/salla-review-order-item/interfaces.js +1 -0
  127. package/dist/collection/components/salla-review-order-item/salla-review-order-item.js +154 -0
  128. package/dist/components/index.js +2 -2
  129. package/dist/components/salla-add-product-button2.js +40 -28
  130. package/dist/components/salla-attachment-view.d.ts +11 -0
  131. package/dist/components/salla-attachment-view.js +9 -0
  132. package/dist/components/salla-attachment-view2.js +323 -0
  133. package/dist/components/salla-attachments.d.ts +11 -0
  134. package/dist/components/salla-attachments.js +9 -0
  135. package/dist/components/salla-attachments2.js +232 -0
  136. package/dist/components/salla-basket-gap.js +46 -34
  137. package/dist/components/salla-breadcrumb.js +1 -1
  138. package/dist/components/salla-comment-factors2.js +1 -1
  139. package/dist/components/salla-comment-item2.js +26 -4
  140. package/dist/components/salla-comments.js +14 -2
  141. package/dist/components/salla-cookies-bar.js +319 -27
  142. package/dist/components/salla-custom-fields.js +28 -4
  143. package/dist/components/salla-file-upload2.js +703 -31
  144. package/dist/components/salla-gifting.js +7 -1
  145. package/dist/components/salla-loyalty-exchange-product-card2.js +46 -34
  146. package/dist/components/salla-loyalty-panel.js +8 -2
  147. package/dist/components/salla-loyalty-program.js +8 -2
  148. package/dist/components/salla-multiple-bundle-product-cart2.js +40 -28
  149. package/dist/components/salla-multiple-bundle-product-details2.js +12 -6
  150. package/dist/components/salla-multiple-bundle-product-options-modal2.js +7 -1
  151. package/dist/components/salla-multiple-bundle-product-slider2.js +1 -1
  152. package/dist/components/salla-multiple-bundle-product.js +12 -6
  153. package/dist/components/salla-offer-modal.js +8 -2
  154. package/dist/components/salla-order-edit-item2.js +36 -24
  155. package/dist/components/salla-order-edit.js +42 -30
  156. package/dist/components/salla-order-options-modal2.js +34 -22
  157. package/dist/components/salla-product-card2.js +44 -32
  158. package/dist/components/salla-product-options2.js +32 -20
  159. package/dist/components/salla-products-slider2.js +8 -2
  160. package/dist/components/salla-quick-buy2.js +36 -24
  161. package/dist/components/salla-rating-modal-v22.js +449 -97
  162. package/dist/components/salla-rating-modal.js +30 -20
  163. package/dist/components/salla-review-factors-tags2.js +9 -8
  164. package/dist/components/salla-review-order-item.d.ts +11 -0
  165. package/dist/components/salla-review-order-item.js +196 -0
  166. package/dist/components/salla-reward-details2.js +8 -2
  167. package/dist/components/salla-slider2.js +1 -1
  168. package/dist/esm/{filepond-DMUE9Fyj.js → filepond-CKsbRWmS.js} +1 -1
  169. package/dist/esm/{filepond-plugin-file-poster-DBZQTm7s.js → filepond-plugin-file-poster-B_gYCESq.js} +1 -1
  170. package/dist/esm/{filepond-plugin-file-validate-size-CrKxdsNW.js → filepond-plugin-file-validate-size-Bep6fNi3.js} +1 -1
  171. package/dist/esm/{filepond-plugin-file-validate-type-DvEJrucY.js → filepond-plugin-file-validate-type-r3uRmGIr.js} +1 -1
  172. package/dist/esm/{filepond-plugin-image-edit-C6ptCg9o.js → filepond-plugin-image-edit-BJcOlOFL.js} +1 -1
  173. package/dist/esm/{filepond-plugin-image-exif-orientation-IcgeTieF.js → filepond-plugin-image-exif-orientation-DJoDaRwQ.js} +1 -1
  174. package/dist/esm/{filepond-plugin-image-preview-CDMh74os.js → filepond-plugin-image-preview-BsuTLPS0.js} +1 -1
  175. package/dist/esm/helpers-DqXpn47Z.js +85 -0
  176. package/dist/esm/{index-CjQzkU95.js → index-BVqCTDsV.js} +18 -14
  177. package/dist/esm/{intlTelInput-Dsx2z7pR.js → intlTelInput-CD2FA0nI.js} +1 -1
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/salla-accordion-body_2.entry.js +1 -1
  180. package/dist/esm/salla-accordion_6.entry.js +1 -1
  181. package/dist/esm/salla-add-product-button_5.entry.js +1 -1
  182. package/dist/esm/salla-advertisement.entry.js +1 -1
  183. package/dist/esm/salla-alert_2.entry.js +1 -1
  184. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  185. package/dist/esm/salla-apps-icons.entry.js +1 -1
  186. package/dist/esm/{salla-booking-field_7.entry.js → salla-attachment-view_9.entry.js} +1002 -41
  187. package/dist/esm/salla-badge.entry.js +1 -1
  188. package/dist/esm/salla-basket-gap.entry.js +1 -1
  189. package/dist/esm/salla-bullet-delivery_2.entry.js +1 -1
  190. package/dist/esm/salla-cart-coupons.entry.js +1 -1
  191. package/dist/esm/salla-cart-item-offers_2.entry.js +1 -1
  192. package/dist/esm/salla-cart-summary-card.entry.js +1 -1
  193. package/dist/esm/salla-cashback-banner.entry.js +1 -1
  194. package/dist/esm/salla-comment-factors.entry.js +2 -2
  195. package/dist/esm/salla-comment-form_8.entry.js +14 -5
  196. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  197. package/dist/esm/salla-contacts.entry.js +1 -1
  198. package/dist/esm/salla-cookies-bar.entry.js +303 -26
  199. package/dist/esm/salla-count-down.entry.js +1 -1
  200. package/dist/esm/salla-custom-fields.entry.js +1 -1
  201. package/dist/esm/salla-delivery-promise.entry.js +1 -1
  202. package/dist/esm/salla-edit-order-button.entry.js +1 -1
  203. package/dist/esm/salla-filters-widget.entry.js +1 -1
  204. package/dist/esm/salla-filters.entry.js +1 -1
  205. package/dist/esm/salla-fulfillment-methods.entry.js +1 -1
  206. package/dist/esm/salla-gifting.entry.js +1 -1
  207. package/dist/esm/salla-hook.entry.js +1 -1
  208. package/dist/esm/salla-infinite-scroll.entry.js +1 -1
  209. package/dist/esm/salla-installment.entry.js +1 -1
  210. package/dist/esm/salla-list-tile.entry.js +1 -1
  211. package/dist/esm/salla-localization-modal.entry.js +1 -1
  212. package/dist/esm/salla-login-modal.entry.js +1 -1
  213. package/dist/esm/salla-loyalty-banner_10.entry.js +1 -1
  214. package/dist/esm/salla-loyalty-exchange-product-card.entry.js +1 -1
  215. package/dist/esm/salla-loyalty-points-banner.entry.js +1 -1
  216. package/dist/esm/salla-loyalty-points-history.entry.js +1 -1
  217. package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
  218. package/dist/esm/salla-loyalty.entry.js +1 -1
  219. package/dist/esm/salla-maintenance-alert.entry.js +1 -1
  220. package/dist/esm/salla-map_2.entry.js +1 -1
  221. package/dist/esm/salla-menu.entry.js +1 -1
  222. package/dist/esm/salla-metadata.entry.js +1 -1
  223. package/dist/esm/salla-multiple-bundle-product-cart_2.entry.js +1 -1
  224. package/dist/esm/salla-multiple-bundle-product-options-modal_2.entry.js +1 -1
  225. package/dist/esm/salla-multiple-bundle-product.entry.js +1 -1
  226. package/dist/esm/salla-next-order-coupon.entry.js +1 -1
  227. package/dist/esm/salla-notification-item_2.entry.js +1 -1
  228. package/dist/esm/salla-offer-modal.entry.js +1 -1
  229. package/dist/esm/salla-offer.entry.js +1 -1
  230. package/dist/esm/salla-order-branch.entry.js +1 -1
  231. package/dist/esm/salla-order-cancel.entry.js +1 -1
  232. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
  233. package/dist/esm/salla-order-details-options.entry.js +1 -1
  234. package/dist/esm/salla-order-details.entry.js +1 -1
  235. package/dist/esm/salla-order-edit-item.entry.js +1 -1
  236. package/dist/esm/salla-order-edit-product-card.entry.js +1 -1
  237. package/dist/esm/salla-order-edit.entry.js +1 -1
  238. package/dist/esm/salla-order-options-modal_2.entry.js +1 -1
  239. package/dist/esm/salla-order-shipments.entry.js +1 -1
  240. package/dist/esm/salla-order-summary.entry.js +1 -1
  241. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  242. package/dist/esm/salla-orders.entry.js +1 -1
  243. package/dist/esm/salla-payments.entry.js +1 -1
  244. package/dist/esm/salla-placeholder.entry.js +1 -1
  245. package/dist/esm/salla-price-range.entry.js +1 -1
  246. package/dist/esm/salla-product-card-embed.entry.js +1 -1
  247. package/dist/esm/salla-product-size-guide.entry.js +1 -1
  248. package/dist/esm/salla-products-list.entry.js +1 -1
  249. package/dist/esm/salla-products-slider.entry.js +1 -1
  250. package/dist/esm/salla-quick-order.entry.js +1 -1
  251. package/dist/esm/salla-rating-modal-v2.entry.js +420 -84
  252. package/dist/esm/salla-rating-modal.entry.js +3 -5
  253. package/dist/esm/salla-review-factors-tags.entry.js +2 -81
  254. package/dist/esm/salla-review-order-item.entry.js +123 -0
  255. package/dist/esm/salla-scopes.entry.js +1 -1
  256. package/dist/esm/salla-search.entry.js +1 -1
  257. package/dist/esm/salla-skeleton.entry.js +1 -1
  258. package/dist/esm/salla-slider.entry.js +1 -1
  259. package/dist/esm/salla-social-share.entry.js +1 -1
  260. package/dist/esm/salla-social.entry.js +1 -1
  261. package/dist/esm/salla-tab-content_3.entry.js +1 -1
  262. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  263. package/dist/esm/salla-tooltip.entry.js +1 -1
  264. package/dist/esm/salla-trust-badges.entry.js +1 -1
  265. package/dist/esm/salla-user-menu.entry.js +1 -1
  266. package/dist/esm/salla-user-profile.entry.js +1 -1
  267. package/dist/esm/salla-user-settings.entry.js +1 -1
  268. package/dist/esm/salla-verify.entry.js +1 -1
  269. package/dist/esm/salla-wallet.entry.js +1 -1
  270. package/dist/esm/salla-wishlist-actions.entry.js +1 -1
  271. package/dist/esm/twilight.js +3 -3
  272. package/dist/esm/upload-limits-DrXX8XG8.js +121 -0
  273. package/dist/esm/{vanilla-picker-oYjMgYry.js → vanilla-picker-Ba_za9Iy.js} +1 -1
  274. package/dist/twilight/{p-49e6fe86.entry.js → p-003499a8.entry.js} +1 -1
  275. package/dist/twilight/{p-58184ae2.entry.js → p-0974f6c6.entry.js} +1 -1
  276. package/dist/twilight/{p-3052178c.entry.js → p-0a9093f1.entry.js} +1 -1
  277. package/dist/twilight/{p-cb179aba.entry.js → p-0ce2c41f.entry.js} +1 -1
  278. package/dist/twilight/{p-bbe79568.entry.js → p-0ea8365b.entry.js} +1 -1
  279. package/dist/twilight/p-1174e53e.entry.js +4 -0
  280. package/dist/twilight/{p-fe7990b7.entry.js → p-11ef8b82.entry.js} +1 -1
  281. package/dist/twilight/{p-dd5800dd.entry.js → p-13244c52.entry.js} +1 -1
  282. package/dist/twilight/{p-187a502c.entry.js → p-14689252.entry.js} +1 -1
  283. package/dist/twilight/{p-48db7b95.entry.js → p-17940d8a.entry.js} +1 -1
  284. package/dist/twilight/{p-a802826b.entry.js → p-1974f6da.entry.js} +1 -1
  285. package/dist/twilight/{p-250d7ab2.entry.js → p-1a191989.entry.js} +1 -1
  286. package/dist/twilight/{p-1d2804ac.entry.js → p-1ec6e0fe.entry.js} +1 -1
  287. package/dist/twilight/{p-5bbf829e.entry.js → p-1fcebaad.entry.js} +1 -1
  288. package/dist/twilight/{p-51a860bc.entry.js → p-2b0cf190.entry.js} +1 -1
  289. package/dist/twilight/{p-68c8772a.entry.js → p-333ea76b.entry.js} +1 -1
  290. package/dist/twilight/{p-8ef3693b.entry.js → p-337cc9f6.entry.js} +1 -1
  291. package/dist/twilight/{p-f7298462.entry.js → p-34d5c7bf.entry.js} +1 -1
  292. package/dist/twilight/{p-b1812d5c.entry.js → p-36abc50f.entry.js} +1 -1
  293. package/dist/twilight/{p-a1494e64.entry.js → p-37d9f762.entry.js} +1 -1
  294. package/dist/twilight/{p-5e9fb02d.entry.js → p-3961522a.entry.js} +1 -1
  295. package/dist/twilight/{p-1754903f.entry.js → p-39d9e02f.entry.js} +1 -1
  296. package/dist/twilight/{p-152c657e.entry.js → p-3a4bb8de.entry.js} +1 -1
  297. package/dist/twilight/{p-7c74dc6e.entry.js → p-409f95a8.entry.js} +1 -1
  298. package/dist/twilight/{p-3bc64439.entry.js → p-42952fac.entry.js} +1 -1
  299. package/dist/twilight/{p-0a1271e1.entry.js → p-436dfe93.entry.js} +1 -1
  300. package/dist/twilight/{p-44cfb2c2.entry.js → p-50c90e0a.entry.js} +1 -1
  301. package/dist/twilight/{p-31c36417.entry.js → p-5115117b.entry.js} +1 -1
  302. package/dist/twilight/{p-1fb46b43.entry.js → p-56647774.entry.js} +1 -1
  303. package/dist/twilight/{p-e020f1c3.entry.js → p-598cadf4.entry.js} +1 -1
  304. package/dist/twilight/{p-331679d8.entry.js → p-635265d1.entry.js} +1 -1
  305. package/dist/twilight/{p-1470e96a.entry.js → p-659e2280.entry.js} +1 -1
  306. package/dist/twilight/p-6a3487de.entry.js +4 -0
  307. package/dist/twilight/{p-1c31cec0.entry.js → p-6d07d195.entry.js} +1 -1
  308. package/dist/twilight/{p-91b4a1a0.entry.js → p-6ee096e8.entry.js} +1 -1
  309. package/dist/twilight/{p-37413a02.entry.js → p-723aeda4.entry.js} +1 -1
  310. package/dist/twilight/{p-ae536a61.entry.js → p-743b79ae.entry.js} +1 -1
  311. package/dist/twilight/{p-b193c991.entry.js → p-75e692d1.entry.js} +1 -1
  312. package/dist/twilight/{p-9c7fcbb0.entry.js → p-79444897.entry.js} +1 -1
  313. package/dist/twilight/{p-6ed4c9bb.entry.js → p-7b23dec7.entry.js} +1 -1
  314. package/dist/twilight/p-7bb24ad6.entry.js +4 -0
  315. package/dist/twilight/{p-c254b6fa.entry.js → p-7d9288b0.entry.js} +1 -1
  316. package/dist/twilight/{p-82c12191.entry.js → p-85f95a58.entry.js} +1 -1
  317. package/dist/twilight/{p-67e88dc4.entry.js → p-86a1f616.entry.js} +1 -1
  318. package/dist/twilight/{p-80ff5572.entry.js → p-87115499.entry.js} +1 -1
  319. package/dist/twilight/{p-cc2b960c.entry.js → p-878c2be2.entry.js} +1 -1
  320. package/dist/twilight/{p-b69e98a8.entry.js → p-89e9a91f.entry.js} +1 -1
  321. package/dist/twilight/{p-2e112687.entry.js → p-90ee37c7.entry.js} +1 -1
  322. package/dist/twilight/{p-aeb76c46.entry.js → p-96584590.entry.js} +1 -1
  323. package/dist/twilight/{p-1dd1fef0.entry.js → p-96a57e9c.entry.js} +1 -1
  324. package/dist/twilight/{p-1c369bcf.entry.js → p-978e4164.entry.js} +1 -1
  325. package/dist/twilight/{p-4058b619.entry.js → p-97fc57c1.entry.js} +1 -1
  326. package/dist/twilight/p-98b1ff35.entry.js +4 -0
  327. package/dist/twilight/{p-5d01f25c.entry.js → p-9d18525b.entry.js} +1 -1
  328. package/dist/twilight/{p-CmQyEOxJ.js → p-B83s3cRn.js} +2 -2
  329. package/dist/twilight/{p-CjQzkU95.js → p-BVqCTDsV.js} +1 -1
  330. package/dist/twilight/{p-BtymczNp.js → p-CP29f7RQ.js} +1 -1
  331. package/dist/twilight/{p-C6w35AiQ.js → p-CS-t4QAX.js} +1 -1
  332. package/dist/twilight/{p-BiyhYWus.js → p-Cluq3aDa.js} +1 -1
  333. package/dist/twilight/{p-DfJdKB52.js → p-D-zqM6k8.js} +1 -1
  334. package/dist/twilight/{p-CGDRqU6i.js → p-DJmqmO68.js} +1 -1
  335. package/dist/twilight/{p-D2uiOzVz.js → p-DgwK96eP.js} +1 -1
  336. package/dist/twilight/p-DqXpn47Z.js +4 -0
  337. package/dist/twilight/p-DrXX8XG8.js +4 -0
  338. package/dist/twilight/{p-C1wu6qA1.js → p-DzW3U8TR.js} +1 -1
  339. package/dist/twilight/{p-B9VKgTTF.js → p-JKh0XFIn.js} +1 -1
  340. package/dist/twilight/{p-699bea26.entry.js → p-a347e701.entry.js} +1 -1
  341. package/dist/twilight/{p-9fa351ab.entry.js → p-a5d08af6.entry.js} +1 -1
  342. package/dist/twilight/{p-8230c543.entry.js → p-a774f6f0.entry.js} +7 -7
  343. package/dist/twilight/p-afaa0fbe.entry.js +4 -0
  344. package/dist/twilight/p-b389b1d3.entry.js +4 -0
  345. package/dist/twilight/{p-298ff716.entry.js → p-b6d5ae9b.entry.js} +1 -1
  346. package/dist/twilight/{p-b0e86201.entry.js → p-b862c670.entry.js} +1 -1
  347. package/dist/twilight/{p-2e43ddf0.entry.js → p-bab59319.entry.js} +1 -1
  348. package/dist/twilight/{p-437fe6f1.entry.js → p-bf4c2184.entry.js} +1 -1
  349. package/dist/twilight/{p-7f73ff43.entry.js → p-c19cf93c.entry.js} +1 -1
  350. package/dist/twilight/{p-3f26f1c5.entry.js → p-c34f8c08.entry.js} +1 -1
  351. package/dist/twilight/{p-116e7555.entry.js → p-c47ecca7.entry.js} +1 -1
  352. package/dist/twilight/{p-84f35767.entry.js → p-c48f5c6b.entry.js} +1 -1
  353. package/dist/twilight/{p-40217fcc.entry.js → p-c53c2f59.entry.js} +1 -1
  354. package/dist/twilight/{p-1151ebd7.entry.js → p-cd805a38.entry.js} +1 -1
  355. package/dist/twilight/{p-4868c03c.entry.js → p-cdd8ed7f.entry.js} +1 -1
  356. package/dist/twilight/{p-9b6db6a7.entry.js → p-ced4b7ac.entry.js} +1 -1
  357. package/dist/twilight/{p-a3f00389.entry.js → p-cf3365e2.entry.js} +1 -1
  358. package/dist/twilight/p-d78998b7.entry.js +4 -0
  359. package/dist/twilight/{p-665bca88.entry.js → p-daea3207.entry.js} +1 -1
  360. package/dist/twilight/{p-664f0936.entry.js → p-dff6d623.entry.js} +1 -1
  361. package/dist/twilight/p-e04221de.entry.js +4 -0
  362. package/dist/twilight/{p-db02986a.entry.js → p-e2934193.entry.js} +1 -1
  363. package/dist/twilight/{p-14c72ffd.entry.js → p-e3dab961.entry.js} +1 -1
  364. package/dist/twilight/{p-bf183f3a.entry.js → p-e41e5fc7.entry.js} +1 -1
  365. package/dist/twilight/{p-5b03dca8.entry.js → p-e4c9cef4.entry.js} +1 -1
  366. package/dist/twilight/{p-27a0a4cc.entry.js → p-eaf9d536.entry.js} +1 -1
  367. package/dist/twilight/{p-a669483e.entry.js → p-ee2b16d7.entry.js} +1 -1
  368. package/dist/twilight/{p-fa28a89f.entry.js → p-ee3ddc23.entry.js} +1 -1
  369. package/dist/twilight/{p-54d0db9a.entry.js → p-f0a14b18.entry.js} +1 -1
  370. package/dist/twilight/{p-8fa84b87.entry.js → p-f195a63d.entry.js} +1 -1
  371. package/dist/twilight/{p-997c4966.entry.js → p-f2c688d6.entry.js} +1 -1
  372. package/dist/twilight/{p-2c6c0844.entry.js → p-f4ac8cae.entry.js} +1 -1
  373. package/dist/twilight/{p-2babb4bd.entry.js → p-f58d14ed.entry.js} +1 -1
  374. package/dist/twilight/{p-3bdba697.entry.js → p-f82cee0c.entry.js} +1 -1
  375. package/dist/twilight/{p-8ae7bf96.entry.js → p-fa17989b.entry.js} +1 -1
  376. package/dist/twilight/{p-b3fe5e44.entry.js → p-fbc075fe.entry.js} +1 -1
  377. package/dist/twilight/{p-3b6b3c54.entry.js → p-fc5d5473.entry.js} +1 -1
  378. package/dist/twilight/twilight.esm.js +1 -1
  379. package/dist/types/components/salla-attachment-view/salla-attachment-view.d.ts +47 -0
  380. package/dist/types/components/salla-attachments/salla-attachments.d.ts +73 -0
  381. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  382. package/dist/types/components/salla-comments/salla-comment-item.d.ts +3 -1
  383. package/dist/types/components/salla-cookies-bar/salla-cookies-bar.d.ts +117 -12
  384. package/dist/types/components/salla-file-upload/salla-file-upload.d.ts +127 -4
  385. package/dist/types/components/salla-file-upload/upload-limits.d.ts +49 -0
  386. package/dist/types/components/salla-rating-modal/rating-modal-media.d.ts +38 -0
  387. package/dist/types/components/salla-rating-modal/salla-rating-modal-v2.d.ts +30 -7
  388. package/dist/types/components/salla-review-factors-tags/helpers.d.ts +1 -1
  389. package/dist/types/components/salla-review-factors-tags/interfaces.d.ts +7 -0
  390. package/dist/types/components/salla-review-order-item/interfaces.d.ts +30 -0
  391. package/dist/types/components/salla-review-order-item/salla-review-order-item.d.ts +30 -0
  392. package/dist/types/components.d.ts +286 -11
  393. package/package.json +6 -6
  394. package/dist/twilight/p-236f371d.entry.js +0 -4
  395. package/dist/twilight/p-3c22551b.entry.js +0 -4
  396. package/dist/twilight/p-8bce41c8.entry.js +0 -4
  397. package/dist/twilight/p-e701a3dc.entry.js +0 -4
  398. package/dist/twilight/p-f1eebeda.entry.js +0 -4
  399. package/dist/twilight/p-f4bdf19e.entry.js +0 -4
  400. package/dist/twilight/p-faaf4423.entry.js +0 -4
  401. package/dist/components/{keyboard_arrow_right.js → keyboard_arrow_left.js} +6 -6
@@ -4,20 +4,22 @@
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
5
  import { P as PendingOrdersIcon } from './cart.js';
6
6
  import { H as Helper } from './Helper.js';
7
- import { d as defineCustomElement$2, c as canCompleteApplePay } from './salla-quick-buy2.js';
8
- import { d as defineCustomElement$f } from './salla-booking-field2.js';
9
- import { d as defineCustomElement$e } from './salla-button2.js';
10
- import { d as defineCustomElement$d } from './salla-color-picker2.js';
11
- import { d as defineCustomElement$c } from './salla-conditional-fields2.js';
12
- import { d as defineCustomElement$b } from './salla-datetime-picker2.js';
13
- import { d as defineCustomElement$a } from './salla-file-upload2.js';
14
- import { d as defineCustomElement$9 } from './salla-loading2.js';
15
- import { d as defineCustomElement$8 } from './salla-map2.js';
16
- import { d as defineCustomElement$7 } from './salla-modal2.js';
17
- import { d as defineCustomElement$6 } from './salla-order-options-modal2.js';
18
- import { d as defineCustomElement$5 } from './salla-product-availability2.js';
19
- import { d as defineCustomElement$4 } from './salla-product-options2.js';
20
- import { d as defineCustomElement$3 } from './salla-progress-bar2.js';
7
+ import { d as defineCustomElement$3, c as canCompleteApplePay } from './salla-quick-buy2.js';
8
+ import { d as defineCustomElement$h } from './salla-attachment-view2.js';
9
+ import { d as defineCustomElement$g } from './salla-booking-field2.js';
10
+ import { d as defineCustomElement$f } from './salla-button2.js';
11
+ import { d as defineCustomElement$e } from './salla-color-picker2.js';
12
+ import { d as defineCustomElement$d } from './salla-conditional-fields2.js';
13
+ import { d as defineCustomElement$c } from './salla-datetime-picker2.js';
14
+ import { d as defineCustomElement$b } from './salla-file-upload2.js';
15
+ import { d as defineCustomElement$a } from './salla-loading2.js';
16
+ import { d as defineCustomElement$9 } from './salla-map2.js';
17
+ import { d as defineCustomElement$8 } from './salla-modal2.js';
18
+ import { d as defineCustomElement$7 } from './salla-order-options-modal2.js';
19
+ import { d as defineCustomElement$6 } from './salla-product-availability2.js';
20
+ import { d as defineCustomElement$5 } from './salla-product-options2.js';
21
+ import { d as defineCustomElement$4 } from './salla-progress-bar2.js';
22
+ import { d as defineCustomElement$2 } from './salla-slider2.js';
21
23
  import { d as defineCustomElement$1 } from './salla-tel-input2.js';
22
24
 
23
25
  var WalletIcon = `<!-- Generated by IcoMoon.io -->
@@ -425,79 +427,89 @@ function defineCustomElement() {
425
427
  if (typeof customElements === "undefined") {
426
428
  return;
427
429
  }
428
- const components = ["salla-add-product-button", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-product-availability", "salla-product-options", "salla-progress-bar", "salla-quick-buy", "salla-tel-input"];
430
+ const components = ["salla-add-product-button", "salla-attachment-view", "salla-booking-field", "salla-button", "salla-color-picker", "salla-conditional-fields", "salla-datetime-picker", "salla-file-upload", "salla-loading", "salla-map", "salla-modal", "salla-order-options-modal", "salla-product-availability", "salla-product-options", "salla-progress-bar", "salla-quick-buy", "salla-slider", "salla-tel-input"];
429
431
  components.forEach(tagName => { switch (tagName) {
430
432
  case "salla-add-product-button":
431
433
  if (!customElements.get(tagName)) {
432
434
  customElements.define(tagName, SallaAddProductButton);
433
435
  }
434
436
  break;
437
+ case "salla-attachment-view":
438
+ if (!customElements.get(tagName)) {
439
+ defineCustomElement$h();
440
+ }
441
+ break;
435
442
  case "salla-booking-field":
436
443
  if (!customElements.get(tagName)) {
437
- defineCustomElement$f();
444
+ defineCustomElement$g();
438
445
  }
439
446
  break;
440
447
  case "salla-button":
441
448
  if (!customElements.get(tagName)) {
442
- defineCustomElement$e();
449
+ defineCustomElement$f();
443
450
  }
444
451
  break;
445
452
  case "salla-color-picker":
446
453
  if (!customElements.get(tagName)) {
447
- defineCustomElement$d();
454
+ defineCustomElement$e();
448
455
  }
449
456
  break;
450
457
  case "salla-conditional-fields":
451
458
  if (!customElements.get(tagName)) {
452
- defineCustomElement$c();
459
+ defineCustomElement$d();
453
460
  }
454
461
  break;
455
462
  case "salla-datetime-picker":
456
463
  if (!customElements.get(tagName)) {
457
- defineCustomElement$b();
464
+ defineCustomElement$c();
458
465
  }
459
466
  break;
460
467
  case "salla-file-upload":
461
468
  if (!customElements.get(tagName)) {
462
- defineCustomElement$a();
469
+ defineCustomElement$b();
463
470
  }
464
471
  break;
465
472
  case "salla-loading":
466
473
  if (!customElements.get(tagName)) {
467
- defineCustomElement$9();
474
+ defineCustomElement$a();
468
475
  }
469
476
  break;
470
477
  case "salla-map":
471
478
  if (!customElements.get(tagName)) {
472
- defineCustomElement$8();
479
+ defineCustomElement$9();
473
480
  }
474
481
  break;
475
482
  case "salla-modal":
476
483
  if (!customElements.get(tagName)) {
477
- defineCustomElement$7();
484
+ defineCustomElement$8();
478
485
  }
479
486
  break;
480
487
  case "salla-order-options-modal":
481
488
  if (!customElements.get(tagName)) {
482
- defineCustomElement$6();
489
+ defineCustomElement$7();
483
490
  }
484
491
  break;
485
492
  case "salla-product-availability":
486
493
  if (!customElements.get(tagName)) {
487
- defineCustomElement$5();
494
+ defineCustomElement$6();
488
495
  }
489
496
  break;
490
497
  case "salla-product-options":
491
498
  if (!customElements.get(tagName)) {
492
- defineCustomElement$4();
499
+ defineCustomElement$5();
493
500
  }
494
501
  break;
495
502
  case "salla-progress-bar":
496
503
  if (!customElements.get(tagName)) {
497
- defineCustomElement$3();
504
+ defineCustomElement$4();
498
505
  }
499
506
  break;
500
507
  case "salla-quick-buy":
508
+ if (!customElements.get(tagName)) {
509
+ defineCustomElement$3();
510
+ }
511
+ break;
512
+ case "salla-slider":
501
513
  if (!customElements.get(tagName)) {
502
514
  defineCustomElement$2();
503
515
  }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SallaAttachmentView extends Components.SallaAttachmentView, HTMLElement {}
4
+ export const SallaAttachmentView: {
5
+ prototype: SallaAttachmentView;
6
+ new (): SallaAttachmentView;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { S as SallaAttachmentView$1, d as defineCustomElement$1 } from './salla-attachment-view2.js';
5
+
6
+ const SallaAttachmentView = SallaAttachmentView$1;
7
+ const defineCustomElement = defineCustomElement$1;
8
+
9
+ export { SallaAttachmentView, defineCustomElement };
@@ -0,0 +1,323 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
5
+ import { d as defineCustomElement$4 } from './salla-button2.js';
6
+ import { d as defineCustomElement$3 } from './salla-loading2.js';
7
+ import { d as defineCustomElement$2 } from './salla-modal2.js';
8
+ import { d as defineCustomElement$1 } from './salla-slider2.js';
9
+
10
+ const IMAGE_UPLOAD_ACCEPT = 'image/png, image/jpeg, image/jpg';
11
+ /** Valid MIME types + extensions for native file pickers (macOS Finder requires real MIME types). */
12
+ const VIDEO_UPLOAD_ACCEPT = 'video/mp4, video/quicktime, video/x-msvideo, video/x-matroska, video/webm, .mp4, .mov, .avi, .mkv, .webm';
13
+ function buildMediaUploadAccept(allowImages, allowVideos) {
14
+ const types = [];
15
+ if (allowImages)
16
+ types.push(IMAGE_UPLOAD_ACCEPT);
17
+ if (allowVideos)
18
+ types.push(VIDEO_UPLOAD_ACCEPT);
19
+ return types.join(', ');
20
+ }
21
+ function usesSplitCountLimits(maxImagesCount, maxVideosCount) {
22
+ return maxImagesCount != null || maxVideosCount != null;
23
+ }
24
+ function getMaxImagesCount(maxImagesCount) {
25
+ return maxImagesCount ?? 0;
26
+ }
27
+ function getMaxVideosCount(maxVideosCount) {
28
+ return maxVideosCount ?? 0;
29
+ }
30
+ function getTotalMaxFiles(maxFilesCount, maxImagesCount, maxVideosCount) {
31
+ if (usesSplitCountLimits(maxImagesCount, maxVideosCount)) {
32
+ return getMaxImagesCount(maxImagesCount) + getMaxVideosCount(maxVideosCount);
33
+ }
34
+ return maxFilesCount;
35
+ }
36
+ function isVideoMimeType(mimeType, urlOrName) {
37
+ if (mimeType?.startsWith('video/'))
38
+ return true;
39
+ if (urlOrName && /\.(mp4|webm|mov|avi|mkv)$/i.test(urlOrName))
40
+ return true;
41
+ return false;
42
+ }
43
+ function isImageMimeType(mimeType, urlOrName) {
44
+ if (mimeType?.startsWith('image/'))
45
+ return true;
46
+ if (urlOrName && /\.(png|jpe?g|gif|webp|heic|heif)$/i.test(urlOrName))
47
+ return true;
48
+ return false;
49
+ }
50
+ function parseSizeToBytes(size) {
51
+ const match = size.match(/^(\d+(?:\.\d+)?)\s*(KB|MB)$/i);
52
+ if (!match)
53
+ return 0;
54
+ const value = parseFloat(match[1]);
55
+ return match[2].toUpperCase() === 'MB' ? value * 1024 * 1024 : value * 1024;
56
+ }
57
+ function formatBytesAsSize(bytes) {
58
+ if (bytes >= 1024 * 1024) {
59
+ return `${Math.round(bytes / (1024 * 1024))}MB`;
60
+ }
61
+ return `${Math.round(bytes / 1024)}KB`;
62
+ }
63
+ function formatDuration(seconds) {
64
+ const mins = Math.floor(seconds / 60);
65
+ const secs = Math.floor(seconds % 60);
66
+ if (mins > 0) {
67
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
68
+ }
69
+ return `${secs}s`;
70
+ }
71
+ function getFilePondMaxFileSize(maxFileSize, storeUploadSizeKb, maxVideoFileSize) {
72
+ const imageLimit = storeUploadSizeKb ? `${storeUploadSizeKb}KB` : maxFileSize;
73
+ const limits = [imageLimit, maxVideoFileSize].filter(Boolean).map(s => parseSizeToBytes(s));
74
+ if (!limits.length) {
75
+ return null;
76
+ }
77
+ return formatBytesAsSize(Math.max(...limits));
78
+ }
79
+ function isUploadSizeError(error) {
80
+ const body = (error.body || '').toLowerCase();
81
+ return (error.type === 'size' ||
82
+ body.includes('too large') ||
83
+ body.includes('max file size') ||
84
+ body.includes('file is too big') ||
85
+ body.includes('exceeds'));
86
+ }
87
+ function isUploadTypeError(error) {
88
+ const body = (error.body || '').toLowerCase();
89
+ return (error.type === 'type' ||
90
+ body.includes('invalid type') ||
91
+ body.includes('not allowed') ||
92
+ body.includes('file type'));
93
+ }
94
+ function getUploadErrorMessage(error, options) {
95
+ if (isUploadSizeError(error)) {
96
+ if (options.isVideo) {
97
+ const sizeLabel = options.maxVideoFileSizeLabel ||
98
+ (options.maxVideoBytes ? formatBytesAsSize(options.maxVideoBytes) : '');
99
+ return options.videoTooLarge(sizeLabel);
100
+ }
101
+ return options.tooLargeLabel;
102
+ }
103
+ if (isUploadTypeError(error)) {
104
+ return options.invalidTypeLabel;
105
+ }
106
+ if (error.body) {
107
+ return error.body;
108
+ }
109
+ return options.genericErrorLabel;
110
+ }
111
+ /** FilePond FileStatus values used for gallery counting. */
112
+ const FILE_STATUS_INIT = 1;
113
+ const FILE_STATUS_PROCESSING_ERROR = 6;
114
+ const FILE_STATUS_LOADING = 7;
115
+ const FILE_STATUS_LOAD_ERROR = 8;
116
+ function shouldCountGalleryFile(status) {
117
+ return status !== FILE_STATUS_LOAD_ERROR && status !== FILE_STATUS_PROCESSING_ERROR;
118
+ }
119
+ /** Exclude in-flight add validation so limit counters don't spike on rejected picks. */
120
+ function shouldCountGalleryLimit(status) {
121
+ if (!shouldCountGalleryFile(status)) {
122
+ return false;
123
+ }
124
+ return status !== FILE_STATUS_LOADING && status !== FILE_STATUS_INIT;
125
+ }
126
+
127
+ var PlayIcon = `<!-- Generated by IcoMoon.io -->
128
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
129
+ <title>play-circle</title>
130
+ <path d="M22.84 13.833l-7.756-5.331c-0.884-0.607-2.021-0.671-2.977-0.169-0.888 0.469-1.44 1.363-1.44 2.336v10.661c0 0.972 0.552 1.868 1.441 2.336 0.425 0.224 0.889 0.335 1.351 0.335 0.571 0 1.137-0.169 1.625-0.505l7.756-5.331c0.727-0.499 1.16-1.308 1.16-2.165s-0.433-1.667-1.16-2.167zM13.573 21.299c-0.093 0.065-0.196 0.025-0.229 0.027-0.007 0-0.011 0.001-0.011 0.007v-10.627c0.040-0.028 0.141-0.069 0.24-0.003l7.756 5.267zM16 0c-8.823 0-16 7.177-16 16s7.177 16 16 16 16-7.177 16-16-7.177-16-16-16zM16 29.333c-7.352 0-13.333-5.981-13.333-13.333s5.981-13.333 13.333-13.333 13.333 5.981 13.333 13.333-5.981 13.333-13.333 13.333z"></path>
131
+ </svg>
132
+ `;
133
+
134
+ const sallaAttachmentViewCss = "/*!twlt*/.s-attachment-view-modal-host .s-modal-header{display:flex;flex-direction:row;align-items:center;position:relative;min-height:2.75rem}.s-attachment-view-modal-host .s-modal-close{top:50%;transform:translateY(-50%)}.s-attachment-view-modal-host .s-modal-header-inner{display:flex !important;align-items:center;justify-content:center;width:100%;margin-bottom:0;text-align:start;padding-inline:2.75rem}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-header-inner{justify-content:flex-start;padding:0 1.5rem !important;margin-top:0.5rem}}.s-attachment-view-modal-host .s-modal-header-content,.s-attachment-view-modal-host .s-modal-title{text-align:center !important}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-header-content,.s-attachment-view-modal-host .s-modal-title{text-align:start !important}}.s-attachment-view-modal-host .s-modal-title{margin-bottom:0}@media (min-width: 768px){.s-attachment-view-modal-host .s-modal-title{margin-bottom:0.5rem}}.s-attachment-view-modal{--s-attachment-view-thumb-size:2.5rem;--s-attachment-view-thumb-gap:10px;width:100%;padding:0.75rem}.s-attachment-view-modal .s-slider-block__title-nav button{background:#fff;box-shadow:0 1px 3px rgba(0, 0, 0, 0.12)}.s-attachment-view-gallery{width:100%}.s-attachment-view-thumbs{display:flex;gap:var(--s-attachment-view-thumb-gap);margin-top:0.75rem;padding-bottom:0.25rem;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin}.s-attachment-view-thumb-btn{flex:0 0 auto;padding:0;border:none;background:transparent;cursor:pointer;border-radius:0.25rem;transition:opacity 0.2s ease}.s-attachment-view-thumb-btn:not(.is-active){opacity:0.75}.s-attachment-view-thumb-btn:hover{opacity:1}.s-attachment-view-thumb-btn.is-active .s-attachment-view-thumb{box-shadow:0 0 0 2px var(--color-primary, #004d5a)}.s-attachment-view-slider .s-slider-container .swiper-slide{display:flex;align-items:center;justify-content:center}.s-attachment-view-slider .s-slider-container .s-attachment-view-slide{display:flex;align-items:center;justify-content:center;width:100%}.s-attachment-view-slider .s-slider-container img{width:100%;max-width:100%;height:min(50vh, 320px);object-fit:contain;margin-inline:auto}.s-attachment-view-slider video.s-attachment-view-video{display:block;width:100%;max-width:100%;height:min(50vh, 320px);object-fit:contain;margin-inline:auto;background-color:#000}.s-attachment-view-thumb{width:var(--s-attachment-view-thumb-size);height:var(--s-attachment-view-thumb-size);overflow:hidden;border-radius:0.25rem}.s-attachment-view-thumb img,.s-attachment-view-thumb video{display:block;width:100%;height:100%;object-fit:cover}.s-attachment-view-thumb.is-video{position:relative}.s-attachment-view-thumb-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.25);pointer-events:none}.s-attachment-view-thumb-play svg{width:0.875rem;height:0.875rem;fill:#fff;opacity:0.95}.block{display:block}.inline{display:inline}.s-scrollbar::-webkit-scrollbar{width:5px}.s-scrollbar::-webkit-scrollbar-track{background-color:#eee}.s-scrollbar::-webkit-scrollbar-thumb{background-color:var(--color-primary);border-radius:10px;-webkit-border-radius:10px;-moz-border-radius:10px;-ms-border-radius:10px;-o-border-radius:10px}";
135
+
136
+ const SallaAttachmentView = /*@__PURE__*/ proxyCustomElement(class SallaAttachmentView extends HTMLElement {
137
+ constructor() {
138
+ super();
139
+ this.__registerHost();
140
+ /**
141
+ * Attachments to display. Accepts an array of `{ id, url, mimeType? }` or a
142
+ * JSON string of the same shape (for consumers outside of JSX/Stencil).
143
+ */
144
+ this.attachments = [];
145
+ this.isOpen = false;
146
+ this.activeIndex = 0;
147
+ this.handleKeyDown = (event) => {
148
+ if (!this.isOpen)
149
+ return;
150
+ if (event.key === 'Escape') {
151
+ event.preventDefault();
152
+ this.close();
153
+ return;
154
+ }
155
+ const items = this.getAttachments();
156
+ if (items.length <= 1)
157
+ return;
158
+ const isRtl = document.documentElement.dir === 'rtl';
159
+ const goPrevious = () => this.goToSlide(this.activeIndex - 1);
160
+ const goNext = () => this.goToSlide(this.activeIndex + 1);
161
+ if (event.key === 'ArrowLeft') {
162
+ event.preventDefault();
163
+ (isRtl ? goNext : goPrevious)();
164
+ return;
165
+ }
166
+ if (event.key === 'ArrowRight') {
167
+ event.preventDefault();
168
+ (isRtl ? goPrevious : goNext)();
169
+ }
170
+ };
171
+ this.handleModalVisibilityChanged = (open) => {
172
+ this.isOpen = open;
173
+ if (open) {
174
+ window.addEventListener('keydown', this.handleKeyDown);
175
+ this.scrollActiveThumbIntoView();
176
+ return;
177
+ }
178
+ window.removeEventListener('keydown', this.handleKeyDown);
179
+ this.pauseVideos();
180
+ };
181
+ this.handleSlideChange = (event) => {
182
+ const swiper = event.detail;
183
+ if (swiper?.activeIndex == null) {
184
+ return;
185
+ }
186
+ this.activeIndex = swiper.activeIndex;
187
+ this.pauseVideos();
188
+ this.scrollActiveThumbIntoView();
189
+ };
190
+ }
191
+ componentWillLoad() {
192
+ Salla.lang.onLoaded(() => {
193
+ Salla.lang.addBulk({
194
+ 'blocks.comments.customer_feedback': { ar: 'مراجعة العميل', en: 'Customer feedback' },
195
+ });
196
+ });
197
+ }
198
+ /**
199
+ * Open the viewer at the given attachment index.
200
+ * @param index - Index of the attachment to show first (defaults to 0).
201
+ */
202
+ async open(index = 0) {
203
+ const items = this.getAttachments();
204
+ if (!items.length)
205
+ return;
206
+ this.activeIndex = Math.min(Math.max(index, 0), items.length - 1);
207
+ this.isOpen = true;
208
+ await this.modal?.open();
209
+ this.scrollActiveThumbIntoView();
210
+ }
211
+ /** Close the viewer. */
212
+ async close() {
213
+ this.modal?.close();
214
+ }
215
+ disconnectedCallback() {
216
+ window.removeEventListener('keydown', this.handleKeyDown);
217
+ }
218
+ getAttachments() {
219
+ if (typeof this.attachments !== 'string') {
220
+ return Array.isArray(this.attachments) ? this.attachments : [];
221
+ }
222
+ try {
223
+ const parsed = JSON.parse(this.attachments);
224
+ return Array.isArray(parsed) ? parsed : [];
225
+ }
226
+ catch {
227
+ return [];
228
+ }
229
+ }
230
+ isVideo(file) {
231
+ return isVideoMimeType(file.mimeType, file.url);
232
+ }
233
+ pauseVideos() {
234
+ this.host.querySelectorAll('video.s-attachment-view-video').forEach(element => {
235
+ const video = element;
236
+ video.pause();
237
+ video.currentTime = 0;
238
+ });
239
+ }
240
+ goToSlide(index) {
241
+ const items = this.getAttachments();
242
+ const nextIndex = Math.min(Math.max(index, 0), items.length - 1);
243
+ if (nextIndex === this.activeIndex) {
244
+ return;
245
+ }
246
+ this.activeIndex = nextIndex;
247
+ this.sliderEl?.slideTo(nextIndex);
248
+ this.pauseVideos();
249
+ this.scrollActiveThumbIntoView();
250
+ }
251
+ scrollActiveThumbIntoView() {
252
+ requestAnimationFrame(() => {
253
+ const activeThumb = this.thumbsScroller?.querySelector('.is-active');
254
+ activeThumb?.scrollIntoView({ inline: 'nearest', block: 'nearest', behavior: 'smooth' });
255
+ });
256
+ }
257
+ renderSlide(file) {
258
+ if (this.isVideo(file)) {
259
+ return (h("video", { class: "s-attachment-view-video", src: file.url, controls: true, playsInline: true, preload: "metadata" }));
260
+ }
261
+ return h("img", { src: file.url, alt: "" });
262
+ }
263
+ renderThumb(file) {
264
+ if (this.isVideo(file)) {
265
+ return (h("div", { class: "s-attachment-view-thumb is-video" }, h("video", { src: file.url, muted: true, playsInline: true, preload: "metadata" }), h("span", { class: "s-attachment-view-thumb-play", innerHTML: PlayIcon })));
266
+ }
267
+ return (h("div", { class: "s-attachment-view-thumb" }, h("img", { src: file.url, alt: "" })));
268
+ }
269
+ render() {
270
+ const items = this.getAttachments();
271
+ if (!items.length)
272
+ return null;
273
+ const itemsKey = items.map(file => file.id).join('-');
274
+ return (h(Host, null, h("salla-modal", { ref: el => (this.modal = el), class: "s-attachment-view-modal-host", width: "md", noPadding: true, onModalVisibilityChanged: event => this.handleModalVisibilityChanged(!!event.detail) }, h("div", { class: "s-attachment-view-modal" }, this.isOpen && (h("div", { class: "s-attachment-view-gallery" }, h("salla-slider", { ref: el => (this.sliderEl = el), class: "s-attachment-view-slider", key: `attachment-${itemsKey}`, id: `${this.host.id || 'attachment-view'}-preview`, autoHeight: true, showControls: items.length > 1, sliderConfig: JSON.stringify({ initialSlide: this.activeIndex }), onSlideChange: event => this.handleSlideChange(event) }, h("div", { slot: "items" }, items.map(file => (h("div", { class: "s-attachment-view-slide", key: file.id }, this.renderSlide(file)))))), items.length > 1 && (h("div", { class: "s-attachment-view-thumbs s-scrollbar", ref: el => (this.thumbsScroller = el) }, items.map((file, index) => (h("button", { type: "button", class: {
275
+ 's-attachment-view-thumb-btn': true,
276
+ 'is-active': this.activeIndex === index,
277
+ }, key: file.id, "aria-label": `${index + 1}`, "aria-current": this.activeIndex === index ? 'true' : undefined, onClick: () => this.goToSlide(index) }, this.renderThumb(file))))))))))));
278
+ }
279
+ get host() { return this; }
280
+ static get style() { return sallaAttachmentViewCss; }
281
+ }, [0, "salla-attachment-view", {
282
+ "attachments": [1],
283
+ "isOpen": [32],
284
+ "activeIndex": [32],
285
+ "open": [64],
286
+ "close": [64]
287
+ }]);
288
+ function defineCustomElement() {
289
+ if (typeof customElements === "undefined") {
290
+ return;
291
+ }
292
+ const components = ["salla-attachment-view", "salla-button", "salla-loading", "salla-modal", "salla-slider"];
293
+ components.forEach(tagName => { switch (tagName) {
294
+ case "salla-attachment-view":
295
+ if (!customElements.get(tagName)) {
296
+ customElements.define(tagName, SallaAttachmentView);
297
+ }
298
+ break;
299
+ case "salla-button":
300
+ if (!customElements.get(tagName)) {
301
+ defineCustomElement$4();
302
+ }
303
+ break;
304
+ case "salla-loading":
305
+ if (!customElements.get(tagName)) {
306
+ defineCustomElement$3();
307
+ }
308
+ break;
309
+ case "salla-modal":
310
+ if (!customElements.get(tagName)) {
311
+ defineCustomElement$2();
312
+ }
313
+ break;
314
+ case "salla-slider":
315
+ if (!customElements.get(tagName)) {
316
+ defineCustomElement$1();
317
+ }
318
+ break;
319
+ } });
320
+ }
321
+ defineCustomElement();
322
+
323
+ export { PlayIcon as P, SallaAttachmentView as S, getMaxVideosCount as a, getTotalMaxFiles as b, getFilePondMaxFileSize as c, defineCustomElement as d, isImageMimeType as e, getUploadErrorMessage as f, getMaxImagesCount as g, formatBytesAsSize as h, isVideoMimeType as i, formatDuration as j, shouldCountGalleryLimit as k, buildMediaUploadAccept as l, parseSizeToBytes as p, shouldCountGalleryFile as s, usesSplitCountLimits as u };
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SallaAttachments extends Components.SallaAttachments, HTMLElement {}
4
+ export const SallaAttachments: {
5
+ prototype: SallaAttachments;
6
+ new (): SallaAttachments;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Crafted with ❤ by Salla
3
+ */
4
+ import { S as SallaAttachments$1, d as defineCustomElement$1 } from './salla-attachments2.js';
5
+
6
+ const SallaAttachments = SallaAttachments$1;
7
+ const defineCustomElement = defineCustomElement$1;
8
+
9
+ export { SallaAttachments, defineCustomElement };