@ozdao/prometheus-framework 0.2.39 → 0.2.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. package/dist/auth.server.js +1 -2
  2. package/dist/auth.server.mjs +1 -2
  3. package/dist/files.server.js +1 -2
  4. package/dist/files.server.mjs +1 -2
  5. package/dist/globals.server.js +1 -1
  6. package/dist/globals.server.mjs +1 -1
  7. package/dist/mailing-10560277.mjs +78 -0
  8. package/dist/mailing-902d13d5.js +77 -0
  9. package/dist/main.css +1 -1
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -2
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  14. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
  16. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
  18. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +13 -9
  20. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  21. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +4 -0
  22. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +26 -22
  24. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +29 -30
  26. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
  38. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -0
  39. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +69 -0
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  42. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  44. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  56. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  58. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/store/auth.js +8 -8
  60. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/community/community.client.js +18 -20
  64. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +88 -62
  66. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +97 -68
  68. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +35 -34
  70. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +18 -18
  72. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +2 -2
  73. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +5 -5
  75. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +4 -4
  77. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +65 -19
  79. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.js +9 -9
  81. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +8 -7
  83. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -6
  85. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  86. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
  87. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
  89. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +64 -70
  91. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  92. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +5 -5
  98. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +6 -5
  100. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  102. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +43 -42
  106. package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.cjs +1 -0
  107. package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.js +30 -0
  108. package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.cjs +1 -0
  109. package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.js +47 -0
  110. package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.cjs +1 -0
  111. package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.js +28 -0
  112. package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.cjs +1 -0
  113. package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.js +45 -0
  114. package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.cjs +1 -0
  115. package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.js +32 -0
  116. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +3 -3
  118. package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.js +25 -14
  120. package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.cjs +1 -0
  121. package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.js +44 -0
  122. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +90 -67
  124. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  126. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  128. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  130. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  134. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -42
  138. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
  144. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  148. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  150. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +60 -55
  154. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  156. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  160. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +18 -17
  164. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +20 -21
  166. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +7 -7
  167. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  168. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  169. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  173. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +6 -6
  177. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  181. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +37 -34
  185. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +23 -23
  187. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  189. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +8 -8
  190. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +7 -7
  192. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  196. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  198. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +31 -30
  200. package/dist/prometheus-framework.cjs.js +20 -20
  201. package/dist/prometheus-framework.es.js +1278 -1288
  202. package/dist/style.css +1 -1
  203. package/package.json +1 -1
  204. package/src/components/Button/Button.vue +2 -3
  205. package/src/components/Chips/Chips.vue +9 -3
  206. package/src/components/Countdown/Countdown.vue +4 -3
  207. package/src/components/Dropdown/Dropdown.vue +9 -3
  208. package/src/components/Feed/Feed.vue +7 -11
  209. package/src/components/Feed/Masonry.vue +177 -0
  210. package/src/components/FieldBig/FieldBig.vue +3 -3
  211. package/src/components/Header/Header.vue +2 -0
  212. package/src/components/Navigation/Navigation.vue +2 -0
  213. package/src/components/Shader/Shader.vue +161 -116
  214. package/src/components/Slider/Slider.vue +92 -0
  215. package/src/modules/applications/applications.client.js +2 -0
  216. package/src/modules/applications/components/sections/SubscribeNewsletter.vue +114 -0
  217. package/src/modules/applications/controllers/applications.controller.js +125 -136
  218. package/src/modules/applications/models/application.model.js +22 -7
  219. package/src/modules/applications/routes/applications.routes.js +29 -13
  220. package/src/modules/auth/controllers/auth.controller.js +2 -3
  221. package/src/modules/auth/store/auth.js +3 -5
  222. package/src/modules/chats/components/blocks/ChatMessage.vue +3 -2
  223. package/src/modules/chats/components/pages/ChatPage.vue +6 -6
  224. package/src/modules/chats/components/sections/ChatWindow.vue +57 -12
  225. package/src/modules/chats/store/chat.store.js +6 -1
  226. package/src/modules/community/community.client.js +0 -2
  227. package/src/modules/community/components/blocks/CardBlogpost.vue +71 -33
  228. package/src/modules/community/components/layouts/Community.vue +65 -26
  229. package/src/modules/community/components/pages/Blog.vue +37 -0
  230. package/src/modules/community/components/pages/BlogPost.vue +5 -6
  231. package/src/modules/community/components/pages/Community.vue +1 -0
  232. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -0
  233. package/src/modules/community/components/sections/Feed.vue +1 -1
  234. package/src/modules/community/components/sections/HotPosts.vue +64 -24
  235. package/src/modules/community/components/sections/JoinUs.vue +4 -5
  236. package/src/modules/community/store/blogposts.js +1 -0
  237. package/src/modules/constructor/components/elements/Embed.vue +7 -6
  238. package/src/modules/constructor/components/elements/Image.vue +2 -2
  239. package/src/modules/constructor/components/elements/Textarea.vue +1 -1
  240. package/src/modules/constructor/components/sections/Constructor.vue +3 -19
  241. package/src/modules/events/components/pages/EditEvent.vue +48 -3
  242. package/src/modules/events/components/pages/Event.vue +16 -8
  243. package/src/modules/events/components/sections/HeroEvent.vue +32 -28
  244. package/src/modules/events/components/sections/SectionMainGuest.vue +3 -2
  245. package/src/modules/events/components/sections/SectionPreviousEvents.vue +22 -15
  246. package/src/modules/events/models/event.model.js +9 -0
  247. package/src/modules/files/middlewares/server/middlewareBusboy.js +14 -3
  248. package/src/modules/files/routes/files.routes.js +9 -1
  249. package/src/modules/globals/components/blocks/CardHeader.vue +6 -3
  250. package/src/modules/globals/utils/mailing.js +12 -0
  251. package/src/modules/icons/entities/IconEarn.vue +20 -0
  252. package/src/modules/icons/entities/IconFeatured.vue +14 -0
  253. package/src/modules/icons/entities/IconFollowing.vue +17 -0
  254. package/src/modules/icons/entities/IconPopular.vue +14 -0
  255. package/src/modules/icons/entities/IconRecent.vue +17 -0
  256. package/src/modules/icons/navigation/IconAdd.vue +1 -3
  257. package/src/modules/icons/navigation/IconArrow.vue +21 -0
  258. package/src/modules/icons/navigation/IconCheckmark.vue +16 -0
  259. package/src/modules/icons/navigation/IconChevronRight.vue +2 -2
  260. package/src/modules/icons/navigation/IconEdit.vue +16 -2
  261. package/src/modules/icons/navigation/IconEllipsis.vue +16 -0
  262. package/src/modules/icons/placeholders/PlaceholderChat.vue +9 -0
  263. package/src/modules/landing/components/sections/MobileApp.vue +38 -21
  264. package/src/modules/landing/components/sections/SectionEarn.vue +104 -0
  265. package/src/modules/landing/components/sections/SectionFeatures.vue +7 -8
  266. package/src/modules/marketplace/components/layouts/Marketplace.vue +3 -3
  267. package/src/modules/orders/components/blocks/StatusHistory.vue +7 -1
  268. package/src/modules/orders/components/pages/Order.vue +3 -4
  269. package/src/modules/orders/store/shopcart.js +21 -5
  270. package/src/modules/organizations/components/blocks/CardOrganization.vue +6 -6
  271. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  272. package/src/modules/organizations/components/sections/DetailsTab.vue +42 -43
  273. package/src/modules/organizations/components/sections/Publics.vue +3 -4
  274. package/src/modules/payments/controller/payments.controller.js +54 -200
  275. package/src/modules/payments/controller/payments.tinkoff.controller.js +242 -0
  276. package/src/modules/payments/models/payment.model.js +22 -0
  277. package/src/modules/payments/routes/payments.routes.js +4 -25
  278. package/src/modules/payments/routes/payments.tinkoff.routes.js +58 -0
  279. package/src/modules/products/components/pages/Product.vue +3 -1
  280. package/src/modules/products/components/sections/HeroRecommendation.vue +9 -170
  281. package/src/modules/products/components/sections/MenuSection.vue +4 -4
  282. package/src/modules/products/components/sections/PopularProducts.vue +3 -3
  283. package/src/modules/products/components/sections/SectionProduct.vue +3 -0
  284. package/src/modules/products/controllers/products.controller.js +188 -109
  285. package/src/modules/products/models/product.model.js +1 -0
  286. package/src/modules/spots/components/layouts/Spots.vue +2 -2
  287. package/src/modules/wallet/components/pages/Wallet.vue +73 -88
  288. package/src/modules/wallet/controllers/crypto.controller.js +79 -0
  289. package/src/modules/wallet/models/wallet.model.js +27 -0
  290. package/src/styles/base/all.scss +4 -0
  291. package/src/styles/base/backgrounds.scss +2 -2
  292. package/src/styles/base/shadow_transitions_hover_refactor.scss +11 -1
  293. package/src/styles/typography.scss +19 -12
  294. package/src/modules/community/components/sections/SubscribeNewsletter.vue +0 -67
  295. package/src/modules/constructor/components/elements/Youtube.vue +0 -52
  296. /package/src/modules/{orders/models/payment.model.js → payments/models/payment.tinkoff.model.js} +0 -0
@@ -1,41 +1,39 @@
1
- import { ref as u, watchEffect as M, openBlock as i, createElementBlock as r, unref as p, createBlock as h, withCtx as w, Fragment as N, renderList as I, createElementVNode as s, resolveDynamicComponent as L, normalizeClass as T, createVNode as U, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as k } from "vue";
2
- import g from "../elements/Textarea.vue2.js";
3
- import Y from "../elements/H2.vue.js";
4
- import R from "../elements/Caption.vue.js";
5
- import W from "../elements/Bullets.vue.js";
6
- import j from "../elements/ImageUpload.vue.js";
7
- import q from "../elements/Embed.vue.js";
8
- import G from "../elements/Audio.vue.js";
9
- import J from "../elements/Video.vue.js";
10
- import K from "../elements/Youtube.vue.js";
1
+ import { ref as u, watchEffect as M, openBlock as i, createElementBlock as r, unref as p, createBlock as h, withCtx as g, Fragment as N, renderList as I, createElementVNode as s, resolveDynamicComponent as L, normalizeClass as T, createVNode as U, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as b } from "vue";
2
+ import w from "../elements/Textarea.vue.js";
3
+ import R from "../elements/H2.vue.js";
4
+ import W from "../elements/Caption.vue.js";
5
+ import j from "../elements/Bullets.vue.js";
6
+ import q from "../elements/ImageUpload.vue.js";
7
+ import G from "../elements/Embed.vue.js";
8
+ import J from "../elements/Audio.vue.js";
9
+ import K from "../elements/Video.vue.js";
11
10
  import { VueDraggableNext as O } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
12
11
  const P = ["onMouseover"], Q = {
13
12
  key: 0,
14
13
  class: "z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"
15
- }, X = ["onClick"], Z = ["onClick"], tt = ["onClick"], et = ["onClick"], nt = ["onClick"], ot = ["onClick"], lt = ["onClick"], st = ["onClick"], kt = {
14
+ }, X = ["onClick"], Y = ["onClick"], Z = ["onClick"], ee = ["onClick"], te = ["onClick"], ne = ["onClick"], oe = ["onClick"], fe = {
16
15
  __name: "Constructor",
17
16
  props: ["content"],
18
17
  emits: ["update"],
19
18
  setup(C, { emit: $ }) {
20
- const A = C, m = $;
21
- let t = u(null);
22
- u(null), t.value = { content: A.content };
23
- const x = {
24
- Textarea: g,
25
- H2: Y,
26
- Link: g,
27
- Bullets: W,
28
- Caption: R,
29
- ImageUpload: j,
30
- Embed: q,
31
- Audio: G,
32
- Video: J,
33
- Youtube: K
19
+ const x = C, m = $;
20
+ let e = u(null);
21
+ u(null), e.value = { content: x.content };
22
+ const A = {
23
+ Textarea: w,
24
+ H2: R,
25
+ Link: w,
26
+ Bullets: j,
27
+ Caption: W,
28
+ ImageUpload: q,
29
+ Embed: G,
30
+ Audio: J,
31
+ Video: K
34
32
  };
35
- function a(c = "Textarea", l = "", n, e) {
36
- console.log("We are adding new block (functuin HandleAddBlock):" + c + l + n + e);
33
+ function a(c = "Textarea", l = "", n, t) {
34
+ console.log("We are adding new block (functuin HandleAddBlock):" + c + l + n + t);
37
35
  let o = {
38
- order: t.value.content.length + 1,
36
+ order: e.value.content.length + 1,
39
37
  type: c,
40
38
  style: "",
41
39
  class: "",
@@ -43,25 +41,25 @@ const P = ["onMouseover"], Q = {
43
41
  blocks: [],
44
42
  setFocus: !0
45
43
  };
46
- if (e && e.blocks && Array.isArray(e.blocks)) {
47
- let b = e.blocks.map((F) => ({
44
+ if (t && t.blocks && Array.isArray(t.blocks)) {
45
+ let k = t.blocks.map((F) => ({
48
46
  ...o,
49
47
  content: F.content
50
- })), E = [(e.index || n) + 1, 0].concat(b);
51
- t.value.content.splice.apply(t.value.content, E);
52
- const V = b[b.length - 1];
48
+ })), E = [(t.index || n) + 1, 0].concat(k);
49
+ e.value.content.splice.apply(e.value.content, E);
50
+ const V = k[k.length - 1];
53
51
  console.log("New block is" + V);
54
52
  } else
55
- n !== void 0 ? (t.value.content.splice(n + 1, 0, o), console.log("Latest block is" + o)) : (console.log("Another block is" + o), t.value.content.push(o));
56
- f.value = null, m("update", t.value.content);
53
+ n !== void 0 ? (e.value.content.splice(n + 1, 0, o), console.log("Latest block is" + o)) : (console.log("Another block is" + o), e.value.content.push(o));
54
+ f.value = null, m("update", e.value.content);
57
55
  }
58
56
  function B(c, l) {
59
- const n = t.value.content.findIndex((e) => e === c);
60
- n !== -1 && (t.value.content[n] = { ...t.value.content[n], ...l }), m("update", t.value.content);
57
+ const n = e.value.content.findIndex((t) => t === c);
58
+ n !== -1 && (e.value.content[n] = { ...e.value.content[n], ...l }), m("update", e.value.content);
61
59
  }
62
60
  function _(c) {
63
- let l = t.value.content.findIndex((n) => n === c);
64
- l !== -1 && t.value.content.splice(l, 1), t.value.content[l - 1].setFocus = !0, m("update", t.value.content);
61
+ let l = e.value.content.findIndex((n) => n === c);
62
+ l !== -1 && e.value.content.splice(l, 1), e.value.content[l - 1].setFocus = !0, m("update", e.value.content);
65
63
  }
66
64
  const f = u(null), v = u(!1), d = u(!1);
67
65
  function y() {
@@ -71,26 +69,26 @@ const P = ["onMouseover"], Q = {
71
69
  v.value = !1;
72
70
  }
73
71
  return M(() => {
74
- t.value && t.value.content.length === 0 && a("Textarea", ""), m("update", t.value.content);
72
+ e.value && e.value.content.length === 0 && a("Textarea", ""), m("update", e.value.content);
75
73
  }), (c, l) => (i(), r("section", null, [
76
- p(t).content ? (i(), h(p(O), {
74
+ p(e).content ? (i(), h(p(O), {
77
75
  key: 0,
78
76
  class: "w-full",
79
- list: p(t).content,
77
+ list: p(e).content,
80
78
  onStart: y,
81
79
  onEnd: D
82
80
  }, {
83
- default: w(() => [
84
- (i(!0), r(N, null, I(p(t).content, (n, e) => (i(), r("div", {
85
- key: e,
81
+ default: g(() => [
82
+ (i(!0), r(N, null, I(p(e).content, (n, t) => (i(), r("div", {
83
+ key: t,
86
84
  class: "pos-relative"
87
85
  }, [
88
86
  s("div", {
89
- onMouseover: (o) => (f.value = e, d.value = !1),
87
+ onMouseover: (o) => (f.value = t, d.value = !1),
90
88
  class: "pos-relative w-full h-full"
91
89
  }, [
92
- (i(), h(L(x[n.type]), {
93
- index: e,
90
+ (i(), h(L(A[n.type]), {
91
+ index: t,
94
92
  component: n,
95
93
  prop: n,
96
94
  class: T(n.class),
@@ -102,8 +100,8 @@ const P = ["onMouseover"], Q = {
102
100
  }, null, 40, ["index", "component", "prop", "class", "setFocus"]))
103
101
  ], 40, P),
104
102
  U(z, { name: "fade" }, {
105
- default: w(() => [
106
- f.value === e ? (i(), r("div", {
103
+ default: g(() => [
104
+ f.value === t ? (i(), r("div", {
107
105
  key: 0,
108
106
  class: "pos-absolute z-index-4 i-semi",
109
107
  style: { right: "calc(100% + 0.5rem)", top: "calc(50% - 1.125rem)" },
@@ -119,45 +117,41 @@ const P = ["onMouseover"], Q = {
119
117
  class: "mn-b-thin w-max t-red bg-white button-small button"
120
118
  }, " Remove ", 8, X),
121
119
  s("span", {
122
- onClick: (o) => a("ImageUpload", "", e),
120
+ onClick: (o) => a("ImageUpload", "", t),
123
121
  class: "mn-b-thin w-max t-black bg-white button-small button"
124
- }, " Add Image ", 8, Z),
122
+ }, " Add Image ", 8, Y),
125
123
  s("span", {
126
- onClick: (o) => a("H2", "", e),
124
+ onClick: (o) => a("H2", "", t),
127
125
  class: "w-max button-small t-black bg-white button"
128
- }, " Add Title ", 8, tt),
126
+ }, " Add Title ", 8, Z),
129
127
  s("span", {
130
- onClick: (o) => a("Embed", "", e),
128
+ onClick: (o) => a("Embed", "", t),
131
129
  class: "w-max button-small t-black bg-white button"
132
- }, " Add Embed ", 8, et),
130
+ }, " Add Embed ", 8, ee),
133
131
  s("span", {
134
- onClick: (o) => a("Audio", "", e),
132
+ onClick: (o) => a("Audio", "", t),
135
133
  class: "w-max button-small t-black bg-white button"
136
- }, " Add Audio ", 8, nt),
134
+ }, " Add Audio ", 8, te),
137
135
  s("span", {
138
- onClick: (o) => a("Video", "", e),
136
+ onClick: (o) => a("Video", "", t),
139
137
  class: "w-max button-small t-black bg-white button"
140
- }, " Add Video ", 8, ot),
138
+ }, " Add Video ", 8, ne),
141
139
  s("span", {
142
- onClick: (o) => a("Youtube", "", e),
140
+ onClick: (o) => a("Link", "", t),
143
141
  class: "w-max button-small t-black bg-white button"
144
- }, " Add Youtube ", 8, lt),
145
- s("span", {
146
- onClick: (o) => a("Link", "", e),
147
- class: "w-max button-small t-black bg-white button"
148
- }, " Add Link ", 8, st)
149
- ])) : k("", !0)
150
- ], 32)) : k("", !0)
142
+ }, " Add Link ", 8, oe)
143
+ ])) : b("", !0)
144
+ ], 32)) : b("", !0)
151
145
  ]),
152
146
  _: 2
153
147
  }, 1024)
154
148
  ]))), 128))
155
149
  ]),
156
150
  _: 1
157
- }, 8, ["list"])) : k("", !0)
151
+ }, 8, ["list"])) : b("", !0)
158
152
  ]));
159
153
  }
160
154
  };
161
155
  export {
162
- kt as default
156
+ fe as default
163
157
  };
@@ -1,5 +1,5 @@
1
- import { ref as k, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as E } from "vue";
2
- import p from "../../../../components/Chips/Chips.vue.js";
1
+ import { ref as k, computed as l, openBlock as n, createElementBlock as i, normalizeClass as m, createVNode as x, createElementVNode as c, createCommentVNode as a, createBlock as w, withModifiers as D, toDisplayString as d, renderSlot as p } from "vue";
2
+ import E from "../../../../components/Chips/Chips.vue.js";
3
3
  import $ from "../../../icons/navigation/IconEdit.vue.js";
4
4
  import I from "../../../globals/components/blocks/CardHeader.vue.js";
5
5
  import "../../../community/store/reactions.js";
@@ -39,8 +39,8 @@ const F = {
39
39
  if (u === 0)
40
40
  return "Starting Now";
41
41
  {
42
- const g = Math.floor(u / 1e3), f = Math.floor(g / 60), h = Math.floor(f / 60), y = Math.floor(h / 24);
43
- return y > 0 ? `${y} days until event` : h > 0 ? `${h} hours until event` : f > 0 ? `${f} minutes until event` : `${g} seconds until event`;
42
+ const g = Math.floor(u / 1e3), h = Math.floor(g / 60), f = Math.floor(h / 60), y = Math.floor(f / 24);
43
+ return y > 0 ? `${y} days until event` : f > 0 ? `${f} hours until event` : h > 0 ? `${h} minutes until event` : `${g} seconds until event`;
44
44
  }
45
45
  }), C = l(() => {
46
46
  const t = new Date(s.event.date.start), o = { day: "2-digit", month: "2-digit" };
@@ -113,8 +113,8 @@ const F = {
113
113
  e.event.status === "draft" ? (n(), i("div", P, d(e.event.status), 1)) : a("", !0)
114
114
  ])) : a("", !0),
115
115
  e.type !== "short" ? (n(), i("p", Y, d(e.event.description), 1)) : a("", !0),
116
- E(t.$slots, "default"),
117
- e.type !== "short" && e.event.tags.length > 0 ? (n(), w(p, {
116
+ p(t.$slots, "default"),
117
+ e.type !== "short" && e.event.tags.length > 0 ? (n(), w(E, {
118
118
  key: 3,
119
119
  chips: e.event.tags
120
120
  }, null, 8, ["chips"])) : a("", !0)
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),p=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const s=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const g=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),k={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:c}){const n=c,t=o,u=async()=>{t.hasTicket?await l(t.targetId):await d(t.targetId)};async function d(i){try{const e={type:t.type,target:i,user:t.userId},r=await s.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function l(i){const e={type:t.type,target:i,user:t.userId};try{const r=await s.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(p.default,{submit:u,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},y=g.default(k,[["__scopeId","data-v-872ff798"]]);exports.default=y;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as d, createBlock as g, withCtx as m, createTextVNode as l, toDisplayString as k } from "vue";
2
- import f from "../../../../components/Button/Button.vue2.js";
2
+ import f from "../../../../components/Button/Button.vue.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as c } from "../../store/tickets.js";
5
5
  import "./ButtonJoin.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin h-min-100"},y={__name:"layoutEvents",setup(g){const u=c.useRoute(),d=c.useRouter(),l=p(new Date);function p(e){return`${e.getDate().toString().padStart(2,"0")}${(e.getMonth()+1).toString().padStart(2,"0")}${e.getFullYear()}`}if(u.query){const e=u.query,n={tags:e.tags?e.tags.split(","):null,date:e.date?e.date:l};i.state.filter=n}else{const e={date:l};i.state.filter=e}return t.watch(()=>i.state.filter,(e,n)=>{const a={...u.query};Object.keys(n).forEach(o=>{a[o]&&delete a[o]});const s=Object.fromEntries(Object.entries(e).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,s),d.push({query:a})},{deep:!0}),(e,n)=>{const a=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",m,[t.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":n[0]||(n[0]=s=>i.state.filter.date=s),locale:e.$i18n.locale,class:"radius-semi o-hidden bg-grey mn-b-thin pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),t.createVNode(a,null,{default:t.withCtx(({Component:s,route:o})=>[t.createVNode(t.Transition,{name:"scaleIn",mode:"out-in"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])}}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin h-min-100"},y={__name:"layoutEvents",setup(g){const u=c.useRoute(),d=c.useRouter(),l=p(new Date);function p(e){return`${e.getDate().toString().padStart(2,"0")}${(e.getMonth()+1).toString().padStart(2,"0")}${e.getFullYear()}`}if(u.query){const e=u.query,n={tags:e.tags?e.tags.split(","):null,date:e.date?e.date:l};i.state.filter=n}else{const e={date:l};i.state.filter=e}return t.watch(()=>i.state.filter,(e,n)=>{const a={...u.query};Object.keys(n).forEach(o=>{a[o]&&delete a[o]});const s=Object.fromEntries(Object.entries(e).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,s),d.push({query:a})},{deep:!0}),(e,n)=>{const a=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",m,[t.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":n[0]||(n[0]=s=>i.state.filter.date=s),locale:e.$i18n.locale,class:"radius-semi o-hidden bg-grey mn-b-thin pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),t.createVNode(a,null,{default:t.withCtx(({Component:s,route:o})=>[t.createVNode(t.Transition,{name:"scaleIn",mode:"out-in"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])}}};exports.default=y;
@@ -1,6 +1,6 @@
1
1
  import { watch as f, resolveComponent as y, openBlock as u, createElementBlock as g, createVNode as l, withCtx as d, Transition as _, createBlock as h, resolveDynamicComponent as b } from "vue";
2
2
  import { useRoute as w, useRouter as D } from "vue-router";
3
- import "../../../../components/Select/Select.vue.js";
3
+ import "../../../../components/Select/Select.vue2.js";
4
4
  import q from "../../../../components/DatePicker/DatePicker.vue.js";
5
5
  import { state as s } from "../../store/events.js";
6
6
  const j = { class: "pd-thin h-min-100" }, V = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const C=require("../../../constructor/components/sections/Constructor.vue.cjs"),P=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Popup/Popup.vue2.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),q=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),S=require("../../../../components/EditImages/EditImages.vue.cjs"),M=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),w=require("vue-router"),u=require("../../store/events.cjs"),o=require("../../../auth/store/auth.cjs"),L=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const F={key:0,class:"h-100 pd-thin"},G={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},O=e.createElementVNode("h4",null,"Upload Event Cover",-1),R={key:0,class:"mn-b-small"},I={key:2,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),j={class:"mn-b-small gap-small cols-2-fit-content"},J={class:"gap-thin flex-nowrap flex w-100"},Y=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ne=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),oe=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),ie=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),re={key:3,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},de={key:4,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},ue={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ce=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),pe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),me={key:0,class:"mn-b-thin"},fe={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},ge={__name:"EditEvent",setup(be){const p=w.useRoute(),m=w.useRouter();let t=e.ref(null),h=e.ref(null);const v=e.ref([]),i=e.ref(null),r=e.ref(),D=()=>({top:0,left:0});e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:o.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;r.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:o.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:o.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(i.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await L.actions.read({user:o.state.user._id,postable:o.state.user._id,limit:100});h.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function y(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){i.value&&(t.value.owner={target:i.value._id,type:"organization"}),i.value||(t.value.creator.hidden=!1),i.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function B(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",F,[e.createElementVNode("div",G,[e.createVNode(b.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),O]),e.createVNode(n.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",R," Special Details ")):e.createCommentVNode("",!0),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:1,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[3]||(a[3]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(n.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[4]||(a[4]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(S.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[5]||(a[5]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-grey radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[6]||(a[6]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[7]||(a[7]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",j,[e.createVNode(b.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[8]||(a[8]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",J,[e.createVNode(n.default,{field:e.unref(t).specialData.ticketLinkStripe,"onUpdate:field":a[9]||(a[9]=l=>e.unref(t).specialData.ticketLinkStripe=l),placeholder:"Link to ticket stripe payment page",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])])]),Y,K,e.createVNode(n.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(n.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[20]||(a[20]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(b.default,{photo:l.photo,"onUpdate:photo":d=>l.photo=d,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.description,"onUpdate:field":d=>l.description=d,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.time,"onUpdate:field":d=>l.time=d,placeholder:"Time",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[22]||(a[22]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),ne,e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[23]||(a[23]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[24]||(a[24]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),oe,e.createVNode(e.unref(P.default),{modelValue:r.value,"onUpdate:modelValue":a[25]||(a[25]=l=>r.value=l),"alt-position":D,range:"",class:"mn-b-semi"},null,8,["modelValue"]),ie,e.unref(t)?(e.openBlock(),e.createElementBlock("section",re,[e.createVNode(C.default,{content:e.unref(t).content,onUpdate:a[26]||(a[26]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",de,[e.createElementVNode("div",ue,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[27]||(a[27]=l=>B()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[28]||(a[28]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[29]||(a[29]=l=>y()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(_.default,{title:"Добавить участника",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ce,e.createVNode(T.default,{onTagsChanged:a[30]||(a[30]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),pe,e.createVNode(q.default,{modelValue:i.value,"onUpdate:modelValue":a[31]||(a[31]=l=>i.value=l),options:e.unref(h),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),i.value?(e.openBlock(),e.createElementBlock("h5",me,"Options:")):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[32]||(a[32]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(M.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=ge;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue2.cjs");const C=require("../../../constructor/components/sections/Constructor.vue.cjs"),P=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Popup/Popup.vue.cjs"),n=require("../../../../components/Field/Field.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),q=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),S=require("../../../../components/EditImages/EditImages.vue.cjs"),M=require("../../../../components/Button/Button.vue.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),w=require("vue-router"),u=require("../../store/events.cjs"),o=require("../../../auth/store/auth.cjs"),L=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const F={key:0,class:"h-100 pd-thin"},G={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},O=e.createElementVNode("h4",null,"Upload Event Cover",-1),R={key:0,class:"mn-b-small"},I={key:2,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),j={class:"mn-b-small gap-small cols-2-fit-content"},J={class:"gap-thin flex-nowrap flex w-100"},Y=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ne=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),oe=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),ie=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),re={key:3,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},de={key:4,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},ue={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ce=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),pe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),me={key:0,class:"mn-b-thin"},fe={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},ge={__name:"EditEvent",setup(be){const p=w.useRoute(),m=w.useRouter();let t=e.ref(null),h=e.ref(null);const v=e.ref([]),i=e.ref(null),r=e.ref(),D=()=>({top:0,left:0});e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:o.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;r.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:o.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:o.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(i.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await L.actions.read({user:o.state.user._id,postable:o.state.user._id,limit:100});h.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function y(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){i.value&&(t.value.owner={target:i.value._id,type:"organization"}),i.value||(t.value.creator.hidden=!1),i.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function B(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",F,[e.createElementVNode("div",G,[e.createVNode(b.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),O]),e.createVNode(n.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-b-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",R," Special Details ")):e.createCommentVNode("",!0),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:1,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[3]||(a[3]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(n.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[4]||(a[4]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(S.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[5]||(a[5]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-grey radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[6]||(a[6]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[7]||(a[7]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",j,[e.createVNode(b.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[8]||(a[8]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",J,[e.createVNode(n.default,{field:e.unref(t).specialData.ticketLinkStripe,"onUpdate:field":a[9]||(a[9]=l=>e.unref(t).specialData.ticketLinkStripe=l),placeholder:"Link to ticket stripe payment page",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])])]),Y,K,e.createVNode(n.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(n.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[20]||(a[20]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(b.default,{photo:l.photo,"onUpdate:photo":d=>l.photo=d,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.description,"onUpdate:field":d=>l.description=d,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.time,"onUpdate:field":d=>l.time=d,placeholder:"Time",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[22]||(a[22]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),ne,e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[23]||(a[23]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[24]||(a[24]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),oe,e.createVNode(e.unref(P.default),{modelValue:r.value,"onUpdate:modelValue":a[25]||(a[25]=l=>r.value=l),"alt-position":D,range:"",class:"mn-b-semi"},null,8,["modelValue"]),ie,e.unref(t)?(e.openBlock(),e.createElementBlock("section",re,[e.createVNode(C.default,{content:e.unref(t).content,onUpdate:a[26]||(a[26]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",de,[e.createElementVNode("div",ue,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[27]||(a[27]=l=>B()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[28]||(a[28]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[29]||(a[29]=l=>y()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(_.default,{title:"Добавить участника",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ce,e.createVNode(T.default,{onTagsChanged:a[30]||(a[30]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),pe,e.createVNode(q.default,{modelValue:i.value,"onUpdate:modelValue":a[31]||(a[31]=l=>i.value=l),options:e.unref(h),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),i.value?(e.openBlock(),e.createElementBlock("h5",me,"Options:")):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[32]||(a[32]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(M.default,{submit:x,callback:s.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=ge;
@@ -1,18 +1,18 @@
1
1
  import { ref as b, onMounted as $, unref as t, openBlock as d, createElementBlock as r, createElementVNode as i, createVNode as s, createCommentVNode as f, createBlock as R, withCtx as D, Fragment as x, renderList as P, createTextVNode as A } from "vue";
2
- import "../../../constructor/components/elements/Textarea.vue.js";
2
+ import "../../../constructor/components/elements/Textarea.vue2.js";
3
3
  import B from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import I from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
6
  import T from "../../../../components/Block/Block.vue.js";
7
- import z from "../../../../components/Popup/Popup.vue2.js";
8
- import n from "../../../../components/Field/Field.vue2.js";
7
+ import z from "../../../../components/Popup/Popup.vue.js";
8
+ import n from "../../../../components/Field/Field.vue.js";
9
9
  import H from "../../../../components/FieldTags/BlockTags.vue.js";
10
- import E from "../../../../components/Checkbox/Checkbox.vue2.js";
10
+ import E from "../../../../components/Checkbox/Checkbox.vue.js";
11
11
  import J from "../../../../components/SelectMulti/SelectMulti.vue.js";
12
12
  import w from "../../../../components/Upload/Upload.vue.js";
13
13
  import y from "../../../../components/UploadImage/UploadImage.vue.js";
14
14
  import K from "../../../../components/EditImages/EditImages.vue.js";
15
- import Y from "../../../../components/Button/Button.vue2.js";
15
+ import Y from "../../../../components/Button/Button.vue.js";
16
16
  import V from "../../../icons/navigation/IconDelete.vue.js";
17
17
  import { useRoute as j, useRouter as q } from "vue-router";
18
18
  import { read as Q, clean as W, state as X, update as C, create as S, remove as Z } from "../../store/events.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Chips/Chips.vue2.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
@@ -5,9 +5,10 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Popup/Popup.vue.js";
9
- import "../../../../components/Button/Button.vue.js";
10
- import "../../../../components/Select/Select.vue.js";
8
+ import "../../../../components/Chips/Chips.vue2.js";
9
+ import "../../../../components/Popup/Popup.vue2.js";
10
+ import "../../../../components/Button/Button.vue2.js";
11
+ import "../../../../components/Select/Select.vue2.js";
11
12
  import "../../../reports/store/reports.js";
12
13
  import "../../../../components/Dropdown/Dropdown.vue2.js";
13
14
  import { state as a } from "../../../auth/store/auth.js";
@@ -15,7 +16,7 @@ import "../../../organizations/store/memberships.js";
15
16
  import "../../../community/store/reactions.js";
16
17
  import { state as c } from "../../store/events.js";
17
18
  import "../sections/List.vue2.js";
18
- const b = {
19
+ const j = {
19
20
  __name: "Events",
20
21
  setup(u) {
21
22
  const t = p();
@@ -30,5 +31,5 @@ const b = {
30
31
  }
31
32
  };
32
33
  export {
33
- b as default
34
+ j as default
34
35
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
@@ -1,7 +1,7 @@
1
1
  import { ref as n, computed as q, onMounted as A, openBlock as a, createElementBlock as o, createElementVNode as t, createCommentVNode as f, Fragment as E, renderList as M, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as L, vShow as R, createTextVNode as H, pushScopeId as J, popScopeId as K } from "vue";
2
- import Q from "../../../../components/Field/Field.vue2.js";
3
- import W from "../../../../components/Button/Button.vue2.js";
4
- import X from "../../../../components/Select/Select.vue2.js";
2
+ import Q from "../../../../components/Field/Field.vue.js";
3
+ import W from "../../../../components/Button/Button.vue.js";
4
+ import X from "../../../../components/Select/Select.vue.js";
5
5
  import { state as G, actions as d } from "../../store/gallery.js";
6
6
  import Y from "../../../../components/EditImages/EditImages.vue.js";
7
7
  import "./BackofficeGallery.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue2.cjs"),S=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Select/Select.vue2.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,f=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),h=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>r.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(r.value))),b=async()=>{g.value=!0,await s.actions.fetchGallery(d,f),g.value=!1},c=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),k=a=>{W.value?y(a):(c.value="modal",t.value.image=a,p())},y=a=>{c.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let r=e.ref("all");const B=a=>{r.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,f),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,b())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(r)!==l,"pd-thin bg-main radius-small":e.unref(r)===l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:Q=>k(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&c.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&c.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-b-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(z.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-4c5bced8"]]);exports.default=J;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue.cjs"),S=require("../../../../components/Button/Button.vue.cjs"),q=require("../../../../components/Select/Select.vue.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,f=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),h=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>r.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(r.value))),b=async()=>{g.value=!0,await s.actions.fetchGallery(d,f),g.value=!1},c=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),k=a=>{W.value?y(a):(c.value="modal",t.value.image=a,p())},y=a=>{c.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let r=e.ref("all");const B=a=>{r.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,f),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,b())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(r)!==l,"pd-thin bg-main radius-small":e.unref(r)===l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:Q=>k(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&c.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&c.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-b-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(z.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-4c5bced8"]]);exports.default=J;
@@ -1,8 +1,8 @@
1
1
  import { ref as n, computed as D, onMounted as A, openBlock as o, createElementBlock as i, createElementVNode as s, Fragment as C, renderList as z, normalizeClass as L, unref as x, toDisplayString as S, createCommentVNode as r, createVNode as c, Transition as _, withCtx as p, withDirectives as O, vShow as T, createBlock as W, createTextVNode as q } from "vue";
2
2
  import { useRoute as H } from "vue-router";
3
- import J from "../../../../components/Field/Field.vue2.js";
4
- import K from "../../../../components/Button/Button.vue2.js";
5
- import Q from "../../../../components/Select/Select.vue2.js";
3
+ import J from "../../../../components/Field/Field.vue.js";
4
+ import K from "../../../../components/Button/Button.vue.js";
5
+ import Q from "../../../../components/Select/Select.vue.js";
6
6
  import X from "../../../../components/Upload/Upload.vue.js";
7
7
  import { state as E, actions as g } from "../../store/gallery.js";
8
8
  import "./GalleryWithCategories.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k=require("../../../icons/navigation/IconEllipsis.vue.cjs"),y={key:0,class:"pd-b-zero"},w={class:"w-100 flex-v-center flex-nojustify flex"},b={class:"w-100 flex-nowrap flex-v-center flex"},B=["src"],E={key:2,class:"t-semi"},p={key:1},V={key:2},C={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},N={key:0,class:"w-4r i-thin"},v={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},x=["src"],$={class:"bg-black pd-thin radius-small"},M=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),R={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",y,[e.createElementVNode("div",w,[e.createElementVNode("div",b,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,B)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",E,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",p," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[t.members?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",v,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,x))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:{component:k.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[M]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=R;