@getlupa/client 0.6.0-alpha-11 → 0.6.0-alpha-14

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.
@@ -13,6 +13,7 @@ export default class OptionsModule extends VuexModule {
13
13
  get boxRoutingBehavior(): RoutingBehavior;
14
14
  get searchResultsRoutingBehavior(): RoutingBehavior;
15
15
  get defaultSearchResultPageSize(): number;
16
+ get currentResolutionPageSizes(): number[];
16
17
  setSearchBoxOptions({ options }: {
17
18
  options: SearchBoxOptions;
18
19
  }): void;
@@ -1,3 +1,4 @@
1
+ import { ScreenSize } from "@/types/General";
1
2
  import { LabeledFilter } from "@/types/search-results/Filters";
2
3
  import { ResultsLayout } from "@/types/search-results/ResultsLayout";
3
4
  import { ProductGrid } from "@/types/search-results/SearchResultsOptions";
@@ -20,9 +21,11 @@ export default class SearchResultModule extends VuexModule {
20
21
  get labeledFilters(): LabeledFilter[];
21
22
  get displayFilters(): LabeledFilter[];
22
23
  get currentFilterCount(): number;
24
+ get currentFilterKeys(): string[];
23
25
  get hasAnyFilter(): boolean;
24
26
  get itemRange(): number[];
25
27
  get isMobileWidth(): boolean;
28
+ get currentScreenWidth(): ScreenSize;
26
29
  setSidebarVisibility({ visible }: {
27
30
  visible: boolean;
28
31
  }): void;
@@ -32,6 +35,10 @@ export default class SearchResultModule extends VuexModule {
32
35
  addToCartAmount?: number;
33
36
  layout?: ResultsLayout;
34
37
  }): void;
38
+ queryFacet({ queryKey, facetKey, }: {
39
+ queryKey: string;
40
+ facetKey: string;
41
+ }): Promise<void>;
35
42
  load(loading: boolean): void;
36
43
  setScreenWidth({ width }: {
37
44
  width: number;
@@ -16,3 +16,4 @@ export declare type TrackingOptions = {
16
16
  };
17
17
  export declare type Environment = SdkEnvironment;
18
18
  export declare type SortDirection = "asc" | "desc";
19
+ export declare type ScreenSize = "xs" | "sm" | "md" | "l" | "xl";
@@ -37,6 +37,7 @@ export declare type SearchResultsOptionLabels = SearchResultsPaginationLabels &
37
37
  emptyResults: string;
38
38
  mobileFilterButton: string;
39
39
  htmlTitleTemplate: string;
40
+ outOfStock?: string;
40
41
  };
41
42
  export declare type SearchResultsAdditionalPanels = {
42
43
  additionalPanels?: SearchResultsAdditionalPanelOptions[];
@@ -69,9 +70,17 @@ export declare type SearchResultsPaginationLabels = {
69
70
  pageSize: string;
70
71
  showMore: string;
71
72
  };
73
+ export declare type ResponsiveSearchResultPageSizes = {
74
+ xs: number[];
75
+ sm: number[];
76
+ md: number[];
77
+ l: number[];
78
+ xl: number[];
79
+ };
80
+ export declare type SearchResultPageSizes = number[] | ResponsiveSearchResultPageSizes;
72
81
  export declare type SearchResultsPagination = {
73
82
  sizeSelection: {
74
- sizes: number[];
83
+ sizes: SearchResultPageSizes;
75
84
  position: SearchResultsPaginationPosition;
76
85
  };
77
86
  pageSelection: {
@@ -99,6 +108,9 @@ export declare type ResultCurrentFilterOptions = {
99
108
  };
100
109
  };
101
110
  export declare type FacetStyle = "sidebar" | "top-dropdown";
111
+ export declare type FacetFilterQuery = {
112
+ queryKey: string;
113
+ };
102
114
  export declare type ResultFacetOptions = {
103
115
  labels: {
104
116
  title: string;
@@ -130,6 +142,7 @@ export declare type ResultFacetOptions = {
130
142
  type: FacetStyle;
131
143
  };
132
144
  exclude?: string[];
145
+ facetFilterQueries?: Record<string, FacetFilterQuery>;
133
146
  };
134
147
  export declare type SearchResultsFilterOptions = {
135
148
  currentFilters?: ResultCurrentFilterOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlupa/client",
3
- "version": "0.6.0-alpha-11",
3
+ "version": "0.6.0-alpha-14",
4
4
  "main": "dist/cjs/index.min.js",
5
5
  "module": "dist/es/index.min.js",
6
6
  "types": "dist/es/index.d.ts",