@getlupa/client 0.6.0-alpha-2 → 0.6.0-alpha-5

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 (25) hide show
  1. package/dist/cjs/components/search-results/SearchResults.vue.d.ts +4 -4
  2. package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
  3. package/dist/cjs/constants/searchResults.const.d.ts +1 -0
  4. package/dist/cjs/index.d.ts +3 -2
  5. package/dist/cjs/index.min.js +69 -33
  6. package/dist/cjs/store/modules/searchResult.d.ts +5 -0
  7. package/dist/cjs/types/search-results/PaginationOptions.d.ts +1 -0
  8. package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +5 -1
  9. package/dist/es/components/search-results/SearchResults.vue.d.ts +4 -4
  10. package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
  11. package/dist/es/constants/searchResults.const.d.ts +1 -0
  12. package/dist/es/index.d.ts +3 -2
  13. package/dist/es/index.min.js +69 -33
  14. package/dist/es/store/modules/searchResult.d.ts +5 -0
  15. package/dist/es/types/search-results/PaginationOptions.d.ts +1 -0
  16. package/dist/es/types/search-results/SearchResultsOptions.d.ts +5 -1
  17. package/dist/iife/components/search-results/SearchResults.vue.d.ts +4 -4
  18. package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
  19. package/dist/iife/constants/searchResults.const.d.ts +1 -0
  20. package/dist/iife/index.d.ts +3 -2
  21. package/dist/iife/index.min.js +1 -1
  22. package/dist/iife/store/modules/searchResult.d.ts +5 -0
  23. package/dist/iife/types/search-results/PaginationOptions.d.ts +1 -0
  24. package/dist/iife/types/search-results/SearchResultsOptions.d.ts +5 -1
  25. package/package.json +1 -1
@@ -25,10 +25,6 @@ export default class SearchResults extends Vue {
25
25
  setDefaultLimit: (defaultLimit: number) => {
26
26
  defaultLimit: number;
27
27
  };
28
- handleNoResultsFlag: ({ resultCount, noResultsParam, }: {
29
- resultCount: number;
30
- noResultsParam?: string;
31
- }) => void;
32
28
  addParams: (params: QueryParams) => {
33
29
  params: QueryParams;
34
30
  };
@@ -64,6 +60,10 @@ export default class SearchResults extends Vue {
64
60
  queryKey: string;
65
61
  results: SearchQueryResult;
66
62
  }): void;
63
+ handleNoResults(results: SearchQueryResult): void;
64
+ setScreenWidth: ({ width, }: {
65
+ width: number;
66
+ }) => void;
67
67
  setColumnCount: ({ width, grid, }: {
68
68
  width: number;
69
69
  grid: ProductGrid;
@@ -5,6 +5,8 @@ export default class SearchResultsPageSelect extends Vue {
5
5
  lastPageLabel: string;
6
6
  firstPageLabel: string;
7
7
  options: PaginationPageSelect;
8
+ isMobileWidth: boolean;
9
+ get pageOptionsCount(): number;
8
10
  get pages(): number[];
9
11
  get showBack(): boolean;
10
12
  get lastPage(): number | undefined;
@@ -46,6 +46,7 @@ export declare const DEFAULT_OPTIONS_RESULTS: {
46
46
  bottom: boolean;
47
47
  };
48
48
  display: number;
49
+ displayMobile: number;
49
50
  };
50
51
  };
51
52
  sort: never[];
@@ -1,5 +1,5 @@
1
1
  import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
2
- import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
2
+ import { FacetStyle, SearchResultEventCallbacks, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
3
3
  import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
4
4
  import { ProductListOptions } from "./types/product-list/ProductListOptions";
5
5
  import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, TitleDocumentElement } from "./types/DocumentElement";
@@ -7,6 +7,7 @@ import { SearchBoxPanelType } from "./types/search-box/SearchBoxPanel";
7
7
  import { RoutingBehavior } from "./types/search-results/RoutingBehavior";
8
8
  import { AnchorPosition } from "./types/search-results/SearchResultsProductCardOptions";
9
9
  import { BadgeType } from "./types/search-results/BadgeOptions";
10
+ import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
10
11
  declare const lupaSearch: {
11
12
  searchBox: (options: SearchBoxOptions) => void;
12
13
  searchResults: (options: SearchResultsOptions) => void;
@@ -16,5 +17,5 @@ declare const lupaSearch: {
16
17
  clearSearchResults: () => void;
17
18
  clearProductList: () => void;
18
19
  };
19
- export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, };
20
+ export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, };
20
21
  export default lupaSearch;
@@ -24229,7 +24229,8 @@ var DEFAULT_OPTIONS_RESULTS = {
24229
24229
  top: false,
24230
24230
  bottom: true
24231
24231
  },
24232
- display: 5
24232
+ display: 5,
24233
+ displayMobile: 3
24233
24234
  }
24234
24235
  },
24235
24236
  sort: [],
@@ -25608,7 +25609,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
25608
25609
  return getMostSpecificHierarchyTerms([param].concat(_toConsumableArray(params)));
25609
25610
  };
25610
25611
 
25611
- var searchResult$g = namespace("searchResult");
25612
+ var searchResult$h = namespace("searchResult");
25612
25613
  var params$c = namespace("params");
25613
25614
  var options$8 = namespace("options");
25614
25615
 
@@ -25679,13 +25680,13 @@ __decorate([Prop({
25679
25680
  default: false
25680
25681
  })], CurrentFilters.prototype, "expandable", void 0);
25681
25682
 
25682
- __decorate([searchResult$g.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
25683
+ __decorate([searchResult$h.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
25683
25684
 
25684
- __decorate([searchResult$g.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
25685
+ __decorate([searchResult$h.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
25685
25686
 
25686
- __decorate([searchResult$g.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
25687
+ __decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
25687
25688
 
25688
- __decorate([searchResult$g.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
25689
+ __decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
25689
25690
 
25690
25691
  __decorate([options$8.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
25691
25692
 
@@ -29684,7 +29685,7 @@ var scrollTo = function scrollTo(elementId) {
29684
29685
  });
29685
29686
  };
29686
29687
 
29687
- var searchResult$f = namespace("searchResult");
29688
+ var searchResult$g = namespace("searchResult");
29688
29689
  var params$b = namespace("params");
29689
29690
 
29690
29691
  var Facets = /*#__PURE__*/function (_Vue) {
@@ -29768,7 +29769,7 @@ __decorate([Prop({
29768
29769
 
29769
29770
  __decorate([params$b.Getter("filters")], Facets.prototype, "currentFilters", void 0);
29770
29771
 
29771
- __decorate([searchResult$f.Getter("facets")], Facets.prototype, "facets", void 0);
29772
+ __decorate([searchResult$g.Getter("facets")], Facets.prototype, "facets", void 0);
29772
29773
 
29773
29774
  __decorate([params$b.Action("removeParams")], Facets.prototype, "removeParams", void 0);
29774
29775
 
@@ -30261,7 +30262,7 @@ var __vue_component__$D = /*#__PURE__*/normalizeComponent({
30261
30262
  staticRenderFns: __vue_staticRenderFns__$D
30262
30263
  }, __vue_inject_styles__$D, __vue_script__$D, __vue_scope_id__$D, __vue_is_functional_template__$D, __vue_module_identifier__$D, false, undefined, undefined, undefined);
30263
30264
 
30264
- var searchResult$e = namespace("searchResult");
30265
+ var searchResult$f = namespace("searchResult");
30265
30266
 
30266
30267
  var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
30267
30268
  _inherits(MobileFilterSidebar, _Vue);
@@ -30309,13 +30310,13 @@ var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
30309
30310
 
30310
30311
  __decorate([Prop()], MobileFilterSidebar.prototype, "options", void 0);
30311
30312
 
30312
- __decorate([searchResult$e.Mutation("setSidebarVisibility")], MobileFilterSidebar.prototype, "setSidebarVisibility", void 0);
30313
+ __decorate([searchResult$f.Mutation("setSidebarVisibility")], MobileFilterSidebar.prototype, "setSidebarVisibility", void 0);
30313
30314
 
30314
- __decorate([searchResult$e.State(function (state) {
30315
+ __decorate([searchResult$f.State(function (state) {
30315
30316
  return state.isMobileSidebarVisible;
30316
30317
  })], MobileFilterSidebar.prototype, "isMobileSidebarVisible", void 0);
30317
30318
 
30318
- __decorate([searchResult$e.Getter("currentFilterCount")], MobileFilterSidebar.prototype, "currentFilterCount", void 0);
30319
+ __decorate([searchResult$f.Getter("currentFilterCount")], MobileFilterSidebar.prototype, "currentFilterCount", void 0);
30319
30320
 
30320
30321
  MobileFilterSidebar = __decorate([Component({
30321
30322
  name: "mobileFilerSidebar",
@@ -30384,7 +30385,7 @@ var __vue_component__$C = /*#__PURE__*/normalizeComponent({
30384
30385
  staticRenderFns: __vue_staticRenderFns__$C
30385
30386
  }, __vue_inject_styles__$C, __vue_script__$C, __vue_scope_id__$C, __vue_is_functional_template__$C, __vue_module_identifier__$C, false, undefined, undefined, undefined);
30386
30387
 
30387
- var searchResult$d = namespace("searchResult");
30388
+ var searchResult$e = namespace("searchResult");
30388
30389
  var params$a = namespace("params");
30389
30390
 
30390
30391
  var SearchResultsDidYouMean = /*#__PURE__*/function (_Vue) {
@@ -30437,7 +30438,7 @@ __decorate([Prop({
30437
30438
  default: ""
30438
30439
  })], SearchResultsDidYouMean.prototype, "labels", void 0);
30439
30440
 
30440
- __decorate([searchResult$d.State(function (state) {
30441
+ __decorate([searchResult$e.State(function (state) {
30441
30442
  return state.searchResult;
30442
30443
  })], SearchResultsDidYouMean.prototype, "searchResult", void 0);
30443
30444
 
@@ -31587,7 +31588,7 @@ var __vue_component__$r = /*#__PURE__*/normalizeComponent({
31587
31588
  staticRenderFns: __vue_staticRenderFns__$r
31588
31589
  }, __vue_inject_styles__$r, __vue_script__$r, __vue_scope_id__$r, __vue_is_functional_template__$r, __vue_module_identifier__$r, false, undefined, undefined, undefined);
31589
31590
 
31590
- var searchResult$c = namespace("searchResult");
31591
+ var searchResult$d = namespace("searchResult");
31591
31592
 
31592
31593
  var SearchResultsProductAddToCart = /*#__PURE__*/function (_Vue) {
31593
31594
  _inherits(SearchResultsProductAddToCart, _Vue);
@@ -31648,7 +31649,7 @@ __decorate([Prop({
31648
31649
  default: true
31649
31650
  })], SearchResultsProductAddToCart.prototype, "inStock", void 0);
31650
31651
 
31651
- __decorate([searchResult$c.State(function (state) {
31652
+ __decorate([searchResult$d.State(function (state) {
31652
31653
  return state.addToCartAmount;
31653
31654
  })], SearchResultsProductAddToCart.prototype, "addToCartAmount", void 0);
31654
31655
 
@@ -32025,7 +32026,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
32025
32026
 
32026
32027
  var tracking$3 = namespace("tracking");
32027
32028
  var params$9 = namespace("params");
32028
- var searchResult$b = namespace("searchResult");
32029
+ var searchResult$c = namespace("searchResult");
32029
32030
  var options$4 = namespace("options");
32030
32031
 
32031
32032
  var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
@@ -32193,7 +32194,7 @@ __decorate([Prop({
32193
32194
  default: false
32194
32195
  })], SearchResultsProductCard.prototype, "isAdditionalPanel", void 0);
32195
32196
 
32196
- __decorate([searchResult$b.State(function (state) {
32197
+ __decorate([searchResult$c.State(function (state) {
32197
32198
  return state.layout;
32198
32199
  })], SearchResultsProductCard.prototype, "layout", void 0);
32199
32200
 
@@ -32901,6 +32902,7 @@ var __vue_component__$j = /*#__PURE__*/normalizeComponent({
32901
32902
  }, __vue_inject_styles__$j, __vue_script__$j, __vue_scope_id__$j, __vue_is_functional_template__$j, __vue_module_identifier__$j, false, undefined, undefined, undefined);
32902
32903
 
32903
32904
  var params$6 = namespace("params");
32905
+ var searchResult$b = namespace("searchResult");
32904
32906
 
32905
32907
  var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
32906
32908
  _inherits(SearchResultsPageSelect, _Vue);
@@ -32914,12 +32916,17 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
32914
32916
  }
32915
32917
 
32916
32918
  _createClass(SearchResultsPageSelect, [{
32919
+ key: "pageOptionsCount",
32920
+ get: function get() {
32921
+ return this.isMobileWidth ? this.options.displayMobile : this.options.display;
32922
+ }
32923
+ }, {
32917
32924
  key: "pages",
32918
32925
  get: function get() {
32919
32926
  var currentPage = Math.min(this.options.count, this.options.selectedPage);
32920
- var delta = Math.floor(this.options.display / 2),
32927
+ var delta = Math.floor(this.pageOptionsCount / 2),
32921
32928
  left = currentPage - delta,
32922
- right = currentPage + (this.options.display - delta);
32929
+ right = currentPage + (this.pageOptionsCount - delta);
32923
32930
  return Array.from({
32924
32931
  length: this.options.count
32925
32932
  }, function (v, k) {
@@ -32992,6 +32999,8 @@ __decorate([Prop({
32992
32999
  default: {}
32993
33000
  })], SearchResultsPageSelect.prototype, "options", void 0);
32994
33001
 
33002
+ __decorate([searchResult$b.Getter("isMobileWidth")], SearchResultsPageSelect.prototype, "isMobileWidth", void 0);
33003
+
32995
33004
  __decorate([params$6.Action("appendParams")], SearchResultsPageSelect.prototype, "appendParams", void 0);
32996
33005
 
32997
33006
  SearchResultsPageSelect = __decorate([Component({
@@ -33638,7 +33647,8 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
33638
33647
  pageSelect: {
33639
33648
  count: getPageCount(this.searchResult.total, this.limit),
33640
33649
  selectedPage: this.page,
33641
- display: pageSelect.display
33650
+ display: pageSelect.display,
33651
+ displayMobile: pageSelect.displayMobile
33642
33652
  },
33643
33653
  labels: this.options.labels
33644
33654
  };
@@ -34847,17 +34857,24 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
34847
34857
  value: function handleResults(_ref) {
34848
34858
  var queryKey = _ref.queryKey,
34849
34859
  results = _ref.results;
34850
-
34851
- var _a;
34852
-
34853
34860
  this.trackResults({
34854
34861
  queryKey: queryKey,
34855
34862
  results: results
34856
34863
  });
34857
- this.handleNoResultsFlag({
34858
- resultCount: (_a = results === null || results === void 0 ? void 0 : results.total) !== null && _a !== void 0 ? _a : 0,
34859
- noResultsParam: this.options.noResultsQueryFlag
34860
- });
34864
+ this.handleNoResults(results);
34865
+ }
34866
+ }, {
34867
+ key: "handleNoResults",
34868
+ value: function handleNoResults(results) {
34869
+ var _a, _b, _c;
34870
+
34871
+ var hasResults = Boolean(results.total > 0 || ((_a = results.similarQueries) === null || _a === void 0 ? void 0 : _a.length) || ((_b = results.didYouMean) === null || _b === void 0 ? void 0 : _b.options));
34872
+
34873
+ if (hasResults) {
34874
+ return;
34875
+ }
34876
+
34877
+ (_c = this.options.callbacks) === null || _c === void 0 ? void 0 : _c.noResults();
34861
34878
  }
34862
34879
  }, {
34863
34880
  key: "handleResize",
@@ -34868,6 +34885,9 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
34868
34885
  width: window.innerWidth,
34869
34886
  grid: this.options.grid
34870
34887
  });
34888
+ this.setScreenWidth({
34889
+ width: window.innerWidth
34890
+ });
34871
34891
  }
34872
34892
  }]);
34873
34893
 
@@ -34900,8 +34920,6 @@ __decorate([params$1.State("searchString")], SearchResults.prototype, "searchStr
34900
34920
 
34901
34921
  __decorate([params$1.Action("setDefaultLimit")], SearchResults.prototype, "setDefaultLimit", void 0);
34902
34922
 
34903
- __decorate([params$1.Action("handleNoResultsFlag")], SearchResults.prototype, "handleNoResultsFlag", void 0);
34904
-
34905
34923
  __decorate([params$1.Action("add")], SearchResults.prototype, "addParams", void 0);
34906
34924
 
34907
34925
  __decorate([params$1.Action("removeParams")], SearchResults.prototype, "removeParams", void 0);
@@ -34920,6 +34938,8 @@ __decorate([searchResult$1.Action("setLoading")], SearchResults.prototype, "setL
34920
34938
 
34921
34939
  __decorate([options$1.Getter("defaultSearchResultPageSize")], SearchResults.prototype, "defaultSearchResultPageSize", void 0);
34922
34940
 
34941
+ __decorate([searchResult$1.Mutation("setScreenWidth")], SearchResults.prototype, "setScreenWidth", void 0);
34942
+
34923
34943
  __decorate([searchResult$1.Action("setColumnCount")], SearchResults.prototype, "setColumnCount", void 0);
34924
34944
 
34925
34945
  SearchResults = __decorate([Component({
@@ -36376,6 +36396,8 @@ var setDocumentTitle = function setDocumentTitle(template) {
36376
36396
  document.title = addParamsToLabel(template, textToInsert);
36377
36397
  };
36378
36398
 
36399
+ var MOBILE_WIDTH = 767;
36400
+
36379
36401
  var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36380
36402
  _inherits(SearchResultModule, _VuexModule);
36381
36403
 
@@ -36393,6 +36415,7 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36393
36415
  _this.layout = ResultsLayoutEnum.GRID;
36394
36416
  _this.loading = false;
36395
36417
  _this.isMobileSidebarVisible = false;
36418
+ _this.screenWidth = 1000;
36396
36419
  return _this;
36397
36420
  }
36398
36421
 
@@ -36468,6 +36491,11 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36468
36491
  var offset = (_b = this.searchResult.offset) !== null && _b !== void 0 ? _b : 0;
36469
36492
  return [offset + 1, Math.min(offset + limit, this.totalItems)];
36470
36493
  }
36494
+ }, {
36495
+ key: "isMobileWidth",
36496
+ get: function get() {
36497
+ return this.screenWidth < MOBILE_WIDTH;
36498
+ }
36471
36499
  }, {
36472
36500
  key: "setSidebarVisibility",
36473
36501
  value: function setSidebarVisibility(_ref) {
@@ -36491,6 +36519,12 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36491
36519
  value: function load(loading) {
36492
36520
  this.loading = loading || false;
36493
36521
  }
36522
+ }, {
36523
+ key: "setScreenWidth",
36524
+ value: function setScreenWidth(_ref3) {
36525
+ var width = _ref3.width;
36526
+ this.screenWidth = width;
36527
+ }
36494
36528
  }, {
36495
36529
  key: "add",
36496
36530
  value: function add(searchResult) {
@@ -36509,9 +36543,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36509
36543
  }
36510
36544
  }, {
36511
36545
  key: "setColumnCount",
36512
- value: function setColumnCount(_ref3) {
36513
- var width = _ref3.width,
36514
- grid = _ref3.grid;
36546
+ value: function setColumnCount(_ref4) {
36547
+ var width = _ref4.width,
36548
+ grid = _ref4.grid;
36515
36549
 
36516
36550
  if (!width || !grid) {
36517
36551
  return {
@@ -36583,6 +36617,8 @@ __decorate([Mutation], SearchResultModule.prototype, "save", null);
36583
36617
 
36584
36618
  __decorate([Mutation], SearchResultModule.prototype, "load", null);
36585
36619
 
36620
+ __decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
36621
+
36586
36622
  __decorate([Action({
36587
36623
  commit: "save"
36588
36624
  })], SearchResultModule.prototype, "add", null);
@@ -10,6 +10,7 @@ export default class SearchResultModule extends VuexModule {
10
10
  layout: ResultsLayout;
11
11
  loading: boolean;
12
12
  isMobileSidebarVisible: boolean;
13
+ screenWidth: number;
13
14
  get facets(): FacetResult[] | undefined;
14
15
  get currentFilters(): FilterGroup | undefined;
15
16
  get filters(): FilterGroup;
@@ -21,6 +22,7 @@ export default class SearchResultModule extends VuexModule {
21
22
  get currentFilterCount(): number;
22
23
  get hasAnyFilter(): boolean;
23
24
  get itemRange(): number[];
25
+ get isMobileWidth(): boolean;
24
26
  setSidebarVisibility({ visible }: {
25
27
  visible: boolean;
26
28
  }): void;
@@ -31,6 +33,9 @@ export default class SearchResultModule extends VuexModule {
31
33
  layout?: ResultsLayout;
32
34
  }): void;
33
35
  load(loading: boolean): void;
36
+ setScreenWidth({ width }: {
37
+ width: number;
38
+ }): void;
34
39
  add(searchResult: SearchQueryResult): {
35
40
  searchResult: SearchQueryResult;
36
41
  pageSize: number;
@@ -12,6 +12,7 @@ export declare type PaginationPageSelect = {
12
12
  count: number;
13
13
  selectedPage: number;
14
14
  display: number;
15
+ displayMobile: number;
15
16
  };
16
17
  export declare type PaginationDisplay = {
17
18
  pageSize: boolean;
@@ -7,8 +7,8 @@ export declare type SearchResultsOptions = SearchResultsProductOptions & SearchR
7
7
  containerSelector: string;
8
8
  breadcrumbs: SearchResultsBreadcrumb[];
9
9
  classMap?: Record<string, string>;
10
- noResultsQueryFlag?: string;
11
10
  disallowEmptyQuery?: boolean;
11
+ callbacks?: SearchResultEventCallbacks;
12
12
  };
13
13
  export declare type SearchTitlePosition = "page-top" | "search-results-top";
14
14
  export declare type SearchResultsDidYouMeanLabels = {
@@ -19,6 +19,9 @@ export declare type SearchResultsSimilarQueriesLabels = {
19
19
  similarQuery: string;
20
20
  similarQueries: string;
21
21
  };
22
+ export declare type SearchResultEventCallbacks = {
23
+ noResults: () => void;
24
+ };
22
25
  export declare type SearchResultsOptionLabels = SearchResultsPaginationLabels & SearchResultsDidYouMeanLabels & SearchResultsSimilarQueriesLabels & {
23
26
  sortBy: string;
24
27
  currency: string;
@@ -68,6 +71,7 @@ export declare type SearchResultsPagination = {
68
71
  pageSelection: {
69
72
  position: SearchResultsPaginationPosition;
70
73
  display: number;
74
+ displayMobile: number;
71
75
  };
72
76
  };
73
77
  export declare type SearchResultsPaginationPosition = {
@@ -25,10 +25,6 @@ export default class SearchResults extends Vue {
25
25
  setDefaultLimit: (defaultLimit: number) => {
26
26
  defaultLimit: number;
27
27
  };
28
- handleNoResultsFlag: ({ resultCount, noResultsParam, }: {
29
- resultCount: number;
30
- noResultsParam?: string;
31
- }) => void;
32
28
  addParams: (params: QueryParams) => {
33
29
  params: QueryParams;
34
30
  };
@@ -64,6 +60,10 @@ export default class SearchResults extends Vue {
64
60
  queryKey: string;
65
61
  results: SearchQueryResult;
66
62
  }): void;
63
+ handleNoResults(results: SearchQueryResult): void;
64
+ setScreenWidth: ({ width, }: {
65
+ width: number;
66
+ }) => void;
67
67
  setColumnCount: ({ width, grid, }: {
68
68
  width: number;
69
69
  grid: ProductGrid;
@@ -5,6 +5,8 @@ export default class SearchResultsPageSelect extends Vue {
5
5
  lastPageLabel: string;
6
6
  firstPageLabel: string;
7
7
  options: PaginationPageSelect;
8
+ isMobileWidth: boolean;
9
+ get pageOptionsCount(): number;
8
10
  get pages(): number[];
9
11
  get showBack(): boolean;
10
12
  get lastPage(): number | undefined;
@@ -46,6 +46,7 @@ export declare const DEFAULT_OPTIONS_RESULTS: {
46
46
  bottom: boolean;
47
47
  };
48
48
  display: number;
49
+ displayMobile: number;
49
50
  };
50
51
  };
51
52
  sort: never[];
@@ -1,5 +1,5 @@
1
1
  import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
2
- import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
2
+ import { FacetStyle, SearchResultEventCallbacks, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
3
3
  import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
4
4
  import { ProductListOptions } from "./types/product-list/ProductListOptions";
5
5
  import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, TitleDocumentElement } from "./types/DocumentElement";
@@ -7,6 +7,7 @@ import { SearchBoxPanelType } from "./types/search-box/SearchBoxPanel";
7
7
  import { RoutingBehavior } from "./types/search-results/RoutingBehavior";
8
8
  import { AnchorPosition } from "./types/search-results/SearchResultsProductCardOptions";
9
9
  import { BadgeType } from "./types/search-results/BadgeOptions";
10
+ import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
10
11
  declare const lupaSearch: {
11
12
  searchBox: (options: SearchBoxOptions) => void;
12
13
  searchResults: (options: SearchResultsOptions) => void;
@@ -16,5 +17,5 @@ declare const lupaSearch: {
16
17
  clearSearchResults: () => void;
17
18
  clearProductList: () => void;
18
19
  };
19
- export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, };
20
+ export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, DocumentElement, ImageDocumentElement, TitleDocumentElement, DescriptionDocumentElement, CustomDocumentElement, PriceElement, RegularPriceDocumentElement, RatingElement, AddToCartElement, CustomHtmlElement, SortOptions, SearchResultsSortOptions, SearchResultEventCallbacks, };
20
21
  export default lupaSearch;