@ozdao/prometheus-framework 0.2.156 → 0.2.157
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/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 +1 -1
- 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/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 +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 +1 -1
- 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 +4 -4
- 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-3rnOWrQO.mjs → web-CT2tGYho.mjs} +1 -1
- package/dist/{web-C04IcLk4.js → web-DWjMBTNi.js} +1 -1
- package/package.json +3 -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/Menu/Menu.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +0 -13
- 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/components/Tooltip/Tooltip.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +0 -44
- 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-5eyiz9L7.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,9 +1,9 @@
|
|
1
1
|
import { withAsyncContext as h, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css */
|
4
3
|
import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
5
4
|
/* empty css */
|
6
5
|
/* empty css */
|
6
|
+
/* empty css */
|
7
7
|
import "axios";
|
8
8
|
/* empty css */
|
9
9
|
import $ from "../blocks/CardBlogpost.vue.js";
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/isomorphic-dompurify/browser.cjs");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -1,36 +1,37 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as n, onMounted as V, computed as w, openBlock as u, createElementBlock as m, createElementVNode as r, unref as l, createBlock as A, createCommentVNode as p, createVNode as i, Transition as U, withCtx as v, createTextVNode as z } from "vue";
|
2
|
+
import "../../../../../../node_modules/isomorphic-dompurify/browser.js";
|
2
3
|
/* empty css */
|
3
4
|
import D from "../../../constructor/components/sections/Constructor.vue.js";
|
4
|
-
import N from "../../../../components/Popup/Popup.
|
5
|
+
import N from "../../../../components/Popup/Popup.vue2.js";
|
5
6
|
/* empty css */
|
6
7
|
/* empty css */
|
7
8
|
import O from "../../../../components/FieldTags/BlockTags.vue.js";
|
8
9
|
import E from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { useRoute as
|
10
|
+
import F from "../../../../components/Field/Field.vue2.js";
|
11
|
+
import L from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
12
|
+
import M from "../../../../components/Button/Button.vue2.js";
|
13
|
+
import { useRoute as R, useRouter as S } from "vue-router";
|
13
14
|
import { read as H, clean as j, state as q, update as k, create as y, remove as G } from "../../store/blogposts.js";
|
14
15
|
import { state as f } from "../../../auth/store/auth.js";
|
15
16
|
import { actions as I } from "../../../organizations/store/organizations.js";
|
16
17
|
const J = { class: "pd-thin" }, K = {
|
17
18
|
style: { "min-height": "100%" },
|
18
19
|
class: "w-100 bg-light pd-big radius-big"
|
19
|
-
}, Q = /* @__PURE__ */
|
20
|
+
}, Q = /* @__PURE__ */ r("div", { class: "w-full h-full" }, null, -1), W = {
|
20
21
|
key: 0,
|
21
22
|
class: "pd-thin pos-sticky pos-l-0 pos-b-0 w-100"
|
22
|
-
}, X = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Y = /* @__PURE__ */
|
23
|
+
}, X = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Y = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Final Touches", -1), Z = /* @__PURE__ */ r("h5", { class: "mn-b-thin" }, "Add source:", -1), ee = /* @__PURE__ */ r("h5", { class: "mn-b-thin" }, "Add to public:", -1), te = {
|
23
24
|
key: 0,
|
24
25
|
class: "mn-b-thin"
|
25
26
|
}, oe = {
|
26
27
|
key: 1,
|
27
28
|
class: "mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"
|
28
|
-
},
|
29
|
+
}, we = {
|
29
30
|
__name: "CreateBlogPost",
|
30
31
|
setup(ae) {
|
31
|
-
const
|
32
|
-
let e =
|
33
|
-
const g =
|
32
|
+
const d = R(), c = S();
|
33
|
+
let e = n(null), b = n(null);
|
34
|
+
const g = n([]), s = n(null);
|
34
35
|
V(async () => {
|
35
36
|
const t = await I.read({
|
36
37
|
user: f.user._id,
|
@@ -41,8 +42,8 @@ const J = { class: "pd-thin" }, K = {
|
|
41
42
|
name: o.profile.name,
|
42
43
|
_id: o._id,
|
43
44
|
photo: o.profile.photo
|
44
|
-
})),
|
45
|
-
const o = await H({ user: f.user._id, url:
|
45
|
+
})), d.params.url) {
|
46
|
+
const o = await H({ user: f.user._id, url: d.params.url });
|
46
47
|
e.value = o.pop();
|
47
48
|
} else
|
48
49
|
j(), e.value = q.current;
|
@@ -59,7 +60,7 @@ const J = { class: "pd-thin" }, K = {
|
|
59
60
|
photo: e.value.owner.target.profile.photo
|
60
61
|
});
|
61
62
|
});
|
62
|
-
const P =
|
63
|
+
const P = n(""), _ = n([
|
63
64
|
{ text: "story" },
|
64
65
|
{ text: "news" },
|
65
66
|
{ text: "guide" },
|
@@ -67,47 +68,47 @@ const J = { class: "pd-thin" }, K = {
|
|
67
68
|
{ text: "photos" }
|
68
69
|
]);
|
69
70
|
w(() => _.value.filter((t) => t.text.toLowerCase().includes(P.value.toLowerCase()))), w(() => _.value.filter((t) => !g.value.some((o) => o.text === t.text)));
|
70
|
-
const h =
|
71
|
+
const h = n(!1);
|
71
72
|
function x() {
|
72
73
|
h.value = !0;
|
73
74
|
}
|
74
75
|
function C() {
|
75
76
|
h.value = !1;
|
76
77
|
}
|
77
|
-
function
|
78
|
-
g.value.length > 0 && g.value.map((t) => t.text), e.value.status = "draft", e.value.name = e.value.content[0].content,
|
79
|
-
|
78
|
+
function B() {
|
79
|
+
g.value.length > 0 && g.value.map((t) => t.text), e.value.status = "draft", e.value.name = e.value.content[0].content, d.params.url ? k(e.value).then((t) => {
|
80
|
+
c.push({ name: "BlogPost", params: { url: t.url } });
|
80
81
|
}).catch((t) => {
|
81
82
|
console.log(t);
|
82
83
|
}) : y(e.value).then((t) => {
|
83
|
-
|
84
|
+
c.push({ name: "BlogPost", params: { url: t.url } });
|
84
85
|
}).catch((t) => {
|
85
86
|
console.log(t);
|
86
87
|
});
|
87
88
|
}
|
88
|
-
function
|
89
|
+
function $() {
|
89
90
|
s.value && (e.value.owner = {
|
90
91
|
target: s.value._id,
|
91
92
|
type: "organization"
|
92
|
-
}), s.value || (e.value.creator.hidden = !1), s.value || (e.value.organization = e.value.creator), e.value.status = "published", e.value.name = e.value.content[0].content,
|
93
|
-
console.log(e.value),
|
93
|
+
}), s.value || (e.value.creator.hidden = !1), s.value || (e.value.organization = e.value.creator), e.value.status = "published", e.value.name = e.value.content[0].content, d.params.url ? k(e.value).then((t) => {
|
94
|
+
console.log(e.value), c.push({ name: "BlogPost", params: { url: t.url } });
|
94
95
|
}).catch((t) => {
|
95
96
|
console.error(t);
|
96
97
|
}) : y(e.value).then((t) => {
|
97
|
-
|
98
|
+
c.push({ name: "BlogPost", params: { url: t.url } });
|
98
99
|
}).catch((t) => {
|
99
100
|
console.error(t);
|
100
101
|
});
|
101
102
|
}
|
102
103
|
function T() {
|
103
104
|
confirm("Are you sure you want to delete this post?") && G(e.value._id).then((t) => {
|
104
|
-
|
105
|
+
c.push({ name: "User Blogposts", params: { _id: e.value.creator.target._id } });
|
105
106
|
}).catch((t) => {
|
106
107
|
console.log(t);
|
107
108
|
});
|
108
109
|
}
|
109
110
|
return (t, o) => (u(), m("article", J, [
|
110
|
-
|
111
|
+
r("section", K, [
|
111
112
|
Q,
|
112
113
|
l(e) ? (u(), A(D, {
|
113
114
|
key: 0,
|
@@ -118,17 +119,17 @@ const J = { class: "pd-thin" }, K = {
|
|
118
119
|
i(U, { name: "scaleIn" }, {
|
119
120
|
default: v(() => [
|
120
121
|
l(e) ? (u(), m("section", W, [
|
121
|
-
|
122
|
-
l(
|
122
|
+
r("div", X, [
|
123
|
+
l(d).params.url ? (u(), m("a", {
|
123
124
|
key: 0,
|
124
125
|
onClick: o[1] || (o[1] = (a) => T()),
|
125
126
|
class: "mn-r-auto bg-red t-white t-black button"
|
126
127
|
}, "Delete")) : p("", !0),
|
127
|
-
|
128
|
-
onClick: o[2] || (o[2] = (a) =>
|
128
|
+
r("a", {
|
129
|
+
onClick: o[2] || (o[2] = (a) => B()),
|
129
130
|
class: "mn-l-auto bg-white t-black button"
|
130
131
|
}, "To Drafts"),
|
131
|
-
|
132
|
+
r("a", {
|
132
133
|
onClick: o[3] || (o[3] = (a) => x()),
|
133
134
|
class: "mn-l-thin bg-black t-white button"
|
134
135
|
}, "Publish")
|
@@ -150,14 +151,14 @@ const J = { class: "pd-thin" }, K = {
|
|
150
151
|
class: "mn-b-small"
|
151
152
|
}, null, 8, ["tags"]),
|
152
153
|
Z,
|
153
|
-
i(
|
154
|
+
i(F, {
|
154
155
|
field: l(e).source,
|
155
156
|
"onUpdate:field": o[5] || (o[5] = (a) => l(e).source = a),
|
156
157
|
placeholder: "Add full link to the source",
|
157
158
|
class: "mn-b-medium bg-light radius-medium pd-small"
|
158
159
|
}, null, 8, ["field"]),
|
159
160
|
ee,
|
160
|
-
i(
|
161
|
+
i(L, {
|
161
162
|
modelValue: s.value,
|
162
163
|
"onUpdate:modelValue": o[6] || (o[6] = (a) => s.value = a),
|
163
164
|
options: l(b),
|
@@ -178,8 +179,8 @@ const J = { class: "pd-thin" }, K = {
|
|
178
179
|
class: "w-100"
|
179
180
|
}, null, 8, ["radio"])
|
180
181
|
])) : p("", !0),
|
181
|
-
i(
|
182
|
-
submit:
|
182
|
+
i(M, {
|
183
|
+
submit: $,
|
183
184
|
callback: t.redirectTo,
|
184
185
|
class: "w-100 bg-black t-white"
|
185
186
|
}, {
|
@@ -195,5 +196,5 @@ const J = { class: "pd-thin" }, K = {
|
|
195
196
|
}
|
196
197
|
};
|
197
198
|
export {
|
198
|
-
|
199
|
+
we as default
|
199
200
|
};
|
package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("axios"),b=require("./Comment.vue.cjs"),f={id:"comments"},w={class:"mn-b-small"},k=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),E=[k],C={key:1,class:"mn-b-small"},B=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),V={__name:"Comments",props:["target","owner","type"],setup(s){const o=s,i=v.create({baseURL:process.env.API_URL}),l=e.ref([]),c=e.ref(""),p=async()=>{try{const t=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,maxDepth:2}});l.value=t.data}catch(t){console.error("Error fetching comments:",t)}},g=async(t,n)=>{try{const m=(await i.post("/comments/create",{content:n,target:o.target,type:o.type,user:o.owner,parent:t})).data;u(l.value,t,m)}catch(r){console.error("Error posting reply:",r)}},h=async(t,n)=>{try{const r=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,parentId:t,depth:n,maxDepth:10}});u(l.value,t,r.data,r.data.hasMore,!0)}catch(r){console.error("Error loading more comments:",r)}},u=(t,n,r,m,d=!1)=>{for(let a=0;a<t.length;a++){if(t[a]._id===n)return d?(t[a].children=[...t[a].children,...r],t[a].hasMore=m):t[a].children.push(r),!0;if(t[a].children&&u(t[a].children,n,r,m,d))return!0}return!1},y=async()=>{if(c.value)try{const t=await i.post("/comments/create",{target:o.target,user:o.owner,type:o.type,content:c.value});t.data.owner=o.owner,l.value.push(t.data),c.value=""}catch(t){console.error(t)}};return p(),(t,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",null,[e.createElementVNode("h3",w,e.toDisplayString(l.value.length)+" comments",1),s.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=r=>t.$router.push({name:"Sign In"})),class:"cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"},E)),s.owner?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("form",{onSubmit:e.withModifiers(y,["prevent"]),class:"bg-light radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[1]||(n[1]=r=>c.value=r),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,c.value]]),B],32)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,r=>(e.openBlock(),e.createBlock(b.default,{key:r._id,comment:r,target:s.target,type:s.type,owner:s.owner,onReply:g,onLoadMore:h,class:"comment mn-b-small radius-big pd-medium bg-light"},null,8,["comment","target","type","owner"]))),128))]))}};exports.default=V;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("axios"),b=require("./Comment.vue.cjs"),f={id:"comments"},w={class:"mn-b-small"},k=e.createElementVNode("p",{class:"t-semi uppercase"},"Please log in to leave a comment.",-1),E=[k],C={key:1,class:"mn-b-small"},B=e.createElementVNode("button",{type:"submit",class:"mn-l-auto bg-main button"},"Send",-1),V={__name:"Comments",props:["target","owner","type"],setup(s){const o=s,i=v.create({baseURL:process.env.API_URL}),l=e.ref([]),c=e.ref(""),p=async()=>{try{const t=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,maxDepth:2}});l.value=t.data}catch(t){console.error("Error fetching comments:",t)}},g=async(t,n)=>{try{const m=(await i.post("/comments/create",{content:n,target:o.target,type:o.type,user:o.owner,parent:t})).data;u(l.value,t,m)}catch(r){console.error("Error posting reply:",r)}},h=async(t,n)=>{try{const r=await i.get("/comments/read",{params:{target:o.target,type:o.type,user:o.owner,parentId:t,depth:n,maxDepth:10}});u(l.value,t,r.data,r.data.hasMore,!0)}catch(r){console.error("Error loading more comments:",r)}},u=(t,n,r,m,d=!1)=>{for(let a=0;a<t.length;a++){if(t[a]._id===n)return d?(t[a].children=[...t[a].children,...r],t[a].hasMore=m):t[a].children.push(r),!0;if(t[a].children&&u(t[a].children,n,r,m,d))return!0}return!1},y=async()=>{if(c.value)try{const t=await i.post("/comments/create",{target:o.target,user:o.owner,type:o.type,content:c.value});t.data.owner=o.owner,l.value.push(t.data),c.value=""}catch(t){console.error(t)}};return p(),(t,n)=>(e.openBlock(),e.createElementBlock("div",f,[e.createElementVNode("div",null,[e.createElementVNode("h3",w,e.toDisplayString(l.value.length)+" comments",1),s.owner?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=r=>t.$router.push({name:"Sign In"})),class:"pd-big cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"},E)),s.owner?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("form",{onSubmit:e.withModifiers(y,["prevent"]),class:"bg-light radius-big pd-medium"},[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[1]||(n[1]=r=>c.value=r),placeholder:"Enter your comment",class:"pd-small p-big w-100 radius-small mn-r-small"},null,512),[[e.vModelText,c.value]]),B],32)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,r=>(e.openBlock(),e.createBlock(b.default,{key:r._id,comment:r,target:s.target,type:s.type,owner:s.owner,onReply:g,onLoadMore:h,class:"comment mn-b-small radius-big pd-medium bg-light"},null,8,["comment","target","type","owner"]))),128))]))}};exports.default=V;
|
@@ -31,7 +31,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
|
|
31
31
|
} catch (e) {
|
32
32
|
console.error("Error fetching comments:", e);
|
33
33
|
}
|
34
|
-
},
|
34
|
+
}, b = async (e, o) => {
|
35
35
|
try {
|
36
36
|
const u = (await m.post("/comments/create", {
|
37
37
|
content: o,
|
@@ -44,7 +44,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
|
|
44
44
|
} catch (t) {
|
45
45
|
console.error("Error posting reply:", t);
|
46
46
|
}
|
47
|
-
},
|
47
|
+
}, f = async (e, o) => {
|
48
48
|
try {
|
49
49
|
const t = await m.get("/comments/read", {
|
50
50
|
params: {
|
@@ -88,7 +88,7 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
|
|
88
88
|
a.owner ? y("", !0) : (i(), d("div", {
|
89
89
|
key: 0,
|
90
90
|
onClick: o[0] || (o[0] = (t) => e.$router.push({ name: "Sign In" })),
|
91
|
-
class: "cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"
|
91
|
+
class: "pd-big cursor-pointer mn-b-small section bg-black t-white flex-center flex radius-big"
|
92
92
|
}, V)),
|
93
93
|
a.owner ? (i(), d("div", D, [
|
94
94
|
l("form", {
|
@@ -112,8 +112,8 @@ const B = { id: "comments" }, L = { class: "mn-b-small" }, U = /* @__PURE__ */ l
|
|
112
112
|
target: a.target,
|
113
113
|
type: a.type,
|
114
114
|
owner: a.owner,
|
115
|
-
onReply:
|
116
|
-
onLoadMore:
|
115
|
+
onReply: b,
|
116
|
+
onLoadMore: f,
|
117
117
|
class: "comment mn-b-small radius-big pd-medium bg-light"
|
118
118
|
}, null, 8, ["comment", "target", "type", "owner"]))), 128))
|
119
119
|
]));
|
package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as n, openBlock as o, createElementBlock as a, createElementVNode as t, createTextVNode as c, createVNode as r, withCtx as s, createBlock as p } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
4
|
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Community.vue.cjs"),t=[{path:"community",component:e.default,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Blog.vue.cjs"))}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>require("../components/pages/BlogPost.vue.cjs"))},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))}];exports.default=t;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Community.vue.cjs"),t=[{path:"community",component:e.default,meta:{title:{en:"Community",ru:"Коммьюнити"},breadcrumbs:{hidden:!0},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Blog.vue.cjs"))}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>require("../components/pages/BlogPost.vue.cjs"))},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/CreateBlogPost.vue.cjs"))}];exports.default=t;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ref as p, openBlock as n, createElementBlock as c, createVNode as b, createElementVNode as
|
1
|
+
import { ref as p, openBlock as n, createElementBlock as c, createVNode as b, createElementVNode as d } from "vue";
|
2
2
|
import f from "../../../../components/Field/Field.vue2.js";
|
3
|
-
const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"],
|
3
|
+
const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], w = {
|
4
4
|
key: 1,
|
5
5
|
class: ""
|
6
|
-
},
|
6
|
+
}, x = /* @__PURE__ */ d("p", { class: "t-center" }, "Embeds from youtube.com, vimeo.com, soundcloud.com are allowed", -1), y = {
|
7
7
|
__name: "Embed",
|
8
8
|
props: [
|
9
9
|
"label",
|
@@ -11,9 +11,9 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
|
|
11
11
|
"prop"
|
12
12
|
],
|
13
13
|
emits: ["input", "updateBlock"],
|
14
|
-
setup(o, { emit:
|
15
|
-
const e = p(null), i = o,
|
16
|
-
function r(
|
14
|
+
setup(o, { emit: a }) {
|
15
|
+
const e = p(null), i = o, s = a;
|
16
|
+
function r(m) {
|
17
17
|
return [
|
18
18
|
/youtube\.com/,
|
19
19
|
/facebook\.com/,
|
@@ -26,17 +26,17 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
|
|
26
26
|
/linkedin\.com/,
|
27
27
|
/medium\.com/,
|
28
28
|
/spotify\.com/
|
29
|
-
].some((l) => l.test(
|
29
|
+
].some((l) => l.test(m));
|
30
30
|
}
|
31
31
|
function u() {
|
32
|
-
e.value && r(e.value) ? (
|
32
|
+
e.value && r(e.value) ? (s("input", e.value), s("updateBlock", i.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
|
33
33
|
}
|
34
|
-
return (
|
34
|
+
return (m, t) => (n(), c("div", v, [
|
35
35
|
o.prop.content ? (n(), c("div", {
|
36
36
|
key: 0,
|
37
37
|
innerHTML: o.prop.content,
|
38
38
|
class: "flex-center flex"
|
39
|
-
}, null, 8, k)) : (n(), c("div",
|
39
|
+
}, null, 8, k)) : (n(), c("div", w, [
|
40
40
|
b(f, {
|
41
41
|
field: e.value,
|
42
42
|
"onUpdate:field": t[0] || (t[0] = (l) => e.value = l),
|
@@ -44,9 +44,9 @@ const v = { class: "mn-b-thin w-100 pd-medium bg-white radius-medium" }, k = ["i
|
|
44
44
|
placeholder: "Paste your embed code here",
|
45
45
|
class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-b-thin"
|
46
46
|
}, null, 8, ["field"]),
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
d("div", { class: "flex-v-center flex-nowrap flex gap-small" }, [
|
48
|
+
x,
|
49
|
+
d("button", {
|
50
50
|
onClick: u,
|
51
51
|
class: "button-small button"
|
52
52
|
}, " Save ")
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs
CHANGED
@@ -1,5 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
2
|
-
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function u(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{u()}),r()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=i=>o.prop[o.content]=i),placeholder:o.placeholder?o.placeholder:"",onInput:d,onFocus:l[1]||(l[1]=i=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:e.normalizeClass(["text-area mn-b-thin",{"t-main t-semi":o.prop.type==="Link"}])},`
|
4
|
-
|
5
|
-
`,42,k),[[e.vModelText,o.prop[o.content]]])]))}};exports.default=x;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),N=require("../../../../../../node_modules/isomorphic-dompurify/browser.cjs");;/* empty css */const h={key:0,class:"formatting-bar"},y={__name:"Textarea",props:{prop:Object,content:String,placeholder:String,index:Number,setFocus:Boolean},emits:["deleteBlock","updateBlock","addBlock","focus"],setup(s,{emit:k}){const T={ALLOWED_TAGS:["b","i","a","img"],ALLOWED_ATTR:["href","target","src"]},r=s,l=k,c=n.ref(null),u=n.ref(!1);n.ref(null);function C(t){const e=a(t.target.innerHTML);l("updateBlock",r.prop,{content:e})}function g(t){if(t.key==="Enter"&&!t.shiftKey){t.preventDefault();const o=window.getSelection().getRangeAt(0),i=E(o),d=a(c.value.innerHTML);l("updateBlock",r.prop,{content:d}),l("addBlock","Textarea",a(i),r.index)}else t.key==="Backspace"&&c.value.innerHTML.trim()===""&&(t.preventDefault(),l("deleteBlock",r.prop,{setCaretToEnd:!0}))}function E(t){const e=t.startContainer,o=t.startOffset;if(e.nodeType===Node.TEXT_NODE){const i=e.textContent.slice(o);return e.textContent=e.textContent.slice(0,o),i}else if(e.nodeType===Node.ELEMENT_NODE){const i=document.createElement("div"),d=Array.from(e.childNodes);let m=!1;for(d.forEach((b,L)=>{L===o&&(m=!0),m&&i.appendChild(b.cloneNode(!0))});e.childNodes[o];)e.removeChild(e.childNodes[o]);return i.innerHTML}return""}function f(t={}){n.nextTick(()=>{c.value.focus();let e=t.setCaretToEnd||r.prop.setCaretToEnd;if(r.prop.setFocus===!0&&!e){const o=document.createRange();o.setStart(c.value,0),o.collapse(!0);const i=window.getSelection();i.removeAllRanges(),i.addRange(o)}else v(c.value);l("updateBlock",r.prop,{setFocus:!1,setCaretToEnd:!1})})}n.onMounted(()=>{r.setFocus&&n.nextTick(()=>{f()})}),n.onUpdated(()=>{r.setFocus&&n.nextTick(()=>{f()})});function a(t){return N.default.sanitize(t,T)}function v(t){const e=document.createRange(),o=window.getSelection();e.selectNodeContents(t),e.collapse(!1),o.removeAllRanges(),o.addRange(e)}function x(){u.value=window.getSelection().toString().length>0}function p(t){document.execCommand(t,!1,null)}function B(){const t=prompt("Enter the URL:");t&&document.execCommand("createLink",!1,t)}return(t,e)=>(n.openBlock(),n.createElementBlock("div",null,[e[0]||(n.setBlockTracking(-1),e[0]=n.createElementVNode("div",{ref_key:"editableDiv",ref:c,contenteditable:!0,onInput:C,onKeydown:g,onMouseup:x,tabindex:"0",innerHTML:r.prop[r.content],class:n.normalizeClass(["editable-div mn-b-thin",{"t-main t-semi":s.prop.type==="Link",h3:s.prop.type==="H2"}])},null,42,["innerHTML"]),n.setBlockTracking(1),e[0]),u.value?(n.openBlock(),n.createElementBlock("div",h,[n.createElementVNode("button",{onClick:e[1]||(e[1]=o=>p("bold"))},"B"),n.createElementVNode("button",{onClick:e[2]||(e[2]=o=>p("italic"))},"I"),n.createElementVNode("button",{onClick:B},"Link")])):n.createCommentVNode("",!0)]))}};exports.default=y;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js
CHANGED
@@ -1,67 +1,119 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as u, onMounted as D, nextTick as f, onUpdated as M, openBlock as T, createElementBlock as g, setBlockTracking as E, createElementVNode as c, normalizeClass as A, createCommentVNode as R } from "vue";
|
2
|
+
import z from "../../../../../../node_modules/isomorphic-dompurify/browser.js";
|
2
3
|
/* empty css */
|
3
|
-
const
|
4
|
+
const H = {
|
5
|
+
key: 0,
|
6
|
+
class: "formatting-bar"
|
7
|
+
}, K = {
|
4
8
|
__name: "Textarea",
|
5
|
-
props:
|
9
|
+
props: {
|
10
|
+
prop: Object,
|
11
|
+
content: String,
|
12
|
+
placeholder: String,
|
13
|
+
index: Number,
|
14
|
+
setFocus: Boolean
|
15
|
+
},
|
6
16
|
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
-
setup(
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
s(
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
c();
|
17
|
-
});
|
18
|
-
let r = n.slice(1).map((k) => ({ __name: "Textarea", content: k }));
|
19
|
-
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
|
-
} else
|
21
|
-
l.target.value.trim() === "" && l.target.value.includes(`
|
22
|
-
|
23
|
-
`) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
|
17
|
+
setup(l, { emit: v }) {
|
18
|
+
const x = {
|
19
|
+
ALLOWED_TAGS: ["b", "i", "a", "img"],
|
20
|
+
ALLOWED_ATTR: ["href", "target", "src"]
|
21
|
+
}, o = l, s = v, r = u(null), p = u(!1);
|
22
|
+
u(null);
|
23
|
+
function L(t) {
|
24
|
+
const e = a(t.target.innerHTML);
|
25
|
+
s("updateBlock", o.prop, { content: e });
|
24
26
|
}
|
25
|
-
function
|
26
|
-
(
|
27
|
+
function B(t) {
|
28
|
+
if (t.key === "Enter" && !t.shiftKey) {
|
29
|
+
t.preventDefault();
|
30
|
+
const n = window.getSelection().getRangeAt(0), i = b(n), d = a(r.value.innerHTML);
|
31
|
+
s("updateBlock", o.prop, { content: d }), s("addBlock", "Textarea", a(i), o.index);
|
32
|
+
} else t.key === "Backspace" && r.value.innerHTML.trim() === "" && (t.preventDefault(), s("deleteBlock", o.prop, { setCaretToEnd: !0 }));
|
27
33
|
}
|
28
|
-
function
|
29
|
-
|
30
|
-
|
34
|
+
function b(t) {
|
35
|
+
const e = t.startContainer, n = t.startOffset;
|
36
|
+
if (e.nodeType === Node.TEXT_NODE) {
|
37
|
+
const i = e.textContent.slice(n);
|
38
|
+
return e.textContent = e.textContent.slice(0, n), i;
|
39
|
+
} else if (e.nodeType === Node.ELEMENT_NODE) {
|
40
|
+
const i = document.createElement("div"), d = Array.from(e.childNodes);
|
41
|
+
let k = !1;
|
42
|
+
for (d.forEach((w, S) => {
|
43
|
+
S === n && (k = !0), k && i.appendChild(w.cloneNode(!0));
|
44
|
+
}); e.childNodes[n]; )
|
45
|
+
e.removeChild(e.childNodes[n]);
|
46
|
+
return i.innerHTML;
|
47
|
+
}
|
48
|
+
return "";
|
49
|
+
}
|
50
|
+
function m(t = {}) {
|
51
|
+
f(() => {
|
52
|
+
r.value.focus();
|
53
|
+
let e = t.setCaretToEnd || o.prop.setCaretToEnd;
|
54
|
+
if (o.prop.setFocus === !0 && !e) {
|
55
|
+
const n = document.createRange();
|
56
|
+
n.setStart(r.value, 0), n.collapse(!0);
|
57
|
+
const i = window.getSelection();
|
58
|
+
i.removeAllRanges(), i.addRange(n);
|
59
|
+
} else
|
60
|
+
h(r.value);
|
61
|
+
s("updateBlock", o.prop, { setFocus: !1, setCaretToEnd: !1 });
|
62
|
+
});
|
63
|
+
}
|
64
|
+
D(() => {
|
65
|
+
o.setFocus && f(() => {
|
66
|
+
m();
|
67
|
+
});
|
68
|
+
}), M(() => {
|
69
|
+
o.setFocus && f(() => {
|
70
|
+
m();
|
31
71
|
});
|
72
|
+
});
|
73
|
+
function a(t) {
|
74
|
+
return z.sanitize(t, x);
|
75
|
+
}
|
76
|
+
function h(t) {
|
77
|
+
const e = document.createRange(), n = window.getSelection();
|
78
|
+
e.selectNodeContents(t), e.collapse(!1), n.removeAllRanges(), n.addRange(e);
|
79
|
+
}
|
80
|
+
function y() {
|
81
|
+
p.value = window.getSelection().toString().length > 0;
|
82
|
+
}
|
83
|
+
function C(t) {
|
84
|
+
document.execCommand(t, !1, null);
|
32
85
|
}
|
33
|
-
function
|
34
|
-
t
|
86
|
+
function N() {
|
87
|
+
const t = prompt("Enter the URL:");
|
88
|
+
t && document.execCommand("createLink", !1, t);
|
35
89
|
}
|
36
|
-
return
|
37
|
-
e
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
onFocus: n[1] || (n[1] = (r) => a("focus", t.value)),
|
50
|
-
onKeyup: f,
|
51
|
-
ref_key: "textarea",
|
52
|
-
ref: t,
|
53
|
-
tabindex: "-1",
|
54
|
-
class: y(["text-area mn-b-thin", {
|
55
|
-
"t-main t-semi": o.prop.type === "Link"
|
90
|
+
return (t, e) => (T(), g("div", null, [
|
91
|
+
e[0] || (E(-1), e[0] = c("div", {
|
92
|
+
ref_key: "editableDiv",
|
93
|
+
ref: r,
|
94
|
+
contenteditable: !0,
|
95
|
+
onInput: L,
|
96
|
+
onKeydown: B,
|
97
|
+
onMouseup: y,
|
98
|
+
tabindex: "0",
|
99
|
+
innerHTML: o.prop[o.content],
|
100
|
+
class: A(["editable-div mn-b-thin", {
|
101
|
+
"t-main t-semi": l.prop.type === "Link",
|
102
|
+
h3: l.prop.type === "H2"
|
56
103
|
}])
|
57
|
-
},
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
104
|
+
}, null, 42, ["innerHTML"]), E(1), e[0]),
|
105
|
+
p.value ? (T(), g("div", H, [
|
106
|
+
c("button", {
|
107
|
+
onClick: e[1] || (e[1] = (n) => C("bold"))
|
108
|
+
}, "B"),
|
109
|
+
c("button", {
|
110
|
+
onClick: e[2] || (e[2] = (n) => C("italic"))
|
111
|
+
}, "I"),
|
112
|
+
c("button", { onClick: N }, "Link")
|
113
|
+
])) : R("", !0)
|
62
114
|
]));
|
63
115
|
}
|
64
116
|
};
|
65
117
|
export {
|
66
|
-
|
118
|
+
K as default
|
67
119
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../elements/Textarea.vue2.cjs"),B=require("../elements/ImageUpload.vue.cjs"),x=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),N=require("../elements/Video.vue.cjs"),y=require("../../../../components/Draggable/Draggable.vue.cjs"),A=require("../../../../../node_modules/uuid/dist/esm-browser/v4.cjs"),D=["data-index"],$=["onMouseover"],q={key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"}},T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},M=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U=["onClick"],z=["onClick"],L=["onClick"],H={__name:"Constructor",props:{content:{type:Array}},emits:["update"],setup(v,{emit:k}){const h=v,u=k;e.ref(null);let o=e.ref(null);const i=e.ref(null),d=e.ref(!1),f={Textarea:r.default,H2:r.default,Link:r.default,ImageUpload:B.default,Embed:x.default,Audio:V.default,Video:N.default};o.value={content:h.content},e.onMounted(()=>{o.value&&o.value.content.length===0&&c("Textarea","",0,null,"h2","Enter title")});const b=l=>{o.value.content=l},g=l=>{console.log("Drag started from index:",l)},_=(l,s)=>{console.log("Drag ended. Start index:",l,"End index:",s)};function c(l="Textarea",s="",t,n,a="",w="",E=A.default()){let p={id:E,type:l,style:"",class:a,placeholder:w,content:s,blocks:[],setFocus:!0};t!==void 0?o.value.content.splice(t+1,0,p):o.value.content.push(p),i.value=null,u("update",o.value.content)}function C(l,s){const t=o.value.content.findIndex(n=>n===l);t!==-1&&(o.value.content[t]={...o.value.content[t],...s}),u("update",o.value.content)}function m(l,s={}){const t=o.value.content.findIndex(n=>n.id===l.id);if(t!==-1&&t!==0&&(o.value.content.splice(t,1),t>0)){const n=o.value.content[t-1];n.setFocus=!0,n.setCaretToEnd=!0}u("update",o.value.content)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(y.default,{list:e.unref(o).content,"onUpdate:list":b,onStart:g,onEnd:_,disabledClass:"no-drag"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o).content,(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:t.id,"data-index":n,draggable:"true",class:e.normalizeClass(["draggable-item pos-relative",{"no-drag":n===0}])},[e.createElementVNode("div",{onMouseover:a=>(i.value=n,d.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(f[t.type]),{index:n,component:t,prop:t,placeholder:t.placeholder,class:e.normalizeClass(t.class),setFocus:t.setFocus,content:"content",onDeleteBlock:m,onAddBlock:c,onUpdateBlock:C},null,40,["index","component","prop","placeholder","class","setFocus"]))],40,$),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===n?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("button",{onClick:s[0]||(s[0]=a=>d.value=!d.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(t.content?"...":"+"),1),d.value?(e.openBlock(),e.createElementBlock("div",T,[n!==0?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:a=>m(t),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,M)):e.createCommentVNode("",!0),e.createElementVNode("span",{onClick:a=>c("ImageUpload","",n),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>c("H2","",n),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>c("Embed","",n),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S),e.createElementVNode("span",{onClick:a=>c("Audio","",n),class:"w-max button-small t-black bg-white button"}," Add Audio ",8,U),e.createElementVNode("span",{onClick:a=>c("Video","",n),class:"w-max button-small t-black bg-white button"}," Add Video ",8,z),e.createElementVNode("span",{onClick:a=>c("Link","",n),class:"w-max button-small t-black bg-white button"}," Add Link ",8,L)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:2},1024)],10,D))),128))]),_:1},8,["list"])]))}};exports.default=H;
|