@ozdao/martyrs 0.2.480 → 0.2.482

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 (458) hide show
  1. package/README.md +4 -13
  2. package/dist/{Media-CKk33U4A.js → Media-JBERcJWj.js} +1 -1
  3. package/dist/{Media-B1ZP3D7B.cjs → Media-p7Q8ZAQM.cjs} +1 -1
  4. package/dist/{abac-XF1JVCLI.cjs → abac-6LjoG9u-.cjs} +107 -26
  5. package/dist/{abac-BuL5pUZ4.js → abac-Cf_9lCSh.js} +107 -26
  6. package/dist/builder.cjs +8 -12
  7. package/dist/builder.js +8 -12
  8. package/dist/globals.server.cjs +1 -1
  9. package/dist/globals.server.js +1 -1
  10. package/dist/{main-BhAiwmnI.js → main-AtCVQKF9.js} +2855 -4162
  11. package/dist/main-B-we7C0w.cjs +11 -0
  12. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  13. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  14. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  15. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  16. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +28 -7
  17. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
  18. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +29 -8
  19. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  20. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs +5 -8
  21. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -1
  22. package/dist/martyrs/src/components/Chips/Chips.vue2.js +6 -9
  23. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -1
  24. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +84 -0
  25. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -0
  26. package/dist/martyrs/src/components/Feed/Carousel.vue.js +84 -0
  27. package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -0
  28. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +4 -4
  29. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  30. package/dist/martyrs/src/components/Feed/Feed.vue.js +4 -4
  31. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  32. package/dist/martyrs/src/components/Field/Field.vue.cjs +2 -1
  33. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
  34. package/dist/martyrs/src/components/Field/Field.vue.js +2 -1
  35. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  36. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +203 -151
  37. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
  38. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +204 -152
  39. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
  40. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs → Popup.vue2.cjs} +2 -2
  41. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -0
  42. package/dist/martyrs/src/components/Popup/{Popup.vue.js → Popup.vue2.js} +2 -2
  43. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs.map → Popup.vue2.js.map} +1 -1
  44. package/dist/martyrs/src/components/Radio/Radio.vue.cjs +2 -2
  45. package/dist/martyrs/src/components/Radio/Radio.vue.cjs.map +1 -1
  46. package/dist/martyrs/src/components/Radio/Radio.vue.js +2 -2
  47. package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
  48. package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs +4 -3
  49. package/dist/martyrs/src/components/Skeleton/Skeleton.vue.cjs.map +1 -1
  50. package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js +4 -3
  51. package/dist/martyrs/src/components/Skeleton/Skeleton.vue.js.map +1 -1
  52. package/dist/martyrs/src/components/Slider/{Slider.native.vue.cjs → Slider.vue.cjs} +22 -80
  53. package/dist/martyrs/src/components/Slider/Slider.vue.cjs.map +1 -0
  54. package/dist/martyrs/src/components/Slider/{Slider.native.vue.js → Slider.vue.js} +23 -81
  55. package/dist/martyrs/src/components/Slider/Slider.vue.js.map +1 -0
  56. package/dist/martyrs/src/components/Status/Status.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
  58. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs +4 -2
  59. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.cjs.map +1 -1
  60. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js +4 -2
  61. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +1 -1
  62. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
  63. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
  64. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  65. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  66. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  67. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  68. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -1
  69. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  70. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +4 -2
  71. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  72. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +22 -149
  73. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  74. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +24 -151
  75. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  76. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +77 -0
  77. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -0
  78. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +77 -0
  79. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -0
  80. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +121 -0
  81. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -0
  82. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +121 -0
  83. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -0
  84. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +38 -0
  85. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -0
  86. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +38 -0
  87. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -0
  88. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  89. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  90. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  91. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  92. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  93. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  94. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  95. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  96. package/dist/martyrs/src/modules/auth/views/router/users.cjs +23 -16
  97. package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
  98. package/dist/martyrs/src/modules/auth/views/router/users.js +23 -16
  99. package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
  100. package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +3 -3
  101. package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.cjs.map +1 -1
  102. package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js +3 -3
  103. package/dist/martyrs/src/modules/community/components/blocks/FooterBlogpost.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +6 -6
  105. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +5 -4
  106. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
  107. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +5 -4
  108. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
  109. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  110. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  111. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.cjs +92 -62
  112. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.cjs.map +1 -1
  113. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +93 -63
  114. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
  115. package/dist/martyrs/src/modules/community/components/sections/Comments.vue.cjs +82 -53
  116. package/dist/martyrs/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
  117. package/dist/martyrs/src/modules/community/components/sections/Comments.vue.js +82 -53
  118. package/dist/martyrs/src/modules/community/components/sections/Comments.vue.js.map +1 -1
  119. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs +2 -6
  120. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js +2 -6
  122. package/dist/martyrs/src/modules/community/components/sections/HotPosts.vue.js.map +1 -1
  123. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  125. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  127. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  128. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  129. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  130. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  131. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  133. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs +3 -9
  134. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.cjs.map +1 -1
  135. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js +3 -9
  136. package/dist/martyrs/src/modules/events/components/sections/EventsHot.vue.js.map +1 -1
  137. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  138. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +5 -5
  139. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  140. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +10 -10
  141. package/dist/martyrs/src/modules/globals/globals.client.cjs +2 -0
  142. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  143. package/dist/martyrs/src/modules/globals/globals.client.js +2 -0
  144. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  145. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.cjs +1 -1
  146. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.js +1 -1
  147. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
  148. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
  149. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
  150. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +84 -0
  152. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs.map +1 -0
  153. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +84 -0
  154. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js.map +1 -0
  155. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +2 -2
  156. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +2 -2
  157. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
  158. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
  159. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  161. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  162. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  163. package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs +17 -0
  164. package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
  165. package/dist/martyrs/src/modules/globals/views/mixins/mixins.js +17 -0
  166. package/dist/martyrs/src/modules/globals/views/mixins/mixins.js.map +1 -1
  167. package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.cjs +70 -0
  168. package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.cjs.map +1 -0
  169. package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.js +70 -0
  170. package/dist/martyrs/src/modules/globals/views/plugins/popup.auth.plugin.js.map +1 -0
  171. package/dist/martyrs/src/modules/icons/entities/IconList.vue.cjs +35 -0
  172. package/dist/martyrs/src/modules/icons/entities/IconList.vue.cjs.map +1 -0
  173. package/dist/martyrs/src/modules/icons/entities/IconList.vue.js +35 -0
  174. package/dist/martyrs/src/modules/icons/entities/IconList.vue.js.map +1 -0
  175. package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.cjs +1 -3
  176. package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.cjs.map +1 -1
  177. package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.js +1 -3
  178. package/dist/martyrs/src/modules/icons/navigation/IconCheck.vue.js.map +1 -1
  179. package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.cjs +1 -3
  180. package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.cjs.map +1 -1
  181. package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.js +1 -3
  182. package/dist/martyrs/src/modules/icons/navigation/IconDoubleCheck.vue.js.map +1 -1
  183. package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.cjs +1 -3
  184. package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.cjs.map +1 -1
  185. package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.js +1 -3
  186. package/dist/martyrs/src/modules/icons/navigation/IconLike.vue.js.map +1 -1
  187. package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.cjs +1 -3
  188. package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.cjs.map +1 -1
  189. package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.js +1 -3
  190. package/dist/martyrs/src/modules/icons/navigation/IconMute.vue.js.map +1 -1
  191. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs +1 -3
  192. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.cjs.map +1 -1
  193. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js +1 -3
  194. package/dist/martyrs/src/modules/icons/navigation/IconPause.vue.js.map +1 -1
  195. package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.cjs +21 -20
  196. package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.cjs.map +1 -1
  197. package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.js +21 -20
  198. package/dist/martyrs/src/modules/icons/navigation/IconPlay.vue.js.map +1 -1
  199. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs +1 -3
  200. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.cjs.map +1 -1
  201. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js +1 -3
  202. package/dist/martyrs/src/modules/icons/navigation/IconRefresh.vue.js.map +1 -1
  203. package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.cjs +6 -13
  204. package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.cjs.map +1 -1
  205. package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.js +6 -13
  206. package/dist/martyrs/src/modules/icons/navigation/IconShuffle.vue.js.map +1 -1
  207. package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.cjs +1 -3
  208. package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.cjs.map +1 -1
  209. package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.js +1 -3
  210. package/dist/martyrs/src/modules/icons/navigation/IconUnMute.vue.js.map +1 -1
  211. package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.cjs +1 -3
  212. package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.cjs.map +1 -1
  213. package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.js +1 -3
  214. package/dist/martyrs/src/modules/icons/navigation/IconVolume.vue.js.map +1 -1
  215. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +1 -3
  216. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  217. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +41 -43
  218. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  219. package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.cjs +8 -8
  220. package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.cjs.map +1 -1
  221. package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js +8 -8
  222. package/dist/martyrs/src/modules/notifications/components/blocks/NotificationItem.vue.js.map +1 -1
  223. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +50 -51
  224. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs.map +1 -1
  225. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +51 -52
  226. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js.map +1 -1
  227. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
  228. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  229. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  230. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  231. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  232. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  233. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  234. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  235. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  236. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  237. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  238. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  239. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  240. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  241. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  242. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  243. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  244. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  245. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  246. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  247. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  248. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  249. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +7 -4
  250. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  251. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +18 -15
  252. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  253. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  254. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  255. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  256. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  257. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
  258. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  259. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.cjs +7 -2
  260. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
  261. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +8 -3
  262. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  263. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +11 -12
  264. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs.map +1 -1
  265. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +12 -13
  266. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.map +1 -1
  267. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +33 -24
  268. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
  269. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +36 -27
  270. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
  271. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.cjs +4 -4
  272. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.cjs.map +1 -1
  273. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js +4 -4
  274. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
  275. package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs +7 -5
  276. package/dist/martyrs/src/modules/products/components/elements/Price.vue.cjs.map +1 -1
  277. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +7 -5
  278. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
  279. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  280. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  281. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  282. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  283. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +2 -2
  284. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +2 -2
  285. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  286. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  287. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +58 -41
  288. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  289. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +60 -43
  290. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  291. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +105 -85
  292. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
  293. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +107 -87
  294. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
  295. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +2 -2
  296. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
  297. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
  298. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  299. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.cjs +1 -1
  300. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.js +1 -1
  301. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +145 -0
  302. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs.map +1 -0
  303. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +145 -0
  304. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js.map +1 -0
  305. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
  306. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  307. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +46 -31
  308. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs.map +1 -1
  309. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +50 -35
  310. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
  311. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +43 -0
  312. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs.map +1 -0
  313. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +43 -0
  314. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js.map +1 -0
  315. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +131 -0
  316. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -0
  317. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +131 -0
  318. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -0
  319. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  320. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  321. package/dist/martyrs/src/modules/products/products.client.cjs +3 -3
  322. package/dist/martyrs/src/modules/products/products.client.cjs.map +1 -1
  323. package/dist/martyrs/src/modules/products/products.client.js +3 -3
  324. package/dist/martyrs/src/modules/products/products.client.js.map +1 -1
  325. package/dist/martyrs/src/modules/products/store/products.cjs +4 -0
  326. package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
  327. package/dist/martyrs/src/modules/products/store/products.js +4 -0
  328. package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
  329. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  330. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  331. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  332. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  333. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  334. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  335. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  336. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  337. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
  338. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  339. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
  340. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  341. package/dist/martyrs.cjs.js +1 -1
  342. package/dist/martyrs.css +1 -1
  343. package/dist/martyrs.es.js +1 -1
  344. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
  345. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  346. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
  347. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  348. package/dist/organizations.server.cjs +1 -1
  349. package/dist/organizations.server.js +1 -1
  350. package/dist/products.server.cjs +111 -34
  351. package/dist/products.server.js +111 -34
  352. package/dist/style.css +196 -170
  353. package/package.json +1 -1
  354. package/src/.martyrs/chunks.json +325 -0
  355. package/src/.martyrs/filemap.json +6802 -0
  356. package/src/.martyrs/semantic-analysis.json +307 -0
  357. package/src/.martyrs/toc.json +14 -0
  358. package/src/builder/rspack/rspack.config.api.js +8 -11
  359. package/src/components/Button/Button.vue +2 -2
  360. package/src/components/Checkbox/Checkbox.vue +28 -16
  361. package/src/components/Chips/Chips.vue +4 -4
  362. package/src/components/Feed/Carousel.vue +72 -0
  363. package/src/components/Feed/Feed.vue +2 -2
  364. package/src/components/Field/Field.vue +1 -0
  365. package/src/components/PhotoViewer/PhotoViewer.vue +307 -220
  366. package/src/components/Radio/Radio.vue +2 -10
  367. package/src/components/Skeleton/Skeleton.vue +9 -12
  368. package/src/components/Slider/Slider.vue +220 -100
  369. package/src/components/Status/Status.vue +0 -1
  370. package/src/components/Tooltip/Tooltip.vue +2 -2
  371. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  372. package/src/modules/auth/views/components/pages/ProfileEdit.old.vue +189 -0
  373. package/src/modules/auth/views/components/pages/ProfileEdit.vue +19 -182
  374. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +72 -0
  375. package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +110 -0
  376. package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +28 -0
  377. package/src/modules/auth/views/router/users.js +23 -12
  378. package/src/modules/community/components/blocks/FooterBlogpost.vue +3 -3
  379. package/src/modules/community/components/pages/BlogPost.vue +2 -1
  380. package/src/modules/community/components/sections/Comment.vue +161 -57
  381. package/src/modules/community/components/sections/Comments.vue +120 -63
  382. package/src/modules/community/components/sections/HotPosts.vue +7 -7
  383. package/src/modules/events/components/sections/EventsHot.vue +26 -33
  384. package/src/modules/globals/controllers/classes/abac/abac.core.js +3 -1
  385. package/src/modules/globals/controllers/classes/abac/abac.fields.js +126 -42
  386. package/src/modules/globals/controllers/classes/abac/v2/abac-core-fixed.js +313 -0
  387. package/src/modules/globals/controllers/classes/abac/v2/abac-express-fixed.js +276 -0
  388. package/src/modules/globals/controllers/classes/abac/v2/abac-fields-fixed.js +422 -0
  389. package/src/modules/globals/controllers/classes/abac/v2/abac-main-fixed.js +295 -0
  390. package/src/modules/globals/controllers/classes/abac/v2/abac-policies-fixed.js +316 -0
  391. package/src/modules/globals/controllers/classes/abac/v2/abac-ws-fixed.js +237 -0
  392. package/src/modules/globals/globals.client.js +2 -0
  393. package/src/modules/globals/views/components/blocks/CardFooter.vue +3 -3
  394. package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -1
  395. package/src/modules/globals/views/components/blocks/PopupAuth.vue +66 -0
  396. package/src/modules/globals/views/mixins/mixins.js +37 -17
  397. package/src/modules/globals/views/plugins/popup.auth.plugin.js +77 -0
  398. package/src/modules/icons/entities/IconList.vue +14 -0
  399. package/src/modules/icons/navigation/IconCheck.vue +1 -3
  400. package/src/modules/icons/navigation/IconDoubleCheck.vue +1 -3
  401. package/src/modules/icons/navigation/IconLike.vue +1 -3
  402. package/src/modules/icons/navigation/IconMute.vue +1 -3
  403. package/src/modules/icons/navigation/IconPause.vue +1 -3
  404. package/src/modules/icons/navigation/IconPlay.vue +12 -15
  405. package/src/modules/icons/navigation/IconRefresh.vue +1 -3
  406. package/src/modules/icons/navigation/IconShuffle.vue +11 -26
  407. package/src/modules/icons/navigation/IconUnMute.vue +1 -3
  408. package/src/modules/icons/navigation/IconVolume.vue +1 -3
  409. package/src/modules/icons/pages/IconsPage.vue +0 -2
  410. package/src/modules/music/components/pages/AlbumDetail.vue +2 -2
  411. package/src/modules/music/components/pages/PlaylistDetail.vue +2 -2
  412. package/src/modules/music/components/pages/TrackDetail.vue +1 -1
  413. package/src/modules/music/components/player/MusicPlayer.vue +2 -2
  414. package/src/modules/notifications/components/blocks/NotificationItem.vue +6 -51
  415. package/src/modules/notifications/components/elements/NotificationBadge.vue +53 -97
  416. package/src/modules/organizations/configs/navigation.organization.config.js +8 -4
  417. package/src/modules/products/components/blocks/CardProduct.vue +8 -2
  418. package/src/modules/products/components/blocks/ProductDiscounts.vue +3 -4
  419. package/src/modules/products/components/blocks/ProductImages.vue +32 -23
  420. package/src/modules/products/components/blocks/ProductVariants.vue +6 -4
  421. package/src/modules/products/components/elements/Price.vue +3 -3
  422. package/src/modules/products/components/pages/Product.vue +32 -26
  423. package/src/modules/products/components/pages/ProductEdit.vue +95 -72
  424. package/src/modules/products/components/sections/EditRecommended.vue +131 -0
  425. package/src/modules/products/components/sections/ProductConfigurator.vue +35 -21
  426. package/src/modules/products/components/sections/ProductsPopular.vue +44 -0
  427. package/src/modules/products/components/sections/ProductsRecommended.vue +134 -0
  428. package/src/modules/products/controllers/configs/products.lookup.config.js +20 -15
  429. package/src/modules/products/controllers/products.controller.js +7 -22
  430. package/src/modules/products/models/category.model.js +28 -1
  431. package/src/modules/products/models/leftover.model.js +32 -0
  432. package/src/modules/products/models/product.model.js +37 -1
  433. package/src/modules/products/models/variant.model.js +35 -0
  434. package/src/modules/products/products.client.js +3 -3
  435. package/src/modules/products/routes/products.routes.js +1 -0
  436. package/src/modules/products/store/products.js +4 -0
  437. package/src/styles/base/all.scss +0 -38
  438. package/src/styles/base/shadow_transitions_hover_refactor.scss +20 -51
  439. package/src/styles/config.scss +51 -1
  440. package/dist/main-C75EcBpE.cjs +0 -11
  441. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  442. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +0 -1
  443. package/dist/martyrs/src/components/Slider/Slider.native.vue.cjs.map +0 -1
  444. package/dist/martyrs/src/components/Slider/Slider.native.vue.js.map +0 -1
  445. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +0 -2
  446. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +0 -1
  447. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +0 -2
  448. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +0 -1
  449. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs +0 -34
  450. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs.map +0 -1
  451. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js +0 -34
  452. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js.map +0 -1
  453. package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs +0 -124
  454. package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.cjs.map +0 -1
  455. package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js +0 -124
  456. package/dist/martyrs/src/modules/products/components/sections/PopularProducts.vue.js.map +0 -1
  457. package/src/components/Slider/Slider.native.vue +0 -313
  458. package/src/modules/products/components/sections/PopularProducts.vue +0 -156
@@ -1,12 +1,9 @@
1
- import { computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, Fragment, renderList, withCtx, toDisplayString, createBlock } from "vue";
1
+ import { computed, createElementBlock, createCommentVNode, openBlock, createElementVNode, createVNode, Fragment, renderList, withCtx, toDisplayString } from "vue";
2
2
  import _sfc_main$1 from "../../../icons/entities/IconDiscount.vue.js";
3
3
  import _sfc_main$3 from "../../../../components/Chips/Chips.vue2.js";
4
4
  import _sfc_main$2 from "../../../../components/Tooltip/Tooltip.vue2.js";
5
5
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- const _hoisted_1 = {
7
- key: 0,
8
- class: "mn-t-large mn-b-large"
9
- };
6
+ const _hoisted_1 = { key: 0 };
10
7
  const _hoisted_2 = { class: "mn-b-small flex-nowrap flex flex-v-center" };
11
8
  const _hoisted_3 = { class: "flex flex-column flex-wrap gap-thin" };
12
9
  const _hoisted_4 = ["onClick"];
@@ -17,7 +14,10 @@ const _hoisted_8 = {
17
14
  key: 0,
18
15
  class: "t-small mn-t-thin t-transp"
19
16
  };
20
- const _hoisted_9 = { class: "mn-t-small" };
17
+ const _hoisted_9 = {
18
+ key: 1,
19
+ class: "mn-t-small"
20
+ };
21
21
  const _sfc_main = {
22
22
  __name: "ProductDiscounts",
23
23
  props: {
@@ -92,7 +92,7 @@ const _sfc_main = {
92
92
  var _a, _b;
93
93
  return openBlock(), createElementBlock("div", {
94
94
  key: index,
95
- class: "discount-card pd-medium radius-medium br-1px br-solid br-light cursor-pointer hover-scale-1",
95
+ class: "discount-card bg-light pd-small radius-small br-1px br-solid br-light cursor-pointer",
96
96
  onClick: ($event) => selectDiscount(discount)
97
97
  }, [
98
98
  createElementVNode("div", _hoisted_5, [
@@ -107,13 +107,12 @@ const _sfc_main = {
107
107
  createElementVNode("span", _hoisted_7, toDisplayString(_ctx.returnCurrency()) + toDisplayString(discount.value) + " per " + toDisplayString(((_a = currentVariant.value) == null ? void 0 : _a.quantity) || 1) + toDisplayString(((_b = currentVariant.value) == null ? void 0 : _b.unit) || _ctx.pcs), 1)
108
108
  ]),
109
109
  discount.description ? (openBlock(), createElementBlock("p", _hoisted_8, toDisplayString(discount.description), 1)) : createCommentVNode("", true),
110
- createElementVNode("div", _hoisted_9, [
111
- getConditionsAsChips.length > 0 ? (openBlock(), createBlock(_sfc_main$3, {
112
- key: 0,
110
+ getConditionsAsChips(discount).length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9, [
111
+ createVNode(_sfc_main$3, {
113
112
  class: "",
114
113
  chips: getConditionsAsChips(discount)
115
- }, null, 8, ["chips"])) : createCommentVNode("", true)
116
- ])
114
+ }, null, 8, ["chips"])
115
+ ])) : createCommentVNode("", true)
117
116
  ], 8, _hoisted_4);
118
117
  }), 128))
119
118
  ])
@@ -121,7 +120,7 @@ const _sfc_main = {
121
120
  };
122
121
  }
123
122
  };
124
- const ProductDiscounts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d7e1163a"]]);
123
+ const ProductDiscounts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e5d1ccd1"]]);
125
124
  export {
126
125
  ProductDiscounts as default
127
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDiscounts.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductDiscounts.vue"],"sourcesContent":["<template>\n <div v-if=\"discounts && discounts.length\" class=\"mn-t-large mn-b-large\">\n <div class=\"mn-b-small flex-nowrap flex flex-v-center\">\n <IconDiscount class=\"mn-r-micro i-medium\"/>\n <p class=\"t-medium\">Special Offers</p>\n </div>\n\n <div class=\"flex flex-column flex-wrap gap-thin\">\n <div \n v-for=\"(discount, index) in discounts\" \n :key=\"index\" \n class=\"discount-card pd-medium radius-medium br-1px br-solid br-light cursor-pointer hover-scale-1\"\n @click=\"selectDiscount(discount)\"\n >\n <div class=\"flex flex-wrap gap-thin flex-v-center w-100\">\n\n <Tooltip :text=\"discount.description || 'No description'\">\n <span class=\"discount-name t-semi p-medium\">{{ discount.name }}</span>\n </Tooltip>\n\n <span class=\"t-main p-medium\">\n {{returnCurrency()}}{{ discount.value }} per {{ currentVariant?.quantity || 1 }}{{ currentVariant?.unit || pcs }}\n </span>\n\n </div>\n \n <p v-if=\"discount.description\" class=\"t-small mn-t-thin t-transp\">{{ discount.description }}</p>\n\n <div class=\"mn-t-small\"><Chips v-if=\"getConditionsAsChips.length > 0\" class=\"\" :chips=\"getConditionsAsChips(discount)\" /></div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\nimport IconDiscount from '@martyrs/src/modules/icons/entities/IconDiscount.vue'\nimport Chips from '@martyrs/src/components/Chips/Chips.vue';\nimport Tooltip from '@martyrs/src/components/Tooltip/Tooltip.vue';\n\nconst props = defineProps({\n discounts: { \n type: Array, \n default: () => [] \n },\n regularPrice: { \n type: [String, Number], \n default: 0 \n },\n selectedVariant: {\n type: Object,\n default: null\n },\n productVariants: {\n type: Array,\n default: () => []\n }\n});\n\nconst emit = defineEmits(['select-discount']);\n\n// Helper to determine if a discount has date conditions\nconst hasDateCondition = (discount) => {\n return discount.date && (discount.date.start || discount.date.end);\n};\n\n// Helper to determine if a discount has time conditions\nconst hasTimeCondition = (discount) => {\n return discount.time && (discount.time.start || discount.time.end);\n};\n\n// Format date range for display\nconst formatDateRange = (dateRange) => {\n if (!dateRange) return '';\n \n const start = dateRange.start ? new Date(dateRange.start).toLocaleDateString() : 'Anytime';\n const end = dateRange.end ? new Date(dateRange.end).toLocaleDateString() : 'No end date';\n \n return `${start}-${end}`;\n};\n\n// Format time range for display\nconst formatTimeRange = (timeRange) => {\n if (!timeRange) return '';\n \n const start = timeRange.start || 'Anytime';\n const end = timeRange.end || 'No end time';\n \n // Check if we're referencing today\n const now = new Date();\n const isToday = true; // Simplification - in a real app we'd check if the date range includes today\n \n return isToday ? `${start}-${end} today` : `${start}-${end}`;\n};\n\n// Get the current variant (selected or default to first)\nconst currentVariant = computed(() => {\n return props.selectedVariant || (props.productVariants?.length > 0 ? props.productVariants[0] : null);\n});\n\nconst getConditionsAsChips = (discount) => {\n const chips = [];\n \n // Quantity condition - используем quantity из текущего варианта, а не из скидки\n // if (currentVariant.value?.quantity && currentVariant.value.quantity > 0) {\n // chips.push({ \n // text: `+${discount.quantity}`, \n // });\n // }\n \n // Date condition\n if (hasDateCondition(discount)) {\n chips.push({ \n text: `Valid: ${formatDateRange(discount.date)}` \n });\n }\n \n // Time condition\n if (hasTimeCondition(discount)) {\n chips.push({ \n text: `Available: ${formatTimeRange(discount.time)}` \n });\n }\n \n return chips;\n};\n// Handle discount selection\nconst selectDiscount = (discount) => {\n emit('select-discount', discount);\n};\n</script>\n\n<style scoped>\n.discount-card {\n transition: all 0.2s ease;\n}\n\n.discount-card:hover {\n border-color: rgb(var(--main));\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,UAAM,QAAQ;AAmBd,UAAM,OAAO;AAGb,UAAM,mBAAmB,CAAC,aAAa;AACrC,aAAO,SAAS,SAAS,SAAS,KAAK,SAAS,SAAS,KAAK;AAAA,IAChE;AAGA,UAAM,mBAAmB,CAAC,aAAa;AACrC,aAAO,SAAS,SAAS,SAAS,KAAK,SAAS,SAAS,KAAK;AAAA,IAChE;AAGA,UAAM,kBAAkB,CAAC,cAAc;AACrC,UAAI,CAAC,UAAW,QAAO;AAEvB,YAAM,QAAQ,UAAU,QAAQ,IAAI,KAAK,UAAU,KAAK,EAAE,mBAAkB,IAAK;AACjF,YAAM,MAAM,UAAU,MAAM,IAAI,KAAK,UAAU,GAAG,EAAE,mBAAkB,IAAK;AAE3E,aAAO,GAAG,KAAK,IAAI,GAAG;AAAA,IACxB;AAGA,UAAM,kBAAkB,CAAC,cAAc;AACrC,UAAI,CAAC,UAAW,QAAO;AAEvB,YAAM,QAAQ,UAAU,SAAS;AACjC,YAAM,MAAM,UAAU,OAAO;AAM7B,aAAiB,GAAG,KAAK,IAAI,GAAG;AAAA,IAClC;AAGA,UAAM,iBAAiB,SAAS,MAAM;;AACpC,aAAO,MAAM,sBAAoB,WAAM,oBAAN,mBAAuB,UAAS,IAAI,MAAM,gBAAgB,CAAC,IAAI;AAAA,IAClG,CAAC;AAED,UAAM,uBAAuB,CAAC,aAAa;AACzC,YAAM,QAAQ,CAAE;AAUhB,UAAI,iBAAiB,QAAQ,GAAG;AAC9B,cAAM,KAAK;AAAA,UACT,MAAM,UAAU,gBAAgB,SAAS,IAAI,CAAC;AAAA,QACpD,CAAK;AAAA,MACL;AAGE,UAAI,iBAAiB,QAAQ,GAAG;AAC9B,cAAM,KAAK;AAAA,UACT,MAAM,cAAc,gBAAgB,SAAS,IAAI,CAAC;AAAA,QACxD,CAAK;AAAA,MACL;AAEE,aAAO;AAAA,IACT;AAEA,UAAM,iBAAiB,CAAC,aAAa;AACnC,WAAK,mBAAmB,QAAQ;AAAA,IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProductDiscounts.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductDiscounts.vue"],"sourcesContent":["<template>\n <div v-if=\"discounts && discounts.length\">\n <div class=\"mn-b-small flex-nowrap flex flex-v-center\">\n <IconDiscount class=\"mn-r-micro i-medium\"/>\n <p class=\"t-medium\">Special Offers</p>\n </div>\n\n <div class=\"flex flex-column flex-wrap gap-thin\">\n <div \n v-for=\"(discount, index) in discounts\" \n :key=\"index\" \n class=\"discount-card bg-light pd-small radius-small br-1px br-solid br-light cursor-pointer \"\n @click=\"selectDiscount(discount)\"\n >\n <div class=\"flex flex-wrap gap-thin flex-v-center w-100\">\n\n <Tooltip :text=\"discount.description || 'No description'\">\n <span class=\"discount-name t-semi p-medium\">{{ discount.name }}</span>\n </Tooltip>\n\n <span class=\"t-main p-medium\">\n {{returnCurrency()}}{{ discount.value }} per {{ currentVariant?.quantity || 1 }}{{ currentVariant?.unit || pcs }}\n </span>\n\n </div>\n \n <p v-if=\"discount.description\" class=\"t-small mn-t-thin t-transp\">{{ discount.description }}</p>\n <div v-if=\"getConditionsAsChips(discount).length > 0\" class=\"mn-t-small\"><Chips class=\"\" :chips=\"getConditionsAsChips(discount)\" /></div>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\nimport IconDiscount from '@martyrs/src/modules/icons/entities/IconDiscount.vue'\nimport Chips from '@martyrs/src/components/Chips/Chips.vue';\nimport Tooltip from '@martyrs/src/components/Tooltip/Tooltip.vue';\n\nconst props = defineProps({\n discounts: { \n type: Array, \n default: () => [] \n },\n regularPrice: { \n type: [String, Number], \n default: 0 \n },\n selectedVariant: {\n type: Object,\n default: null\n },\n productVariants: {\n type: Array,\n default: () => []\n }\n});\n\nconst emit = defineEmits(['select-discount']);\n\n// Helper to determine if a discount has date conditions\nconst hasDateCondition = (discount) => {\n return discount.date && (discount.date.start || discount.date.end);\n};\n\n// Helper to determine if a discount has time conditions\nconst hasTimeCondition = (discount) => {\n return discount.time && (discount.time.start || discount.time.end);\n};\n\n// Format date range for display\nconst formatDateRange = (dateRange) => {\n if (!dateRange) return '';\n \n const start = dateRange.start ? new Date(dateRange.start).toLocaleDateString() : 'Anytime';\n const end = dateRange.end ? new Date(dateRange.end).toLocaleDateString() : 'No end date';\n \n return `${start}-${end}`;\n};\n\n// Format time range for display\nconst formatTimeRange = (timeRange) => {\n if (!timeRange) return '';\n \n const start = timeRange.start || 'Anytime';\n const end = timeRange.end || 'No end time';\n \n // Check if we're referencing today\n const now = new Date();\n const isToday = true; // Simplification - in a real app we'd check if the date range includes today\n \n return isToday ? `${start}-${end} today` : `${start}-${end}`;\n};\n\n// Get the current variant (selected or default to first)\nconst currentVariant = computed(() => {\n return props.selectedVariant || (props.productVariants?.length > 0 ? props.productVariants[0] : null);\n});\n\nconst getConditionsAsChips = (discount) => {\n const chips = [];\n \n // Quantity condition - используем quantity из текущего варианта, а не из скидки\n // if (currentVariant.value?.quantity && currentVariant.value.quantity > 0) {\n // chips.push({ \n // text: `+${discount.quantity}`, \n // });\n // }\n \n // Date condition\n if (hasDateCondition(discount)) {\n chips.push({ \n text: `Valid: ${formatDateRange(discount.date)}` \n });\n }\n \n // Time condition\n if (hasTimeCondition(discount)) {\n chips.push({ \n text: `Available: ${formatTimeRange(discount.time)}` \n });\n }\n \n return chips;\n};\n// Handle discount selection\nconst selectDiscount = (discount) => {\n emit('select-discount', discount);\n};\n</script>\n\n<style scoped>\n.discount-card {\n transition: all 0.2s ease;\n}\n\n.discount-card:hover {\n border-color: rgb(var(--main));\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,UAAM,QAAQ;AAmBd,UAAM,OAAO;AAGb,UAAM,mBAAmB,CAAC,aAAa;AACrC,aAAO,SAAS,SAAS,SAAS,KAAK,SAAS,SAAS,KAAK;AAAA,IAChE;AAGA,UAAM,mBAAmB,CAAC,aAAa;AACrC,aAAO,SAAS,SAAS,SAAS,KAAK,SAAS,SAAS,KAAK;AAAA,IAChE;AAGA,UAAM,kBAAkB,CAAC,cAAc;AACrC,UAAI,CAAC,UAAW,QAAO;AAEvB,YAAM,QAAQ,UAAU,QAAQ,IAAI,KAAK,UAAU,KAAK,EAAE,mBAAkB,IAAK;AACjF,YAAM,MAAM,UAAU,MAAM,IAAI,KAAK,UAAU,GAAG,EAAE,mBAAkB,IAAK;AAE3E,aAAO,GAAG,KAAK,IAAI,GAAG;AAAA,IACxB;AAGA,UAAM,kBAAkB,CAAC,cAAc;AACrC,UAAI,CAAC,UAAW,QAAO;AAEvB,YAAM,QAAQ,UAAU,SAAS;AACjC,YAAM,MAAM,UAAU,OAAO;AAM7B,aAAiB,GAAG,KAAK,IAAI,GAAG;AAAA,IAClC;AAGA,UAAM,iBAAiB,SAAS,MAAM;;AACpC,aAAO,MAAM,sBAAoB,WAAM,oBAAN,mBAAuB,UAAS,IAAI,MAAM,gBAAgB,CAAC,IAAI;AAAA,IAClG,CAAC;AAED,UAAM,uBAAuB,CAAC,aAAa;AACzC,YAAM,QAAQ,CAAE;AAUhB,UAAI,iBAAiB,QAAQ,GAAG;AAC9B,cAAM,KAAK;AAAA,UACT,MAAM,UAAU,gBAAgB,SAAS,IAAI,CAAC;AAAA,QACpD,CAAK;AAAA,MACL;AAGE,UAAI,iBAAiB,QAAQ,GAAG;AAC9B,cAAM,KAAK;AAAA,UACT,MAAM,cAAc,gBAAgB,SAAS,IAAI,CAAC;AAAA,QACxD,CAAK;AAAA,MACL;AAEE,aAAO;AAAA,IACT;AAEA,UAAM,iBAAiB,CAAC,aAAa;AACnC,WAAK,mBAAmB,QAAQ;AAAA,IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Popup = require("../../../../components/Popup/Popup.vue.cjs");
4
+ const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
5
5
  const PhotoViewer = require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs");
6
6
  const PlaceholderImage = require("../../../icons/placeholders/PlaceholderImage.vue.cjs");
7
7
  const Image360 = require("../elements/Image360.vue.cjs");
8
8
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
9
- const _hoisted_1 = { class: "w-100 o-hidden bg-light radius-medium flex-nowrap flex-column flex pos-relative" };
9
+ const _hoisted_1 = { class: "w-100 bs-heavy h-max mobile:pos-relative tablet:pos-relative pos-sticky pos-t-0 pd-medium o-hidden bg-light radius-medium gap-small flex-nowrap flex-row mobile:flex-column flex pos-relative" };
10
10
  const _hoisted_2 = ["src"];
11
11
  const _hoisted_3 = {
12
12
  key: 0,
13
- class: "o-scroll w-100 pd-semi pd-t-zero"
13
+ class: "mobile:order-1 order-0 w-5r mobile:w-100"
14
14
  };
15
- const _hoisted_4 = { class: "no-responsive w-max flex flex-nowrap gap-thin" };
15
+ const _hoisted_4 = { class: "w-100 mobile:flex-row flex-column flex flex-nowrap gap-thin" };
16
16
  const _hoisted_5 = ["src", "onClick"];
17
17
  const _sfc_main = {
18
18
  __name: "ProductImages",
@@ -27,22 +27,25 @@ const _sfc_main = {
27
27
  }
28
28
  },
29
29
  setup(__props) {
30
+ const props = __props;
30
31
  const isPopupVisible = vue.ref(false);
31
- const selectedImage = vue.ref(null);
32
- const openPopup = (image) => {
33
- if (!image) return;
34
- selectedImage.value = image;
32
+ const selectedImageIndex = vue.ref(0);
33
+ const currentImageIndex = vue.ref(0);
34
+ const openPopup = (index) => {
35
+ if (!props.images.length) return;
36
+ selectedImageIndex.value = index;
35
37
  isPopupVisible.value = true;
36
38
  };
37
39
  const closePopup = () => {
40
+ selectedImageIndex.value = 0;
38
41
  isPopupVisible.value = false;
39
42
  };
40
43
  return (_ctx, _cache) => {
41
44
  var _a, _b;
42
45
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
43
46
  vue.createElementVNode("div", {
44
- class: "pd-semi w-100 bg-light radius-semi o-hidden",
45
- onClick: _cache[0] || (_cache[0] = ($event) => openPopup(__props.images[0]))
47
+ class: "order-1 w-100 bg-light radius-small o-hidden",
48
+ onClick: _cache[0] || (_cache[0] = ($event) => openPopup(currentImageIndex.value))
46
49
  }, [
47
50
  __props.product && __props.product.image3d ? (vue.openBlock(), vue.createBlock(Image360.default, {
48
51
  key: 0,
@@ -50,41 +53,47 @@ const _sfc_main = {
50
53
  imagePath: `/assets/images/products/${__props.product.image3d}`,
51
54
  imageCount: 36
52
55
  }, null, 8, ["imagePath"])) : vue.createCommentVNode("", true),
53
- __props.images[0] && !((_a = __props.product) == null ? void 0 : _a.image3d) ? (vue.openBlock(), vue.createElementBlock("img", {
56
+ __props.images[currentImageIndex.value] && !((_a = __props.product) == null ? void 0 : _a.image3d) ? (vue.openBlock(), vue.createElementBlock("img", {
54
57
  key: 1,
55
58
  loading: "lazy",
56
- class: "h-max h-max-15r bg-white radius-semi w-100",
59
+ class: "h-100 flex-child-default bg-white radius-small w-100",
57
60
  style: { "object-fit": "contain" },
58
- src: (_ctx.FILE_SERVER_URL || "") + __props.images[0]
61
+ src: (_ctx.FILE_SERVER_URL || "") + __props.images[currentImageIndex.value]
59
62
  }, null, 8, _hoisted_2)) : vue.createCommentVNode("", true),
60
- !__props.images[0] && !((_b = __props.product) == null ? void 0 : _b.image3d) ? (vue.openBlock(), vue.createBlock(PlaceholderImage.default, {
63
+ !__props.images[currentImageIndex.value] && !((_b = __props.product) == null ? void 0 : _b.image3d) ? (vue.openBlock(), vue.createBlock(PlaceholderImage.default, {
61
64
  key: 2,
62
- class: "h-max-20r h-100 w-100",
65
+ class: "h-100 w-100",
63
66
  style: { "object-fit": "cover" }
64
67
  })) : vue.createCommentVNode("", true)
65
68
  ]),
66
69
  __props.images.length > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
67
70
  vue.createElementVNode("div", _hoisted_4, [
68
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.images, (image, index) => {
71
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.images.slice(0, 5), (image, index) => {
69
72
  return vue.openBlock(), vue.createElementBlock("img", {
70
73
  loading: "lazy",
71
74
  key: index,
72
75
  src: (_ctx.FILE_SERVER_URL || "") + image,
73
- onClick: ($event) => openPopup(image),
74
- class: "flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail"
75
- }, null, 8, _hoisted_5);
76
- }), 128))
76
+ onClick: ($event) => currentImageIndex.value = index,
77
+ class: vue.normalizeClass(["aspect-1x1 radius-small bg-white o-hidden thumbnail", { "active": currentImageIndex.value === index }])
78
+ }, null, 10, _hoisted_5);
79
+ }), 128)),
80
+ __props.images.length > 5 ? (vue.openBlock(), vue.createElementBlock("div", {
81
+ key: 0,
82
+ onClick: _cache[1] || (_cache[1] = ($event) => openPopup(5)),
83
+ class: "aspect-1x1 radius-small o-hidden thumbnail flex flex-center t-medium t-black bg-white"
84
+ }, " +" + vue.toDisplayString(__props.images.length - 5), 1)) : vue.createCommentVNode("", true)
77
85
  ])
78
86
  ])) : vue.createCommentVNode("", true),
79
87
  vue.createVNode(Popup.default, {
80
88
  onClosePopup: closePopup,
81
89
  isPopupOpen: isPopupVisible.value,
82
- class: "radius-medium o-hidden"
90
+ class: "radius-zero o-hidden"
83
91
  }, {
84
92
  default: vue.withCtx(() => [
85
93
  vue.createVNode(PhotoViewer.default, {
86
- photoUrl: (_ctx.FILE_SERVER_URL || "") + selectedImage.value
87
- }, null, 8, ["photoUrl"])
94
+ photos: __props.images.map((img) => (_ctx.FILE_SERVER_URL || "") + img),
95
+ initialIndex: selectedImageIndex.value
96
+ }, null, 8, ["photos", "initialIndex"])
88
97
  ]),
89
98
  _: 1
90
99
  }, 8, ["isPopupOpen"])
@@ -92,6 +101,6 @@ const _sfc_main = {
92
101
  };
93
102
  }
94
103
  };
95
- const ProductImages = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-641e5bb0"]]);
104
+ const ProductImages = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-38ae846b"]]);
96
105
  exports.default = ProductImages;
97
106
  //# sourceMappingURL=ProductImages.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductImages.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/ProductImages.vue"],"sourcesContent":["<template>\n <div class=\"w-100 o-hidden bg-light radius-medium flex-nowrap flex-column flex pos-relative\">\n <!-- Main image container -->\n <div class=\"pd-semi w-100 bg-light radius-semi o-hidden\" @click=\"openPopup(images[0])\">\n <Image360\n v-if=\"product && product.image3d\"\n class=\"h-100 w-100\"\n :imagePath=\"`/assets/images/products/${product.image3d}`\"\n :imageCount=\"36\"\n />\n <img\n loading=\"lazy\"\n v-if=\"images[0] && !product?.image3d\"\n class=\"h-max h-max-15r bg-white radius-semi w-100\"\n style=\"object-fit: contain;\"\n :src=\"(FILE_SERVER_URL || '') + images[0]\"\n />\n <PlaceholderImage\n v-if=\"!images[0] && !product?.image3d\"\n class=\"h-max-20r h-100 w-100\"\n style=\"object-fit: cover;\"\n />\n </div>\n \n <!-- Thumbnails -->\n <div v-if=\"images.length > 1\" class=\"o-scroll w-100 pd-semi pd-t-zero\">\n <div class=\"no-responsive w-max flex flex-nowrap gap-thin\">\n <img loading=\"lazy\" \n v-for=\"(image, index) in images\"\n :key=\"index\"\n :src=\"(FILE_SERVER_URL || '') + image\" \n @click=\"openPopup(image)\"\n class=\"flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail\"\n />\n </div>\n </div>\n \n <!-- Popup with photo viewer -->\n <Popup @close-popup=\"closePopup\" :isPopupOpen=\"isPopupVisible\" class=\"radius-medium o-hidden\">\n <PhotoViewer\n :photoUrl=\"(FILE_SERVER_URL || '') + selectedImage\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\n\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport PhotoViewer from '@martyrs/src/components/PhotoViewer/PhotoViewer.vue';\n\nimport PlaceholderImage from '@martyrs/src/modules/icons/placeholders/PlaceholderImage.vue'\n\nimport Image360 from '@martyrs/src/modules/products/components/elements/Image360.vue'\n\nconst props = defineProps({\n images: {\n type: Array,\n required: true,\n },\n product: {\n type: Object,\n default: () => ({})\n },\n});\n\nconst isPopupVisible = ref(false);\nconst selectedImage = ref(null);\n\nconst openPopup = (image) => {\n if (!image) return;\n selectedImage.value = image;\n isPopupVisible.value = true;\n};\n\nconst closePopup = () => {\n isPopupVisible.value = false;\n};\n</script>\n\n<style scoped>\n.thumbnail {\n width: 100%;\n max-width: 6rem;\n height: 6rem;\n object-fit: cover;\n cursor: pointer;\n}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,UAAM,iBAAiBA,IAAG,IAAC,KAAK;AAChC,UAAM,gBAAgBA,IAAG,IAAC,IAAI;AAE9B,UAAM,YAAY,CAAC,UAAU;AAC3B,UAAI,CAAC,MAAO;AACZ,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,aAAa,MAAM;AACvB,qBAAe,QAAQ;AAAA,IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProductImages.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/ProductImages.vue"],"sourcesContent":["<template>\n <div class=\"w-100 bs-heavy h-max mobile:pos-relative tablet:pos-relative pos-sticky pos-t-0 pd-medium o-hidden bg-light radius-medium gap-small flex-nowrap flex-row mobile:flex-column flex pos-relative\">\n <!-- Main image container -->\n <div class=\"order-1 w-100 bg-light radius-small o-hidden\" @click=\"openPopup(currentImageIndex)\">\n <Image360\n v-if=\"product && product.image3d\"\n class=\"h-100 w-100\"\n :imagePath=\"`/assets/images/products/${product.image3d}`\"\n :imageCount=\"36\"\n />\n <img\n loading=\"lazy\"\n v-if=\"images[currentImageIndex] && !product?.image3d\"\n class=\"h-100 flex-child-default bg-white radius-small w-100\"\n style=\"object-fit: contain;\"\n :src=\"(FILE_SERVER_URL || '') + images[currentImageIndex]\"\n />\n <PlaceholderImage\n v-if=\"!images[currentImageIndex] && !product?.image3d\"\n class=\"h-100 w-100\"\n style=\"object-fit: cover;\"\n />\n </div>\n \n <!-- Thumbnails -->\n <div v-if=\"images.length > 1\" class=\"mobile:order-1 order-0 w-5r mobile:w-100\">\n <div class=\"w-100 mobile:flex-row flex-column flex flex-nowrap gap-thin\">\n <img loading=\"lazy\" \n v-for=\"(image, index) in images.slice(0, 5)\"\n :key=\"index\"\n :src=\"(FILE_SERVER_URL || '') + image\" \n @click=\"currentImageIndex = index\"\n class=\"aspect-1x1 radius-small bg-white o-hidden thumbnail\"\n :class=\"{ 'active': currentImageIndex === index }\"\n />\n <div\n v-if=\"images.length > 5\"\n @click=\"openPopup(5)\"\n class=\"aspect-1x1 radius-small o-hidden thumbnail flex flex-center t-medium t-black bg-white \"\n >\n +{{ images.length - 5 }}\n </div>\n </div>\n </div>\n \n <!-- Popup with photo viewer -->\n <Popup @close-popup=\"closePopup\" :isPopupOpen=\"isPopupVisible\" class=\"radius-zero o-hidden\">\n <PhotoViewer\n :photos=\"images.map(img => (FILE_SERVER_URL || '') + img)\"\n :initialIndex=\"selectedImageIndex\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport PhotoViewer from '@martyrs/src/components/PhotoViewer/PhotoViewer.vue';\nimport PlaceholderImage from '@martyrs/src/modules/icons/placeholders/PlaceholderImage.vue'\nimport Image360 from '@martyrs/src/modules/products/components/elements/Image360.vue'\n\nconst props = defineProps({\n images: {\n type: Array,\n required: true,\n },\n product: {\n type: Object,\n default: () => ({})\n },\n});\n\nconst isPopupVisible = ref(false);\nconst selectedImageIndex = ref(0);\nconst currentImageIndex = ref(0);\n\nconst openPopup = (index) => {\n if (!props.images.length) return;\n selectedImageIndex.value = index;\n isPopupVisible.value = true;\n};\n\nconst closePopup = () => {\n selectedImageIndex.value = 0;\n isPopupVisible.value = false;\n};\n</script>\n\n<style scoped>\n.thumbnail {\n width: 100%;\n object-fit: cover;\n cursor: pointer;\n}\n.thumbnail.active {\n border: 1px solid rgb(var(--second));\n}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,UAAM,QAAQ;AAWd,UAAM,iBAAiBA,IAAG,IAAC,KAAK;AAChC,UAAM,qBAAqBA,IAAG,IAAC,CAAC;AAChC,UAAM,oBAAoBA,IAAG,IAAC,CAAC;AAE/B,UAAM,YAAY,CAAC,UAAU;AAC3B,UAAI,CAAC,MAAM,OAAO,OAAQ;AAC1B,yBAAmB,QAAQ;AAC3B,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,aAAa,MAAM;AACvB,yBAAmB,QAAQ;AAC3B,qBAAe,QAAQ;AAAA,IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +1,16 @@
1
- import { ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, createBlock, Fragment, renderList, withCtx } from "vue";
2
- import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
3
- import _sfc_main$2 from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
1
+ import { ref, createElementBlock, openBlock, createElementVNode, createCommentVNode, createVNode, createBlock, Fragment, renderList, normalizeClass, toDisplayString, withCtx } from "vue";
2
+ import _sfc_main$1 from "../../../../components/Popup/Popup.vue2.js";
3
+ import PhotoViewer from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
4
4
  import PlaceholderImage from "../../../icons/placeholders/PlaceholderImage.vue.js";
5
5
  import Image360 from "../elements/Image360.vue.js";
6
6
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
7
- const _hoisted_1 = { class: "w-100 o-hidden bg-light radius-medium flex-nowrap flex-column flex pos-relative" };
7
+ const _hoisted_1 = { class: "w-100 bs-heavy h-max mobile:pos-relative tablet:pos-relative pos-sticky pos-t-0 pd-medium o-hidden bg-light radius-medium gap-small flex-nowrap flex-row mobile:flex-column flex pos-relative" };
8
8
  const _hoisted_2 = ["src"];
9
9
  const _hoisted_3 = {
10
10
  key: 0,
11
- class: "o-scroll w-100 pd-semi pd-t-zero"
11
+ class: "mobile:order-1 order-0 w-5r mobile:w-100"
12
12
  };
13
- const _hoisted_4 = { class: "no-responsive w-max flex flex-nowrap gap-thin" };
13
+ const _hoisted_4 = { class: "w-100 mobile:flex-row flex-column flex flex-nowrap gap-thin" };
14
14
  const _hoisted_5 = ["src", "onClick"];
15
15
  const _sfc_main = {
16
16
  __name: "ProductImages",
@@ -25,22 +25,25 @@ const _sfc_main = {
25
25
  }
26
26
  },
27
27
  setup(__props) {
28
+ const props = __props;
28
29
  const isPopupVisible = ref(false);
29
- const selectedImage = ref(null);
30
- const openPopup = (image) => {
31
- if (!image) return;
32
- selectedImage.value = image;
30
+ const selectedImageIndex = ref(0);
31
+ const currentImageIndex = ref(0);
32
+ const openPopup = (index) => {
33
+ if (!props.images.length) return;
34
+ selectedImageIndex.value = index;
33
35
  isPopupVisible.value = true;
34
36
  };
35
37
  const closePopup = () => {
38
+ selectedImageIndex.value = 0;
36
39
  isPopupVisible.value = false;
37
40
  };
38
41
  return (_ctx, _cache) => {
39
42
  var _a, _b;
40
43
  return openBlock(), createElementBlock("div", _hoisted_1, [
41
44
  createElementVNode("div", {
42
- class: "pd-semi w-100 bg-light radius-semi o-hidden",
43
- onClick: _cache[0] || (_cache[0] = ($event) => openPopup(__props.images[0]))
45
+ class: "order-1 w-100 bg-light radius-small o-hidden",
46
+ onClick: _cache[0] || (_cache[0] = ($event) => openPopup(currentImageIndex.value))
44
47
  }, [
45
48
  __props.product && __props.product.image3d ? (openBlock(), createBlock(Image360, {
46
49
  key: 0,
@@ -48,41 +51,47 @@ const _sfc_main = {
48
51
  imagePath: `/assets/images/products/${__props.product.image3d}`,
49
52
  imageCount: 36
50
53
  }, null, 8, ["imagePath"])) : createCommentVNode("", true),
51
- __props.images[0] && !((_a = __props.product) == null ? void 0 : _a.image3d) ? (openBlock(), createElementBlock("img", {
54
+ __props.images[currentImageIndex.value] && !((_a = __props.product) == null ? void 0 : _a.image3d) ? (openBlock(), createElementBlock("img", {
52
55
  key: 1,
53
56
  loading: "lazy",
54
- class: "h-max h-max-15r bg-white radius-semi w-100",
57
+ class: "h-100 flex-child-default bg-white radius-small w-100",
55
58
  style: { "object-fit": "contain" },
56
- src: (_ctx.FILE_SERVER_URL || "") + __props.images[0]
59
+ src: (_ctx.FILE_SERVER_URL || "") + __props.images[currentImageIndex.value]
57
60
  }, null, 8, _hoisted_2)) : createCommentVNode("", true),
58
- !__props.images[0] && !((_b = __props.product) == null ? void 0 : _b.image3d) ? (openBlock(), createBlock(PlaceholderImage, {
61
+ !__props.images[currentImageIndex.value] && !((_b = __props.product) == null ? void 0 : _b.image3d) ? (openBlock(), createBlock(PlaceholderImage, {
59
62
  key: 2,
60
- class: "h-max-20r h-100 w-100",
63
+ class: "h-100 w-100",
61
64
  style: { "object-fit": "cover" }
62
65
  })) : createCommentVNode("", true)
63
66
  ]),
64
67
  __props.images.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_3, [
65
68
  createElementVNode("div", _hoisted_4, [
66
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.images, (image, index) => {
69
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.images.slice(0, 5), (image, index) => {
67
70
  return openBlock(), createElementBlock("img", {
68
71
  loading: "lazy",
69
72
  key: index,
70
73
  src: (_ctx.FILE_SERVER_URL || "") + image,
71
- onClick: ($event) => openPopup(image),
72
- class: "flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail"
73
- }, null, 8, _hoisted_5);
74
- }), 128))
74
+ onClick: ($event) => currentImageIndex.value = index,
75
+ class: normalizeClass(["aspect-1x1 radius-small bg-white o-hidden thumbnail", { "active": currentImageIndex.value === index }])
76
+ }, null, 10, _hoisted_5);
77
+ }), 128)),
78
+ __props.images.length > 5 ? (openBlock(), createElementBlock("div", {
79
+ key: 0,
80
+ onClick: _cache[1] || (_cache[1] = ($event) => openPopup(5)),
81
+ class: "aspect-1x1 radius-small o-hidden thumbnail flex flex-center t-medium t-black bg-white"
82
+ }, " +" + toDisplayString(__props.images.length - 5), 1)) : createCommentVNode("", true)
75
83
  ])
76
84
  ])) : createCommentVNode("", true),
77
85
  createVNode(_sfc_main$1, {
78
86
  onClosePopup: closePopup,
79
87
  isPopupOpen: isPopupVisible.value,
80
- class: "radius-medium o-hidden"
88
+ class: "radius-zero o-hidden"
81
89
  }, {
82
90
  default: withCtx(() => [
83
- createVNode(_sfc_main$2, {
84
- photoUrl: (_ctx.FILE_SERVER_URL || "") + selectedImage.value
85
- }, null, 8, ["photoUrl"])
91
+ createVNode(PhotoViewer, {
92
+ photos: __props.images.map((img) => (_ctx.FILE_SERVER_URL || "") + img),
93
+ initialIndex: selectedImageIndex.value
94
+ }, null, 8, ["photos", "initialIndex"])
86
95
  ]),
87
96
  _: 1
88
97
  }, 8, ["isPopupOpen"])
@@ -90,7 +99,7 @@ const _sfc_main = {
90
99
  };
91
100
  }
92
101
  };
93
- const ProductImages = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-641e5bb0"]]);
102
+ const ProductImages = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-38ae846b"]]);
94
103
  export {
95
104
  ProductImages as default
96
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductImages.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductImages.vue"],"sourcesContent":["<template>\n <div class=\"w-100 o-hidden bg-light radius-medium flex-nowrap flex-column flex pos-relative\">\n <!-- Main image container -->\n <div class=\"pd-semi w-100 bg-light radius-semi o-hidden\" @click=\"openPopup(images[0])\">\n <Image360\n v-if=\"product && product.image3d\"\n class=\"h-100 w-100\"\n :imagePath=\"`/assets/images/products/${product.image3d}`\"\n :imageCount=\"36\"\n />\n <img\n loading=\"lazy\"\n v-if=\"images[0] && !product?.image3d\"\n class=\"h-max h-max-15r bg-white radius-semi w-100\"\n style=\"object-fit: contain;\"\n :src=\"(FILE_SERVER_URL || '') + images[0]\"\n />\n <PlaceholderImage\n v-if=\"!images[0] && !product?.image3d\"\n class=\"h-max-20r h-100 w-100\"\n style=\"object-fit: cover;\"\n />\n </div>\n \n <!-- Thumbnails -->\n <div v-if=\"images.length > 1\" class=\"o-scroll w-100 pd-semi pd-t-zero\">\n <div class=\"no-responsive w-max flex flex-nowrap gap-thin\">\n <img loading=\"lazy\" \n v-for=\"(image, index) in images\"\n :key=\"index\"\n :src=\"(FILE_SERVER_URL || '') + image\" \n @click=\"openPopup(image)\"\n class=\"flex-child flex-child-grow-1 aspect-1x1 radius-semi bg-white o-hidden thumbnail\"\n />\n </div>\n </div>\n \n <!-- Popup with photo viewer -->\n <Popup @close-popup=\"closePopup\" :isPopupOpen=\"isPopupVisible\" class=\"radius-medium o-hidden\">\n <PhotoViewer\n :photoUrl=\"(FILE_SERVER_URL || '') + selectedImage\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\n\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport PhotoViewer from '@martyrs/src/components/PhotoViewer/PhotoViewer.vue';\n\nimport PlaceholderImage from '@martyrs/src/modules/icons/placeholders/PlaceholderImage.vue'\n\nimport Image360 from '@martyrs/src/modules/products/components/elements/Image360.vue'\n\nconst props = defineProps({\n images: {\n type: Array,\n required: true,\n },\n product: {\n type: Object,\n default: () => ({})\n },\n});\n\nconst isPopupVisible = ref(false);\nconst selectedImage = ref(null);\n\nconst openPopup = (image) => {\n if (!image) return;\n selectedImage.value = image;\n isPopupVisible.value = true;\n};\n\nconst closePopup = () => {\n isPopupVisible.value = false;\n};\n</script>\n\n<style scoped>\n.thumbnail {\n width: 100%;\n max-width: 6rem;\n height: 6rem;\n object-fit: cover;\n cursor: pointer;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,UAAM,iBAAiB,IAAI,KAAK;AAChC,UAAM,gBAAgB,IAAI,IAAI;AAE9B,UAAM,YAAY,CAAC,UAAU;AAC3B,UAAI,CAAC,MAAO;AACZ,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,aAAa,MAAM;AACvB,qBAAe,QAAQ;AAAA,IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProductImages.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductImages.vue"],"sourcesContent":["<template>\n <div class=\"w-100 bs-heavy h-max mobile:pos-relative tablet:pos-relative pos-sticky pos-t-0 pd-medium o-hidden bg-light radius-medium gap-small flex-nowrap flex-row mobile:flex-column flex pos-relative\">\n <!-- Main image container -->\n <div class=\"order-1 w-100 bg-light radius-small o-hidden\" @click=\"openPopup(currentImageIndex)\">\n <Image360\n v-if=\"product && product.image3d\"\n class=\"h-100 w-100\"\n :imagePath=\"`/assets/images/products/${product.image3d}`\"\n :imageCount=\"36\"\n />\n <img\n loading=\"lazy\"\n v-if=\"images[currentImageIndex] && !product?.image3d\"\n class=\"h-100 flex-child-default bg-white radius-small w-100\"\n style=\"object-fit: contain;\"\n :src=\"(FILE_SERVER_URL || '') + images[currentImageIndex]\"\n />\n <PlaceholderImage\n v-if=\"!images[currentImageIndex] && !product?.image3d\"\n class=\"h-100 w-100\"\n style=\"object-fit: cover;\"\n />\n </div>\n \n <!-- Thumbnails -->\n <div v-if=\"images.length > 1\" class=\"mobile:order-1 order-0 w-5r mobile:w-100\">\n <div class=\"w-100 mobile:flex-row flex-column flex flex-nowrap gap-thin\">\n <img loading=\"lazy\" \n v-for=\"(image, index) in images.slice(0, 5)\"\n :key=\"index\"\n :src=\"(FILE_SERVER_URL || '') + image\" \n @click=\"currentImageIndex = index\"\n class=\"aspect-1x1 radius-small bg-white o-hidden thumbnail\"\n :class=\"{ 'active': currentImageIndex === index }\"\n />\n <div\n v-if=\"images.length > 5\"\n @click=\"openPopup(5)\"\n class=\"aspect-1x1 radius-small o-hidden thumbnail flex flex-center t-medium t-black bg-white \"\n >\n +{{ images.length - 5 }}\n </div>\n </div>\n </div>\n \n <!-- Popup with photo viewer -->\n <Popup @close-popup=\"closePopup\" :isPopupOpen=\"isPopupVisible\" class=\"radius-zero o-hidden\">\n <PhotoViewer\n :photos=\"images.map(img => (FILE_SERVER_URL || '') + img)\"\n :initialIndex=\"selectedImageIndex\"\n />\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport Popup from '@martyrs/src/components/Popup/Popup.vue';\nimport PhotoViewer from '@martyrs/src/components/PhotoViewer/PhotoViewer.vue';\nimport PlaceholderImage from '@martyrs/src/modules/icons/placeholders/PlaceholderImage.vue'\nimport Image360 from '@martyrs/src/modules/products/components/elements/Image360.vue'\n\nconst props = defineProps({\n images: {\n type: Array,\n required: true,\n },\n product: {\n type: Object,\n default: () => ({})\n },\n});\n\nconst isPopupVisible = ref(false);\nconst selectedImageIndex = ref(0);\nconst currentImageIndex = ref(0);\n\nconst openPopup = (index) => {\n if (!props.images.length) return;\n selectedImageIndex.value = index;\n isPopupVisible.value = true;\n};\n\nconst closePopup = () => {\n selectedImageIndex.value = 0;\n isPopupVisible.value = false;\n};\n</script>\n\n<style scoped>\n.thumbnail {\n width: 100%;\n object-fit: cover;\n cursor: pointer;\n}\n.thumbnail.active {\n border: 1px solid rgb(var(--second));\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DA,UAAM,QAAQ;AAWd,UAAM,iBAAiB,IAAI,KAAK;AAChC,UAAM,qBAAqB,IAAI,CAAC;AAChC,UAAM,oBAAoB,IAAI,CAAC;AAE/B,UAAM,YAAY,CAAC,UAAU;AAC3B,UAAI,CAAC,MAAM,OAAO,OAAQ;AAC1B,yBAAmB,QAAQ;AAC3B,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,aAAa,MAAM;AACvB,yBAAmB,QAAQ;AAC3B,qBAAe,QAAQ;AAAA,IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,10 +8,10 @@ const _hoisted_2 = {
8
8
  };
9
9
  const _hoisted_3 = { class: "h2 t-bold" };
10
10
  const _hoisted_4 = { class: "capitalize mn-b-thin t-medium" };
11
- const _hoisted_5 = { class: "flex flex-wrap gap-small mn-b-medium" };
11
+ const _hoisted_5 = { class: "flex flex-wrap gap-thin mn-b-medium" };
12
12
  const _hoisted_6 = ["onClick", "disabled"];
13
13
  const _hoisted_7 = ["src"];
14
- const _hoisted_8 = { class: "flex-center capitalize flex h-100 w-100 t-small t-center" };
14
+ const _hoisted_8 = { class: "" };
15
15
  const _hoisted_9 = {
16
16
  key: 1,
17
17
  class: "pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small"
@@ -116,7 +116,7 @@ const _sfc_main = {
116
116
  key: item.key,
117
117
  onClick: ($event) => group.label === "Options" ? pick(item.variant) : pickAttr(group.label, item.value),
118
118
  disabled: item.off,
119
- class: vue.normalizeClass(["h-3r w-min-3r flex-nowrap gap-thin radius-small flex flex-center pos-relative br-1px pd-micro", [
119
+ class: vue.normalizeClass(["pd-small radius-small", [
120
120
  isSelected(group, item) ? "br-main" : "br-black-transp-10",
121
121
  item.off ? "o-50 cursor-not-allowed" : "cursor-pointer hover-scale-1"
122
122
  ]])
@@ -126,7 +126,7 @@ const _sfc_main = {
126
126
  src: `${_ctx.FILE_SERVER_URL}${item.img}`,
127
127
  class: "h-100 radius-thin aspect-1x1 object-fit-contain"
128
128
  }, null, 8, _hoisted_7)) : vue.createCommentVNode("", true),
129
- vue.createElementVNode("span", _hoisted_8, vue.toDisplayString(item.text), 1),
129
+ vue.createElementVNode("p", _hoisted_8, vue.toDisplayString(item.text), 1),
130
130
  isSelected(group, item) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, " Selected ")) : vue.createCommentVNode("", true)
131
131
  ], 10, _hoisted_6);
132
132
  }), 128))
@@ -1 +1 @@
1
- {"version":3,"file":"ProductVariants.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/ProductVariants.vue"],"sourcesContent":["<template>\n <div class=\"w-100\">\n <div v-if=\"selected\" class=\"mn-b-small\">\n <span class=\"h2 t-bold\">${{ selected.price.toFixed(2) }}</span>\n </div>\n\n <div\n v-for=\"group in groups\"\n :key=\"group.label\"\n class=\"w-100 mn-b-medium\"\n >\n <p class=\"capitalize mn-b-thin t-medium\">{{ group.label }}</p>\n <div class=\"flex flex-wrap gap-small mn-b-medium\">\n <button\n v-for=\"item in group.items\"\n :key=\"item.key\"\n @click=\"group.label === 'Options' ? pick(item.variant) : pickAttr(group.label, item.value)\"\n :disabled=\"item.off\"\n class=\"h-3r w-min-3r flex-nowrap gap-thin radius-small flex flex-center pos-relative br-1px pd-micro\"\n :class=\"[\n isSelected(group, item) ? 'br-main' : 'br-black-transp-10',\n item.off ? 'o-50 cursor-not-allowed' : 'cursor-pointer hover-scale-1',\n ]\"\n >\n <img\n v-if=\"item.img\"\n :src=\"`${FILE_SERVER_URL}${item.img}`\"\n class=\"h-100 radius-thin aspect-1x1 object-fit-contain\"\n />\n <span class=\"flex-center capitalize flex h-100 w-100 t-small t-center\">\n {{ item.text }}\n </span>\n <div\n v-if=\"isSelected(group, item)\"\n class=\"pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small\"\n >\n Selected\n </div>\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch, onMounted } from 'vue';\n\nconst props = defineProps({ productVariants: Array });\nconst emit = defineEmits(['variant-selected', 'update-images']);\n\nconst selectedAttributes = ref({});\nconst selected = ref(null);\n\nconst hasAttrs = computed(() =>\n props.productVariants.some(v => v.attributes?.length)\n);\n\nconst groups = computed(() => {\n if (hasAttrs.value) {\n const labels = [...new Set(props.productVariants[0].attributes.map(a => a.name))];\n return labels.map((lbl, i) => ({\n label: lbl,\n items: [...new Set(\n props.productVariants.map(v => v.attributes.find(a => a.name === lbl)?.value)\n )]\n .filter(Boolean)\n .map(val => {\n const v = props.productVariants.find(x => x.attributes.find(a => a.name === lbl && a.value === val));\n return {\n key: lbl + val,\n value: val,\n img: i === 0 ? v.images?.[0] : null,\n off: !v.available,\n text: val,\n };\n }),\n }));\n }\n if (props.productVariants.length > 1) {\n return [{\n label: 'Options',\n items: props.productVariants.map(v => ({\n key: v._id,\n variant: v,\n img: v.images?.[0],\n off: !v.available,\n text: v.name || v.sku,\n })),\n }];\n }\n return [];\n});\n\nconst pick = v => {\n if (!v.available) return;\n selectedAttributes.value = Object.fromEntries(v.attributes?.map(a => [a.name, a.value]) || []);\n selected.value = v;\n emit('variant-selected', v);\n v.images?.length && emit('update-images', v.images);\n};\n\nconst pickAttr = (lbl, val) => {\n const test = { ...selectedAttributes.value, [lbl]: val };\n if (!props.productVariants.some(v =>\n Object.entries(test).every(([k, x]) =>\n v.attributes.find(a => a.name === k && a.value === x)\n )\n )) return;\n selectedAttributes.value = test;\n};\n\nwatch(selectedAttributes, attrs => {\n const m = props.productVariants.find(v =>\n Object.entries(attrs).every(([k, x]) => v.attributes.find(a => a.name === k && a.value === x))\n );\n m ? pick(m) : (selected.value = null);\n});\n\nonMounted(() => props.productVariants.length === 1 && pick(props.productVariants[0]));\n\nconst isSelected = (g, i) =>\n g.label === 'Options'\n ? selected.value?._id === i.variant?._id\n : selectedAttributes.value[g.label] === i.value;\n</script>\n"],"names":["ref","computed","watch","onMounted"],"mappings":"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"}
1
+ {"version":3,"file":"ProductVariants.vue.cjs","sources":["../../../../../../../src/modules/products/components/blocks/ProductVariants.vue"],"sourcesContent":["<template>\n <div class=\"w-100\">\n <div v-if=\"selected\" class=\"mn-b-small\">\n <span class=\"h2 t-bold\">${{ selected.price.toFixed(2) }}</span>\n </div>\n\n <div\n v-for=\"group in groups\"\n :key=\"group.label\"\n class=\"w-100 mn-b-medium\"\n >\n <p class=\"capitalize mn-b-thin t-medium\">{{ group.label }}</p>\n\n <div class=\"flex flex-wrap gap-thin mn-b-medium\">\n <button\n v-for=\"item in group.items\"\n :key=\"item.key\"\n @click=\"group.label === 'Options' ? pick(item.variant) : pickAttr(group.label, item.value)\"\n :disabled=\"item.off\"\n class=\"pd-small radius-small\"\n :class=\"[\n isSelected(group, item) ? 'br-main' : 'br-black-transp-10',\n item.off ? 'o-50 cursor-not-allowed' : 'cursor-pointer hover-scale-1',\n ]\"\n >\n <img\n v-if=\"item.img\"\n :src=\"`${FILE_SERVER_URL}${item.img}`\"\n class=\"h-100 radius-thin aspect-1x1 object-fit-contain\"\n />\n <p class=\"\">\n {{ item.text }}\n </p>\n\n <div\n v-if=\"isSelected(group, item)\"\n class=\"pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small\"\n >\n Selected\n </div>\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch, onMounted } from 'vue';\n\nconst props = defineProps({ productVariants: Array });\nconst emit = defineEmits(['variant-selected', 'update-images']);\n\nconst selectedAttributes = ref({});\nconst selected = ref(null);\n\nconst hasAttrs = computed(() =>\n props.productVariants.some(v => v.attributes?.length)\n);\n\nconst groups = computed(() => {\n if (hasAttrs.value) {\n const labels = [...new Set(props.productVariants[0].attributes.map(a => a.name))];\n return labels.map((lbl, i) => ({\n label: lbl,\n items: [...new Set(\n props.productVariants.map(v => v.attributes.find(a => a.name === lbl)?.value)\n )]\n .filter(Boolean)\n .map(val => {\n const v = props.productVariants.find(x => x.attributes.find(a => a.name === lbl && a.value === val));\n return {\n key: lbl + val,\n value: val,\n img: i === 0 ? v.images?.[0] : null,\n off: !v.available,\n text: val,\n };\n }),\n }));\n }\n if (props.productVariants.length > 1) {\n return [{\n label: 'Options',\n items: props.productVariants.map(v => ({\n key: v._id,\n variant: v,\n img: v.images?.[0],\n off: !v.available,\n text: v.name || v.sku,\n })),\n }];\n }\n return [];\n});\n\nconst pick = v => {\n if (!v.available) return;\n selectedAttributes.value = Object.fromEntries(v.attributes?.map(a => [a.name, a.value]) || []);\n selected.value = v;\n emit('variant-selected', v);\n v.images?.length && emit('update-images', v.images);\n};\n\nconst pickAttr = (lbl, val) => {\n const test = { ...selectedAttributes.value, [lbl]: val };\n if (!props.productVariants.some(v =>\n Object.entries(test).every(([k, x]) =>\n v.attributes.find(a => a.name === k && a.value === x)\n )\n )) return;\n selectedAttributes.value = test;\n};\n\nwatch(selectedAttributes, attrs => {\n const m = props.productVariants.find(v =>\n Object.entries(attrs).every(([k, x]) => v.attributes.find(a => a.name === k && a.value === x))\n );\n m ? pick(m) : (selected.value = null);\n});\n\nonMounted(() => props.productVariants.length === 1 && pick(props.productVariants[0]));\n\nconst isSelected = (g, i) =>\n g.label === 'Options'\n ? selected.value?._id === i.variant?._id\n : selectedAttributes.value[g.label] === i.value;\n</script>\n"],"names":["ref","computed","watch","onMounted"],"mappings":"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"}
@@ -6,10 +6,10 @@ const _hoisted_2 = {
6
6
  };
7
7
  const _hoisted_3 = { class: "h2 t-bold" };
8
8
  const _hoisted_4 = { class: "capitalize mn-b-thin t-medium" };
9
- const _hoisted_5 = { class: "flex flex-wrap gap-small mn-b-medium" };
9
+ const _hoisted_5 = { class: "flex flex-wrap gap-thin mn-b-medium" };
10
10
  const _hoisted_6 = ["onClick", "disabled"];
11
11
  const _hoisted_7 = ["src"];
12
- const _hoisted_8 = { class: "flex-center capitalize flex h-100 w-100 t-small t-center" };
12
+ const _hoisted_8 = { class: "" };
13
13
  const _hoisted_9 = {
14
14
  key: 1,
15
15
  class: "pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small"
@@ -114,7 +114,7 @@ const _sfc_main = {
114
114
  key: item.key,
115
115
  onClick: ($event) => group.label === "Options" ? pick(item.variant) : pickAttr(group.label, item.value),
116
116
  disabled: item.off,
117
- class: normalizeClass(["h-3r w-min-3r flex-nowrap gap-thin radius-small flex flex-center pos-relative br-1px pd-micro", [
117
+ class: normalizeClass(["pd-small radius-small", [
118
118
  isSelected(group, item) ? "br-main" : "br-black-transp-10",
119
119
  item.off ? "o-50 cursor-not-allowed" : "cursor-pointer hover-scale-1"
120
120
  ]])
@@ -124,7 +124,7 @@ const _sfc_main = {
124
124
  src: `${_ctx.FILE_SERVER_URL}${item.img}`,
125
125
  class: "h-100 radius-thin aspect-1x1 object-fit-contain"
126
126
  }, null, 8, _hoisted_7)) : createCommentVNode("", true),
127
- createElementVNode("span", _hoisted_8, toDisplayString(item.text), 1),
127
+ createElementVNode("p", _hoisted_8, toDisplayString(item.text), 1),
128
128
  isSelected(group, item) ? (openBlock(), createElementBlock("div", _hoisted_9, " Selected ")) : createCommentVNode("", true)
129
129
  ], 10, _hoisted_6);
130
130
  }), 128))
@@ -1 +1 @@
1
- {"version":3,"file":"ProductVariants.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductVariants.vue"],"sourcesContent":["<template>\n <div class=\"w-100\">\n <div v-if=\"selected\" class=\"mn-b-small\">\n <span class=\"h2 t-bold\">${{ selected.price.toFixed(2) }}</span>\n </div>\n\n <div\n v-for=\"group in groups\"\n :key=\"group.label\"\n class=\"w-100 mn-b-medium\"\n >\n <p class=\"capitalize mn-b-thin t-medium\">{{ group.label }}</p>\n <div class=\"flex flex-wrap gap-small mn-b-medium\">\n <button\n v-for=\"item in group.items\"\n :key=\"item.key\"\n @click=\"group.label === 'Options' ? pick(item.variant) : pickAttr(group.label, item.value)\"\n :disabled=\"item.off\"\n class=\"h-3r w-min-3r flex-nowrap gap-thin radius-small flex flex-center pos-relative br-1px pd-micro\"\n :class=\"[\n isSelected(group, item) ? 'br-main' : 'br-black-transp-10',\n item.off ? 'o-50 cursor-not-allowed' : 'cursor-pointer hover-scale-1',\n ]\"\n >\n <img\n v-if=\"item.img\"\n :src=\"`${FILE_SERVER_URL}${item.img}`\"\n class=\"h-100 radius-thin aspect-1x1 object-fit-contain\"\n />\n <span class=\"flex-center capitalize flex h-100 w-100 t-small t-center\">\n {{ item.text }}\n </span>\n <div\n v-if=\"isSelected(group, item)\"\n class=\"pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small\"\n >\n Selected\n </div>\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch, onMounted } from 'vue';\n\nconst props = defineProps({ productVariants: Array });\nconst emit = defineEmits(['variant-selected', 'update-images']);\n\nconst selectedAttributes = ref({});\nconst selected = ref(null);\n\nconst hasAttrs = computed(() =>\n props.productVariants.some(v => v.attributes?.length)\n);\n\nconst groups = computed(() => {\n if (hasAttrs.value) {\n const labels = [...new Set(props.productVariants[0].attributes.map(a => a.name))];\n return labels.map((lbl, i) => ({\n label: lbl,\n items: [...new Set(\n props.productVariants.map(v => v.attributes.find(a => a.name === lbl)?.value)\n )]\n .filter(Boolean)\n .map(val => {\n const v = props.productVariants.find(x => x.attributes.find(a => a.name === lbl && a.value === val));\n return {\n key: lbl + val,\n value: val,\n img: i === 0 ? v.images?.[0] : null,\n off: !v.available,\n text: val,\n };\n }),\n }));\n }\n if (props.productVariants.length > 1) {\n return [{\n label: 'Options',\n items: props.productVariants.map(v => ({\n key: v._id,\n variant: v,\n img: v.images?.[0],\n off: !v.available,\n text: v.name || v.sku,\n })),\n }];\n }\n return [];\n});\n\nconst pick = v => {\n if (!v.available) return;\n selectedAttributes.value = Object.fromEntries(v.attributes?.map(a => [a.name, a.value]) || []);\n selected.value = v;\n emit('variant-selected', v);\n v.images?.length && emit('update-images', v.images);\n};\n\nconst pickAttr = (lbl, val) => {\n const test = { ...selectedAttributes.value, [lbl]: val };\n if (!props.productVariants.some(v =>\n Object.entries(test).every(([k, x]) =>\n v.attributes.find(a => a.name === k && a.value === x)\n )\n )) return;\n selectedAttributes.value = test;\n};\n\nwatch(selectedAttributes, attrs => {\n const m = props.productVariants.find(v =>\n Object.entries(attrs).every(([k, x]) => v.attributes.find(a => a.name === k && a.value === x))\n );\n m ? pick(m) : (selected.value = null);\n});\n\nonMounted(() => props.productVariants.length === 1 && pick(props.productVariants[0]));\n\nconst isSelected = (g, i) =>\n g.label === 'Options'\n ? selected.value?._id === i.variant?._id\n : selectedAttributes.value[g.label] === i.value;\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA+CA,UAAM,QAAQ;AACd,UAAM,OAAO;AAEb,UAAM,qBAAqB,IAAI,EAAE;AACjC,UAAM,WAAW,IAAI,IAAI;AAEzB,UAAM,WAAW;AAAA,MAAS,MACxB,MAAM,gBAAgB,KAAK,OAAC;;AAAI,uBAAE,eAAF,mBAAc;AAAA,OAAM;AAAA,IACtD;AAEA,UAAM,SAAS,SAAS,MAAM;AAC5B,UAAI,SAAS,OAAO;AAClB,cAAM,SAAS,CAAC,GAAG,IAAI,IAAI,MAAM,gBAAgB,CAAC,EAAE,WAAW,IAAI,OAAK,EAAE,IAAI,CAAC,CAAC;AAChF,eAAO,OAAO,IAAI,CAAC,KAAK,OAAO;AAAA,UAC7B,OAAO;AAAA,UACP,OAAO,CAAC,GAAG,IAAI;AAAA,YACb,MAAM,gBAAgB,IAAI,OAAK;;AAAA,6BAAE,WAAW,KAAK,OAAK,EAAE,SAAS,GAAG,MAArC,mBAAwC;AAAA,aAAK;AAAA,UAC7E,CAAA,EACE,OAAO,OAAO,EACd,IAAI,SAAO;;AACV,kBAAM,IAAI,MAAM,gBAAgB,KAAK,OAAK,EAAE,WAAW,KAAK,OAAK,EAAE,SAAS,OAAO,EAAE,UAAU,GAAG,CAAC;AACnG,mBAAO;AAAA,cACL,KAAK,MAAM;AAAA,cACX,OAAO;AAAA,cACP,KAAK,MAAM,KAAI,OAAE,WAAF,mBAAW,KAAK;AAAA,cAC/B,KAAK,CAAC,EAAE;AAAA,cACR,MAAM;AAAA,YACP;AAAA,UACX,CAAS;AAAA,QACT,EAAM;AAAA,MACN;AACE,UAAI,MAAM,gBAAgB,SAAS,GAAG;AACpC,eAAO,CAAC;AAAA,UACN,OAAO;AAAA,UACP,OAAO,MAAM,gBAAgB,IAAI,OAAM;;AAAA;AAAA,cACrC,KAAK,EAAE;AAAA,cACP,SAAS;AAAA,cACT,MAAK,OAAE,WAAF,mBAAW;AAAA,cAChB,KAAK,CAAC,EAAE;AAAA,cACR,MAAM,EAAE,QAAQ,EAAE;AAAA,YAC1B;AAAA,WAAQ;AAAA,QACR,CAAK;AAAA,MACL;AACE,aAAO,CAAE;AAAA,IACX,CAAC;AAED,UAAM,OAAO,OAAK;;AAChB,UAAI,CAAC,EAAE,UAAW;AAClB,yBAAmB,QAAQ,OAAO,cAAY,OAAE,eAAF,mBAAc,IAAI,OAAK,CAAC,EAAE,MAAM,EAAE,KAAK,OAAM,CAAA,CAAE;AAC7F,eAAS,QAAQ;AACjB,WAAK,oBAAoB,CAAC;AAC1B,eAAE,WAAF,mBAAU,WAAU,KAAK,iBAAiB,EAAE,MAAM;AAAA,IACpD;AAEA,UAAM,WAAW,CAAC,KAAK,QAAQ;AAC7B,YAAM,OAAO,EAAE,GAAG,mBAAmB,OAAO,CAAC,GAAG,GAAG,IAAK;AACxD,UAAI,CAAC,MAAM,gBAAgB;AAAA,QAAK,OAC9B,OAAO,QAAQ,IAAI,EAAE;AAAA,UAAM,CAAC,CAAC,GAAG,CAAC,MAC/B,EAAE,WAAW,KAAK,OAAK,EAAE,SAAS,KAAK,EAAE,UAAU,CAAC;AAAA,QAC1D;AAAA,MACA,EAAK;AACH,yBAAmB,QAAQ;AAAA,IAC7B;AAEA,UAAM,oBAAoB,WAAS;AACjC,YAAM,IAAI,MAAM,gBAAgB;AAAA,QAAK,OACnC,OAAO,QAAQ,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,OAAK,EAAE,SAAS,KAAK,EAAE,UAAU,CAAC,CAAC;AAAA,MAC9F;AACD,UAAI,KAAK,CAAC,IAAK,SAAS,QAAQ;AAAA,IAClC,CAAC;AAED,cAAU,MAAM,MAAM,gBAAgB,WAAW,KAAK,KAAK,MAAM,gBAAgB,CAAC,CAAC,CAAC;AAEpF,UAAM,aAAa,CAAC,GAAG,MAAC;;AACtB,eAAE,UAAU,cACR,cAAS,UAAT,mBAAgB,WAAQ,OAAE,YAAF,mBAAW,OACnC,mBAAmB,MAAM,EAAE,KAAK,MAAM,EAAE;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ProductVariants.vue.js","sources":["../../../../../../../src/modules/products/components/blocks/ProductVariants.vue"],"sourcesContent":["<template>\n <div class=\"w-100\">\n <div v-if=\"selected\" class=\"mn-b-small\">\n <span class=\"h2 t-bold\">${{ selected.price.toFixed(2) }}</span>\n </div>\n\n <div\n v-for=\"group in groups\"\n :key=\"group.label\"\n class=\"w-100 mn-b-medium\"\n >\n <p class=\"capitalize mn-b-thin t-medium\">{{ group.label }}</p>\n\n <div class=\"flex flex-wrap gap-thin mn-b-medium\">\n <button\n v-for=\"item in group.items\"\n :key=\"item.key\"\n @click=\"group.label === 'Options' ? pick(item.variant) : pickAttr(group.label, item.value)\"\n :disabled=\"item.off\"\n class=\"pd-small radius-small\"\n :class=\"[\n isSelected(group, item) ? 'br-main' : 'br-black-transp-10',\n item.off ? 'o-50 cursor-not-allowed' : 'cursor-pointer hover-scale-1',\n ]\"\n >\n <img\n v-if=\"item.img\"\n :src=\"`${FILE_SERVER_URL}${item.img}`\"\n class=\"h-100 radius-thin aspect-1x1 object-fit-contain\"\n />\n <p class=\"\">\n {{ item.text }}\n </p>\n\n <div\n v-if=\"isSelected(group, item)\"\n class=\"pos-absolute pos-b-0 pos-r-0 pos-l-0 flex flex-center h-1r bg-main t-white t-small\"\n >\n Selected\n </div>\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed, watch, onMounted } from 'vue';\n\nconst props = defineProps({ productVariants: Array });\nconst emit = defineEmits(['variant-selected', 'update-images']);\n\nconst selectedAttributes = ref({});\nconst selected = ref(null);\n\nconst hasAttrs = computed(() =>\n props.productVariants.some(v => v.attributes?.length)\n);\n\nconst groups = computed(() => {\n if (hasAttrs.value) {\n const labels = [...new Set(props.productVariants[0].attributes.map(a => a.name))];\n return labels.map((lbl, i) => ({\n label: lbl,\n items: [...new Set(\n props.productVariants.map(v => v.attributes.find(a => a.name === lbl)?.value)\n )]\n .filter(Boolean)\n .map(val => {\n const v = props.productVariants.find(x => x.attributes.find(a => a.name === lbl && a.value === val));\n return {\n key: lbl + val,\n value: val,\n img: i === 0 ? v.images?.[0] : null,\n off: !v.available,\n text: val,\n };\n }),\n }));\n }\n if (props.productVariants.length > 1) {\n return [{\n label: 'Options',\n items: props.productVariants.map(v => ({\n key: v._id,\n variant: v,\n img: v.images?.[0],\n off: !v.available,\n text: v.name || v.sku,\n })),\n }];\n }\n return [];\n});\n\nconst pick = v => {\n if (!v.available) return;\n selectedAttributes.value = Object.fromEntries(v.attributes?.map(a => [a.name, a.value]) || []);\n selected.value = v;\n emit('variant-selected', v);\n v.images?.length && emit('update-images', v.images);\n};\n\nconst pickAttr = (lbl, val) => {\n const test = { ...selectedAttributes.value, [lbl]: val };\n if (!props.productVariants.some(v =>\n Object.entries(test).every(([k, x]) =>\n v.attributes.find(a => a.name === k && a.value === x)\n )\n )) return;\n selectedAttributes.value = test;\n};\n\nwatch(selectedAttributes, attrs => {\n const m = props.productVariants.find(v =>\n Object.entries(attrs).every(([k, x]) => v.attributes.find(a => a.name === k && a.value === x))\n );\n m ? pick(m) : (selected.value = null);\n});\n\nonMounted(() => props.productVariants.length === 1 && pick(props.productVariants[0]));\n\nconst isSelected = (g, i) =>\n g.label === 'Options'\n ? selected.value?._id === i.variant?._id\n : selectedAttributes.value[g.label] === i.value;\n</script>\n"],"names":[],"mappings":"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"}
@@ -10,22 +10,24 @@ const _sfc_main = {
10
10
  __name: "Price",
11
11
  props: {
12
12
  product: Object,
13
+ variants: Array,
13
14
  size: String
14
15
  },
15
16
  setup(__props) {
16
17
  const props = __props;
17
18
  const variant = vue.computed(() => {
18
- var _a, _b;
19
- return ((_b = (_a = props.product) == null ? void 0 : _a.variants) == null ? void 0 : _b[0]) || props.product;
19
+ var _a, _b, _c;
20
+ return ((_b = (_a = props.product) == null ? void 0 : _a.variants) == null ? void 0 : _b[0]) || ((_c = props.variants) == null ? void 0 : _c[0]) || props.product;
20
21
  });
21
22
  return (_ctx, _cache) => {
23
+ var _a;
22
24
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
23
25
  vue.createElementVNode("span", {
24
- class: vue.normalizeClass([{
26
+ class: vue.normalizeClass({
25
27
  "h4": !__props.size,
26
28
  "p-medium t-semi": __props.size === "small",
27
29
  "h3 t-semi": __props.size === "big"
28
- }, "t-second"])
30
+ })
29
31
  }, vue.toDisplayString(_ctx.returnCurrency() + variant.value.price), 3),
30
32
  vue.createElementVNode("span", {
31
33
  class: vue.normalizeClass([{
@@ -33,7 +35,7 @@ const _sfc_main = {
33
35
  "p-small": __props.size === "small",
34
36
  "p-big": __props.size === "big"
35
37
  }, "p-small mn-l-micro t-transp"])
36
- }, vue.toDisplayString(__props.product.listing === "rent" ? "per day" : "for " + variant.value.quantity + variant.value.unit), 3),
38
+ }, vue.toDisplayString(((_a = __props.product) == null ? void 0 : _a.listing) === "rent" ? "per day" : "for " + variant.value.quantity + variant.value.unit), 3),
37
39
  variant.value.sale ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_2, vue.toDisplayString(_ctx.returnCurrency() + variant.value.price / 100 * (100 + variant.value.sale)), 1)) : vue.createCommentVNode("", true)
38
40
  ]);
39
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Price.vue.cjs","sources":["../../../../../../../src/modules/products/components/elements/Price.vue"],"sourcesContent":["<template>\n <div class=\"radius-small\">\n <span\n :class=\"{\n 'h4': !size,\n 'p-medium t-semi': size === 'small',\n 'h3 t-semi': size === 'big'\n }\"\n class=\"t-second\"\n >\n {{ returnCurrency() + variant.price }}\n </span>\n\n <span\n :class=\"{\n 'p-medium': !size,\n 'p-small': size === 'small',\n 'p-big': size === 'big'\n }\"\n class=\"p-small mn-l-micro t-transp\"\n >\n {{ product.listing === 'rent' ? 'per day' : 'for ' + variant.quantity + variant.unit }}\n </span>\n\n <p\n v-if=\"variant.sale\"\n class=\"pd-r-small t-transp p-medium line-through price\"\n >\n {{ returnCurrency() + ((variant.price / 100) * (100 + variant.sale)) }}\n </p>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\n\nconst props = defineProps({\n product: Object,\n size: String\n});\n\nconst variant = computed(() => {\n return props.product?.variants?.[0] || props.product;\n});\n</script>\n"],"names":["computed"],"mappings":";;;;;;;;;;;;;;;AAoCA,UAAM,QAAQ;AAKd,UAAM,UAAUA,IAAQ,SAAC,MAAM;;AAC7B,eAAO,iBAAM,YAAN,mBAAe,aAAf,mBAA0B,OAAM,MAAM;AAAA,IAC/C,CAAC;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Price.vue.cjs","sources":["../../../../../../../src/modules/products/components/elements/Price.vue"],"sourcesContent":["<template>\n <div class=\"radius-small\">\n <span\n :class=\"{\n 'h4': !size,\n 'p-medium t-semi': size === 'small',\n 'h3 t-semi': size === 'big'\n }\"\n >\n {{ returnCurrency() + variant.price }}\n </span>\n\n <span\n :class=\"{\n 'p-medium': !size,\n 'p-small': size === 'small',\n 'p-big': size === 'big'\n }\"\n class=\"p-small mn-l-micro t-transp\"\n >\n {{ product?.listing === 'rent' ? 'per day' : 'for ' + variant.quantity + variant.unit }}\n </span>\n\n <p\n v-if=\"variant.sale\"\n class=\"pd-r-small t-transp p-medium line-through price\"\n >\n {{ returnCurrency() + ((variant.price / 100) * (100 + variant.sale)) }}\n </p>\n </div>\n</template>\n\n<script setup>\nimport { computed } from 'vue';\n\nconst props = defineProps({\n product: Object,\n variants: Array,\n size: String\n});\n\nconst variant = computed(() => {\n return props.product?.variants?.[0] || props.variants?.[0] || props.product;\n});\n</script>\n"],"names":["computed"],"mappings":";;;;;;;;;;;;;;;;AAmCA,UAAM,QAAQ;AAMd,UAAM,UAAUA,IAAQ,SAAC,MAAM;;AAC7B,eAAO,iBAAM,YAAN,mBAAe,aAAf,mBAA0B,SAAM,WAAM,aAAN,mBAAiB,OAAM,MAAM;AAAA,IACtE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;"}