@ozdao/prometheus-framework 0.2.317 → 0.2.319
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/products.server.js +4 -0
- package/dist/products.server.mjs +4 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Card.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +47 -47
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +47 -47
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionOverview.vue.cjs +57 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionOverview.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionOverview.vue.js +57 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/landing/landing.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/landing/landing.client.js +6 -4
- package/dist/prometheus-framework/src/modules/landing/landing.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/marketplace.client.cjs +13 -0
- package/dist/prometheus-framework/src/modules/marketplace/marketplace.client.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/marketplace.client.js +13 -0
- package/dist/prometheus-framework/src/modules/marketplace/marketplace.client.js.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +179 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +179 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.cjs +67 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.js +67 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +121 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +121 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/store/marketplace.cjs +57 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/store/marketplace.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/store/marketplace.js +57 -0
- package/dist/prometheus-framework/src/modules/marketplace/views/store/marketplace.js.map +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +933 -932
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +933 -932
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +31 -21
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +34 -24
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +2 -20
- package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +25 -43
- package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +3 -0
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +3 -0
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/package.json +5 -1
- package/src/modules/auth/models/role.model.js +1 -1
- package/src/modules/globals/views/core/event.js +48 -0
- package/src/modules/globals/views/core/module-manager.js +91 -0
- package/src/modules/globals/views/core/module.js +106 -0
- package/src/modules/landing/components/sections/SectionGuide.vue +48 -48
- package/src/modules/landing/components/sections/SectionOverview.vue +40 -0
- package/src/modules/landing/landing.client.js +2 -0
- package/src/modules/marketplace/marketplace.client.js +59 -0
- package/src/modules/{products → marketplace/views}/components/layouts/Marketplace.vue +3 -1
- package/src/modules/{products → marketplace/views}/components/pages/Catalog.vue +4 -3
- package/src/modules/{products/components/sections/MenuSection.vue → marketplace/views/components/sections/SectionMenu.vue} +25 -35
- package/src/modules/{products → marketplace/views}/router/marketplace.router.js +1 -2
- package/src/modules/products/components/pages/CategoryEdit.vue +23 -7
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/products/models/category.model.js +5 -0
- package/src/modules/products/products.client.js +0 -18
- package/src/modules/products/store/categories.js +6 -0
- package/src/modules/spots/components/layouts/Spots.vue +1 -4
- package/src/modules/spots/components/pages/Map.vue +1 -1
- package/src/modules/landing/components/sections/SectionsSection.vue +0 -66
- package/src/modules/products/components/sections/Filters.vue +0 -152
- /package/src/modules/{products → marketplace/views}/store/marketplace.js +0 -0
@@ -11,6 +11,7 @@ const state = vue.reactive({
|
|
11
11
|
},
|
12
12
|
current: {
|
13
13
|
order: 1,
|
14
|
+
photo: null,
|
14
15
|
name: "",
|
15
16
|
url: "",
|
16
17
|
status: "draft",
|
@@ -48,6 +49,8 @@ const actions = {
|
|
48
49
|
async update(categories) {
|
49
50
|
try {
|
50
51
|
const isArray = Array.isArray(categories);
|
52
|
+
console.log(isArray);
|
53
|
+
console.log(isArray ? categories : [categories]);
|
51
54
|
const response = await axiosInstance.default.post("/api/categories/update", {
|
52
55
|
categories: isArray ? categories : [categories]
|
53
56
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"categories.cjs","sources":["../../../../../../src/modules/products/store/categories.js"],"sourcesContent":["// Dependencies\nimport { reactive, watch } from \"vue\";\nimport { setError } from '@pf/src/modules/globals/views/store/globals';\n\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\n// State\nconst state = reactive({\n all: [],\n filter: {\n status: null,\n search: null\n },\n current: {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n }\n});\n\n// Methods\nconst actions = {\n async read(options = {}) {\n try {\n const response = await $axios.get('/api/categories', { params: options });\n \n if (options.url) {\n state.current = {...response.data[0]}; \n return Promise.resolve(response.data[0]);\n } else {\n return Promise.resolve(response.data);\n }\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async create(category) {\n try {\n const response = await $axios.post('/api/categories/create', category);\n state.all.push(response.data);\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async update(categories) {\n try {\n // Handle both single category and bulk update\n const isArray = Array.isArray(categories);\n\n const response = await $axios.post('/api/categories/update', {\n categories: isArray ? categories : [categories],\n });\n \n // state.all = response.data;\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async delete(url) {\n try {\n await $axios.post('/api/categories/delete', { url });\n state.all = state.all.filter(c => c.url !== url);\n return Promise.resolve();\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n clean() {\n state.current = {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n };\n }\n};\n\nconst history = [];\nhistory.push(state);\n\nwatch(state, (newState) => {\n history.push(newState);\n}, { deep: true });\n\nexport {\n state,\n actions\n};"],"names":["reactive","$axios","setError","watch"],"mappings":";;;;;AAOK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,
|
1
|
+
{"version":3,"file":"categories.cjs","sources":["../../../../../../src/modules/products/store/categories.js"],"sourcesContent":["// Dependencies\nimport { reactive, watch } from \"vue\";\nimport { setError } from '@pf/src/modules/globals/views/store/globals';\n\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\n// State\nconst state = reactive({\n all: [],\n \n filter: {\n status: null,\n search: null\n },\n current: {\n order: 1,\n photo: null,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n }\n});\n\n// Methods\nconst actions = {\n async read(options = {}) {\n try {\n const response = await $axios.get('/api/categories', { params: options });\n \n if (options.url) {\n state.current = {...response.data[0]}; \n return Promise.resolve(response.data[0]);\n } else {\n return Promise.resolve(response.data);\n }\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async create(category) {\n try {\n const response = await $axios.post('/api/categories/create', category);\n state.all.push(response.data);\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async update(categories) {\n try {\n // Handle both single category and bulk update\n const isArray = Array.isArray(categories);\n\n console.log(isArray)\n\n console.log(isArray ? categories : [categories])\n \n const response = await $axios.post('/api/categories/update', {\n categories: isArray ? categories : [categories],\n });\n \n // state.all = response.data;\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async delete(url) {\n try {\n await $axios.post('/api/categories/delete', { url });\n state.all = state.all.filter(c => c.url !== url);\n return Promise.resolve();\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n clean() {\n state.current = {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n };\n }\n};\n\nconst history = [];\nhistory.push(state);\n\nwatch(state, (newState) => {\n history.push(newState);\n}, { deep: true });\n\nexport {\n state,\n actions\n};"],"names":["reactive","$axios","setError","watch"],"mappings":";;;;;AAOK,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EAEP,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,EACT;AAAA,EACD,SAAS;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,UAAU,CAAE;AAAA,IACZ,SAAS,CAAE;AAAA,IACX,cAAc,CAAE;AAAA,EACjB;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,MAAM,KAAK,UAAU,IAAI;AACvB,QAAI;AACF,YAAM,WAAW,MAAMC,cAAAA,QAAO,IAAI,mBAAmB,EAAE,QAAQ,QAAO,CAAE;AAExE,UAAI,QAAQ,KAAK;AACf,cAAM,UAAU,EAAC,GAAG,SAAS,KAAK,CAAC,EAAC;AACpC,eAAO,QAAQ,QAAQ,SAAS,KAAK,CAAC,CAAC;AAAA,MAC/C,OAAa;AACL,eAAO,QAAQ,QAAQ,SAAS,IAAI;AAAA,MACrC;AAAA,IACF,SAAQ,OAAO;AACdC,cAAQ,SAAC,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAED,MAAM,OAAO,UAAU;AACrB,QAAI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,7 @@ const state = reactive({
|
|
9
9
|
},
|
10
10
|
current: {
|
11
11
|
order: 1,
|
12
|
+
photo: null,
|
12
13
|
name: "",
|
13
14
|
url: "",
|
14
15
|
status: "draft",
|
@@ -46,6 +47,8 @@ const actions = {
|
|
46
47
|
async update(categories) {
|
47
48
|
try {
|
48
49
|
const isArray = Array.isArray(categories);
|
50
|
+
console.log(isArray);
|
51
|
+
console.log(isArray ? categories : [categories]);
|
49
52
|
const response = await $axios.post("/api/categories/update", {
|
50
53
|
categories: isArray ? categories : [categories]
|
51
54
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"categories.js","sources":["../../../../../../src/modules/products/store/categories.js"],"sourcesContent":["// Dependencies\nimport { reactive, watch } from \"vue\";\nimport { setError } from '@pf/src/modules/globals/views/store/globals';\n\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\n// State\nconst state = reactive({\n all: [],\n filter: {\n status: null,\n search: null\n },\n current: {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n }\n});\n\n// Methods\nconst actions = {\n async read(options = {}) {\n try {\n const response = await $axios.get('/api/categories', { params: options });\n \n if (options.url) {\n state.current = {...response.data[0]}; \n return Promise.resolve(response.data[0]);\n } else {\n return Promise.resolve(response.data);\n }\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async create(category) {\n try {\n const response = await $axios.post('/api/categories/create', category);\n state.all.push(response.data);\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async update(categories) {\n try {\n // Handle both single category and bulk update\n const isArray = Array.isArray(categories);\n\n const response = await $axios.post('/api/categories/update', {\n categories: isArray ? categories : [categories],\n });\n \n // state.all = response.data;\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async delete(url) {\n try {\n await $axios.post('/api/categories/delete', { url });\n state.all = state.all.filter(c => c.url !== url);\n return Promise.resolve();\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n clean() {\n state.current = {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n };\n }\n};\n\nconst history = [];\nhistory.push(state);\n\nwatch(state, (newState) => {\n history.push(newState);\n}, { deep: true });\n\nexport {\n state,\n actions\n};"],"names":[],"mappings":";;;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,
|
1
|
+
{"version":3,"file":"categories.js","sources":["../../../../../../src/modules/products/store/categories.js"],"sourcesContent":["// Dependencies\nimport { reactive, watch } from \"vue\";\nimport { setError } from '@pf/src/modules/globals/views/store/globals';\n\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n\n// State\nconst state = reactive({\n all: [],\n \n filter: {\n status: null,\n search: null\n },\n current: {\n order: 1,\n photo: null,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n }\n});\n\n// Methods\nconst actions = {\n async read(options = {}) {\n try {\n const response = await $axios.get('/api/categories', { params: options });\n \n if (options.url) {\n state.current = {...response.data[0]}; \n return Promise.resolve(response.data[0]);\n } else {\n return Promise.resolve(response.data);\n }\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async create(category) {\n try {\n const response = await $axios.post('/api/categories/create', category);\n state.all.push(response.data);\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async update(categories) {\n try {\n // Handle both single category and bulk update\n const isArray = Array.isArray(categories);\n\n console.log(isArray)\n\n console.log(isArray ? categories : [categories])\n \n const response = await $axios.post('/api/categories/update', {\n categories: isArray ? categories : [categories],\n });\n \n // state.all = response.data;\n return Promise.resolve(response.data);\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n async delete(url) {\n try {\n await $axios.post('/api/categories/delete', { url });\n state.all = state.all.filter(c => c.url !== url);\n return Promise.resolve();\n } catch (error) {\n setError(error);\n return Promise.reject(error);\n }\n },\n\n clean() {\n state.current = {\n order: 1,\n name: \"\",\n url: \"\",\n status: \"draft\",\n parent: null,\n children: [],\n filters: [],\n localization: [],\n };\n }\n};\n\nconst history = [];\nhistory.push(state);\n\nwatch(state, (newState) => {\n history.push(newState);\n}, { deep: true });\n\nexport {\n state,\n actions\n};"],"names":[],"mappings":";;;AAOK,MAAC,QAAQ,SAAS;AAAA,EACrB,KAAK,CAAE;AAAA,EAEP,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,EACT;AAAA,EACD,SAAS;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,UAAU,CAAE;AAAA,IACZ,SAAS,CAAE;AAAA,IACX,cAAc,CAAE;AAAA,EACjB;AACH,CAAC;AAGI,MAAC,UAAU;AAAA,EACd,MAAM,KAAK,UAAU,IAAI;AACvB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,IAAI,mBAAmB,EAAE,QAAQ,QAAO,CAAE;AAExE,UAAI,QAAQ,KAAK;AACf,cAAM,UAAU,EAAC,GAAG,SAAS,KAAK,CAAC,EAAC;AACpC,eAAO,QAAQ,QAAQ,SAAS,KAAK,CAAC,CAAC;AAAA,MAC/C,OAAa;AACL,eAAO,QAAQ,QAAQ,SAAS,IAAI;AAAA,MACrC;AAAA,IACF,SAAQ,OAAO;AACd,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAED,MAAM,OAAO,UAAU;AACrB,QAAI;AACF,YAAM,WAAW,MAAM,OAAO,KAAK,0BAA0B,QAAQ;AACrE,YAAM,IAAI,KAAK,SAAS,IAAI;AAC5B,aAAO,QAAQ,QAAQ,SAAS,IAAI;AAAA,IACrC,SAAQ,OAAO;AACd,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAED,MAAM,OAAO,YAAY;AACvB,QAAI;AAEF,YAAM,UAAU,MAAM,QAAQ,UAAU;AAExC,cAAQ,IAAI,OAAO;AAElB,cAAQ,IAAI,UAAU,aAAa,CAAC,UAAU,CAAC;AAEhD,YAAM,WAAW,MAAM,OAAO,KAAK,0BAA0B;AAAA,QAC3D,YAAY,UAAU,aAAa,CAAC,UAAU;AAAA,MACtD,CAAO;AAGD,aAAO,QAAQ,QAAQ,SAAS,IAAI;AAAA,IACrC,SAAQ,OAAO;AACd,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAED,MAAM,OAAO,KAAK;AAChB,QAAI;AACF,YAAM,OAAO,KAAK,0BAA0B,EAAE,IAAK,CAAA;AACnD,YAAM,MAAM,MAAM,IAAI,OAAO,OAAK,EAAE,QAAQ,GAAG;AAC/C,aAAO,QAAQ;IAChB,SAAQ,OAAO;AACd,eAAS,KAAK;AACd,aAAO,QAAQ,OAAO,KAAK;AAAA,IAC5B;AAAA,EACF;AAAA,EAED,QAAQ;AACN,UAAM,UAAU;AAAA,MACd,OAAO;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,UAAU,CAAE;AAAA,MACZ,SAAS,CAAE;AAAA,MACX,cAAc,CAAE;AAAA,IACtB;AAAA,EACG;AACH;AAKA,MAAM,OAAO,CAAC,aAAa;AAE3B,GAAG,EAAE,MAAM,MAAM;"}
|
package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
5
|
-
const Button = require("../../../../components/Button/Button.
|
5
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
6
6
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
7
7
|
const reports = require("../../store/reports.cjs");
|
8
8
|
const _sfc_main = {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { reactive, ref, openBlock, createElementBlock, renderSlot, createVNode, withCtx, createElementVNode, createTextVNode } from "vue";
|
2
2
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
3
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
3
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
4
4
|
import Select from "../../../../components/Select/Select.vue.js";
|
5
5
|
import { actions } from "../../store/reports.js";
|
6
6
|
const _sfc_main = {
|
package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
4
|
+
;/* empty css */
|
5
5
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
6
6
|
;/* empty css */
|
7
7
|
;/* empty css */
|
package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createBlock, toDisplayString, createCommentVNode } from "vue";
|
2
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
4
4
|
/* empty css */
|
5
5
|
/* empty css */
|
@@ -4,12 +4,12 @@ const vue = require("vue");
|
|
4
4
|
const vueRouter = require("vue-router");
|
5
5
|
const vueI18n = require("vue-i18n");
|
6
6
|
;/* empty css */
|
7
|
-
;/* empty css
|
7
|
+
;/* empty css */
|
8
8
|
;/* empty css */
|
9
|
-
;/* empty css
|
9
|
+
;/* empty css */
|
10
10
|
const globals = require("../../../globals/views/store/globals.cjs");
|
11
11
|
const categories = require("../../../products/store/categories.cjs");
|
12
|
-
const marketplace = require("../../../
|
12
|
+
const marketplace = require("../../../marketplace/views/store/marketplace.cjs");
|
13
13
|
const _hoisted_1 = { class: "w-100 h-100" };
|
14
14
|
const _hoisted_2 = { class: "h-100 w-100 flex-nowrap flex-column flex gap-thin" };
|
15
15
|
const _hoisted_3 = { class: "pos-absolute z-index-2 w-100" };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Spots.vue.cjs","sources":["../../../../../../../src/modules/spots/components/layouts/Spots.vue"],"sourcesContent":["<template>\n\t<div class=\"w-100 h-100\">\n\t\t<!-- Catalog wrapper -->\n\t\t<div class=\"h-100 w-100 flex-nowrap flex-column flex gap-thin\">\n\n\t\t\t\t<!-- Sorting section -->\n\t\t\t\t<div class=\"pos-absolute z-index-2 w-100\">\n\t \t<h2 class=\"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center\">\n\t \t\t<span class=\"\">Weed in </span>\n\n\t \t\t<span @click=\"a => { globals.state.isOpenLocationPopup = true }\" v-if=\"localPosition.city || localPosition.state || localPosition.country\" class=\"t-semi t-main\">\n \t\t\t\t<span v-if=\"localPosition.city\">{{localPosition.city}}, </span>\n \t\t\t\t<span v-if=\"localPosition.state\">{{localPosition.state}}, </span>\n \t\t\t\t<span v-if=\"localPosition.country\">{{localPosition.country}}</span>\n\t \t\t</span>\n\n\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-semi t-main\">\n\t\t\t\t\t\t\t\tThe World\n\t \t\t</span>\n\t \t</h2>\n\t\t\t\t\t</div>\n\n\n\t\t\t\t<!-- <Filters/> -->\n\n\t\t\t\t<!-- Products section -->\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<transition name=\"scaleIn\" mode=\"out-in\">\n\t\t\t\t\t\t<component \n\t\t\t\t\t\t\tref=\"page\" \n\t\t\t\t\t\t\t:key=\"route.path\" \n\t\t\t\t\t\t\t:localPosition=\"localPosition\" \n\t\t\t\t\t\t\t:is=\"Component\"\n\t\t\t\t\t\t\t:apiKey=\"GOOGLE_MAPS_API_KEY\" \n \t\t\t\t:locale=\"$i18n.locale\"\n\t\t\t\t\t\t\tclass=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</transition>\n\t\t\t\t</router-view>\n\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, watchEffect, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n // Prometheus\n\timport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\";\n \timport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\n \timport Field from \"@pf/src/components/Field/Field.vue\";\n \t// Partials\n\timport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n \timport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\n\n \t// import Filters from '@pf/src/modules/marketplace/components/sections/Filters.vue'\n\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\timport * as categories from '@pf/src/modules/products/store/categories';\n\timport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tonMounted(async () => {\n\t if (route.params) {\n\t // Загружаем новые значения из параметров маршрута в состояние\n\t let newState = {\n\t country: denormalizeUrlParam(route.params.country),\n\t state: denormalizeUrlParam(route.params.state),\n\t city: denormalizeUrlParam(route.params.city),\n\t };\n\n\t\t // Обновляем глобальное состояние\n\t\t localPosition.value = newState;\n\t\t}\n\n\t\tif (route.query) {\n\t\t const query = route.query;\n\t\t const newFilterValue = {\n\t\t categories: query.categories ? query.categories.split(',') : [],\n\t\t prices: query.prices ? query.prices.split(',') : [],\n\t\t delivery: query.delivery ? query.delivery.split(',') : [],\n\t\t // Продолжайте этот паттерн для остальных полей фильтра\n\t\t };\n\t\t marketplace.state.filter.selected = newFilterValue;\n\t\t}\n\n\n\t\t// Data fetching\n\t\tawait categories.actions.read()\n\t})\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.push({ query });\n\t}, { deep: true })\n\n\t\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase() // Преобразование всех символов в нижний регистр\n\t .replace(/ /g, '-') // Замена всех пробелов на дефисы\n\t .replace(/[^a-z0-9-]/g, ''); // Удаление всех символов, которые не являются буквами, цифрами или дефисами\n\t}\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \t\n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\t\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Home',\n \t\tstore: 'Marketplace',\n \t},\n \tcategoriesTitle: 'Category',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'By price',\n \t\tnewest: 'By newest',\n \t\tpopularity: 'By popularity'\n \t},\n \tfilters: {\n \t\ttitle: 'Filters',\n \t\tprice: {\n \t\t\ttitle: 'Price',\n \t\t\tfrom: 'From',\n \t\t\tto: 'To'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Reset Filters'\n \t}\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Главная',\n \t\tstore: 'Маркетплейс',\n \t},\n \tcategoriesTitle: 'Категория',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'По цене',\n \t\tnewest: 'По новизне',\n \t\tpopularity: 'По популярности'\n \t},\n \tfilters: {\n \t\ttitle: 'Фильтры',\n \t\tprice: {\n \t\t\ttitle: 'Цена',\n \t\t\tfrom: 'От',\n \t\t\tto: 'До'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Сбросить фильтры',\n \t}\n }\n }\n }\n\n \tcategories.state.all.forEach( category => {\n \tcategory.localization.forEach( localization => {\n \ttext.messages[localization.locale].categories.push(localization.text)\n \t})\n\t})\n\n \tconst { t } = useI18n(text)\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","marketplace.state","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;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACF,aAAa;AAAA,YACZ,MAAM;AAAA,YACN,OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,MACF;AAAA,IACF;AAEDC,qBAAiB,IAAI,QAAS,cAAY;AACzC,eAAS,aAAa,QAAS,kBAAgB;AAC7C,aAAK,SAAS,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,IAAI;AAAA,MACzE,CAAI;AAAA,IACJ,CAAE;AAEcC,YAAAA,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Spots.vue.cjs","sources":["../../../../../../../src/modules/spots/components/layouts/Spots.vue"],"sourcesContent":["<template>\n\t<div class=\"w-100 h-100\">\n\t\t<!-- Catalog wrapper -->\n\t\t<div class=\"h-100 w-100 flex-nowrap flex-column flex gap-thin\">\n\n\t\t\t\t<!-- Sorting section -->\n\t\t\t\t<div class=\"pos-absolute z-index-2 w-100\">\n\t \t<h2 class=\"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center\">\n\t \t\t<span class=\"\">Weed in </span>\n\n\t \t\t<span @click=\"a => { globals.state.isOpenLocationPopup = true }\" v-if=\"localPosition.city || localPosition.state || localPosition.country\" class=\"t-semi t-main\">\n \t\t\t\t<span v-if=\"localPosition.city\">{{localPosition.city}}, </span>\n \t\t\t\t<span v-if=\"localPosition.state\">{{localPosition.state}}, </span>\n \t\t\t\t<span v-if=\"localPosition.country\">{{localPosition.country}}</span>\n\t \t\t</span>\n\n\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-semi t-main\">\n\t\t\t\t\t\t\t\tThe World\n\t \t\t</span>\n\t \t</h2>\n\t\t\t\t\t</div>\n\n\n\t\t\t\t<!-- <Filters/> -->\n\n\t\t\t\t<!-- Products section -->\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<transition name=\"scaleIn\" mode=\"out-in\">\n\t\t\t\t\t\t<component \n\t\t\t\t\t\t\tref=\"page\" \n\t\t\t\t\t\t\t:key=\"route.path\" \n\t\t\t\t\t\t\t:localPosition=\"localPosition\" \n\t\t\t\t\t\t\t:is=\"Component\"\n\t\t\t\t\t\t\t:apiKey=\"GOOGLE_MAPS_API_KEY\" \n \t\t\t\t:locale=\"$i18n.locale\"\n\t\t\t\t\t\t\tclass=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</transition>\n\t\t\t\t</router-view>\n\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, watchEffect, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n // Prometheus\n\timport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\";\n \timport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\n \timport Field from \"@pf/src/components/Field/Field.vue\";\n \t// Partials\n\timport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n \timport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\timport * as categories from '@pf/src/modules/products/store/categories';\n\timport * as marketplace from '@pf/src/modules/marketplace/views/store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tonMounted(async () => {\n\t if (route.params) {\n\t // Загружаем новые значения из параметров маршрута в состояние\n\t let newState = {\n\t country: denormalizeUrlParam(route.params.country),\n\t state: denormalizeUrlParam(route.params.state),\n\t city: denormalizeUrlParam(route.params.city),\n\t };\n\n\t\t // Обновляем глобальное состояние\n\t\t localPosition.value = newState;\n\t\t}\n\n\t\tif (route.query) {\n\t\t const query = route.query;\n\t\t const newFilterValue = {\n\t\t categories: query.categories ? query.categories.split(',') : [],\n\t\t prices: query.prices ? query.prices.split(',') : [],\n\t\t delivery: query.delivery ? query.delivery.split(',') : [],\n\t\t // Продолжайте этот паттерн для остальных полей фильтра\n\t\t };\n\t\t marketplace.state.filter.selected = newFilterValue;\n\t\t}\n\n\n\t\t// Data fetching\n\t\tawait categories.actions.read()\n\t})\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.push({ query });\n\t}, { deep: true })\n\n\t\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase() // Преобразование всех символов в нижний регистр\n\t .replace(/ /g, '-') // Замена всех пробелов на дефисы\n\t .replace(/[^a-z0-9-]/g, ''); // Удаление всех символов, которые не являются буквами, цифрами или дефисами\n\t}\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \t\n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\t\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Home',\n \t\tstore: 'Marketplace',\n \t},\n \tcategoriesTitle: 'Category',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'By price',\n \t\tnewest: 'By newest',\n \t\tpopularity: 'By popularity'\n \t},\n \tfilters: {\n \t\ttitle: 'Filters',\n \t\tprice: {\n \t\t\ttitle: 'Price',\n \t\t\tfrom: 'From',\n \t\t\tto: 'To'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Reset Filters'\n \t}\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Главная',\n \t\tstore: 'Маркетплейс',\n \t},\n \tcategoriesTitle: 'Категория',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'По цене',\n \t\tnewest: 'По новизне',\n \t\tpopularity: 'По популярности'\n \t},\n \tfilters: {\n \t\ttitle: 'Фильтры',\n \t\tprice: {\n \t\t\ttitle: 'Цена',\n \t\t\tfrom: 'От',\n \t\t\tto: 'До'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Сбросить фильтры',\n \t}\n }\n }\n }\n\n \tcategories.state.all.forEach( category => {\n \tcategory.localization.forEach( localization => {\n \ttext.messages[localization.locale].categories.push(localization.text)\n \t})\n\t})\n\n \tconst { t } = useI18n(text)\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","marketplace.state","categories.actions","watch","globals.state","categories.state","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+DC,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAE1B,UAAM,gBAAgBC,IAAAA,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAGD,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IACzC;AAEDC,QAAAA,UAAU,YAAY;AACpB,UAAI,MAAM,QAAQ;AAEhB,YAAI,WAAW;AAAA,UACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,UACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,UAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,QAClD;AAGI,sBAAc,QAAQ;AAAA,MACvB;AAED,UAAI,MAAM,OAAO;AAChB,cAAM,QAAQ,MAAM;AACnB,cAAM,iBAAiB;AAAA,UACrB,YAAY,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAE;AAAA,UAC/D,QAAQ,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG,IAAI,CAAE;AAAA,UACnD,UAAU,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG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AAA,QACR,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACF,aAAa;AAAA,YACZ,MAAM;AAAA,YACN,OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACF,aAAa;AAAA,YACZ,MAAM;AAAA,YACN,OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,MACF;AAAA,IACF;AAEDC,qBAAiB,IAAI,QAAS,cAAY;AACzC,eAAS,aAAa,QAAS,kBAAgB;AAC7C,aAAK,SAAS,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,IAAI;AAAA,MACzE,CAAI;AAAA,IACJ,CAAE;AAEcC,YAAAA,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,12 +2,12 @@ import { ref, onMounted, watch, resolveComponent, openBlock, createElementBlock,
|
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
3
|
import { useI18n } from "vue-i18n";
|
4
4
|
/* empty css */
|
5
|
-
/* empty css
|
5
|
+
/* empty css */
|
6
6
|
/* empty css */
|
7
|
-
/* empty css
|
7
|
+
/* empty css */
|
8
8
|
import { state as state$1 } from "../../../globals/views/store/globals.js";
|
9
9
|
import { actions, state as state$2 } from "../../../products/store/categories.js";
|
10
|
-
import { state } from "../../../
|
10
|
+
import { state } from "../../../marketplace/views/store/marketplace.js";
|
11
11
|
const _hoisted_1 = { class: "w-100 h-100" };
|
12
12
|
const _hoisted_2 = { class: "h-100 w-100 flex-nowrap flex-column flex gap-thin" };
|
13
13
|
const _hoisted_3 = { class: "pos-absolute z-index-2 w-100" };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Spots.vue.js","sources":["../../../../../../../src/modules/spots/components/layouts/Spots.vue"],"sourcesContent":["<template>\n\t<div class=\"w-100 h-100\">\n\t\t<!-- Catalog wrapper -->\n\t\t<div class=\"h-100 w-100 flex-nowrap flex-column flex gap-thin\">\n\n\t\t\t\t<!-- Sorting section -->\n\t\t\t\t<div class=\"pos-absolute z-index-2 w-100\">\n\t \t<h2 class=\"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center\">\n\t \t\t<span class=\"\">Weed in </span>\n\n\t \t\t<span @click=\"a => { globals.state.isOpenLocationPopup = true }\" v-if=\"localPosition.city || localPosition.state || localPosition.country\" class=\"t-semi t-main\">\n \t\t\t\t<span v-if=\"localPosition.city\">{{localPosition.city}}, </span>\n \t\t\t\t<span v-if=\"localPosition.state\">{{localPosition.state}}, </span>\n \t\t\t\t<span v-if=\"localPosition.country\">{{localPosition.country}}</span>\n\t \t\t</span>\n\n\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-semi t-main\">\n\t\t\t\t\t\t\t\tThe World\n\t \t\t</span>\n\t \t</h2>\n\t\t\t\t\t</div>\n\n\n\t\t\t\t<!-- <Filters/> -->\n\n\t\t\t\t<!-- Products section -->\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<transition name=\"scaleIn\" mode=\"out-in\">\n\t\t\t\t\t\t<component \n\t\t\t\t\t\t\tref=\"page\" \n\t\t\t\t\t\t\t:key=\"route.path\" \n\t\t\t\t\t\t\t:localPosition=\"localPosition\" \n\t\t\t\t\t\t\t:is=\"Component\"\n\t\t\t\t\t\t\t:apiKey=\"GOOGLE_MAPS_API_KEY\" \n \t\t\t\t:locale=\"$i18n.locale\"\n\t\t\t\t\t\t\tclass=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</transition>\n\t\t\t\t</router-view>\n\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, watchEffect, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n // Prometheus\n\timport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\";\n \timport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\n \timport Field from \"@pf/src/components/Field/Field.vue\";\n \t// Partials\n\timport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n \timport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\n\n \t// import Filters from '@pf/src/modules/marketplace/components/sections/Filters.vue'\n\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\timport * as categories from '@pf/src/modules/products/store/categories';\n\timport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tonMounted(async () => {\n\t if (route.params) {\n\t // Загружаем новые значения из параметров маршрута в состояние\n\t let newState = {\n\t country: denormalizeUrlParam(route.params.country),\n\t state: denormalizeUrlParam(route.params.state),\n\t city: denormalizeUrlParam(route.params.city),\n\t };\n\n\t\t // Обновляем глобальное состояние\n\t\t localPosition.value = newState;\n\t\t}\n\n\t\tif (route.query) {\n\t\t const query = route.query;\n\t\t const newFilterValue = {\n\t\t categories: query.categories ? query.categories.split(',') : [],\n\t\t prices: query.prices ? query.prices.split(',') : [],\n\t\t delivery: query.delivery ? query.delivery.split(',') : [],\n\t\t // Продолжайте этот паттерн для остальных полей фильтра\n\t\t };\n\t\t marketplace.state.filter.selected = newFilterValue;\n\t\t}\n\n\n\t\t// Data fetching\n\t\tawait categories.actions.read()\n\t})\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.push({ query });\n\t}, { deep: true })\n\n\t\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase() // Преобразование всех символов в нижний регистр\n\t .replace(/ /g, '-') // Замена всех пробелов на дефисы\n\t .replace(/[^a-z0-9-]/g, ''); // Удаление всех символов, которые не являются буквами, цифрами или дефисами\n\t}\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \t\n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\t\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Home',\n \t\tstore: 'Marketplace',\n \t},\n \tcategoriesTitle: 'Category',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'By price',\n \t\tnewest: 'By newest',\n \t\tpopularity: 'By popularity'\n \t},\n \tfilters: {\n \t\ttitle: 'Filters',\n \t\tprice: {\n \t\t\ttitle: 'Price',\n \t\t\tfrom: 'From',\n \t\t\tto: 'To'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Reset Filters'\n \t}\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Главная',\n \t\tstore: 'Маркетплейс',\n \t},\n \tcategoriesTitle: 'Категория',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'По цене',\n \t\tnewest: 'По новизне',\n \t\tpopularity: 'По популярности'\n \t},\n \tfilters: {\n \t\ttitle: 'Фильтры',\n \t\tprice: {\n \t\t\ttitle: 'Цена',\n \t\t\tfrom: 'От',\n \t\t\tto: 'До'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Сбросить фильтры',\n \t}\n }\n }\n }\n\n \tcategories.state.all.forEach( category => {\n \tcategory.localization.forEach( localization => {\n \ttext.messages[localization.locale].categories.push(localization.text)\n \t})\n\t})\n\n \tconst { t } = useI18n(text)\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions","globals.state","categories.state"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkEC,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,gBAAgB,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAGD,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IACzC;AAED,cAAU,YAAY;AACpB,UAAI,MAAM,QAAQ;AAEhB,YAAI,WAAW;AAAA,UACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,UACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,UAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,QAClD;AAGI,sBAAc,QAAQ;AAAA,MACvB;AAED,UAAI,MAAM,OAAO;AAChB,cAAM,QAAQ,MAAM;AACnB,cAAM,iBAAiB;AAAA,UACrB,YAAY,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAE;AAAA,UAC/D,QAAQ,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG,IAAI,CAAE;AAAA,UACnD,UAAU,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG,IAAI,CAAE;AAAA;AAAA,QAE/D;AACIA,cAAkB,OAAO,WAAW;AAAA,MACrC;AAID,YAAMC,QAAmB,KAAM;AAAA,IACjC,CAAE;AAED,UAAM,MAAMD,MAAkB,OAAO,UAAU,CAAC,gBAAgB,mBAAmB;AAEjF,YAAM,QAAQ,EAAE,GAAG,MAAM,MAAK;AAG9B,aAAO,KAAK,cAAc,EAAE,QAAQ,SAAO;AACzC,YAAI,MAAM,GAAG,GAAG;AACd,iBAAO,MAAM,GAAG;AAAA,QACjB;AAAA,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AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACF,aAAa;AAAA,YACZ,MAAM;AAAA,YACN,OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,MACF;AAAA,IACF;AAEDC,YAAiB,IAAI,QAAS,cAAY;AACzC,eAAS,aAAa,QAAS,kBAAgB;AAC7C,aAAK,SAAS,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,IAAI;AAAA,MACzE,CAAI;AAAA,IACJ,CAAE;AAEc,YAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Spots.vue.js","sources":["../../../../../../../src/modules/spots/components/layouts/Spots.vue"],"sourcesContent":["<template>\n\t<div class=\"w-100 h-100\">\n\t\t<!-- Catalog wrapper -->\n\t\t<div class=\"h-100 w-100 flex-nowrap flex-column flex gap-thin\">\n\n\t\t\t\t<!-- Sorting section -->\n\t\t\t\t<div class=\"pos-absolute z-index-2 w-100\">\n\t \t<h2 class=\"bg-black-transp-25 t-white pd-small w-100 bg-blur-big mn-l-auto mn-r-auto t-center\">\n\t \t\t<span class=\"\">Weed in </span>\n\n\t \t\t<span @click=\"a => { globals.state.isOpenLocationPopup = true }\" v-if=\"localPosition.city || localPosition.state || localPosition.country\" class=\"t-semi t-main\">\n \t\t\t\t<span v-if=\"localPosition.city\">{{localPosition.city}}, </span>\n \t\t\t\t<span v-if=\"localPosition.state\">{{localPosition.state}}, </span>\n \t\t\t\t<span v-if=\"localPosition.country\">{{localPosition.country}}</span>\n\t \t\t</span>\n\n\t \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"t-semi t-main\">\n\t\t\t\t\t\t\t\tThe World\n\t \t\t</span>\n\t \t</h2>\n\t\t\t\t\t</div>\n\n\n\t\t\t\t<!-- <Filters/> -->\n\n\t\t\t\t<!-- Products section -->\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<transition name=\"scaleIn\" mode=\"out-in\">\n\t\t\t\t\t\t<component \n\t\t\t\t\t\t\tref=\"page\" \n\t\t\t\t\t\t\t:key=\"route.path\" \n\t\t\t\t\t\t\t:localPosition=\"localPosition\" \n\t\t\t\t\t\t\t:is=\"Component\"\n\t\t\t\t\t\t\t:apiKey=\"GOOGLE_MAPS_API_KEY\" \n \t\t\t\t:locale=\"$i18n.locale\"\n\t\t\t\t\t\t\tclass=\"\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</transition>\n\t\t\t\t</router-view>\n\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, watchEffect, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n // Prometheus\n\timport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\";\n \timport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\n \timport Field from \"@pf/src/components/Field/Field.vue\";\n \t// Partials\n\timport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n \timport Dropdown from \"@pf/src/components/Dropdown/Dropdown.vue\";\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals';\n\timport * as categories from '@pf/src/modules/products/store/categories';\n\timport * as marketplace from '@pf/src/modules/marketplace/views/store/marketplace';\n\n\t// Accessing router and store\n\tconst route = useRoute()\n\tconst router = useRouter()\n\n\tconst localPosition = ref({\n\t\tcity: null,\n\t\tstate: null,\n\t\tcountry: null\n\t});\n\n\n\tfunction denormalizeUrlParam(param) {\n\t return param\n\t .replace(/-/g, ' ') // Замена дефисов на пробелы\n\t .replace(/\\b\\w/g, l => l.toUpperCase()); // Преобразование первой буквы каждого слова в заглавную\n\t}\n\n\tonMounted(async () => {\n\t if (route.params) {\n\t // Загружаем новые значения из параметров маршрута в состояние\n\t let newState = {\n\t country: denormalizeUrlParam(route.params.country),\n\t state: denormalizeUrlParam(route.params.state),\n\t city: denormalizeUrlParam(route.params.city),\n\t };\n\n\t\t // Обновляем глобальное состояние\n\t\t localPosition.value = newState;\n\t\t}\n\n\t\tif (route.query) {\n\t\t const query = route.query;\n\t\t const newFilterValue = {\n\t\t categories: query.categories ? query.categories.split(',') : [],\n\t\t prices: query.prices ? query.prices.split(',') : [],\n\t\t delivery: query.delivery ? query.delivery.split(',') : [],\n\t\t // Продолжайте этот паттерн для остальных полей фильтра\n\t\t };\n\t\t marketplace.state.filter.selected = newFilterValue;\n\t\t}\n\n\n\t\t// Data fetching\n\t\tawait categories.actions.read()\n\t})\n\n\twatch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n\t // Переводим фильтр в формат query\n\t const query = { ...route.query };\n\n\t // Удаляем старые значения фильтра из query\n\t Object.keys(oldFilterValue).forEach(key => {\n\t if (query[key]) {\n\t delete query[key];\n\t }\n\t });\n\n\t // Добавляем новые значения фильтра в query\n\t const newQueryValues = Object.fromEntries(\n\t Object.entries(newFilterValue)\n\t .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n\t .map(([key, value]) => [key, value.join(',')])\n\t );\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.push({ query });\n\t}, { deep: true })\n\n\t\n\tfunction normalizeUrlParam(param) {\n\t return param\n\t .toLowerCase() // Преобразование всех символов в нижний регистр\n\t .replace(/ /g, '-') // Замена всех пробелов на дефисы\n\t .replace(/[^a-z0-9-]/g, ''); // Удаление всех символов, которые не являются буквами, цифрами или дефисами\n\t}\n\n\twatch(() => globals.state.position, (newPosition) => {\n\t // get the current route\n\t const currentRoute = { ...router.currentRoute.value };\n\t \n\t // create new parameters based on globals state position\n\t let newParams = {\n\t country: normalizeUrlParam(newPosition.country),\n\t state: normalizeUrlParam(newPosition.state),\n\t city: normalizeUrlParam(newPosition.city),\n\t };\n\t \t\n\t // update route params\n\t currentRoute.params = newParams;\n\t \n\t // replace the current route\n\t router.replace(currentRoute);\n\t}, { deep: true });\n\t\n const text = {\n locale: 'en',\n messages: {\n en: {\n\t \tmeta: {\n title: \"Marketplace – Shop Our Wide Selection of Quality Weed for Delivery\",\n description: \"Browse our marketplace of top-grade weed strains and choose from a variety of delivery options. Order now and have your favorite strains delivered straight to your door. Safe, fast, and reliable.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Home',\n \t\tstore: 'Marketplace',\n \t},\n \tcategoriesTitle: 'Category',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'By price',\n \t\tnewest: 'By newest',\n \t\tpopularity: 'By popularity'\n \t},\n \tfilters: {\n \t\ttitle: 'Filters',\n \t\tprice: {\n \t\t\ttitle: 'Price',\n \t\t\tfrom: 'From',\n \t\t\tto: 'To'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Reset Filters'\n \t}\n },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n },\n \tbreadcrumbs: {\n \t\thome: 'Главная',\n \t\tstore: 'Маркетплейс',\n \t},\n \tcategoriesTitle: 'Категория',\n \tcategories: [],\n \tsort: {\n \t\tprice: 'По цене',\n \t\tnewest: 'По новизне',\n \t\tpopularity: 'По популярности'\n \t},\n \tfilters: {\n \t\ttitle: 'Фильтры',\n \t\tprice: {\n \t\t\ttitle: 'Цена',\n \t\t\tfrom: 'От',\n \t\t\tto: 'До'\n \t\t},\n \t\tfilters: [],\n \t\treset: 'Сбросить фильтры',\n \t}\n }\n }\n }\n\n \tcategories.state.all.forEach( category => {\n \tcategory.localization.forEach( localization => {\n \ttext.messages[localization.locale].categories.push(localization.text)\n \t})\n\t})\n\n \tconst { t } = useI18n(text)\n\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions","globals.state","categories.state"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+DC,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,gBAAgB,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAGD,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IACzC;AAED,cAAU,YAAY;AACpB,UAAI,MAAM,QAAQ;AAEhB,YAAI,WAAW;AAAA,UACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,UACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,UAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,QAClD;AAGI,sBAAc,QAAQ;AAAA,MACvB;AAED,UAAI,MAAM,OAAO;AAChB,cAAM,QAAQ,MAAM;AACnB,cAAM,iBAAiB;AAAA,UACrB,YAAY,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAE;AAAA,UAC/D,QAAQ,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG,IAAI,CAAE;AAAA,UACnD,UAAU,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG,IAAI,CAAE;AAAA;AAAA,QAE/D;AACIA,cAAkB,OAAO,WAAW;AAAA,MACrC;AAID,YAAMC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OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,UACF,aAAa;AAAA,YACZ,MAAM;AAAA,YACN,OAAO;AAAA,UACP;AAAA,UACD,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,MAAM;AAAA,YACL,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,YAAY;AAAA,UACZ;AAAA,UACD,SAAS;AAAA,YACR,OAAO;AAAA,YACP,OAAO;AAAA,cACN,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACJ;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACP;AAAA,QACD;AAAA,MACF;AAAA,IACF;AAEDC,YAAiB,IAAI,QAAS,cAAY;AACzC,eAAS,aAAa,QAAS,kBAAgB;AAC7C,aAAK,SAAS,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,IAAI;AAAA,MACzE,CAAI;AAAA,IACJ,CAAE;AAEc,YAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -3,10 +3,10 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
5
|
const index = require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");
|
6
|
-
const Button = require("../../../../components/Button/Button.
|
6
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
7
7
|
const organizations = require("../../../organizations/store/organizations.cjs");
|
8
8
|
const globals = require("../../../globals/views/store/globals.cjs");
|
9
|
-
const marketplace = require("../../../
|
9
|
+
const marketplace = require("../../../marketplace/views/store/marketplace.cjs");
|
10
10
|
;/* empty css */
|
11
11
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
12
12
|
const _hoisted_1 = { class: "h-100 w-100 pos-relative" };
|
@@ -529,6 +529,6 @@ const _sfc_main = {
|
|
529
529
|
};
|
530
530
|
}
|
531
531
|
};
|
532
|
-
const Map = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
532
|
+
const Map = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-c9f8b0c5"]]);
|
533
533
|
exports.default = Map;
|
534
534
|
//# sourceMappingURL=Map.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Map.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\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\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["useRouter","useRoute","ref","error","onMounted","globals.state","GMLoader","marketplace.state","actions","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAMC,IAAAA,IAAI,IAAI;AAClB,QAAI,UAAUA,IAAAA,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAOA,IAAAA,IAAI,CAAC;AAChB,QAAI,QAAQA,IAAAA,IAAI,EAAE;AAElB,QAAI,mBAAmBA,IAAG,IAAC,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiBA,IAAAA,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,IAAI,MAAM,yBAAyB;AAAA,QAC1C;AAED,gBAAQ,IAAI,MAAM,CAAC,CAAC;AAEpB,eAAO,MAAM,CAAC;AAAA,MACf,SAAQC,QAAO;AACd,gBAAQ,MAAMA,MAAK;AACnB,cAAMA;AAAA,MACP;AAAA,IACH;AAGAC,QAAAA,UAAU,YAAY;;AACpB,UAAI,MAAM,WAAW,MAAM,MAAM,SAAOC,mBAAAA,MAAc,aAAdA,mBAAwB,aAAxBA,mBA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AA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQL,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Map.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/marketplace/views/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\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\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["useRouter","useRoute","ref","error","onMounted","globals.state","GMLoader","marketplace.state","actions","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAMC,IAAAA,IAAI,IAAI;AAClB,QAAI,UAAUA,IAAAA,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAOA,IAAAA,IAAI,CAAC;AAChB,QAAI,QAAQA,IAAAA,IAAI,EAAE;AAElB,QAAI,mBAAmBA,IAAG,IAAC,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiBA,IAAAA,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,IAAI,MAAM,yBAAyB;AAAA,QAC1C;AAED,gBAAQ,IAAI,MAAM,CAAC,CAAC;AAEpB,eAAO,MAAM,CAAC;AAAA,MACf,SAAQC,QAAO;AACd,gBAAQ,MAAMA,MAAK;AACnB,cAAMA;AAAA,MACP;AAAA,IACH;AAGAC,QAAAA,UAAU,YAAY;;AACpB,UAAI,MAAM,WAAW,MAAM,MAAM,SAAOC,mBAAAA,MAAc,aAAdA,mBAAwB,aAAxBA,mBAAkC,IAAG;AAC7E,UAAI,MAAM,WAAW,MAAM,MAAM,SAAOA,mBAAAA,MAAc,aA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AAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQL,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, createTextVNode } from "vue";
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
3
3
|
import { Loader } from "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
|
4
|
-
import _sfc_main$1 from "../../../../components/Button/Button.
|
4
|
+
import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
|
5
5
|
import { actions, state as state$2 } from "../../../organizations/store/organizations.js";
|
6
6
|
import { state } from "../../../globals/views/store/globals.js";
|
7
|
-
import { state as state$1 } from "../../../
|
7
|
+
import { state as state$1 } from "../../../marketplace/views/store/marketplace.js";
|
8
8
|
/* empty css */
|
9
9
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
10
10
|
const _hoisted_1 = { class: "h-100 w-100 pos-relative" };
|
@@ -527,7 +527,7 @@ const _sfc_main = {
|
|
527
527
|
};
|
528
528
|
}
|
529
529
|
};
|
530
|
-
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
530
|
+
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c9f8b0c5"]]);
|
531
531
|
export {
|
532
532
|
Map as default
|
533
533
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\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\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","globals.state","GMLoader","marketplace.state","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAM,IAAI,IAAI;AAClB,QAAI,UAAU,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAO,IAAI,CAAC;AAChB,QAAI,QAAQ,IAAI,EAAE;AAElB,QAAI,mBAAmB,IAAI,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiB,IAAI,IAA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EtC,iBAAS,UAAU,QAAQ,OAAO;AAChC,iBAAO,OAAO,IAAI;AAAA,QACnB;AACD,gBAAQ,QAAQ;AAGhB,gBAAQ,QAAQ,KAAK,IAAI,SAAO;;AAC9B,cAAI,YAAW,SAAI,MAAM,CAAC,MAAX,mBAAc;AAC7B,cAAI,YAAY,SAAS,SAAS,SAAS;AACzC,gBAAI,CAAC,KAAK,GAAG,IAAI,SAAS;AAC1B,gBAAI,aAAa,IAAI,YAAY,IAAI,SAAS,SAAS,IAAI,kBAAkB;AAE7E,kBAAM,SAAS,IAAI,OAAO,KAAK,OAAO;AAAA,cACpC,UAAU,EAAE,KAAK,IAAK;AAAA,cACtB,KAAK,IAAI;AAAA,cACT,MAAM;AAAA,gBACJ,KAAK;AAAA;AAAA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQH,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/marketplace/views/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\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\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","globals.state","GMLoader","marketplace.state","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAM,IAAI,IAAI;AAClB,QAAI,UAAU,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAO,IAAI,CAAC;AAChB,QAAI,QAAQ,IAAI,EAAE;AAElB,QAAI,mBAAmB,IAAI,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiB,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,G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