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