@envive-ai/react-toolkit 0.1.5 → 0.1.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/Accordion/index.cjs +84 -0
- package/dist/Accordion/index.d.cts +13 -0
- package/dist/Accordion/index.d.ts +13 -0
- package/dist/Accordion/index.js +77 -0
- package/dist/ButtonBase/index.cjs +2 -1
- package/dist/ButtonBase/index.d.cts +2 -2
- package/dist/ButtonBase/index.d.ts +3 -3
- package/dist/ButtonBase/index.js +2 -1
- package/dist/{ButtonBase-CpmFsiUf.js → ButtonBase-BIAu5fIG.js} +1 -1
- package/dist/ButtonBase-BRfuPPzN.js +1 -0
- package/dist/ButtonBase-BleAVeo-.cjs +0 -0
- package/dist/{ButtonBase-Dlh3bpR3.cjs → ButtonBase-DcyxOe2v.cjs} +2 -2
- package/dist/FilterScrollbar/index.cjs +1 -1
- package/dist/FilterScrollbar/index.d.cts +3 -3
- package/dist/FilterScrollbar/index.d.ts +4 -4
- package/dist/FilterScrollbar/index.js +1 -1
- package/dist/Headline/index.cjs +1 -1
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +1 -1
- package/dist/ImageWithFallback/index.cjs +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ImageWithFallback/index.js +1 -1
- package/dist/{ImageWithFallback-By6QdlCR.cjs → ImageWithFallback-1LqhQK1q.cjs} +2 -2
- package/dist/{ImageWithFallback-DtUrq_bk.js → ImageWithFallback-Ckwsmd8P.js} +1 -1
- package/dist/ProductCard/index.cjs +7 -8
- package/dist/ProductCard/index.d.cts +2 -108
- package/dist/ProductCard/index.d.ts +2 -108
- package/dist/ProductCard/index.js +4 -5
- package/dist/{ProductCard-CvTRvhm7.cjs → ProductCard-DZZKutY-.cjs} +64 -5
- package/dist/{ProductCard-aJbQz6Q7.js → ProductCard-SF8-lXlT.js} +46 -6
- package/dist/ProductGrid/index.cjs +5 -5
- package/dist/ProductGrid/index.d.cts +6 -6
- package/dist/ProductGrid/index.d.ts +6 -6
- package/dist/ProductGrid/index.js +5 -5
- package/dist/{ProductGrid-CSIH2_G9.cjs → ProductGrid-BSSmPr7K.cjs} +48 -46
- package/dist/{ProductGrid-NOCayW9O.js → ProductGrid-DTUhH219.js} +48 -46
- package/dist/{SearchInputAutocomplete → SearchAutocomplete}/index.cjs +1 -1
- package/dist/{SearchInputAutocomplete → SearchAutocomplete}/index.d.cts +1 -1
- package/dist/{SearchInputAutocomplete → SearchAutocomplete}/index.d.ts +1 -1
- package/dist/SearchAutocomplete/index.js +3 -0
- package/dist/{SearchAutocomplete-DCu9-Yfk.js → SearchAutocomplete-BPjlo6qq.js} +4 -4
- package/dist/{SearchAutocomplete-CQxxe5Op.cjs → SearchAutocomplete-BzaEXmRQ.cjs} +8 -8
- package/dist/SearchFilter/index.cjs +5 -5
- package/dist/SearchFilter/index.d.cts +1 -34
- package/dist/SearchFilter/index.d.ts +1 -34
- package/dist/SearchFilter/index.js +2 -2
- package/dist/{SearchFilterHeader-qkRVfAB5.cjs → SearchFilter-B15tybnV.cjs} +1 -1
- package/dist/{SearchFilterHeader-BDEcDc_4.js → SearchFilter-D427M2UE.js} +1 -1
- package/dist/SearchInput/index.cjs +3 -3
- package/dist/SearchInput/index.d.cts +3 -3
- package/dist/SearchInput/index.d.ts +3 -3
- package/dist/SearchInput/index.js +3 -3
- package/dist/{SearchInput-DxGvYGZO.js → SearchInput-C0wB4hSV.js} +6 -6
- package/dist/{SearchInput-Cdpwswyv.cjs → SearchInput-D6UW79wT.cjs} +10 -10
- package/dist/SearchInputForm/index.cjs +6 -5
- package/dist/SearchInputForm/index.d.cts +1 -31
- package/dist/SearchInputForm/index.d.ts +1 -31
- package/dist/SearchInputForm/index.js +6 -5
- package/dist/SearchResultsFilterSidebar/index.cjs +10 -6
- package/dist/SearchResultsFilterSidebar/index.d.cts +3 -44
- package/dist/SearchResultsFilterSidebar/index.d.ts +3 -44
- package/dist/SearchResultsFilterSidebar/index.js +7 -4
- package/dist/SearchResultsStates/index.cjs +23 -24
- package/dist/SearchResultsStates/index.d.cts +13 -6
- package/dist/SearchResultsStates/index.d.ts +14 -7
- package/dist/SearchResultsStates/index.js +19 -21
- package/dist/SparkleAnimation/index.cjs +1 -1
- package/dist/SparkleAnimation/index.d.cts +2 -2
- package/dist/SparkleAnimation/index.d.ts +2 -2
- package/dist/SparkleAnimation/index.js +1 -1
- package/dist/{SparkleAnimation-DfMCtvAQ.js → SparkleAnimation-BdOjC8l-.js} +2 -2
- package/dist/{SparkleAnimation-j-mAMEZZ.cjs → SparkleAnimation-BhyeL26m.cjs} +4 -4
- package/dist/Spinner/index.cjs +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Spinner/index.js +1 -1
- package/dist/SuggestionButton/index.cjs +3 -3
- package/dist/SuggestionButton/index.d.cts +2 -2
- package/dist/SuggestionButton/index.d.ts +3 -3
- package/dist/SuggestionButton/index.js +2 -2
- package/dist/Text/index.cjs +2 -10
- package/dist/Text/index.d.cts +3 -3
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +1 -9
- package/dist/Text-CV9pv8ds.js +10 -0
- package/dist/Text-DDT3sqY1.cjs +16 -0
- package/dist/TextInput/index.cjs +1 -1
- package/dist/TextInput/index.d.cts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-CObd_Wcw.cjs → TextInput-C6fF9cSB.cjs} +2 -2
- package/dist/{TextInput-ChPhL54o.js → TextInput-CRMqBW3X.js} +1 -1
- package/dist/index-B0oln9VD.d.ts +58 -0
- package/dist/index-B125udRj.d.cts +78 -0
- package/dist/index-BHNzU-Pc.d.ts +36 -0
- package/dist/index-BNCrvswP.d.cts +36 -0
- package/dist/index-CQlBDGTL.d.cts +58 -0
- package/dist/{types-B7hf-Lif.d.ts → index-CcnuEYQN.d.ts} +110 -3
- package/dist/index-DMXTg_9L.d.ts +78 -0
- package/dist/{types-Dvgr3ZeV.d.cts → index-wYn2mEDm.d.cts} +110 -3
- package/dist/{searchFilterSidebarVariants-C_UTEIpZ.js → searchFilterSidebarVariants-BWQyiKwS.js} +1 -1
- package/dist/{searchFilterSidebarVariants-DcQLi_TT.cjs → searchFilterSidebarVariants-D08jyA7U.cjs} +1 -1
- package/package.json +10 -5
- package/src/components/Accordion/Accordion.tsx +90 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +70 -0
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +52 -0
- package/src/components/ProductCard/ProductCard.tsx +34 -17
- package/src/components/ProductCard/types.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +33 -33
- package/src/components/{SearchInputAutocomplete → SearchAutocomplete}/SearchAutocomplete.tsx +1 -1
- package/src/components/SearchInput/SearchInput.tsx +6 -6
- package/src/components/SearchInput/searchInputVariants.ts +5 -5
- package/src/components/SearchInputForm/SearchInputForm.tsx +6 -4
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +87 -0
- package/src/components/SearchResultsContent/utils.ts +28 -0
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +5 -6
- package/src/components/SearchResultsFilterSidebar/types.ts +14 -1
- package/src/components/SearchResultsStates/NoSearchResultsFound.tsx +2 -2
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +14 -12
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +4 -5
- package/dist/ProductCardSkeleton-B6YetUCT.js +0 -43
- package/dist/ProductCardSkeleton-BzBK36m-.cjs +0 -63
- package/dist/SearchInputAutocomplete/index.js +0 -3
- package/dist/types-5luH4G-3.d.cts +0 -5
- package/dist/types-BCAU5OQD.d.cts +0 -46
- package/dist/types-BIPqyTOJ.d.ts +0 -5
- package/dist/types-BwPquD10.d.ts +0 -46
- package/dist/types-CosVh8Hj.d.cts +0 -4
- package/dist/types-nR3jHgIO.d.ts +0 -4
- package/src/types/external.ts +0 -24
- /package/dist/{DynamicFiltersScrollbar-D8Lms7Ox.cjs → DynamicFiltersScrollbar-BTopFhyl.cjs} +0 -0
- /package/dist/{DynamicFiltersScrollbar-t_JASmYC.js → DynamicFiltersScrollbar-BmPTqym5.js} +0 -0
- /package/dist/{Headline-COAnonc2.js → Headline-XpaAeTSR.js} +0 -0
- /package/dist/{Headline-CdddUGwy.cjs → Headline-iP_MckEO.cjs} +0 -0
- /package/dist/{Spinner-D9kkaM9d.js → Spinner-BgGihEfJ.js} +0 -0
- /package/dist/{Spinner-DX35Epv3.cjs → Spinner-DzdIkS6t.cjs} +0 -0
- /package/dist/{colorsConfig-CKiMYHO_.js → colorsConfig-BQlaCfxi.js} +0 -0
- /package/dist/{colorsConfig-DulwYRIk.cjs → colorsConfig-DCvy_dV4.cjs} +0 -0
- /package/dist/{textVariantClasses-DwnnFNBf.d.cts → textVariantClasses-C8OCWZAw.d.ts} +0 -0
- /package/dist/{textVariantClasses-sT9E8Uty.d.ts → textVariantClasses-Cdg-UUHi.d.cts} +0 -0
- /package/dist/{types-B19i3fxM.d.ts → types-Bm-qQyO3.d.ts} +0 -0
- /package/dist/{types-DpfHwTzY.d.ts → types-BruEHw-X.d.ts} +0 -0
- /package/src/components/{SearchInputAutocomplete → SearchAutocomplete}/index.ts +0 -0
|
@@ -1,109 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnimatedProductCardOverrides, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, SearchResponseProductAttributes } from "../
|
|
3
|
-
import { FC } from "react";
|
|
4
|
-
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
//#region src/config/chatElementDisplayLocation.d.ts
|
|
7
|
-
declare enum ChatElementDisplayLocation {
|
|
8
|
-
IN_CHAT = "in_chat",
|
|
9
|
-
CHAT_PREVIEW = "chat_preview",
|
|
10
|
-
FLOATING_BUTTON = "floating_button",
|
|
11
|
-
HELP_ME_CHOOSE = "help_me_choose",
|
|
12
|
-
PLP_IMAGE_BANNER = "plp_image_banner",
|
|
13
|
-
TOP_REVIEWS_SNIPPET = "top_reviews_snippet",
|
|
14
|
-
BOTTOM_REVIEWS_SNIPPET = "bottom_reviews_snippet",
|
|
15
|
-
BLOCK_BACK_BUTTON = "block_back_button",
|
|
16
|
-
SWITCH_TO_AGENT = "switch_to_agent",
|
|
17
|
-
CONVERSATIONAL_SEARCH = "conversational_search",
|
|
18
|
-
GLOBAL_SEARCH_ENTRYPOINT = "global_search_entrypoint",
|
|
19
|
-
SEARCH_NAV_ENTRYPOINT = "search_nav_entrypoint",
|
|
20
|
-
SEARCH_PROMPT = "search_prompt",
|
|
21
|
-
SEARCH_PROMPT_BUTTON = "search_prompt_button",
|
|
22
|
-
PRODUCT_GRID = "product_grid",
|
|
23
|
-
UNSPECIFIED = "unspecified",
|
|
24
|
-
FILTER_MODAL = "filter_modal",
|
|
25
|
-
PROMPT_CARD = "prompt_card",
|
|
26
|
-
WINDOW_API_CALL = "window_api_call",
|
|
27
|
-
}
|
|
28
|
-
//#endregion
|
|
29
|
-
//#region src/components/ProductCard/ProductCard.d.ts
|
|
30
|
-
interface RatingSummaryProps {
|
|
31
|
-
stars: number;
|
|
32
|
-
reviewCount: number;
|
|
33
|
-
className?: string;
|
|
34
|
-
}
|
|
35
|
-
declare const RatingSummary: ({
|
|
36
|
-
stars,
|
|
37
|
-
reviewCount,
|
|
38
|
-
className
|
|
39
|
-
}: RatingSummaryProps) => react_jsx_runtime17.JSX.Element;
|
|
40
|
-
interface PriceSectionProps {
|
|
41
|
-
originalPrice?: string;
|
|
42
|
-
salePrice?: string;
|
|
43
|
-
pricePrefix?: string;
|
|
44
|
-
}
|
|
45
|
-
declare const PriceSection: ({
|
|
46
|
-
originalPrice,
|
|
47
|
-
salePrice,
|
|
48
|
-
pricePrefix
|
|
49
|
-
}: PriceSectionProps) => react_jsx_runtime17.JSX.Element;
|
|
50
|
-
interface ProductCardProps extends TestProps {
|
|
51
|
-
productCardConfig?: ProductCardConfig;
|
|
52
|
-
merchantShortName: string;
|
|
53
|
-
title: string;
|
|
54
|
-
url?: string;
|
|
55
|
-
searchResponseId?: string;
|
|
56
|
-
productResponseId?: string;
|
|
57
|
-
cardDisplayLocation: ChatElementDisplayLocation.IN_CHAT | ChatElementDisplayLocation.PRODUCT_GRID;
|
|
58
|
-
imageUrl?: string;
|
|
59
|
-
originalPrice?: number;
|
|
60
|
-
averageRating?: number;
|
|
61
|
-
numberReviews?: number;
|
|
62
|
-
salePrice?: number;
|
|
63
|
-
variant?: ProductCardVariant;
|
|
64
|
-
hoverVariant?: ProductCardHoverVariant;
|
|
65
|
-
layoutVariant?: ProductCardLayoutVariant;
|
|
66
|
-
zoomOnHover?: boolean;
|
|
67
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
68
|
-
clickPosition?: number | null;
|
|
69
|
-
growWithContainer?: boolean;
|
|
70
|
-
handleClick: (clickedUrl: string) => void;
|
|
71
|
-
}
|
|
72
|
-
declare const ProductCard: ({
|
|
73
|
-
productCardConfig,
|
|
74
|
-
merchantShortName,
|
|
75
|
-
imageUrl,
|
|
76
|
-
title,
|
|
77
|
-
url,
|
|
78
|
-
originalPrice,
|
|
79
|
-
averageRating,
|
|
80
|
-
numberReviews,
|
|
81
|
-
salePrice,
|
|
82
|
-
variant,
|
|
83
|
-
hoverVariant,
|
|
84
|
-
dataTestId,
|
|
85
|
-
layoutVariant,
|
|
86
|
-
zoomOnHover,
|
|
87
|
-
aspectRatio,
|
|
88
|
-
growWithContainer,
|
|
89
|
-
handleClick
|
|
90
|
-
}: ProductCardProps) => react_jsx_runtime17.JSX.Element;
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/components/ProductCard/ProductCardSkeleton.d.ts
|
|
93
|
-
interface ProductCardSkeletonProps$1 {
|
|
94
|
-
layoutVariant: ProductCardLayoutVariant;
|
|
95
|
-
aspectRatio?: '3:4' | 'square' | 'none';
|
|
96
|
-
growWithContainer?: boolean;
|
|
97
|
-
}
|
|
98
|
-
declare const ProductCardSkeleton: FC<ProductCardSkeletonProps$1>;
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/components/ProductCard/productCardVariants.d.ts
|
|
101
|
-
/**
|
|
102
|
-
* Shared variant mapping configurations for ProductCard components
|
|
103
|
-
*/
|
|
104
|
-
declare const variantClassMap: Map<ProductCardVariant, string[]>;
|
|
105
|
-
declare const variantHoverClassMap: Map<ProductCardHoverVariant, string[]>;
|
|
106
|
-
declare const variantTitleColorMap: Map<ProductCardVariant, string>;
|
|
107
|
-
declare const productCardLayoutVariantClasses: Record<ProductCardLayoutVariant, Record<string, string[]>>;
|
|
108
|
-
//#endregion
|
|
1
|
+
import "../types-BruEHw-X.js";
|
|
2
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../index-CcnuEYQN.js";
|
|
109
3
|
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardConfig, ProductCardHoverVariant, ProductCardImageAspectRatio, ProductCardLayoutVariant, ProductCardSkeleton, ProductCardSkeletonOverrides, ProductCardSkeletonProps, ProductCardVariant, ProductGridProps, ProductGridVariant, RatingSummary, SearchResponseProductAttributes, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import "../textVariantClasses-CnjwO2Fv.js";
|
|
2
2
|
import "../Text-BMg3d10t.js";
|
|
3
|
-
import "../Headline-
|
|
4
|
-
import "../ImageWithFallback-
|
|
5
|
-
import { PriceSection, ProductCard, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-
|
|
6
|
-
import "../Spinner-
|
|
7
|
-
import { AnimatedProductCardOverrides, ProductCardSkeleton, ProductCardSkeletonOverrides } from "../ProductCardSkeleton-B6YetUCT.js";
|
|
3
|
+
import "../Headline-XpaAeTSR.js";
|
|
4
|
+
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
5
|
+
import { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap } from "../ProductCard-SF8-lXlT.js";
|
|
6
|
+
import "../Spinner-BgGihEfJ.js";
|
|
8
7
|
|
|
9
8
|
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
2
|
const require_Text = require('./Text-CgOYTs8D.cjs');
|
|
3
|
-
const require_Headline = require('./Headline-
|
|
4
|
-
const require_ImageWithFallback = require('./ImageWithFallback-
|
|
5
|
-
const require_Spinner = require('./Spinner-
|
|
3
|
+
const require_Headline = require('./Headline-iP_MckEO.cjs');
|
|
4
|
+
const require_ImageWithFallback = require('./ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
+
const require_Spinner = require('./Spinner-DzdIkS6t.cjs');
|
|
6
6
|
let classnames = require("classnames");
|
|
7
7
|
classnames = require_chunk.__toESM(classnames);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
10
10
|
let react_icons_md = require("react-icons/md");
|
|
11
11
|
react_icons_md = require_chunk.__toESM(react_icons_md);
|
|
12
|
+
let __envive_ai_react_hooks_hooks = require("@envive-ai/react-hooks/hooks");
|
|
13
|
+
__envive_ai_react_hooks_hooks = require_chunk.__toESM(__envive_ai_react_hooks_hooks);
|
|
12
14
|
|
|
13
15
|
//#region src/components/ProductCard/productCardVariants.ts
|
|
14
16
|
/**
|
|
@@ -131,6 +133,7 @@ const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
|
131
133
|
});
|
|
132
134
|
};
|
|
133
135
|
const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = "normal", zoomOnHover = false, aspectRatio = "none", growWithContainer = false, handleClick }) => {
|
|
136
|
+
const { resolve } = (0, __envive_ai_react_hooks_hooks.useImageResolver)();
|
|
134
137
|
const finalVariant = variant ?? productCardConfig?.variant ?? "filled";
|
|
135
138
|
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? "backgroundDark";
|
|
136
139
|
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? "normal";
|
|
@@ -176,7 +179,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
176
179
|
"data-testid": dataTestId,
|
|
177
180
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
178
181
|
href: url,
|
|
179
|
-
onClick: () => handleClick(url
|
|
182
|
+
onClick: () => handleClick(url),
|
|
180
183
|
target: "_self",
|
|
181
184
|
draggable: false,
|
|
182
185
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -186,7 +189,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
186
189
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
187
190
|
className: imageContainerClassnames,
|
|
188
191
|
children: imageUrl && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ImageWithFallback.ImageWithFallback, {
|
|
189
|
-
src: imageUrl,
|
|
192
|
+
src: resolve(imageUrl, layoutVariant === "tall" ? 300 : 178),
|
|
190
193
|
alt: title,
|
|
191
194
|
fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }),
|
|
192
195
|
imageClassnames
|
|
@@ -216,6 +219,50 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
216
219
|
};
|
|
217
220
|
|
|
218
221
|
//#endregion
|
|
222
|
+
//#region src/components/ProductCard/types.ts
|
|
223
|
+
let ProductCardSkeletonOverrides = /* @__PURE__ */ function(ProductCardSkeletonOverrides$1) {
|
|
224
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
225
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
226
|
+
return ProductCardSkeletonOverrides$1;
|
|
227
|
+
}({});
|
|
228
|
+
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
229
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
230
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
231
|
+
return AnimatedProductCardOverrides$1;
|
|
232
|
+
}({});
|
|
233
|
+
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
236
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
237
|
+
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
238
|
+
const containerClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
239
|
+
const verticalContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
240
|
+
const imageClipContainerClasses = (0, classnames.default)("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
241
|
+
const imageSkeletonClasses = (0, classnames.default)("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
242
|
+
const contentContainerClasses = (0, classnames.default)("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
243
|
+
const textSkeletonClasses = (0, classnames.default)(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON, "spiffy-tw-h-[15px]", "spiffy-tw-block", "spiffy-tw-rounded-sm", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-bg-[#F4F4F6]");
|
|
244
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
245
|
+
className: containerClasses,
|
|
246
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
247
|
+
className: verticalContainerClasses,
|
|
248
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
249
|
+
className: imageClipContainerClasses,
|
|
250
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: imageSkeletonClasses })
|
|
251
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
252
|
+
className: contentContainerClasses,
|
|
253
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: (0, classnames.default)(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
254
|
+
})]
|
|
255
|
+
})
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
Object.defineProperty(exports, 'AnimatedProductCardOverrides', {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function () {
|
|
263
|
+
return AnimatedProductCardOverrides;
|
|
264
|
+
}
|
|
265
|
+
});
|
|
219
266
|
Object.defineProperty(exports, 'PriceSection', {
|
|
220
267
|
enumerable: true,
|
|
221
268
|
get: function () {
|
|
@@ -228,6 +275,18 @@ Object.defineProperty(exports, 'ProductCard', {
|
|
|
228
275
|
return ProductCard;
|
|
229
276
|
}
|
|
230
277
|
});
|
|
278
|
+
Object.defineProperty(exports, 'ProductCardSkeleton', {
|
|
279
|
+
enumerable: true,
|
|
280
|
+
get: function () {
|
|
281
|
+
return ProductCardSkeleton;
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, 'ProductCardSkeletonOverrides', {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function () {
|
|
287
|
+
return ProductCardSkeletonOverrides;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
231
290
|
Object.defineProperty(exports, 'RatingSummary', {
|
|
232
291
|
enumerable: true,
|
|
233
292
|
get: function () {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Text } from "./Text-BMg3d10t.js";
|
|
2
|
-
import { Headline } from "./Headline-
|
|
3
|
-
import { ImageWithFallback } from "./ImageWithFallback-
|
|
4
|
-
import { Spinner } from "./Spinner-
|
|
2
|
+
import { Headline } from "./Headline-XpaAeTSR.js";
|
|
3
|
+
import { ImageWithFallback } from "./ImageWithFallback-Ckwsmd8P.js";
|
|
4
|
+
import { Spinner } from "./Spinner-BgGihEfJ.js";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { MdStar } from "react-icons/md";
|
|
8
|
+
import { useImageResolver } from "@envive-ai/react-hooks/hooks";
|
|
8
9
|
|
|
9
10
|
//#region src/components/ProductCard/productCardVariants.ts
|
|
10
11
|
/**
|
|
@@ -127,6 +128,7 @@ const PriceSection = ({ originalPrice, salePrice, pricePrefix }) => {
|
|
|
127
128
|
});
|
|
128
129
|
};
|
|
129
130
|
const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, url, originalPrice, averageRating, numberReviews, salePrice, variant, hoverVariant, dataTestId, layoutVariant = "normal", zoomOnHover = false, aspectRatio = "none", growWithContainer = false, handleClick }) => {
|
|
131
|
+
const { resolve } = useImageResolver();
|
|
130
132
|
const finalVariant = variant ?? productCardConfig?.variant ?? "filled";
|
|
131
133
|
const finalHoverVariant = hoverVariant ?? productCardConfig?.hoverVariant ?? "backgroundDark";
|
|
132
134
|
const finalLayoutVariant = layoutVariant ?? productCardConfig?.layoutVariant ?? "normal";
|
|
@@ -172,7 +174,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
172
174
|
"data-testid": dataTestId,
|
|
173
175
|
children: /* @__PURE__ */ jsx("a", {
|
|
174
176
|
href: url,
|
|
175
|
-
onClick: () => handleClick(url
|
|
177
|
+
onClick: () => handleClick(url),
|
|
176
178
|
target: "_self",
|
|
177
179
|
draggable: false,
|
|
178
180
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -182,7 +184,7 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
182
184
|
children: /* @__PURE__ */ jsx("div", {
|
|
183
185
|
className: imageContainerClassnames,
|
|
184
186
|
children: imageUrl && /* @__PURE__ */ jsx(ImageWithFallback, {
|
|
185
|
-
src: imageUrl,
|
|
187
|
+
src: resolve(imageUrl, layoutVariant === "tall" ? 300 : 178),
|
|
186
188
|
alt: title,
|
|
187
189
|
fallback: /* @__PURE__ */ jsx(Spinner, { className: "spiffy-tw-w-6 spiffy-tw-h-6" }),
|
|
188
190
|
imageClassnames
|
|
@@ -212,4 +214,42 @@ const ProductCard = ({ productCardConfig, merchantShortName, imageUrl, title, ur
|
|
|
212
214
|
};
|
|
213
215
|
|
|
214
216
|
//#endregion
|
|
215
|
-
|
|
217
|
+
//#region src/components/ProductCard/types.ts
|
|
218
|
+
let ProductCardSkeletonOverrides = /* @__PURE__ */ function(ProductCardSkeletonOverrides$1) {
|
|
219
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON_CONTAINER"] = "spiffy-product-card-skeleton-container";
|
|
220
|
+
ProductCardSkeletonOverrides$1["PRODUCT_CARD_SKELETON"] = "spiffy-product-card-skeleton";
|
|
221
|
+
return ProductCardSkeletonOverrides$1;
|
|
222
|
+
}({});
|
|
223
|
+
let AnimatedProductCardOverrides = /* @__PURE__ */ function(AnimatedProductCardOverrides$1) {
|
|
224
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_CONTAINER"] = "spiffy-product-card-animated-container";
|
|
225
|
+
AnimatedProductCardOverrides$1["PRODUCT_CARD_ANIMATED_IMAGE_CONTAINER"] = "spiffy-product-card-animated";
|
|
226
|
+
return AnimatedProductCardOverrides$1;
|
|
227
|
+
}({});
|
|
228
|
+
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/components/ProductCard/ProductCardSkeleton.tsx
|
|
231
|
+
const ProductCardSkeleton = ({ layoutVariant, aspectRatio, growWithContainer = false }) => {
|
|
232
|
+
const layoutClasses = productCardLayoutVariantClasses[layoutVariant || "normal"];
|
|
233
|
+
const containerClasses = classNames(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON_CONTAINER, "spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-inherit", "spiffy-tw-bg-transparent", !growWithContainer ? layoutClasses.container : "");
|
|
234
|
+
const verticalContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-overflow-hidden", "spiffy-tw-gap-inherit", !growWithContainer ? layoutClasses.verticalContainer : "");
|
|
235
|
+
const imageClipContainerClasses = classNames("spiffy-tw-w-full", aspectRatio === "3:4" ? "spiffy-tw-aspect-[3/4]" : "", aspectRatio === "square" ? "spiffy-tw-aspect-square" : "", "spiffy-tw-overflow-hidden");
|
|
236
|
+
const imageSkeletonClasses = classNames("spiffy-tw-bg-[#F4F4F6]", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-w-full", "spiffy-tw-h-full");
|
|
237
|
+
const contentContainerClasses = classNames("spiffy-tw-flex", "spiffy-tw-flex-col", "spiffy-tw-gap-2", "spiffy-tw-w-full", "spiffy-tw-p-2");
|
|
238
|
+
const textSkeletonClasses = classNames(ProductCardSkeletonOverrides.PRODUCT_CARD_SKELETON, "spiffy-tw-h-[15px]", "spiffy-tw-block", "spiffy-tw-rounded-sm", "spiffy-tw-animate-pulse", "spiffy-tw-opacity-70", "spiffy-tw-bg-[#F4F4F6]");
|
|
239
|
+
return /* @__PURE__ */ jsx("div", {
|
|
240
|
+
className: containerClasses,
|
|
241
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
242
|
+
className: verticalContainerClasses,
|
|
243
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
244
|
+
className: imageClipContainerClasses,
|
|
245
|
+
children: /* @__PURE__ */ jsx("div", { className: imageSkeletonClasses })
|
|
246
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
247
|
+
className: contentContainerClasses,
|
|
248
|
+
children: [/* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-full") }), /* @__PURE__ */ jsx("div", { className: classNames(textSkeletonClasses, "spiffy-tw-w-[60%]") })]
|
|
249
|
+
})]
|
|
250
|
+
})
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
//#endregion
|
|
255
|
+
export { AnimatedProductCardOverrides, PriceSection, ProductCard, ProductCardSkeleton, ProductCardSkeletonOverrides, RatingSummary, productCardLayoutVariantClasses, variantClassMap, variantHoverClassMap, variantTitleColorMap };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require('../textVariantClasses-BnV4wXaw.cjs');
|
|
2
2
|
require('../Text-CgOYTs8D.cjs');
|
|
3
|
-
require('../Headline-
|
|
4
|
-
require('../ImageWithFallback-
|
|
5
|
-
require('../ProductCard-
|
|
6
|
-
require('../Spinner-
|
|
7
|
-
const require_ProductGrid = require('../ProductGrid-
|
|
3
|
+
require('../Headline-iP_MckEO.cjs');
|
|
4
|
+
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
+
require('../ProductCard-DZZKutY-.cjs');
|
|
6
|
+
require('../Spinner-DzdIkS6t.cjs');
|
|
7
|
+
const require_ProductGrid = require('../ProductGrid-BSSmPr7K.cjs');
|
|
8
8
|
|
|
9
9
|
exports.ProductGrid = require_ProductGrid.ProductGrid;
|
|
10
10
|
exports.productGridVariantClasses = require_ProductGrid.productGridVariantClasses;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../types-BQYpWDJ4.cjs";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-wYn2mEDm.cjs";
|
|
3
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
4
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
3
5
|
|
|
4
6
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
5
7
|
interface ProductGridProps {
|
|
@@ -10,7 +12,6 @@ interface ProductGridProps {
|
|
|
10
12
|
merchantShortName: string;
|
|
11
13
|
searchResponseId: string;
|
|
12
14
|
cardsGrowWithContainer?: boolean;
|
|
13
|
-
handleClick: (clickedUrl: string) => void;
|
|
14
15
|
}
|
|
15
16
|
declare const ProductGrid: ({
|
|
16
17
|
productList,
|
|
@@ -19,9 +20,8 @@ declare const ProductGrid: ({
|
|
|
19
20
|
productCardConfig,
|
|
20
21
|
merchantShortName,
|
|
21
22
|
searchResponseId,
|
|
22
|
-
cardsGrowWithContainer
|
|
23
|
-
|
|
24
|
-
}: ProductGridProps) => react_jsx_runtime10.JSX.Element;
|
|
23
|
+
cardsGrowWithContainer
|
|
24
|
+
}: ProductGridProps) => react_jsx_runtime20.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
27
|
interface ProductGridVariantClasses {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../types-BruEHw-X.js";
|
|
2
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-CcnuEYQN.js";
|
|
3
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
4
|
+
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
3
5
|
|
|
4
6
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
5
7
|
interface ProductGridProps {
|
|
@@ -10,7 +12,6 @@ interface ProductGridProps {
|
|
|
10
12
|
merchantShortName: string;
|
|
11
13
|
searchResponseId: string;
|
|
12
14
|
cardsGrowWithContainer?: boolean;
|
|
13
|
-
handleClick: (clickedUrl: string) => void;
|
|
14
15
|
}
|
|
15
16
|
declare const ProductGrid: ({
|
|
16
17
|
productList,
|
|
@@ -19,9 +20,8 @@ declare const ProductGrid: ({
|
|
|
19
20
|
productCardConfig,
|
|
20
21
|
merchantShortName,
|
|
21
22
|
searchResponseId,
|
|
22
|
-
cardsGrowWithContainer
|
|
23
|
-
|
|
24
|
-
}: ProductGridProps) => react_jsx_runtime5.JSX.Element;
|
|
23
|
+
cardsGrowWithContainer
|
|
24
|
+
}: ProductGridProps) => react_jsx_runtime11.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
27
|
interface ProductGridVariantClasses {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../textVariantClasses-CnjwO2Fv.js";
|
|
2
2
|
import "../Text-BMg3d10t.js";
|
|
3
|
-
import "../Headline-
|
|
4
|
-
import "../ImageWithFallback-
|
|
5
|
-
import "../ProductCard-
|
|
6
|
-
import "../Spinner-
|
|
7
|
-
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-
|
|
3
|
+
import "../Headline-XpaAeTSR.js";
|
|
4
|
+
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
5
|
+
import "../ProductCard-SF8-lXlT.js";
|
|
6
|
+
import "../Spinner-BgGihEfJ.js";
|
|
7
|
+
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-DTUhH219.js";
|
|
8
8
|
|
|
9
9
|
export { ProductGrid, productGridVariantClasses };
|
|
@@ -1,29 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_ProductCard = require('./ProductCard-
|
|
2
|
+
const require_ProductCard = require('./ProductCard-DZZKutY-.cjs');
|
|
3
3
|
let classnames = require("classnames");
|
|
4
4
|
classnames = require_chunk.__toESM(classnames);
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
7
7
|
|
|
8
|
-
//#region src/components/ProductGrid/productGridVariants.ts
|
|
9
|
-
const productGridVariantClasses = {
|
|
10
|
-
standard: {
|
|
11
|
-
productCardVariant: "minimal",
|
|
12
|
-
productCardHoverVariant: "backgroundDark",
|
|
13
|
-
productCardLayoutVariant: "tall",
|
|
14
|
-
productCardImageAspectRatio: "3:4",
|
|
15
|
-
zoomOnHover: true
|
|
16
|
-
},
|
|
17
|
-
square: {
|
|
18
|
-
productCardVariant: "minimal",
|
|
19
|
-
productCardHoverVariant: "backgroundDark",
|
|
20
|
-
productCardLayoutVariant: "square",
|
|
21
|
-
productCardImageAspectRatio: "square",
|
|
22
|
-
zoomOnHover: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
//#endregion
|
|
27
8
|
//#region src/config/chatElementDisplayLocation.ts
|
|
28
9
|
let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLocation$1) {
|
|
29
10
|
ChatElementDisplayLocation$1["IN_CHAT"] = "in_chat";
|
|
@@ -48,9 +29,28 @@ let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLoca
|
|
|
48
29
|
return ChatElementDisplayLocation$1;
|
|
49
30
|
}({});
|
|
50
31
|
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/ProductGrid/productGridVariants.ts
|
|
34
|
+
const productGridVariantClasses = {
|
|
35
|
+
standard: {
|
|
36
|
+
productCardVariant: "minimal",
|
|
37
|
+
productCardHoverVariant: "backgroundDark",
|
|
38
|
+
productCardLayoutVariant: "tall",
|
|
39
|
+
productCardImageAspectRatio: "3:4",
|
|
40
|
+
zoomOnHover: true
|
|
41
|
+
},
|
|
42
|
+
square: {
|
|
43
|
+
productCardVariant: "minimal",
|
|
44
|
+
productCardHoverVariant: "backgroundDark",
|
|
45
|
+
productCardLayoutVariant: "square",
|
|
46
|
+
productCardImageAspectRatio: "square",
|
|
47
|
+
zoomOnHover: true
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
53
|
-
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true
|
|
53
|
+
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true }) => {
|
|
54
54
|
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
|
|
55
55
|
const cardContainerClasses = (0, classnames.default)({
|
|
56
56
|
"spiffy-tw-w-full": cardsGrowWithContainer,
|
|
@@ -58,31 +58,33 @@ const ProductGrid = ({ productList, productGridVariant, productGridClasses, prod
|
|
|
58
58
|
});
|
|
59
59
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
60
60
|
className: productGridClasses,
|
|
61
|
-
children: productList.map((product, index) =>
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
61
|
+
children: productList.map((product, index) => {
|
|
62
|
+
const camelCasedProduct = product;
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
64
|
+
className: cardContainerClasses,
|
|
65
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ProductCard.ProductCard, {
|
|
66
|
+
productCardConfig,
|
|
67
|
+
merchantShortName,
|
|
68
|
+
imageUrl: camelCasedProduct.imageUrl,
|
|
69
|
+
searchResponseId,
|
|
70
|
+
productResponseId: camelCasedProduct.responseId,
|
|
71
|
+
title: camelCasedProduct.title,
|
|
72
|
+
url: camelCasedProduct.url,
|
|
73
|
+
originalPrice: camelCasedProduct.originalPrice,
|
|
74
|
+
salePrice: camelCasedProduct.salePrice,
|
|
75
|
+
averageRating: camelCasedProduct.averageRating,
|
|
76
|
+
numberReviews: camelCasedProduct.numberReviews,
|
|
77
|
+
cardDisplayLocation: ChatElementDisplayLocation.PRODUCT_GRID,
|
|
78
|
+
layoutVariant: productCardLayoutVariant,
|
|
79
|
+
variant: productCardVariant,
|
|
80
|
+
hoverVariant: productCardHoverVariant,
|
|
81
|
+
zoomOnHover,
|
|
82
|
+
aspectRatio: productCardImageAspectRatio,
|
|
83
|
+
clickPosition: index,
|
|
84
|
+
growWithContainer: cardsGrowWithContainer
|
|
85
|
+
}, camelCasedProduct.id)
|
|
86
|
+
}, camelCasedProduct.id);
|
|
87
|
+
})
|
|
86
88
|
});
|
|
87
89
|
};
|
|
88
90
|
|