@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
@@ -0,0 +1,32 @@
1
+ const ModelPage = require('./models/page.model.js');
2
+
3
+ const RoutesPage = require('./controllers/routes/pages.routes.js');
4
+ const FactoryPage = require('./controllers/factories/pages.factory.js');
5
+
6
+ const CRUD = require('@pf/src/modules/globals/services/globals.crud');
7
+
8
+ function initializePages(app, db, origins, publicPath) {
9
+ // Setup models in the database object
10
+ db.page = ModelPage(db);
11
+
12
+ // Setup routes if the app object is provided
13
+ if (app) {
14
+ RoutesPage(app, db, origins, publicPath);
15
+ }
16
+
17
+ // new CRUD('/api/pages', app, db, db.page);
18
+ }
19
+
20
+ // Exporting controllers, routes, and models
21
+ module.exports = {
22
+ initialize: initializePages,
23
+ models: {
24
+ ModelPage
25
+ },
26
+ routes: {
27
+ RoutesPage
28
+ },
29
+ controllers: {
30
+ FactoryPage
31
+ }
32
+ };
@@ -0,0 +1,123 @@
1
+ <template>
2
+ <div>
3
+ <div :class="$attrs.class">
4
+ <!-- {{ page.url }} -->
5
+ <div class="flex flex-nowrap gap-thin card-page-title">
6
+ <router-link
7
+ :to="router.resolve({ name: 'Page', params: { url: page.url.split('/') } }).href"
8
+ class="
9
+ z-index-2
10
+ cursor-pointer
11
+ mn-r-auto
12
+ t-truncate
13
+ "
14
+ :class="{
15
+ 't-main': $route.params.url && page.url === joinArrayToUrl($route.params.url)
16
+ }"
17
+ >
18
+ {{ page.name }}
19
+ </router-link>
20
+
21
+ <router-link
22
+ v-if="hasAdminRights"
23
+ :to="router.resolve({ name: 'Backoffice Pages Edit', params: { url: page.url.split('/') } }).href"
24
+ class="
25
+ z-index-2
26
+ cursor-pointer
27
+ card-page-actions
28
+ radius-extra pd-micro bg-second
29
+ "
30
+ >
31
+ <IconEdit
32
+ class="i-small"
33
+ classes="fill-white"
34
+ />
35
+ </router-link>
36
+
37
+ <button
38
+ v-if="hasAdminRights"
39
+ @click="createPage(page)"
40
+ class="
41
+ z-index-2
42
+ cursor-pointer
43
+ card-page-actions
44
+ radius-extra pd-micro bg-second
45
+ "
46
+ >
47
+ <IconAdd
48
+ class="i-small"
49
+ :fill="'white'"
50
+ />
51
+ </button>
52
+ </div>
53
+ </div>
54
+
55
+ <div v-if="page.children && page.children.length > 0 && page.children[0].url && showChildren" class="mn-l-small br-t br-solid br-black-transp-10">
56
+ <CardPage
57
+ @createPage="createPage"
58
+ v-for="childPage in page.children"
59
+ :key="childPage.url"
60
+ :page="childPage"
61
+ :hasAdminRights="hasAdminRights"
62
+ :class="$attrs.class"
63
+ />
64
+ </div>
65
+
66
+ </div>
67
+ </template>
68
+
69
+ <script setup>
70
+ import { ref } from 'vue'
71
+
72
+ import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
73
+ import IconAdd from '@pf/src/modules/icons/navigation/IconAdd.vue'
74
+
75
+ import Button from '@pf/src/components/Button/Button.vue'
76
+ import Field from "@pf/src/components/Field/Field.vue";
77
+
78
+ import { useRouter } from 'vue-router'
79
+
80
+ const router = useRouter()
81
+
82
+ const props = defineProps({
83
+ page: {
84
+ type: Object,
85
+ required: true
86
+ },
87
+ hasAdminRights: {
88
+ type: Boolean,
89
+ default: false
90
+ },
91
+ showChildren: {
92
+ type: Boolean,
93
+ default: true
94
+ }
95
+ })
96
+
97
+ const emits = defineEmits([
98
+ 'createPage'
99
+ ])
100
+
101
+ const newPage = ref({
102
+ show: false,
103
+ name: null
104
+ })
105
+
106
+ async function createPage(page) {
107
+ emits('createPage', page)
108
+ }
109
+ </script>
110
+
111
+ <style lang="scss">
112
+ .card-page-title {
113
+ .card-page-actions {
114
+ display: none;
115
+ }
116
+
117
+ &:hover {
118
+ .card-page-actions {
119
+ display: block;
120
+ }
121
+ }
122
+ }
123
+ </style>
@@ -0,0 +1,173 @@
1
+ <template>
2
+
3
+ <div v-if="page && page.content" style="overflow: clip" class=" bg-light pos-relative">
4
+
5
+ <div class="pd-medium pos-sticky mobile-only z-index-1 pos-t-0 bg-light w-100 br-b br-solid br-black-transp-10">
6
+ <button @click="showMenu" class="cursor-pointer">
7
+ {{ isMenuOpen === false ? 'Show Menu' : 'Hide Menu' }}
8
+ </button>
9
+ </div>
10
+
11
+ <div v-if="isMenuOpen" class="z-index-0 pos-relative">
12
+ <ul
13
+ class="transition-ease-in-out w-100 bg-light"
14
+ >
15
+ <CardPage
16
+ :page="pageParent"
17
+ :hasAdminRights="hasAdminRights"
18
+ class="pd-thin"
19
+ />
20
+ </ul>
21
+ </div>
22
+
23
+ <div v-if="!isMenuOpen" class="cols-2-1_3 h-100 bg-light z-index-0 pos-relative">
24
+
25
+ <div v-if="pageParent.url !== page.url" class="desktop-only h-100 bg-white o-scroll z-index-0 pos-relative">
26
+ <ul
27
+ class="transition-ease-in-out w-100 bg-light"
28
+ >
29
+ <CardPage
30
+ :page="pageParent"
31
+ :hasAdminRights="hasAdminRights"
32
+ class="bg-white pd-thin"
33
+ />
34
+ </ul>
35
+ </div>
36
+
37
+ <div class="o-scroll pd-medium">
38
+ <Viewer
39
+ :content="page.content"
40
+ class=""
41
+ />
42
+
43
+ <div class="gap-thin cols-2">
44
+ <div v-if="navigationPages.previousPage" class="bg-white pd-medium mn-b-thin radius-semi ">
45
+ <h4 class="mn-b-small" >Read Previous</h4>
46
+
47
+ <CardPage
48
+ :page="navigationPages.previousPage"
49
+ :showChildren="false"
50
+ class="h3 t-main bg-white mn-b-thin radius-semi"
51
+ />
52
+ </div>
53
+
54
+ <div v-if="navigationPages.children.length > 0" class="bg-white pd-medium mn-b-thin radius-semi ">
55
+ <h4 class="mn-b-small pd-micro ">Table of Contents</h4>
56
+ <CardPage
57
+ v-for="childPage in navigationPages.children"
58
+ :key="childPage.id"
59
+ :page="childPage"
60
+ class="bg-white pd-micro radius-semi"
61
+ />
62
+ </div>
63
+
64
+ <div v-if="navigationPages.nextPage" class="bg-white pd-medium mn-b-thin radius-semi">
65
+ <h4 class="mn-b-small" >Read Next</h4>
66
+ <CardPage
67
+ :page="navigationPages.nextPage"
68
+ class="h3 t-main bg-white mn-b-thin radius-semi"
69
+ :showChildren="false"
70
+ />
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ </div>
76
+ </div>
77
+ </template>
78
+
79
+ <script setup>
80
+ // Import libs
81
+ import { computed, onMounted, ref, onServerPrefetch } from 'vue'
82
+
83
+ import { useStore } from '@/store'
84
+ import { useRoute } from 'vue-router'
85
+ import { useI18n } from 'vue-i18n'
86
+
87
+ import Viewer from '@pf/src/modules/constructor/components/sections/Viewer.vue';
88
+
89
+ import CardPage from '../blocks/CardPage.vue'
90
+
91
+ import * as pages from '../../store/pages';
92
+ import * as auth from '@pf/src/modules/auth/store/auth'
93
+
94
+ import { useGlobalMixins } from "@pf/src/modules/globals/mixins/mixins.js"
95
+
96
+ const isMenuOpen = ref(false)
97
+
98
+ function showMenu () {
99
+ isMenuOpen.value = !isMenuOpen.value
100
+ }
101
+
102
+ function flattenTree(tree) {
103
+ const pages = [];
104
+
105
+ function recursiveFlatten(nodes, parent = null) {
106
+ for (const node of nodes) {
107
+ pages.push({ ...node, parent }); // Сохраняем родителя для каждого узла
108
+ if (node.children.length > 0) {
109
+ recursiveFlatten(node.children, node);
110
+ }
111
+ }
112
+ }
113
+
114
+ recursiveFlatten(tree.children);
115
+ return pages;
116
+ }
117
+
118
+ // Получаем плоский список всех страниц
119
+ const allPages = computed(() => flattenTree(pageParent.value));
120
+
121
+ // Вычисляемая функция для нахождения предыдущей и следующей страниц
122
+ const navigationPages = computed(() => {
123
+ // Если текущая страница - рутовая
124
+ if (page.value._id === pageParent.value._id) {
125
+ return { children: page.value.children, previousPage: null, nextPage: null };
126
+ }
127
+
128
+ const currentIndex = allPages.value.findIndex(p => p._id === page.value._id);
129
+
130
+ const previousPage = currentIndex > 0
131
+ ? allPages.value[currentIndex - 1]
132
+ : pageParent.value; // Если нет предыдущего, берем родителя
133
+
134
+ const nextPage = currentIndex < allPages.value.length - 1
135
+ ? allPages.value[currentIndex + 1]
136
+ : null;
137
+
138
+ return { previousPage, nextPage, children: [] };
139
+ });
140
+
141
+ const {
142
+ normalizeUrlParam,
143
+ joinArrayToUrl,
144
+ isAdmin
145
+ } = useGlobalMixins()
146
+
147
+ const hasAdminRights = computed(() => {
148
+ return isAdmin(auth.state.access.roles)
149
+ })
150
+
151
+ const { t, locale } = useI18n()
152
+
153
+ const store = useStore()
154
+ const route = useRoute()
155
+
156
+ const pageParent = ref(null)
157
+ const page = ref(null)
158
+
159
+ onMounted(async () => {
160
+ let urlParent = route.params.url
161
+ if (urlParent.length > 0) urlParent = urlParent[0]
162
+
163
+ pageParent.value = await pages.actions.read({url: urlParent})
164
+
165
+ let url = route.params.url
166
+ if (url.length > 0) url = joinArrayToUrl(url)
167
+
168
+ page.value = await pages.actions.read({url: url})
169
+ })
170
+ </script>
171
+
172
+ <style lang="scss">
173
+ </style>
@@ -0,0 +1,121 @@
1
+ <template>
2
+ <!-- Toolbar -->
3
+ <div v-if="page">
4
+ <section v-if="page" class="w-100 mn-b-thin bg-light pd-big radius-semi">
5
+ <Constructor
6
+ :content="page.content"
7
+ @update="update => page.content = update"
8
+ />
9
+ </section>
10
+
11
+ <section v-if="page" class="pos-sticky pos-l-0 pos-b-0 w-100 ">
12
+ <div class="pd-thin radius-big bg-main w-100 flex-nowrap flex">
13
+
14
+ <Button
15
+ v-if="route.params.url"
16
+ :submit="() => onDelete()"
17
+ :callback="() => deletePageCallback()"
18
+ class="t-nowrap bg-second w-max"
19
+ >
20
+ Delete
21
+ </Button>
22
+
23
+ <Button
24
+ :submit="() => onSubmit()"
25
+ class="mn-l-auto t-nowrap t-white bg-black w-max"
26
+ >
27
+ Save
28
+ </Button>
29
+ </div>
30
+ </section>
31
+ </div>
32
+ </template>
33
+
34
+ <script setup>
35
+ import { ref, computed, onMounted } from 'vue'
36
+ import { useRoute, useRouter } from 'vue-router'
37
+
38
+ import { useGlobalMixins } from "@pf/src/modules/globals/mixins/mixins.js"
39
+
40
+ const {
41
+ normalizeUrlParam,
42
+ joinArrayToUrl
43
+ } = useGlobalMixins()
44
+
45
+
46
+ import { state, actions } from '../../store/pages'
47
+
48
+ import Button from '@pf/src/components/Button/Button.vue'
49
+ import Field from "@pf/src/components/Field/Field.vue";
50
+ import CardPage from '../blocks/CardPage.vue'
51
+ import Block from '@pf/src/components/Block/Block.vue';
52
+
53
+ import Constructor from '@pf/src/modules/constructor/components/sections/Constructor.vue';
54
+
55
+ import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'
56
+
57
+ // import EditCategories from '@pf/src/modules/products/components/blocks/EditCategories.vue'
58
+
59
+ const route = useRoute()
60
+ const router = useRouter()
61
+
62
+ const page = ref(null)
63
+
64
+ onMounted(async () => {
65
+ let url
66
+
67
+ if (route.params.url) {
68
+ url = route.params.url
69
+
70
+ if (url.length > 0) url = joinArrayToUrl(url)
71
+ }
72
+
73
+ if (url) {
74
+ try {
75
+ page.value = await actions.read({url: url})
76
+ } catch (error) {
77
+ console.log('error', error)
78
+ }
79
+ } else {
80
+ page.value = state.current
81
+ }
82
+ })
83
+
84
+ async function onSubmit() {
85
+ page.value.name = page.value.content[0].content
86
+ if (!page.value.url) page.value.url = normalizeUrlParam(page.value.name)
87
+
88
+ try {
89
+ if (route.params.url) {
90
+ await actions.update(page.value)
91
+ } else {
92
+ await actions.create(page.value)
93
+ }
94
+ } catch (error) {
95
+ console.log('error', error)
96
+ }
97
+
98
+ router.push(router.resolve({ name: 'Backoffice Pages Edit', params: { url: page.value.url.split('/') } }).href)
99
+
100
+ }
101
+
102
+ function createPageCallback() {
103
+ router.push(router.resolve({ name: 'Backoffice Pages Edit', params: { url: newPage.value.url.split('/') } }).href)
104
+ }
105
+
106
+ async function onDelete() {
107
+ try {
108
+ await actions.delete(page.value)
109
+ } catch (error) {
110
+ console.log('error', error)
111
+ }
112
+ }
113
+
114
+ function deletePageCallback() {
115
+ if (page.value.parent) {
116
+ router.push(router.resolve({ name: 'Backoffice Pages Edit', params: { url: page.value.parent.url.split('/') } }).href)
117
+ } else {
118
+ router.push({ name: 'Backoffice Pages'})
119
+ }
120
+ }
121
+ </script>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div>
3
+ <SectionPageTitle
4
+ title="Pages"
5
+ :actions="[
6
+ { to: { name: 'Backoffice Pages Add'}, label: 'Create Page' }
7
+ ]"
8
+ class="mn-b-small bg-light bg-light radius-big"
9
+ />
10
+
11
+ <Block
12
+ v-if="pagesAll"
13
+ class="mn-b-thin cols-1 gap-thin"
14
+ >
15
+ <!-- Objects -->
16
+ <CardPage v-for="page in pagesAll" :page="page" :hasAdminRights="hasAdminRights" class="bg-white pd-thin radius-small"/>
17
+ </Block>
18
+ </div>
19
+ </template>
20
+
21
+ <script setup>
22
+ import { onMounted, ref, toRefs, computed } from 'vue'
23
+
24
+ import { useRoute,useRouter } from 'vue-router'
25
+
26
+ import Block from '@pf/src/components/Block/Block.vue';
27
+ import SectionPageTitle from '@pf/src/modules/globals/components/sections/SectionPageTitle.vue'
28
+
29
+ import CardPage from '../blocks/CardPage.vue'
30
+
31
+ import * as pages from '../../store/pages.js'
32
+ import * as auth from '@pf/src/modules/auth/store/auth'
33
+
34
+ import { useGlobalMixins } from "@pf/src/modules/globals/mixins/mixins.js"
35
+
36
+ const {
37
+ normalizeUrlParam,
38
+ joinArrayToUrl,
39
+ isAdmin
40
+ } = useGlobalMixins()
41
+
42
+ const hasAdminRights = computed(() => {
43
+ return isAdmin(auth.state.access.roles)
44
+ })
45
+
46
+
47
+ const route = useRoute()
48
+ const router = useRouter()
49
+
50
+ const pagesAll = ref(null)
51
+
52
+ onMounted(async () => {
53
+ pagesAll.value = await pages.actions.read()
54
+ })
55
+
56
+ </script>
57
+
58
+ <style lang="scss">
59
+
60
+ </style>
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <Block
3
+ v-if="pagesAll"
4
+ class="mn-b-thin pd-small radius-semi cols-1 gap-thin"
5
+ >
6
+
7
+ <CardPage
8
+ v-for="page in pagesAll"
9
+ :page="page"
10
+ class="radius-small pd-thin"
11
+ :hasAdminRights="hasAdminRights"
12
+ @createPage="openPulicationPopup"
13
+ />
14
+
15
+ <Popup
16
+ @close-popup="closePublicationPopup"
17
+ :isPopupOpen="isPublicationPopup"
18
+ class="w-m-33r t-left pd-big bg-white radius-big"
19
+ >
20
+ <div class="h-max-20r o-scroll">
21
+ <Constructor
22
+ :content="newPage.content"
23
+ @update="update => newPage.content = update"
24
+ />
25
+ </div>
26
+ <Button
27
+ :submit="() => onSubmit()"
28
+ class="mn-l-auto t-nowrap t-white bg-black w-max"
29
+ >
30
+ Save
31
+ </Button>
32
+ </Popup>
33
+ </Block>
34
+ </template>
35
+
36
+ <script setup>
37
+ import { onMounted, ref, toRefs, computed } from 'vue'
38
+
39
+ import { useRoute,useRouter } from 'vue-router'
40
+
41
+ import Block from '@pf/src/components/Block/Block.vue';
42
+ import Popup from '@pf/src/components/Popup/Popup.vue'
43
+ import Button from '@pf/src/components/Button/Button.vue'
44
+
45
+ import Constructor from '@pf/src/modules/constructor/components/sections/Constructor.vue';
46
+
47
+ import CardPage from '../blocks/CardPage.vue'
48
+
49
+ import * as pages from '../../store/pages.js'
50
+ import * as auth from '@pf/src/modules/auth/store/auth'
51
+
52
+ import { useGlobalMixins } from "@pf/src/modules/globals/mixins/mixins.js"
53
+
54
+ const {
55
+ normalizeUrlParam,
56
+ joinArrayToUrl,
57
+ isAdmin
58
+ } = useGlobalMixins()
59
+
60
+ const hasAdminRights = computed(() => {
61
+ return isAdmin(auth.state.access.roles)
62
+ })
63
+
64
+
65
+ const route = useRoute()
66
+ const router = useRouter()
67
+
68
+ const pagesAll = ref(null)
69
+
70
+ onMounted(async () => {
71
+ pagesAll.value = await pages.actions.read()
72
+ })
73
+ // /////////////////////////////////////////
74
+ // Publication Popup
75
+ // /////////////////////////////////////////
76
+ const newPage = ref({
77
+ url: null,
78
+ name: null,
79
+ parent: null,
80
+ content: []
81
+ })
82
+
83
+ const isPublicationPopup = ref(false)
84
+
85
+ function openPulicationPopup(page) {
86
+ isPublicationPopup.value = true;
87
+
88
+ newPage.value.parent = page
89
+ }
90
+ function closePublicationPopup() {
91
+ isPublicationPopup.value = false;
92
+
93
+ newPage.value = {
94
+ url: null,
95
+ name: null,
96
+ parent: null,
97
+ content: []
98
+ }
99
+ }
100
+
101
+ async function onSubmit() {
102
+ newPage.value.name = newPage.value.content[0].content
103
+ newPage.value.url = newPage.value.parent.url + '/' + normalizeUrlParam(newPage.value.name)
104
+ newPage.value.parent = newPage.value.parent._id
105
+
106
+ await pages.actions.create(newPage.value)
107
+
108
+ router.push(router.resolve({ name: 'Backoffice Pages Edit', params: { url: newPage.value.url.split('/') } }).href)
109
+ }
110
+
111
+
112
+ </script>
@@ -0,0 +1,46 @@
1
+ import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue';
2
+ import Sidebar from '@pf/src/modules/backoffice/components/partials/Sidebar.vue'
3
+
4
+ import SidebarPages from '../components/partials/SidebarPages.vue'
5
+
6
+ const pages = {
7
+ path: 'pages',
8
+ component: layoutEmpty,
9
+ meta: {
10
+ title: {
11
+ en: 'Pages',
12
+ ru: 'Информация'
13
+ },
14
+ sidebar: Sidebar
15
+ },
16
+ children: [{
17
+ path: '',
18
+ name: 'Backoffice Pages',
19
+ component: () => import(/* webpackChunkName: 'Pages' */ '../components/pages/Pages.vue')
20
+ },{
21
+ path: 'add',
22
+ name: 'Backoffice Pages Add',
23
+ meta: {
24
+ title: {
25
+ en: 'New Page',
26
+ ru: 'Новая страница'
27
+ },
28
+ sidebar: SidebarPages
29
+ },
30
+ component: () => import(/* webpackChunkName: 'PageAdd' */ '../components/pages/PageEdit.vue')
31
+ },{
32
+ path: ':url+',
33
+ name: 'Backoffice Pages Edit',
34
+ meta: {
35
+ title: {
36
+ en: 'Edit Page',
37
+ ru: 'Редактировать страницу'
38
+ },
39
+ sidebar: SidebarPages
40
+ },
41
+ component: () => import(/* webpackChunkName: 'PAgeEdit' */ '../components/pages/PageEdit.vue')
42
+ }]
43
+ }
44
+
45
+ export default pages;
46
+
@@ -0,0 +1,25 @@
1
+ import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue';
2
+
3
+ const pages = {
4
+ path: 'pages',
5
+ component: layoutEmpty,
6
+ meta: {
7
+ title: {
8
+ en: 'Pages',
9
+ ru: 'Информация'
10
+ }
11
+ },
12
+ children: [{
13
+ path: ':url+',
14
+ name: 'Page',
15
+ meta: {
16
+ title: {
17
+ en: 'Page',
18
+ ru: 'Страница'
19
+ }
20
+ },
21
+ component: () => import(/* webpackChunkName: 'Page' */ '../components/pages/Page.vue')
22
+ }]
23
+ }
24
+
25
+ export default pages;