@ozdao/prometheus-framework 0.2.130 → 0.2.132

Sign up to get free protection for your applications and to get access to all the features.
Files changed (316) hide show
  1. package/dist/auth.server.js +0 -1
  2. package/dist/auth.server.mjs +0 -1
  3. package/dist/community.server.js +172 -31
  4. package/dist/community.server.mjs +172 -31
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +38 -4
  8. package/dist/files.server.mjs +38 -4
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/main-CI9l9xMs.js +92 -0
  12. package/dist/main-DPg58GOU.mjs +14509 -0
  13. package/dist/main.css +1 -1
  14. package/dist/orders.server.js +1 -1
  15. package/dist/orders.server.mjs +1 -1
  16. package/dist/organizations.server.js +4 -3
  17. package/dist/organizations.server.mjs +4 -3
  18. package/dist/products.server.js +2 -1
  19. package/dist/products.server.mjs +2 -1
  20. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
  21. package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
  22. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
  24. package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
  25. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
  27. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  28. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
  29. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
  31. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
  32. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
  33. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
  34. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
  35. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
  37. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
  38. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
  39. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
  41. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
  43. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
  45. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
  47. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
  48. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
  49. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  50. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
  51. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
  53. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
  55. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
  57. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  58. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
  59. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
  61. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
  63. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +31 -31
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +32 -32
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +20 -20
  77. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
  79. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
  83. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +55 -72
  85. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
  87. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +87 -77
  89. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
  91. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  93. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +71 -80
  95. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
  96. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
  97. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
  99. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +29 -30
  101. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
  103. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
  105. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
  109. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
  110. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
  111. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
  113. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +119 -112
  115. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  117. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  123. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  125. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +21 -21
  126. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +30 -30
  128. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
  130. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +18 -18
  134. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  136. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
  138. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  140. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  142. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
  144. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
  150. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  154. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +113 -86
  158. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +37 -36
  162. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +10 -10
  164. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  166. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  168. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  170. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
  172. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
  174. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  176. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
  178. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
  179. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  181. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  185. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  187. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  189. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  190. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  191. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  192. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
  193. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  194. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  195. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  196. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  197. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
  199. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  200. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  201. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  202. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  203. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  204. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
  205. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  206. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
  207. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  208. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +33 -33
  209. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  210. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
  211. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  212. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  213. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  214. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
  215. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
  216. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
  217. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
  218. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
  219. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
  220. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
  221. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
  222. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
  223. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  224. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +158 -81
  225. package/dist/prometheus-framework.cjs.js +1 -1
  226. package/dist/prometheus-framework.es.js +14 -14
  227. package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
  228. package/dist/queryProcessor-iewDZq_f.js +178 -0
  229. package/dist/style.css +1 -1
  230. package/dist/wallet.server.js +80 -27
  231. package/dist/wallet.server.mjs +80 -27
  232. package/dist/web-DZUec7pP.js +1 -0
  233. package/dist/web-krQQeSb6.mjs +54 -0
  234. package/package.json +1 -1
  235. package/src/components/Address/Address.vue +1 -1
  236. package/src/components/Chips/Chips.vue +1 -1
  237. package/src/components/Completion/Completion.vue +1 -4
  238. package/src/components/DatePicker/Calendar.vue +1 -1
  239. package/src/components/Draggable/Draggable.vue +113 -0
  240. package/src/components/Dropdown/Dropdown.vue +1 -1
  241. package/src/components/Feed/Feed.vue +18 -12
  242. package/src/components/FieldBig/FieldBig.vue +11 -1
  243. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  244. package/src/components/FieldTags/FieldTags.vue +2 -1
  245. package/src/components/FieldTags/tag-input.vue +1 -1
  246. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  247. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  248. package/src/components/Shader/Shader.vue +2 -2
  249. package/src/components/Slider/Slider.vue +1 -5
  250. package/src/components/Spoiler/Spoiler.vue +1 -1
  251. package/src/components/Text/Text.vue +1 -4
  252. package/src/components/Tooltip/Tooltip.vue +1 -1
  253. package/src/components/Upload/Upload.vue +5 -3
  254. package/src/modules/auth/controllers/auth.controller.js +0 -2
  255. package/src/modules/auth/store/auth.js +2 -2
  256. package/src/modules/community/DOCUMENTATION.MD +4 -0
  257. package/src/modules/community/community.client.js +0 -2
  258. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
  259. package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
  260. package/src/modules/community/components/layouts/Community.vue +15 -11
  261. package/src/modules/community/components/pages/Blog.vue +25 -32
  262. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
  263. package/src/modules/community/components/sections/Comment.vue +123 -0
  264. package/src/modules/community/components/sections/Comments.vue +90 -19
  265. package/src/modules/community/components/sections/HotPosts.vue +3 -6
  266. package/src/modules/community/controllers/blog.controller.js +1 -1
  267. package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
  268. package/src/modules/community/controllers/comments.controller.js +187 -38
  269. package/src/modules/community/controllers/comments.controller.populate.js +180 -0
  270. package/src/modules/community/models/comment.model.js +15 -0
  271. package/src/modules/community/store/blogposts.js +20 -2
  272. package/src/modules/constructor/components/elements/Audio.vue +28 -40
  273. package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
  274. package/src/modules/constructor/components/elements/Video.vue +10 -18
  275. package/src/modules/constructor/components/sections/Constructor.vue +54 -47
  276. package/src/modules/files/controllers/files.controller.js +2 -0
  277. package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
  278. package/src/modules/files/routes/files.routes.js +8 -0
  279. package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
  280. package/src/modules/globals/components/partials/Header.vue +12 -7
  281. package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
  282. package/src/modules/icons/logos/Logotype.vue +8 -6
  283. package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
  284. package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
  285. package/src/modules/marketplace/store/marketplace.js +2 -8
  286. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  287. package/src/modules/organizations/components/pages/Members.vue +1 -1
  288. package/src/modules/organizations/components/pages/Organization.vue +33 -5
  289. package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
  290. package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
  291. package/src/modules/organizations/components/sections/Publics.vue +2 -2
  292. package/src/modules/organizations/controllers/memberships.controller.js +2 -3
  293. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  294. package/src/modules/organizations/store/memberships.js +4 -1
  295. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  296. package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
  297. package/src/modules/products/models/product.model.js +2 -1
  298. package/src/modules/spots/components/layouts/Spots.vue +0 -3
  299. package/src/modules/spots/components/pages/Map.vue +13 -3
  300. package/src/modules/users/components/blocks/CardUser.vue +2 -2
  301. package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
  302. package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
  303. package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
  304. package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
  305. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
  306. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
  307. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
  308. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
  309. package/src/modules/wallet/localization/Wallet.json +22 -0
  310. package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
  311. package/src/styles/base/all.scss +16 -26
  312. package/src/styles/config.scss +70 -34
  313. package/src/styles/typography.scss +5 -5
  314. package/src/modules/community/components/sections/Feed.vue +0 -148
  315. package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
  316. package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -0,0 +1,180 @@
1
+ const commentControllerFactory = (db) => {
2
+ const Comment = db.comment;
3
+ const Membership = db.membership;
4
+
5
+ const read = async (req, res) => {
6
+ try {
7
+ const { target, user, parentId, depth = 0, maxDepth = 2 } = req.query;
8
+ let conditions = parentId
9
+ ? { parent: parentId }
10
+ : { target, parent: null };
11
+
12
+ if (user) {
13
+ const memberships = await Membership.find({ user });
14
+ const blockedMembers = memberships
15
+ .filter(membership => membership.role === 'blocked')
16
+ .map(membership => membership.target);
17
+ if (blockedMembers.length > 0) {
18
+ conditions.user = { "$nin": blockedMembers };
19
+ }
20
+ }
21
+
22
+ const populateRecursive = (currentDepth = 0) => ({
23
+ path: 'children',
24
+ populate: [
25
+ {
26
+ path: 'user',
27
+ select: 'username profile.photo profile.name _id'
28
+ },
29
+ ...(currentDepth < maxDepth ? [populateRecursive(currentDepth + 1)] : [])
30
+ ]
31
+ });
32
+
33
+ const comments = await Comment.find(conditions)
34
+ .populate({
35
+ path: 'user',
36
+ select: 'username profile.photo profile.name _id'
37
+ })
38
+ .populate(populateRecursive(Number(depth)));
39
+
40
+ if (!comments || comments.length === 0) {
41
+ return res.status(404).send({
42
+ message: parentId
43
+ ? "No more comments found."
44
+ : "Comments not found."
45
+ });
46
+ }
47
+
48
+ // Функция для рекурсивного подсчета всех вложенных комментариев без ограничения глубины
49
+ const countAllChildren = (comment) => {
50
+ let count = 0;
51
+ const stack = [comment];
52
+ while (stack.length > 0) {
53
+ const current = stack.pop();
54
+ if (current.children && current.children.length > 0) {
55
+ count += current.children.length;
56
+ stack.push(...current.children);
57
+ }
58
+ }
59
+ return count;
60
+ };
61
+
62
+ const addHasMoreFlag = (comment, currentDepth = 0) => {
63
+ const commentObj = comment.toObject();
64
+ commentObj.childrenCount = countAllChildren(comment); // Обновлено здесь для подсчета всех вложенных комментариев
65
+ commentObj.hasMore = currentDepth >= maxDepth && comment.children.length > 0;
66
+
67
+ if (currentDepth < maxDepth && comment.children.length > 0) {
68
+ commentObj.children = comment.children.map(child => addHasMoreFlag(child, currentDepth + 1));
69
+ } else {
70
+ commentObj.children = [];
71
+ }
72
+
73
+ return commentObj;
74
+ };
75
+
76
+ const commentsWithHasMore = comments.map(comment => addHasMoreFlag(comment, Number(depth)));
77
+
78
+ res.status(200).send(commentsWithHasMore);
79
+ } catch (err) {
80
+ res.status(500).send({ message: err.message });
81
+ }
82
+ };
83
+
84
+
85
+
86
+
87
+ const create = async (req, res) => {
88
+ try {
89
+ const { user, type, target, content, parent } = req.body;
90
+
91
+ let depth = 0;
92
+
93
+ if (parent) {
94
+ const parentComment = await Comment.findById(parent);
95
+ if (!parentComment) {
96
+ return res.status(404).send({ message: "Parent comment not found." });
97
+ }
98
+ depth = parentComment.depth + 1;
99
+ }
100
+
101
+ const comment = new Comment({
102
+ user,
103
+ type,
104
+ target,
105
+ content,
106
+ parent,
107
+ depth
108
+ });
109
+
110
+ const savedComment = await comment.save();
111
+
112
+ if (parent) {
113
+ await Comment.findByIdAndUpdate(parent, {
114
+ $push: { children: savedComment._id }
115
+ });
116
+ }
117
+
118
+ const populatedComment = await Comment.findById(savedComment._id)
119
+ .populate({
120
+ path: 'user',
121
+ select: 'username profile.photo profile.name _id'
122
+ })
123
+ .populate({
124
+ path: 'children',
125
+ populate: {
126
+ path: 'user',
127
+ select: 'username profile.photo profile.name _id'
128
+ }
129
+ });
130
+
131
+ res.status(201).send(populatedComment);
132
+ } catch (err) {
133
+ console.error(err);
134
+ res.status(500).send({
135
+ message: err.message || "Some error occurred while creating the comment."
136
+ });
137
+ }
138
+ };
139
+
140
+ const update = async (req, res) => {
141
+ try {
142
+ const comment = await Comment.findByIdAndUpdate(req.params._id, req.body, { new: true })
143
+ .populate({
144
+ path: 'user',
145
+ select: 'username profile.photo profile.name _id'
146
+ });
147
+
148
+ if (!comment) {
149
+ return res.status(404).send({ message: "Comment not found." });
150
+ }
151
+
152
+ res.status(200).send(comment);
153
+ } catch (err) {
154
+ res.status(500).send({ message: err.message });
155
+ }
156
+ };
157
+
158
+ const deleteComment = async (req, res) => {
159
+ try {
160
+ const comment = await Comment.findByIdAndRemove(req.params._id);
161
+
162
+ if (!comment) {
163
+ return res.status(404).send({ message: "Comment is not deleted." });
164
+ }
165
+
166
+ res.status(200).send(comment);
167
+ } catch (err) {
168
+ res.status(500).send({ message: err.message });
169
+ }
170
+ };
171
+
172
+ return {
173
+ read,
174
+ create,
175
+ update,
176
+ delete: deleteComment
177
+ };
178
+ };
179
+
180
+ module.exports = commentControllerFactory;
@@ -21,6 +21,19 @@ module.exports = (mongoose) => {
21
21
  },
22
22
  required: true,
23
23
  },
24
+ parent: {
25
+ type: mongoose.Schema.Types.ObjectId,
26
+ ref: 'Comment',
27
+ default: null
28
+ },
29
+ children:[{
30
+ type: mongoose.Schema.Types.ObjectId,
31
+ ref: "Comment"
32
+ }],
33
+ depth: {
34
+ type: Number,
35
+ default: 0
36
+ },
24
37
  content: {
25
38
  type: String,
26
39
  required: true
@@ -30,6 +43,8 @@ module.exports = (mongoose) => {
30
43
  }
31
44
  });
32
45
 
46
+ CommentSchema.index({ target: 1, parent: 1, depth: 1 });
47
+
33
48
  const Comment = mongoose.model("Comment", CommentSchema);
34
49
 
35
50
  return Comment;
@@ -21,8 +21,19 @@ const state = reactive({
21
21
  },
22
22
  // Sort
23
23
  sort: {
24
- current: 'popularity',
25
- ascending: false
24
+ param: 'createdAt',
25
+ order: 'desc',
26
+ hideButton: true,
27
+ options: [{
28
+ label: 'Date',
29
+ value: 'createdAt'
30
+ },{
31
+ label: 'Popularity',
32
+ value: 'views'
33
+ },{
34
+ label: 'Creator',
35
+ value: 'creator'
36
+ }]
26
37
  },
27
38
  current: {
28
39
  _id: "",
@@ -75,6 +86,13 @@ async function read(options = {}) {
75
86
  if (options.user) {
76
87
  options.params.user = options.user;
77
88
  }
89
+ // Sort
90
+ if (options.sortParam) {
91
+ options.params.sortParam = options.sortParam;
92
+ }
93
+ if (options.sortOrder) {
94
+ options.params.sortOrder = options.sortOrder;
95
+ }
78
96
  // Handle pagination
79
97
  options.params.skip = options.skip || 0;
80
98
  options.params.limit = options.limit || 10;
@@ -1,22 +1,23 @@
1
1
  <template>
2
2
  <div
3
- class="mn-b-thin w-100 pd-medium bg-white radius-medium">
4
-
5
- <div
6
- v-if="prop.content"
7
- v-html="prop.content"
8
- class="flex-center flex"
9
- />
10
-
3
+ class="mn-b-thin w-100 radius-medium"
4
+ >
5
+
6
+ <div v-if="prop.content" class="flex-center flex">
7
+ <audio controls class="w-100 h-max-30r">
8
+ <source :src="prop.content" type="video/mp4">
9
+ Your browser does not support the video tag.
10
+ </audio>
11
+ </div>
12
+
11
13
  <div
12
- class=""
13
14
  v-else
14
15
  >
15
16
  <Upload
16
- v-model:field="embedCode"
17
- @file-change="onComponentClick"
18
- type="file"
19
- :placeholder="'Enter embed code'"
17
+ v-model:field="audioUrl"
18
+ @file-change="onComponentSave"
19
+ type="audio"
20
+ :placeholder="'Upload video'"
20
21
  class="
21
22
  w-100
22
23
  br-solid
@@ -27,14 +28,7 @@
27
28
  mn-b-thin
28
29
  "
29
30
  />
30
- <button
31
- @click="onComponentClick"
32
- class="button-small button"
33
- >
34
- Save
35
- </button>
36
31
  </div>
37
- <!-- <button v-if="prop.content" @click="editEmbedCode">Edit Embed Code</button> -->
38
32
  </div>
39
33
  </template>
40
34
 
@@ -43,7 +37,8 @@ import { ref } from 'vue';
43
37
 
44
38
  import Upload from '@pf/src/components/Upload/Upload.vue'
45
39
 
46
- const embedCode = ref(null);
40
+ const audioUrl = ref(null);
41
+ const fileInput = ref(null);
47
42
 
48
43
  const props = defineProps([
49
44
  'label',
@@ -53,30 +48,23 @@ const props = defineProps([
53
48
 
54
49
  const emit = defineEmits(['input', 'updateBlock']);
55
50
 
56
- function isValidEmbedCode(code) {
57
- const allowedSources = [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/];
58
- return allowedSources.some(pattern => pattern.test(code));
59
- }
60
-
61
- function onComponentClick(file) {
62
- embedCode.value = file
63
- if (embedCode.value && isValidEmbedCode(embedCode.value)) {
64
- emit('input', embedCode.value);
65
- emit('updateBlock', props.prop, { content: embedCode.value });
66
- } else {
67
- alert('Invalid embed code or source not allowed.');
51
+ function updateBlock(updatedBlock) {
52
+ const index = post.value.content.findIndex(block => block === updatedBlock);
53
+ if (index !== -1) {
54
+ post.value.content.splice(index, 1, updatedBlock);
68
55
  }
69
56
  }
70
57
 
71
- function editEmbedCode() {
72
- let embedInput = prompt('Edit embed code:', prop.content);
73
- if (embedInput && isValidEmbedCode(embedInput)) {
74
- embedCode.value = embedInput;
75
- emit('input', embedCode.value);
76
- emit('updateBlock', props.prop, { content: embedCode.value });
58
+
59
+ function onComponentSave(url) {
60
+ audioUrl.value = url
61
+
62
+ if (audioUrl.value ) {
63
+ emit('input', audioUrl.value);
64
+ emit('updateBlock', props.prop, { content: audioUrl.value });
77
65
  } else {
78
66
  alert('Invalid embed code or source not allowed.');
79
67
  }
80
68
  }
81
- </script>
82
69
 
70
+ </script>
@@ -3,10 +3,12 @@
3
3
  @click="onComponentClick"
4
4
  @drop="onDrop"
5
5
  @dragover.prevent
6
+ @dragenter.prevent
7
+ @dragleave.prevent
6
8
  class="w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-b-small">
7
9
  <img v-if="prop.content" :src="(FILE_SERVER_URL || '') + prop.content" alt="Uploaded image" class="w-100 h-30r object-fit-contain"/>
8
10
  <span v-else class="t-transp pd-extra" >Click or drag-and-drop your image</span>
9
- <input type="file" ref="fileInput" tabindex="-1" @change="onFileChange" style="display: none"/>
11
+ <input v-if="!prop.content" type="file" ref="fileInput" tabindex="-1" @change="onFileChange" style="display: none"/>
10
12
  </div>
11
13
  </template>
12
14
 
@@ -48,7 +50,7 @@ async function onFileChange(e) {
48
50
  try {
49
51
  const $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true})
50
52
 
51
- let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData, {
53
+ let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath || 'images')}`, formData, {
52
54
  headers: {
53
55
  "Content-Type": "multipart/form-data"
54
56
  }
@@ -64,10 +66,13 @@ async function onFileChange(e) {
64
66
 
65
67
  function onDrop(e) {
66
68
  e.preventDefault();
67
- onFileChange({
68
- target: {
69
- files: e.dataTransfer.files
70
- }
71
- });
69
+
70
+ if (e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length) {
71
+ onFileChange({
72
+ target: {
73
+ files: e.dataTransfer.files
74
+ }
75
+ });
76
+ }
72
77
  }
73
78
  </script>
@@ -4,17 +4,17 @@
4
4
  >
5
5
 
6
6
  <div v-if="prop.content" class="flex-center flex">
7
- <video controls class="w-100 h-max-30r">
8
- <source :src="prop.content" type="video/mp4">
9
- Your browser does not support the video tag.
10
- </video>
7
+ <audio controls class="w-100 h-max-30r">
8
+ <source :src="prop.content" type="audio/mp3">
9
+ Your browser does not support the audio tag.
10
+ </audio>
11
11
  </div>
12
12
 
13
13
  <div
14
14
  v-else
15
15
  >
16
16
  <Upload
17
- v-model:field="imageUrl"
17
+ v-model:field="videoUrl"
18
18
  @file-change="onComponentSave"
19
19
  type="file"
20
20
  :placeholder="'Enter embed code'"
@@ -37,7 +37,7 @@ import { ref } from 'vue';
37
37
 
38
38
  import Upload from '@pf/src/components/Upload/Upload.vue'
39
39
 
40
- const imageUrl = ref(null);
40
+ const videoUrl = ref(null);
41
41
  const fileInput = ref(null);
42
42
 
43
43
  const props = defineProps([
@@ -48,12 +48,6 @@ const props = defineProps([
48
48
 
49
49
  const emit = defineEmits(['input', 'updateBlock']);
50
50
 
51
- function isValidEmbedCode(code) {
52
- const allowedSources = [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/];
53
- return allowedSources.some(pattern => pattern.test(code));
54
- }
55
-
56
-
57
51
  function updateBlock(updatedBlock) {
58
52
  const index = post.value.content.findIndex(block => block === updatedBlock);
59
53
  if (index !== -1) {
@@ -63,13 +57,11 @@ function updateBlock(updatedBlock) {
63
57
 
64
58
 
65
59
  function onComponentSave(url) {
66
- console.log(imageUrl.value )
67
-
68
- imageUrl.value = url
60
+ videoUrl.value = url
69
61
 
70
- if (imageUrl.value ) {
71
- emit('input', imageUrl.value);
72
- emit('updateBlock', props.prop, { content: imageUrl.value });
62
+ if (videoUrl.value ) {
63
+ emit('input', videoUrl.value);
64
+ emit('updateBlock', props.prop, { content: videoUrl.value });
73
65
  } else {
74
66
  alert('Invalid embed code or source not allowed.');
75
67
  }
@@ -1,17 +1,22 @@
1
- a<template>
1
+ <template>
2
2
  <!-- Content -->
3
3
  <section>
4
- <VueDraggableNext
5
- v-if="post.content"
6
- class="w-full"
4
+ <Draggable
7
5
  :list="post.content"
6
+ @update:list="updateContent"
8
7
  @start="handleDragStart"
9
- @end="handleDragEnd"
8
+ @end="handleDragEnd"
9
+ disabledClass="no-drag"
10
10
  >
11
11
  <div
12
12
  v-for="(block, index) in post.content"
13
13
  :key="index"
14
- class="pos-relative"
14
+ :data-index="index"
15
+ draggable="true"
16
+ class="draggable-item pos-relative"
17
+ :class="{
18
+ 'no-drag': index === 0
19
+ }"
15
20
  >
16
21
  <div
17
22
  @mouseover="showControls = index, showMenu = false"
@@ -22,6 +27,7 @@ a<template>
22
27
  :index="index"
23
28
  :component="block"
24
29
  :prop="block"
30
+ :placeholder="block.placeholder"
25
31
  :class="block.class"
26
32
  :setFocus="block.setFocus"
27
33
  content="content"
@@ -36,7 +42,6 @@ a<template>
36
42
  v-if="showControls === index"
37
43
  class="pos-absolute z-index-4 i-semi"
38
44
  style="right: calc(100% + 0.5rem); top: calc(50% - 1.125rem);"
39
- @mousedown.prevent="startDragging = true"
40
45
  >
41
46
  <button
42
47
  @click="showMenu = !showMenu"
@@ -50,6 +55,7 @@ a<template>
50
55
  class="z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"
51
56
  >
52
57
  <span
58
+ v-if="index !== 0"
53
59
  @click="handleDeleteBlock(block)"
54
60
  class="mn-b-thin w-max t-red bg-white button-small button"
55
61
  >
@@ -95,7 +101,7 @@ a<template>
95
101
  </div>
96
102
  </transition>
97
103
  </div>
98
- </VueDraggableNext>
104
+ </Draggable>
99
105
  </section>
100
106
  </template>
101
107
 
@@ -110,16 +116,23 @@ import Embed from '../elements/Embed.vue';
110
116
  import Audio from '../elements/Audio.vue';
111
117
  import Video from '../elements/Video.vue';
112
118
 
113
- import { ref, watchEffect, computed } from 'vue';
114
- import { VueDraggableNext } from 'vue-draggable-next';
119
+ import Draggable from '@pf/src/components/Draggable/Draggable.vue';
120
+
121
+ import { ref, onMounted, watchEffect, computed } from 'vue';
122
+
123
+ const props = defineProps({
124
+ content: {
125
+ type: Array
126
+ }
127
+ });
115
128
 
116
- const props = defineProps(['content']);
117
129
  const emits = defineEmits(['update'])
118
130
 
119
- let post = ref(null);
120
131
  let publics = ref(null);
132
+ let post = ref(null);
121
133
 
122
- post.value = { content: props.content }
134
+ const showControls = ref(null)
135
+ const showMenu = ref(false)
123
136
 
124
137
  const ComponentMap = {
125
138
  'Textarea': Textarea,
@@ -133,24 +146,42 @@ const ComponentMap = {
133
146
  'Video': Video,
134
147
  };
135
148
 
136
- function handleAddBlock(type = 'Textarea', content = '', index, data) {
137
- console.log('We are adding new block (functuin HandleAddBlock):' + type + content + index + data )
138
-
149
+ post.value = { content: props.content };
150
+
151
+ onMounted(() => {
152
+ if (post.value && post.value.content.length === 0) {
153
+ handleAddBlock('Textarea', '', 0, null, 'h2', 'Enter title');
154
+ }
155
+ })
156
+
157
+ const updateContent = (newContent) => {
158
+ post.value.content = newContent;
159
+ };
160
+
161
+ const handleDragStart = (startIndex) => {
162
+ console.log('Drag started from index:', startIndex);
163
+ };
164
+
165
+ const handleDragEnd = (startIndex, endIndex) => {
166
+ console.log('Drag ended. Start index:', startIndex, 'End index:', endIndex);
167
+ };
168
+
169
+ function handleAddBlock(type = 'Textarea', content = '', index, data, classBlock = '', placeholder = '') {
170
+
139
171
  let blockNew = {
140
- order: post.value.content.length + 1,
141
172
  type: type,
142
173
  style: '',
143
- class: '',
174
+ class: classBlock,
175
+ placeholder: placeholder,
144
176
  content: content,
145
177
  blocks: [],
146
- setFocus: false,
178
+ setFocus: true,
147
179
  };
148
180
 
149
181
  if (data && data.blocks && Array.isArray(data.blocks)) {
150
182
  let newBlocks = data.blocks.map(block => ({
151
183
  ...blockNew,
152
184
  content: block.content,
153
-
154
185
  }));
155
186
 
156
187
  let args = [(data.index || index) + 1, 0].concat(newBlocks);
@@ -158,13 +189,9 @@ function handleAddBlock(type = 'Textarea', content = '', index, data) {
158
189
  post.value.content.splice.apply(post.value.content, args);
159
190
 
160
191
  const lastBlock = newBlocks[newBlocks.length - 1];
161
-
162
- console.log('New block is' + lastBlock)
163
192
  } else if (index !== undefined) {
164
193
  post.value.content.splice(index + 1, 0, blockNew);
165
- console.log('Latest block is' + blockNew)
166
194
  } else {
167
- console.log('Another block is' + blockNew)
168
195
  post.value.content.push(blockNew);
169
196
  }
170
197
 
@@ -186,34 +213,14 @@ function handleUpdateBlock(block, update) {
186
213
  function handleDeleteBlock(block) {
187
214
  let index = post.value.content.findIndex(b => b === block);
188
215
 
189
- if (index !== -1) {
216
+ // Не даем удалить первый (нулевой) элемент в конструкторе
217
+ if (index !== -1 && index !== 0) {
190
218
  post.value.content.splice(index, 1);
219
+ post.value.content[index - 1].setFocus = true
191
220
  }
192
221
 
193
- post.value.content[index - 1].setFocus = true
194
-
195
222
  emits('update', post.value.content);
196
223
  }
197
-
198
- const showControls = ref(null)
199
- const startDragging = ref(false)
200
- const showMenu = ref(false)
201
-
202
- function handleDragStart() {
203
- startDragging.value = true
204
- }
205
-
206
- function handleDragEnd() {
207
- startDragging.value = false
208
- }
209
-
210
- watchEffect(() => {
211
- if (post.value && post.value.content.length === 0) {
212
- handleAddBlock('Textarea', '');
213
- }
214
-
215
- emits('update', post.value.content);
216
- });
217
224
  </script>
218
225
 
219
226
 
@@ -18,6 +18,8 @@ const controllerFactory = (db, publicPath) => {
18
18
 
19
19
  req.files = req.files.map(file => convertToRelativePath(file));
20
20
 
21
+ console.log(req.files)
22
+
21
23
  try {
22
24
  const fileResponses = req.files.map(file => ({
23
25
  message: 'File uploaded successfully.',