@ozdao/prometheus-framework 0.2.130 → 0.2.133

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. package/dist/auth.server.js +0 -1
  2. package/dist/auth.server.mjs +0 -1
  3. package/dist/community.server.js +172 -31
  4. package/dist/community.server.mjs +172 -31
  5. package/dist/events.server.js +1 -1
  6. package/dist/events.server.mjs +1 -1
  7. package/dist/files.server.js +38 -4
  8. package/dist/files.server.mjs +38 -4
  9. package/dist/gallery.server.js +1 -1
  10. package/dist/gallery.server.mjs +1 -1
  11. package/dist/main-CI9l9xMs.js +92 -0
  12. package/dist/main-DPg58GOU.mjs +14509 -0
  13. package/dist/main.css +1 -1
  14. package/dist/orders.server.js +1 -1
  15. package/dist/orders.server.mjs +1 -1
  16. package/dist/organizations.server.js +4 -3
  17. package/dist/organizations.server.mjs +4 -3
  18. package/dist/products.server.js +2 -1
  19. package/dist/products.server.mjs +2 -1
  20. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
  21. package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
  22. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
  24. package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
  25. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
  27. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +12 -13
  29. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  30. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
  31. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
  33. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
  35. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +14 -15
  37. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
  38. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
  39. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
  41. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
  42. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
  43. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
  45. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
  47. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
  49. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
  50. package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
  51. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
  52. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
  53. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  54. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
  55. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
  56. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
  57. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
  59. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -0
  60. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -0
  61. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
  62. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
  63. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  64. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
  65. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
  67. package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +30 -30
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +30 -30
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +18 -18
  72. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
  74. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
  76. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +54 -71
  78. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
  80. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +86 -76
  82. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
  84. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +71 -80
  86. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
  87. package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
  88. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +99 -54
  90. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +27 -28
  92. package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
  94. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
  96. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
  98. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
  99. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
  100. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
  102. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +119 -112
  104. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  105. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +22 -22
  113. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +27 -27
  115. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
  117. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +16 -16
  118. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
  120. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +9 -9
  125. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +112 -85
  133. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +36 -35
  135. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +8 -8
  136. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  138. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
  142. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
  144. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
  146. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
  148. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
  154. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
  156. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +4 -4
  159. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +29 -29
  162. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
  164. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  165. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
  166. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
  167. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
  168. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
  169. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
  170. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
  171. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
  172. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
  173. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
  174. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +154 -77
  176. package/dist/prometheus-framework.cjs.js +1 -1
  177. package/dist/prometheus-framework.es.js +14 -14
  178. package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
  179. package/dist/queryProcessor-iewDZq_f.js +178 -0
  180. package/dist/style.css +1 -1
  181. package/dist/wallet.server.js +80 -27
  182. package/dist/wallet.server.mjs +80 -27
  183. package/dist/web-DZUec7pP.js +1 -0
  184. package/dist/web-krQQeSb6.mjs +54 -0
  185. package/package.json +1 -1
  186. package/src/components/Address/Address.vue +1 -1
  187. package/src/components/Chips/Chips.vue +1 -1
  188. package/src/components/Completion/Completion.vue +1 -4
  189. package/src/components/DatePicker/Calendar.vue +1 -1
  190. package/src/components/Draggable/Draggable.vue +113 -0
  191. package/src/components/Dropdown/Dropdown.vue +1 -1
  192. package/src/components/Feed/Feed.vue +18 -12
  193. package/src/components/FieldBig/FieldBig.vue +11 -1
  194. package/src/components/FieldPhone/FieldPhone.vue +1 -1
  195. package/src/components/FieldTags/FieldTags.vue +2 -1
  196. package/src/components/FieldTags/tag-input.vue +1 -1
  197. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  198. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  199. package/src/components/Shader/Shader.vue +2 -2
  200. package/src/components/Slider/Slider.vue +1 -5
  201. package/src/components/Spoiler/Spoiler.vue +1 -1
  202. package/src/components/Text/Text.vue +1 -4
  203. package/src/components/Tooltip/Tooltip.vue +1 -1
  204. package/src/components/Upload/Upload.vue +5 -3
  205. package/src/modules/auth/controllers/auth.controller.js +0 -2
  206. package/src/modules/auth/store/auth.js +2 -2
  207. package/src/modules/community/DOCUMENTATION.MD +4 -0
  208. package/src/modules/community/community.client.js +0 -2
  209. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
  210. package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
  211. package/src/modules/community/components/layouts/Community.vue +15 -11
  212. package/src/modules/community/components/pages/Blog.vue +25 -32
  213. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
  214. package/src/modules/community/components/sections/Comment.vue +123 -0
  215. package/src/modules/community/components/sections/Comments.vue +90 -19
  216. package/src/modules/community/components/sections/HotPosts.vue +3 -6
  217. package/src/modules/community/controllers/blog.controller.js +1 -1
  218. package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
  219. package/src/modules/community/controllers/comments.controller.js +187 -38
  220. package/src/modules/community/controllers/comments.controller.populate.js +180 -0
  221. package/src/modules/community/models/comment.model.js +15 -0
  222. package/src/modules/community/store/blogposts.js +20 -2
  223. package/src/modules/constructor/components/elements/Audio.vue +28 -40
  224. package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
  225. package/src/modules/constructor/components/elements/Video.vue +10 -18
  226. package/src/modules/constructor/components/sections/Constructor.vue +54 -47
  227. package/src/modules/files/controllers/files.controller.js +2 -0
  228. package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
  229. package/src/modules/files/routes/files.routes.js +8 -0
  230. package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
  231. package/src/modules/globals/components/partials/Header.vue +12 -7
  232. package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
  233. package/src/modules/icons/logos/Logotype.vue +8 -6
  234. package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
  235. package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
  236. package/src/modules/marketplace/store/marketplace.js +2 -8
  237. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  238. package/src/modules/organizations/components/pages/Members.vue +1 -1
  239. package/src/modules/organizations/components/pages/Organization.vue +33 -5
  240. package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
  241. package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
  242. package/src/modules/organizations/components/sections/Publics.vue +2 -2
  243. package/src/modules/organizations/controllers/memberships.controller.js +2 -3
  244. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  245. package/src/modules/organizations/store/memberships.js +4 -1
  246. package/src/modules/products/components/blocks/CardProduct.vue +1 -1
  247. package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
  248. package/src/modules/products/models/product.model.js +2 -1
  249. package/src/modules/spots/components/layouts/Spots.vue +0 -3
  250. package/src/modules/spots/components/pages/Map.vue +13 -3
  251. package/src/modules/users/components/blocks/CardUser.vue +2 -2
  252. package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
  253. package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
  254. package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
  255. package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
  256. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
  257. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
  258. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
  259. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
  260. package/src/modules/wallet/localization/Wallet.json +22 -0
  261. package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
  262. package/src/styles/base/all.scss +16 -26
  263. package/src/styles/config.scss +70 -34
  264. package/src/styles/typography.scss +5 -5
  265. package/src/modules/community/components/sections/Feed.vue +0 -148
  266. package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
  267. package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -1,45 +1,44 @@
1
- import { resolveComponent as l, openBlock as r, createElementBlock as a, createElementVNode as o, createTextVNode as c, createVNode as e, withCtx as i, createBlock as m } from "vue";
1
+ import { resolveComponent as n, openBlock as o, createElementBlock as a, createElementVNode as t, createTextVNode as c, createVNode as r, withCtx as s, createBlock as p } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
7
7
  /* empty css */
8
- import p from "../../../../components/Slider/Slider.vue.js";
9
- import _ from "../../../icons/navigation/IconArrow.vue.js";
8
+ import m from "../../../../components/Slider/Slider.vue.js";
10
9
  import d from "../blocks/CardBlogpost.vue.js";
11
- import { read as u } from "../../store/blogposts.js";
12
- import { state as s } from "../../../auth/store/auth.js";
10
+ import { read as _ } from "../../store/blogposts.js";
11
+ import { state as i } from "../../../auth/store/auth.js";
13
12
  /* empty css */
14
- const h = { class: "pd-thin" }, f = { class: "bg-light radius-big pd-t-big pd-b-big" }, b = { class: "w-100 pd-b-small t-center flex-center flex" }, g = /* @__PURE__ */ o("b", null, "Community", -1), T = {
13
+ const u = { class: "pd-thin" }, h = { class: "bg-light radius-big pd-t-big pd-b-big" }, f = { class: "w-100 pd-b-small t-center flex-center flex" }, g = /* @__PURE__ */ t("b", null, "Community", -1), O = {
15
14
  __name: "HotPosts",
16
- setup(x) {
17
- return (k, v) => {
18
- const n = l("router-link");
19
- return r(), a("section", h, [
20
- o("div", f, [
21
- o("h2", b, [
15
+ setup(b) {
16
+ return (x, k) => {
17
+ const l = n("router-link");
18
+ return o(), a("section", u, [
19
+ t("div", h, [
20
+ t("h2", f, [
22
21
  c(" Discover Our "),
23
- e(n, {
22
+ r(l, {
24
23
  to: { name: "Blog" },
25
- class: "transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin mn-l-thin radius-extra flex flex-v-center"
24
+ class: "transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"
26
25
  }, {
27
- default: i(() => [
28
- g,
29
- e(_, { class: "mn-l-thin radius-extra bg-white i-big" })
26
+ default: s(() => [
27
+ g
30
28
  ]),
31
29
  _: 1
32
30
  })
33
31
  ]),
34
- e(p, {
32
+ r(m, {
35
33
  store: {
36
- read: (t) => u(t)
34
+ read: (e) => _(e)
37
35
  },
38
36
  options: {
39
37
  skip: 0,
40
38
  limit: 8,
41
- user: s.user._id,
42
- period: "year"
39
+ user: i.user._id,
40
+ period: "year",
41
+ category: "featured"
43
42
  },
44
43
  text: {
45
44
  messages: {
@@ -51,13 +50,13 @@ const h = { class: "pd-thin" }, f = { class: "bg-light radius-big pd-t-big pd-b-
51
50
  },
52
51
  class: "slider-hotpost"
53
52
  }, {
54
- default: i(({
55
- item: t
53
+ default: s(({
54
+ item: e
56
55
  }) => [
57
- (r(), m(d, {
58
- key: t._id,
59
- blogpost: t,
60
- user: s.user._id,
56
+ (o(), p(d, {
57
+ key: e._id,
58
+ blogpost: e,
59
+ user: i.user._id,
61
60
  hideDescription: !0,
62
61
  class: "bg-white flex flex-column h-35r"
63
62
  }, null, 8, ["blogpost", "user"]))
@@ -70,5 +69,5 @@ const h = { class: "pd-thin" }, f = { class: "bg-light radius-big pd-t-big pd-b-
70
69
  }
71
70
  };
72
71
  export {
73
- T as default
72
+ O as default
74
73
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("axios"),l=require("vue"),c=require("../../globals/store/globals.cjs"),s=d.create({baseURL:process.env.API_URL,withCredentials:!0}),a=l.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},source:null,date:"",views:0,content:[]}});async function i(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{const r=await s.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function m(e){return s.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function f(e){return s.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await s.delete(`/api/blog/delete/${e}`).then(r=>{const u=a.all.findIndex(n=>n._id===e);return u!==-1&&a.all.splice(u,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function y(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}l.watch(a,(e,r)=>{});exports.blockAdd=y;exports.clean=w;exports.create=m;exports.read=i;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("axios"),u=require("vue"),c=require("../../globals/store/globals.cjs"),l=m.create({baseURL:process.env.API_URL,withCredentials:!0}),a=u.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{param:"createdAt",order:"desc",hideButton:!0,options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},source:null,date:"",views:0,content:[]}});async function n(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.sortParam&&(e.params.sortParam=e.sortParam),e.sortOrder&&(e.params.sortOrder=e.sortOrder),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{const r=await l.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function i(e){return l.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function f(e){return l.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await l.delete(`/api/blog/delete/${e}`).then(r=>{const s=a.all.findIndex(d=>d._id===e);return s!==-1&&a.all.splice(s,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function v(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}u.watch(a,(e,r)=>{});exports.blockAdd=v;exports.clean=w;exports.create=i;exports.read=n;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
@@ -1,7 +1,7 @@
1
- import n from "axios";
2
- import { reactive as m, watch as d } from "vue";
1
+ import m from "axios";
2
+ import { reactive as d, watch as n } from "vue";
3
3
  import { setError as c } from "../../globals/store/globals.js";
4
- const l = n.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m({
4
+ const l = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = d({
5
5
  all: [],
6
6
  filter: {
7
7
  // query
@@ -15,8 +15,19 @@ const l = n.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
15
15
  },
16
16
  // Sort
17
17
  sort: {
18
- current: "popularity",
19
- ascending: !1
18
+ param: "createdAt",
19
+ order: "desc",
20
+ hideButton: !0,
21
+ options: [{
22
+ label: "Date",
23
+ value: "createdAt"
24
+ }, {
25
+ label: "Popularity",
26
+ value: "views"
27
+ }, {
28
+ label: "Creator",
29
+ value: "creator"
30
+ }]
20
31
  },
21
32
  current: {
22
33
  _id: "",
@@ -32,40 +43,40 @@ const l = n.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
32
43
  }
33
44
  });
34
45
  async function w(e = {}) {
35
- e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.period && (e.params.period = e.period), e.url && (e.params = { url: e.url }), e.category && (e.params.category = e.category), e.owner && (e.params.owner = e.owner), e.following && (e.params.following = e.following), e.creator && (e.params.creator = e.creator), e.status && (e.params.status = e.status), e.user && (e.params.user = e.user), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
46
+ e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.period && (e.params.period = e.period), e.url && (e.params = { url: e.url }), e.category && (e.params.category = e.category), e.owner && (e.params.owner = e.owner), e.following && (e.params.following = e.following), e.creator && (e.params.creator = e.creator), e.status && (e.params.status = e.status), e.user && (e.params.user = e.user), e.sortParam && (e.params.sortParam = e.sortParam), e.sortOrder && (e.params.sortOrder = e.sortOrder), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
36
47
  try {
37
- const a = await l.get("/api/blog/read", { params: e.params });
38
- return e.url ? t(a.data, "current") : t(a.data, "all"), Promise.resolve(a.data);
39
- } catch (a) {
40
- return c(a), Promise.reject(a);
48
+ const r = await l.get("/api/blog/read", { params: e.params });
49
+ return e.url ? t(r.data, "current") : t(r.data, "all"), Promise.resolve(r.data);
50
+ } catch (r) {
51
+ return c(r), Promise.reject(r);
41
52
  }
42
53
  }
43
- async function p(e) {
54
+ async function P(e) {
44
55
  return l.post("/api/blog/create", e).then(
45
- (a) => (t(a.data, "current"), Promise.resolve(a.data)),
46
- (a) => (c(a), Promise.reject(a))
56
+ (r) => (t(r.data, "current"), Promise.resolve(r.data)),
57
+ (r) => (c(r), Promise.reject(r))
47
58
  );
48
59
  }
49
- async function y(e) {
60
+ async function v(e) {
50
61
  return l.post("/api/blog/update", e).then(
51
- (a) => (t(a.data, "current"), Promise.resolve(a.data)),
52
- (a) => (c(a), Promise.reject(a))
62
+ (r) => (t(r.data, "current"), Promise.resolve(r.data)),
63
+ (r) => (c(r), Promise.reject(r))
53
64
  );
54
65
  }
55
- async function P(e) {
66
+ async function y(e) {
56
67
  return await l.delete(`/api/blog/delete/${e}`).then(
57
- (a) => {
58
- const u = r.all.findIndex((s) => s._id === e);
59
- return u !== -1 && r.all.splice(u, 1), Promise.resolve(a.data);
68
+ (r) => {
69
+ const u = a.all.findIndex((s) => s._id === e);
70
+ return u !== -1 && a.all.splice(u, 1), Promise.resolve(r.data);
60
71
  },
61
- (a) => (c(a), Promise.reject(a))
72
+ (r) => (c(r), Promise.reject(r))
62
73
  );
63
74
  }
64
- function t(e, a) {
65
- r[a] = e;
75
+ function t(e, r) {
76
+ a[r] = e;
66
77
  }
67
78
  function h() {
68
- r.current = {
79
+ a.current = {
69
80
  _id: "",
70
81
  url: "",
71
82
  status: "",
@@ -78,25 +89,25 @@ function h() {
78
89
  content: []
79
90
  };
80
91
  }
81
- function v(e) {
82
- const a = {
83
- order: r.project.content.length + 1,
92
+ function p(e) {
93
+ const r = {
94
+ order: a.project.content.length + 1,
84
95
  type: e.type,
85
96
  data: e.data,
86
97
  class: e.class,
87
98
  content: e.content
88
99
  };
89
- r.project.content.push(a);
100
+ a.project.content.push(r);
90
101
  }
91
- d(r, (e, a) => {
102
+ n(a, (e, r) => {
92
103
  });
93
104
  export {
94
- v as blockAdd,
105
+ p as blockAdd,
95
106
  h as clean,
96
- p as create,
107
+ P as create,
97
108
  w as read,
98
- P as remove,
109
+ y as remove,
99
110
  t as set,
100
- r as state,
101
- y as update
111
+ a as state,
112
+ v as update
102
113
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Upload/Upload.vue.cjs"),m={class:"mn-b-thin w-100 pd-medium bg-white radius-medium"},p=["innerHTML"],b={key:1,class:""},v={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(l,{emit:a}){const o=e.ref(null),i=l,u=a;function s(t){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(c=>c.test(t))}function d(t){o.value=t,o.value&&s(o.value)?(u("input",o.value),u("updateBlock",i.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(t,n)=>(e.openBlock(),e.createElementBlock("div",m,[l.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.prop.content,class:"flex-center flex"},null,8,p)):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(r.default,{field:o.value,"onUpdate:field":n[0]||(n[0]=c=>o.value=c),onFileChange:d,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createElementVNode("button",{onClick:d,class:"button-small button"}," Save ")]))]))}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Upload/Upload.vue.cjs"),i={class:"mn-b-thin w-100 radius-medium"},p={key:0,class:"flex-center flex"},m={controls:"",class:"w-100 h-max-30r"},v=["src"],f={key:1},_={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:a}){const o=e.ref(null);e.ref(null);const c=t,l=a;function s(n){o.value=n,o.value?(l("input",o.value),l("updateBlock",c.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(n,r)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("audio",m,[e.createElementVNode("source",{src:t.prop.content,type:"video/mp4"},null,8,v),e.createTextVNode(" Your browser does not support the video tag. ")])])):(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(u.default,{field:o.value,"onUpdate:field":r[0]||(r[0]=d=>o.value=d),onFileChange:s,type:"audio",placeholder:"Upload video",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"])]))]))}};exports.default=_;
@@ -1,9 +1,12 @@
1
- import { ref as m, openBlock as d, createElementBlock as i, createVNode as p, createElementVNode as b } from "vue";
1
+ import { ref as d, openBlock as t, createElementBlock as l, createElementVNode as r, createTextVNode as m, createVNode as v } from "vue";
2
2
  import f from "../../../../components/Upload/Upload.vue.js";
3
- const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], h = {
4
- key: 1,
5
- class: ""
6
- }, _ = {
3
+ const h = { class: "mn-b-thin w-100 radius-medium" }, _ = {
4
+ key: 0,
5
+ class: "flex-center flex"
6
+ }, b = {
7
+ controls: "",
8
+ class: "w-100 h-max-30r"
9
+ }, k = ["src"], x = { key: 1 }, B = {
7
10
  __name: "Audio",
8
11
  props: [
9
12
  "label",
@@ -11,36 +14,35 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
11
14
  "prop"
12
15
  ],
13
16
  emits: ["input", "updateBlock"],
14
- setup(t, { emit: s }) {
15
- const e = m(null), u = t, a = s;
16
- function r(o) {
17
- return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((n) => n.test(o));
17
+ setup(o, { emit: i }) {
18
+ const e = d(null);
19
+ d(null);
20
+ const c = o, n = i;
21
+ function u(a) {
22
+ e.value = a, e.value ? (n("input", e.value), n("updateBlock", c.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
18
23
  }
19
- function c(o) {
20
- e.value = o, e.value && r(e.value) ? (a("input", e.value), a("updateBlock", u.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
21
- }
22
- return (o, l) => (d(), i("div", v, [
23
- t.prop.content ? (d(), i("div", {
24
- key: 0,
25
- innerHTML: t.prop.content,
26
- class: "flex-center flex"
27
- }, null, 8, k)) : (d(), i("div", h, [
28
- p(f, {
24
+ return (a, s) => (t(), l("div", h, [
25
+ o.prop.content ? (t(), l("div", _, [
26
+ r("audio", b, [
27
+ r("source", {
28
+ src: o.prop.content,
29
+ type: "video/mp4"
30
+ }, null, 8, k),
31
+ m(" Your browser does not support the video tag. ")
32
+ ])
33
+ ])) : (t(), l("div", x, [
34
+ v(f, {
29
35
  field: e.value,
30
- "onUpdate:field": l[0] || (l[0] = (n) => e.value = n),
31
- onFileChange: c,
32
- type: "file",
33
- placeholder: "Enter embed code",
36
+ "onUpdate:field": s[0] || (s[0] = (p) => e.value = p),
37
+ onFileChange: u,
38
+ type: "audio",
39
+ placeholder: "Upload video",
34
40
  class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"
35
- }, null, 8, ["field"]),
36
- b("button", {
37
- onClick: c,
38
- class: "button-small button"
39
- }, " Save ")
41
+ }, null, 8, ["field"])
40
42
  ]))
41
43
  ]));
42
44
  }
43
45
  };
44
46
  export {
45
- _ as default
47
+ B as default
46
48
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("axios"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(l,{emit:u}){const n=e.ref(null),r=e.ref(null),i=l,s=u;function d(){r.value.click()}async function c(t){let o=t.target.files[0];console.log(o);let a=new FormData;a.append("file",o),console.log(a.has("file"));try{let m=await g.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(i.uploadPath)}`,a,{headers:{"Content-Type":"multipart/form-data"}});n.value=m.data[0].filepath,console.log(n.value),s("input",n.value),s("updateBlock",i.prop,{content:n.value})}catch(p){console.error(p)}}function f(t){t.preventDefault(),c({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:d,onDrop:f,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-b-small"},[l.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+l.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:r,tabindex:"-1",onChange:c,style:{display:"none"}},null,544)],32))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("axios"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:u}){const a=e.ref(null),r=e.ref(null),i=n,s=u;function f(){r.value.click()}async function c(t){let o=t.target.files[0];console.log(o);let l=new FormData;l.append("file",o),console.log(l.has("file"));try{let m=await g.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(i.uploadPath||"images")}`,l,{headers:{"Content-Type":"multipart/form-data"}});a.value=m.data[0].filepath,console.log(a.value),s("input",a.value),s("updateBlock",i.prop,{content:a.value})}catch(p){console.error(p)}}function d(t){t.preventDefault(),t.dataTransfer&&t.dataTransfer.files&&t.dataTransfer.files.length&&c({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),onDragenter:o[1]||(o[1]=e.withModifiers(()=>{},["prevent"])),onDragleave:o[2]||(o[2]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-b-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),n.prop.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("input",{key:2,type:"file",ref_key:"fileInput",ref:r,tabindex:"-1",onChange:c,style:{display:"none"}},null,544))],32))}};exports.default=h;
@@ -1,9 +1,9 @@
1
- import { ref as f, openBlock as l, createElementBlock as r, withModifiers as k, createElementVNode as v } from "vue";
2
- import y from "axios";
3
- const x = ["src"], C = {
1
+ import { ref as d, openBlock as a, createElementBlock as l, withModifiers as i, createCommentVNode as y } from "vue";
2
+ import h from "axios";
3
+ const C = ["src"], x = {
4
4
  key: 1,
5
5
  class: "t-transp pd-extra"
6
- }, U = {
6
+ }, w = {
7
7
  __name: "ImageUpload",
8
8
  props: [
9
9
  "label",
@@ -11,58 +11,63 @@ const x = ["src"], C = {
11
11
  "prop"
12
12
  ],
13
13
  emits: ["input", "updateBlock"],
14
- setup(a, { emit: d }) {
15
- const o = f(null), i = f(null), s = a, p = d;
16
- function m() {
17
- i.value.click();
14
+ setup(n, { emit: m }) {
15
+ const o = d(null), s = d(null), p = n, c = m;
16
+ function g() {
17
+ s.value.click();
18
18
  }
19
- async function c(e) {
19
+ async function f(e) {
20
20
  let t = e.target.files[0];
21
21
  console.log(t);
22
- let n = new FormData();
23
- n.append("file", t), console.log(n.has("file"));
22
+ let r = new FormData();
23
+ r.append("file", t), console.log(r.has("file"));
24
24
  try {
25
- let h = await y.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(s.uploadPath)}`, n, {
25
+ let k = await h.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(p.uploadPath || "images")}`, r, {
26
26
  headers: {
27
27
  "Content-Type": "multipart/form-data"
28
28
  }
29
29
  });
30
- o.value = h.data[0].filepath, console.log(o.value), p("input", o.value), p("updateBlock", s.prop, { content: o.value });
30
+ o.value = k.data[0].filepath, console.log(o.value), c("input", o.value), c("updateBlock", p.prop, { content: o.value });
31
31
  } catch (u) {
32
32
  console.error(u);
33
33
  }
34
34
  }
35
- function g(e) {
36
- e.preventDefault(), c({
35
+ function v(e) {
36
+ e.preventDefault(), e.dataTransfer && e.dataTransfer.files && e.dataTransfer.files.length && f({
37
37
  target: {
38
38
  files: e.dataTransfer.files
39
39
  }
40
40
  });
41
41
  }
42
- return (e, t) => (l(), r("div", {
43
- onClick: m,
44
- onDrop: g,
45
- onDragover: t[0] || (t[0] = k(() => {
42
+ return (e, t) => (a(), l("div", {
43
+ onClick: g,
44
+ onDrop: v,
45
+ onDragover: t[0] || (t[0] = i(() => {
46
+ }, ["prevent"])),
47
+ onDragenter: t[1] || (t[1] = i(() => {
48
+ }, ["prevent"])),
49
+ onDragleave: t[2] || (t[2] = i(() => {
46
50
  }, ["prevent"])),
47
51
  class: "w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-b-small"
48
52
  }, [
49
- a.prop.content ? (l(), r("img", {
53
+ n.prop.content ? (a(), l("img", {
50
54
  key: 0,
51
- src: (e.FILE_SERVER_URL || "") + a.prop.content,
55
+ src: (e.FILE_SERVER_URL || "") + n.prop.content,
52
56
  alt: "Uploaded image",
53
57
  class: "w-100 h-30r object-fit-contain"
54
- }, null, 8, x)) : (l(), r("span", C, "Click or drag-and-drop your image")),
55
- v("input", {
58
+ }, null, 8, C)) : (a(), l("span", x, "Click or drag-and-drop your image")),
59
+ n.prop.content ? y("", !0) : (a(), l("input", {
60
+ key: 2,
56
61
  type: "file",
57
62
  ref_key: "fileInput",
58
- ref: i,
63
+ ref: s,
59
64
  tabindex: "-1",
60
- onChange: c,
65
+ onChange: f,
61
66
  style: { display: "none" }
62
- }, null, 544)
67
+ }, null, 544))
63
68
  ], 32));
64
69
  }
65
70
  };
66
71
  export {
67
- U as default
72
+ w as default
68
73
  };
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(o,{emit:s}){const t=o,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let l=a.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let i=l.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:i,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
+
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function u(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=i=>o.prop[o.content]=i),placeholder:o.placeholder?o.placeholder:"",onInput:d,onFocus:l[1]||(l[1]=i=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:e.normalizeClass(["text-area mn-b-thin",{"t-main t-semi":o.prop.type==="Link"}])},`
4
+
5
+ `,42,k),[[e.vModelText,o.prop[o.content]]])]))}};exports.default=x;
@@ -0,0 +1,67 @@
1
+ import { ref as s, onUpdated as m, nextTick as i, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, normalizeClass as y, vModelText as T } from "vue";
2
+ /* empty css */
3
+ const b = ["placeholder"], C = {
4
+ __name: "Textarea",
5
+ props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
+ emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
+ setup(o, { emit: u }) {
8
+ const e = o, a = u;
9
+ s(e);
10
+ const t = s(null);
11
+ s(0);
12
+ function p(l) {
13
+ let n = l.target.value.split(/\n+/);
14
+ if (n.length > 1) {
15
+ e.prop[e.content] = n[0], i(() => {
16
+ c();
17
+ });
18
+ let r = n.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
+ a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
+ } else
21
+ l.target.value.trim() === "" && l.target.value.includes(`
22
+
23
+ `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
+ }
25
+ function f(l) {
26
+ (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
+ }
28
+ function d() {
29
+ i(() => {
30
+ t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
+ });
32
+ }
33
+ function c() {
34
+ t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
+ }
36
+ return m(() => {
37
+ e.setFocus && i(() => {
38
+ d();
39
+ }), c();
40
+ }), x(() => {
41
+ e.setFocus && i(() => {
42
+ d();
43
+ }), c();
44
+ }), (l, n) => (h(), B("div", null, [
45
+ g(v("textarea", {
46
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => o.prop[o.content] = r),
47
+ placeholder: o.placeholder ? o.placeholder : "",
48
+ onInput: p,
49
+ onFocus: n[1] || (n[1] = (r) => a("focus", t.value)),
50
+ onKeyup: f,
51
+ ref_key: "textarea",
52
+ ref: t,
53
+ tabindex: "-1",
54
+ class: y(["text-area mn-b-thin", {
55
+ "t-main t-semi": o.prop.type === "Link"
56
+ }])
57
+ }, `
58
+
59
+ `, 42, b), [
60
+ [T, o.prop[o.content]]
61
+ ])
62
+ ]));
63
+ }
64
+ };
65
+ export {
66
+ C as default
67
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Upload/Upload.vue.cjs"),u={class:"mn-b-thin w-100 pd-medium bg-black t-white radius-medium"},p={key:0,class:"flex-center flex"},m={controls:"",class:"w-100 h-max-30r"},v=["src"],b={key:1},f={__name:"Video",props:["label","value","prop"],emits:["input","updateBlock"],setup(o,{emit:r}){const t=e.ref(null);e.ref(null);const s=o,l=r;function a(n){console.log(t.value),t.value=n,t.value?(l("input",t.value),l("updateBlock",s.prop,{content:t.value})):alert("Invalid embed code or source not allowed.")}return(n,c)=>(e.openBlock(),e.createElementBlock("div",u,[o.prop.content?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("video",m,[e.createElementVNode("source",{src:o.prop.content,type:"video/mp4"},null,8,v),e.createTextVNode(" Your browser does not support the video tag. ")])])):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(i.default,{field:t.value,"onUpdate:field":c[0]||(c[0]=d=>t.value=d),onFileChange:a,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"])]))]))}};exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Upload/Upload.vue.cjs"),u={class:"mn-b-thin w-100 pd-medium bg-black t-white radius-medium"},p={key:0,class:"flex-center flex"},m={controls:"",class:"w-100 h-max-30r"},v=["src"],b={key:1},f={__name:"Video",props:["label","value","prop"],emits:["input","updateBlock"],setup(o,{emit:c}){const t=e.ref(null);e.ref(null);const a=o,l=c;function d(n){t.value=n,t.value?(l("input",t.value),l("updateBlock",a.prop,{content:t.value})):alert("Invalid embed code or source not allowed.")}return(n,r)=>(e.openBlock(),e.createElementBlock("div",u,[o.prop.content?(e.openBlock(),e.createElementBlock("div",p,[e.createElementVNode("audio",m,[e.createElementVNode("source",{src:o.prop.content,type:"audio/mp3"},null,8,v),e.createTextVNode(" Your browser does not support the audio tag. ")])])):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(i.default,{field:t.value,"onUpdate:field":r[0]||(r[0]=s=>t.value=s),onFileChange:d,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"},null,8,["field"])]))]))}};exports.default=f;
@@ -1,12 +1,12 @@
1
- import { ref as a, openBlock as t, createElementBlock as l, createElementVNode as d, createTextVNode as m, createVNode as v } from "vue";
2
- import f from "../../../../components/Upload/Upload.vue.js";
1
+ import { ref as r, openBlock as t, createElementBlock as l, createElementVNode as s, createTextVNode as m, createVNode as f } from "vue";
2
+ import v from "../../../../components/Upload/Upload.vue.js";
3
3
  const b = { class: "mn-b-thin w-100 pd-medium bg-black t-white radius-medium" }, h = {
4
4
  key: 0,
5
5
  class: "flex-center flex"
6
6
  }, _ = {
7
7
  controls: "",
8
8
  class: "w-100 h-max-30r"
9
- }, k = ["src"], x = { key: 1 }, y = {
9
+ }, k = ["src"], x = { key: 1 }, B = {
10
10
  __name: "Video",
11
11
  props: [
12
12
  "label",
@@ -15,26 +15,26 @@ const b = { class: "mn-b-thin w-100 pd-medium bg-black t-white radius-medium" },
15
15
  ],
16
16
  emits: ["input", "updateBlock"],
17
17
  setup(o, { emit: i }) {
18
- const e = a(null);
19
- a(null);
18
+ const e = r(null);
19
+ r(null);
20
20
  const c = o, n = i;
21
- function p(s) {
22
- console.log(e.value), e.value = s, e.value ? (n("input", e.value), n("updateBlock", c.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
21
+ function u(a) {
22
+ e.value = a, e.value ? (n("input", e.value), n("updateBlock", c.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
23
23
  }
24
- return (s, r) => (t(), l("div", b, [
24
+ return (a, d) => (t(), l("div", b, [
25
25
  o.prop.content ? (t(), l("div", h, [
26
- d("video", _, [
27
- d("source", {
26
+ s("audio", _, [
27
+ s("source", {
28
28
  src: o.prop.content,
29
- type: "video/mp4"
29
+ type: "audio/mp3"
30
30
  }, null, 8, k),
31
- m(" Your browser does not support the video tag. ")
31
+ m(" Your browser does not support the audio tag. ")
32
32
  ])
33
33
  ])) : (t(), l("div", x, [
34
- v(f, {
34
+ f(v, {
35
35
  field: e.value,
36
- "onUpdate:field": r[0] || (r[0] = (u) => e.value = u),
37
- onFileChange: p,
36
+ "onUpdate:field": d[0] || (d[0] = (p) => e.value = p),
37
+ onFileChange: u,
38
38
  type: "file",
39
39
  placeholder: "Enter embed code",
40
40
  class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"
@@ -44,5 +44,5 @@ const b = { class: "mn-b-thin w-100 pd-medium bg-black t-white radius-medium" },
44
44
  }
45
45
  };
46
46
  export {
47
- y as default
47
+ B as default
48
48
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../elements/Textarea.vue2.cjs"),V=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),y=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),$=require("../elements/Video.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},F=["onClick"],I=["onClick"],L=["onClick"],S=["onClick"],U=["onClick"],H=["onClick"],z=["onClick"],j={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const b=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:b.content};const h={Textarea:k.default,H2:V.default,Link:k.default,Bullets:N.default,Caption:x.default,ImageUpload:A.default,Embed:y.default,Audio:q.default,Video:$.default};function c(s="Textarea",a="",o,n){console.log("We are adding new block (functuin HandleAddBlock):"+s+a+o+n);let l={order:t.value.content.length+1,type:s,style:"",class:"",content:a,blocks:[],setFocus:!1};if(n&&n.blocks&&Array.isArray(n.blocks)){let m=n.blocks.map(E=>({...l,content:E.content})),B=[(n.index||o)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const _=m[m.length-1];console.log("New block is"+_)}else o!==void 0?(t.value.content.splice(o+1,0,l),console.log("Latest block is"+l)):(console.log("Another block is"+l),t.value.content.push(l));i.value=null,u("update",t.value.content)}function g(s,a){const o=t.value.content.findIndex(n=>n===s);o!==-1&&(t.value.content[o]={...t.value.content[o],...a}),u("update",t.value.content)}function p(s){let a=t.value.content.findIndex(o=>o===s);a!==-1&&t.value.content.splice(a,1),t.value.content[a-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function w(){d.value=!0}function C(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&c("Textarea",""),u("update",t.value.content)}),(s,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:w,onEnd:C},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(o,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:l=>(i.value=n,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h[o.type]),{index:n,component:o,prop:o,class:e.normalizeClass(o.class),setFocus:o.setFocus,content:"content",onDeleteBlock:p,onAddBlock:c,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===n?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:a[1]||(a[1]=e.withModifiers(l=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:a[0]||(a[0]=l=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(o.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:l=>p(o),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,F),e.createElementVNode("span",{onClick:l=>c("ImageUpload","",n),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,I),e.createElementVNode("span",{onClick:l=>c("H2","",n),class:"w-max button-small t-black bg-white button"}," Add Title ",8,L),e.createElementVNode("span",{onClick:l=>c("Embed","",n),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S),e.createElementVNode("span",{onClick:l=>c("Audio","",n),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,U),e.createElementVNode("span",{onClick:l=>c("Video","",n),class:"w-max button-small t-black bg-white button"}," Add Video ",8,H),e.createElementVNode("span",{onClick:l=>c("Link","",n),class:"w-max button-small t-black bg-white button"}," Add Link ",8,z)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=j;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../elements/Textarea.vue2.cjs"),V=require("../elements/H2.vue.cjs"),y=require("../elements/Caption.vue.cjs"),A=require("../elements/Bullets.vue.cjs"),N=require("../elements/ImageUpload.vue.cjs"),q=require("../elements/Embed.vue.cjs"),D=require("../elements/Audio.vue.cjs"),$=require("../elements/Video.vue.cjs"),M=require("../../../../components/Draggable/Draggable.vue.cjs"),T=["data-index"],F=["onMouseover"],I={key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"}},S={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},U=["onClick"],z=["onClick"],L=["onClick"],H=["onClick"],j=["onClick"],O=["onClick"],P=["onClick"],R={__name:"Constructor",props:{content:{type:Array}},emits:["update"],setup(v,{emit:b}){const h=v,u=b;e.ref(null);let n=e.ref(null);const i=e.ref(null),r=e.ref(!1),f={Textarea:k.default,H2:V.default,Link:k.default,Bullets:A.default,Caption:y.default,ImageUpload:N.default,Embed:q.default,Audio:D.default,Video:$.default};n.value={content:h.content},e.onMounted(()=>{n.value&&n.value.content.length===0&&s("Textarea","",0,null,"h2","Enter title")});const g=a=>{n.value.content=a},C=a=>{console.log("Drag started from index:",a)},_=(a,l)=>{console.log("Drag ended. Start index:",a,"End index:",l)};function s(a="Textarea",l="",o,t,c="",B=""){let d={type:a,style:"",class:c,placeholder:B,content:l,blocks:[],setFocus:!0};if(t&&t.blocks&&Array.isArray(t.blocks)){let m=t.blocks.map(x=>({...d,content:x.content})),E=[(t.index||o)+1,0].concat(m);n.value.content.splice.apply(n.value.content,E),m[m.length-1]}else o!==void 0?n.value.content.splice(o+1,0,d):n.value.content.push(d);i.value=null,u("update",n.value.content)}function w(a,l){const o=n.value.content.findIndex(t=>t===a);o!==-1&&(n.value.content[o]={...n.value.content[o],...l}),u("update",n.value.content)}function p(a){let l=n.value.content.findIndex(o=>o===a);l!==-1&&l!==0&&(n.value.content.splice(l,1),n.value.content[l-1].setFocus=!0),u("update",n.value.content)}return(a,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(M.default,{list:e.unref(n).content,"onUpdate:list":g,onStart:C,onEnd:_,disabledClass:"no-drag"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).content,(o,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,"data-index":t,draggable:"true",class:e.normalizeClass(["draggable-item pos-relative",{"no-drag":t===0}])},[e.createElementVNode("div",{onMouseover:c=>(i.value=t,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f[o.type]),{index:t,component:o,prop:o,placeholder:o.placeholder,class:e.normalizeClass(o.class),setFocus:o.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:w},null,40,["index","component","prop","placeholder","class","setFocus"]))],40,F),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===t?(e.openBlock(),e.createElementBlock("div",I,[e.createElementVNode("button",{onClick:l[0]||(l[0]=c=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(o.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",S,[t!==0?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:c=>p(o),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,U)):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:c=>s("ImageUpload","",t),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,z),e.createElementVNode("span",{onClick:c=>s("H2","",t),class:"w-max button-small t-black bg-white button"}," Add Title ",8,L),e.createElementVNode("span",{onClick:c=>s("Embed","",t),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,H),e.createElementVNode("span",{onClick:c=>s("Audio","",t),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,j),e.createElementVNode("span",{onClick:c=>s("Video","",t),class:"w-max button-small t-black bg-white button"}," Add Video ",8,O),e.createElementVNode("span",{onClick:c=>s("Link","",t),class:"w-max button-small t-black bg-white button"}," Add Link ",8,P)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)],10,T))),128))]),_:1},8,["list"])]))}};exports.default=R;