@envive-ai/react-toolkit 0.1.6 → 0.1.8
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 +6 -5
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +4 -2
- package/dist/AppliedFiltersScrollbar/index.cjs +50 -0
- package/dist/AppliedFiltersScrollbar/index.d.cts +22 -0
- package/dist/AppliedFiltersScrollbar/index.d.ts +22 -0
- package/dist/AppliedFiltersScrollbar/index.js +46 -0
- package/dist/ButtonBase/index.cjs +4 -4
- package/dist/ButtonBase/index.d.cts +3 -3
- package/dist/ButtonBase/index.d.ts +3 -3
- package/dist/ButtonBase/index.js +4 -4
- package/dist/{ButtonBase-BIAu5fIG.js → ButtonBase-DGbSm0SJ.js} +1 -1
- package/dist/{ButtonBase-DcyxOe2v.cjs → ButtonBase-DGpQBeLR.cjs} +1 -1
- package/dist/DynamicFiltersScrollbar/index.cjs +38 -0
- package/dist/DynamicFiltersScrollbar/index.d.cts +28 -0
- package/dist/DynamicFiltersScrollbar/index.d.ts +28 -0
- package/dist/DynamicFiltersScrollbar/index.js +34 -0
- package/dist/{DynamicFiltersScrollbar-BmPTqym5.js → DynamicFiltersScrollbar-CCwh0QW4.js} +1 -1
- package/dist/{DynamicFiltersScrollbar-BTopFhyl.cjs → DynamicFiltersScrollbar-U9-CmTKd.cjs} +1 -1
- package/dist/FilterScrollbar/index.cjs +3 -3
- package/dist/FilterScrollbar/index.d.cts +4 -4
- package/dist/FilterScrollbar/index.d.ts +4 -4
- package/dist/FilterScrollbar/index.js +3 -3
- package/dist/Headline/index.cjs +2 -2
- package/dist/Headline/index.d.cts +2 -2
- package/dist/Headline/index.d.ts +2 -2
- package/dist/Headline/index.js +2 -2
- package/dist/{Headline-XpaAeTSR.js → Headline-BkOW1lQj.js} +1 -1
- package/dist/{Headline-iP_MckEO.cjs → Headline-QpruZlcg.cjs} +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ProductCard/index.cjs +4 -4
- package/dist/ProductCard/index.d.cts +2 -3
- package/dist/ProductCard/index.d.ts +2 -3
- package/dist/ProductCard/index.js +4 -4
- package/dist/{ProductCard-DZZKutY-.cjs → ProductCard-BYjPKgX3.cjs} +2 -2
- package/dist/{ProductCard-SF8-lXlT.js → ProductCard-DCFMFwCH.js} +2 -2
- package/dist/ProductGrid/index.cjs +5 -5
- package/dist/ProductGrid/index.d.cts +6 -5
- package/dist/ProductGrid/index.d.ts +6 -5
- package/dist/ProductGrid/index.js +5 -5
- package/dist/{ProductGrid-DTUhH219.js → ProductGrid-BoJzUK_H.js} +3 -28
- package/dist/{ProductGrid-BSSmPr7K.cjs → ProductGrid-CJmmGxBQ.cjs} +3 -28
- package/dist/SearchFilter/index.cjs +4 -4
- package/dist/SearchFilter/index.d.cts +71 -2
- package/dist/SearchFilter/index.d.ts +71 -2
- package/dist/SearchFilter/index.js +4 -4
- package/dist/{SearchFilter-B15tybnV.cjs → SearchFilter-B8jliRly.cjs} +8 -5
- package/dist/{SearchFilter-D427M2UE.js → SearchFilter-Da6SL9mU.js} +8 -5
- package/dist/SearchInput/index.cjs +3 -3
- package/dist/SearchInput/index.d.cts +4 -4
- package/dist/SearchInput/index.d.ts +4 -4
- package/dist/SearchInput/index.js +3 -3
- package/dist/{SearchInput-D6UW79wT.cjs → SearchInput-BFlu_3iT.cjs} +1 -1
- package/dist/{SearchInput-C0wB4hSV.js → SearchInput-DxDC1mcq.js} +1 -1
- package/dist/SearchInputForm/index.cjs +3 -3
- package/dist/SearchInputForm/index.d.cts +1 -1
- package/dist/SearchInputForm/index.d.ts +1 -1
- package/dist/SearchInputForm/index.js +3 -3
- package/dist/SearchResultsContent/index.cjs +64 -0
- package/dist/SearchResultsContent/index.d.cts +65 -0
- package/dist/SearchResultsContent/index.d.ts +65 -0
- package/dist/SearchResultsContent/index.js +60 -0
- package/dist/SearchResultsFilterSidebar/index.cjs +5 -6
- package/dist/SearchResultsFilterSidebar/index.d.cts +2 -3
- package/dist/SearchResultsFilterSidebar/index.d.ts +2 -3
- package/dist/SearchResultsFilterSidebar/index.js +5 -6
- package/dist/SearchResultsStates/index.cjs +13 -122
- package/dist/SearchResultsStates/index.d.cts +7 -9
- package/dist/SearchResultsStates/index.d.ts +7 -9
- package/dist/SearchResultsStates/index.js +10 -113
- package/dist/SearchResultsStates-CEi_RHna.js +112 -0
- package/dist/SearchResultsStates-CJYgUA66.cjs +134 -0
- 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-BhyeL26m.cjs → SparkleAnimation-BY5iw7s0.cjs} +5 -5
- package/dist/{SparkleAnimation-BdOjC8l-.js → SparkleAnimation-fQHP7b-R.js} +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/SuggestionButton/index.cjs +9 -9
- package/dist/SuggestionButton/index.d.cts +3 -3
- package/dist/SuggestionButton/index.d.ts +3 -3
- package/dist/SuggestionButton/index.js +5 -5
- package/dist/Text/index.cjs +3 -3
- package/dist/Text/index.d.cts +3 -3
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +3 -3
- package/dist/{Text-BMg3d10t.js → Text-Bod4OMPk.js} +1 -1
- package/dist/{Text-CgOYTs8D.cjs → Text-MQjxqgZZ.cjs} +1 -1
- package/dist/TextInput/index.cjs +2 -2
- package/dist/TextInput/index.d.cts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +2 -2
- package/dist/{TextInput-CRMqBW3X.js → TextInput-BFPXhSAY.js} +1 -1
- package/dist/{TextInput-C6fF9cSB.cjs → TextInput-DLSgpP6b.cjs} +1 -1
- package/dist/{index-CcnuEYQN.d.ts → index-BCqBaFxm.d.cts} +10 -60
- package/dist/{index-BHNzU-Pc.d.ts → index-B_tehqNH.d.ts} +2 -2
- package/dist/{index-BNCrvswP.d.cts → index-D4n-kZvz.d.cts} +2 -2
- package/dist/{index-B0oln9VD.d.ts → index-D8gHW7ox.d.ts} +5 -16
- package/dist/{index-wYn2mEDm.d.cts → index-DO4ksBrm.d.ts} +10 -60
- package/dist/{index-CQlBDGTL.d.cts → index-DV2K-9lE.d.cts} +5 -16
- package/package.json +15 -2
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +2 -2
- package/src/components/AppliedFiltersScrollbar/index.ts +1 -0
- package/src/components/ButtonBase/types.ts +1 -1
- package/src/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.tsx +1 -1
- package/src/components/DynamicFiltersScrollbar/index.ts +1 -0
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +3 -4
- package/src/components/ProductCard/ProductCardSkeleton.tsx +1 -7
- package/src/components/ProductCard/types.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +3 -2
- package/src/components/SearchFilter/SearchFilter.tsx +4 -4
- package/src/components/SearchFilter/index.ts +0 -1
- package/src/components/SearchFilter/types.ts +22 -26
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +1 -1
- package/src/components/SearchResultsContent/index.ts +2 -0
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +5 -4
- package/src/components/SearchResultsFilterSidebar/types.ts +0 -13
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +2 -1
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +1 -1
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +1 -1
- package/src/components/SuggestionButton/SuggestionButton.tsx +3 -3
- package/dist/index-B125udRj.d.cts +0 -78
- package/dist/index-DMXTg_9L.d.ts +0 -78
- package/dist/types-BQYpWDJ4.d.cts +0 -6
- package/dist/types-Bm-qQyO3.d.ts +0 -8
- package/dist/types-BruEHw-X.d.ts +0 -6
- package/dist/types-C-Jrlw5Z.d.cts +0 -8
- /package/dist/{ButtonBase-BRfuPPzN.js → ButtonBase-C_uKnl48.js} +0 -0
- /package/dist/{ButtonBase-BleAVeo-.cjs → ButtonBase-DbWQ25n-.cjs} +0 -0
- /package/dist/{Text-CV9pv8ds.js → Text-BMsncrpY.js} +0 -0
- /package/dist/{Text-DDT3sqY1.cjs → Text-C8t_iEj6.cjs} +0 -0
- /package/dist/{textVariantClasses-C8OCWZAw.d.ts → textVariantClasses-B0gNjzl4.d.cts} +0 -0
- /package/dist/{textVariantClasses-CnjwO2Fv.js → textVariantClasses-D77TGEy1.js} +0 -0
- /package/dist/{textVariantClasses-BnV4wXaw.cjs → textVariantClasses-Dgz7Zaql.cjs} +0 -0
- /package/dist/{textVariantClasses-Cdg-UUHi.d.cts → textVariantClasses-ypYGLq0h.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Text } from "./Text-
|
|
2
|
-
import { Headline } from "./Headline-
|
|
1
|
+
import { Text } from "./Text-Bod4OMPk.js";
|
|
2
|
+
import { Headline } from "./Headline-BkOW1lQj.js";
|
|
3
3
|
import { ImageWithFallback } from "./ImageWithFallback-Ckwsmd8P.js";
|
|
4
4
|
import { Spinner } from "./Spinner-BgGihEfJ.js";
|
|
5
5
|
import classNames from "classnames";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require('../textVariantClasses-
|
|
2
|
-
require('../Text-
|
|
3
|
-
require('../Headline-
|
|
1
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
+
require('../Headline-QpruZlcg.cjs');
|
|
4
4
|
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
5
|
-
require('../ProductCard-
|
|
5
|
+
require('../ProductCard-BYjPKgX3.cjs');
|
|
6
6
|
require('../Spinner-DzdIkS6t.cjs');
|
|
7
|
-
const require_ProductGrid = require('../ProductGrid-
|
|
7
|
+
const require_ProductGrid = require('../ProductGrid-CJmmGxBQ.cjs');
|
|
8
8
|
|
|
9
9
|
exports.ProductGrid = require_ProductGrid.ProductGrid;
|
|
10
10
|
exports.productGridVariantClasses = require_ProductGrid.productGridVariantClasses;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import
|
|
3
|
-
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-BCqBaFxm.cjs";
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
4
3
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
4
|
|
|
6
5
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
@@ -12,6 +11,7 @@ interface ProductGridProps {
|
|
|
12
11
|
merchantShortName: string;
|
|
13
12
|
searchResponseId: string;
|
|
14
13
|
cardsGrowWithContainer?: boolean;
|
|
14
|
+
cardDisplayLocation: string;
|
|
15
15
|
}
|
|
16
16
|
declare const ProductGrid: ({
|
|
17
17
|
productList,
|
|
@@ -20,8 +20,9 @@ declare const ProductGrid: ({
|
|
|
20
20
|
productCardConfig,
|
|
21
21
|
merchantShortName,
|
|
22
22
|
searchResponseId,
|
|
23
|
-
cardsGrowWithContainer
|
|
24
|
-
|
|
23
|
+
cardsGrowWithContainer,
|
|
24
|
+
cardDisplayLocation
|
|
25
|
+
}: ProductGridProps) => react_jsx_runtime12.JSX.Element;
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
28
|
interface ProductGridVariantClasses {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import
|
|
3
|
-
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
1
|
+
import { ProductCardConfig, ProductCardHoverVariant, ProductCardLayoutVariant, ProductCardVariant, ProductGridVariant } from "../index-DO4ksBrm.js";
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
4
3
|
import { SearchResponseProduct } from "@spiffy-ai/commerce-api-client";
|
|
5
4
|
|
|
6
5
|
//#region src/components/ProductGrid/ProductGrid.d.ts
|
|
@@ -12,6 +11,7 @@ interface ProductGridProps {
|
|
|
12
11
|
merchantShortName: string;
|
|
13
12
|
searchResponseId: string;
|
|
14
13
|
cardsGrowWithContainer?: boolean;
|
|
14
|
+
cardDisplayLocation: string;
|
|
15
15
|
}
|
|
16
16
|
declare const ProductGrid: ({
|
|
17
17
|
productList,
|
|
@@ -20,8 +20,9 @@ declare const ProductGrid: ({
|
|
|
20
20
|
productCardConfig,
|
|
21
21
|
merchantShortName,
|
|
22
22
|
searchResponseId,
|
|
23
|
-
cardsGrowWithContainer
|
|
24
|
-
|
|
23
|
+
cardsGrowWithContainer,
|
|
24
|
+
cardDisplayLocation
|
|
25
|
+
}: ProductGridProps) => react_jsx_runtime5.JSX.Element;
|
|
25
26
|
//#endregion
|
|
26
27
|
//#region src/components/ProductGrid/productGridVariants.d.ts
|
|
27
28
|
interface ProductGridVariantClasses {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../textVariantClasses-
|
|
2
|
-
import "../Text-
|
|
3
|
-
import "../Headline-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import "../Headline-BkOW1lQj.js";
|
|
4
4
|
import "../ImageWithFallback-Ckwsmd8P.js";
|
|
5
|
-
import "../ProductCard-
|
|
5
|
+
import "../ProductCard-DCFMFwCH.js";
|
|
6
6
|
import "../Spinner-BgGihEfJ.js";
|
|
7
|
-
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-
|
|
7
|
+
import { ProductGrid, productGridVariantClasses } from "../ProductGrid-BoJzUK_H.js";
|
|
8
8
|
|
|
9
9
|
export { ProductGrid, productGridVariantClasses };
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
import { ProductCard } from "./ProductCard-
|
|
1
|
+
import { ProductCard } from "./ProductCard-DCFMFwCH.js";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
|
-
//#region src/config/chatElementDisplayLocation.ts
|
|
6
|
-
let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLocation$1) {
|
|
7
|
-
ChatElementDisplayLocation$1["IN_CHAT"] = "in_chat";
|
|
8
|
-
ChatElementDisplayLocation$1["CHAT_PREVIEW"] = "chat_preview";
|
|
9
|
-
ChatElementDisplayLocation$1["FLOATING_BUTTON"] = "floating_button";
|
|
10
|
-
ChatElementDisplayLocation$1["HELP_ME_CHOOSE"] = "help_me_choose";
|
|
11
|
-
ChatElementDisplayLocation$1["PLP_IMAGE_BANNER"] = "plp_image_banner";
|
|
12
|
-
ChatElementDisplayLocation$1["TOP_REVIEWS_SNIPPET"] = "top_reviews_snippet";
|
|
13
|
-
ChatElementDisplayLocation$1["BOTTOM_REVIEWS_SNIPPET"] = "bottom_reviews_snippet";
|
|
14
|
-
ChatElementDisplayLocation$1["BLOCK_BACK_BUTTON"] = "block_back_button";
|
|
15
|
-
ChatElementDisplayLocation$1["SWITCH_TO_AGENT"] = "switch_to_agent";
|
|
16
|
-
ChatElementDisplayLocation$1["CONVERSATIONAL_SEARCH"] = "conversational_search";
|
|
17
|
-
ChatElementDisplayLocation$1["GLOBAL_SEARCH_ENTRYPOINT"] = "global_search_entrypoint";
|
|
18
|
-
ChatElementDisplayLocation$1["SEARCH_NAV_ENTRYPOINT"] = "search_nav_entrypoint";
|
|
19
|
-
ChatElementDisplayLocation$1["SEARCH_PROMPT"] = "search_prompt";
|
|
20
|
-
ChatElementDisplayLocation$1["SEARCH_PROMPT_BUTTON"] = "search_prompt_button";
|
|
21
|
-
ChatElementDisplayLocation$1["PRODUCT_GRID"] = "product_grid";
|
|
22
|
-
ChatElementDisplayLocation$1["UNSPECIFIED"] = "unspecified";
|
|
23
|
-
ChatElementDisplayLocation$1["FILTER_MODAL"] = "filter_modal";
|
|
24
|
-
ChatElementDisplayLocation$1["PROMPT_CARD"] = "prompt_card";
|
|
25
|
-
ChatElementDisplayLocation$1["WINDOW_API_CALL"] = "window_api_call";
|
|
26
|
-
return ChatElementDisplayLocation$1;
|
|
27
|
-
}({});
|
|
28
|
-
|
|
29
|
-
//#endregion
|
|
30
5
|
//#region src/components/ProductGrid/productGridVariants.ts
|
|
31
6
|
const productGridVariantClasses = {
|
|
32
7
|
standard: {
|
|
@@ -47,7 +22,7 @@ const productGridVariantClasses = {
|
|
|
47
22
|
|
|
48
23
|
//#endregion
|
|
49
24
|
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
50
|
-
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true }) => {
|
|
25
|
+
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true, cardDisplayLocation }) => {
|
|
51
26
|
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
|
|
52
27
|
const cardContainerClasses = classNames({
|
|
53
28
|
"spiffy-tw-w-full": cardsGrowWithContainer,
|
|
@@ -71,7 +46,7 @@ const ProductGrid = ({ productList, productGridVariant, productGridClasses, prod
|
|
|
71
46
|
salePrice: camelCasedProduct.salePrice,
|
|
72
47
|
averageRating: camelCasedProduct.averageRating,
|
|
73
48
|
numberReviews: camelCasedProduct.numberReviews,
|
|
74
|
-
cardDisplayLocation
|
|
49
|
+
cardDisplayLocation,
|
|
75
50
|
layoutVariant: productCardLayoutVariant,
|
|
76
51
|
variant: productCardVariant,
|
|
77
52
|
hoverVariant: productCardHoverVariant,
|
|
@@ -1,35 +1,10 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_ProductCard = require('./ProductCard-
|
|
2
|
+
const require_ProductCard = require('./ProductCard-BYjPKgX3.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/config/chatElementDisplayLocation.ts
|
|
9
|
-
let ChatElementDisplayLocation = /* @__PURE__ */ function(ChatElementDisplayLocation$1) {
|
|
10
|
-
ChatElementDisplayLocation$1["IN_CHAT"] = "in_chat";
|
|
11
|
-
ChatElementDisplayLocation$1["CHAT_PREVIEW"] = "chat_preview";
|
|
12
|
-
ChatElementDisplayLocation$1["FLOATING_BUTTON"] = "floating_button";
|
|
13
|
-
ChatElementDisplayLocation$1["HELP_ME_CHOOSE"] = "help_me_choose";
|
|
14
|
-
ChatElementDisplayLocation$1["PLP_IMAGE_BANNER"] = "plp_image_banner";
|
|
15
|
-
ChatElementDisplayLocation$1["TOP_REVIEWS_SNIPPET"] = "top_reviews_snippet";
|
|
16
|
-
ChatElementDisplayLocation$1["BOTTOM_REVIEWS_SNIPPET"] = "bottom_reviews_snippet";
|
|
17
|
-
ChatElementDisplayLocation$1["BLOCK_BACK_BUTTON"] = "block_back_button";
|
|
18
|
-
ChatElementDisplayLocation$1["SWITCH_TO_AGENT"] = "switch_to_agent";
|
|
19
|
-
ChatElementDisplayLocation$1["CONVERSATIONAL_SEARCH"] = "conversational_search";
|
|
20
|
-
ChatElementDisplayLocation$1["GLOBAL_SEARCH_ENTRYPOINT"] = "global_search_entrypoint";
|
|
21
|
-
ChatElementDisplayLocation$1["SEARCH_NAV_ENTRYPOINT"] = "search_nav_entrypoint";
|
|
22
|
-
ChatElementDisplayLocation$1["SEARCH_PROMPT"] = "search_prompt";
|
|
23
|
-
ChatElementDisplayLocation$1["SEARCH_PROMPT_BUTTON"] = "search_prompt_button";
|
|
24
|
-
ChatElementDisplayLocation$1["PRODUCT_GRID"] = "product_grid";
|
|
25
|
-
ChatElementDisplayLocation$1["UNSPECIFIED"] = "unspecified";
|
|
26
|
-
ChatElementDisplayLocation$1["FILTER_MODAL"] = "filter_modal";
|
|
27
|
-
ChatElementDisplayLocation$1["PROMPT_CARD"] = "prompt_card";
|
|
28
|
-
ChatElementDisplayLocation$1["WINDOW_API_CALL"] = "window_api_call";
|
|
29
|
-
return ChatElementDisplayLocation$1;
|
|
30
|
-
}({});
|
|
31
|
-
|
|
32
|
-
//#endregion
|
|
33
8
|
//#region src/components/ProductGrid/productGridVariants.ts
|
|
34
9
|
const productGridVariantClasses = {
|
|
35
10
|
standard: {
|
|
@@ -50,7 +25,7 @@ const productGridVariantClasses = {
|
|
|
50
25
|
|
|
51
26
|
//#endregion
|
|
52
27
|
//#region src/components/ProductGrid/ProductGrid.tsx
|
|
53
|
-
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true }) => {
|
|
28
|
+
const ProductGrid = ({ productList, productGridVariant, productGridClasses, productCardConfig, merchantShortName, searchResponseId, cardsGrowWithContainer = true, cardDisplayLocation }) => {
|
|
54
29
|
const { productCardVariant, productCardHoverVariant, productCardLayoutVariant, productCardImageAspectRatio, zoomOnHover } = productGridVariantClasses[productGridVariant];
|
|
55
30
|
const cardContainerClasses = (0, classnames.default)({
|
|
56
31
|
"spiffy-tw-w-full": cardsGrowWithContainer,
|
|
@@ -74,7 +49,7 @@ const ProductGrid = ({ productList, productGridVariant, productGridClasses, prod
|
|
|
74
49
|
salePrice: camelCasedProduct.salePrice,
|
|
75
50
|
averageRating: camelCasedProduct.averageRating,
|
|
76
51
|
numberReviews: camelCasedProduct.numberReviews,
|
|
77
|
-
cardDisplayLocation
|
|
52
|
+
cardDisplayLocation,
|
|
78
53
|
layoutVariant: productCardLayoutVariant,
|
|
79
54
|
variant: productCardVariant,
|
|
80
55
|
hoverVariant: productCardHoverVariant,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
require('../
|
|
2
|
-
require('../
|
|
3
|
-
require('../
|
|
4
|
-
const require_SearchFilter = require('../SearchFilter-
|
|
1
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
3
|
+
require('../ButtonBase-DGpQBeLR.cjs');
|
|
4
|
+
const require_SearchFilter = require('../SearchFilter-B8jliRly.cjs');
|
|
5
5
|
|
|
6
6
|
exports.SearchFilter = require_SearchFilter.SearchFilter;
|
|
7
7
|
exports.SearchFilterHeader = require_SearchFilter.SearchFilterHeader;
|
|
@@ -1,2 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
2
|
+
import { SearchFilterDatum, SearchFilterItemDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/SearchFilter/types.d.ts
|
|
5
|
+
interface SearchFilterItem$1 extends SearchFilterItemDatum {
|
|
6
|
+
filterId: string;
|
|
7
|
+
filterItemId: string;
|
|
8
|
+
}
|
|
9
|
+
interface SearchFilterItemProps {
|
|
10
|
+
filterItem: SearchFilterItem$1;
|
|
11
|
+
onSelectFilterItem: SelectFilterItem;
|
|
12
|
+
radioButtonFillColor: string;
|
|
13
|
+
radioButtonHoverColor: string;
|
|
14
|
+
radioButtonUncheckedBorderColor: string;
|
|
15
|
+
}
|
|
16
|
+
interface SearchFilterHeaderProps {
|
|
17
|
+
closeModal: () => void;
|
|
18
|
+
productCount: number;
|
|
19
|
+
headerClassName: string;
|
|
20
|
+
filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
|
|
21
|
+
}
|
|
22
|
+
type SearchFilterProps = {
|
|
23
|
+
filters: SearchFilterDatum[];
|
|
24
|
+
selectFilterItem: SelectFilterItem;
|
|
25
|
+
clearAllFilters: () => void;
|
|
26
|
+
productCount: number;
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
29
|
+
applyFiltersUnchangedClasses: string;
|
|
30
|
+
applyFiltersChangedClasses: string;
|
|
31
|
+
headerContent?: React.ReactNode;
|
|
32
|
+
footerContent?: React.ReactNode;
|
|
33
|
+
filterButtonText?: string;
|
|
34
|
+
headerClassName?: string;
|
|
35
|
+
radioButtonFillColor: string;
|
|
36
|
+
radioButtonHoverColor?: string;
|
|
37
|
+
radioButtonUncheckedBorderColor?: string;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/SearchFilter/SearchFilter.d.ts
|
|
41
|
+
declare const SearchFilter: ({
|
|
42
|
+
isOpen,
|
|
43
|
+
setIsOpen,
|
|
44
|
+
filters,
|
|
45
|
+
selectFilterItem,
|
|
46
|
+
clearAllFilters,
|
|
47
|
+
filterButtonText,
|
|
48
|
+
radioButtonFillColor,
|
|
49
|
+
radioButtonHoverColor,
|
|
50
|
+
radioButtonUncheckedBorderColor,
|
|
51
|
+
headerContent
|
|
52
|
+
}: SearchFilterProps) => react_jsx_runtime20.JSX.Element;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/components/SearchFilter/SearchFilterHeader.d.ts
|
|
55
|
+
declare const SearchFilterHeader: ({
|
|
56
|
+
closeModal,
|
|
57
|
+
productCount,
|
|
58
|
+
headerClassName,
|
|
59
|
+
filterCloseIconVariant
|
|
60
|
+
}: SearchFilterHeaderProps) => react_jsx_runtime20.JSX.Element;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/SearchFilter/SearchFilterItem.d.ts
|
|
63
|
+
declare const SearchFilterItem: ({
|
|
64
|
+
filterItem,
|
|
65
|
+
onSelectFilterItem,
|
|
66
|
+
radioButtonFillColor,
|
|
67
|
+
radioButtonHoverColor,
|
|
68
|
+
radioButtonUncheckedBorderColor
|
|
69
|
+
}: SearchFilterItemProps) => react_jsx_runtime20.JSX.Element;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|
|
@@ -1,2 +1,71 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
2
|
+
import { SearchFilterDatum, SearchFilterItemDatum, SelectFilterItem } from "@envive-ai/react-hooks/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/SearchFilter/types.d.ts
|
|
5
|
+
interface SearchFilterItem$1 extends SearchFilterItemDatum {
|
|
6
|
+
filterId: string;
|
|
7
|
+
filterItemId: string;
|
|
8
|
+
}
|
|
9
|
+
interface SearchFilterItemProps {
|
|
10
|
+
filterItem: SearchFilterItem$1;
|
|
11
|
+
onSelectFilterItem: SelectFilterItem;
|
|
12
|
+
radioButtonFillColor: string;
|
|
13
|
+
radioButtonHoverColor: string;
|
|
14
|
+
radioButtonUncheckedBorderColor: string;
|
|
15
|
+
}
|
|
16
|
+
interface SearchFilterHeaderProps {
|
|
17
|
+
closeModal: () => void;
|
|
18
|
+
productCount: number;
|
|
19
|
+
headerClassName: string;
|
|
20
|
+
filterCloseIconVariant: 'dark' | 'light' | 'tertiary';
|
|
21
|
+
}
|
|
22
|
+
type SearchFilterProps = {
|
|
23
|
+
filters: SearchFilterDatum[];
|
|
24
|
+
selectFilterItem: SelectFilterItem;
|
|
25
|
+
clearAllFilters: () => void;
|
|
26
|
+
productCount: number;
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
setIsOpen: (isOpen: boolean) => void;
|
|
29
|
+
applyFiltersUnchangedClasses: string;
|
|
30
|
+
applyFiltersChangedClasses: string;
|
|
31
|
+
headerContent?: React.ReactNode;
|
|
32
|
+
footerContent?: React.ReactNode;
|
|
33
|
+
filterButtonText?: string;
|
|
34
|
+
headerClassName?: string;
|
|
35
|
+
radioButtonFillColor: string;
|
|
36
|
+
radioButtonHoverColor?: string;
|
|
37
|
+
radioButtonUncheckedBorderColor?: string;
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/components/SearchFilter/SearchFilter.d.ts
|
|
41
|
+
declare const SearchFilter: ({
|
|
42
|
+
isOpen,
|
|
43
|
+
setIsOpen,
|
|
44
|
+
filters,
|
|
45
|
+
selectFilterItem,
|
|
46
|
+
clearAllFilters,
|
|
47
|
+
filterButtonText,
|
|
48
|
+
radioButtonFillColor,
|
|
49
|
+
radioButtonHoverColor,
|
|
50
|
+
radioButtonUncheckedBorderColor,
|
|
51
|
+
headerContent
|
|
52
|
+
}: SearchFilterProps) => react_jsx_runtime21.JSX.Element;
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/components/SearchFilter/SearchFilterHeader.d.ts
|
|
55
|
+
declare const SearchFilterHeader: ({
|
|
56
|
+
closeModal,
|
|
57
|
+
productCount,
|
|
58
|
+
headerClassName,
|
|
59
|
+
filterCloseIconVariant
|
|
60
|
+
}: SearchFilterHeaderProps) => react_jsx_runtime21.JSX.Element;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/components/SearchFilter/SearchFilterItem.d.ts
|
|
63
|
+
declare const SearchFilterItem: ({
|
|
64
|
+
filterItem,
|
|
65
|
+
onSelectFilterItem,
|
|
66
|
+
radioButtonFillColor,
|
|
67
|
+
radioButtonHoverColor,
|
|
68
|
+
radioButtonUncheckedBorderColor
|
|
69
|
+
}: SearchFilterItemProps) => react_jsx_runtime21.JSX.Element;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import { SearchFilter, SearchFilterHeader, SearchFilterItem } from "../SearchFilter-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../Text-Bod4OMPk.js";
|
|
3
|
+
import "../ButtonBase-DGbSm0SJ.js";
|
|
4
|
+
import { SearchFilter, SearchFilterHeader, SearchFilterItem } from "../SearchFilter-Da6SL9mU.js";
|
|
5
5
|
|
|
6
6
|
export { SearchFilter, SearchFilterHeader, SearchFilterItem };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_Text = require('./Text-MQjxqgZZ.cjs');
|
|
3
|
+
const require_ButtonBase = require('./ButtonBase-DGpQBeLR.cjs');
|
|
4
4
|
let classnames = require("classnames");
|
|
5
5
|
classnames = require_chunk.__toESM(classnames);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -56,13 +56,16 @@ const SearchFilter = ({ isOpen, setIsOpen, filters, selectFilterItem, clearAllFi
|
|
|
56
56
|
className: "spiffy-tw-font-medium spiffy-tw-mb-3",
|
|
57
57
|
children: filter.displayName
|
|
58
58
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: filter.items.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchFilterItem, {
|
|
59
|
-
filterItem:
|
|
59
|
+
filterItem: {
|
|
60
|
+
...item,
|
|
61
|
+
filterId: filter.filterId
|
|
62
|
+
},
|
|
60
63
|
onSelectFilterItem: selectFilterItem,
|
|
61
64
|
radioButtonFillColor,
|
|
62
65
|
radioButtonHoverColor,
|
|
63
66
|
radioButtonUncheckedBorderColor
|
|
64
|
-
}, item.
|
|
65
|
-
}, filter.
|
|
67
|
+
}, item.filterItemId)) })]
|
|
68
|
+
}, filter.filterId))
|
|
66
69
|
}),
|
|
67
70
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
68
71
|
className: "spiffy-tw-border-t spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-px-4 spiffy-tw-py-3",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Text } from "./Text-Bod4OMPk.js";
|
|
2
|
+
import { ButtonBase } from "./ButtonBase-DGbSm0SJ.js";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -53,13 +53,16 @@ const SearchFilter = ({ isOpen, setIsOpen, filters, selectFilterItem, clearAllFi
|
|
|
53
53
|
className: "spiffy-tw-font-medium spiffy-tw-mb-3",
|
|
54
54
|
children: filter.displayName
|
|
55
55
|
}), /* @__PURE__ */ jsx("ul", { children: filter.items.map((item) => /* @__PURE__ */ jsx(SearchFilterItem, {
|
|
56
|
-
filterItem:
|
|
56
|
+
filterItem: {
|
|
57
|
+
...item,
|
|
58
|
+
filterId: filter.filterId
|
|
59
|
+
},
|
|
57
60
|
onSelectFilterItem: selectFilterItem,
|
|
58
61
|
radioButtonFillColor,
|
|
59
62
|
radioButtonHoverColor,
|
|
60
63
|
radioButtonUncheckedBorderColor
|
|
61
|
-
}, item.
|
|
62
|
-
}, filter.
|
|
64
|
+
}, item.filterItemId)) })]
|
|
65
|
+
}, filter.filterId))
|
|
63
66
|
}),
|
|
64
67
|
/* @__PURE__ */ jsxs("div", {
|
|
65
68
|
className: "spiffy-tw-border-t spiffy-tw-border-[--spiffy-colors-border-light] spiffy-tw-px-4 spiffy-tw-py-3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
require('../textVariantClasses-
|
|
2
|
-
require('../TextInput-
|
|
1
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
2
|
+
require('../TextInput-DLSgpP6b.cjs');
|
|
3
3
|
require('../colorsConfig-DCvy_dV4.cjs');
|
|
4
|
-
const require_SearchInput = require('../SearchInput-
|
|
4
|
+
const require_SearchInput = require('../SearchInput-BFlu_3iT.cjs');
|
|
5
5
|
|
|
6
6
|
exports.SearchInput = require_SearchInput.SearchInput;
|
|
7
7
|
exports.searchInputVariantClasses = require_SearchInput.searchInputVariantClasses;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SearchInputVariant } from "../index-
|
|
1
|
+
import { SearchInputVariant } from "../index-D4n-kZvz.cjs";
|
|
2
|
+
import { TextStyleVariantMap } from "../textVariantClasses-B0gNjzl4.cjs";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import { TextStyleVariantMap } from "dist/textVariantClasses-sT9E8Uty";
|
|
4
4
|
|
|
5
5
|
//#region src/components/SearchInput/SearchInput.d.ts
|
|
6
6
|
interface SearchInputProps {
|
|
@@ -19,7 +19,7 @@ interface SearchInputProps {
|
|
|
19
19
|
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/components/SearchInput/searchInputVariants.d.ts
|
|
22
|
-
|
|
22
|
+
type SearchInputVariantClasses = {
|
|
23
23
|
searchInputIconColor: string;
|
|
24
24
|
searchInputBorderColor: string;
|
|
25
25
|
searchInputCloseIconClasses: string;
|
|
@@ -27,7 +27,7 @@ interface SearchInputVariantClasses {
|
|
|
27
27
|
autocompleteIconColor: string;
|
|
28
28
|
searchInputClasses: string;
|
|
29
29
|
placeholderVariant: keyof typeof TextStyleVariantMap;
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
declare const searchInputVariantClasses: Record<SearchInputVariant, SearchInputVariantClasses>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { SearchInput, searchInputVariantClasses };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SearchInputVariant } from "../index-
|
|
1
|
+
import { SearchInputVariant } from "../index-B_tehqNH.js";
|
|
2
|
+
import { TextStyleVariantMap } from "../textVariantClasses-ypYGLq0h.js";
|
|
2
3
|
import React from "react";
|
|
3
|
-
import { TextStyleVariantMap } from "dist/textVariantClasses-sT9E8Uty";
|
|
4
4
|
|
|
5
5
|
//#region src/components/SearchInput/SearchInput.d.ts
|
|
6
6
|
interface SearchInputProps {
|
|
@@ -19,7 +19,7 @@ interface SearchInputProps {
|
|
|
19
19
|
declare const SearchInput: React.ForwardRefExoticComponent<SearchInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/components/SearchInput/searchInputVariants.d.ts
|
|
22
|
-
|
|
22
|
+
type SearchInputVariantClasses = {
|
|
23
23
|
searchInputIconColor: string;
|
|
24
24
|
searchInputBorderColor: string;
|
|
25
25
|
searchInputCloseIconClasses: string;
|
|
@@ -27,7 +27,7 @@ interface SearchInputVariantClasses {
|
|
|
27
27
|
autocompleteIconColor: string;
|
|
28
28
|
searchInputClasses: string;
|
|
29
29
|
placeholderVariant: keyof typeof TextStyleVariantMap;
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
declare const searchInputVariantClasses: Record<SearchInputVariant, SearchInputVariantClasses>;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { SearchInput, searchInputVariantClasses };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../textVariantClasses-
|
|
2
|
-
import "../TextInput-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
|
+
import "../TextInput-BFPXhSAY.js";
|
|
3
3
|
import "../colorsConfig-BQlaCfxi.js";
|
|
4
|
-
import { SearchInput, searchInputVariantClasses } from "../SearchInput-
|
|
4
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DxDC1mcq.js";
|
|
5
5
|
|
|
6
6
|
export { SearchInput, searchInputVariantClasses };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_TextInput = require('./TextInput-
|
|
2
|
+
const require_TextInput = require('./TextInput-DLSgpP6b.cjs');
|
|
3
3
|
const require_colorsConfig = require('./colorsConfig-DCvy_dV4.cjs');
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TextInput } from "./TextInput-
|
|
1
|
+
import { TextInput } from "./TextInput-BFPXhSAY.js";
|
|
2
2
|
import { ColorNames, colorVar } from "./colorsConfig-BQlaCfxi.js";
|
|
3
3
|
import React, { useImperativeHandle, useRef } from "react";
|
|
4
4
|
import classNames from "classnames";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
-
require('../textVariantClasses-
|
|
2
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
3
3
|
const require_SearchAutocomplete = require('../SearchAutocomplete-BzaEXmRQ.cjs');
|
|
4
|
-
require('../TextInput-
|
|
4
|
+
require('../TextInput-DLSgpP6b.cjs');
|
|
5
5
|
require('../colorsConfig-DCvy_dV4.cjs');
|
|
6
|
-
const require_SearchInput = require('../SearchInput-
|
|
6
|
+
const require_SearchInput = require('../SearchInput-BFlu_3iT.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
9
9
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SearchInputForm, SearchInputVariant } from "../index-
|
|
1
|
+
import { SearchInputForm, SearchInputVariant } from "../index-D4n-kZvz.cjs";
|
|
2
2
|
export { SearchInputForm, SearchInputVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SearchInputForm, SearchInputVariant } from "../index-
|
|
1
|
+
import { SearchInputForm, SearchInputVariant } from "../index-B_tehqNH.js";
|
|
2
2
|
export { SearchInputForm, SearchInputVariant };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../textVariantClasses-
|
|
1
|
+
import "../textVariantClasses-D77TGEy1.js";
|
|
2
2
|
import { SearchAutocomplete } from "../SearchAutocomplete-BPjlo6qq.js";
|
|
3
|
-
import "../TextInput-
|
|
3
|
+
import "../TextInput-BFPXhSAY.js";
|
|
4
4
|
import "../colorsConfig-BQlaCfxi.js";
|
|
5
|
-
import { SearchInput, searchInputVariantClasses } from "../SearchInput-
|
|
5
|
+
import { SearchInput, searchInputVariantClasses } from "../SearchInput-DxDC1mcq.js";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/SearchInputForm/SearchInputForm.tsx
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
2
|
+
require('../textVariantClasses-Dgz7Zaql.cjs');
|
|
3
|
+
require('../Text-MQjxqgZZ.cjs');
|
|
4
|
+
require('../Text-C8t_iEj6.cjs');
|
|
5
|
+
require('../Headline-QpruZlcg.cjs');
|
|
6
|
+
require('../ImageWithFallback-1LqhQK1q.cjs');
|
|
7
|
+
require('../ProductCard-BYjPKgX3.cjs');
|
|
8
|
+
require('../Spinner-DzdIkS6t.cjs');
|
|
9
|
+
require('../ProductGrid-CJmmGxBQ.cjs');
|
|
10
|
+
require('../colorsConfig-DCvy_dV4.cjs');
|
|
11
|
+
require('../searchFilterSidebarVariants-D08jyA7U.cjs');
|
|
12
|
+
require('../DynamicFiltersScrollbar-U9-CmTKd.cjs');
|
|
13
|
+
const require_SearchResultsStates = require('../SearchResultsStates-CJYgUA66.cjs');
|
|
14
|
+
require('../SparkleAnimation-BY5iw7s0.cjs');
|
|
15
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
|
+
react_jsx_runtime = require_chunk.__toESM(react_jsx_runtime);
|
|
17
|
+
|
|
18
|
+
//#region src/components/SearchResultsContent/utils.ts
|
|
19
|
+
let SearchResultsState = /* @__PURE__ */ function(SearchResultsState$1) {
|
|
20
|
+
SearchResultsState$1[SearchResultsState$1["Loading"] = 0] = "Loading";
|
|
21
|
+
SearchResultsState$1[SearchResultsState$1["Results"] = 1] = "Results";
|
|
22
|
+
SearchResultsState$1[SearchResultsState$1["NoResults"] = 2] = "NoResults";
|
|
23
|
+
return SearchResultsState$1;
|
|
24
|
+
}({});
|
|
25
|
+
const getSearchResultsState = (isLoadingSearch, searchData) => {
|
|
26
|
+
if (isLoadingSearch) return SearchResultsState.Loading;
|
|
27
|
+
if (searchData) return SearchResultsState.Results;
|
|
28
|
+
return SearchResultsState.NoResults;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/SearchResultsContent/SearchResultsContent.tsx
|
|
33
|
+
const SearchResultsContent = ({ searchResultsState, productList, productCardConfig, merchantShortName, searchFilterSidebarVariant, productGridVariant, productGridClasses, containerXPaddingClasses, selectedFilterOptions, availableDynamicFilters, searchResponseId, onRemoveFilter, onToggleDynamicFilter, noResultsFoundText }) => {
|
|
34
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
|
|
35
|
+
searchResultsState === SearchResultsState.NoResults && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchResultsStates.NoSearchResultsFound, {
|
|
36
|
+
containerPaddingClasses: containerXPaddingClasses,
|
|
37
|
+
includeBottomMargin: true,
|
|
38
|
+
noResultsFoundText
|
|
39
|
+
}),
|
|
40
|
+
searchResultsState === SearchResultsState.Results && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchResultsStates.SearchResultsGrid, {
|
|
41
|
+
searchFilterSidebarVariant,
|
|
42
|
+
productCardConfig,
|
|
43
|
+
merchantShortName,
|
|
44
|
+
productList,
|
|
45
|
+
productGridVariant,
|
|
46
|
+
productGridClasses,
|
|
47
|
+
containerXPaddingClasses,
|
|
48
|
+
selectedFilterOptions,
|
|
49
|
+
availableDynamicFilters,
|
|
50
|
+
searchResponseId,
|
|
51
|
+
onRemoveFilter,
|
|
52
|
+
onToggleDynamicFilter
|
|
53
|
+
}),
|
|
54
|
+
searchResultsState === SearchResultsState.Loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SearchResultsStates.SearchResultsLoadingGrid, {
|
|
55
|
+
productGridVariant,
|
|
56
|
+
productGridClasses
|
|
57
|
+
})
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
//#endregion
|
|
62
|
+
exports.SearchResultsContent = SearchResultsContent;
|
|
63
|
+
exports.SearchResultsState = SearchResultsState;
|
|
64
|
+
exports.getSearchResultsState = getSearchResultsState;
|