@ozdao/prometheus-framework 0.2.200 → 0.2.202

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +113 -1
  2. package/dist/prometheus-framework/src/components/Address/Address.vue.cjs.map +1 -0
  3. package/dist/prometheus-framework/src/components/Address/Address.vue.js +76 -51
  4. package/dist/prometheus-framework/src/components/Address/Address.vue.js.map +1 -0
  5. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +133 -1
  6. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -0
  7. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +82 -44
  8. package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -0
  9. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +32 -1
  10. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs.map +1 -0
  11. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +20 -14
  12. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js.map +1 -0
  13. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +64 -1
  14. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs.map +1 -0
  15. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +45 -38
  16. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js.map +1 -0
  17. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +121 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -0
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +97 -76
  20. package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -0
  21. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +169 -1
  24. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs.map +1 -0
  25. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +125 -82
  26. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js.map +1 -0
  27. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs +17 -1
  28. package/dist/prometheus-framework/src/components/Menu/Menu.vue.cjs.map +1 -0
  29. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js +11 -7
  30. package/dist/prometheus-framework/src/components/Menu/Menu.vue.js.map +1 -0
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +92 -1
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs.map +1 -0
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +69 -54
  34. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js.map +1 -0
  35. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +127 -1
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs.map +1 -0
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +75 -51
  38. package/dist/prometheus-framework/src/components/Select/Select.vue2.js.map +1 -0
  39. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  40. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  44. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  46. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  48. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  50. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  52. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
  58. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  60. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  70. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  72. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  74. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  80. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  81. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
  84. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
  85. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
  88. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  89. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  90. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  91. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  92. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
  96. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +4 -4
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  116. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  118. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  130. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
  138. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  139. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +4 -4
  150. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  151. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
  152. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  153. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +2 -2
  154. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  155. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  161. package/package.json +1 -1
  162. package/src/modules/globals/views/components/layouts/Client.vue +2 -2
@@ -1,5 +1,5 @@
1
1
  import { ref, onMounted, watchEffect, openBlock, createElementBlock, createVNode, unref, isRef, createElementVNode, toDisplayString, createCommentVNode } from "vue";
2
- import Field from "../Field/Field.vue.js";
2
+ import Field from "../Field/Field.vue2.js";
3
3
  import _sfc_main$1 from "../../modules/icons/navigation/IconArrow.vue.js";
4
4
  import { useI18n } from "vue-i18n";
5
5
  const _hoisted_1 = { class: "pd-thin radius-extra flex-nowrap flex" };
@@ -1 +1,169 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs"),h=require("../Loader/Loader.vue2.cjs");;/* empty css */const v={class:"pos-relative"},L={key:0,class:"i-regular",width:"98",height:"98",viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k=e.createElementVNode("path",{d:"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",fill:"rgb(var(--white))"},null,-1),b=e.createElementVNode("path",{d:"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",fill:"rgb(var(--white))"},null,-1),E=[k,b],M={__name:"LocationMarker",props:{location:{type:Object,default:()=>({lat:15.87,lng:100.9925})},address:{type:String,default:null},apiKey:String,locale:{type:String,default:"en"}},emits:["update:location","update:address","update:country","update:state","update:city"],setup(C,{emit:_}){const o=C,n=_,d=e.ref(null),s=e.ref(!1);let c,i;e.onMounted(()=>{new w.Loader({apiKey:o.apiKey,version:"weekly",libraries:["places"],language:o.locale}).load().then(()=>{c=new google.maps.Map(d.value,{center:o.location,zoom:15,mapTypeControl:!1,fullscreenControl:!1,disableDefaultUI:!0}),i=new google.maps.Marker({position:o.location,map:c,draggable:!0}),i.addListener("dragend",t=>{const l={lat:t.latLng.lat(),lng:t.latLng.lng()};n("update:location",l),u(l)})}).catch(t=>{console.error(t)})}),e.watchEffect(()=>{o.location&&i&&i.setPosition(new google.maps.LatLng(o.location.lat,o.location.lng))}),e.watchEffect(()=>{if(o.location&&c){const a=new google.maps.LatLng(o.location.lat,o.location.lng);c.setCenter(a),c.setZoom(15)}});function u(a){new google.maps.Geocoder().geocode({location:a},(l,g)=>{if(g==="OK")if(l[0]){n("update:address",l[0].formatted_address);let p="",f="",m="";l[0].address_components.forEach(r=>{r.types.includes("country")&&(p=r.long_name),r.types.includes("administrative_area_level_1")&&(f=r.long_name),r.types.includes("locality")&&(m=r.long_name)}),n("update:country",p),n("update:state",f),n("update:city",m)}else console.error("No results found");else console.error("Geocoder failed due to: "+g)})}async function y(){s.value=!0,navigator.geolocation?navigator.geolocation.getCurrentPosition(a=>{const t={lat:a.coords.latitude,lng:a.coords.longitude};n("update:location",t),u(t),s.value=!1},()=>{console.error("Error getting location"),s.value=!1}):(console.error("Geolocation is not supported by this browser."),s.value=!1)}return(a,t)=>(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",{ref_key:"mapContainer",ref:d,class:"w-100 h-100"},null,512),e.createElementVNode("button",{class:"cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra",onClick:y},[e.createVNode(e.Transition,{name:"ScaleOut",mode:"out-in"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(h.default,{key:1,class:"pos-t-0 pos-l-0 i-small"})):(e.openBlock(),e.createElementBlock("svg",L,E))]),_:1})])]))}};exports.default=M;
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const index = require("../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");
5
+ const Loader = require("../Loader/Loader.vue2.cjs");
6
+ ;/* empty css */
7
+ const _hoisted_1 = { class: "pos-relative" };
8
+ const _hoisted_2 = {
9
+ key: 0,
10
+ class: "i-regular",
11
+ width: "98",
12
+ height: "98",
13
+ viewBox: "0 0 98 98",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg"
16
+ };
17
+ const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", {
18
+ d: "M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",
19
+ fill: "rgb(var(--white))"
20
+ }, null, -1);
21
+ const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("path", {
22
+ d: "M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",
23
+ fill: "rgb(var(--white))"
24
+ }, null, -1);
25
+ const _hoisted_5 = [
26
+ _hoisted_3,
27
+ _hoisted_4
28
+ ];
29
+ const _sfc_main = {
30
+ __name: "LocationMarker",
31
+ props: {
32
+ location: {
33
+ type: Object,
34
+ default: () => ({ lat: 15.87, lng: 100.9925 })
35
+ },
36
+ address: {
37
+ type: String,
38
+ default: null
39
+ },
40
+ apiKey: String,
41
+ locale: {
42
+ type: String,
43
+ default: "en"
44
+ }
45
+ },
46
+ emits: ["update:location", "update:address", "update:country", "update:state", "update:city"],
47
+ setup(__props, { emit: __emit }) {
48
+ const props = __props;
49
+ const emit = __emit;
50
+ const mapContainer = vue.ref(null);
51
+ const locationLoading = vue.ref(false);
52
+ let map, marker;
53
+ vue.onMounted(() => {
54
+ const loader = new index.Loader({
55
+ apiKey: props.apiKey,
56
+ version: "weekly",
57
+ libraries: ["places"],
58
+ language: props.locale
59
+ });
60
+ loader.load().then(() => {
61
+ map = new google.maps.Map(mapContainer.value, {
62
+ center: props.location,
63
+ zoom: 15,
64
+ mapTypeControl: false,
65
+ fullscreenControl: false,
66
+ disableDefaultUI: true
67
+ });
68
+ marker = new google.maps.Marker({
69
+ position: props.location,
70
+ map,
71
+ draggable: true
72
+ });
73
+ marker.addListener("dragend", (e) => {
74
+ const newLocation = { lat: e.latLng.lat(), lng: e.latLng.lng() };
75
+ emit("update:location", newLocation);
76
+ getAddressFromLocation(newLocation);
77
+ });
78
+ }).catch((e) => {
79
+ console.error(e);
80
+ });
81
+ });
82
+ vue.watchEffect(() => {
83
+ if (props.location && marker) {
84
+ marker.setPosition(new google.maps.LatLng(props.location.lat, props.location.lng));
85
+ }
86
+ });
87
+ vue.watchEffect(() => {
88
+ if (props.location && map) {
89
+ const newCenter = new google.maps.LatLng(props.location.lat, props.location.lng);
90
+ map.setCenter(newCenter);
91
+ map.setZoom(15);
92
+ }
93
+ });
94
+ function getAddressFromLocation(location) {
95
+ const geocoder = new google.maps.Geocoder();
96
+ geocoder.geocode({ "location": location }, (results, status) => {
97
+ if (status === "OK") {
98
+ if (results[0]) {
99
+ emit("update:address", results[0].formatted_address);
100
+ let country = "", state = "", city = "";
101
+ results[0].address_components.forEach((addr) => {
102
+ if (addr.types.includes("country")) {
103
+ country = addr.long_name;
104
+ }
105
+ if (addr.types.includes("administrative_area_level_1")) {
106
+ state = addr.long_name;
107
+ }
108
+ if (addr.types.includes("locality")) {
109
+ city = addr.long_name;
110
+ }
111
+ });
112
+ emit("update:country", country);
113
+ emit("update:state", state);
114
+ emit("update:city", city);
115
+ } else {
116
+ console.error("No results found");
117
+ }
118
+ } else {
119
+ console.error("Geocoder failed due to: " + status);
120
+ }
121
+ });
122
+ }
123
+ async function setUserLocation() {
124
+ locationLoading.value = true;
125
+ if (navigator.geolocation) {
126
+ navigator.geolocation.getCurrentPosition((position) => {
127
+ const newLocation = { lat: position.coords.latitude, lng: position.coords.longitude };
128
+ emit("update:location", newLocation);
129
+ getAddressFromLocation(newLocation);
130
+ locationLoading.value = false;
131
+ }, () => {
132
+ console.error("Error getting location");
133
+ locationLoading.value = false;
134
+ });
135
+ } else {
136
+ console.error("Geolocation is not supported by this browser.");
137
+ locationLoading.value = false;
138
+ }
139
+ }
140
+ return (_ctx, _cache) => {
141
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
142
+ vue.createElementVNode("div", {
143
+ ref_key: "mapContainer",
144
+ ref: mapContainer,
145
+ class: "w-100 h-100"
146
+ }, null, 512),
147
+ vue.createElementVNode("button", {
148
+ class: "cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra",
149
+ onClick: setUserLocation
150
+ }, [
151
+ vue.createVNode(vue.Transition, {
152
+ name: "ScaleOut",
153
+ mode: "out-in"
154
+ }, {
155
+ default: vue.withCtx(() => [
156
+ !locationLoading.value ? (vue.openBlock(), vue.createElementBlock("svg", _hoisted_2, _hoisted_5)) : (vue.openBlock(), vue.createBlock(Loader.default, {
157
+ key: 1,
158
+ class: "pos-t-0 pos-l-0 i-small"
159
+ }))
160
+ ]),
161
+ _: 1
162
+ })
163
+ ])
164
+ ]);
165
+ };
166
+ }
167
+ };
168
+ exports.default = _sfc_main;
169
+ //# sourceMappingURL=LocationMarker.vue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocationMarker.vue.cjs","sources":["../../../../../src/components/LocationMarker/LocationMarker.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <div ref=\"mapContainer\" class=\"w-100 h-100\"></div>\n\n <button class=\"cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra\" @click=\"setUserLocation\">\n\n <transition name=\"ScaleOut\" mode=\"out-in\"> \n <svg v-if=\"!locationLoading\" class=\"i-regular\" width=\"98\" height=\"98\" viewBox=\"0 0 98 98\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z\" fill=\"rgb(var(--white))\"/>\n <path d=\"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z\" fill=\"rgb(var(--white))\"/> \n </svg>\n\n <Loader v-else class=\"pos-t-0 pos-l-0 i-small\"/>\n </transition>\n\n </button>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, watchEffect } from 'vue';\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Loader from '@pf/src/components/Loader/Loader.vue'\n\n// Добавим новый проп для ключа API\nconst props = defineProps({\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nconst emit = defineEmits(['update:location', 'update:address', 'update:country', 'update:state', 'update:city']);\n\nconst mapContainer = ref(null);\nconst locationLoading = ref(false);\n\nlet map, marker;\n\nonMounted(() => {\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: props.locale, \n });\n\n loader.load().then(() => {\n map = new google.maps.Map(mapContainer.value, {\n center: props.location,\n zoom: 15,\n mapTypeControl: false,\n fullscreenControl: false,\n disableDefaultUI: true\n });\n\n marker = new google.maps.Marker({\n position: props.location,\n map,\n draggable: true,\n });\n\n marker.addListener(\"dragend\", (e) => {\n const newLocation = { lat: e.latLng.lat(), lng: e.latLng.lng() };\n\n emit('update:location', newLocation);\n\n getAddressFromLocation(newLocation);\n });\n }).catch(e => {\n console.error(e);\n });\n});\n\nwatchEffect(() => {\n if (props.location && marker) {\n marker.setPosition(new google.maps.LatLng(props.location.lat, props.location.lng));\n }\n});\n\nwatchEffect(() => {\n if (props.location && map) {\n const newCenter = new google.maps.LatLng(props.location.lat, props.location.lng);\n \n map.setCenter(newCenter);\n map.setZoom(15);\n }\n});\n\nfunction getAddressFromLocation(location) {\n \n const geocoder = new google.maps.Geocoder;\n\n geocoder.geocode({ 'location': location }, (results, status) => {\n if (status === 'OK') {\n if (results[0]) {\n emit('update:address', results[0].formatted_address);\n\n let country = '', state = '', city = '';\n\n results[0].address_components.forEach((addr) => {\n if (addr.types.includes('country')) {\n country = addr.long_name;\n }\n if (addr.types.includes('administrative_area_level_1')) {\n state = addr.long_name;\n }\n if (addr.types.includes('locality')) {\n city = addr.long_name;\n }\n });\n\n emit('update:country', country);\n emit('update:state', state);\n emit('update:city', city);\n } else {\n console.error('No results found');\n }\n } else {\n console.error('Geocoder failed due to: ' + status);\n }\n });\n}\n\n// Функция для установки местоположения пользователя\nasync function setUserLocation() {\n locationLoading.value = true\n \n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition((position) => {\n const newLocation = { lat: position.coords.latitude, lng: position.coords.longitude };\n emit('update:location', newLocation);\n getAddressFromLocation(newLocation);\n locationLoading.value = false\n }, () => {\n console.error('Error getting location');\n locationLoading.value = false\n });\n } else {\n console.error('Geolocation is not supported by this browser.');\n locationLoading.value = false\n }\n}\n</script>\n\n\n<style >\n.my-location-button {\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 99;\n}\n\n.gm-style-cc { display:none; }\n\n\n</style>\n"],"names":["ref","onMounted","GMLoader","watchEffect"],"mappings":"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"}
@@ -1,8 +1,9 @@
1
- import { ref as _, onMounted as b, watchEffect as y, openBlock as d, createElementBlock as w, createElementVNode as c, createVNode as k, Transition as x, withCtx as M, createBlock as V } from "vue";
2
- import { Loader as E } from "../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
3
- import Z from "../Loader/Loader.vue2.js";
1
+ import { ref, onMounted, watchEffect, openBlock, createElementBlock, createElementVNode, createVNode, Transition, withCtx, createBlock } from "vue";
2
+ import { Loader } from "../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
3
+ import Loader$1 from "../Loader/Loader.vue2.js";
4
4
  /* empty css */
5
- const B = { class: "pos-relative" }, H = {
5
+ const _hoisted_1 = { class: "pos-relative" };
6
+ const _hoisted_2 = {
6
7
  key: 0,
7
8
  class: "i-regular",
8
9
  width: "98",
@@ -10,16 +11,20 @@ const B = { class: "pos-relative" }, H = {
10
11
  viewBox: "0 0 98 98",
11
12
  fill: "none",
12
13
  xmlns: "http://www.w3.org/2000/svg"
13
- }, K = /* @__PURE__ */ c("path", {
14
+ };
15
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", {
14
16
  d: "M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",
15
17
  fill: "rgb(var(--white))"
16
- }, null, -1), S = /* @__PURE__ */ c("path", {
18
+ }, null, -1);
19
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", {
17
20
  d: "M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",
18
21
  fill: "rgb(var(--white))"
19
- }, null, -1), G = [
20
- K,
21
- S
22
- ], U = {
22
+ }, null, -1);
23
+ const _hoisted_5 = [
24
+ _hoisted_3,
25
+ _hoisted_4
26
+ ];
27
+ const _sfc_main = {
23
28
  __name: "LocationMarker",
24
29
  props: {
25
30
  location: {
@@ -37,90 +42,128 @@ const B = { class: "pos-relative" }, H = {
37
42
  }
38
43
  },
39
44
  emits: ["update:location", "update:address", "update:country", "update:state", "update:city"],
40
- setup(h, { emit: v }) {
41
- const e = h, a = v, u = _(null), r = _(!1);
42
- let s, i;
43
- b(() => {
44
- new E({
45
- apiKey: e.apiKey,
45
+ setup(__props, { emit: __emit }) {
46
+ const props = __props;
47
+ const emit = __emit;
48
+ const mapContainer = ref(null);
49
+ const locationLoading = ref(false);
50
+ let map, marker;
51
+ onMounted(() => {
52
+ const loader = new Loader({
53
+ apiKey: props.apiKey,
46
54
  version: "weekly",
47
55
  libraries: ["places"],
48
- language: e.locale
49
- }).load().then(() => {
50
- s = new google.maps.Map(u.value, {
51
- center: e.location,
56
+ language: props.locale
57
+ });
58
+ loader.load().then(() => {
59
+ map = new google.maps.Map(mapContainer.value, {
60
+ center: props.location,
52
61
  zoom: 15,
53
- mapTypeControl: !1,
54
- fullscreenControl: !1,
55
- disableDefaultUI: !0
56
- }), i = new google.maps.Marker({
57
- position: e.location,
58
- map: s,
59
- draggable: !0
60
- }), i.addListener("dragend", (o) => {
61
- const n = { lat: o.latLng.lat(), lng: o.latLng.lng() };
62
- a("update:location", n), p(n);
62
+ mapTypeControl: false,
63
+ fullscreenControl: false,
64
+ disableDefaultUI: true
65
+ });
66
+ marker = new google.maps.Marker({
67
+ position: props.location,
68
+ map,
69
+ draggable: true
63
70
  });
64
- }).catch((o) => {
65
- console.error(o);
71
+ marker.addListener("dragend", (e) => {
72
+ const newLocation = { lat: e.latLng.lat(), lng: e.latLng.lng() };
73
+ emit("update:location", newLocation);
74
+ getAddressFromLocation(newLocation);
75
+ });
76
+ }).catch((e) => {
77
+ console.error(e);
66
78
  });
67
- }), y(() => {
68
- e.location && i && i.setPosition(new google.maps.LatLng(e.location.lat, e.location.lng));
69
- }), y(() => {
70
- if (e.location && s) {
71
- const t = new google.maps.LatLng(e.location.lat, e.location.lng);
72
- s.setCenter(t), s.setZoom(15);
79
+ });
80
+ watchEffect(() => {
81
+ if (props.location && marker) {
82
+ marker.setPosition(new google.maps.LatLng(props.location.lat, props.location.lng));
73
83
  }
74
84
  });
75
- function p(t) {
76
- new google.maps.Geocoder().geocode({ location: t }, (n, g) => {
77
- if (g === "OK")
78
- if (n[0]) {
79
- a("update:address", n[0].formatted_address);
80
- let f = "", m = "", C = "";
81
- n[0].address_components.forEach((l) => {
82
- l.types.includes("country") && (f = l.long_name), l.types.includes("administrative_area_level_1") && (m = l.long_name), l.types.includes("locality") && (C = l.long_name);
83
- }), a("update:country", f), a("update:state", m), a("update:city", C);
84
- } else
85
+ watchEffect(() => {
86
+ if (props.location && map) {
87
+ const newCenter = new google.maps.LatLng(props.location.lat, props.location.lng);
88
+ map.setCenter(newCenter);
89
+ map.setZoom(15);
90
+ }
91
+ });
92
+ function getAddressFromLocation(location) {
93
+ const geocoder = new google.maps.Geocoder();
94
+ geocoder.geocode({ "location": location }, (results, status) => {
95
+ if (status === "OK") {
96
+ if (results[0]) {
97
+ emit("update:address", results[0].formatted_address);
98
+ let country = "", state = "", city = "";
99
+ results[0].address_components.forEach((addr) => {
100
+ if (addr.types.includes("country")) {
101
+ country = addr.long_name;
102
+ }
103
+ if (addr.types.includes("administrative_area_level_1")) {
104
+ state = addr.long_name;
105
+ }
106
+ if (addr.types.includes("locality")) {
107
+ city = addr.long_name;
108
+ }
109
+ });
110
+ emit("update:country", country);
111
+ emit("update:state", state);
112
+ emit("update:city", city);
113
+ } else {
85
114
  console.error("No results found");
86
- else
87
- console.error("Geocoder failed due to: " + g);
115
+ }
116
+ } else {
117
+ console.error("Geocoder failed due to: " + status);
118
+ }
88
119
  });
89
120
  }
90
- async function L() {
91
- r.value = !0, navigator.geolocation ? navigator.geolocation.getCurrentPosition((t) => {
92
- const o = { lat: t.coords.latitude, lng: t.coords.longitude };
93
- a("update:location", o), p(o), r.value = !1;
94
- }, () => {
95
- console.error("Error getting location"), r.value = !1;
96
- }) : (console.error("Geolocation is not supported by this browser."), r.value = !1);
121
+ async function setUserLocation() {
122
+ locationLoading.value = true;
123
+ if (navigator.geolocation) {
124
+ navigator.geolocation.getCurrentPosition((position) => {
125
+ const newLocation = { lat: position.coords.latitude, lng: position.coords.longitude };
126
+ emit("update:location", newLocation);
127
+ getAddressFromLocation(newLocation);
128
+ locationLoading.value = false;
129
+ }, () => {
130
+ console.error("Error getting location");
131
+ locationLoading.value = false;
132
+ });
133
+ } else {
134
+ console.error("Geolocation is not supported by this browser.");
135
+ locationLoading.value = false;
136
+ }
97
137
  }
98
- return (t, o) => (d(), w("div", B, [
99
- c("div", {
100
- ref_key: "mapContainer",
101
- ref: u,
102
- class: "w-100 h-100"
103
- }, null, 512),
104
- c("button", {
105
- class: "cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra",
106
- onClick: L
107
- }, [
108
- k(x, {
109
- name: "ScaleOut",
110
- mode: "out-in"
111
- }, {
112
- default: M(() => [
113
- r.value ? (d(), V(Z, {
114
- key: 1,
115
- class: "pos-t-0 pos-l-0 i-small"
116
- })) : (d(), w("svg", H, G))
117
- ]),
118
- _: 1
119
- })
120
- ])
121
- ]));
138
+ return (_ctx, _cache) => {
139
+ return openBlock(), createElementBlock("div", _hoisted_1, [
140
+ createElementVNode("div", {
141
+ ref_key: "mapContainer",
142
+ ref: mapContainer,
143
+ class: "w-100 h-100"
144
+ }, null, 512),
145
+ createElementVNode("button", {
146
+ class: "cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra",
147
+ onClick: setUserLocation
148
+ }, [
149
+ createVNode(Transition, {
150
+ name: "ScaleOut",
151
+ mode: "out-in"
152
+ }, {
153
+ default: withCtx(() => [
154
+ !locationLoading.value ? (openBlock(), createElementBlock("svg", _hoisted_2, _hoisted_5)) : (openBlock(), createBlock(Loader$1, {
155
+ key: 1,
156
+ class: "pos-t-0 pos-l-0 i-small"
157
+ }))
158
+ ]),
159
+ _: 1
160
+ })
161
+ ])
162
+ ]);
163
+ };
122
164
  }
123
165
  };
124
166
  export {
125
- U as default
167
+ _sfc_main as default
126
168
  };
169
+ //# sourceMappingURL=LocationMarker.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocationMarker.vue.js","sources":["../../../../../src/components/LocationMarker/LocationMarker.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <div ref=\"mapContainer\" class=\"w-100 h-100\"></div>\n\n <button class=\"cursor-pointer flex-center flex pos-absolute pos-t-regular pos-r-regular i-semi bg-second pd-nano radius-extra\" @click=\"setUserLocation\">\n\n <transition name=\"ScaleOut\" mode=\"out-in\"> \n <svg v-if=\"!locationLoading\" class=\"i-regular\" width=\"98\" height=\"98\" viewBox=\"0 0 98 98\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z\" fill=\"rgb(var(--white))\"/>\n <path d=\"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z\" fill=\"rgb(var(--white))\"/> \n </svg>\n\n <Loader v-else class=\"pos-t-0 pos-l-0 i-small\"/>\n </transition>\n\n </button>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, watchEffect } from 'vue';\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Loader from '@pf/src/components/Loader/Loader.vue'\n\n// Добавим новый проп для ключа API\nconst props = defineProps({\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nconst emit = defineEmits(['update:location', 'update:address', 'update:country', 'update:state', 'update:city']);\n\nconst mapContainer = ref(null);\nconst locationLoading = ref(false);\n\nlet map, marker;\n\nonMounted(() => {\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: props.locale, \n });\n\n loader.load().then(() => {\n map = new google.maps.Map(mapContainer.value, {\n center: props.location,\n zoom: 15,\n mapTypeControl: false,\n fullscreenControl: false,\n disableDefaultUI: true\n });\n\n marker = new google.maps.Marker({\n position: props.location,\n map,\n draggable: true,\n });\n\n marker.addListener(\"dragend\", (e) => {\n const newLocation = { lat: e.latLng.lat(), lng: e.latLng.lng() };\n\n emit('update:location', newLocation);\n\n getAddressFromLocation(newLocation);\n });\n }).catch(e => {\n console.error(e);\n });\n});\n\nwatchEffect(() => {\n if (props.location && marker) {\n marker.setPosition(new google.maps.LatLng(props.location.lat, props.location.lng));\n }\n});\n\nwatchEffect(() => {\n if (props.location && map) {\n const newCenter = new google.maps.LatLng(props.location.lat, props.location.lng);\n \n map.setCenter(newCenter);\n map.setZoom(15);\n }\n});\n\nfunction getAddressFromLocation(location) {\n \n const geocoder = new google.maps.Geocoder;\n\n geocoder.geocode({ 'location': location }, (results, status) => {\n if (status === 'OK') {\n if (results[0]) {\n emit('update:address', results[0].formatted_address);\n\n let country = '', state = '', city = '';\n\n results[0].address_components.forEach((addr) => {\n if (addr.types.includes('country')) {\n country = addr.long_name;\n }\n if (addr.types.includes('administrative_area_level_1')) {\n state = addr.long_name;\n }\n if (addr.types.includes('locality')) {\n city = addr.long_name;\n }\n });\n\n emit('update:country', country);\n emit('update:state', state);\n emit('update:city', city);\n } else {\n console.error('No results found');\n }\n } else {\n console.error('Geocoder failed due to: ' + status);\n }\n });\n}\n\n// Функция для установки местоположения пользователя\nasync function setUserLocation() {\n locationLoading.value = true\n \n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition((position) => {\n const newLocation = { lat: position.coords.latitude, lng: position.coords.longitude };\n emit('update:location', newLocation);\n getAddressFromLocation(newLocation);\n locationLoading.value = false\n }, () => {\n console.error('Error getting location');\n locationLoading.value = false\n });\n } else {\n console.error('Geolocation is not supported by this browser.');\n locationLoading.value = false\n }\n}\n</script>\n\n\n<style >\n.my-location-button {\n position: absolute;\n right: 10px;\n top: 10px;\n z-index: 99;\n}\n\n.gm-style-cc { display:none; }\n\n\n</style>\n"],"names":["GMLoader"],"mappings":"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"}
@@ -1 +1,17 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const r={class:"mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium"},o={__name:"Menu",setup(u){return(t,n)=>(e.openBlock(),e.createElementBlock("section",r,[e.renderSlot(t.$slots,"default")]))}};exports.default=o;
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ ;/* empty css */
5
+ const _hoisted_1 = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" };
6
+ const _sfc_main = {
7
+ __name: "Menu",
8
+ setup(__props) {
9
+ return (_ctx, _cache) => {
10
+ return vue.openBlock(), vue.createElementBlock("section", _hoisted_1, [
11
+ vue.renderSlot(_ctx.$slots, "default")
12
+ ]);
13
+ };
14
+ }
15
+ };
16
+ exports.default = _sfc_main;
17
+ //# sourceMappingURL=Menu.vue.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1,13 +1,17 @@
1
- import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
1
+ import { openBlock, createElementBlock, renderSlot } from "vue";
2
2
  /* empty css */
3
- const r = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" }, d = {
3
+ const _hoisted_1 = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" };
4
+ const _sfc_main = {
4
5
  __name: "Menu",
5
- setup(s) {
6
- return (e, i) => (t(), o("section", r, [
7
- n(e.$slots, "default")
8
- ]));
6
+ setup(__props) {
7
+ return (_ctx, _cache) => {
8
+ return openBlock(), createElementBlock("section", _hoisted_1, [
9
+ renderSlot(_ctx.$slots, "default")
10
+ ]);
11
+ };
9
12
  }
10
13
  };
11
14
  export {
12
- d as default
15
+ _sfc_main as default
13
16
  };
17
+ //# sourceMappingURL=Menu.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1 +1,92 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),p=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");;/* empty css */const m={key:"popup-content",class:"pd-small z-index-6 popup-wrapper"},v={key:0,class:"mn-b-small"},k={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String,title:String},emits:["close-popup"],setup(t,{emit:l}){const i=t,a=l;function n(){a("close-popup")}e.watch(()=>i.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const u={messages:{en:{},ru:{}}};return p.useI18n(u),(o,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.createElementVNode("section",e.mergeProps({class:"pos-relative z-index-4"},o.$attrs,{class:o.$attrs.class}),[t.title?(e.openBlock(),e.createElementBlock("h4",v,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createVNode(d.default,{fill:"rgb(var(--white))",onClick:s[0]||(s[0]=c=>n()),class:"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"}),e.renderSlot(o.$slots,"default")],16)]),_:3}),e.createElementVNode("div",{onClick:s[1]||(s[1]=c=>n()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:3}))}};exports.default=k;
1
+ "use strict";
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const vue = require("vue");
4
+ const vueRouter = require("vue-router");
5
+ const vueI18n = require("vue-i18n");
6
+ const IconCross = require("../../modules/icons/navigation/IconCross.vue.cjs");
7
+ ;/* empty css */
8
+ const _hoisted_1 = {
9
+ key: "popup-content",
10
+ class: "pd-small z-index-6 popup-wrapper"
11
+ };
12
+ const _hoisted_2 = {
13
+ key: 0,
14
+ class: "mn-b-small"
15
+ };
16
+ const _sfc_main = {
17
+ __name: "Popup",
18
+ props: {
19
+ isPopupOpen: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ style: String,
24
+ title: String
25
+ },
26
+ emits: ["close-popup"],
27
+ setup(__props, { emit: __emit }) {
28
+ const props = __props;
29
+ const emits = __emit;
30
+ function closePopup() {
31
+ emits("close-popup");
32
+ }
33
+ vue.watch(() => props.isPopupOpen, (newVal) => {
34
+ if (newVal) {
35
+ document.body.classList.add("no-scroll");
36
+ } else {
37
+ document.body.classList.remove("no-scroll");
38
+ }
39
+ });
40
+ vueRouter.useRoute();
41
+ vueRouter.useRouter();
42
+ const text = {
43
+ messages: {
44
+ en: {},
45
+ ru: {}
46
+ }
47
+ };
48
+ vueI18n.useI18n(text);
49
+ return (_ctx, _cache) => {
50
+ return vue.openBlock(), vue.createBlock(vue.Transition, {
51
+ name: "TransitionTranslateY",
52
+ appear: ""
53
+ }, {
54
+ default: vue.withCtx(() => [
55
+ __props.isPopupOpen ? (vue.openBlock(), vue.createBlock(vue.Teleport, {
56
+ key: 0,
57
+ to: "body"
58
+ }, [
59
+ __props.isPopupOpen ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
60
+ vue.createVNode(vue.Transition, {
61
+ name: "TransitionTranslateY",
62
+ mode: "out-in"
63
+ }, {
64
+ default: vue.withCtx(() => [
65
+ vue.createElementVNode("section", vue.mergeProps({ class: "pos-relative z-index-4" }, _ctx.$attrs, {
66
+ class: _ctx.$attrs.class
67
+ }), [
68
+ __props.title ? (vue.openBlock(), vue.createElementBlock("h4", _hoisted_2, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
69
+ vue.createVNode(IconCross.default, {
70
+ fill: "rgb(var(--white))",
71
+ onClick: _cache[0] || (_cache[0] = ($event) => closePopup()),
72
+ class: "cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5"
73
+ }),
74
+ vue.renderSlot(_ctx.$slots, "default")
75
+ ], 16)
76
+ ]),
77
+ _: 3
78
+ }),
79
+ vue.createElementVNode("div", {
80
+ onClick: _cache[1] || (_cache[1] = ($event) => closePopup()),
81
+ class: vue.normalizeClass([{ "active": __props.isPopupOpen === true }, "color-overlay z-index-3"])
82
+ }, null, 2)
83
+ ])) : vue.createCommentVNode("", true)
84
+ ])) : vue.createCommentVNode("", true)
85
+ ]),
86
+ _: 3
87
+ });
88
+ };
89
+ }
90
+ };
91
+ exports.default = _sfc_main;
92
+ //# sourceMappingURL=Popup.vue2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Popup.vue2.cjs","sources":["../../../../../src/components/Popup/Popup.vue"],"sourcesContent":["<template>\n\n\t\t<transition name=\"TransitionTranslateY\" appear>\n\t\t\t\t<teleport to=\"body\" v-if=\"isPopupOpen\">\n\t\t\t\t\t<div v-if=\"isPopupOpen\" key=\"popup-content\" class=\"pd-small z-index-6 popup-wrapper\">\n\n\t\t\t\t\t\t<transition name=\"TransitionTranslateY\" mode=\"out-in\">\n\t\t\t\t\t\t\t<section class=\"pos-relative z-index-4\" v-bind=\"$attrs\" :class=\"$attrs.class\">\n\t\t\t\t\t\t\t\t\t<h4 v-if=\"title\" class=\"mn-b-small\">{{title}}</h4>\n\t\t\t\t\t\t\t\t\t<IconCross :fill=\"'rgb(var(--white))'\" @click=\"closePopup()\" class=\"cursor-pointer bg-second pd-micro radius-extra pos-absolute pos-t-0 pos-r-0 mn-t-semi mn-r-semi hover-scale-1 i-medium z-index-5\"/>\n\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</section> \n\t\t\t\t\t\t</transition>\n\n\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t@click=\"closePopup()\" \n\t\t\t\t\t :class=\"{'active':isPopupOpen === true}\" \n\t\t\t\t\t class=\"color-overlay z-index-3\">\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div>\n\t\t\t</teleport>\n\t\t</transition>\n\n</template>\n\n<script setup>\nimport { computed, watch, onMounted, ref, nextTick } from 'vue';\n// Import libs\nimport { useRoute, useRouter } from 'vue-router'\nimport { useI18n } from 'vue-i18n'\n// Icons\nimport IconCross from '@pf/src/modules/icons/navigation/IconCross.vue';\n// Define props\nconst props = defineProps({\n isPopupOpen: {\n \ttype: Boolean,\n\t default: false\n },\n style: String,\n title: String,\n});\nconst emits = defineEmits(['close-popup'])\n\nfunction closePopup() {\n emits(\"close-popup\");\n} \n\nwatch(() => props.isPopupOpen, (newVal) => {\n if (newVal) {\n document.body.classList.add('no-scroll');\n } else {\n document.body.classList.remove('no-scroll');\n }\n});\n\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// Localization\nconst text = {\n \tmessages: {\n\t en: {},\n\t ru: {}\n\t}\n}\nconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\t.no-scroll {\n\t overflow: hidden;\n\t}\n\n\t.popup-wrapper {\n\t\tdisplay: flex;\n\t\tposition: fixed;\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\tz-index: 40;\n\n\t\t.popup {\n\t\t\tposition: absolute;\n\t\t\theight: auto;\n\t\t\tpadding: 2rem;\n\t\t\tmin-width: 24rem;\n\t\t\tborder-radius: 2rem;\n\t\t\toverflow: hidden;\n\n\t\t\tcolor: white;\n\t\t\tbackground: black;\n\n\t\t\tz-index: 40;\n\t\t}\n\t}\n\n\t.color-overlay {\n\t\tdisplay: block;\n\t\tposition: fixed;\n\n\t\tleft: 0;\n\t\ttop: 0;\n\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\tbackground: rgba(0,0,0,0.0);\n\t\tpointer-events: none;\n\n\t\ttransform: scale(1.5);\n\n\t\ttransition: all 0.5s cubic-bezier(.31,.79,.24,.92);\n\n\t\t&.active {\n\t\t\tbackground: rgba(#000,0.25);\n\t\t\tpointer-events: all;\n\t\t}\n\t}\n</style>\n"],"names":["watch","useRoute","useRouter","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,UAAM,QAAQ;AAQd,UAAM,QAAQ;AAEd,aAAS,aAAa;AACpB,YAAM,aAAa;AAAA,IACrB;AAEAA,QAAK,MAAC,MAAM,MAAM,aAAa,CAAC,WAAW;AACzC,UAAI,QAAQ;AACV,iBAAS,KAAK,UAAU,IAAI,WAAW;AAAA,MAC3C,OAAS;AACL,iBAAS,KAAK,UAAU,OAAO,WAAW;AAAA,MAC3C;AAAA,IACH,CAAC;AAGaC,cAAAA,SAAU;AACTC,cAAAA,UAAW;AAE1B,UAAM,OAAO;AAAA,MACV,UAAU;AAAA,QACR,IAAI,CAAE;AAAA,QACN,IAAI,CAAE;AAAA,MACT;AAAA,IACF;AACcC,YAAO,QAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}