@ozdao/prometheus-framework 0.2.127 → 0.2.129
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/dist/auth.server.js +28 -37
- package/dist/auth.server.mjs +28 -37
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +6 -2
- package/dist/gallery.server.mjs +6 -2
- package/dist/{index-BCCiEK_u.js → index-BshfsiQG.js} +8 -4
- package/dist/{index-B6a1mPgp.mjs → index-DKtnWDNC.mjs} +8 -4
- package/dist/{main-CmL_j3wv.mjs → main-DvdaURTh.mjs} +3261 -3154
- package/dist/main-hLtpe4Hr.js +92 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/zod/lib/index.cjs +1 -1
- package/dist/node_modules/zod/lib/index.js +1162 -1033
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +1 -89
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/BottomSheet/BottomSheet.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/BottomSheet/BottomSheet.vue.js +73 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +23 -22
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +1 -27
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +27 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -58
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +58 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +144 -112
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -127
- package/dist/prometheus-framework/src/components/Menu/MenuItem.vue.cjs +1 -0
- package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/MenuItem.vue.js +1 -1
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue.js +6 -6
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +77 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -77
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +7 -6
- 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 +114 -77
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +7 -22
- 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 +62 -70
- 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 +2 -2
- 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 +2 -2
- 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 +17 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- 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 +0 -66
- 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 +1 -1
- 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 +3 -3
- 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 +1 -1
- 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 +5 -5
- 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 +9 -9
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +18 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +46 -0
- 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 +20 -16
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +10 -10
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +27 -4
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +14 -12
- 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/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +111 -93
- 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/AskToLogin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.js +13 -14
- 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 +1 -1
- 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 +20 -22
- 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/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +5 -4
- 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 +4 -4
- 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 +4 -4
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +154 -0
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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/backoffice.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +27 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +9 -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 +1 -1
- 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 +26 -27
- 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 +1 -1
- 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/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +22 -23
- 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 +1 -1
- 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 +30 -29
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +72 -51
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +51 -53
- 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 +22 -22
- 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/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +62 -48
- 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 +43 -44
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +24 -25
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/{web-Bk_OtXgv.js → web-CVIepGUM.js} +1 -1
- package/dist/{web-BHzpMOmk.mjs → web-Dt2JR41o.mjs} +1 -1
- package/package.json +3 -2
- package/src/{modules/mobile/components → components}/BottomSheet/BottomSheet.vue +24 -21
- package/src/components/Button/Button.vue +20 -3
- package/src/components/Feed/Feed.vue +28 -3
- package/src/components/FieldBig/FieldBig.vue +2 -2
- package/src/components/Sidebar/Sidebar.vue +13 -5
- package/src/components/index.js +0 -1
- package/src/main.js +0 -4
- package/src/modules/auth/controllers/auth.controller.js +32 -48
- package/src/modules/auth/router/auth.js +1 -4
- package/src/modules/auth/store/auth.js +28 -24
- package/src/modules/backoffice/components/pages/Dashboard.vue +29 -56
- package/src/modules/backoffice/router/backoffice.js +4 -15
- package/src/modules/community/components/blocks/CardBlogpost.vue +28 -26
- package/src/modules/community/components/layouts/Community.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/gallery/components/pages/Gallery.vue +1 -2
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
- package/src/modules/gallery/router/gallery.backoffice.router.js +14 -0
- package/src/modules/globals/components/blocks/BlockFilter.vue +44 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +5 -3
- package/src/modules/globals/components/layouts/Client.vue +99 -43
- package/src/modules/globals/components/pages/401.vue +5 -0
- package/src/modules/globals/components/pages/404.vue +5 -0
- package/src/modules/globals/components/partials/Footer.vue +17 -5
- package/src/modules/globals/components/partials/Header.vue +37 -18
- package/src/modules/globals/components/partials/Navigation.vue +7 -2
- package/src/modules/landing/components/sections/MobileApp.vue +2 -2
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/landing/router/landing.js +2 -12
- package/src/modules/legal/components/pages/Legal.vue +2 -2
- package/src/modules/marketplace/components/layouts/Marketplace.vue +30 -13
- package/src/modules/marketplace/components/pages/Catalog.vue +2 -1
- package/src/modules/marketplace/router/marketplace.js +12 -10
- package/src/modules/marketplace/store/marketplace.js +25 -1
- package/src/modules/middlewares/client/auth.validation.js +5 -2
- package/src/modules/middlewares/server/authJwt.js +12 -6
- package/src/modules/middlewares/server/verifyAccesses.js +7 -3
- package/src/modules/orders/components/pages/OrderCreate.vue +34 -22
- package/src/modules/orders/components/sections/AskToLogin.vue +8 -7
- package/src/modules/orders/components/sections/FormDelivery.vue +6 -6
- package/src/modules/orders/router/orders.router.js +6 -3
- package/src/modules/organizations/components/pages/Members.vue +2 -2
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +204 -0
- package/src/modules/organizations/router/backoffice.router.js +25 -0
- package/src/modules/organizations/router/organizations.js +3 -1
- package/src/modules/pages/router/pages.router.js +15 -0
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +11 -12
- package/src/modules/products/components/pages/Product.vue +7 -3
- package/src/modules/products/components/pages/ProductRecommmendation.vue +6 -5
- package/src/modules/products/components/sections/FilterProducts.vue +6 -6
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/components/sections/PopularProducts.vue +1 -3
- package/src/modules/products/components/sections/SectionProduct.vue +8 -8
- package/src/modules/spots/components/layouts/Spots.vue +33 -31
- package/src/modules/spots/components/pages/Map.vue +380 -353
- package/src/modules/spots/router/spots.js +3 -1
- package/src/modules/users/components/pages/Profile.vue +4 -4
- package/src/modules/users/components/pages/ProfileEdit.vue +4 -3
- package/src/modules/wallet/controllers/routes/payments.routes.js +0 -1
- package/src/styles/base/all.scss +4 -0
- package/src/styles/config.scss +2 -1
- package/src/styles/layout.scss +0 -1
- package/dist/credentials.schema-CDZCKfEI.mjs +0 -106
- package/dist/credentials.schema-CfhPcsuI.js +0 -105
- package/dist/index-CGIn4v5E.mjs +0 -217
- package/dist/index-CL9l0HRS.js +0 -216
- package/dist/main-8APITHuW.mjs +0 -14201
- package/dist/main-8N2Jmsuk.js +0 -91
- package/dist/main-BJvlNekm.mjs +0 -13631
- package/dist/main-BQisDfLk.js +0 -92
- package/dist/main-BV1Yv9Hy.js +0 -92
- package/dist/main-Ba3zK8PO.js +0 -92
- package/dist/main-Btlny-89.mjs +0 -14207
- package/dist/main-Bw0PvTs-.mjs +0 -13616
- package/dist/main-ByCtZbHD.mjs +0 -13752
- package/dist/main-CF35oB7q.js +0 -92
- package/dist/main-CX2ISR43.mjs +0 -13629
- package/dist/main-CXObXjv-.js +0 -92
- package/dist/main-CkeuHuCY.mjs +0 -13619
- package/dist/main-CnfcBov2.mjs +0 -13740
- package/dist/main-D0va05OD.js +0 -92
- package/dist/main-D50VqYhy.js +0 -91
- package/dist/main-D8gNZLSa.js +0 -92
- package/dist/main-DL3vRQCi.js +0 -92
- package/dist/main-DPsHxX0l.mjs +0 -13633
- package/dist/main-DTlUA63C.mjs +0 -13617
- package/dist/main-DfD5hLQo.mjs +0 -13633
- package/dist/main-Dh6Zfei9.js +0 -92
- package/dist/main-DmNP-t33.mjs +0 -13625
- package/dist/main-Ds3Z5x5d.mjs +0 -14206
- package/dist/main-DwyUYWFX.js +0 -92
- package/dist/main-VcxO-jAt.js +0 -92
- package/dist/main-cffh4bbv.js +0 -92
- package/dist/main-o_2eO2tP.mjs +0 -14208
- package/dist/main-pGo7JpSP.js +0 -92
- package/dist/metadata.schema-BLGSCSmy.mjs +0 -55
- package/dist/metadata.schema-Cu_mPkjE.js +0 -77
- package/dist/metadata.schema-DWR97jhW.js +0 -54
- package/dist/metadata.schema-cbFgazeK.mjs +0 -78
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +0 -1
- package/dist/node_modules/@noble/hashes/esm/sha512.js +0 -126
- package/dist/node_modules/vue-meta/dist/vue-meta.esm-browser.min.cjs +0 -7
- package/dist/node_modules/vue-meta/dist/vue-meta.esm-browser.min.js +0 -38
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/mergeArrays.cjs +0 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +0 -43
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +0 -373
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/utils.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/utils.js +0 -259
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.js +0 -62
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +0 -110
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.js +0 -27
- package/dist/prometheus-framework/src/modules/globals/components/sections/Title.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/Title.vue.js +0 -29
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +0 -65
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +0 -87
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +0 -51
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.js +0 -53
- package/dist/queryProcessor-BJdKh0Ow.mjs +0 -162
- package/dist/queryProcessor-BJoJAetd.mjs +0 -162
- package/dist/queryProcessor-BUDoM96e.js +0 -148
- package/dist/queryProcessor-Cl6sU582.mjs +0 -149
- package/dist/queryProcessor-DRMo_GWK.js +0 -161
- package/dist/queryProcessor-DWf9tsis.js +0 -161
- package/dist/web-B2xhKZNK.js +0 -1
- package/dist/web-B8tq3Fda.mjs +0 -54
- package/dist/web-BDaOF322.js +0 -1
- package/dist/web-BEJCRWop.mjs +0 -54
- package/dist/web-BNKN7kk3.mjs +0 -54
- package/dist/web-BX5um81l.js +0 -1
- package/dist/web-ByJkgGrt.js +0 -1
- package/dist/web-C0sFgeYh.mjs +0 -54
- package/dist/web-CQQEUA9l.js +0 -1
- package/dist/web-CQiHBOEN.mjs +0 -54
- package/dist/web-CXzcKdk4.mjs +0 -54
- package/dist/web-CciQvENI.js +0 -1
- package/dist/web-CkrMHYIU.js +0 -1
- package/dist/web-CtVocufd.js +0 -1
- package/dist/web-CvRd3N_J.mjs +0 -54
- package/dist/web-D0ugI6ra.js +0 -1
- package/dist/web-D2Em-p-C.mjs +0 -54
- package/dist/web-D9Cfcy5k.js +0 -1
- package/dist/web-DEysqj0n.js +0 -1
- package/dist/web-DNq1tHCE.mjs +0 -54
- package/dist/web-DTzbVshr.mjs +0 -54
- package/dist/web-Douq6xn6.js +0 -1
- package/dist/web-DtWmpLE-.mjs +0 -54
- package/dist/web-TGdVOTnw.js +0 -1
- package/dist/web-VFuzUsNl.mjs +0 -54
- package/dist/web-_W9a_nWD.mjs +0 -54
- package/dist/web-kg3KgbAF.js +0 -1
- package/dist/web-nVxTNRH4.mjs +0 -54
- package/src/components/Magnifier/Magnifier.vue +0 -89
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue.js +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue2.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue2.js +0 -0
- /package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue2.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue2.js +0 -0
- /package/src/{modules/mobile/components → components}/Menu/Menu.vue +0 -0
- /package/src/{modules/mobile/components → components}/Menu/MenuItem.vue +0 -0
- /package/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue +0 -0
- /package/src/modules/{mobile/components/BottomNavigation → globals/components/partials}/BottomNavigation.vue +0 -0
- /package/src/modules/{mobile/components/NavigationBar → globals/components/partials}/NavigationBar.vue +0 -0
- /package/src/modules/{mobile/components/Walkthrough → globals/components/sections}/Walkthrough.vue +0 -0
- /package/src/modules/{landing → pages}/components/pages/Page.vue +0 -0
- /package/src/modules/{backoffice/components/admin → pages/components/pages}/PageEdit.vue +0 -0
- /package/src/modules/{backoffice/components/admin → pages/components/pages}/Pages.vue +0 -0
@@ -1,162 +0,0 @@
|
|
1
|
-
import require$$0 from "mongoose";
|
2
|
-
const ObjectId = require$$0.Types.ObjectId;
|
3
|
-
function getBasicOptions(query) {
|
4
|
-
const { _id, url, status, type, owner, creator } = query;
|
5
|
-
const conditions = [];
|
6
|
-
if (_id) {
|
7
|
-
conditions.push({ _id: new ObjectId(_id) });
|
8
|
-
}
|
9
|
-
if (url) {
|
10
|
-
conditions.push({ url });
|
11
|
-
}
|
12
|
-
if (status) {
|
13
|
-
conditions.push({ status });
|
14
|
-
}
|
15
|
-
if (type) {
|
16
|
-
conditions.push({ type });
|
17
|
-
}
|
18
|
-
if (owner) {
|
19
|
-
conditions.push({ "owner.target": new ObjectId(owner) });
|
20
|
-
}
|
21
|
-
if (creator) {
|
22
|
-
conditions.push({ "creator.target": new ObjectId(creator) });
|
23
|
-
}
|
24
|
-
if (conditions.length > 0) {
|
25
|
-
return [{ $match: { $and: conditions } }];
|
26
|
-
} else {
|
27
|
-
return [];
|
28
|
-
}
|
29
|
-
}
|
30
|
-
function getTagsOptions(tags) {
|
31
|
-
if (tags && tags.length > 0) {
|
32
|
-
[{ $in: tags.split(",") }];
|
33
|
-
} else {
|
34
|
-
return [];
|
35
|
-
}
|
36
|
-
}
|
37
|
-
function getSortingOptions(param = "createdAt", order = "desc") {
|
38
|
-
let sort = {
|
39
|
-
[param]: order === "desc" ? -1 : 1,
|
40
|
-
"_id": 1
|
41
|
-
};
|
42
|
-
return [{ $sort: sort }];
|
43
|
-
}
|
44
|
-
function getPaginationOptions(skip, limit) {
|
45
|
-
let pagination = {
|
46
|
-
skip: parseInt(skip) || 0,
|
47
|
-
limit: parseInt(limit) || 20
|
48
|
-
};
|
49
|
-
return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
|
50
|
-
}
|
51
|
-
function getCreatorUserLookupStage() {
|
52
|
-
return {
|
53
|
-
$lookup: {
|
54
|
-
from: "users",
|
55
|
-
localField: "creator.target",
|
56
|
-
foreignField: "_id",
|
57
|
-
as: "creatorUser"
|
58
|
-
}
|
59
|
-
};
|
60
|
-
}
|
61
|
-
function getCreatorOrganizationLookupStage() {
|
62
|
-
return {
|
63
|
-
$lookup: {
|
64
|
-
from: "organizations",
|
65
|
-
localField: "creator.target",
|
66
|
-
foreignField: "_id",
|
67
|
-
as: "creatorOrganization"
|
68
|
-
}
|
69
|
-
};
|
70
|
-
}
|
71
|
-
function getCreatorCustomerLookupStage() {
|
72
|
-
return {
|
73
|
-
$lookup: {
|
74
|
-
from: "customers",
|
75
|
-
localField: "creator.target",
|
76
|
-
foreignField: "_id",
|
77
|
-
as: "creatorCustomer"
|
78
|
-
}
|
79
|
-
};
|
80
|
-
}
|
81
|
-
function getOwnerUserLookupStage() {
|
82
|
-
return {
|
83
|
-
$lookup: {
|
84
|
-
from: "users",
|
85
|
-
localField: "owner.target",
|
86
|
-
foreignField: "_id",
|
87
|
-
as: "ownerUser"
|
88
|
-
}
|
89
|
-
};
|
90
|
-
}
|
91
|
-
function getOwnerOrganizationLookupStage() {
|
92
|
-
return {
|
93
|
-
$lookup: {
|
94
|
-
from: "organizations",
|
95
|
-
localField: "owner.target",
|
96
|
-
foreignField: "_id",
|
97
|
-
as: "ownerOrganization"
|
98
|
-
}
|
99
|
-
};
|
100
|
-
}
|
101
|
-
function getAddFieldsCreatorOwnerStage() {
|
102
|
-
return {
|
103
|
-
$addFields: {
|
104
|
-
"creator.target": {
|
105
|
-
$switch: {
|
106
|
-
branches: [
|
107
|
-
{
|
108
|
-
case: { $eq: ["$creator.type", "user"] },
|
109
|
-
then: { $arrayElemAt: ["$creatorUser", 0] }
|
110
|
-
},
|
111
|
-
{
|
112
|
-
case: { $eq: ["$creator.type", "organization"] },
|
113
|
-
then: { $arrayElemAt: ["$creatorOrganization", 0] }
|
114
|
-
},
|
115
|
-
{
|
116
|
-
case: { $eq: ["$creator.type", "customer"] },
|
117
|
-
then: { $arrayElemAt: ["$creatorCustomer", 0] }
|
118
|
-
}
|
119
|
-
],
|
120
|
-
default: "Unknown type"
|
121
|
-
// или любое другое значение по умолчанию, которое вы хотите использовать
|
122
|
-
}
|
123
|
-
},
|
124
|
-
"owner.target": {
|
125
|
-
$cond: [
|
126
|
-
{ $eq: ["$owner.type", "user"] },
|
127
|
-
{ $arrayElemAt: ["$ownerUser", 0] },
|
128
|
-
{ $arrayElemAt: ["$ownerOrganization", 0] }
|
129
|
-
]
|
130
|
-
}
|
131
|
-
}
|
132
|
-
};
|
133
|
-
}
|
134
|
-
function removeTempPropeties() {
|
135
|
-
return {
|
136
|
-
$project: {
|
137
|
-
creatorOrganization: 0,
|
138
|
-
creatorUser: 0,
|
139
|
-
ownerOrganization: 0,
|
140
|
-
ownerUser: 0,
|
141
|
-
creatorCustomer: 0,
|
142
|
-
ownerCustomer: 0
|
143
|
-
}
|
144
|
-
};
|
145
|
-
}
|
146
|
-
var queryProcessor = {
|
147
|
-
getBasicOptions,
|
148
|
-
getSortingOptions,
|
149
|
-
getPaginationOptions,
|
150
|
-
getTagsOptions,
|
151
|
-
// Creator and Owner
|
152
|
-
getCreatorUserLookupStage,
|
153
|
-
getCreatorOrganizationLookupStage,
|
154
|
-
getCreatorCustomerLookupStage,
|
155
|
-
getOwnerUserLookupStage,
|
156
|
-
getOwnerOrganizationLookupStage,
|
157
|
-
getAddFieldsCreatorOwnerStage,
|
158
|
-
removeTempPropeties
|
159
|
-
};
|
160
|
-
export {
|
161
|
-
queryProcessor as q
|
162
|
-
};
|
@@ -1,162 +0,0 @@
|
|
1
|
-
import require$$0 from "mongoose";
|
2
|
-
const ObjectId = require$$0.Types.ObjectId;
|
3
|
-
function getBasicOptions(query) {
|
4
|
-
const { _id, url, status, type, owner, creator } = query;
|
5
|
-
const conditions = [];
|
6
|
-
if (_id) {
|
7
|
-
conditions.push({ _id: new ObjectId(_id) });
|
8
|
-
}
|
9
|
-
if (url) {
|
10
|
-
conditions.push({ url });
|
11
|
-
}
|
12
|
-
if (status) {
|
13
|
-
conditions.push({ status });
|
14
|
-
}
|
15
|
-
if (type) {
|
16
|
-
conditions.push({ type });
|
17
|
-
}
|
18
|
-
if (owner) {
|
19
|
-
conditions.push({ "owner.target": new ObjectId(owner) });
|
20
|
-
}
|
21
|
-
if (creator) {
|
22
|
-
conditions.push({ "creator.target": new ObjectId(creator) });
|
23
|
-
}
|
24
|
-
if (conditions.length > 0) {
|
25
|
-
return [{ $match: { $and: conditions } }];
|
26
|
-
} else {
|
27
|
-
return [];
|
28
|
-
}
|
29
|
-
}
|
30
|
-
function getTagsOptions(tags) {
|
31
|
-
if (tags && tags.length > 0) {
|
32
|
-
[{ $in: tags.split(",") }];
|
33
|
-
} else {
|
34
|
-
return [];
|
35
|
-
}
|
36
|
-
}
|
37
|
-
function getSortingOptions(param = "createdAt", order = "desc") {
|
38
|
-
let sort = {
|
39
|
-
[param]: order === "desc" ? -1 : 1,
|
40
|
-
"_id": 1
|
41
|
-
};
|
42
|
-
return [{ $sort: sort }];
|
43
|
-
}
|
44
|
-
function getPaginationOptions(skip, limit) {
|
45
|
-
let pagination = {
|
46
|
-
skip: parseInt(skip) || 0,
|
47
|
-
limit: parseInt(limit) || 20
|
48
|
-
};
|
49
|
-
return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
|
50
|
-
}
|
51
|
-
function getCreatorUserLookupStage() {
|
52
|
-
return {
|
53
|
-
$lookup: {
|
54
|
-
from: "users",
|
55
|
-
localField: "creator.target",
|
56
|
-
foreignField: "_id",
|
57
|
-
as: "creatorUser"
|
58
|
-
}
|
59
|
-
};
|
60
|
-
}
|
61
|
-
function getCreatorOrganizationLookupStage() {
|
62
|
-
return {
|
63
|
-
$lookup: {
|
64
|
-
from: "organizations",
|
65
|
-
localField: "creator.target",
|
66
|
-
foreignField: "_id",
|
67
|
-
as: "creatorOrganization"
|
68
|
-
}
|
69
|
-
};
|
70
|
-
}
|
71
|
-
function getCreatorCustomerLookupStage() {
|
72
|
-
return {
|
73
|
-
$lookup: {
|
74
|
-
from: "customers",
|
75
|
-
localField: "creator.target",
|
76
|
-
foreignField: "_id",
|
77
|
-
as: "creatorCustomer"
|
78
|
-
}
|
79
|
-
};
|
80
|
-
}
|
81
|
-
function getOwnerUserLookupStage() {
|
82
|
-
return {
|
83
|
-
$lookup: {
|
84
|
-
from: "users",
|
85
|
-
localField: "owner.target",
|
86
|
-
foreignField: "_id",
|
87
|
-
as: "ownerUser"
|
88
|
-
}
|
89
|
-
};
|
90
|
-
}
|
91
|
-
function getOwnerOrganizationLookupStage() {
|
92
|
-
return {
|
93
|
-
$lookup: {
|
94
|
-
from: "organizations",
|
95
|
-
localField: "owner.target",
|
96
|
-
foreignField: "_id",
|
97
|
-
as: "ownerOrganization"
|
98
|
-
}
|
99
|
-
};
|
100
|
-
}
|
101
|
-
function getAddFieldsCreatorOwnerStage() {
|
102
|
-
return {
|
103
|
-
$addFields: {
|
104
|
-
"creator.target": {
|
105
|
-
$switch: {
|
106
|
-
branches: [
|
107
|
-
{
|
108
|
-
case: { $eq: [{ $toLower: "$creator.type" }, "user"] },
|
109
|
-
then: { $arrayElemAt: ["$creatorUser", 0] }
|
110
|
-
},
|
111
|
-
{
|
112
|
-
case: { $eq: [{ $toLower: "$creator.type" }, "organization"] },
|
113
|
-
then: { $arrayElemAt: ["$creatorOrganization", 0] }
|
114
|
-
},
|
115
|
-
{
|
116
|
-
case: { $eq: [{ $toLower: "$creator.type" }, "customer"] },
|
117
|
-
then: { $arrayElemAt: ["$creatorCustomer", 0] }
|
118
|
-
}
|
119
|
-
],
|
120
|
-
default: "Unknown type"
|
121
|
-
// или любое другое значение по умолчанию, которое вы хотите использовать
|
122
|
-
}
|
123
|
-
},
|
124
|
-
"owner.target": {
|
125
|
-
$cond: [
|
126
|
-
{ $eq: ["$owner.type", "user"] },
|
127
|
-
{ $arrayElemAt: ["$ownerUser", 0] },
|
128
|
-
{ $arrayElemAt: ["$ownerOrganization", 0] }
|
129
|
-
]
|
130
|
-
}
|
131
|
-
}
|
132
|
-
};
|
133
|
-
}
|
134
|
-
function removeTempPropeties() {
|
135
|
-
return {
|
136
|
-
$project: {
|
137
|
-
creatorOrganization: 0,
|
138
|
-
creatorUser: 0,
|
139
|
-
ownerOrganization: 0,
|
140
|
-
ownerUser: 0,
|
141
|
-
creatorCustomer: 0,
|
142
|
-
ownerCustomer: 0
|
143
|
-
}
|
144
|
-
};
|
145
|
-
}
|
146
|
-
var queryProcessor = {
|
147
|
-
getBasicOptions,
|
148
|
-
getSortingOptions,
|
149
|
-
getPaginationOptions,
|
150
|
-
getTagsOptions,
|
151
|
-
// Creator and Owner
|
152
|
-
getCreatorUserLookupStage,
|
153
|
-
getCreatorOrganizationLookupStage,
|
154
|
-
getCreatorCustomerLookupStage,
|
155
|
-
getOwnerUserLookupStage,
|
156
|
-
getOwnerOrganizationLookupStage,
|
157
|
-
getAddFieldsCreatorOwnerStage,
|
158
|
-
removeTempPropeties
|
159
|
-
};
|
160
|
-
export {
|
161
|
-
queryProcessor as q
|
162
|
-
};
|
@@ -1,148 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
const require$$0 = require("mongoose");
|
3
|
-
const ObjectId = require$$0.Types.ObjectId;
|
4
|
-
function getBasicOptions(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 getTagsOptions(tags) {
|
32
|
-
if (tags && tags.length > 0) {
|
33
|
-
[{ $in: tags.split(",") }];
|
34
|
-
} else {
|
35
|
-
return [];
|
36
|
-
}
|
37
|
-
}
|
38
|
-
function getSortingOptions(param = "createdAt", order = "desc") {
|
39
|
-
let sort = {
|
40
|
-
[param]: order === "desc" ? -1 : 1,
|
41
|
-
"_id": 1
|
42
|
-
};
|
43
|
-
return [{ $sort: sort }];
|
44
|
-
}
|
45
|
-
function getPaginationOptions(skip, limit) {
|
46
|
-
let pagination = {
|
47
|
-
skip: parseInt(skip) || 0,
|
48
|
-
limit: parseInt(limit) || 20
|
49
|
-
};
|
50
|
-
return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
|
51
|
-
}
|
52
|
-
function getCreatorUserLookupStage() {
|
53
|
-
return {
|
54
|
-
$lookup: {
|
55
|
-
from: "users",
|
56
|
-
localField: "creator.target",
|
57
|
-
foreignField: "_id",
|
58
|
-
as: "creatorUser"
|
59
|
-
}
|
60
|
-
};
|
61
|
-
}
|
62
|
-
function getCreatorOrganizationLookupStage() {
|
63
|
-
return {
|
64
|
-
$lookup: {
|
65
|
-
from: "organizations",
|
66
|
-
localField: "creator.target",
|
67
|
-
foreignField: "_id",
|
68
|
-
as: "creatorOrganization"
|
69
|
-
}
|
70
|
-
};
|
71
|
-
}
|
72
|
-
function getCreatorCustomerLookupStage() {
|
73
|
-
return {
|
74
|
-
$lookup: {
|
75
|
-
from: "clients",
|
76
|
-
localField: "creator.target",
|
77
|
-
foreignField: "_id",
|
78
|
-
as: "creatorClient"
|
79
|
-
}
|
80
|
-
};
|
81
|
-
}
|
82
|
-
function getOwnerUserLookupStage() {
|
83
|
-
return {
|
84
|
-
$lookup: {
|
85
|
-
from: "users",
|
86
|
-
localField: "owner.target",
|
87
|
-
foreignField: "_id",
|
88
|
-
as: "ownerUser"
|
89
|
-
}
|
90
|
-
};
|
91
|
-
}
|
92
|
-
function getOwnerOrganizationLookupStage() {
|
93
|
-
return {
|
94
|
-
$lookup: {
|
95
|
-
from: "organizations",
|
96
|
-
localField: "owner.target",
|
97
|
-
foreignField: "_id",
|
98
|
-
as: "ownerOrganization"
|
99
|
-
}
|
100
|
-
};
|
101
|
-
}
|
102
|
-
function getAddFieldsCreatorOwnerStage() {
|
103
|
-
return {
|
104
|
-
$addFields: {
|
105
|
-
"creator.target": {
|
106
|
-
$switch: {
|
107
|
-
branches: [
|
108
|
-
{
|
109
|
-
case: { $eq: ["$creator.type", "user"] },
|
110
|
-
then: { $arrayElemAt: ["$creatorUser", 0] }
|
111
|
-
},
|
112
|
-
{
|
113
|
-
case: { $eq: ["$creator.type", "organization"] },
|
114
|
-
then: { $arrayElemAt: ["$creatorOrganization", 0] }
|
115
|
-
},
|
116
|
-
{
|
117
|
-
case: { $eq: ["$creator.type", "client"] },
|
118
|
-
then: { $arrayElemAt: ["$creatorClient", 0] }
|
119
|
-
}
|
120
|
-
],
|
121
|
-
default: "Unknown type"
|
122
|
-
// или любое другое значение по умолчанию, которое вы хотите использовать
|
123
|
-
}
|
124
|
-
},
|
125
|
-
"owner.target": {
|
126
|
-
$cond: [
|
127
|
-
{ $eq: ["$owner.type", "user"] },
|
128
|
-
{ $arrayElemAt: ["$ownerUser", 0] },
|
129
|
-
{ $arrayElemAt: ["$ownerOrganization", 0] }
|
130
|
-
]
|
131
|
-
}
|
132
|
-
}
|
133
|
-
};
|
134
|
-
}
|
135
|
-
var queryProcessor = {
|
136
|
-
getBasicOptions,
|
137
|
-
getSortingOptions,
|
138
|
-
getPaginationOptions,
|
139
|
-
getTagsOptions,
|
140
|
-
// Creator and Owner
|
141
|
-
getCreatorUserLookupStage,
|
142
|
-
getCreatorOrganizationLookupStage,
|
143
|
-
getCreatorCustomerLookupStage,
|
144
|
-
getOwnerUserLookupStage,
|
145
|
-
getOwnerOrganizationLookupStage,
|
146
|
-
getAddFieldsCreatorOwnerStage
|
147
|
-
};
|
148
|
-
exports.queryProcessor = queryProcessor;
|
@@ -1,149 +0,0 @@
|
|
1
|
-
import require$$0 from "mongoose";
|
2
|
-
const ObjectId = require$$0.Types.ObjectId;
|
3
|
-
function getBasicOptions(query) {
|
4
|
-
const { _id, url, status, type, owner, creator } = query;
|
5
|
-
const conditions = [];
|
6
|
-
if (_id) {
|
7
|
-
conditions.push({ _id: new ObjectId(_id) });
|
8
|
-
}
|
9
|
-
if (url) {
|
10
|
-
conditions.push({ url });
|
11
|
-
}
|
12
|
-
if (status) {
|
13
|
-
conditions.push({ status });
|
14
|
-
}
|
15
|
-
if (type) {
|
16
|
-
conditions.push({ type });
|
17
|
-
}
|
18
|
-
if (owner) {
|
19
|
-
conditions.push({ "owner.target": new ObjectId(owner) });
|
20
|
-
}
|
21
|
-
if (creator) {
|
22
|
-
conditions.push({ "creator.target": new ObjectId(creator) });
|
23
|
-
}
|
24
|
-
if (conditions.length > 0) {
|
25
|
-
return [{ $match: { $and: conditions } }];
|
26
|
-
} else {
|
27
|
-
return [];
|
28
|
-
}
|
29
|
-
}
|
30
|
-
function getTagsOptions(tags) {
|
31
|
-
if (tags && tags.length > 0) {
|
32
|
-
[{ $in: tags.split(",") }];
|
33
|
-
} else {
|
34
|
-
return [];
|
35
|
-
}
|
36
|
-
}
|
37
|
-
function getSortingOptions(param = "createdAt", order = "desc") {
|
38
|
-
let sort = {
|
39
|
-
[param]: order === "desc" ? -1 : 1,
|
40
|
-
"_id": 1
|
41
|
-
};
|
42
|
-
return [{ $sort: sort }];
|
43
|
-
}
|
44
|
-
function getPaginationOptions(skip, limit) {
|
45
|
-
let pagination = {
|
46
|
-
skip: parseInt(skip) || 0,
|
47
|
-
limit: parseInt(limit) || 20
|
48
|
-
};
|
49
|
-
return [{ $skip: pagination.skip }, { $limit: pagination.limit }];
|
50
|
-
}
|
51
|
-
function getCreatorUserLookupStage() {
|
52
|
-
return {
|
53
|
-
$lookup: {
|
54
|
-
from: "users",
|
55
|
-
localField: "creator.target",
|
56
|
-
foreignField: "_id",
|
57
|
-
as: "creatorUser"
|
58
|
-
}
|
59
|
-
};
|
60
|
-
}
|
61
|
-
function getCreatorOrganizationLookupStage() {
|
62
|
-
return {
|
63
|
-
$lookup: {
|
64
|
-
from: "organizations",
|
65
|
-
localField: "creator.target",
|
66
|
-
foreignField: "_id",
|
67
|
-
as: "creatorOrganization"
|
68
|
-
}
|
69
|
-
};
|
70
|
-
}
|
71
|
-
function getCreatorCustomerLookupStage() {
|
72
|
-
return {
|
73
|
-
$lookup: {
|
74
|
-
from: "clients",
|
75
|
-
localField: "creator.target",
|
76
|
-
foreignField: "_id",
|
77
|
-
as: "creatorClient"
|
78
|
-
}
|
79
|
-
};
|
80
|
-
}
|
81
|
-
function getOwnerUserLookupStage() {
|
82
|
-
return {
|
83
|
-
$lookup: {
|
84
|
-
from: "users",
|
85
|
-
localField: "owner.target",
|
86
|
-
foreignField: "_id",
|
87
|
-
as: "ownerUser"
|
88
|
-
}
|
89
|
-
};
|
90
|
-
}
|
91
|
-
function getOwnerOrganizationLookupStage() {
|
92
|
-
return {
|
93
|
-
$lookup: {
|
94
|
-
from: "organizations",
|
95
|
-
localField: "owner.target",
|
96
|
-
foreignField: "_id",
|
97
|
-
as: "ownerOrganization"
|
98
|
-
}
|
99
|
-
};
|
100
|
-
}
|
101
|
-
function getAddFieldsCreatorOwnerStage() {
|
102
|
-
return {
|
103
|
-
$addFields: {
|
104
|
-
"creator.target": {
|
105
|
-
$switch: {
|
106
|
-
branches: [
|
107
|
-
{
|
108
|
-
case: { $eq: ["$creator.type", "user"] },
|
109
|
-
then: { $arrayElemAt: ["$creatorUser", 0] }
|
110
|
-
},
|
111
|
-
{
|
112
|
-
case: { $eq: ["$creator.type", "organization"] },
|
113
|
-
then: { $arrayElemAt: ["$creatorOrganization", 0] }
|
114
|
-
},
|
115
|
-
{
|
116
|
-
case: { $eq: ["$creator.type", "client"] },
|
117
|
-
then: { $arrayElemAt: ["$creatorClient", 0] }
|
118
|
-
}
|
119
|
-
],
|
120
|
-
default: "Unknown type"
|
121
|
-
// или любое другое значение по умолчанию, которое вы хотите использовать
|
122
|
-
}
|
123
|
-
},
|
124
|
-
"owner.target": {
|
125
|
-
$cond: [
|
126
|
-
{ $eq: ["$owner.type", "user"] },
|
127
|
-
{ $arrayElemAt: ["$ownerUser", 0] },
|
128
|
-
{ $arrayElemAt: ["$ownerOrganization", 0] }
|
129
|
-
]
|
130
|
-
}
|
131
|
-
}
|
132
|
-
};
|
133
|
-
}
|
134
|
-
var queryProcessor = {
|
135
|
-
getBasicOptions,
|
136
|
-
getSortingOptions,
|
137
|
-
getPaginationOptions,
|
138
|
-
getTagsOptions,
|
139
|
-
// Creator and Owner
|
140
|
-
getCreatorUserLookupStage,
|
141
|
-
getCreatorOrganizationLookupStage,
|
142
|
-
getCreatorCustomerLookupStage,
|
143
|
-
getOwnerUserLookupStage,
|
144
|
-
getOwnerOrganizationLookupStage,
|
145
|
-
getAddFieldsCreatorOwnerStage
|
146
|
-
};
|
147
|
-
export {
|
148
|
-
queryProcessor as q
|
149
|
-
};
|