feat(search): add Search Intelligence module
This commit is contained in:
@@ -1 +1,27 @@
|
||||
export * from '../../../features/search/models/search-state.model';
|
||||
import { CatalogLayoutMode } from '../../products/models/catalog-experience.model';
|
||||
import { ProductSort } from '../../products/models/product-domain.model';
|
||||
import { SearchFilterState } from './search.model';
|
||||
|
||||
export interface SearchState {
|
||||
text: string;
|
||||
sort: ProductSort | 'discount';
|
||||
layout: CatalogLayoutMode;
|
||||
page: number;
|
||||
pageSize: number;
|
||||
filters: SearchFilterState;
|
||||
}
|
||||
|
||||
export function createInitialSearchState(pageSize = 24): SearchState {
|
||||
return {
|
||||
text: '',
|
||||
sort: 'relevance',
|
||||
layout: 'grid',
|
||||
page: 1,
|
||||
pageSize,
|
||||
filters: {
|
||||
values: {},
|
||||
ranges: {},
|
||||
toggles: {},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user