@getlupa/client 0.5.1-alpha-7 → 0.5.1-alpha-10
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/product-list/CategoryTopFilters.vue.d.ts +10 -0
- package/dist/cjs/components/search-results/products/SearchResultsProducts.vue.d.ts +1 -6
- package/dist/cjs/components/search-results/products/SearchResultsToolbar.vue.d.ts +12 -6
- package/dist/cjs/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +5 -0
- package/dist/cjs/index.d.ts +8 -3
- package/dist/cjs/index.min.js +1227 -1046
- package/dist/cjs/types/DocumentElement.d.ts +9 -2
- package/dist/cjs/types/General.d.ts +4 -2
- package/dist/cjs/types/search-results/SearchResultsOptions.d.ts +1 -1
- package/dist/es/components/product-list/CategoryTopFilters.vue.d.ts +10 -0
- package/dist/es/components/search-results/products/SearchResultsProducts.vue.d.ts +1 -6
- package/dist/es/components/search-results/products/SearchResultsToolbar.vue.d.ts +12 -6
- package/dist/es/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +5 -0
- package/dist/es/index.d.ts +8 -3
- package/dist/es/index.min.js +1193 -1012
- package/dist/es/types/DocumentElement.d.ts +9 -2
- package/dist/es/types/General.d.ts +4 -2
- package/dist/es/types/search-results/SearchResultsOptions.d.ts +1 -1
- package/dist/iife/components/product-list/CategoryTopFilters.vue.d.ts +10 -0
- package/dist/iife/components/search-results/products/SearchResultsProducts.vue.d.ts +1 -6
- package/dist/iife/components/search-results/products/SearchResultsToolbar.vue.d.ts +12 -6
- package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts +5 -0
- package/dist/iife/index.d.ts +8 -3
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/DocumentElement.d.ts +9 -2
- package/dist/iife/types/General.d.ts +4 -2
- package/dist/iife/types/search-results/SearchResultsOptions.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ export declare enum DocumentElementType {
|
|
|
12
12
|
}
|
|
13
13
|
export declare type DocumentElementBase = {
|
|
14
14
|
type: DocumentElementType;
|
|
15
|
-
key
|
|
15
|
+
key?: string;
|
|
16
16
|
display?: (document: Record<string, unknown>) => boolean;
|
|
17
17
|
isHtml?: boolean;
|
|
18
18
|
};
|
|
@@ -20,25 +20,31 @@ export declare type ImageDocumentElement = DocumentElementBase & {
|
|
|
20
20
|
type: DocumentElementType.IMAGE;
|
|
21
21
|
placeholder: string;
|
|
22
22
|
baseUrl?: string;
|
|
23
|
+
key: string;
|
|
23
24
|
};
|
|
24
25
|
export declare type TitleDocumentElement = DocumentElementBase & {
|
|
25
26
|
type: DocumentElementType.TITLE;
|
|
26
27
|
maxLines: number;
|
|
27
28
|
link?: boolean;
|
|
29
|
+
key: string;
|
|
28
30
|
};
|
|
29
31
|
export declare type DescriptionDocumentElement = DocumentElementBase & {
|
|
30
32
|
type: DocumentElementType.DESCRIPTION;
|
|
31
33
|
maxLines: number;
|
|
34
|
+
key: string;
|
|
32
35
|
};
|
|
33
36
|
export declare type CustomDocumentElement = DocumentElementBase & {
|
|
34
37
|
type: DocumentElementType.CUSTOM;
|
|
35
38
|
className: string;
|
|
39
|
+
key: string;
|
|
36
40
|
};
|
|
37
41
|
export declare type PriceElement = DocumentElementBase & {
|
|
38
42
|
type: DocumentElementType.PRICE;
|
|
43
|
+
key: string;
|
|
39
44
|
};
|
|
40
45
|
export declare type RegularPriceDocumentElement = DocumentElementBase & {
|
|
41
46
|
type: DocumentElementType.REGULARPRICE;
|
|
47
|
+
key: string;
|
|
42
48
|
};
|
|
43
49
|
export declare type RatingElement = DocumentElementBase & {
|
|
44
50
|
type: DocumentElementType.RATING;
|
|
@@ -46,6 +52,7 @@ export declare type RatingElement = DocumentElementBase & {
|
|
|
46
52
|
links: RatingLinks;
|
|
47
53
|
totalKey: string;
|
|
48
54
|
getRatingPercentage?: (doc: Document) => number;
|
|
55
|
+
key: string;
|
|
49
56
|
};
|
|
50
57
|
export declare type RatingLabels = {
|
|
51
58
|
numberOfRatings: string;
|
|
@@ -57,7 +64,7 @@ export declare type AddToCartElement = DocumentElementBase & {
|
|
|
57
64
|
type: DocumentElementType.ADDTOCART;
|
|
58
65
|
action: (document: Document, amount: number) => Promise<unknown> | undefined;
|
|
59
66
|
labels: {
|
|
60
|
-
addToCart:
|
|
67
|
+
addToCart: string;
|
|
61
68
|
};
|
|
62
69
|
};
|
|
63
70
|
export declare type CustomHtmlElement = DocumentElementBase & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Environment } from "@getlupa/client-sdk/Types";
|
|
2
1
|
import { AnalyticsOptions } from "./AnalyticsOptions";
|
|
2
|
+
import { Environment as SdkEnvironment, SortDirection as SdkSortDirection } from "@getlupa/client-sdk/Types";
|
|
3
3
|
export declare type SdkOptions = {
|
|
4
|
-
environment:
|
|
4
|
+
environment: SdkEnvironment;
|
|
5
5
|
customUrl?: string;
|
|
6
6
|
customPayload?: Record<string, unknown>;
|
|
7
7
|
customHeaders?: Record<string, string>;
|
|
@@ -14,3 +14,5 @@ export declare type TrackingOptions = {
|
|
|
14
14
|
userKey?: string;
|
|
15
15
|
analytics?: AnalyticsOptions;
|
|
16
16
|
};
|
|
17
|
+
export declare type SortDirection = SdkSortDirection;
|
|
18
|
+
export declare type Environment = SdkEnvironment;
|
|
@@ -7,7 +7,6 @@ export declare type SearchResultsOptions = SearchResultsProductOptions & SearchR
|
|
|
7
7
|
containerSelector: string;
|
|
8
8
|
breadcrumbs: SearchResultsBreadcrumb[];
|
|
9
9
|
classMap?: Record<string, string>;
|
|
10
|
-
searchTitlePosition?: string;
|
|
11
10
|
noResultsQueryFlag?: string;
|
|
12
11
|
};
|
|
13
12
|
export declare type SearchTitlePosition = "page-top" | "search-results-top";
|
|
@@ -39,6 +38,7 @@ export declare type SearchResultsProductOptions = SearchResultsProductCardOption
|
|
|
39
38
|
pagination: SearchResultsPagination;
|
|
40
39
|
sort: SearchResultsSortOptions[];
|
|
41
40
|
filters?: SearchResultsFilterOptions;
|
|
41
|
+
searchTitlePosition?: string;
|
|
42
42
|
toolbar?: {
|
|
43
43
|
layoutSelector?: boolean;
|
|
44
44
|
itemSummary?: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProductListOptions } from "@/types/product-list/ProductListOptions";
|
|
2
|
+
import Vue from "vue";
|
|
3
|
+
export default class CategoryTopFilters extends Vue {
|
|
4
|
+
options: ProductListOptions;
|
|
5
|
+
get hasBackButton(): boolean;
|
|
6
|
+
get backTitle(): string | undefined;
|
|
7
|
+
get backUrlLink(): string | undefined;
|
|
8
|
+
get hasEventRouting(): boolean;
|
|
9
|
+
handleNavigationBack(event?: Event): void;
|
|
10
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { PaginationDisplay, PaginationOptions } from "@/types/search-results/PaginationOptions";
|
|
2
1
|
import { ResultsLayout } from "@/types/search-results/ResultsLayout";
|
|
3
2
|
import { ResultCurrentFilterOptions, SearchResultsProductOptions, SearchResultsSimilarQueriesLabels } from "@/types/search-results/SearchResultsOptions";
|
|
4
3
|
import { SearchResultsProductCardOptions } from "@/types/search-results/SearchResultsProductCardOptions";
|
|
5
|
-
import { SortOptions } from "@/types/search-results/SearchResultsSort";
|
|
6
4
|
import { Document, SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
7
5
|
import Vue from "vue";
|
|
8
6
|
export default class SearchResultsProducts extends Vue {
|
|
@@ -14,6 +12,7 @@ export default class SearchResultsProducts extends Vue {
|
|
|
14
12
|
productCardOptions(): SearchResultsProductCardOptions;
|
|
15
13
|
get similarQueriesLabels(): SearchResultsSimilarQueriesLabels;
|
|
16
14
|
get showTopFilters(): boolean;
|
|
15
|
+
get showMobileFilters(): boolean;
|
|
17
16
|
get currentFilterOptions(): ResultCurrentFilterOptions | undefined;
|
|
18
17
|
columnCount: number;
|
|
19
18
|
searchResult: SearchQueryResult;
|
|
@@ -21,9 +20,5 @@ export default class SearchResultsProducts extends Vue {
|
|
|
21
20
|
limit: number;
|
|
22
21
|
page: number;
|
|
23
22
|
get columnSize(): string;
|
|
24
|
-
get sortOptions(): SortOptions;
|
|
25
|
-
get paginationOptions(): PaginationOptions;
|
|
26
|
-
get topPagination(): PaginationDisplay;
|
|
27
|
-
get bottomPagination(): PaginationDisplay;
|
|
28
23
|
getProductKey(index: string, product: Document): string;
|
|
29
24
|
}
|
|
@@ -3,15 +3,21 @@ import Vue from "vue";
|
|
|
3
3
|
import { SortOptions } from "@/types/search-results/SearchResultsSort";
|
|
4
4
|
import { SearchResultsProductOptions } from "@/types/search-results/SearchResultsOptions";
|
|
5
5
|
import { QueryParams } from "@/types/search-results/QueryParams";
|
|
6
|
+
import { SearchQueryResult } from "@getlupa/client-sdk/Types";
|
|
6
7
|
export default class SearchResultsToolbar extends Vue {
|
|
7
8
|
options: SearchResultsProductOptions;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
showLayoutSelection: boolean;
|
|
12
|
-
showItemSummary: boolean;
|
|
13
|
-
showFilterClear: boolean;
|
|
9
|
+
paginationLocation: "top" | "bottom";
|
|
10
|
+
limit: number;
|
|
11
|
+
page: number;
|
|
14
12
|
hasAnyFilter: boolean;
|
|
13
|
+
searchResult: SearchQueryResult;
|
|
14
|
+
get isBottomLocation(): boolean;
|
|
15
|
+
get showFilterClear(): boolean;
|
|
16
|
+
get showItemSummary(): boolean;
|
|
17
|
+
get showLayoutSelection(): boolean;
|
|
18
|
+
get sortOptions(): SortOptions | undefined;
|
|
19
|
+
get paginationDisplay(): PaginationDisplay;
|
|
20
|
+
get paginationOptions(): PaginationOptions;
|
|
15
21
|
get displayPageSelect(): boolean;
|
|
16
22
|
get searchSummaryLabel(): string;
|
|
17
23
|
get showMobileFilterCount(): boolean;
|
package/dist/iife/components/search-results/products/pagination/SearchResultsPageSelect.vue.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export default class SearchResultsPageSelect extends Vue {
|
|
|
5
5
|
label: string;
|
|
6
6
|
options: PaginationPageSelect;
|
|
7
7
|
get pages(): number[];
|
|
8
|
+
get lastPage(): number | undefined;
|
|
9
|
+
get showLastPage(): boolean;
|
|
10
|
+
get showLastPageSeparator(): boolean;
|
|
11
|
+
get showFirstPage(): boolean;
|
|
12
|
+
get showFirstPageSeparator(): boolean;
|
|
8
13
|
appendParams: ({ params, paramsToRemove, }: {
|
|
9
14
|
params: {
|
|
10
15
|
name: string;
|
package/dist/iife/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
2
|
-
import { SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
|
-
import { SdkOptions, TrackingOptions } from "./types/General";
|
|
2
|
+
import { FacetStyle, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
|
+
import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
|
|
4
4
|
import { ProductListOptions } from "./types/product-list/ProductListOptions";
|
|
5
|
+
import { DocumentElementType } from "./types/DocumentElement";
|
|
6
|
+
import { SearchBoxPanelType } from "./types/search-box/SearchBoxPanel";
|
|
7
|
+
import { RoutingBehavior } from "./types/search-results/RoutingBehavior";
|
|
8
|
+
import { AnchorPosition } from "./types/search-results/SearchResultsProductCardOptions";
|
|
9
|
+
import { BadgeType } from "./types/search-results/BadgeOptions";
|
|
5
10
|
declare const lupaSearch: {
|
|
6
11
|
searchBox: (options: SearchBoxOptions) => void;
|
|
7
12
|
searchResults: (options: SearchResultsOptions) => void;
|
|
@@ -11,5 +16,5 @@ declare const lupaSearch: {
|
|
|
11
16
|
clearSearchResults: () => void;
|
|
12
17
|
clearProductList: () => void;
|
|
13
18
|
};
|
|
14
|
-
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, };
|
|
19
|
+
export { TrackingOptions, SearchBoxOptions, SearchResultsOptions, ProductListOptions, SdkOptions, DocumentElementType, SearchBoxPanelType, FacetStyle, Environment, RoutingBehavior, AnchorPosition, BadgeType, SortDirection, };
|
|
15
20
|
export default lupaSearch;
|