@ozdao/prometheus-framework 0.2.203 → 0.2.204

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +24 -15
  2. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
  3. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +24 -15
  4. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
  5. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +51 -1
  8. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs.map +1 -0
  9. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +37 -22
  10. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js.map +1 -0
  11. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +3 -3
  12. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +3 -3
  13. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +3 -3
  16. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
  17. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
  18. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
  19. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +9 -8
  20. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs.map +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +9 -8
  22. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +9 -8
  24. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +9 -8
  26. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +7 -6
  28. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs.map +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +7 -6
  30. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +2 -2
  32. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  34. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  44. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  46. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +4 -1
  50. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  51. package/dist/prometheus-framework/src/modules/globals/globals.client.js +4 -1
  52. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  53. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +27 -27
  58. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  59. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +28 -28
  60. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  61. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +109 -102
  62. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
  63. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +110 -103
  64. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs +85 -0
  68. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.cjs.map +1 -0
  69. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js +85 -0
  70. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Sidebar.vue.js.map +1 -0
  71. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
  74. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +3 -3
  82. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs.map +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +3 -3
  84. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  87. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +3 -3
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +5 -6
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -5
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  103. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +89 -95
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs.map +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +90 -96
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js.map +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  115. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  116. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
  118. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
  119. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  130. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
  136. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  137. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +73 -26
  138. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +82 -35
  140. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +2 -2
  144. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  145. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
  147. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
  149. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +8 -3
  150. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs.map +1 -1
  151. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +8 -3
  152. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
  153. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  155. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
  161. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  162. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  163. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +2 -2
  164. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  165. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  167. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +3 -3
  168. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  169. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  171. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  173. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  175. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  177. package/dist/prometheus-framework.cjs.js +14 -14
  178. package/dist/prometheus-framework.es.js +2830 -2823
  179. package/dist/style.css +68 -0
  180. package/package.json +1 -1
  181. package/src/components/Feed/Feed.vue +23 -10
  182. package/src/components/Tab/Tab.vue +10 -7
  183. package/src/modules/auth/views/components/pages/ResetPassword.vue +5 -4
  184. package/src/modules/auth/views/components/pages/SignIn.vue +5 -3
  185. package/src/modules/auth/views/components/pages/SignUp.vue +3 -2
  186. package/src/modules/globals/globals.client.js +5 -2
  187. package/src/modules/globals/views/components/layouts/Client.vue +99 -19
  188. package/src/modules/globals/views/components/partials/Header.vue +18 -29
  189. package/src/modules/globals/views/components/partials/Sidebar.vue +0 -2
  190. package/src/modules/marketplace/components/layouts/Marketplace.vue +16 -9
  191. package/src/modules/orders/components/partials/ShopCart.vue +3 -3
  192. package/src/modules/organizations/components/pages/Organization.vue +9 -6
  193. package/src/modules/organizations/components/sections/DetailsTab.vue +132 -133
  194. package/src/modules/products/components/pages/Products.vue +89 -10
  195. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  196. package/src/modules/products/components/sections/SectionProduct.vue +4 -0
@@ -4,8 +4,8 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const mixins = require("../../../../globals/views/mixins/mixins.cjs");
6
6
  const pages = require("../../store/pages.cjs");
7
- const Button = require("../../../../../components/Button/Button.vue2.cjs");
8
- ;/* empty css */
7
+ const Button = require("../../../../../components/Button/Button.vue.cjs");
8
+ ;/* empty css */
9
9
  ;/* empty css */
10
10
  ;/* empty css */
11
11
  const Constructor = require("../../../../constructor/components/sections/Constructor.vue.cjs");
@@ -2,8 +2,8 @@ import { ref, onMounted, openBlock, createElementBlock, createVNode, createComme
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import { useGlobalMixins } from "../../../../globals/views/mixins/mixins.js";
4
4
  import { actions, state } from "../../store/pages.js";
5
- import _sfc_main$2 from "../../../../../components/Button/Button.vue2.js";
6
- /* empty css */
5
+ import _sfc_main$2 from "../../../../../components/Button/Button.vue.js";
6
+ /* empty css */
7
7
  /* empty css */
8
8
  /* empty css */
9
9
  import _sfc_main$1 from "../../../../constructor/components/sections/Constructor.vue.js";
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const Block = require("../../../../../components/Block/Block.vue.cjs");
6
6
  const Popup = require("../../../../../components/Popup/Popup.vue2.cjs");
7
- const Button = require("../../../../../components/Button/Button.vue2.cjs");
7
+ const Button = require("../../../../../components/Button/Button.vue.cjs");
8
8
  const Constructor = require("../../../../constructor/components/sections/Constructor.vue.cjs");
9
9
  const CardPage = require("../blocks/CardPage.vue.cjs");
10
10
  const pages = require("../../store/pages.cjs");
@@ -2,7 +2,7 @@ import { computed, ref, onMounted, openBlock, createBlock, withCtx, createElemen
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import _sfc_main$1 from "../../../../../components/Block/Block.vue.js";
4
4
  import _sfc_main$3 from "../../../../../components/Popup/Popup.vue2.js";
5
- import _sfc_main$5 from "../../../../../components/Button/Button.vue2.js";
5
+ import _sfc_main$5 from "../../../../../components/Button/Button.vue.js";
6
6
  import _sfc_main$4 from "../../../../constructor/components/sections/Constructor.vue.js";
7
7
  import _sfc_main$2 from "../blocks/CardPage.vue.js";
8
8
  import { actions } from "../../store/pages.js";
@@ -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.vue2.cjs");
4
+ const Field = require("../../../../components/Field/Field.vue.cjs");
5
5
  const Select = require("../../../../components/Select/Select.vue2.cjs");
6
6
  ;/* empty css */
7
7
  const IconAdd = require("../../../icons/navigation/IconAdd.vue.cjs");
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, watch, openBlock, createElementBlock, createElementVNode, toDisplayString, createBlock, withCtx, createVNode, createCommentVNode, unref } from "vue";
2
- import Field from "../../../../components/Field/Field.vue2.js";
2
+ import Field from "../../../../components/Field/Field.vue.js";
3
3
  import Select from "../../../../components/Select/Select.vue2.js";
4
4
  /* empty css */
5
5
  import _sfc_main$1 from "../../../icons/navigation/IconAdd.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 Field = require("../../../../components/Field/Field.vue2.cjs");
5
+ const Field = require("../../../../components/Field/Field.vue.cjs");
6
6
  const leftovers = require("../../store/leftovers.cjs");
7
7
  ;/* empty css */
8
8
  const _hoisted_1 = { class: "flex-column flex-wrap block" };
@@ -1,6 +1,6 @@
1
1
  import { openBlock, createElementBlock, createElementVNode, createCommentVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
2
2
  import { useRouter, useRoute } from "vue-router";
3
- import Field from "../../../../components/Field/Field.vue2.js";
3
+ import Field from "../../../../components/Field/Field.vue.js";
4
4
  import { actions } from "../../store/leftovers.js";
5
5
  /* empty css */
6
6
  const _hoisted_1 = { class: "flex-column flex-wrap block" };
@@ -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
- ;/* empty css */
5
+ ;/* empty css */
6
6
  const CardPosition = require("./CardPosition.vue.cjs");
7
7
  const leftovers = require("../../store/leftovers.cjs");
8
8
  ;/* empty css */
@@ -1,6 +1,6 @@
1
1
  import { openBlock, createElementBlock, createElementVNode, createCommentVNode, Fragment, renderList, toDisplayString, createVNode } from "vue";
2
2
  import { useRouter, useRoute } from "vue-router";
3
- /* empty css */
3
+ /* empty css */
4
4
  import _sfc_main$1 from "./CardPosition.vue.js";
5
5
  import { actions } from "../../store/leftovers.js";
6
6
  /* empty css */
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const vueDraggableNext_esmBundler = require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs");
5
5
  const vueRouter = require("vue-router");
6
6
  const categories = require("../../store/categories.cjs");
7
- const Button = require("../../../../components/Button/Button.vue2.cjs");
7
+ const Button = require("../../../../components/Button/Button.vue.cjs");
8
8
  const Block = require("../../../../components/Block/Block.vue.cjs");
9
9
  const CardCategory = require("../blocks/CardCategory.vue.cjs");
10
10
  const _hoisted_1 = { class: "pd-thin" };
@@ -2,7 +2,7 @@ import { onMounted, resolveComponent, openBlock, createElementBlock, createVNode
2
2
  import { VueDraggableNext } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
3
3
  import { useRoute, useRouter } from "vue-router";
4
4
  import { actions, state } from "../../store/categories.js";
5
- import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
5
+ import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
6
6
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
7
7
  import _sfc_main$3 from "../blocks/CardCategory.vue.js";
8
8
  const _hoisted_1 = { class: "pd-thin" };
@@ -3,9 +3,9 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
6
- const Button = require("../../../../components/Button/Button.vue2.cjs");
6
+ const Button = require("../../../../components/Button/Button.vue.cjs");
7
7
  const Select = require("../../../../components/Select/Select.vue2.cjs");
8
- const Field = require("../../../../components/Field/Field.vue2.cjs");
8
+ const Field = require("../../../../components/Field/Field.vue.cjs");
9
9
  const Block = require("../../../../components/Block/Block.vue.cjs");
10
10
  const categories = require("../../store/categories.cjs");
11
11
  ;/* empty css */
@@ -1,9 +1,9 @@
1
1
  import { computed, openBlock, createElementBlock, Fragment, createVNode, withCtx, createElementVNode, toDisplayString, unref, createTextVNode, renderList } from "vue";
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import _sfc_main$3 from "../../../icons/navigation/IconDelete.vue.js";
4
- import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
4
+ import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
5
5
  import Select from "../../../../components/Select/Select.vue2.js";
6
- import Field from "../../../../components/Field/Field.vue2.js";
6
+ import Field from "../../../../components/Field/Field.vue.js";
7
7
  import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
8
8
  import { actions, state } from "../../store/categories.js";
9
9
  /* empty css */
@@ -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 Block = require("../../../../components/Block/Block.vue.cjs");
5
- const Field = require("../../../../components/Field/Field.vue2.cjs");
5
+ const Field = require("../../../../components/Field/Field.vue.cjs");
6
6
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
7
7
  const Select = require("../../../../components/Select/Select.vue2.cjs");
8
8
  const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
@@ -1,6 +1,6 @@
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.vue2.js";
3
+ import Field from "../../../../components/Field/Field.vue.js";
4
4
  import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
5
5
  import Select from "../../../../components/Select/Select.vue2.js";
6
6
  import _sfc_main$1 from "../../../../components/Popup/Popup.vue2.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.vue2.cjs");
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.vue2.js";
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,10 +5,10 @@ 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.vue2.cjs");
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.vue2.cjs");
11
+ const Button = require("../../../../components/Button/Button.vue.cjs");
12
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");
@@ -3,10 +3,10 @@ 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.vue2.js";
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.vue2.js";
9
+ import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
10
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";
@@ -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.vue2.cjs");
5
+ const Tab = require("../../../../components/Tab/Tab.vue.cjs");
6
6
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
7
- const FilterProducts = require("../sections/FilterProducts.vue.cjs");
8
- const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
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 = { class: "pd-thin" };
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 _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("h2", { class: "mn-r-medium" }, "Products", -1);
18
- const _hoisted_4 = { class: "cols-2-1_3 bg-light pd-thin radius-big gap-thin" };
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
- function updateSearch(search) {
58
+ vue.watch(() => marketplace.state.sort, (newSortValue, oldSortValue) => {
30
59
  let query = { ...route.query };
31
- query.search = search;
32
- router.push({ query });
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", _hoisted_1, [
36
- vue.unref(route).name !== "Organization" ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2, [
37
- _hoisted_3,
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", _hoisted_4, [
58
- vue.createVNode(FilterProducts.default),
59
- vue.createElementVNode("div", null, [
60
- vue.createVNode(BlockSearch.default, {
61
- onSearch: updateSearch,
62
- placeholder: "Enter product name",
63
- class: "bg-white mn-b-thin"
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: vue.unref(route).query.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
  ]);
@@ -1 +1 @@
1
- {"version":3,"file":"Products.vue.cjs","sources":["../../../../../../../src/modules/products/components/pages/Products.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\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 <FilterProducts\n\n /> \n\n <div>\n <BlockSearch \n @search=\"updateSearch\"\n placeholder=\"Enter product name\"\n class=\"bg-white mn-b-thin\"\n />\n <Feed\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\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\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 route.query.tabProducts = tabProducts.value\n\n watch(tabProducts, (newValue) => {\n router.replace({ query: { ...route.query, tabProducts: newValue } });\n });\n \n function updateSearch(search) {\n let query = { ...route.query}\n \n query.search = search\n \n router.push({ query });\n }\n</script>\n\n<style lang=\"scss\">\n\n\n</style>\n"],"names":["useRoute","useRouter","ref","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAyGE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAG1B,UAAM,cAAcC,QAAI,MAAM,MAAM,cAAc,MAAM,MAAM,cAAc,KAAK;AAEjF,UAAM,MAAM,cAAc,YAAY;AAEtCC,cAAM,aAAa,CAAC,aAAa;AAC/B,aAAO,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,OAAO,aAAa,SAAU,EAAA,CAAE;AAAA,IACvE,CAAG;AAED,aAAS,aAAa,QAAQ;AAC5B,UAAI,QAAQ,EAAE,GAAG,MAAM,MAAK;AAE5B,YAAM,SAAS;AAEf,aAAO,KAAK,EAAE,MAAK,CAAE;AAAA,IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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.vue2.js";
4
- import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
5
- import _sfc_main$2 from "../sections/FilterProducts.vue.js";
6
- import _sfc_main$3 from "../../../globals/views/components/blocks/BlockSearch.vue.js";
7
- import _sfc_main$5 from "../blocks/CardProduct.vue.js";
8
- import { state as state$1 } from "../../../auth/views/store/auth.js";
9
- import { actions, state } from "../../store/products.js";
10
- const _hoisted_1 = { class: "pd-thin" };
11
- const _hoisted_2 = {
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 _hoisted_3 = /* @__PURE__ */ createElementVNode("h2", { class: "mn-r-medium" }, "Products", -1);
16
- const _hoisted_4 = { class: "cols-2-1_3 bg-light pd-thin radius-big gap-thin" };
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
- function updateSearch(search) {
56
+ watch(() => state.sort, (newSortValue, oldSortValue) => {
28
57
  let query = { ...route.query };
29
- query.search = search;
30
- router.push({ query });
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", _hoisted_1, [
34
- unref(route).name !== "Organization" ? (openBlock(), createElementBlock("header", _hoisted_2, [
35
- _hoisted_3,
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", _hoisted_4, [
56
- createVNode(_sfc_main$2),
57
- createElementVNode("div", null, [
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
- onSearch: updateSearch,
60
- placeholder: "Enter product name",
61
- class: "bg-white mn-b-thin"
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: unref(route).query.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$5, {
137
+ return openBlock(), createBlock(_sfc_main$4, {
91
138
  key: product._id,
92
139
  product,
93
- user: state$1.access,
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
  ]);