@ozdao/prometheus-framework 0.2.80 → 0.2.82
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
- package/dist/credentials.schema-CfhPcsuI.js +105 -0
- package/dist/events.server.js +4 -15
- package/dist/events.server.mjs +3 -14
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-B6a1mPgp.mjs +217 -0
- package/dist/index-BCCiEK_u.js +216 -0
- package/dist/main-8N2Jmsuk.js +91 -0
- package/dist/main-CkeuHuCY.mjs +13619 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-Cu_mPkjE.js +77 -0
- package/dist/metadata.schema-cbFgazeK.mjs +78 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
- package/dist/organizations.server.js +297 -134
- package/dist/organizations.server.mjs +295 -132
- package/dist/products.server.js +2 -2
- package/dist/products.server.mjs +2 -2
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +32 -155
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
- 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/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
- 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 +78 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/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 +1 -1
- 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 +14 -14
- 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 +4 -4
- 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/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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 +1 -1
- 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/events/components/pages/Event.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +132 -141
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +4 -4
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.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 +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +32 -25
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
- 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 +63 -86
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +39 -39
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
- 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 +46 -35
- 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/store/customers.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
- 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/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +39 -50
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
- 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 +161 -138
- 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 +199 -79
- 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 +83 -126
- 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 +1 -1
- 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 +59 -70
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
- 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/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/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/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/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- 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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
- package/dist/queryProcessor-DRMo_GWK.js +161 -0
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.server.js +69 -38
- package/dist/users.server.mjs +67 -36
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/dist/web-CtVocufd.js +1 -0
- package/dist/web-DNq1tHCE.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +13 -2
- package/src/components/Block/Block.vue +3 -2
- package/src/components/Button/Button.vue +9 -12
- package/src/components/Feed/Feed.vue +28 -6
- package/src/components/FieldPhone/FieldPhone.vue +592 -558
- package/src/components/LocationMarker/LocationMarker.vue +26 -22
- package/src/components/Popup/Popup.vue +22 -23
- package/src/components/Select/Select.vue +43 -32
- package/src/components/Slider/Slider.vue +3 -4
- package/src/modules/auth/components/pages/Invite.vue +7 -7
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +4 -3
- package/src/modules/events/components/pages/Event.vue +4 -3
- package/src/modules/events/components/pages/Events.vue +23 -6
- package/src/modules/events/components/sections/HeroEvent.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
- package/src/modules/globals/localization/vue-i18n.js +3 -0
- package/src/modules/globals/models/credentials.schema.js +7 -0
- package/src/modules/globals/models/metadata.schema.js +17 -0
- package/src/modules/globals/models/profile.schema.js +23 -0
- package/src/modules/globals/models/socials.schema.js +22 -0
- package/src/modules/globals/router/routerGuards.js +1 -0
- package/src/modules/globals/services/globals.cashe.js +26 -0
- package/src/modules/globals/services/globals.crud.js +115 -0
- package/src/modules/globals/services/globals.logger.js +41 -0
- package/src/modules/globals/services/globals.store.js +114 -0
- package/src/modules/icons/entities/IconGallery.vue +14 -0
- package/src/modules/icons/entities/IconLeftovers.vue +14 -0
- package/src/modules/icons/entities/IconOrders.vue +15 -0
- package/src/modules/icons/entities/IconProducts.vue +14 -0
- package/src/modules/landing/components/sections/HeroSection.vue +1 -1
- package/src/modules/landing/components/sections/MobileApp.vue +4 -4
- package/src/modules/landing/router/landing.js +1 -1
- package/src/modules/marketplace/components/sections/Filters.vue +3 -3
- package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
- package/src/modules/middlewares/server/verifyAccesses.js +33 -0
- package/src/modules/middlewares/server/verifyInvites.js +4 -4
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
- package/src/modules/orders/components/pages/Orders.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
- package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
- package/src/modules/orders/controllers/applications.controller.js +2 -0
- package/src/modules/orders/controllers/orders.controller.js +77 -52
- package/src/modules/orders/models/customer.model.js +54 -18
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/orders.client.js +51 -51
- package/src/modules/orders/orders.server.js +32 -12
- package/src/modules/orders/router/orders.router.js +36 -41
- package/src/modules/orders/routes/orders.routes.js +3 -21
- package/src/modules/orders/store/customers.store.js +5 -0
- package/src/modules/orders/store/models/customer.js +29 -0
- package/src/modules/orders/store/orders.js +14 -20
- package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
- package/src/modules/organizations/components/pages/Members.vue +178 -64
- package/src/modules/organizations/components/pages/Organization.vue +1 -41
- package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
- package/src/modules/organizations/controllers/departments.controller.js +2 -4
- package/src/modules/organizations/controllers/invites.controller.js +24 -23
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/department.model.js +52 -2
- package/src/modules/organizations/models/invite.model.js +29 -32
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +2 -1
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/routes/departments.routes.js +18 -7
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/departments.js +22 -1
- package/src/modules/organizations/store/invites.js +74 -90
- package/src/modules/products/components/blocks/CardProduct.vue +24 -0
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/reports/components/sections/FormReport.vue +40 -40
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
- package/src/modules/users/components/blocks/CardUser.vue +85 -0
- package/src/modules/users/controllers/users.controller.js +36 -13
- package/src/modules/users/middlewares/visitor.logger.js +66 -0
- package/src/modules/users/models/request.model.js +18 -0
- package/src/modules/users/models/user.model.js +26 -55
- package/src/modules/users/models/visitor.model.js +14 -0
- package/src/modules/users/store/users.js +2 -11
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
- package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
- package/src/components/FieldPhone/FieldPhone2.vue +0 -671
- package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
- package/src/modules/organizations/components/blocks/User.vue +0 -69
- /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
package/dist/users.server.js
CHANGED
@@ -2,23 +2,42 @@
|
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
3
|
require("uuid");
|
4
4
|
const require$$0 = require("mongoose");
|
5
|
-
const
|
5
|
+
const credentials_schema = require("./credentials.schema-CfhPcsuI.js");
|
6
6
|
const ObjectId = require$$0.Types.ObjectId;
|
7
|
-
const addUserStatusFields =
|
8
|
-
const addMembersQuantity =
|
7
|
+
const addUserStatusFields = credentials_schema.addUserStatusFields_1;
|
8
|
+
const addMembersQuantity = credentials_schema.addMembersQuantity_1;
|
9
9
|
const controllerFactory$1 = (db) => {
|
10
10
|
const User = db.user;
|
11
11
|
const read = async (req, res) => {
|
12
12
|
let query = [];
|
13
13
|
let skip = parseInt(req.query.skip) || 0;
|
14
14
|
let limit = parseInt(req.query.limit) || 10;
|
15
|
+
console.log(req.query);
|
15
16
|
const matchConditions = [
|
16
17
|
...req.query._id ? [{ _id: new ObjectId(req.query._id) }] : []
|
17
18
|
];
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
let search = req.query.search;
|
20
|
+
if (search) {
|
21
|
+
let regexPattern = "";
|
22
|
+
const escapedSearch = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
23
|
+
if (escapedSearch.includes("@")) {
|
24
|
+
regexPattern = escapedSearch;
|
25
|
+
} else if (escapedSearch.match(/^\+?\d{0,14}$/)) {
|
26
|
+
regexPattern = escapedSearch;
|
27
|
+
} else {
|
28
|
+
regexPattern = `.*${escapedSearch}.*`;
|
29
|
+
}
|
30
|
+
matchConditions.push({
|
31
|
+
$or: [
|
32
|
+
{ "profile.name": { $regex: regexPattern, $options: "i" } },
|
33
|
+
{ "email": { $regex: regexPattern, $options: "i" } },
|
34
|
+
{ "phone": { $regex: regexPattern, $options: "i" } },
|
35
|
+
{ "username": { $regex: regexPattern, $options: "i" } }
|
36
|
+
]
|
37
|
+
});
|
38
|
+
}
|
39
|
+
if (matchConditions.length > 0)
|
40
|
+
query.push({ $match: { $and: matchConditions } });
|
22
41
|
query.push({
|
23
42
|
$lookup: {
|
24
43
|
from: "orders",
|
@@ -44,23 +63,19 @@ const controllerFactory$1 = (db) => {
|
|
44
63
|
}
|
45
64
|
});
|
46
65
|
query.push(addMembersQuantity());
|
47
|
-
|
66
|
+
if (req.query.user)
|
67
|
+
query.push(addUserStatusFields(req.query.user));
|
48
68
|
query.push({
|
49
69
|
$skip: skip
|
50
70
|
});
|
51
71
|
query.push({
|
52
72
|
$limit: limit
|
53
73
|
});
|
54
|
-
console.log(req);
|
55
|
-
console.log(query);
|
56
|
-
console.log(req.body);
|
57
74
|
try {
|
58
75
|
const users = await User.aggregate(query);
|
59
|
-
if (!users
|
60
|
-
console.log("no users");
|
76
|
+
if (!users) {
|
61
77
|
return res.status(404).send({ message: "Users not found." });
|
62
78
|
}
|
63
|
-
console.log(users);
|
64
79
|
res.status(200).send(users);
|
65
80
|
} catch (err) {
|
66
81
|
console.log(err);
|
@@ -129,36 +144,30 @@ var users_routes = function(app, db, origins) {
|
|
129
144
|
app.put("/api/users/:_id", controller.update);
|
130
145
|
app.delete("/api/users/:_id", controller.remove);
|
131
146
|
};
|
132
|
-
var
|
133
|
-
|
134
|
-
username: String,
|
135
|
-
phone: String,
|
136
|
-
email: String,
|
137
|
-
apple_id: String,
|
138
|
-
password: String,
|
139
|
-
status: {
|
140
|
-
type: String,
|
141
|
-
enum: ["active", "banned", "removed", "inactive"],
|
142
|
-
default: "active",
|
143
|
-
required: true
|
144
|
-
},
|
147
|
+
var profile_schema = function applyProfileSchema(schema, db) {
|
148
|
+
schema.add({
|
145
149
|
profile: {
|
146
150
|
photo: {
|
147
151
|
type: String,
|
148
|
-
default:
|
152
|
+
default: null
|
149
153
|
},
|
150
154
|
name: {
|
151
155
|
type: String,
|
152
|
-
default:
|
156
|
+
default: null
|
153
157
|
},
|
154
158
|
description: {
|
155
159
|
type: String,
|
156
|
-
default:
|
160
|
+
default: null
|
157
161
|
},
|
158
162
|
birthday: {
|
159
|
-
type: Date
|
163
|
+
type: Date,
|
164
|
+
default: null
|
160
165
|
}
|
161
|
-
}
|
166
|
+
}
|
167
|
+
});
|
168
|
+
};
|
169
|
+
var socials_schema = function applySocialsSchema(schema, db) {
|
170
|
+
schema.add({
|
162
171
|
socials: {
|
163
172
|
telegram: {
|
164
173
|
type: String,
|
@@ -176,19 +185,41 @@ var user_model = (db) => {
|
|
176
185
|
type: String,
|
177
186
|
default: ""
|
178
187
|
}
|
188
|
+
}
|
189
|
+
});
|
190
|
+
};
|
191
|
+
const applyProfileSchema2 = profile_schema;
|
192
|
+
const applySocialsSchema2 = socials_schema;
|
193
|
+
const applyCredentialsSchema = credentials_schema.credentials_schema;
|
194
|
+
var user_model = (db) => {
|
195
|
+
const UserSchema = new db.mongoose.Schema({
|
196
|
+
username: {
|
197
|
+
type: String,
|
198
|
+
unique: true
|
179
199
|
},
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
200
|
+
password: {
|
201
|
+
type: String,
|
202
|
+
required: true
|
203
|
+
},
|
204
|
+
status: {
|
205
|
+
type: String,
|
206
|
+
enum: ["active", "banned", "removed", "inactive"],
|
207
|
+
default: "active",
|
208
|
+
required: true
|
209
|
+
},
|
210
|
+
roles: [{
|
211
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
212
|
+
ref: "Role"
|
213
|
+
}]
|
186
214
|
}, {
|
187
215
|
// Creation Date
|
188
216
|
timestamps: {
|
189
217
|
currentTime: () => Date.now()
|
190
218
|
}
|
191
219
|
});
|
220
|
+
applyProfileSchema2(UserSchema);
|
221
|
+
applySocialsSchema2(UserSchema);
|
222
|
+
applyCredentialsSchema(UserSchema);
|
192
223
|
const User = db.mongoose.model("User", UserSchema);
|
193
224
|
return User;
|
194
225
|
};
|
package/dist/users.server.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
2
|
import "uuid";
|
3
3
|
import require$$0 from "mongoose";
|
4
|
-
import { a as addUserStatusFields_1, b as addMembersQuantity_1 } from "./
|
4
|
+
import { a as addUserStatusFields_1, b as addMembersQuantity_1, c as credentials_schema } from "./credentials.schema-CDZCKfEI.mjs";
|
5
5
|
const ObjectId = require$$0.Types.ObjectId;
|
6
6
|
const addUserStatusFields = addUserStatusFields_1;
|
7
7
|
const addMembersQuantity = addMembersQuantity_1;
|
@@ -11,13 +11,32 @@ const controllerFactory$1 = (db) => {
|
|
11
11
|
let query = [];
|
12
12
|
let skip = parseInt(req.query.skip) || 0;
|
13
13
|
let limit = parseInt(req.query.limit) || 10;
|
14
|
+
console.log(req.query);
|
14
15
|
const matchConditions = [
|
15
16
|
...req.query._id ? [{ _id: new ObjectId(req.query._id) }] : []
|
16
17
|
];
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
let search = req.query.search;
|
19
|
+
if (search) {
|
20
|
+
let regexPattern = "";
|
21
|
+
const escapedSearch = search.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
22
|
+
if (escapedSearch.includes("@")) {
|
23
|
+
regexPattern = escapedSearch;
|
24
|
+
} else if (escapedSearch.match(/^\+?\d{0,14}$/)) {
|
25
|
+
regexPattern = escapedSearch;
|
26
|
+
} else {
|
27
|
+
regexPattern = `.*${escapedSearch}.*`;
|
28
|
+
}
|
29
|
+
matchConditions.push({
|
30
|
+
$or: [
|
31
|
+
{ "profile.name": { $regex: regexPattern, $options: "i" } },
|
32
|
+
{ "email": { $regex: regexPattern, $options: "i" } },
|
33
|
+
{ "phone": { $regex: regexPattern, $options: "i" } },
|
34
|
+
{ "username": { $regex: regexPattern, $options: "i" } }
|
35
|
+
]
|
36
|
+
});
|
37
|
+
}
|
38
|
+
if (matchConditions.length > 0)
|
39
|
+
query.push({ $match: { $and: matchConditions } });
|
21
40
|
query.push({
|
22
41
|
$lookup: {
|
23
42
|
from: "orders",
|
@@ -43,23 +62,19 @@ const controllerFactory$1 = (db) => {
|
|
43
62
|
}
|
44
63
|
});
|
45
64
|
query.push(addMembersQuantity());
|
46
|
-
|
65
|
+
if (req.query.user)
|
66
|
+
query.push(addUserStatusFields(req.query.user));
|
47
67
|
query.push({
|
48
68
|
$skip: skip
|
49
69
|
});
|
50
70
|
query.push({
|
51
71
|
$limit: limit
|
52
72
|
});
|
53
|
-
console.log(req);
|
54
|
-
console.log(query);
|
55
|
-
console.log(req.body);
|
56
73
|
try {
|
57
74
|
const users = await User.aggregate(query);
|
58
|
-
if (!users
|
59
|
-
console.log("no users");
|
75
|
+
if (!users) {
|
60
76
|
return res.status(404).send({ message: "Users not found." });
|
61
77
|
}
|
62
|
-
console.log(users);
|
63
78
|
res.status(200).send(users);
|
64
79
|
} catch (err) {
|
65
80
|
console.log(err);
|
@@ -128,36 +143,30 @@ var users_routes = function(app, db, origins) {
|
|
128
143
|
app.put("/api/users/:_id", controller.update);
|
129
144
|
app.delete("/api/users/:_id", controller.remove);
|
130
145
|
};
|
131
|
-
var
|
132
|
-
|
133
|
-
username: String,
|
134
|
-
phone: String,
|
135
|
-
email: String,
|
136
|
-
apple_id: String,
|
137
|
-
password: String,
|
138
|
-
status: {
|
139
|
-
type: String,
|
140
|
-
enum: ["active", "banned", "removed", "inactive"],
|
141
|
-
default: "active",
|
142
|
-
required: true
|
143
|
-
},
|
146
|
+
var profile_schema = function applyProfileSchema(schema, db) {
|
147
|
+
schema.add({
|
144
148
|
profile: {
|
145
149
|
photo: {
|
146
150
|
type: String,
|
147
|
-
default:
|
151
|
+
default: null
|
148
152
|
},
|
149
153
|
name: {
|
150
154
|
type: String,
|
151
|
-
default:
|
155
|
+
default: null
|
152
156
|
},
|
153
157
|
description: {
|
154
158
|
type: String,
|
155
|
-
default:
|
159
|
+
default: null
|
156
160
|
},
|
157
161
|
birthday: {
|
158
|
-
type: Date
|
162
|
+
type: Date,
|
163
|
+
default: null
|
159
164
|
}
|
160
|
-
}
|
165
|
+
}
|
166
|
+
});
|
167
|
+
};
|
168
|
+
var socials_schema = function applySocialsSchema(schema, db) {
|
169
|
+
schema.add({
|
161
170
|
socials: {
|
162
171
|
telegram: {
|
163
172
|
type: String,
|
@@ -175,19 +184,41 @@ var user_model = (db) => {
|
|
175
184
|
type: String,
|
176
185
|
default: ""
|
177
186
|
}
|
187
|
+
}
|
188
|
+
});
|
189
|
+
};
|
190
|
+
const applyProfileSchema2 = profile_schema;
|
191
|
+
const applySocialsSchema2 = socials_schema;
|
192
|
+
const applyCredentialsSchema = credentials_schema;
|
193
|
+
var user_model = (db) => {
|
194
|
+
const UserSchema = new db.mongoose.Schema({
|
195
|
+
username: {
|
196
|
+
type: String,
|
197
|
+
unique: true
|
178
198
|
},
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
199
|
+
password: {
|
200
|
+
type: String,
|
201
|
+
required: true
|
202
|
+
},
|
203
|
+
status: {
|
204
|
+
type: String,
|
205
|
+
enum: ["active", "banned", "removed", "inactive"],
|
206
|
+
default: "active",
|
207
|
+
required: true
|
208
|
+
},
|
209
|
+
roles: [{
|
210
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
211
|
+
ref: "Role"
|
212
|
+
}]
|
185
213
|
}, {
|
186
214
|
// Creation Date
|
187
215
|
timestamps: {
|
188
216
|
currentTime: () => Date.now()
|
189
217
|
}
|
190
218
|
});
|
219
|
+
applyProfileSchema2(UserSchema);
|
220
|
+
applySocialsSchema2(UserSchema);
|
221
|
+
applyCredentialsSchema(UserSchema);
|
191
222
|
const User = db.mongoose.model("User", UserSchema);
|
192
223
|
return User;
|
193
224
|
};
|
package/dist/wallet.server.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
const _commonjsHelpers = require("./_commonjsHelpers-DHfMLFPC.js");
|
3
|
-
const index = require("./index-
|
3
|
+
const index = require("./index-BCCiEK_u.js");
|
4
4
|
require("axios");
|
5
5
|
require("bcryptjs");
|
6
6
|
require("crypto");
|
@@ -9,7 +9,7 @@ const tickets_controller = require("./tickets.controller-WaQ4qMpv.js");
|
|
9
9
|
const require$$1 = require("stripe");
|
10
10
|
const require$$0 = require("mongoose");
|
11
11
|
const require$$1$1 = require("bignumber.js");
|
12
|
-
require("./queryProcessor-
|
12
|
+
require("./queryProcessor-DRMo_GWK.js");
|
13
13
|
var wallet_model = (db) => {
|
14
14
|
const WalletSchema = new db.mongoose.Schema(
|
15
15
|
{
|
package/dist/wallet.server.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.mjs";
|
2
|
-
import { s as server } from "./index-
|
2
|
+
import { s as server } from "./index-B6a1mPgp.mjs";
|
3
3
|
import "axios";
|
4
4
|
import "bcryptjs";
|
5
5
|
import "crypto";
|
@@ -8,7 +8,7 @@ import { t as tickets_controller } from "./tickets.controller-ByZ33N6_.mjs";
|
|
8
8
|
import require$$1 from "stripe";
|
9
9
|
import require$$0 from "mongoose";
|
10
10
|
import require$$1$1 from "bignumber.js";
|
11
|
-
import "./queryProcessor-
|
11
|
+
import "./queryProcessor-BJdKh0Ow.mjs";
|
12
12
|
var wallet_model = (db) => {
|
13
13
|
const WalletSchema = new db.mongoose.Schema(
|
14
14
|
{
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./main-8N2Jmsuk.js");class p extends c.WebPlugin{constructor(){super(...arguments),this.group="CapacitorStorage"}async configure({group:e}){typeof e=="string"&&(this.group=e)}async get(e){return{value:this.impl.getItem(this.applyPrefix(e.key))}}async set(e){this.impl.setItem(this.applyPrefix(e.key),e.value)}async remove(e){this.impl.removeItem(this.applyPrefix(e.key))}async keys(){return{keys:this.rawKeys().map(t=>t.substring(this.prefix.length))}}async clear(){for(const e of this.rawKeys())this.impl.removeItem(e)}async migrate(){var e;const t=[],s=[],n="_cap_",o=Object.keys(this.impl).filter(i=>i.indexOf(n)===0);for(const i of o){const r=i.substring(n.length),a=(e=this.impl.getItem(i))!==null&&e!==void 0?e:"",{value:l}=await this.get({key:r});typeof l=="string"?s.push(r):(await this.set({key:r,value:a}),t.push(r))}return{migrated:t,existing:s}}async removeOld(){const e="_cap_",t=Object.keys(this.impl).filter(s=>s.indexOf(e)===0);for(const s of t)this.impl.removeItem(s)}get impl(){return window.localStorage}get prefix(){return this.group==="NativeStorage"?"":`${this.group}.`}rawKeys(){return Object.keys(this.impl).filter(e=>e.indexOf(this.prefix)===0)}applyPrefix(e){return this.prefix+e}}exports.PreferencesWeb=p;
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { W as p } from "./main-CkeuHuCY.mjs";
|
2
|
+
class f extends p {
|
3
|
+
constructor() {
|
4
|
+
super(...arguments), this.group = "CapacitorStorage";
|
5
|
+
}
|
6
|
+
async configure({ group: e }) {
|
7
|
+
typeof e == "string" && (this.group = e);
|
8
|
+
}
|
9
|
+
async get(e) {
|
10
|
+
return { value: this.impl.getItem(this.applyPrefix(e.key)) };
|
11
|
+
}
|
12
|
+
async set(e) {
|
13
|
+
this.impl.setItem(this.applyPrefix(e.key), e.value);
|
14
|
+
}
|
15
|
+
async remove(e) {
|
16
|
+
this.impl.removeItem(this.applyPrefix(e.key));
|
17
|
+
}
|
18
|
+
async keys() {
|
19
|
+
return { keys: this.rawKeys().map((t) => t.substring(this.prefix.length)) };
|
20
|
+
}
|
21
|
+
async clear() {
|
22
|
+
for (const e of this.rawKeys())
|
23
|
+
this.impl.removeItem(e);
|
24
|
+
}
|
25
|
+
async migrate() {
|
26
|
+
var e;
|
27
|
+
const t = [], s = [], n = "_cap_", o = Object.keys(this.impl).filter((i) => i.indexOf(n) === 0);
|
28
|
+
for (const i of o) {
|
29
|
+
const r = i.substring(n.length), a = (e = this.impl.getItem(i)) !== null && e !== void 0 ? e : "", { value: l } = await this.get({ key: r });
|
30
|
+
typeof l == "string" ? s.push(r) : (await this.set({ key: r, value: a }), t.push(r));
|
31
|
+
}
|
32
|
+
return { migrated: t, existing: s };
|
33
|
+
}
|
34
|
+
async removeOld() {
|
35
|
+
const e = "_cap_", t = Object.keys(this.impl).filter((s) => s.indexOf(e) === 0);
|
36
|
+
for (const s of t)
|
37
|
+
this.impl.removeItem(s);
|
38
|
+
}
|
39
|
+
get impl() {
|
40
|
+
return window.localStorage;
|
41
|
+
}
|
42
|
+
get prefix() {
|
43
|
+
return this.group === "NativeStorage" ? "" : `${this.group}.`;
|
44
|
+
}
|
45
|
+
rawKeys() {
|
46
|
+
return Object.keys(this.impl).filter((e) => e.indexOf(this.prefix) === 0);
|
47
|
+
}
|
48
|
+
applyPrefix(e) {
|
49
|
+
return this.prefix + e;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
export {
|
53
|
+
f as PreferencesWeb
|
54
|
+
};
|
package/package.json
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
|
40
40
|
<script setup>
|
41
41
|
import { ref, onMounted, watchEffect } from 'vue';
|
42
|
+
import { Loader } from "@googlemaps/js-api-loader";
|
42
43
|
|
43
44
|
const props = defineProps({
|
44
45
|
apiKey: {
|
@@ -66,8 +67,18 @@ const addressInput = ref(null);
|
|
66
67
|
let autocomplete;
|
67
68
|
|
68
69
|
const initAutocomplete = () => {
|
69
|
-
|
70
|
-
|
70
|
+
const loader = new Loader({
|
71
|
+
apiKey: props.apiKey,
|
72
|
+
version: "weekly",
|
73
|
+
libraries: ["places"]
|
74
|
+
});
|
75
|
+
|
76
|
+
loader.load().then(() => {
|
77
|
+
autocomplete = new google.maps.places.Autocomplete(addressInput.value);
|
78
|
+
autocomplete.addListener('place_changed', onPlaceChanged);
|
79
|
+
}).catch(e => {
|
80
|
+
console.error(e);
|
81
|
+
});
|
71
82
|
};
|
72
83
|
|
73
84
|
const onInput = () => {
|
@@ -2,13 +2,14 @@
|
|
2
2
|
<div
|
3
3
|
class="bg-grey pd-medium radius-medium"
|
4
4
|
>
|
5
|
-
<div class="mn-b-small flex-v-center flex-nowrap flex">
|
5
|
+
<div v-if="title || actions" class="mn-b-small flex-v-center flex-nowrap flex">
|
6
6
|
<p v-if="title" class="mn-r-thin t-medium p-big">{{title}}</p>
|
7
7
|
|
8
8
|
<button
|
9
9
|
v-for="action in actions"
|
10
10
|
@click="action.function"
|
11
|
-
class="
|
11
|
+
class="pd-thin button-delete button"
|
12
|
+
:class="action.class || 'bg-main radius-small t-center i-medium'"
|
12
13
|
>
|
13
14
|
{{action.label}}
|
14
15
|
</button>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<script setup>
|
2
2
|
import { ref } from 'vue'
|
3
|
-
|
3
|
+
|
4
4
|
const props = defineProps({
|
5
5
|
submit: {
|
6
6
|
type: Function,
|
@@ -42,6 +42,8 @@
|
|
42
42
|
},
|
43
43
|
})
|
44
44
|
|
45
|
+
const emits = defineEmits(['error'])
|
46
|
+
|
45
47
|
const button = ref(null);
|
46
48
|
const error = ref(null);
|
47
49
|
const loading = ref(false);
|
@@ -55,11 +57,11 @@
|
|
55
57
|
// Функция для сброса состояния кнопки.
|
56
58
|
const resetButton = () => {
|
57
59
|
if (button.value) {
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
button.value.classList.replace('bg-second', 'bg-main');
|
61
|
+
button.value.style.pointerEvents = 'auto';
|
62
|
+
loading.value = false;
|
63
|
+
finished.value = false;
|
64
|
+
error.value = null;
|
63
65
|
}
|
64
66
|
};
|
65
67
|
|
@@ -68,7 +70,6 @@
|
|
68
70
|
|
69
71
|
button.value.classList.replace('bg-main', 'bg-second');
|
70
72
|
|
71
|
-
|
72
73
|
loading.value = false;
|
73
74
|
|
74
75
|
// Используем функцию сброса состояния кнопки здесь.
|
@@ -83,6 +84,7 @@
|
|
83
84
|
if (props.callback) setTimeout(() => props.callback(), props.callbackDelay);
|
84
85
|
|
85
86
|
} catch (err) {
|
87
|
+
emits('error',err)
|
86
88
|
// Если возникла ошибка, мы изменяем стили и устанавливаем сообщение об ошибке.
|
87
89
|
button.value.classList.replace('bg-main', 'bg-fourth-nano');
|
88
90
|
error.value = props.error;
|
@@ -108,11 +110,6 @@
|
|
108
110
|
<!-- Loading Circle Animation -->
|
109
111
|
<span v-else-if="loading && !error && showLoader" class="loading">
|
110
112
|
<svg class="i-regular" width="135" height="140" viewBox="0 0 135 140" xmlns="http://www.w3.org/2000/svg" fill="#fff">
|
111
|
-
<rect y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
112
|
-
<rect x="30" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
113
|
-
<rect x="60" width="15" height="140" rx="6"> <animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
114
|
-
<rect x="90" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
115
|
-
<rect x="120" y="10" width="15" height="120" rx="6"> <animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite" /> <animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"/> </rect>
|
116
113
|
</svg>
|
117
114
|
</span>
|
118
115
|
<span v-else-if="finished && showSucces" class="t-semi loading t-black">{{text.success}}</span>
|
@@ -12,10 +12,12 @@
|
|
12
12
|
tag="ul"
|
13
13
|
name="scaleTransition"
|
14
14
|
class="o-hidden bg-grey radius-big"
|
15
|
+
:class="$attrs.class"
|
15
16
|
>
|
16
17
|
<SkeletonEvent
|
17
18
|
v-if="isLoading"
|
18
|
-
v-for="i in currentLimit"
|
19
|
+
v-for="i in currentLimit"
|
20
|
+
:key="'skeleton-' + i"
|
19
21
|
/>
|
20
22
|
</TransitionGroup>
|
21
23
|
|
@@ -26,6 +28,8 @@
|
|
26
28
|
v-if="!isLoading && itemsList.length < 1"
|
27
29
|
:title="states.empty.title"
|
28
30
|
:description="states.empty.description"
|
31
|
+
:action="states.empty.action"
|
32
|
+
:callback="states.empty.callback"
|
29
33
|
class="pd-medium mn-b-thin bg-grey radius-big"
|
30
34
|
/>
|
31
35
|
</transition>
|
@@ -38,11 +42,17 @@
|
|
38
42
|
<slot
|
39
43
|
v-if="!isLoading && itemsList.length > 0"
|
40
44
|
:items="itemsList"
|
41
|
-
:user="user"
|
42
45
|
>
|
43
|
-
|
44
46
|
</slot>
|
45
47
|
|
48
|
+
<!-- <slot
|
49
|
+
v-if="!isLoading && itemsList.length > 0"
|
50
|
+
:items="itemsList"
|
51
|
+
:user="user"
|
52
|
+
:key="itemsList"
|
53
|
+
>
|
54
|
+
</slot> -->
|
55
|
+
|
46
56
|
<button
|
47
57
|
v-if="showLoadMore && hasMoreItems && itemsList.length > 0"
|
48
58
|
@click="loadMoreItems"
|
@@ -50,6 +60,8 @@
|
|
50
60
|
>
|
51
61
|
Load More
|
52
62
|
</button>
|
63
|
+
|
64
|
+
<div key="sentinel" ref="sentinel" class="sentinel"></div>
|
53
65
|
</TransitionGroup>
|
54
66
|
|
55
67
|
</template>
|
@@ -73,7 +85,7 @@ const props = defineProps({
|
|
73
85
|
default: true
|
74
86
|
},
|
75
87
|
search: {
|
76
|
-
type: Boolean,
|
88
|
+
type: [Boolean, Object],
|
77
89
|
default: false
|
78
90
|
},
|
79
91
|
states: {
|
@@ -115,7 +127,9 @@ const props = defineProps({
|
|
115
127
|
const itemsList = ref([]);
|
116
128
|
const hasMoreItems = ref(false);
|
117
129
|
|
130
|
+
|
118
131
|
let isLoading = ref(true);
|
132
|
+
let sentinel = ref(null)
|
119
133
|
|
120
134
|
let currentSkip = ref(props.options.skip ? props.options.skip : 0);
|
121
135
|
let currentLimit = ref(props.options.limit ? props.options.limit : 10);
|
@@ -182,8 +196,6 @@ watch(() => props.external, (newVal, oldVal) => {
|
|
182
196
|
}
|
183
197
|
}, { deep: true });
|
184
198
|
|
185
|
-
|
186
|
-
|
187
199
|
watch(() => props.options, (newVal, oldVal) => {
|
188
200
|
if (
|
189
201
|
newVal.organization !== oldVal.organization ||
|
@@ -202,5 +214,15 @@ watch(() => props.options, (newVal, oldVal) => {
|
|
202
214
|
|
203
215
|
onMounted(async () => {
|
204
216
|
await fetchItems()
|
217
|
+
|
218
|
+
if (typeof window !== 'undefined' && !props.showLoadMore) {
|
219
|
+
const observer = new IntersectionObserver(entries => {
|
220
|
+
if (entries.some(entry => entry.isIntersecting)) {
|
221
|
+
loadMoreItems()
|
222
|
+
}
|
223
|
+
})
|
224
|
+
|
225
|
+
observer.observe(sentinel.value)
|
226
|
+
}
|
205
227
|
});
|
206
228
|
</script>
|