@ozdao/prometheus-framework 0.2.130 → 0.2.133

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) 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.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
  29. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  30. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
  31. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
  33. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
  35. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
  37. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
  38. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
  39. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
  41. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
  42. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
  43. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
  45. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
  47. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
  49. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
  50. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
  51. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
  53. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  54. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
  55. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
  57. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
  59. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
  60. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
  61. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
  62. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
  63. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  64. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
  65. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
  67. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +30 -30
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +30 -30
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +18 -18
  72. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
  74. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
  76. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +54 -71
  78. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
  80. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +86 -76
  82. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
  84. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +71 -80
  86. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
  87. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
  88. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
  90. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +27 -28
  92. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
  100. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
  102. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +119 -112
  104. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  105. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +22 -22
  113. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +27 -27
  115. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
  117. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +16 -16
  118. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
  120. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +112 -85
  133. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -35
  135. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +8 -8
  136. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
  142. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
  144. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
  146. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
  148. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
  154. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
  156. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +4 -4
  159. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +29 -29
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
  164. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  165. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
  166. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
  167. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
  168. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
  169. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
  170. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
  171. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
  172. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
  173. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
  174. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +154 -77
  176. package/dist/prometheus-framework.cjs.js +1 -1
  177. package/dist/prometheus-framework.es.js +14 -14
  178. package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
  179. package/dist/queryProcessor-iewDZq_f.js +178 -0
  180. package/dist/style.css +1 -1
  181. package/dist/wallet.server.js +80 -27
  182. package/dist/wallet.server.mjs +80 -27
  183. package/dist/web-DZUec7pP.js +1 -0
  184. package/dist/web-krQQeSb6.mjs +54 -0
  185. package/package.json +1 -1
  186. package/src/components/Address/Address.vue +1 -1
  187. package/src/components/Chips/Chips.vue +1 -1
  188. package/src/components/Completion/Completion.vue +1 -4
  189. package/src/components/DatePicker/Calendar.vue +1 -1
  190. package/src/components/Draggable/Draggable.vue +113 -0
  191. package/src/components/Dropdown/Dropdown.vue +1 -1
  192. package/src/components/Feed/Feed.vue +18 -12
  193. package/src/components/FieldBig/FieldBig.vue +11 -1
  194. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  195. package/src/components/FieldTags/FieldTags.vue +2 -1
  196. package/src/components/FieldTags/tag-input.vue +1 -1
  197. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  198. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  199. package/src/components/Shader/Shader.vue +2 -2
  200. package/src/components/Slider/Slider.vue +1 -5
  201. package/src/components/Spoiler/Spoiler.vue +1 -1
  202. package/src/components/Text/Text.vue +1 -4
  203. package/src/components/Tooltip/Tooltip.vue +1 -1
  204. package/src/components/Upload/Upload.vue +5 -3
  205. package/src/modules/auth/controllers/auth.controller.js +0 -2
  206. package/src/modules/auth/store/auth.js +2 -2
  207. package/src/modules/community/DOCUMENTATION.MD +4 -0
  208. package/src/modules/community/community.client.js +0 -2
  209. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
  210. package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
  211. package/src/modules/community/components/layouts/Community.vue +15 -11
  212. package/src/modules/community/components/pages/Blog.vue +25 -32
  213. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
  214. package/src/modules/community/components/sections/Comment.vue +123 -0
  215. package/src/modules/community/components/sections/Comments.vue +90 -19
  216. package/src/modules/community/components/sections/HotPosts.vue +3 -6
  217. package/src/modules/community/controllers/blog.controller.js +1 -1
  218. package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
  219. package/src/modules/community/controllers/comments.controller.js +187 -38
  220. package/src/modules/community/controllers/comments.controller.populate.js +180 -0
  221. package/src/modules/community/models/comment.model.js +15 -0
  222. package/src/modules/community/store/blogposts.js +20 -2
  223. package/src/modules/constructor/components/elements/Audio.vue +28 -40
  224. package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
  225. package/src/modules/constructor/components/elements/Video.vue +10 -18
  226. package/src/modules/constructor/components/sections/Constructor.vue +54 -47
  227. package/src/modules/files/controllers/files.controller.js +2 -0
  228. package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
  229. package/src/modules/files/routes/files.routes.js +8 -0
  230. package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
  231. package/src/modules/globals/components/partials/Header.vue +12 -7
  232. package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
  233. package/src/modules/icons/logos/Logotype.vue +8 -6
  234. package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
  235. package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
  236. package/src/modules/marketplace/store/marketplace.js +2 -8
  237. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  238. package/src/modules/organizations/components/pages/Members.vue +1 -1
  239. package/src/modules/organizations/components/pages/Organization.vue +33 -5
  240. package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
  241. package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
  242. package/src/modules/organizations/components/sections/Publics.vue +2 -2
  243. package/src/modules/organizations/controllers/memberships.controller.js +2 -3
  244. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  245. package/src/modules/organizations/store/memberships.js +4 -1
  246. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  247. package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
  248. package/src/modules/products/models/product.model.js +2 -1
  249. package/src/modules/spots/components/layouts/Spots.vue +0 -3
  250. package/src/modules/spots/components/pages/Map.vue +13 -3
  251. package/src/modules/users/components/blocks/CardUser.vue +2 -2
  252. package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
  253. package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
  254. package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
  255. package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
  256. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
  257. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
  258. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
  259. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
  260. package/src/modules/wallet/localization/Wallet.json +22 -0
  261. package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
  262. package/src/styles/base/all.scss +16 -26
  263. package/src/styles/config.scss +70 -34
  264. package/src/styles/typography.scss +5 -5
  265. package/src/modules/community/components/sections/Feed.vue +0 -148
  266. package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
  267. package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -3,7 +3,7 @@
3
3
  class="pos-relative bg-light radius-big flex-column flex"
4
4
  >
5
5
 
6
- <router-link
6
+ <!-- <router-link
7
7
  v-if="user && user === blogpost.creator.target._id"
8
8
  :to="{
9
9
  name: 'Edit BlogPost',
@@ -11,6 +11,7 @@
11
11
  url: blogpost.url
12
12
  }
13
13
  }"
14
+
14
15
  class="
15
16
  cursor-pointer
16
17
  pos-absolute pos-t-regular pos-r-regular
@@ -21,7 +22,7 @@
21
22
  class="i-regular"
22
23
  classes="fill-white"
23
24
  />
24
- </router-link>
25
+ </router-link> -->
25
26
 
26
27
  <CardHeader
27
28
  :class="{
@@ -34,6 +35,9 @@
34
35
  :owner="blogpost.owner"
35
36
  :creator="blogpost.creator"
36
37
  :date="blogpost.createdAt"
38
+ :actions="user && user === blogpost.creator.target._id ? [
39
+ { to: { name: 'Edit BlogPost', params: {url: blogpost.url } }, label: 'Edit' }
40
+ ]: null"
37
41
  />
38
42
 
39
43
 
@@ -1,8 +1,16 @@
1
1
  <template>
2
2
  <footer class="t-semi br-top-dark flex-nowrap flex-nojustify flex">
3
- 👁️ {{blogpost.views}}
4
- <span class="mn-r-small mn-l-small d-block">·</span>
5
- <div class="cursor-pointer">
3
+ <router-link :to="{
4
+ name: 'BlogPost',
5
+ params: {
6
+ url: blogpost.url
7
+ }
8
+ }"
9
+ class="font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big">
10
+ 👁️ {{blogpost.views}}
11
+ </router-link>
12
+
13
+ <div class="hover-bg-white pd-l-thin pd-r-thin radius-big cursor-pointer">
6
14
  <div class="cursor-pointer" @click="addReaction('like')" v-if="!isReacted">
7
15
  👍 {{reactionsCount }}
8
16
  </div>
@@ -10,8 +18,16 @@
10
18
  👍 {{reactionsCount }}
11
19
  </div>
12
20
  </div>
13
- <span class="mn-r-small mn-l-small d-block">·</span>
14
- 💬 {{blogpost.numberOfComments }}
21
+ <router-link :to="{
22
+ name: 'BlogPost',
23
+ hash: '#comments',
24
+ params: {
25
+ url: blogpost.url
26
+ }
27
+ }"
28
+ class="font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big">
29
+ 💬 {{ blogpost.numberOfComments }}
30
+ </router-link>
15
31
  </footer>
16
32
  </template>
17
33
 
@@ -4,7 +4,7 @@
4
4
  <ul class="align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex">
5
5
  <li
6
6
  :class="{'t-black bg-white': route.params.category === 'featured' }"
7
- @click="router.push({name: 'Blog', params: { category: 'featured' } })"
7
+ @click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'featured' } })}"
8
8
  class="cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"
9
9
  >
10
10
  <IconFeatured class="i-medium mn-r-thin t-transp"/>
@@ -12,7 +12,7 @@
12
12
  </li>
13
13
  <li
14
14
  :class="{'t-black bg-white': route.params.category === 'popular' }"
15
- @click="router.push({name: 'Blog', params: { category: 'popular' } })"
15
+ @click="() => { blog.state.sort.param = 'views'; router.push({name: 'Blog', params: { category: 'popular' } }) }"
16
16
  class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
17
17
  >
18
18
  <IconPopular class="i-medium mn-r-thin t-transp"/>
@@ -20,16 +20,16 @@
20
20
  </li>
21
21
  <li
22
22
  :class="{'t-black bg-white': route.params.category === 'new'}"
23
- @click="router.push({name: 'Blog', params: { category: 'new' } })"
23
+ @click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'new' } })}"
24
24
  class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
25
25
  >
26
26
  <IconRecent class="i-medium mn-r-thin t-transp"/>
27
27
  Recent
28
- </li>
28
+ </li>
29
29
  <li
30
30
  v-if="auth.state.user._id"
31
31
  :class="{'t-black bg-white': route.params.category === 'following'}"
32
- @click="router.push({name: 'Blog', params: { category: 'following' } })"
32
+ @click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'following' } })}"
33
33
  class="cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"
34
34
  >
35
35
  <IconFollowing class="i-medium mn-r-thin t-transp"/>
@@ -49,13 +49,13 @@
49
49
  <section class="pos-relative">
50
50
 
51
51
  <header class="bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex">
52
- <h2 class="pos-relative flex-v-center flex-nowrap flex">
53
- <span class="mn-r-small">Topics for </span>
52
+ <h3 class="pos-relative flex-v-center flex-nowrap flex">
53
+ <span class="mn-r-thin">Topics for </span>
54
54
 
55
55
  <Select
56
- :options="['today','week','month','year']"
56
+ :options="['today','week','month','year','all time']"
57
57
  v-model:select="blog.state.filter.period"
58
- placeholder="Select type"
58
+ placeholder="all time"
59
59
  class="
60
60
  t-semi
61
61
  pos-relative
@@ -63,14 +63,14 @@
63
63
  bg-main t-black
64
64
  pd-thin
65
65
  radius-medium
66
- h2
66
+ h3
67
67
  t-center
68
68
  br-solid
69
69
  br-2px
70
70
  br-black-transp-10
71
71
  "
72
72
  />
73
- </h2>
73
+ </h3>
74
74
  </header>
75
75
 
76
76
  <router-view v-slot="{ Component, route }">
@@ -160,6 +160,10 @@
160
160
  const route = useRoute();
161
161
  const router = useRouter();
162
162
 
163
+ if (route.params.category === 'popular') blog.state.sort.param = 'views';
164
+ if (route.params.category === 'new') blog.state.sort.param = 'createdAt';
165
+
166
+
163
167
  const handleMembershipUpdate = ({ membership, status, target }, statusName, statusNumber) => {
164
168
  memberships.mutations.handleMembershipUpdate(organizations.state.current, membership, status, target, statusName, statusNumber)
165
169
  };
@@ -1,58 +1,50 @@
1
1
  <template>
2
- <section>
3
-
4
-
5
-
6
- <!-- <Feed
2
+ <section class="bg-white">
3
+ <Feed
4
+ v-model:sort="blog.state.sort"
7
5
  :showLoadMore="false"
8
6
  :states="{
9
7
  empty: {
10
- title: 'No Blogposts Found',
11
- description: 'Currently, there are no blogposts available.'
12
- }
8
+ title: 'No Blog Posts Found',
9
+ description: 'Currently, there are no posts available in this blog. Please check back later.'
10
+ },
13
11
  }"
14
12
  :store="{
15
- read: (options) => blog.read(options),
16
- state: blog.state.all
13
+ read: (options) => blog.read(options)
17
14
  }"
18
15
  :options="{
19
- skip: 0,
20
- limit: 8,
16
+ limit: 15,
17
+ category: route.params.category,
18
+ period: route.query.period,
19
+ status: 'published',
21
20
  user: auth.state.user._id,
22
- period: 'year'
21
+ following: route.params.category === 'following' ? auth.state.user._id : null,
23
22
  }"
24
23
  v-slot="{
25
24
  items
26
25
  }"
27
- class="cols-4 gap-thin"
26
+ class="mobile:w-50 desktop:w-100 tablet:w-75 row-1 gap-thin"
28
27
  >
29
28
  <CardBlogpost
30
- v-for="(blogpost,index) in items"
31
- :key="blogpost._id"
32
- :blogpost="blogpost"
33
- :user="user"
34
- class="mn-b-medium"
35
- :class="`div${index}`"
29
+ v-for="item in items"
30
+ :key="item._id"
31
+ :blogpost="item"
32
+ :user="auth.state.user._id"
33
+ class="h-max-40r mn-b-medium"
36
34
  />
37
35
  </Feed>
38
-
39
- -->
40
- <Feed
41
- :category="route.params.category"
42
- :user="auth.state.user._id"
43
- :period="route.query.period"
44
- :following="route.params.category === 'following' ? auth.state.user._id : null"
45
- />
46
36
  </section>
47
37
  </template>
48
38
 
49
39
 
50
40
  <script setup="props">
51
- import { computed, onMounted, watch } from 'vue';
41
+ import { ref, computed, onMounted, watch } from 'vue';
52
42
  import { useRoute, useRouter } from 'vue-router';
53
43
 
54
44
  import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue';
55
- import Feed from '@pf/src/modules/community/components/sections/Feed.vue';
45
+ import Feed from '@pf/src/components/Feed/Feed.vue'
46
+
47
+ import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';
56
48
 
57
49
  // Import state
58
50
  import * as blog from '@pf/src/modules/community/store/blogposts.js';
@@ -65,7 +57,7 @@
65
57
  // if (!route.params.category) {
66
58
  // route.params.category = 'popular'
67
59
  // }
68
-
60
+
69
61
  onMounted(() => {
70
62
 
71
63
  if (route.query) {
@@ -73,7 +65,7 @@
73
65
 
74
66
  const newFilterValue = {
75
67
  tags: query.tags ? query.tags.split(',') : [],
76
- period: query.period ? query.period : 'week',
68
+ period: query.period ? query.period : null,
77
69
  };
78
70
 
79
71
  // проверяем наличие категории в route.params и добавляем ее в фильтр
@@ -83,6 +75,7 @@
83
75
 
84
76
  blog.state.filter = newFilterValue;
85
77
  }
78
+
86
79
  });
87
80
 
88
81
  watch(() => blog.state.filter, (newFilterValue, oldFilterValue) => {
@@ -10,18 +10,18 @@
10
10
  <div
11
11
  class="w-full h-full"
12
12
  >
13
- <Textarea
13
+ <!-- <Textarea
14
14
  v-if="post"
15
15
  :prop="post"
16
- :setFocus="true"
16
+ :setFocus="true"
17
17
  content="name"
18
18
  placeholder="Enter post title"
19
19
  class="h2"
20
- />
20
+ /> -->
21
21
  </div>
22
22
 
23
23
  <Constructor
24
- v-if="post"
24
+ v-if="post"
25
25
  :content="post.content"
26
26
  @update="update => post.content = update"
27
27
  />
@@ -38,8 +38,7 @@
38
38
  </section>
39
39
  </transition>
40
40
 
41
- <Popup
42
- title="Добавить участника"
41
+ <Popup
43
42
  @close-popup="closePublicationPopup"
44
43
  :isPopupOpen="isPublicationPopup"
45
44
  class="w-m-33r t-left pd-big bg-white radius-big"
@@ -49,6 +48,7 @@
49
48
  <BlockTags
50
49
  @tags-changed="newTags => post.tags = newTags"
51
50
  :tags="post.tags"
51
+ class="mn-b-small"
52
52
  />
53
53
 
54
54
  <h5 class="mn-b-thin">Add source:</h5>
@@ -154,13 +154,6 @@ onMounted(async () =>{
154
154
  name: post.value.owner.target.profile.name,
155
155
  photo: post.value.owner.target.profile.photo
156
156
  }
157
-
158
-
159
-
160
- console.log(dataPublics)
161
-
162
-
163
-
164
157
  })
165
158
  // /////////////////////////////////////////
166
159
  // Publication Form
@@ -206,6 +199,7 @@ function onDrafts() {
206
199
  if (selectedTags.value.length > 0) selectedTags.value.map(tag => (tag.text))
207
200
 
208
201
  post.value.status = "draft"
202
+ post.value.name = post.value.content[0].content
209
203
 
210
204
  if (route.params.url) {
211
205
  blog.update(post.value)
@@ -237,8 +231,7 @@ function onSubmit() {
237
231
  if (!selectedOrganization.value) post.value.organization = post.value.creator
238
232
 
239
233
  post.value.status = "published"
240
-
241
- console.log(post.value)
234
+ post.value.name = post.value.content[0].content
242
235
 
243
236
  if (route.params.url) {
244
237
  blog.update(post.value)
@@ -0,0 +1,123 @@
1
+ <template>
2
+ <div>
3
+ <CardHeader
4
+ class="mn-b-thin"
5
+ :entity="comment"
6
+ :entityType="'comment'"
7
+ :user="owner"
8
+ :owner="{target: comment.user}"
9
+ :creator="{target: comment.user}"
10
+ :date="comment.createdAt"
11
+ />
12
+ <div class="pd-t-zero">
13
+ <p class="p-big">{{ comment.content }}</p>
14
+ </div>
15
+
16
+ <div class="mn-t-thin flex-v-center flex-nowrap flex gap-small">
17
+
18
+ <button
19
+ v-if="totalReplies > 0"
20
+ @click="toggleChildren"
21
+ class="t-second cursor-pointer t-medium font-second"
22
+ >
23
+ {{ isExpanded ? 'Hide' : totalReplies + (totalReplies === 1 ? ' reply' : ' replies') }}
24
+ </button>
25
+
26
+ <button
27
+ v-if="owner"
28
+ class="font-second cursor-pointer t-transp t-medium"
29
+ @click="showReplyForm = true"
30
+ >
31
+ Reply
32
+ </button>
33
+
34
+ </div>
35
+
36
+ <div v-if="showReplyForm" class="mn-l-medium mn-t-small bg-white w-100 radius-small pd-small reply-form">
37
+ <textarea class="w-100" v-model="replyContent"></textarea>
38
+ <div class="mn-l-auto gap-thin flex-nowrap flex">
39
+ <button class="bg-grey-transp-25 button" @click="submitReply">Cancel</button>
40
+ <button class="bg-main button" @click="submitReply">Send</button>
41
+ </div>
42
+ </div>
43
+
44
+ <div v-if="isExpanded && comment.children && comment.children.length" class="br-solid br-l br-grey-transp-25">
45
+ <Comment
46
+ v-for="childComment in comment.children"
47
+ :key="childComment._id"
48
+ :comment="childComment"
49
+ :target="target"
50
+ :owner="owner"
51
+ @reply="handleReply"
52
+ @load-more="handleLoadMore"
53
+ class="mn-l-medium mn-t-small "
54
+ />
55
+ </div>
56
+
57
+ </div>
58
+ </template>
59
+
60
+ <script setup>
61
+ import { ref, computed } from 'vue';
62
+
63
+ import Comment from './Comment.vue';
64
+
65
+ import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
66
+
67
+ const props = defineProps({
68
+ comment: {
69
+ type: Object,
70
+ required: true
71
+ },
72
+ target: {
73
+ type: String,
74
+ required: true
75
+ },
76
+ owner: {
77
+ type: String,
78
+ required: true
79
+ }
80
+ });
81
+
82
+ const emit = defineEmits(['reply', 'load-more']);
83
+
84
+ const showReplyForm = ref(false);
85
+ const replyContent = ref('');
86
+ const isExpanded = ref(shouldBeExpanded(props.comment.depth))
87
+
88
+ function shouldBeExpanded(depth) {
89
+ return depth % 3 < 2
90
+ }
91
+
92
+ const totalReplies = computed(() => {
93
+ function countReplies(comment) {
94
+ if (!comment.children || comment.children.length === 0) {
95
+ return 0
96
+ }
97
+ return comment.children.length + comment.children.reduce((sum, child) => sum + countReplies(child), 0)
98
+ }
99
+ return countReplies(props.comment)
100
+ })
101
+
102
+ const toggleChildren = () => {
103
+ isExpanded.value = !isExpanded.value
104
+ }
105
+
106
+ const submitReply = () => {
107
+ emit('reply', props.comment._id, replyContent.value);
108
+ replyContent.value = '';
109
+ showReplyForm.value = false;
110
+ };
111
+
112
+ const handleReply = (parentId, content) => {
113
+ emit('reply', parentId, content);
114
+ };
115
+
116
+ const loadMoreChildren = () => {
117
+ emit('load-more', props.comment._id, props.comment.depth + 1);
118
+ };
119
+
120
+ const handleLoadMore = (commentId, depth) => {
121
+ emit('load-more', commentId, depth);
122
+ };
123
+ </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>
2
+ <div id="comments">
3
3
  <div>
4
4
  <h3 class="mn-b-small">{{ comments.length }} comments</h3>
5
5
 
@@ -15,21 +15,17 @@
15
15
  </div>
16
16
  </div>
17
17
 
18
- <div v-for="comment in comments" :key="comment._id" class="comment mn-b-small radius-big pd-medium bg-light">
19
-
20
- <CardHeader
21
- class="mn-b-medium"
22
- :entity="comment"
23
- :entityType="'comment'"
24
- :user="owner"
25
- :owner="{target: comment.user}"
26
- :creator="{target: comment.user}"
27
- :date="comment.createdAt"
18
+ <Comment
19
+ v-for="comment in comments"
20
+ :key="comment._id"
21
+ :comment="comment"
22
+ :target="target"
23
+ :type="type"
24
+ :owner="owner"
25
+ @reply="handleReply"
26
+ @load-more="loadMoreChildren"
27
+ class="comment mn-b-small radius-big pd-medium bg-light"
28
28
  />
29
- <div class="pd-t-zero">
30
- <p class="p-big">{{ comment.content }}</p>
31
- </div>
32
- </div>
33
29
  </div>
34
30
  </template>
35
31
 
@@ -37,19 +33,94 @@
37
33
  import { ref } from 'vue';
38
34
  import axios from 'axios';
39
35
 
40
- import CardHeader from '@pf/src/modules/globals/components/blocks/CardHeader.vue'
36
+ import Comment from './Comment.vue';
41
37
 
42
- const props = defineProps(['target', 'owner', 'type'])
38
+ const props = defineProps([
39
+ 'target',
40
+ 'owner',
41
+ 'type'
42
+ ])
43
43
 
44
44
  const $axios = axios.create({ baseURL: process.env.API_URL });
45
45
  const comments = ref([]);
46
46
  const commentContent = ref('');
47
47
 
48
48
  const fetchComments = async () => {
49
- const { data } = await $axios.get(`/comments/read?type=${props.type}&target=${props.target}&user=${props.owner}`);
50
- comments.value = data;
49
+ try {
50
+ const response = await axios.get('/comments/read', {
51
+ params: {
52
+ target: props.target,
53
+ type: props.type,
54
+ user: props.owner,
55
+ maxDepth: 2
56
+ }
57
+ });
58
+ comments.value = response.data;
59
+ } catch (error) {
60
+ console.error('Error fetching comments:', error);
61
+ }
51
62
  };
52
63
 
64
+ const handleReply = async (parentId, content) => {
65
+ try {
66
+ const response = await axios.post('/comments/create', {
67
+ content,
68
+ target: props.target,
69
+ type: props.type,
70
+ user: props.owner,
71
+ parent: parentId
72
+ });
73
+
74
+ const newComment = response.data;
75
+
76
+ // Обновляем дерево комментариев
77
+ updateCommentTree(comments.value, parentId, newComment);
78
+ } catch (error) {
79
+ console.error('Error posting reply:', error);
80
+ }
81
+ };
82
+
83
+ const loadMoreChildren = async (commentId, depth) => {
84
+ try {
85
+ const response = await axios.get('/comments/read', {
86
+ params: {
87
+ target: props.target,
88
+ type: props.type,
89
+ user: props.owner,
90
+ parentId: commentId,
91
+ depth: depth,
92
+ maxDepth: 10
93
+ }
94
+ });
95
+
96
+ // Обновляем дерево комментариев
97
+ updateCommentTree(comments.value, commentId, response.data, response.data.hasMore, true);
98
+ } catch (error) {
99
+ console.error('Error loading more comments:', error);
100
+ }
101
+ };
102
+
103
+ const updateCommentTree = (comments, parentId, newData, hasMore, isLoadMore = false) => {
104
+ for (let i = 0; i < comments.length; i++) {
105
+ if (comments[i]._id === parentId) {
106
+ if (isLoadMore) {
107
+ // Для загрузки дополнительных комментариев, добавляем их к существующим
108
+ comments[i].children = [...comments[i].children, ...newData];
109
+ comments[i].hasMore = hasMore;
110
+ } else {
111
+ // Для нового комментария, добавляем его в начало списка дочерних
112
+ comments[i].children.push(newData);
113
+ }
114
+ return true;
115
+ }
116
+ if (comments[i].children && updateCommentTree(comments[i].children, parentId, newData, hasMore, isLoadMore)) {
117
+ return true;
118
+ }
119
+ }
120
+ return false;
121
+ };
122
+
123
+
53
124
  const submitComment = async () => {
54
125
  if (!commentContent.value) {
55
126
  return;
@@ -6,10 +6,9 @@
6
6
  Discover Our
7
7
  <router-link
8
8
  :to="{ name:'Blog' }"
9
- class="transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin mn-l-thin radius-extra flex flex-v-center"
9
+ class="transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"
10
10
  >
11
11
  <b>Community</b>
12
- <IconArrow class="mn-l-thin radius-extra bg-white i-big"/>
13
12
  </router-link>
14
13
  </h2>
15
14
 
@@ -21,7 +20,8 @@
21
20
  skip: 0,
22
21
  limit: 8,
23
22
  user: auth.state.user._id,
24
- period: 'year'
23
+ period: 'year',
24
+ category: 'featured'
25
25
  }"
26
26
  :text="{
27
27
  messages: {
@@ -54,9 +54,6 @@
54
54
  import Feed from '@pf/src/components/Feed/Feed.vue'
55
55
  import Slider from '@pf/src/components/Slider/Slider.vue'
56
56
 
57
- import IconArrow from '@pf/src/modules/icons/navigation/IconArrow.vue'
58
-
59
-
60
57
  import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';
61
58
  // Import state
62
59
  import * as blog from '@pf/src/modules/community/store/blogposts.js';
@@ -58,7 +58,7 @@ const controllerFactory = (db) => {
58
58
  queryProcessorGlobals.getOwnerUserLookupStage(),
59
59
  queryProcessorGlobals.getOwnerOrganizationLookupStage(),
60
60
  queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
61
- { $sample: { size: Number(req.query.limit) } }
61
+ // { $sample: { size: Number(req.query.limit) } },
62
62
  ]
63
63
 
64
64
  try {