@getlupa/client 0.12.3 → 0.13.0-alpha
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/product-card/SearchResultsProductCard.vue.d.ts +1 -3
- package/dist/cjs/constants/global.const.d.ts +0 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.min.js +888 -1005
- package/dist/cjs/types/DocumentElement.d.ts +1 -11
- package/dist/cjs/types/search-container/SearchContainerOptions.d.ts +8 -1
- package/dist/cjs/utils/shadowDom.utils.d.ts +3 -1
- package/dist/es/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +1 -3
- package/dist/es/constants/global.const.d.ts +0 -1
- package/dist/es/index.d.ts +3 -3
- package/dist/es/index.min.js +888 -1005
- package/dist/es/types/DocumentElement.d.ts +1 -11
- package/dist/es/types/search-container/SearchContainerOptions.d.ts +8 -1
- package/dist/es/utils/shadowDom.utils.d.ts +3 -1
- package/dist/iife/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +1 -3
- package/dist/iife/constants/global.const.d.ts +0 -1
- package/dist/iife/index.d.ts +3 -3
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/DocumentElement.d.ts +1 -11
- package/dist/iife/types/search-container/SearchContainerOptions.d.ts +8 -1
- package/dist/iife/utils/shadowDom.utils.d.ts +3 -1
- package/package.json +1 -1
- package/dist/cjs/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +0 -11
- package/dist/es/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +0 -11
- package/dist/iife/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +0 -11
|
@@ -6,7 +6,6 @@ export declare enum DocumentElementType {
|
|
|
6
6
|
PRICE = "price",
|
|
7
7
|
REGULARPRICE = "regularPrice",
|
|
8
8
|
RATING = "rating",
|
|
9
|
-
SINGLE_STAR_RATING = "singleStarRating",
|
|
10
9
|
ADDTOCART = "addToCart",
|
|
11
10
|
CUSTOM_HTML = "customHtml"
|
|
12
11
|
}
|
|
@@ -15,7 +14,6 @@ export declare type DocumentElementBase<T = any> = {
|
|
|
15
14
|
key?: string;
|
|
16
15
|
display?: (document: T) => boolean;
|
|
17
16
|
isHtml?: boolean;
|
|
18
|
-
group?: string;
|
|
19
17
|
};
|
|
20
18
|
export declare type ImageDocumentElement<T = any> = DocumentElementBase<T> & {
|
|
21
19
|
type: DocumentElementType.IMAGE;
|
|
@@ -59,14 +57,6 @@ export declare type RatingElement<T = any> = DocumentElementBase<T> & {
|
|
|
59
57
|
getRatingPercentage?: (doc: T) => number;
|
|
60
58
|
key: string;
|
|
61
59
|
};
|
|
62
|
-
export declare type SingleStarRatingElement<T = any> = DocumentElementBase<T> & {
|
|
63
|
-
type: DocumentElementType.SINGLE_STAR_RATING;
|
|
64
|
-
labels: RatingLabels;
|
|
65
|
-
links: RatingLinks;
|
|
66
|
-
key: string;
|
|
67
|
-
totalKey: string;
|
|
68
|
-
displayRating: (doc: T) => string;
|
|
69
|
-
};
|
|
70
60
|
export declare type RatingLabels = {
|
|
71
61
|
numberOfRatings: string;
|
|
72
62
|
};
|
|
@@ -85,4 +75,4 @@ export declare type CustomHtmlElement<T = any> = DocumentElementBase<T> & {
|
|
|
85
75
|
html: (document: T) => string;
|
|
86
76
|
className: string;
|
|
87
77
|
};
|
|
88
|
-
export declare type DocumentElement = ImageDocumentElement | TitleDocumentElement | DescriptionDocumentElement | CustomDocumentElement | PriceElement | RegularPriceDocumentElement | RatingElement |
|
|
78
|
+
export declare type DocumentElement = ImageDocumentElement | TitleDocumentElement | DescriptionDocumentElement | CustomDocumentElement | PriceElement | RegularPriceDocumentElement | RatingElement | AddToCartElement | CustomHtmlElement;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { SearchBoxOptions } from "../search-box/SearchBoxOptions";
|
|
2
2
|
import { SearchResultsOptions } from "../search-results/SearchResultsOptions";
|
|
3
|
+
export declare type SearchContainerConfigOptions = {
|
|
4
|
+
isOpenInitially?: boolean;
|
|
5
|
+
styleLink?: string;
|
|
6
|
+
layout?: {
|
|
7
|
+
marginLeft?: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
3
10
|
export declare type SearchContainerOptions = {
|
|
4
11
|
trigger: string;
|
|
5
|
-
styleLink?: string;
|
|
6
12
|
searchBox: SearchBoxOptions;
|
|
7
13
|
searchResults: SearchResultsOptions;
|
|
14
|
+
options?: SearchContainerConfigOptions;
|
|
8
15
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { SearchContainerConfigOptions } from "@/types/search-container/SearchContainerOptions";
|
|
1
2
|
export declare const createShadowDom: (shadowId: string, managerId: string) => {
|
|
2
3
|
host: HTMLElement;
|
|
3
4
|
manager: HTMLElement;
|
|
4
5
|
};
|
|
5
|
-
export declare const attatchShadowDom: ({ host, manager, styleUrl, }: {
|
|
6
|
+
export declare const attatchShadowDom: ({ host, manager, styleUrl, options, }: {
|
|
6
7
|
host: HTMLElement;
|
|
7
8
|
manager: HTMLElement;
|
|
8
9
|
styleUrl: string;
|
|
10
|
+
options?: SearchContainerConfigOptions | undefined;
|
|
9
11
|
}) => void;
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Vue from "vue";
|
|
2
|
-
import { Document } from "@getlupa/client-sdk/Types";
|
|
3
|
-
import { SingleStarRatingElement } from "@/types/DocumentElement";
|
|
4
|
-
export default class SearchResultsProductSingleStarRating extends Vue {
|
|
5
|
-
item: Document;
|
|
6
|
-
options: SingleStarRatingElement;
|
|
7
|
-
get totalRatings(): string;
|
|
8
|
-
get ratingLink(): string;
|
|
9
|
-
get rating(): string;
|
|
10
|
-
get star(): string;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Vue from "vue";
|
|
2
|
-
import { Document } from "@getlupa/client-sdk/Types";
|
|
3
|
-
import { SingleStarRatingElement } from "@/types/DocumentElement";
|
|
4
|
-
export default class SearchResultsProductSingleStarRating extends Vue {
|
|
5
|
-
item: Document;
|
|
6
|
-
options: SingleStarRatingElement;
|
|
7
|
-
get totalRatings(): string;
|
|
8
|
-
get ratingLink(): string;
|
|
9
|
-
get rating(): string;
|
|
10
|
-
get star(): string;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Vue from "vue";
|
|
2
|
-
import { Document } from "@getlupa/client-sdk/Types";
|
|
3
|
-
import { SingleStarRatingElement } from "@/types/DocumentElement";
|
|
4
|
-
export default class SearchResultsProductSingleStarRating extends Vue {
|
|
5
|
-
item: Document;
|
|
6
|
-
options: SingleStarRatingElement;
|
|
7
|
-
get totalRatings(): string;
|
|
8
|
-
get ratingLink(): string;
|
|
9
|
-
get rating(): string;
|
|
10
|
-
get star(): string;
|
|
11
|
-
}
|