@ozdao/prometheus-framework 0.2.155 → 0.2.157

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. package/dist/_virtual/_commonjsHelpers.cjs +1 -1
  2. package/dist/_virtual/_commonjsHelpers.js +5 -3
  3. package/dist/_virtual/purify.cjs +1 -0
  4. package/dist/_virtual/purify.js +4 -0
  5. package/dist/builder.js +822 -0
  6. package/dist/builder.mjs +801 -0
  7. package/dist/{main-D_RRsfEH.mjs → main-Ba3SEUWZ.mjs} +1812 -1774
  8. package/dist/main-ldzk-jIP.js +92 -0
  9. package/dist/main.css +1 -1
  10. package/dist/node_modules/dompurify/dist/purify.cjs +2 -0
  11. package/dist/node_modules/dompurify/dist/purify.js +531 -0
  12. package/dist/node_modules/isomorphic-dompurify/browser.cjs +1 -0
  13. package/dist/node_modules/isomorphic-dompurify/browser.js +7 -0
  14. package/dist/products.server.js +1 -1
  15. package/dist/products.server.mjs +1 -1
  16. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.cjs +1 -0
  17. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.js +4 -0
  18. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.cjs +1 -0
  19. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.js +9 -0
  20. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.cjs +1 -0
  21. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.js +13 -0
  22. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.cjs +1 -0
  23. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.js +10 -0
  24. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.cjs +1 -0
  25. package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.js +7 -0
  26. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +47 -30
  30. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +9 -9
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +10 -10
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +9 -9
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
  38. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -0
  39. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +58 -0
  40. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -180
  42. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -0
  43. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +190 -0
  44. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +9 -7
  46. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +48 -43
  48. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +41 -63
  52. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +37 -36
  56. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +5 -5
  58. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +3 -0
  62. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +105 -53
  65. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +92 -98
  67. package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.cjs +1 -0
  68. package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.js +39 -0
  69. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -12
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
  77. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +32 -32
  79. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  81. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
  82. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +13 -15
  90. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  94. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +4 -4
  98. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/orders.client.js +34 -33
  103. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +14 -14
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +10 -10
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +5 -5
  121. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  123. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +13 -7
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +18 -18
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
  130. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
  136. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
  137. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  139. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  141. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +16 -16
  149. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/spots/router/spots.js +4 -0
  151. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +22 -22
  154. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +4 -4
  155. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +17 -17
  157. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
  159. package/dist/prometheus-framework.cjs.js +1 -1
  160. package/dist/prometheus-framework.es.js +1 -1
  161. package/dist/style.css +1 -1
  162. package/dist/{web-3rnOWrQO.mjs → web-CT2tGYho.mjs} +1 -1
  163. package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
  164. package/package.json +3 -2
  165. package/src/builder/builder.js +14 -0
  166. package/src/builder/modes/spa.dev.js +100 -0
  167. package/src/builder/modes/spa.prod.js +59 -0
  168. package/src/builder/modes/ssr.dev.js +184 -0
  169. package/src/builder/modes/ssr.prod.js +76 -0
  170. package/src/builder/ssr/ssr-render-html.js +57 -0
  171. package/src/builder/ssr/ssr-transform-webpack-stats.js +54 -0
  172. package/src/builder/templates/page.html +37 -0
  173. package/src/builder/templates/screen.html +33 -0
  174. package/src/builder/utils/hot-reload.js +5 -0
  175. package/src/builder/webpack/index.js +13 -0
  176. package/src/builder/webpack/webpack.config.base.js +127 -0
  177. package/src/builder/webpack/webpack.config.client.js +78 -0
  178. package/src/builder/webpack/webpack.config.server.js +31 -0
  179. package/src/builder/webpack/webpack.config.spa.js +80 -0
  180. package/src/builder/webpack/webpack.config.ssr.js +57 -0
  181. package/src/components/Breadcrumbs/Breadcrumbs.vue +39 -16
  182. package/src/components/Field/Field.vue +21 -2
  183. package/src/components/Popup/Popup.vue +2 -2
  184. package/src/modules/auth/store/auth.js +1 -2
  185. package/src/modules/backoffice/components/layouts/Backoffice.vue +36 -62
  186. package/src/modules/backoffice/components/pages/Dashboard.vue +2 -125
  187. package/src/modules/backoffice/components/partials/Sidebar.vue +176 -0
  188. package/src/modules/backoffice/router/admin.js +0 -15
  189. package/src/modules/backoffice/router/backoffice.js +5 -1
  190. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -1
  191. package/src/modules/community/components/pages/BlogPost.vue +30 -67
  192. package/src/modules/community/components/sections/Comments.vue +1 -1
  193. package/src/modules/community/router/blogposts.js +4 -0
  194. package/src/modules/constructor/components/elements/Textarea.vue +197 -79
  195. package/src/modules/constructor/components/sections/Constructor.vue +19 -32
  196. package/src/modules/constructor/components/sections/Viewer.vue +53 -0
  197. package/src/modules/gallery/components/pages/Gallery.vue +1 -1
  198. package/src/modules/globals/components/layouts/Client.vue +21 -7
  199. package/src/modules/globals/components/layouts/Empty.vue +1 -6
  200. package/src/modules/globals/components/pages/404.vue +1 -1
  201. package/src/modules/globals/components/sections/SectionPageTitle.vue +2 -2
  202. package/src/modules/globals/mixins/mixins.js +129 -97
  203. package/src/modules/landing/router/landing.js +3 -0
  204. package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
  205. package/src/modules/middlewares/client/auth.validation.js +14 -15
  206. package/src/modules/orders/orders.client.js +4 -2
  207. package/src/modules/organizations/router/organizations.js +9 -3
  208. package/src/modules/pages/controllers/factories/pages.factory.js +106 -0
  209. package/src/modules/pages/controllers/routes/pages.routes.js +24 -0
  210. package/src/modules/pages/models/page.model.js +18 -11
  211. package/src/modules/pages/pages.client.js +40 -0
  212. package/src/modules/pages/pages.server.js +32 -0
  213. package/src/modules/pages/views/components/blocks/CardPage.vue +123 -0
  214. package/src/modules/pages/views/components/pages/Page.vue +173 -0
  215. package/src/modules/pages/views/components/pages/PageEdit.vue +121 -0
  216. package/src/modules/pages/views/components/pages/Pages.vue +60 -0
  217. package/src/modules/pages/views/components/partials/SidebarPages.vue +112 -0
  218. package/src/modules/pages/views/router/pages.backoffice.router.js +46 -0
  219. package/src/modules/pages/views/router/pages.router.js +25 -0
  220. package/src/modules/pages/views/store/pages.js +78 -0
  221. package/src/modules/pages/views/store/pages.store.js +5 -0
  222. package/src/modules/products/controllers/leftovers.controller.js +1 -1
  223. package/src/modules/spots/router/spots.js +4 -0
  224. package/src/styles/base/all.scss +66 -53
  225. package/dist/index-BshfsiQG.js +0 -220
  226. package/dist/index-C-8xOJnM.mjs +0 -244
  227. package/dist/index-C-DW6ra2.js +0 -260
  228. package/dist/index-CDbtWkBj.js +0 -243
  229. package/dist/index-D4j29ivg.mjs +0 -261
  230. package/dist/index-DKtnWDNC.mjs +0 -221
  231. package/dist/index-DNI4aUP2.js +0 -259
  232. package/dist/index-Tcyehi73.mjs +0 -260
  233. package/dist/main-3Vn8SU2y.mjs +0 -14509
  234. package/dist/main-5IrI2IOV.js +0 -92
  235. package/dist/main-BFKp44Ze.mjs +0 -14509
  236. package/dist/main-BF_nMkug.js +0 -92
  237. package/dist/main-BHr0-Z3t.mjs +0 -14510
  238. package/dist/main-BY2OvGB9.mjs +0 -14509
  239. package/dist/main-Bcj0J6tP.mjs +0 -14509
  240. package/dist/main-By5Tbyui.js +0 -92
  241. package/dist/main-CEoQQpJV.js +0 -92
  242. package/dist/main-CI9l9xMs.js +0 -92
  243. package/dist/main-Ckn0Sslr.js +0 -92
  244. package/dist/main-DBv451oC.js +0 -92
  245. package/dist/main-DPg58GOU.mjs +0 -14509
  246. package/dist/main-DTHFR7H_.mjs +0 -14510
  247. package/dist/main-DxyAONrm.mjs +0 -14438
  248. package/dist/main-gY_284gJ.js +0 -92
  249. package/dist/main-wXdocsbd.js +0 -92
  250. package/dist/middlewares.server.js +0 -19
  251. package/dist/middlewares.server.mjs +0 -20
  252. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +0 -1
  253. package/dist/prometheus-framework/src/components/Address/Address.vue.js +0 -89
  254. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +0 -1
  255. package/dist/prometheus-framework/src/components/Button/Button.vue.js +0 -95
  256. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +0 -1
  257. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +0 -26
  258. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +0 -1
  259. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +0 -57
  260. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +0 -1
  261. package/dist/prometheus-framework/src/components/Field/Field.vue.js +0 -83
  262. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +0 -1
  263. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +0 -127
  264. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +0 -1
  265. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +0 -13
  266. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +0 -1
  267. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +0 -77
  268. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +0 -1
  269. package/dist/prometheus-framework/src/components/Select/Select.vue.js +0 -103
  270. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +0 -1
  271. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +0 -36
  272. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +0 -1
  273. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +0 -44
  274. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +0 -1
  275. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +0 -125
  276. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +0 -2
  277. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +0 -47
  278. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +0 -2
  279. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +0 -46
  280. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +0 -4
  281. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +0 -65
  282. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +0 -5
  283. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -67
  284. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +0 -1
  285. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +0 -30
  286. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +0 -1
  287. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +0 -42
  288. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +0 -1
  289. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +0 -26
  290. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +0 -1
  291. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +0 -42
  292. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +0 -1
  293. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +0 -26
  294. package/dist/queryProcessor-g8208K6g.mjs +0 -178
  295. package/dist/queryProcessor-haY_gPGg.js +0 -177
  296. package/dist/web-5eyiz9L7.mjs +0 -54
  297. package/dist/web-BPUCAST-.mjs +0 -54
  298. package/dist/web-Be96Xqd4.mjs +0 -54
  299. package/dist/web-BmdKi_fZ.js +0 -1
  300. package/dist/web-Bqpk8Mpk.js +0 -1
  301. package/dist/web-BzUFKqzw.js +0 -1
  302. package/dist/web-CcFPvlkl.js +0 -1
  303. package/dist/web-CgjTW1bL.js +0 -1
  304. package/dist/web-Cw0ijzjY.js +0 -1
  305. package/dist/web-CwTWV4ca.mjs +0 -54
  306. package/dist/web-DZUec7pP.js +0 -1
  307. package/dist/web-Dh669DqQ.mjs +0 -54
  308. package/dist/web-DkWpHYrh.mjs +0 -54
  309. package/dist/web-Dt2RCU54.js +0 -1
  310. package/dist/web-krQQeSb6.mjs +0 -54
  311. package/dist/web-nqFW_Sd1.mjs +0 -54
  312. package/src/modules/community/controllers/comments.controller.aggr.js +0 -280
  313. package/src/modules/community/controllers/comments.controller.populate.js +0 -180
  314. package/src/modules/constructor/components/elements/H2.vue +0 -102
  315. package/src/modules/pages/components/pages/Page.vue +0 -174
  316. package/src/modules/pages/components/pages/PageEdit.vue +0 -159
  317. package/src/modules/pages/components/pages/Pages.vue +0 -108
  318. package/src/modules/pages/controllers/pages.controller.js +0 -71
  319. package/src/modules/pages/router/pages.router.js +0 -15
  320. package/src/modules/pages/routes/pages.routes.js +0 -30
  321. package/src/modules/pages/store/pages.js +0 -94
@@ -1,9 +1,9 @@
1
1
  import { withAsyncContext as h, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
2
2
  /* empty css */
3
- /* empty css */
4
3
  import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
4
  /* empty css */
6
5
  /* empty css */
6
+ /* empty css */
7
7
  import "axios";
8
8
  /* empty css */
9
9
  import $ from "../blocks/CardBlogpost.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/isomorphic-dompurify/browser.cjs");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -1,36 +1,37 @@
1
- import { ref as r, onMounted as V, computed as w, openBlock as u, createElementBlock as m, createElementVNode as n, unref as l, createBlock as A, createCommentVNode as p, createVNode as i, Transition as U, withCtx as v, createTextVNode as z } from "vue";
1
+ import { ref as n, onMounted as V, computed as w, openBlock as u, createElementBlock as m, createElementVNode as r, unref as l, createBlock as A, createCommentVNode as p, createVNode as i, Transition as U, withCtx as v, createTextVNode as z } from "vue";
2
+ import "../../../../../../node_modules/isomorphic-dompurify/browser.js";
2
3
  /* empty css */
3
4
  import D from "../../../constructor/components/sections/Constructor.vue.js";
4
- import N from "../../../../components/Popup/Popup.vue.js";
5
+ import N from "../../../../components/Popup/Popup.vue2.js";
5
6
  /* empty css */
6
7
  /* empty css */
7
8
  import O from "../../../../components/FieldTags/BlockTags.vue.js";
8
9
  import E from "../../../../components/Checkbox/Checkbox.vue.js";
9
- import L from "../../../../components/Field/Field.vue2.js";
10
- import M from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
- import R from "../../../../components/Button/Button.vue2.js";
12
- import { useRoute as S, useRouter as F } from "vue-router";
10
+ import F from "../../../../components/Field/Field.vue2.js";
11
+ import L from "../../../../components/SelectMulti/SelectMulti.vue.js";
12
+ import M from "../../../../components/Button/Button.vue2.js";
13
+ import { useRoute as R, useRouter as S } from "vue-router";
13
14
  import { read as H, clean as j, state as q, update as k, create as y, remove as G } from "../../store/blogposts.js";
14
15
  import { state as f } from "../../../auth/store/auth.js";
15
16
  import { actions as I } from "../../../organizations/store/organizations.js";
16
17
  const J = { class: "pd-thin" }, K = {
17
18
  style: { "min-height": "100%" },
18
19
  class: "w-100 bg-light pd-big radius-big"
19
- }, Q = /* @__PURE__ */ n("div", { class: "w-full h-full" }, null, -1), W = {
20
+ }, Q = /* @__PURE__ */ r("div", { class: "w-full h-full" }, null, -1), W = {
20
21
  key: 0,
21
22
  class: "pd-thin pos-sticky pos-l-0 pos-b-0 w-100"
22
- }, X = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Y = /* @__PURE__ */ n("h3", { class: "mn-b-small" }, "Final Touches", -1), Z = /* @__PURE__ */ n("h5", { class: "mn-b-thin" }, "Add source:", -1), ee = /* @__PURE__ */ n("h5", { class: "mn-b-thin" }, "Add to public:", -1), te = {
23
+ }, X = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Y = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Final Touches", -1), Z = /* @__PURE__ */ r("h5", { class: "mn-b-thin" }, "Add source:", -1), ee = /* @__PURE__ */ r("h5", { class: "mn-b-thin" }, "Add to public:", -1), te = {
23
24
  key: 0,
24
25
  class: "mn-b-thin"
25
26
  }, oe = {
26
27
  key: 1,
27
28
  class: "mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"
28
- }, _e = {
29
+ }, we = {
29
30
  __name: "CreateBlogPost",
30
31
  setup(ae) {
31
- const c = S(), d = F();
32
- let e = r(null), b = r(null);
33
- const g = r([]), s = r(null);
32
+ const d = R(), c = S();
33
+ let e = n(null), b = n(null);
34
+ const g = n([]), s = n(null);
34
35
  V(async () => {
35
36
  const t = await I.read({
36
37
  user: f.user._id,
@@ -41,8 +42,8 @@ const J = { class: "pd-thin" }, K = {
41
42
  name: o.profile.name,
42
43
  _id: o._id,
43
44
  photo: o.profile.photo
44
- })), c.params.url) {
45
- const o = await H({ user: f.user._id, url: c.params.url });
45
+ })), d.params.url) {
46
+ const o = await H({ user: f.user._id, url: d.params.url });
46
47
  e.value = o.pop();
47
48
  } else
48
49
  j(), e.value = q.current;
@@ -59,7 +60,7 @@ const J = { class: "pd-thin" }, K = {
59
60
  photo: e.value.owner.target.profile.photo
60
61
  });
61
62
  });
62
- const P = r(""), _ = r([
63
+ const P = n(""), _ = n([
63
64
  { text: "story" },
64
65
  { text: "news" },
65
66
  { text: "guide" },
@@ -67,47 +68,47 @@ const J = { class: "pd-thin" }, K = {
67
68
  { text: "photos" }
68
69
  ]);
69
70
  w(() => _.value.filter((t) => t.text.toLowerCase().includes(P.value.toLowerCase()))), w(() => _.value.filter((t) => !g.value.some((o) => o.text === t.text)));
70
- const h = r(!1);
71
+ const h = n(!1);
71
72
  function x() {
72
73
  h.value = !0;
73
74
  }
74
75
  function C() {
75
76
  h.value = !1;
76
77
  }
77
- function $() {
78
- g.value.length > 0 && g.value.map((t) => t.text), e.value.status = "draft", e.value.name = e.value.content[0].content, c.params.url ? k(e.value).then((t) => {
79
- d.push({ name: "BlogPost", params: { url: t.url } });
78
+ function B() {
79
+ g.value.length > 0 && g.value.map((t) => t.text), e.value.status = "draft", e.value.name = e.value.content[0].content, d.params.url ? k(e.value).then((t) => {
80
+ c.push({ name: "BlogPost", params: { url: t.url } });
80
81
  }).catch((t) => {
81
82
  console.log(t);
82
83
  }) : y(e.value).then((t) => {
83
- d.push({ name: "BlogPost", params: { url: t.url } });
84
+ c.push({ name: "BlogPost", params: { url: t.url } });
84
85
  }).catch((t) => {
85
86
  console.log(t);
86
87
  });
87
88
  }
88
- function B() {
89
+ function $() {
89
90
  s.value && (e.value.owner = {
90
91
  target: s.value._id,
91
92
  type: "organization"
92
- }), s.value || (e.value.creator.hidden = !1), s.value || (e.value.organization = e.value.creator), e.value.status = "published", e.value.name = e.value.content[0].content, c.params.url ? k(e.value).then((t) => {
93
- console.log(e.value), d.push({ name: "BlogPost", params: { url: t.url } });
93
+ }), s.value || (e.value.creator.hidden = !1), s.value || (e.value.organization = e.value.creator), e.value.status = "published", e.value.name = e.value.content[0].content, d.params.url ? k(e.value).then((t) => {
94
+ console.log(e.value), c.push({ name: "BlogPost", params: { url: t.url } });
94
95
  }).catch((t) => {
95
96
  console.error(t);
96
97
  }) : y(e.value).then((t) => {
97
- d.push({ name: "BlogPost", params: { url: t.url } });
98
+ c.push({ name: "BlogPost", params: { url: t.url } });
98
99
  }).catch((t) => {
99
100
  console.error(t);
100
101
  });
101
102
  }
102
103
  function T() {
103
104
  confirm("Are you sure you want to delete this post?") && G(e.value._id).then((t) => {
104
- d.push({ name: "User Blogposts", params: { _id: e.value.creator.target._id } });
105
+ c.push({ name: "User Blogposts", params: { _id: e.value.creator.target._id } });
105
106
  }).catch((t) => {
106
107
  console.log(t);
107
108
  });
108
109
  }
109
110
  return (t, o) => (u(), m("article", J, [
110
- n("section", K, [
111
+ r("section", K, [
111
112
  Q,
112
113
  l(e) ? (u(), A(D, {
113
114
  key: 0,
@@ -118,17 +119,17 @@ const J = { class: "pd-thin" }, K = {
118
119
  i(U, { name: "scaleIn" }, {
119
120
  default: v(() => [
120
121
  l(e) ? (u(), m("section", W, [
121
- n("div", X, [
122
- l(c).params.url ? (u(), m("a", {
122
+ r("div", X, [
123
+ l(d).params.url ? (u(), m("a", {
123
124
  key: 0,
124
125
  onClick: o[1] || (o[1] = (a) => T()),
125
126
  class: "mn-r-auto bg-red t-white t-black button"
126
127
  }, "Delete")) : p("", !0),
127
- n("a", {
128
- onClick: o[2] || (o[2] = (a) => $()),
128
+ r("a", {
129
+ onClick: o[2] || (o[2] = (a) => B()),
129
130
  class: "mn-l-auto bg-white t-black button"
130
131
  }, "To Drafts"),
131
- n("a", {
132
+ r("a", {
132
133
  onClick: o[3] || (o[3] = (a) => x()),
133
134
  class: "mn-l-thin bg-black t-white button"
134
135
  }, "Publish")
@@ -150,14 +151,14 @@ const J = { class: "pd-thin" }, K = {
150
151
  class: "mn-b-small"
151
152
  }, null, 8, ["tags"]),
152
153
  Z,
153
- i(L, {
154
+ i(F, {
154
155
  field: l(e).source,
155
156
  "onUpdate:field": o[5] || (o[5] = (a) => l(e).source = a),
156
157
  placeholder: "Add full link to the source",
157
158
  class: "mn-b-medium bg-light radius-medium pd-small"
158
159
  }, null, 8, ["field"]),
159
160
  ee,
160
- i(M, {
161
+ i(L, {
161
162
  modelValue: s.value,
162
163
  "onUpdate:modelValue": o[6] || (o[6] = (a) => s.value = a),
163
164
  options: l(b),
@@ -178,8 +179,8 @@ const J = { class: "pd-thin" }, K = {
178
179
  class: "w-100"
179
180
  }, null, 8, ["radio"])
180
181
  ])) : p("", !0),
181
- i(R, {
182
- submit: B,
182
+ i(M, {
183
+ submit: $,
183
184
  callback: t.redirectTo,
184
185
  class: "w-100 bg-black t-white"
185
186
  }, {
@@ -195,5 +196,5 @@ const J = { class: "pd-thin" }, K = {
195
196
  }
196
197
  };
197
198
  export {
198
- _e as default
199
+ we as default
199
200
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("axios"),b=require("./Comment.vue.cjs"),f={id:"comments"},w={class:"mn-b-small"},k=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),E=[k],C={key:1,class:"mn-b-small"},B=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),V={__name:"Comments",props:["target","owner","type"],setup(s){const o=s,i=v.create({baseURL:process.env.API_URL}),l=e.ref([]),c=e.ref(""),p=async()=>{try{const t=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,maxDepth:2}});l.value=t.data}catch(t){console.error("Error fetching comments:",t)}},g=async(t,n)=>{try{const m=(await i.post("/comments/create",{content:n,target:o.target,type:o.type,user:o.owner,parent:t})).data;u(l.value,t,m)}catch(r){console.error("Error posting reply:",r)}},h=async(t,n)=>{try{const r=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,parentId:t,depth:n,maxDepth:10}});u(l.value,t,r.data,r.data.hasMore,!0)}catch(r){console.error("Error loading more comments:",r)}},u=(t,n,r,m,d=!1)=>{for(let a=0;a<t.length;a++){if(t[a]._id===n)return d?(t[a].children=[...t[a].children,...r],t[a].hasMore=m):t[a].children.push(r),!0;if(t[a].children&&u(t[a].children,n,r,m,d))return!0}return!1},y=async()=>{if(c.value)try{const t=await i.post("/comments/create",{target:o.target,user:o.owner,type:o.type,content:c.value});t.data.owner=o.owner,l.value.push(t.data),c.value=""}catch(t){console.error(t)}};return p(),(t,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",null,[e.createElementVNode("h3",w,e.toDisplayString(l.value.length)+" comments",1),s.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=r=>t.$router.push({name:"Sign In"})),class:"cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"},E)),s.owner?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("form",{onSubmit:e.withModifiers(y,["prevent"]),class:"bg-light radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[1]||(n[1]=r=>c.value=r),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,c.value]]),B],32)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,r=>(e.openBlock(),e.createBlock(b.default,{key:r._id,comment:r,target:s.target,type:s.type,owner:s.owner,onReply:g,onLoadMore:h,class:"comment mn-b-small radius-big pd-medium bg-light"},null,8,["comment","target","type","owner"]))),128))]))}};exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("axios"),b=require("./Comment.vue.cjs"),f={id:"comments"},w={class:"mn-b-small"},k=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),E=[k],C={key:1,class:"mn-b-small"},B=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),V={__name:"Comments",props:["target","owner","type"],setup(s){const o=s,i=v.create({baseURL:process.env.API_URL}),l=e.ref([]),c=e.ref(""),p=async()=>{try{const t=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,maxDepth:2}});l.value=t.data}catch(t){console.error("Error fetching comments:",t)}},g=async(t,n)=>{try{const m=(await i.post("/comments/create",{content:n,target:o.target,type:o.type,user:o.owner,parent:t})).data;u(l.value,t,m)}catch(r){console.error("Error posting reply:",r)}},h=async(t,n)=>{try{const r=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,parentId:t,depth:n,maxDepth:10}});u(l.value,t,r.data,r.data.hasMore,!0)}catch(r){console.error("Error loading more comments:",r)}},u=(t,n,r,m,d=!1)=>{for(let a=0;a<t.length;a++){if(t[a]._id===n)return d?(t[a].children=[...t[a].children,...r],t[a].hasMore=m):t[a].children.push(r),!0;if(t[a].children&&u(t[a].children,n,r,m,d))return!0}return!1},y=async()=>{if(c.value)try{const t=await i.post("/comments/create",{target:o.target,user:o.owner,type:o.type,content:c.value});t.data.owner=o.owner,l.value.push(t.data),c.value=""}catch(t){console.error(t)}};return p(),(t,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",null,[e.createElementVNode("h3",w,e.toDisplayString(l.value.length)+" comments",1),s.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=r=>t.$router.push({name:"Sign In"})),class:"pd-big cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"},E)),s.owner?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("form",{onSubmit:e.withModifiers(y,["prevent"]),class:"bg-light radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[1]||(n[1]=r=>c.value=r),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,c.value]]),B],32)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,r=>(e.openBlock(),e.createBlock(b.default,{key:r._id,comment:r,target:s.target,type:s.type,owner:s.owner,onReply:g,onLoadMore:h,class:"comment mn-b-small radius-big pd-medium bg-light"},null,8,["comment","target","type","owner"]))),128))]))}};exports.default=V;
@@ -31,7 +31,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
31
31
  } catch (e) {
32
32
  console.error("Error fetching comments:", e);
33
33
  }
34
- }, f = async (e, o) => {
34
+ }, b = async (e, o) => {
35
35
  try {
36
36
  const u = (await m.post("/comments/create", {
37
37
  content: o,
@@ -44,7 +44,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
44
44
  } catch (t) {
45
45
  console.error("Error posting reply:", t);
46
46
  }
47
- }, b = async (e, o) => {
47
+ }, f = async (e, o) => {
48
48
  try {
49
49
  const t = await m.get("/comments/read", {
50
50
  params: {
@@ -88,7 +88,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
88
88
  a.owner ? y("", !0) : (i(), d("div", {
89
89
  key: 0,
90
90
  onClick: o[0] || (o[0] = (t) => e.$router.push({ name: "Sign In" })),
91
- class: "cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"
91
+ class: "pd-big cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"
92
92
  }, V)),
93
93
  a.owner ? (i(), d("div", D, [
94
94
  l("form", {
@@ -112,8 +112,8 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
112
112
  target: a.target,
113
113
  type: a.type,
114
114
  owner: a.owner,
115
- onReply: f,
116
- onLoadMore: b,
115
+ onReply: b,
116
+ onLoadMore: f,
117
117
  class: "comment mn-b-small radius-big pd-medium bg-light"
118
118
  }, null, 8, ["comment", "target", "type", "owner"]))), 128))
119
119
  ]));
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},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"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},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"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
@@ -1,6 +1,6 @@
1
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
- /* empty css */
3
+ /* empty css */
4
4
  /* empty css */
5
5
  /* empty css */
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Community.vue.cjs"),t=[{path:"community",component:e.default,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Blog.vue.cjs"))}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>require("../components/pages/BlogPost.vue.cjs"))},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))}];exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Community.vue.cjs"),t=[{path:"community",component:e.default,meta:{title:{en:"Community",ru:"Коммьюнити"},breadcrumbs:{hidden:!0},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Blog.vue.cjs"))}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>require("../components/pages/BlogPost.vue.cjs"))},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))}];exports.default=t;
@@ -8,6 +8,9 @@ const o = [
8
8
  en: "Community",
9
9
  ru: "Коммьюнити"
10
10
  },
11
+ breadcrumbs: {
12
+ hidden: !0
13
+ },
11
14
  title_hide: !0
12
15
  },
13
16
  children: [{
@@ -1,9 +1,9 @@
1
- import { ref as p, openBlock as n, createElementBlock as c, createVNode as b, createElementVNode as s } from "vue";
1
+ import { ref as p, openBlock as n, createElementBlock as c, createVNode as b, createElementVNode as d } from "vue";
2
2
  import f from "../../../../components/Field/Field.vue2.js";
3
- const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], _ = {
3
+ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], w = {
4
4
  key: 1,
5
5
  class: ""
6
- }, w = /* @__PURE__ */ s("p", { class: "t-center" }, "Embeds from youtube.com, vimeo.com, soundcloud.com are allowed", -1), y = {
6
+ }, x = /* @__PURE__ */ d("p", { class: "t-center" }, "Embeds from youtube.com, vimeo.com, soundcloud.com are allowed", -1), y = {
7
7
  __name: "Embed",
8
8
  props: [
9
9
  "label",
@@ -11,9 +11,9 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
11
11
  "prop"
12
12
  ],
13
13
  emits: ["input", "updateBlock"],
14
- setup(o, { emit: d }) {
15
- const e = p(null), i = o, m = d;
16
- function r(a) {
14
+ setup(o, { emit: a }) {
15
+ const e = p(null), i = o, s = a;
16
+ function r(m) {
17
17
  return [
18
18
  /youtube\.com/,
19
19
  /facebook\.com/,
@@ -26,17 +26,17 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
26
26
  /linkedin\.com/,
27
27
  /medium\.com/,
28
28
  /spotify\.com/
29
- ].some((l) => l.test(a));
29
+ ].some((l) => l.test(m));
30
30
  }
31
31
  function u() {
32
- e.value && r(e.value) ? (m("input", e.value), m("updateBlock", i.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
32
+ e.value && r(e.value) ? (s("input", e.value), s("updateBlock", i.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
33
33
  }
34
- return (a, t) => (n(), c("div", v, [
34
+ return (m, t) => (n(), c("div", v, [
35
35
  o.prop.content ? (n(), c("div", {
36
36
  key: 0,
37
37
  innerHTML: o.prop.content,
38
38
  class: "flex-center flex"
39
- }, null, 8, k)) : (n(), c("div", _, [
39
+ }, null, 8, k)) : (n(), c("div", w, [
40
40
  b(f, {
41
41
  field: e.value,
42
42
  "onUpdate:field": t[0] || (t[0] = (l) => e.value = l),
@@ -44,9 +44,9 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
44
44
  placeholder: "Paste your embed code here",
45
45
  class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"
46
46
  }, null, 8, ["field"]),
47
- s("div", { class: "flex-v-center flex-nowrap flex gap-small" }, [
48
- w,
49
- s("button", {
47
+ d("div", { class: "flex-v-center flex-nowrap flex gap-small" }, [
48
+ x,
49
+ d("button", {
50
50
  onClick: u,
51
51
  class: "button-small button"
52
52
  }, " Save ")
@@ -1,5 +1 @@
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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),N=require("../../../../../../node_modules/isomorphic-dompurify/browser.cjs");;/* empty css */const h={key:0,class:"formatting-bar"},y={__name:"Textarea",props:{prop:Object,content:String,placeholder:String,index:Number,setFocus:Boolean},emits:["deleteBlock","updateBlock","addBlock","focus"],setup(s,{emit:k}){const T={ALLOWED_TAGS:["b","i","a","img"],ALLOWED_ATTR:["href","target","src"]},r=s,l=k,c=n.ref(null),u=n.ref(!1);n.ref(null);function C(t){const e=a(t.target.innerHTML);l("updateBlock",r.prop,{content:e})}function g(t){if(t.key==="Enter"&&!t.shiftKey){t.preventDefault();const o=window.getSelection().getRangeAt(0),i=E(o),d=a(c.value.innerHTML);l("updateBlock",r.prop,{content:d}),l("addBlock","Textarea",a(i),r.index)}else t.key==="Backspace"&&c.value.innerHTML.trim()===""&&(t.preventDefault(),l("deleteBlock",r.prop,{setCaretToEnd:!0}))}function E(t){const e=t.startContainer,o=t.startOffset;if(e.nodeType===Node.TEXT_NODE){const i=e.textContent.slice(o);return e.textContent=e.textContent.slice(0,o),i}else if(e.nodeType===Node.ELEMENT_NODE){const i=document.createElement("div"),d=Array.from(e.childNodes);let m=!1;for(d.forEach((b,L)=>{L===o&&(m=!0),m&&i.appendChild(b.cloneNode(!0))});e.childNodes[o];)e.removeChild(e.childNodes[o]);return i.innerHTML}return""}function f(t={}){n.nextTick(()=>{c.value.focus();let e=t.setCaretToEnd||r.prop.setCaretToEnd;if(r.prop.setFocus===!0&&!e){const o=document.createRange();o.setStart(c.value,0),o.collapse(!0);const i=window.getSelection();i.removeAllRanges(),i.addRange(o)}else v(c.value);l("updateBlock",r.prop,{setFocus:!1,setCaretToEnd:!1})})}n.onMounted(()=>{r.setFocus&&n.nextTick(()=>{f()})}),n.onUpdated(()=>{r.setFocus&&n.nextTick(()=>{f()})});function a(t){return N.default.sanitize(t,T)}function v(t){const e=document.createRange(),o=window.getSelection();e.selectNodeContents(t),e.collapse(!1),o.removeAllRanges(),o.addRange(e)}function x(){u.value=window.getSelection().toString().length>0}function p(t){document.execCommand(t,!1,null)}function B(){const t=prompt("Enter the URL:");t&&document.execCommand("createLink",!1,t)}return(t,e)=>(n.openBlock(),n.createElementBlock("div",null,[e[0]||(n.setBlockTracking(-1),e[0]=n.createElementVNode("div",{ref_key:"editableDiv",ref:c,contenteditable:!0,onInput:C,onKeydown:g,onMouseup:x,tabindex:"0",innerHTML:r.prop[r.content],class:n.normalizeClass(["editable-div mn-b-thin",{"t-main t-semi":s.prop.type==="Link",h3:s.prop.type==="H2"}])},null,42,["innerHTML"]),n.setBlockTracking(1),e[0]),u.value?(n.openBlock(),n.createElementBlock("div",h,[n.createElementVNode("button",{onClick:e[1]||(e[1]=o=>p("bold"))},"B"),n.createElementVNode("button",{onClick:e[2]||(e[2]=o=>p("italic"))},"I"),n.createElementVNode("button",{onClick:B},"Link")])):n.createCommentVNode("",!0)]))}};exports.default=y;
@@ -1,67 +1,119 @@
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";
1
+ import { ref as u, onMounted as D, nextTick as f, onUpdated as M, openBlock as T, createElementBlock as g, setBlockTracking as E, createElementVNode as c, normalizeClass as A, createCommentVNode as R } from "vue";
2
+ import z from "../../../../../../node_modules/isomorphic-dompurify/browser.js";
2
3
  /* empty css */
3
- const b = ["placeholder"], C = {
4
+ const H = {
5
+ key: 0,
6
+ class: "formatting-bar"
7
+ }, K = {
4
8
  __name: "Textarea",
5
- props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
9
+ props: {
10
+ prop: Object,
11
+ content: String,
12
+ placeholder: String,
13
+ index: Number,
14
+ setFocus: Boolean
15
+ },
6
16
  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();
17
+ setup(l, { emit: v }) {
18
+ const x = {
19
+ ALLOWED_TAGS: ["b", "i", "a", "img"],
20
+ ALLOWED_ATTR: ["href", "target", "src"]
21
+ }, o = l, s = v, r = u(null), p = u(!1);
22
+ u(null);
23
+ function L(t) {
24
+ const e = a(t.target.innerHTML);
25
+ s("updateBlock", o.prop, { content: e });
24
26
  }
25
- function f(l) {
26
- (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
+ function B(t) {
28
+ if (t.key === "Enter" && !t.shiftKey) {
29
+ t.preventDefault();
30
+ const n = window.getSelection().getRangeAt(0), i = b(n), d = a(r.value.innerHTML);
31
+ s("updateBlock", o.prop, { content: d }), s("addBlock", "Textarea", a(i), o.index);
32
+ } else t.key === "Backspace" && r.value.innerHTML.trim() === "" && (t.preventDefault(), s("deleteBlock", o.prop, { setCaretToEnd: !0 }));
27
33
  }
28
- function d() {
29
- i(() => {
30
- t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
34
+ function b(t) {
35
+ const e = t.startContainer, n = t.startOffset;
36
+ if (e.nodeType === Node.TEXT_NODE) {
37
+ const i = e.textContent.slice(n);
38
+ return e.textContent = e.textContent.slice(0, n), i;
39
+ } else if (e.nodeType === Node.ELEMENT_NODE) {
40
+ const i = document.createElement("div"), d = Array.from(e.childNodes);
41
+ let k = !1;
42
+ for (d.forEach((w, S) => {
43
+ S === n && (k = !0), k && i.appendChild(w.cloneNode(!0));
44
+ }); e.childNodes[n]; )
45
+ e.removeChild(e.childNodes[n]);
46
+ return i.innerHTML;
47
+ }
48
+ return "";
49
+ }
50
+ function m(t = {}) {
51
+ f(() => {
52
+ r.value.focus();
53
+ let e = t.setCaretToEnd || o.prop.setCaretToEnd;
54
+ if (o.prop.setFocus === !0 && !e) {
55
+ const n = document.createRange();
56
+ n.setStart(r.value, 0), n.collapse(!0);
57
+ const i = window.getSelection();
58
+ i.removeAllRanges(), i.addRange(n);
59
+ } else
60
+ h(r.value);
61
+ s("updateBlock", o.prop, { setFocus: !1, setCaretToEnd: !1 });
62
+ });
63
+ }
64
+ D(() => {
65
+ o.setFocus && f(() => {
66
+ m();
67
+ });
68
+ }), M(() => {
69
+ o.setFocus && f(() => {
70
+ m();
31
71
  });
72
+ });
73
+ function a(t) {
74
+ return z.sanitize(t, x);
75
+ }
76
+ function h(t) {
77
+ const e = document.createRange(), n = window.getSelection();
78
+ e.selectNodeContents(t), e.collapse(!1), n.removeAllRanges(), n.addRange(e);
79
+ }
80
+ function y() {
81
+ p.value = window.getSelection().toString().length > 0;
82
+ }
83
+ function C(t) {
84
+ document.execCommand(t, !1, null);
32
85
  }
33
- function c() {
34
- t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
86
+ function N() {
87
+ const t = prompt("Enter the URL:");
88
+ t && document.execCommand("createLink", !1, t);
35
89
  }
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"
90
+ return (t, e) => (T(), g("div", null, [
91
+ e[0] || (E(-1), e[0] = c("div", {
92
+ ref_key: "editableDiv",
93
+ ref: r,
94
+ contenteditable: !0,
95
+ onInput: L,
96
+ onKeydown: B,
97
+ onMouseup: y,
98
+ tabindex: "0",
99
+ innerHTML: o.prop[o.content],
100
+ class: A(["editable-div mn-b-thin", {
101
+ "t-main t-semi": l.prop.type === "Link",
102
+ h3: l.prop.type === "H2"
56
103
  }])
57
- }, `
58
-
59
- `, 42, b), [
60
- [T, o.prop[o.content]]
61
- ])
104
+ }, null, 42, ["innerHTML"]), E(1), e[0]),
105
+ p.value ? (T(), g("div", H, [
106
+ c("button", {
107
+ onClick: e[1] || (e[1] = (n) => C("bold"))
108
+ }, "B"),
109
+ c("button", {
110
+ onClick: e[2] || (e[2] = (n) => C("italic"))
111
+ }, "I"),
112
+ c("button", { onClick: N }, "Link")
113
+ ])) : R("", !0)
62
114
  ]));
63
115
  }
64
116
  };
65
117
  export {
66
- C as default
118
+ K as default
67
119
  };
@@ -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"),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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../elements/Textarea.vue2.cjs"),B=require("../elements/ImageUpload.vue.cjs"),x=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),N=require("../elements/Video.vue.cjs"),y=require("../../../../components/Draggable/Draggable.vue.cjs"),A=require("../../../../../node_modules/uuid/dist/esm-browser/v4.cjs"),D=["data-index"],$=["onMouseover"],q={key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"}},T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},M=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U=["onClick"],z=["onClick"],L=["onClick"],H={__name:"Constructor",props:{content:{type:Array}},emits:["update"],setup(v,{emit:k}){const h=v,u=k;e.ref(null);let o=e.ref(null);const i=e.ref(null),d=e.ref(!1),f={Textarea:r.default,H2:r.default,Link:r.default,ImageUpload:B.default,Embed:x.default,Audio:V.default,Video:N.default};o.value={content:h.content},e.onMounted(()=>{o.value&&o.value.content.length===0&&c("Textarea","",0,null,"h2","Enter title")});const b=l=>{o.value.content=l},g=l=>{console.log("Drag started from index:",l)},_=(l,s)=>{console.log("Drag ended. Start index:",l,"End index:",s)};function c(l="Textarea",s="",t,n,a="",w="",E=A.default()){let p={id:E,type:l,style:"",class:a,placeholder:w,content:s,blocks:[],setFocus:!0};t!==void 0?o.value.content.splice(t+1,0,p):o.value.content.push(p),i.value=null,u("update",o.value.content)}function C(l,s){const t=o.value.content.findIndex(n=>n===l);t!==-1&&(o.value.content[t]={...o.value.content[t],...s}),u("update",o.value.content)}function m(l,s={}){const t=o.value.content.findIndex(n=>n.id===l.id);if(t!==-1&&t!==0&&(o.value.content.splice(t,1),t>0)){const n=o.value.content[t-1];n.setFocus=!0,n.setCaretToEnd=!0}u("update",o.value.content)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(y.default,{list:e.unref(o).content,"onUpdate:list":b,onStart:g,onEnd:_,disabledClass:"no-drag"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).content,(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-index":n,draggable:"true",class:e.normalizeClass(["draggable-item pos-relative",{"no-drag":n===0}])},[e.createElementVNode("div",{onMouseover:a=>(i.value=n,d.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f[t.type]),{index:n,component:t,prop:t,placeholder:t.placeholder,class:e.normalizeClass(t.class),setFocus:t.setFocus,content:"content",onDeleteBlock:m,onAddBlock:c,onUpdateBlock:C},null,40,["index","component","prop","placeholder","class","setFocus"]))],40,$),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===n?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("button",{onClick:s[0]||(s[0]=a=>d.value=!d.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(t.content?"...":"+"),1),d.value?(e.openBlock(),e.createElementBlock("div",T,[n!==0?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:a=>m(t),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,M)):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:a=>c("ImageUpload","",n),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>c("H2","",n),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>c("Embed","",n),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S),e.createElementVNode("span",{onClick:a=>c("Audio","",n),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,U),e.createElementVNode("span",{onClick:a=>c("Video","",n),class:"w-max button-small t-black bg-white button"}," Add Video ",8,z),e.createElementVNode("span",{onClick:a=>c("Link","",n),class:"w-max button-small t-black bg-white button"}," Add Link ",8,L)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)],10,D))),128))]),_:1},8,["list"])]))}};exports.default=H;