@ozdao/martyrs 0.2.483 → 0.2.485

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 (300) hide show
  1. package/dist/{Media-DjnpKS62.cjs → Media-ByPHBvAU.cjs} +1 -1
  2. package/dist/{Media-C57G7rnE.js → Media-DlUBwVWs.js} +1 -1
  3. package/dist/main-137vO86w.cjs +11 -0
  4. package/dist/{main-CXQqAVVb.js → main-CK6rC5Sz.js} +2944 -2599
  5. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  6. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  7. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  8. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  9. package/dist/martyrs/src/components/Chips/{Chips.vue.cjs → Chips.vue2.cjs} +2 -2
  10. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +1 -0
  11. package/dist/martyrs/src/components/Chips/{Chips.vue.js → Chips.vue2.js} +2 -2
  12. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +1 -0
  13. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +31 -11
  14. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  15. package/dist/martyrs/src/components/Feed/Feed.vue.js +48 -28
  16. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  17. package/dist/martyrs/src/components/Field/Field.vue.cjs +13 -7
  18. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
  19. package/dist/martyrs/src/components/Field/Field.vue.js +14 -8
  20. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  21. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs → Popup.vue2.cjs} +2 -2
  22. package/dist/martyrs/src/components/Popup/Popup.vue2.cjs.map +1 -0
  23. package/dist/martyrs/src/components/Popup/{Popup.vue.js → Popup.vue2.js} +2 -2
  24. package/dist/martyrs/src/components/Popup/{Popup.vue.cjs.map → Popup.vue2.js.map} +1 -1
  25. package/dist/martyrs/src/components/Slider/Slider.vue.cjs +21 -24
  26. package/dist/martyrs/src/components/Slider/Slider.vue.cjs.map +1 -1
  27. package/dist/martyrs/src/components/Slider/Slider.vue.js +21 -24
  28. package/dist/martyrs/src/components/Slider/Slider.vue.js.map +1 -1
  29. package/dist/martyrs/src/modules/auth/auth.client.cjs +3 -0
  30. package/dist/martyrs/src/modules/auth/auth.client.cjs.map +1 -1
  31. package/dist/martyrs/src/modules/auth/auth.client.js +3 -0
  32. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  33. package/dist/martyrs/src/modules/auth/locales/en.cjs +79 -0
  34. package/dist/martyrs/src/modules/auth/locales/en.cjs.map +1 -0
  35. package/dist/martyrs/src/modules/auth/locales/en.js +79 -0
  36. package/dist/martyrs/src/modules/auth/locales/en.js.map +1 -0
  37. package/dist/martyrs/src/modules/auth/locales/index.cjs +10 -0
  38. package/dist/martyrs/src/modules/auth/locales/index.cjs.map +1 -0
  39. package/dist/martyrs/src/modules/auth/locales/index.js +10 -0
  40. package/dist/martyrs/src/modules/auth/locales/index.js.map +1 -0
  41. package/dist/martyrs/src/modules/auth/locales/ru.cjs +79 -0
  42. package/dist/martyrs/src/modules/auth/locales/ru.cjs.map +1 -0
  43. package/dist/martyrs/src/modules/auth/locales/ru.js +79 -0
  44. package/dist/martyrs/src/modules/auth/locales/ru.js.map +1 -0
  45. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -10
  46. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs.map +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +3 -12
  48. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js.map +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs +4 -6
  50. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.cjs.map +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js +4 -6
  52. package/dist/martyrs/src/modules/auth/views/components/pages/EnterCode.vue.js.map +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +7 -9
  54. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs.map +1 -1
  55. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +7 -9
  56. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js.map +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  59. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
  61. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
  63. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  64. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  65. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  66. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  67. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +11 -13
  68. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +11 -13
  70. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +12 -14
  72. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +12 -14
  74. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  75. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +11 -13
  76. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs.map +1 -1
  77. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +11 -13
  78. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  79. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  81. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +21 -58
  82. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs.map +1 -1
  83. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +21 -58
  84. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
  85. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  87. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +3 -3
  88. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +3 -3
  89. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  90. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  91. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  93. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  95. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  97. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  98. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  99. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  100. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  101. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  103. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +1 -1
  105. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  107. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  108. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  109. package/dist/martyrs/src/modules/globals/globals.client.cjs +1 -0
  110. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  111. package/dist/martyrs/src/modules/globals/globals.client.js +1 -0
  112. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  113. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/globals/views/components/blocks/AlertDialog.vue.js +1 -1
  115. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  117. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +2 -2
  118. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +2 -2
  119. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +2 -2
  120. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +2 -2
  121. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
  122. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
  123. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  125. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  127. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +183 -0
  128. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
  129. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +183 -0
  130. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -0
  131. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.cjs +67 -0
  132. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.cjs.map +1 -0
  133. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.js +67 -0
  134. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterOptions.vue.js.map +1 -0
  135. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.cjs +91 -0
  136. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.cjs.map +1 -0
  137. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.js +91 -0
  138. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterPrice.vue.js.map +1 -0
  139. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterRange.vue2.cjs +64 -0
  140. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterRange.vue2.cjs.map +1 -0
  141. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterRange.vue2.js +64 -0
  142. package/dist/martyrs/src/modules/globals/views/components/sections/filters/FilterRange.vue2.js.map +1 -0
  143. package/dist/martyrs/src/modules/icons/actions/IconShow.vue.cjs +49 -0
  144. package/dist/martyrs/src/modules/icons/actions/IconShow.vue.cjs.map +1 -0
  145. package/dist/martyrs/src/modules/icons/actions/IconShow.vue.js +49 -0
  146. package/dist/martyrs/src/modules/icons/actions/IconShow.vue.js.map +1 -0
  147. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs +34 -0
  148. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.cjs.map +1 -0
  149. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js +34 -0
  150. package/dist/martyrs/src/modules/icons/navigation/IconHeart.vue.js.map +1 -0
  151. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +115 -122
  152. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  153. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +163 -170
  154. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.cjs +1 -1
  156. package/dist/martyrs/src/modules/notifications/components/elements/NotificationBadge.vue.js +1 -1
  157. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
  158. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  159. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  161. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  162. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  163. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  165. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -0
  166. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  167. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -0
  168. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  169. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  170. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  171. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  172. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  173. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  174. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  175. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  176. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  177. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  178. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  179. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
  180. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
  181. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  182. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  183. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  184. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  185. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  186. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  187. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  188. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  189. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  190. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  191. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
  192. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  193. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  195. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +1 -1
  197. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  199. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +4 -1
  200. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  201. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +4 -1
  202. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  203. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.cjs +2 -2
  204. package/dist/martyrs/src/modules/products/components/pages/LeftoverEdit.vue.js +2 -2
  205. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  206. package/dist/martyrs/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  207. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +2 -2
  208. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
  209. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  210. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  211. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +2 -2
  212. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +2 -2
  213. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
  214. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  215. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.cjs +1 -1
  216. package/dist/martyrs/src/modules/products/components/sections/EditIngredients.vue.js +1 -1
  217. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +1 -1
  218. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +1 -1
  219. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
  220. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  221. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  222. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  223. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
  224. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  225. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  226. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  227. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.cjs +1 -1
  228. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +1 -1
  229. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  230. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  231. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  232. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  233. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  234. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  235. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  236. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  237. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
  238. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  239. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  240. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  241. package/dist/martyrs.cjs.js +1 -1
  242. package/dist/martyrs.css +1 -1
  243. package/dist/martyrs.es.js +1 -1
  244. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
  245. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  246. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
  247. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  248. package/dist/style.css +138 -75
  249. package/package.json +1 -1
  250. package/src/components/Feed/Feed.vue +23 -0
  251. package/src/components/Field/Field.vue +42 -27
  252. package/src/components/Slider/Slider.vue +15 -17
  253. package/src/modules/auth/auth.client.js +7 -0
  254. package/src/modules/auth/locales/en.js +76 -0
  255. package/src/modules/auth/locales/index.js +7 -0
  256. package/src/modules/auth/locales/ru.js +76 -0
  257. package/src/modules/auth/views/components/layouts/Auth.vue +3 -45
  258. package/src/modules/auth/views/components/pages/EnterCode.vue +5 -7
  259. package/src/modules/auth/views/components/pages/EnterPassword.vue +7 -10
  260. package/src/modules/auth/views/components/pages/ResetPassword.vue +9 -12
  261. package/src/modules/auth/views/components/pages/SignIn.vue +12 -15
  262. package/src/modules/auth/views/components/pages/SignUp.vue +9 -12
  263. package/src/modules/auth/views/components/sections/SliderFeatures.vue +28 -53
  264. package/src/modules/globals/globals.client.js +1 -0
  265. package/src/modules/globals/views/components/sections/Filters.vue +198 -0
  266. package/src/modules/globals/views/components/sections/filters/FilterOptions.vue +65 -0
  267. package/src/modules/globals/views/components/sections/filters/FilterPrice.vue +81 -0
  268. package/src/modules/globals/views/components/sections/filters/FilterRange.vue +74 -0
  269. package/src/modules/icons/actions/IconShow.vue +23 -0
  270. package/src/modules/icons/pages/IconsPage.vue +114 -120
  271. package/dist/main-De5X_RUk.cjs +0 -11
  272. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  273. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +0 -1
  274. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +0 -1
  275. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +0 -1
  276. package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.cjs +0 -9
  277. package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.cjs.map +0 -1
  278. package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.js +0 -9
  279. package/dist/martyrs/src/modules/auth/views/localization/EnterCode.json.js.map +0 -1
  280. package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.cjs +0 -9
  281. package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.cjs.map +0 -1
  282. package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.js +0 -9
  283. package/dist/martyrs/src/modules/auth/views/localization/EnterPassword.json.js.map +0 -1
  284. package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.cjs +0 -9
  285. package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.cjs.map +0 -1
  286. package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.js +0 -9
  287. package/dist/martyrs/src/modules/auth/views/localization/ResetPassword.json.js.map +0 -1
  288. package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.cjs +0 -9
  289. package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.cjs.map +0 -1
  290. package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.js +0 -9
  291. package/dist/martyrs/src/modules/auth/views/localization/SignIn.json.js.map +0 -1
  292. package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.cjs +0 -9
  293. package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.cjs.map +0 -1
  294. package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.js +0 -9
  295. package/dist/martyrs/src/modules/auth/views/localization/SignUp.json.js.map +0 -1
  296. package/src/modules/auth/views/localization/EnterCode.json +0 -16
  297. package/src/modules/auth/views/localization/EnterPassword.json +0 -22
  298. package/src/modules/auth/views/localization/ResetPassword.json +0 -26
  299. package/src/modules/auth/views/localization/SignIn.json +0 -34
  300. package/src/modules/auth/views/localization/SignUp.json +0 -28
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const Loader = require("../Loader/Loader.vue2.cjs");
5
- ;/* empty css */
5
+ ;/* empty css */
6
6
  const _hoisted_1 = ["disabled"];
7
7
  const _hoisted_2 = {
8
8
  key: 2,
@@ -128,4 +128,4 @@ const _sfc_main = {
128
128
  }
129
129
  };
130
130
  exports.default = _sfc_main;
131
- //# sourceMappingURL=Button.vue.cjs.map
131
+ //# sourceMappingURL=Button.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.vue2.cjs","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t\t\tconsole.log('click')\n\t\t\t\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n if (button.value) {\n // button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n }\n\t };\n\n\t try {\n await props.submit();\n\n button.value.classList.replace('bg-main', 'bg-second');\n\n loading.value = false;\n\n // Используем функцию сброса состояния кнопки здесь.\n if (props.showSucces) { \n\t\t\t\t\tfinished.value = true;\n setTimeout(resetButton, 500);\n } else {\n resetButton();\n }\n\n // Если есть callback, мы также установим таймер для его вызова.\n if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n \t\temits('error',err)\n // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n button.value.classList.replace('bg-main', 'bg-fourth-nano');\n error.value = props.error;\n \n // После задержки снова сбрасываем состояние кнопки.\n setTimeout(() => {\n resetButton();\n // Так как класс кнопки был изменен, вернем его в исходное состояние.\n button.value.classList.replace('bg-fourth-nano', 'bg-main');\n }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<template v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></template>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<template v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></template>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi t-center w-100 loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"t-center w-100 error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<div v-if=\"counter\" class=\"button-counter flex-center\"><span>{{counter}}</span></div> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\tbutton[disabled] {\n\t\topacity: 0.75 !important;\n\t \tpointer-events: none !important;\n\t \tcursor: default !important;\n\t \tcolor: rgba(var(--dark), 0.33) !important;\n\t\tbackground: rgba(var(--light), 1) !important; \n\t}\n\n\ta.button {\n\t\t\ttext-box: trim-both cap alphabetic;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\n\t\tpadding: 0.5rem;\n\t\tborder-radius: 3rem;\n\t\ttext-box: trim-both cap alphabetic;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAwCd,UAAM,QAAQ;AAEd,UAAM,SAASA,IAAG,IAAC,IAAI;AACvB,UAAM,QAAQA,IAAG,IAAC,IAAI;AACtB,UAAM,UAAUA,IAAG,IAAC,KAAK;AACzB,UAAM,WAAWA,IAAG,IAAC,KAAK;AAE1B,mBAAe,SAAS;AACtB,cAAQ,IAAI,OAAO;AAEjB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACvB,YAAI,OAAO,OAAO;AAEhB,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QACxB;AAAA,MACM;AAED,UAAI;AACD,cAAM,MAAM,OAAQ;AAEpB,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACzB,mBAAS,QAAQ;AACZ,qBAAW,aAAa,GAAG;AAAA,QACrC,OAAe;AACL,sBAAa;AAAA,QACvB;AAGQ,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE5E,SAAQ,KAAK;AACb,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACf,sBAAa;AAEb,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC3D,GAAE,IAAI;AAAA,MACf;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { ref, createElementBlock, openBlock, withModifiers, createVNode, createCommentVNode, Transition, withCtx, renderSlot, createBlock, toDisplayString, createElementVNode } from "vue";
2
2
  import Loader from "../Loader/Loader.vue2.js";
3
- /* empty css */
3
+ /* empty css */
4
4
  const _hoisted_1 = ["disabled"];
5
5
  const _hoisted_2 = {
6
6
  key: 2,
@@ -128,4 +128,4 @@ const _sfc_main = {
128
128
  export {
129
129
  _sfc_main as default
130
130
  };
131
- //# sourceMappingURL=Button.vue.js.map
131
+ //# sourceMappingURL=Button.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.vue.cjs","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t\t\tconsole.log('click')\n\t\t\t\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n if (button.value) {\n // button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n }\n\t };\n\n\t try {\n await props.submit();\n\n button.value.classList.replace('bg-main', 'bg-second');\n\n loading.value = false;\n\n // Используем функцию сброса состояния кнопки здесь.\n if (props.showSucces) { \n\t\t\t\t\tfinished.value = true;\n setTimeout(resetButton, 500);\n } else {\n resetButton();\n }\n\n // Если есть callback, мы также установим таймер для его вызова.\n if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n \t\temits('error',err)\n // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n button.value.classList.replace('bg-main', 'bg-fourth-nano');\n error.value = props.error;\n \n // После задержки снова сбрасываем состояние кнопки.\n setTimeout(() => {\n resetButton();\n // Так как класс кнопки был изменен, вернем его в исходное состояние.\n button.value.classList.replace('bg-fourth-nano', 'bg-main');\n }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<template v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></template>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<template v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></template>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi t-center w-100 loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"t-center w-100 error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<div v-if=\"counter\" class=\"button-counter flex-center\"><span>{{counter}}</span></div> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\tbutton[disabled] {\n\t\topacity: 0.75 !important;\n\t \tpointer-events: none !important;\n\t \tcursor: default !important;\n\t \tcolor: rgba(var(--dark), 0.33) !important;\n\t\tbackground: rgba(var(--light), 1) !important; \n\t}\n\n\ta.button {\n\t\t\ttext-box: trim-both cap alphabetic;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\n\t\tpadding: 0.5rem;\n\t\tborder-radius: 3rem;\n\t\ttext-box: trim-both cap alphabetic;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAwCd,UAAM,QAAQ;AAEd,UAAM,SAASA,IAAG,IAAC,IAAI;AACvB,UAAM,QAAQA,IAAG,IAAC,IAAI;AACtB,UAAM,UAAUA,IAAG,IAAC,KAAK;AACzB,UAAM,WAAWA,IAAG,IAAC,KAAK;AAE1B,mBAAe,SAAS;AACtB,cAAQ,IAAI,OAAO;AAEjB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACvB,YAAI,OAAO,OAAO;AAEhB,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QACxB;AAAA,MACM;AAED,UAAI;AACD,cAAM,MAAM,OAAQ;AAEpB,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACzB,mBAAS,QAAQ;AACZ,qBAAW,aAAa,GAAG;AAAA,QACrC,OAAe;AACL,sBAAa;AAAA,QACvB;AAGQ,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE5E,SAAQ,KAAK;AACb,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACf,sBAAa;AAEb,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC3D,GAAE,IAAI;AAAA,MACf;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.vue2.js","sources":["../../../../../src/components/Button/Button.vue"],"sourcesContent":["<script setup>\n\timport { ref } from 'vue'\n\n\timport Loader from '@martyrs/src/components/Loader/Loader.vue'\n\n\tconst props = defineProps({\n\t\tsubmit: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button click.') }\n\t\t},\n\t\ttext: {\n\t\t\ttype: Object,\n\t\t\tdefault: (textComponent) => {\n\t\t\t\treturn textComponent = {\n\t\t\t\t\t...textComponent.text,\n\t\t\t\t\tsuccess: '✔',\n\t\t\t\t\terror: '✖'\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tcounter: {\n\t type: Object\n\t },\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\tdefault: async () => { console.log('Button callback.') }\n\t\t},\n\t\tcallbackDelay: {\n\t\t\ttype: Number,\n\t\t\tdefault: 750\n\t\t},\n\t\tshowSucces: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tshowLoader: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true\n\t\t},\n\t\tvalidation: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t},\n\t})\t\n\n\tconst emits = defineEmits(['error'])\n\n\tconst button = ref(null);\n\tconst error = ref(null);\n\tconst loading = ref(false);\n\tconst finished = ref(false);\n\n\tasync function Submit() {\n\t\t\tconsole.log('click')\n\t\t\t\n\t button.value.style['pointer-events'] = 'none';\n\t error.value = null;\n\t loading.value = true;\n\n\t // Функция для сброса состояния кнопки.\n\t const resetButton = () => {\n if (button.value) {\n // button.value.classList.replace('bg-second', 'bg-main');\n button.value.style.pointerEvents = 'auto';\n loading.value = false;\n finished.value = false;\n error.value = null;\n }\n\t };\n\n\t try {\n await props.submit();\n\n button.value.classList.replace('bg-main', 'bg-second');\n\n loading.value = false;\n\n // Используем функцию сброса состояния кнопки здесь.\n if (props.showSucces) { \n\t\t\t\t\tfinished.value = true;\n setTimeout(resetButton, 500);\n } else {\n resetButton();\n }\n\n // Если есть callback, мы также установим таймер для его вызова.\n if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);\n\n\t } catch (err) {\n \t\temits('error',err)\n // Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.\n button.value.classList.replace('bg-main', 'bg-fourth-nano');\n error.value = props.error;\n \n // После задержки снова сбрасываем состояние кнопки.\n setTimeout(() => {\n resetButton();\n // Так как класс кнопки был изменен, вернем его в исходное состояние.\n button.value.classList.replace('bg-fourth-nano', 'bg-main');\n }, 1330);\n\t }\n\t}\n\n</script>\n\n<template>\n\t<button @click.stop=\"Submit\" :disabled=\"validation\" ref=\"button\" class=\"button\">\n\t\t<transition name=\"FromTop\" >\n\t\t\t<!-- Slot -->\n\t\t\t<template v-if=\"!loading && !error && !finished || !showLoader\"><slot></slot></template>\n\t\t\t<!-- Loading Circle Animation -->\n\t\t\t<template v-else-if=\"loading && !error && showLoader\"><Loader class=\"pos-relative pos-t-0 pos-l-0 loading\"/></template>\n\t\t\t<!-- <Loader v-else-if=\"loading && !error && showLoader\"/> -->\n\t\t\t<!-- Success -->\n\t\t\t<span v-else-if=\"finished && showSucces\" class=\"t-semi t-center w-100 loading t-black\">{{text.success}}</span>\n\t\t\t<!-- Error if not finished -->\n\t\t\t<span v-else-if=\"error\" class=\"t-center w-100 error\">{{ error }}</span>\n\t\t</transition>\n\t\t<!-- Counter -->\n\t\t<div v-if=\"counter\" class=\"button-counter flex-center\"><span>{{counter}}</span></div> \n\n\t</button> \n</template>\n\n\n<style lang=\"scss\">\n\t.FromTop-enter-active,\n\t.FromTop-leave-active {\n\t\ttransform: translateY(0);\n\t\topacity: 1;\n\t\ttransition: all 0.5s ease; \n\t\t\n\t}\n\t.FromTop-enter-from,\n\t.FromTop-leave-to {\n\t\tposition: absolute;\n\t\ttransform: translateY(-1rem);\n\t\topacity: 0;\n\t\ttransition: all 0.5s ease;\n\t}\n\n\tbutton[disabled] {\n\t\topacity: 0.75 !important;\n\t \tpointer-events: none !important;\n\t \tcursor: default !important;\n\t \tcolor: rgba(var(--dark), 0.33) !important;\n\t\tbackground: rgba(var(--light), 1) !important; \n\t}\n\n\ta.button {\n\t\t\ttext-box: trim-both cap alphabetic;\n\t}\n\n\t.button {\n\t\tdisplay: flex;\n\n\t\tpadding: 0.5rem;\n\t\tborder-radius: 3rem;\n\t\ttext-box: trim-both cap alphabetic;\n\n\t\ttransform: scale(1);\n\t\topacity: 1;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\t\n\t\tcolor: black;\n\t\ttext-align: center;\n\t\ttext-transform: uppercase;\n\t\tfont-size: 1rem;\n\t\tletter-spacing: 5%;\n\n\t\ttransition: all 0.33s ease;\n\t \n\t\t&:hover {\n\t\t\tcursor: pointer;\n\t\t\topacity: 0.9;\n\t\t}\n\n\t\t&:active {\n\t\t\ttransform: scale(0.95);\n\t\t}\n\n\t\t&-small {\n\t\t\tpadding: 0.75rem;\n\t\t\tborder-radius: 0.5rem;\n\t\t\theight: fit-content;\n\t\t}\n\n\t\t.button-counter {\n\t\t\tposition: absolute;\n\t\t\tright: -8px;\n\t bottom: -8px;\n\t background: yellow;\n\t height: 16px;\n\t border-radius: 16px;\n\t width: 16px;\n\t font-weight: 500;\n\t text-align: center;\n\t line-height: 16px;\n\t font-size: 10px;\n\t\t}\n\t}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,UAAM,QAAQ;AAwCd,UAAM,QAAQ;AAEd,UAAM,SAAS,IAAI,IAAI;AACvB,UAAM,QAAQ,IAAI,IAAI;AACtB,UAAM,UAAU,IAAI,KAAK;AACzB,UAAM,WAAW,IAAI,KAAK;AAE1B,mBAAe,SAAS;AACtB,cAAQ,IAAI,OAAO;AAEjB,aAAO,MAAM,MAAM,gBAAgB,IAAI;AACvC,YAAM,QAAQ;AACd,cAAQ,QAAQ;AAGhB,YAAM,cAAc,MAAM;AACvB,YAAI,OAAO,OAAO;AAEhB,iBAAO,MAAM,MAAM,gBAAgB;AACnC,kBAAQ,QAAQ;AAChB,mBAAS,QAAQ;AACjB,gBAAM,QAAQ;AAAA,QACxB;AAAA,MACM;AAED,UAAI;AACD,cAAM,MAAM,OAAQ;AAEpB,eAAO,MAAM,UAAU,QAAQ,WAAW,WAAW;AAErD,gBAAQ,QAAQ;AAGhB,YAAI,MAAM,YAAY;AACzB,mBAAS,QAAQ;AACZ,qBAAW,aAAa,GAAG;AAAA,QACrC,OAAe;AACL,sBAAa;AAAA,QACvB;AAGQ,YAAI,MAAM,SAAU,YAAW,MAAM,MAAM,SAAU,GAAE,MAAM,aAAa;AAAA,MAE5E,SAAQ,KAAK;AACb,cAAM,SAAQ,GAAG;AAEf,eAAO,MAAM,UAAU,QAAQ,WAAW,gBAAgB;AAC1D,cAAM,QAAQ,MAAM;AAGpB,mBAAW,MAAM;AACf,sBAAa;AAEb,iBAAO,MAAM,UAAU,QAAQ,kBAAkB,SAAS;AAAA,QAC3D,GAAE,IAAI;AAAA,MACf;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- ;/* empty css */
4
+ ;/* empty css */
5
5
  const _hoisted_1 = { class: "font-main" };
6
6
  const _hoisted_2 = {
7
7
  key: 1,
@@ -27,4 +27,4 @@ const _sfc_main = {
27
27
  }
28
28
  };
29
29
  exports.default = _sfc_main;
30
- //# sourceMappingURL=Chips.vue.cjs.map
30
+ //# sourceMappingURL=Chips.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chips.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock, openBlock, renderSlot, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
2
- /* empty css */
2
+ /* empty css */
3
3
  const _hoisted_1 = { class: "font-main" };
4
4
  const _hoisted_2 = {
5
5
  key: 1,
@@ -27,4 +27,4 @@ const _sfc_main = {
27
27
  export {
28
28
  _sfc_main as default
29
29
  };
30
- //# sourceMappingURL=Chips.vue.js.map
30
+ //# sourceMappingURL=Chips.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chips.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -10,6 +10,7 @@ const BottomSheet = require("../BottomSheet/BottomSheet.vue.cjs");
10
10
  const BlockSearch = require("../../modules/globals/views/components/blocks/BlockSearch.vue.cjs");
11
11
  const BlockSorting = require("../../modules/globals/views/components/blocks/BlockSorting.vue.cjs");
12
12
  const BlockFilter = require("../../modules/globals/views/components/blocks/BlockFilter.vue.cjs");
13
+ const Filters = require("../../modules/globals/views/components/sections/Filters.vue2.cjs");
13
14
  const ButtonSort = require("../../modules/globals/views/components/elements/ButtonSort.vue.cjs");
14
15
  const ButtonDate = require("../../modules/globals/views/components/elements/ButtonDate.vue.cjs");
15
16
  const IconFilter = require("../../modules/icons/navigation/IconFilter.vue.cjs");
@@ -108,6 +109,18 @@ const _sfc_main = {
108
109
  const filter = vue.useModel(__props, "filter");
109
110
  const date = vue.useModel(__props, "date");
110
111
  const items = vue.useModel(__props, "items");
112
+ const filterConfig = vue.computed(() => {
113
+ var _a;
114
+ if (!((_a = filter.value) == null ? void 0 : _a.options)) return [];
115
+ return filter.value.options.map((opt) => ({
116
+ key: opt.value,
117
+ title: opt.title,
118
+ type: "options",
119
+ // или другой тип в зависимости от данных
120
+ options: opt.options || [],
121
+ defaultValue: null
122
+ }));
123
+ });
111
124
  const props = __props;
112
125
  const itemsList = vue.shallowRef(items.value || []);
113
126
  const hasMoreItems = vue.ref(false);
@@ -260,8 +273,15 @@ const _sfc_main = {
260
273
  onSearch: updateSearch,
261
274
  autofocus: search.value.autofocus
262
275
  }, null, 8, ["placeholder", "class", "autofocus"])) : vue.createCommentVNode("", true),
263
- date.value ? (vue.openBlock(), vue.createBlock(Dropdown.default, {
276
+ filter.value ? (vue.openBlock(), vue.createBlock(Filters.default, {
264
277
  key: 1,
278
+ modelValue: filter.value.selected,
279
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.selected = $event),
280
+ filters: filterConfig.value,
281
+ class: vue.normalizeClass(filter.value.class || "mobile-only")
282
+ }, null, 8, ["modelValue", "filters", "class"])) : vue.createCommentVNode("", true),
283
+ date.value ? (vue.openBlock(), vue.createBlock(Dropdown.default, {
284
+ key: 2,
265
285
  label: {
266
286
  component: ButtonDate.default,
267
287
  props: { date: date.value }
@@ -272,7 +292,7 @@ const _sfc_main = {
272
292
  default: vue.withCtx(() => [
273
293
  vue.createVNode(Calendar.default, {
274
294
  date: date.value,
275
- "onUpdate:date": _cache[0] || (_cache[0] = ($event) => date.value = $event),
295
+ "onUpdate:date": _cache[1] || (_cache[1] = ($event) => date.value = $event),
276
296
  locale: _ctx.$i18n.locale,
277
297
  allowRange: true,
278
298
  class: "radius-medium w-100 o-hidden bg-light"
@@ -280,18 +300,18 @@ const _sfc_main = {
280
300
  ]),
281
301
  _: 1
282
302
  }, 8, ["label", "class", "align"])) : vue.createCommentVNode("", true),
283
- filter.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
303
+ filter.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 3 }, [
284
304
  vue.createElementVNode("div", {
285
305
  class: vue.normalizeClass([filter.value.class || "bg-light", "flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100"])
286
306
  }, [
287
307
  vue.createVNode(IconFilter.default, {
288
- onClick: _cache[1] || (_cache[1] = () => filter.value.active = !filter.value.active),
308
+ onClick: _cache[2] || (_cache[2] = () => filter.value.active = !filter.value.active),
289
309
  class: "w-1r h-auto"
290
310
  })
291
311
  ], 2),
292
312
  vue.createVNode(BottomSheet.default, {
293
313
  show: filter.value.active,
294
- onToggle: _cache[4] || (_cache[4] = () => filter.value.active = false),
314
+ onToggle: _cache[5] || (_cache[5] = () => filter.value.active = false),
295
315
  class: vue.normalizeClass(["z-index-10 pos-fixed pos-r-0", {
296
316
  "pos-t-0": filter.value.active,
297
317
  "pos-t-100": !filter.value.active
@@ -300,9 +320,9 @@ const _sfc_main = {
300
320
  default: vue.withCtx(() => [
301
321
  vue.createVNode(BlockFilter.default, {
302
322
  filter: filter.value,
303
- "onUpdate:filter": _cache[2] || (_cache[2] = ($event) => filter.value = $event),
323
+ "onUpdate:filter": _cache[3] || (_cache[3] = ($event) => filter.value = $event),
304
324
  options: filter.value.options,
305
- onClick_filter: _cache[3] || (_cache[3] = () => {
325
+ onClick_filter: _cache[4] || (_cache[4] = () => {
306
326
  filter.value.active = false;
307
327
  }),
308
328
  class: "h-max w-100 pd-small pd-b-5r bg-light"
@@ -312,7 +332,7 @@ const _sfc_main = {
312
332
  }, 8, ["show", "class"])
313
333
  ], 64)) : vue.createCommentVNode("", true),
314
334
  sort.value && !sort.value.hideButton ? (vue.openBlock(), vue.createBlock(Dropdown.default, {
315
- key: 3,
335
+ key: 4,
316
336
  label: {
317
337
  component: ButtonSort.default,
318
338
  props: { order: sort.value.order },
@@ -324,16 +344,16 @@ const _sfc_main = {
324
344
  default: vue.withCtx(() => [
325
345
  vue.createVNode(BlockSorting.default, {
326
346
  param: sort.value.param,
327
- "onUpdate:param": _cache[5] || (_cache[5] = ($event) => sort.value.param = $event),
347
+ "onUpdate:param": _cache[6] || (_cache[6] = ($event) => sort.value.param = $event),
328
348
  order: sort.value.order,
329
- "onUpdate:order": _cache[6] || (_cache[6] = ($event) => sort.value.order = $event),
349
+ "onUpdate:order": _cache[7] || (_cache[7] = ($event) => sort.value.order = $event),
330
350
  options: sort.value.options,
331
351
  class: "h-100 pd-small radius-medium t-white bg-black"
332
352
  }, null, 8, ["param", "order", "options"])
333
353
  ]),
334
354
  _: 1
335
355
  }, 8, ["label", "class", "align"])) : vue.createCommentVNode("", true),
336
- __props.actions.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 4 }, vue.renderList(__props.actions, (action) => {
356
+ __props.actions.length ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 5 }, vue.renderList(__props.actions, (action) => {
337
357
  return vue.openBlock(), vue.createElementBlock("div", {
338
358
  key: action.key,
339
359
  class: vue.normalizeClass([action.class || "bg-light", "flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100"])
@@ -1 +1 @@
1
- {"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin z-index-10 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n @click_filter=\"() => { filter.active = false } \"\n class=\"h-max w-100 pd-small pd-b-5r bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\n// Флаг для определения поискового запроса\nlet isSearching = ref(false);\n\n// Счетчик для отслеживания актуальности запросов\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n // Устанавливаем флаг поиска\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\n// Вспомогательная функция для удаления null/undefined значений\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n // Увеличиваем счетчик запросов\n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n // Устанавливаем isLoadingExtra только для актуального запроса\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n // Увеличиваем счетчик при каждом новом запросе\n const currentRequestId = ++requestId;\n \n // Очищаем список только при поиске\n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false; // Сбрасываем флаг после использования\n }\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n // Если нет - игнорируем результат\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n // Устанавливаем isLoading только для актуального запроса\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: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,YAAU,mCAAS,WAC5B,mCAAS,YAAU,mCAAS,UAC5B,KAAK,UAAU,UAAU,MAAM,KAAK,UAAU,UAAU,GACxD;AACA,sBAAY,QAAQ;AACpB,qBAAY;AAAA,QAClB;AAAA,MACG;AAAA,MACD,EAAE,MAAM,KAAI;AAAA,IACd;AAEA,QAAI,WAAW;AAEfC,QAAAA,UAAU,YAAY;AACpB,YAAM,WAAU;AAEhB,UAAI,OAAO,WAAW,eAAe,CAAC,MAAM,gBAAgB,MAAM,UAAU;AAC1E,mBAAW,IAAI,qBAAqB,aAAW;AAC7C,cAAI,QAAQ,KAAK,WAAS,MAAM,cAAc,GAAG;AAC/C,0BAAa;AAAA,UACrB;AAAA,QACK,CAAA;AAED,YAAI,SAAS,MAAO,UAAS,QAAQ,SAAS,KAAK;AAAA,MACvD;AAAA,IACA,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAY;AAAA,MACzB;AAAA,IACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Feed.vue.cjs","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin z-index-10 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <FiltersBar\n v-if=\"filter\"\n v-model=\"filter.selected\"\n :filters=\"filterConfig\"\n :class=\"filter.class || 'mobile-only'\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n @click_filter=\"() => { filter.active = false } \"\n class=\"h-max w-100 pd-small pd-b-5r bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport FiltersBar from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\nconst filterConfig = computed(() => {\n if (!filter.value?.options) return []\n \n // Преобразуем старый формат в новый\n return filter.value.options.map(opt => ({\n key: opt.value,\n title: opt.title,\n type: 'options', // или другой тип в зависимости от данных\n options: opt.options || [],\n defaultValue: null\n }))\n})\n\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\n// Флаг для определения поискового запроса\nlet isSearching = ref(false);\n\n// Счетчик для отслеживания актуальности запросов\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n // Устанавливаем флаг поиска\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\n// Вспомогательная функция для удаления null/undefined значений\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n // Увеличиваем счетчик запросов\n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n // Устанавливаем isLoadingExtra только для актуального запроса\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n // Увеличиваем счетчик при каждом новом запросе\n const currentRequestId = ++requestId;\n \n // Очищаем список только при поиске\n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false; // Сбрасываем флаг после использования\n }\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n // Если нет - игнорируем результат\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n // Устанавливаем isLoading только для актуального запроса\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","computed","shallowRef","ref","search","watch","onMounted","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqMA,UAAM,SAASA,IAAAA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,IAAAA,SAAY,SAAA,MAAM;AAC/B,UAAM,SAASA,IAAAA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,IAAAA,SAAY,SAAA,MAAM;AAC/B,UAAM,QAAQA,IAAAA,SAAY,SAAA,OAAO;AAEjC,UAAM,eAAeC,IAAQ,SAAC,MAAM;;AAClC,UAAI,GAAC,YAAO,UAAP,mBAAc,SAAS,QAAO,CAAA;AAGnC,aAAO,OAAO,MAAM,QAAQ,IAAI,UAAQ;AAAA,QACtC,KAAK,IAAI;AAAA,QACT,OAAO,IAAI;AAAA,QACX,MAAM;AAAA;AAAA,QACN,SAAS,IAAI,WAAW,CAAE;AAAA,QAC1B,cAAc;AAAA,MAClB,EAAI;AAAA,IACJ,CAAC;AAID,UAAM,QAAQ;AAmEd,UAAM,YAAYC,IAAU,WAAC,MA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S,QAAQ,SAAS,KAAK;AAAA,MACvD;AAAA,IACA,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAY;AAAA,MACzB;AAAA,IACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +1,17 @@
1
- import { mergeModels, useModel, shallowRef, ref, watch, onMounted, onUnmounted, createElementBlock, openBlock, Fragment, createCommentVNode, createBlock, normalizeClass, withCtx, createVNode, createElementVNode, renderList, resolveDynamicComponent, unref, TransitionGroup, renderSlot } from "vue";
1
+ import { mergeModels, useModel, computed, shallowRef, ref, watch, onMounted, onUnmounted, createElementBlock, openBlock, Fragment, createCommentVNode, createBlock, normalizeClass, withCtx, createVNode, createElementVNode, renderList, resolveDynamicComponent, unref, TransitionGroup, renderSlot } from "vue";
2
2
  import Loader from "../Loader/Loader.vue2.js";
3
3
  import Skeleton from "../Skeleton/Skeleton.vue.js";
4
- import _sfc_main$9 from "../EmptyState/EmptyState.vue.js";
5
- import _sfc_main$2 from "../Dropdown/Dropdown.vue.js";
4
+ import _sfc_main$a from "../EmptyState/EmptyState.vue.js";
5
+ import _sfc_main$3 from "../Dropdown/Dropdown.vue.js";
6
6
  import Calendar from "../DatePicker/Calendar.vue.js";
7
- import _sfc_main$5 from "../BottomSheet/BottomSheet.vue.js";
7
+ import _sfc_main$6 from "../BottomSheet/BottomSheet.vue.js";
8
8
  import _sfc_main$1 from "../../modules/globals/views/components/blocks/BlockSearch.vue.js";
9
- import _sfc_main$8 from "../../modules/globals/views/components/blocks/BlockSorting.vue.js";
10
- import _sfc_main$6 from "../../modules/globals/views/components/blocks/BlockFilter.vue.js";
11
- import _sfc_main$7 from "../../modules/globals/views/components/elements/ButtonSort.vue.js";
12
- import _sfc_main$3 from "../../modules/globals/views/components/elements/ButtonDate.vue.js";
13
- import _sfc_main$4 from "../../modules/icons/navigation/IconFilter.vue.js";
9
+ import _sfc_main$9 from "../../modules/globals/views/components/blocks/BlockSorting.vue.js";
10
+ import _sfc_main$7 from "../../modules/globals/views/components/blocks/BlockFilter.vue.js";
11
+ import _sfc_main$2 from "../../modules/globals/views/components/sections/Filters.vue2.js";
12
+ import _sfc_main$8 from "../../modules/globals/views/components/elements/ButtonSort.vue.js";
13
+ import _sfc_main$4 from "../../modules/globals/views/components/elements/ButtonDate.vue.js";
14
+ import _sfc_main$5 from "../../modules/icons/navigation/IconFilter.vue.js";
14
15
  /* empty css */
15
16
  const _hoisted_1 = {
16
17
  key: 0,
@@ -106,6 +107,18 @@ const _sfc_main = {
106
107
  const filter = useModel(__props, "filter");
107
108
  const date = useModel(__props, "date");
108
109
  const items = useModel(__props, "items");
110
+ const filterConfig = computed(() => {
111
+ var _a;
112
+ if (!((_a = filter.value) == null ? void 0 : _a.options)) return [];
113
+ return filter.value.options.map((opt) => ({
114
+ key: opt.value,
115
+ title: opt.title,
116
+ type: "options",
117
+ // или другой тип в зависимости от данных
118
+ options: opt.options || [],
119
+ defaultValue: null
120
+ }));
121
+ });
109
122
  const props = __props;
110
123
  const itemsList = shallowRef(items.value || []);
111
124
  const hasMoreItems = ref(false);
@@ -258,10 +271,17 @@ const _sfc_main = {
258
271
  onSearch: updateSearch,
259
272
  autofocus: search.value.autofocus
260
273
  }, null, 8, ["placeholder", "class", "autofocus"])) : createCommentVNode("", true),
261
- date.value ? (openBlock(), createBlock(_sfc_main$2, {
274
+ filter.value ? (openBlock(), createBlock(_sfc_main$2, {
262
275
  key: 1,
276
+ modelValue: filter.value.selected,
277
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filter.value.selected = $event),
278
+ filters: filterConfig.value,
279
+ class: normalizeClass(filter.value.class || "mobile-only")
280
+ }, null, 8, ["modelValue", "filters", "class"])) : createCommentVNode("", true),
281
+ date.value ? (openBlock(), createBlock(_sfc_main$3, {
282
+ key: 2,
263
283
  label: {
264
- component: _sfc_main$3,
284
+ component: _sfc_main$4,
265
285
  props: { date: date.value }
266
286
  },
267
287
  class: normalizeClass([date.value.class || "bg-light", "flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium"]),
@@ -270,7 +290,7 @@ const _sfc_main = {
270
290
  default: withCtx(() => [
271
291
  createVNode(Calendar, {
272
292
  date: date.value,
273
- "onUpdate:date": _cache[0] || (_cache[0] = ($event) => date.value = $event),
293
+ "onUpdate:date": _cache[1] || (_cache[1] = ($event) => date.value = $event),
274
294
  locale: _ctx.$i18n.locale,
275
295
  allowRange: true,
276
296
  class: "radius-medium w-100 o-hidden bg-light"
@@ -278,29 +298,29 @@ const _sfc_main = {
278
298
  ]),
279
299
  _: 1
280
300
  }, 8, ["label", "class", "align"])) : createCommentVNode("", true),
281
- filter.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
301
+ filter.value ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
282
302
  createElementVNode("div", {
283
303
  class: normalizeClass([filter.value.class || "bg-light", "flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100"])
284
304
  }, [
285
- createVNode(_sfc_main$4, {
286
- onClick: _cache[1] || (_cache[1] = () => filter.value.active = !filter.value.active),
305
+ createVNode(_sfc_main$5, {
306
+ onClick: _cache[2] || (_cache[2] = () => filter.value.active = !filter.value.active),
287
307
  class: "w-1r h-auto"
288
308
  })
289
309
  ], 2),
290
- createVNode(_sfc_main$5, {
310
+ createVNode(_sfc_main$6, {
291
311
  show: filter.value.active,
292
- onToggle: _cache[4] || (_cache[4] = () => filter.value.active = false),
312
+ onToggle: _cache[5] || (_cache[5] = () => filter.value.active = false),
293
313
  class: normalizeClass(["z-index-10 pos-fixed pos-r-0", {
294
314
  "pos-t-0": filter.value.active,
295
315
  "pos-t-100": !filter.value.active
296
316
  }])
297
317
  }, {
298
318
  default: withCtx(() => [
299
- createVNode(_sfc_main$6, {
319
+ createVNode(_sfc_main$7, {
300
320
  filter: filter.value,
301
- "onUpdate:filter": _cache[2] || (_cache[2] = ($event) => filter.value = $event),
321
+ "onUpdate:filter": _cache[3] || (_cache[3] = ($event) => filter.value = $event),
302
322
  options: filter.value.options,
303
- onClick_filter: _cache[3] || (_cache[3] = () => {
323
+ onClick_filter: _cache[4] || (_cache[4] = () => {
304
324
  filter.value.active = false;
305
325
  }),
306
326
  class: "h-max w-100 pd-small pd-b-5r bg-light"
@@ -309,10 +329,10 @@ const _sfc_main = {
309
329
  _: 1
310
330
  }, 8, ["show", "class"])
311
331
  ], 64)) : createCommentVNode("", true),
312
- sort.value && !sort.value.hideButton ? (openBlock(), createBlock(_sfc_main$2, {
313
- key: 3,
332
+ sort.value && !sort.value.hideButton ? (openBlock(), createBlock(_sfc_main$3, {
333
+ key: 4,
314
334
  label: {
315
- component: _sfc_main$7,
335
+ component: _sfc_main$8,
316
336
  props: { order: sort.value.order },
317
337
  class: "w-1r"
318
338
  },
@@ -320,18 +340,18 @@ const _sfc_main = {
320
340
  align: search.value ? "right" : "left"
321
341
  }, {
322
342
  default: withCtx(() => [
323
- createVNode(_sfc_main$8, {
343
+ createVNode(_sfc_main$9, {
324
344
  param: sort.value.param,
325
- "onUpdate:param": _cache[5] || (_cache[5] = ($event) => sort.value.param = $event),
345
+ "onUpdate:param": _cache[6] || (_cache[6] = ($event) => sort.value.param = $event),
326
346
  order: sort.value.order,
327
- "onUpdate:order": _cache[6] || (_cache[6] = ($event) => sort.value.order = $event),
347
+ "onUpdate:order": _cache[7] || (_cache[7] = ($event) => sort.value.order = $event),
328
348
  options: sort.value.options,
329
349
  class: "h-100 pd-small radius-medium t-white bg-black"
330
350
  }, null, 8, ["param", "order", "options"])
331
351
  ]),
332
352
  _: 1
333
353
  }, 8, ["label", "class", "align"])) : createCommentVNode("", true),
334
- __props.actions.length ? (openBlock(true), createElementBlock(Fragment, { key: 4 }, renderList(__props.actions, (action) => {
354
+ __props.actions.length ? (openBlock(true), createElementBlock(Fragment, { key: 5 }, renderList(__props.actions, (action) => {
335
355
  return openBlock(), createElementBlock("div", {
336
356
  key: action.key,
337
357
  class: normalizeClass([action.class || "bg-light", "flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100"])
@@ -371,7 +391,7 @@ const _sfc_main = {
371
391
  name: "feed"
372
392
  }, {
373
393
  default: withCtx(() => [
374
- !unref(isLoading) && itemsList.value.length < 1 ? (openBlock(), createBlock(_sfc_main$9, {
394
+ !unref(isLoading) && itemsList.value.length < 1 ? (openBlock(), createBlock(_sfc_main$a, {
375
395
  key: 0,
376
396
  title: __props.states.empty.title,
377
397
  description: __props.states.empty.description,
@@ -1 +1 @@
1
- {"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin z-index-10 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n @click_filter=\"() => { filter.active = false } \"\n class=\"h-max w-100 pd-small pd-b-5r bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\n// Флаг для определения поискового запроса\nlet isSearching = ref(false);\n\n// Счетчик для отслеживания актуальности запросов\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n // Устанавливаем флаг поиска\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\n// Вспомогательная функция для удаления null/undefined значений\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n // Увеличиваем счетчик запросов\n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n // Устанавливаем isLoadingExtra только для актуального запроса\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n // Увеличиваем счетчик при каждом новом запросе\n const currentRequestId = ++requestId;\n \n // Очищаем список только при поиске\n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false; // Сбрасываем флаг после использования\n }\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n // Если нет - игнорируем результат\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n // Устанавливаем isLoading только для актуального запроса\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4LA,UAAM,SAASA,SAAW,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I,qBAAqB,aAAW;AAC7C,cAAI,QAAQ,KAAK,WAAS,MAAM,cAAc,GAAG;AAC/C,0BAAa;AAAA,UACrB;AAAA,QACK,CAAA;AAED,YAAI,SAAS,MAAO,UAAS,QAAQ,SAAS,KAAK;AAAA,MACvD;AAAA,IACA,CAAC;AAED,gBAAY,MAAM;AAChB,UAAI,UAAU;AACZ,iBAAS,WAAY;AAAA,MACzB;AAAA,IACA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Feed.vue.js","sources":["../../../../../src/components/Feed/Feed.vue"],"sourcesContent":["<template>\n <div v-if=\"search || date || (sort && !sort.hideButton)\" style=\"transform: scale(1);\" class=\"mn-b-thin z-index-10 pos-relative flex-nowrap flex gap-thin\">\n\n <BlockSearch \n v-if=\"search\"\n :placeholder=\"search.placeholder || 'Search...'\"\n :class=\"search.class || 'bg-light'\"\n @search=\"updateSearch\"\n :autofocus=\"search.autofocus\"\n />\n\n <FiltersBar\n v-if=\"filter\"\n v-model=\"filter.selected\"\n :filters=\"filterConfig\"\n :class=\"filter.class || 'mobile-only'\"\n />\n\n <Dropdown \n v-if=\"date\"\n :label=\"{\n component: ButtonDate,\n props: { date: date }\n }\" \n :class=\"date.class || 'bg-light'\"\n class=\"flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-medium\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <Calendar\n v-model:date=\"date\"\n :locale=\"$i18n.locale\"\n :allowRange=\"true\"\n class=\"radius-medium w-100 o-hidden bg-light\"\n />\n </Dropdown> \n\n <template\n v-if=\"filter\"\n >\n <div \n :class=\"filter.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <IconFilter @click=\"() => filter.active = !filter.active\" class=\"w-1r h-auto\"/>\n </div>\n\n \n <BottomSheet\n :show=\"filter.active\"\n @toggle=\"() => filter.active = false\"\n class=\"z-index-10 pos-fixed pos-r-0\"\n :class=\"{\n 'pos-t-0': filter.active,\n 'pos-t-100': !filter.active\n }\"\n >\n <BlockFilter\n v-model:filter=\"filter\"\n :options=\"filter.options\"\n @click_filter=\"() => { filter.active = false } \"\n class=\"h-max w-100 pd-small pd-b-5r bg-light\"\n />\n </BottomSheet> \n </template>\n\n <Dropdown \n v-if=\"sort && !sort.hideButton\"\n :label=\"{\n component: ButtonSort,\n props: { order: sort.order },\n class: 'w-1r'\n }\" \n :class=\"sort.class || 'bg-light'\"\n class=\"radius-medium aspect-1x1 h-100\"\n :align=\"search ? 'right' : 'left'\"\n >\n\n <BlockSorting\n v-model:param=\"sort.param\"\n v-model:order=\"sort.order\"\n :options=\"sort.options\"\n class=\"h-100 pd-small radius-medium t-white bg-black\"\n />\n </Dropdown> \n\n <!-- Actions -->\n <template\n v-if=\"actions.length\"\n >\n <template v-for=\"action in actions\" :key=\"action.key\">\n <div \n :class=\"action.class || 'bg-light'\"\n class=\"flex-center flex pd-thin bg-light radius-medium aspect-1x1 h-100\"\n >\n <component\n :is=\"action.component\"\n @click=\"action.handler\"\n class=\"w-1r h-auto\"\n >\n </component>\n\n </div>\n </template>\n </template>\n </div>\n\n <TransitionGroup \n v-if=\"isLoading\"\n tag=\"ul\" \n name=\"scaleTransition\" \n class=\"pos-relative z-index-1\"\n :class=\"$attrs.class\"\n >\n <Skeleton\n v-if=\"isLoading && !skeleton?.hide\"\n v-for=\"i in currentLimit\" \n :structure=\"skeleton.structure\"\n :horizontal=\"skeleton.horizontal\"\n :loading=\"skeleton.apply_to_slot\"\n :key=\"'skeleton-' + i\"\n :class=\"replaceClasses('radius-medium bg-light pd-thin flex-child-default o-hidden d-block', skeleton.class)\"\n />\n <Loader v-if=\"isLoading && skeleton?.hide\"/>\n </TransitionGroup>\n\n <TransitionGroup \n tag=\"ul\" \n v-else-if=\"itemsList.length < 1\"\n name=\"feed\"\n >\n <EmptyState\n v-if=\"!isLoading && itemsList.length < 1\"\n :title=\"states.empty.title\"\n :description=\"states.empty.description\"\n :action=\"states.empty.action\"\n :callback=\"states.empty.callback\"\n :class=\"replaceClasses('pd-medium bg-light radius-medium', states.empty.class)\"\n />\n </TransitionGroup>\n\n <TransitionGroup \n v-else\n tag=\"ul\" \n name=\"feed\"\n :class=\"$attrs.class\"\n >\n <slot\n :items=\"itemsList\"\n >\n </slot>\n </TransitionGroup>\n\n <button\n v-if=\"showLoadMore && hasMoreItems && itemsList.length > 0 && !isLoadingExtra\"\n @click=\"loadMoreItems\"\n class=\"col-w-100 mn-t-thin w-100 t-black bg-main button\"\n >\n Load More\n </button>\n\n <div v-else key=\"sentinel\" ref=\"sentinel\" class=\"sentinel\"></div> \n\n <div\n v-if=\"isLoadingExtra\"\n class=\"col-w-100 w-100 pos-relative\"\n >\n <Loader/>\n </div>\n \n\n</template>\n\n<script setup>\nimport { ref, computed, onMounted, onUnmounted, shallowRef, watch } from 'vue';\n\nimport SkeletonEvent from '@martyrs/src/modules/icons/skeletons/SkeletonEvent.vue'\n\nimport Loader from '@martyrs/src/components/Loader/Loader.vue';\nimport Skeleton from '@martyrs/src/components/Skeleton/Skeleton.vue';\nimport EmptyState from '@martyrs/src/components/EmptyState/EmptyState.vue';\nimport Dropdown from \"@martyrs/src/components/Dropdown/Dropdown.vue\";\nimport Calendar from '@martyrs/src/components/DatePicker/Calendar.vue'\nimport BottomSheet from '@martyrs/src/components/BottomSheet/BottomSheet.vue';\n\nimport BlockSearch from '@martyrs/src/modules/globals/views/components/blocks/BlockSearch.vue'\nimport BlockSorting from '@martyrs/src/modules/globals/views/components/blocks/BlockSorting.vue'\nimport BlockFilter from '@martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\nimport FiltersBar from '@martyrs/src/modules/globals/views/components/sections/Filters.vue'\n\nimport ButtonSort from '@martyrs/src/modules/globals/views/components/elements/ButtonSort.vue'\nimport ButtonDate from '@martyrs/src/modules/globals/views/components/elements/ButtonDate.vue'\n\nimport IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'\nimport IconEvents from '@martyrs/src/modules/icons/entities/IconEvents.vue'\n\nconst search = defineModel('search')\nconst sort = defineModel('sort')\nconst filter = defineModel('filter')\nconst date = defineModel('date')\nconst items = defineModel('items')\n\nconst filterConfig = computed(() => {\n if (!filter.value?.options) return []\n \n // Преобразуем старый формат в новый\n return filter.value.options.map(opt => ({\n key: opt.value,\n title: opt.title,\n type: 'options', // или другой тип в зависимости от данных\n options: opt.options || [],\n defaultValue: null\n }))\n})\n\n\n// Пропсы\nconst props = defineProps({\n showLoadMore: {\n type: Boolean,\n default: true\n },\n LoadMore: {\n type: Boolean,\n default: true\n },\n search: {\n type: [Boolean, Object],\n default: false\n },\n states: {\n type: Object,\n default: () => ({\n empty: {\n title: 'Nothing found',\n description: 'Sorry, nothing found',\n },\n }),\n },\n actions: {\n type: Array,\n default: () => []\n },\n skeleton: {\n type: Object,\n default: () => ({\n hide: false,\n horizontal: false,\n structure: [\n { block: 'text', size: 'medium' },\n { block: 'text', size: 'large' },\n { block: 'button', size: 'small' }\n ]\n }),\n \n },\n store: {\n type: Object,\n default: () => ({\n read: Function,\n state: Object,\n }),\n },\n external: {\n type: Boolean,\n default: false\n },\n options: {\n type: Object,\n default: () => ({\n category: null,\n limit: 10, \n skip: 0 ,\n owner: null,\n creator: null,\n customer: null,\n user: null,\n status: null,\n period: null,\n contain: null,\n }),\n },\n});\n \nconst itemsList = shallowRef(items.value || []);\nconst hasMoreItems = ref(false);\n\nlet isLoading = ref(true);\nlet isLoadingExtra = ref(false);\nlet sentinel = ref(null)\n\nlet currentSkip = ref(props.options.skip ? props.options.skip : 0);\nlet currentLimit = ref(props.options.limit ? props.options.limit : 10);\n\nlet currentSearch = ref('');\n// Флаг для определения поискового запроса\nlet isSearching = ref(false);\n\n// Счетчик для отслеживания актуальности запросов\nlet requestId = 0;\n\nfunction debounce(fn, delay) {\n let timeoutId = null;\n return (...args) => {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn(...args), delay);\n };\n}\n\nconst debouncedSearch = debounce((value) => {\n // Устанавливаем флаг поиска\n isSearching.value = true;\n currentSearch.value = value;\n currentSkip.value = 0;\n currentLimit.value = 10;\n fetchItems();\n}, 500);\n\nfunction updateSearch(search) {\n debouncedSearch(search);\n}\n\n// Вспомогательная функция для удаления null/undefined значений\nconst removeNullValues = (obj) => {\n return Object.fromEntries(\n Object.entries(obj).filter(([_, value]) => value != null)\n );\n};\n\nconst loadMoreItems = async () => {\n if (!hasMoreItems.value || isLoadingExtra.value) {\n return;\n }\n \n isLoadingExtra.value = true;\n \n // Увеличиваем счетчик запросов\n const currentRequestId = ++requestId;\n\n currentSkip.value += currentLimit.value;\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = [...itemsList.value, ...data];\n \n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Load more error:', error);\n } finally {\n // Устанавливаем isLoadingExtra только для актуального запроса\n if (currentRequestId === requestId) {\n isLoadingExtra.value = false;\n }\n }\n};\n\nconst fetchItems = async () => {\n isLoading.value = true;\n \n // Увеличиваем счетчик при каждом новом запросе\n const currentRequestId = ++requestId;\n \n // Очищаем список только при поиске\n if (isSearching.value) {\n itemsList.value = [];\n isSearching.value = false; // Сбрасываем флаг после использования\n }\n \n try {\n // Собираем все параметры в один объект\n const allParams = {\n skip: currentSkip.value,\n limit: currentLimit.value,\n search: currentSearch.value,\n dateStart: date.value?.start,\n dateEnd: date.value?.end,\n sortParam: sort.value?.param,\n sortOrder: sort.value?.order,\n ...props.options\n };\n\n // Фильтруем null/undefined значения для всего объекта\n const params = removeNullValues(allParams);\n\n const data = await props.store.read(params);\n\n // Проверяем, актуален ли еще этот запрос\n if (currentRequestId !== requestId) {\n // Если нет - игнорируем результат\n return;\n }\n\n if (data.length === 0) {\n hasMoreItems.value = false;\n } else if (data.length < currentLimit.value) {\n hasMoreItems.value = false;\n } else {\n hasMoreItems.value = true;\n }\n\n itemsList.value = data;\n if (items.value) items.value = itemsList.value;\n \n } catch (error) {\n console.error('Fetch error:', error);\n } finally {\n // Устанавливаем isLoading только для актуального запроса\n if (currentRequestId === requestId) {\n isLoading.value = false;\n }\n }\n};\n\nwatch(\n [() => props.external, () => date.value, () => ({...sort.value}), () => ({...props.options})],\n ([newExternal, newDate, newSort, newOptions], [oldExternal, oldDate, oldSort, oldOptions]) => {\n if (\n newExternal !== oldExternal ||\n newDate !== oldDate ||\n newSort?.order !== oldSort?.order ||\n newSort?.param !== oldSort?.param ||\n JSON.stringify(newOptions) !== JSON.stringify(oldOptions)\n ) {\n currentSkip.value = 0;\n fetchItems();\n }\n },\n { deep: true }\n);\n\nlet observer = null\n\nonMounted(async () => {\n await fetchItems()\n\n if (typeof window !== 'undefined' && !props.showLoadMore && props.LoadMore) {\n observer = new IntersectionObserver(entries => {\n if (entries.some(entry => entry.isIntersecting)) {\n loadMoreItems()\n }\n })\n\n if (sentinel.value) observer.observe(sentinel.value)\n }\n});\n\nonUnmounted(() => {\n if (observer) {\n observer.disconnect();\n }\n});\n</script>\n\n<style>\n.feed-move, /* apply transition to moving elements */\n.feed-enter-active,\n.feed-leave-active {\n transition: all 0.5s ease;\n}\n\n.feed-enter-from,\n.feed-leave-to {\n opacity: 0;\n transform: translateY(30px);\n}\n\n/* ensure leaving items are taken out of layout flow so that moving\n animations can be calculated correctly. */\n.feed-leave-active {\n position: absolute;\n}\n</style>"],"names":["_useModel","search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqMA,UAAM,SAASA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,SAAY,SAAA,MAAM;AAC/B,UAAM,SAASA,SAAW,SAAC,QAAQ;AACnC,UAAM,OAAOA,SAAY,SAAA,MAAM;AAC/B,UAAM,QAAQA,SAAY,SAAA,OAAO;AAEjC,UAAM,eAAe,SAAS,MAAM;;AAClC,UAAI,GAAC,YAAO,UAAP,mBAAc,SAAS,QAAO,CAAA;AAGnC,aAAO,OAAO,MAAM,QAAQ,IAAI,UAAQ;AAAA,QACtC,KAAK,IAAI;AAAA,QACT,OAAO,IAAI;AAAA,QACX,MAAM;AAAA;AAAA,QACN,SAAS,IAAI,WAAW,CAAE;AAAA,QAC1B,cAAc;AAAA,MAClB,EAAI;AAAA,IACJ,CAAC;AAID,UAAM,QAAQ;AAmEd,UAAM,YAAY,WAAW,MAAM,SAAS,CAAA,CAAE;AAC9C,UAAM,eAAe,IAAI,KAAK;AAE9B,QAAI,YAAY,IAAI,IAAI;AACxB,QAAI,iBAAiB,IAAI,KAAK;AAC9B,QAAI,WAAW,IAAI,IAAI;AAEvB,QAAI,cAAc,IAAI,MAAM,QAAQ,OAAO,MAAM,QAAQ,OAAO,CAAC;AACjE,QAAI,eAAe,IAAI,MAAM,QAAQ,QAAQ,MAAM,QAAQ,QAAQ,EAAE;AAErE,QAAI,gBAAgB,IAAI,EAAE;AAE1B,QAAI,cAAc,IAAI,KAAK;AAG3B,QAAI,YAAY;AAEhB,aAAS,SAAS,IAAI,OAAO;AAC3B,UAAI,YAAY;AAChB,aAAO,I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