@getlupa/client 0.5.1-alpha-21 → 0.6.0-alpha-1
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/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.min.js +18 -6
- package/dist/cjs/types/General.d.ts +1 -2
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/es/index.d.ts +2 -1
- package/dist/es/index.min.js +14 -6
- package/dist/es/types/General.d.ts +1 -2
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +1 -0
- package/dist/iife/index.d.ts +2 -1
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/General.d.ts +1 -2
- package/package.json +2 -2
package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
8
|
get pages(): number[];
|
|
9
|
+
get showBack(): boolean;
|
|
9
10
|
get lastPage(): number | undefined;
|
|
10
11
|
get showLastPage(): boolean;
|
|
11
12
|
get showLastPageSeparator(): boolean;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,12 +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
|
|
3
|
+
import { SdkOptions, TrackingOptions, Environment } 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 { SortDirection } from "@getlupa/client-sdk/Types";
|
|
10
11
|
declare const lupaSearch: {
|
|
11
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
12
13
|
searchResults: (options: SearchResultsOptions) => void;
|
package/dist/cjs/index.min.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var Types = require('@getlupa/client-sdk/Types');
|
|
6
|
+
|
|
5
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
8
|
|
|
7
9
|
function getDefaultExportFromCjs (x) {
|
|
@@ -25121,8 +25123,8 @@ try {
|
|
|
25121
25123
|
|
|
25122
25124
|
var regenerator = runtime.exports;
|
|
25123
25125
|
|
|
25124
|
-
var production = "https://api.
|
|
25125
|
-
var staging = "https://api.staging.
|
|
25126
|
+
var production = "https://api.lupasearch.com/v1/";
|
|
25127
|
+
var staging = "https://api.staging.lupasearch.com/v1/";
|
|
25126
25128
|
var Env = {
|
|
25127
25129
|
production: production,
|
|
25128
25130
|
staging: staging
|
|
@@ -32916,9 +32918,10 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32916
32918
|
_createClass(SearchResultsPageSelect, [{
|
|
32917
32919
|
key: "pages",
|
|
32918
32920
|
get: function get() {
|
|
32921
|
+
var currentPage = Math.min(this.options.count, this.options.selectedPage);
|
|
32919
32922
|
var delta = Math.floor(this.options.display / 2),
|
|
32920
|
-
left =
|
|
32921
|
-
right =
|
|
32923
|
+
left = currentPage - delta,
|
|
32924
|
+
right = currentPage + (this.options.display - delta);
|
|
32922
32925
|
return Array.from({
|
|
32923
32926
|
length: this.options.count
|
|
32924
32927
|
}, function (v, k) {
|
|
@@ -32927,6 +32930,11 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32927
32930
|
return i && i >= left && i < right;
|
|
32928
32931
|
});
|
|
32929
32932
|
}
|
|
32933
|
+
}, {
|
|
32934
|
+
key: "showBack",
|
|
32935
|
+
get: function get() {
|
|
32936
|
+
return this.options.selectedPage > 1 && this.options.selectedPage <= this.options.count;
|
|
32937
|
+
}
|
|
32930
32938
|
}, {
|
|
32931
32939
|
key: "lastPage",
|
|
32932
32940
|
get: function get() {
|
|
@@ -33009,7 +33017,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33009
33017
|
id: "lupa-search-results-page-select",
|
|
33010
33018
|
"data-cy": "lupa-search-results-page-select"
|
|
33011
33019
|
}
|
|
33012
|
-
}, [_vm.
|
|
33020
|
+
}, [_vm.showBack ? _c("div", {
|
|
33013
33021
|
class: _vm.firstPageLabel === "<" ? "lupa-page-arrow" : "lupa-show-less",
|
|
33014
33022
|
on: {
|
|
33015
33023
|
click: function click() {
|
|
@@ -33641,7 +33649,7 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33641
33649
|
}, {
|
|
33642
33650
|
key: "displayPageSelect",
|
|
33643
33651
|
get: function get() {
|
|
33644
|
-
return this.paginationDisplay.pageSelect && this.paginationOptions.pageSelect.count > 0
|
|
33652
|
+
return this.paginationDisplay.pageSelect && this.paginationOptions.pageSelect.count > 0;
|
|
33645
33653
|
}
|
|
33646
33654
|
}, {
|
|
33647
33655
|
key: "searchSummaryLabel",
|
|
@@ -37149,4 +37157,8 @@ var lupaSearch = {
|
|
|
37149
37157
|
clearProductList: clearProductList
|
|
37150
37158
|
};
|
|
37151
37159
|
|
|
37160
|
+
Object.defineProperty(exports, 'SortDirection', {
|
|
37161
|
+
enumerable: true,
|
|
37162
|
+
get: function () { return Types.SortDirection; }
|
|
37163
|
+
});
|
|
37152
37164
|
exports["default"] = lupaSearch;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsOptions } from "./AnalyticsOptions";
|
|
2
|
-
import { Environment as SdkEnvironment
|
|
2
|
+
import { Environment as SdkEnvironment } from "@getlupa/client-sdk/Types";
|
|
3
3
|
export declare type SdkOptions = {
|
|
4
4
|
environment: SdkEnvironment;
|
|
5
5
|
customUrl?: string;
|
|
@@ -14,5 +14,4 @@ export declare type TrackingOptions = {
|
|
|
14
14
|
userKey?: string;
|
|
15
15
|
analytics?: AnalyticsOptions;
|
|
16
16
|
};
|
|
17
|
-
export declare type SortDirection = SdkSortDirection;
|
|
18
17
|
export declare type Environment = SdkEnvironment;
|
package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
8
|
get pages(): number[];
|
|
9
|
+
get showBack(): boolean;
|
|
9
10
|
get lastPage(): number | undefined;
|
|
10
11
|
get showLastPage(): boolean;
|
|
11
12
|
get showLastPageSeparator(): boolean;
|
package/dist/es/index.d.ts
CHANGED
|
@@ -1,12 +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
|
|
3
|
+
import { SdkOptions, TrackingOptions, Environment } 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 { SortDirection } from "@getlupa/client-sdk/Types";
|
|
10
11
|
declare const lupaSearch: {
|
|
11
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
12
13
|
searchResults: (options: SearchResultsOptions) => void;
|
package/dist/es/index.min.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { SortDirection } from '@getlupa/client-sdk/Types';
|
|
2
|
+
|
|
1
3
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
4
|
|
|
3
5
|
function getDefaultExportFromCjs (x) {
|
|
@@ -25117,8 +25119,8 @@ try {
|
|
|
25117
25119
|
|
|
25118
25120
|
var regenerator = runtime.exports;
|
|
25119
25121
|
|
|
25120
|
-
var production = "https://api.
|
|
25121
|
-
var staging = "https://api.staging.
|
|
25122
|
+
var production = "https://api.lupasearch.com/v1/";
|
|
25123
|
+
var staging = "https://api.staging.lupasearch.com/v1/";
|
|
25122
25124
|
var Env = {
|
|
25123
25125
|
production: production,
|
|
25124
25126
|
staging: staging
|
|
@@ -32912,9 +32914,10 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32912
32914
|
_createClass(SearchResultsPageSelect, [{
|
|
32913
32915
|
key: "pages",
|
|
32914
32916
|
get: function get() {
|
|
32917
|
+
var currentPage = Math.min(this.options.count, this.options.selectedPage);
|
|
32915
32918
|
var delta = Math.floor(this.options.display / 2),
|
|
32916
|
-
left =
|
|
32917
|
-
right =
|
|
32919
|
+
left = currentPage - delta,
|
|
32920
|
+
right = currentPage + (this.options.display - delta);
|
|
32918
32921
|
return Array.from({
|
|
32919
32922
|
length: this.options.count
|
|
32920
32923
|
}, function (v, k) {
|
|
@@ -32923,6 +32926,11 @@ var SearchResultsPageSelect = /*#__PURE__*/function (_Vue) {
|
|
|
32923
32926
|
return i && i >= left && i < right;
|
|
32924
32927
|
});
|
|
32925
32928
|
}
|
|
32929
|
+
}, {
|
|
32930
|
+
key: "showBack",
|
|
32931
|
+
get: function get() {
|
|
32932
|
+
return this.options.selectedPage > 1 && this.options.selectedPage <= this.options.count;
|
|
32933
|
+
}
|
|
32926
32934
|
}, {
|
|
32927
32935
|
key: "lastPage",
|
|
32928
32936
|
get: function get() {
|
|
@@ -33005,7 +33013,7 @@ var __vue_render__$i = function __vue_render__() {
|
|
|
33005
33013
|
id: "lupa-search-results-page-select",
|
|
33006
33014
|
"data-cy": "lupa-search-results-page-select"
|
|
33007
33015
|
}
|
|
33008
|
-
}, [_vm.
|
|
33016
|
+
}, [_vm.showBack ? _c("div", {
|
|
33009
33017
|
class: _vm.firstPageLabel === "<" ? "lupa-page-arrow" : "lupa-show-less",
|
|
33010
33018
|
on: {
|
|
33011
33019
|
click: function click() {
|
|
@@ -33637,7 +33645,7 @@ var SearchResultsToolbar = /*#__PURE__*/function (_Vue) {
|
|
|
33637
33645
|
}, {
|
|
33638
33646
|
key: "displayPageSelect",
|
|
33639
33647
|
get: function get() {
|
|
33640
|
-
return this.paginationDisplay.pageSelect && this.paginationOptions.pageSelect.count > 0
|
|
33648
|
+
return this.paginationDisplay.pageSelect && this.paginationOptions.pageSelect.count > 0;
|
|
33641
33649
|
}
|
|
33642
33650
|
}, {
|
|
33643
33651
|
key: "searchSummaryLabel",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnalyticsOptions } from "./AnalyticsOptions";
|
|
2
|
-
import { Environment as SdkEnvironment
|
|
2
|
+
import { Environment as SdkEnvironment } from "@getlupa/client-sdk/Types";
|
|
3
3
|
export declare type SdkOptions = {
|
|
4
4
|
environment: SdkEnvironment;
|
|
5
5
|
customUrl?: string;
|
|
@@ -14,5 +14,4 @@ export declare type TrackingOptions = {
|
|
|
14
14
|
userKey?: string;
|
|
15
15
|
analytics?: AnalyticsOptions;
|
|
16
16
|
};
|
|
17
|
-
export declare type SortDirection = SdkSortDirection;
|
|
18
17
|
export declare type Environment = SdkEnvironment;
|
package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
6
6
|
firstPageLabel: string;
|
|
7
7
|
options: PaginationPageSelect;
|
|
8
8
|
get pages(): number[];
|
|
9
|
+
get showBack(): boolean;
|
|
9
10
|
get lastPage(): number | undefined;
|
|
10
11
|
get showLastPage(): boolean;
|
|
11
12
|
get showLastPageSeparator(): boolean;
|
package/dist/iife/index.d.ts
CHANGED
|
@@ -1,12 +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
|
|
3
|
+
import { SdkOptions, TrackingOptions, Environment } 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 { SortDirection } from "@getlupa/client-sdk/Types";
|
|
10
11
|
declare const lupaSearch: {
|
|
11
12
|
searchBox: (options: SearchBoxOptions) => void;
|
|
12
13
|
searchResults: (options: SearchResultsOptions) => void;
|