@ozdao/prometheus-framework 0.2.80 → 0.2.82
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
- package/dist/credentials.schema-CfhPcsuI.js +105 -0
- package/dist/events.server.js +4 -15
- package/dist/events.server.mjs +3 -14
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-B6a1mPgp.mjs +217 -0
- package/dist/index-BCCiEK_u.js +216 -0
- package/dist/main-8N2Jmsuk.js +91 -0
- package/dist/main-CkeuHuCY.mjs +13619 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-Cu_mPkjE.js +77 -0
- package/dist/metadata.schema-cbFgazeK.mjs +78 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
- package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
- package/dist/organizations.server.js +297 -134
- package/dist/organizations.server.mjs +295 -132
- package/dist/products.server.js +2 -2
- package/dist/products.server.mjs +2 -2
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +32 -155
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +55 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -55
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +73 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +78 -103
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +14 -14
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +132 -141
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +32 -25
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +39 -39
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +39 -50
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +161 -138
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +199 -79
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +83 -126
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +59 -70
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +4 -4
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
- package/dist/queryProcessor-DRMo_GWK.js +161 -0
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.server.js +69 -38
- package/dist/users.server.mjs +67 -36
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/dist/web-CtVocufd.js +1 -0
- package/dist/web-DNq1tHCE.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +13 -2
- package/src/components/Block/Block.vue +3 -2
- package/src/components/Button/Button.vue +9 -12
- package/src/components/Feed/Feed.vue +28 -6
- package/src/components/FieldPhone/FieldPhone.vue +592 -558
- package/src/components/LocationMarker/LocationMarker.vue +26 -22
- package/src/components/Popup/Popup.vue +22 -23
- package/src/components/Select/Select.vue +43 -32
- package/src/components/Slider/Slider.vue +3 -4
- package/src/modules/auth/components/pages/Invite.vue +7 -7
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +4 -3
- package/src/modules/events/components/pages/Event.vue +4 -3
- package/src/modules/events/components/pages/Events.vue +23 -6
- package/src/modules/events/components/sections/HeroEvent.vue +1 -1
- package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
- package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
- package/src/modules/globals/localization/vue-i18n.js +3 -0
- package/src/modules/globals/models/credentials.schema.js +7 -0
- package/src/modules/globals/models/metadata.schema.js +17 -0
- package/src/modules/globals/models/profile.schema.js +23 -0
- package/src/modules/globals/models/socials.schema.js +22 -0
- package/src/modules/globals/router/routerGuards.js +1 -0
- package/src/modules/globals/services/globals.cashe.js +26 -0
- package/src/modules/globals/services/globals.crud.js +115 -0
- package/src/modules/globals/services/globals.logger.js +41 -0
- package/src/modules/globals/services/globals.store.js +114 -0
- package/src/modules/icons/entities/IconGallery.vue +14 -0
- package/src/modules/icons/entities/IconLeftovers.vue +14 -0
- package/src/modules/icons/entities/IconOrders.vue +15 -0
- package/src/modules/icons/entities/IconProducts.vue +14 -0
- package/src/modules/landing/components/sections/HeroSection.vue +1 -1
- package/src/modules/landing/components/sections/MobileApp.vue +4 -4
- package/src/modules/landing/router/landing.js +1 -1
- package/src/modules/marketplace/components/sections/Filters.vue +3 -3
- package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
- package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
- package/src/modules/middlewares/server/verifyAccesses.js +33 -0
- package/src/modules/middlewares/server/verifyInvites.js +4 -4
- package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
- package/src/modules/orders/components/pages/Orders.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
- package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
- package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
- package/src/modules/orders/controllers/applications.controller.js +2 -0
- package/src/modules/orders/controllers/orders.controller.js +77 -52
- package/src/modules/orders/models/customer.model.js +54 -18
- package/src/modules/orders/models/order.model.js +1 -1
- package/src/modules/orders/orders.client.js +51 -51
- package/src/modules/orders/orders.server.js +32 -12
- package/src/modules/orders/router/orders.router.js +36 -41
- package/src/modules/orders/routes/orders.routes.js +3 -21
- package/src/modules/orders/store/customers.store.js +5 -0
- package/src/modules/orders/store/models/customer.js +29 -0
- package/src/modules/orders/store/orders.js +14 -20
- package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
- package/src/modules/organizations/components/pages/Members.vue +178 -64
- package/src/modules/organizations/components/pages/Organization.vue +1 -41
- package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
- package/src/modules/organizations/controllers/departments.controller.js +2 -4
- package/src/modules/organizations/controllers/invites.controller.js +24 -23
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/models/department.model.js +52 -2
- package/src/modules/organizations/models/invite.model.js +29 -32
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +2 -1
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/organizations/routes/departments.routes.js +18 -7
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/departments.js +22 -1
- package/src/modules/organizations/store/invites.js +74 -90
- package/src/modules/products/components/blocks/CardProduct.vue +24 -0
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/reports/components/sections/FormReport.vue +40 -40
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
- package/src/modules/users/components/blocks/CardUser.vue +85 -0
- package/src/modules/users/controllers/users.controller.js +36 -13
- package/src/modules/users/middlewares/visitor.logger.js +66 -0
- package/src/modules/users/models/request.model.js +18 -0
- package/src/modules/users/models/user.model.js +26 -55
- package/src/modules/users/models/visitor.model.js +14 -0
- package/src/modules/users/store/users.js +2 -11
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
- package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
- package/src/components/FieldPhone/FieldPhone2.vue +0 -671
- package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
- package/src/modules/organizations/components/blocks/User.vue +0 -69
- /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
@@ -1,18 +1,17 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import
|
1
|
+
import { ref as d, reactive as Ce, onMounted as ge, computed as p, watch as h, nextTick as S, openBlock as y, createElementBlock as m, Fragment as K, createElementVNode as w, normalizeClass as I, normalizeStyle as A, withDirectives as M, withKeys as P, createCommentVNode as x, toDisplayString as D, renderList as be, vShow as Oe, unref as Se, vModelDynamic as we, renderSlot as Ie, createVNode as xe, Transition as Te, withCtx as ke } from "vue";
|
2
|
+
import je from "./click-outside.js";
|
3
|
+
import Ae from "./all-countries.js";
|
4
4
|
import "./FieldPhone.vue2.js";
|
5
|
-
import
|
6
|
-
import { parsePhoneNumber as
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
},
|
5
|
+
import De from "../../../../_virtual/_plugin-vue_export-helper.js";
|
6
|
+
import { parsePhoneNumber as H } from "../../../node_modules/libphonenumber-js/min/exports/parsePhoneNumber.js";
|
7
|
+
const Be = ["tabindex"], Ee = { class: "flex-nowrap flex flex-v-center p-medium vti__selection" }, Fe = ["innerHTML"], Me = {
|
8
|
+
key: 1,
|
9
|
+
class: "vti__country-code"
|
10
|
+
}, Pe = ["onClick", "onMousemove"], He = ["innerHTML"], Ve = { key: 1 }, Le = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex"], Re = {
|
11
|
+
key: 0,
|
12
|
+
class: "mn-t-thin mn-b-thin invalid-feedback"
|
13
|
+
}, Ne = {
|
14
|
+
__name: "FieldPhone",
|
16
15
|
props: {
|
17
16
|
modelValue: { type: String, default: "" },
|
18
17
|
badClass: { type: [String, Array, Object], default: "" },
|
@@ -23,22 +22,20 @@ const E = S({
|
|
23
22
|
goodInputClass: { type: [String, Array, Object], default: "" },
|
24
23
|
badInputStyle: { type: [String, Array, Object], default: "" },
|
25
24
|
goodInputStyle: { type: [String, Array, Object], default: "" },
|
26
|
-
allCountries: { type: Array, default: () =>
|
27
|
-
autoFormat: { type: Boolean, default: () =>
|
25
|
+
allCountries: { type: Array, default: () => Ae },
|
26
|
+
autoFormat: { type: Boolean, default: () => !0 },
|
28
27
|
validation: { type: [Boolean, Object], default: !1 },
|
29
|
-
customValidate: { type: [Boolean, RegExp], default: () =>
|
30
|
-
defaultCountry: { type: String, default: () =>
|
31
|
-
disabled: { type: Boolean, default: () =>
|
32
|
-
autoDefaultCountry: { type: Boolean, default: () =>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
validCharactersOnly: { type: Boolean, default: () => o("validCharactersOnly") },
|
41
|
-
rootClass: { type: [String, Array, Object], default: () => o("styleClasses") },
|
28
|
+
customValidate: { type: [Boolean, RegExp], default: () => !1 },
|
29
|
+
defaultCountry: { type: String, default: () => "" },
|
30
|
+
disabled: { type: Boolean, default: () => !1 },
|
31
|
+
autoDefaultCountry: { type: Boolean, default: () => !0 },
|
32
|
+
ignoredCountries: { type: Array, default: () => [] },
|
33
|
+
invalidMsg: { type: String, default: () => "" },
|
34
|
+
mode: { type: String, default: () => "auto" },
|
35
|
+
onlyCountries: { type: Array, default: () => [] },
|
36
|
+
preferredCountries: { type: Array, default: () => [] },
|
37
|
+
validCharactersOnly: { type: Boolean, default: () => !1 },
|
38
|
+
rootClass: { type: [String, Array, Object], default: () => "" },
|
42
39
|
inputClass: { type: [String, Array, Object], default: () => "" },
|
43
40
|
divInputClass: { type: [String, Array, Object], default: () => "" },
|
44
41
|
rootStyle: { type: [String, Array, Object], default: () => "" },
|
@@ -46,343 +43,331 @@ const E = S({
|
|
46
43
|
listStyle: { type: [String, Array, Object], default: () => "" },
|
47
44
|
inputStyle: { type: [String, Array, Object], default: () => "" },
|
48
45
|
inputId: { type: [String, Array, Object], default: () => "" },
|
49
|
-
Placeholder: { type: [String, Object, Function], default: () => "" }
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
46
|
+
Placeholder: { type: [String, Object, Function], default: () => "" },
|
47
|
+
dropdownOptions: {
|
48
|
+
type: Object,
|
49
|
+
default: () => ({
|
50
|
+
showDialCodeInList: !0,
|
51
|
+
showDialCodeInSelection: !1,
|
52
|
+
showFlags: !0,
|
53
|
+
tabindex: 0
|
54
|
+
})
|
55
|
+
},
|
56
|
+
inputOptions: {
|
57
|
+
type: Object,
|
58
|
+
default: () => ({
|
59
|
+
autocomplete: "on",
|
60
|
+
autofocus: !1,
|
61
|
+
id: "",
|
62
|
+
maxlength: 25,
|
63
|
+
name: "telephone",
|
64
|
+
placeholder: "Enter a phone number",
|
65
|
+
readonly: !1,
|
66
|
+
required: !1,
|
67
|
+
tabindex: 0,
|
68
|
+
type: "tel",
|
69
|
+
styleClasses: ""
|
70
|
+
})
|
71
|
+
}
|
69
72
|
},
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
73
|
+
emits: [
|
74
|
+
"update:modelValue",
|
75
|
+
"validate",
|
76
|
+
"country-changed",
|
77
|
+
"open",
|
78
|
+
"close",
|
79
|
+
"blur",
|
80
|
+
"focus",
|
81
|
+
"enter",
|
82
|
+
"space"
|
83
|
+
],
|
84
|
+
setup(l, { emit: W }) {
|
85
|
+
let G = je;
|
86
|
+
const t = l, c = W;
|
87
|
+
d(5), d(5), Ce({
|
88
|
+
action: null,
|
89
|
+
amount: null
|
90
|
+
});
|
91
|
+
const o = d(t.modelValue ? t.modelValue : ""), v = d(""), f = d(!1), J = d(!1), i = d(null), B = d(""), V = d(null), L = d("below"), R = d(t.Placeholder !== "" ? t.Placeholder : t.inputOptions.placeholder), N = d(null), s = d(null), E = d(null);
|
92
|
+
ge(async () => {
|
93
|
+
t.modelValue && (o.value = t.modelValue), ue(), le().then(() => {
|
94
|
+
var e;
|
95
|
+
!o.value && ((e = t.inputOptions) != null && e.showDialCode) && v.value && (o.value = `+${v.value}`), c("validate", u.value);
|
96
|
+
}).catch(console.error).then(() => {
|
97
|
+
J.value = !0;
|
98
|
+
});
|
99
|
+
});
|
100
|
+
const C = p(() => T(v.value)), Q = p(() => C.value ? C.value.flag : null), X = p(() => t.mode === "auto" ? !o.value || o.value[0] !== "+" ? "national" : "international" : ["international", "national"].includes(t.mode) ? t.mode : (console.error('Invalid value of prop "mode"'), "international")), F = p(() => t.onlyCountries && t.onlyCountries.length ? t.allCountries.filter(({ iso2: e }) => t.onlyCountries.includes(e.toUpperCase())) : t.ignoredCountries && t.ignoredCountries.length ? t.allCountries.filter(
|
101
|
+
({ iso2: e }) => !t.ignoredCountries.includes(e.toUpperCase()) && !t.ignoredCountries.includes(e.toLowerCase())
|
102
|
+
) : t.allCountries), g = p(() => [...ae(t.preferredCountries).map((n) => ({ ...n, preferred: !0 })), ...F.value]), u = p(() => {
|
103
|
+
var j, q, z;
|
104
|
+
let e = {};
|
105
|
+
((j = o.value) == null ? void 0 : j[0]) === "+" ? e = H(o.value) || {} : e = H(o.value, v.value) || {};
|
106
|
+
const { metadata: n, ...a } = e;
|
107
|
+
let r = (q = e.isValid) == null ? void 0 : q.call(e), O = o.value;
|
108
|
+
return r && (O = (z = e.format) == null ? void 0 : z.call(e, X.value.toUpperCase(), { nationalPrefix: !1 })), e.country && (t.ignoredCountries.length || t.onlyCountries.length) && (T(e.country) || (r = !1, e = { ...e, country: null })), {
|
109
|
+
...a,
|
110
|
+
countryCode: e.country,
|
111
|
+
valid: r,
|
112
|
+
country: C.value,
|
113
|
+
formatted: O
|
114
|
+
};
|
115
|
+
}), Y = p(() => u.value.valid === !0 ? t.goodClass : u.value.valid === !1 ? t.badClass : void 0), Z = p(() => u.value.valid === !0 ? t.goodStyle : u.value.valid === !1 ? t.badStyle : void 0), _ = p(() => u.value.valid === !0 ? t.goodInputClass : u.value.valid === !1 ? t.badInputClass : void 0), ee = p(() => u.value.valid === !0 ? t.goodInputStyle : u.value.valid === !1 ? t.badInputStyle : void 0);
|
116
|
+
h(C, (e, n) => {
|
117
|
+
if (!e && (n != null && n.iso2)) {
|
118
|
+
v.value = n.iso2;
|
74
119
|
return;
|
75
120
|
}
|
76
|
-
e != null && e.iso2 &&
|
77
|
-
},
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
"phoneObject.formatted": function(e) {
|
85
|
-
!this.autoFormat || this.customValidate || (this.emitInput(e), this.$nextTick(() => {
|
86
|
-
e && !this.value && (this.phone = e);
|
121
|
+
e != null && e.iso2 && (c("country-changed", e), $());
|
122
|
+
}), h(() => u.value.countryCode, (e) => {
|
123
|
+
v.value = e;
|
124
|
+
}), h(() => u.value.valid, () => {
|
125
|
+
c("validate", u.value);
|
126
|
+
}), h(() => u.value.formatted, (e) => {
|
127
|
+
!t.autoFormat || t.customValidate || (k(e), S(() => {
|
128
|
+
e && !t.modelValue && (o.value = e);
|
87
129
|
}));
|
88
|
-
},
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
this.resetPlaceholder();
|
94
|
-
},
|
95
|
-
value(e, t) {
|
96
|
-
this.testCharacters() ? this.phone = e : this.$nextTick(() => {
|
97
|
-
this.phone = t, this.onInput();
|
130
|
+
}), h(() => t.inputOptions.placeholder, () => {
|
131
|
+
$();
|
132
|
+
}), h(() => t.modelValue, (e, n) => {
|
133
|
+
re() ? o.value = e : S(() => {
|
134
|
+
o.value = n, U();
|
98
135
|
});
|
99
|
-
},
|
100
|
-
|
101
|
-
e ? (this.setDropdownPosition(), this.$emit("open")) : this.$emit("close");
|
102
|
-
}
|
103
|
-
},
|
104
|
-
mounted() {
|
105
|
-
this.value && (this.phone = this.value), this.cleanInvalidCharacters(), this.initializeCountry().then(() => {
|
106
|
-
var e;
|
107
|
-
!this.phone && ((e = this.inputOptions) != null && e.showDialCode) && this.activeCountryCode && (this.phone = `+${this.activeCountryCode}`), this.$emit("validate", this.phoneObject);
|
108
|
-
}).catch(console.error).then(() => {
|
109
|
-
this.finishMounted = !0;
|
136
|
+
}), h(f, (e) => {
|
137
|
+
e ? (he(), c("open")) : c("close");
|
110
138
|
});
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
},
|
119
|
-
parsedMode() {
|
120
|
-
return this.mode === "auto" ? !this.phone || this.phone[0] !== "+" ? "national" : "international" : ["international", "national"].includes(this.mode) ? this.mode : (console.error('Invalid value of prop "mode"'), "international");
|
121
|
-
},
|
122
|
-
filteredCountries() {
|
123
|
-
return this.onlyCountries.length ? this.allCountries.filter(({ iso2: e }) => this.onlyCountries.some((t) => t.toUpperCase() === e)) : this.ignoredCountries.length ? this.allCountries.filter(
|
124
|
-
({ iso2: e }) => !this.ignoredCountries.includes(e.toUpperCase()) && !this.ignoredCountries.includes(e.toLowerCase())
|
125
|
-
) : this.allCountries;
|
126
|
-
},
|
127
|
-
sortedCountries() {
|
128
|
-
return [...this.getCountries(this.preferredCountries).map((t) => ({ ...t, preferred: !0 })), ...this.filteredCountries];
|
129
|
-
},
|
130
|
-
phoneObject() {
|
131
|
-
var d, f, i;
|
132
|
-
let e;
|
133
|
-
((d = this.phone) == null ? void 0 : d[0]) === "+" ? e = g(this.phone) || {} : e = g(this.phone, this.activeCountryCode) || {};
|
134
|
-
const { metadata: t, ...n } = e;
|
135
|
-
let s = (f = e.isValid) == null ? void 0 : f.call(e), a = this.phone;
|
136
|
-
return s && (a = (i = e.format) == null ? void 0 : i.call(e, this.parsedMode.toUpperCase(), { nationalPrefix: !1 })), e.country && (this.ignoredCountries.length || this.onlyCountries.length) && (this.findCountry(e.country) || (s = !1, Object.assign(e, { country: null }))), Object.assign(n, {
|
137
|
-
countryCode: e.country,
|
138
|
-
valid: s,
|
139
|
-
country: this.activeCountry,
|
140
|
-
formatted: a
|
141
|
-
}), n;
|
142
|
-
},
|
143
|
-
classes() {
|
144
|
-
return this.phoneObject.valid === !0 ? this.goodClass : this.phoneObject.valid === !1 ? this.badClass : void 0;
|
145
|
-
},
|
146
|
-
styles() {
|
147
|
-
return this.phoneObject.valid === !0 ? this.goodStyle : this.phoneObject.valid === !1 ? this.badStyle : void 0;
|
148
|
-
},
|
149
|
-
Iclasses() {
|
150
|
-
return this.phoneObject.valid === !0 ? this.goodInputClass : this.phoneObject.valid === !1 ? this.badInputClass : void 0;
|
151
|
-
},
|
152
|
-
Istyles() {
|
153
|
-
return this.phoneObject.valid === !0 ? this.goodInputStyle : this.phoneObject.valid === !1 ? this.badInputStyle : void 0;
|
139
|
+
function te() {
|
140
|
+
return fetch("https://ip2c.org/s").then((e) => e.text()).then((e) => {
|
141
|
+
const n = (e || "").toString();
|
142
|
+
if (!n || n[0] !== "1")
|
143
|
+
throw new Error("unable to fetch the country");
|
144
|
+
return n.substr(2, 2);
|
145
|
+
});
|
154
146
|
}
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
147
|
+
function ne(e, n) {
|
148
|
+
if (e.setSelectionRange)
|
149
|
+
e.focus(), e.setSelectionRange(n, n);
|
150
|
+
else if (e.createTextRange) {
|
151
|
+
const a = e.createTextRange();
|
152
|
+
a.collapse(!0), a.moveEnd("character", n), a.moveStart("character", n), a.select();
|
153
|
+
}
|
154
|
+
}
|
155
|
+
function $() {
|
156
|
+
R.value = t.inputOptions.placeholder;
|
157
|
+
}
|
158
|
+
function le() {
|
161
159
|
return new Promise((e) => {
|
162
|
-
var
|
163
|
-
if (((
|
160
|
+
var a;
|
161
|
+
if (((a = o.value) == null ? void 0 : a[0]) === "+") {
|
164
162
|
e();
|
165
163
|
return;
|
166
164
|
}
|
167
|
-
if (
|
168
|
-
|
165
|
+
if (t.defaultCountry) {
|
166
|
+
b(t.defaultCountry), e();
|
169
167
|
return;
|
170
168
|
}
|
171
|
-
const
|
172
|
-
|
173
|
-
|
174
|
-
}).catch((
|
175
|
-
console.warn(
|
176
|
-
}).
|
169
|
+
const n = t.preferredCountries[0] || F.value[0];
|
170
|
+
t.autoDefaultCountry ? te().then((r) => {
|
171
|
+
b(r || v.value);
|
172
|
+
}).catch((r) => {
|
173
|
+
console.warn(r), b(n);
|
174
|
+
}).finally(() => {
|
177
175
|
e();
|
178
|
-
}) : (
|
176
|
+
}) : (b(n), e());
|
179
177
|
});
|
180
|
-
}
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
var n, s;
|
198
|
-
let t = e;
|
199
|
-
if (typeof t == "string" && (t = this.findCountry(t)), !!t) {
|
200
|
-
if (((n = this.phone) == null ? void 0 : n[0]) === "+" && t.iso2 && this.phoneObject.nationalNumber) {
|
201
|
-
this.activeCountryCode = t.iso2, this.phone = g(
|
202
|
-
this.phoneObject.nationalNumber,
|
203
|
-
t.iso2
|
204
|
-
).formatInternational();
|
178
|
+
}
|
179
|
+
function ae(e = []) {
|
180
|
+
return e.map((n) => T(n)).filter(Boolean);
|
181
|
+
}
|
182
|
+
function T(e = "") {
|
183
|
+
return F.value.find((n) => n.iso2 === e.toUpperCase());
|
184
|
+
}
|
185
|
+
function oe(e, n) {
|
186
|
+
const a = i.value === e, r = e === t.preferredCountries.length - 1, O = t.preferredCountries.some((j) => j.toUpperCase() === n);
|
187
|
+
return { highlighted: a, "last-preferred": r, preferred: O };
|
188
|
+
}
|
189
|
+
function b(e) {
|
190
|
+
var a, r;
|
191
|
+
let n = typeof e == "string" ? T(e) : e;
|
192
|
+
if (n) {
|
193
|
+
if (((a = o.value) == null ? void 0 : a[0]) === "+" && n.iso2 && u.value.nationalNumber) {
|
194
|
+
v.value = n.iso2, o.value = H(u.value.nationalNumber, n.iso2).formatInternational();
|
205
195
|
return;
|
206
196
|
}
|
207
|
-
if ((
|
208
|
-
|
197
|
+
if ((r = t.inputOptions) != null && r.showDialCode && n) {
|
198
|
+
o.value = `+${n.dialCode}`;
|
209
199
|
return;
|
210
200
|
}
|
211
|
-
|
201
|
+
v.value = n.iso2, k(o.value);
|
212
202
|
}
|
213
|
-
}
|
214
|
-
|
215
|
-
const e =
|
216
|
-
if (
|
217
|
-
const
|
218
|
-
|
203
|
+
}
|
204
|
+
function ue() {
|
205
|
+
const e = o.value;
|
206
|
+
if (t.validCharactersOnly) {
|
207
|
+
const n = o.value.match(/[()\-+0-9\s]*/g);
|
208
|
+
o.value = n.join("");
|
219
209
|
}
|
220
|
-
if (
|
221
|
-
const
|
222
|
-
|
210
|
+
if (t.customValidate && t.customValidate instanceof RegExp) {
|
211
|
+
const n = o.value.match(t.customValidate);
|
212
|
+
o.value = n ? n.join("") : "";
|
223
213
|
}
|
224
|
-
e !==
|
225
|
-
}
|
226
|
-
|
227
|
-
return
|
228
|
-
}
|
229
|
-
|
230
|
-
return
|
231
|
-
}
|
232
|
-
|
233
|
-
|
234
|
-
}
|
235
|
-
|
236
|
-
|
237
|
-
}
|
238
|
-
|
239
|
-
|
240
|
-
}
|
241
|
-
|
242
|
-
|
243
|
-
}
|
244
|
-
|
245
|
-
|
246
|
-
}
|
247
|
-
|
248
|
-
|
249
|
-
}
|
250
|
-
|
251
|
-
|
252
|
-
}
|
253
|
-
|
254
|
-
|
255
|
-
}
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
const
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
this.typeToFindInput += e.key, clearTimeout(this.typeToFindTimer), this.typeToFindTimer = setTimeout(() => {
|
272
|
-
this.typeToFindInput = "";
|
273
|
-
}, 700);
|
274
|
-
const t = this.sortedCountries.slice(this.preferredCountries.length).findIndex((n) => n.name.toLowerCase().startsWith(this.typeToFindInput));
|
275
|
-
if (t >= 0) {
|
276
|
-
this.selectedIndex = this.preferredCountries.length + t;
|
277
|
-
const n = this.$refs.list.children[this.selectedIndex], s = n.offsetTop < this.$refs.list.scrollTop, a = n.offsetTop + n.clientHeight > this.$refs.list.scrollTop + this.$refs.list.clientHeight;
|
278
|
-
(s || a) && (this.$refs.list.scrollTop = n.offsetTop - this.$refs.list.clientHeight / 2);
|
214
|
+
e !== o.value && k(o.value);
|
215
|
+
}
|
216
|
+
function re() {
|
217
|
+
return t.validCharactersOnly && !/^[()\-+0-9\s]*$/.test(o.value) ? !1 : t.customValidate ? ie() : !0;
|
218
|
+
}
|
219
|
+
function ie() {
|
220
|
+
return t.customValidate instanceof RegExp ? t.customValidate.test(o.value) : !1;
|
221
|
+
}
|
222
|
+
function U() {
|
223
|
+
E.value.setCustomValidity(u.valid ? "" : t.invalidMsg), k(o.value);
|
224
|
+
}
|
225
|
+
function k(e) {
|
226
|
+
c("update:modelValue", e), u.value.valid ? c("country", u.value.number) : c("country", null);
|
227
|
+
}
|
228
|
+
function se() {
|
229
|
+
c("blur");
|
230
|
+
}
|
231
|
+
function de() {
|
232
|
+
ne(E.value, o.value.length), c("focus");
|
233
|
+
}
|
234
|
+
function ce() {
|
235
|
+
c("enter");
|
236
|
+
}
|
237
|
+
function fe() {
|
238
|
+
c("space");
|
239
|
+
}
|
240
|
+
function ve() {
|
241
|
+
t.disabled || (f.value = !f.value);
|
242
|
+
}
|
243
|
+
function pe() {
|
244
|
+
f.value = !1;
|
245
|
+
}
|
246
|
+
function ye(e) {
|
247
|
+
e.keyCode === 40 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? 0 : Math.min(g.value.length - 1, i.value + 1), S(() => {
|
248
|
+
const n = s.value.children[i.value];
|
249
|
+
n.offsetTop + n.clientHeight > s.value.scrollTop + s.value.clientHeight && (s.value.scrollTop = n.offsetTop - s.value.clientHeight + n.clientHeight);
|
250
|
+
})) : e.keyCode === 38 ? (e.preventDefault(), f.value = !0, i.value = i.value === null ? g.value.length - 1 : Math.max(0, i.value - 1), S(() => {
|
251
|
+
const n = s.value.children[i.value];
|
252
|
+
n.offsetTop < s.value.scrollTop && (s.value.scrollTop = n.offsetTop);
|
253
|
+
})) : e.keyCode === 13 ? (e.preventDefault(), i.value !== null && b(g.value[i.value]), f.value = !f.value) : (B.value += e.key, clearTimeout(V), V = setTimeout(() => {
|
254
|
+
B.value = "";
|
255
|
+
}, 700), S(() => {
|
256
|
+
const n = g.value.slice(t.preferredCountries.length).findIndex((a) => a.name.toLowerCase().startsWith(B.value));
|
257
|
+
if (n >= 0) {
|
258
|
+
i.value = t.preferredCountries.length + n;
|
259
|
+
const a = s.value.children[i.value];
|
260
|
+
(a.offsetTop < s.value.scrollTop || a.offsetTop + a.clientHeight > s.value.scrollTop + s.value.clientHeight) && (s.value.scrollTop = a.offsetTop - s.value.clientHeight / 2);
|
279
261
|
}
|
280
|
-
}
|
281
|
-
},
|
282
|
-
reset() {
|
283
|
-
this.selectedIndex = this.sortedCountries.map((e) => e.iso2).indexOf(this.activeCountryCode), this.open = !1;
|
284
|
-
},
|
285
|
-
setDropdownPosition() {
|
286
|
-
window.innerHeight - this.$refs.rootElement.getBoundingClientRect().bottom > 200 ? this.dropdownOpenDirection = "below" : this.dropdownOpenDirection = "above";
|
262
|
+
}));
|
287
263
|
}
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
onKeydown: [
|
308
|
-
t[0] || (t[0] = (...i) => e.keyboardNav && e.keyboardNav(...i)),
|
309
|
-
t[2] || (t[2] = m((...i) => e.reset && e.reset(...i), ["esc"]))
|
310
|
-
],
|
311
|
-
onClick: t[1] || (t[1] = (...i) => e.toggleDropdown && e.toggleDropdown(...i)),
|
312
|
-
style: c([e.dropdownStyle])
|
313
|
-
}, [
|
314
|
-
u("span", N, [
|
315
|
-
e.dropdownOptions.showFlags ? (r(), l("span", {
|
316
|
-
key: 0,
|
317
|
-
innerHTML: e.activeCountryFlag,
|
318
|
-
class: "mn-r-thin"
|
319
|
-
}, null, 8, L)) : p("", !0),
|
320
|
-
e.dropdownOptions.showDialCodeInSelection ? (r(), l("span", U, " +" + y(e.activeCountry && e.activeCountry.dialCode), 1)) : p("", !0)
|
264
|
+
function me() {
|
265
|
+
i.value = g.value.map((e) => e.iso2).indexOf(v.value), f.value = !1;
|
266
|
+
}
|
267
|
+
function he() {
|
268
|
+
const n = window.innerHeight - N.value.getBoundingClientRect().bottom > 200;
|
269
|
+
L.value = n ? "below" : "above";
|
270
|
+
}
|
271
|
+
return (e, n) => (y(), m(K, null, [
|
272
|
+
w("div", {
|
273
|
+
class: I([[
|
274
|
+
l.rootClass,
|
275
|
+
Y.value,
|
276
|
+
e.$attrs.class,
|
277
|
+
{ "bg-fourth-nano": l.validation },
|
278
|
+
{ disabled: l.disabled }
|
279
|
+
], "vue3-reactive-tel-input"]),
|
280
|
+
style: A([
|
281
|
+
l.rootStyle,
|
282
|
+
Z.value
|
321
283
|
]),
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
284
|
+
ref_key: "rootElement",
|
285
|
+
ref: N
|
286
|
+
}, [
|
287
|
+
M((y(), m("div", {
|
288
|
+
class: I([["vti__dropdown", { open: f.value }], "br-solid br-black-transp br-1px radius-thin"]),
|
289
|
+
style: A([l.dropdownStyle]),
|
290
|
+
tabindex: l.dropdownOptions.tabindex,
|
291
|
+
onKeydown: [
|
292
|
+
ye,
|
293
|
+
P(me, ["esc"])
|
294
|
+
],
|
295
|
+
onClick: ve
|
326
296
|
}, [
|
327
|
-
(
|
328
|
-
|
329
|
-
key: i.iso2 + (i.preferred ? "-preferred" : ""),
|
330
|
-
onClick: (I) => e.choose(i),
|
331
|
-
onMousemove: (I) => e.selectedIndex = b
|
332
|
-
}, [
|
333
|
-
e.dropdownOptions.showFlags ? (r(), l("span", {
|
297
|
+
w("span", Ee, [
|
298
|
+
l.dropdownOptions.showFlags ? (y(), m("span", {
|
334
299
|
key: 0,
|
335
|
-
innerHTML:
|
336
|
-
class: "mn-r-
|
337
|
-
}, null, 8,
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
300
|
+
innerHTML: Q.value,
|
301
|
+
class: "mn-r-nano"
|
302
|
+
}, null, 8, Fe)) : x("", !0),
|
303
|
+
l.dropdownOptions.showDialCodeInSelection ? (y(), m("span", Me, " +" + D(C.value && C.value.dialCode), 1)) : x("", !0)
|
304
|
+
]),
|
305
|
+
M(w("ul", {
|
306
|
+
ref_key: "list",
|
307
|
+
ref: s,
|
308
|
+
class: I(["bs-black radius-small vti__dropdown-list", L.value]),
|
309
|
+
style: A([l.listStyle])
|
310
|
+
}, [
|
311
|
+
(y(!0), m(K, null, be(g.value, (a, r) => (y(), m("li", {
|
312
|
+
class: I(["flex-nowrap flex w-max", ["vti__dropdown-item", oe(r, a.iso2)]]),
|
313
|
+
key: a.iso2 + (a.preferred ? "-preferred" : ""),
|
314
|
+
onClick: (O) => b(a),
|
315
|
+
onMousemove: (O) => i.value = r
|
316
|
+
}, [
|
317
|
+
l.dropdownOptions.showFlags ? (y(), m("span", {
|
318
|
+
key: 0,
|
319
|
+
innerHTML: a.flag,
|
320
|
+
class: "mn-r-thin"
|
321
|
+
}, null, 8, He)) : x("", !0),
|
322
|
+
w("strong", null, D(a.name), 1),
|
323
|
+
l.dropdownOptions.showDialCodeInList ? (y(), m("span", Ve, " +" + D(a.dialCode), 1)) : x("", !0)
|
324
|
+
], 42, Pe))), 128))
|
325
|
+
], 6), [
|
326
|
+
[Oe, f.value]
|
327
|
+
])
|
328
|
+
], 46, Be)), [
|
329
|
+
[Se(G), pe]
|
330
|
+
]),
|
331
|
+
M(w("input", {
|
332
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => o.value = a),
|
333
|
+
inputmode: "numeric",
|
334
|
+
pattern: "\\d*",
|
335
|
+
ref_key: "input",
|
336
|
+
ref: E,
|
337
|
+
type: l.inputOptions.type,
|
338
|
+
autocomplete: l.inputOptions.autocomplete,
|
339
|
+
autofocus: l.inputOptions.autofocus,
|
340
|
+
class: I(["vti__input", l.inputOptions.styleClasses, l.inputClass, _.value]),
|
341
|
+
style: A([l.inputStyle, ee.value]),
|
342
|
+
disabled: l.disabled,
|
343
|
+
id: l.inputId !== "" ? l.inputId : l.inputOptions.id,
|
344
|
+
maxlength: l.inputOptions.maxlength,
|
345
|
+
name: l.inputId !== "" ? l.inputId : l.inputOptions.name,
|
346
|
+
placeholder: R.value,
|
347
|
+
readonly: l.inputOptions.readonly,
|
348
|
+
required: l.inputOptions.required,
|
349
|
+
tabindex: l.inputOptions.tabindex,
|
350
|
+
onBlur: se,
|
351
|
+
onFocus: de,
|
352
|
+
onInput: U,
|
353
|
+
onKeyup: [
|
354
|
+
P(ce, ["enter"]),
|
355
|
+
P(fe, ["space"])
|
356
|
+
]
|
357
|
+
}, null, 46, Le), [
|
358
|
+
[we, o.value]
|
359
|
+
]),
|
360
|
+
Ie(e.$slots, "default", {}, void 0, !0)
|
361
|
+
], 6),
|
362
|
+
xe(Te, { name: "fade" }, {
|
363
|
+
default: ke(() => [
|
364
|
+
l.validation ? (y(), m("div", Re, " * " + D(l.validation.message), 1)) : x("", !0)
|
365
|
+
]),
|
366
|
+
_: 1
|
367
|
+
})
|
368
|
+
], 64));
|
369
|
+
}
|
370
|
+
}, Ge = /* @__PURE__ */ De(Ne, [["__scopeId", "data-v-6cc570f0"]]);
|
386
371
|
export {
|
387
|
-
|
372
|
+
Ge as default
|
388
373
|
};
|