@getlupa/client 0.6.0-alpha-10 → 0.6.0-alpha-13

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.
@@ -22143,7 +22143,7 @@ var getPageUrl = function getPageUrl(pathnameOverride) {
22143
22143
 
22144
22144
  var history$3 = namespace("history");
22145
22145
  var tracking$5 = namespace("tracking");
22146
- var options$b = namespace("options");
22146
+ var options$c = namespace("options");
22147
22147
 
22148
22148
  var SearchBoxProduct = /*#__PURE__*/function (_Vue) {
22149
22149
  _inherits(SearchBoxProduct, _Vue);
@@ -22241,7 +22241,7 @@ __decorate([Prop({
22241
22241
  default: false
22242
22242
  })], SearchBoxProduct.prototype, "highlighted", void 0);
22243
22243
 
22244
- __decorate([options$b.Getter("boxRoutingBehavior")], SearchBoxProduct.prototype, "boxRoutingBehavior", void 0);
22244
+ __decorate([options$c.Getter("boxRoutingBehavior")], SearchBoxProduct.prototype, "boxRoutingBehavior", void 0);
22245
22245
 
22246
22246
  __decorate([tracking$5.Action("track")], SearchBoxProduct.prototype, "trackClick", void 0);
22247
22247
 
@@ -23672,7 +23672,7 @@ var defaultSuggestedValue = {
23672
23672
  var history$1 = namespace("history");
23673
23673
  var params$d = namespace("params");
23674
23674
  var searchBox$2 = namespace("searchBox");
23675
- var options$a = namespace("options");
23675
+ var options$b = namespace("options");
23676
23676
  var tracking$4 = namespace("tracking");
23677
23677
 
23678
23678
  var SearchBox = /*#__PURE__*/function (_Vue) {
@@ -23957,7 +23957,7 @@ __decorate([tracking$4.Action("track")], SearchBox.prototype, "trackClick", void
23957
23957
 
23958
23958
  __decorate([params$d.Action("setSearchResultsLink")], SearchBox.prototype, "setSearchResultsLink", void 0);
23959
23959
 
23960
- __decorate([options$a.Mutation("setSearchBoxOptions")], SearchBox.prototype, "setSearchBoxOptions", void 0);
23960
+ __decorate([options$b.Mutation("setSearchBoxOptions")], SearchBox.prototype, "setSearchBoxOptions", void 0);
23961
23961
 
23962
23962
  __decorate([params$d.Action("goToResults")], SearchBox.prototype, "goToResults", void 0);
23963
23963
 
@@ -25607,7 +25607,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
25607
25607
 
25608
25608
  var searchResult$h = namespace("searchResult");
25609
25609
  var params$c = namespace("params");
25610
- var options$9 = namespace("options");
25610
+ var options$a = namespace("options");
25611
25611
 
25612
25612
  var CurrentFilters = /*#__PURE__*/function (_Vue) {
25613
25613
  _inherits(CurrentFilters, _Vue);
@@ -25684,7 +25684,7 @@ __decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype,
25684
25684
 
25685
25685
  __decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
25686
25686
 
25687
- __decorate([options$9.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
25687
+ __decorate([options$a.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
25688
25688
 
25689
25689
  __decorate([params$c.Action("removeParams")], CurrentFilters.prototype, "removeParams", void 0);
25690
25690
 
@@ -28619,7 +28619,7 @@ var _typeof = _typeof$2.exports.default;
28619
28619
 
28620
28620
  var VueSlider = /*@__PURE__*/getDefaultExportFromCjs(vueSliderComponent_umd_min.exports);
28621
28621
 
28622
- var options$8 = namespace("options");
28622
+ var options$9 = namespace("options");
28623
28623
 
28624
28624
  var TermFacet = /*#__PURE__*/function (_Vue) {
28625
28625
  _inherits(TermFacet, _Vue);
@@ -28826,7 +28826,7 @@ __decorate([Prop({
28826
28826
  }
28827
28827
  })], TermFacet.prototype, "currentFilters", void 0);
28828
28828
 
28829
- __decorate([options$8.State(function (s) {
28829
+ __decorate([options$9.State(function (s) {
28830
28830
  return s.searchResultOptions;
28831
28831
  })], TermFacet.prototype, "searchResultOptions", void 0);
28832
28832
 
@@ -29942,7 +29942,7 @@ var __vue_component__$F = /*#__PURE__*/normalizeComponent({
29942
29942
  staticRenderFns: __vue_staticRenderFns__$F
29943
29943
  }, __vue_inject_styles__$F, __vue_script__$F, __vue_scope_id__$F, __vue_is_functional_template__$F, __vue_module_identifier__$F, false, undefined, undefined, undefined);
29944
29944
 
29945
- var options$7 = namespace("options");
29945
+ var options$8 = namespace("options");
29946
29946
 
29947
29947
  var CategoryFilter = /*#__PURE__*/function (_Vue) {
29948
29948
  _inherits(CategoryFilter, _Vue);
@@ -30078,9 +30078,9 @@ var CategoryFilter = /*#__PURE__*/function (_Vue) {
30078
30078
 
30079
30079
  __decorate([Prop()], CategoryFilter.prototype, "options", void 0);
30080
30080
 
30081
- __decorate([options$7.Getter("envOptions")], CategoryFilter.prototype, "envOptions", void 0);
30081
+ __decorate([options$8.Getter("envOptions")], CategoryFilter.prototype, "envOptions", void 0);
30082
30082
 
30083
- __decorate([options$7.State(function (o) {
30083
+ __decorate([options$8.State(function (o) {
30084
30084
  return o.searchResultOptions;
30085
30085
  })], CategoryFilter.prototype, "searchResultOptions", void 0);
30086
30086
 
@@ -31069,7 +31069,7 @@ var __vue_component__$w = /*#__PURE__*/normalizeComponent({
31069
31069
  staticRenderFns: __vue_staticRenderFns__$w
31070
31070
  }, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, undefined, undefined, undefined);
31071
31071
 
31072
- var options$6 = namespace("options");
31072
+ var options$7 = namespace("options");
31073
31073
 
31074
31074
  var SearchResultsProductTitle = /*#__PURE__*/function (_Vue) {
31075
31075
  _inherits(SearchResultsProductTitle, _Vue);
@@ -31122,7 +31122,7 @@ __decorate([Prop({
31122
31122
  default: ""
31123
31123
  })], SearchResultsProductTitle.prototype, "link", void 0);
31124
31124
 
31125
- __decorate([options$6.State(function (o) {
31125
+ __decorate([options$7.State(function (o) {
31126
31126
  return o.searchResultOptions;
31127
31127
  })], SearchResultsProductTitle.prototype, "searchResultOptions", void 0);
31128
31128
 
@@ -32033,7 +32033,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
32033
32033
  var tracking$3 = namespace("tracking");
32034
32034
  var params$9 = namespace("params");
32035
32035
  var searchResult$c = namespace("searchResult");
32036
- var options$5 = namespace("options");
32036
+ var options$6 = namespace("options");
32037
32037
 
32038
32038
  var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
32039
32039
  _inherits(SearchResultsProductCard, _Vue);
@@ -32083,7 +32083,9 @@ var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
32083
32083
  }, {
32084
32084
  key: "labels",
32085
32085
  get: function get() {
32086
- return this.options.labels;
32086
+ var _a;
32087
+
32088
+ return (_a = this.options.labels) !== null && _a !== void 0 ? _a : {};
32087
32089
  }
32088
32090
  }, {
32089
32091
  key: "link",
@@ -32204,7 +32206,7 @@ __decorate([searchResult$c.State(function (state) {
32204
32206
  return state.layout;
32205
32207
  })], SearchResultsProductCard.prototype, "layout", void 0);
32206
32208
 
32207
- __decorate([options$5.Getter("searchResultsRoutingBehavior")], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
32209
+ __decorate([options$6.Getter("searchResultsRoutingBehavior")], SearchResultsProductCard.prototype, "searchResultsRoutingBehavior", void 0);
32208
32210
 
32209
32211
  __decorate([params$9.Getter("query")], SearchResultsProductCard.prototype, "query", void 0);
32210
32212
 
@@ -32253,7 +32255,7 @@ var __vue_render__$m = function __vue_render__() {
32253
32255
  on: {
32254
32256
  click: _vm.handleNavigation
32255
32257
  }
32256
- }, _vm._l(_vm.imageElements, function (element) {
32258
+ }, [_vm._l(_vm.imageElements, function (element) {
32257
32259
  return _c("SearchResultsProductCardElement", {
32258
32260
  key: element.key,
32259
32261
  staticClass: "lupa-search-results-product-element",
@@ -32265,7 +32267,9 @@ var __vue_render__$m = function __vue_render__() {
32265
32267
  link: _vm.link
32266
32268
  }
32267
32269
  });
32268
- }), 1), _vm._v(" "), _c("div", {
32270
+ }), _vm._v(" "), _vm.labels.outOfStock && !_vm.isInStock ? _c("div", {
32271
+ staticClass: "lupa-out-of-stock"
32272
+ }, [_vm._v("\n " + _vm._s(_vm.labels.outOfStock) + "\n ")]) : _vm._e()], 2), _vm._v(" "), _c("div", {
32269
32273
  staticClass: "lupa-search-result-product-details-section"
32270
32274
  }, _vm._l(_vm.detailElements, function (element) {
32271
32275
  return _c("SearchResultsProductCardElement", {
@@ -32507,7 +32511,7 @@ var track = function track(queryKey) {
32507
32511
  };
32508
32512
 
32509
32513
  var params$8 = namespace("params");
32510
- var options$4 = namespace("options");
32514
+ var options$5 = namespace("options");
32511
32515
 
32512
32516
  var AdditionalPanels$1 = /*#__PURE__*/function (_Vue) {
32513
32517
  _inherits(AdditionalPanels, _Vue);
@@ -32622,7 +32626,7 @@ __decorate([Prop({
32622
32626
 
32623
32627
  __decorate([params$8.Getter("query")], AdditionalPanels$1.prototype, "query", void 0);
32624
32628
 
32625
- __decorate([options$4.State(function (o) {
32629
+ __decorate([options$5.State(function (o) {
32626
32630
  return o.searchResultOptions;
32627
32631
  })], AdditionalPanels$1.prototype, "searchResultOptions", void 0);
32628
32632
 
@@ -33307,7 +33311,7 @@ var __vue_component__$h = /*#__PURE__*/normalizeComponent({
33307
33311
  }, __vue_inject_styles__$h, __vue_script__$h, __vue_scope_id__$h, __vue_is_functional_template__$h, __vue_module_identifier__$h, false, undefined, undefined, undefined);
33308
33312
 
33309
33313
  var searchResult$a = namespace("searchResult");
33310
- var options$3 = namespace("options");
33314
+ var options$4 = namespace("options");
33311
33315
 
33312
33316
  var SearchResultsLayoutSelection = /*#__PURE__*/function (_Vue) {
33313
33317
  _inherits(SearchResultsLayoutSelection, _Vue);
@@ -33334,7 +33338,7 @@ __decorate([searchResult$a.State(function (state) {
33334
33338
  return state.layout;
33335
33339
  })], SearchResultsLayoutSelection.prototype, "layout", void 0);
33336
33340
 
33337
- __decorate([options$3.Getter("classMap")], SearchResultsLayoutSelection.prototype, "classMap", void 0);
33341
+ __decorate([options$4.Getter("classMap")], SearchResultsLayoutSelection.prototype, "classMap", void 0);
33338
33342
 
33339
33343
  __decorate([searchResult$a.Action("setLayout")], SearchResultsLayoutSelection.prototype, "setLayout", void 0);
33340
33344
 
@@ -33588,6 +33592,7 @@ var __vue_component__$e = /*#__PURE__*/normalizeComponent({
33588
33592
 
33589
33593
  var searchResult$7 = namespace("searchResult");
33590
33594
  var params$4 = namespace("params");
33595
+ var options$3 = namespace("options");
33591
33596
 
33592
33597
  var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
33593
33598
  _inherits(SearchResultsToolbar, _Vue);
@@ -33664,11 +33669,10 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
33664
33669
  }, {
33665
33670
  key: "paginationOptions",
33666
33671
  get: function get() {
33667
- var pageSize = this.options.pagination.sizeSelection;
33668
33672
  var pageSelect = this.options.pagination.pageSelection;
33669
- var r = {
33673
+ return {
33670
33674
  pageSize: {
33671
- sizes: pageSize.sizes,
33675
+ sizes: this.currentResolutionPageSizes,
33672
33676
  selectedSize: this.limit
33673
33677
  },
33674
33678
  pageSelect: {
@@ -33679,7 +33683,6 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
33679
33683
  },
33680
33684
  labels: this.options.labels
33681
33685
  };
33682
- return r;
33683
33686
  }
33684
33687
  }, {
33685
33688
  key: "displayPageSelect",
@@ -33728,6 +33731,8 @@ __decorate([searchResult$7.State(function (state) {
33728
33731
  return state.searchResult;
33729
33732
  })], SearchResultsToolbar.prototype, "searchResult", void 0);
33730
33733
 
33734
+ __decorate([options$3.Getter("currentResolutionPageSizes")], SearchResultsToolbar.prototype, "currentResolutionPageSizes", void 0);
33735
+
33731
33736
  __decorate([params$4.Action("removeAllFilters")], SearchResultsToolbar.prototype, "removeAllFilters", void 0);
33732
33737
 
33733
33738
  SearchResultsToolbar = __decorate([Component({
@@ -34711,7 +34716,10 @@ var __vue_render__$5 = function __vue_render__() {
34711
34716
  var _c = _vm._self._c || _h;
34712
34717
 
34713
34718
  return _c("div", {
34714
- staticClass: "lupa-category-top-mobile-filters"
34719
+ staticClass: "lupa-category-top-mobile-filters",
34720
+ class: {
34721
+ "lupa-has-back-button": _vm.hasBackButton
34722
+ }
34715
34723
  }, [_c("div", {
34716
34724
  staticClass: "lupa-top-mobile-filter-wrapper"
34717
34725
  }, [_vm.hasBackButton ? _c("div", {
@@ -34816,13 +34824,11 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
34816
34824
  }, {
34817
34825
  key: "handleMounted",
34818
34826
  value: function handleMounted() {
34819
- var _a, _b, _c;
34820
-
34821
34827
  this.handleResize();
34822
34828
  var params = new URLSearchParams(window.location.search);
34823
34829
  this.handleUrlChange(params);
34824
34830
  this.addParams(parseParams(params));
34825
- this.setDefaultLimit((_c = (_b = (_a = this.options.pagination) === null || _a === void 0 ? void 0 : _a.sizeSelection) === null || _b === void 0 ? void 0 : _b.sizes) === null || _c === void 0 ? void 0 : _c[0]);
34831
+ this.setDefaultLimit(this.defaultSearchResultPageSize);
34826
34832
  }
34827
34833
  }, {
34828
34834
  key: "handleParamsChange",
@@ -36419,8 +36425,6 @@ var setDocumentTitle = function setDocumentTitle(template) {
36419
36425
  document.title = addParamsToLabel(template, textToInsert);
36420
36426
  };
36421
36427
 
36422
- var MOBILE_WIDTH = 767;
36423
-
36424
36428
  var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36425
36429
  _inherits(SearchResultModule, _VuexModule);
36426
36430
 
@@ -36517,7 +36521,24 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
36517
36521
  }, {
36518
36522
  key: "isMobileWidth",
36519
36523
  get: function get() {
36520
- return this.screenWidth < MOBILE_WIDTH;
36524
+ return this.currentScreenWidth === "sm" || this.currentScreenWidth === "xs";
36525
+ }
36526
+ }, {
36527
+ key: "currentScreenWidth",
36528
+ get: function get() {
36529
+ var width = this.screenWidth;
36530
+
36531
+ if (width <= S_MIN_WIDTH) {
36532
+ return "xs";
36533
+ } else if (width > S_MIN_WIDTH && width <= MD_MIN_WIDTH) {
36534
+ return "sm";
36535
+ } else if (width > MD_MIN_WIDTH && width <= L_MIN_WIDTH) {
36536
+ return "md";
36537
+ } else if (width > L_MIN_WIDTH && width <= XL_MIN_WIDTH) {
36538
+ return "l";
36539
+ } else {
36540
+ return "xl";
36541
+ }
36521
36542
  }
36522
36543
  }, {
36523
36544
  key: "setSidebarVisibility",
@@ -36982,9 +37003,39 @@ var OptionsModule = /*#__PURE__*/function (_VuexModule) {
36982
37003
  }, {
36983
37004
  key: "defaultSearchResultPageSize",
36984
37005
  get: function get() {
36985
- var _a, _b, _c, _d, _e;
37006
+ var _a, _b;
37007
+
37008
+ return (_b = (_a = this.currentResolutionPageSizes) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : DEFAULT_PAGE_SIZE;
37009
+ }
37010
+ }, {
37011
+ key: "currentResolutionPageSizes",
37012
+ get: function get() {
37013
+ var _a, _b, _c;
37014
+
37015
+ var pageSizes = (_c = (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.sizeSelection) === null || _c === void 0 ? void 0 : _c.sizes;
37016
+
37017
+ if (Array.isArray(pageSizes)) {
37018
+ return pageSizes;
37019
+ }
37020
+
37021
+ var screenSize = this.context.rootGetters["searchResult/currentScreenWidth"];
37022
+
37023
+ switch (screenSize) {
37024
+ case "xs":
37025
+ return pageSizes.xs;
37026
+
37027
+ case "sm":
37028
+ return pageSizes.sm;
36986
37029
 
36987
- return (_e = (_d = (_c = (_b = (_a = this.searchResultOptions) === null || _a === void 0 ? void 0 : _a.pagination) === null || _b === void 0 ? void 0 : _b.sizeSelection) === null || _c === void 0 ? void 0 : _c.sizes) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : DEFAULT_PAGE_SIZE;
37030
+ case "md":
37031
+ return pageSizes.md;
37032
+
37033
+ case "l":
37034
+ return pageSizes.l;
37035
+
37036
+ case "xl":
37037
+ return pageSizes.xl;
37038
+ }
36988
37039
  }
36989
37040
  }, {
36990
37041
  key: "setSearchBoxOptions",
@@ -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";
@@ -23,6 +24,7 @@ export default class SearchResultModule extends VuexModule {
23
24
  get hasAnyFilter(): boolean;
24
25
  get itemRange(): number[];
25
26
  get isMobileWidth(): boolean;
27
+ get currentScreenWidth(): ScreenSize;
26
28
  setSidebarVisibility({ visible }: {
27
29
  visible: boolean;
28
30
  }): void;
@@ -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: {
@@ -21,6 +21,7 @@ export default class SearchResultsToolbar extends Vue {
21
21
  get displayPageSelect(): boolean;
22
22
  get searchSummaryLabel(): string;
23
23
  get showMobileFilterCount(): boolean;
24
+ currentResolutionPageSizes: number[];
24
25
  removeAllFilters: () => {
25
26
  params: QueryParams;
26
27
  };