@ozdao/prometheus-framework 0.2.156 → 0.2.158

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) 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/Block/Block.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  28. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  30. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +47 -30
  32. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +9 -9
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  34. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +10 -10
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +9 -9
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
  40. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -0
  41. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +58 -0
  42. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -180
  44. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -0
  45. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +190 -0
  46. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +9 -7
  48. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +48 -43
  50. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +41 -63
  54. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +37 -36
  58. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +5 -5
  60. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +3 -0
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
  65. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  66. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +105 -53
  67. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +92 -98
  69. package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.cjs +1 -0
  70. package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.js +39 -0
  71. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -12
  77. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
  79. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  83. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
  84. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +2 -2
  88. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +13 -15
  92. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  96. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +4 -4
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/orders/orders.client.js +34 -33
  105. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +14 -14
  117. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +10 -10
  121. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +5 -5
  123. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
  125. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +13 -7
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +18 -18
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
  132. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
  134. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
  136. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
  138. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
  139. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  141. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  143. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +16 -16
  151. package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/spots/router/spots.js +4 -0
  153. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  155. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +22 -22
  156. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +4 -4
  157. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +17 -17
  159. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  161. package/dist/prometheus-framework.cjs.js +1 -1
  162. package/dist/prometheus-framework.es.js +1 -1
  163. package/dist/style.css +1 -1
  164. package/dist/{web-5eyiz9L7.mjs → web-CT2tGYho.mjs} +1 -1
  165. package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
  166. package/package.json +7 -2
  167. package/src/builder/builder.js +14 -0
  168. package/src/builder/modes/spa.dev.js +100 -0
  169. package/src/builder/modes/spa.prod.js +59 -0
  170. package/src/builder/modes/ssr.dev.js +184 -0
  171. package/src/builder/modes/ssr.prod.js +76 -0
  172. package/src/builder/ssr/ssr-render-html.js +57 -0
  173. package/src/builder/ssr/ssr-transform-webpack-stats.js +54 -0
  174. package/src/builder/templates/page.html +37 -0
  175. package/src/builder/templates/screen.html +33 -0
  176. package/src/builder/utils/hot-reload.js +5 -0
  177. package/src/builder/webpack/index.js +13 -0
  178. package/src/builder/webpack/webpack.config.base.js +127 -0
  179. package/src/builder/webpack/webpack.config.client.js +78 -0
  180. package/src/builder/webpack/webpack.config.server.js +31 -0
  181. package/src/builder/webpack/webpack.config.spa.js +80 -0
  182. package/src/builder/webpack/webpack.config.ssr.js +57 -0
  183. package/src/components/Breadcrumbs/Breadcrumbs.vue +39 -16
  184. package/src/components/Field/Field.vue +21 -2
  185. package/src/components/Popup/Popup.vue +1 -1
  186. package/src/modules/auth/store/auth.js +1 -2
  187. package/src/modules/backoffice/components/layouts/Backoffice.vue +36 -62
  188. package/src/modules/backoffice/components/pages/Dashboard.vue +2 -125
  189. package/src/modules/backoffice/components/partials/Sidebar.vue +176 -0
  190. package/src/modules/backoffice/router/admin.js +0 -15
  191. package/src/modules/backoffice/router/backoffice.js +5 -1
  192. package/src/modules/community/components/blocks/CardBlogpost.vue +6 -1
  193. package/src/modules/community/components/pages/BlogPost.vue +30 -67
  194. package/src/modules/community/components/sections/Comments.vue +1 -1
  195. package/src/modules/community/router/blogposts.js +4 -0
  196. package/src/modules/constructor/components/elements/Textarea.vue +197 -79
  197. package/src/modules/constructor/components/sections/Constructor.vue +19 -32
  198. package/src/modules/constructor/components/sections/Viewer.vue +53 -0
  199. package/src/modules/globals/components/layouts/Client.vue +21 -7
  200. package/src/modules/globals/components/layouts/Empty.vue +1 -6
  201. package/src/modules/globals/components/pages/404.vue +1 -1
  202. package/src/modules/globals/components/sections/SectionPageTitle.vue +2 -2
  203. package/src/modules/globals/mixins/mixins.js +129 -97
  204. package/src/modules/landing/router/landing.js +3 -0
  205. package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
  206. package/src/modules/middlewares/client/auth.validation.js +14 -15
  207. package/src/modules/orders/orders.client.js +4 -2
  208. package/src/modules/organizations/router/organizations.js +9 -3
  209. package/src/modules/pages/controllers/factories/pages.factory.js +106 -0
  210. package/src/modules/pages/controllers/routes/pages.routes.js +24 -0
  211. package/src/modules/pages/models/page.model.js +18 -11
  212. package/src/modules/pages/pages.client.js +40 -0
  213. package/src/modules/pages/pages.server.js +32 -0
  214. package/src/modules/pages/views/components/blocks/CardPage.vue +123 -0
  215. package/src/modules/pages/views/components/pages/Page.vue +173 -0
  216. package/src/modules/pages/views/components/pages/PageEdit.vue +121 -0
  217. package/src/modules/pages/views/components/pages/Pages.vue +60 -0
  218. package/src/modules/pages/views/components/partials/SidebarPages.vue +112 -0
  219. package/src/modules/pages/views/router/pages.backoffice.router.js +46 -0
  220. package/src/modules/pages/views/router/pages.router.js +25 -0
  221. package/src/modules/pages/views/store/pages.js +78 -0
  222. package/src/modules/pages/views/store/pages.store.js +5 -0
  223. package/src/modules/products/controllers/leftovers.controller.js +1 -1
  224. package/src/modules/spots/router/spots.js +4 -0
  225. package/src/styles/base/all.scss +66 -53
  226. package/dist/index-BshfsiQG.js +0 -220
  227. package/dist/index-C-8xOJnM.mjs +0 -244
  228. package/dist/index-C-DW6ra2.js +0 -260
  229. package/dist/index-CDbtWkBj.js +0 -243
  230. package/dist/index-D4j29ivg.mjs +0 -261
  231. package/dist/index-DKtnWDNC.mjs +0 -221
  232. package/dist/index-DNI4aUP2.js +0 -259
  233. package/dist/index-Tcyehi73.mjs +0 -260
  234. package/dist/main-3Vn8SU2y.mjs +0 -14509
  235. package/dist/main-5IrI2IOV.js +0 -92
  236. package/dist/main-BFKp44Ze.mjs +0 -14509
  237. package/dist/main-BF_nMkug.js +0 -92
  238. package/dist/main-BHr0-Z3t.mjs +0 -14510
  239. package/dist/main-BY2OvGB9.mjs +0 -14509
  240. package/dist/main-Bcj0J6tP.mjs +0 -14509
  241. package/dist/main-Bq5YvSWe.mjs +0 -14509
  242. package/dist/main-BxHxhrZ_.js +0 -92
  243. package/dist/main-By5Tbyui.js +0 -92
  244. package/dist/main-CEoQQpJV.js +0 -92
  245. package/dist/main-CI9l9xMs.js +0 -92
  246. package/dist/main-Ckn0Sslr.js +0 -92
  247. package/dist/main-DBv451oC.js +0 -92
  248. package/dist/main-DPg58GOU.mjs +0 -14509
  249. package/dist/main-DTHFR7H_.mjs +0 -14510
  250. package/dist/main-DxyAONrm.mjs +0 -14438
  251. package/dist/main-gY_284gJ.js +0 -92
  252. package/dist/main-wXdocsbd.js +0 -92
  253. package/dist/middlewares.server.js +0 -19
  254. package/dist/middlewares.server.mjs +0 -20
  255. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +0 -1
  256. package/dist/prometheus-framework/src/components/Address/Address.vue.js +0 -89
  257. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +0 -1
  258. package/dist/prometheus-framework/src/components/Button/Button.vue.js +0 -95
  259. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +0 -1
  260. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +0 -26
  261. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +0 -1
  262. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +0 -57
  263. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +0 -1
  264. package/dist/prometheus-framework/src/components/Field/Field.vue.js +0 -83
  265. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +0 -1
  266. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +0 -127
  267. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +0 -1
  268. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +0 -77
  269. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +0 -1
  270. package/dist/prometheus-framework/src/components/Select/Select.vue.js +0 -103
  271. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +0 -1
  272. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +0 -36
  273. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +0 -1
  274. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +0 -125
  275. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +0 -2
  276. package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +0 -47
  277. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +0 -2
  278. package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +0 -46
  279. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +0 -4
  280. package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +0 -65
  281. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +0 -5
  282. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -67
  283. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +0 -1
  284. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +0 -30
  285. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +0 -1
  286. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +0 -42
  287. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +0 -1
  288. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +0 -26
  289. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +0 -1
  290. package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +0 -42
  291. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +0 -1
  292. package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +0 -26
  293. package/dist/queryProcessor-g8208K6g.mjs +0 -178
  294. package/dist/queryProcessor-haY_gPGg.js +0 -177
  295. package/dist/web-3rnOWrQO.mjs +0 -54
  296. package/dist/web-BPUCAST-.mjs +0 -54
  297. package/dist/web-Be96Xqd4.mjs +0 -54
  298. package/dist/web-BmdKi_fZ.js +0 -1
  299. package/dist/web-Bqpk8Mpk.js +0 -1
  300. package/dist/web-BwHcRwYc.mjs +0 -54
  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-DHeZE1jJ.js +0 -1
  307. package/dist/web-DZUec7pP.js +0 -1
  308. package/dist/web-Dh669DqQ.mjs +0 -54
  309. package/dist/web-DkWpHYrh.mjs +0 -54
  310. package/dist/web-Dt2RCU54.js +0 -1
  311. package/dist/web-krQQeSb6.mjs +0 -54
  312. package/dist/web-nqFW_Sd1.mjs +0 -54
  313. package/src/modules/community/controllers/comments.controller.aggr.js +0 -280
  314. package/src/modules/community/controllers/comments.controller.populate.js +0 -180
  315. package/src/modules/constructor/components/elements/H2.vue +0 -102
  316. package/src/modules/pages/components/pages/Page.vue +0 -174
  317. package/src/modules/pages/components/pages/PageEdit.vue +0 -159
  318. package/src/modules/pages/components/pages/Pages.vue +0 -108
  319. package/src/modules/pages/controllers/pages.controller.js +0 -71
  320. package/src/modules/pages/router/pages.router.js +0 -15
  321. package/src/modules/pages/routes/pages.routes.js +0 -30
  322. package/src/modules/pages/store/pages.js +0 -94
@@ -2,9 +2,4 @@
2
2
  <router-view v-slot="{ Component, route }">
3
3
  <component :is="Component" />
4
4
  </router-view>
5
- </template>
6
-
7
-
8
- <script setup>
9
-
10
- </script>
5
+ </template>
@@ -2,4 +2,4 @@
2
2
  <div class="">
3
3
  404 Not Found
4
4
  </div>
5
- </template>
5
+ </template>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <header class="br-b br-solid br-black-transp-10 pd-medium flex-v-center flex-nowrap flex">
3
+ <header class="pd-medium flex-v-center flex-nowrap flex">
4
4
  <h1 class="mn-r-auto">{{ title }}</h1>
5
5
 
6
6
  <template
@@ -31,7 +31,7 @@
31
31
  :selected="tabs_current"
32
32
  @update:selected="updateTabsCurrent"
33
33
  :tabs="tabs"
34
- class="w-100 t-nowrap o-scroll h5"
34
+ class="br-t br-solid br-black-transp-10 w-100 t-nowrap o-scroll h5"
35
35
  />
36
36
  </div>
37
37
  </template>
@@ -1,110 +1,142 @@
1
- // mixins.js
2
- export const globalMixins = {
3
- methods: {
4
- hasAccess(organizationId, rightCategory, rightType, accesses) {
5
- const accessArray = accesses;
6
-
7
- const organizationAccess = accessArray.find(access => access.organization === organizationId);
8
-
9
- if (!organizationAccess) {
10
- return false;
11
- }
1
+ // useGlobalMixins.js
12
2
 
13
- const categoryAccess = organizationAccess.rights[rightCategory];
3
+ export function useGlobalMixins() {
4
+ const isAdmin = (roles) => {
5
+ if (roles) {
6
+ const isAdmin = roles.includes('ROLE_ADMIN') ? roles.includes('ROLE_ADMIN') : false;
14
7
 
15
- if (!categoryAccess) {
16
- return false;
8
+ if (isAdmin !== true) {
9
+ return false
17
10
  }
18
11
 
19
- return categoryAccess[rightType] === true;
20
- },
21
- returnCurrency() {
22
- const currency = '฿'
23
- return currency
24
- },
25
- formatPrice(number) {
26
- const currency = this.returnCurrency();
27
- let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
28
- return `${formattedNumber} ${currency}`;
29
- },
30
- formatDate(d, options = {}) {
31
- var fixedDate = new Date(d);
32
- var yyyy = fixedDate.getFullYear().toString();
33
- var mm = (fixedDate.getMonth() + 1).toString();
34
- var dd = fixedDate.getDate().toString();
35
- var hh = fixedDate.getHours().toString();
36
- var minmin = fixedDate.getMinutes().toString();
37
-
38
- // Параметры для форматирования
39
- var format = {
40
- dateOnly: options.dateOnly || false,
41
- timeOnly: options.timeOnly || false,
42
- dayMonth: options.dayMonth || false,
43
- dayTime: options.dayTime || false,
44
- monthYear: options.monthYear || false,
45
- yearOnly: options.yearOnly || false,
46
- custom: options.custom || ""
47
- };
48
-
49
- // Формирование строки в зависимости от параметров
50
- if (format.dateOnly) {
51
- return yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]);
52
- } else if (format.timeOnly) {
53
- return (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
54
- } else if (format.dayMonth) {
55
- return (dd[1] ? dd : "0" + dd[0]) + '.' + (mm[1] ? mm : "0" + mm[0]);
56
- } else if (format.dayTime) {
57
- return (dd[1] ? dd : "0" + dd[0]) + " в " + (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
58
- } else if (format.monthYear) {
59
- return (mm[1] ? mm : "0" + mm[0]) + '.' + yyyy;
60
- } else if (format.yearOnly) {
61
- return yyyy;
62
- } else if (format.custom) {
63
- // Пользователь может определить свой формат
64
- return format.custom.replace("yyyy", yyyy).replace("mm", (mm[1] ? mm : "0" + mm[0])).replace("dd", (dd[1] ? dd : "0" + dd[0])).replace("hh", (hh[1] ? hh : "0" + hh[0])).replace("min", (minmin[1] ? minmin : "0" + minmin[0]));
65
- }
12
+ return true
13
+ } else {
14
+ return false
15
+ }
16
+ }
17
+ const hasAccess = (organizationId, rightCategory, rightType, accesses) => {
18
+ const accessArray = accesses;
19
+
20
+ const organizationAccess = accessArray.find(access => access.organization === organizationId);
66
21
 
67
- // Формат по умолчанию
68
- return (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]) + ", " + yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]);
69
- },
70
-
71
- normalizeUrlParam(param) {
72
- if (!param) param = ''
73
-
74
- return param
75
- .toLowerCase()
76
- .replace(/ /g, '-')
77
- .replace(/[^a-z0-9-]/g, '');
78
- },
79
- getMarketplaceLink(categories, country, state, city) {
80
- let country_normalized = country ? this.normalizeUrlParam(country) : '';
81
- let state_normalized = state ? this.normalizeUrlParam(state) : '';
82
- let city_normalized = city ? this.normalizeUrlParam(city) : '';
83
-
84
- let base = '/marketplace';
85
- base += country_normalized ? `/${country_normalized}` : '';
86
- base += country_normalized && state_normalized ? `/${state_normalized}` : '';
87
- base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';
88
-
89
- if (categories && categories.length) {
90
- base += `?categories=${categories.join(",")}`;
91
- }
22
+ if (!organizationAccess) {
23
+ return false;
24
+ }
25
+
26
+ const categoryAccess = organizationAccess.rights[rightCategory];
27
+
28
+ if (!categoryAccess) {
29
+ return false;
30
+ }
31
+
32
+ return categoryAccess[rightType] === true;
33
+ }
34
+
35
+ const returnCurrency = () => {
36
+ const currency = '฿'
37
+ return currency
38
+ }
39
+
40
+ const formatPrice = (number) => {
41
+ const currency = returnCurrency();
42
+ let formattedNumber = number.toFixed(2).replace('.', ',').replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
43
+ return `${formattedNumber} ${currency}`;
44
+ }
92
45
 
93
- return base;
94
- },
46
+ const formatDate = (d, options = {}) => {
47
+ var fixedDate = new Date(d);
48
+ var yyyy = fixedDate.getFullYear().toString();
49
+ var mm = (fixedDate.getMonth() + 1).toString();
50
+ var dd = fixedDate.getDate().toString();
51
+ var hh = fixedDate.getHours().toString();
52
+ var minmin = fixedDate.getMinutes().toString();
53
+
54
+ var format = {
55
+ dateOnly: options.dateOnly || false,
56
+ timeOnly: options.timeOnly || false,
57
+ dayMonth: options.dayMonth || false,
58
+ dayTime: options.dayTime || false,
59
+ monthYear: options.monthYear || false,
60
+ yearOnly: options.yearOnly || false,
61
+ custom: options.custom || ""
62
+ };
63
+
64
+ if (format.dateOnly) {
65
+ return yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]);
66
+ } else if (format.timeOnly) {
67
+ return (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
68
+ } else if (format.dayMonth) {
69
+ return (dd[1] ? dd : "0" + dd[0]) + '.' + (mm[1] ? mm : "0" + mm[0]);
70
+ } else if (format.dayTime) {
71
+ return (dd[1] ? dd : "0" + dd[0]) + " в " + (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]);
72
+ } else if (format.monthYear) {
73
+ return (mm[1] ? mm : "0" + mm[0]) + '.' + yyyy;
74
+ } else if (format.yearOnly) {
75
+ return yyyy;
76
+ } else if (format.custom) {
77
+ return format.custom.replace("yyyy", yyyy).replace("mm", (mm[1] ? mm : "0" + mm[0])).replace("dd", (dd[1] ? dd : "0" + dd[0])).replace("hh", (hh[1] ? hh : "0" + hh[0])).replace("min", (minmin[1] ? minmin : "0" + minmin[0]));
78
+ }
79
+
80
+ return (hh[1] ? hh : "0" + hh[0]) + ':' + (minmin[1] ? minmin : "0" + minmin[0]) + ", " + yyyy + '.' + (mm[1] ? mm : "0" + mm[0]) + '.' + (dd[1] ? dd : "0" + dd[0]);
81
+ }
82
+
83
+ const normalizeUrlParam = (param) => {
84
+ if (!param) param = ''
85
+
86
+ return param
87
+ .toLowerCase()
88
+ .replace(/ /g, '-')
89
+ .replace(/[^a-z0-9-]/g, '');
90
+ }
91
+
92
+ const joinArrayToUrl = (arr) => {
93
+ return arr.join('/')
94
+ }
95
95
 
96
- getSpotsLink(country, state, city) {
97
- let country_normalized = country ? this.normalizeUrlParam(country) : '';
98
- let state_normalized = state ? this.normalizeUrlParam(state) : '';
99
- let city_normalized = city ? this.normalizeUrlParam(city) : '';
96
+ const getMarketplaceLink = (categories, country, state, city) => {
97
+ let country_normalized = country ? normalizeUrlParam(country) : '';
98
+ let state_normalized = state ? normalizeUrlParam(state) : '';
99
+ let city_normalized = city ? normalizeUrlParam(city) : '';
100
100
 
101
- let base = '/spots';
102
- base += country_normalized ? `/${country_normalized}` : '';
103
- base += country_normalized && state_normalized ? `/${state_normalized}` : '';
104
- base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';
101
+ let base = '/marketplace';
102
+ base += country_normalized ? `/${country_normalized}` : '';
103
+ base += country_normalized && state_normalized ? `/${state_normalized}` : '';
104
+ base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';
105
105
 
106
- return base;
106
+ if (categories && categories.length) {
107
+ base += `?categories=${categories.join(",")}`;
107
108
  }
108
109
 
110
+ return base;
111
+ }
112
+
113
+ const getSpotsLink = (country, state, city) => {
114
+ let country_normalized = country ? normalizeUrlParam(country) : '';
115
+ let state_normalized = state ? normalizeUrlParam(state) : '';
116
+ let city_normalized = city ? normalizeUrlParam(city) : '';
117
+
118
+ let base = '/spots';
119
+ base += country_normalized ? `/${country_normalized}` : '';
120
+ base += country_normalized && state_normalized ? `/${state_normalized}` : '';
121
+ base += country_normalized && state_normalized && city_normalized ? `/${city_normalized}` : '';
122
+
123
+ return base;
124
+ }
125
+
126
+ return {
127
+ isAdmin,
128
+ hasAccess,
129
+ returnCurrency,
130
+ formatPrice,
131
+ formatDate,
132
+ normalizeUrlParam,
133
+ joinArrayToUrl,
134
+ getMarketplaceLink,
135
+ getSpotsLink
109
136
  }
110
137
  }
138
+
139
+ // Экспорт для глобальной регистрации
140
+ export const globalMixins = {
141
+ methods: useGlobalMixins()
142
+ }
@@ -5,6 +5,9 @@ const landing = [
5
5
  meta: {
6
6
  title_hide: true,
7
7
  header_theme: 'dark',
8
+ breadcrumbs: {
9
+ hide: true
10
+ },
8
11
  },
9
12
  component: () => import(/* webpackChunkName: 'Home' */ '@pf/src/modules/landing/components/pages/Home.vue'),
10
13
  },
@@ -21,7 +21,7 @@
21
21
  prices: route.query.prices,
22
22
  delivery: route.query.delivery,
23
23
  location: store.globals.state.position?.location,
24
- contain: route.query.contain?.split(','),
24
+ contain: ['products'],
25
25
  }"
26
26
  v-slot="{
27
27
  items
@@ -1,7 +1,17 @@
1
1
  import * as auth from '@pf/src/modules/auth/store/auth'
2
2
 
3
- function requiresAuth(to, from, next) {
3
+ function requiresNoAuth(to, from, next) {
4
+
5
+ const isLogin = auth.state.access.status;
6
+
7
+ if (isLogin) {
8
+ return next('/profile/' + auth.state.user._id);
9
+ }
10
+
11
+ next();
12
+ }
4
13
 
14
+ function requiresAuth(to, from, next) {
5
15
  const isLogin = auth.state.access.status;
6
16
 
7
17
  if (isLogin !== true) {
@@ -11,7 +21,7 @@ function requiresAuth(to, from, next) {
11
21
  next();
12
22
  }
13
23
 
14
- function requiresAdmin(to, from, next) {
24
+ async function requiresAdmin(to, from, next) {
15
25
 
16
26
  const isAdmin = auth.state.access.roles?.includes('ROLE_ADMIN') ? auth.state.access.roles.includes('ROLE_ADMIN') : false;
17
27
 
@@ -22,21 +32,10 @@ function requiresAdmin(to, from, next) {
22
32
  next();
23
33
  }
24
34
 
25
- function requiresNoAuth(to, from, next) {
26
- console.log('hello')
27
35
 
28
- const isLogin = auth.state.access.status;
29
- console.log(auth.state.access)
30
- // to.meta.requiresNoAuth
31
- if (isLogin) {
32
- return next('/profile/' + auth.state.user._id);
33
- }
34
-
35
- next();
36
- }
37
36
 
38
37
  export {
39
- requiresAdmin,
38
+ requiresNoAuth,
40
39
  requiresAuth,
41
- requiresNoAuth
40
+ requiresAdmin,
42
41
  }
@@ -24,8 +24,10 @@ import Succes from './components/sections/Succes.vue';
24
24
  import ShopCart from './components/partials/ShopCart.vue';
25
25
 
26
26
  // Пример функции инициализации для модуля заказов
27
- function initializeOrders(app, store, router) {
28
- router.addRoute('Home', routerOrders);
27
+ function initializeOrders(app, store, router, options = {}) {
28
+ const route = options.route || 'Home';
29
+
30
+ router.addRoute(route, routerOrders);
29
31
  store.addStore('orders', storeOrders);
30
32
  store.addStore('shopcart', storeShopcart);
31
33
  }
@@ -22,7 +22,10 @@ const organizations = [{
22
22
  title: {
23
23
  en: 'Organizations',
24
24
  ru: 'Организации'
25
- }
25
+ },
26
+ breadcrumbs: {
27
+ hidden: true
28
+ },
26
29
  },
27
30
  children: [{
28
31
  path: 'create',
@@ -42,7 +45,7 @@ const organizations = [{
42
45
  title: {
43
46
  en: 'Group',
44
47
  ru: 'Группа'
45
- }
48
+ },
46
49
  },
47
50
  component: layoutEmpty,
48
51
  children: [
@@ -53,7 +56,10 @@ const organizations = [{
53
56
  title: {
54
57
  en: 'Group',
55
58
  ru: 'Группа'
56
- }
59
+ },
60
+ breadcrumbs: {
61
+ hidden: true
62
+ },
57
63
  },
58
64
  component: () => import('@pf/src/modules/organizations/components/pages/Organization.vue'),
59
65
  },
@@ -0,0 +1,106 @@
1
+ const createPageController = (db) => {
2
+ const Page = db.page;
3
+
4
+ async function populateChildrenRecursively(page) {
5
+ await page.populate('children');
6
+ for (let child of page.children) {
7
+ await populateChildrenRecursively(child);
8
+ }
9
+ }
10
+
11
+ const create = async (req, res) => {
12
+ try {
13
+
14
+ const page = await Page.create(req.body);
15
+
16
+ if (!page) {
17
+ return res.status(404).send({ message: "Something wrong when creating page." });
18
+ }
19
+
20
+ if (req.body.parent) {
21
+ const parentPage = await Page.findById(req.body.parent);
22
+
23
+ if (parentPage) {
24
+ if (!parentPage.children) {
25
+ parentPage.children = [];
26
+ }
27
+ parentPage.children.push(page._id);
28
+ await parentPage.save();
29
+ } else {
30
+ console.warn(`Parent page with id ${req.body.parent} not found.`);
31
+ }
32
+ }
33
+
34
+ res.status(200).send(page);
35
+ } catch (err) {
36
+ res.status(500).send({ message: err.message });
37
+ }
38
+ };
39
+
40
+ const read = async (req, res) => {
41
+ try {
42
+ const { url } = req.query;
43
+
44
+ if (url) {
45
+ // Fetch a single page
46
+ const page = await Page.findOne({ url }).populate('parent');
47
+
48
+ if (!page) {
49
+ return res.status(404).json({ message: 'Page not found' });
50
+ }
51
+
52
+ await populateChildrenRecursively(page);
53
+
54
+ res.status(200).send(page);
55
+ } else {
56
+ // Fetch all pages
57
+ const topLevelPages = await Page.find({ parent: null });
58
+
59
+ for (let page of topLevelPages) {
60
+ await populateChildrenRecursively(page);
61
+ }
62
+ res.json(topLevelPages);
63
+ }
64
+ } catch (error) {
65
+ console.error('Error:', error);
66
+ res.status(500).json({ message: 'Server error' });
67
+ }
68
+ };
69
+
70
+ const update = async (req, res) => {
71
+ try {
72
+ const page = await Page.findOneAndUpdate({ _id: req.body._id }, req.body);
73
+
74
+ if (!page) {
75
+ return res.status(404).send({ message: "Page not found." });
76
+ }
77
+
78
+ res.status(200).send(page);
79
+ } catch (err) {
80
+ res.status(500).send({ message: err.message });
81
+ }
82
+ };
83
+
84
+ const deletePage = async (req, res) => {
85
+ try {
86
+ const page = await Page.findOneAndDelete({ _id: req.body._id });
87
+
88
+ if (!page) {
89
+ return res.status(404).send({ message: "Something wrong when deleting page." });
90
+ }
91
+
92
+ res.status(200).send(page);
93
+ } catch (err) {
94
+ res.status(500).send({ message: err.message });
95
+ }
96
+ };
97
+
98
+ return {
99
+ create,
100
+ read,
101
+ update,
102
+ delete: deletePage
103
+ };
104
+ };
105
+
106
+ module.exports = createPageController;
@@ -0,0 +1,24 @@
1
+ // Factories
2
+ const controllerFactory = require("../factories/pages.factory");
3
+
4
+ module.exports = function(app, db, origins, publicPath) {
5
+
6
+ const controller = controllerFactory(db);
7
+
8
+ app.get(
9
+ "/api/pages/read",
10
+ controller.read
11
+ );
12
+ app.post(
13
+ "/api/pages/create",
14
+ controller.create
15
+ );
16
+ app.put(
17
+ "/api/pages/update",
18
+ controller.update
19
+ );
20
+ app.delete(
21
+ "/api/pages/delete",
22
+ controller.delete
23
+ );
24
+ };
@@ -1,16 +1,23 @@
1
- const mongoose = require('mongoose');
2
-
3
- const PageSchema = new mongoose.Schema({
4
- name: {type: Object},
5
- localization: {type: Array},
6
- url: {type: String},
7
- groups: {type: Array},
8
- content: {type: Object},
1
+ module.exports = (db) => {
2
+ const PageSchema = new db.mongoose.Schema({
3
+ name: {type: Object},
4
+ url: {type: String},
5
+ groups: {type: Array},
6
+ content: {type: [Object,Array]},
7
+ parent:{
8
+ type: db.mongoose.Schema.Types.ObjectId,
9
+ ref: "Page"
10
+ },
11
+ children:[{
12
+ type: db.mongoose.Schema.Types.ObjectId,
13
+ ref: "Page"
14
+ }],
9
15
  }, {
10
- timestamps: { currentTime: () => Date.now() }
16
+ timestamps: { currentTime: () => Date.now() }
11
17
  });
12
18
 
19
+ const Page = db.mongoose.model("Page", PageSchema);
13
20
 
14
- const Page = mongoose.model("Page", PageSchema);
21
+ return Page;
22
+ };
15
23
 
16
- module.exports = Page;
@@ -0,0 +1,40 @@
1
+ // Store
2
+ import * as storePages from './views/store/pages.js';
3
+ // Router
4
+ import routerPages from './views/router/pages.router.js';
5
+ import routerPagesBackoffice from './views/router/pages.backoffice.router.js';
6
+ // Views
7
+ import Pages from './views/components/pages/Pages.vue';
8
+ import Page from './views/components/pages/Page.vue';
9
+ import PageEdit from './views/components/pages/PageEdit.vue';
10
+
11
+ // Пример функции инициализации для модуля страниц
12
+ function initializePages(app, store, router, options = {}) {
13
+ const routeHome = options.route?.home || 'Home';
14
+ const routeBO = options.route?.backoffice || 'Backoffice Root';
15
+
16
+ router.addRoute(routeHome, routerPages);
17
+ router.addRoute(routeBO, routerPagesBackoffice);
18
+
19
+ store.addStore('pages', storePages);
20
+ }
21
+
22
+ const ModulePages = {
23
+ initialize: initializePages,
24
+ views: {
25
+ store: {
26
+ storePages
27
+ },
28
+ router: {
29
+ routerPages
30
+ },
31
+ components: {
32
+ // Pages
33
+ Pages,
34
+ Page,
35
+ PageEdit
36
+ }
37
+ }
38
+ }
39
+
40
+ export default ModulePages;
@@ -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
+ };