@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,280 +0,0 @@
|
|
1
|
-
const commentControllerFactory = (db) => {
|
2
|
-
const Comment = db.comment;
|
3
|
-
const Membership = db.membership;
|
4
|
-
|
5
|
-
const read = async (req, res) => {
|
6
|
-
try {
|
7
|
-
const { target, type, user, maxDepth = 4, parentId = null } = req.query;
|
8
|
-
|
9
|
-
let conditions = {
|
10
|
-
target: new db.mongoose.Types.ObjectId(target),
|
11
|
-
type: type,
|
12
|
-
};
|
13
|
-
|
14
|
-
if (parentId) {
|
15
|
-
conditions.parent = new db.mongoose.Types.ObjectId(parentId);
|
16
|
-
} else {
|
17
|
-
conditions.parent = null;
|
18
|
-
}
|
19
|
-
|
20
|
-
let blockedMembers = [];
|
21
|
-
|
22
|
-
if (user) {
|
23
|
-
const memberships = await Membership.find({ user: user, role: 'blocked' });
|
24
|
-
blockedMembers = memberships.map(membership => membership.target);
|
25
|
-
}
|
26
|
-
|
27
|
-
const pipeline = [
|
28
|
-
{ $match: conditions },
|
29
|
-
{ $sort: { createdAt: -1 } },
|
30
|
-
{
|
31
|
-
$graphLookup: {
|
32
|
-
from: 'comments',
|
33
|
-
startWith: '$_id',
|
34
|
-
connectFromField: '_id',
|
35
|
-
connectToField: 'parent',
|
36
|
-
as: 'allChildren',
|
37
|
-
depthField: 'childDepth',
|
38
|
-
maxDepth: 2
|
39
|
-
}
|
40
|
-
},
|
41
|
-
{
|
42
|
-
$lookup: {
|
43
|
-
from: 'users',
|
44
|
-
localField: 'user',
|
45
|
-
foreignField: '_id',
|
46
|
-
as: 'user'
|
47
|
-
}
|
48
|
-
},
|
49
|
-
{ $unwind: '$user' },
|
50
|
-
{
|
51
|
-
$lookup: {
|
52
|
-
from: 'users',
|
53
|
-
localField: 'allChildren.user',
|
54
|
-
foreignField: '_id',
|
55
|
-
as: 'childUsers'
|
56
|
-
}
|
57
|
-
},
|
58
|
-
{
|
59
|
-
$addFields: {
|
60
|
-
childrenCount: {
|
61
|
-
$size: {
|
62
|
-
$filter: {
|
63
|
-
input: '$allChildren',
|
64
|
-
as: 'child',
|
65
|
-
cond: { $eq: ['$$child.parent', '$_id'] }
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
}
|
70
|
-
},
|
71
|
-
{
|
72
|
-
$addFields: {
|
73
|
-
children: {
|
74
|
-
$map: {
|
75
|
-
input: {
|
76
|
-
$filter: {
|
77
|
-
input: '$allChildren',
|
78
|
-
as: 'child',
|
79
|
-
cond: { $eq: ['$$child.childDepth', 0] }
|
80
|
-
}
|
81
|
-
},
|
82
|
-
as: 'child',
|
83
|
-
in: {
|
84
|
-
$mergeObjects: [
|
85
|
-
'$$child',
|
86
|
-
{
|
87
|
-
user: {$arrayElemAt: [{$filter: {input: '$childUsers', as: 'childUser', cond: { $eq: ['$$childUser._id', '$$child.user'] } } }, 0 ] },
|
88
|
-
childrenCount: {$size: {$filter: {input: '$allChildren', as: 'grandchild', cond: { $eq: ['$$grandchild.parent', '$$child._id'] } } } },
|
89
|
-
children: {
|
90
|
-
$map: {
|
91
|
-
input: {
|
92
|
-
$filter: {
|
93
|
-
input: '$allChildren',
|
94
|
-
as: 'grandchild',
|
95
|
-
cond: { $eq: ['$$grandchild.parent', '$$child._id'] }
|
96
|
-
}
|
97
|
-
},
|
98
|
-
as: 'grandchild',
|
99
|
-
in: {
|
100
|
-
$mergeObjects: [
|
101
|
-
'$$grandchild',
|
102
|
-
{
|
103
|
-
user: {$arrayElemAt: [{$filter: {input: '$childUsers', as: 'childUser', cond: { $eq: ['$$childUser._id', '$$grandchild.user'] } } }, 0 ] },
|
104
|
-
childrenCount: {$size: {$filter: {input: '$allChildren', as: 'greatgrandchild', cond: { $eq: ['$$greatgrandchild.parent', '$$grandchild._id'] } } } },
|
105
|
-
hasMore: {$cond: {if: {$gt: [{$size: {$filter: {input: '$allChildren', as: 'greatgrandchild', cond: { $eq: ['$$greatgrandchild.parent', '$$grandchild._id'] } } } }, 0 ] }, then: true, else: false } }
|
106
|
-
}
|
107
|
-
]
|
108
|
-
}
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
]
|
113
|
-
}
|
114
|
-
}
|
115
|
-
}
|
116
|
-
}
|
117
|
-
},
|
118
|
-
{
|
119
|
-
$project: {
|
120
|
-
_id: 1,
|
121
|
-
content: 1,
|
122
|
-
type: 1,
|
123
|
-
target: 1,
|
124
|
-
'user.username': 1,
|
125
|
-
'user.profile.photo': 1,
|
126
|
-
'user.profile.name': 1,
|
127
|
-
'user._id': 1,
|
128
|
-
depth: 1,
|
129
|
-
createdAt: 1,
|
130
|
-
childrenCount: 1,
|
131
|
-
children: 1
|
132
|
-
}
|
133
|
-
}
|
134
|
-
];
|
135
|
-
|
136
|
-
if (blockedMembers.length > 0) {
|
137
|
-
pipeline.unshift({ $match: { user: { $nin: blockedMembers } } });
|
138
|
-
}
|
139
|
-
|
140
|
-
const comments = await Comment.aggregate(pipeline);
|
141
|
-
|
142
|
-
function buildCommentTree(comments) {
|
143
|
-
// Создаем Map для быстрого доступа ко всем комментариям по их ID
|
144
|
-
const commentMap = new Map();
|
145
|
-
|
146
|
-
// Функция для преобразования MongoDB ObjectId в строку
|
147
|
-
const objectIdToString = (id) => id.toString();
|
148
|
-
|
149
|
-
// Функция для добавления комментария и его дочерних элементов в Map
|
150
|
-
function addToMap(comment) {
|
151
|
-
const commentId = objectIdToString(comment._id);
|
152
|
-
if (!commentMap.has(commentId)) {
|
153
|
-
commentMap.set(commentId, {...comment, children: []});
|
154
|
-
if (comment.children && comment.children.length > 0) {
|
155
|
-
comment.children.forEach(addToMap);
|
156
|
-
}
|
157
|
-
}
|
158
|
-
}
|
159
|
-
|
160
|
-
// Добавляем все комментарии и их дочерние элементы в Map
|
161
|
-
comments.forEach(addToMap);
|
162
|
-
|
163
|
-
// Строим дерево
|
164
|
-
commentMap.forEach((comment) => {
|
165
|
-
if (comment.parent) {
|
166
|
-
const parentId = objectIdToString(comment.parent);
|
167
|
-
const parent = commentMap.get(parentId);
|
168
|
-
if (parent) {
|
169
|
-
parent.children.push(comment);
|
170
|
-
}
|
171
|
-
}
|
172
|
-
});
|
173
|
-
|
174
|
-
// Возвращаем только корневые комментарии
|
175
|
-
return comments.map(comment => {
|
176
|
-
const commentId = objectIdToString(comment._id);
|
177
|
-
return commentMap.get(commentId);
|
178
|
-
});
|
179
|
-
}
|
180
|
-
|
181
|
-
|
182
|
-
commentsTree = buildCommentTree(comments)
|
183
|
-
|
184
|
-
console.log(commentsTree)
|
185
|
-
|
186
|
-
res.status(200).json(commentsTree);
|
187
|
-
} catch (error) {
|
188
|
-
console.error(error);
|
189
|
-
res.status(500).json({ message: error.message });
|
190
|
-
}
|
191
|
-
};
|
192
|
-
|
193
|
-
|
194
|
-
const create = async (req, res) => {
|
195
|
-
try {
|
196
|
-
const { user, type, target, content, parent } = req.body;
|
197
|
-
|
198
|
-
let depth = 0;
|
199
|
-
|
200
|
-
if (parent) {
|
201
|
-
const parentComment = await Comment.findById(parent);
|
202
|
-
if (!parentComment) {
|
203
|
-
return res.status(404).send({ message: "Parent comment not found." });
|
204
|
-
}
|
205
|
-
depth = parentComment.depth + 1;
|
206
|
-
}
|
207
|
-
|
208
|
-
const comment = new Comment({
|
209
|
-
user,
|
210
|
-
type,
|
211
|
-
target,
|
212
|
-
content,
|
213
|
-
parent,
|
214
|
-
depth
|
215
|
-
});
|
216
|
-
|
217
|
-
const savedComment = await comment.save();
|
218
|
-
|
219
|
-
if (parent) {
|
220
|
-
await Comment.findByIdAndUpdate(parent, {
|
221
|
-
$push: { children: savedComment._id }
|
222
|
-
});
|
223
|
-
}
|
224
|
-
|
225
|
-
const populatedComment = await Comment.findById(savedComment._id)
|
226
|
-
.populate({
|
227
|
-
path: 'user',
|
228
|
-
select: 'username profile.photo profile.name _id'
|
229
|
-
})
|
230
|
-
|
231
|
-
res.status(201).send(populatedComment);
|
232
|
-
} catch (err) {
|
233
|
-
console.error(err);
|
234
|
-
res.status(500).send({
|
235
|
-
message: err.message || "Some error occurred while creating the comment."
|
236
|
-
});
|
237
|
-
}
|
238
|
-
};
|
239
|
-
|
240
|
-
const update = async (req, res) => {
|
241
|
-
try {
|
242
|
-
const comment = await Comment.findByIdAndUpdate(req.params._id, req.body, { new: true })
|
243
|
-
.populate({
|
244
|
-
path: 'user',
|
245
|
-
select: 'username profile.photo profile.name _id'
|
246
|
-
});
|
247
|
-
|
248
|
-
if (!comment) {
|
249
|
-
return res.status(404).send({ message: "Comment not found." });
|
250
|
-
}
|
251
|
-
|
252
|
-
res.status(200).send(comment);
|
253
|
-
} catch (err) {
|
254
|
-
res.status(500).send({ message: err.message });
|
255
|
-
}
|
256
|
-
};
|
257
|
-
|
258
|
-
const deleteComment = async (req, res) => {
|
259
|
-
try {
|
260
|
-
const comment = await Comment.findByIdAndRemove(req.params._id);
|
261
|
-
|
262
|
-
if (!comment) {
|
263
|
-
return res.status(404).send({ message: "Comment is not deleted." });
|
264
|
-
}
|
265
|
-
|
266
|
-
res.status(200).send(comment);
|
267
|
-
} catch (err) {
|
268
|
-
res.status(500).send({ message: err.message });
|
269
|
-
}
|
270
|
-
};
|
271
|
-
|
272
|
-
return {
|
273
|
-
read,
|
274
|
-
create,
|
275
|
-
update,
|
276
|
-
delete: deleteComment
|
277
|
-
};
|
278
|
-
};
|
279
|
-
|
280
|
-
module.exports = commentControllerFactory;
|
@@ -1,180 +0,0 @@
|
|
1
|
-
const commentControllerFactory = (db) => {
|
2
|
-
const Comment = db.comment;
|
3
|
-
const Membership = db.membership;
|
4
|
-
|
5
|
-
const read = async (req, res) => {
|
6
|
-
try {
|
7
|
-
const { target, user, parentId, depth = 0, maxDepth = 2 } = req.query;
|
8
|
-
let conditions = parentId
|
9
|
-
? { parent: parentId }
|
10
|
-
: { target, parent: null };
|
11
|
-
|
12
|
-
if (user) {
|
13
|
-
const memberships = await Membership.find({ user });
|
14
|
-
const blockedMembers = memberships
|
15
|
-
.filter(membership => membership.role === 'blocked')
|
16
|
-
.map(membership => membership.target);
|
17
|
-
if (blockedMembers.length > 0) {
|
18
|
-
conditions.user = { "$nin": blockedMembers };
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
const populateRecursive = (currentDepth = 0) => ({
|
23
|
-
path: 'children',
|
24
|
-
populate: [
|
25
|
-
{
|
26
|
-
path: 'user',
|
27
|
-
select: 'username profile.photo profile.name _id'
|
28
|
-
},
|
29
|
-
...(currentDepth < maxDepth ? [populateRecursive(currentDepth + 1)] : [])
|
30
|
-
]
|
31
|
-
});
|
32
|
-
|
33
|
-
const comments = await Comment.find(conditions)
|
34
|
-
.populate({
|
35
|
-
path: 'user',
|
36
|
-
select: 'username profile.photo profile.name _id'
|
37
|
-
})
|
38
|
-
.populate(populateRecursive(Number(depth)));
|
39
|
-
|
40
|
-
if (!comments || comments.length === 0) {
|
41
|
-
return res.status(404).send({
|
42
|
-
message: parentId
|
43
|
-
? "No more comments found."
|
44
|
-
: "Comments not found."
|
45
|
-
});
|
46
|
-
}
|
47
|
-
|
48
|
-
// Функция для рекурсивного подсчета всех вложенных комментариев без ограничения глубины
|
49
|
-
const countAllChildren = (comment) => {
|
50
|
-
let count = 0;
|
51
|
-
const stack = [comment];
|
52
|
-
while (stack.length > 0) {
|
53
|
-
const current = stack.pop();
|
54
|
-
if (current.children && current.children.length > 0) {
|
55
|
-
count += current.children.length;
|
56
|
-
stack.push(...current.children);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
return count;
|
60
|
-
};
|
61
|
-
|
62
|
-
const addHasMoreFlag = (comment, currentDepth = 0) => {
|
63
|
-
const commentObj = comment.toObject();
|
64
|
-
commentObj.childrenCount = countAllChildren(comment); // Обновлено здесь для подсчета всех вложенных комментариев
|
65
|
-
commentObj.hasMore = currentDepth >= maxDepth && comment.children.length > 0;
|
66
|
-
|
67
|
-
if (currentDepth < maxDepth && comment.children.length > 0) {
|
68
|
-
commentObj.children = comment.children.map(child => addHasMoreFlag(child, currentDepth + 1));
|
69
|
-
} else {
|
70
|
-
commentObj.children = [];
|
71
|
-
}
|
72
|
-
|
73
|
-
return commentObj;
|
74
|
-
};
|
75
|
-
|
76
|
-
const commentsWithHasMore = comments.map(comment => addHasMoreFlag(comment, Number(depth)));
|
77
|
-
|
78
|
-
res.status(200).send(commentsWithHasMore);
|
79
|
-
} catch (err) {
|
80
|
-
res.status(500).send({ message: err.message });
|
81
|
-
}
|
82
|
-
};
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
const create = async (req, res) => {
|
88
|
-
try {
|
89
|
-
const { user, type, target, content, parent } = req.body;
|
90
|
-
|
91
|
-
let depth = 0;
|
92
|
-
|
93
|
-
if (parent) {
|
94
|
-
const parentComment = await Comment.findById(parent);
|
95
|
-
if (!parentComment) {
|
96
|
-
return res.status(404).send({ message: "Parent comment not found." });
|
97
|
-
}
|
98
|
-
depth = parentComment.depth + 1;
|
99
|
-
}
|
100
|
-
|
101
|
-
const comment = new Comment({
|
102
|
-
user,
|
103
|
-
type,
|
104
|
-
target,
|
105
|
-
content,
|
106
|
-
parent,
|
107
|
-
depth
|
108
|
-
});
|
109
|
-
|
110
|
-
const savedComment = await comment.save();
|
111
|
-
|
112
|
-
if (parent) {
|
113
|
-
await Comment.findByIdAndUpdate(parent, {
|
114
|
-
$push: { children: savedComment._id }
|
115
|
-
});
|
116
|
-
}
|
117
|
-
|
118
|
-
const populatedComment = await Comment.findById(savedComment._id)
|
119
|
-
.populate({
|
120
|
-
path: 'user',
|
121
|
-
select: 'username profile.photo profile.name _id'
|
122
|
-
})
|
123
|
-
.populate({
|
124
|
-
path: 'children',
|
125
|
-
populate: {
|
126
|
-
path: 'user',
|
127
|
-
select: 'username profile.photo profile.name _id'
|
128
|
-
}
|
129
|
-
});
|
130
|
-
|
131
|
-
res.status(201).send(populatedComment);
|
132
|
-
} catch (err) {
|
133
|
-
console.error(err);
|
134
|
-
res.status(500).send({
|
135
|
-
message: err.message || "Some error occurred while creating the comment."
|
136
|
-
});
|
137
|
-
}
|
138
|
-
};
|
139
|
-
|
140
|
-
const update = async (req, res) => {
|
141
|
-
try {
|
142
|
-
const comment = await Comment.findByIdAndUpdate(req.params._id, req.body, { new: true })
|
143
|
-
.populate({
|
144
|
-
path: 'user',
|
145
|
-
select: 'username profile.photo profile.name _id'
|
146
|
-
});
|
147
|
-
|
148
|
-
if (!comment) {
|
149
|
-
return res.status(404).send({ message: "Comment not found." });
|
150
|
-
}
|
151
|
-
|
152
|
-
res.status(200).send(comment);
|
153
|
-
} catch (err) {
|
154
|
-
res.status(500).send({ message: err.message });
|
155
|
-
}
|
156
|
-
};
|
157
|
-
|
158
|
-
const deleteComment = async (req, res) => {
|
159
|
-
try {
|
160
|
-
const comment = await Comment.findByIdAndRemove(req.params._id);
|
161
|
-
|
162
|
-
if (!comment) {
|
163
|
-
return res.status(404).send({ message: "Comment is not deleted." });
|
164
|
-
}
|
165
|
-
|
166
|
-
res.status(200).send(comment);
|
167
|
-
} catch (err) {
|
168
|
-
res.status(500).send({ message: err.message });
|
169
|
-
}
|
170
|
-
};
|
171
|
-
|
172
|
-
return {
|
173
|
-
read,
|
174
|
-
create,
|
175
|
-
update,
|
176
|
-
delete: deleteComment
|
177
|
-
};
|
178
|
-
};
|
179
|
-
|
180
|
-
module.exports = commentControllerFactory;
|
@@ -1,102 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<textarea
|
4
|
-
v-model="prop[content]"
|
5
|
-
:placeholder="placeholder ? placeholder : 'Enter text'"
|
6
|
-
@input="handleInput"
|
7
|
-
@focus="emit('focus', textarea)"
|
8
|
-
@keyup="handleKeyUp"
|
9
|
-
ref="textarea"
|
10
|
-
tabindex="-1"
|
11
|
-
class="h3 text-area mn-b-thin">
|
12
|
-
</textarea>
|
13
|
-
</div>
|
14
|
-
</template>
|
15
|
-
|
16
|
-
<script setup="props">
|
17
|
-
import { computed, ref, onMounted, watch, nextTick, onUpdated, watchEffect } from 'vue'
|
18
|
-
|
19
|
-
const props = defineProps(
|
20
|
-
['obj','label','prop','value','content','textarea','placeholder','index','ref','setFocus']
|
21
|
-
)
|
22
|
-
|
23
|
-
const data = ref(props)
|
24
|
-
const textarea = ref(null)
|
25
|
-
const emit = defineEmits(['deleteBlock', 'updateBlock','addBlock','focus'])
|
26
|
-
|
27
|
-
let cursorPosition = ref(0); // To store the cursor position
|
28
|
-
|
29
|
-
function handleInput(event) {
|
30
|
-
let paragraphs = event.target.value.split(/\n+/);
|
31
|
-
|
32
|
-
if (paragraphs.length > 1) {
|
33
|
-
props.prop[props.content] = paragraphs[0];
|
34
|
-
|
35
|
-
nextTick(() => {
|
36
|
-
resize()
|
37
|
-
})
|
38
|
-
|
39
|
-
let newBlocks = paragraphs.slice(1).map((paragraph) => ({ type: 'Textarea', content: paragraph }));
|
40
|
-
|
41
|
-
// emit addBlock event with block data and index
|
42
|
-
emit('addBlock', 'Textarea', '', props.index, { blocks: newBlocks, ref: textarea });
|
43
|
-
} else {
|
44
|
-
if (event.target.value.trim() === "" && event.target.value.includes("\n\n")) {
|
45
|
-
// if the entered value is only an empty line, add a new block
|
46
|
-
console.log('We are adding new block:' + props.index + newBlocks + textarea )
|
47
|
-
emit('addBlock', 'Textarea', '', props.index, { blocks: newBlocks, ref: textarea });
|
48
|
-
}
|
49
|
-
resize();
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
function handleKeyUp(event) {
|
54
|
-
if ((event.keyCode === 8 || event.keyCode === 46) && props.prop[props.content].trim() === "") {
|
55
|
-
|
56
|
-
emit('deleteBlock', props.prop);
|
57
|
-
}
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
function focus() {
|
62
|
-
nextTick(() => {
|
63
|
-
textarea.value.focus();
|
64
|
-
// if (props.prop[props.content].length > 0) textarea.value.setSelectionRange(0, 0);
|
65
|
-
emit('updateBlock', props.prop, { setFocus: false } );
|
66
|
-
})
|
67
|
-
}
|
68
|
-
|
69
|
-
function resize() {
|
70
|
-
textarea.value.style.height = "1rem";
|
71
|
-
textarea.value.style.height = textarea.value.scrollHeight + "px";
|
72
|
-
}
|
73
|
-
|
74
|
-
onUpdated(() => {
|
75
|
-
if (props.setFocus) nextTick(() => { { focus()} })
|
76
|
-
resize()
|
77
|
-
});
|
78
|
-
|
79
|
-
onMounted(() => {
|
80
|
-
if (props.setFocus) nextTick(() => { { focus()} })
|
81
|
-
resize()
|
82
|
-
});
|
83
|
-
|
84
|
-
watch(() => props.prop[props.content], (newValue) => {
|
85
|
-
// if (newValue === "" && !newValue.includes("\n")) {
|
86
|
-
// emit('deleteBlock', props.prop)
|
87
|
-
// }
|
88
|
-
});
|
89
|
-
</script>
|
90
|
-
|
91
|
-
|
92
|
-
<style lang="scss">
|
93
|
-
.text-area {
|
94
|
-
width: 100%;
|
95
|
-
|
96
|
-
resize: none; // allow vertical resize
|
97
|
-
background-color: transparent;
|
98
|
-
&:focus {
|
99
|
-
border: 0;
|
100
|
-
}
|
101
|
-
}
|
102
|
-
</style>
|