@envive-ai/react-toolkit-v3 0.3.8 → 0.3.10
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.cjs +1 -0
- package/dist/AnimatedText/AnimatedText.d.cts +3 -3
- package/dist/AnimatedText/AnimatedText.js +1 -0
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
- package/dist/Carousel/Carousel.cjs +1 -1
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/Carousel/Carousel.js +1 -1
- package/dist/Carousel/components/Container.cjs +2 -2
- package/dist/Carousel/components/Container.js +2 -2
- package/dist/ChatFooter/ChatFooter.cjs +1 -1
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.js +1 -1
- package/dist/ChatFooter/components/Layout.cjs +2 -2
- package/dist/ChatFooter/components/Layout.js +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.cts +2 -2
- package/dist/ChatHeader/ChatHeader.d.ts +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/useGetCloseButtonProperties.cjs +1 -1
- package/dist/ChatHeader/hooks/useGetCloseButtonProperties.js +1 -1
- package/dist/ChatPreview/ChatPreview.cjs +14 -4
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.js +14 -4
- package/dist/ChatPreview/types/types.d.cts +5 -4
- package/dist/ChatPreview/types/types.d.ts +5 -4
- package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +14 -4
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.js +14 -4
- package/dist/ChatPreviewComparison/components/Headline.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Headline.js +2 -2
- package/dist/ChatPreviewComparison/components/Layout.cjs +4 -4
- package/dist/ChatPreviewComparison/components/Layout.js +4 -4
- package/dist/ChatPreviewComparison/components/Message.cjs +2 -2
- package/dist/ChatPreviewComparison/components/Message.js +2 -2
- package/dist/ChatPreviewComparison/types/types.d.cts +4 -4
- package/dist/ChatPreviewComparison/types/types.d.ts +4 -4
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/Container/Container.d.cts +5 -5
- package/dist/Container/Container.d.ts +176 -176
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/Disclaimer/components/Container.cjs +2 -2
- package/dist/Disclaimer/components/Container.js +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/DocumentRetrievalCard/components/Layout.cjs +2 -2
- package/dist/DocumentRetrievalCard/components/Layout.js +2 -2
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.cjs +1 -1
- package/dist/DocumentRetrievalCard/components/ViewArticleButton/components/Icon.js +1 -1
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingChat/FloatingChat.cjs +3 -2
- package/dist/FloatingChat/FloatingChat.d.cts +2 -2
- package/dist/FloatingChat/FloatingChat.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.js +3 -2
- package/dist/FloatingChat/components/AgentMessage.cjs +9 -5
- package/dist/FloatingChat/components/AgentMessage.js +9 -5
- package/dist/FloatingChat/components/ChatMessages.cjs +1 -1
- package/dist/FloatingChat/components/ChatMessages.js +1 -1
- package/dist/FloatingChat/components/Layout.cjs +13 -13
- package/dist/FloatingChat/components/Layout.js +13 -13
- package/dist/FloatingChat/components/ModalSheet.cjs +5 -6
- package/dist/FloatingChat/components/ModalSheet.js +5 -6
- package/dist/FloatingChat/components/ReviewCardsCarousel.cjs +2 -1
- package/dist/FloatingChat/components/ReviewCardsCarousel.js +2 -1
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +0 -3
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +0 -3
- 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 +1 -1
- package/dist/ImageGallery/components/Layout.js +1 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/Message/components/LinkButton.cjs +1 -1
- package/dist/Message/components/LinkButton.js +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.cjs +1 -1
- package/dist/OrderLookupCard/OrderLookupCard.js +1 -1
- package/dist/ProductCard/ProductCard.cjs +10 -6
- package/dist/ProductCard/ProductCard.d.cts +2 -2
- package/dist/ProductCard/ProductCard.d.ts +2 -2
- package/dist/ProductCard/ProductCard.js +5 -2
- package/dist/ProductCard/components/Header.cjs +2 -2
- package/dist/ProductCard/components/Header.js +2 -2
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.cjs +3 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.js +3 -2
- package/dist/PromptButtonCarouselWithImage/components/Layout.cjs +7 -2
- package/dist/PromptButtonCarouselWithImage/components/Layout.js +8 -3
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +53 -3
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +53 -3
- package/dist/PromptCarousel/PromptCarousel.cjs +71 -33
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/PromptCarousel/PromptCarousel.js +73 -35
- package/dist/PromptCarousel/hooks/index.cjs +2 -4
- package/dist/PromptCarousel/hooks/index.js +2 -4
- package/dist/PromptCarousel/hooks/useCoordinatedScrollAnimation.cjs +91 -0
- package/dist/PromptCarousel/hooks/useCoordinatedScrollAnimation.js +90 -0
- package/dist/PromptCarousel/hooks/useScrollSync.cjs +65 -0
- package/dist/PromptCarousel/hooks/useScrollSync.js +64 -0
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/Container.cjs +2 -2
- package/dist/ReviewCard/components/Container.js +2 -2
- package/dist/ReviewCard/components/ReadMoreButton.cjs +1 -1
- package/dist/ReviewCard/components/ReadMoreButton.js +1 -1
- package/dist/ReviewCard/components/index.d.cts +4 -4
- 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/Container.cjs +2 -2
- package/dist/SalesAgentProductCard/components/Container.js +2 -2
- package/dist/SalesAgentProductCard/components/index.d.cts +6 -6
- package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
- package/dist/SocialProof/SocialProof.cjs +1 -1
- 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 +3 -3
- package/dist/SocialProof/components/Headline.js +3 -3
- package/dist/SocialProof/components/LayoutFourHorizontal.cjs +1 -1
- package/dist/SocialProof/components/LayoutFourHorizontal.js +1 -1
- package/dist/SocialProof/components/Subheadline.cjs +1 -1
- package/dist/SocialProof/components/Subheadline.js +1 -1
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/TextField/utils/getIconColor.cjs +1 -1
- package/dist/TextField/utils/getIconColor.js +1 -1
- package/dist/TextField/utils/getSendIconElement.cjs +1 -1
- package/dist/TextField/utils/getSendIconElement.js +1 -1
- package/dist/TitledPromptCarousel/TitledPromptCarousel.cjs +1 -1
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.js +1 -1
- package/dist/Tokens/index.cjs +1 -1
- package/dist/Tokens/index.js +1 -1
- 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 +2 -2
- package/dist/WelcomeMessage/components/Container.js +2 -2
- package/dist/WidgetTextField/WidgetTextField.cjs +11 -6
- package/dist/WidgetTextField/WidgetTextField.d.cts +3 -2
- package/dist/WidgetTextField/WidgetTextField.d.ts +3 -2
- package/dist/WidgetTextField/WidgetTextField.js +7 -2
- package/dist/WidgetTextField/components/Container.cjs +2 -2
- package/dist/WidgetTextField/components/Container.js +2 -2
- package/dist/WidgetTextField/components/FakeTextInput.cjs +2 -2
- package/dist/WidgetTextField/components/FakeTextInput.js +2 -2
- package/dist/WidgetTextField/components/Icon.cjs +11 -9
- package/dist/WidgetTextField/components/Icon.js +11 -9
- package/dist/WidgetTextField/types/types.d.cts +3 -0
- package/dist/WidgetTextField/types/types.d.ts +3 -0
- 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/CustomIcon.cjs +1 -1
- package/dist/utils/CustomIcon.js +1 -1
- package/dist/utils/useDragToScroll.cjs +68 -0
- package/dist/utils/useDragToScroll.js +67 -0
- package/package.json +1 -1
- package/src/components/AnimatedText/AnimatedText.tsx +2 -0
- package/src/components/ChatHeader/hooks/useGetCloseButtonProperties.ts +1 -1
- package/src/components/ChatPreview/ChatPreview.tsx +20 -3
- package/src/components/ChatPreview/types/types.ts +5 -4
- package/src/components/ChatPreviewComparison/ChatPreviewComparison.tsx +20 -3
- package/src/components/ChatPreviewComparison/types/types.ts +4 -4
- package/src/components/FloatingChat/FloatingChat.tsx +3 -2
- package/src/components/FloatingChat/components/AgentMessage.tsx +1 -0
- package/src/components/FloatingChat/components/Layout.tsx +7 -2
- package/src/components/FloatingChat/components/ModalSheet.tsx +5 -7
- package/src/components/FloatingChat/components/ReviewCardsCarousel.tsx +3 -0
- package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +0 -3
- package/src/components/ProductCard/ProductCard.tsx +12 -1
- package/src/components/ProductCard/components/Header.tsx +10 -8
- package/src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.tsx +6 -3
- package/src/components/PromptButtonCarouselWithImage/components/Layout.tsx +13 -4
- package/src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx +63 -20
- package/src/components/PromptCarousel/PromptCarousel.tsx +89 -51
- package/src/components/PromptCarousel/hooks/index.ts +2 -4
- package/src/components/PromptCarousel/hooks/useCoordinatedScrollAnimation.ts +115 -0
- package/src/components/PromptCarousel/hooks/useHorizontalScrollAnimation.ts +71 -78
- package/src/components/PromptCarousel/hooks/useScrollSync.ts +83 -0
- package/src/components/TextField/utils/getIconColor.ts +1 -1
- package/src/components/TextField/utils/getSendIconElement.tsx +3 -1
- package/src/components/WidgetTextField/WidgetTextField.tsx +9 -1
- package/src/components/WidgetTextField/components/FakeTextInput.tsx +6 -2
- package/src/components/WidgetTextField/components/Icon.tsx +44 -9
- package/src/components/WidgetTextField/types/types.ts +3 -0
- package/src/components/utils/CustomIcon.tsx +1 -1
- package/src/components/utils/useDragToScroll.ts +83 -0
- package/dist/PromptCarousel/components/BlockScrollContainer.cjs +0 -23
- package/dist/PromptCarousel/components/BlockScrollContainer.js +0 -21
- package/dist/PromptCarousel/components/ButtonContainerRow.cjs +0 -34
- package/dist/PromptCarousel/components/ButtonContainerRow.js +0 -32
- package/dist/PromptCarousel/components/CarouselContentWithBlockScroll.cjs +0 -45
- package/dist/PromptCarousel/components/CarouselContentWithBlockScroll.js +0 -44
- package/dist/PromptCarousel/components/CarouselContentWithRowScroll.cjs +0 -33
- package/dist/PromptCarousel/components/CarouselContentWithRowScroll.js +0 -32
- package/dist/PromptCarousel/components/index.cjs +0 -13
- package/dist/PromptCarousel/components/index.js +0 -13
- package/dist/PromptCarousel/hooks/useButtonScrollPosition.cjs +0 -79
- package/dist/PromptCarousel/hooks/useButtonScrollPosition.js +0 -78
- package/dist/PromptCarousel/hooks/useCarouselAnimation.cjs +0 -23
- package/dist/PromptCarousel/hooks/useCarouselAnimation.js +0 -22
- package/dist/PromptCarousel/hooks/useCarouselRefs.cjs +0 -20
- package/dist/PromptCarousel/hooks/useCarouselRefs.js +0 -19
- package/dist/PromptCarousel/hooks/useGetScrollProperties.cjs +0 -18
- package/dist/PromptCarousel/hooks/useGetScrollProperties.js +0 -17
- package/dist/PromptCarousel/hooks/useHorizontalScrollAnimation.cjs +0 -78
- package/dist/PromptCarousel/hooks/useHorizontalScrollAnimation.js +0 -77
- package/src/components/PromptCarousel/components/BlockScrollContainer.tsx +0 -34
- package/src/components/PromptCarousel/components/ButtonContainerRow.tsx +0 -46
- package/src/components/PromptCarousel/components/CarouselContentWithBlockScroll.tsx +0 -83
- package/src/components/PromptCarousel/components/CarouselContentWithRowScroll.tsx +0 -71
- package/src/components/PromptCarousel/components/index.ts +0 -9
- package/src/components/PromptCarousel/hooks/useButtonScrollPosition.ts +0 -128
- package/src/components/PromptCarousel/hooks/useCarouselAnimation.ts +0 -47
- package/src/components/PromptCarousel/hooks/useCarouselRefs.ts +0 -27
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AnimatedTextProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react184 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/AnimatedText/AnimatedText.d.ts
|
|
5
|
-
declare const AnimatedText:
|
|
5
|
+
declare const AnimatedText: react184.MemoExoticComponent<({
|
|
6
6
|
sequence,
|
|
7
7
|
typingDuration,
|
|
8
8
|
transition,
|
|
9
9
|
loop,
|
|
10
10
|
getNodeWrapper
|
|
11
|
-
}: AnimatedTextProps) =>
|
|
11
|
+
}: AnimatedTextProps) => react184.ReactNode>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { AnimatedText };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/CSSVariablesEditor/CssVariablesEditorComponent.d.ts
|
|
4
4
|
declare const CssVariablesEditorComponent: ({
|
|
5
5
|
selectedMerchantName
|
|
6
6
|
}: {
|
|
7
7
|
selectedMerchantName: string;
|
|
8
|
-
}) =>
|
|
8
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CssVariablesEditorComponent };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/CSSVariablesEditor/CssVariablesEditorComponent.d.ts
|
|
4
4
|
declare const CssVariablesEditorComponent: ({
|
|
5
5
|
selectedMerchantName
|
|
6
6
|
}: {
|
|
7
7
|
selectedMerchantName: string;
|
|
8
|
-
}) =>
|
|
8
|
+
}) => react_jsx_runtime29.JSX.Element;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { CssVariablesEditorComponent };
|
|
@@ -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
|
-
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
4
3
|
const require_index = require('./components/index.cjs');
|
|
4
|
+
const require_resolveTheme = require('../utils/resolveTheme.cjs');
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region src/components/Carousel/Carousel.tsx
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CarouselProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Carousel/Carousel.d.ts
|
|
5
5
|
declare const Carousel: ({
|
|
@@ -11,6 +11,6 @@ declare const Carousel: ({
|
|
|
11
11
|
badgeLabel,
|
|
12
12
|
theme,
|
|
13
13
|
hideNavigation
|
|
14
|
-
}: CarouselProps) =>
|
|
14
|
+
}: CarouselProps) => react_jsx_runtime26.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Carousel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CarouselProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Carousel/Carousel.d.ts
|
|
5
5
|
declare const Carousel: ({
|
|
@@ -11,6 +11,6 @@ declare const Carousel: ({
|
|
|
11
11
|
badgeLabel,
|
|
12
12
|
theme,
|
|
13
13
|
hideNavigation
|
|
14
|
-
}: CarouselProps) =>
|
|
14
|
+
}: CarouselProps) => react_jsx_runtime30.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { Carousel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
3
2
|
import { CarouselComponents } from "./components/index.js";
|
|
3
|
+
import { resolveTheme } from "../utils/resolveTheme.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/components/Carousel/Carousel.tsx
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_Container = require('../../Container/Container.cjs');
|
|
3
|
-
require('../../Container/index.cjs');
|
|
4
2
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
5
3
|
require('../../Stack/index.cjs');
|
|
4
|
+
const require_Container = require('../../Container/Container.cjs');
|
|
5
|
+
require('../../Container/index.cjs');
|
|
6
6
|
const require_useCarouselItems = require('../hooks/useCarouselItems.cjs');
|
|
7
7
|
const require_useCarouselNavigation = require('../hooks/useCarouselNavigation.cjs');
|
|
8
8
|
const require_useCarouselNavigationButtons = require('../hooks/useCarouselNavigationButtons.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Container } from "../../Container/Container.js";
|
|
2
|
-
import "../../Container/index.js";
|
|
3
1
|
import { Stack } from "../../Stack/Stack.js";
|
|
4
2
|
import "../../Stack/index.js";
|
|
3
|
+
import { Container } from "../../Container/Container.js";
|
|
4
|
+
import "../../Container/index.js";
|
|
5
5
|
import { useCarouselItems } from "../hooks/useCarouselItems.js";
|
|
6
6
|
import { useCarouselNavigation } from "../hooks/useCarouselNavigation.js";
|
|
7
7
|
import { useCarouselNavigationButtons } from "../hooks/useCarouselNavigationButtons.js";
|
|
@@ -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_useGetChatScrollProperties = require('./hooks/useGetChatScrollProperties.cjs');
|
|
6
6
|
const require_index = require('./components/index.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatFooterProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime29 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatFooter/ChatFooter.d.ts
|
|
5
5
|
declare const ChatFooter: ({
|
|
@@ -18,6 +18,6 @@ declare const ChatFooter: ({
|
|
|
18
18
|
disabled,
|
|
19
19
|
isLoadingPromptSuggestions,
|
|
20
20
|
disabledInput
|
|
21
|
-
}: ChatFooterProps) =>
|
|
21
|
+
}: ChatFooterProps) => react_jsx_runtime29.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { ChatFooter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatFooterProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime34 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatFooter/ChatFooter.d.ts
|
|
5
5
|
declare const ChatFooter: ({
|
|
@@ -18,6 +18,6 @@ declare const ChatFooter: ({
|
|
|
18
18
|
disabled,
|
|
19
19
|
isLoadingPromptSuggestions,
|
|
20
20
|
disabledInput
|
|
21
|
-
}: ChatFooterProps) =>
|
|
21
|
+
}: ChatFooterProps) => react_jsx_runtime34.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { ChatFooter };
|
|
@@ -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 { useGetChatScrollProperties } from "./hooks/useGetChatScrollProperties.js";
|
|
5
5
|
import { ChatFooterComponents } from "./components/index.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_Container = require('../../Container/Container.cjs');
|
|
3
|
-
require('../../Container/index.cjs');
|
|
4
2
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
5
3
|
require('../../Stack/index.cjs');
|
|
4
|
+
const require_Container = require('../../Container/Container.cjs');
|
|
5
|
+
require('../../Container/index.cjs');
|
|
6
6
|
const require_useGetContainerProperties = require('../hooks/useGetContainerProperties.cjs');
|
|
7
7
|
const require_useGetButtonScrollProperties = require('../hooks/useGetButtonScrollProperties.cjs');
|
|
8
8
|
const require_useGetChatScrollProperties = require('../hooks/useGetChatScrollProperties.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Container } from "../../Container/Container.js";
|
|
2
|
-
import "../../Container/index.js";
|
|
3
1
|
import { Stack } from "../../Stack/Stack.js";
|
|
4
2
|
import "../../Stack/index.js";
|
|
3
|
+
import { Container } from "../../Container/Container.js";
|
|
4
|
+
import "../../Container/index.js";
|
|
5
5
|
import { useGetContainerProperties } from "../hooks/useGetContainerProperties.js";
|
|
6
6
|
import { useGetButtonScrollProperties } from "../hooks/useGetButtonScrollProperties.js";
|
|
7
7
|
import { useGetChatScrollProperties } from "../hooks/useGetChatScrollProperties.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutProps } from "./Layout.cjs";
|
|
2
2
|
import { PromptSuggestionsProps } from "./PromptSuggestions.cjs";
|
|
3
3
|
import { TextFieldProps } from "../../TextField/types/index.cjs";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as react181 from "react";
|
|
5
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/ChatFooter/components/index.d.ts
|
|
8
8
|
declare const ChatFooterComponents: {
|
|
@@ -17,13 +17,13 @@ declare const ChatFooterComponents: {
|
|
|
17
17
|
testId,
|
|
18
18
|
className,
|
|
19
19
|
style
|
|
20
|
-
}: LayoutProps) =>
|
|
20
|
+
}: LayoutProps) => react_jsx_runtime27.JSX.Element;
|
|
21
21
|
EnviveLogo: ({
|
|
22
22
|
style
|
|
23
23
|
}: {
|
|
24
24
|
className?: string;
|
|
25
25
|
style?: React.CSSProperties;
|
|
26
|
-
}) =>
|
|
26
|
+
}) => react181.ReactElement<react181.SVGProps<SVGSVGElement>, string | react181.JSXElementConstructor<any>>;
|
|
27
27
|
PromptSuggestions: ({
|
|
28
28
|
theme,
|
|
29
29
|
suggestions,
|
|
@@ -31,7 +31,7 @@ declare const ChatFooterComponents: {
|
|
|
31
31
|
className,
|
|
32
32
|
style,
|
|
33
33
|
disabled
|
|
34
|
-
}: PromptSuggestionsProps) =>
|
|
34
|
+
}: PromptSuggestionsProps) => react_jsx_runtime27.JSX.Element;
|
|
35
35
|
TextField: ({
|
|
36
36
|
theme,
|
|
37
37
|
placeholder,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LayoutProps } from "./Layout.js";
|
|
2
2
|
import { PromptSuggestionsProps } from "./PromptSuggestions.js";
|
|
3
3
|
import { TextFieldProps } from "../../TextField/types/index.js";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
4
|
+
import * as react183 from "react";
|
|
5
|
+
import * as react_jsx_runtime32 from "react/jsx-runtime";
|
|
6
6
|
|
|
7
7
|
//#region src/components/ChatFooter/components/index.d.ts
|
|
8
8
|
declare const ChatFooterComponents: {
|
|
@@ -17,13 +17,13 @@ declare const ChatFooterComponents: {
|
|
|
17
17
|
testId,
|
|
18
18
|
className,
|
|
19
19
|
style
|
|
20
|
-
}: LayoutProps) =>
|
|
20
|
+
}: LayoutProps) => react_jsx_runtime32.JSX.Element;
|
|
21
21
|
EnviveLogo: ({
|
|
22
22
|
style
|
|
23
23
|
}: {
|
|
24
24
|
className?: string;
|
|
25
25
|
style?: React.CSSProperties;
|
|
26
|
-
}) =>
|
|
26
|
+
}) => react183.ReactElement<react183.SVGProps<SVGSVGElement>, string | react183.JSXElementConstructor<any>>;
|
|
27
27
|
PromptSuggestions: ({
|
|
28
28
|
theme,
|
|
29
29
|
suggestions,
|
|
@@ -31,7 +31,7 @@ declare const ChatFooterComponents: {
|
|
|
31
31
|
className,
|
|
32
32
|
style,
|
|
33
33
|
disabled
|
|
34
|
-
}: PromptSuggestionsProps) =>
|
|
34
|
+
}: PromptSuggestionsProps) => react_jsx_runtime32.JSX.Element;
|
|
35
35
|
TextField: ({
|
|
36
36
|
theme,
|
|
37
37
|
placeholder,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatHeaderProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime32 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatHeader/ChatHeader.d.ts
|
|
5
5
|
declare const ChatHeader: ({
|
|
@@ -21,6 +21,6 @@ declare const ChatHeader: ({
|
|
|
21
21
|
headerBgColor,
|
|
22
22
|
onClose,
|
|
23
23
|
onToggle
|
|
24
|
-
}: ChatHeaderProps) =>
|
|
24
|
+
}: ChatHeaderProps) => react_jsx_runtime32.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ChatHeader };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatHeaderProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime24 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatHeader/ChatHeader.d.ts
|
|
5
5
|
declare const ChatHeader: ({
|
|
@@ -21,6 +21,6 @@ declare const ChatHeader: ({
|
|
|
21
21
|
headerBgColor,
|
|
22
22
|
onClose,
|
|
23
23
|
onToggle
|
|
24
|
-
}: ChatHeaderProps) =>
|
|
24
|
+
}: ChatHeaderProps) => react_jsx_runtime24.JSX.Element;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { ChatHeader };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_Container = require('../../Container/Container.cjs');
|
|
3
|
-
require('../../Container/index.cjs');
|
|
4
2
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
5
3
|
require('../../Stack/index.cjs');
|
|
4
|
+
const require_Container = require('../../Container/Container.cjs');
|
|
5
|
+
require('../../Container/index.cjs');
|
|
6
6
|
const require_useGetHandleProperties = require('../hooks/useGetHandleProperties.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let framer_motion = require("framer-motion");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Container } from "../../Container/Container.js";
|
|
2
|
-
import "../../Container/index.js";
|
|
3
1
|
import { Stack } from "../../Stack/Stack.js";
|
|
4
2
|
import "../../Stack/index.js";
|
|
3
|
+
import { Container } from "../../Container/Container.js";
|
|
4
|
+
import "../../Container/index.js";
|
|
5
5
|
import { useGetHandleProperties } from "../hooks/useGetHandleProperties.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { motion, useMotionValue, useTransform } from "framer-motion";
|
|
@@ -1,10 +1,10 @@
|
|
|
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_resolveTheme = require('../../utils/resolveTheme.cjs');
|
|
4
|
-
const require_Container = require('../../Container/Container.cjs');
|
|
5
|
-
require('../../Container/index.cjs');
|
|
6
3
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
7
4
|
require('../../Stack/index.cjs');
|
|
5
|
+
const require_Container = require('../../Container/Container.cjs');
|
|
6
|
+
require('../../Container/index.cjs');
|
|
7
|
+
const require_resolveTheme = require('../../utils/resolveTheme.cjs');
|
|
8
8
|
const require_index = require('../types/index.cjs');
|
|
9
9
|
const require_useGetToggleProperties = require('../hooks/useGetToggleProperties.cjs');
|
|
10
10
|
const require_ToggleItem = require('./ToggleItem.cjs');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
|
-
import { resolveTheme } from "../../utils/resolveTheme.js";
|
|
3
|
-
import { Container } from "../../Container/Container.js";
|
|
4
|
-
import "../../Container/index.js";
|
|
5
2
|
import { Stack } from "../../Stack/Stack.js";
|
|
6
3
|
import "../../Stack/index.js";
|
|
4
|
+
import { Container } from "../../Container/Container.js";
|
|
5
|
+
import "../../Container/index.js";
|
|
6
|
+
import { resolveTheme } from "../../utils/resolveTheme.js";
|
|
7
7
|
import { ChatHeaderOptions } from "../types/index.js";
|
|
8
8
|
import { useGetToggleProperties } from "../hooks/useGetToggleProperties.js";
|
|
9
9
|
import { ToggleItem } from "./ToggleItem.js";
|
|
@@ -19,7 +19,7 @@ const iconClassMap = {
|
|
|
19
19
|
};
|
|
20
20
|
const useGetCloseButtonProperties = (theme, variant) => {
|
|
21
21
|
return {
|
|
22
|
-
closeButtonClasses: "envive-tw-
|
|
22
|
+
closeButtonClasses: "envive-tw-justify-end",
|
|
23
23
|
iconClasses: (0, classnames.default)("envive-tw-h-4 envive-tw-w-4 envive-tw-cursor-pointer", iconClassMap[theme][variant])
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -17,7 +17,7 @@ const iconClassMap = {
|
|
|
17
17
|
};
|
|
18
18
|
const useGetCloseButtonProperties = (theme, variant) => {
|
|
19
19
|
return {
|
|
20
|
-
closeButtonClasses: "envive-tw-
|
|
20
|
+
closeButtonClasses: "envive-tw-justify-end",
|
|
21
21
|
iconClasses: classNames("envive-tw-h-4 envive-tw-w-4 envive-tw-cursor-pointer", iconClassMap[theme][variant])
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -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_PromptButton_types_index = require('../PromptButton/types/index.cjs');
|
|
6
6
|
require('../PromptButton/index.cjs');
|
|
7
7
|
const require_PromptCarousel_types_types = require('../PromptCarousel/types/types.cjs');
|
|
@@ -12,26 +12,36 @@ const require_index = require('./components/index.cjs');
|
|
|
12
12
|
const require_WidgetTextField = require('../WidgetTextField/WidgetTextField.cjs');
|
|
13
13
|
require('../WidgetTextField/index.cjs');
|
|
14
14
|
const require_WidgetWrapperWithTitle = require('../WidgetWrapperWithTitle/WidgetWrapperWithTitle.cjs');
|
|
15
|
+
let react = require("react");
|
|
15
16
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
17
|
|
|
17
18
|
//#region src/components/ChatPreview/ChatPreview.tsx
|
|
18
19
|
const ChatPreview = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
|
|
19
20
|
const { id, testId, className, style } = baseProps ?? {};
|
|
20
21
|
const { theme = require_theme.Theme.GLOBAL_CUSTOM, variant = require_types.WidgetWrapperVariant.CARD_WITH_BORDER, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
|
|
21
|
-
const { messageText,
|
|
22
|
+
const { messageText, promptButtons, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
|
|
22
23
|
const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
|
|
24
|
+
const suggestionTextMap = (0, react.useMemo)(() => {
|
|
25
|
+
return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
|
|
26
|
+
}, [promptButtons]);
|
|
27
|
+
const promptButtonTexts = (0, react.useMemo)(() => {
|
|
28
|
+
return Object.keys(suggestionTextMap);
|
|
29
|
+
}, [suggestionTextMap]);
|
|
30
|
+
const handleSuggestionButtonClick = (0, react.useCallback)((text) => {
|
|
31
|
+
handlePromptButtonClick?.(suggestionTextMap[text]);
|
|
32
|
+
}, [handlePromptButtonClick, suggestionTextMap]);
|
|
23
33
|
const finalTheme = require_resolveTheme.resolveTheme(theme);
|
|
24
34
|
const message = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.ChatPreviewComponents.Message, { messageText: messageText ?? "" });
|
|
25
35
|
const promptCarousel = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
|
|
26
36
|
promptButtonTexts: promptButtonTexts ?? [],
|
|
27
37
|
promptButtonType: require_PromptButton_types_index.PromptButtonVariant.SUGGESTED_RESPONSE,
|
|
28
38
|
promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_ONE,
|
|
29
|
-
handleButtonClick:
|
|
39
|
+
handleButtonClick: handleSuggestionButtonClick
|
|
30
40
|
});
|
|
31
41
|
const widgetTextField = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetTextField.WidgetTextField, {
|
|
32
42
|
theme: finalTheme,
|
|
33
43
|
placeholder: textFieldPlaceholderText ?? "",
|
|
34
|
-
onClick: () => handleTextFieldClick?.(
|
|
44
|
+
onClick: () => handleTextFieldClick?.()
|
|
35
45
|
});
|
|
36
46
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetWrapperWithTitle.WidgetWrapperWithTitle, {
|
|
37
47
|
id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatPreviewProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatPreview/ChatPreview.d.ts
|
|
5
5
|
declare const ChatPreview: ({
|
|
@@ -7,6 +7,6 @@ declare const ChatPreview: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: ChatPreviewProps) =>
|
|
10
|
+
}: ChatPreviewProps) => react_jsx_runtime30.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ChatPreview };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChatPreviewProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ChatPreview/ChatPreview.d.ts
|
|
5
5
|
declare const ChatPreview: ({
|
|
@@ -7,6 +7,6 @@ declare const ChatPreview: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: ChatPreviewProps) =>
|
|
10
|
+
}: ChatPreviewProps) => react_jsx_runtime25.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ChatPreview };
|
|
@@ -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 { PromptButtonVariant } from "../PromptButton/types/index.js";
|
|
5
5
|
import "../PromptButton/index.js";
|
|
6
6
|
import { PromptCarouselRows } from "../PromptCarousel/types/types.js";
|
|
@@ -11,26 +11,36 @@ import { ChatPreviewComponents } from "./components/index.js";
|
|
|
11
11
|
import { WidgetTextField } from "../WidgetTextField/WidgetTextField.js";
|
|
12
12
|
import "../WidgetTextField/index.js";
|
|
13
13
|
import { WidgetWrapperWithTitle } from "../WidgetWrapperWithTitle/WidgetWrapperWithTitle.js";
|
|
14
|
+
import { useCallback, useMemo } from "react";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
15
16
|
|
|
16
17
|
//#region src/components/ChatPreview/ChatPreview.tsx
|
|
17
18
|
const ChatPreview = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
|
|
18
19
|
const { id, testId, className, style } = baseProps ?? {};
|
|
19
20
|
const { theme = Theme.GLOBAL_CUSTOM, variant = WidgetWrapperVariant.CARD_WITH_BORDER, hideTextField, hideLogo, hexCardColor } = widgetStyleProps ?? {};
|
|
20
|
-
const { messageText,
|
|
21
|
+
const { messageText, promptButtons, textFieldPlaceholderText, logoSrc, titleLabel } = widgetContentProps ?? {};
|
|
21
22
|
const { handlePromptButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
|
|
23
|
+
const suggestionTextMap = useMemo(() => {
|
|
24
|
+
return Object.fromEntries(promptButtons?.map((suggestion) => [suggestion.content, suggestion]) ?? []);
|
|
25
|
+
}, [promptButtons]);
|
|
26
|
+
const promptButtonTexts = useMemo(() => {
|
|
27
|
+
return Object.keys(suggestionTextMap);
|
|
28
|
+
}, [suggestionTextMap]);
|
|
29
|
+
const handleSuggestionButtonClick = useCallback((text) => {
|
|
30
|
+
handlePromptButtonClick?.(suggestionTextMap[text]);
|
|
31
|
+
}, [handlePromptButtonClick, suggestionTextMap]);
|
|
22
32
|
const finalTheme = resolveTheme(theme);
|
|
23
33
|
const message = /* @__PURE__ */ jsx(ChatPreviewComponents.Message, { messageText: messageText ?? "" });
|
|
24
34
|
const promptCarousel = /* @__PURE__ */ jsx(PromptCarousel, {
|
|
25
35
|
promptButtonTexts: promptButtonTexts ?? [],
|
|
26
36
|
promptButtonType: PromptButtonVariant.SUGGESTED_RESPONSE,
|
|
27
37
|
promptCarouselRows: PromptCarouselRows.ALWAYS_ONE,
|
|
28
|
-
handleButtonClick:
|
|
38
|
+
handleButtonClick: handleSuggestionButtonClick
|
|
29
39
|
});
|
|
30
40
|
const widgetTextField = /* @__PURE__ */ jsx(WidgetTextField, {
|
|
31
41
|
theme: finalTheme,
|
|
32
42
|
placeholder: textFieldPlaceholderText ?? "",
|
|
33
|
-
onClick: () => handleTextFieldClick?.(
|
|
43
|
+
onClick: () => handleTextFieldClick?.()
|
|
34
44
|
});
|
|
35
45
|
return /* @__PURE__ */ jsx(WidgetWrapperWithTitle, {
|
|
36
46
|
id,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../../tokens/theme/theme.cjs";
|
|
2
2
|
import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.cjs";
|
|
3
|
+
import { Suggestion } from "@envive-ai/react-hooks/application/models";
|
|
3
4
|
|
|
4
5
|
//#region src/components/ChatPreview/types/types.d.ts
|
|
5
6
|
|
|
@@ -46,9 +47,9 @@ type WidgetContentProps = {
|
|
|
46
47
|
*/
|
|
47
48
|
messageText?: string;
|
|
48
49
|
/**
|
|
49
|
-
* Array of
|
|
50
|
+
* Array of Suggestions for the prompt buttons.
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
promptButtons?: Suggestion[];
|
|
52
53
|
/**
|
|
53
54
|
* Placeholder text for the text field input.
|
|
54
55
|
* Displayed when the text field is visible.
|
|
@@ -110,13 +111,13 @@ type WidgetEventProps = {
|
|
|
110
111
|
*
|
|
111
112
|
* @param text - The text label of the clicked prompt button
|
|
112
113
|
*/
|
|
113
|
-
handlePromptButtonClick?: (
|
|
114
|
+
handlePromptButtonClick?: (suggestion: Suggestion) => void;
|
|
114
115
|
/**
|
|
115
116
|
* Callback function invoked when the text field is clicked.
|
|
116
117
|
*
|
|
117
118
|
* @param text - The placeholder text of the text field
|
|
118
119
|
*/
|
|
119
|
-
handleTextFieldClick?: (
|
|
120
|
+
handleTextFieldClick?: () => void;
|
|
120
121
|
};
|
|
121
122
|
/**
|
|
122
123
|
* Props for the ChatPreviewComparison component.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
2
2
|
import { WidgetWrapperVariant } from "../../WidgetWrapper/types/types.js";
|
|
3
|
+
import { Suggestion } from "@envive-ai/react-hooks/application/models";
|
|
3
4
|
|
|
4
5
|
//#region src/components/ChatPreview/types/types.d.ts
|
|
5
6
|
|
|
@@ -46,9 +47,9 @@ type WidgetContentProps = {
|
|
|
46
47
|
*/
|
|
47
48
|
messageText?: string;
|
|
48
49
|
/**
|
|
49
|
-
* Array of
|
|
50
|
+
* Array of Suggestions for the prompt buttons.
|
|
50
51
|
*/
|
|
51
|
-
|
|
52
|
+
promptButtons?: Suggestion[];
|
|
52
53
|
/**
|
|
53
54
|
* Placeholder text for the text field input.
|
|
54
55
|
* Displayed when the text field is visible.
|
|
@@ -110,13 +111,13 @@ type WidgetEventProps = {
|
|
|
110
111
|
*
|
|
111
112
|
* @param text - The text label of the clicked prompt button
|
|
112
113
|
*/
|
|
113
|
-
handlePromptButtonClick?: (
|
|
114
|
+
handlePromptButtonClick?: (suggestion: Suggestion) => void;
|
|
114
115
|
/**
|
|
115
116
|
* Callback function invoked when the text field is clicked.
|
|
116
117
|
*
|
|
117
118
|
* @param text - The placeholder text of the text field
|
|
118
119
|
*/
|
|
119
|
-
handleTextFieldClick?: (
|
|
120
|
+
handleTextFieldClick?: () => void;
|
|
120
121
|
};
|
|
121
122
|
/**
|
|
122
123
|
* Props for the ChatPreviewComparison component.
|