@getlupa/client 0.6.0-alpha-1 → 0.6.0-alpha-4
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.
- package/dist/cjs/components/search-results/SearchResults.vue.d.ts +3 -0
- package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/cjs/constants/searchResults.const.d.ts +1 -0
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.min.js +55 -30
- package/dist/cjs/store/modules/searchResult.d.ts +5 -0
- package/dist/cjs/types/General.d.ts +1 -0
- package/dist/cjs/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/cjs/types/search-results/SearchResultsSort.d.ts +1 -1
- package/dist/es/components/search-results/SearchResults.vue.d.ts +3 -0
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/es/constants/searchResults.const.d.ts +1 -0
- package/dist/es/index.d.ts +3 -3
- package/dist/es/index.min.js +55 -26
- package/dist/es/store/modules/searchResult.d.ts +5 -0
- package/dist/es/types/General.d.ts +1 -0
- package/dist/es/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/es/types/search-results/SearchResultsSort.d.ts +1 -1
- package/dist/iife/components/search-results/SearchResults.vue.d.ts +3 -0
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +2 -0
- package/dist/iife/constants/searchResults.const.d.ts +1 -0
- package/dist/iife/index.d.ts +3 -3
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/store/modules/searchResult.d.ts +5 -0
- package/dist/iife/types/General.d.ts +1 -0
- package/dist/iife/types/search-results/PaginationOptions.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +1 -0
- package/dist/iife/types/search-results/SearchResultsSort.d.ts +1 -1
- package/package.json +1 -1
|
@@ -64,6 +64,9 @@ export default class SearchResults extends Vue {
|
|
|
64
64
|
queryKey: string;
|
|
65
65
|
results: SearchQueryResult;
|
|
66
66
|
}): void;
|
|
67
|
+
setScreenWidth: ({ width, }: {
|
|
68
|
+
width: number;
|
|
69
|
+
}) => void;
|
|
67
70
|
setColumnCount: ({ width, grid, }: {
|
|
68
71
|
width: number;
|
|
69
72
|
grid: ProductGrid;
|
package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -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;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
2
|
import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
|
-
import { SdkOptions, TrackingOptions, Environment } from "./types/General";
|
|
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";
|
|
6
6
|
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 {
|
|
10
|
+
import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
|
|
11
11
|
declare const lupaSearch: {
|
|
12
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
13
13
|
searchResults: (options: SearchResultsOptions) => void;
|
|
@@ -17,5 +17,5 @@ declare const lupaSearch: {
|
|
|
17
17
|
clearSearchResults: () => void;
|
|
18
18
|
clearProductList: () => void;
|
|
19
19
|
};
|
|
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, };
|
|
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, };
|
|
21
21
|
export default lupaSearch;
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Types = require('@getlupa/client-sdk/Types');
|
|
6
|
-
|
|
7
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
6
|
|
|
9
7
|
function getDefaultExportFromCjs (x) {
|
|
@@ -24231,7 +24229,8 @@ var DEFAULT_OPTIONS_RESULTS = {
|
|
|
24231
24229
|
top: false,
|
|
24232
24230
|
bottom: true
|
|
24233
24231
|
},
|
|
24234
|
-
display: 5
|
|
24232
|
+
display: 5,
|
|
24233
|
+
displayMobile: 3
|
|
24235
24234
|
}
|
|
24236
24235
|
},
|
|
24237
24236
|
sort: [],
|
|
@@ -25610,7 +25609,7 @@ var toggleHierarchyParam = function toggleHierarchyParam() {
|
|
|
25610
25609
|
return getMostSpecificHierarchyTerms([param].concat(_toConsumableArray(params)));
|
|
25611
25610
|
};
|
|
25612
25611
|
|
|
25613
|
-
var searchResult$
|
|
25612
|
+
var searchResult$h = namespace("searchResult");
|
|
25614
25613
|
var params$c = namespace("params");
|
|
25615
25614
|
var options$8 = namespace("options");
|
|
25616
25615
|
|
|
@@ -25681,13 +25680,13 @@ __decorate([Prop({
|
|
|
25681
25680
|
default: false
|
|
25682
25681
|
})], CurrentFilters.prototype, "expandable", void 0);
|
|
25683
25682
|
|
|
25684
|
-
__decorate([searchResult$
|
|
25683
|
+
__decorate([searchResult$h.Getter("filters")], CurrentFilters.prototype, "currentFilters", void 0);
|
|
25685
25684
|
|
|
25686
|
-
__decorate([searchResult$
|
|
25685
|
+
__decorate([searchResult$h.Getter("facets")], CurrentFilters.prototype, "facets", void 0);
|
|
25687
25686
|
|
|
25688
|
-
__decorate([searchResult$
|
|
25687
|
+
__decorate([searchResult$h.Getter("displayFilters")], CurrentFilters.prototype, "displayFilters", void 0);
|
|
25689
25688
|
|
|
25690
|
-
__decorate([searchResult$
|
|
25689
|
+
__decorate([searchResult$h.Getter("currentFilterCount")], CurrentFilters.prototype, "currentFilterCount", void 0);
|
|
25691
25690
|
|
|
25692
25691
|
__decorate([options$8.Getter("initialFilters")], CurrentFilters.prototype, "initialFilters", void 0);
|
|
25693
25692
|
|
|
@@ -29686,7 +29685,7 @@ var scrollTo = function scrollTo(elementId) {
|
|
|
29686
29685
|
});
|
|
29687
29686
|
};
|
|
29688
29687
|
|
|
29689
|
-
var searchResult$
|
|
29688
|
+
var searchResult$g = namespace("searchResult");
|
|
29690
29689
|
var params$b = namespace("params");
|
|
29691
29690
|
|
|
29692
29691
|
var Facets = /*#__PURE__*/function (_Vue) {
|
|
@@ -29770,7 +29769,7 @@ __decorate([Prop({
|
|
|
29770
29769
|
|
|
29771
29770
|
__decorate([params$b.Getter("filters")], Facets.prototype, "currentFilters", void 0);
|
|
29772
29771
|
|
|
29773
|
-
__decorate([searchResult$
|
|
29772
|
+
__decorate([searchResult$g.Getter("facets")], Facets.prototype, "facets", void 0);
|
|
29774
29773
|
|
|
29775
29774
|
__decorate([params$b.Action("removeParams")], Facets.prototype, "removeParams", void 0);
|
|
29776
29775
|
|
|
@@ -30263,7 +30262,7 @@ var __vue_component__$D = /*#__PURE__*/normalizeComponent({
|
|
|
30263
30262
|
staticRenderFns: __vue_staticRenderFns__$D
|
|
30264
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);
|
|
30265
30264
|
|
|
30266
|
-
var searchResult$
|
|
30265
|
+
var searchResult$f = namespace("searchResult");
|
|
30267
30266
|
|
|
30268
30267
|
var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
30269
30268
|
_inherits(MobileFilterSidebar, _Vue);
|
|
@@ -30311,13 +30310,13 @@ var MobileFilterSidebar = /*#__PURE__*/function (_Vue) {
|
|
|
30311
30310
|
|
|
30312
30311
|
__decorate([Prop()], MobileFilterSidebar.prototype, "options", void 0);
|
|
30313
30312
|
|
|
30314
|
-
__decorate([searchResult$
|
|
30313
|
+
__decorate([searchResult$f.Mutation("setSidebarVisibility")], MobileFilterSidebar.prototype, "setSidebarVisibility", void 0);
|
|
30315
30314
|
|
|
30316
|
-
__decorate([searchResult$
|
|
30315
|
+
__decorate([searchResult$f.State(function (state) {
|
|
30317
30316
|
return state.isMobileSidebarVisible;
|
|
30318
30317
|
})], MobileFilterSidebar.prototype, "isMobileSidebarVisible", void 0);
|
|
30319
30318
|
|
|
30320
|
-
__decorate([searchResult$
|
|
30319
|
+
__decorate([searchResult$f.Getter("currentFilterCount")], MobileFilterSidebar.prototype, "currentFilterCount", void 0);
|
|
30321
30320
|
|
|
30322
30321
|
MobileFilterSidebar = __decorate([Component({
|
|
30323
30322
|
name: "mobileFilerSidebar",
|
|
@@ -30386,7 +30385,7 @@ var __vue_component__$C = /*#__PURE__*/normalizeComponent({
|
|
|
30386
30385
|
staticRenderFns: __vue_staticRenderFns__$C
|
|
30387
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);
|
|
30388
30387
|
|
|
30389
|
-
var searchResult$
|
|
30388
|
+
var searchResult$e = namespace("searchResult");
|
|
30390
30389
|
var params$a = namespace("params");
|
|
30391
30390
|
|
|
30392
30391
|
var SearchResultsDidYouMean = /*#__PURE__*/function (_Vue) {
|
|
@@ -30439,7 +30438,7 @@ __decorate([Prop({
|
|
|
30439
30438
|
default: ""
|
|
30440
30439
|
})], SearchResultsDidYouMean.prototype, "labels", void 0);
|
|
30441
30440
|
|
|
30442
|
-
__decorate([searchResult$
|
|
30441
|
+
__decorate([searchResult$e.State(function (state) {
|
|
30443
30442
|
return state.searchResult;
|
|
30444
30443
|
})], SearchResultsDidYouMean.prototype, "searchResult", void 0);
|
|
30445
30444
|
|
|
@@ -31589,7 +31588,7 @@ var __vue_component__$r = /*#__PURE__*/normalizeComponent({
|
|
|
31589
31588
|
staticRenderFns: __vue_staticRenderFns__$r
|
|
31590
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);
|
|
31591
31590
|
|
|
31592
|
-
var searchResult$
|
|
31591
|
+
var searchResult$d = namespace("searchResult");
|
|
31593
31592
|
|
|
31594
31593
|
var SearchResultsProductAddToCart = /*#__PURE__*/function (_Vue) {
|
|
31595
31594
|
_inherits(SearchResultsProductAddToCart, _Vue);
|
|
@@ -31650,7 +31649,7 @@ __decorate([Prop({
|
|
|
31650
31649
|
default: true
|
|
31651
31650
|
})], SearchResultsProductAddToCart.prototype, "inStock", void 0);
|
|
31652
31651
|
|
|
31653
|
-
__decorate([searchResult$
|
|
31652
|
+
__decorate([searchResult$d.State(function (state) {
|
|
31654
31653
|
return state.addToCartAmount;
|
|
31655
31654
|
})], SearchResultsProductAddToCart.prototype, "addToCartAmount", void 0);
|
|
31656
31655
|
|
|
@@ -32027,7 +32026,7 @@ var __vue_component__$n = /*#__PURE__*/normalizeComponent({
|
|
|
32027
32026
|
|
|
32028
32027
|
var tracking$3 = namespace("tracking");
|
|
32029
32028
|
var params$9 = namespace("params");
|
|
32030
|
-
var searchResult$
|
|
32029
|
+
var searchResult$c = namespace("searchResult");
|
|
32031
32030
|
var options$4 = namespace("options");
|
|
32032
32031
|
|
|
32033
32032
|
var SearchResultsProductCard = /*#__PURE__*/function (_Vue) {
|
|
@@ -32195,7 +32194,7 @@ __decorate([Prop({
|
|
|
32195
32194
|
default: false
|
|
32196
32195
|
})], SearchResultsProductCard.prototype, "isAdditionalPanel", void 0);
|
|
32197
32196
|
|
|
32198
|
-
__decorate([searchResult$
|
|
32197
|
+
__decorate([searchResult$c.State(function (state) {
|
|
32199
32198
|
return state.layout;
|
|
32200
32199
|
})], SearchResultsProductCard.prototype, "layout", void 0);
|
|
32201
32200
|
|
|
@@ -32903,6 +32902,7 @@ var __vue_component__$j = /*#__PURE__*/normalizeComponent({
|
|
|
32903
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);
|
|
32904
32903
|
|
|
32905
32904
|
var params$6 = namespace("params");
|
|
32905
|
+
var searchResult$b = namespace("searchResult");
|
|
32906
32906
|
|
|
32907
32907
|
var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
32908
32908
|
_inherits(SearchResultsPageSelect, _Vue);
|
|
@@ -32916,12 +32916,17 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32916
32916
|
}
|
|
32917
32917
|
|
|
32918
32918
|
_createClass(SearchResultsPageSelect, [{
|
|
32919
|
+
key: "pageOptionsCount",
|
|
32920
|
+
get: function get() {
|
|
32921
|
+
return this.isMobileWidth ? this.options.displayMobile : this.options.display;
|
|
32922
|
+
}
|
|
32923
|
+
}, {
|
|
32919
32924
|
key: "pages",
|
|
32920
32925
|
get: function get() {
|
|
32921
32926
|
var currentPage = Math.min(this.options.count, this.options.selectedPage);
|
|
32922
|
-
var delta = Math.floor(this.
|
|
32927
|
+
var delta = Math.floor(this.pageOptionsCount / 2),
|
|
32923
32928
|
left = currentPage - delta,
|
|
32924
|
-
right = currentPage + (this.
|
|
32929
|
+
right = currentPage + (this.pageOptionsCount - delta);
|
|
32925
32930
|
return Array.from({
|
|
32926
32931
|
length: this.options.count
|
|
32927
32932
|
}, function (v, k) {
|
|
@@ -32994,6 +32999,8 @@ __decorate([Prop({
|
|
|
32994
32999
|
default: {}
|
|
32995
33000
|
})], SearchResultsPageSelect.prototype, "options", void 0);
|
|
32996
33001
|
|
|
33002
|
+
__decorate([searchResult$b.Getter("isMobileWidth")], SearchResultsPageSelect.prototype, "isMobileWidth", void 0);
|
|
33003
|
+
|
|
32997
33004
|
__decorate([params$6.Action("appendParams")], SearchResultsPageSelect.prototype, "appendParams", void 0);
|
|
32998
33005
|
|
|
32999
33006
|
SearchResultsPageSelect = __decorate([Component({
|
|
@@ -33640,7 +33647,8 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33640
33647
|
pageSelect: {
|
|
33641
33648
|
count: getPageCount(this.searchResult.total, this.limit),
|
|
33642
33649
|
selectedPage: this.page,
|
|
33643
|
-
display: pageSelect.display
|
|
33650
|
+
display: pageSelect.display,
|
|
33651
|
+
displayMobile: pageSelect.displayMobile
|
|
33644
33652
|
},
|
|
33645
33653
|
labels: this.options.labels
|
|
33646
33654
|
};
|
|
@@ -34870,6 +34878,9 @@ var SearchResults = /*#__PURE__*/function (_Vue) {
|
|
|
34870
34878
|
width: window.innerWidth,
|
|
34871
34879
|
grid: this.options.grid
|
|
34872
34880
|
});
|
|
34881
|
+
this.setScreenWidth({
|
|
34882
|
+
width: window.innerWidth
|
|
34883
|
+
});
|
|
34873
34884
|
}
|
|
34874
34885
|
}]);
|
|
34875
34886
|
|
|
@@ -34922,6 +34933,8 @@ __decorate([searchResult$1.Action("setLoading")], SearchResults.prototype, "setL
|
|
|
34922
34933
|
|
|
34923
34934
|
__decorate([options$1.Getter("defaultSearchResultPageSize")], SearchResults.prototype, "defaultSearchResultPageSize", void 0);
|
|
34924
34935
|
|
|
34936
|
+
__decorate([searchResult$1.Mutation("setScreenWidth")], SearchResults.prototype, "setScreenWidth", void 0);
|
|
34937
|
+
|
|
34925
34938
|
__decorate([searchResult$1.Action("setColumnCount")], SearchResults.prototype, "setColumnCount", void 0);
|
|
34926
34939
|
|
|
34927
34940
|
SearchResults = __decorate([Component({
|
|
@@ -36378,6 +36391,8 @@ var setDocumentTitle = function setDocumentTitle(template) {
|
|
|
36378
36391
|
document.title = addParamsToLabel(template, textToInsert);
|
|
36379
36392
|
};
|
|
36380
36393
|
|
|
36394
|
+
var MOBILE_WIDTH = 767;
|
|
36395
|
+
|
|
36381
36396
|
var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
36382
36397
|
_inherits(SearchResultModule, _VuexModule);
|
|
36383
36398
|
|
|
@@ -36395,6 +36410,7 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36395
36410
|
_this.layout = ResultsLayoutEnum.GRID;
|
|
36396
36411
|
_this.loading = false;
|
|
36397
36412
|
_this.isMobileSidebarVisible = false;
|
|
36413
|
+
_this.screenWidth = 1000;
|
|
36398
36414
|
return _this;
|
|
36399
36415
|
}
|
|
36400
36416
|
|
|
@@ -36470,6 +36486,11 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36470
36486
|
var offset = (_b = this.searchResult.offset) !== null && _b !== void 0 ? _b : 0;
|
|
36471
36487
|
return [offset + 1, Math.min(offset + limit, this.totalItems)];
|
|
36472
36488
|
}
|
|
36489
|
+
}, {
|
|
36490
|
+
key: "isMobileWidth",
|
|
36491
|
+
get: function get() {
|
|
36492
|
+
return this.screenWidth < MOBILE_WIDTH;
|
|
36493
|
+
}
|
|
36473
36494
|
}, {
|
|
36474
36495
|
key: "setSidebarVisibility",
|
|
36475
36496
|
value: function setSidebarVisibility(_ref) {
|
|
@@ -36493,6 +36514,12 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36493
36514
|
value: function load(loading) {
|
|
36494
36515
|
this.loading = loading || false;
|
|
36495
36516
|
}
|
|
36517
|
+
}, {
|
|
36518
|
+
key: "setScreenWidth",
|
|
36519
|
+
value: function setScreenWidth(_ref3) {
|
|
36520
|
+
var width = _ref3.width;
|
|
36521
|
+
this.screenWidth = width;
|
|
36522
|
+
}
|
|
36496
36523
|
}, {
|
|
36497
36524
|
key: "add",
|
|
36498
36525
|
value: function add(searchResult) {
|
|
@@ -36511,9 +36538,9 @@ var SearchResultModule = /*#__PURE__*/function (_VuexModule) {
|
|
|
36511
36538
|
}
|
|
36512
36539
|
}, {
|
|
36513
36540
|
key: "setColumnCount",
|
|
36514
|
-
value: function setColumnCount(
|
|
36515
|
-
var width =
|
|
36516
|
-
grid =
|
|
36541
|
+
value: function setColumnCount(_ref4) {
|
|
36542
|
+
var width = _ref4.width,
|
|
36543
|
+
grid = _ref4.grid;
|
|
36517
36544
|
|
|
36518
36545
|
if (!width || !grid) {
|
|
36519
36546
|
return {
|
|
@@ -36585,6 +36612,8 @@ __decorate([Mutation], SearchResultModule.prototype, "save", null);
|
|
|
36585
36612
|
|
|
36586
36613
|
__decorate([Mutation], SearchResultModule.prototype, "load", null);
|
|
36587
36614
|
|
|
36615
|
+
__decorate([Mutation], SearchResultModule.prototype, "setScreenWidth", null);
|
|
36616
|
+
|
|
36588
36617
|
__decorate([Action({
|
|
36589
36618
|
commit: "save"
|
|
36590
36619
|
})], SearchResultModule.prototype, "add", null);
|
|
@@ -37157,8 +37186,4 @@ var lupaSearch = {
|
|
|
37157
37186
|
clearProductList: clearProductList
|
|
37158
37187
|
};
|
|
37159
37188
|
|
|
37160
|
-
Object.defineProperty(exports, 'SortDirection', {
|
|
37161
|
-
enumerable: true,
|
|
37162
|
-
get: function () { return Types.SortDirection; }
|
|
37163
|
-
});
|
|
37164
37189
|
exports["default"] = lupaSearch;
|
|
@@ -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;
|
|
@@ -64,6 +64,9 @@ export default class SearchResults extends Vue {
|
|
|
64
64
|
queryKey: string;
|
|
65
65
|
results: SearchQueryResult;
|
|
66
66
|
}): void;
|
|
67
|
+
setScreenWidth: ({ width, }: {
|
|
68
|
+
width: number;
|
|
69
|
+
}) => void;
|
|
67
70
|
setColumnCount: ({ width, grid, }: {
|
|
68
71
|
width: number;
|
|
69
72
|
grid: ProductGrid;
|
package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -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;
|
package/dist/es/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
2
|
import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
|
-
import { SdkOptions, TrackingOptions, Environment } from "./types/General";
|
|
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";
|
|
6
6
|
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 {
|
|
10
|
+
import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
|
|
11
11
|
declare const lupaSearch: {
|
|
12
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
13
13
|
searchResults: (options: SearchResultsOptions) => void;
|
|
@@ -17,5 +17,5 @@ declare const lupaSearch: {
|
|
|
17
17
|
clearSearchResults: () => void;
|
|
18
18
|
clearProductList: () => void;
|
|
19
19
|
};
|
|
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, };
|
|
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, };
|
|
21
21
|
export default lupaSearch;
|