@ozdao/prometheus-framework 0.2.202 → 0.2.204
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +25 -16
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +25 -16
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +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/components/Tab/Tab.vue.cjs +51 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +37 -22
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +3 -3
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +9 -8
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +9 -8
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +9 -8
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +9 -8
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +7 -6
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +7 -6
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
- 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/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +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 +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- 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/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/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +4 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +4 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
- 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 +31 -34
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +32 -35
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +110 -103
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +111 -104
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs +85 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js +85 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/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 +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +6 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +5 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +91 -97
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +92 -98
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- 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/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +73 -26
- 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 +82 -35
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- 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 +8 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +8 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +7 -7
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
- package/dist/prometheus-framework.cjs.js +14 -14
- package/dist/prometheus-framework.es.js +2830 -2823
- package/dist/style.css +89 -21
- package/package.json +1 -1
- package/src/components/Feed/Feed.vue +23 -10
- package/src/components/Tab/Tab.vue +10 -7
- package/src/modules/auth/views/components/pages/ResetPassword.vue +5 -4
- package/src/modules/auth/views/components/pages/SignIn.vue +5 -3
- package/src/modules/auth/views/components/pages/SignUp.vue +3 -2
- package/src/modules/globals/globals.client.js +5 -2
- package/src/modules/globals/views/components/layouts/Client.vue +101 -21
- package/src/modules/globals/views/components/partials/Header.vue +18 -29
- package/src/modules/globals/views/components/partials/NavigationBar.vue +1 -18
- package/src/modules/globals/views/components/partials/Sidebar.vue +0 -2
- package/src/modules/marketplace/components/layouts/Marketplace.vue +16 -9
- package/src/modules/orders/components/partials/ShopCart.vue +3 -3
- package/src/modules/organizations/components/pages/Organization.vue +9 -6
- package/src/modules/organizations/components/sections/DetailsTab.vue +132 -133
- package/src/modules/products/components/pages/Products.vue +89 -10
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/products/components/sections/SectionProduct.vue +4 -0
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref, computed, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, withCtx, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
2
2
|
import _sfc_main$4 from "../../../../components/Block/Block.vue.js";
|
3
|
-
import Field from "../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
5
|
-
import Select from "../../../../components/Select/Select.
|
6
|
-
import _sfc_main$1 from "../../../../components/Popup/Popup.
|
5
|
+
import Select from "../../../../components/Select/Select.vue2.js";
|
6
|
+
import _sfc_main$1 from "../../../../components/Popup/Popup.vue2.js";
|
7
7
|
/* empty css */
|
8
8
|
import _sfc_main$5 from "../blocks/CardPosition.vue.js";
|
9
9
|
import _sfc_main$3 from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
@@ -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 vueRouter = require("vue-router");
|
5
|
-
const Tab = require("../../../../components/Tab/Tab.
|
5
|
+
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
6
6
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
7
7
|
const CardLeftover = require("../blocks/CardLeftover.vue.cjs");
|
8
8
|
const leftovers = require("../../store/leftovers.cjs");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, computed, openBlock, createElementBlock, createElementVNode, toDisplayString, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
|
-
import _sfc_main$1 from "../../../../components/Tab/Tab.
|
3
|
+
import _sfc_main$1 from "../../../../components/Tab/Tab.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import CardLeftover from "../blocks/CardLeftover.vue.js";
|
6
6
|
import { state, actions } from "../../store/leftovers.js";
|
@@ -5,11 +5,11 @@ const vueRouter = require("vue-router");
|
|
5
5
|
require("vue-i18n");
|
6
6
|
;/* empty css */
|
7
7
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
8
|
-
;/* empty css
|
9
|
-
const Field = require("../../../../components/Field/Field.
|
8
|
+
;/* empty css */
|
9
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
10
10
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
11
|
-
const Button = require("../../../../components/Button/Button.
|
12
|
-
const Popup = require("../../../../components/Popup/Popup.
|
11
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
12
|
+
const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
|
13
13
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
14
14
|
const EditImages = require("../../../../components/EditImages/EditImages.vue.cjs");
|
15
15
|
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
@@ -3,11 +3,11 @@ import { useRoute, useRouter } from "vue-router";
|
|
3
3
|
import "vue-i18n";
|
4
4
|
/* empty css */
|
5
5
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
6
|
-
/* empty css
|
7
|
-
import Field from "../../../../components/Field/Field.
|
6
|
+
/* empty css */
|
7
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
8
8
|
import _sfc_main$9 from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
10
|
-
import _sfc_main$6 from "../../../../components/Popup/Popup.
|
9
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
10
|
+
import _sfc_main$6 from "../../../../components/Popup/Popup.vue2.js";
|
11
11
|
import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
|
12
12
|
import _sfc_main$3 from "../../../../components/EditImages/EditImages.vue.js";
|
13
13
|
import _sfc_main$a from "../../../icons/navigation/IconDelete.vue.js";
|
@@ -2,39 +2,83 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
|
-
const Tab = require("../../../../components/Tab/Tab.
|
5
|
+
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
6
6
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
7
|
-
|
8
|
-
|
7
|
+
;/* empty css */
|
8
|
+
require("vue-i18n");
|
9
|
+
const categories = require("../../store/categories.cjs");
|
10
|
+
const marketplace = require("../../../marketplace/store/marketplace.cjs");
|
11
|
+
;/* empty css */
|
12
|
+
;/* empty css */
|
13
|
+
const BlockFilter = require("../../../globals/views/components/blocks/BlockFilter.vue.cjs");
|
9
14
|
const CardProduct = require("../blocks/CardProduct.vue.cjs");
|
10
15
|
const auth = require("../../../auth/views/store/auth.cjs");
|
11
16
|
const products = require("../../store/products.cjs");
|
12
|
-
const _hoisted_1 = {
|
13
|
-
const _hoisted_2 = {
|
17
|
+
const _hoisted_1 = {
|
14
18
|
key: 0,
|
15
19
|
class: "mn-b-medium flex-v-center flex-nowrap flex"
|
16
20
|
};
|
17
|
-
const
|
18
|
-
const
|
21
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("h2", { class: "mn-r-medium" }, "Products", -1);
|
22
|
+
const _hoisted_3 = { class: "cols-2-1_3 bg-light pd-thin radius-big gap-thin" };
|
23
|
+
const _hoisted_4 = { class: "rows-1" };
|
19
24
|
const _sfc_main = {
|
20
25
|
__name: "Products",
|
21
26
|
setup(__props) {
|
22
27
|
const route = vueRouter.useRoute();
|
23
28
|
const router = vueRouter.useRouter();
|
24
29
|
const tabProducts = vue.ref(route.query.tabProducts ? route.query.tabProducts : "all");
|
25
|
-
route.query.tabProducts = tabProducts.value;
|
30
|
+
if (route.name !== "Organization") route.query.tabProducts = tabProducts.value;
|
31
|
+
if (route.query) {
|
32
|
+
const query = route.query;
|
33
|
+
marketplace.state.filter.selected.categories = query.categories ? query.categories.split(",") : [];
|
34
|
+
marketplace.state.filter.selected.prices = query.prices ? query.prices.split(",") : [];
|
35
|
+
marketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(",") : [];
|
36
|
+
}
|
26
37
|
vue.watch(tabProducts, (newValue) => {
|
27
|
-
router.replace({ query: { ...route.query, tabProducts: newValue } });
|
38
|
+
if (route.name !== "Organization") router.replace({ query: { ...route.query, tabProducts: newValue } });
|
39
|
+
});
|
40
|
+
vue.onMounted(async () => {
|
41
|
+
let categoriesFilter = await categories.actions.fetchCategories();
|
42
|
+
categoriesFilter = categoriesFilter.map((category) => ({
|
43
|
+
value: category.url,
|
44
|
+
label: category.name
|
45
|
+
}));
|
46
|
+
const index = marketplace.state.filter.options.findIndex((option) => option.value === "categories");
|
47
|
+
const categoryOption = {
|
48
|
+
title: "Categories",
|
49
|
+
value: "categories",
|
50
|
+
options: categoriesFilter
|
51
|
+
};
|
52
|
+
if (index !== -1) {
|
53
|
+
marketplace.state.filter.options[index] = categoryOption;
|
54
|
+
} else {
|
55
|
+
marketplace.state.filter.options.unshift(categoryOption);
|
56
|
+
}
|
28
57
|
});
|
29
|
-
|
58
|
+
vue.watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {
|
30
59
|
let query = { ...route.query };
|
31
|
-
query.
|
32
|
-
|
33
|
-
|
60
|
+
query.sortParam = newSortValue.param;
|
61
|
+
query.sortOrder = newSortValue.order;
|
62
|
+
router.replace({ query });
|
63
|
+
}, { deep: true });
|
64
|
+
vue.watch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {
|
65
|
+
const query = { ...route.query };
|
66
|
+
Object.keys(oldFilterValue).forEach((key) => {
|
67
|
+
if (query[key]) {
|
68
|
+
delete query[key];
|
69
|
+
}
|
70
|
+
});
|
71
|
+
const newQueryValues = Object.fromEntries(
|
72
|
+
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
73
|
+
);
|
74
|
+
delete query.options;
|
75
|
+
Object.assign(query, newQueryValues);
|
76
|
+
router.replace({ query });
|
77
|
+
}, { deep: true });
|
34
78
|
return (_ctx, _cache) => {
|
35
|
-
return vue.openBlock(), vue.createElementBlock("div",
|
36
|
-
vue.unref(route).name !== "Organization" ? (vue.openBlock(), vue.createElementBlock("header",
|
37
|
-
|
79
|
+
return vue.openBlock(), vue.createElementBlock("div", null, [
|
80
|
+
vue.unref(route).name !== "Organization" ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_1, [
|
81
|
+
_hoisted_2,
|
38
82
|
vue.createElementVNode("button", {
|
39
83
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({
|
40
84
|
name: "ProductAdd"
|
@@ -54,15 +98,18 @@ const _sfc_main = {
|
|
54
98
|
],
|
55
99
|
class: "mn-b-small o-hidden h5 radius-big bg-light"
|
56
100
|
}, null, 8, ["selected"])) : vue.createCommentVNode("", true),
|
57
|
-
vue.createElementVNode("div",
|
58
|
-
vue.createVNode(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
101
|
+
vue.createElementVNode("div", _hoisted_3, [
|
102
|
+
vue.createVNode(BlockFilter.default, {
|
103
|
+
filter: marketplace.state.filter,
|
104
|
+
"onUpdate:filter": _cache[2] || (_cache[2] = ($event) => marketplace.state.filter = $event),
|
105
|
+
options: marketplace.state.filter.options,
|
106
|
+
class: "h-100 w-100 desktop-only"
|
107
|
+
}, null, 8, ["filter", "options"]),
|
108
|
+
vue.createElementVNode("div", _hoisted_4, [
|
65
109
|
vue.createVNode(Feed.default, {
|
110
|
+
filter: marketplace.state.filter,
|
111
|
+
"onUpdate:filter": _cache[3] || (_cache[3] = ($event) => marketplace.state.filter = $event),
|
112
|
+
search: true,
|
66
113
|
states: {
|
67
114
|
empty: {
|
68
115
|
title: "No Products Found",
|
@@ -79,7 +126,7 @@ const _sfc_main = {
|
|
79
126
|
categories: vue.unref(route).query.categories,
|
80
127
|
prices: vue.unref(route).query.prices,
|
81
128
|
delivery: vue.unref(route).query.delivery,
|
82
|
-
search:
|
129
|
+
// search: route.query.search,
|
83
130
|
...tabProducts.value !== "all" && { status: tabProducts.value }
|
84
131
|
// user: user
|
85
132
|
},
|
@@ -105,7 +152,7 @@ const _sfc_main = {
|
|
105
152
|
}), 128))
|
106
153
|
]),
|
107
154
|
_: 1
|
108
|
-
}, 8, ["store", "options"])
|
155
|
+
}, 8, ["filter", "store", "options"])
|
109
156
|
])
|
110
157
|
])
|
111
158
|
]);
|
package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Products.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div
|
1
|
+
{"version":3,"file":"Products.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div>\n <header \n v-if=\"route.name !== 'Organization'\"\n class=\"mn-b-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Products</h2>\n <button \n @click=\"$router.push({\n name: 'ProductAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <Tab \n v-if=\"route.name !== 'Organization'\"\n v-model:selected=\"tabProducts\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Published', value: 'published' },\n { name: 'Unpublished', value: 'unpublished' }, \n { name: 'Archivied', value: 'archivied' } \n ]\"\n class=\"mn-b-small o-hidden h5 radius-big bg-light\"\n />\n\n <div class=\"cols-2-1_3 bg-light pd-thin radius-big gap-thin\">\n\n <BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 desktop-only\"\n />\n\n\n <div class=\"rows-1\">\n <!-- <BlockSearch \n @search=\"updateSearch\"\n placeholder=\"Enter product name\"\n class=\"bg-white mn-b-thin\"\n /> -->\n <Feed\n v-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: products.state\n }\"\n :options=\"{\n limit: 15,\n organization: route.params._id,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n // search: route.query.search,\n ...(tabProducts !== 'all' && { status: tabProducts })\n // user: user\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-4 gap-thin\"\n >\n <CardProduct\n v-for=\"product in items\"\n :key=\"product._id\"\n :product=\"product\"\n :user=\"auth.state.access\"\n class=\"h-max\"\n @click.capture=\"$router.push({\n name: 'Product Organization', \n params: { \n _id: route.params._id, \n product: product._id \n } \n })\" \n />\n </Feed>\n </div>\n </div>\n</div>\n</template>\n\n\n<script setup=\"props\">\n // Import libs\n import { computed, watch, onMounted, ref } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import FilterProducts from '@pf/src/modules/products/components/sections/FilterProducts.vue'\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n import BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'\n\n // Accessing router and store\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as products from '@pf/src/modules/products/store/products';\n import * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n import * as categories from '@pf/src/modules/products/store/categories';\n\n const route = useRoute()\n const router = useRouter()\n\n // Tab logic\n const tabProducts = ref(route.query.tabProducts ? route.query.tabProducts : 'all')\n\n if (route.name !== 'Organization') route.query.tabProducts = tabProducts.value\n \n if (route.query) {\n const query = route.query;\n\n marketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n marketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n marketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n }\n\n\n watch(tabProducts, (newValue) => {\n if (route.name !== 'Organization') router.replace({ query: { ...route.query, tabProducts: newValue } });\n });\n\n onMounted(async () => {\n let categoriesFilter = await categories.actions.fetchCategories();\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 })\n\n watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n let query = { ...route.query}\n \n query.sortParam = newSortValue.param\n query.sortOrder = newSortValue.order\n \n // replace the current route\n router.replace({ query });\n }, { deep: true });\n\n\n watch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n // Переводим фильтр в формат query\n const query = { ...route.query };\n\n // Удаляем старые значения фильтра из query\n Object.keys(oldFilterValue).forEach(key => {\n if (query[key]) {\n delete query[key];\n }\n });\n\n // Добавляем новые значения фильтра в query\n const newQueryValues = Object.fromEntries(\n Object.entries(newFilterValue)\n .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n .map(([key, value]) => [key, value.join(',')])\n );\n\n delete query.options;\n Object.assign(query, newQueryValues);\n\n // Обновляем маршрут с новым query\n router.replace({ query });\n }, { deep: true })\n\n\n\n \n function updateSearch(search) {\n let query = { ...route.query}\n \n query.search = search\n \n router.replace({ query });\n }\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","marketplace.state","watch","onMounted","categories.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiHE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAG1B,UAAM,cAAcC,QAAI,MAAM,MAAM,cAAc,MAAM,MAAM,cAAc,KAAK;AAEjF,QAAI,MAAM,SAAS,eAAgB,OAAM,MAAM,cAAc,YAAY;AAEzE,QAAI,MAAM,OAAO;AACf,YAAM,QAAQ,MAAM;AAEpBC,kBAAAA,MAAkB,OAAO,SAAS,aAAa,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAA;AAChGA,kBAAAA,MAAkB,OAAO,SAAS,SAAS,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG,IAAI,CAAA;AACpFA,kBAAAA,MAAkB,OAAO,SAAS,WAAW,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG,IAAI,CAAA;AAAA,IAC3F;AAGDC,cAAM,aAAa,CAAC,aAAa;AAC/B,UAAI,MAAM,SAAS,eAAgB,QAAO,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,OAAO,aAAa,SAAQ,EAAI,CAAA;AAAA,IAC1G,CAAG;AAEDC,QAAAA,UAAU,YAAY;AACpB,UAAI,mBAAmB,MAAMC,mBAAmB;AAEhD,yBAAmB,iBAAiB,IAAI,eAAa;AAAA,QACnD,OAAO,SAAS;AAAA,QAChB,OAAO,SAAS;AAAA,MACjB,EAAC;AAEF,YAAM,QAAQH,kBAAkB,OAAO,QAAQ,UAAU,YAAU,OAAO,UAAU,YAAY;AAEhG,YAAM,iBAAiB;AAAA,QACrB,OAAO;AAAA,QACP,OAAO;AAAA,QACP,SAAS;AAAA,MACf;AAEI,UAAI,UAAU,IAAI;AACdA,oBAAAA,MAAkB,OAAO,QAAQ,KAAK,IAAI;AAAA,MAClD,OAAW;AACHA,oBAAAA,MAAkB,OAAO,QAAQ,QAAQ,cAAc;AAAA,MAC1D;AAAA,IACL,CAAG;AAEDC,QAAAA,MAAM,MAAMD,YAAiB,MAAC,MAAM,CAAC,cAAc,iBAAiB;AAClE,UAAI,QAAQ,EAAE,GAAG,MAAM,MAAK;AAE5B,YAAM,YAAY,aAAa;AAC/B,YAAM,YAAY,aAAa;AAG/B,aAAO,QAAQ,EAAE,MAAK,CAAE;AAAA,IAC5B,GAAK,EAAE,MAAM,KAAI,CAAE;AAGjBC,QAAK,MAAC,MAAMD,YAAAA,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,MACP,CAAK;AAGD,YAAM,iBAAiB,OAAO;AAAA,QAC5B,OAAO,QAAQ,cAAc,EAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,CAAC,EACjE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC;AAAA,MACrD;AAEI,aAAO,MAAM;AACb,aAAO,OAAO,OAAO,cAAc;AAGnC,aAAO,QAAQ,EAAE,MAAK,CAAE;AAAA,IAC5B,GAAK,EAAE,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,38 +1,82 @@
|
|
1
|
-
import { ref, watch, openBlock, createElementBlock, unref, createElementVNode, createCommentVNode, createBlock, createVNode, withCtx, Fragment, renderList } from "vue";
|
1
|
+
import { ref, watch, onMounted, openBlock, createElementBlock, unref, createElementVNode, createCommentVNode, createBlock, createVNode, withCtx, Fragment, renderList } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
|
-
import _sfc_main$1 from "../../../../components/Tab/Tab.
|
4
|
-
import _sfc_main$
|
5
|
-
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { state
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
import _sfc_main$1 from "../../../../components/Tab/Tab.vue.js";
|
4
|
+
import _sfc_main$3 from "../../../../components/Feed/Feed.vue.js";
|
5
|
+
/* empty css */
|
6
|
+
import "vue-i18n";
|
7
|
+
import { actions } from "../../store/categories.js";
|
8
|
+
import { state } from "../../../marketplace/store/marketplace.js";
|
9
|
+
/* empty css */
|
10
|
+
/* empty css */
|
11
|
+
import _sfc_main$2 from "../../../globals/views/components/blocks/BlockFilter.vue.js";
|
12
|
+
import _sfc_main$4 from "../blocks/CardProduct.vue.js";
|
13
|
+
import { state as state$2 } from "../../../auth/views/store/auth.js";
|
14
|
+
import { actions as actions$1, state as state$1 } from "../../store/products.js";
|
15
|
+
const _hoisted_1 = {
|
12
16
|
key: 0,
|
13
17
|
class: "mn-b-medium flex-v-center flex-nowrap flex"
|
14
18
|
};
|
15
|
-
const
|
16
|
-
const
|
19
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("h2", { class: "mn-r-medium" }, "Products", -1);
|
20
|
+
const _hoisted_3 = { class: "cols-2-1_3 bg-light pd-thin radius-big gap-thin" };
|
21
|
+
const _hoisted_4 = { class: "rows-1" };
|
17
22
|
const _sfc_main = {
|
18
23
|
__name: "Products",
|
19
24
|
setup(__props) {
|
20
25
|
const route = useRoute();
|
21
26
|
const router = useRouter();
|
22
27
|
const tabProducts = ref(route.query.tabProducts ? route.query.tabProducts : "all");
|
23
|
-
route.query.tabProducts = tabProducts.value;
|
28
|
+
if (route.name !== "Organization") route.query.tabProducts = tabProducts.value;
|
29
|
+
if (route.query) {
|
30
|
+
const query = route.query;
|
31
|
+
state.filter.selected.categories = query.categories ? query.categories.split(",") : [];
|
32
|
+
state.filter.selected.prices = query.prices ? query.prices.split(",") : [];
|
33
|
+
state.filter.selected.delivery = query.delivery ? query.delivery.split(",") : [];
|
34
|
+
}
|
24
35
|
watch(tabProducts, (newValue) => {
|
25
|
-
router.replace({ query: { ...route.query, tabProducts: newValue } });
|
36
|
+
if (route.name !== "Organization") router.replace({ query: { ...route.query, tabProducts: newValue } });
|
37
|
+
});
|
38
|
+
onMounted(async () => {
|
39
|
+
let categoriesFilter = await actions.fetchCategories();
|
40
|
+
categoriesFilter = categoriesFilter.map((category) => ({
|
41
|
+
value: category.url,
|
42
|
+
label: category.name
|
43
|
+
}));
|
44
|
+
const index = state.filter.options.findIndex((option) => option.value === "categories");
|
45
|
+
const categoryOption = {
|
46
|
+
title: "Categories",
|
47
|
+
value: "categories",
|
48
|
+
options: categoriesFilter
|
49
|
+
};
|
50
|
+
if (index !== -1) {
|
51
|
+
state.filter.options[index] = categoryOption;
|
52
|
+
} else {
|
53
|
+
state.filter.options.unshift(categoryOption);
|
54
|
+
}
|
26
55
|
});
|
27
|
-
|
56
|
+
watch(() => state.sort, (newSortValue, oldSortValue) => {
|
28
57
|
let query = { ...route.query };
|
29
|
-
query.
|
30
|
-
|
31
|
-
|
58
|
+
query.sortParam = newSortValue.param;
|
59
|
+
query.sortOrder = newSortValue.order;
|
60
|
+
router.replace({ query });
|
61
|
+
}, { deep: true });
|
62
|
+
watch(() => state.filter.selected, (newFilterValue, oldFilterValue) => {
|
63
|
+
const query = { ...route.query };
|
64
|
+
Object.keys(oldFilterValue).forEach((key) => {
|
65
|
+
if (query[key]) {
|
66
|
+
delete query[key];
|
67
|
+
}
|
68
|
+
});
|
69
|
+
const newQueryValues = Object.fromEntries(
|
70
|
+
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
71
|
+
);
|
72
|
+
delete query.options;
|
73
|
+
Object.assign(query, newQueryValues);
|
74
|
+
router.replace({ query });
|
75
|
+
}, { deep: true });
|
32
76
|
return (_ctx, _cache) => {
|
33
|
-
return openBlock(), createElementBlock("div",
|
34
|
-
unref(route).name !== "Organization" ? (openBlock(), createElementBlock("header",
|
35
|
-
|
77
|
+
return openBlock(), createElementBlock("div", null, [
|
78
|
+
unref(route).name !== "Organization" ? (openBlock(), createElementBlock("header", _hoisted_1, [
|
79
|
+
_hoisted_2,
|
36
80
|
createElementVNode("button", {
|
37
81
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({
|
38
82
|
name: "ProductAdd"
|
@@ -52,15 +96,18 @@ const _sfc_main = {
|
|
52
96
|
],
|
53
97
|
class: "mn-b-small o-hidden h5 radius-big bg-light"
|
54
98
|
}, null, 8, ["selected"])) : createCommentVNode("", true),
|
55
|
-
createElementVNode("div",
|
56
|
-
createVNode(_sfc_main$2
|
57
|
-
|
99
|
+
createElementVNode("div", _hoisted_3, [
|
100
|
+
createVNode(_sfc_main$2, {
|
101
|
+
filter: state.filter,
|
102
|
+
"onUpdate:filter": _cache[2] || (_cache[2] = ($event) => state.filter = $event),
|
103
|
+
options: state.filter.options,
|
104
|
+
class: "h-100 w-100 desktop-only"
|
105
|
+
}, null, 8, ["filter", "options"]),
|
106
|
+
createElementVNode("div", _hoisted_4, [
|
58
107
|
createVNode(_sfc_main$3, {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
}),
|
63
|
-
createVNode(_sfc_main$4, {
|
108
|
+
filter: state.filter,
|
109
|
+
"onUpdate:filter": _cache[3] || (_cache[3] = ($event) => state.filter = $event),
|
110
|
+
search: true,
|
64
111
|
states: {
|
65
112
|
empty: {
|
66
113
|
title: "No Products Found",
|
@@ -68,8 +115,8 @@ const _sfc_main = {
|
|
68
115
|
}
|
69
116
|
},
|
70
117
|
store: {
|
71
|
-
read: (options) => actions.read(options),
|
72
|
-
state
|
118
|
+
read: (options) => actions$1.read(options),
|
119
|
+
state: state$1
|
73
120
|
},
|
74
121
|
options: {
|
75
122
|
limit: 15,
|
@@ -77,7 +124,7 @@ const _sfc_main = {
|
|
77
124
|
categories: unref(route).query.categories,
|
78
125
|
prices: unref(route).query.prices,
|
79
126
|
delivery: unref(route).query.delivery,
|
80
|
-
search:
|
127
|
+
// search: route.query.search,
|
81
128
|
...tabProducts.value !== "all" && { status: tabProducts.value }
|
82
129
|
// user: user
|
83
130
|
},
|
@@ -87,10 +134,10 @@ const _sfc_main = {
|
|
87
134
|
items
|
88
135
|
}) => [
|
89
136
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (product) => {
|
90
|
-
return openBlock(), createBlock(_sfc_main$
|
137
|
+
return openBlock(), createBlock(_sfc_main$4, {
|
91
138
|
key: product._id,
|
92
139
|
product,
|
93
|
-
user: state$
|
140
|
+
user: state$2.access,
|
94
141
|
class: "h-max",
|
95
142
|
onClickCapture: ($event) => _ctx.$router.push({
|
96
143
|
name: "Product Organization",
|
@@ -103,7 +150,7 @@ const _sfc_main = {
|
|
103
150
|
}), 128))
|
104
151
|
]),
|
105
152
|
_: 1
|
106
|
-
}, 8, ["store", "options"])
|
153
|
+
}, 8, ["filter", "store", "options"])
|
107
154
|
])
|
108
155
|
])
|
109
156
|
]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Products.vue.js","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div
|
1
|
+
{"version":3,"file":"Products.vue.js","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div>\n <header \n v-if=\"route.name !== 'Organization'\"\n class=\"mn-b-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Products</h2>\n <button \n @click=\"$router.push({\n name: 'ProductAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <Tab \n v-if=\"route.name !== 'Organization'\"\n v-model:selected=\"tabProducts\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Published', value: 'published' },\n { name: 'Unpublished', value: 'unpublished' }, \n { name: 'Archivied', value: 'archivied' } \n ]\"\n class=\"mn-b-small o-hidden h5 radius-big bg-light\"\n />\n\n <div class=\"cols-2-1_3 bg-light pd-thin radius-big gap-thin\">\n\n <BlockFilter\n v-model:filter=\"marketplace.state.filter\"\n :options=\"marketplace.state.filter.options\"\n class=\"h-100 w-100 desktop-only\"\n />\n\n\n <div class=\"rows-1\">\n <!-- <BlockSearch \n @search=\"updateSearch\"\n placeholder=\"Enter product name\"\n class=\"bg-white mn-b-thin\"\n /> -->\n <Feed\n v-model:filter=\"marketplace.state.filter\"\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: products.state\n }\"\n :options=\"{\n limit: 15,\n organization: route.params._id,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n // search: route.query.search,\n ...(tabProducts !== 'all' && { status: tabProducts })\n // user: user\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-4 gap-thin\"\n >\n <CardProduct\n v-for=\"product in items\"\n :key=\"product._id\"\n :product=\"product\"\n :user=\"auth.state.access\"\n class=\"h-max\"\n @click.capture=\"$router.push({\n name: 'Product Organization', \n params: { \n _id: route.params._id, \n product: product._id \n } \n })\" \n />\n </Feed>\n </div>\n </div>\n</div>\n</template>\n\n\n<script setup=\"props\">\n // Import libs\n import { computed, watch, onMounted, ref } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import FilterProducts from '@pf/src/modules/products/components/sections/FilterProducts.vue'\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n import BlockFilter from '@pf/src/modules/globals/views/components/blocks/BlockFilter.vue'\n\n import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'\n\n // Accessing router and store\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as products from '@pf/src/modules/products/store/products';\n import * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n import * as categories from '@pf/src/modules/products/store/categories';\n\n const route = useRoute()\n const router = useRouter()\n\n // Tab logic\n const tabProducts = ref(route.query.tabProducts ? route.query.tabProducts : 'all')\n\n if (route.name !== 'Organization') route.query.tabProducts = tabProducts.value\n \n if (route.query) {\n const query = route.query;\n\n marketplace.state.filter.selected.categories = query.categories ? query.categories.split(',') : [];\n marketplace.state.filter.selected.prices = query.prices ? query.prices.split(',') : [];\n marketplace.state.filter.selected.delivery = query.delivery ? query.delivery.split(',') : [];\n }\n\n\n watch(tabProducts, (newValue) => {\n if (route.name !== 'Organization') router.replace({ query: { ...route.query, tabProducts: newValue } });\n });\n\n onMounted(async () => {\n let categoriesFilter = await categories.actions.fetchCategories();\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 })\n\n watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {\n let query = { ...route.query}\n \n query.sortParam = newSortValue.param\n query.sortOrder = newSortValue.order\n \n // replace the current route\n router.replace({ query });\n }, { deep: true });\n\n\n watch(() => marketplace.state.filter.selected, (newFilterValue, oldFilterValue) => {\n // Переводим фильтр в формат query\n const query = { ...route.query };\n\n // Удаляем старые значения фильтра из query\n Object.keys(oldFilterValue).forEach(key => {\n if (query[key]) {\n delete query[key];\n }\n });\n\n // Добавляем новые значения фильтра в query\n const newQueryValues = Object.fromEntries(\n Object.entries(newFilterValue)\n .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n .map(([key, value]) => [key, value.join(',')])\n );\n\n delete query.options;\n Object.assign(query, newQueryValues);\n\n // Обновляем маршрут с новым query\n router.replace({ query });\n }, { deep: true })\n\n\n\n \n function updateSearch(search) {\n let query = { ...route.query}\n \n query.search = search\n \n router.replace({ query });\n }\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["marketplace.state","categories.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiHE,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAG1B,UAAM,cAAc,IAAI,MAAM,MAAM,cAAc,MAAM,MAAM,cAAc,KAAK;AAEjF,QAAI,MAAM,SAAS,eAAgB,OAAM,MAAM,cAAc,YAAY;AAEzE,QAAI,MAAM,OAAO;AACf,YAAM,QAAQ,MAAM;AAEpBA,YAAkB,OAAO,SAAS,aAAa,MAAM,aAAa,MAAM,WAAW,MAAM,GAAG,IAAI,CAAA;AAChGA,YAAkB,OAAO,SAAS,SAAS,MAAM,SAAS,MAAM,OAAO,MAAM,GAAG,IAAI,CAAA;AACpFA,YAAkB,OAAO,SAAS,WAAW,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG,IAAI,CAAA;AAAA,IAC3F;AAGD,UAAM,aAAa,CAAC,aAAa;AAC/B,UAAI,MAAM,SAAS,eAAgB,QAAO,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,OAAO,aAAa,SAAQ,EAAI,CAAA;AAAA,IAC1G,CAAG;AAED,cAAU,YAAY;AACpB,UAAI,mBAAmB,MAAMC,QAAmB;AAEhD,yBAAmB,iBAAiB,IAAI,eAAa;AAAA,QACnD,OAAO,SAAS;AAAA,QAChB,OAAO,SAAS;AAAA,MACjB,EAAC;AAEF,YAAM,QAAQD,MAAkB,OAAO,QAAQ,UAAU,YAAU,OAAO,UAAU,YAAY;AAEhG,YAAM,iBAAiB;AAAA,QACrB,OAAO;AAAA,QACP,OAAO;AAAA,QACP,SAAS;AAAA,MACf;AAEI,UAAI,UAAU,IAAI;AACdA,cAAkB,OAAO,QAAQ,KAAK,IAAI;AAAA,MAClD,OAAW;AACHA,cAAkB,OAAO,QAAQ,QAAQ,cAAc;AAAA,MAC1D;AAAA,IACL,CAAG;AAED,UAAM,MAAMA,MAAkB,MAAM,CAAC,cAAc,iBAAiB;AAClE,UAAI,QAAQ,EAAE,GAAG,MAAM,MAAK;AAE5B,YAAM,YAAY,aAAa;AAC/B,YAAM,YAAY,aAAa;AAG/B,aAAO,QAAQ,EAAE,MAAK,CAAE;AAAA,IAC5B,GAAK,EAAE,MAAM,KAAI,CAAE;AAGjB,UAAM,MAAMA,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,MACP,CAAK;AAGD,YAAM,iBAAiB,OAAO;AAAA,QAC5B,OAAO,QAAQ,cAAc,EAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,CAAC,EACjE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC;AAAA,MACrD;AAEI,aAAO,MAAM;AACb,aAAO,OAAO,OAAO,cAAc;AAGnC,aAAO,QAAQ,EAAE,MAAK,CAAE;AAAA,IAC5B,GAAK,EAAE,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.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
|
-
const Field = require("../../../../components/Field/Field.
|
4
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
5
5
|
const _hoisted_1 = {
|
6
6
|
key: 0,
|
7
7
|
class: "mn-b-small w-100"
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { toRefs, openBlock, createElementBlock, unref, createCommentVNode, Fragment, renderList, createElementVNode, createVNode } from "vue";
|
2
|
-
import Field from "../../../../components/Field/Field.
|
2
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
3
3
|
const _hoisted_1 = {
|
4
4
|
key: 0,
|
5
5
|
class: "mn-b-small w-100"
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
;/* empty css */
|
5
|
-
;/* empty css
|
6
|
-
const Field = require("../../../../components/Field/Field.
|
7
|
-
const Select = require("../../../../components/Select/Select.
|
5
|
+
;/* empty css */
|
6
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
7
|
+
const Select = require("../../../../components/Select/Select.vue2.cjs");
|
8
8
|
const _sfc_main = {
|
9
9
|
__name: "EditProductInfo",
|
10
10
|
props: {
|
package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { openBlock, createElementBlock, Fragment, createVNode, withCtx } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
4
|
-
import Field from "../../../../components/Field/Field.
|
5
|
-
import Select from "../../../../components/Select/Select.
|
3
|
+
/* empty css */
|
4
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
5
|
+
import Select from "../../../../components/Select/Select.vue2.js";
|
6
6
|
const _sfc_main = {
|
7
7
|
__name: "EditProductInfo",
|
8
8
|
props: {
|
package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs
CHANGED
@@ -61,7 +61,7 @@ const _sfc_main = {
|
|
61
61
|
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
62
62
|
);
|
63
63
|
Object.assign(query, newQueryValues);
|
64
|
-
router.
|
64
|
+
router.repalce({ query });
|
65
65
|
}, { deep: true });
|
66
66
|
vue.onMounted(async () => {
|
67
67
|
await categories.actions.fetchCategories(options);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FilterProducts.vue.cjs","sources":["../../../../../../../src/modules/products/components/sections/FilterProducts.vue"],"sourcesContent":[" <template>\n <div class=\"pd-medium bg-light radius-big\">\n <!-- Categories Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"true\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">{{ t('categoriesTitle') }}</p>\n <!-- SVG Icon -->\n </template>\n <template #content>\n <Checkbox \n v-for=\"(category, index) in categories.state.all\"\n :key=\"index\"\n :label=\"category.name\"\n :value=\"category.url\"\n class=\"w-100 mn-t-small mn-b-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.categories\"\n @update:radio=\"event => marketplace.state.filter.categories = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-small t-transp\">\n\n <!-- Prices Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"false\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">{{ t('filters.price.title') }}</p>\n <!-- SVG Icon -->\n </template>\n <template #content>\n <Checkbox \n v-for=\"(price, index) in prices\"\n :key=\"index\"\n :label=\"price.label\"\n :value=\"price.value\"\n class=\"w-100 mn-t-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.prices\"\n @update:radio=\"event => marketplace.state.filter.prices = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-small\">\n\n <!-- Delivery Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"false\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">Delivery</p>\n </template>\n <template #content>\n <Checkbox \n v-for=\"(deliveryOption, index) in deliveryOptions\"\n :key=\"index\"\n :label=\"deliveryOption.label\"\n :value=\"deliveryOption.value\"\n class=\"w-100 mn-t-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.delivery\"\n @update:radio=\"event => marketplace.state.filter.delivery = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-semi\">\n\n <!-- Reset filter -->\n <button @click=\"resetFilters\" class=\"bg-main w-100 button\">{{ t('filters.reset') }}</button>\n </div>\n </template>\n\n<script setup>\nimport { ref, watch, onMounted } from 'vue'\n\nimport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\"\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\"\n\nimport { useI18n } from 'vue-i18n'\nimport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\nconst route = useRoute()\nconst router = useRouter()\n\nimport * as categories from '@pf/src/modules/products/store/categories';\nimport * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n\nlet options = {\n status: 'published'\n}\n\nlet selectedFilters = ref({\n categories: [],\n prices: [],\n delivery: [],\n extra: []\n})\n\n// Пропсы и данные, которые вы передаёте в компонент\nconst props = defineProps({\n selectedFilters: Object,\n prices: {\n type: Array,\n default: () => [\n { label: 'Under 300฿', value: '<300' },\n { label: '300฿ to 600฿', value: '300-600' },\n { label: '600฿ to 1200฿', value: '600-1200' },\n { label: '$1200 and above', value: '>1200' }\n ]\n },\n deliveryOptions: {\n type: Array,\n default: () => [\n { label: 'Pickup', value: { min: 0, max: 25 } },\n { label: 'Courier', value: { min: 25, max: 50 } },\n { label: 'Post', value: { min: 50, max: 100 } }\n ]\n }\n})\n\nwatch(() => marketplace.state.filter, (newFilterValue, oldFilterValue) => {\n // Переводим фильтр в формат query\n const query = { ...route.query };\n\n // Удаляем старые значения фильтра из query\n Object.keys(oldFilterValue).forEach(key => {\n if (query[key]) {\n delete query[key];\n }\n });\n\n // Добавляем новые значения фильтра в query\n const newQueryValues = Object.fromEntries(\n Object.entries(newFilterValue)\n .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n .map(([key, value]) => [key, value.join(',')])\n );\n Object.assign(query, newQueryValues);\n\n // Обновляем маршрут с новым query\n router.
|
1
|
+
{"version":3,"file":"FilterProducts.vue.cjs","sources":["../../../../../../../src/modules/products/components/sections/FilterProducts.vue"],"sourcesContent":[" <template>\n <div class=\"pd-medium bg-light radius-big\">\n <!-- Categories Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"true\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">{{ t('categoriesTitle') }}</p>\n <!-- SVG Icon -->\n </template>\n <template #content>\n <Checkbox \n v-for=\"(category, index) in categories.state.all\"\n :key=\"index\"\n :label=\"category.name\"\n :value=\"category.url\"\n class=\"w-100 mn-t-small mn-b-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.categories\"\n @update:radio=\"event => marketplace.state.filter.categories = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-small t-transp\">\n\n <!-- Prices Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"false\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">{{ t('filters.price.title') }}</p>\n <!-- SVG Icon -->\n </template>\n <template #content>\n <Checkbox \n v-for=\"(price, index) in prices\"\n :key=\"index\"\n :label=\"price.label\"\n :value=\"price.value\"\n class=\"w-100 mn-t-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.prices\"\n @update:radio=\"event => marketplace.state.filter.prices = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-small\">\n\n <!-- Delivery Filter -->\n <Spoiler \n class=\"radius-small o-hidden mn-b-small\"\n :status=\"false\"\n >\n <template #header>\n <p class=\"cursor-pointer mn-r-auto t-medium p-big\">Delivery</p>\n </template>\n <template #content>\n <Checkbox \n v-for=\"(deliveryOption, index) in deliveryOptions\"\n :key=\"index\"\n :label=\"deliveryOption.label\"\n :value=\"deliveryOption.value\"\n class=\"w-100 mn-t-small bg-white radius-small pd-small\"\n :radio=\"marketplace.state.filter.delivery\"\n @update:radio=\"event => marketplace.state.filter.delivery = event\"\n />\n </template>\n </Spoiler>\n\n <hr class=\"mn-b-semi\">\n\n <!-- Reset filter -->\n <button @click=\"resetFilters\" class=\"bg-main w-100 button\">{{ t('filters.reset') }}</button>\n </div>\n </template>\n\n<script setup>\nimport { ref, watch, onMounted } from 'vue'\n\nimport Spoiler from \"@pf/src/components/Spoiler/Spoiler.vue\"\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\"\n\nimport { useI18n } from 'vue-i18n'\nimport { useRoute, useRouter,onBeforeRouteLeave } from 'vue-router'\n\nconst route = useRoute()\nconst router = useRouter()\n\nimport * as categories from '@pf/src/modules/products/store/categories';\nimport * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n\nlet options = {\n status: 'published'\n}\n\nlet selectedFilters = ref({\n categories: [],\n prices: [],\n delivery: [],\n extra: []\n})\n\n// Пропсы и данные, которые вы передаёте в компонент\nconst props = defineProps({\n selectedFilters: Object,\n prices: {\n type: Array,\n default: () => [\n { label: 'Under 300฿', value: '<300' },\n { label: '300฿ to 600฿', value: '300-600' },\n { label: '600฿ to 1200฿', value: '600-1200' },\n { label: '$1200 and above', value: '>1200' }\n ]\n },\n deliveryOptions: {\n type: Array,\n default: () => [\n { label: 'Pickup', value: { min: 0, max: 25 } },\n { label: 'Courier', value: { min: 25, max: 50 } },\n { label: 'Post', value: { min: 50, max: 100 } }\n ]\n }\n})\n\nwatch(() => marketplace.state.filter, (newFilterValue, oldFilterValue) => {\n // Переводим фильтр в формат query\n const query = { ...route.query };\n\n // Удаляем старые значения фильтра из query\n Object.keys(oldFilterValue).forEach(key => {\n if (query[key]) {\n delete query[key];\n }\n });\n\n // Добавляем новые значения фильтра в query\n const newQueryValues = Object.fromEntries(\n Object.entries(newFilterValue)\n .filter(([key, value]) => Array.isArray(value) && value.length > 0)\n .map(([key, value]) => [key, value.join(',')])\n );\n Object.assign(query, newQueryValues);\n\n // Обновляем маршрут с новым query\n router.repalce({ query });\n}, { deep: true })\n\nonMounted(async () => {\n await categories.actions.fetchCategories(options)\n \n if (route.query) {\n const query = route.query;\n const newFilterValue = {\n categories: query.categories ? query.categories.split(',') : [],\n prices: query.prices ? query.prices.split(',') : [],\n delivery: query.delivery ? query.delivery.split(',') : [],\n // Продолжайте этот паттерн для остальных полей фильтра\n };\n marketplace.state.filter.innerHTML = newFilterValue;\n }\n})\n\nconst emit = defineEmits(['updateFilters', 'resetFilters'])\n\nconst emitFilterChange = (filterType, value) => {\n emit('updateFilters', { filterType, value })\n}\n\nconst resetFilters = () => {\n emit('resetFilters')\n}\nconst text = {\n locale: 'en',\n messages: {\n en: {\n categoriesTitle: 'Category',\n categories: [],\n filters: {\n title: 'Filters',\n price: {\n title: 'Price',\n from: 'From',\n to: 'To'\n },\n filters: [],\n reset: 'Reset Filters'\n }\n },\n ru: {\n categoriesTitle: 'Категория',\n categories: [],\n filters: {\n title: 'Фильтры',\n price: {\n title: 'Цена',\n from: 'От',\n to: 'До'\n },\n filters: [],\n reset: 'Сбросить фильтры',\n }\n }\n }\n }\n\n categories.state.all.forEach( category => {\n category.localization.forEach( localization => {\n text.messages[localization.locale].categories.push(localization.text)\n })\n })\n\n const { t } = useI18n(text)\n \n\n\n// Добавьте свою локализацию и методы t, если они нужны\n</script>\n\n<style>\n/* Ваши стили */\n</style>\n"],"names":["useRoute","useRouter","ref","watch","marketplace.state","onMounted","categories.actions","categories.state","useI18n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAK1B,QAAI,UAAU;AAAA,MACZ,QAAQ;AAAA,IACV;AAEsBC,QAAAA,IAAI;AAAA,MACxB,YAAY,CAAE;AAAA,MACd,QAAQ,CAAE;AAAA,MACV,UAAU,CAAE;AAAA,MACZ,OAAO,CAAE;AAAA,IACX,CAAC;AAwBDC,QAAK,MAAC,MAAMC,YAAAA,MAAkB,QAAQ,CAAC,gBAAgB,mBAAmB;AAExE,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,MACL,CAAG;AAGD,YAAM,iBAAiB,OAAO;AAAA,QAC5B,OAAO,QAAQ,cAAc,EAC1B,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,CAAC,EACjE,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC;AAAA,MACnD;AACE,aAAO,OAAO,OAAO,cAAc;AAGnC,aAAO,QAAQ,EAAE,MAAK,CAAE;AAAA,IAC1B,GAAG,EAAE,MAAM,MAAM;AAEjBC,QAAAA,UAAU,YAAY;AACpB,YAAMC,WAAkB,QAAC,gBAAgB,OAAO;AAEhD,UAAI,MAAM,OAAO;AACf,cAAM,QAAQ,MAAM;AACpB,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;AACIF,0BAAkB,OAAO,YAAY;AAAA,MACtC;AAAA,IACH,CAAC;AAED,UAAM,OAAO;AAMb,UAAM,eAAe,MAAM;AACzB,WAAK,cAAc;AAAA,IACrB;AACA,UAAM,OAAO;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,QACR,IAAI;AAAA,UACF,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,SAAS;AAAA,YACP,OAAO;AAAA,YACP,OAAO;AAAA,cACL,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACL;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QACF;AAAA,QACD,IAAI;AAAA,UACF,iBAAiB;AAAA,UACjB,YAAY,CAAE;AAAA,UACd,SAAS;AAAA,YACP,OAAO;AAAA,YACP,OAAO;AAAA,cACL,OAAO;AAAA,cACP,MAAM;AAAA,cACN,IAAI;AAAA,YACL;AAAA,YACD,SAAS,CAAE;AAAA,YACX,OAAO;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEDG,qBAAiB,IAAI,QAAS,cAAY;AACxC,eAAS,aAAa,QAAS,kBAAgB;AAC7C,aAAK,SAAS,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,IAAI;AAAA,MAC1E,CAAK;AAAA,IACL,CAAG;AAED,UAAM,EAAE,EAAC,IAAKC,QAAO,QAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js
CHANGED
@@ -59,7 +59,7 @@ const _sfc_main = {
|
|
59
59
|
Object.entries(newFilterValue).filter(([key, value]) => Array.isArray(value) && value.length > 0).map(([key, value]) => [key, value.join(",")])
|
60
60
|
);
|
61
61
|
Object.assign(query, newQueryValues);
|
62
|
-
router.
|
62
|
+
router.repalce({ query });
|
63
63
|
}, { deep: true });
|
64
64
|
onMounted(async () => {
|
65
65
|
await actions.fetchCategories(options);
|