@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
@@ -0,0 +1,179 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
const vueRouter = require("vue-router");
|
5
|
+
const vueI18n = require("vue-i18n");
|
6
|
+
const BlockFilter = require("../../../../globals/views/components/blocks/BlockFilter.vue.cjs");
|
7
|
+
const globals = require("../../../../globals/views/store/globals.cjs");
|
8
|
+
const categories = require("../../../../products/store/categories.cjs");
|
9
|
+
const marketplace = require("../../store/marketplace.cjs");
|
10
|
+
const _hoisted_1 = {
|
11
|
+
style: { "min-height": "100%" },
|
12
|
+
class: "h-min-100 pd-thin"
|
13
|
+
};
|
14
|
+
const _hoisted_2 = { class: "pd-semi radius-big bg-light mn-b-small" };
|
15
|
+
const _hoisted_3 = { class: "" };
|
16
|
+
const _hoisted_4 = { class: "gap-thin cols-2-1_3" };
|
17
|
+
const _hoisted_5 = { class: "desktop-only radius-big o-hidden" };
|
18
|
+
const _hoisted_6 = { class: "rows-1 gap-thin" };
|
19
|
+
const _sfc_main = {
|
20
|
+
__name: "Marketplace",
|
21
|
+
setup(__props) {
|
22
|
+
const route = vueRouter.useRoute();
|
23
|
+
const router = vueRouter.useRouter();
|
24
|
+
const localPosition = vue.ref({
|
25
|
+
city: null,
|
26
|
+
state: null,
|
27
|
+
country: null
|
28
|
+
});
|
29
|
+
vue.ref(null);
|
30
|
+
function denormalizeUrlParam(param) {
|
31
|
+
return param.replace(/-/g, " ").replace(/\b\w/g, (l) => l.toUpperCase());
|
32
|
+
}
|
33
|
+
function normalizeUrlParam(param) {
|
34
|
+
return param.toLowerCase().replace(/ /g, "-").replace(/[^a-z0-9-]/g, "");
|
35
|
+
}
|
36
|
+
if (route.params) {
|
37
|
+
let newState = {
|
38
|
+
country: denormalizeUrlParam(route.params.country),
|
39
|
+
state: denormalizeUrlParam(route.params.state),
|
40
|
+
city: denormalizeUrlParam(route.params.city)
|
41
|
+
};
|
42
|
+
localPosition.value = newState;
|
43
|
+
}
|
44
|
+
if (route.query) {
|
45
|
+
const query = route.query;
|
46
|
+
marketplace.state.filter.selected.categories = query.categories ? query.categories.split(",") : [];
|
47
|
+
marketplace.state.filter.selected.prices = query.prices ? query.prices.split(",") : [];
|
48
|
+
marketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(",") : [];
|
49
|
+
}
|
50
|
+
if (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam;
|
51
|
+
if (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder;
|
52
|
+
vue.onMounted(async () => {
|
53
|
+
let options = {
|
54
|
+
status: "published"
|
55
|
+
};
|
56
|
+
let categoriesFilter = await categories.actions.read(options);
|
57
|
+
categoriesFilter = categoriesFilter.map((category) => ({
|
58
|
+
value: category.url,
|
59
|
+
label: category.name
|
60
|
+
}));
|
61
|
+
const index = marketplace.state.filter.options.findIndex((option) => option.value === "categories");
|
62
|
+
const categoryOption = {
|
63
|
+
title: "Categories",
|
64
|
+
value: "categories",
|
65
|
+
options: categoriesFilter
|
66
|
+
};
|
67
|
+
if (index !== -1) {
|
68
|
+
marketplace.state.filter.options[index] = categoryOption;
|
69
|
+
} else {
|
70
|
+
marketplace.state.filter.options.unshift(categoryOption);
|
71
|
+
}
|
72
|
+
});
|
73
|
+
vue.watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {
|
74
|
+
let query = { ...route.query };
|
75
|
+
query.sortParam = newSortValue.param;
|
76
|
+
query.sortOrder = newSortValue.order;
|
77
|
+
router.replace({ query });
|
78
|
+
}, { deep: true });
|
79
|
+
vue.watch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {
|
80
|
+
const query = { ...route.query };
|
81
|
+
Object.keys(oldFilterValue).forEach((key) => {
|
82
|
+
if (query[key]) {
|
83
|
+
delete query[key];
|
84
|
+
}
|
85
|
+
});
|
86
|
+
const newQueryValues = Object.fromEntries(
|
87
|
+
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
88
|
+
);
|
89
|
+
delete query.options;
|
90
|
+
Object.assign(query, newQueryValues);
|
91
|
+
router.replace({ query });
|
92
|
+
}, { deep: true });
|
93
|
+
vue.watch(() => globals.state.position, (newPosition) => {
|
94
|
+
const currentRoute = { ...router.currentRoute.value };
|
95
|
+
let newParams = {
|
96
|
+
country: normalizeUrlParam(newPosition.country),
|
97
|
+
state: normalizeUrlParam(newPosition.state),
|
98
|
+
city: normalizeUrlParam(newPosition.city)
|
99
|
+
};
|
100
|
+
currentRoute.params = newParams;
|
101
|
+
router.replace(currentRoute);
|
102
|
+
}, { deep: true });
|
103
|
+
const text = {
|
104
|
+
locale: "en",
|
105
|
+
messages: {
|
106
|
+
en: {
|
107
|
+
meta: {
|
108
|
+
title: "Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",
|
109
|
+
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."
|
110
|
+
}
|
111
|
+
},
|
112
|
+
ru: {
|
113
|
+
meta: {
|
114
|
+
title: "Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",
|
115
|
+
description: "Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно."
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
};
|
120
|
+
vueI18n.useI18n(text);
|
121
|
+
return (_ctx, _cache) => {
|
122
|
+
const _component_router_view = vue.resolveComponent("router-view");
|
123
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
124
|
+
vue.createElementVNode("header", _hoisted_2, [
|
125
|
+
vue.createElementVNode("h2", _hoisted_3, [
|
126
|
+
_cache[3] || (_cache[3] = vue.createElementVNode("span", { class: "" }, "Weed in ", -1)),
|
127
|
+
localPosition.value.city || localPosition.value.state || localPosition.value.country ? (vue.openBlock(), vue.createElementBlock("span", {
|
128
|
+
key: 0,
|
129
|
+
onClick: _cache[0] || (_cache[0] = (a) => {
|
130
|
+
globals.state.isOpenLocationPopup = true;
|
131
|
+
}),
|
132
|
+
class: "t-main t-semi cursor-pointer"
|
133
|
+
}, [
|
134
|
+
localPosition.value.city ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
135
|
+
vue.createTextVNode(vue.toDisplayString(localPosition.value.city) + ", ", 1)
|
136
|
+
], 64)) : vue.createCommentVNode("", true),
|
137
|
+
localPosition.value.state ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
138
|
+
vue.createTextVNode(vue.toDisplayString(localPosition.value.state) + ", ", 1)
|
139
|
+
], 64)) : vue.createCommentVNode("", true),
|
140
|
+
localPosition.value.country ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
141
|
+
vue.createTextVNode(vue.toDisplayString(localPosition.value.country), 1)
|
142
|
+
], 64)) : vue.createCommentVNode("", true)
|
143
|
+
])) : (vue.openBlock(), vue.createElementBlock("span", {
|
144
|
+
key: 1,
|
145
|
+
onClick: _cache[1] || (_cache[1] = (a) => {
|
146
|
+
globals.state.isOpenLocationPopup = true;
|
147
|
+
}),
|
148
|
+
class: "h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer"
|
149
|
+
}, " The World "))
|
150
|
+
])
|
151
|
+
]),
|
152
|
+
vue.createElementVNode("div", _hoisted_4, [
|
153
|
+
vue.createElementVNode("div", _hoisted_5, [
|
154
|
+
vue.createVNode(BlockFilter.default, {
|
155
|
+
filter: marketplace.state.filter,
|
156
|
+
"onUpdate:filter": _cache[2] || (_cache[2] = ($event) => marketplace.state.filter = $event),
|
157
|
+
options: marketplace.state.filter.options,
|
158
|
+
class: "h-100 w-100 pd-small bg-light"
|
159
|
+
}, null, 8, ["filter", "options"])
|
160
|
+
]),
|
161
|
+
vue.createElementVNode("div", _hoisted_6, [
|
162
|
+
vue.createVNode(_component_router_view, null, {
|
163
|
+
default: vue.withCtx(({ Component, route: route2 }) => [
|
164
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(Component), {
|
165
|
+
ref: "page",
|
166
|
+
key: route2,
|
167
|
+
localPosition: localPosition.value
|
168
|
+
}, null, 8, ["localPosition"]))
|
169
|
+
]),
|
170
|
+
_: 1
|
171
|
+
})
|
172
|
+
])
|
173
|
+
])
|
174
|
+
]);
|
175
|
+
};
|
176
|
+
}
|
177
|
+
};
|
178
|
+
exports.default = _sfc_main;
|
179
|
+
//# sourceMappingURL=Marketplace.vue.cjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Marketplace.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100 pd-thin\">\n\t\t<header class=\"pd-semi radius-big bg-light mn-b-small\">\n \t<h2 class=\"\">\n \t\t<span class=\"\">Weed in </span>\n\n \t\t<span \n \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n \t\t\tclass=\"t-main t-semi cursor-pointer \"\n \t\t>\n \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n \t\t</span>\n\n \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer\">\n\t\t\t\t\t\tThe World\n \t\t</span>\n \t</h2>\n\t\t</header>\n\n\t\t<div class=\"gap-thin \tcols-2-1_3\">\n\t\t\t<div class=\"desktop-only radius-big o-hidden\">\n\t <BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </div>\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"rows-1 gap-thin\">\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t</router-view>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n import * as categories from '@pf/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../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\tconst desktopFilters = ref(null)\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\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\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published'\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category.url,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\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\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\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 \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\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 },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","marketplace.state","onMounted","categories.actions","watch","globals.state","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwDC,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;AAEsBA,QAAAA,IAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IACzC;AAED,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAa,EACb,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC7B;AAED,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAA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AAA,YACP,aAAa;AAAA,UACd;AAAA,QACF;AAAA,QACD,IAAI;AAAA,UACH,MAAM;AAAA,YACH,OAAO;AAAA,YACP,aAAa;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEaC,YAAAA,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1,179 @@
|
|
1
|
+
import { ref, onMounted, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, withCtx, createBlock, resolveDynamicComponent } from "vue";
|
2
|
+
import { useRoute, useRouter } from "vue-router";
|
3
|
+
import { useI18n } from "vue-i18n";
|
4
|
+
import _sfc_main$1 from "../../../../globals/views/components/blocks/BlockFilter.vue.js";
|
5
|
+
import { state as state$1 } from "../../../../globals/views/store/globals.js";
|
6
|
+
import { actions } from "../../../../products/store/categories.js";
|
7
|
+
import { state } from "../../store/marketplace.js";
|
8
|
+
const _hoisted_1 = {
|
9
|
+
style: { "min-height": "100%" },
|
10
|
+
class: "h-min-100 pd-thin"
|
11
|
+
};
|
12
|
+
const _hoisted_2 = { class: "pd-semi radius-big bg-light mn-b-small" };
|
13
|
+
const _hoisted_3 = { class: "" };
|
14
|
+
const _hoisted_4 = { class: "gap-thin cols-2-1_3" };
|
15
|
+
const _hoisted_5 = { class: "desktop-only radius-big o-hidden" };
|
16
|
+
const _hoisted_6 = { class: "rows-1 gap-thin" };
|
17
|
+
const _sfc_main = {
|
18
|
+
__name: "Marketplace",
|
19
|
+
setup(__props) {
|
20
|
+
const route = useRoute();
|
21
|
+
const router = useRouter();
|
22
|
+
const localPosition = ref({
|
23
|
+
city: null,
|
24
|
+
state: null,
|
25
|
+
country: null
|
26
|
+
});
|
27
|
+
ref(null);
|
28
|
+
function denormalizeUrlParam(param) {
|
29
|
+
return param.replace(/-/g, " ").replace(/\b\w/g, (l) => l.toUpperCase());
|
30
|
+
}
|
31
|
+
function normalizeUrlParam(param) {
|
32
|
+
return param.toLowerCase().replace(/ /g, "-").replace(/[^a-z0-9-]/g, "");
|
33
|
+
}
|
34
|
+
if (route.params) {
|
35
|
+
let newState = {
|
36
|
+
country: denormalizeUrlParam(route.params.country),
|
37
|
+
state: denormalizeUrlParam(route.params.state),
|
38
|
+
city: denormalizeUrlParam(route.params.city)
|
39
|
+
};
|
40
|
+
localPosition.value = newState;
|
41
|
+
}
|
42
|
+
if (route.query) {
|
43
|
+
const query = route.query;
|
44
|
+
state.filter.selected.categories = query.categories ? query.categories.split(",") : [];
|
45
|
+
state.filter.selected.prices = query.prices ? query.prices.split(",") : [];
|
46
|
+
state.filter.selected.delivery = query.delivery ? query.delivery.split(",") : [];
|
47
|
+
}
|
48
|
+
if (route.query.sortParam) state.sort.param = route.query.sortParam;
|
49
|
+
if (route.query.sortOrder) state.sort.order = route.query.sortOrder;
|
50
|
+
onMounted(async () => {
|
51
|
+
let options = {
|
52
|
+
status: "published"
|
53
|
+
};
|
54
|
+
let categoriesFilter = await actions.read(options);
|
55
|
+
categoriesFilter = categoriesFilter.map((category) => ({
|
56
|
+
value: category.url,
|
57
|
+
label: category.name
|
58
|
+
}));
|
59
|
+
const index = state.filter.options.findIndex((option) => option.value === "categories");
|
60
|
+
const categoryOption = {
|
61
|
+
title: "Categories",
|
62
|
+
value: "categories",
|
63
|
+
options: categoriesFilter
|
64
|
+
};
|
65
|
+
if (index !== -1) {
|
66
|
+
state.filter.options[index] = categoryOption;
|
67
|
+
} else {
|
68
|
+
state.filter.options.unshift(categoryOption);
|
69
|
+
}
|
70
|
+
});
|
71
|
+
watch(() => state.sort, (newSortValue, oldSortValue) => {
|
72
|
+
let query = { ...route.query };
|
73
|
+
query.sortParam = newSortValue.param;
|
74
|
+
query.sortOrder = newSortValue.order;
|
75
|
+
router.replace({ query });
|
76
|
+
}, { deep: true });
|
77
|
+
watch(() => state.filter.selected, (newFilterValue, oldFilterValue) => {
|
78
|
+
const query = { ...route.query };
|
79
|
+
Object.keys(oldFilterValue).forEach((key) => {
|
80
|
+
if (query[key]) {
|
81
|
+
delete query[key];
|
82
|
+
}
|
83
|
+
});
|
84
|
+
const newQueryValues = Object.fromEntries(
|
85
|
+
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
86
|
+
);
|
87
|
+
delete query.options;
|
88
|
+
Object.assign(query, newQueryValues);
|
89
|
+
router.replace({ query });
|
90
|
+
}, { deep: true });
|
91
|
+
watch(() => state$1.position, (newPosition) => {
|
92
|
+
const currentRoute = { ...router.currentRoute.value };
|
93
|
+
let newParams = {
|
94
|
+
country: normalizeUrlParam(newPosition.country),
|
95
|
+
state: normalizeUrlParam(newPosition.state),
|
96
|
+
city: normalizeUrlParam(newPosition.city)
|
97
|
+
};
|
98
|
+
currentRoute.params = newParams;
|
99
|
+
router.replace(currentRoute);
|
100
|
+
}, { deep: true });
|
101
|
+
const text = {
|
102
|
+
locale: "en",
|
103
|
+
messages: {
|
104
|
+
en: {
|
105
|
+
meta: {
|
106
|
+
title: "Marketplace – Shop Our Wide Selection of Quality Weed for Delivery",
|
107
|
+
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."
|
108
|
+
}
|
109
|
+
},
|
110
|
+
ru: {
|
111
|
+
meta: {
|
112
|
+
title: "Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки",
|
113
|
+
description: "Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно."
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
};
|
118
|
+
useI18n(text);
|
119
|
+
return (_ctx, _cache) => {
|
120
|
+
const _component_router_view = resolveComponent("router-view");
|
121
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
122
|
+
createElementVNode("header", _hoisted_2, [
|
123
|
+
createElementVNode("h2", _hoisted_3, [
|
124
|
+
_cache[3] || (_cache[3] = createElementVNode("span", { class: "" }, "Weed in ", -1)),
|
125
|
+
localPosition.value.city || localPosition.value.state || localPosition.value.country ? (openBlock(), createElementBlock("span", {
|
126
|
+
key: 0,
|
127
|
+
onClick: _cache[0] || (_cache[0] = (a) => {
|
128
|
+
state$1.isOpenLocationPopup = true;
|
129
|
+
}),
|
130
|
+
class: "t-main t-semi cursor-pointer"
|
131
|
+
}, [
|
132
|
+
localPosition.value.city ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
133
|
+
createTextVNode(toDisplayString(localPosition.value.city) + ", ", 1)
|
134
|
+
], 64)) : createCommentVNode("", true),
|
135
|
+
localPosition.value.state ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
136
|
+
createTextVNode(toDisplayString(localPosition.value.state) + ", ", 1)
|
137
|
+
], 64)) : createCommentVNode("", true),
|
138
|
+
localPosition.value.country ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
139
|
+
createTextVNode(toDisplayString(localPosition.value.country), 1)
|
140
|
+
], 64)) : createCommentVNode("", true)
|
141
|
+
])) : (openBlock(), createElementBlock("span", {
|
142
|
+
key: 1,
|
143
|
+
onClick: _cache[1] || (_cache[1] = (a) => {
|
144
|
+
state$1.isOpenLocationPopup = true;
|
145
|
+
}),
|
146
|
+
class: "h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer"
|
147
|
+
}, " The World "))
|
148
|
+
])
|
149
|
+
]),
|
150
|
+
createElementVNode("div", _hoisted_4, [
|
151
|
+
createElementVNode("div", _hoisted_5, [
|
152
|
+
createVNode(_sfc_main$1, {
|
153
|
+
filter: state.filter,
|
154
|
+
"onUpdate:filter": _cache[2] || (_cache[2] = ($event) => state.filter = $event),
|
155
|
+
options: state.filter.options,
|
156
|
+
class: "h-100 w-100 pd-small bg-light"
|
157
|
+
}, null, 8, ["filter", "options"])
|
158
|
+
]),
|
159
|
+
createElementVNode("div", _hoisted_6, [
|
160
|
+
createVNode(_component_router_view, null, {
|
161
|
+
default: withCtx(({ Component, route: route2 }) => [
|
162
|
+
(openBlock(), createBlock(resolveDynamicComponent(Component), {
|
163
|
+
ref: "page",
|
164
|
+
key: route2,
|
165
|
+
localPosition: localPosition.value
|
166
|
+
}, null, 8, ["localPosition"]))
|
167
|
+
]),
|
168
|
+
_: 1
|
169
|
+
})
|
170
|
+
])
|
171
|
+
])
|
172
|
+
]);
|
173
|
+
};
|
174
|
+
}
|
175
|
+
};
|
176
|
+
export {
|
177
|
+
_sfc_main as default
|
178
|
+
};
|
179
|
+
//# sourceMappingURL=Marketplace.vue.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Marketplace.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/layouts/Marketplace.vue"],"sourcesContent":["<template>\n\t<div style=\"min-height: 100%;\" class=\"h-min-100 pd-thin\">\n\t\t<header class=\"pd-semi radius-big bg-light mn-b-small\">\n \t<h2 class=\"\">\n \t\t<span class=\"\">Weed in </span>\n\n \t\t<span \n \t\t\tv-if=\"localPosition.city || localPosition.state || localPosition.country\"\n \t\t\t@click=\"a => { globals.state.isOpenLocationPopup = true }\" \n \t\t\tclass=\"t-main t-semi cursor-pointer \"\n \t\t>\n \t\t\t\t<template v-if=\"localPosition.city\">{{localPosition.city}}, </template>\n \t\t\t\t<template v-if=\"localPosition.state\">{{localPosition.state}}, </template>\n \t\t\t\t<template v-if=\"localPosition.country\">{{localPosition.country}}</template>\n \t\t</span>\n\n \t\t<span v-else @click=\"a => { globals.state.isOpenLocationPopup = true }\" class=\"h2 pd-l-small pd-r-small pd-t-micro pd-b-micro d-inline-block t-semi radius-extra bg-main t-black cursor-pointer\">\n\t\t\t\t\t\tThe World\n \t\t</span>\n \t</h2>\n\t\t</header>\n\n\t\t<div class=\"gap-thin \tcols-2-1_3\">\n\t\t\t<div class=\"desktop-only radius-big o-hidden\">\n\t <BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 pd-small bg-light\"\n />\n </div>\n\t\t\t<!-- Catalog wrapper -->\n\t\t\t<div class=\"rows-1 gap-thin\">\n\t\t\t\t<router-view v-slot=\"{ Component, route }\">\n\t\t\t\t\t<component ref=\"page\" :key=\"route\" :localPosition=\"localPosition\" :is=\"Component\" />\n\t\t\t\t</router-view>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</template>\n\n\n<script setup=\"props\">\n\t// Import libs\n\timport { computed, onMounted, watch, ref } from 'vue'\n\timport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\timport { useI18n } from 'vue-i18n'\n\n\timport BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n import * as categories from '@pf/src/modules/products/store/categories';\n\n\n\timport * as marketplace from '../../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\tconst desktopFilters = ref(null)\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\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\tif (route.params) {\n // Загружаем новые значения из параметров маршрута в состояние\n let newState = {\n country: denormalizeUrlParam(route.params.country),\n state: denormalizeUrlParam(route.params.state),\n city: denormalizeUrlParam(route.params.city),\n };\n\n\t // Обновляем глобальное состояние\n\t localPosition.value = newState;\n\t}\n\n\tif (route.query) {\n\t \tconst query = route.query;\n\n\t\tmarketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n\t\tmarketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n\t\tmarketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n\t}\n\n\tif (route.query.sortParam) marketplace.state.sort.param = route.query.sortParam\n\tif (route.query.sortOrder) marketplace.state.sort.order = route.query.sortOrder\n\n\tonMounted(async () => {\n\t let options = {\n status: 'published'\n }\n\n let categoriesFilter = await categories.actions.read(options);\n\n categoriesFilter = categoriesFilter.map(category => ({\n value: category.url,\n label: category.name\n }));\n\n const index = marketplace.state.filter.options.findIndex(option => option.value === 'categories');\n\n const categoryOption = {\n title: 'Categories',\n value: 'categories',\n options: categoriesFilter\n };\n\n if (index !== -1) {\n marketplace.state.filter.options[index] = categoryOption;\n } else {\n marketplace.state.filter.options.unshift(categoryOption);\n }\n\t})\n\n\twatch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n\t\tlet query = { ...route.query}\n\t\t\n\t\tquery.sortParam = newSortValue.param\n\t\tquery.sortOrder = newSortValue.order\n\t \n\t // replace the current route\n\t router.replace({ query });\n\t}, { deep: true });\n\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\n\t delete query.options;\n\t Object.assign(query, newQueryValues);\n\n\t // Обновляем маршрут с новым query\n\t router.replace({ query });\n\t}, { deep: true })\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 \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\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 },\n ru: {\n\t meta: {\n title: \"Маркетплейс – Выбирайте из нашего ассортимента качественной травки для доставки\",\n description: \"Маркетплейс – Изучите наши продукты высокого качества и выбирайте из различных вариантов доставки. Закажите сейчас и получите свои любимые сорта на дом. Безопасно, быстро и надежно.\",\n }\n }\n }\n }\n\n \tconst { t } = useI18n(text)\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions","globals.state"],"mappings":";;;;;;;;;;;;;;;;;;;AAwDC,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,gBAAgB,IAAI;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,IACX,CAAE;AAEsB,QAAI,IAAI;AAE/B,aAAS,oBAAoB,OAAO;AAClC,aAAO,MACJ,QAAQ,MAAM,GAAG,EACjB,QAAQ,SAAS,OAAK,EAAE,YAAa,CAAA;AAAA,IACzC;AAED,aAAS,kBAAkB,OAAO;AAChC,aAAO,MACJ,YAAa,EACb,QAAQ,MAAM,GAAG,EACjB,QAAQ,eAAe,EAAE;AAAA,IAC7B;AAED,QAAI,MAAM,QAAQ;AAEf,UAAI,WAAW;AAAA,QACb,SAAS,oBAAoB,MAAM,OAAO,OAAO;AAAA,QACjD,OAAO,oBAAoB,MAAM,OAAO,KAAK;AAAA,QAC7C,MAAM,oBAAoB,MAAM,OAAO,IAAI;AAAA,MACjD;AAGG,oB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;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.cjs
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const vue = require("vue");
|
4
|
+
const vueRouter = require("vue-router");
|
5
|
+
const Feed = require("../../../../../components/Feed/Feed.vue.cjs");
|
6
|
+
const organizations = require("../../../../organizations/store/organizations.cjs");
|
7
|
+
const globals = require("../../../../globals/views/store/globals.cjs");
|
8
|
+
const CardOrganization = require("../../../../organizations/components/blocks/CardOrganization.vue.cjs");
|
9
|
+
const marketplace = require("../../store/marketplace.cjs");
|
10
|
+
const _sfc_main = {
|
11
|
+
__name: "Catalog",
|
12
|
+
setup(__props) {
|
13
|
+
const route = vueRouter.useRoute();
|
14
|
+
return (_ctx, _cache) => {
|
15
|
+
var _a;
|
16
|
+
return vue.openBlock(), vue.createBlock(Feed.default, {
|
17
|
+
sort: marketplace.state.sort,
|
18
|
+
"onUpdate:sort": _cache[0] || (_cache[0] = ($event) => marketplace.state.sort = $event),
|
19
|
+
filter: marketplace.state.filter,
|
20
|
+
"onUpdate:filter": _cache[1] || (_cache[1] = ($event) => marketplace.state.filter = $event),
|
21
|
+
search: {
|
22
|
+
autofocus: true
|
23
|
+
},
|
24
|
+
showLoadMore: false,
|
25
|
+
states: {
|
26
|
+
empty: {
|
27
|
+
title: "No Shops Found",
|
28
|
+
description: "Currently, there are no shops."
|
29
|
+
}
|
30
|
+
},
|
31
|
+
store: {
|
32
|
+
read: (options) => organizations.actions.read(options)
|
33
|
+
},
|
34
|
+
options: {
|
35
|
+
country: vue.unref(route).params.country,
|
36
|
+
state: vue.unref(route).params.state,
|
37
|
+
city: vue.unref(route).params.city,
|
38
|
+
categories: vue.unref(route).query.categories,
|
39
|
+
prices: vue.unref(route).query.prices,
|
40
|
+
delivery: vue.unref(route).query.delivery,
|
41
|
+
location: (_a = globals.state.position) == null ? void 0 : _a.location,
|
42
|
+
lookup: ["products"],
|
43
|
+
contain: ["products"]
|
44
|
+
},
|
45
|
+
class: "rows-1 gap-thin"
|
46
|
+
}, {
|
47
|
+
default: vue.withCtx(({
|
48
|
+
items
|
49
|
+
}) => [
|
50
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(items, (organization) => {
|
51
|
+
return vue.openBlock(), vue.createBlock(CardOrganization.default, {
|
52
|
+
key: organization._id,
|
53
|
+
organization,
|
54
|
+
showRating: true,
|
55
|
+
showFollowers: false,
|
56
|
+
showProducts: true,
|
57
|
+
class: "bg-light w-100 o-hidden radius-big pd-small"
|
58
|
+
}, null, 8, ["organization"]);
|
59
|
+
}), 128))
|
60
|
+
]),
|
61
|
+
_: 1
|
62
|
+
}, 8, ["sort", "filter", "store", "options"]);
|
63
|
+
};
|
64
|
+
}
|
65
|
+
};
|
66
|
+
exports.default = _sfc_main;
|
67
|
+
//# sourceMappingURL=Catalog.vue.cjs.map
|
package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.cjs.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Catalog.vue.cjs","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"{\n \tautofocus:true\n }\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-big pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@pf/src/modules/organizations/store/organizations'\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@pf/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":["useRoute"],"mappings":";;;;;;;;;;;;AA0DC,UAAM,QAAQA,UAAAA,SAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.js
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
import { openBlock, createBlock, unref, withCtx, createElementBlock, Fragment, renderList } from "vue";
|
2
|
+
import { useRoute } from "vue-router";
|
3
|
+
import _sfc_main$1 from "../../../../../components/Feed/Feed.vue.js";
|
4
|
+
import { actions } from "../../../../organizations/store/organizations.js";
|
5
|
+
import { state as state$1 } from "../../../../globals/views/store/globals.js";
|
6
|
+
import _sfc_main$2 from "../../../../organizations/components/blocks/CardOrganization.vue.js";
|
7
|
+
import { state } from "../../store/marketplace.js";
|
8
|
+
const _sfc_main = {
|
9
|
+
__name: "Catalog",
|
10
|
+
setup(__props) {
|
11
|
+
const route = useRoute();
|
12
|
+
return (_ctx, _cache) => {
|
13
|
+
var _a;
|
14
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
15
|
+
sort: state.sort,
|
16
|
+
"onUpdate:sort": _cache[0] || (_cache[0] = ($event) => state.sort = $event),
|
17
|
+
filter: state.filter,
|
18
|
+
"onUpdate:filter": _cache[1] || (_cache[1] = ($event) => state.filter = $event),
|
19
|
+
search: {
|
20
|
+
autofocus: true
|
21
|
+
},
|
22
|
+
showLoadMore: false,
|
23
|
+
states: {
|
24
|
+
empty: {
|
25
|
+
title: "No Shops Found",
|
26
|
+
description: "Currently, there are no shops."
|
27
|
+
}
|
28
|
+
},
|
29
|
+
store: {
|
30
|
+
read: (options) => actions.read(options)
|
31
|
+
},
|
32
|
+
options: {
|
33
|
+
country: unref(route).params.country,
|
34
|
+
state: unref(route).params.state,
|
35
|
+
city: unref(route).params.city,
|
36
|
+
categories: unref(route).query.categories,
|
37
|
+
prices: unref(route).query.prices,
|
38
|
+
delivery: unref(route).query.delivery,
|
39
|
+
location: (_a = state$1.position) == null ? void 0 : _a.location,
|
40
|
+
lookup: ["products"],
|
41
|
+
contain: ["products"]
|
42
|
+
},
|
43
|
+
class: "rows-1 gap-thin"
|
44
|
+
}, {
|
45
|
+
default: withCtx(({
|
46
|
+
items
|
47
|
+
}) => [
|
48
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (organization) => {
|
49
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
50
|
+
key: organization._id,
|
51
|
+
organization,
|
52
|
+
showRating: true,
|
53
|
+
showFollowers: false,
|
54
|
+
showProducts: true,
|
55
|
+
class: "bg-light w-100 o-hidden radius-big pd-small"
|
56
|
+
}, null, 8, ["organization"]);
|
57
|
+
}), 128))
|
58
|
+
]),
|
59
|
+
_: 1
|
60
|
+
}, 8, ["sort", "filter", "store", "options"]);
|
61
|
+
};
|
62
|
+
}
|
63
|
+
};
|
64
|
+
export {
|
65
|
+
_sfc_main as default
|
66
|
+
};
|
67
|
+
//# sourceMappingURL=Catalog.vue.js.map
|
package/dist/prometheus-framework/src/modules/marketplace/views/components/pages/Catalog.vue.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Catalog.vue.js","sources":["../../../../../../../../src/modules/marketplace/views/components/pages/Catalog.vue"],"sourcesContent":["<template>\n\t<Feed\n\t\tv-model:sort=\"marketplace.state.sort\"\n\t\tv-model:filter=\"marketplace.state.filter\"\n :search=\"{\n \tautofocus:true\n }\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Shops Found',\n description: 'Currently, there are no shops.'\n },\n }\"\n :store=\"{\n read: (options) => organization.actions.read(options)\n }\"\n :options=\"{\n country: route.params.country,\n\t state: route.params.state,\n\t city: route.params.city,\n\t categories: route.query.categories,\n\t prices: route.query.prices,\n\t delivery: route.query.delivery,\n\t location: globals.state.position?.location,\n\t lookup: ['products'],\n\t contain: ['products'],\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"rows-1 gap-thin\"\n >\n <CardOrganization \n\t v-for=\"organization in items\" \n\t :key=\"organization._id\"\n\t :organization=\"organization\"\n\t :showRating=\"true\"\n\t :showFollowers=\"false\"\n\t :showProducts=\"true\"\n\t class=\"bg-light w-100 o-hidden radius-big pd-small \"\n\t />\n </Feed>\n</template>\n\n<script setup>\n\timport { computed,reactive,ref, onMounted,watch } from 'vue'\n\timport { useRoute } from 'vue-router'\n\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t\n\timport * as organization from '@pf/src/modules/organizations/store/organizations'\n\timport * as globals from '@pf/src/modules/globals/views/store/globals'\n\n\timport CardOrganization from '@pf/src/modules/organizations/components/blocks/CardOrganization.vue'\n\n\timport * as marketplace from '../../store/marketplace';\n\t\n\tconst route = useRoute()\n</script>\n\n<style lang=\"scss\">\n</style>\n"],"names":[],"mappings":";;;;;;;;;;AA0DC,UAAM,QAAQ,SAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|