@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.
- package/dist/_virtual/_commonjsHelpers.cjs +1 -1
- package/dist/_virtual/_commonjsHelpers.js +5 -3
- package/dist/_virtual/purify.cjs +1 -0
- package/dist/_virtual/purify.js +4 -0
- package/dist/builder.js +822 -0
- package/dist/builder.mjs +801 -0
- package/dist/{main-D_RRsfEH.mjs → main-Ba3SEUWZ.mjs} +1812 -1774
- package/dist/main-ldzk-jIP.js +92 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/dompurify/dist/purify.cjs +2 -0
- package/dist/node_modules/dompurify/dist/purify.js +531 -0
- package/dist/node_modules/isomorphic-dompurify/browser.cjs +1 -0
- package/dist/node_modules/isomorphic-dompurify/browser.js +7 -0
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/regex.js +4 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/rng.js +9 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/stringify.js +13 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/v4.js +10 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.cjs +1 -0
- package/dist/prometheus-framework/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +47 -30
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +9 -9
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +10 -10
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +34 -34
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +27 -27
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +58 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +11 -180
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +190 -0
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +9 -7
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +48 -43
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +41 -63
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +37 -36
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +3 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +105 -53
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +92 -98
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Viewer.vue.js +39 -0
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +13 -12
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +13 -15
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js +34 -33
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +13 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.js +4 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{web-5eyiz9L7.mjs → web-CT2tGYho.mjs} +1 -1
- package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
- package/package.json +7 -2
- package/src/builder/builder.js +14 -0
- package/src/builder/modes/spa.dev.js +100 -0
- package/src/builder/modes/spa.prod.js +59 -0
- package/src/builder/modes/ssr.dev.js +184 -0
- package/src/builder/modes/ssr.prod.js +76 -0
- package/src/builder/ssr/ssr-render-html.js +57 -0
- package/src/builder/ssr/ssr-transform-webpack-stats.js +54 -0
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/screen.html +33 -0
- package/src/builder/utils/hot-reload.js +5 -0
- package/src/builder/webpack/index.js +13 -0
- package/src/builder/webpack/webpack.config.base.js +127 -0
- package/src/builder/webpack/webpack.config.client.js +78 -0
- package/src/builder/webpack/webpack.config.server.js +31 -0
- package/src/builder/webpack/webpack.config.spa.js +80 -0
- package/src/builder/webpack/webpack.config.ssr.js +57 -0
- package/src/components/Breadcrumbs/Breadcrumbs.vue +39 -16
- package/src/components/Field/Field.vue +21 -2
- package/src/components/Popup/Popup.vue +1 -1
- package/src/modules/auth/store/auth.js +1 -2
- package/src/modules/backoffice/components/layouts/Backoffice.vue +36 -62
- package/src/modules/backoffice/components/pages/Dashboard.vue +2 -125
- package/src/modules/backoffice/components/partials/Sidebar.vue +176 -0
- package/src/modules/backoffice/router/admin.js +0 -15
- package/src/modules/backoffice/router/backoffice.js +5 -1
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -1
- package/src/modules/community/components/pages/BlogPost.vue +30 -67
- package/src/modules/community/components/sections/Comments.vue +1 -1
- package/src/modules/community/router/blogposts.js +4 -0
- package/src/modules/constructor/components/elements/Textarea.vue +197 -79
- package/src/modules/constructor/components/sections/Constructor.vue +19 -32
- package/src/modules/constructor/components/sections/Viewer.vue +53 -0
- package/src/modules/globals/components/layouts/Client.vue +21 -7
- package/src/modules/globals/components/layouts/Empty.vue +1 -6
- package/src/modules/globals/components/pages/404.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +2 -2
- package/src/modules/globals/mixins/mixins.js +129 -97
- package/src/modules/landing/router/landing.js +3 -0
- package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
- package/src/modules/middlewares/client/auth.validation.js +14 -15
- package/src/modules/orders/orders.client.js +4 -2
- package/src/modules/organizations/router/organizations.js +9 -3
- package/src/modules/pages/controllers/factories/pages.factory.js +106 -0
- package/src/modules/pages/controllers/routes/pages.routes.js +24 -0
- package/src/modules/pages/models/page.model.js +18 -11
- package/src/modules/pages/pages.client.js +40 -0
- package/src/modules/pages/pages.server.js +32 -0
- package/src/modules/pages/views/components/blocks/CardPage.vue +123 -0
- package/src/modules/pages/views/components/pages/Page.vue +173 -0
- package/src/modules/pages/views/components/pages/PageEdit.vue +121 -0
- package/src/modules/pages/views/components/pages/Pages.vue +60 -0
- package/src/modules/pages/views/components/partials/SidebarPages.vue +112 -0
- package/src/modules/pages/views/router/pages.backoffice.router.js +46 -0
- package/src/modules/pages/views/router/pages.router.js +25 -0
- package/src/modules/pages/views/store/pages.js +78 -0
- package/src/modules/pages/views/store/pages.store.js +5 -0
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/spots/router/spots.js +4 -0
- package/src/styles/base/all.scss +66 -53
- package/dist/index-BshfsiQG.js +0 -220
- package/dist/index-C-8xOJnM.mjs +0 -244
- package/dist/index-C-DW6ra2.js +0 -260
- package/dist/index-CDbtWkBj.js +0 -243
- package/dist/index-D4j29ivg.mjs +0 -261
- package/dist/index-DKtnWDNC.mjs +0 -221
- package/dist/index-DNI4aUP2.js +0 -259
- package/dist/index-Tcyehi73.mjs +0 -260
- package/dist/main-3Vn8SU2y.mjs +0 -14509
- package/dist/main-5IrI2IOV.js +0 -92
- package/dist/main-BFKp44Ze.mjs +0 -14509
- package/dist/main-BF_nMkug.js +0 -92
- package/dist/main-BHr0-Z3t.mjs +0 -14510
- package/dist/main-BY2OvGB9.mjs +0 -14509
- package/dist/main-Bcj0J6tP.mjs +0 -14509
- package/dist/main-Bq5YvSWe.mjs +0 -14509
- package/dist/main-BxHxhrZ_.js +0 -92
- package/dist/main-By5Tbyui.js +0 -92
- package/dist/main-CEoQQpJV.js +0 -92
- package/dist/main-CI9l9xMs.js +0 -92
- package/dist/main-Ckn0Sslr.js +0 -92
- package/dist/main-DBv451oC.js +0 -92
- package/dist/main-DPg58GOU.mjs +0 -14509
- package/dist/main-DTHFR7H_.mjs +0 -14510
- package/dist/main-DxyAONrm.mjs +0 -14438
- package/dist/main-gY_284gJ.js +0 -92
- package/dist/main-wXdocsbd.js +0 -92
- package/dist/middlewares.server.js +0 -19
- package/dist/middlewares.server.mjs +0 -20
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +0 -89
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +0 -95
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +0 -26
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +0 -57
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +0 -83
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +0 -127
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +0 -77
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +0 -103
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +0 -36
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +0 -125
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +0 -47
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +0 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +0 -46
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +0 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +0 -65
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +0 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -67
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +0 -30
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +0 -26
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +0 -42
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +0 -1
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +0 -26
- package/dist/queryProcessor-g8208K6g.mjs +0 -178
- package/dist/queryProcessor-haY_gPGg.js +0 -177
- package/dist/web-3rnOWrQO.mjs +0 -54
- package/dist/web-BPUCAST-.mjs +0 -54
- package/dist/web-Be96Xqd4.mjs +0 -54
- package/dist/web-BmdKi_fZ.js +0 -1
- package/dist/web-Bqpk8Mpk.js +0 -1
- package/dist/web-BwHcRwYc.mjs +0 -54
- package/dist/web-BzUFKqzw.js +0 -1
- package/dist/web-CcFPvlkl.js +0 -1
- package/dist/web-CgjTW1bL.js +0 -1
- package/dist/web-Cw0ijzjY.js +0 -1
- package/dist/web-CwTWV4ca.mjs +0 -54
- package/dist/web-DHeZE1jJ.js +0 -1
- package/dist/web-DZUec7pP.js +0 -1
- package/dist/web-Dh669DqQ.mjs +0 -54
- package/dist/web-DkWpHYrh.mjs +0 -54
- package/dist/web-Dt2RCU54.js +0 -1
- package/dist/web-krQQeSb6.mjs +0 -54
- package/dist/web-nqFW_Sd1.mjs +0 -54
- package/src/modules/community/controllers/comments.controller.aggr.js +0 -280
- package/src/modules/community/controllers/comments.controller.populate.js +0 -180
- package/src/modules/constructor/components/elements/H2.vue +0 -102
- package/src/modules/pages/components/pages/Page.vue +0 -174
- package/src/modules/pages/components/pages/PageEdit.vue +0 -159
- package/src/modules/pages/components/pages/Pages.vue +0 -108
- package/src/modules/pages/controllers/pages.controller.js +0 -71
- package/src/modules/pages/router/pages.router.js +0 -15
- package/src/modules/pages/routes/pages.routes.js +0 -30
- package/src/modules/pages/store/pages.js +0 -94
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<header class="
|
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
|
-
//
|
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
|
-
|
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 (
|
16
|
-
return false
|
8
|
+
if (isAdmin !== true) {
|
9
|
+
return false
|
17
10
|
}
|
18
11
|
|
19
|
-
return
|
20
|
-
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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
|
69
|
-
}
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
return
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
-
|
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
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
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
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
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
|
-
|
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
|
+
}
|
@@ -1,7 +1,17 @@
|
|
1
1
|
import * as auth from '@pf/src/modules/auth/store/auth'
|
2
2
|
|
3
|
-
function
|
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
|
-
|
38
|
+
requiresNoAuth,
|
40
39
|
requiresAuth,
|
41
|
-
|
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
|
-
|
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
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
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
|
-
|
16
|
+
timestamps: { currentTime: () => Date.now() }
|
11
17
|
});
|
12
18
|
|
19
|
+
const Page = db.mongoose.model("Page", PageSchema);
|
13
20
|
|
14
|
-
|
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
|
+
};
|