@ozdao/prometheus-framework 0.2.221 → 0.2.223
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +4 -4
- package/dist/auth.server.mjs +4 -4
- package/dist/builder.js +72 -60
- package/dist/builder.mjs +72 -60
- package/dist/community.server.js +9 -4
- package/dist/community.server.mjs +9 -4
- package/dist/events.server.js +14 -24
- package/dist/events.server.mjs +14 -24
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +42 -76
- package/dist/gallery.server.mjs +41 -75
- package/dist/index-CsS7qx1d.js +243 -0
- package/dist/index-UIHE6Rk3.mjs +244 -0
- package/dist/main.css +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
- package/dist/orders.server.js +2 -2
- package/dist/orders.server.mjs +2 -2
- package/dist/organizations.server.js +174 -95
- package/dist/organizations.server.mjs +174 -95
- package/dist/pages.server.js +1 -1
- package/dist/pages.server.mjs +1 -1
- package/dist/products.server.js +119 -266
- package/dist/products.server.mjs +119 -266
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +26 -41
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +13 -9
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +14 -10
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +53 -40
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +58 -45
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +47 -43
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +47 -43
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
- package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +29 -54
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +30 -55
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +163 -134
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +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 +124 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
- package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
- package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- 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/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +807 -801
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +807 -801
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
- 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 +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/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 +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.cjs.map +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/Product.vue.js.map +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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
- package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
- package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
- package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +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 +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
- package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
- package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +17 -17
- package/dist/prometheus-framework.es.js +1790 -1790
- package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
- package/dist/queryProcessor-CcsJEUBr.js +196 -0
- package/dist/spots.server.js +1 -1
- package/dist/spots.server.mjs +1 -1
- package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
- package/dist/verifyAccesses-BvLnOtBN.js +89 -0
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +2 -2
- package/src/builder/modes/ssr.prod.js +4 -4
- package/src/builder/ssr/ssr-render-html.js +11 -13
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/page.js +4 -0
- package/src/builder/webpack/webpack.config.client.js +9 -6
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/components/Button/Button.vue +0 -1
- package/src/components/Feed/Feed.vue +34 -55
- package/src/components/FieldTags/BlockTags.vue +0 -1
- package/src/components/UploadImage/UploadImage.vue +2 -1
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
- package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
- package/src/modules/auth/controllers/services/auth.service.js +1 -0
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
- package/src/modules/auth/views/middlewares/ownership.validation.js +60 -0
- package/src/modules/auth/views/store/auth.js +43 -39
- package/src/modules/auth/views/store/twofa.js +2 -5
- package/src/modules/auth/views/validations/inputs.validation.js +12 -6
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
- package/src/modules/community/components/layouts/Community.vue +7 -9
- package/src/modules/community/components/pages/BlogPost.vue +122 -123
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/Comments.vue +5 -5
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/models/blogpost.model.js +1 -1
- package/src/modules/community/router/blogposts.js +40 -33
- package/src/modules/community/routes/blog.routes.js +4 -0
- package/src/modules/community/store/blogposts.js +11 -19
- package/src/modules/community/store/reactions.js +1 -7
- package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
- package/src/modules/events/components/pages/EditEvent.vue +76 -59
- package/src/modules/events/components/pages/Event.vue +2 -15
- package/src/modules/events/components/pages/Events.vue +2 -1
- package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
- package/src/modules/events/components/sections/HeroEvent.vue +15 -17
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
- package/src/modules/events/router/events.js +11 -4
- package/src/modules/events/store/events.js +2 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
- package/src/modules/gallery/controllers/gallery.controller.js +30 -31
- package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
- package/src/modules/gallery/routes/gallery.routes.js +22 -4
- package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
- package/src/modules/globals/globals.client.js +2 -0
- package/src/modules/globals/views/classes/globals.store.js +4 -3
- package/src/modules/globals/views/components/blocks/Card.vue +56 -0
- package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
- package/src/modules/globals/views/components/layouts/App.vue +1 -0
- package/src/modules/globals/views/components/layouts/Client.vue +0 -30
- package/src/modules/globals/views/store/globals.js +4 -2
- package/src/modules/globals/views/utils/axios-instance.js +18 -0
- package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
- package/src/modules/landing/components/pages/Governance.vue +4 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
- package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
- package/src/modules/landing/router/landing.js +2 -1
- package/src/modules/orders/store/orders.js +1 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
- package/src/modules/organizations/controllers/organizations.controller.js +28 -35
- package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
- package/src/modules/organizations/models/department.model.js +3 -86
- package/src/modules/organizations/models/organization.model.js +6 -4
- package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
- package/src/modules/organizations/router/organizations.js +2 -0
- package/src/modules/organizations/store/departments.js +6 -6
- package/src/modules/organizations/store/organizations.js +2 -16
- package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
- package/src/modules/products/components/blocks/CardProduct.vue +2 -0
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/sections/MenuSection.vue +2 -2
- package/src/modules/products/controllers/products.controller.js +201 -367
- package/src/modules/products/routes/products.routes.js +0 -5
- package/src/modules/products/store/categories.js +1 -2
- package/src/modules/products/store/leftovers.js +1 -2
- package/src/modules/products/store/products.js +1 -13
- package/src/modules/reports/components/sections/FormReport.vue +20 -20
- package/src/modules/spots/store/spots.js +1 -6
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/router/users.js +2 -2
- package/src/modules/users/store/users.js +1 -3
- package/src/styles/base/all.scss +0 -2
- package/src/styles/config.scss +6 -0
- package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
- package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -1,10 +1,9 @@
|
|
1
1
|
import { ref, computed, openBlock, createElementBlock, createVNode, Fragment, renderList, normalizeClass, toDisplayString, createElementVNode } from "vue";
|
2
2
|
import FieldTags from "./FieldTags.vue.js";
|
3
3
|
/* empty css */
|
4
|
-
const _hoisted_1 = /* @__PURE__ */ createElementVNode("
|
5
|
-
const _hoisted_2 =
|
6
|
-
const _hoisted_3 =
|
7
|
-
const _hoisted_4 = { key: 1 };
|
4
|
+
const _hoisted_1 = /* @__PURE__ */ createElementVNode("p", { class: "p-small mn-b-thin" }, "Suggested:", -1);
|
5
|
+
const _hoisted_2 = ["onClick"];
|
6
|
+
const _hoisted_3 = { key: 1 };
|
8
7
|
const _sfc_main = {
|
9
8
|
__name: "BlockTags",
|
10
9
|
props: {
|
@@ -54,7 +53,6 @@ const _sfc_main = {
|
|
54
53
|
}
|
55
54
|
return (_ctx, _cache) => {
|
56
55
|
return openBlock(), createElementBlock("div", null, [
|
57
|
-
_hoisted_1,
|
58
56
|
createVNode(FieldTags, {
|
59
57
|
modelValue: tag.value,
|
60
58
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => tag.value = $event),
|
@@ -71,13 +69,13 @@ const _sfc_main = {
|
|
71
69
|
onTagsChanged: handleTagsChanged,
|
72
70
|
class: "mn-b-thin bg-light radius-medium pd-small"
|
73
71
|
}, null, 8, ["modelValue", "tags", "autocomplete-items"]),
|
74
|
-
|
72
|
+
_hoisted_1,
|
75
73
|
filteredSuggestedItems.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(filteredSuggestedItems.value, (tag2, index) => {
|
76
74
|
return openBlock(), createElementBlock("span", {
|
77
75
|
onClick: ($event) => addTag(tag2),
|
78
76
|
class: normalizeClass(["cursor-pointer t-medium ti-tag-toDefactor", { "mn-r-micro": index !== filteredSuggestedItems.value.length - 1 }])
|
79
|
-
}, toDisplayString(tag2.text), 11,
|
80
|
-
}), 256)) : (openBlock(), createElementBlock("span",
|
77
|
+
}, toDisplayString(tag2.text), 11, _hoisted_2);
|
78
|
+
}), 256)) : (openBlock(), createElementBlock("span", _hoisted_3, "You added all suggested tags"))
|
81
79
|
]);
|
82
80
|
};
|
83
81
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BlockTags.vue.js","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <
|
1
|
+
{"version":3,"file":"BlockTags.vue.js","sources":["../../../../../src/components/FieldTags/BlockTags.vue"],"sourcesContent":["<template>\n <div>\n <FieldTags\n v-model=\"tag\"\n :tags=\"selectedTags\"\n :autocomplete-items=\"filteredItems\"\n :add-on-key=\"[13, ':', ';', ',']\"\n :save-on-key=\"[13, ':', ';', ',']\"\n :separators=\"[';', ',']\"\n :max-tags=\"20\"\n :maxlength=\"20\"\n :placeholder=\"'Please add tags'\"\n :add-from-paste=\"true\"\n :allow-edit-tags=\"true\"\n @tags-changed=\"handleTagsChanged\"\n class=\"mn-b-thin bg-light radius-medium pd-small\"\n />\n\n <p class=\"p-small mn-b-thin\">Suggested:</p>\n\n <span \n v-if=\"filteredSuggestedItems.length > 0\" \n v-for=\"(tag,index) in filteredSuggestedItems\" \n @click=\"addTag(tag)\"\n class=\"cursor-pointer t-medium ti-tag-toDefactor\"\n :class=\"{'mn-r-micro':index !== filteredSuggestedItems.length - 1}\"\n >\n {{ tag.text }}\n </span>\n <span v-else>You added all suggested tags</span> \n </div>\n</template>\n\n<script setup>\nimport FieldTags from '@pf/src/components/FieldTags/FieldTags.vue'\nimport { ref, computed, onMounted } from 'vue';\n\nconst emits = defineEmits(['tags-changed']);\nconst props = defineProps({\n tags: {\n type: Array\n },\n tagsSuggested: {\n type: Array,\n default: [\n { text: 'story' },\n { text: 'news' },\n { text: 'guide' },\n { text: 'discussion' },\n { text: 'photos' },\n ]\n }\n});\n\nconst tag = ref('');\n\nconst selectedTags = ref([]);\n\nconst autocompleteItems = ref(props.tagsSuggested);\n\nif (props.tags) selectedTags.value = props.tags.map(tag => ({text: tag}))\n \n\nconst filteredItems = computed(() => {\n return autocompleteItems.value.filter(i => {\n return i.text.toLowerCase().includes(tag.value.toLowerCase());\n });\n});\n\nconst filteredSuggestedItems = computed(() => {\n return autocompleteItems.value.filter(item => {\n return !selectedTags.value.some(tag => tag.text === item.text);\n });\n })\n\nfunction addTag (tag) {\n selectedTags.value.push(tag)\n emits('tags-changed', selectedTags.value.map(tag => { return tag.text }));\n}\n\nfunction handleTagsChanged(newTags) {\n selectedTags.value = newTags;\n emits('tags-changed', selectedTags.value.map(tag => { return tag.text }));\n}\n\n\n\n</script>\n\n<style>\n .ti-tag-toDefactor {\n background-color: rgb(var(--main));\n color: rgb(var(--black));\n border-radius: 4rem;\n padding: 1px 8px 2px;\n margin: 2px;\n font-size: .85em;\n }\n</style>"],"names":["tag"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,UAAM,QAAQ;AACd,UAAM,QAAQ;AAgBd,UAAM,MAAM,IAAI,EAAE;AAElB,UAAM,eAAe,IAAI,CAAA,CAAE;AAE3B,UAAM,oBAAoB,IAAI,MAAM,aAAa;AAEjD,QAAI,MAAM,KAAM,cAAa,QAAQ,MAAM,KAAK,IAAI,CAAAA,UAAQ,EAAC,MAAMA,KAAG,EAAE;AAGxE,UAAM,gBAAgB,SAAS,MAAM;AACnC,aAAO,kBAAkB,MAAM,OAAO,OAAK;AACzC,eAAO,EAAE,KAAK,YAAa,EAAC,SAAS,IAAI,MAAM,YAAW,CAAE;AAAA,MAChE,CAAG;AAAA,IACH,CAAC;AAED,UAAM,yBAAyB,SAAS,MAAM;AAC1C,aAAO,kBAAkB,MAAM,OAAO,UAAQ;AAC5C,eAAO,CAAC,aAAa,MAAM,KAAK,CAAAA,SAAOA,KAAI,SAAS,KAAK,IAAI;AAAA,MACnE,CAAK;AAAA,IACL,CAAG;AAEH,aAAS,OAAQA,MAAK;AACpB,mBAAa,MAAM,KAAKA,IAAG;AAC3B,YAAM,gBAAgB,aAAa,MAAM,IAAI,CAAAA,SAAO;AAAE,eAAOA,KAAI;AAAA,MAAM,CAAA,CAAC;AAAA,IAC1E;AAEA,aAAS,kBAAkB,SAAS;AAClC,mBAAa,QAAQ;AACrB,YAAM,gBAAgB,aAAa,MAAM,IAAI,CAAAA,SAAO;AAAE,eAAOA,KAAI;AAAA,MAAM,CAAA,CAAC;AAAA,IAC1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -5,7 +5,7 @@ const vueRouter = require("vue-router");
|
|
5
5
|
require("vue-i18n");
|
6
6
|
const emblaCarouselVue_esm = require("../../../../node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.cjs");
|
7
7
|
const emblaCarouselAutoplay_esm = require("../../../../node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.cjs");
|
8
|
-
;/* empty css
|
8
|
+
;/* empty css */
|
9
9
|
const _hoisted_1 = { class: "embla__container" };
|
10
10
|
const _sfc_main = {
|
11
11
|
__name: "Slider",
|
@@ -3,7 +3,7 @@ import { useRouter } from "vue-router";
|
|
3
3
|
import "vue-i18n";
|
4
4
|
import emblaCarouselVue from "../../../../node_modules/embla-carousel-vue/esm/embla-carousel-vue.esm.js";
|
5
5
|
import Autoplay from "../../../../node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";
|
6
|
-
/* empty css
|
6
|
+
/* empty css */
|
7
7
|
const _hoisted_1 = { class: "embla__container" };
|
8
8
|
const _sfc_main = {
|
9
9
|
__name: "Slider",
|
@@ -31,7 +31,7 @@ const _sfc_main = {
|
|
31
31
|
"photo"
|
32
32
|
// new prop for holding the image url
|
33
33
|
],
|
34
|
-
emits: ["update:photo"],
|
34
|
+
emits: ["update:photo", "error"],
|
35
35
|
setup(__props, { emit: __emit }) {
|
36
36
|
const imageUrl = vue.ref(null);
|
37
37
|
const fileInput = vue.ref(null);
|
@@ -59,6 +59,7 @@ const _sfc_main = {
|
|
59
59
|
imageUrl.value = response.data[0].filepath;
|
60
60
|
emit("update:photo", imageUrl.value);
|
61
61
|
} catch (error) {
|
62
|
+
emit("error", error);
|
62
63
|
console.error("Upload error:", error);
|
63
64
|
}
|
64
65
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UploadImage.vue.cjs","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":["ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAWA,IAAAA,IAAI,IAAI;AACzB,UAAM,YAAYA,IAAAA,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEbC,QAAAA,MAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM;IAClB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACD;AAED,UAAI,WAAW,IAAI;AACnB,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAM,CAAA;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACpC,SAAQ,OAAO;AACd,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACrC;AAAA,IACH;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QACvB;AAAA,MACL,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"UploadImage.vue.cjs","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo', 'error']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":["ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAWA,IAAAA,IAAI,IAAI;AACzB,UAAM,YAAYA,IAAAA,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEbC,QAAAA,MAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM;IAClB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACD;AAED,UAAI,WAAW,IAAI;AACnB,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAM,CAAA;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACpC,SAAQ,OAAO;AACd,aAAK,SAAS,KAAK;AACnB,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACrC;AAAA,IACH;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QACvB;AAAA,MACL,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -29,7 +29,7 @@ const _sfc_main = {
|
|
29
29
|
"photo"
|
30
30
|
// new prop for holding the image url
|
31
31
|
],
|
32
|
-
emits: ["update:photo"],
|
32
|
+
emits: ["update:photo", "error"],
|
33
33
|
setup(__props, { emit: __emit }) {
|
34
34
|
const imageUrl = ref(null);
|
35
35
|
const fileInput = ref(null);
|
@@ -57,6 +57,7 @@ const _sfc_main = {
|
|
57
57
|
imageUrl.value = response.data[0].filepath;
|
58
58
|
emit("update:photo", imageUrl.value);
|
59
59
|
} catch (error) {
|
60
|
+
emit("error", error);
|
60
61
|
console.error("Upload error:", error);
|
61
62
|
}
|
62
63
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UploadImage.vue.js","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAW,IAAI,IAAI;AACzB,UAAM,YAAY,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEb,UAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM;IAClB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACD;AAED,UAAI,WAAW,IAAI;AACnB,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAM,CAAA;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACpC,SAAQ,OAAO;AACd,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACrC;AAAA,IACH;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QACvB;AAAA,MACL,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"UploadImage.vue.js","sources":["../../../../../src/components/UploadImage/UploadImage.vue"],"sourcesContent":["<template>\n <div \n @click=\"onComponentClick\"\n @drop=\"onDrop\"\n @dragover.prevent\n class=\"image-upload-area flex-v-center flex-h-center flex\">\n <img loading=\"lazy\" \n v-if=\"imageUrl || photo\" \n :src=\"(FILE_SERVER_URL || '') + (imageUrl || photo)\"\n alt=\"Uploaded image\" \n class=\"w-100 h-100 object-fit-cover\"\n />\n \n <div v-else class=\"flex-v-center flex-h-center flex w-100 h-100 bg-second\" >\n <svg class=\"i-medium\" width=\"104\" height=\"104\" viewBox=\"0 0 104 104\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill=\"rgb(var(--white))\" d=\"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z\"/>\n </svg>\n </div>\n \n <input type=\"file\" name=\"file\" ref=\"fileInput\" @change=\"onFileChange\" style=\"display: none\"/>\n </div>\n</template>\n\n<script setup>\nimport { ref, watch } from 'vue';\nimport axios from 'axios';\n\nconst imageUrl = ref(null);\nconst fileInput = ref(null);\n\nconst props = defineProps([\n 'uploadPath', // only necessary prop\n 'photo' // new prop for holding the image url\n]);\n\nconst emit = defineEmits(['update:photo', 'error']);\n\nwatch(props, ({photo}) => {\n if(photo) imageUrl.value = photo;\n});\n\nfunction onComponentClick() {\n fileInput.value.click();\n}\n\nasync function onFileChange(e) {\n let file = e.target.files[0];\n if (!file) {\n console.error(\"No file selected\");\n return;\n }\n \n let formData = new FormData();\n formData.append(\"file\", file);\n\n console.log(\"Sending file:\", file.name); // Логируем имя файла перед отправкой\n\n try {\n const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true }); \n\n let response = await $axios.post(`/api/upload/multiple?folderName=${encodeURIComponent(props.uploadPath)}`, formData);\n console.log(\"Upload response:\", response); // Логируем ответ сервера\n imageUrl.value = response.data[0].filepath;\n emit('update:photo', imageUrl.value);\n } catch (error) {\n emit('error', error);\n console.error(\"Upload error:\", error); // Логируем ошибку\n }\n}\n\n\nfunction onDrop(e) {\n e.preventDefault();\n onFileChange({\n target: {\n files: e.dataTransfer.files\n }\n });\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,UAAM,WAAW,IAAI,IAAI;AACzB,UAAM,YAAY,IAAI,IAAI;AAE1B,UAAM,QAAQ;AAKd,UAAM,OAAO;AAEb,UAAM,OAAO,CAAC,EAAC,MAAK,MAAM;AACxB,UAAG,MAAO,UAAS,QAAQ;AAAA,IAC7B,CAAC;AAED,aAAS,mBAAmB;AAC1B,gBAAU,MAAM;IAClB;AAEA,mBAAe,aAAa,GAAG;AAC7B,UAAI,OAAO,EAAE,OAAO,MAAM,CAAC;AAC3B,UAAI,CAAC,MAAM;AACT,gBAAQ,MAAM,kBAAkB;AAChC;AAAA,MACD;AAED,UAAI,WAAW,IAAI;AACnB,eAAS,OAAO,QAAQ,IAAI;AAE5B,cAAQ,IAAI,iBAAiB,KAAK,IAAI;AAEtC,UAAI;AACF,cAAM,SAAS,MAAM,OAAO,EAAE,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAM,CAAA;AAEnF,YAAI,WAAW,MAAM,OAAO,KAAK,mCAAmC,mBAAmB,MAAM,UAAU,CAAC,IAAI,QAAQ;AACpH,gBAAQ,IAAI,oBAAoB,QAAQ;AACxC,iBAAS,QAAQ,SAAS,KAAK,CAAC,EAAE;AAClC,aAAK,gBAAgB,SAAS,KAAK;AAAA,MACpC,SAAQ,OAAO;AACd,aAAK,SAAS,KAAK;AACnB,gBAAQ,MAAM,iBAAiB,KAAK;AAAA,MACrC;AAAA,IACH;AAGA,aAAS,OAAO,GAAG;AACjB,QAAE,eAAc;AAChB,mBAAa;AAAA,QACX,QAAQ;AAAA,UACN,OAAO,EAAE,aAAa;AAAA,QACvB;AAAA,MACL,CAAG;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const axios = require("axios");
|
5
|
-
const Loader = require("../Loader/Loader.
|
5
|
+
const Loader = require("../Loader/Loader.vue2.cjs");
|
6
6
|
const IconUpload = require("../../modules/icons/navigation/IconUpload.vue.cjs");
|
7
7
|
const _hoisted_1 = {
|
8
8
|
key: 0,
|
package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, withModifiers, createVNode, Transition, withCtx, toDisplayString, createCommentVNode, createBlock, createElementVNode } from "vue";
|
2
2
|
import axios from "axios";
|
3
|
-
import Loader from "../Loader/Loader.
|
3
|
+
import Loader from "../Loader/Loader.vue2.js";
|
4
4
|
import _sfc_main$1 from "../../modules/icons/navigation/IconUpload.vue.js";
|
5
5
|
const _hoisted_1 = {
|
6
6
|
key: 0,
|
@@ -2,8 +2,8 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
;/* empty css */
|
5
|
-
;/* empty css
|
6
|
-
;/* empty css
|
5
|
+
;/* empty css */
|
6
|
+
;/* empty css */
|
7
7
|
;/* empty css */
|
8
8
|
require("vue-i18n");
|
9
9
|
;/* empty css */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Transition, createBlock, resolveDynamicComponent, createElementVNode } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
4
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
|
+
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
import "vue-i18n";
|
7
7
|
/* empty css */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
4
|
+
;/* empty css */
|
5
5
|
const vueRouter = require("vue-router");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const auth = require("../../store/auth.cjs");
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive, watch, ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, withDirectives, vModelText } from "vue";
|
2
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
3
|
import { useRoute, useRouter } from "vue-router";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
import { state as state$1 } from "../../store/auth.js";
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
;/* empty css */
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
7
7
|
const vueRouter = require("vue-router");
|
8
8
|
const vueI18n = require("vue-i18n");
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, createTextVNode, createCommentVNode, withCtx } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
6
6
|
import { useI18n } from "vue-i18n";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
;/* empty css */
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
7
7
|
const vueRouter = require("vue-router");
|
8
8
|
const auth = require("../../store/auth.cjs");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, withCtx } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute, useRouter } from "vue-router";
|
6
6
|
import { state, actions as actions$1 } from "../../store/auth.js";
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Transition, withCtx, createCommentVNode, createTextVNode } from "vue";
|
2
2
|
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
@@ -67,6 +67,7 @@ const _sfc_main = {
|
|
67
67
|
"Некорректный email"
|
68
68
|
);
|
69
69
|
} catch (error) {
|
70
|
+
console.log(error);
|
70
71
|
throw new Error();
|
71
72
|
}
|
72
73
|
const userCopy = { ...auth.state.user };
|
package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SignIn.vue.cjs","sources":["../../../../../../../../src/modules/auth/views/components/pages/SignIn.vue"],"sourcesContent":["<template>\n\t<section class=\"\">\n\t\t<!-- Header -->\n\t\t<img loading=\"lazy\" :src=\"'/logo/logo.svg'\" class=\"i-extra radius-small mn-b-small\">\n\n\t\t<h3 class=\"mn-b-medium\">\n\t\t\t{{ t('title') }}\n\t\t\t<br>\n\t\t\t<span class=\"t-semi\">{{ t('subtitle') }}</span>\n\t\t</h3>\n\n\t\t<p class=\"mn-b-big\">\n\t\t\t<router-link :to=\"{name: 'Sign Up'}\" class=\"underline t-second\">{{ t('signup') }}</router-link>\n\t\t</p>\n\t\t\n\t\t\t<!-- Select -->\n\t\t<div class=\"mn-b-small p-small uppercase t-semi bg-light radius-small o-hidden\">\n\t\t\t<Tab \n\t\t\t\tv-model:selected=\"tabAuth\"\n\t\t\t\t:tabs=\"[\n\t\t\t\t\t{name: t('phone'), value: 'phone'},\n\t\t\t\t\t{name: t('email'), value: 'email'}\n\t\t\t\t]\"\n\t\t\t\ttabClass=\"pd-small pd-r-medium pd-l-medium w-100 pd-small radius-small\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Form -->\n\t\t<div class=\"pos-relative\">\n\t\t<!-- Phone -->\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'phone'\" class=\"mn-b-thin radius-small\">\n\t\t\t\t\t<FieldPhone\n\t\t\t\t\t\t@change=\"(event) => auth.state.user.phone = event\" \t\n\t\t\t\t\t\t:dropdownOptions=\"{\n\t\t\t\t\t\t\tshowDialCodeInSelection: true,\n\t\t\t\t\t\t\tshowFlags: true,\n\t\t\t\t\t\t\tshowDialCodeInList: true\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:validCharactersOnly=\"true\"\n\t\t\t\t\t\t:validation=\"phoneValidation\" \n\t\t\t\t\t\tmode=\"national\"\n\t\t\t\t\t\t:inputOptions=\"{placeholder: t('phonePlaceholder'), type: 'tel'}\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-small radius-small mn-b-thin\" \n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'email'\" class=\"mn-b-thin radius-small o-hidden\">\n\t\t\t\t\t<Field \n\t\t\t\t\t\tv-model:field=\"auth.state.user.email\" \t\n\t\t\t\t\t\t:placeholder=\"t('emailPlaceholder')\" \t\n\t\t\t\t\t\t:validation=\"emailValidation\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-medium radius-small\" \n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t</div>\n\n\t\t<!-- Password -->\n\t\t<Field \n\t\t\tv-model:field=\"auth.state.user.password\"\n\t\t\ttype=\"password\" \t\n\t\t\t:validation=\"passswordValidation\" \n\t\t\t:placeholder=\"t('passwordPlaceholder')\" \n\t\t\tclass=\"\n bg-light\n pd-medium\n radius-small\n mn-b-semi\n h-4r \n \"\n\t\t/>\n\t\t<!-- Links -->\n\t\t<div class=\"w-100 mn-b-big\">\n\t\t\t<router-link\n\t\t\t\tto=\"/auth/reset-password\" \n\t\t\t\tclass=\"underline d-block t-blue\"\n\t\t\t>\n\t\t\t\t{{ t('forgotPassword') }}\n\t\t\t</router-link>\n\t\t</div>\n\t\t<!-- Button -->\n\t\t<Button \n\t\t\t:submit=\"onSubmit\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"w-100 bg-main mn-b-thin\"\n\t\t>\n\t\t\t{{ t('signin') }}\n\t\t</Button>\n\t\t\n\t\t<!-- <Button \n\t\t\t:submit=\"onSubmitApple\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"mn-b-thin bg-black t-white\"\n\t\t>\n\t\t\t{{ t('signin_apple') }}\n\t\t</Button> -->\n\t</section> \n</template>\n\n<script setup>\n// Import components\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n// Import libs\nimport { computed, onMounted, ref, inject } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Import localization\nimport text from '@pf/src/modules/auth/views/localization/SignIn.json'\n// Import state\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\n// Import validation\nimport * as inputsValidation from '@pf/src/modules/auth/views/validations/inputs.validation'\n\n// Init validation\nconst phoneValidation = ref(null)\nconst passswordValidation = ref(null)\nconst emailValidation = ref(null)\n// Accessing router\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst { t } = useI18n({\n\tuseScope: 'global', \n\t...text\n})\n\n// Accessing state\nconst tabAuth = ref('phone')\n\nconst loadExternalScript = (src) => {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n}\n\nonMounted(async () => {\n\tawait loadExternalScript('https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js');\n});\n// Methods\nasync function onSubmit() {\n\ttry {\n\t if (tabAuth.value === 'phone') await inputsValidation.validateInputs(\n\t\t\tphoneValidation, \n\t\t\tinputsValidation.validatePhone, \n\t\t\tauth.state.user.phone, \n\t\t\t'Некорректный телефон'\n\t\t)\n\t\tif (tabAuth.value === 'email') await inputsValidation.validateInputs(\n\t\t\temailValidation, \n\t\t\tinputsValidation.validateEmail, \n\t\t\tauth.state.user.email, \n\t\t\t'Некорректный email'\n\t\t)\n\t} catch (error) {\n\t\tthrow new Error\n\t}\n\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\tconst userCopy = {...auth.state.user};\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\n \tawait auth.actions.login(userCopy, tabAuth.value)\n}\n\nasync function onSubmitApple() {\n try {\n window.AppleID.auth.init({\n clientId: 'com.thecommune.app.signin',\n scope: 'email name',\n redirectURI: 'https://thecommunephuket.com/auth/signin',\n usePopup: true,\n });\n\n let response = await window.AppleID.auth.signIn();\n\n if (response) {\n console.log(response);\n await auth.actions.login(response, 'apple');\n }\n\n } catch (error) {\n console.error(error);\n throw new Error('Error during Apple authentication');\n }\n}\n\n\nfunction redirectTo () {\n\tif (route.query.returnUrl) {\n\t\trouter.push({ \n\t\t\tpath: route.query.returnUrl,\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t} else { \n\t\trouter.push({ \n\t\t\tname: 'User Profile', \n\t\t\tparams: { \n\t\t\t\t_id: auth.state.user._id \n\t\t\t},\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t}\n}\n</script>\n\n<style lang=\"scss\">\n\t.soon-label {\n\t\tposition: absolute;\n\t\tright: -0.25em;\n\t\ttop: -0.25rem;\n\t\tpadding-left: 1rem;\n\t\tpadding-right: 1rem;\n\t\tline-height: 1.5rem;\n\t}\n\t.slide-fade-enter-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.slide-fade-leave-to {\n\n\t}\n\n\t.input-error {\n border: 1px solid red;\n box-shadow: 0 0 3px 0 red;\n}\n</style>"],"names":["ref","useRoute","useRouter","useI18n","text","onMounted","inputsValidation.validateInputs","inputsValidation.validatePhone","auth.state","inputsValidation.validateEmail","auth.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAM,kBAAkBA,IAAG,IAAC,IAAI;AAChC,UAAM,sBAAsBA,IAAG,IAAC,IAAI;AACpC,UAAM,kBAAkBA,IAAG,IAAC,IAAI;AAEhC,UAAM,QAAQC,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAE1B,UAAM,EAAE,EAAG,IAAGC,gBAAQ;AAAA,MACrB,UAAU;AAAA,MACV,GAAGC,OAAI;AAAA,IACR,CAAC;AAGD,UAAM,UAAUJ,IAAG,IAAC,OAAO;AAE3B,UAAM,qBAAqB,CAAC,QAAQ;AAClC,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,cAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,OAAO;AACd,eAAO,MAAM;AACb,eAAO,SAAS;AAChB,eAAO,UAAU;AACjB,iBAAS,KAAK,YAAY,MAAM;AAAA,MACpC,CAAG;AAAA,IACH;AAEAK,QAAAA,UAAU,YAAY;AACrB,YAAM,mBAAmB,sFAAsF;AAAA,IAChH,CAAC;AAED,mBAAe,WAAW;AACzB,UAAI;AACF,YAAI,QAAQ,UAAU,QAAS,OAAMC,kBAA+B;AAAA,UACpE;AAAA,UACAC,kBAA8B;AAAA,UAC9BC,KAAU,MAAC,KAAK;AAAA,UAChB;AAAA,QACA;AACD,YAAI,QAAQ,UAAU,QAAS,OAAMF,kBAA+B;AAAA,UACnE;AAAA,UACAG,kBAA8B;AAAA,UAC9BD,KAAU,MAAC,KAAK;AAAA,UAChB;AAAA,QACA;AAAA,MACD,SAAQ,OAAO;AACf,cAAM,IAAI;AAAA,MACV;AAGD,YAAM,WAAW,EAAC,GAAGA,KAAU,MAAC,KAAI;AAGnC,YAAME,KAAY,QAAC,MAAM,UAAU,QAAQ,KAAK;AAAA,IAClD;AAyBA,aAAS,aAAc;AACtB,UAAI,MAAM,MAAM,WAAW;AAC1B,eAAO,KAAK;AAAA,UACX,MAAM,MAAM,MAAM;AAAA,UAClB,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACH,OAAQ;AACN,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,KAAKF,KAAAA,MAAW,KAAK;AAAA,UACrB;AAAA,UACD,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACD;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"SignIn.vue.cjs","sources":["../../../../../../../../src/modules/auth/views/components/pages/SignIn.vue"],"sourcesContent":["<template>\n\t<section class=\"\">\n\t\t<!-- Header -->\n\t\t<img loading=\"lazy\" :src=\"'/logo/logo.svg'\" class=\"i-extra radius-small mn-b-small\">\n\n\t\t<h3 class=\"mn-b-medium\">\n\t\t\t{{ t('title') }}\n\t\t\t<br>\n\t\t\t<span class=\"t-semi\">{{ t('subtitle') }}</span>\n\t\t</h3>\n\n\t\t<p class=\"mn-b-big\">\n\t\t\t<router-link :to=\"{name: 'Sign Up'}\" class=\"underline t-second\">{{ t('signup') }}</router-link>\n\t\t</p>\n\t\t\n\t\t\t<!-- Select -->\n\t\t<div class=\"mn-b-small p-small uppercase t-semi bg-light radius-small o-hidden\">\n\t\t\t<Tab \n\t\t\t\tv-model:selected=\"tabAuth\"\n\t\t\t\t:tabs=\"[\n\t\t\t\t\t{name: t('phone'), value: 'phone'},\n\t\t\t\t\t{name: t('email'), value: 'email'}\n\t\t\t\t]\"\n\t\t\t\ttabClass=\"pd-small pd-r-medium pd-l-medium w-100 pd-small radius-small\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Form -->\n\t\t<div class=\"pos-relative\">\n\t\t<!-- Phone -->\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'phone'\" class=\"mn-b-thin radius-small\">\n\t\t\t\t\t<FieldPhone\n\t\t\t\t\t\t@change=\"(event) => auth.state.user.phone = event\" \t\n\t\t\t\t\t\t:dropdownOptions=\"{\n\t\t\t\t\t\t\tshowDialCodeInSelection: true,\n\t\t\t\t\t\t\tshowFlags: true,\n\t\t\t\t\t\t\tshowDialCodeInList: true\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:validCharactersOnly=\"true\"\n\t\t\t\t\t\t:validation=\"phoneValidation\" \n\t\t\t\t\t\tmode=\"national\"\n\t\t\t\t\t\t:inputOptions=\"{placeholder: t('phonePlaceholder'), type: 'tel'}\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-small radius-small mn-b-thin\" \n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'email'\" class=\"mn-b-thin radius-small o-hidden\">\n\t\t\t\t\t<Field \n\t\t\t\t\t\tv-model:field=\"auth.state.user.email\" \t\n\t\t\t\t\t\t:placeholder=\"t('emailPlaceholder')\" \t\n\t\t\t\t\t\t:validation=\"emailValidation\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-medium radius-small\" \n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t</div>\n\n\t\t<!-- Password -->\n\t\t<Field \n\t\t\tv-model:field=\"auth.state.user.password\"\n\t\t\ttype=\"password\" \t\n\t\t\t:validation=\"passswordValidation\" \n\t\t\t:placeholder=\"t('passwordPlaceholder')\" \n\t\t\tclass=\"\n bg-light\n pd-medium\n radius-small\n mn-b-semi\n h-4r \n \"\n\t\t/>\n\t\t<!-- Links -->\n\t\t<div class=\"w-100 mn-b-big\">\n\t\t\t<router-link\n\t\t\t\tto=\"/auth/reset-password\" \n\t\t\t\tclass=\"underline d-block t-blue\"\n\t\t\t>\n\t\t\t\t{{ t('forgotPassword') }}\n\t\t\t</router-link>\n\t\t</div>\n\t\t<!-- Button -->\n\t\t<Button \n\t\t\t:submit=\"onSubmit\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"w-100 bg-main mn-b-thin\"\n\t\t>\n\t\t\t{{ t('signin') }}\n\t\t</Button>\n\t\t\n\t\t<!-- <Button \n\t\t\t:submit=\"onSubmitApple\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"mn-b-thin bg-black t-white\"\n\t\t>\n\t\t\t{{ t('signin_apple') }}\n\t\t</Button> -->\n\t</section> \n</template>\n\n<script setup>\n// Import components\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n// Import libs\nimport { computed, onMounted, ref, inject } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Import localization\nimport text from '@pf/src/modules/auth/views/localization/SignIn.json'\n// Import state\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\n// Import validation\nimport * as inputsValidation from '@pf/src/modules/auth/views/validations/inputs.validation'\n\n// Init validation\nconst phoneValidation = ref(null)\nconst passswordValidation = ref(null)\nconst emailValidation = ref(null)\n// Accessing router\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst { t } = useI18n({\n\tuseScope: 'global', \n\t...text\n})\n\n// Accessing state\nconst tabAuth = ref('phone')\n\nconst loadExternalScript = (src) => {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n}\n\nonMounted(async () => {\n\tawait loadExternalScript('https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js');\n});\n// Methods\nasync function onSubmit() {\n\ttry {\n\t if (tabAuth.value === 'phone') await inputsValidation.validateInputs(\n\t\t\tphoneValidation, \n\t\t\tinputsValidation.validatePhone, \n\t\t\tauth.state.user.phone, \n\t\t\t'Некорректный телефон'\n\t\t)\n\t\tif (tabAuth.value === 'email') await inputsValidation.validateInputs(\n\t\t\temailValidation, \n\t\t\tinputsValidation.validateEmail, \n\t\t\tauth.state.user.email, \n\t\t\t'Некорректный email'\n\t\t)\n\t} catch (error) {\n\t\tconsole.log(error)\n\t\tthrow new Error\n\t}\n\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\tconst userCopy = {...auth.state.user};\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\n \tawait auth.actions.login(userCopy, tabAuth.value)\n}\n\nasync function onSubmitApple() {\n try {\n window.AppleID.auth.init({\n clientId: 'com.thecommune.app.signin',\n scope: 'email name',\n redirectURI: 'https://thecommunephuket.com/auth/signin',\n usePopup: true,\n });\n\n let response = await window.AppleID.auth.signIn();\n\n if (response) {\n console.log(response);\n await auth.actions.login(response, 'apple');\n }\n\n } catch (error) {\n console.error(error);\n throw new Error('Error during Apple authentication');\n }\n}\n\n\nfunction redirectTo () {\n\tif (route.query.returnUrl) {\n\t\trouter.push({ \n\t\t\tpath: route.query.returnUrl,\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t} else { \n\t\trouter.push({ \n\t\t\tname: 'User Profile', \n\t\t\tparams: { \n\t\t\t\t_id: auth.state.user._id \n\t\t\t},\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t}\n}\n</script>\n\n<style lang=\"scss\">\n\t.soon-label {\n\t\tposition: absolute;\n\t\tright: -0.25em;\n\t\ttop: -0.25rem;\n\t\tpadding-left: 1rem;\n\t\tpadding-right: 1rem;\n\t\tline-height: 1.5rem;\n\t}\n\t.slide-fade-enter-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.slide-fade-leave-to {\n\n\t}\n\n\t.input-error {\n border: 1px solid red;\n box-shadow: 0 0 3px 0 red;\n}\n</style>"],"names":["ref","useRoute","useRouter","useI18n","text","onMounted","inputsValidation.validateInputs","inputsValidation.validatePhone","auth.state","inputsValidation.validateEmail","auth.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAM,kBAAkBA,IAAG,IAAC,IAAI;AAChC,UAAM,sBAAsBA,IAAG,IAAC,IAAI;AACpC,UAAM,kBAAkBA,IAAG,IAAC,IAAI;AAEhC,UAAM,QAAQC,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAE1B,UAAM,EAAE,EAAG,IAAGC,gBAAQ;AAAA,MACrB,UAAU;AAAA,MACV,GAAGC,OAAI;AAAA,IACR,CAAC;AAGD,UAAM,UAAUJ,IAAG,IAAC,OAAO;AAE3B,UAAM,qBAAqB,CAAC,QAAQ;AAClC,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,cAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,OAAO;AACd,eAAO,MAAM;AACb,eAAO,SAAS;AAChB,eAAO,UAAU;AACjB,iBAAS,KAAK,YAAY,MAAM;AAAA,MACpC,CAAG;AAAA,IACH;AAEAK,QAAAA,UAAU,YAAY;AACrB,YAAM,mBAAmB,sFAAsF;AAAA,IAChH,CAAC;AAED,mBAAe,WAAW;AACzB,UAAI;AACF,YAAI,QAAQ,UAAU,QAAS,OAAMC,kBAA+B;AAAA,UACpE;AAAA,UACAC,kBAA8B;AAAA,UAC9BC,KAAU,MAAC,KAAK;AAAA,UAChB;AAAA,QACA;AACD,YAAI,QAAQ,UAAU,QAAS,OAAMF,kBAA+B;AAAA,UACnE;AAAA,UACAG,kBAA8B;AAAA,UAC9BD,KAAU,MAAC,KAAK;AAAA,UAChB;AAAA,QACA;AAAA,MACD,SAAQ,OAAO;AACf,gBAAQ,IAAI,KAAK;AACjB,cAAM,IAAI;AAAA,MACV;AAGD,YAAM,WAAW,EAAC,GAAGA,KAAU,MAAC,KAAI;AAGnC,YAAME,KAAY,QAAC,MAAM,UAAU,QAAQ,KAAK;AAAA,IAClD;AAyBA,aAAS,aAAc;AACtB,UAAI,MAAM,MAAM,WAAW;AAC1B,eAAO,KAAK;AAAA,UACX,MAAM,MAAM,MAAM;AAAA,UAClB,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACH,OAAQ;AACN,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,KAAKF,KAAAA,MAAW,KAAK;AAAA,UACrB;AAAA,UACD,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACD;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, onMounted, resolveComponent, openBlock, createElementBlock, createElementVNode, createTextVNode, toDisplayString, unref, createVNode, withCtx, Transition, withDirectives, vShow } from "vue";
|
2
2
|
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -65,6 +65,7 @@ const _sfc_main = {
|
|
65
65
|
"Некорректный email"
|
66
66
|
);
|
67
67
|
} catch (error) {
|
68
|
+
console.log(error);
|
68
69
|
throw new Error();
|
69
70
|
}
|
70
71
|
const userCopy = { ...state.user };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SignIn.vue.js","sources":["../../../../../../../../src/modules/auth/views/components/pages/SignIn.vue"],"sourcesContent":["<template>\n\t<section class=\"\">\n\t\t<!-- Header -->\n\t\t<img loading=\"lazy\" :src=\"'/logo/logo.svg'\" class=\"i-extra radius-small mn-b-small\">\n\n\t\t<h3 class=\"mn-b-medium\">\n\t\t\t{{ t('title') }}\n\t\t\t<br>\n\t\t\t<span class=\"t-semi\">{{ t('subtitle') }}</span>\n\t\t</h3>\n\n\t\t<p class=\"mn-b-big\">\n\t\t\t<router-link :to=\"{name: 'Sign Up'}\" class=\"underline t-second\">{{ t('signup') }}</router-link>\n\t\t</p>\n\t\t\n\t\t\t<!-- Select -->\n\t\t<div class=\"mn-b-small p-small uppercase t-semi bg-light radius-small o-hidden\">\n\t\t\t<Tab \n\t\t\t\tv-model:selected=\"tabAuth\"\n\t\t\t\t:tabs=\"[\n\t\t\t\t\t{name: t('phone'), value: 'phone'},\n\t\t\t\t\t{name: t('email'), value: 'email'}\n\t\t\t\t]\"\n\t\t\t\ttabClass=\"pd-small pd-r-medium pd-l-medium w-100 pd-small radius-small\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Form -->\n\t\t<div class=\"pos-relative\">\n\t\t<!-- Phone -->\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'phone'\" class=\"mn-b-thin radius-small\">\n\t\t\t\t\t<FieldPhone\n\t\t\t\t\t\t@change=\"(event) => auth.state.user.phone = event\" \t\n\t\t\t\t\t\t:dropdownOptions=\"{\n\t\t\t\t\t\t\tshowDialCodeInSelection: true,\n\t\t\t\t\t\t\tshowFlags: true,\n\t\t\t\t\t\t\tshowDialCodeInList: true\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:validCharactersOnly=\"true\"\n\t\t\t\t\t\t:validation=\"phoneValidation\" \n\t\t\t\t\t\tmode=\"national\"\n\t\t\t\t\t\t:inputOptions=\"{placeholder: t('phonePlaceholder'), type: 'tel'}\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-small radius-small mn-b-thin\" \n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'email'\" class=\"mn-b-thin radius-small o-hidden\">\n\t\t\t\t\t<Field \n\t\t\t\t\t\tv-model:field=\"auth.state.user.email\" \t\n\t\t\t\t\t\t:placeholder=\"t('emailPlaceholder')\" \t\n\t\t\t\t\t\t:validation=\"emailValidation\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-medium radius-small\" \n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t</div>\n\n\t\t<!-- Password -->\n\t\t<Field \n\t\t\tv-model:field=\"auth.state.user.password\"\n\t\t\ttype=\"password\" \t\n\t\t\t:validation=\"passswordValidation\" \n\t\t\t:placeholder=\"t('passwordPlaceholder')\" \n\t\t\tclass=\"\n bg-light\n pd-medium\n radius-small\n mn-b-semi\n h-4r \n \"\n\t\t/>\n\t\t<!-- Links -->\n\t\t<div class=\"w-100 mn-b-big\">\n\t\t\t<router-link\n\t\t\t\tto=\"/auth/reset-password\" \n\t\t\t\tclass=\"underline d-block t-blue\"\n\t\t\t>\n\t\t\t\t{{ t('forgotPassword') }}\n\t\t\t</router-link>\n\t\t</div>\n\t\t<!-- Button -->\n\t\t<Button \n\t\t\t:submit=\"onSubmit\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"w-100 bg-main mn-b-thin\"\n\t\t>\n\t\t\t{{ t('signin') }}\n\t\t</Button>\n\t\t\n\t\t<!-- <Button \n\t\t\t:submit=\"onSubmitApple\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"mn-b-thin bg-black t-white\"\n\t\t>\n\t\t\t{{ t('signin_apple') }}\n\t\t</Button> -->\n\t</section> \n</template>\n\n<script setup>\n// Import components\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n// Import libs\nimport { computed, onMounted, ref, inject } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Import localization\nimport text from '@pf/src/modules/auth/views/localization/SignIn.json'\n// Import state\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\n// Import validation\nimport * as inputsValidation from '@pf/src/modules/auth/views/validations/inputs.validation'\n\n// Init validation\nconst phoneValidation = ref(null)\nconst passswordValidation = ref(null)\nconst emailValidation = ref(null)\n// Accessing router\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst { t } = useI18n({\n\tuseScope: 'global', \n\t...text\n})\n\n// Accessing state\nconst tabAuth = ref('phone')\n\nconst loadExternalScript = (src) => {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n}\n\nonMounted(async () => {\n\tawait loadExternalScript('https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js');\n});\n// Methods\nasync function onSubmit() {\n\ttry {\n\t if (tabAuth.value === 'phone') await inputsValidation.validateInputs(\n\t\t\tphoneValidation, \n\t\t\tinputsValidation.validatePhone, \n\t\t\tauth.state.user.phone, \n\t\t\t'Некорректный телефон'\n\t\t)\n\t\tif (tabAuth.value === 'email') await inputsValidation.validateInputs(\n\t\t\temailValidation, \n\t\t\tinputsValidation.validateEmail, \n\t\t\tauth.state.user.email, \n\t\t\t'Некорректный email'\n\t\t)\n\t} catch (error) {\n\t\tthrow new Error\n\t}\n\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\tconst userCopy = {...auth.state.user};\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\n \tawait auth.actions.login(userCopy, tabAuth.value)\n}\n\nasync function onSubmitApple() {\n try {\n window.AppleID.auth.init({\n clientId: 'com.thecommune.app.signin',\n scope: 'email name',\n redirectURI: 'https://thecommunephuket.com/auth/signin',\n usePopup: true,\n });\n\n let response = await window.AppleID.auth.signIn();\n\n if (response) {\n console.log(response);\n await auth.actions.login(response, 'apple');\n }\n\n } catch (error) {\n console.error(error);\n throw new Error('Error during Apple authentication');\n }\n}\n\n\nfunction redirectTo () {\n\tif (route.query.returnUrl) {\n\t\trouter.push({ \n\t\t\tpath: route.query.returnUrl,\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t} else { \n\t\trouter.push({ \n\t\t\tname: 'User Profile', \n\t\t\tparams: { \n\t\t\t\t_id: auth.state.user._id \n\t\t\t},\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t}\n}\n</script>\n\n<style lang=\"scss\">\n\t.soon-label {\n\t\tposition: absolute;\n\t\tright: -0.25em;\n\t\ttop: -0.25rem;\n\t\tpadding-left: 1rem;\n\t\tpadding-right: 1rem;\n\t\tline-height: 1.5rem;\n\t}\n\t.slide-fade-enter-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.slide-fade-leave-to {\n\n\t}\n\n\t.input-error {\n border: 1px solid red;\n box-shadow: 0 0 3px 0 red;\n}\n</style>"],"names":["inputsValidation.validateInputs","inputsValidation.validatePhone","auth.state","inputsValidation.validateEmail","auth.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAM,kBAAkB,IAAI,IAAI;AAChC,UAAM,sBAAsB,IAAI,IAAI;AACpC,UAAM,kBAAkB,IAAI,IAAI;AAEhC,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,EAAE,EAAG,IAAG,QAAQ;AAAA,MACrB,UAAU;AAAA,MACV,GAAG;AAAA,IACJ,CAAC;AAGD,UAAM,UAAU,IAAI,OAAO;AAE3B,UAAM,qBAAqB,CAAC,QAAQ;AAClC,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,cAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,OAAO;AACd,eAAO,MAAM;AACb,eAAO,SAAS;AAChB,eAAO,UAAU;AACjB,iBAAS,KAAK,YAAY,MAAM;AAAA,MACpC,CAAG;AAAA,IACH;AAEA,cAAU,YAAY;AACrB,YAAM,mBAAmB,sFAAsF;AAAA,IAChH,CAAC;AAED,mBAAe,WAAW;AACzB,UAAI;AACF,YAAI,QAAQ,UAAU,QAAS,OAAMA;AAAAA,UACrC;AAAA,UACAC;AAAAA,UACAC,MAAW,KAAK;AAAA,UAChB;AAAA,QACA;AACD,YAAI,QAAQ,UAAU,QAAS,OAAMF;AAAAA,UACpC;AAAA,UACAG;AAAAA,UACAD,MAAW,KAAK;AAAA,UAChB;AAAA,QACA;AAAA,MACD,SAAQ,OAAO;AACf,cAAM,IAAI;AAAA,MACV;AAGD,YAAM,WAAW,EAAC,GAAGA,MAAW,KAAI;AAGnC,YAAME,QAAa,MAAM,UAAU,QAAQ,KAAK;AAAA,IAClD;AAyBA,aAAS,aAAc;AACtB,UAAI,MAAM,MAAM,WAAW;AAC1B,eAAO,KAAK;AAAA,UACX,MAAM,MAAM,MAAM;AAAA,UAClB,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACH,OAAQ;AACN,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,KAAKF,MAAW,KAAK;AAAA,UACrB;AAAA,UACD,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACD;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"SignIn.vue.js","sources":["../../../../../../../../src/modules/auth/views/components/pages/SignIn.vue"],"sourcesContent":["<template>\n\t<section class=\"\">\n\t\t<!-- Header -->\n\t\t<img loading=\"lazy\" :src=\"'/logo/logo.svg'\" class=\"i-extra radius-small mn-b-small\">\n\n\t\t<h3 class=\"mn-b-medium\">\n\t\t\t{{ t('title') }}\n\t\t\t<br>\n\t\t\t<span class=\"t-semi\">{{ t('subtitle') }}</span>\n\t\t</h3>\n\n\t\t<p class=\"mn-b-big\">\n\t\t\t<router-link :to=\"{name: 'Sign Up'}\" class=\"underline t-second\">{{ t('signup') }}</router-link>\n\t\t</p>\n\t\t\n\t\t\t<!-- Select -->\n\t\t<div class=\"mn-b-small p-small uppercase t-semi bg-light radius-small o-hidden\">\n\t\t\t<Tab \n\t\t\t\tv-model:selected=\"tabAuth\"\n\t\t\t\t:tabs=\"[\n\t\t\t\t\t{name: t('phone'), value: 'phone'},\n\t\t\t\t\t{name: t('email'), value: 'email'}\n\t\t\t\t]\"\n\t\t\t\ttabClass=\"pd-small pd-r-medium pd-l-medium w-100 pd-small radius-small\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Form -->\n\t\t<div class=\"pos-relative\">\n\t\t<!-- Phone -->\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'phone'\" class=\"mn-b-thin radius-small\">\n\t\t\t\t\t<FieldPhone\n\t\t\t\t\t\t@change=\"(event) => auth.state.user.phone = event\" \t\n\t\t\t\t\t\t:dropdownOptions=\"{\n\t\t\t\t\t\t\tshowDialCodeInSelection: true,\n\t\t\t\t\t\t\tshowFlags: true,\n\t\t\t\t\t\t\tshowDialCodeInList: true\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:validCharactersOnly=\"true\"\n\t\t\t\t\t\t:validation=\"phoneValidation\" \n\t\t\t\t\t\tmode=\"national\"\n\t\t\t\t\t\t:inputOptions=\"{placeholder: t('phonePlaceholder'), type: 'tel'}\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-small radius-small mn-b-thin\" \n\t\t\t\t\t/>\n\t\t\t\t\t\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-show=\"tabAuth === 'email'\" class=\"mn-b-thin radius-small o-hidden\">\n\t\t\t\t\t<Field \n\t\t\t\t\t\tv-model:field=\"auth.state.user.email\" \t\n\t\t\t\t\t\t:placeholder=\"t('emailPlaceholder')\" \t\n\t\t\t\t\t\t:validation=\"emailValidation\"\n\t\t\t\t\t\tclass=\"bg-light h-4r pd-medium radius-small\" \n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</transition>\n\t\t</div>\n\n\t\t<!-- Password -->\n\t\t<Field \n\t\t\tv-model:field=\"auth.state.user.password\"\n\t\t\ttype=\"password\" \t\n\t\t\t:validation=\"passswordValidation\" \n\t\t\t:placeholder=\"t('passwordPlaceholder')\" \n\t\t\tclass=\"\n bg-light\n pd-medium\n radius-small\n mn-b-semi\n h-4r \n \"\n\t\t/>\n\t\t<!-- Links -->\n\t\t<div class=\"w-100 mn-b-big\">\n\t\t\t<router-link\n\t\t\t\tto=\"/auth/reset-password\" \n\t\t\t\tclass=\"underline d-block t-blue\"\n\t\t\t>\n\t\t\t\t{{ t('forgotPassword') }}\n\t\t\t</router-link>\n\t\t</div>\n\t\t<!-- Button -->\n\t\t<Button \n\t\t\t:submit=\"onSubmit\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"w-100 bg-main mn-b-thin\"\n\t\t>\n\t\t\t{{ t('signin') }}\n\t\t</Button>\n\t\t\n\t\t<!-- <Button \n\t\t\t:submit=\"onSubmitApple\" \n\t\t\t:callback=\"redirectTo\" \n\t\t\tclass=\"mn-b-thin bg-black t-white\"\n\t\t>\n\t\t\t{{ t('signin_apple') }}\n\t\t</Button> -->\n\t</section> \n</template>\n\n<script setup>\n// Import components\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport FieldPhone from '@pf/src/components/FieldPhone/FieldPhone.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n// Import libs\nimport { computed, onMounted, ref, inject } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Import localization\nimport text from '@pf/src/modules/auth/views/localization/SignIn.json'\n// Import state\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\n// Import validation\nimport * as inputsValidation from '@pf/src/modules/auth/views/validations/inputs.validation'\n\n// Init validation\nconst phoneValidation = ref(null)\nconst passswordValidation = ref(null)\nconst emailValidation = ref(null)\n// Accessing router\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst { t } = useI18n({\n\tuseScope: 'global', \n\t...text\n})\n\n// Accessing state\nconst tabAuth = ref('phone')\n\nconst loadExternalScript = (src) => {\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = src;\n script.onload = resolve;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n}\n\nonMounted(async () => {\n\tawait loadExternalScript('https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js');\n});\n// Methods\nasync function onSubmit() {\n\ttry {\n\t if (tabAuth.value === 'phone') await inputsValidation.validateInputs(\n\t\t\tphoneValidation, \n\t\t\tinputsValidation.validatePhone, \n\t\t\tauth.state.user.phone, \n\t\t\t'Некорректный телефон'\n\t\t)\n\t\tif (tabAuth.value === 'email') await inputsValidation.validateInputs(\n\t\t\temailValidation, \n\t\t\tinputsValidation.validateEmail, \n\t\t\tauth.state.user.email, \n\t\t\t'Некорректный email'\n\t\t)\n\t} catch (error) {\n\t\tconsole.log(error)\n\t\tthrow new Error\n\t}\n\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\tconst userCopy = {...auth.state.user};\n\t// COSTIL PLEASE GOD MAKE IT GOOD, FUKEN INPUT COMPONENT RETURN OBJECT NUT NUMBER\n\n \tawait auth.actions.login(userCopy, tabAuth.value)\n}\n\nasync function onSubmitApple() {\n try {\n window.AppleID.auth.init({\n clientId: 'com.thecommune.app.signin',\n scope: 'email name',\n redirectURI: 'https://thecommunephuket.com/auth/signin',\n usePopup: true,\n });\n\n let response = await window.AppleID.auth.signIn();\n\n if (response) {\n console.log(response);\n await auth.actions.login(response, 'apple');\n }\n\n } catch (error) {\n console.error(error);\n throw new Error('Error during Apple authentication');\n }\n}\n\n\nfunction redirectTo () {\n\tif (route.query.returnUrl) {\n\t\trouter.push({ \n\t\t\tpath: route.query.returnUrl,\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t} else { \n\t\trouter.push({ \n\t\t\tname: 'User Profile', \n\t\t\tparams: { \n\t\t\t\t_id: auth.state.user._id \n\t\t\t},\n\t\t\tquery: { \n\t\t\t\tafterAuth: 'true' \n\t\t\t}\n\t\t})\n\t}\n}\n</script>\n\n<style lang=\"scss\">\n\t.soon-label {\n\t\tposition: absolute;\n\t\tright: -0.25em;\n\t\ttop: -0.25rem;\n\t\tpadding-left: 1rem;\n\t\tpadding-right: 1rem;\n\t\tline-height: 1.5rem;\n\t}\n\t.slide-fade-enter-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n\t.slide-fade-leave-to {\n\n\t}\n\n\t.input-error {\n border: 1px solid red;\n box-shadow: 0 0 3px 0 red;\n}\n</style>"],"names":["inputsValidation.validateInputs","inputsValidation.validatePhone","auth.state","inputsValidation.validateEmail","auth.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAM,kBAAkB,IAAI,IAAI;AAChC,UAAM,sBAAsB,IAAI,IAAI;AACpC,UAAM,kBAAkB,IAAI,IAAI;AAEhC,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,EAAE,EAAG,IAAG,QAAQ;AAAA,MACrB,UAAU;AAAA,MACV,GAAG;AAAA,IACJ,CAAC;AAGD,UAAM,UAAU,IAAI,OAAO;AAE3B,UAAM,qBAAqB,CAAC,QAAQ;AAClC,aAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,cAAM,SAAS,SAAS,cAAc,QAAQ;AAC9C,eAAO,OAAO;AACd,eAAO,MAAM;AACb,eAAO,SAAS;AAChB,eAAO,UAAU;AACjB,iBAAS,KAAK,YAAY,MAAM;AAAA,MACpC,CAAG;AAAA,IACH;AAEA,cAAU,YAAY;AACrB,YAAM,mBAAmB,sFAAsF;AAAA,IAChH,CAAC;AAED,mBAAe,WAAW;AACzB,UAAI;AACF,YAAI,QAAQ,UAAU,QAAS,OAAMA;AAAAA,UACrC;AAAA,UACAC;AAAAA,UACAC,MAAW,KAAK;AAAA,UAChB;AAAA,QACA;AACD,YAAI,QAAQ,UAAU,QAAS,OAAMF;AAAAA,UACpC;AAAA,UACAG;AAAAA,UACAD,MAAW,KAAK;AAAA,UAChB;AAAA,QACA;AAAA,MACD,SAAQ,OAAO;AACf,gBAAQ,IAAI,KAAK;AACjB,cAAM,IAAI;AAAA,MACV;AAGD,YAAM,WAAW,EAAC,GAAGA,MAAW,KAAI;AAGnC,YAAME,QAAa,MAAM,UAAU,QAAQ,KAAK;AAAA,IAClD;AAyBA,aAAS,aAAc;AACtB,UAAI,MAAM,MAAM,WAAW;AAC1B,eAAO,KAAK;AAAA,UACX,MAAM,MAAM,MAAM;AAAA,UAClB,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACH,OAAQ;AACN,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,KAAKF,MAAW,KAAK;AAAA,UACrB;AAAA,UACD,OAAO;AAAA,YACN,WAAW;AAAA,UACX;AAAA,QACJ,CAAG;AAAA,MACD;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const Tab = require("../../../../../components/Tab/Tab.vue2.cjs");
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const FieldPhone = require("../../../../../components/FieldPhone/FieldPhone.vue.cjs");
|
7
7
|
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
8
8
|
const vueRouter = require("vue-router");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, Transition, withCtx, withDirectives, vShow, createTextVNode } from "vue";
|
2
2
|
import _sfc_main$1 from "../../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute, useRouter } from "vue-router";
|
@@ -17,9 +17,14 @@ function checkUser(to, from, next) {
|
|
17
17
|
}
|
18
18
|
function requiresNoAuth(to, from, next) {
|
19
19
|
const isLogin = auth.state.access.status;
|
20
|
+
console.log(isLogin);
|
21
|
+
console.log(auth.state.access);
|
22
|
+
console.log("");
|
20
23
|
if (isLogin) {
|
24
|
+
console.log("havee login");
|
21
25
|
return next("/profile/" + auth.state.user._id);
|
22
26
|
}
|
27
|
+
console.log("not have login");
|
23
28
|
next();
|
24
29
|
}
|
25
30
|
function requiresAuth(to, from, next) {
|
package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.validation.cjs","sources":["../../../../../../../src/modules/auth/views/middlewares/auth.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\n\nfunction resetUser(to, from, next) {\n next()\n auth.state.user.phone = ''\n auth.state.user.email = ''\n auth.state.user.password = ''\n auth.state.user.passwordRepeat = ''\n}\n\n// Check state before open\nfunction checkUser(to, from, next) {\n if (auth.state.user.phone === '' && auth.state.user.email === '') {\n next('/auth/signin')\n } else {\n next()\n }\n}\n\nfunction requiresNoAuth(to, from, next) {\n\n const isLogin = auth.state.access.status;\n\n if (isLogin) {\n return next('/profile/' + auth.state.user._id);\n }\n\n next();\n}\n\nfunction requiresAuth(to, from, next) {\n const isLogin = auth.state.access.status;\n\n if (isLogin !== true) {\n return next('/auth/signin');\n }\n\n next();\n}\n\nasync function requiresAdmin(to, from, next) {\n\n const isAdmin = auth.state.access.roles?.includes('ROLE_ADMIN') ? auth.state.access.roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return next('/401');\n }\n\n next();\n}\n\n\n\nexport {\n requiresNoAuth,\n requiresAuth,\n requiresAdmin,\n resetUser,\n checkUser\n}"],"names":["auth.state"],"mappings":";;;AAEA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,OAAM;AACNA,aAAW,KAAK,QAAQ;AACxBA,aAAW,KAAK,QAAQ;AACxBA,aAAW,KAAK,WAAW;AAC3BA,aAAW,KAAK,iBAAiB;AACnC;
|
1
|
+
{"version":3,"file":"auth.validation.cjs","sources":["../../../../../../../src/modules/auth/views/middlewares/auth.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\n\nfunction resetUser(to, from, next) {\n next()\n auth.state.user.phone = ''\n auth.state.user.email = ''\n auth.state.user.password = ''\n auth.state.user.passwordRepeat = ''\n}\n\nasync function initUser(to, from, next) {\n await auth.initialize();\n next()\n}\n\n\n// Check state before open\nfunction checkUser(to, from, next) {\n if (auth.state.user.phone === '' && auth.state.user.email === '') {\n next('/auth/signin')\n } else {\n next()\n }\n}\n\nfunction requiresNoAuth(to, from, next) {\n\n const isLogin = auth.state.access.status;\n\n console.log(isLogin)\n console.log(auth.state.access)\n\n console.log('')\n\n if (isLogin) {\n\n console.log('havee login')\n return next('/profile/' + auth.state.user._id);\n }\n\n console.log('not have login')\n\n next();\n}\n\nfunction requiresAuth(to, from, next) {\n const isLogin = auth.state.access.status;\n\n if (isLogin !== true) {\n return next('/auth/signin');\n }\n\n next();\n}\n\nasync function requiresAdmin(to, from, next) {\n\n const isAdmin = auth.state.access.roles?.includes('ROLE_ADMIN') ? auth.state.access.roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return next('/401');\n }\n\n next();\n}\n\n\n\nexport {\n requiresNoAuth,\n requiresAuth,\n requiresAdmin,\n resetUser,\n checkUser,\n initUser\n}"],"names":["auth.state"],"mappings":";;;AAEA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,OAAM;AACNA,aAAW,KAAK,QAAQ;AACxBA,aAAW,KAAK,QAAQ;AACxBA,aAAW,KAAK,WAAW;AAC3BA,aAAW,KAAK,iBAAiB;AACnC;AASA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,MAAIA,KAAU,MAAC,KAAK,UAAU,MAAMA,KAAAA,MAAW,KAAK,UAAU,IAAI;AAChE,SAAK,cAAc;AAAA,EACvB,OAAS;AACL,SAAM;AAAA,EACP;AACH;AAEA,SAAS,eAAe,IAAI,MAAM,MAAM;AAEtC,QAAM,UAAUA,KAAAA,MAAW,OAAO;AAElC,UAAQ,IAAI,OAAO;AACjB,UAAQ,IAAIA,KAAU,MAAC,MAAM;AAE/B,UAAQ,IAAI,EAAE;AAEd,MAAI,SAAS;AAEX,YAAQ,IAAI,aAAa;AACzB,WAAO,KAAK,cAAcA,KAAU,MAAC,KAAK,GAAG;AAAA,EAC9C;AAED,UAAQ,IAAI,gBAAgB;AAE5B;AACF;AAEA,SAAS,aAAa,IAAI,MAAM,MAAM;AACpC,QAAM,UAAUA,KAAAA,MAAW,OAAO;AAElC,MAAI,YAAY,MAAM;AACpB,WAAO,KAAK,cAAc;AAAA,EAC3B;AAED;AACF;AAEA,eAAe,cAAc,IAAI,MAAM,MAAM;;AAE3C,QAAM,YAAUA,UAAU,MAAC,OAAO,UAAlBA,mBAAyB,SAAS,iBAAgBA,KAAU,MAAC,OAAO,MAAM,SAAS,YAAY,IAAI;AAEnH,MAAI,YAAY,MAAM;AACpB,WAAO,KAAK,MAAM;AAAA,EACnB;AAED;AACF;;;;;;"}
|
@@ -15,9 +15,14 @@ function checkUser(to, from, next) {
|
|
15
15
|
}
|
16
16
|
function requiresNoAuth(to, from, next) {
|
17
17
|
const isLogin = state.access.status;
|
18
|
+
console.log(isLogin);
|
19
|
+
console.log(state.access);
|
20
|
+
console.log("");
|
18
21
|
if (isLogin) {
|
22
|
+
console.log("havee login");
|
19
23
|
return next("/profile/" + state.user._id);
|
20
24
|
}
|
25
|
+
console.log("not have login");
|
21
26
|
next();
|
22
27
|
}
|
23
28
|
function requiresAuth(to, from, next) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"auth.validation.js","sources":["../../../../../../../src/modules/auth/views/middlewares/auth.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\n\nfunction resetUser(to, from, next) {\n next()\n auth.state.user.phone = ''\n auth.state.user.email = ''\n auth.state.user.password = ''\n auth.state.user.passwordRepeat = ''\n}\n\n// Check state before open\nfunction checkUser(to, from, next) {\n if (auth.state.user.phone === '' && auth.state.user.email === '') {\n next('/auth/signin')\n } else {\n next()\n }\n}\n\nfunction requiresNoAuth(to, from, next) {\n\n const isLogin = auth.state.access.status;\n\n if (isLogin) {\n return next('/profile/' + auth.state.user._id);\n }\n\n next();\n}\n\nfunction requiresAuth(to, from, next) {\n const isLogin = auth.state.access.status;\n\n if (isLogin !== true) {\n return next('/auth/signin');\n }\n\n next();\n}\n\nasync function requiresAdmin(to, from, next) {\n\n const isAdmin = auth.state.access.roles?.includes('ROLE_ADMIN') ? auth.state.access.roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return next('/401');\n }\n\n next();\n}\n\n\n\nexport {\n requiresNoAuth,\n requiresAuth,\n requiresAdmin,\n resetUser,\n checkUser\n}"],"names":["auth.state"],"mappings":";AAEA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,OAAM;AACNA,QAAW,KAAK,QAAQ;AACxBA,QAAW,KAAK,QAAQ;AACxBA,QAAW,KAAK,WAAW;AAC3BA,QAAW,KAAK,iBAAiB;AACnC;
|
1
|
+
{"version":3,"file":"auth.validation.js","sources":["../../../../../../../src/modules/auth/views/middlewares/auth.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\n\nfunction resetUser(to, from, next) {\n next()\n auth.state.user.phone = ''\n auth.state.user.email = ''\n auth.state.user.password = ''\n auth.state.user.passwordRepeat = ''\n}\n\nasync function initUser(to, from, next) {\n await auth.initialize();\n next()\n}\n\n\n// Check state before open\nfunction checkUser(to, from, next) {\n if (auth.state.user.phone === '' && auth.state.user.email === '') {\n next('/auth/signin')\n } else {\n next()\n }\n}\n\nfunction requiresNoAuth(to, from, next) {\n\n const isLogin = auth.state.access.status;\n\n console.log(isLogin)\n console.log(auth.state.access)\n\n console.log('')\n\n if (isLogin) {\n\n console.log('havee login')\n return next('/profile/' + auth.state.user._id);\n }\n\n console.log('not have login')\n\n next();\n}\n\nfunction requiresAuth(to, from, next) {\n const isLogin = auth.state.access.status;\n\n if (isLogin !== true) {\n return next('/auth/signin');\n }\n\n next();\n}\n\nasync function requiresAdmin(to, from, next) {\n\n const isAdmin = auth.state.access.roles?.includes('ROLE_ADMIN') ? auth.state.access.roles.includes('ROLE_ADMIN') : false;\n\n if (isAdmin !== true) {\n return next('/401');\n }\n\n next();\n}\n\n\n\nexport {\n requiresNoAuth,\n requiresAuth,\n requiresAdmin,\n resetUser,\n checkUser,\n initUser\n}"],"names":["auth.state"],"mappings":";AAEA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,OAAM;AACNA,QAAW,KAAK,QAAQ;AACxBA,QAAW,KAAK,QAAQ;AACxBA,QAAW,KAAK,WAAW;AAC3BA,QAAW,KAAK,iBAAiB;AACnC;AASA,SAAS,UAAU,IAAI,MAAM,MAAM;AACjC,MAAIA,MAAW,KAAK,UAAU,MAAMA,MAAW,KAAK,UAAU,IAAI;AAChE,SAAK,cAAc;AAAA,EACvB,OAAS;AACL,SAAM;AAAA,EACP;AACH;AAEA,SAAS,eAAe,IAAI,MAAM,MAAM;AAEtC,QAAM,UAAUA,MAAW,OAAO;AAElC,UAAQ,IAAI,OAAO;AACjB,UAAQ,IAAIA,MAAW,MAAM;AAE/B,UAAQ,IAAI,EAAE;AAEd,MAAI,SAAS;AAEX,YAAQ,IAAI,aAAa;AACzB,WAAO,KAAK,cAAcA,MAAW,KAAK,GAAG;AAAA,EAC9C;AAED,UAAQ,IAAI,gBAAgB;AAE5B;AACF;AAEA,SAAS,aAAa,IAAI,MAAM,MAAM;AACpC,QAAM,UAAUA,MAAW,OAAO;AAElC,MAAI,YAAY,MAAM;AACpB,WAAO,KAAK,cAAc;AAAA,EAC3B;AAED;AACF;AAEA,eAAe,cAAc,IAAI,MAAM,MAAM;;AAE3C,QAAM,YAAUA,WAAW,OAAO,UAAlBA,mBAAyB,SAAS,iBAAgBA,MAAW,OAAO,MAAM,SAAS,YAAY,IAAI;AAEnH,MAAI,YAAY,MAAM;AACpB,WAAO,KAAK,MAAM;AAAA,EACnB;AAED;AACF;"}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const auth = require("../store/auth.cjs");
|
4
|
+
const blogposts = require("../../../community/store/blogposts.cjs");
|
5
|
+
const mixins = require("../../../globals/views/mixins/mixins.cjs");
|
6
|
+
const { hasAccess } = mixins.useGlobalMixins();
|
7
|
+
async function requiresEditAccess(to, from, next) {
|
8
|
+
to.params.url;
|
9
|
+
const userId = auth.state.user._id;
|
10
|
+
try {
|
11
|
+
const post = (await blogposts.read({ url: to.params.url }))[0];
|
12
|
+
console.log("post is", post);
|
13
|
+
if (!post) {
|
14
|
+
return next("/404");
|
15
|
+
}
|
16
|
+
if (post.owner.type === "organization") {
|
17
|
+
const isAccess = hasAccess(post.owner.target._id, "posts", "edit", auth.state.accesses);
|
18
|
+
if (!isAccess) {
|
19
|
+
return next("/401");
|
20
|
+
}
|
21
|
+
} else {
|
22
|
+
if (post.creator.target._id !== userId) {
|
23
|
+
return next("/401");
|
24
|
+
}
|
25
|
+
}
|
26
|
+
next();
|
27
|
+
} catch (error) {
|
28
|
+
console.error("Error during post access check:", error);
|
29
|
+
return next("/500");
|
30
|
+
}
|
31
|
+
}
|
32
|
+
function requiresAccess(resource, action) {
|
33
|
+
return (to, from, next) => {
|
34
|
+
const isAccess = hasAccess(to.params._id, resource, action, auth.state.accesses);
|
35
|
+
if (isAccess) {
|
36
|
+
return next();
|
37
|
+
} else {
|
38
|
+
return next("/401");
|
39
|
+
}
|
40
|
+
};
|
41
|
+
}
|
42
|
+
exports.requiresAccess = requiresAccess;
|
43
|
+
exports.requiresEditAccess = requiresEditAccess;
|
44
|
+
//# sourceMappingURL=ownership.validation.cjs.map
|
package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ownership.validation.cjs","sources":["../../../../../../../src/modules/auth/views/middlewares/ownership.validation.js"],"sourcesContent":["import * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as blog from '@pf/src/modules/community/store/blogposts.js';\n\nimport { useGlobalMixins } from \"@pf/src/modules/globals/views/mixins/mixins.js\"\n\nconst { hasAccess } = useGlobalMixins()\n\nasync function requiresEditAccess(to, from, next) {\n const postId = to.params.url; // Предполагается, что `url` является идентификатором поста\n const userId = auth.state.user._id; // Получаем текущего пользователя\n\n try {\n // Получаем данные поста, чтобы проверить его принадлежность к организации или авторство\n const post = (await blog.read({ url: to.params.url }))[0];\n\n console.log('post is', post)\n\n if (!post) {\n return next('/404'); // Если пост не найден, перенаправляем на страницу 404\n }\n\n if (post.owner.type === 'organization') {\n // Если пост принадлежит организации, проверяем права на редактирование через `hasAccess`\n const isAccess = hasAccess(post.owner.target._id, 'posts', 'edit', auth.state.accesses);\n\n if (!isAccess) {\n return next('/401'); // Если у пользователя нет прав на редактирование в организации, перенаправляем на 403\n }\n } else {\n // Если пост не принадлежит организации, проверяем авторство\n if (post.creator.target._id !== userId) {\n return next('/401'); // Если пользователь не является автором, перенаправляем на 403\n }\n }\n\n next(); // Если все проверки прошли, продолжаем\n } catch (error) {\n console.error(\"Error during post access check:\", error);\n return next('/500'); // Если произошла ошибка, перенаправляем на страницу 500\n }\n}\n\nfunction requiresAccess(resource, action) {\n return (to, from, next) => {\n\n const isAccess = hasAccess(to.params._id, resource, action, auth.state.accesses)\n \n if (isAccess) {\n return next();\n } else {\n return next('/401');\n }\n };\n};\n\n\nexport {\n requiresEditAccess,\n requiresAccess\n}"],"names":["useGlobalMixins","auth.state","blog.read"],"mappings":";;;;;AAKA,MAAM,EAAE,UAAW,IAAGA,uBAAiB;AAEvC,eAAe,mBAAmB,IAAI,MAAM,MAAM;AACjC,KAAG,OAAO;AACzB,QAAM,SAASC,KAAAA,MAAW,KAAK;AAE/B,MAAI;AAEF,UAAM,QAAQ,MAAMC,UAAS,KAAC,EAAE,KAAK,GAAG,OAAO,IAAG,CAAE,GAAG,CAAC;AAExD,YAAQ,IAAI,WAAW,IAAI;AAE3B,QAAI,CAAC,MAAM;AACT,aAAO,KAAK,MAAM;AAAA,IACnB;AAED,QAAI,KAAK,MAAM,SAAS,gBAAgB;AAEtC,YAAM,WAAW,UAAU,KAAK,MAAM,OAAO,KAAK,SAAS,QAAQD,KAAU,MAAC,QAAQ;AAEtF,UAAI,CAAC,UAAU;AACb,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACP,OAAW;AAEL,UAAI,KAAK,QAAQ,OAAO,QAAQ,QAAQ;AACtC,eAAO,KAAK,MAAM;AAAA,MACnB;AAAA,IACF;AAED;EACD,SAAQ,OAAO;AACd,YAAQ,MAAM,mCAAmC,KAAK;AACtD,WAAO,KAAK,MAAM;AAAA,EACnB;AACH;AAEA,SAAS,eAAe,UAAU,QAAQ;AACxC,SAAO,CAAC,IAAI,MAAM,SAAS;AAEzB,UAAM,WAAW,UAAU,GAAG,OAAO,KAAK,UAAU,QAAQA,KAAU,MAAC,QAAQ;AAE/E,QAAI,UAAU;AACZ,aAAO,KAAI;AAAA,IACjB,OAAW;AACL,aAAO,KAAK,MAAM;AAAA,IACnB;AAAA,EACL;AACA;;;"}
|