@envive-ai/react-toolkit-v3 0.3.19 → 0.3.20
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/AnimatedText/AnimatedText.d.ts +3 -3
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
- package/dist/CSSVariablesEditor/hooks/useGetCssVariablesOptions.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCssVariablesOptions.js +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetCurrentMerchantColors.js +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useGetDefaultCssVariables.js +1 -1
- package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.cjs +1 -1
- package/dist/CSSVariablesEditor/hooks/useHandleUpdateCssVars.js +1 -1
- package/dist/Carousel/Carousel.cjs +1 -1
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.js +1 -1
- package/dist/Carousel/components/Badge.cjs +1 -1
- package/dist/Carousel/components/Badge.js +1 -1
- package/dist/Carousel/components/Container.cjs +3 -3
- package/dist/Carousel/components/Container.js +3 -3
- package/dist/ChatFooter/ChatFooter.cjs +2 -2
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.js +2 -2
- package/dist/ChatFooter/components/Layout.cjs +3 -3
- package/dist/ChatFooter/components/Layout.js +3 -3
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +5 -5
- package/dist/ChatHeader/ChatHeader.d.cts +2 -2
- package/dist/ChatHeader/components/Handle.cjs +2 -2
- package/dist/ChatHeader/components/Handle.js +2 -2
- package/dist/ChatHeader/components/Toggle.cjs +3 -3
- package/dist/ChatHeader/components/Toggle.js +3 -3
- package/dist/ChatHeader/hooks/useGetLayoutProperties.cjs +1 -1
- package/dist/ChatHeader/hooks/useGetLayoutProperties.js +1 -1
- package/dist/ChatPreview/ChatPreview.cjs +1 -1
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.js +1 -1
- package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +1 -1
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.js +1 -1
- package/dist/ChatPreviewComparison/components/Headline.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Headline.js +2 -2
- package/dist/ChatPreviewComparison/components/Layout.cjs +8 -8
- package/dist/ChatPreviewComparison/components/Layout.js +6 -6
- package/dist/ChatPreviewComparison/components/Message.cjs +4 -4
- package/dist/ChatPreviewComparison/components/Message.js +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/Container/Container.d.cts +8 -8
- package/dist/Container/Container.d.ts +173 -173
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/DesignTokens/components/FontFamily.cjs +1 -1
- package/dist/DesignTokens/components/FontFamily.js +1 -1
- package/dist/DesignTokens/components/FontSize.cjs +1 -1
- package/dist/DesignTokens/components/FontSize.js +1 -1
- package/dist/DesignTokens/components/FontWeight.cjs +1 -1
- package/dist/DesignTokens/components/FontWeight.js +1 -1
- package/dist/DesignTokens/components/LetterSpacing.cjs +1 -1
- package/dist/DesignTokens/components/LetterSpacing.js +1 -1
- package/dist/DesignTokens/components/LineHeight.cjs +1 -1
- package/dist/DesignTokens/components/LineHeight.js +1 -1
- package/dist/DesignTokens/components/Typography.cjs +1 -1
- package/dist/DesignTokens/components/Typography.js +1 -1
- package/dist/Disclaimer/components/Container.cjs +3 -3
- package/dist/Disclaimer/components/Container.js +3 -3
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/DocumentRetrievalCard/components/Image.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/Image.js +1 -1
- package/dist/DocumentRetrievalCard/components/Layout.cjs +3 -3
- package/dist/DocumentRetrievalCard/components/Layout.js +3 -3
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +2 -2
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +2 -2
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Label.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Label.js +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Layout.js +1 -1
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingButton/FloatingButton.d.ts +2 -2
- package/dist/FloatingButton/components/Button.cjs +1 -1
- package/dist/FloatingButton/components/Button.js +1 -1
- package/dist/FloatingButton/components/Container.cjs +1 -1
- package/dist/FloatingButton/components/Container.js +1 -1
- package/dist/FloatingButton/components/Wrapper.cjs +1 -1
- package/dist/FloatingButton/components/Wrapper.js +1 -1
- 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/ChatMessages.cjs +2 -2
- package/dist/FloatingChat/components/ChatMessages.js +2 -2
- package/dist/FloatingChat/components/Layout.cjs +4 -4
- package/dist/FloatingChat/components/Layout.js +4 -4
- package/dist/FloatingChat/components/ProductResultsModal.cjs +62 -0
- package/dist/FloatingChat/components/ProductResultsModal.js +60 -0
- package/dist/FloatingChat/components/ResultsGridView.cjs +18 -4
- package/dist/FloatingChat/components/ResultsGridView.js +16 -5
- package/dist/FloatingChat/components/SalesAgentBadgeContent.cjs +2 -2
- package/dist/FloatingChat/components/SalesAgentBadgeContent.js +2 -2
- 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/Form/Form.cjs +1 -1
- package/dist/Form/Form.js +1 -1
- package/dist/Form/components/Layout.cjs +1 -1
- package/dist/Form/components/Layout.js +1 -1
- package/dist/Form/components/SubmitButtonItem.cjs +1 -1
- package/dist/Form/components/SubmitButtonItem.js +1 -1
- package/dist/Form/components/TextFieldItem.cjs +1 -1
- package/dist/Form/components/TextFieldItem.js +1 -1
- package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +30 -8
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +30 -8
- package/dist/FullPageSalesAgent/components/Layout.cjs +3 -2
- package/dist/FullPageSalesAgent/components/Layout.js +3 -2
- package/dist/FullPageSalesAgent/hooks/useIsMobile.cjs +2 -2
- package/dist/Image/Image.cjs +1 -1
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/Image/Image.js +1 -1
- package/dist/ImageGallery/ImageGallery.d.cts +2 -2
- package/dist/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/ImageGallery/components/Layout.cjs +4 -4
- package/dist/ImageGallery/components/Layout.js +2 -2
- package/dist/ImageGallery/utils/functions.cjs +1 -1
- package/dist/ImageGallery/utils/functions.js +1 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/Message/components/Layout.cjs +1 -1
- package/dist/Message/components/Layout.js +1 -1
- package/dist/Message/components/LinkButton.cjs +1 -1
- package/dist/Message/components/LinkButton.js +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.cjs +2 -2
- package/dist/OrderLookupCard/OrderLookupCard.js +2 -2
- package/dist/OrderLookupCard/components/Layout.cjs +1 -1
- package/dist/OrderLookupCard/components/Layout.js +1 -1
- package/dist/OrderLookupCard/components/MoreProductsOverlay.cjs +1 -1
- package/dist/OrderLookupCard/components/MoreProductsOverlay.js +1 -1
- package/dist/OrderLookupCard/components/ProductImageGridItem.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImageGridItem.js +1 -1
- package/dist/OrderLookupCard/components/ProductImageItem.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImageItem.js +1 -1
- package/dist/OrderLookupCard/components/ProductImagesGrid.cjs +1 -1
- package/dist/OrderLookupCard/components/ProductImagesGrid.js +1 -1
- package/dist/OrderLookupCard/components/StatusLabel.cjs +1 -1
- package/dist/OrderLookupCard/components/StatusLabel.js +1 -1
- package/dist/OrderLookupCard/components/TrackOrderLink.cjs +1 -1
- package/dist/OrderLookupCard/components/TrackOrderLink.js +1 -1
- package/dist/ProductCard/ProductCard.cjs +3 -3
- package/dist/ProductCard/ProductCard.d.cts +2 -2
- package/dist/ProductCard/ProductCard.d.ts +2 -2
- package/dist/ProductCard/ProductCard.js +3 -3
- package/dist/PromptButton/PromptButton.cjs +1 -1
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButton/PromptButton.js +1 -1
- package/dist/PromptButton/components/Layout.cjs +1 -1
- package/dist/PromptButton/components/Layout.js +1 -1
- package/dist/PromptButton/components/Loading.cjs +1 -1
- package/dist/PromptButton/components/Loading.js +1 -1
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +3 -3
- package/dist/PromptButtonCarouselWithImage/components/Layout.js +1 -1
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +3 -3
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +1 -1
- package/dist/PromptButtonCarouselWithImage/components/Skeleton.cjs +1 -1
- package/dist/PromptButtonCarouselWithImage/components/Skeleton.js +1 -1
- package/dist/PromptCarousel/PromptCarousel.cjs +6 -6
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.js +4 -4
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/Container.cjs +3 -3
- package/dist/ReviewCard/components/Container.js +3 -3
- package/dist/ReviewCard/components/Rating.cjs +1 -1
- package/dist/ReviewCard/components/Rating.js +1 -1
- package/dist/ReviewCard/components/ReadMoreButton.cjs +2 -2
- package/dist/ReviewCard/components/ReadMoreButton.js +2 -2
- package/dist/ReviewCard/components/index.d.cts +6 -6
- package/dist/ReviewCard/components/index.d.ts +4 -4
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/components/Container.cjs +3 -3
- package/dist/SalesAgentProductCard/components/Container.js +3 -3
- package/dist/SalesAgentProductCard/components/ProductImage.cjs +1 -1
- package/dist/SalesAgentProductCard/components/ProductImage.js +1 -1
- package/dist/SalesAgentProductCard/components/ProductName.cjs +1 -1
- package/dist/SalesAgentProductCard/components/ProductName.js +1 -1
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/components/index.d.ts +2 -2
- package/dist/SocialProof/SocialProof.cjs +3 -3
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/SocialProof.js +1 -1
- package/dist/SocialProof/components/Headline.cjs +4 -4
- package/dist/SocialProof/components/Headline.js +4 -4
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +4 -4
- package/dist/SocialProof/components/LayoutFourHorizontal.js +2 -2
- package/dist/SocialProof/components/LayoutSingle.cjs +2 -2
- package/dist/SocialProof/components/Subheadline.cjs +1 -1
- package/dist/SocialProof/components/Subheadline.js +1 -1
- 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/TextField/TextField.cjs +1 -1
- package/dist/TextField/TextField.js +1 -1
- package/dist/TextField/components/Input.cjs +1 -1
- package/dist/TextField/components/Input.js +1 -1
- package/dist/TextField/components/Layout.cjs +1 -1
- package/dist/TextField/components/Layout.js +1 -1
- package/dist/TextField/components/SendIcon.cjs +1 -1
- package/dist/TextField/components/SendIcon.js +1 -1
- package/dist/Title/Title.cjs +1 -1
- package/dist/Title/Title.js +1 -1
- package/dist/Title/components/Layout.cjs +1 -1
- package/dist/Title/components/Layout.js +1 -1
- package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.js +2 -2
- package/dist/Tokens/index.cjs +2 -2
- package/dist/Tokens/index.js +2 -2
- package/dist/TypingAnimation/TypingAnimation.cjs +1 -1
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.js +1 -1
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.cjs +1 -1
- package/dist/TypingAnimation/hooks/useGetTypographyVariant.js +1 -1
- package/dist/Typography/Typography.d.cts +4 -4
- package/dist/Typography/Typography.d.ts +4 -4
- package/dist/WelcomeMessage/components/Container.cjs +3 -3
- package/dist/WelcomeMessage/components/Container.js +3 -3
- package/dist/WidgetTextField/WidgetTextField.cjs +1 -1
- package/dist/WidgetTextField/WidgetTextField.js +1 -1
- package/dist/WidgetTextField/components/Container.cjs +3 -3
- package/dist/WidgetTextField/components/Container.js +3 -3
- package/dist/WidgetTextField/components/Icon.cjs +1 -1
- package/dist/WidgetTextField/components/Icon.js +1 -1
- package/dist/WidgetTextField/components/Skeleton.cjs +1 -1
- package/dist/WidgetTextField/components/Skeleton.js +1 -1
- package/dist/WidgetWrapper/WidgetWrapper.cjs +1 -1
- package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.js +1 -1
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/dist/styles.css +1 -1
- package/dist/utils/resolveTheme.cjs +1 -1
- package/dist/utils/resolveTheme.js +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 };
|
package/dist/Form/Form.cjs
CHANGED
|
@@ -5,9 +5,9 @@ const require_buildSubmitButtonElement = require('./utils/buildSubmitButtonEleme
|
|
|
5
5
|
const require_handleFormsSubmit = require('./utils/handleFormsSubmit.cjs');
|
|
6
6
|
const require_mapTextFields = require('./utils/mapTextFields.cjs');
|
|
7
7
|
let react = require("react");
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
8
|
let classnames = require("classnames");
|
|
10
9
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
11
|
|
|
12
12
|
//#region src/components/Form/Form.tsx
|
|
13
13
|
/**
|
package/dist/Form/Form.js
CHANGED
|
@@ -4,8 +4,8 @@ import { buildSubmitButtonElement } from "./utils/buildSubmitButtonElement.js";
|
|
|
4
4
|
import { handleFormsSubmit } from "./utils/handleFormsSubmit.js";
|
|
5
5
|
import { mapTextFields } from "./utils/mapTextFields.js";
|
|
6
6
|
import { useState } from "react";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
import classNames from "classnames";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/Form/Form.tsx
|
|
11
11
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
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
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
4
|
let classnames = require("classnames");
|
|
6
5
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
|
|
8
8
|
//#region src/components/Form/components/Layout.tsx
|
|
9
9
|
const Layout = ({ textFields, submitButton, onSubmit, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Stack } from "../../Stack/Stack.js";
|
|
2
2
|
import "../../Stack/index.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
3
|
import classNames from "classnames";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Form/components/Layout.tsx
|
|
7
7
|
const Layout = ({ textFields, submitButton, onSubmit, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_useGetButtonProperties = require('../hooks/useGetButtonProperties.cjs');
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let classnames = require("classnames");
|
|
5
4
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region src/components/Form/components/SubmitButtonItem.tsx
|
|
8
8
|
const SubmitButtonItem = ({ label, isDisabled = false, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useGetButtonProperties } from "../hooks/useGetButtonProperties.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import classNames from "classnames";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Form/components/SubmitButtonItem.tsx
|
|
6
6
|
const SubmitButtonItem = ({ label, isDisabled = false, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_useGetTextFieldProperties = require('../hooks/useGetTextFieldProperties.cjs');
|
|
3
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
3
|
let classnames = require("classnames");
|
|
5
4
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region src/components/Form/components/TextFieldItem.tsx
|
|
8
8
|
const TextFieldItem = ({ label, value, onChange, type, error, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useGetTextFieldProperties } from "../hooks/useGetTextFieldProperties.js";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
2
|
import classNames from "classnames";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Form/components/TextFieldItem.tsx
|
|
6
6
|
const TextFieldItem = ({ label, value, onChange, type, error, ariaLabel, id, testId, className, style }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_theme = require('../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
|
-
require('../Tokens/index.cjs');
|
|
4
3
|
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
4
|
+
require('../Tokens/index.cjs');
|
|
5
5
|
const require_usePromptCarouselAnalytics = require('../PromptCarousel/hooks/usePromptCarouselAnalytics.cjs');
|
|
6
6
|
const require_PromptButton_types_index = require('../PromptButton/types/index.cjs');
|
|
7
7
|
require('../PromptButton/index.cjs');
|
|
@@ -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_runtime28 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_runtime28.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FullPageSalesAgent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import "../Tokens/index.js";
|
|
3
2
|
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
3
|
+
import "../Tokens/index.js";
|
|
4
4
|
import { usePromptCarouselAnalytics } from "../PromptCarousel/hooks/usePromptCarouselAnalytics.js";
|
|
5
5
|
import { PromptButtonVariant } from "../PromptButton/types/index.js";
|
|
6
6
|
import "../PromptButton/index.js";
|
|
@@ -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
|
|
|
@@ -7,12 +7,12 @@ const require_useIsMobile = require('../hooks/useIsMobile.cjs');
|
|
|
7
7
|
const require_useGetFooterStyles = require('../hooks/useGetFooterStyles.cjs');
|
|
8
8
|
const require_useGetScrollContentStyles = require('../hooks/useGetScrollContentStyles.cjs');
|
|
9
9
|
let react = require("react");
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
10
|
let classnames = require("classnames");
|
|
12
11
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
12
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
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",
|
|
@@ -6,11 +6,11 @@ import { useIsMobile } from "../hooks/useIsMobile.js";
|
|
|
6
6
|
import { useGetFooterStyles } from "../hooks/useGetFooterStyles.js";
|
|
7
7
|
import { useGetScrollContentStyles } from "../hooks/useGetScrollContentStyles.js";
|
|
8
8
|
import { isValidElement } from "react";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import classNames from "classnames";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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.cjs
CHANGED
|
@@ -7,9 +7,9 @@ const require_useGetRoundedProperties = require('./hooks/useGetRoundedProperties
|
|
|
7
7
|
const require_useGetAccessibilityProperties = require('./hooks/useGetAccessibilityProperties.cjs');
|
|
8
8
|
const require_useGetWidthProperties = require('./hooks/useGetWidthProperties.cjs');
|
|
9
9
|
const require_useHandleImageLoading = require('./hooks/useHandleImageLoading.cjs');
|
|
10
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
10
|
let classnames = require("classnames");
|
|
12
11
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
12
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
|
|
14
14
|
//#region src/components/Image/Image.tsx
|
|
15
15
|
/**
|
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_runtime29 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_runtime29.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_runtime23 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_runtime23.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
package/dist/Image/Image.js
CHANGED
|
@@ -6,8 +6,8 @@ import { useGetRoundedProperties } from "./hooks/useGetRoundedProperties.js";
|
|
|
6
6
|
import { useGetAccessibilityProperties } from "./hooks/useGetAccessibilityProperties.js";
|
|
7
7
|
import { useGetWidthProperties } from "./hooks/useGetWidthProperties.js";
|
|
8
8
|
import { useHandleImageLoading } from "./hooks/useHandleImageLoading.js";
|
|
9
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import classNames from "classnames";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
|
|
12
12
|
//#region src/components/Image/Image.tsx
|
|
13
13
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 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_runtime18.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_runtime17 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_runtime17.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_theme = require('../../packages/components-v3/tokens/theme/theme.cjs');
|
|
3
|
-
const require_Container = require('../../Container/Container.cjs');
|
|
4
3
|
const require_useResponsiveValue = require('../../utils/useResponsiveValue.cjs');
|
|
5
|
-
const
|
|
4
|
+
const require_Container = require('../../Container/Container.cjs');
|
|
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');
|
|
9
9
|
const require_functions = require('../utils/functions.cjs');
|
|
10
10
|
const require_OverlappedLayout = require('./OverlappedLayout.cjs');
|
|
11
11
|
const require_NormalLayout = require('./NormalLayout.cjs');
|
|
12
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
12
|
let classnames = require("classnames");
|
|
14
13
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
14
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
16
|
//#region src/components/ImageGallery/components/Layout.tsx
|
|
17
17
|
const Layout = ({ id, testId, className, style, images, layout, theme = require_theme.Theme.GLOBAL_CUSTOM, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role, "aria-hidden": ariaHidden }) => {
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { Container } from "../../Container/Container.js";
|
|
3
2
|
import { useResponsiveValue } from "../../utils/useResponsiveValue.js";
|
|
3
|
+
import { Container } from "../../Container/Container.js";
|
|
4
4
|
import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
|
|
5
5
|
import { ImageGalleryLayout } from "../types/types.js";
|
|
6
6
|
import { useGetContainerProperties } from "../hooks/useGetContainerProperties.js";
|
|
@@ -8,8 +8,8 @@ import { useValidateImages } from "../hooks/useValidateImages.js";
|
|
|
8
8
|
import { getIsTwoSideStandardOnMobile } from "../utils/functions.js";
|
|
9
9
|
import { OverlappedLayout } from "./OverlappedLayout.js";
|
|
10
10
|
import { NormalLayout } from "./NormalLayout.js";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import classNames from "classnames";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
|
|
14
14
|
//#region src/components/ImageGallery/components/Layout.tsx
|
|
15
15
|
const Layout = ({ id, testId, className, style, images, layout, theme = Theme.GLOBAL_CUSTOM, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, role, "aria-hidden": ariaHidden }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_utils = require('../../DesignTokens/components/utils.cjs');
|
|
2
1
|
const require_theme = require('../../packages/components-v3/tokens/theme/theme.cjs');
|
|
2
|
+
const require_utils = require('../../DesignTokens/components/utils.cjs');
|
|
3
3
|
const require_types = require('../types/types.cjs');
|
|
4
4
|
|
|
5
5
|
//#region src/components/ImageGallery/utils/functions.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getComputedCSSVariable } from "../../DesignTokens/components/utils.js";
|
|
2
1
|
import { Theme, ThemeCSSVar } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
+
import { getComputedCSSVariable } from "../../DesignTokens/components/utils.js";
|
|
3
3
|
import { ImageGalleryLayout } from "../types/types.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ImageGallery/utils/functions.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime19 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_runtime19.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|