@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
@@ -20,49 +20,39 @@
20
20
 
21
21
 
22
22
  <TransitionGroup tag="ul" name="fade" class="container">
23
- <CardBlogpost
24
- v-if="!isLoading && blogpost"
25
- @click="$router.push({name: 'Blogpost', params: {url: blogpost.url}})"
26
- :blogpost="blogpost"
27
- :user="auth.state.user._id"
28
- :type="'blogpostPage'"
29
- class="mn-b-medium"
30
- >
31
- <section>
32
- <component
33
- v-if="blogpost && blogpost.content"
34
- v-for="(block, index) in blogpost.content"
35
- :is="ComponentMap[block.type]"
36
- :key="index"
37
- :index="index"
38
- :component="block"
39
- :prop="block"
40
- :class="block.class"
41
- content="content"
42
- v-bind="getBlockProps(block)"
43
- class="mn-b-regular"
44
- />
45
- </section>
23
+ <CardBlogpost
24
+ v-if="!isLoading && blogpost"
25
+ @click="$router.push({name: 'Blogpost', params: {url: blogpost.url}})"
26
+ :blogpost="blogpost"
27
+ :user="auth.state.user._id"
28
+ :type="'blogpostPage'"
29
+ :hideTitle="true"
30
+ class="mn-b-medium"
31
+ >
32
+ <Viewer
33
+ v-if="blogpost && blogpost.content"
34
+ :content="blogpost.content"
35
+ />
46
36
 
47
37
  <a v-if="blogpost.source" :href="blogpost.source" target="_blank" class="mn-b-semi d-block w-max radius-big pd-thin bg-black t-white">
48
38
  Check Source 🔗
49
39
  </a>
50
-
51
- </CardBlogpost>
52
-
53
- <h3 class="mn-b-small">Recommended Communities</h3>
54
- <Publics
55
- class="mn-b-small"
56
- />
57
-
58
- <Comments
59
- v-if="!isLoading && blogpost"
60
- :type="'blogpost'"
61
- :target="blogpost._id"
62
- :owner="auth.state.user._id"
63
- />
64
-
65
- </TransitionGroup>
40
+
41
+ </CardBlogpost>
42
+
43
+ <h3 class="mn-b-small">Recommended Communities</h3>
44
+ <Publics
45
+ class="mn-b-small"
46
+ />
47
+
48
+ <Comments
49
+ v-if="!isLoading && blogpost"
50
+ :type="'blogpost'"
51
+ :target="blogpost._id"
52
+ :owner="auth.state.user._id"
53
+ />
54
+
55
+ </TransitionGroup>
66
56
 
67
57
  </section>
68
58
  </template>
@@ -78,9 +68,7 @@
78
68
  import Publics from '@pf/src/modules/organizations/components/sections/Publics.vue'
79
69
  import Comments from '@pf/src/modules/community/components/sections/Comments.vue';
80
70
 
81
- import Image from '@pf/src/modules/constructor/components/elements/Image.vue';
82
- import VideoPlayer from '@pf/src/modules/constructor/components/elements/VideoPlayer.vue';
83
- import Embed from '@pf/src/modules/constructor/components/elements/Embed.vue';
71
+ import Viewer from '@pf/src/modules/constructor/components/sections/Viewer.vue';
84
72
 
85
73
  import * as blog from '@pf/src/modules/community/store/blogposts.js';
86
74
  import * as auth from '@pf/src/modules/auth/store/auth';
@@ -101,31 +89,6 @@
101
89
  blogpost.value = data[0];
102
90
  isLoading.value = false;
103
91
  });
104
-
105
- const ComponentMap = {
106
- 'Textarea': 'p',
107
- 'H2': 'h2',
108
- 'Bullets': 'p',
109
- 'Caption': 'p',
110
- 'ImageUpload': Image,
111
- 'Video': VideoPlayer,
112
- 'Link': 'a',
113
- 'Embed': Embed
114
- };
115
-
116
- function getBlockProps(block) {
117
- if (block.type === 'Textarea') {
118
- return { innerHTML: block.content, class: "p-big" };
119
- } else if (block.type === 'H2') {
120
- return { innerHTML: block.content, class: "h3" };
121
- } else if (block.type === 'Caption') {
122
- return { innerHTML: block.content };
123
- } else if (block.type === 'ImageUpload') {
124
- return { src: block.content };
125
- }
126
- return {};
127
- }
128
-
129
92
  </script>
130
93
 
131
94
  <style lang="scss">
@@ -3,7 +3,7 @@
3
3
  <div>
4
4
  <h3 class="mn-b-small">{{ comments.length }} comments</h3>
5
5
 
6
- <div @click="$router.push({name: 'Sign In'})" class="cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big" v-if="!owner">
6
+ <div @click="$router.push({name: 'Sign In'})" class="pd-big cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big" v-if="!owner">
7
7
  <p class="t-semi uppercase">Please log in to leave a comment.</p>
8
8
  </div>
9
9
 
@@ -9,7 +9,11 @@ const community = [
9
9
  en: 'Community',
10
10
  ru: 'Коммьюнити'
11
11
  },
12
+ breadcrumbs: {
13
+ hidden: true
14
+ },
12
15
  title_hide: true
16
+
13
17
  },
14
18
  children: [{
15
19
  path: ':category?',
@@ -1,99 +1,217 @@
1
1
  <template>
2
2
  <div>
3
- <textarea
4
- v-model="prop[content]"
5
- :placeholder="placeholder ? placeholder : ''"
6
- @input="handleInput"
7
- @focus="emit('focus', textarea)"
8
- @keyup="handleKeyUp"
9
- ref="textarea"
10
- tabindex="-1"
11
- class="text-area mn-b-thin"
3
+ <div
4
+ v-once
5
+ ref="editableDiv"
6
+ :contenteditable="true"
7
+ @input="handleInput"
8
+ @keydown="handleKeyDown"
9
+ @mouseup="checkTextSelection"
10
+ tabindex="0"
11
+ v-html="props.prop[props.content]"
12
+ class="editable-div mn-b-thin"
12
13
  :class="{
13
- 't-main t-semi': prop.type === 'Link'
14
- }"
15
- >
16
-
17
- </textarea>
14
+ 't-main t-semi': prop.type === 'Link',
15
+ 'h3': prop.type === 'H2'
16
+ }"
17
+ />
18
+ <div v-if="isTextSelected" class="formatting-bar">
19
+ <button @click="applyFormat('bold')">B</button>
20
+ <button @click="applyFormat('italic')">I</button>
21
+ <button @click="createLink">Link</button>
22
+ </div>
18
23
  </div>
19
24
  </template>
20
25
 
21
- <script setup="props">
22
- import { computed, ref, onMounted, watch, nextTick, onUpdated, watchEffect } from 'vue'
23
-
24
- const props = defineProps(['prop','value','content','placeholder','index','setFocus'])
25
- const emit = defineEmits(['deleteBlock', 'updateBlock','addBlock','focus'])
26
-
27
- const data = ref(props)
28
- const textarea = ref(null)
29
-
30
- let cursorPosition = ref(0);
31
-
32
- function handleInput(event) {
33
- let paragraphs = event.target.value.split(/\n+/);
34
-
35
- if (paragraphs.length > 1) {
36
- props.prop[props.content] = paragraphs[0];
37
-
38
- nextTick(() => {
39
- resize()
40
- })
41
-
42
- let newBlocks = paragraphs.slice(1).map((paragraph) => ({ __name: 'Textarea', content: paragraph }));
43
-
44
- // emit addBlock event with block data and index
45
- emit('addBlock', 'Textarea', '', props.index, { blocks: newBlocks, ref: textarea });
46
- } else {
47
- if (event.target.value.trim() === "" && event.target.value.includes("\n\n")) {
48
- // if the entered value is only an empty line, add a new block
49
- console.log('We are adding new block:' + props.index + newBlocks + textarea )
50
- emit('addBlock', 'Textarea', '', props.index, { blocks: newBlocks, ref: textarea });
26
+ <script setup>
27
+ import { ref, onMounted, nextTick, onUpdated, watchEffect, watch } from 'vue'
28
+
29
+ import DOMPurify from 'isomorphic-dompurify';
30
+
31
+ const sanitizeConfig = {
32
+ ALLOWED_TAGS: ['b', 'i', 'a', 'img'],
33
+ ALLOWED_ATTR: ['href', 'target', 'src']
34
+ };
35
+
36
+ const props = defineProps({
37
+ prop: Object,
38
+ content: String,
39
+ placeholder: String,
40
+ index: Number,
41
+ setFocus: Boolean
42
+ })
43
+
44
+ const emit = defineEmits(['deleteBlock', 'updateBlock', 'addBlock', 'focus'])
45
+
46
+ const editableDiv = ref(null)
47
+ const isTextSelected = ref(false)
48
+ const savedSelection = ref(null)
49
+
50
+ function handleInput(event) {
51
+ const sanitizedContent = sanitizeHTML(event.target.innerHTML)
52
+ emit('updateBlock', props.prop, { content: sanitizedContent })
53
+ }
54
+
55
+ function handleKeyDown(event) {
56
+ if (event.key === 'Enter' && !event.shiftKey) {
57
+ event.preventDefault()
58
+ const selection = window.getSelection()
59
+ const range = selection.getRangeAt(0)
60
+ const newBlockContent = extractContentAfterCursor(range)
61
+
62
+ // Update current block content
63
+ const sanitizedContent = sanitizeHTML(editableDiv.value.innerHTML)
64
+ emit('updateBlock', props.prop, { content: sanitizedContent })
65
+
66
+ // Create new block
67
+ emit('addBlock', 'Textarea', sanitizeHTML(newBlockContent), props.index)
68
+ } else if (event.key === 'Backspace' && editableDiv.value.innerHTML.trim() === "") {
69
+ event.preventDefault()
70
+ emit('deleteBlock', props.prop, { setCaretToEnd: true })
71
+ }
72
+ }
73
+
74
+ function extractContentAfterCursor(range) {
75
+ const container = range.startContainer
76
+ const cursorOffset = range.startOffset
77
+
78
+ // Если курсор находится в текстовом узле
79
+ if (container.nodeType === Node.TEXT_NODE) {
80
+ const textAfterCursor = container.textContent.slice(cursorOffset)
81
+ container.textContent = container.textContent.slice(0, cursorOffset)
82
+ return textAfterCursor
83
+ }
84
+ // Если курсор находится между элементами
85
+ else if (container.nodeType === Node.ELEMENT_NODE) {
86
+ const tempDiv = document.createElement('div')
87
+ const childNodes = Array.from(container.childNodes)
88
+ let foundCursor = false
89
+
90
+ childNodes.forEach((node, index) => {
91
+ if (index === cursorOffset) {
92
+ foundCursor = true
93
+ }
94
+ if (foundCursor) {
95
+ tempDiv.appendChild(node.cloneNode(true))
51
96
  }
52
- resize();
97
+ })
98
+
99
+ // Удаляем перенесенные узлы из исходного контейнера
100
+ while (container.childNodes[cursorOffset]) {
101
+ container.removeChild(container.childNodes[cursorOffset])
53
102
  }
103
+
104
+ return tempDiv.innerHTML
54
105
  }
55
-
56
- function handleKeyUp(event) {
57
- if ((event.keyCode === 8 || event.keyCode === 46) && props.prop[props.content].trim() === "") {
58
-
59
- emit('deleteBlock', props.prop);
106
+
107
+ return ''
108
+ }
109
+
110
+ function focus(options = {}) {
111
+ nextTick(() => {
112
+ editableDiv.value.focus()
113
+
114
+ let shouldSetCaretToEnd = options.setCaretToEnd || props.prop.setCaretToEnd
115
+
116
+ if (props.prop.setFocus === true && !shouldSetCaretToEnd) {
117
+ // Для нового блока ставим курсор в начало
118
+ const range = document.createRange()
119
+ range.setStart(editableDiv.value, 0)
120
+ range.collapse(true)
121
+ const selection = window.getSelection()
122
+ selection.removeAllRanges()
123
+ selection.addRange(range)
124
+ } else {
125
+ // Для существующего блока или после удаления ставим курсор в конец
126
+ setCaretToEnd(editableDiv.value)
60
127
  }
61
- }
62
-
63
128
 
64
- function focus() {
65
- nextTick(() => {
66
- textarea.value.focus();
67
- // if (props.prop[props.content].length > 0) textarea.value.setSelectionRange(0, 0);
68
- emit('updateBlock', props.prop, { setFocus: false } );
69
- })
129
+ // Сбрасываем флаги
130
+ emit('updateBlock', props.prop, { setFocus: false, setCaretToEnd: false })
131
+ })
132
+ }
133
+ onMounted(() => {
134
+ if (props.setFocus) {
135
+ nextTick(() => {
136
+ focus()
137
+ })
70
138
  }
139
+ })
71
140
 
72
- function resize() {
73
- textarea.value.style.height = "1rem";
74
- textarea.value.style.height = textarea.value.scrollHeight + "px";
141
+ onUpdated(() => {
142
+ if (props.setFocus) {
143
+ nextTick(() => {
144
+ focus()
145
+ })
75
146
  }
76
-
77
- onUpdated(() => {
78
- if (props.setFocus) nextTick(() => { { focus()} })
79
- resize()
80
- });
81
-
82
- onMounted(() => {
83
- if (props.setFocus) nextTick(() => { { focus()} })
84
- resize()
85
- });
147
+ })
148
+
149
+ function sanitizeHTML(html) {
150
+ const sanitize = DOMPurify.sanitize(html, sanitizeConfig);
151
+ return sanitize;
152
+ }
153
+
154
+
155
+ function setCaretToEnd(element) {
156
+ const range = document.createRange()
157
+ const selection = window.getSelection()
158
+ range.selectNodeContents(element)
159
+ range.collapse(false)
160
+ selection.removeAllRanges()
161
+ selection.addRange(range)
162
+ }
163
+
164
+ function checkTextSelection() {
165
+ isTextSelected.value = window.getSelection().toString().length > 0
166
+ }
167
+
168
+ function applyFormat(format) {
169
+ document.execCommand(format, false, null)
170
+ }
171
+
172
+ function createLink() {
173
+ const url = prompt('Enter the URL:')
174
+ if (url) {
175
+ document.execCommand('createLink', false, url)
176
+ }
177
+ }
86
178
  </script>
87
179
 
88
180
 
89
181
  <style lang="scss">
90
- .text-area {
91
- width: 100%;
92
-
93
- resize: none; // allow vertical resize
94
- background-color: transparent;
95
- &:focus {
96
- border: 0;
182
+ .editable-div {
183
+ width: 100%;
184
+ min-height: 1rem;
185
+ background-color: transparent;
186
+ outline: none;
187
+ white-space: pre-wrap;
188
+ word-wrap: break-word;
189
+
190
+ &:empty::before {
191
+ content: attr(placeholder);
192
+ color: #999;
193
+ }
194
+
195
+ &:focus {
196
+ border: 0;
197
+ }
198
+ }
199
+
200
+ .formatting-bar {
201
+ display: flex;
202
+ gap: 5px;
203
+ margin-top: 5px;
204
+
205
+ button {
206
+ padding: 2px 5px;
207
+ background-color: #f0f0f0;
208
+ border: 1px solid #ccc;
209
+ border-radius: 3px;
210
+ cursor: pointer;
211
+
212
+ &:hover {
213
+ background-color: #e0e0e0;
97
214
  }
98
215
  }
99
- </style>
216
+ }
217
+ </style>
@@ -10,7 +10,7 @@
10
10
  >
11
11
  <div
12
12
  v-for="(block, index) in post.content"
13
- :key="index"
13
+ :key="block.id"
14
14
  :data-index="index"
15
15
  draggable="true"
16
16
  class="draggable-item pos-relative"
@@ -108,9 +108,6 @@
108
108
 
109
109
  <script setup>
110
110
  import Textarea from '../elements/Textarea.vue';
111
- import H2 from '../elements/H2.vue';
112
- import Caption from '../elements/Caption.vue';
113
- import Bullets from '../elements/Bullets.vue';
114
111
  import ImageUpload from '../elements/ImageUpload.vue';
115
112
  import Embed from '../elements/Embed.vue';
116
113
  import Audio from '../elements/Audio.vue';
@@ -119,6 +116,7 @@ import Video from '../elements/Video.vue';
119
116
  import Draggable from '@pf/src/components/Draggable/Draggable.vue';
120
117
 
121
118
  import { ref, onMounted, watchEffect, computed } from 'vue';
119
+ import { v4 as uuidv4 } from 'uuid'
122
120
 
123
121
  const props = defineProps({
124
122
  content: {
@@ -136,10 +134,8 @@ const showMenu = ref(false)
136
134
 
137
135
  const ComponentMap = {
138
136
  'Textarea': Textarea,
139
- 'H2': H2,
137
+ 'H2': Textarea,
140
138
  'Link': Textarea,
141
- 'Bullets': Bullets,
142
- 'Caption': Caption,
143
139
  'ImageUpload': ImageUpload,
144
140
  'Embed': Embed,
145
141
  'Audio': Audio,
@@ -166,9 +162,9 @@ const handleDragEnd = (startIndex, endIndex) => {
166
162
  console.log('Drag ended. Start index:', startIndex, 'End index:', endIndex);
167
163
  };
168
164
 
169
- function handleAddBlock(type = 'Textarea', content = '', index, data, classBlock = '', placeholder = '') {
170
-
165
+ function handleAddBlock(type = 'Textarea', content = '', index, data, classBlock = '', placeholder = '', id = uuidv4()) {
171
166
  let blockNew = {
167
+ id: id,
172
168
  type: type,
173
169
  style: '',
174
170
  class: classBlock,
@@ -178,23 +174,12 @@ function handleAddBlock(type = 'Textarea', content = '', index, data, classBlock
178
174
  setFocus: true,
179
175
  };
180
176
 
181
- if (data && data.blocks && Array.isArray(data.blocks)) {
182
- let newBlocks = data.blocks.map(block => ({
183
- ...blockNew,
184
- content: block.content,
185
- }));
186
-
187
- let args = [(data.index || index) + 1, 0].concat(newBlocks);
188
-
189
- post.value.content.splice.apply(post.value.content, args);
190
-
191
- const lastBlock = newBlocks[newBlocks.length - 1];
192
- } else if (index !== undefined) {
177
+ if (index !== undefined) {
193
178
  post.value.content.splice(index + 1, 0, blockNew);
194
179
  } else {
195
180
  post.value.content.push(blockNew);
196
181
  }
197
-
182
+
198
183
  showControls.value = null
199
184
  emits('update', post.value.content);
200
185
  }
@@ -203,23 +188,25 @@ function handleUpdateBlock(block, update) {
203
188
  const index = post.value.content.findIndex(item => item === block);
204
189
 
205
190
  if (index !== -1) {
206
- post.value.content[index] = { ...post.value.content[index], ...update };
191
+ post.value.content[index] = { ...post.value.content[index], ...update };
207
192
  }
208
-
209
193
  emits('update', post.value.content);
210
194
  }
211
195
 
196
+ function handleDeleteBlock(blockToDelete, options = {}) {
197
+ const index = post.value.content.findIndex(block => block.id === blockToDelete.id)
212
198
 
213
- function handleDeleteBlock(block) {
214
- let index = post.value.content.findIndex(b => b === block);
215
-
216
- // Не даем удалить первый (нулевой) элемент в конструкторе
217
199
  if (index !== -1 && index !== 0) {
218
- post.value.content.splice(index, 1);
219
- post.value.content[index - 1].setFocus = true
200
+ post.value.content.splice(index, 1)
201
+
202
+ if (index > 0) {
203
+ const previousBlock = post.value.content[index - 1]
204
+ previousBlock.setFocus = true
205
+ previousBlock.setCaretToEnd = true
206
+ }
220
207
  }
221
-
222
- emits('update', post.value.content);
208
+
209
+ emits('update', post.value.content)
223
210
  }
224
211
  </script>
225
212
 
@@ -0,0 +1,53 @@
1
+ <template>
2
+ <section>
3
+ <component
4
+ v-for="(block, index) in content"
5
+ :is="ComponentMap[block.type]"
6
+ :key="index"
7
+ :index="index"
8
+ :component="block"
9
+ :prop="block"
10
+ :class="block.class"
11
+ content="content"
12
+ v-bind="getBlockProps(block, index)"
13
+ class="mn-b-regular"
14
+ />
15
+ </section>
16
+ </template>
17
+
18
+ <script setup>
19
+ import Image from '@pf/src/modules/constructor/components/elements/Image.vue';
20
+ import VideoPlayer from '@pf/src/modules/constructor/components/elements/VideoPlayer.vue';
21
+ import Embed from '@pf/src/modules/constructor/components/elements/Embed.vue';
22
+
23
+ const props = defineProps([
24
+ 'content'
25
+ ])
26
+
27
+ const ComponentMap = {
28
+ 'Textarea': 'p',
29
+ 'H2': 'h2',
30
+ 'Bullets': 'p',
31
+ 'Caption': 'p',
32
+ 'ImageUpload': Image,
33
+ 'Video': VideoPlayer,
34
+ 'Link': 'a',
35
+ 'Embed': Embed
36
+ };
37
+
38
+ function getBlockProps(block, index) {
39
+ if (block.type === 'Textarea' && index !== 0) {
40
+ return { innerHTML: block.content, class: "p-big" };
41
+ } else if (block.type === 'Textarea' && index === 0) {
42
+ return { innerHTML: block.content, class: "h2" };
43
+ }
44
+ else if (block.type === 'H2') {
45
+ return { innerHTML: block.content, class: "h3" };
46
+ } else if (block.type === 'Caption') {
47
+ return { innerHTML: block.content };
48
+ } else if (block.type === 'ImageUpload') {
49
+ return { src: block.content };
50
+ }
51
+ return {};
52
+ }
53
+ </script>
@@ -50,7 +50,7 @@
50
50
  <div v-for="item in items" :key="item._id" class="bg-light radius-medium o-hidden flex-column pos-relative flex-wrap">
51
51
  <div class="w-100 h-100 h-min-10r pos-relative">
52
52
  <img
53
- :src="item.cover"
53
+ :src="((FILE_SERVER_URL || '') + item.cover)"
54
54
  class="w-100 h-100 object-fit-cover bg-black " @click="openPreviewPopup(item)"
55
55
  />
56
56
  </div>