@getlupa/client 0.7.0-alpha-3 → 0.7.0-alpha-6
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/index.min.js +2 -2
- package/dist/cjs/types/search-results/BadgeOptions.d.ts +2 -2
- package/dist/es/index.min.js +2 -2
- package/dist/es/types/search-results/BadgeOptions.d.ts +2 -2
- package/dist/iife/index.min.js +1 -1
- package/dist/iife/types/search-results/BadgeOptions.d.ts +2 -2
- package/package.json +1 -1
package/dist/cjs/index.min.js
CHANGED
|
@@ -16550,8 +16550,8 @@ exports.BadgeType = void 0;
|
|
|
16550
16550
|
|
|
16551
16551
|
let CustomBadge = class CustomBadge extends Vue$1 {
|
|
16552
16552
|
get text() {
|
|
16553
|
-
var _a;
|
|
16554
|
-
return this.badge.html(
|
|
16553
|
+
var _a, _b, _c;
|
|
16554
|
+
return (_b = (_a = this.badge).html) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = this.badge.product) !== null && _c !== void 0 ? _c : {});
|
|
16555
16555
|
}
|
|
16556
16556
|
get className() {
|
|
16557
16557
|
var _a;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Document } from "@getlupa/client-sdk/Types";
|
|
2
1
|
import { AnchorPosition } from "./SearchResultsProductCardOptions";
|
|
3
2
|
export declare type SearchResultBadgeType = "text" | "image" | "customHtml";
|
|
4
3
|
export declare type BadgeOptions = {
|
|
@@ -15,6 +14,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
15
14
|
display?: (document: T) => boolean;
|
|
16
15
|
rootImageUrl?: string;
|
|
17
16
|
maxItems?: number;
|
|
17
|
+
html?: (doc: T) => string;
|
|
18
18
|
};
|
|
19
19
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
20
20
|
value?: string;
|
|
@@ -32,7 +32,7 @@ export declare type ImageBadgeElement<T = any> = BaseBadgeElement<T> & {
|
|
|
32
32
|
export declare type CustomHtmlBadgeElement<T = any> = BaseBadgeElement<T> & {
|
|
33
33
|
type: "customHtml";
|
|
34
34
|
className?: string;
|
|
35
|
-
html: (doc:
|
|
35
|
+
html: (doc: T) => string;
|
|
36
36
|
};
|
|
37
37
|
export declare type BadgeElement = BaseBadgeElement | TextBadgeElement;
|
|
38
38
|
export declare enum BadgeType {
|
package/dist/es/index.min.js
CHANGED
|
@@ -16546,8 +16546,8 @@ var BadgeType;
|
|
|
16546
16546
|
|
|
16547
16547
|
let CustomBadge = class CustomBadge extends Vue$1 {
|
|
16548
16548
|
get text() {
|
|
16549
|
-
var _a;
|
|
16550
|
-
return this.badge.html(
|
|
16549
|
+
var _a, _b, _c;
|
|
16550
|
+
return (_b = (_a = this.badge).html) === null || _b === void 0 ? void 0 : _b.call(_a, (_c = this.badge.product) !== null && _c !== void 0 ? _c : {});
|
|
16551
16551
|
}
|
|
16552
16552
|
get className() {
|
|
16553
16553
|
var _a;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Document } from "@getlupa/client-sdk/Types";
|
|
2
1
|
import { AnchorPosition } from "./SearchResultsProductCardOptions";
|
|
3
2
|
export declare type SearchResultBadgeType = "text" | "image" | "customHtml";
|
|
4
3
|
export declare type BadgeOptions = {
|
|
@@ -15,6 +14,7 @@ export declare type SearchResultBadgeElement<T = any> = {
|
|
|
15
14
|
display?: (document: T) => boolean;
|
|
16
15
|
rootImageUrl?: string;
|
|
17
16
|
maxItems?: number;
|
|
17
|
+
html?: (doc: T) => string;
|
|
18
18
|
};
|
|
19
19
|
export declare type BaseBadgeElement<T = any> = SearchResultBadgeElement<T> & {
|
|
20
20
|
value?: string;
|
|
@@ -32,7 +32,7 @@ export declare type ImageBadgeElement<T = any> = BaseBadgeElement<T> & {
|
|
|
32
32
|
export declare type CustomHtmlBadgeElement<T = any> = BaseBadgeElement<T> & {
|
|
33
33
|
type: "customHtml";
|
|
34
34
|
className?: string;
|
|
35
|
-
html: (doc:
|
|
35
|
+
html: (doc: T) => string;
|
|
36
36
|
};
|
|
37
37
|
export declare type BadgeElement = BaseBadgeElement | TextBadgeElement;
|
|
38
38
|
export declare enum BadgeType {
|