@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
@@ -1,30 +1,28 @@
1
1
  import { default as s } from "./components/layouts/Community.vue.js";
2
2
  import { default as f } from "./components/pages/CreateBlogPost.vue.js";
3
3
  import { default as l } from "./components/pages/BlogPost.vue.js";
4
- import { default as d } from "./components/pages/Blog.vue.js";
5
- import { default as x } from "./components/blocks/FooterBlogpost.vue.js";
4
+ import { default as u } from "./components/pages/Blog.vue.js";
5
+ import { default as d } from "./components/blocks/FooterBlogpost.vue.js";
6
6
  import { default as i } from "./components/blocks/Activity.vue.js";
7
7
  import { default as B } from "./components/blocks/CardBlogpost.vue.js";
8
- import { default as b } from "./components/sections/Feed.vue.js";
9
- import { default as P } from "./components/sections/JoinUs.vue.js";
10
- import { default as F } from "./components/sections/Comments.vue.js";
11
- import { default as v } from "./components/sections/HotPosts.vue.js";
8
+ import { default as b } from "./components/sections/JoinUs.vue.js";
9
+ import { default as P } from "./components/sections/Comments.vue.js";
10
+ import { default as S } from "./components/sections/HotPosts.vue.js";
12
11
  import * as o from "./store/blogposts.js";
13
12
  import * as t from "./store/reactions.js";
14
- import { default as H } from "./router/blogposts.js";
13
+ import { default as A } from "./router/blogposts.js";
15
14
  export {
16
15
  i as Activity,
17
- d as Blog,
16
+ u as Blog,
18
17
  l as BlogPost,
19
18
  B as CardBlogpost,
20
- F as Comments,
19
+ P as Comments,
21
20
  s as Community,
22
21
  f as CreateBlogPost,
23
- b as Feed,
24
- x as FooterBlogpost,
25
- v as HotPosts,
26
- P as JoinUs,
27
- H as blogpostsRoutes,
22
+ d as FooterBlogpost,
23
+ S as HotPosts,
24
+ b as JoinUs,
25
+ A as blogpostsRoutes,
28
26
  o as blogpostsStore,
29
27
  t as reactionsStore
30
28
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("../../../globals/components/blocks/CardHeader.vue.cjs"),m=require("./FooterBlogpost.vue.cjs"),g=require("../../../../components/Text/Text.vue.cjs");;/* empty css */const p=require("../../../icons/navigation/IconEdit.vue.cjs"),b=require("vue-router"),y={class:"pos-relative bg-light radius-big flex-column flex"},f={class:"pd-t-zero pd-b-zero pd-medium"},h={key:0,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},k={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},v={key:1,class:"mn-b-small t-transp p-big"},B={key:2,class:"mn-b-small h2"},x=["src"],V={key:2,controls:"",class:"mn-b-medium object-fit-cover w-100 h-max-20r"},E=["src"],N={__name:"CardBlogpost",props:{blogpost:{type:Object},user:{type:String},type:{type:String},hideDescription:{type:Boolean,default:!1}},setup(t){const u=b.useRouter(),s=t,l=e.computed(()=>s.blogpost.content.find(o=>o.type==="ImageUpload")),r=e.computed(()=>s.blogpost.content.find(o=>o.type==="Video")),n=e.computed(()=>s.blogpost.content.find(o=>o.type==="Textarea"));return(o,a)=>{var c;const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("article",y,[t.user&&t.user===t.blogpost.creator.target._id?(e.openBlock(),e.createBlock(i,{key:0,to:{name:"Edit BlogPost",params:{url:t.blogpost.url}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])):e.createCommentVNode("",!0),e.createVNode(d.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.blogpost,entityType:"blogpost",user:t.user,owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt},null,8,["class","entity","user","owner","creator","date"]),e.createElementVNode("section",f,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(g.default,{text:t.blogpost.name||"",maxLen:80,class:"h3 d-block",onClick:a[0]||(a[0]=C=>e.unref(u).push({name:"BlogPost",params:{url:t.blogpost.url}}))},null,8,["text"]),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",k,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),n.value&&n.value.content&&t.type!=="blogpostPage"&&!t.hideDescription?(e.openBlock(),e.createElementBlock("p",v,e.toDisplayString(n.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",B,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),l.value&&l.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:1,src:(o.FILE_SERVER_URL||"")+l.value.content,alt:"Blog post image",class:"mn-b-medium object-fit-cover w-100 h-min-10r h-100"},null,8,x)):e.createCommentVNode("",!0),!((c=l.value)!=null&&c.content)&&r.value&&r.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("video",V,[e.createElementVNode("source",{src:r.value.content,type:"video/mp4"},null,8,E),e.createTextVNode(" Your browser does not support the video tag. ")])):e.createCommentVNode("",!0),e.createVNode(m.default,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])])}}};exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),d=require("./FooterBlogpost.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs");;/* empty css */const g=require("vue-router"),b={class:"pos-relative bg-light radius-big flex-column flex"},p={class:"pd-t-zero pd-b-zero pd-medium"},y={key:0,class:"cursor-pointer mn-b-thin flex-nowrap flex w-100"},f={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},h={key:1,class:"mn-b-small t-transp p-big"},v={key:2,class:"mn-b-small h2"},k=["src"],B={key:1,controls:"",class:"mn-b-medium object-fit-cover w-100 h-max-20r"},x=["src"],V={__name:"CardBlogpost",props:{blogpost:{type:Object},user:{type:String},type:{type:String},hideDescription:{type:Boolean,default:!1}},setup(t){const i=g.useRouter(),n=t,l=e.computed(()=>n.blogpost.content.find(o=>o.type==="ImageUpload")),s=e.computed(()=>n.blogpost.content.find(o=>o.type==="Video")),r=e.computed(()=>n.blogpost.content.find(o=>o.type==="Textarea"));return(o,a)=>{var c;return e.openBlock(),e.createElementBlock("article",b,[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.blogpost,entityType:"blogpost",user:t.user,owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt,actions:t.user&&t.user===t.blogpost.creator.target._id?[{to:{name:"Edit BlogPost",params:{url:t.blogpost.url}},label:"Edit"}]:null},null,8,["class","entity","user","owner","creator","date","actions"]),e.createElementVNode("section",p,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(m.default,{text:t.blogpost.name||"",maxLen:80,class:"h3 d-block",onClick:a[0]||(a[0]=E=>e.unref(i).push({name:"BlogPost",params:{url:t.blogpost.url}}))},null,8,["text"]),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",f,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value&&r.value.content&&t.type!=="blogpostPage"&&!t.hideDescription?(e.openBlock(),e.createElementBlock("p",h,e.toDisplayString(r.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",v,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default")]),l.value&&l.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+l.value.content,alt:"Blog post image",class:"mn-b-medium object-fit-cover w-100 h-min-10r h-100"},null,8,k)):e.createCommentVNode("",!0),!((c=l.value)!=null&&c.content)&&s.value&&s.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("video",B,[e.createElementVNode("source",{src:s.value.content,type:"video/mp4"},null,8,x),e.createTextVNode(" Your browser does not support the video tag. ")])):e.createCommentVNode("",!0),e.createVNode(d.default,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])])}}};exports.default=V;
@@ -1,27 +1,26 @@
1
- import { computed as u, resolveComponent as h, openBlock as o, createElementBlock as s, createBlock as y, withCtx as v, createVNode as n, createCommentVNode as l, normalizeClass as x, createElementVNode as p, unref as k, toDisplayString as m, renderSlot as w, createTextVNode as B } from "vue";
2
- import P from "../../../globals/components/blocks/CardHeader.vue.js";
3
- import V from "./FooterBlogpost.vue.js";
4
- import C from "../../../../components/Text/Text.vue.js";
1
+ import { computed as c, openBlock as o, createElementBlock as l, createVNode as m, normalizeClass as f, createElementVNode as b, unref as y, toDisplayString as u, createCommentVNode as s, renderSlot as h, createTextVNode as v } from "vue";
2
+ import x from "../../../globals/components/blocks/CardHeader.vue.js";
3
+ import k from "./FooterBlogpost.vue.js";
4
+ import w from "../../../../components/Text/Text.vue.js";
5
5
  /* empty css */
6
- import E from "../../../icons/navigation/IconEdit.vue.js";
7
- import { useRouter as $ } from "vue-router";
8
- const S = { class: "pos-relative bg-light radius-big flex-column flex" }, z = { class: "pd-t-zero pd-b-zero pd-medium" }, N = {
6
+ import { useRouter as B } from "vue-router";
7
+ const E = { class: "pos-relative bg-light radius-big flex-column flex" }, P = { class: "pd-t-zero pd-b-zero pd-medium" }, V = {
9
8
  key: 0,
10
9
  class: "cursor-pointer mn-b-thin flex-nowrap flex w-100"
11
- }, R = {
10
+ }, S = {
12
11
  key: 0,
13
12
  class: "pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"
14
- }, T = {
13
+ }, $ = {
15
14
  key: 1,
16
15
  class: "mn-b-small t-transp p-big"
17
- }, j = {
16
+ }, z = {
18
17
  key: 2,
19
18
  class: "mn-b-small h2"
20
- }, D = ["src"], I = {
21
- key: 2,
19
+ }, C = ["src"], N = {
20
+ key: 1,
22
21
  controls: "",
23
22
  class: "mn-b-medium object-fit-cover w-100 h-max-20r"
24
- }, L = ["src"], J = {
23
+ }, R = ["src"], F = {
25
24
  __name: "CardBlogpost",
26
25
  props: {
27
26
  blogpost: {
@@ -38,83 +37,67 @@ const S = { class: "pos-relative bg-light radius-big flex-column flex" }, z = {
38
37
  default: !1
39
38
  }
40
39
  },
41
- setup(e) {
42
- const b = $(), a = e, r = u(() => a.blogpost.content.find((t) => t.type === "ImageUpload")), i = u(() => a.blogpost.content.find((t) => t.type === "Video")), c = u(() => a.blogpost.content.find((t) => t.type === "Textarea"));
43
- return (t, d) => {
40
+ setup(t) {
41
+ const p = B(), a = t, n = c(() => a.blogpost.content.find((e) => e.type === "ImageUpload")), r = c(() => a.blogpost.content.find((e) => e.type === "Video")), i = c(() => a.blogpost.content.find((e) => e.type === "Textarea"));
42
+ return (e, d) => {
44
43
  var g;
45
- const f = h("router-link");
46
- return o(), s("article", S, [
47
- e.user && e.user === e.blogpost.creator.target._id ? (o(), y(f, {
48
- key: 0,
49
- to: {
50
- name: "Edit BlogPost",
51
- params: {
52
- url: e.blogpost.url
53
- }
54
- },
55
- class: "cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
56
- }, {
57
- default: v(() => [
58
- n(E, {
59
- class: "i-regular",
60
- classes: "fill-white"
61
- })
62
- ]),
63
- _: 1
64
- }, 8, ["to"])) : l("", !0),
65
- n(P, {
66
- class: x({
67
- "mn-b-small pd-medium": e.type !== "short",
68
- "flex-child-order-last flex-child mn-l-small": e.type === "short"
44
+ return o(), l("article", E, [
45
+ m(x, {
46
+ class: f({
47
+ "mn-b-small pd-medium": t.type !== "short",
48
+ "flex-child-order-last flex-child mn-l-small": t.type === "short"
69
49
  }),
70
- entity: e.blogpost,
50
+ entity: t.blogpost,
71
51
  entityType: "blogpost",
72
- user: e.user,
73
- owner: e.blogpost.owner,
74
- creator: e.blogpost.creator,
75
- date: e.blogpost.createdAt
76
- }, null, 8, ["class", "entity", "user", "owner", "creator", "date"]),
77
- p("section", z, [
78
- e.type !== "blogpostPage" ? (o(), s("div", N, [
79
- n(C, {
80
- text: e.blogpost.name || "",
52
+ user: t.user,
53
+ owner: t.blogpost.owner,
54
+ creator: t.blogpost.creator,
55
+ date: t.blogpost.createdAt,
56
+ actions: t.user && t.user === t.blogpost.creator.target._id ? [
57
+ { to: { name: "Edit BlogPost", params: { url: t.blogpost.url } }, label: "Edit" }
58
+ ] : null
59
+ }, null, 8, ["class", "entity", "user", "owner", "creator", "date", "actions"]),
60
+ b("section", P, [
61
+ t.type !== "blogpostPage" ? (o(), l("div", V, [
62
+ m(w, {
63
+ text: t.blogpost.name || "",
81
64
  maxLen: 80,
82
65
  class: "h3 d-block",
83
- onClick: d[0] || (d[0] = (U) => k(b).push({
66
+ onClick: d[0] || (d[0] = (T) => y(p).push({
84
67
  name: "BlogPost",
85
68
  params: {
86
- url: e.blogpost.url
69
+ url: t.blogpost.url
87
70
  }
88
71
  }))
89
72
  }, null, 8, ["text"]),
90
- e.blogpost.status === "draft" ? (o(), s("div", R, m(e.blogpost.status), 1)) : l("", !0)
91
- ])) : l("", !0),
92
- c.value && c.value.content && e.type !== "blogpostPage" && !e.hideDescription ? (o(), s("p", T, m(c.value.content.slice(0, 120)) + "... ", 1)) : l("", !0),
93
- e.type === "blogpostPage" ? (o(), s("h3", j, m(e.blogpost.name), 1)) : l("", !0),
94
- w(t.$slots, "default")
73
+ t.blogpost.status === "draft" ? (o(), l("div", S, u(t.blogpost.status), 1)) : s("", !0)
74
+ ])) : s("", !0),
75
+ i.value && i.value.content && t.type !== "blogpostPage" && !t.hideDescription ? (o(), l("p", $, u(i.value.content.slice(0, 120)) + "... ", 1)) : s("", !0),
76
+ t.type === "blogpostPage" ? (o(), l("h3", z, u(t.blogpost.name), 1)) : s("", !0),
77
+ h(e.$slots, "default")
95
78
  ]),
96
- r.value && r.value.content && e.type !== "blogpostPage" ? (o(), s("img", {
97
- key: 1,
98
- src: (t.FILE_SERVER_URL || "") + r.value.content,
79
+ n.value && n.value.content && t.type !== "blogpostPage" ? (o(), l("img", {
80
+ key: 0,
81
+ src: (e.FILE_SERVER_URL || "") + n.value.content,
99
82
  alt: "Blog post image",
100
83
  class: "mn-b-medium object-fit-cover w-100 h-min-10r h-100"
101
- }, null, 8, D)) : l("", !0),
102
- !((g = r.value) != null && g.content) && i.value && i.value.content && e.type !== "blogpostPage" ? (o(), s("video", I, [
103
- p("source", {
104
- src: i.value.content,
84
+ }, null, 8, C)) : s("", !0),
85
+ !((g = n.value) != null && g.content) && r.value && r.value.content && t.type !== "blogpostPage" ? (o(), l("video", N, [
86
+ b("source", {
87
+ src: r.value.content,
105
88
  type: "video/mp4"
106
- }, null, 8, L),
107
- B(" Your browser does not support the video tag. ")
108
- ])) : l("", !0),
109
- n(V, {
89
+ }, null, 8, R),
90
+ v(" Your browser does not support the video tag. ")
91
+ ])) : s("", !0),
92
+ m(k, {
110
93
  class: "pd-t-zero pd-medium",
111
- blogpost: e.blogpost,
112
- user: e.user
94
+ blogpost: t.blogpost,
95
+ user: t.user
113
96
  }, null, 8, ["blogpost", "user"])
114
97
  ]);
115
98
  };
116
99
  }
117
100
  };
118
101
  export {
119
- J as default
102
+ F as default
120
103
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("vue-router");const i=require("../../store/reactions.cjs"),p={class:"t-semi br-top-dark flex-nowrap flex-nojustify flex"},m=e.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"ยท",-1),g={class:"cursor-pointer"},v=e.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"ยท",-1),f={__name:"FooterBlogpost",props:["blogpost","owner","user"],setup(l){const o=l,r=e.ref(o.blogpost.numberOfReactions),a=e.ref(o.blogpost.isReacted),s=e.ref(o.blogpost.reactionId);async function u(c){if(!o.user){alert("Please login to add a reaction");return}try{const t={target:o.blogpost._id,type:"blogpost",user:o.user,class:"like"},n=await i.actions.create(t);n.reaction.class==="like"&&(r.value+=1,a.value=!0,s.value=n.reaction._id)}catch(t){console.error(t),alert("Error adding reaction. Please try again later.")}}async function d(c){if(!o.user){alert("Please login to add a reaction");return}try{const t={_id:s.value};await i.actions.delete(t),r.value-=1,a.value=!1,s.value=null}catch{alert("Error adding reaction. Please try again later.")}}return(c,t)=>(e.openBlock(),e.createElementBlock("footer",p,[e.createTextVNode(" ๐Ÿ‘๏ธ "+e.toDisplayString(l.blogpost.views)+" ",1),m,e.createElementVNode("div",g,[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"cursor-pointer",onClick:t[0]||(t[0]=n=>u())}," ๐Ÿ‘ "+e.toDisplayString(r.value),1)),a.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cursor-pointer",onClick:t[1]||(t[1]=n=>d())}," ๐Ÿ‘ "+e.toDisplayString(r.value),1)):e.createCommentVNode("",!0)]),v,e.createTextVNode(" ๐Ÿ’ฌ "+e.toDisplayString(l.blogpost.numberOfComments),1)]))}};exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("vue-router");const c=require("../../store/reactions.cjs"),g={class:"t-semi br-top-dark flex-nowrap flex-nojustify flex"},m={class:"hover-bg-white pd-l-thin pd-r-thin radius-big cursor-pointer"},v={__name:"FooterBlogpost",props:["blogpost","owner","user"],setup(r){const o=r,n=e.ref(o.blogpost.numberOfReactions),s=e.ref(o.blogpost.isReacted),l=e.ref(o.blogpost.reactionId);async function u(i){if(!o.user){alert("Please login to add a reaction");return}try{const t={target:o.blogpost._id,type:"blogpost",user:o.user,class:"like"},a=await c.actions.create(t);a.reaction.class==="like"&&(n.value+=1,s.value=!0,l.value=a.reaction._id)}catch(t){console.error(t),alert("Error adding reaction. Please try again later.")}}async function d(i){if(!o.user){alert("Please login to add a reaction");return}try{const t={_id:l.value};await c.actions.delete(t),n.value-=1,s.value=!1,l.value=null}catch{alert("Error adding reaction. Please try again later.")}}return(i,t)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("footer",g,[e.createVNode(a,{to:{name:"BlogPost",params:{url:r.blogpost.url}},class:"font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big"},{default:e.withCtx(()=>[e.createTextVNode(" ๐Ÿ‘๏ธ "+e.toDisplayString(r.blogpost.views),1)]),_:1},8,["to"]),e.createElementVNode("div",m,[s.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"cursor-pointer",onClick:t[0]||(t[0]=p=>u())}," ๐Ÿ‘ "+e.toDisplayString(n.value),1)),s.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cursor-pointer",onClick:t[1]||(t[1]=p=>d())}," ๐Ÿ‘ "+e.toDisplayString(n.value),1)):e.createCommentVNode("",!0)]),e.createVNode(a,{to:{name:"BlogPost",hash:"#comments",params:{url:r.blogpost.url}},class:"font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big"},{default:e.withCtx(()=>[e.createTextVNode(" ๐Ÿ’ฌ "+e.toDisplayString(r.blogpost.numberOfComments),1)]),_:1},8,["to"])])}}};exports.default=v;
@@ -1,12 +1,12 @@
1
- import { ref as c, openBlock as i, createElementBlock as u, createTextVNode as m, toDisplayString as s, createElementVNode as d, createCommentVNode as f } from "vue";
1
+ import { ref as i, resolveComponent as k, openBlock as c, createElementBlock as u, createVNode as p, withCtx as g, createTextVNode as m, toDisplayString as s, createElementVNode as w, createCommentVNode as f } from "vue";
2
2
  import "vue-router";
3
- import { actions as g } from "../../store/reactions.js";
4
- const y = { class: "t-semi br-top-dark flex-nowrap flex-nojustify flex" }, k = /* @__PURE__ */ d("span", { class: "mn-r-small mn-l-small d-block" }, "ยท", -1), _ = { class: "cursor-pointer" }, x = /* @__PURE__ */ d("span", { class: "mn-r-small mn-l-small d-block" }, "ยท", -1), E = {
3
+ import { actions as v } from "../../store/reactions.js";
4
+ const x = { class: "t-semi br-top-dark flex-nowrap flex-nojustify flex" }, C = { class: "hover-bg-white pd-l-thin pd-r-thin radius-big cursor-pointer" }, R = {
5
5
  __name: "FooterBlogpost",
6
6
  props: ["blogpost", "owner", "user"],
7
- setup(n) {
8
- const t = n, o = c(t.blogpost.numberOfReactions), r = c(t.blogpost.isReacted), l = c(t.blogpost.reactionId);
9
- async function v(p) {
7
+ setup(o) {
8
+ const t = o, a = i(t.blogpost.numberOfReactions), n = i(t.blogpost.isReacted), l = i(t.blogpost.reactionId);
9
+ async function b(d) {
10
10
  if (!t.user) {
11
11
  alert("Please login to add a reaction");
12
12
  return;
@@ -17,44 +17,72 @@ const y = { class: "t-semi br-top-dark flex-nowrap flex-nojustify flex" }, k = /
17
17
  type: "blogpost",
18
18
  user: t.user,
19
19
  class: "like"
20
- }, a = await g.create(e);
21
- a.reaction.class === "like" && (o.value += 1, r.value = !0, l.value = a.reaction._id);
20
+ }, r = await v.create(e);
21
+ r.reaction.class === "like" && (a.value += 1, n.value = !0, l.value = r.reaction._id);
22
22
  } catch (e) {
23
23
  console.error(e), alert("Error adding reaction. Please try again later.");
24
24
  }
25
25
  }
26
- async function b(p) {
26
+ async function h(d) {
27
27
  if (!t.user) {
28
28
  alert("Please login to add a reaction");
29
29
  return;
30
30
  }
31
31
  try {
32
32
  const e = { _id: l.value };
33
- await g.delete(e), o.value -= 1, r.value = !1, l.value = null;
33
+ await v.delete(e), a.value -= 1, n.value = !1, l.value = null;
34
34
  } catch {
35
35
  alert("Error adding reaction. Please try again later.");
36
36
  }
37
37
  }
38
- return (p, e) => (i(), u("footer", y, [
39
- m(" ๐Ÿ‘๏ธ " + s(n.blogpost.views) + " ", 1),
40
- k,
41
- d("div", _, [
42
- r.value ? f("", !0) : (i(), u("div", {
43
- key: 0,
44
- class: "cursor-pointer",
45
- onClick: e[0] || (e[0] = (a) => v())
46
- }, " ๐Ÿ‘ " + s(o.value), 1)),
47
- r.value ? (i(), u("div", {
48
- key: 1,
49
- class: "cursor-pointer",
50
- onClick: e[1] || (e[1] = (a) => b())
51
- }, " ๐Ÿ‘ " + s(o.value), 1)) : f("", !0)
52
- ]),
53
- x,
54
- m(" ๐Ÿ’ฌ " + s(n.blogpost.numberOfComments), 1)
55
- ]));
38
+ return (d, e) => {
39
+ const r = k("router-link");
40
+ return c(), u("footer", x, [
41
+ p(r, {
42
+ to: {
43
+ name: "BlogPost",
44
+ params: {
45
+ url: o.blogpost.url
46
+ }
47
+ },
48
+ class: "font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big"
49
+ }, {
50
+ default: g(() => [
51
+ m(" ๐Ÿ‘๏ธ " + s(o.blogpost.views), 1)
52
+ ]),
53
+ _: 1
54
+ }, 8, ["to"]),
55
+ w("div", C, [
56
+ n.value ? f("", !0) : (c(), u("div", {
57
+ key: 0,
58
+ class: "cursor-pointer",
59
+ onClick: e[0] || (e[0] = (y) => b())
60
+ }, " ๐Ÿ‘ " + s(a.value), 1)),
61
+ n.value ? (c(), u("div", {
62
+ key: 1,
63
+ class: "cursor-pointer",
64
+ onClick: e[1] || (e[1] = (y) => h())
65
+ }, " ๐Ÿ‘ " + s(a.value), 1)) : f("", !0)
66
+ ]),
67
+ p(r, {
68
+ to: {
69
+ name: "BlogPost",
70
+ hash: "#comments",
71
+ params: {
72
+ url: o.blogpost.url
73
+ }
74
+ },
75
+ class: "font-second cursor-pointer hover-bg-white pd-l-thin pd-r-thin radius-big"
76
+ }, {
77
+ default: g(() => [
78
+ m(" ๐Ÿ’ฌ " + s(o.blogpost.numberOfComments), 1)
79
+ ]),
80
+ _: 1
81
+ }, 8, ["to"])
82
+ ]);
83
+ };
56
84
  }
57
85
  };
58
86
  export {
59
- E as default
87
+ R as default
60
88
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),_=require("../../../icons/entities/IconRecent.vue.cjs"),w=require("../../../icons/entities/IconFollowing.vue.cjs"),m=require("../../store/blogposts.cjs"),l=require("../../../auth/store/auth.cjs"),c=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={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"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-small"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=d.useRoute(),a=d.useRouter(),p=({membership:u,status:r,target:s},i,t)=>{k.mutations.handleMembershipUpdate(c.state.current,u,r,s,i,t)};return(u,r)=>{const s=e.resolveComponent("router-link"),i=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:r[0]||(r[0]=t=>e.unref(a).push({name:"Blog",params:{category:"featured"}}))},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[1]||(r[1]=t=>e.unref(a).push({name:"Blog",params:{category:"popular"}}))},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[2]||(r[2]=t=>e.unref(a).push({name:"Blog",params:{category:"new"}}))},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),l.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:r[3]||(r[3]=t=>e.unref(a).push({name:"Blog",params:{category:"following"}}))},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(s,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h2",y,[B,e.createVNode(f.default,{options:["today","week","month","year"],select:m.state.filter.period,"onUpdate:select":r[4]||(r[4]=t=>m.state.filter.period=t),placeholder:"Select type",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h2 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(i,null,{default:e.withCtx(({Component:t,route:n})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{ref:"page",key:n.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,l.state.user._id?(e.openBlock(),e.createBlock(s,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:t=>c.actions.read(t),state:c.state},options:{user:l.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,n=>(e.openBlock(),e.createBlock(h.default,{key:n._id,organization:n,user:l.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={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"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;