@ozdao/prometheus-framework 0.2.130 → 0.2.132
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +0 -1
- package/dist/auth.server.mjs +0 -1
- package/dist/community.server.js +172 -31
- package/dist/community.server.mjs +172 -31
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +38 -4
- package/dist/files.server.mjs +38 -4
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/main-CI9l9xMs.js +92 -0
- package/dist/main-DPg58GOU.mjs +14509 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +4 -3
- package/dist/organizations.server.mjs +4 -3
- package/dist/products.server.js +2 -1
- package/dist/products.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -0
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +22 -23
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +13 -13
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +95 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +26 -0
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/Calendar.vue2.js +32 -33
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Draggable/Draggable.vue.js +75 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +57 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +93 -87
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -0
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +32 -29
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +22 -23
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/FieldTags.vue.js +39 -39
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/tag-input.vue2.js +5 -5
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -0
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +46 -47
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +13 -0
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.js +22 -23
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -0
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +14 -15
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +9 -10
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +37 -34
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +32 -32
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +20 -20
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +11 -11
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +12 -14
- 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 +55 -72
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +57 -29
- 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 +87 -77
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +58 -28
- 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 +3 -3
- 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 +71 -80
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/community/components/sections/Comment.vue.js +104 -0
- 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 +99 -54
- 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 +29 -30
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +45 -34
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +31 -29
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +32 -27
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +67 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Video.vue.js +16 -16
- 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 +119 -112
- 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 +6 -6
- 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/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +21 -21
- 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 +30 -30
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +33 -22
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
- 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 +18 -18
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +3 -9
- 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 +3 -3
- 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 +3 -3
- 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 +9 -9
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- 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/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +39 -38
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.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 +3 -3
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +113 -86
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +37 -36
- 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 +10 -10
- 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 +2 -2
- 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 +3 -3
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +18 -18
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- 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/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +32 -37
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +14 -14
- 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 +33 -33
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +53 -35
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardBalanceReplenished.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CardDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CashDeposite.vue.js +26 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/components/blocks/CryptoDeposite.vue.js +42 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/wallet/localization/Wallet.json.js +26 -0
- 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 +158 -81
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +14 -14
- package/dist/queryProcessor-DQSFR9YA.mjs +179 -0
- package/dist/queryProcessor-iewDZq_f.js +178 -0
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +80 -27
- package/dist/wallet.server.mjs +80 -27
- package/dist/web-DZUec7pP.js +1 -0
- package/dist/web-krQQeSb6.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +1 -1
- package/src/components/Chips/Chips.vue +1 -1
- package/src/components/Completion/Completion.vue +1 -4
- package/src/components/DatePicker/Calendar.vue +1 -1
- package/src/components/Draggable/Draggable.vue +113 -0
- package/src/components/Dropdown/Dropdown.vue +1 -1
- package/src/components/Feed/Feed.vue +18 -12
- package/src/components/FieldBig/FieldBig.vue +11 -1
- package/src/components/FieldPhone/FieldPhone.vue +1 -1
- package/src/components/FieldTags/FieldTags.vue +2 -1
- package/src/components/FieldTags/tag-input.vue +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
- package/src/components/Shader/Shader.vue +2 -2
- package/src/components/Slider/Slider.vue +1 -5
- package/src/components/Spoiler/Spoiler.vue +1 -1
- package/src/components/Text/Text.vue +1 -4
- package/src/components/Tooltip/Tooltip.vue +1 -1
- package/src/components/Upload/Upload.vue +5 -3
- package/src/modules/auth/controllers/auth.controller.js +0 -2
- package/src/modules/auth/store/auth.js +2 -2
- package/src/modules/community/DOCUMENTATION.MD +4 -0
- package/src/modules/community/community.client.js +0 -2
- package/src/modules/community/components/blocks/CardBlogpost.vue +6 -2
- package/src/modules/community/components/blocks/FooterBlogpost.vue +21 -5
- package/src/modules/community/components/layouts/Community.vue +15 -11
- package/src/modules/community/components/pages/Blog.vue +25 -32
- package/src/modules/community/components/pages/CreateBlogPost.vue +8 -15
- package/src/modules/community/components/sections/Comment.vue +123 -0
- package/src/modules/community/components/sections/Comments.vue +90 -19
- package/src/modules/community/components/sections/HotPosts.vue +3 -6
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/controllers/comments.controller.aggr.js +280 -0
- package/src/modules/community/controllers/comments.controller.js +187 -38
- package/src/modules/community/controllers/comments.controller.populate.js +180 -0
- package/src/modules/community/models/comment.model.js +15 -0
- package/src/modules/community/store/blogposts.js +20 -2
- package/src/modules/constructor/components/elements/Audio.vue +28 -40
- package/src/modules/constructor/components/elements/ImageUpload.vue +12 -7
- package/src/modules/constructor/components/elements/Video.vue +10 -18
- package/src/modules/constructor/components/sections/Constructor.vue +54 -47
- package/src/modules/files/controllers/files.controller.js +2 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +32 -4
- package/src/modules/files/routes/files.routes.js +8 -0
- package/src/modules/globals/components/blocks/BlockFilter.vue +17 -7
- package/src/modules/globals/components/partials/Header.vue +12 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +1 -0
- package/src/modules/icons/logos/Logotype.vue +8 -6
- package/src/modules/icons/logos/LogotypeNunito.vue +12 -0
- package/src/modules/marketplace/components/layouts/Marketplace.vue +29 -27
- package/src/modules/marketplace/store/marketplace.js +2 -8
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +33 -5
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +7 -4
- package/src/modules/organizations/components/sections/DetailsTab.vue +10 -10
- package/src/modules/organizations/components/sections/Publics.vue +2 -2
- package/src/modules/organizations/controllers/memberships.controller.js +2 -3
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/store/memberships.js +4 -1
- package/src/modules/products/components/blocks/CardProduct.vue +1 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +11 -8
- package/src/modules/products/models/product.model.js +2 -1
- package/src/modules/spots/components/layouts/Spots.vue +0 -3
- package/src/modules/spots/components/pages/Map.vue +13 -3
- package/src/modules/users/components/blocks/CardUser.vue +2 -2
- package/src/modules/users/components/pages/ProfileBlogposts.vue +45 -28
- package/src/modules/wallet/components/blocks/CardBalanceReplenished.vue +40 -0
- package/src/modules/wallet/components/blocks/CardDeposite.vue +55 -0
- package/src/modules/wallet/components/blocks/CashDeposite.vue +28 -0
- package/src/modules/wallet/components/blocks/CryptoDeposite.vue +55 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +181 -0
- package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -113
- package/src/modules/wallet/controllers/factories/rewards.factory.population.js +213 -0
- package/src/modules/wallet/localization/Wallet.json +22 -0
- package/src/modules/wallet/views/components/pages/Wallet.vue +153 -53
- package/src/styles/base/all.scss +16 -26
- package/src/styles/config.scss +70 -34
- package/src/styles/typography.scss +5 -5
- package/src/modules/community/components/sections/Feed.vue +0 -148
- package/src/modules/middlewares/server/accessors/AccessController.js +0 -33
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +0 -101
@@ -1,105 +1,182 @@
|
|
1
|
-
import { onMounted as
|
2
|
-
import { state as
|
3
|
-
import
|
1
|
+
import { onMounted as g, ref as f, openBlock as n, createElementBlock as a, Fragment as h, createElementVNode as t, unref as s, toDisplayString as r, createCommentVNode as i, renderList as k, createVNode as x, withCtx as v, createBlock as p } from "vue";
|
2
|
+
import { state as l, actions as d } from "../../store/wallet.store.js";
|
3
|
+
import y from "web3";
|
4
4
|
import "vue-router";
|
5
|
-
import "vue
|
6
|
-
/* empty css */
|
7
|
-
/* empty css */
|
8
|
-
/* empty css */
|
5
|
+
import C from "../../../../../components/Popup/Popup.vue.js";
|
9
6
|
/* empty css */
|
7
|
+
/* empty css */
|
8
|
+
/* empty css */
|
10
9
|
import "../../../../reports/store/reports.js";
|
11
10
|
/* empty css */
|
12
|
-
/* empty css
|
11
|
+
/* empty css */
|
13
12
|
import "../../../../auth/store/auth.js";
|
14
13
|
import "../../../../organizations/store/memberships.js";
|
15
14
|
import "../../../../community/store/reactions.js";
|
16
|
-
/* empty css
|
17
|
-
|
15
|
+
/* empty css */
|
16
|
+
import W from "../../../components/blocks/CashDeposite.vue.js";
|
17
|
+
import M from "../../../components/blocks/CardDeposite.vue.js";
|
18
|
+
import $ from "../../../components/blocks/CryptoDeposite.vue.js";
|
19
|
+
import R from "../../../components/blocks/CardBalanceReplenished.vue.js";
|
20
|
+
const P = { class: "pd-thin" }, B = { class: "bg-black t-white mn-b-thin radius-big pd-big" }, S = /* @__PURE__ */ t("h1", { class: "mn-b-medium" }, "Your Wallet", -1), D = /* @__PURE__ */ t("p", { class: "mn-b-semi t-transp p-big" }, " Earn Weeder Tokens by purchasing our weed or contributing to the community. ", -1), T = {
|
18
21
|
key: 0,
|
19
|
-
class: "gap-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"
|
20
|
-
},
|
22
|
+
class: "gap-thin mn-b-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"
|
23
|
+
}, G = { class: "flex-v-center flex-nowrap flex mn-r-auto" }, E = {
|
24
|
+
key: 1,
|
25
|
+
class: "w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"
|
26
|
+
}, A = /* @__PURE__ */ t("p", { class: "t-transp t-medium mn-b-thin" }, "You own:", -1), N = { class: "h1 mn-b-small" }, O = /* @__PURE__ */ t("p", { class: "t-white p-big t-medium mn-b-semi" }, "of all shares", -1), V = { class: "flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra" }, Y = {
|
27
|
+
key: 0,
|
28
|
+
class: "t-transp t-medium"
|
29
|
+
}, L = /* @__PURE__ */ t("span", { class: "uppercase p-small t-medium t-transp" }, "Connected Metamask", -1), F = /* @__PURE__ */ t("br", null, null, -1), H = {
|
21
30
|
key: 0,
|
22
31
|
class: "mn-b-semi cols-2 gap-thin"
|
23
|
-
},
|
32
|
+
}, j = /* @__PURE__ */ t("div", { class: "w-100 pd-medium radius-medium t-center bg-light" }, [
|
24
33
|
/* @__PURE__ */ t("h3", { class: "mn-b-small" }, "Make first order and start earning Weeder Token"),
|
25
34
|
/* @__PURE__ */ t("button", { class: "mn-l-auto mn-r-auto bg-main button" }, "Explore marketplace")
|
26
|
-
], -1),
|
35
|
+
], -1), q = { class: "w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-light" }, z = {
|
27
36
|
key: 0,
|
28
37
|
class: "mn-b-small"
|
29
|
-
},
|
38
|
+
}, I = {
|
30
39
|
key: 1,
|
31
|
-
class: "
|
32
|
-
},
|
33
|
-
key: 0,
|
34
|
-
class: "t-transp t-medium"
|
35
|
-
}, L = /* @__PURE__ */ t("span", { class: "uppercase p-small t-medium t-transp" }, "Connected Metamask", -1), N = /* @__PURE__ */ t("br", null, null, -1), V = {
|
40
|
+
class: "mn-b-small"
|
41
|
+
}, J = { class: "cols-3 gap-thin" }, K = { class: "radius-medium bg-light" }, Q = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, U = { class: "t-semi mn-r-auto" }, X = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, Z = { class: "pd-medium" }, tt = { class: "t-regular mn-b-thin" }, et = {
|
36
42
|
key: 2,
|
37
43
|
class: "mn-b-small"
|
38
|
-
},
|
44
|
+
}, st = { class: "cols-3 gap-thin" }, nt = { class: "radius-medium bg-grey" }, ot = { class: "flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium" }, lt = { class: "t-semi mn-r-auto" }, at = { class: "pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small" }, it = { class: "pd-medium" }, rt = { class: "t-regular mn-b-thin" }, ct = { key: 0 }, dt = /* @__PURE__ */ t("h2", { class: "mn-b-small t-center t-bold" }, "Choose the way of deposit", -1), St = {
|
39
45
|
__name: "Wallet",
|
40
|
-
setup(
|
41
|
-
|
42
|
-
|
43
|
-
}),
|
44
|
-
|
45
|
-
})
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
]),
|
46
|
+
setup(mt) {
|
47
|
+
window.ethereum.on("accountsChanged", (u) => {
|
48
|
+
u.length < 1 && (l.account = null);
|
49
|
+
}), l.web3 = new y(window.ethereum || "http://localhost:8080"), g(() => {
|
50
|
+
d.listRewards(), d.tryReconnectWallet();
|
51
|
+
});
|
52
|
+
const b = f(!1), m = f(0);
|
53
|
+
function c(u) {
|
54
|
+
m.value = u;
|
55
|
+
}
|
56
|
+
function w() {
|
57
|
+
b.value = !0;
|
58
|
+
}
|
59
|
+
function _() {
|
60
|
+
b.value = !1, m.value = 0;
|
61
|
+
}
|
62
|
+
return (u, o) => (n(), a(h, null, [
|
63
|
+
t("section", P, [
|
64
|
+
t("section", B, [
|
65
|
+
S,
|
66
|
+
D,
|
67
|
+
s(l).account ? (n(), a("div", T, [
|
68
|
+
t("div", G, [
|
69
|
+
t("h2", null, r(s(l).tokenBalance) + " WDT", 1)
|
70
|
+
]),
|
71
|
+
t("button", {
|
72
|
+
onClick: w,
|
73
|
+
class: "w-max bg-main t-medium button"
|
74
|
+
}, "Get More"),
|
75
|
+
t("button", {
|
76
|
+
class: "w-max bg-white t-black t-medium button",
|
77
|
+
onClick: o[0] || (o[0] = (...e) => s(d).collectRewards && s(d).collectRewards(...e))
|
78
|
+
}, "Withdraw")
|
79
|
+
])) : i("", !0),
|
80
|
+
s(l).account ? (n(), a("div", E, [
|
81
|
+
A,
|
82
|
+
t("p", N, r(s(l).share) + "%", 1),
|
83
|
+
O,
|
84
|
+
t("div", V, [
|
85
|
+
s(l).account ? (n(), a("p", Y, [
|
86
|
+
L,
|
87
|
+
F,
|
88
|
+
t("span", null, r(s(l).account), 1)
|
89
|
+
])) : i("", !0),
|
90
|
+
s(l).account ? (n(), a("button", {
|
91
|
+
key: 1,
|
92
|
+
onClick: o[1] || (o[1] = (...e) => s(d).disconnectWallet && s(d).disconnectWallet(...e)),
|
93
|
+
class: "mn-l-auto bg-red button"
|
94
|
+
}, " Disconnect Wallet ")) : i("", !0)
|
95
|
+
])
|
96
|
+
])) : i("", !0)
|
97
|
+
]),
|
98
|
+
s(l).account ? i("", !0) : (n(), a("div", H, [
|
99
|
+
j,
|
95
100
|
t("div", q, [
|
96
|
-
|
101
|
+
s(l).account ? i("", !0) : (n(), a("h3", z, " Connect Metamask to withdrawal your earnings. ")),
|
102
|
+
s(l).account ? i("", !0) : (n(), a("button", {
|
103
|
+
key: 1,
|
104
|
+
onClick: o[2] || (o[2] = (...e) => s(d).connectWallet && s(d).connectWallet(...e)),
|
105
|
+
class: "br-solid br-2px br-black-transp-10 t-black button"
|
106
|
+
}, " Connect Wallet "))
|
97
107
|
])
|
98
|
-
]))
|
99
|
-
|
100
|
-
|
108
|
+
])),
|
109
|
+
s(l).rewards.length > 0 ? (n(), a("h2", I, "Latest Rewards ")) : i("", !0),
|
110
|
+
t("section", J, [
|
111
|
+
(n(!0), a(h, null, k(s(l).rewards, (e) => (n(), a("div", K, [
|
112
|
+
t("div", Q, [
|
113
|
+
t("p", U, r(e.amount) + " WDT", 1),
|
114
|
+
t("span", X, r(e.type === "blogpost" ? "Community Reward" : e.type), 1)
|
115
|
+
]),
|
116
|
+
t("div", Z, [
|
117
|
+
t("h4", tt, r(e.name), 1)
|
118
|
+
])
|
119
|
+
]))), 256))
|
120
|
+
]),
|
121
|
+
s(l).rewards.length > 0 ? (n(), a("h2", et, "Activity")) : i("", !0),
|
122
|
+
t("section", st, [
|
123
|
+
(n(!0), a(h, null, k(s(l).rewards, (e) => (n(), a("div", nt, [
|
124
|
+
t("div", ot, [
|
125
|
+
t("p", lt, r(e.amount) + " WDT", 1),
|
126
|
+
t("span", at, r(e.type === "blogpost" ? "Community Reward" : e.type), 1)
|
127
|
+
]),
|
128
|
+
t("div", it, [
|
129
|
+
t("h4", rt, r(e.name), 1)
|
130
|
+
])
|
131
|
+
]))), 256))
|
132
|
+
])
|
133
|
+
]),
|
134
|
+
x(C, {
|
135
|
+
title: "Добавить участника",
|
136
|
+
onClosePopup: _,
|
137
|
+
isPopupOpen: b.value,
|
138
|
+
class: "w-m-33r t-left pd-big bg-white radius-big"
|
139
|
+
}, {
|
140
|
+
default: v(() => [
|
141
|
+
m.value === 0 ? (n(), a("div", ct, [
|
142
|
+
dt,
|
143
|
+
t("button", {
|
144
|
+
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
145
|
+
onClick: o[3] || (o[3] = (e) => c(1))
|
146
|
+
}, " CASH "),
|
147
|
+
t("button", {
|
148
|
+
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
149
|
+
onClick: o[4] || (o[4] = (e) => c(2))
|
150
|
+
}, " CARD "),
|
151
|
+
t("button", {
|
152
|
+
class: "w-100 bg-white t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10 mn-t-small",
|
153
|
+
onClick: o[5] || (o[5] = (e) => c(4))
|
154
|
+
}, " CRYPTO ")
|
155
|
+
])) : i("", !0),
|
156
|
+
m.value === 1 ? (n(), p(W, {
|
157
|
+
key: 1,
|
158
|
+
onBackSelection: o[6] || (o[6] = (e) => c(0))
|
159
|
+
})) : i("", !0),
|
160
|
+
m.value === 2 ? (n(), p(M, {
|
161
|
+
key: 2,
|
162
|
+
onBackSelection: o[7] || (o[7] = (e) => c(0)),
|
163
|
+
onSwitchMenu: c
|
164
|
+
})) : i("", !0),
|
165
|
+
m.value === 3 ? (n(), p(R, {
|
166
|
+
key: 3,
|
167
|
+
onClose: _
|
168
|
+
})) : i("", !0),
|
169
|
+
m.value === 4 ? (n(), p($, {
|
170
|
+
key: 4,
|
171
|
+
onBackSelection: o[8] || (o[8] = (e) => c(0)),
|
172
|
+
onSwitchMenu: c
|
173
|
+
})) : i("", !0)
|
174
|
+
]),
|
175
|
+
_: 1
|
176
|
+
}, 8, ["isPopupOpen"])
|
177
|
+
], 64));
|
101
178
|
}
|
102
179
|
};
|
103
180
|
export {
|
104
|
-
|
181
|
+
St as default
|
105
182
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./main-CI9l9xMs.js");exports.Address=a._sfc_main;exports.Breadcrumbs=a._sfc_main$15;exports.Button=a._sfc_main$1;exports.Checkbox=a._sfc_main$2;exports.Chips=a._sfc_main$16;exports.Countdown=a._sfc_main$17;exports.DatePicker=a._sfc_main$18;exports.Dropdown=a._sfc_main$3;exports.EmptyState=a._sfc_main$19;exports.Error=a._sfc_main$4;exports.Feed=a._sfc_main$20;exports.Field=a.Field;exports.FieldBig=a._sfc_main$21;exports.FieldPhone=a._sfc_main$5;exports.FieldTags=a.FieldTags;exports.Loader=a.Loader;exports.LocationMarker=a._sfc_main$6;exports.Map=a.Map;exports.Marquee=a._sfc_main$26;exports.Popup=a._sfc_main$7;exports.Radio=a._sfc_main$8;exports.Select=a.Select;exports.SelectMulti=a.SelectMulti;exports.Shader=a._sfc_main$22;exports.Sidebar=a._sfc_main$23;exports.Slider=a._sfc_main$24;exports.Spoiler=a._sfc_main$9;exports.Status=a._sfc_main$25;exports.Tab=a._sfc_main$10;exports.Text=a._sfc_main$12;exports.Tooltip=a._sfc_main$11;exports.Upload=a.Upload;exports.UploadImage=a._sfc_main$13;exports.UploadImageMultiple=a._sfc_main$14;exports.default=a.main;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { _ as e, q as o, a as d, b as r, r as t, s as l, t as i, c as p, u, d as S, v as c, F as n, w as m, e as F, x as M, L as b, f as g, M as h, C as k, g as x, h as B, S as C, i as T, y as U, z as f, A as w, j as L, B as P, k as q, n as y, l as A, U as D, o as E, p as I, m as j } from "./main-DPg58GOU.mjs";
|
2
2
|
export {
|
3
3
|
e as Address,
|
4
4
|
o as Breadcrumbs,
|
@@ -18,20 +18,20 @@ export {
|
|
18
18
|
b as Loader,
|
19
19
|
g as LocationMarker,
|
20
20
|
h as Map,
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
k as Marquee,
|
22
|
+
x as Popup,
|
23
|
+
B as Radio,
|
24
24
|
C as Select,
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
25
|
+
T as SelectMulti,
|
26
|
+
U as Shader,
|
27
|
+
f as Sidebar,
|
28
|
+
w as Slider,
|
29
|
+
L as Spoiler,
|
30
|
+
P as Status,
|
31
|
+
q as Tab,
|
32
|
+
y as Text,
|
33
|
+
A as Tooltip,
|
34
|
+
D as Upload,
|
35
35
|
E as UploadImage,
|
36
36
|
I as UploadImageMultiple,
|
37
37
|
j as default
|
@@ -0,0 +1,179 @@
|
|
1
|
+
import require$$0 from "mongoose";
|
2
|
+
const ObjectId = require$$0.Types.ObjectId;
|
3
|
+
function getBasicOptions(query) {
|
4
|
+
console.log(query);
|
5
|
+
const { _id, url, status, type, owner, creator } = query;
|
6
|
+
const conditions = [];
|
7
|
+
if (_id) {
|
8
|
+
conditions.push({ _id: new ObjectId(_id) });
|
9
|
+
}
|
10
|
+
if (url) {
|
11
|
+
conditions.push({ url });
|
12
|
+
}
|
13
|
+
if (status) {
|
14
|
+
conditions.push({ status });
|
15
|
+
}
|
16
|
+
if (type) {
|
17
|
+
conditions.push({ type });
|
18
|
+
}
|
19
|
+
if (owner) {
|
20
|
+
conditions.push({ "owner.target": new ObjectId(owner) });
|
21
|
+
}
|
22
|
+
if (creator) {
|
23
|
+
conditions.push({ "creator.target": new ObjectId(creator) });
|
24
|
+
}
|
25
|
+
if (conditions.length > 0) {
|
26
|
+
return [{ $match: { $and: conditions } }];
|
27
|
+
} else {
|
28
|
+
return [];
|
29
|
+
}
|
30
|
+
}
|
31
|
+
function getFilterDate(start, end) {
|
32
|
+
let filter = {};
|
33
|
+
if (start !== null) {
|
34
|
+
filter.$gte = new Date(start);
|
35
|
+
}
|
36
|
+
if (end !== null) {
|
37
|
+
filter.$lte = new Date(end);
|
38
|
+
}
|
39
|
+
if (start === "null" && end === "null") {
|
40
|
+
return [];
|
41
|
+
} else {
|
42
|
+
return [{ $match: { createdAt: filter } }];
|
43
|
+
}
|
44
|
+
}
|
45
|
+
function getTagsOptions(tags) {
|
46
|
+
if (tags) {
|
47
|
+
const tagsArray = Array.isArray(tags) ? tags : [tags];
|
48
|
+
return [{ $match: { tags: { $in: tagsArray } } }];
|
49
|
+
} else {
|
50
|
+
return [];
|
51
|
+
}
|
52
|
+
}
|
53
|
+
function getSortingOptions(param = "createdAt", order = "desc") {
|
54
|
+
let sort = {
|
55
|
+
[param]: order === "desc" ? -1 : 1,
|
56
|
+
"_id": 1
|
57
|
+
};
|
58
|
+
return [{ $sort: sort }];
|
59
|
+
}
|
60
|
+
function getPaginationOptions(skip, limit) {
|
61
|
+
let pagination = {
|
62
|
+
skip: parseInt(skip) || 0,
|
63
|
+
limit: parseInt(limit) || 20
|
64
|
+
};
|
65
|
+
return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
|
66
|
+
}
|
67
|
+
function getCreatorUserLookupStage() {
|
68
|
+
return {
|
69
|
+
$lookup: {
|
70
|
+
from: "users",
|
71
|
+
localField: "creator.target",
|
72
|
+
foreignField: "_id",
|
73
|
+
as: "creatorUser"
|
74
|
+
}
|
75
|
+
};
|
76
|
+
}
|
77
|
+
function getCreatorOrganizationLookupStage() {
|
78
|
+
return {
|
79
|
+
$lookup: {
|
80
|
+
from: "organizations",
|
81
|
+
localField: "creator.target",
|
82
|
+
foreignField: "_id",
|
83
|
+
as: "creatorOrganization"
|
84
|
+
}
|
85
|
+
};
|
86
|
+
}
|
87
|
+
function getCreatorCustomerLookupStage() {
|
88
|
+
return {
|
89
|
+
$lookup: {
|
90
|
+
from: "customers",
|
91
|
+
localField: "creator.target",
|
92
|
+
foreignField: "_id",
|
93
|
+
as: "creatorCustomer"
|
94
|
+
}
|
95
|
+
};
|
96
|
+
}
|
97
|
+
function getOwnerUserLookupStage() {
|
98
|
+
return {
|
99
|
+
$lookup: {
|
100
|
+
from: "users",
|
101
|
+
localField: "owner.target",
|
102
|
+
foreignField: "_id",
|
103
|
+
as: "ownerUser"
|
104
|
+
}
|
105
|
+
};
|
106
|
+
}
|
107
|
+
function getOwnerOrganizationLookupStage() {
|
108
|
+
return {
|
109
|
+
$lookup: {
|
110
|
+
from: "organizations",
|
111
|
+
localField: "owner.target",
|
112
|
+
foreignField: "_id",
|
113
|
+
as: "ownerOrganization"
|
114
|
+
}
|
115
|
+
};
|
116
|
+
}
|
117
|
+
function getAddFieldsCreatorOwnerStage() {
|
118
|
+
return {
|
119
|
+
$addFields: {
|
120
|
+
"creator.target": {
|
121
|
+
$switch: {
|
122
|
+
branches: [
|
123
|
+
{
|
124
|
+
case: { $eq: [{ $toLower: "$creator.type" }, "user"] },
|
125
|
+
then: { $arrayElemAt: ["$creatorUser", 0] }
|
126
|
+
},
|
127
|
+
{
|
128
|
+
case: { $eq: [{ $toLower: "$creator.type" }, "organization"] },
|
129
|
+
then: { $arrayElemAt: ["$creatorOrganization", 0] }
|
130
|
+
},
|
131
|
+
{
|
132
|
+
case: { $eq: [{ $toLower: "$creator.type" }, "customer"] },
|
133
|
+
then: { $arrayElemAt: ["$creatorCustomer", 0] }
|
134
|
+
}
|
135
|
+
],
|
136
|
+
default: "Unknown type"
|
137
|
+
// или любое другое значение по умолчанию, которое вы хотите использовать
|
138
|
+
}
|
139
|
+
},
|
140
|
+
"owner.target": {
|
141
|
+
$cond: [
|
142
|
+
{ $eq: ["$owner.type", "user"] },
|
143
|
+
{ $arrayElemAt: ["$ownerUser", 0] },
|
144
|
+
{ $arrayElemAt: ["$ownerOrganization", 0] }
|
145
|
+
]
|
146
|
+
}
|
147
|
+
}
|
148
|
+
};
|
149
|
+
}
|
150
|
+
function removeTempPropeties() {
|
151
|
+
return {
|
152
|
+
$project: {
|
153
|
+
creatorOrganization: 0,
|
154
|
+
creatorUser: 0,
|
155
|
+
ownerOrganization: 0,
|
156
|
+
ownerUser: 0,
|
157
|
+
creatorCustomer: 0,
|
158
|
+
ownerCustomer: 0
|
159
|
+
}
|
160
|
+
};
|
161
|
+
}
|
162
|
+
var queryProcessor = {
|
163
|
+
getBasicOptions,
|
164
|
+
getSortingOptions,
|
165
|
+
getPaginationOptions,
|
166
|
+
getTagsOptions,
|
167
|
+
getFilterDate,
|
168
|
+
// Creator and Owner
|
169
|
+
getCreatorUserLookupStage,
|
170
|
+
getCreatorOrganizationLookupStage,
|
171
|
+
getCreatorCustomerLookupStage,
|
172
|
+
getOwnerUserLookupStage,
|
173
|
+
getOwnerOrganizationLookupStage,
|
174
|
+
getAddFieldsCreatorOwnerStage,
|
175
|
+
removeTempPropeties
|
176
|
+
};
|
177
|
+
export {
|
178
|
+
queryProcessor as q
|
179
|
+
};
|