@getlupa/client 0.12.1 → 0.12.2
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 +3 -1
- package/dist/cjs/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +11 -0
- package/dist/cjs/constants/global.const.d.ts +1 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.min.js +1005 -880
- package/dist/cjs/types/DocumentElement.d.ts +11 -1
- package/dist/es/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +3 -1
- package/dist/es/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +11 -0
- package/dist/es/constants/global.const.d.ts +1 -0
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.min.js +1005 -880
- package/dist/es/types/DocumentElement.d.ts +11 -1
- package/dist/iife/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts +3 -1
- package/dist/iife/components/search-results/products/product-card/elements/SearchResultsProductSingleStarRating.vue.d.ts +11 -0
- package/dist/iife/constants/global.const.d.ts +1 -0
- package/dist/iife/index.d.ts +2 -2
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/DocumentElement.d.ts +11 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ export declare enum DocumentElementType {
|
|
|
6
6
|
PRICE = "price",
|
|
7
7
|
REGULARPRICE = "regularPrice",
|
|
8
8
|
RATING = "rating",
|
|
9
|
+
SINGLE_STAR_RATING = "singleStarRating",
|
|
9
10
|
ADDTOCART = "addToCart",
|
|
10
11
|
CUSTOM_HTML = "customHtml"
|
|
11
12
|
}
|
|
@@ -14,6 +15,7 @@ export declare type DocumentElementBase<T = any> = {
|
|
|
14
15
|
key?: string;
|
|
15
16
|
display?: (document: T) => boolean;
|
|
16
17
|
isHtml?: boolean;
|
|
18
|
+
group?: string;
|
|
17
19
|
};
|
|
18
20
|
export declare type ImageDocumentElement<T = any> = DocumentElementBase<T> & {
|
|
19
21
|
type: DocumentElementType.IMAGE;
|
|
@@ -57,6 +59,14 @@ export declare type RatingElement<T = any> = DocumentElementBase<T> & {
|
|
|
57
59
|
getRatingPercentage?: (doc: T) => number;
|
|
58
60
|
key: string;
|
|
59
61
|
};
|
|
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
|
+
};
|
|
60
70
|
export declare type RatingLabels = {
|
|
61
71
|
numberOfRatings: string;
|
|
62
72
|
};
|
|
@@ -75,4 +85,4 @@ export declare type CustomHtmlElement<T = any> = DocumentElementBase<T> & {
|
|
|
75
85
|
html: (document: T) => string;
|
|
76
86
|
className: string;
|
|
77
87
|
};
|
|
78
|
-
export declare type DocumentElement = ImageDocumentElement | TitleDocumentElement | DescriptionDocumentElement | CustomDocumentElement | PriceElement | RegularPriceDocumentElement | RatingElement | AddToCartElement | CustomHtmlElement;
|
|
88
|
+
export declare type DocumentElement = ImageDocumentElement | TitleDocumentElement | DescriptionDocumentElement | CustomDocumentElement | PriceElement | RegularPriceDocumentElement | RatingElement | SingleStarRatingElement | AddToCartElement | CustomHtmlElement;
|
package/dist/iife/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export default class SearchResultsProductCard extends Vue {
|
|
|
11
11
|
product: Document;
|
|
12
12
|
options: SearchResultsProductCardOptions;
|
|
13
13
|
isAdditionalPanel: boolean;
|
|
14
|
+
isInStock: boolean;
|
|
14
15
|
layout: ResultsLayout;
|
|
15
16
|
searchResultsRoutingBehavior: RoutingBehavior;
|
|
16
17
|
searchResultOptions: SearchResultsOptions;
|
|
@@ -26,7 +27,8 @@ export default class SearchResultsProductCard extends Vue {
|
|
|
26
27
|
get labels(): SearchResultsOptionLabels;
|
|
27
28
|
get link(): string;
|
|
28
29
|
get hasEventRouting(): boolean;
|
|
29
|
-
|
|
30
|
+
get elementGroups(): string[];
|
|
31
|
+
getGroupElements(group: string): DocumentElement[];
|
|
30
32
|
mounted(): void;
|
|
31
33
|
checkIfIsInStock(): Promise<void>;
|
|
32
34
|
get id(): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -14,3 +14,4 @@ export declare const DEFAULT_PAGE_SIZE = 12;
|
|
|
14
14
|
export declare const DEFAULT_PAGE_SIZE_SELECTION: number[];
|
|
15
15
|
export declare const LUPA_ROUTING_EVENT = "lupaRedirect";
|
|
16
16
|
export declare const DEFAULT_CONTAINER_STYLE = "containerStyle.css";
|
|
17
|
+
export declare const RATING_STAR_HTML = "☆";
|
package/dist/iife/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { SearchBoxOptions } from "./types/search-box/SearchBoxOptions";
|
|
|
2
2
|
import { CallbackContext, FacetFilterQuery, FacetStyle, ResultFacetOptions, SearchResultEventCallbacks, SearchResultsFilterOptions, SearchResultsOptions } from "./types/search-results/SearchResultsOptions";
|
|
3
3
|
import { SdkOptions, TrackingOptions, Environment, SortDirection } from "./types/General";
|
|
4
4
|
import { CategoryFilterOptions, ProductListOptions } from "./types/product-list/ProductListOptions";
|
|
5
|
-
import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, TitleDocumentElement } from "./types/DocumentElement";
|
|
5
|
+
import { AddToCartElement, CustomDocumentElement, CustomHtmlElement, DescriptionDocumentElement, DocumentElement, DocumentElementType, ImageDocumentElement, PriceElement, RatingElement, RegularPriceDocumentElement, SingleStarRatingElement, 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";
|
|
@@ -23,5 +23,5 @@ declare const lupaSearch: {
|
|
|
23
23
|
clearProductList: (selector?: string | undefined) => void;
|
|
24
24
|
clearSearchContainer: (selector?: string | undefined) => void;
|
|
25
25
|
};
|
|
26
|
-
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, SearchResultEventCallbacks, CallbackContext, FacetFilterQuery, CategoryFilterOptions, SearchResultsFilterOptions, SearchResultBadgeType, SearchResultBadgeElement, ResultFacetOptions, BadgeGenerateSeed, BadgeGenerateOptions, BadgeOptions, MountOptions, SearchContainerOptions, };
|
|
26
|
+
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, SearchResultEventCallbacks, CallbackContext, FacetFilterQuery, CategoryFilterOptions, SearchResultsFilterOptions, SearchResultBadgeType, SearchResultBadgeElement, ResultFacetOptions, BadgeGenerateSeed, BadgeGenerateOptions, BadgeOptions, MountOptions, SearchContainerOptions, SingleStarRatingElement, };
|
|
27
27
|
export default lupaSearch;
|