@ozdao/martyrs 0.2.561 → 0.2.563

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/dist/{abac-DC2x92Pa.js → abac-DYoheWuc.js} +2 -1
  2. package/dist/{core.logger-VRHh-WUW.js → core.cache-DALYFDdy.js} +10 -59
  3. package/dist/core.logger-C3q8A9dl.js +51 -0
  4. package/dist/core.server.js +1 -1
  5. package/dist/{crud-DFFgLl09.js → crud-C7FSTUes.js} +2 -1
  6. package/dist/inventory.server.js +4 -3
  7. package/dist/{main-DQtUY5ma.js → main-CmjWiDVF.js} +2837 -2548
  8. package/dist/marketplace.server.js +389 -0
  9. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +3 -3
  10. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -0
  11. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
  12. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  13. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  14. package/dist/martyrs/src/components/Menu/{Menu.vue2.js → Menu.vue.js} +2 -2
  15. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +1 -0
  16. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  17. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  18. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
  19. package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.js.map +1 -0
  20. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  21. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  22. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  23. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  24. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  25. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  26. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  27. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  28. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  29. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  30. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  31. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  32. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +1 -1
  33. package/dist/martyrs/src/modules/core/views/components/blocks/PopupAuth.vue.js +1 -1
  34. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +1 -1
  35. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +3 -6
  36. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +3 -3
  38. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
  39. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +1 -1
  40. package/dist/martyrs/src/modules/core/views/components/partials/NavigationBar.vue.js +1 -1
  41. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js +59 -171
  42. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue.js.map +1 -1
  43. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterCheckbox.vue2.js +64 -0
  44. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterCheckbox.vue2.js.map +1 -0
  45. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterDateRange.vue2.js +160 -0
  46. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterDateRange.vue2.js.map +1 -0
  47. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterOptions.vue.js +46 -0
  48. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterOptions.vue.js.map +1 -0
  49. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js +105 -0
  50. package/dist/martyrs/src/modules/core/views/components/sections/filters/FilterRange.vue.js.map +1 -0
  51. package/dist/martyrs/src/modules/core/views/components/sections/filters/FiltersGroup.vue.js +166 -0
  52. package/dist/martyrs/src/modules/core/views/components/sections/filters/FiltersGroup.vue.js.map +1 -0
  53. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +4 -0
  54. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
  55. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  56. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  57. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  58. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  59. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -0
  60. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  61. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  62. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  63. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
  64. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  65. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  66. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
  67. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
  68. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
  69. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
  70. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  71. package/dist/martyrs/src/modules/marketplace/marketplace.client.js +5 -9
  72. package/dist/martyrs/src/modules/marketplace/marketplace.client.js.map +1 -1
  73. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js +242 -0
  74. package/dist/martyrs/src/modules/marketplace/views/components/pages/Marketplace.vue.js.map +1 -0
  75. package/dist/martyrs/src/modules/marketplace/views/router/marketplace.router.js +39 -0
  76. package/dist/martyrs/src/modules/marketplace/views/router/marketplace.router.js.map +1 -0
  77. package/dist/martyrs/src/modules/marketplace/views/store/marketplace.js +65 -2
  78. package/dist/martyrs/src/modules/marketplace/views/store/marketplace.js.map +1 -1
  79. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  80. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  81. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  82. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  83. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  84. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
  85. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  86. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  87. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
  88. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  89. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  90. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  91. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  92. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  93. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  94. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  96. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
  97. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
  98. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
  99. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  100. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  101. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  102. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  103. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  104. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -0
  105. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  106. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  107. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  108. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +4 -4
  109. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  110. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  111. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  112. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +2 -2
  113. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  114. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
  115. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  116. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  117. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  118. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  119. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  120. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  121. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  122. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  123. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  124. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  125. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +4 -2
  126. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  127. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  128. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  129. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  130. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  131. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  132. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  133. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  134. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  135. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  136. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  137. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  138. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  139. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  140. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  141. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  142. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
  143. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  144. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  145. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  146. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  147. package/dist/martyrs.css +1 -1
  148. package/dist/martyrs.es.js +1 -1
  149. package/dist/music.server.js +4 -3
  150. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  151. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  152. package/dist/orders.server.js +2 -2
  153. package/dist/organizations.server.js +10 -215
  154. package/dist/products.server.js +4 -3
  155. package/dist/queryProcessorOrganizations-BB11WFpc.js +221 -0
  156. package/dist/rents.server.js +2 -1
  157. package/dist/style.css +10 -1
  158. package/dist/{web-Cyc6i_pv.js → web-cNKIl_cL.js} +1 -1
  159. package/package.json +1 -1
  160. package/src/components/Button/Button.vue +1 -1
  161. package/src/components/Checkbox/Checkbox.vue +1 -1
  162. package/src/modules/core/views/components/layouts/Client.vue +7 -11
  163. package/src/modules/core/views/components/partials/Header.vue +1 -1
  164. package/src/modules/core/views/components/sections/Filters.vue +47 -161
  165. package/src/modules/core/views/components/sections/filters/FilterCheckbox.vue +12 -31
  166. package/src/modules/core/views/components/sections/filters/FilterDateRange.vue +15 -15
  167. package/src/modules/core/views/components/sections/filters/FilterOptions.vue +12 -43
  168. package/src/modules/core/views/components/sections/filters/FilterRange.vue +59 -36
  169. package/src/modules/core/views/components/sections/filters/FiltersGroup.vue +177 -0
  170. package/src/modules/core/views/utils/vue-app-renderer.js +12 -0
  171. package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
  172. package/src/modules/marketplace/controllers/marketplace.controller.js +123 -0
  173. package/src/modules/marketplace/controllers/utils/lookupConfigs.js +130 -0
  174. package/src/modules/marketplace/controllers/utils/queryProcessorMarketplace.js +211 -0
  175. package/src/modules/marketplace/marketplace.client.js +3 -10
  176. package/src/modules/marketplace/marketplace.server.js +22 -0
  177. package/src/modules/marketplace/routes/marketplace.routes.js +34 -0
  178. package/src/modules/marketplace/views/components/pages/Marketplace.vue +273 -0
  179. package/src/modules/marketplace/views/router/marketplace.router.js +37 -30
  180. package/src/modules/marketplace/views/store/marketplace.js +74 -3
  181. package/src/modules/organizations/components/blocks/CardOrganization.vue +8 -8
  182. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  183. package/src/modules/organizations/controllers/utils/queryProcessorOrganizations.js +8 -1
  184. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  185. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +0 -1
  186. package/dist/martyrs/src/components/Select/Select.vue2.js.map +0 -1
  187. package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
  188. package/dist/martyrs/src/modules/marketplace/marketplace.router.js +0 -63
  189. package/dist/martyrs/src/modules/marketplace/marketplace.router.js.map +0 -1
  190. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +0 -326
  191. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +0 -1
  192. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js +0 -74
  193. package/dist/martyrs/src/modules/marketplace/views/components/pages/Catalog.vue.js.map +0 -1
  194. package/src/modules/core/views/components/sections/filters/FilterPrice.vue +0 -81
  195. package/src/modules/marketplace/marketplace.router.js +0 -66
  196. package/src/modules/marketplace/views/components/layouts/Marketplace.vue +0 -363
  197. package/src/modules/marketplace/views/components/pages/Catalog.vue +0 -73
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <div class="flex t-nowrap gap-thin">
2
+ <div class="flex o-x-scroll scroll-hide t-nowrap gap-thin">
3
3
  <!-- All Filters Button -->
4
4
  <button
5
5
  @click="showAllFilters = true"
6
6
  class="pd-small radius-medium bg-light flex-v-center flex gap-micro cursor-pointer"
7
7
  :class="{ 'bg-main': activeFiltersCount > 0 }"
8
8
  >
9
- <IconFilter class="i-medium" />
9
+ <IconFilter class="i-regular" />
10
10
  <span class="h-1r"></span>
11
11
  <span v-if="activeFiltersCount">{{ activeFiltersCount }}</span>
12
12
  </button>
@@ -19,7 +19,7 @@
19
19
  class="pd-small radius-medium bg-light cursor-pointer flex-v-center flex gap-micro"
20
20
  :class="{ 'selected bg-main': isFilterActive(filter) }"
21
21
  >
22
- <IconCalendar v-if="filter.type === 'date'" class="mn-r-micro i-medium" />
22
+ <IconCalendar v-if="filter.type === 'date'" class="mn-r-micro i-regular" />
23
23
  <span class="t-nowrap">{{ filter.type === 'date' && getFilterValue(filter) ? formatFilterValue(filter) : filter.title }}</span>
24
24
  <span v-if="getFilterValue(filter) && filter.type !== 'date'" class="mn-l-micro">
25
25
  {{ formatFilterValue(filter) }}
@@ -29,95 +29,19 @@
29
29
  <!-- All Filters Popup -->
30
30
  <Popup
31
31
  :isPopupOpen="showAllFilters"
32
- @close-popup="showAllFilters = false"
32
+ @close-popup="closeAllFilters"
33
33
  :align="isPhone() ? 'bottom center' : 'center center'"
34
34
  class="w-min-20r bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
35
35
  >
36
- <div class="flex-v-center flex-nowrap flex mn-b-medium">
37
- <h3 class="flex-child-full">Filters</h3>
38
- </div>
39
-
40
- <div class="filters-content">
41
- <div
42
- v-for="filter in filters"
43
- :key="filter.value"
44
- class="mn-b-medium"
45
- >
46
- <h4 class="mn-b-small">{{ filter.title }}</h4>
47
-
48
- <!-- Checkbox Filter -->
49
- <div v-if="filter.type === 'checkbox'">
50
- <Checkbox
51
- v-for="option in filter.options"
52
- :key="option.value"
53
- :label="option.label"
54
- :value="option.value"
55
- v-model:radio="tempSelected[filter.value]"
56
- mode="checkbox"
57
- class="mn-b-micro"
58
- />
59
- </div>
60
-
61
- <!-- Radio Filter -->
62
- <div v-else-if="filter.type === 'radio'">
63
- <div
64
- v-for="option in filter.options"
65
- :key="option.value"
66
- @click="tempSelected[filter.value] = option.value"
67
- class="pd-small radius-small cursor-pointer mn-b-micro"
68
- :class="{
69
- 'bg-main': tempSelected[filter.value] === option.value,
70
- 'bg-light': tempSelected[filter.value] !== option.value
71
- }"
72
- >
73
- {{ option.label }}
74
- </div>
75
- </div>
76
-
77
- <!-- Range Filter -->
78
- <div v-else-if="filter.type === 'range'" class="flex gap-thin">
79
- <Field
80
- v-model:field="tempSelected[filter.value].min"
81
- :placeholder="filter.minPlaceholder || 'Min'"
82
- type="number"
83
- :label="returnCurrency()"
84
- class="w-50 bg-light pd-small radius-small"
85
- />
86
- <Field
87
- v-model:field="tempSelected[filter.value].max"
88
- :placeholder="filter.maxPlaceholder || 'Max'"
89
- type="number"
90
- :label="returnCurrency()"
91
- class="w-50 bg-light pd-small radius-small"
92
- />
93
- </div>
94
-
95
- <!-- Date Filter -->
96
- <div v-else-if="filter.type === 'date'">
97
- <Calendar
98
- v-model:date="tempSelected[filter.value]"
99
- :allowRange="true"
100
- :disablePastDates="true"
101
- class="bg-light radius-small"
102
- />
103
- </div>
104
- </div>
105
- </div>
106
-
107
- <div class="flex gap-thin mn-t-medium">
108
- <button
109
- @click="applyAllFilters"
110
- class="button bg-main flex-child-full"
111
- >
112
- Apply
113
- </button>
114
- <button
115
- @click="resetFilters"
116
- class="button bg-light"
117
- >
118
- Reset Filters
119
- </button>
120
- </div>
36
+ <FiltersGroup
37
+ :filters="filters"
38
+ v-model:selected="tempSelected"
39
+ :immediate="false"
40
+ :showHeader="true"
41
+ :showApplyButton="true"
42
+ :showResetButton="true"
43
+ @update:selected="applyAllFilters"
44
+ />
121
45
  </Popup>
122
46
 
123
47
  <!-- Individual Filter Popups -->
@@ -125,58 +49,27 @@
125
49
  v-for="filter in filters"
126
50
  :key="`popup-${filter.value}`"
127
51
  :isPopupOpen="individualPopups[filter.value]"
128
- @close-popup="individualPopups[filter.value] = false"
52
+ @close-popup="cancelFilter(filter.value)"
129
53
  :align="isPhone() ? 'bottom center' : 'center center'"
130
54
  class="bg-white radius-medium mobile:radius-zero mobile:radius-tr-medium mobile:radius-tl-medium mobile:w-100 pd-medium"
131
55
  >
132
56
  <h4 class="mn-b-medium">{{ filter.title }}</h4>
133
-
134
- <!-- Checkbox Filter -->
135
- <div v-if="filter.type === 'checkbox'">
136
- <Checkbox
137
- v-for="option in filter.options"
138
- :key="option.value"
139
- :label="option.label"
140
- :value="option.value"
141
- v-model:radio="tempSelected[filter.value]"
142
- mode="checkbox"
143
- class="mn-b-micro"
144
- />
145
- </div>
146
57
 
147
- <!-- Radio Filter -->
148
- <div v-else-if="filter.type === 'radio'">
149
- <div
150
- v-for="option in filter.options"
151
- :key="option.value"
152
- @click="tempSelected[filter.value] = option.value"
153
- class="pd-small radius-small cursor-pointer mn-b-micro"
154
- :class="{
155
- 'bg-main': tempSelected[filter.value] === option.value,
156
- 'bg-light': tempSelected[filter.value] !== option.value
157
- }"
158
- >
159
- {{ option.label }}
160
- </div>
161
- </div>
58
+ <!-- Checkbox Filter -->
59
+ <FilterCheckbox
60
+ v-if="filter.type === 'checkbox'"
61
+ v-model="tempSelected[filter.value]"
62
+ :options="filter.options"
63
+ />
162
64
 
163
65
  <!-- Range Filter -->
164
- <div v-else-if="filter.type === 'range'" class="flex gap-thin">
165
- <Field
166
- v-model:field="tempSelected[filter.value].min"
167
- :placeholder="filter.minPlaceholder || 'Min'"
168
- type="number"
169
- :label="returnCurrency()"
170
- class="w-50 bg-light pd-small radius-small"
171
- />
172
- <Field
173
- v-model:field="tempSelected[filter.value].max"
174
- :placeholder="filter.maxPlaceholder || 'Max'"
175
- type="number"
176
- :label="returnCurrency()"
177
- class="w-50 bg-light pd-small radius-small"
178
- />
179
- </div>
66
+ <FilterRange
67
+ v-else-if="filter.type === 'range'"
68
+ v-model="tempSelected[filter.value]"
69
+ :minPlaceholder="filter.minPlaceholder || 'Min'"
70
+ :maxPlaceholder="filter.maxPlaceholder || 'Max'"
71
+ :label="filter.label"
72
+ />
180
73
 
181
74
  <!-- Date Filter -->
182
75
  <div v-else-if="filter.type === 'date'">
@@ -190,21 +83,26 @@
190
83
  </div>
191
84
  </div>
192
85
 
86
+ <!-- Radio/Options Filter -->
87
+ <FilterOptions
88
+ v-else-if="filter.type === 'radio'"
89
+ v-model="tempSelected[filter.value]"
90
+ :options="filter.options"
91
+ />
92
+
193
93
  <div class="flex gap-thin mn-t-medium">
194
- <button
195
- @click="cancelFilter(filter.value)"
94
+ <button
95
+ @click="cancelFilter(filter.value)"
196
96
  class="bg-light button flex-child-full"
197
97
  >
198
98
  Cancel
199
99
  </button>
200
- <button
201
- @click="applyFilter(filter.value)"
100
+ <button
101
+ @click="applyFilter(filter.value)"
202
102
  class="bg-main w-100 button flex-child-full"
203
103
  >
204
104
  Apply
205
105
  </button>
206
-
207
-
208
106
  </div>
209
107
  </Popup>
210
108
  </div>
@@ -214,9 +112,12 @@
214
112
  import { ref, computed, reactive, watch } from 'vue'
215
113
  import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js'
216
114
  import Popup from '@martyrs/src/components/Popup/Popup.vue'
217
- import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
218
- import Field from '@martyrs/src/components/Field/Field.vue'
219
115
  import Calendar from '@martyrs/src/components/Calendar/Calendar.vue'
116
+ import FiltersGroup from './filters/FiltersGroup.vue'
117
+ import FilterCheckbox from './filters/FilterCheckbox.vue'
118
+ import FilterRange from './filters/FilterRange.vue'
119
+ import FilterDateRange from './filters/FilterDateRange.vue'
120
+ import FilterOptions from './filters/FilterOptions.vue'
220
121
  import IconFilter from '@martyrs/src/modules/icons/navigation/IconFilter.vue'
221
122
  import IconCross from '@martyrs/src/modules/icons/navigation/IconCross.vue'
222
123
  import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'
@@ -367,8 +268,8 @@ const cancelFilter = (filterValue) => {
367
268
  individualPopups[filterValue] = false
368
269
  }
369
270
 
370
- const applyAllFilters = () => {
371
- Object.entries(tempSelected).forEach(([key, value]) => {
271
+ const applyAllFilters = (newValues) => {
272
+ Object.entries(newValues).forEach(([key, value]) => {
372
273
  if (selected.value[key] !== value) {
373
274
  selected.value[key] = value
374
275
  emit('select', { filter: key, value })
@@ -377,23 +278,8 @@ const applyAllFilters = () => {
377
278
  showAllFilters.value = false
378
279
  }
379
280
 
380
- const resetFilters = () => {
381
- filters.value.forEach(filter => {
382
- if (filter.type === 'checkbox') {
383
- tempSelected[filter.value] = []
384
- selected.value[filter.value] = []
385
- } else if (filter.type === 'range') {
386
- tempSelected[filter.value] = { min: '', max: '' }
387
- selected.value[filter.value] = { min: '', max: '' }
388
- } else if (filter.type === 'date') {
389
- tempSelected[filter.value] = null
390
- selected.value[filter.value] = null
391
- } else {
392
- tempSelected[filter.value] = null
393
- selected.value[filter.value] = null
394
- }
395
- emit('select', { filter: filter.value, value: null })
396
- })
281
+ const closeAllFilters = () => {
282
+ showAllFilters.value = false
397
283
  }
398
284
  </script>
399
285
 
@@ -1,20 +1,22 @@
1
1
  <!-- FilterCheckbox.vue -->
2
2
  <template>
3
3
  <div class="filter-checkbox">
4
- <div
4
+ <Checkbox
5
5
  v-for="(option, index) in normalizedOptions"
6
6
  :key="option.value"
7
- @click="toggleOption(option.value)"
8
- :class="{ 'bg-light': isSelected(option.value) }"
9
- class="pd-small radius-small cursor-pointer hover-bg-light transition-all mn-b-micro"
10
- >
11
- {{ option.label }}
12
- </div>
7
+ v-model:radio="model"
8
+ :label="option.label"
9
+ :value="option.value"
10
+ mode="checkbox"
11
+ class="br-solid br-1px br-light pd-small radius-small mn-b-micro"
12
+ @update:radio="emit('apply')"
13
+ />
13
14
  </div>
14
15
  </template>
15
16
 
16
17
  <script setup>
17
- import { ref, watch, computed } from 'vue'
18
+ import { computed } from 'vue'
19
+ import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
18
20
 
19
21
  const props = defineProps({
20
22
  options: {
@@ -28,14 +30,12 @@ const model = defineModel({
28
30
  default: () => []
29
31
  })
30
32
 
31
- const emit = defineEmits(['update:modelValue', 'apply'])
32
-
33
- const localValue = ref([...(model.value || [])])
33
+ const emit = defineEmits(['apply'])
34
34
 
35
35
  // Normalize options to always have label and value
36
36
  const normalizedOptions = computed(() => {
37
37
  if (!props.options || !Array.isArray(props.options)) return []
38
-
38
+
39
39
  return props.options.map((option, index) => {
40
40
  if (typeof option === 'string') {
41
41
  return { label: option, value: option }
@@ -49,25 +49,6 @@ const normalizedOptions = computed(() => {
49
49
  return { label: String(option), value: `option-${index}` }
50
50
  })
51
51
  })
52
-
53
- const isSelected = (value) => {
54
- return localValue.value.includes(value)
55
- }
56
-
57
- const toggleOption = (value) => {
58
- const idx = localValue.value.indexOf(value)
59
- if (idx > -1) {
60
- localValue.value.splice(idx, 1)
61
- } else {
62
- localValue.value.push(value)
63
- }
64
- model.value = [...localValue.value]
65
- emit('apply')
66
- }
67
-
68
- watch(() => model.value, (newVal) => {
69
- localValue.value = [...(newVal || [])]
70
- }, { deep: true })
71
52
  </script>
72
53
 
73
54
  <style scoped>
@@ -1,8 +1,9 @@
1
1
  <!-- FilterDateRange.vue -->
2
2
  <template>
3
3
  <div class="filter-date-range">
4
- <!-- Quick options -->
5
- <div
4
+ <!-- Quick options (only if provided) -->
5
+ <div
6
+ v-if="dateOptions.length > 0"
6
7
  v-for="option in dateOptions"
7
8
  :key="option.value"
8
9
  @click="selectOption(option.value)"
@@ -11,19 +12,21 @@
11
12
  >
12
13
  {{ option.label }}
13
14
  </div>
14
-
15
- <!-- Custom dates -->
16
- <div
17
- @click="() => { tempDates = model.value ? {...model.value} : null; showCalendar = true }"
18
- :class="{ 'bg-light': selectedOption === 'custom' }"
19
- class="pd-small radius-small cursor-pointer hover-bg-light transition-all mn-b-micro"
15
+
16
+ <!-- Custom dates with icon (like in Products) -->
17
+ <div
18
+ @click="() => { showCalendar = true }"
19
+ :class="{ 'bg-light': model }"
20
+ class="pd-small field-wrapper radius-small bg-light cursor-pointer hover-bg-light transition-all flex-v-center flex gap-thin"
20
21
  >
21
- {{ dateRangeLabel }}
22
+ <IconCalendar class="i-medium" />
23
+ <span>{{ dateRangeLabel }}</span>
22
24
  </div>
23
25
 
24
26
  <!-- Calendar Popup -->
25
27
  <Popup
26
- v-model:show="showCalendar"
28
+ :isPopupOpen="showCalendar"
29
+ @close-popup="showCalendar = false"
27
30
  class="pd-medium bg-white radius-medium"
28
31
  style="min-width: 350px;"
29
32
  >
@@ -58,6 +61,7 @@
58
61
  import { ref, computed, watch } from 'vue'
59
62
  import Calendar from '@martyrs/src/components/Calendar/Calendar.vue'
60
63
  import Popup from '@martyrs/src/components/Popup/Popup.vue'
64
+ import IconCalendar from '@martyrs/src/modules/icons/entities/IconCalendar.vue'
61
65
  import { useGlobalMixins } from '@martyrs/src/modules/core/views/mixins/mixins.js'
62
66
 
63
67
  const { formatDate } = useGlobalMixins()
@@ -65,11 +69,7 @@ const { formatDate } = useGlobalMixins()
65
69
  const props = defineProps({
66
70
  dateOptions: {
67
71
  type: Array,
68
- default: () => [
69
- { label: 'Available today', value: 'today' },
70
- { label: 'This week', value: 'week' },
71
- { label: 'This month', value: 'month' }
72
- ]
72
+ default: () => []
73
73
  }
74
74
  })
75
75
 
@@ -1,26 +1,21 @@
1
1
  <!-- filters/FilterOptions.vue -->
2
2
  <template>
3
3
  <div class="filter-options">
4
- <div
4
+ <Checkbox
5
5
  v-for="option in options"
6
6
  :key="option.value"
7
- class="flex align-center gap-thin pd-thin cursor-pointer hover-bg-light radius-small"
8
- @click="toggleOption(option.value)"
9
- >
10
- <Field
11
- type="checkbox"
12
- v-model:field="checkboxStates[option.value]"
13
- class="mr-thin"
14
- />
15
- <span>{{ option.label }}</span>
16
- </div>
7
+ v-model:radio="model"
8
+ :label="option.label"
9
+ :value="option.value"
10
+ mode="radio"
11
+ class="mn-b-micro"
12
+ @update:radio="emit('apply')"
13
+ />
17
14
  </div>
18
15
  </template>
19
16
 
20
17
  <script setup>
21
- import { ref, watch } from 'vue'
22
- import Field from '@martyrs/src/components/Field/Field.vue';
23
-
18
+ import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue'
24
19
 
25
20
  const props = defineProps({
26
21
  options: {
@@ -31,35 +26,9 @@ const props = defineProps({
31
26
  })
32
27
 
33
28
  const model = defineModel({
34
- type: Array,
35
- default: () => []
36
- })
37
-
38
- // Создаем объект для хранения состояний чекбоксов
39
- const checkboxStates = ref({})
40
-
41
- // Инициализация состояний
42
- props.options.forEach(option => {
43
- checkboxStates.value[option.value] = model.value.includes(option.value)
29
+ type: String,
30
+ default: null
44
31
  })
45
32
 
46
- // Следим за изменениями модели
47
- watch(model, (newVal) => {
48
- props.options.forEach(option => {
49
- checkboxStates.value[option.value] = newVal.includes(option.value)
50
- })
51
- }, { deep: true })
52
-
53
- // Обновляем модель при изменении чекбоксов
54
- watch(checkboxStates, (states) => {
55
- const selected = []
56
- Object.entries(states).forEach(([value, checked]) => {
57
- if (checked) selected.push(value)
58
- })
59
- model.value = selected
60
- }, { deep: true })
61
-
62
- const toggleOption = (value) => {
63
- checkboxStates.value[value] = !checkboxStates.value[value]
64
- }
33
+ const emit = defineEmits(['apply'])
65
34
  </script>
@@ -1,75 +1,98 @@
1
- <!-- FilterRange.vue -->
1
+ <!-- filters/FilterPrice.vue -->
2
2
  <template>
3
- <div class="filter-range">
4
- <div class="flex gap-thin mn-b-small">
3
+ <div class="filter-price">
4
+ <div class="flex flex-v-center gap-thin">
5
5
  <Field
6
- v-model="localValue.min"
7
- :placeholder="minPlaceholder"
8
6
  type="number"
9
- class="w-50 bg-light pd-small radius-small"
10
- @keypress.enter="applyRange"
7
+ v-model:field="localValue.min"
8
+ :placeholder="minPlaceholder"
9
+ :label="label"
10
+ class="flex-1 bg-light pd-regular radius-small"
11
+ @blur="updateValue"
11
12
  />
13
+ <span class="t-small">—</span>
12
14
  <Field
13
- v-model="localValue.max"
14
- :placeholder="maxPlaceholder"
15
15
  type="number"
16
- class="w-50 bg-light pd-small radius-small"
17
- @keypress.enter="applyRange"
16
+ v-model:field="localValue.max"
17
+ :placeholder="maxPlaceholder"
18
+ :label="label"
19
+ class="flex-1 bg-light pd-regular radius-small"
20
+ @blur="updateValue"
18
21
  />
19
22
  </div>
20
- <button
21
- @click="applyRange"
22
- class="button bg-main t-white w-100 pd-small radius-small"
23
- >
24
- Apply
25
- </button>
23
+
24
+ <div v-if="config?.presets" class="mt-thin">
25
+ <button
26
+ v-for="preset in config.presets"
27
+ :key="preset.label"
28
+ @click="applyPreset(preset)"
29
+ class="btn btn-small mr-thin mb-thin"
30
+ :class="isPresetActive(preset) ? 'btn-primary' : 'btn-secondary'"
31
+ >
32
+ {{ preset.label }}
33
+ </button>
34
+ </div>
26
35
  </div>
27
36
  </template>
28
37
 
29
38
  <script setup>
30
39
  import { ref, watch } from 'vue'
31
- import Field from '@martyrs/src/components/Field/Field.vue'
40
+ import Field from '@martyrs/src/components/Field/Field.vue';
32
41
 
33
42
  const props = defineProps({
43
+ config: {
44
+ type: Object,
45
+ default: () => ({})
46
+ },
34
47
  minPlaceholder: {
35
48
  type: String,
36
- default: 'From'
49
+ default: 'Min'
37
50
  },
38
51
  maxPlaceholder: {
39
52
  type: String,
40
- default: 'To'
53
+ default: 'Max'
54
+ },
55
+ label: {
56
+ type: String,
57
+ default: undefined
41
58
  }
42
59
  })
43
60
 
44
61
  const model = defineModel({
45
62
  type: Object,
46
- default: () => ({ min: '', max: '' })
63
+ default: () => ({ min: null, max: null })
47
64
  })
48
65
 
49
66
  const emit = defineEmits(['update:modelValue', 'apply'])
50
67
 
51
68
  const localValue = ref({
52
- min: model.value?.min || '',
53
- max: model.value?.max || ''
69
+ min: model.value?.min || null,
70
+ max: model.value?.max || null
54
71
  })
55
72
 
56
- const applyRange = () => {
73
+ watch(model, (val) => {
74
+ if (val) {
75
+ localValue.value = {
76
+ min: val.min || null,
77
+ max: val.max || null
78
+ }
79
+ }
80
+ }, { deep: true })
81
+
82
+ const updateValue = () => {
57
83
  model.value = { ...localValue.value }
58
84
  emit('apply')
59
85
  }
60
86
 
61
- watch(() => model.value, (newVal) => {
62
- if (newVal) {
63
- localValue.value = {
64
- min: newVal.min || '',
65
- max: newVal.max || ''
66
- }
87
+ const applyPreset = (preset) => {
88
+ localValue.value = {
89
+ min: preset.min || null,
90
+ max: preset.max || null
67
91
  }
68
- }, { deep: true })
69
- </script>
92
+ updateValue()
93
+ }
70
94
 
71
- <style scoped>
72
- .filter-range {
73
- width: 100%;
95
+ const isPresetActive = (preset) => {
96
+ return localValue.value.min === preset.min && localValue.value.max === preset.max
74
97
  }
75
- </style>
98
+ </script>