Skip to content

Commit b224475

Browse files
refactor(VCST-3676): delete using deprecated "keyword" search query parameter (#2081)
## Description ## References ### Jira-link: https://virtocommerce.atlassian.net/browse/VCST-3676 ### Artifact URL: https://vc3prerelease.blob.core.windows.net/packages/vc-theme-b2b-vue-2.36.0-pr-2081-32f8-32f8107b.zip
1 parent d183e9f commit b224475

File tree

5 files changed

+1
-25
lines changed

5 files changed

+1
-25
lines changed

client-app/core/enums/query-param-name.enum.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ export enum QueryParamName {
22
Page = "page",
33
Sort = "sort",
44
Facets = "facets",
5-
/** @deprecated use `SearchPhrase` instead */
6-
Keyword = "keyword",
75
ItemsPerPage = "size",
86
SearchPhrase = "q",
97
PreserveUserQuery = "preserveUserQuery",

client-app/shared/catalog/components/category.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
:facets-loading="fetchingFacets"
1212
:is-mobile="isMobile"
1313
:is-visible="isFiltersSidebarVisible"
14-
:keyword-query-param="keywordQueryParam"
1514
:loading="fetchingProducts"
1615
:hide-controls="hideControls"
1716
@hide-popup-sidebar="hideFiltersSidebar"
@@ -30,7 +29,6 @@
3029
/>
3130

3231
<ProductsFilters
33-
:keyword="keywordQueryParam"
3432
:filters="filtersToShow"
3533
:loading="fetchingProducts"
3634
class="category__product-filters"
@@ -142,7 +140,6 @@
142140
<CategoryHorizontalFilters
143141
v-if="isHorizontalFilters && !isMobile"
144142
:facets-loading="fetchingFacets"
145-
:keyword-query-param="keywordQueryParam"
146143
:sort-query-param="sortQueryParam"
147144
:loading="fetchingProducts || fetchingFacets"
148145
:filters="filtersToShow"
@@ -355,7 +352,6 @@ const {
355352
hasSelectedFacets,
356353
hasSelectedFilters,
357354
isFiltersSidebarVisible,
358-
keywordQueryParam,
359355
localStorageBranches,
360356
localStorageInStock,
361357
localStoragePurchasedBefore,
@@ -471,7 +467,7 @@ const searchParams = computedEager<ProductsSearchParamsType>(() => ({
471467
categoryId: props.categoryId,
472468
itemsPerPage: props.fixedProductsCount || itemsPerPage.value,
473469
sort: sortQueryParam.value,
474-
keyword: searchQueryParam.value || keywordQueryParam.value || props.keyword,
470+
keyword: searchQueryParam.value || props.keyword,
475471
filter: [
476472
props.filter,
477473
facetsQueryParam.value,

client-app/shared/catalog/components/category/category-horizontal-filters.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<ProductsFilters
33
class="category-horizontal-filters"
44
orientation="horizontal"
5-
:keyword="keywordQueryParam"
65
:filters="filters"
76
:loading="loading"
87
@change:filters="$emit('change:filters', $event)"
@@ -93,7 +92,6 @@ interface IEmits {
9392
9493
interface IProps {
9594
loading: boolean;
96-
keywordQueryParam: string;
9795
filters: ProductsFiltersType;
9896
hideSorting?: boolean;
9997
hideAllFilters?: boolean;

client-app/shared/catalog/components/category/filters-popup-sidebar.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
<ProductsFilters
99
v-if="localFilters"
1010
:id="productsFiltersId"
11-
:keyword="keywordQueryParam"
1211
:filters="localFilters"
1312
:loading="loading || facetsLoading"
1413
@change:filters="onProductsFiltersChange"
@@ -121,7 +120,6 @@ interface IProps {
121120
loading?: boolean;
122121
facetsLoading?: boolean;
123122
hideControls?: boolean;
124-
keywordQueryParam?: string;
125123
popupSidebarFilters: ProductsFiltersType;
126124
isExistSelectedFacets: boolean;
127125
}

client-app/shared/catalog/composables/useProducts.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ export function useProducts(
100100
defaultValue: "",
101101
});
102102

103-
/** @deprecated use `searchQueryParam` instead */
104-
const keywordQueryParam = useRouteQueryParam<string>(QueryParamName.Keyword, {
105-
defaultValue: "",
106-
});
107-
108103
const facetsQueryParam = useRouteQueryParam<string>(QueryParamName.Facets, {
109104
defaultValue: "",
110105
});
@@ -269,11 +264,6 @@ export function useProducts(
269264
preserveUserQueryQueryParam.value = "yes";
270265
}
271266

272-
/** @deprecated use `searchQueryParam` instead */
273-
function resetFilterKeyword(): void {
274-
keywordQueryParam.value = "";
275-
}
276-
277267
function resetSearchKeyword(): void {
278268
searchQueryParam.value = "";
279269
}
@@ -516,8 +506,6 @@ export function useProducts(
516506
hasSelectedFilters: computed(() => hasSelectedFilters()),
517507
isFiltersDirty: computed(() => !isEqual(prevProductsFilters.value, productsFilters.value)),
518508
isFiltersSidebarVisible: readonly(isFiltersSidebarVisible),
519-
/** @deprecated use `searchQueryParam` instead */
520-
keywordQueryParam,
521509
localStorageBranches,
522510
localStorageInStock,
523511
localStoragePurchasedBefore,
@@ -544,8 +532,6 @@ export function useProducts(
544532
hideFiltersSidebar,
545533
openBranchesModal,
546534
resetFacetFilters,
547-
/** @deprecated use `searchQueryParam` instead */
548-
resetFilterKeyword,
549535
resetSearchKeyword,
550536
showFiltersSidebar,
551537
updateProductsFilters,

0 commit comments

Comments
 (0)