@getlupa/client 0.12.4 → 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/dist/es/components/search-results/products/product-card/SearchResultsProductCard.vue.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export default class SearchResultsProductCard extends Vue {
|
|
|
11
11
|
product: Document;
|
|
12
12
|
options: SearchResultsProductCardOptions;
|
|
13
13
|
isAdditionalPanel: boolean;
|
|
14
|
-
isInStock: boolean;
|
|
15
14
|
layout: ResultsLayout;
|
|
16
15
|
searchResultsRoutingBehavior: RoutingBehavior;
|
|
17
16
|
searchResultOptions: SearchResultsOptions;
|
|
@@ -27,8 +26,7 @@ export default class SearchResultsProductCard extends Vue {
|
|
|
27
26
|
get labels(): SearchResultsOptionLabels;
|
|
28
27
|
get link(): string;
|
|
29
28
|
get hasEventRouting(): boolean;
|
|
30
|
-
|
|
31
|
-
getGroupElements(group: string): DocumentElement[];
|
|
29
|
+
isInStock: boolean;
|
|
32
30
|
mounted(): void;
|
|
33
31
|
checkIfIsInStock(): Promise<void>;
|
|
34
32
|
get id(): string;
|
|
@@ -14,4 +14,3 @@ 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/es/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@ 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,
|
|
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 { BadgeGenerateOptions, BadgeGenerateSeed, BadgeOptions, BadgeType, SearchResultBadgeElement, SearchResultBadgeType } from "./types/search-results/BadgeOptions";
|
|
10
10
|
import { SearchResultsSortOptions, SortOptions } from "./types/search-results/SearchResultsSort";
|
|
11
|
-
import { SearchContainerOptions } from "./types/search-container/SearchContainerOptions";
|
|
11
|
+
import { SearchContainerConfigOptions, SearchContainerOptions } from "./types/search-container/SearchContainerOptions";
|
|
12
12
|
declare type MountOptions = {
|
|
13
13
|
fetch: boolean;
|
|
14
14
|
};
|
|
@@ -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, SearchContainerConfigOptions, };
|
|
27
27
|
export default lupaSearch;
|