@blaze-cms/react-page-builder 0.131.0-project-admin-customisations.0 → 0.131.0

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 (251) hide show
  1. package/CHANGELOG.md +2 -21
  2. package/lib/HOC/recreateOnNavigation.js +29 -0
  3. package/lib/HOC/recreateOnNavigation.js.map +1 -0
  4. package/lib/components/Button.js +1 -2
  5. package/lib/components/Button.js.map +1 -1
  6. package/lib/components/Card/CardsRender.js +6 -13
  7. package/lib/components/Card/CardsRender.js.map +1 -1
  8. package/lib/components/Card/helpers/index.js +0 -7
  9. package/lib/components/Card/helpers/index.js.map +1 -1
  10. package/lib/components/Code/Code.js +3 -7
  11. package/lib/components/Code/Code.js.map +1 -1
  12. package/lib/components/ContentGroupSection/ContentGroupSection.js +4 -1
  13. package/lib/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  14. package/lib/components/DataSummary/helpers/build-loop-props-content.js +1 -3
  15. package/lib/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  16. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js +2 -3
  17. package/lib/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
  18. package/lib/components/Layout/Layout.js +3 -2
  19. package/lib/components/Layout/Layout.js.map +1 -1
  20. package/lib/components/Layout/LayoutFactory.js +35 -0
  21. package/lib/components/Layout/LayoutFactory.js.map +1 -0
  22. package/lib/components/Layout/LayoutWithStickyTimer.js +66 -0
  23. package/lib/components/Layout/LayoutWithStickyTimer.js.map +1 -0
  24. package/lib/components/Layout/index.js +2 -2
  25. package/lib/components/Layout/index.js.map +1 -1
  26. package/lib/components/List/ListFactory.js +11 -16
  27. package/lib/components/List/ListFactory.js.map +1 -1
  28. package/lib/components/List/helpers/index.js +0 -14
  29. package/lib/components/List/helpers/index.js.map +1 -1
  30. package/lib/components/SearchContent/SearchContent.js +6 -8
  31. package/lib/components/SearchContent/SearchContent.js.map +1 -1
  32. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js +11 -17
  33. package/lib/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  34. package/lib/components/SearchFilter/SearchFilterContainer.js +85 -63
  35. package/lib/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  36. package/lib/components/SearchFilter/helpers/build-filters-query.js +1 -3
  37. package/lib/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
  38. package/lib/components/SearchFilter/helpers/build-new-query.js +15 -0
  39. package/lib/components/SearchFilter/helpers/build-new-query.js.map +1 -0
  40. package/lib/components/SearchFilter/helpers/build-query.js +37 -0
  41. package/lib/components/SearchFilter/helpers/build-query.js.map +1 -0
  42. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js +43 -0
  43. package/lib/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -0
  44. package/lib/components/SearchFilter/helpers/index.js +11 -18
  45. package/lib/components/SearchFilter/helpers/index.js.map +1 -1
  46. package/lib/components/SearchFilter/index.js.map +1 -1
  47. package/lib/components/SearchFilterSort/SearchFilterSort.js +11 -31
  48. package/lib/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  49. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js +5 -19
  50. package/lib/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
  51. package/lib/components/SearchFilterSort/helpers/update-sort.js +5 -9
  52. package/lib/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
  53. package/lib/helpers/build-inherited-filters.js +0 -2
  54. package/lib/helpers/build-inherited-filters.js.map +1 -1
  55. package/lib/helpers/build-props-query.js +2 -5
  56. package/lib/helpers/build-props-query.js.map +1 -1
  57. package/lib/helpers/build-set-filters.js +1 -5
  58. package/lib/helpers/build-set-filters.js.map +1 -1
  59. package/lib/helpers/get-query-filters.js +8 -6
  60. package/lib/helpers/get-query-filters.js.map +1 -1
  61. package/lib/helpers/get-query-props.js +2 -13
  62. package/lib/helpers/get-query-props.js.map +1 -1
  63. package/lib/helpers/get-wrapped-value-with-link.js +3 -2
  64. package/lib/helpers/get-wrapped-value-with-link.js.map +1 -1
  65. package/lib/helpers/index.js +0 -14
  66. package/lib/helpers/index.js.map +1 -1
  67. package/lib/helpers/parse-props-to-display.js +8 -13
  68. package/lib/helpers/parse-props-to-display.js.map +1 -1
  69. package/lib/utils/get-class-modifiers.js +1 -1
  70. package/lib/utils/get-class-modifiers.js.map +1 -1
  71. package/lib-es/HOC/recreateOnNavigation.js +20 -0
  72. package/lib-es/HOC/recreateOnNavigation.js.map +1 -0
  73. package/lib-es/components/Button.js +1 -2
  74. package/lib-es/components/Button.js.map +1 -1
  75. package/lib-es/components/Card/CardsRender.js +7 -14
  76. package/lib-es/components/Card/CardsRender.js.map +1 -1
  77. package/lib-es/components/Card/helpers/index.js +0 -1
  78. package/lib-es/components/Card/helpers/index.js.map +1 -1
  79. package/lib-es/components/Code/Code.js +4 -8
  80. package/lib-es/components/Code/Code.js.map +1 -1
  81. package/lib-es/components/ContentGroupSection/ContentGroupSection.js +8 -4
  82. package/lib-es/components/ContentGroupSection/ContentGroupSection.js.map +1 -1
  83. package/lib-es/components/DataSummary/helpers/build-loop-props-content.js +1 -3
  84. package/lib-es/components/DataSummary/helpers/build-loop-props-content.js.map +1 -1
  85. package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -4
  86. package/lib-es/components/DataSummary/helpers/build-props-to-display-with-content.js.map +1 -1
  87. package/lib-es/components/Layout/Layout.js +3 -2
  88. package/lib-es/components/Layout/Layout.js.map +1 -1
  89. package/lib-es/components/Layout/LayoutFactory.js +14 -0
  90. package/lib-es/components/Layout/LayoutFactory.js.map +1 -0
  91. package/lib-es/components/Layout/LayoutWithStickyTimer.js +42 -0
  92. package/lib-es/components/Layout/LayoutWithStickyTimer.js.map +1 -0
  93. package/lib-es/components/Layout/index.js +2 -2
  94. package/lib-es/components/Layout/index.js.map +1 -1
  95. package/lib-es/components/List/ListFactory.js +12 -16
  96. package/lib-es/components/List/ListFactory.js.map +1 -1
  97. package/lib-es/components/List/helpers/index.js +0 -2
  98. package/lib-es/components/List/helpers/index.js.map +1 -1
  99. package/lib-es/components/SearchContent/SearchContent.js +6 -8
  100. package/lib-es/components/SearchContent/SearchContent.js.map +1 -1
  101. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js +11 -18
  102. package/lib-es/components/SearchFilter/SearchFilter/SearchFilter.js.map +1 -1
  103. package/lib-es/components/SearchFilter/SearchFilterContainer.js +72 -47
  104. package/lib-es/components/SearchFilter/SearchFilterContainer.js.map +1 -1
  105. package/lib-es/components/SearchFilter/helpers/build-filters-query.js +0 -2
  106. package/lib-es/components/SearchFilter/helpers/build-filters-query.js.map +1 -1
  107. package/lib-es/components/SearchFilter/helpers/build-new-query.js +6 -0
  108. package/lib-es/components/SearchFilter/helpers/build-new-query.js.map +1 -0
  109. package/lib-es/components/SearchFilter/helpers/build-query.js +23 -0
  110. package/lib-es/components/SearchFilter/helpers/build-query.js.map +1 -0
  111. package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js +26 -0
  112. package/lib-es/components/SearchFilter/helpers/get-initial-filter-values.js.map +1 -0
  113. package/lib-es/components/SearchFilter/helpers/index.js +4 -5
  114. package/lib-es/components/SearchFilter/helpers/index.js.map +1 -1
  115. package/lib-es/components/SearchFilter/index.js +2 -2
  116. package/lib-es/components/SearchFilter/index.js.map +1 -1
  117. package/lib-es/components/SearchFilterSort/SearchFilterSort.js +10 -26
  118. package/lib-es/components/SearchFilterSort/SearchFilterSort.js.map +1 -1
  119. package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js +4 -21
  120. package/lib-es/components/SearchFilterSort/helpers/handle-sort-update.js.map +1 -1
  121. package/lib-es/components/SearchFilterSort/helpers/update-sort.js +4 -8
  122. package/lib-es/components/SearchFilterSort/helpers/update-sort.js.map +1 -1
  123. package/lib-es/helpers/build-inherited-filters.js +0 -2
  124. package/lib-es/helpers/build-inherited-filters.js.map +1 -1
  125. package/lib-es/helpers/build-props-query.js +2 -4
  126. package/lib-es/helpers/build-props-query.js.map +1 -1
  127. package/lib-es/helpers/build-set-filters.js +1 -5
  128. package/lib-es/helpers/build-set-filters.js.map +1 -1
  129. package/lib-es/helpers/get-query-filters.js +8 -6
  130. package/lib-es/helpers/get-query-filters.js.map +1 -1
  131. package/lib-es/helpers/get-query-props.js +2 -10
  132. package/lib-es/helpers/get-query-props.js.map +1 -1
  133. package/lib-es/helpers/get-wrapped-value-with-link.js +2 -2
  134. package/lib-es/helpers/get-wrapped-value-with-link.js.map +1 -1
  135. package/lib-es/helpers/index.js +0 -2
  136. package/lib-es/helpers/index.js.map +1 -1
  137. package/lib-es/helpers/parse-props-to-display.js +9 -12
  138. package/lib-es/helpers/parse-props-to-display.js.map +1 -1
  139. package/lib-es/utils/get-class-modifiers.js +1 -1
  140. package/lib-es/utils/get-class-modifiers.js.map +1 -1
  141. package/package.json +10 -10
  142. package/src/HOC/recreateOnNavigation.js +21 -0
  143. package/src/components/Button.js +1 -2
  144. package/src/components/Card/CardsRender.js +7 -27
  145. package/src/components/Card/helpers/index.js +0 -1
  146. package/src/components/Code/Code.js +3 -7
  147. package/src/components/ContentGroupSection/ContentGroupSection.js +1 -1
  148. package/src/components/DataSummary/helpers/build-loop-props-content.js +1 -4
  149. package/src/components/DataSummary/helpers/build-props-to-display-with-content.js +3 -6
  150. package/src/components/Layout/Layout.js +29 -32
  151. package/src/components/Layout/LayoutFactory.js +17 -0
  152. package/src/components/Layout/LayoutWithStickyTimer.js +40 -0
  153. package/src/components/Layout/index.js +2 -2
  154. package/src/components/List/ListFactory.js +15 -25
  155. package/src/components/List/helpers/index.js +0 -2
  156. package/src/components/SearchContent/SearchContent.js +6 -8
  157. package/src/components/SearchFilter/SearchFilter/SearchFilter.js +12 -21
  158. package/src/components/SearchFilter/SearchFilterContainer.js +69 -57
  159. package/src/components/SearchFilter/helpers/build-filters-query.js +1 -9
  160. package/src/components/SearchFilter/helpers/build-new-query.js +6 -0
  161. package/src/components/SearchFilter/helpers/build-query.js +26 -0
  162. package/src/components/SearchFilter/helpers/get-initial-filter-values.js +30 -0
  163. package/src/components/SearchFilter/helpers/index.js +7 -9
  164. package/src/components/SearchFilter/index.js +2 -2
  165. package/src/components/SearchFilterSort/SearchFilterSort.js +8 -18
  166. package/src/components/SearchFilterSort/helpers/handle-sort-update.js +5 -14
  167. package/src/components/SearchFilterSort/helpers/update-sort.js +3 -7
  168. package/src/helpers/build-inherited-filters.js +1 -3
  169. package/src/helpers/build-props-query.js +2 -4
  170. package/src/helpers/build-set-filters.js +1 -2
  171. package/src/helpers/get-query-filters.js +4 -4
  172. package/src/helpers/get-query-props.js +4 -12
  173. package/src/helpers/get-wrapped-value-with-link.js +3 -6
  174. package/src/helpers/index.js +0 -2
  175. package/src/helpers/parse-props-to-display.js +21 -25
  176. package/src/utils/get-class-modifiers.js +1 -1
  177. package/tests/helpers/mocks.js +5 -3
  178. package/tests/unit/src/HOC/recreateOnNavigation.test.js +28 -0
  179. package/tests/unit/src/components/Code/Code.test.js +0 -5
  180. package/tests/unit/src/components/Code/__snapshots__/Code.test.js.snap +0 -8
  181. package/tests/unit/src/components/DataSummary/helpers/build-loop-props-content.test.js +0 -9
  182. package/tests/unit/src/components/Layout/Layout.test.js +1 -1
  183. package/tests/unit/src/components/Layout/LayoutFactory.test.js +53 -0
  184. package/tests/unit/src/components/SearchFilter/__snapshots__/SearchFilterContainer.test.js.snap +7 -1
  185. package/tests/unit/src/components/SearchFilter/helpers/build-new-query.test.js +10 -10
  186. package/tests/unit/src/components/SearchFilter/helpers/build-query.test.js +7 -24
  187. package/tests/unit/src/components/SearchFilter/helpers/get-initial-filter-values.test.js +10 -10
  188. package/tests/unit/src/components/SearchFilterSort/SearchFilterSort.test.js +1 -4
  189. package/tests/unit/src/components/SearchFilterSort/helpers/handle-sort-update.test.js +19 -26
  190. package/tests/unit/src/components/SearchFilterSort/helpers/update-sort.test.js +1 -10
  191. package/tests/unit/src/helpers/build-props-query.test.js +0 -25
  192. package/tests/unit/src/helpers/get-wrapped-value-with-link.test.js +2 -2
  193. package/tests/unit/src/helpers/parse-props-to-display.test.js +0 -4
  194. package/lib/components/Card/helpers/get-updated-items-to-display.js +0 -55
  195. package/lib/components/Card/helpers/get-updated-items-to-display.js.map +0 -1
  196. package/lib/components/List/helpers/get-list-query.js +0 -43
  197. package/lib/components/List/helpers/get-list-query.js.map +0 -1
  198. package/lib/components/List/helpers/get-list-specific-search-filter.js +0 -21
  199. package/lib/components/List/helpers/get-list-specific-search-filter.js.map +0 -1
  200. package/lib/components/List/helpers/strip-query-key.js +0 -14
  201. package/lib/components/List/helpers/strip-query-key.js.map +0 -1
  202. package/lib/components/SearchFilter/helpers/build-new-url.js +0 -17
  203. package/lib/components/SearchFilter/helpers/build-new-url.js.map +0 -1
  204. package/lib/components/SearchFilter/helpers/build-url-query.js +0 -48
  205. package/lib/components/SearchFilter/helpers/build-url-query.js.map +0 -1
  206. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -32
  207. package/lib/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +0 -1
  208. package/lib/components/SearchFilter/helpers/get-filter-values.js +0 -31
  209. package/lib/components/SearchFilter/helpers/get-filter-values.js.map +0 -1
  210. package/lib/components/SearchFilter/searchFilterReducer.js +0 -45
  211. package/lib/components/SearchFilter/searchFilterReducer.js.map +0 -1
  212. package/lib/helpers/build-query-key.js +0 -16
  213. package/lib/helpers/build-query-key.js.map +0 -1
  214. package/lib/helpers/process-data-summary-value.js +0 -56
  215. package/lib/helpers/process-data-summary-value.js.map +0 -1
  216. package/lib-es/components/Card/helpers/get-updated-items-to-display.js +0 -32
  217. package/lib-es/components/Card/helpers/get-updated-items-to-display.js.map +0 -1
  218. package/lib-es/components/List/helpers/get-list-query.js +0 -24
  219. package/lib-es/components/List/helpers/get-list-query.js.map +0 -1
  220. package/lib-es/components/List/helpers/get-list-specific-search-filter.js +0 -12
  221. package/lib-es/components/List/helpers/get-list-specific-search-filter.js.map +0 -1
  222. package/lib-es/components/List/helpers/strip-query-key.js +0 -6
  223. package/lib-es/components/List/helpers/strip-query-key.js.map +0 -1
  224. package/lib-es/components/SearchFilter/helpers/build-new-url.js +0 -8
  225. package/lib-es/components/SearchFilter/helpers/build-new-url.js.map +0 -1
  226. package/lib-es/components/SearchFilter/helpers/build-url-query.js +0 -30
  227. package/lib-es/components/SearchFilter/helpers/build-url-query.js.map +0 -1
  228. package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -18
  229. package/lib-es/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js.map +0 -1
  230. package/lib-es/components/SearchFilter/helpers/get-filter-values.js +0 -19
  231. package/lib-es/components/SearchFilter/helpers/get-filter-values.js.map +0 -1
  232. package/lib-es/components/SearchFilter/searchFilterReducer.js +0 -28
  233. package/lib-es/components/SearchFilter/searchFilterReducer.js.map +0 -1
  234. package/lib-es/helpers/build-query-key.js +0 -7
  235. package/lib-es/helpers/build-query-key.js.map +0 -1
  236. package/lib-es/helpers/process-data-summary-value.js +0 -36
  237. package/lib-es/helpers/process-data-summary-value.js.map +0 -1
  238. package/src/components/Card/helpers/get-updated-items-to-display.js +0 -32
  239. package/src/components/List/helpers/get-list-query.js +0 -28
  240. package/src/components/List/helpers/get-list-specific-search-filter.js +0 -10
  241. package/src/components/List/helpers/strip-query-key.js +0 -6
  242. package/src/components/SearchFilter/helpers/build-new-url.js +0 -8
  243. package/src/components/SearchFilter/helpers/build-url-query.js +0 -31
  244. package/src/components/SearchFilter/helpers/get-filter-ranges-and-checkboxes-values.js +0 -17
  245. package/src/components/SearchFilter/helpers/get-filter-values.js +0 -21
  246. package/src/components/SearchFilter/searchFilterReducer.js +0 -15
  247. package/src/helpers/build-query-key.js +0 -7
  248. package/src/helpers/process-data-summary-value.js +0 -22
  249. package/tests/unit/src/components/Card/helpers/get-updated-items-to-display.test.js +0 -72
  250. package/tests/unit/src/helpers/__snapshots__/get-wrapped-value-with-link.test.js.snap +0 -18
  251. package/tests/unit/src/helpers/prcoess-data-summary-value.test.js +0 -52
@@ -5,8 +5,8 @@ import debounce from 'lodash.debounce';
5
5
  import FiltersList from './FiltersList';
6
6
  import {
7
7
  isDeviceDesktop,
8
- buildUrlQuery,
9
- getFilterValues,
8
+ buildQuery,
9
+ getInitialFilterValues,
10
10
  getResponsiveFilterClassnames
11
11
  } from '../helpers';
12
12
  import CloseMobileForm from './CloseMobileForm';
@@ -16,7 +16,6 @@ import { SEARCH, REFINE, MORE_FILTERS_CLASSES } from '../constants';
16
16
 
17
17
  const SearchFilter = ({
18
18
  searchFilterRef,
19
- listComponentName,
20
19
  data,
21
20
  filters,
22
21
  hasUrl,
@@ -29,14 +28,13 @@ const SearchFilter = ({
29
28
  groupAfterDesktop,
30
29
  groupAfterMobile,
31
30
  filterValues,
32
- setAppliedFilters,
33
- query
31
+ setAppliedFilters
34
32
  }) => {
35
33
  const [moreFiltersMobileCollapsed, setMoreFiltersMobileCollapsed] = useState(true);
36
34
  const [moreFiltersDesktopCollapsed, setMoreFiltersDesktopCollapsed] = useState(true);
37
35
 
38
- const doSubmit = newValues => {
39
- const newQuery = buildUrlQuery(newValues, filters, listComponentName, query);
36
+ const doSubmit = (newValues = filterValues) => {
37
+ const newQuery = buildQuery(newValues, filters);
40
38
  handleSearch(newQuery);
41
39
  setMoreFiltersDesktopCollapsed(true);
42
40
  setMoreFiltersMobileCollapsed(true);
@@ -71,7 +69,7 @@ const SearchFilter = ({
71
69
  const formId = `filter-${name}-form`;
72
70
 
73
71
  const handleReset = () => {
74
- const newValues = getFilterValues(null, filters, {});
72
+ const newValues = getInitialFilterValues(null, filters, {});
75
73
  setAppliedFilters({ newValues, type: 'reset' });
76
74
  doSubmit(newValues);
77
75
  };
@@ -81,7 +79,7 @@ const SearchFilter = ({
81
79
  };
82
80
 
83
81
  const shouldGroup = !!(groupAfterDesktop || groupAfterMobile);
84
-
82
+ const shouldSearch = !hasUrl;
85
83
  return (
86
84
  <>
87
85
  <form
@@ -91,7 +89,7 @@ const SearchFilter = ({
91
89
  id={formId}
92
90
  onSubmit={e => {
93
91
  e.preventDefault();
94
- doSubmit(filterValues);
92
+ doSubmit();
95
93
  }}>
96
94
  {displaySearchFilter && (
97
95
  <CloseMobileForm handleClose={() => setDisplaySearchFilter(false)} />
@@ -103,7 +101,7 @@ const SearchFilter = ({
103
101
  <div className="filter__wrapper filter__wrapper--search-refine">
104
102
  {!shouldGroup && (
105
103
  <FiltersList
106
- shouldSearch={!hasUrl}
104
+ shouldSearch={shouldSearch}
107
105
  data={data}
108
106
  filters={filters}
109
107
  hasUrl={hasUrl}
@@ -116,7 +114,7 @@ const SearchFilter = ({
116
114
  {shouldGroup && (
117
115
  <>
118
116
  <FiltersList
119
- shouldSearch={!hasUrl}
117
+ shouldSearch={shouldSearch}
120
118
  data={data}
121
119
  filters={filters.slice(0, groupAfterMobile)}
122
120
  hasUrl={hasUrl}
@@ -138,7 +136,7 @@ const SearchFilter = ({
138
136
  <div className={moreFiltersMobileWrapperClass}>
139
137
  <div className={MORE_FILTERS_CLASSES.MOBILE_CONTENT}>
140
138
  <FiltersList
141
- shouldSearch={!hasUrl && isDeviceDesktop()}
139
+ shouldSearch={shouldSearch && isDeviceDesktop()}
142
140
  data={data}
143
141
  filters={filters.slice(
144
142
  groupAfterMobile,
@@ -235,14 +233,7 @@ SearchFilter.propTypes = {
235
233
  groupAfterDesktop: PropTypes.number.isRequired,
236
234
  groupAfterMobile: PropTypes.number.isRequired,
237
235
  filterValues: PropTypes.object.isRequired,
238
- setAppliedFilters: PropTypes.func.isRequired,
239
- listComponentName: PropTypes.string,
240
- query: PropTypes.object
241
- };
242
-
243
- SearchFilter.defaultProps = {
244
- listComponentName: '',
245
- query: {}
236
+ setAppliedFilters: PropTypes.func.isRequired
246
237
  };
247
238
 
248
239
  export default SearchFilter;
@@ -2,37 +2,33 @@ import React, { useState, useRef, useReducer, useEffect } from 'react';
2
2
  import { useRouter } from 'next/router';
3
3
  import { useQuery } from '@apollo/client';
4
4
  import PropTypes from 'prop-types';
5
- import { parseUrl } from 'query-string';
5
+ import { parseUrl, stringify } from 'query-string';
6
6
  import SearchFilter from './SearchFilter';
7
7
  import { withTitle } from '../../HOC';
8
8
  import { getSearchPublishedContent } from '../../application/query';
9
9
  import {
10
- buildNewUrl,
10
+ buildNewQuery,
11
11
  buildRawQueryStringified,
12
- getFilterValues,
13
- buildFiltersQuery,
14
- getFilterRangesAndCheckboxesValues
12
+ getInitialFilterValues,
13
+ buildFiltersQuery
15
14
  } from './helpers';
16
15
  import { getEntityData } from '../../helpers';
17
- import { RAW_RESULTS } from './constants';
16
+ import { RAW_RESULTS, RANGE, CHECKBOX_SELECT } from './constants';
18
17
  import { SCROLL_OFFSET } from '../../constants';
19
- import searchFilterReducer from './searchFilterReducer';
20
-
21
- const getFiltersUrlQuery = (query, listName) => {
22
- if (!listName) return query;
23
- const updatedQuery = {};
24
- const listKey = `pb[${listName}]`;
25
- Object.keys(query).forEach(queryKey => {
26
- const isListKey = queryKey.indexOf(`${listName}`) !== -1;
27
- if (!isListKey) return;
28
- const decodedQueryValue = Array.isArray(query[queryKey])
29
- ? query[queryKey].map(value => decodeURIComponent(value))
30
- : decodeURIComponent(query[queryKey]);
31
- const strippedKey = queryKey.substring(listKey.length + 1, queryKey.length - 1);
32
- if (isListKey) updatedQuery[strippedKey] = decodedQueryValue;
33
- });
34
18
 
35
- return updatedQuery;
19
+ const reducer = (state, action) => {
20
+ const { newValues, type, shouldSearch = true } = action;
21
+
22
+ switch (type) {
23
+ case 'update':
24
+ return { ...state, ...newValues, shouldSearch };
25
+ case 'resetSearch':
26
+ return { ...state, shouldSearch: false };
27
+ case 'reset':
28
+ return { ...newValues, shouldSearch: false };
29
+ default:
30
+ throw new Error();
31
+ }
36
32
  };
37
33
 
38
34
  const SearchFilterContainer = ({
@@ -45,8 +41,7 @@ const SearchFilterContainer = ({
45
41
  groupAfterDesktop,
46
42
  filterBy,
47
43
  filterByProperty,
48
- shouldAddFilters,
49
- listComponentName
44
+ shouldAddFilters
50
45
  }) => {
51
46
  const router = useRouter();
52
47
  const { asPath } = router;
@@ -54,10 +49,15 @@ const SearchFilterContainer = ({
54
49
  const [key, setKey] = useState(`filter-${name}`);
55
50
  const [displaySearchFilter, setDisplaySearchFilter] = useState(false);
56
51
  const [urlPath, setUrlPath] = useState(asPath); // used as asPath can take too long to update
57
- const { url: currentUrl, query } = parseUrl(urlPath);
58
- const updatedQuery = getFiltersUrlQuery(query, listComponentName);
59
-
60
- const [filterValues, dispatch] = useReducer(searchFilterReducer, null);
52
+ const {
53
+ url: currentUrl,
54
+ query: { sort, sortby },
55
+ query
56
+ } = parseUrl(urlPath);
57
+ const [filterValues, dispatch] = useReducer(
58
+ reducer,
59
+ getInitialFilterValues(null, filters, query)
60
+ );
61
61
 
62
62
  useEffect(
63
63
  () => {
@@ -66,19 +66,34 @@ const SearchFilterContainer = ({
66
66
  [asPath]
67
67
  );
68
68
 
69
+ const hasUrl = !!url;
70
+
71
+ const sortValues = sort && sortby ? stringify({ sort, sortby }) : '';
72
+ const baseQuery = sortValues ? `${currentUrl}?${sortValues}` : currentUrl;
73
+
69
74
  const action = getSearchPublishedContent(RAW_RESULTS);
70
- const [checkboxSelectValues, rangeValues] = getFilterRangesAndCheckboxesValues(filters);
75
+ const checkboxSelectValues = [];
76
+ const rangeValues = [];
77
+
78
+ filters.forEach(({ type, propsToDisplay }) => {
79
+ if (CHECKBOX_SELECT.includes(type)) {
80
+ checkboxSelectValues.push(propsToDisplay[0]);
81
+ } else if (type === RANGE) {
82
+ rangeValues.push(...propsToDisplay);
83
+ }
84
+ });
71
85
 
72
86
  const { docType } = getEntityData(entity);
73
87
 
74
- const filtersQuery = buildFiltersQuery({
75
- shouldAddFilters,
76
- query: filterValues || {},
77
- filterBy,
78
- filterByProperty,
79
- rangeValues,
80
- queryKeys: Object.keys(updatedQuery)
81
- });
88
+ const filtersQuery = shouldAddFilters
89
+ ? buildFiltersQuery({
90
+ query: filterValues,
91
+ filterBy,
92
+ filterByProperty,
93
+ rangeValues,
94
+ queryKeys: Object.keys(query)
95
+ })
96
+ : [];
82
97
 
83
98
  const rawQueryStringified = buildRawQueryStringified(
84
99
  checkboxSelectValues,
@@ -87,7 +102,7 @@ const SearchFilterContainer = ({
87
102
  filtersQuery
88
103
  );
89
104
 
90
- const { data, error, loading } = useQuery(action, {
105
+ const { data, error } = useQuery(action, {
91
106
  variables: { rawQueryStringified, limit: 0 }, // we only want aggs so limit=0 for no search results
92
107
  skip: !rawQueryStringified
93
108
  });
@@ -98,29 +113,30 @@ const SearchFilterContainer = ({
98
113
  const { searchPublishedContent: { rawResults: { aggregations: filterData } = {} } = {} } =
99
114
  data || {};
100
115
 
101
- if (!filterValues && !loading && filterData) {
102
- const newValues = getFilterValues(filterData, filters, updatedQuery);
103
- dispatch({ newValues, shouldSearch: false, type: 'update' });
116
+ if (filterValues.dataNotSet && filterData) {
117
+ const initialFilterValues = getInitialFilterValues(filterData, filters, query);
118
+ dispatch({ newValues: initialFilterValues, shouldSearch: false, type: 'update' });
104
119
  }
105
120
 
106
121
  const handleSearch = newQuery => {
107
122
  setDisplaySearchFilter(false);
108
- const hashBit = asPath.split('#')[1] || '';
109
- const parsedHashBit = hashBit ? `#${hashBit}` : '';
110
- scrollToFirstList();
123
+
111
124
  if (!newQuery) {
112
- const baseQuery = `${currentUrl}${parsedHashBit}`;
113
- return router.push('/Resolver', baseQuery, { shallow: !url, scroll: false }).then(() => {
125
+ scrollToFirstList();
126
+ setUrlPath(baseQuery);
127
+ return router.push('/Resolver', baseQuery, { shallow: !hasUrl, scroll: false }).then(() => {
114
128
  setKey(`filter-${name}:${Date.now()}`); // remove after range component update
115
129
  });
116
130
  }
117
- const newUrl = buildNewUrl(url, currentUrl, newQuery, hashBit);
118
- return router.push('/Resolver', newUrl, { shallow: !url, scroll: false });
131
+ const newUrl = buildNewQuery(url, currentUrl, newQuery, sortValues);
132
+ scrollToFirstList();
133
+ setUrlPath(newUrl);
134
+ return router.push('/Resolver', newUrl, { shallow: !hasUrl, scroll: false });
119
135
  };
120
136
 
121
137
  const scrollToFirstList = () => {
122
138
  const [list] = document.getElementsByClassName('list-top');
123
- const shouldScrollToFirstList = !url && list;
139
+ const shouldScrollToFirstList = !hasUrl && list;
124
140
 
125
141
  if (shouldScrollToFirstList) {
126
142
  window.scrollTo({
@@ -131,18 +147,16 @@ const SearchFilterContainer = ({
131
147
  window.scrollTo(0, 0);
132
148
  }
133
149
  };
134
- if (!filterValues || filterValues.dataNotSet) return null;
150
+ if (!filterValues) return '';
135
151
 
136
152
  return (
137
153
  <SearchFilter
138
154
  key={key}
139
155
  setAppliedFilters={dispatch}
140
- query={updatedQuery}
141
- listComponentName={listComponentName}
142
156
  searchFilterRef={searchFilterRef}
143
157
  data={filterData}
144
158
  filters={filters}
145
- hasUrl={!!url}
159
+ hasUrl={hasUrl}
146
160
  entity={entity}
147
161
  handleSearch={handleSearch}
148
162
  filterValues={filterValues}
@@ -166,8 +180,7 @@ SearchFilterContainer.propTypes = {
166
180
  groupAfterDesktop: PropTypes.number,
167
181
  filterBy: PropTypes.array,
168
182
  filterByProperty: PropTypes.array,
169
- shouldAddFilters: PropTypes.bool,
170
- listComponentName: PropTypes.string
183
+ shouldAddFilters: PropTypes.bool
171
184
  };
172
185
 
173
186
  SearchFilterContainer.defaultProps = {
@@ -179,8 +192,7 @@ SearchFilterContainer.defaultProps = {
179
192
  groupAfterDesktop: 0,
180
193
  filterBy: [],
181
194
  filterByProperty: [],
182
- shouldAddFilters: false,
183
- listComponentName: ''
195
+ shouldAddFilters: false
184
196
  };
185
197
 
186
198
  export default withTitle(SearchFilterContainer);
@@ -29,15 +29,7 @@ const builFilterObject = ({ queryKey, value, filters, isRange, isInQuery }) => {
29
29
  filters.push({ match: { [key]: filterValue } });
30
30
  });
31
31
  };
32
- const buildFiltersQuery = ({
33
- shouldAddFilters,
34
- query,
35
- filterBy,
36
- filterByProperty,
37
- rangeValues,
38
- queryKeys
39
- }) => {
40
- if (!shouldAddFilters) return [];
32
+ const buildFiltersQuery = ({ query, filterBy, filterByProperty, rangeValues, queryKeys }) => {
41
33
  const mustFilters = [];
42
34
  Object.keys(query).forEach(queryKey => {
43
35
  if (QUERY_KEYS_TO_IGNORE.includes(queryKey)) return;
@@ -0,0 +1,6 @@
1
+ const buildNewQuery = (url, currentUrl, queryParams, sortValues) => {
2
+ const newUrl = url ? `${url}?${queryParams}` : `${currentUrl}?${queryParams}`;
3
+ return sortValues ? `${newUrl}&${sortValues}` : newUrl;
4
+ };
5
+
6
+ export default buildNewQuery;
@@ -0,0 +1,26 @@
1
+ import { SEARCH_TERM, TEXT_SEARCH } from '../constants';
2
+ import parseFilterValue from './parse-filter-value';
3
+
4
+ const buildQuery = (filterValues, filters) => {
5
+ const newQuery = [];
6
+ const searchValue = filterValues[SEARCH_TERM]
7
+ ? encodeURIComponent(filterValues[SEARCH_TERM])
8
+ : '';
9
+ if (searchValue) newQuery.push(`${SEARCH_TERM}=${searchValue}`);
10
+
11
+ filters.forEach(({ propsToDisplay, type }) => {
12
+ if (type === TEXT_SEARCH) return;
13
+
14
+ propsToDisplay.forEach(prop => {
15
+ const value = filterValues[prop];
16
+ const parsedValue = parseFilterValue(prop, type, value);
17
+ if (parsedValue && !newQuery.includes(parsedValue)) {
18
+ newQuery.push(parsedValue);
19
+ }
20
+ });
21
+ });
22
+
23
+ return newQuery.join('&');
24
+ };
25
+
26
+ export default buildQuery;
@@ -0,0 +1,30 @@
1
+ import { SEARCH_TERM } from '../constants';
2
+ import getFilterValueFromQuery from './get-filter-value-from-query';
3
+
4
+ const getInitialFilterValues = (filterData, filters, query) => {
5
+ const filterValues = {};
6
+ filterValues[SEARCH_TERM] = query[SEARCH_TERM] || '';
7
+
8
+ if (!filterData) {
9
+ filters.forEach(filterProps => {
10
+ const {
11
+ propsToDisplay: [key]
12
+ } = filterProps;
13
+ filterValues[key] = query[key] ? getFilterValueFromQuery(key, filterProps, {}, query) : null;
14
+ });
15
+ filterValues.dataNotSet = true;
16
+ return filterValues;
17
+ }
18
+
19
+ Object.keys(filterData).forEach(key => {
20
+ const filterProps =
21
+ filters.find(({ propsToDisplay }) => propsToDisplay.find(prop => key === prop)) || {};
22
+ filterValues[key] = getFilterValueFromQuery(key, filterProps, filterData[key], query);
23
+ });
24
+
25
+ filterValues.dataNotSet = false;
26
+
27
+ return filterValues;
28
+ };
29
+
30
+ export default getInitialFilterValues;
@@ -1,4 +1,4 @@
1
- import buildNewUrl from './build-new-url';
1
+ import buildNewQuery from './build-new-query';
2
2
  import buildRawQueryStringified from './build-raw-query-stringified';
3
3
  import { decodeValue, encodeValue } from './decode-encode';
4
4
  import checkIfRangeUpdated from './check-if-range-updated';
@@ -10,15 +10,14 @@ import getIntersectedProp from './get-intersected-prop';
10
10
  import getRangeValue from './get-range-value';
11
11
  import getSelectOptions from './get-select-options';
12
12
  import isDeviceDesktop from './is-device-desktop';
13
- import getFilterValues from './get-filter-values';
13
+ import getInitialFilterValues from './get-initial-filter-values';
14
14
  import getFilterValueFromQuery from './get-filter-value-from-query';
15
- import buildUrlQuery from './build-url-query';
15
+ import buildQuery from './build-query';
16
16
  import buildFiltersQuery from './build-filters-query';
17
- import getFilterRangesAndCheckboxesValues from './get-filter-ranges-and-checkboxes-values';
18
17
 
19
18
  export {
20
- buildUrlQuery,
21
- buildNewUrl,
19
+ buildQuery,
20
+ buildNewQuery,
22
21
  buildRawQueryStringified,
23
22
  decodeValue,
24
23
  encodeValue,
@@ -31,8 +30,7 @@ export {
31
30
  getRangeValue,
32
31
  getSelectOptions,
33
32
  isDeviceDesktop,
34
- getFilterValues,
33
+ getInitialFilterValues,
35
34
  getFilterValueFromQuery,
36
- buildFiltersQuery,
37
- getFilterRangesAndCheckboxesValues
35
+ buildFiltersQuery
38
36
  };
@@ -1,3 +1,3 @@
1
- import SearchFilter from './SearchFilterContainer';
1
+ import SearchFilterContainer from './SearchFilterContainer';
2
2
 
3
- export default SearchFilter;
3
+ export default SearchFilterContainer;
@@ -1,23 +1,15 @@
1
1
  import React from 'react';
2
2
  import Select from '@blaze-react/select';
3
- import { useRouter } from 'next/router';
3
+ import { withRouter } from 'next/router';
4
4
  import { parseUrl } from 'query-string';
5
5
  import PropTypes from 'prop-types';
6
6
  import { DEFAULT_SORT } from './constants';
7
7
  import { handleSortUpdate } from './helpers';
8
8
  import { withTitle } from '../../HOC';
9
9
 
10
- const getSortFromQuery = listComponentName => {
11
- const listNameKey = listComponentName ? `pb[${listComponentName}]` : '';
12
- const sortKey = `${listNameKey}${listNameKey ? '[sort]' : 'sort'}`;
13
- const sortByKey = `${listNameKey}${listNameKey ? '[sortby]' : 'sortby'}`;
14
- return [sortKey, sortByKey];
15
- };
16
- const SearchFilterSort = ({ filters, elementLabel, selectLabel, id, listComponentName }) => {
17
- const router = useRouter();
10
+ const SearchFilterSort = ({ router, filters, elementLabel, selectLabel, id }) => {
18
11
  const { asPath } = router;
19
- const [sortKey, sortByKey] = getSortFromQuery(listComponentName);
20
- const { url, query, query: { [sortKey]: sort, [sortByKey]: sortby } = {} } = parseUrl(asPath);
12
+ const { url, query, query: { sort, sortby } = {} } = parseUrl(asPath);
21
13
  const selectedValue = `${sortby}:${sort}` || '';
22
14
  const defaultTextValue = selectLabel || DEFAULT_SORT;
23
15
  const options = filters.map(({ label: optionLabel, propsToDisplay, sort: sortValue }) => [
@@ -25,8 +17,7 @@ const SearchFilterSort = ({ filters, elementLabel, selectLabel, id, listComponen
25
17
  optionLabel
26
18
  ]);
27
19
 
28
- const setSortValue = ({ value }) =>
29
- handleSortUpdate({ router, value, query, url, selectLabel, listComponentName });
20
+ const setSortValue = ({ value }) => handleSortUpdate(router, value, query, url, selectLabel);
30
21
 
31
22
  return (
32
23
  <div className="sort-by">
@@ -43,19 +34,18 @@ const SearchFilterSort = ({ filters, elementLabel, selectLabel, id, listComponen
43
34
  };
44
35
 
45
36
  SearchFilterSort.propTypes = {
37
+ router: PropTypes.object.isRequired,
46
38
  filters: PropTypes.array,
47
39
  elementLabel: PropTypes.string,
48
40
  selectLabel: PropTypes.string,
49
- id: PropTypes.string,
50
- listComponentName: PropTypes.string
41
+ id: PropTypes.string
51
42
  };
52
43
 
53
44
  SearchFilterSort.defaultProps = {
54
45
  filters: [],
55
46
  elementLabel: '',
56
47
  selectLabel: '',
57
- id: '',
58
- listComponentName: ''
48
+ id: ''
59
49
  };
60
50
 
61
- export default withTitle(SearchFilterSort);
51
+ export default withRouter(withTitle(SearchFilterSort));
@@ -2,30 +2,21 @@ import { stringify } from 'query-string';
2
2
  import { DEFAULT_SORT, SORT, SORTBY, PAGINATION_QUERY } from '../constants';
3
3
  import updateSort from './update-sort';
4
4
 
5
- const handleSortUpdate = ({ router, value, query, url, selectLabel, listComponentName }) => {
5
+ const handleSortUpdate = (router, value, query, url, selectLabel) => {
6
6
  const queryWithoutSort = {};
7
7
  const routerOptions = { shallow: true, scroll: false };
8
- const { asPath } = router;
9
- const hashBit = asPath.split('#')[1];
10
- const parsedHash = hashBit ? `#${hashBit}` : '';
11
- const listNameKey = listComponentName ? `pb[${listComponentName}]` : '';
12
- const sortString = listNameKey ? `[${SORT}]` : SORT;
13
- const sortByString = listNameKey ? `[${SORTBY}]` : SORTBY;
14
- const sortKey = `${listNameKey}${sortString}`;
15
- const sortByKey = `${listNameKey}${sortByString}`;
16
8
  Object.keys(query).forEach(key => {
17
9
  if (key.indexOf(PAGINATION_QUERY) !== -1) return;
18
- if (key !== sortByKey && key !== sortKey) queryWithoutSort[key] = query[key];
10
+ if (key !== SORTBY && key !== SORT) queryWithoutSort[key] = query[key];
19
11
  });
20
12
  if (value === DEFAULT_SORT || value === selectLabel) {
21
13
  const stringifiedQuery = stringify(queryWithoutSort);
22
14
 
23
15
  return stringifiedQuery
24
- ? router.push(`/Resolver`, `${url}?${stringifiedQuery}${parsedHash}`, routerOptions)
25
- : router.push(`/Resolver`, `${url}${parsedHash}`, routerOptions);
16
+ ? router.push(`/Resolver`, `${url}?${stringifiedQuery}`, routerOptions)
17
+ : router.push(`/Resolver`, url, routerOptions);
26
18
  }
27
-
28
- const updatedSortUrl = updateSort(value, queryWithoutSort, url, parsedHash, listComponentName);
19
+ const updatedSortUrl = updateSort(value, queryWithoutSort, url);
29
20
  return router.push('/Resolver', updatedSortUrl, routerOptions);
30
21
  };
31
22
 
@@ -1,14 +1,10 @@
1
1
  import { stringify } from 'query-string';
2
- import { buildQueryKey } from '../../../helpers';
3
- import { SORT, SORTBY } from '../constants';
4
2
 
5
- const updateSort = (value, query, url, hashBit = '', listComponentName = '') => {
6
- const sortKey = buildQueryKey(SORT, listComponentName);
7
- const sortByKey = buildQueryKey(SORTBY, listComponentName);
3
+ const updateSort = (value, query, url) => {
8
4
  const [newSortBy, newSort] = value.split(':');
9
- const updatedQuery = { ...query, [sortByKey]: newSortBy, [sortKey]: newSort };
5
+ const updatedQuery = { ...query, sortby: newSortBy, sort: newSort };
10
6
  const parsedQuery = stringify(updatedQuery);
11
- return `${url}?${parsedQuery}${hashBit}`;
7
+ return `${url}?${parsedQuery}`;
12
8
  };
13
9
 
14
10
  export default updateSort;
@@ -1,7 +1,6 @@
1
1
  import flatten from 'lodash.flatten';
2
2
  import isFilterEntitysId from './is-filter-entitys-id';
3
3
  import getFilterProps from './get-filter-props';
4
- import { ID } from '../constants';
5
4
 
6
5
  const getRelationData = (entityData, relationName, currentRelationNames) => {
7
6
  if (!entityData) return null;
@@ -50,9 +49,8 @@ const buildInheritedFilters = (
50
49
  shouldIgnoreFilter
51
50
  } = getFilterProps(filter, currentSchema, filterEntitySchema);
52
51
 
53
- if (filterName === ID) return;
54
-
55
52
  const relationData = getRelationData(entityData, relationName, relationForeignKeys);
53
+
56
54
  if (
57
55
  (currentEntityId === entityName && isFilterEntitysId(filterName, currentEntityId)) ||
58
56
  shouldIgnoreFilter
@@ -44,21 +44,19 @@ const buildPropsQuery = (entitySchema, extraProps = [], cardOptions = null, link
44
44
  const buildComplexProps = (
45
45
  shouldAddCategoryProps,
46
46
  props,
47
- { relations = [], dynamicProperties = {}, properties = {} },
47
+ { relations = [], dynamicProperties = {} },
48
48
  linkProps
49
49
  ) =>
50
50
  Object.keys(props).map(base => {
51
51
  const nestedProps = props[base];
52
52
  const hasLink = !!linkProps.find(linkProp => linkProp.includes(base));
53
- const matchingProperty = !!properties[base];
54
53
  const matchingRelation = relations.find(({ localField }) => localField === base);
55
54
  const matchingDynamicProp = Object.keys(dynamicProperties).find(
56
55
  dynamicKey => dynamicKey === base
57
56
  );
58
57
 
59
58
  if (matchingRelation && !nestedProps.includes('id')) nestedProps.push('id');
60
- if (hasLink && (!!matchingProperty || !!matchingRelation || !!matchingDynamicProp))
61
- nestedProps.push('url');
59
+ if (hasLink && (!!matchingRelation || !!matchingDynamicProp)) nestedProps.push('url');
62
60
  const jointNestedProps = nestedProps.join(',');
63
61
  if (base === 'category' && shouldAddCategoryProps)
64
62
  return `${base}{${jointNestedProps}, ${categoryProps}}`;
@@ -31,9 +31,8 @@ const buildSetFilters = ({
31
31
  }
32
32
 
33
33
  const shouldApplyFilterValues = filterBy.length && filterByProperty.length;
34
- if (!shouldApplyFilterValues) return { checkboxFilters, listFilterValues: {} };
34
+ const listFilterValues = shouldApplyFilterValues ? getFilterValues(filterBy) : {};
35
35
 
36
- const listFilterValues = getFilterValues(filterBy);
37
36
  return { checkboxFilters, listFilterValues };
38
37
  };
39
38
 
@@ -2,9 +2,10 @@ import getSearchFilterType from './get-search-filter-type';
2
2
  import buildSearchValuesCheckboxSelect from './build-search-values-checkbox-select';
3
3
  import { RANGE, CHECKBOX, SELECT } from '../constants';
4
4
 
5
- const getQueryFilters = (searchFilter, query, listName) => {
6
- if (!searchFilter.settings || !searchFilter.settings.filters)
5
+ const getQueryFilters = (searchFilter, query) => {
6
+ if (!searchFilter.settings || !searchFilter.settings.filters) {
7
7
  return { valuesAnd: [], valuesOr: [] };
8
+ }
8
9
 
9
10
  const rangeFilters = getSearchFilterType(searchFilter, RANGE);
10
11
  const checkboxFilters = getSearchFilterType(searchFilter, CHECKBOX);
@@ -14,8 +15,7 @@ const getQueryFilters = (searchFilter, query, listName) => {
14
15
  query,
15
16
  rangeFilters,
16
17
  checkboxFilters,
17
- selectFilters,
18
- listName
18
+ selectFilters
19
19
  );
20
20
  return { valuesAnd, valuesOr };
21
21
  };