@envive-ai/react-toolkit-v3 0.3.19 → 0.3.21
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/AnimatedText/AnimatedText.d.cts +3 -3
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +5 -5
- package/dist/ChatHeader/ChatHeader.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/components/Layout.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Message.cjs +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/Container/Container.d.cts +175 -175
- package/dist/Container/Container.d.ts +175 -175
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingButton/FloatingButton.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.cjs +25 -22
- package/dist/FloatingChat/FloatingChat.d.cts +4 -3
- package/dist/FloatingChat/FloatingChat.d.ts +4 -3
- package/dist/FloatingChat/FloatingChat.js +26 -23
- package/dist/FloatingChat/components/AgentMessage.cjs +2 -8
- package/dist/FloatingChat/components/AgentMessage.js +2 -8
- package/dist/FloatingChat/components/ProductResultsModal.cjs +62 -0
- package/dist/FloatingChat/components/ProductResultsModal.js +60 -0
- package/dist/FloatingChat/components/ResultsGridView.cjs +17 -3
- package/dist/FloatingChat/components/ResultsGridView.js +15 -4
- package/dist/FloatingChat/components/SlideChatContent.cjs +3 -2
- package/dist/FloatingChat/components/SlideChatContent.js +4 -3
- package/dist/FloatingChat/components/index.cjs +2 -0
- package/dist/FloatingChat/components/index.js +2 -0
- package/dist/FloatingChat/hooks/useProductResultsView.cjs +14 -1
- package/dist/FloatingChat/hooks/useProductResultsView.js +15 -2
- package/dist/FloatingChat/hooks/useSnapSetup.cjs +2 -2
- package/dist/FloatingChat/types/types.d.cts +4 -0
- package/dist/FloatingChat/types/types.d.ts +4 -0
- package/dist/FloatingChat/utils/functions.cjs +24 -16
- package/dist/FloatingChat/utils/functions.js +24 -17
- package/dist/FloatingChat/utils/trackProductCardInteraction.cjs +18 -0
- package/dist/FloatingChat/utils/trackProductCardInteraction.js +17 -0
- package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +29 -7
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +29 -7
- package/dist/FullPageSalesAgent/components/Layout.cjs +2 -1
- package/dist/FullPageSalesAgent/components/Layout.js +2 -1
- package/dist/FullPageSalesAgent/hooks/useIsMobile.cjs +2 -2
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/ImageGallery/ImageGallery.d.cts +2 -2
- package/dist/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/ImageGallery/components/Layout.cjs +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/ProductCard/ProductCard.d.cts +2 -2
- package/dist/ProductCard/ProductCard.d.ts +2 -2
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +2 -2
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +2 -2
- package/dist/PromptCarousel/PromptCarousel.cjs +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/index.d.cts +6 -6
- package/dist/ReviewCard/components/index.d.ts +6 -6
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
- package/dist/SocialProof/SocialProof.cjs +2 -2
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +2 -2
- package/dist/SocialProof/components/LayoutSingle.cjs +2 -2
- package/dist/SparkleAnimation/SparkleAnimation.d.cts +2 -2
- package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/Stack/Stack.d.ts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/Typography/Typography.d.cts +4 -4
- package/dist/Typography/Typography.d.ts +4 -4
- package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
- package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/dist/utils/useCheckIsMobile.d.cts +9 -0
- package/dist/utils/useCheckIsMobile.d.ts +9 -0
- package/package.json +5 -1
- package/src/components/FloatingChat/FloatingChat.tsx +35 -34
- package/src/components/FloatingChat/components/AgentMessage.tsx +2 -12
- package/src/components/FloatingChat/components/ProductResultsModal.tsx +87 -0
- package/src/components/FloatingChat/components/ResultsGridView.tsx +26 -2
- package/src/components/FloatingChat/components/SlideChatContent.tsx +9 -1
- package/src/components/FloatingChat/components/index.ts +2 -0
- package/src/components/FloatingChat/hooks/useProductResultsView.ts +26 -2
- package/src/components/FloatingChat/types/types.ts +4 -0
- package/src/components/FloatingChat/utils/functions.ts +34 -19
- package/src/components/FloatingChat/utils/trackProductCardInteraction.ts +26 -0
- package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +54 -5
- package/src/components/FullPageSalesAgent/components/Layout.tsx +7 -1
|
@@ -20,23 +20,30 @@ const getGroupableMessages = (message) => {
|
|
|
20
20
|
const checkIfHideAgentName = (messages) => {
|
|
21
21
|
return messages.some((msg) => msg.role === MessageRole.Assistant && msg.type !== MessageType.Separator);
|
|
22
22
|
};
|
|
23
|
+
const mapProductMessageToCardProps = (msg) => {
|
|
24
|
+
if (msg.type !== MessageType.Product) return null;
|
|
25
|
+
return {
|
|
26
|
+
id: msg.id,
|
|
27
|
+
productName: msg.metadata.title,
|
|
28
|
+
currentPrice: msg.metadata.salePrice,
|
|
29
|
+
previousPrice: msg.metadata.originalPrice,
|
|
30
|
+
pricePrefix: "$",
|
|
31
|
+
rate: msg.metadata.averageRating,
|
|
32
|
+
numberOfReviews: msg.metadata.numberReviews,
|
|
33
|
+
url: msg.metadata.url,
|
|
34
|
+
image: {
|
|
35
|
+
src: msg.metadata.imageUrl,
|
|
36
|
+
alt: `${msg.metadata.title} image`
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** Product cards for carousels; excludes grid-only rows from the API (`isForGrid`). */
|
|
23
41
|
const getCleanProducts = (messages) => {
|
|
24
|
-
return messages.map((msg) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
pricePrefix: "$",
|
|
30
|
-
rate: msg.metadata.averageRating,
|
|
31
|
-
numberOfReviews: msg.metadata.numberReviews,
|
|
32
|
-
url: msg.metadata.url,
|
|
33
|
-
image: {
|
|
34
|
-
src: msg.metadata.imageUrl,
|
|
35
|
-
alt: `${msg.metadata.title} image`
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
return null;
|
|
39
|
-
}).filter((product) => product !== null);
|
|
42
|
+
return messages.map((msg) => msg.type === MessageType.Product && !msg.metadata.isForGrid ? mapProductMessageToCardProps(msg) : null).filter((p) => p !== null);
|
|
43
|
+
};
|
|
44
|
+
/** All product rows in a turn, including `isForGrid`, for the full results grid. */
|
|
45
|
+
const getCleanProductsForResultsGrid = (messages) => {
|
|
46
|
+
return messages.map((msg) => msg.type === MessageType.Product ? mapProductMessageToCardProps(msg) : null).filter((p) => p !== null);
|
|
40
47
|
};
|
|
41
48
|
const getCleanReviews = (messages) => {
|
|
42
49
|
return messages.map((msg) => {
|
|
@@ -101,4 +108,4 @@ const getProductCarouselDisplayInfo = (products, numberOfProducts, displayLimit
|
|
|
101
108
|
};
|
|
102
109
|
|
|
103
110
|
//#endregion
|
|
104
|
-
export { MOST_RELEVANT_DISPLAY_LIMIT, checkIfHideAgentName, getCleanDocuments, getCleanOrders, getCleanProducts, getCleanReviews, getGroupableMessages, getProductCarouselDisplayInfo, getSearchQueryFromMessageBlock };
|
|
111
|
+
export { MOST_RELEVANT_DISPLAY_LIMIT, checkIfHideAgentName, getCleanDocuments, getCleanOrders, getCleanProducts, getCleanProductsForResultsGrid, getCleanReviews, getGroupableMessages, getProductCarouselDisplayInfo, getSearchQueryFromMessageBlock };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
3
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
4
|
+
|
|
5
|
+
//#region src/components/FloatingChat/utils/trackProductCardInteraction.ts
|
|
6
|
+
const trackProductCardClicked = (trackWidgetInteraction, widget, product) => {
|
|
7
|
+
trackWidgetInteraction({
|
|
8
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
9
|
+
trigger: {
|
|
10
|
+
widget,
|
|
11
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.PRODUCT_CARD_CLICKED,
|
|
12
|
+
widget_interaction_data: { product_card_clicked: { product_id: product.id } }
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.trackProductCardClicked = trackProductCardClicked;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
2
|
+
import { WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
3
|
+
|
|
4
|
+
//#region src/components/FloatingChat/utils/trackProductCardInteraction.ts
|
|
5
|
+
const trackProductCardClicked = (trackWidgetInteraction, widget, product) => {
|
|
6
|
+
trackWidgetInteraction({
|
|
7
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
8
|
+
trigger: {
|
|
9
|
+
widget,
|
|
10
|
+
widget_interaction: WidgetInteractionType.PRODUCT_CARD_CLICKED,
|
|
11
|
+
widget_interaction_data: { product_card_clicked: { product_id: product.id } }
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { trackProductCardClicked };
|
|
@@ -14,7 +14,10 @@ const require_Disclaimer = require('../Disclaimer/Disclaimer.cjs');
|
|
|
14
14
|
require('../Disclaimer/index.cjs');
|
|
15
15
|
const require_WelcomeMessage = require('../WelcomeMessage/WelcomeMessage.cjs');
|
|
16
16
|
const require_useChatSuggestions = require('../FloatingChat/hooks/useChatSuggestions.cjs');
|
|
17
|
+
const require_useProductResultsView = require('../FloatingChat/hooks/useProductResultsView.cjs');
|
|
17
18
|
const require_useScrollToBottom = require('../FloatingChat/hooks/useScrollToBottom.cjs');
|
|
19
|
+
const require_ResultsGridView = require('../FloatingChat/components/ResultsGridView.cjs');
|
|
20
|
+
const require_trackProductCardInteraction = require('../FloatingChat/utils/trackProductCardInteraction.cjs');
|
|
18
21
|
const require_index = require('../FloatingChat/components/index.cjs');
|
|
19
22
|
require('../WelcomeMessage/index.cjs');
|
|
20
23
|
const require_useIsMobile = require('./hooks/useIsMobile.cjs');
|
|
@@ -63,6 +66,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
63
66
|
generalSuggestions
|
|
64
67
|
]
|
|
65
68
|
});
|
|
69
|
+
const { resultsViewData, isResultsView, scrollContainerRef, isResultsViewRef, handleBackToChat, handleExploreAllResults } = require_useProductResultsView.useProductResultsView({ scrollToBottom });
|
|
66
70
|
const handleScrollToBottom = () => {
|
|
67
71
|
scrollToBottom();
|
|
68
72
|
trackWidgetInteraction({
|
|
@@ -82,6 +86,9 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
82
86
|
}
|
|
83
87
|
});
|
|
84
88
|
};
|
|
89
|
+
const handleProductCardClick = (product) => {
|
|
90
|
+
require_trackProductCardInteraction.trackProductCardClicked(trackWidgetInteraction, __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, product);
|
|
91
|
+
};
|
|
85
92
|
const welcomeMessage = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
86
93
|
className: messageContainerClasses,
|
|
87
94
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WelcomeMessage.WelcomeMessage, {
|
|
@@ -107,6 +114,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
107
114
|
if (suggestion) onSuggestionClicked(suggestion, __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.FLOATING_CHAT_PROMPT_BUTTON);
|
|
108
115
|
setAnswerSuggestions([]);
|
|
109
116
|
setGeneralSuggestions([]);
|
|
117
|
+
handleBackToChat();
|
|
110
118
|
},
|
|
111
119
|
onChange: setQuery,
|
|
112
120
|
onSubmit: () => {
|
|
@@ -117,6 +125,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
117
125
|
});
|
|
118
126
|
setAnswerSuggestions([]);
|
|
119
127
|
setGeneralSuggestions([]);
|
|
128
|
+
handleBackToChat();
|
|
120
129
|
},
|
|
121
130
|
onFocus: handleInputQueryFocus,
|
|
122
131
|
parentWidget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
@@ -135,7 +144,19 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
135
144
|
neverShowSingleProductCards,
|
|
136
145
|
showVerifiedBuyer,
|
|
137
146
|
onFormResponseSubmitted,
|
|
138
|
-
parentWidget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
147
|
+
parentWidget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT,
|
|
148
|
+
onExploreAllResults: (firstProductMessageId) => handleExploreAllResults(firstProductMessageId, messages)
|
|
149
|
+
});
|
|
150
|
+
const middleContent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.FloatingChatComponents.SlideChatContent, {
|
|
151
|
+
isResultsView,
|
|
152
|
+
isResultsViewRef,
|
|
153
|
+
resultsViewData,
|
|
154
|
+
onBackToChat: handleBackToChat,
|
|
155
|
+
onProductCardClick: handleProductCardClick,
|
|
156
|
+
theme: resolvedTheme,
|
|
157
|
+
chatMessages,
|
|
158
|
+
scrollToBottom,
|
|
159
|
+
resultsGridColumns: isMobile ? require_ResultsGridView.NUM_COLUMNS_MOBILE : require_ResultsGridView.NUM_COLUMNS_FPSA
|
|
139
160
|
});
|
|
140
161
|
const answerSuggestionsComponent = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
|
|
141
162
|
className: "envive-tw-flex envive-tw-justify-end envive-tw-p-4 [&>div>div]:envive-tw-items-end",
|
|
@@ -159,14 +180,15 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
159
180
|
const disclaimer = disclaimerText && typeof disclaimerText === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Disclaimer.Disclaimer, { disclaimerMarkdown: disclaimerText }) : void 0;
|
|
160
181
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index$1.FullPageSAComponents.Layout, {
|
|
161
182
|
theme: resolvedTheme,
|
|
162
|
-
welcomeMessage,
|
|
183
|
+
welcomeMessage: isResultsView ? null : welcomeMessage,
|
|
163
184
|
footer,
|
|
164
|
-
chatMessages,
|
|
165
|
-
answerSuggestions: showAnswerSuggestions ? answerSuggestionsComponent : void 0,
|
|
166
|
-
scrollToBottomButton: showScrollButton ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
|
|
167
|
-
disclaimer,
|
|
185
|
+
chatMessages: middleContent,
|
|
186
|
+
answerSuggestions: showAnswerSuggestions && !isResultsView ? answerSuggestionsComponent : void 0,
|
|
187
|
+
scrollToBottomButton: !isResultsView && showScrollButton ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
|
|
188
|
+
disclaimer: isResultsView ? null : disclaimer,
|
|
168
189
|
headerContainer,
|
|
169
|
-
autoHeight
|
|
190
|
+
autoHeight,
|
|
191
|
+
scrollContainerRef
|
|
170
192
|
});
|
|
171
193
|
};
|
|
172
194
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Theme } from "../tokens/theme/theme.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
import { FloatingChatConfig, LookAndFeelConfig } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
4
4
|
import { HardcopyResponse } from "@envive-ai/react-hooks/contexts/hardcopyContext";
|
|
5
5
|
|
|
@@ -19,6 +19,6 @@ declare const FullPageSalesAgent: ({
|
|
|
19
19
|
hardcopyContent,
|
|
20
20
|
headerContainer,
|
|
21
21
|
autoHeight
|
|
22
|
-
}: FullPageSalesAgentProps) =>
|
|
22
|
+
}: FullPageSalesAgentProps) => react_jsx_runtime20.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FullPageSalesAgent };
|
|
@@ -13,7 +13,10 @@ import { Disclaimer } from "../Disclaimer/Disclaimer.js";
|
|
|
13
13
|
import "../Disclaimer/index.js";
|
|
14
14
|
import { WelcomeMessage } from "../WelcomeMessage/WelcomeMessage.js";
|
|
15
15
|
import { useChatSuggestions } from "../FloatingChat/hooks/useChatSuggestions.js";
|
|
16
|
+
import { useProductResultsView } from "../FloatingChat/hooks/useProductResultsView.js";
|
|
16
17
|
import { useScrollToBottom } from "../FloatingChat/hooks/useScrollToBottom.js";
|
|
18
|
+
import { NUM_COLUMNS_FPSA, NUM_COLUMNS_MOBILE } from "../FloatingChat/components/ResultsGridView.js";
|
|
19
|
+
import { trackProductCardClicked } from "../FloatingChat/utils/trackProductCardInteraction.js";
|
|
17
20
|
import { FloatingChatComponents } from "../FloatingChat/components/index.js";
|
|
18
21
|
import "../WelcomeMessage/index.js";
|
|
19
22
|
import { useIsMobile } from "./hooks/useIsMobile.js";
|
|
@@ -62,6 +65,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
62
65
|
generalSuggestions
|
|
63
66
|
]
|
|
64
67
|
});
|
|
68
|
+
const { resultsViewData, isResultsView, scrollContainerRef, isResultsViewRef, handleBackToChat, handleExploreAllResults } = useProductResultsView({ scrollToBottom });
|
|
65
69
|
const handleScrollToBottom = () => {
|
|
66
70
|
scrollToBottom();
|
|
67
71
|
trackWidgetInteraction({
|
|
@@ -81,6 +85,9 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
81
85
|
}
|
|
82
86
|
});
|
|
83
87
|
};
|
|
88
|
+
const handleProductCardClick = (product) => {
|
|
89
|
+
trackProductCardClicked(trackWidgetInteraction, WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, product);
|
|
90
|
+
};
|
|
84
91
|
const welcomeMessage = /* @__PURE__ */ jsx("div", {
|
|
85
92
|
className: messageContainerClasses,
|
|
86
93
|
children: /* @__PURE__ */ jsx(WelcomeMessage, {
|
|
@@ -106,6 +113,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
106
113
|
if (suggestion) onSuggestionClicked(suggestion, ChatElementDisplayLocationV3.FLOATING_CHAT_PROMPT_BUTTON);
|
|
107
114
|
setAnswerSuggestions([]);
|
|
108
115
|
setGeneralSuggestions([]);
|
|
116
|
+
handleBackToChat();
|
|
109
117
|
},
|
|
110
118
|
onChange: setQuery,
|
|
111
119
|
onSubmit: () => {
|
|
@@ -116,6 +124,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
116
124
|
});
|
|
117
125
|
setAnswerSuggestions([]);
|
|
118
126
|
setGeneralSuggestions([]);
|
|
127
|
+
handleBackToChat();
|
|
119
128
|
},
|
|
120
129
|
onFocus: handleInputQueryFocus,
|
|
121
130
|
parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
@@ -134,7 +143,19 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
134
143
|
neverShowSingleProductCards,
|
|
135
144
|
showVerifiedBuyer,
|
|
136
145
|
onFormResponseSubmitted,
|
|
137
|
-
parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
146
|
+
parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT,
|
|
147
|
+
onExploreAllResults: (firstProductMessageId) => handleExploreAllResults(firstProductMessageId, messages)
|
|
148
|
+
});
|
|
149
|
+
const middleContent = /* @__PURE__ */ jsx(FloatingChatComponents.SlideChatContent, {
|
|
150
|
+
isResultsView,
|
|
151
|
+
isResultsViewRef,
|
|
152
|
+
resultsViewData,
|
|
153
|
+
onBackToChat: handleBackToChat,
|
|
154
|
+
onProductCardClick: handleProductCardClick,
|
|
155
|
+
theme: resolvedTheme,
|
|
156
|
+
chatMessages,
|
|
157
|
+
scrollToBottom,
|
|
158
|
+
resultsGridColumns: isMobile ? NUM_COLUMNS_MOBILE : NUM_COLUMNS_FPSA
|
|
138
159
|
});
|
|
139
160
|
const answerSuggestionsComponent = /* @__PURE__ */ jsx(PromptCarousel, {
|
|
140
161
|
className: "envive-tw-flex envive-tw-justify-end envive-tw-p-4 [&>div>div]:envive-tw-items-end",
|
|
@@ -158,14 +179,15 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
158
179
|
const disclaimer = disclaimerText && typeof disclaimerText === "string" ? /* @__PURE__ */ jsx(Disclaimer, { disclaimerMarkdown: disclaimerText }) : void 0;
|
|
159
180
|
return /* @__PURE__ */ jsx(FullPageSAComponents.Layout, {
|
|
160
181
|
theme: resolvedTheme,
|
|
161
|
-
welcomeMessage,
|
|
182
|
+
welcomeMessage: isResultsView ? null : welcomeMessage,
|
|
162
183
|
footer,
|
|
163
|
-
chatMessages,
|
|
164
|
-
answerSuggestions: showAnswerSuggestions ? answerSuggestionsComponent : void 0,
|
|
165
|
-
scrollToBottomButton: showScrollButton ? /* @__PURE__ */ jsx(FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
|
|
166
|
-
disclaimer,
|
|
184
|
+
chatMessages: middleContent,
|
|
185
|
+
answerSuggestions: showAnswerSuggestions && !isResultsView ? answerSuggestionsComponent : void 0,
|
|
186
|
+
scrollToBottomButton: !isResultsView && showScrollButton ? /* @__PURE__ */ jsx(FloatingChatComponents.ScrollToBottomButton, { onClick: handleScrollToBottom }) : void 0,
|
|
187
|
+
disclaimer: isResultsView ? null : disclaimer,
|
|
167
188
|
headerContainer,
|
|
168
|
-
autoHeight
|
|
189
|
+
autoHeight,
|
|
190
|
+
scrollContainerRef
|
|
169
191
|
});
|
|
170
192
|
};
|
|
171
193
|
|
|
@@ -12,7 +12,7 @@ let classnames = require("classnames");
|
|
|
12
12
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
13
13
|
|
|
14
14
|
//#region src/components/FullPageSalesAgent/components/Layout.tsx
|
|
15
|
-
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
15
|
+
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef }) => {
|
|
16
16
|
const hasWelcomeMessage = (0, react.isValidElement)(welcomeMessage);
|
|
17
17
|
const hasAnswerSuggestions = (0, react.isValidElement)(answerSuggestions);
|
|
18
18
|
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
@@ -26,6 +26,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
26
26
|
className: containerClasses,
|
|
27
27
|
style: containerStyles,
|
|
28
28
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
29
|
+
ref: scrollContainerRef,
|
|
29
30
|
className: contentClasses,
|
|
30
31
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
|
|
31
32
|
direction: "column",
|
|
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
10
10
|
import classNames from "classnames";
|
|
11
11
|
|
|
12
12
|
//#region src/components/FullPageSalesAgent/components/Layout.tsx
|
|
13
|
-
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
13
|
+
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight, scrollContainerRef }) => {
|
|
14
14
|
const hasWelcomeMessage = isValidElement(welcomeMessage);
|
|
15
15
|
const hasAnswerSuggestions = isValidElement(answerSuggestions);
|
|
16
16
|
const { isMobile } = useIsMobile();
|
|
@@ -24,6 +24,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
24
24
|
className: containerClasses,
|
|
25
25
|
style: containerStyles,
|
|
26
26
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
27
|
+
ref: scrollContainerRef,
|
|
27
28
|
className: contentClasses,
|
|
28
29
|
children: [/* @__PURE__ */ jsxs(Stack, {
|
|
29
30
|
direction: "column",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_utils_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/components/FullPageSalesAgent/hooks/useIsMobile.ts
|
|
4
|
-
const useIsMobile = () =>
|
|
4
|
+
const useIsMobile = () => require_utils_useCheckIsMobile.useCheckIsMobile("md");
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
exports.useIsMobile = useIsMobile;
|
package/dist/Image/Image.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime26.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
package/dist/Image/Image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime22.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ImageGallery/ImageGallery.d.ts
|
|
5
5
|
|
|
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
|
|
|
40
40
|
"aria-describedby": ariaDescribedBy,
|
|
41
41
|
role,
|
|
42
42
|
"aria-hidden": ariaHidden
|
|
43
|
-
}: ImageGalleryProps) =>
|
|
43
|
+
}: ImageGalleryProps) => react_jsx_runtime4.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ImageGallery/ImageGallery.d.ts
|
|
5
5
|
|
|
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
|
|
|
40
40
|
"aria-describedby": ariaDescribedBy,
|
|
41
41
|
role,
|
|
42
42
|
"aria-hidden": ariaHidden
|
|
43
|
-
}: ImageGalleryProps) =>
|
|
43
|
+
}: ImageGalleryProps) => react_jsx_runtime25.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -2,7 +2,7 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_theme = require('../../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
3
|
const require_Container = require('../../Container/Container.cjs');
|
|
4
4
|
const require_useResponsiveValue = require('../../utils/useResponsiveValue.cjs');
|
|
5
|
-
const
|
|
5
|
+
const require_utils_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
6
6
|
const require_types = require('../types/types.cjs');
|
|
7
7
|
const require_useGetContainerProperties = require('../hooks/useGetContainerProperties.cjs');
|
|
8
8
|
const require_useValidateImages = require('../hooks/useValidateImages.cjs');
|
|
@@ -19,7 +19,7 @@ const Layout = ({ id, testId, className, style, images, layout, theme = require_
|
|
|
19
19
|
value: layout,
|
|
20
20
|
fallback: require_types.ImageGalleryLayout.FOUR_GRID
|
|
21
21
|
});
|
|
22
|
-
const { isMobile } =
|
|
22
|
+
const { isMobile } = require_utils_useCheckIsMobile.useCheckIsMobile();
|
|
23
23
|
const { displayImages } = require_useValidateImages.useValidateImages({
|
|
24
24
|
images,
|
|
25
25
|
resolvedLayout
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime23 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
|
|
|
8
8
|
textColor,
|
|
9
9
|
textVariant,
|
|
10
10
|
onLinkClick
|
|
11
|
-
}: MarkdownProcessorProps) =>
|
|
11
|
+
}: MarkdownProcessorProps) => react_jsx_runtime23.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -8,6 +8,6 @@ declare const MarkdownProcessor: ({
|
|
|
8
8
|
textColor,
|
|
9
9
|
textVariant,
|
|
10
10
|
onLinkClick
|
|
11
|
-
}: MarkdownProcessorProps) =>
|
|
11
|
+
}: MarkdownProcessorProps) => react_jsx_runtime5.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -24,6 +24,6 @@ declare const ProductCard: ({
|
|
|
24
24
|
onTouchStart,
|
|
25
25
|
onTouchEnd,
|
|
26
26
|
onInputClick
|
|
27
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime19.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -24,6 +24,6 @@ declare const ProductCard: ({
|
|
|
24
24
|
onTouchStart,
|
|
25
25
|
onTouchEnd,
|
|
26
26
|
onInputClick
|
|
27
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime13.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { ProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -22,6 +22,6 @@ declare const PromptButton: ({
|
|
|
22
22
|
onTouchEnd,
|
|
23
23
|
ariaLabel,
|
|
24
24
|
ariaDescribedBy
|
|
25
|
-
}: PromptButtonProps) =>
|
|
25
|
+
}: PromptButtonProps) => react_jsx_runtime17.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -22,6 +22,6 @@ declare const PromptButton: ({
|
|
|
22
22
|
onTouchEnd,
|
|
23
23
|
ariaLabel,
|
|
24
24
|
ariaDescribedBy
|
|
25
|
-
}: PromptButtonProps) =>
|
|
25
|
+
}: PromptButtonProps) => react_jsx_runtime21.JSX.Element;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonCarouselWithImageProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImage: ({
|
|
@@ -24,6 +24,6 @@ declare const PromptButtonCarouselWithImage: ({
|
|
|
24
24
|
handlePromptButtonTouchEnd,
|
|
25
25
|
textFieldPlaceholder,
|
|
26
26
|
handleTextFieldClick
|
|
27
|
-
}: PromptButtonCarouselWithImageProps) =>
|
|
27
|
+
}: PromptButtonCarouselWithImageProps) => react_jsx_runtime13.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { PromptButtonCarouselWithImage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonCarouselWithImageProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImage: ({
|
|
@@ -24,6 +24,6 @@ declare const PromptButtonCarouselWithImage: ({
|
|
|
24
24
|
handlePromptButtonTouchEnd,
|
|
25
25
|
textFieldPlaceholder,
|
|
26
26
|
handleTextFieldClick
|
|
27
|
-
}: PromptButtonCarouselWithImageProps) =>
|
|
27
|
+
}: PromptButtonCarouselWithImageProps) => react_jsx_runtime19.JSX.Element;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { PromptButtonCarouselWithImage };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
3
3
|
require('../../Stack/index.cjs');
|
|
4
|
-
const
|
|
4
|
+
const require_utils_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
5
5
|
const require_useGetContentSize = require('../../utils/useGetContentSize.cjs');
|
|
6
6
|
const require_functions = require('../../SocialProof/utils/functions.cjs');
|
|
7
7
|
const require_useDragToScroll = require('../../utils/useDragToScroll.cjs');
|
|
@@ -13,7 +13,7 @@ classnames = require_rolldown_runtime.__toESM(classnames);
|
|
|
13
13
|
|
|
14
14
|
//#region src/components/PromptButtonCarouselWithImage/components/Layout.tsx
|
|
15
15
|
const Layout = ({ id, testId, className, style, title, promptButtons, image, textField, hideTextField, onPromptDrag }) => {
|
|
16
|
-
const { isMobile } =
|
|
16
|
+
const { isMobile } = require_utils_useCheckIsMobile.useCheckIsMobile();
|
|
17
17
|
const { height, ref: contentSizeRef } = require_useGetContentSize.useGetContentSize({ heightDefault: 245 });
|
|
18
18
|
const wheelScrollRef = require_useHorizontalWheelScroll.useHorizontalWheelScroll(!isMobile);
|
|
19
19
|
require_useDragToScroll.useDragToScroll(wheelScrollRef, {
|
|
@@ -4,7 +4,7 @@ const require_Stack = require('../../Stack/Stack.cjs');
|
|
|
4
4
|
require('../../Stack/index.cjs');
|
|
5
5
|
const require_PromptButton = require('../../PromptButton/PromptButton.cjs');
|
|
6
6
|
require('../../PromptButton/index.cjs');
|
|
7
|
-
const
|
|
7
|
+
const require_utils_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
|
|
10
10
|
//#region src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx
|
|
@@ -36,7 +36,7 @@ function distributeInThreeRows(items) {
|
|
|
36
36
|
}
|
|
37
37
|
const PromptButtonsCarousel = ({ theme, isLoading, promptButtonsTexts, promptButtonType, handlePromptButtonClick, handlePromptButtonHover, handlePromptButtonMouseDown, handlePromptButtonMouseUp, handlePromptButtonTouchStart, handlePromptButtonTouchEnd }) => {
|
|
38
38
|
const finalTheme = require_resolveTheme.resolveTheme(theme);
|
|
39
|
-
const { isMobile } =
|
|
39
|
+
const { isMobile } = require_utils_useCheckIsMobile.useCheckIsMobile();
|
|
40
40
|
const promptButtonsTextsFinal = isLoading ? [
|
|
41
41
|
"Loading 1...",
|
|
42
42
|
"Loading 2...",
|
|
@@ -8,7 +8,7 @@ require('../Stack/index.cjs');
|
|
|
8
8
|
const require_PromptButton_types_index = require('../PromptButton/types/index.cjs');
|
|
9
9
|
const require_PromptButton = require('../PromptButton/PromptButton.cjs');
|
|
10
10
|
require('../PromptButton/index.cjs');
|
|
11
|
-
const
|
|
11
|
+
const require_utils_useCheckIsMobile = require('../utils/useCheckIsMobile.cjs');
|
|
12
12
|
const require_useCarouselButtons = require('./hooks/useCarouselButtons.cjs');
|
|
13
13
|
const require_PromptCarousel_types_types = require('./types/types.cjs');
|
|
14
14
|
const require_useCoordinatedScrollAnimation = require('./hooks/useCoordinatedScrollAnimation.cjs');
|
|
@@ -21,7 +21,7 @@ let react_indiana_drag_scroll = require("react-indiana-drag-scroll");
|
|
|
21
21
|
|
|
22
22
|
//#region src/components/PromptCarousel/PromptCarousel.tsx
|
|
23
23
|
const PromptCarousel = ({ id, theme = require_theme.Theme.GLOBAL_CUSTOM, testId, className, style, isLoading = false, promptButtonTexts, promptButtonType = require_PromptButton_types_index.PromptButtonVariant.LIGHT, boldFirstButton = false, handleButtonClick, handleButtonHover, handleButtonFocus, handleButtonMouseUp, handleButtonMouseDown, handleButtonTouchStart, handleButtonTouchEnd, handleButtonDrag, promptCarouselRows = require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_ONE, animationSpeed = require_PromptCarousel_types_types.AnimationSpeed.NONE, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role = "region" }) => {
|
|
24
|
-
const { isMobile } =
|
|
24
|
+
const { isMobile } = require_utils_useCheckIsMobile.useCheckIsMobile();
|
|
25
25
|
const isAnimatedValue = require_functions.isAnimated(animationSpeed);
|
|
26
26
|
const shouldShowTwoRowsValue = require_functions.shouldShowTwoRows(promptCarouselRows, isMobile);
|
|
27
27
|
const finalTheme = require_resolveTheme.resolveTheme(theme);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptCarouselProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptCarousel/PromptCarousel.d.ts
|
|
5
5
|
declare const PromptCarousel: ({
|
|
@@ -26,6 +26,6 @@ declare const PromptCarousel: ({
|
|
|
26
26
|
"aria-labelledby": ariaLabelledBy,
|
|
27
27
|
"aria-describedby": ariaDescribedBy,
|
|
28
28
|
role
|
|
29
|
-
}: PromptCarouselProps) =>
|
|
29
|
+
}: PromptCarouselProps) => react_jsx_runtime22.JSX.Element;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { PromptCarousel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptCarouselProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptCarousel/PromptCarousel.d.ts
|
|
5
5
|
declare const PromptCarousel: ({
|
|
@@ -26,6 +26,6 @@ declare const PromptCarousel: ({
|
|
|
26
26
|
"aria-labelledby": ariaLabelledBy,
|
|
27
27
|
"aria-describedby": ariaDescribedBy,
|
|
28
28
|
role
|
|
29
|
-
}: PromptCarouselProps) =>
|
|
29
|
+
}: PromptCarouselProps) => react_jsx_runtime12.JSX.Element;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { PromptCarousel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReviewCardProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ReviewCard/ReviewCard.d.ts
|
|
5
5
|
|
|
@@ -27,6 +27,6 @@ declare const ReviewCard: ({
|
|
|
27
27
|
verifiedBuyerLabel,
|
|
28
28
|
onExpand,
|
|
29
29
|
onCollapse
|
|
30
|
-
}: ReviewCardProps) =>
|
|
30
|
+
}: ReviewCardProps) => react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { ReviewCard };
|