@ozdao/prometheus-framework 0.2.187 → 0.2.188
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +35 -23
- package/dist/auth.server.mjs +35 -23
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/mailing-BQKyTI-q.js +77 -0
- package/dist/mailing-C3VD4l0h.mjs +78 -0
- package/dist/main-BVZtf9OG.js +92 -0
- package/dist/main-CbTw08vO.mjs +13584 -0
- package/dist/orders.server.js +162 -12
- package/dist/orders.server.mjs +162 -12
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +41 -22
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +41 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +124 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +94 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +82 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +118 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +168 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +129 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.js +88 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.js +20 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.js +26 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.js +30 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.js +32 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +30 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/auth.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/auth.js +119 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +31 -0
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +45 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
- 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/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +3 -4
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +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 +10 -10
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- 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 +12 -13
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +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 +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.js +7 -0
- package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.js +18 -0
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +38 -76
- 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 +5 -5
- 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/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- 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 +1 -1
- 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/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
- 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 +3 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.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 +2 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/departments.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/departments.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -3
- 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 +2 -3
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.js +1 -1
- package/dist/prometheus-framework/src/modules/products/router/leftovers.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/leftovers.router.js +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -3
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- 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 +3 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +3 -4
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tickets.controller-BWVUA-GR.js +401 -0
- package/dist/tickets.controller-ChVmHHnj.mjs +402 -0
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/web-CK9TrlwB.js +1 -0
- package/dist/web-aOWHNbX1.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -1
- package/src/components/Sidebar/Sidebar.vue +1 -1
- package/src/modules/auth/auth.client.js +53 -28
- package/src/modules/auth/auth.server.js +32 -14
- package/src/modules/auth/{routes → controllers/routes}/auth.routes.js +3 -3
- package/src/modules/auth/{routes → controllers/routes}/twofa.routes.js +2 -2
- package/src/modules/auth/controllers/{auth.controller.js → services/auth.service.js} +2 -3
- package/src/modules/auth/models/role.model.js +9 -8
- package/src/modules/auth/{components → views/components}/layouts/Auth.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/EnterCode.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/EnterPassword.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/Invite.vue +2 -2
- package/src/modules/auth/{components → views/components}/pages/ResetPassword.vue +4 -4
- package/src/modules/auth/{components → views/components}/pages/SignIn.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/SignUp.vue +4 -4
- package/src/modules/{middlewares/client → auth/views/middlewares}/auth.validation.js +20 -1
- package/src/modules/auth/views/router/auth.js +102 -0
- package/src/modules/{middlewares/client → auth/views/validations}/inputs.validation.js +3 -6
- package/src/modules/backoffice/components/layouts/Backoffice.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +1 -1
- package/src/modules/backoffice/components/partials/Sidebar.vue +1 -1
- package/src/modules/backoffice/router/backoffice.js +1 -1
- package/src/modules/chats/routes/chats.routes.js +1 -1
- package/src/modules/community/components/layouts/Community.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/community/components/pages/BlogPost.vue +1 -1
- package/src/modules/community/components/pages/Community.vue +1 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/community/routes/blog.routes.js +1 -1
- package/src/modules/events/components/elements/ButtonJoin.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
- package/src/modules/events/components/pages/Event.vue +1 -1
- package/src/modules/events/components/pages/Events.vue +1 -1
- package/src/modules/events/components/sections/FeaturedEvents.vue +1 -1
- package/src/modules/events/router/events.js +1 -1
- package/src/modules/events/routes/events.routes.js +1 -1
- package/src/modules/files/routes/files.routes.js +1 -1
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
- package/src/modules/gallery/routes/gallery.routes.js +2 -2
- package/src/modules/globals/globals.client.js +4 -3
- package/src/modules/globals/router/scrollBehavior.js +30 -0
- package/src/modules/globals/store/globals.js +3 -3
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/legal/components/pages/Legal.vue +1 -1
- package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
- package/src/modules/orders/components/pages/Orders.vue +1 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +1 -1
- package/src/modules/orders/models/order.model.js +0 -1
- package/src/modules/orders/orders.server.js +3 -1
- package/src/modules/orders/routes/applications.routes.js +2 -1
- package/src/modules/orders/routes/orders.routes.js +1 -1
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationCreate.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationDetails.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
- package/src/modules/organizations/components/sections/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/Publics.vue +1 -1
- package/src/modules/organizations/router/backoffice.router.js +1 -1
- package/src/modules/organizations/router/departments.router.js +1 -1
- package/src/modules/organizations/router/members.router.js +1 -1
- package/src/modules/organizations/router/organizations.js +1 -1
- package/src/modules/organizations/routes/invites.routes.js +1 -1
- package/src/modules/organizations/store/invites.js +1 -1
- package/src/modules/pages/views/components/pages/Page.vue +1 -1
- package/src/modules/pages/views/components/pages/Pages.vue +1 -1
- package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/products/router/categories.router.js +1 -1
- package/src/modules/products/router/leftovers.router.js +1 -1
- package/src/modules/products/router/products.router.js +1 -1
- package/src/modules/spots/router/spots.js +1 -1
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +2 -2
- package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
- package/src/modules/users/router/users.js +1 -2
- package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
- package/src/modules/wallet/controllers/routes/rewards.routes.js +1 -1
- package/src/modules/wallet/views/router/payments.router.js +1 -2
- package/src/modules/auth/router/auth.js +0 -111
- package/src/modules/globals/localization/methods/get-app-locales.js +0 -13
- package/src/modules/globals/localization/vue-i18n.js +0 -38
- package/src/modules/globals/localization/vue-i18n.singleton.js +0 -11
- package/src/modules/middlewares/client/states.validation.js +0 -23
- package/src/modules/middlewares/middlewares.client.js +0 -11
- package/src/modules/middlewares/middlewares.server.js +0 -18
- package/src/modules/orders/routes/backcalls.routes.js +0 -36
- package/src/modules/orders/routes/fastorders.routes.js +0 -32
- /package/src/modules/auth/{middlewares → controllers/middlewares}/authJwt.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/authSecret.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/index.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyAccesses.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyInvites.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifySignUp.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyUser.js +0 -0
- /package/src/modules/auth/controllers/{twofa.controller.js → services/twofa.service.js} +0 -0
- /package/src/modules/auth/{utils/server → controllers/utils}/verifyAppleIdToken.js +0 -0
- /package/src/modules/auth/{components → views/components}/sections/SliderFeatures.vue +0 -0
- /package/src/modules/auth/{localization → views/localization}/EnterCode.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/EnterPassword.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/ResetPassword.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/SignIn.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/SignUp.json +0 -0
- /package/src/modules/auth/{store → views/store}/auth.js +0 -0
- /package/src/modules/auth/{store → views/store}/twofa.js +0 -0
- /package/src/modules/globals/localization/{methods/get-browser-locale.js → get-browser-locale.js} +0 -0
@@ -0,0 +1,124 @@
|
|
1
|
+
import { reactive as P, watch as D, ref as c, openBlock as b, createElementBlock as w, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import { useRoute as q, useRouter as $ } from "vue-router";
|
4
|
+
import { useI18n as K } from "vue-i18n";
|
5
|
+
import { state as N } from "../../store/auth.js";
|
6
|
+
import { state as I, sendCode as R } from "../../store/twofa.js";
|
7
|
+
import { setError as C } from "../../../../globals/store/globals.js";
|
8
|
+
import T from "../../localization/EnterCode.json.js";
|
9
|
+
const V = { class: "t-center pd-medium" }, A = { class: "mn-b-medium" }, O = { class: "mn-b-big t-transp" }, U = { class: "w-100 mn-b-big flex-nowrap flex" }, B = { key: 1 }, L = {
|
10
|
+
__name: "EnterCode",
|
11
|
+
setup(j) {
|
12
|
+
const y = q(), S = $(), { t: p } = K({
|
13
|
+
useScope: "global",
|
14
|
+
...T
|
15
|
+
}), n = P({
|
16
|
+
digits: ["", "", "", ""],
|
17
|
+
error: null
|
18
|
+
});
|
19
|
+
D(
|
20
|
+
() => n.digits[0],
|
21
|
+
(s) => {
|
22
|
+
if (s && String(s).length > 1) {
|
23
|
+
let t = String(s).split("");
|
24
|
+
console.log(t);
|
25
|
+
let e = [...n.digits];
|
26
|
+
t.forEach((o, l) => {
|
27
|
+
console.log(l), console.log(e[l]), console.log(o), e[l] = o;
|
28
|
+
}), n.digits = e, u(3);
|
29
|
+
}
|
30
|
+
}
|
31
|
+
);
|
32
|
+
const v = c(null), i = c(0);
|
33
|
+
async function k() {
|
34
|
+
try {
|
35
|
+
await R(
|
36
|
+
N.user,
|
37
|
+
y.query.method,
|
38
|
+
y.query.type
|
39
|
+
), i.value = 30;
|
40
|
+
const s = setInterval(() => {
|
41
|
+
i.value > 0 ? i.value -= 1 : clearInterval(s);
|
42
|
+
}, 1e3);
|
43
|
+
} catch {
|
44
|
+
C({ response: { data: { errorCode: "CODE_NOT_SENT" } } });
|
45
|
+
}
|
46
|
+
}
|
47
|
+
const a = (s, t) => {
|
48
|
+
if (s.key === "Backspace" && (n.digits[t] === null || n.digits[t] === void 0 || n.digits[t] === "")) {
|
49
|
+
s.preventDefault();
|
50
|
+
const e = document.querySelectorAll("input"), o = t > 0 ? e[t - 1] : null;
|
51
|
+
o && (o.focus(), o.setSelectionRange(o.value.length, o.value.length));
|
52
|
+
}
|
53
|
+
}, u = (s) => {
|
54
|
+
const t = document.querySelectorAll("input"), e = t[s + 1], o = s > 0 ? t[s - 1] : null;
|
55
|
+
if (n.digits[s] !== "" && n.digits[s] !== null && n.digits[s] !== void 0 && s < 4 && (s < 3 ? e.focus() : v.value.focus()), (n.digits[s] === null || n.digits[s] === void 0 || n.digits[s] === "") && s > 0 && o.focus(), n.digits.every((l) => l !== "")) {
|
56
|
+
const l = n.digits.join(""), E = I.code.code.toString();
|
57
|
+
l === E ? (I.code.isValid = !0, S.push({
|
58
|
+
path: "/auth/enter-password",
|
59
|
+
query: { type: I.code.type, method: y.query.method }
|
60
|
+
})) : (C({ response: { data: { errorCode: "WRONG_CODE" } } }), v.value.focus(), n.digits = ["", "", "", ""]);
|
61
|
+
}
|
62
|
+
};
|
63
|
+
return (s, t) => (b(), w("section", V, [
|
64
|
+
r("h3", A, d(m(p)("verifyNumberTitle")), 1),
|
65
|
+
r("p", O, d(m(p)("instructions")), 1),
|
66
|
+
r("div", U, [
|
67
|
+
g(r("input", {
|
68
|
+
type: "number",
|
69
|
+
"onUpdate:modelValue": t[0] || (t[0] = (e) => n.digits[0] = e),
|
70
|
+
ref_key: "firstInput",
|
71
|
+
ref: v,
|
72
|
+
maxlength: "1",
|
73
|
+
onInput: t[1] || (t[1] = (e) => u(0)),
|
74
|
+
onPaste: t[2] || (t[2] = (e) => s.onPaste(e, 0)),
|
75
|
+
onKeydown: t[3] || (t[3] = (e) => a(e, 0)),
|
76
|
+
class: "w-100 h1 pd-small t-center bg-light radius-small mn-r-small"
|
77
|
+
}, null, 544), [
|
78
|
+
[f, n.digits[0]]
|
79
|
+
]),
|
80
|
+
g(r("input", {
|
81
|
+
type: "number",
|
82
|
+
"onUpdate:modelValue": t[4] || (t[4] = (e) => n.digits[1] = e),
|
83
|
+
maxlength: "1",
|
84
|
+
onInput: t[5] || (t[5] = (e) => u(1)),
|
85
|
+
onPaste: t[6] || (t[6] = (e) => s.onPaste(e, 1)),
|
86
|
+
onKeydown: t[7] || (t[7] = (e) => a(e, 1)),
|
87
|
+
class: "w-100 h1 pd-small t-center bg-light radius-small mn-r-small"
|
88
|
+
}, null, 544), [
|
89
|
+
[f, n.digits[1]]
|
90
|
+
]),
|
91
|
+
g(r("input", {
|
92
|
+
type: "number",
|
93
|
+
"onUpdate:modelValue": t[8] || (t[8] = (e) => n.digits[2] = e),
|
94
|
+
maxlength: "1",
|
95
|
+
onInput: t[9] || (t[9] = (e) => u(2)),
|
96
|
+
onPaste: t[10] || (t[10] = (e) => s.onPaste(e, 2)),
|
97
|
+
onKeydown: t[11] || (t[11] = (e) => a(e, 2)),
|
98
|
+
class: "w-100 h1 pd-small t-center bg-light radius-small mn-r-small"
|
99
|
+
}, null, 544), [
|
100
|
+
[f, n.digits[2]]
|
101
|
+
]),
|
102
|
+
g(r("input", {
|
103
|
+
type: "number",
|
104
|
+
"onUpdate:modelValue": t[12] || (t[12] = (e) => n.digits[3] = e),
|
105
|
+
maxlength: "1",
|
106
|
+
onInput: t[13] || (t[13] = (e) => u(3)),
|
107
|
+
onPaste: t[14] || (t[14] = (e) => s.onPaste(e, 3)),
|
108
|
+
onKeydown: t[15] || (t[15] = (e) => a(e, 3)),
|
109
|
+
class: "w-100 h1 pd-small t-center bg-light radius-small"
|
110
|
+
}, null, 544), [
|
111
|
+
[f, n.digits[3]]
|
112
|
+
])
|
113
|
+
]),
|
114
|
+
i.value < 1 ? (b(), w("a", {
|
115
|
+
key: 0,
|
116
|
+
onClick: k,
|
117
|
+
class: "t-blue"
|
118
|
+
}, d(m(p)("resendCode")), 1)) : (b(), w("span", B, d(i.value) + " " + d(m(p)("secondsResend")), 1))
|
119
|
+
]));
|
120
|
+
}
|
121
|
+
};
|
122
|
+
export {
|
123
|
+
L as default
|
124
|
+
};
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const l=require("../../../../../components/Field/Field.vue2.cjs"),f=require("../../../../../components/Button/Button.vue2.cjs"),i=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),d=require("../../validations/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");;/* empty css */const _={class:"t-left pd-medium"},y={class:"mn-b-small"},g={key:0,class:"mn-b-semi t-transp"},b={key:1,class:"mn-b-semi t-transp"},k={class:"mn-b-semi radius-small o-hidden"},q={key:2,class:"p-medium t-semi mn-b-semi"},B=e.createElementVNode("a",{class:"t-second",href:"/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),E={key:0},P={key:1},v={__name:"EnterPassword",setup(S){const n=e.ref(null),{t:s}=h.useI18n({useScope:"global",...w.default}),r=i.useRoute(),u=i.useRouter();e.ref("phone");async function c(){try{await d.validateInputs(n,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",_,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",b,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",k,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-light pd-small radius-small mn-b-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",q,[e.createTextVNode(" By registering, you agree to our "),B])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",E,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=v;
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as p, toDisplayString as i, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as b, withCtx as P } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import c from "../../../../../components/Field/Field.vue2.js";
|
4
|
+
import k from "../../../../../components/Button/Button.vue2.js";
|
5
|
+
import { useRoute as q, useRouter as v } from "vue-router";
|
6
|
+
import { useI18n as E } from "vue-i18n";
|
7
|
+
import { state as s, actions as h } from "../../store/auth.js";
|
8
|
+
import { validateInputs as x, validatePassword as B } from "../../validations/inputs.validation.js";
|
9
|
+
import U from "../../localization/EnterPassword.json.js";
|
10
|
+
/* empty css */
|
11
|
+
const V = { class: "t-left pd-medium" }, N = { class: "mn-b-small" }, R = {
|
12
|
+
key: 0,
|
13
|
+
class: "mn-b-semi t-transp"
|
14
|
+
}, A = {
|
15
|
+
key: 1,
|
16
|
+
class: "mn-b-semi t-transp"
|
17
|
+
}, S = { class: "mn-b-semi radius-small o-hidden" }, C = {
|
18
|
+
key: 2,
|
19
|
+
class: "p-medium t-semi mn-b-semi"
|
20
|
+
}, D = /* @__PURE__ */ p("a", {
|
21
|
+
class: "t-second",
|
22
|
+
href: "/legal/eula",
|
23
|
+
target: "_blank",
|
24
|
+
rel: "noopener noreferrer"
|
25
|
+
}, "End User License Agreement (EULA)", -1), I = { key: 0 }, L = { key: 1 }, Q = {
|
26
|
+
__name: "EnterPassword",
|
27
|
+
setup(T) {
|
28
|
+
const m = u(null), { t } = E({
|
29
|
+
useScope: "global",
|
30
|
+
...U
|
31
|
+
}), r = q(), f = v();
|
32
|
+
u("phone");
|
33
|
+
async function w() {
|
34
|
+
try {
|
35
|
+
await x(
|
36
|
+
m,
|
37
|
+
B,
|
38
|
+
s.user.password,
|
39
|
+
"Некорректный пароль"
|
40
|
+
);
|
41
|
+
} catch {
|
42
|
+
throw new Error();
|
43
|
+
}
|
44
|
+
r.query.method === "reset-password" && await h.updatePassword(s.user, r.query.type), r.query.method !== "reset-password" && await h.signup(s.user, r.query.type);
|
45
|
+
}
|
46
|
+
function _() {
|
47
|
+
f.push({
|
48
|
+
name: "User Profile",
|
49
|
+
params: {
|
50
|
+
_id: s.user._id
|
51
|
+
},
|
52
|
+
query: { afterAuth: "true" }
|
53
|
+
});
|
54
|
+
}
|
55
|
+
return (y, d) => (o(), a("section", V, [
|
56
|
+
p("h3", N, i(e(t)("almostDone")), 1),
|
57
|
+
e(r).query.method === "reset-password" ? (o(), a("p", R, i(e(t)("newPasswordPrompt")), 1)) : (o(), a("p", A, i(e(t)("registrationPasswordPrompt")), 1)),
|
58
|
+
p("div", S, [
|
59
|
+
l(c, {
|
60
|
+
field: s.user.password,
|
61
|
+
"onUpdate:field": d[0] || (d[0] = (n) => s.user.password = n),
|
62
|
+
type: "password",
|
63
|
+
validation: m.value,
|
64
|
+
placeholder: e(t)("passwordPlaceholder"),
|
65
|
+
class: "bg-light pd-small radius-small mn-b-thin"
|
66
|
+
}, null, 8, ["field", "validation", "placeholder"]),
|
67
|
+
l(c, {
|
68
|
+
field: s.user.passwordRepeat,
|
69
|
+
"onUpdate:field": d[1] || (d[1] = (n) => s.user.passwordRepeat = n),
|
70
|
+
type: "password",
|
71
|
+
placeholder: e(t)("repeatPasswordPlaceholder"),
|
72
|
+
class: "bg-light pd-small radius-small mn-b-thin"
|
73
|
+
}, null, 8, ["field", "placeholder"])
|
74
|
+
]),
|
75
|
+
e(r).query.method !== "reset-password" ? (o(), a("div", C, [
|
76
|
+
g(" By registering, you agree to our "),
|
77
|
+
D
|
78
|
+
])) : b("", !0),
|
79
|
+
l(k, {
|
80
|
+
submit: w,
|
81
|
+
callback: _,
|
82
|
+
class: "w-100 bg-main mn-b-big"
|
83
|
+
}, {
|
84
|
+
default: P(() => [
|
85
|
+
e(r).query.method === "reset-password" ? (o(), a("span", I, i(e(t)("changePasswordBtn")), 1)) : (o(), a("span", L, i(e(t)("registerBtn")), 1))
|
86
|
+
]),
|
87
|
+
_: 1
|
88
|
+
})
|
89
|
+
]));
|
90
|
+
}
|
91
|
+
};
|
92
|
+
export {
|
93
|
+
Q as default
|
94
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../../components/Field/Field.vue2.cjs"),m=require("../../../../../components/Button/Button.vue2.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../../organizations/store/invites.cjs"),d=require("../../validations/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
|
@@ -0,0 +1,82 @@
|
|
1
|
+
import { ref as u, onMounted as c, openBlock as f, createElementBlock as w, createElementVNode as s, createVNode as i, withCtx as _ } from "vue";
|
2
|
+
/* empty css */
|
3
|
+
import l from "../../../../../components/Field/Field.vue2.js";
|
4
|
+
import h from "../../../../../components/Button/Button.vue2.js";
|
5
|
+
import { useRoute as b, useRouter as v } from "vue-router";
|
6
|
+
import { state as e, actions as y } from "../../store/auth.js";
|
7
|
+
import { actions as g } from "../../../../organizations/store/invites.js";
|
8
|
+
import { validateInputs as P, validatePassword as R } from "../../validations/inputs.validation.js";
|
9
|
+
/* empty css */
|
10
|
+
const q = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "You have been invited to the organization", -1), x = /* @__PURE__ */ s("p", { class: "mn-b-semi t-transp" }, "Please provide a password to complete the registration.", -1), C = { class: "mn-b-semi radius-small o-hidden" }, E = /* @__PURE__ */ s("span", null, "Join", -1), M = {
|
11
|
+
__name: "Invite",
|
12
|
+
setup(U) {
|
13
|
+
const n = u(null), o = b(), d = v();
|
14
|
+
c(async () => {
|
15
|
+
await g.readOne(o.query.inviteCode);
|
16
|
+
});
|
17
|
+
async function p() {
|
18
|
+
try {
|
19
|
+
await P(
|
20
|
+
n,
|
21
|
+
R,
|
22
|
+
e.user.password,
|
23
|
+
"Некорректный пароль"
|
24
|
+
);
|
25
|
+
} catch {
|
26
|
+
throw new Error();
|
27
|
+
}
|
28
|
+
try {
|
29
|
+
await y.signup(e.user, o.query.type, o.query.inviteCode);
|
30
|
+
} catch (a) {
|
31
|
+
console.log(a);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
function m() {
|
35
|
+
d.push({
|
36
|
+
name: "User Profile",
|
37
|
+
params: {
|
38
|
+
_id: e.user._id
|
39
|
+
},
|
40
|
+
query: {
|
41
|
+
afterAuth: "true"
|
42
|
+
}
|
43
|
+
});
|
44
|
+
}
|
45
|
+
return (a, t) => (f(), w("section", q, [
|
46
|
+
k,
|
47
|
+
x,
|
48
|
+
s("div", C, [
|
49
|
+
i(l, {
|
50
|
+
field: e.user.password,
|
51
|
+
"onUpdate:field": t[0] || (t[0] = (r) => e.user.password = r),
|
52
|
+
type: "password",
|
53
|
+
validation: n.value,
|
54
|
+
label: "Password",
|
55
|
+
placeholder: "******",
|
56
|
+
class: "mn-b-thin bg-light pd-medium radius-small"
|
57
|
+
}, null, 8, ["field", "validation"]),
|
58
|
+
i(l, {
|
59
|
+
field: e.user.passwordRepeat,
|
60
|
+
"onUpdate:field": t[1] || (t[1] = (r) => e.user.passwordRepeat = r),
|
61
|
+
type: "password",
|
62
|
+
label: "Repeat Password",
|
63
|
+
placeholder: "******",
|
64
|
+
class: "bg-light pd-medium radius-small"
|
65
|
+
}, null, 8, ["field"])
|
66
|
+
]),
|
67
|
+
i(h, {
|
68
|
+
submit: p,
|
69
|
+
callback: m,
|
70
|
+
class: "w-100 bg-main mn-b-big"
|
71
|
+
}, {
|
72
|
+
default: _(() => [
|
73
|
+
E
|
74
|
+
]),
|
75
|
+
_: 1
|
76
|
+
})
|
77
|
+
]));
|
78
|
+
}
|
79
|
+
};
|
80
|
+
export {
|
81
|
+
M as default
|
82
|
+
};
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../../components/Field/Field.vue2.cjs"),v=require("../../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../../components/Button/Button.vue2.cjs"),u=require("vue-router"),b=require("vue-i18n"),g=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../validations/inputs.validation.cjs");;/* empty css */const w={class:"t-left pd-medium"},V={class:"mn-b-small"},N={class:"mn-b-small t-transp"},q={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},y={class:"pos-relative"},E={key:0,class:"mn-b-semi radius-small o-hidden"},C={class:"mn-b-small t-transp"},S={key:0,class:"mn-b-semi radius-small o-hidden"},k={class:"mn-b-small t-transp"},P={__name:"ResetPassword",setup(I){const{t}=b.useI18n({useScope:"global",...g.default}),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",w,[e.createElementVNode("h3",V,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",q,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",C,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{onChange:o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=P;
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
import { ref as d, openBlock as u, createElementBlock as p, createElementVNode as a, toDisplayString as r, unref as t, createVNode as l, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as C } from "vue";
|
2
|
+
import E from "../../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import I from "../../../../../components/Field/Field.vue2.js";
|
4
|
+
import P from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
+
import V from "../../../../../components/Button/Button.vue2.js";
|
6
|
+
import { useRoute as k, useRouter as x } from "vue-router";
|
7
|
+
import { useI18n as N } from "vue-i18n";
|
8
|
+
import S from "../../localization/ResetPassword.json.js";
|
9
|
+
import { state as i, actions as T } from "../../store/auth.js";
|
10
|
+
import "../../store/twofa.js";
|
11
|
+
import { validateInputs as b, validatePhone as D, validateEmail as O } from "../../validations/inputs.validation.js";
|
12
|
+
/* empty css */
|
13
|
+
const R = { class: "t-left pd-medium" }, $ = { class: "mn-b-small" }, B = { class: "mn-b-small t-transp" }, F = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, U = { class: "pos-relative" }, q = {
|
14
|
+
key: 0,
|
15
|
+
class: "mn-b-semi radius-small o-hidden"
|
16
|
+
}, A = { class: "mn-b-small t-transp" }, L = {
|
17
|
+
key: 0,
|
18
|
+
class: "mn-b-semi radius-small o-hidden"
|
19
|
+
}, j = { class: "mn-b-small t-transp" }, se = {
|
20
|
+
__name: "ResetPassword",
|
21
|
+
setup(z) {
|
22
|
+
const { t: e } = N({
|
23
|
+
useScope: "global",
|
24
|
+
...S
|
25
|
+
}), h = d(null), f = d(null);
|
26
|
+
k();
|
27
|
+
const w = x(), s = d("phone");
|
28
|
+
async function g() {
|
29
|
+
try {
|
30
|
+
s.value === "phone" && await b(
|
31
|
+
h,
|
32
|
+
D,
|
33
|
+
i.user.phone,
|
34
|
+
"Некорректный телефон"
|
35
|
+
), s.value === "email" && await b(
|
36
|
+
f,
|
37
|
+
O,
|
38
|
+
i.user.email,
|
39
|
+
"Некорректный email"
|
40
|
+
);
|
41
|
+
} catch {
|
42
|
+
throw new Error();
|
43
|
+
}
|
44
|
+
try {
|
45
|
+
await T.resetPassword(i.user, s.value, "reset-password");
|
46
|
+
} catch (m) {
|
47
|
+
throw console.log(m), new Error();
|
48
|
+
}
|
49
|
+
}
|
50
|
+
function y() {
|
51
|
+
w.push({ name: "Enter Code", query: { type: s.value, method: "reset-password" } });
|
52
|
+
}
|
53
|
+
return (m, o) => (u(), p("section", R, [
|
54
|
+
a("h3", $, r(t(e)("forgotPasswordTitle")), 1),
|
55
|
+
a("p", B, r(t(e)("instructions")), 1),
|
56
|
+
a("div", F, [
|
57
|
+
l(E, {
|
58
|
+
selected: s.value,
|
59
|
+
"onUpdate:selected": o[0] || (o[0] = (n) => s.value = n),
|
60
|
+
tabs: [
|
61
|
+
{ name: t(e)("phone"), value: "phone" },
|
62
|
+
{ name: t(e)("email"), value: "email" }
|
63
|
+
]
|
64
|
+
}, null, 8, ["selected", "tabs"])
|
65
|
+
]),
|
66
|
+
a("div", U, [
|
67
|
+
l(_, { name: "slide-fade" }, {
|
68
|
+
default: c(() => [
|
69
|
+
s.value === "phone" ? (u(), p("div", q, [
|
70
|
+
a("p", A, r(t(e)("smsInfo")), 1),
|
71
|
+
l(P, {
|
72
|
+
onChange: o[1] || (o[1] = (n) => i.user.phone = n),
|
73
|
+
dropdownOptions: {
|
74
|
+
showDialCodeInSelection: !0,
|
75
|
+
showFlags: !0,
|
76
|
+
showDialCodeInList: !0
|
77
|
+
},
|
78
|
+
validation: h.value,
|
79
|
+
mode: "national",
|
80
|
+
inputOptions: { placeholder: t(e)("phonePlaceholder") },
|
81
|
+
class: "bg-light pd-small radius-small mn-b-thin"
|
82
|
+
}, null, 8, ["validation", "inputOptions"])
|
83
|
+
])) : v("", !0)
|
84
|
+
]),
|
85
|
+
_: 1
|
86
|
+
}),
|
87
|
+
l(_, { name: "slide-fade" }, {
|
88
|
+
default: c(() => [
|
89
|
+
s.value === "email" ? (u(), p("div", L, [
|
90
|
+
a("p", j, r(t(e)("emailInfo")), 1),
|
91
|
+
l(I, {
|
92
|
+
field: i.user.email,
|
93
|
+
"onUpdate:field": o[2] || (o[2] = (n) => i.user.email = n),
|
94
|
+
placeholder: t(e)("emailPlaceholder"),
|
95
|
+
validation: f.value,
|
96
|
+
class: "bg-light pd-medium radius-small"
|
97
|
+
}, null, 8, ["field", "placeholder", "validation"])
|
98
|
+
])) : v("", !0)
|
99
|
+
]),
|
100
|
+
_: 1
|
101
|
+
})
|
102
|
+
]),
|
103
|
+
l(V, {
|
104
|
+
submit: g,
|
105
|
+
callback: y,
|
106
|
+
class: "mn-b-big"
|
107
|
+
}, {
|
108
|
+
default: c(() => [
|
109
|
+
C(r(t(e)("sendCode")), 1)
|
110
|
+
]),
|
111
|
+
_: 1
|
112
|
+
})
|
113
|
+
]));
|
114
|
+
}
|
115
|
+
};
|
116
|
+
export {
|
117
|
+
se as default
|
118
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../../components/Tab/Tab.vue2.cjs"),m=require("../../../../../components/Field/Field.vue2.cjs"),w=require("../../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../../components/Button/Button.vue2.cjs"),h=require("vue-router"),N=require("vue-i18n"),y=require("../../localization/SignIn.json.cjs"),s=require("../../store/auth.cjs"),r=require("../../validations/inputs.validation.cjs");;/* empty css */const S={class:""},q=e.createElementVNode("img",{src:"/logo/logo.svg",class:"i-extra radius-small mn-b-small"},null,-1),E={class:"mn-b-medium"},x=e.createElementVNode("br",null,null,-1),C={class:"t-semi"},D={class:"mn-b-big"},P={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},T={class:"pos-relative"},I={class:"mn-b-thin radius-small"},U={class:"mn-b-thin radius-small o-hidden"},k={class:"w-100 mn-b-big"},O={__name:"SignIn",setup(j){const d=e.ref(null),f=e.ref(null),u=e.ref(null),c=h.useRoute(),p=h.useRouter(),{t:l}=N.useI18n({useScope:"global",...y.default}),n=e.ref("phone"),v=o=>new Promise((a,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=a,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await v("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function _(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,s.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}const o={...s.state.user};await s.actions.login(o,n.value)}function g(){c.query.returnUrl?p.push({path:c.query.returnUrl,query:{afterAuth:"true"}}):p.push({name:"User Profile",params:{_id:s.state.user._id},query:{afterAuth:"true"}})}return(o,a)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",S,[q,e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),x,e.createElementVNode("span",C,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",D,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",P,[e.createVNode(b.default,{selected:n.value,"onUpdate:selected":a[0]||(a[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",T,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(w.default,{onChange:a[1]||(a[1]=t=>s.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validCharactersOnly:!0,validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder"),type:"tel"},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",U,[e.createVNode(m.default,{field:s.state.user.email,"onUpdate:field":a[2]||(a[2]=t=>s.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(m.default,{field:s.state.user.password,"onUpdate:field":a[3]||(a[3]=t=>s.state.user.password=t),type:"password",validation:f.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-light pd-medium radius-small mn-b-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",k,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(V.default,{submit:_,callback:g,class:"w-100 bg-main mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=O;
|
@@ -0,0 +1,168 @@
|
|
1
|
+
import { ref as p, onMounted as k, resolveComponent as E, openBlock as V, createElementBlock as I, createElementVNode as s, createTextVNode as c, toDisplayString as r, unref as l, createVNode as o, withCtx as d, Transition as b, withDirectives as g, vShow as w } from "vue";
|
2
|
+
import q from "../../../../../components/Tab/Tab.vue2.js";
|
3
|
+
import y from "../../../../../components/Field/Field.vue2.js";
|
4
|
+
import D from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
+
import O from "../../../../../components/Button/Button.vue2.js";
|
6
|
+
import { useRoute as j, useRouter as A } from "vue-router";
|
7
|
+
import { useI18n as N } from "vue-i18n";
|
8
|
+
import T from "../../localization/SignIn.json.js";
|
9
|
+
import { state as i, actions as $ } from "../../store/auth.js";
|
10
|
+
import { validateInputs as S, validatePhone as B, validateEmail as F } from "../../validations/inputs.validation.js";
|
11
|
+
/* empty css */
|
12
|
+
const R = { class: "" }, L = /* @__PURE__ */ s("img", {
|
13
|
+
src: "/logo/logo.svg",
|
14
|
+
class: "i-extra radius-small mn-b-small"
|
15
|
+
}, null, -1), M = { class: "mn-b-medium" }, z = /* @__PURE__ */ s("br", null, null, -1), G = { class: "t-semi" }, H = { class: "mn-b-big" }, J = { class: "mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden" }, K = { class: "pos-relative" }, Q = { class: "mn-b-thin radius-small" }, W = { class: "mn-b-thin radius-small o-hidden" }, X = { class: "w-100 mn-b-big" }, ue = {
|
16
|
+
__name: "SignIn",
|
17
|
+
setup(Y) {
|
18
|
+
const h = p(null), x = p(null), f = p(null), _ = j(), v = A(), { t: a } = N({
|
19
|
+
useScope: "global",
|
20
|
+
...T
|
21
|
+
}), n = p("phone"), C = (u) => new Promise((t, m) => {
|
22
|
+
const e = document.createElement("script");
|
23
|
+
e.type = "text/javascript", e.src = u, e.onload = t, e.onerror = m, document.head.appendChild(e);
|
24
|
+
});
|
25
|
+
k(async () => {
|
26
|
+
await C("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
27
|
+
});
|
28
|
+
async function U() {
|
29
|
+
try {
|
30
|
+
n.value === "phone" && await S(
|
31
|
+
h,
|
32
|
+
B,
|
33
|
+
i.user.phone,
|
34
|
+
"Некорректный телефон"
|
35
|
+
), n.value === "email" && await S(
|
36
|
+
f,
|
37
|
+
F,
|
38
|
+
i.user.email,
|
39
|
+
"Некорректный email"
|
40
|
+
);
|
41
|
+
} catch {
|
42
|
+
throw new Error();
|
43
|
+
}
|
44
|
+
const u = { ...i.user };
|
45
|
+
await $.login(u, n.value);
|
46
|
+
}
|
47
|
+
function P() {
|
48
|
+
_.query.returnUrl ? v.push({
|
49
|
+
path: _.query.returnUrl,
|
50
|
+
query: {
|
51
|
+
afterAuth: "true"
|
52
|
+
}
|
53
|
+
}) : v.push({
|
54
|
+
name: "User Profile",
|
55
|
+
params: {
|
56
|
+
_id: i.user._id
|
57
|
+
},
|
58
|
+
query: {
|
59
|
+
afterAuth: "true"
|
60
|
+
}
|
61
|
+
});
|
62
|
+
}
|
63
|
+
return (u, t) => {
|
64
|
+
const m = E("router-link");
|
65
|
+
return V(), I("section", R, [
|
66
|
+
L,
|
67
|
+
s("h3", M, [
|
68
|
+
c(r(l(a)("title")) + " ", 1),
|
69
|
+
z,
|
70
|
+
s("span", G, r(l(a)("subtitle")), 1)
|
71
|
+
]),
|
72
|
+
s("p", H, [
|
73
|
+
o(m, {
|
74
|
+
to: { name: "Sign Up" },
|
75
|
+
class: "underline t-second"
|
76
|
+
}, {
|
77
|
+
default: d(() => [
|
78
|
+
c(r(l(a)("signup")), 1)
|
79
|
+
]),
|
80
|
+
_: 1
|
81
|
+
})
|
82
|
+
]),
|
83
|
+
s("div", J, [
|
84
|
+
o(q, {
|
85
|
+
selected: n.value,
|
86
|
+
"onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
|
87
|
+
tabs: [
|
88
|
+
{ name: l(a)("phone"), value: "phone" },
|
89
|
+
{ name: l(a)("email"), value: "email" }
|
90
|
+
]
|
91
|
+
}, null, 8, ["selected", "tabs"])
|
92
|
+
]),
|
93
|
+
s("div", K, [
|
94
|
+
o(b, { name: "slide-fade" }, {
|
95
|
+
default: d(() => [
|
96
|
+
g(s("div", Q, [
|
97
|
+
o(D, {
|
98
|
+
onChange: t[1] || (t[1] = (e) => i.user.phone = e),
|
99
|
+
dropdownOptions: {
|
100
|
+
showDialCodeInSelection: !0,
|
101
|
+
showFlags: !0,
|
102
|
+
showDialCodeInList: !0
|
103
|
+
},
|
104
|
+
validCharactersOnly: !0,
|
105
|
+
validation: h.value,
|
106
|
+
mode: "national",
|
107
|
+
inputOptions: { placeholder: l(a)("phonePlaceholder"), type: "tel" },
|
108
|
+
class: "bg-light pd-small radius-small mn-b-thin"
|
109
|
+
}, null, 8, ["validation", "inputOptions"])
|
110
|
+
], 512), [
|
111
|
+
[w, n.value === "phone"]
|
112
|
+
])
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}),
|
116
|
+
o(b, { name: "slide-fade" }, {
|
117
|
+
default: d(() => [
|
118
|
+
g(s("div", W, [
|
119
|
+
o(y, {
|
120
|
+
field: i.user.email,
|
121
|
+
"onUpdate:field": t[2] || (t[2] = (e) => i.user.email = e),
|
122
|
+
placeholder: l(a)("emailPlaceholder"),
|
123
|
+
validation: f.value,
|
124
|
+
class: "bg-light pd-medium radius-small"
|
125
|
+
}, null, 8, ["field", "placeholder", "validation"])
|
126
|
+
], 512), [
|
127
|
+
[w, n.value === "email"]
|
128
|
+
])
|
129
|
+
]),
|
130
|
+
_: 1
|
131
|
+
})
|
132
|
+
]),
|
133
|
+
o(y, {
|
134
|
+
field: i.user.password,
|
135
|
+
"onUpdate:field": t[3] || (t[3] = (e) => i.user.password = e),
|
136
|
+
type: "password",
|
137
|
+
validation: x.value,
|
138
|
+
placeholder: l(a)("passwordPlaceholder"),
|
139
|
+
class: "bg-light pd-medium radius-small mn-b-semi"
|
140
|
+
}, null, 8, ["field", "validation", "placeholder"]),
|
141
|
+
s("div", X, [
|
142
|
+
o(m, {
|
143
|
+
to: "/auth/reset-password",
|
144
|
+
class: "underline d-block t-blue"
|
145
|
+
}, {
|
146
|
+
default: d(() => [
|
147
|
+
c(r(l(a)("forgotPassword")), 1)
|
148
|
+
]),
|
149
|
+
_: 1
|
150
|
+
})
|
151
|
+
]),
|
152
|
+
o(O, {
|
153
|
+
submit: U,
|
154
|
+
callback: P,
|
155
|
+
class: "w-100 bg-main mn-b-thin"
|
156
|
+
}, {
|
157
|
+
default: d(() => [
|
158
|
+
c(r(l(a)("signin")), 1)
|
159
|
+
]),
|
160
|
+
_: 1
|
161
|
+
})
|
162
|
+
]);
|
163
|
+
};
|
164
|
+
}
|
165
|
+
};
|
166
|
+
export {
|
167
|
+
ue as default
|
168
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../../components/Field/Field.vue2.cjs"),_=require("../../../../../components/FieldPhone/FieldPhone.vue.cjs"),b=require("../../../../../components/Button/Button.vue2.cjs"),d=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),l=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),i=require("../../validations/inputs.validation.cjs");;/* empty css */const V={class:"t-left pd-medium"},S={class:"mn-b-small"},E={class:"mn-b-small p-small uppercase t-semi bg-light radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-b-semi radius-small"},y={class:"mn-b-small t-transp"},D={class:"mn-b-semi radius-small o-hidden"},x={class:"mn-b-small t-transp"},T={class:"w-100"},k={__name:"SignUp",setup(I){const{t}=g.useI18n({useScope:"global",...w.default}),s=e.ref(null),r=e.ref(null);d.useRoute();const c=d.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await i.validateInputs(s,i.validatePhone,l.state.user.phone,"Некорректный телефон"),a.value==="email"&&await i.validateInputs(r,i.validateEmail,l.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(l.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(u,n)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",V,[e.createElementVNode("h3",S,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("div",E,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",y,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{onChange:n[1]||(n[1]=o=>l.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:s.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-light pd-small radius-small mn-b-thin"},null,8,["validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",D,[e.createElementVNode("p",x,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:l.state.user.email,"onUpdate:field":n[2]||(n[2]=o=>l.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-light pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(b.default,{submit:m,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",T,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-b-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=k;
|