@envive-ai/react-toolkit-v3 0.3.15 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnimatedText/AnimatedText.d.cts +3 -3
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +3 -3
- package/dist/ChatFooter/hooks/useGetContainerProperties.cjs +1 -1
- package/dist/ChatFooter/hooks/useGetContainerProperties.js +1 -1
- package/dist/ChatHeader/ChatHeader.d.cts +2 -2
- package/dist/ChatHeader/ChatHeader.d.ts +2 -2
- package/dist/ChatHeader/components/Handle.cjs +6 -4
- package/dist/ChatHeader/components/Handle.js +6 -4
- package/dist/ChatPreview/ChatPreview.cjs +14 -5
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreview/ChatPreview.js +14 -5
- package/dist/ChatPreview/components/Message.cjs +3 -2
- package/dist/ChatPreview/components/Message.js +3 -2
- package/dist/ChatPreview/types/types.d.cts +34 -2
- package/dist/ChatPreview/types/types.d.ts +34 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.cjs +11 -4
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.js +11 -4
- package/dist/ChatPreviewComparison/components/Message.cjs +3 -2
- package/dist/ChatPreviewComparison/components/Message.js +3 -2
- package/dist/ChatPreviewComparison/types/types.d.cts +34 -1
- package/dist/ChatPreviewComparison/types/types.d.ts +34 -1
- package/dist/ChatPreviewLoading/ChatPreviewLoading.cjs +1 -1
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.js +1 -1
- package/dist/Container/Container.d.cts +180 -180
- package/dist/Container/Container.d.ts +10 -10
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/FloatingButton/FloatingButton.d.cts +2 -2
- package/dist/FloatingButton/FloatingButton.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.cjs +4 -8
- package/dist/FloatingChat/FloatingChat.d.cts +2 -2
- package/dist/FloatingChat/FloatingChat.d.ts +2 -2
- package/dist/FloatingChat/FloatingChat.js +4 -8
- package/dist/FloatingChat/components/AgentMessage.cjs +1 -2
- package/dist/FloatingChat/components/AgentMessage.js +1 -2
- package/dist/FloatingChat/components/ChatMessages.cjs +1 -2
- package/dist/FloatingChat/components/ChatMessages.js +1 -2
- package/dist/FloatingChat/components/ModalSheet.cjs +13 -3
- package/dist/FloatingChat/components/ModalSheet.js +14 -4
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +2 -3
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +2 -3
- package/dist/FloatingChat/hooks/useFilteredChatMessages.cjs +1 -1
- package/dist/FloatingChat/hooks/useFilteredChatMessages.js +1 -1
- package/dist/FloatingChat/hooks/useSnapControl.cjs +17 -16
- package/dist/FloatingChat/hooks/useSnapControl.js +17 -16
- package/dist/FloatingChat/hooks/useSnapSetup.cjs +9 -27
- package/dist/FloatingChat/hooks/useSnapSetup.js +10 -28
- package/dist/FloatingChat/snapConstants.cjs +10 -0
- package/dist/FloatingChat/snapConstants.js +7 -0
- package/dist/FullPageSalesAgent/FullPageSalesAgent.cjs +5 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.cts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.d.ts +2 -2
- package/dist/FullPageSalesAgent/FullPageSalesAgent.js +5 -2
- package/dist/FullPageSalesAgent/components/Layout.cjs +3 -1
- package/dist/FullPageSalesAgent/components/Layout.js +3 -1
- package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.cjs +2 -1
- package/dist/FullPageSalesAgent/hooks/useGetFooterStyles.js +2 -1
- package/dist/FullPageSalesAgent/hooks/useGetMessagesStyles.cjs +10 -0
- package/dist/FullPageSalesAgent/hooks/useGetMessagesStyles.js +10 -0
- package/dist/FullPageSalesAgent/hooks/useGetScrollContentStyles.cjs +4 -2
- package/dist/FullPageSalesAgent/hooks/useGetScrollContentStyles.js +4 -2
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/ImageGallery/ImageGallery.d.cts +2 -2
- package/dist/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.cjs +2 -1
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.js +2 -1
- package/dist/ProductCard/ProductCard.cjs +8 -2
- package/dist/ProductCard/ProductCard.d.cts +8 -2
- package/dist/ProductCard/ProductCard.d.ts +8 -2
- package/dist/ProductCard/ProductCard.js +8 -2
- package/dist/ProductCard/components/Carousel.cjs +9 -3
- package/dist/ProductCard/components/Carousel.js +9 -3
- package/dist/ProductCard/types/index.d.cts +34 -0
- package/dist/ProductCard/types/index.d.ts +34 -0
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.cjs +15 -21
- package/dist/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.js +15 -21
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/index.d.cts +6 -6
- package/dist/ReviewCard/components/index.d.ts +6 -6
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
- package/dist/SalesAgentProductCard/components/index.d.cts +8 -8
- package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
- package/dist/SocialProof/SocialProof.cjs +4 -4
- 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/SparkleAnimation/SparkleAnimation.d.cts +2 -2
- package/dist/SparkleAnimation/SparkleAnimation.d.ts +2 -2
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/Stack/Stack.d.ts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.cjs +8 -2
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.js +8 -2
- package/dist/TypingAnimation/types/index.d.cts +28 -0
- package/dist/TypingAnimation/types/index.d.ts +28 -0
- package/dist/Typography/Typography.d.cts +4 -4
- package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
- package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
- package/dist/WidgetTextField/components/Icon.cjs +2 -2
- package/dist/WidgetTextField/components/Icon.js +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.ts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/ChatFooter/__tests__/ChatFooter.test.tsx +3 -0
- package/src/components/ChatFooter/hooks/useGetContainerProperties.ts +1 -1
- package/src/components/ChatHeader/components/Handle.tsx +14 -4
- package/src/components/ChatPreview/ChatPreview.tsx +27 -6
- package/src/components/ChatPreview/__tests__/ChatPreview.test.tsx +16 -5
- package/src/components/ChatPreview/components/Message.tsx +3 -1
- package/src/components/ChatPreview/types/types.ts +35 -2
- package/src/components/ChatPreviewComparison/ChatPreviewComparison.tsx +23 -6
- package/src/components/ChatPreviewComparison/__tests__/ChatPreviewComparison.test.tsx +16 -5
- package/src/components/ChatPreviewComparison/components/Message.tsx +7 -1
- package/src/components/ChatPreviewComparison/types/types.ts +35 -1
- package/src/components/FloatingChat/FloatingChat.tsx +3 -9
- package/src/components/FloatingChat/components/AgentMessage.tsx +0 -3
- package/src/components/FloatingChat/components/ChatMessages.tsx +0 -3
- package/src/components/FloatingChat/components/ModalSheet.tsx +18 -10
- package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +1 -5
- package/src/components/FloatingChat/hooks/useFilteredChatMessages.ts +2 -2
- package/src/components/FloatingChat/hooks/useScrollToBottom.ts +1 -0
- package/src/components/FloatingChat/hooks/useSnapControl.ts +17 -22
- package/src/components/FloatingChat/hooks/useSnapSetup.ts +16 -37
- package/src/components/FloatingChat/snapConstants.ts +7 -0
- package/src/components/FullPageSalesAgent/FullPageSalesAgent.tsx +5 -2
- package/src/components/FullPageSalesAgent/components/Layout.tsx +3 -1
- package/src/components/FullPageSalesAgent/hooks/useGetFooterStyles.ts +7 -2
- package/src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts +11 -0
- package/src/components/FullPageSalesAgent/hooks/useGetScrollContentStyles.ts +5 -1
- package/src/components/MarkdownProcessor/MarkdownProcessor.tsx +1 -1
- package/src/components/Message/__tests__/Message.test.tsx +3 -3
- package/src/components/ProductCard/ProductCard.tsx +13 -1
- package/src/components/ProductCard/__tests__/ProductCard.test.tsx +73 -1
- package/src/components/ProductCard/components/Carousel.tsx +13 -1
- package/src/components/ProductCard/types/index.ts +34 -0
- package/src/components/PromptButtonCarouselWithImage/components/PromptButtonsCarousel.tsx +12 -9
- package/src/components/TypingAnimation/TypingAnimation.tsx +22 -7
- package/src/components/TypingAnimation/types/index.ts +29 -0
- package/src/components/WidgetTextField/components/Icon.tsx +2 -2
|
@@ -1,37 +1,23 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_useCheckIsMobile = require('../../utils/useCheckIsMobile.cjs');
|
|
3
|
+
const require_snapConstants = require('../snapConstants.cjs');
|
|
3
4
|
let react = require("react");
|
|
4
5
|
let framer_motion = require("framer-motion");
|
|
5
6
|
|
|
6
7
|
//#region src/components/FloatingChat/hooks/useSnapSetup.ts
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
const SNAPS_NO_AUTO_EXPAND = [0, 100];
|
|
9
|
+
const useSnapSetup = ({ isFloatingChatOpen }) => {
|
|
10
|
+
const maxSwipeableViewHeight = require_snapConstants.MAX_SWIPEABLE_VIEW_HEIGHT;
|
|
9
11
|
const modalSheetControl = (0, react.useRef)(null);
|
|
10
12
|
const { viewportWidth } = require_useCheckIsMobile.useCheckIsMobile();
|
|
11
13
|
const isMobile = viewportWidth !== void 0 && viewportWidth < 512;
|
|
12
14
|
const shouldAutoExpand = Boolean(isMobile && window?._spiffy?.selectedCustomizeOption);
|
|
13
|
-
const snaps =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
0,
|
|
17
|
-
43,
|
|
18
|
-
100
|
|
19
|
-
];
|
|
20
|
-
})();
|
|
21
|
-
const initialSnap = partialViewDisabled ? shouldAutoExpand ? 0 : 1 : 1;
|
|
22
|
-
const [currentSnapPercentage, setCurrentSnapPercentage] = (0, react.useState)(snaps[initialSnap] || 43);
|
|
15
|
+
const snaps = shouldAutoExpand ? [100] : SNAPS_NO_AUTO_EXPAND;
|
|
16
|
+
const initialSnap = shouldAutoExpand ? 0 : 1;
|
|
17
|
+
const [currentSnapPercentage, setCurrentSnapPercentage] = (0, react.useState)(snaps[initialSnap] ?? 100);
|
|
23
18
|
const animationKey = (0, framer_motion.useMotionValue)(0);
|
|
24
|
-
const
|
|
25
|
-
const snap100Percent = 0;
|
|
26
|
-
const mobileHeaderHeight = (0, framer_motion.useTransform)(animationKey, [snap100Percent, snap43Percent], [56, 0]);
|
|
27
|
-
const [shouldShowHeader, setShouldShowHeader] = (0, react.useState)(false);
|
|
28
|
-
(0, react.useEffect)(() => {
|
|
29
|
-
return animationKey.on("change", (value) => {
|
|
30
|
-
setShouldShowHeader(value < snap43Percent - 10);
|
|
31
|
-
});
|
|
32
|
-
}, [animationKey, snap43Percent]);
|
|
19
|
+
const mobileHeaderHeight = (0, framer_motion.useTransform)(animationKey, [0, Math.floor((typeof window !== "undefined" ? window.innerHeight : 0) * (maxSwipeableViewHeight / 100))], [56, 0]);
|
|
33
20
|
const isFullView = isMobile && currentSnapPercentage === 100;
|
|
34
|
-
const isPartialView = isMobile && currentSnapPercentage >= 0 && currentSnapPercentage <= 43;
|
|
35
21
|
const handleSnapChange = (snapPercentage) => {
|
|
36
22
|
setCurrentSnapPercentage(snapPercentage);
|
|
37
23
|
};
|
|
@@ -47,11 +33,7 @@ const useSnapSetup = ({ isFloatingChatOpen, partialViewDisabled }) => {
|
|
|
47
33
|
handleSnapChange,
|
|
48
34
|
animationKey,
|
|
49
35
|
mobileHeaderHeight,
|
|
50
|
-
|
|
51
|
-
snap100Percent,
|
|
52
|
-
shouldShowHeader,
|
|
53
|
-
isFullView,
|
|
54
|
-
isPartialView
|
|
36
|
+
isFullView
|
|
55
37
|
};
|
|
56
38
|
};
|
|
57
39
|
|
|
@@ -1,36 +1,22 @@
|
|
|
1
1
|
import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
|
|
2
|
-
import {
|
|
2
|
+
import { FULL_SNAP_INDEX, HIDDEN_SNAP_INDEX, MAX_SWIPEABLE_VIEW_HEIGHT } from "../snapConstants.js";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
3
4
|
import { useMotionValue, useTransform } from "framer-motion";
|
|
4
5
|
|
|
5
6
|
//#region src/components/FloatingChat/hooks/useSnapSetup.ts
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const SNAPS_NO_AUTO_EXPAND = [0, 100];
|
|
8
|
+
const useSnapSetup = ({ isFloatingChatOpen }) => {
|
|
9
|
+
const maxSwipeableViewHeight = MAX_SWIPEABLE_VIEW_HEIGHT;
|
|
8
10
|
const modalSheetControl = useRef(null);
|
|
9
11
|
const { viewportWidth } = useCheckIsMobile();
|
|
10
12
|
const isMobile = viewportWidth !== void 0 && viewportWidth < 512;
|
|
11
13
|
const shouldAutoExpand = Boolean(isMobile && window?._spiffy?.selectedCustomizeOption);
|
|
12
|
-
const snaps =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
0,
|
|
16
|
-
43,
|
|
17
|
-
100
|
|
18
|
-
];
|
|
19
|
-
})();
|
|
20
|
-
const initialSnap = partialViewDisabled ? shouldAutoExpand ? 0 : 1 : 1;
|
|
21
|
-
const [currentSnapPercentage, setCurrentSnapPercentage] = useState(snaps[initialSnap] || 43);
|
|
14
|
+
const snaps = shouldAutoExpand ? [100] : SNAPS_NO_AUTO_EXPAND;
|
|
15
|
+
const initialSnap = shouldAutoExpand ? 0 : 1;
|
|
16
|
+
const [currentSnapPercentage, setCurrentSnapPercentage] = useState(snaps[initialSnap] ?? 100);
|
|
22
17
|
const animationKey = useMotionValue(0);
|
|
23
|
-
const
|
|
24
|
-
const snap100Percent = 0;
|
|
25
|
-
const mobileHeaderHeight = useTransform(animationKey, [snap100Percent, snap43Percent], [56, 0]);
|
|
26
|
-
const [shouldShowHeader, setShouldShowHeader] = useState(false);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
return animationKey.on("change", (value) => {
|
|
29
|
-
setShouldShowHeader(value < snap43Percent - 10);
|
|
30
|
-
});
|
|
31
|
-
}, [animationKey, snap43Percent]);
|
|
18
|
+
const mobileHeaderHeight = useTransform(animationKey, [0, Math.floor((typeof window !== "undefined" ? window.innerHeight : 0) * (maxSwipeableViewHeight / 100))], [56, 0]);
|
|
32
19
|
const isFullView = isMobile && currentSnapPercentage === 100;
|
|
33
|
-
const isPartialView = isMobile && currentSnapPercentage >= 0 && currentSnapPercentage <= 43;
|
|
34
20
|
const handleSnapChange = (snapPercentage) => {
|
|
35
21
|
setCurrentSnapPercentage(snapPercentage);
|
|
36
22
|
};
|
|
@@ -46,11 +32,7 @@ const useSnapSetup = ({ isFloatingChatOpen, partialViewDisabled }) => {
|
|
|
46
32
|
handleSnapChange,
|
|
47
33
|
animationKey,
|
|
48
34
|
mobileHeaderHeight,
|
|
49
|
-
|
|
50
|
-
snap100Percent,
|
|
51
|
-
shouldShowHeader,
|
|
52
|
-
isFullView,
|
|
53
|
-
isPartialView
|
|
35
|
+
isFullView
|
|
54
36
|
};
|
|
55
37
|
};
|
|
56
38
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/components/FloatingChat/snapConstants.ts
|
|
3
|
+
const MAX_SWIPEABLE_VIEW_HEIGHT = 89;
|
|
4
|
+
const HIDDEN_SNAP_INDEX = 0;
|
|
5
|
+
const FULL_SNAP_INDEX = 1;
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.FULL_SNAP_INDEX = FULL_SNAP_INDEX;
|
|
9
|
+
exports.HIDDEN_SNAP_INDEX = HIDDEN_SNAP_INDEX;
|
|
10
|
+
exports.MAX_SWIPEABLE_VIEW_HEIGHT = MAX_SWIPEABLE_VIEW_HEIGHT;
|
|
@@ -20,6 +20,7 @@ require('../WelcomeMessage/index.cjs');
|
|
|
20
20
|
const require_useIsMobile = require('./hooks/useIsMobile.cjs');
|
|
21
21
|
const require_useGetFooterStyles = require('./hooks/useGetFooterStyles.cjs');
|
|
22
22
|
const require_index$1 = require('./components/index.cjs');
|
|
23
|
+
const require_useGetMessagesStyles = require('./hooks/useGetMessagesStyles.cjs');
|
|
23
24
|
let react = require("react");
|
|
24
25
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
25
26
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
@@ -34,7 +35,8 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
34
35
|
const salesAgentData = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
|
|
35
36
|
const [query, setQuery] = (0, react.useState)("");
|
|
36
37
|
const chatMessagesRef = (0, react.useRef)(null);
|
|
37
|
-
const { footerStyles } = require_useGetFooterStyles.useGetFooterStyles();
|
|
38
|
+
const { footerStyles, footerClasses } = require_useGetFooterStyles.useGetFooterStyles();
|
|
39
|
+
const { messageClasses } = require_useGetMessagesStyles.useGetMessagesStyles();
|
|
38
40
|
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
39
41
|
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
40
42
|
const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = require_usePromptCarouselAnalytics.usePromptCarouselAnalytics(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, (text) => text);
|
|
@@ -85,7 +87,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
85
87
|
theme: resolvedTheme
|
|
86
88
|
});
|
|
87
89
|
const footer = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChatFooter.ChatFooter, {
|
|
88
|
-
className:
|
|
90
|
+
className: footerClasses,
|
|
89
91
|
style: footerStyles,
|
|
90
92
|
theme: resolvedTheme,
|
|
91
93
|
isScrolled: isMobile ? isFloatingLayout : false,
|
|
@@ -115,6 +117,7 @@ const FullPageSalesAgent = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, floatin
|
|
|
115
117
|
parentWidget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
116
118
|
});
|
|
117
119
|
const chatMessages = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.FloatingChatComponents.ChatMessages, {
|
|
120
|
+
className: messageClasses,
|
|
118
121
|
theme: resolvedTheme,
|
|
119
122
|
ref: chatMessagesRef,
|
|
120
123
|
isLoading: isPendingResponse && !isResponseStreaming,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Theme } from "../tokens/theme/theme.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime22 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_runtime22.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_runtime21 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_runtime21.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { FullPageSalesAgent };
|
|
@@ -19,6 +19,7 @@ import "../WelcomeMessage/index.js";
|
|
|
19
19
|
import { useIsMobile } from "./hooks/useIsMobile.js";
|
|
20
20
|
import { useGetFooterStyles } from "./hooks/useGetFooterStyles.js";
|
|
21
21
|
import { FullPageSAComponents } from "./components/index.js";
|
|
22
|
+
import { useGetMessagesStyles } from "./hooks/useGetMessagesStyles.js";
|
|
22
23
|
import { useRef, useState } from "react";
|
|
23
24
|
import { jsx } from "react/jsx-runtime";
|
|
24
25
|
import { EnviveMetricsEventName } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
@@ -33,7 +34,8 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
33
34
|
const salesAgentData = useSalesAgent(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT);
|
|
34
35
|
const [query, setQuery] = useState("");
|
|
35
36
|
const chatMessagesRef = useRef(null);
|
|
36
|
-
const { footerStyles } = useGetFooterStyles();
|
|
37
|
+
const { footerStyles, footerClasses } = useGetFooterStyles();
|
|
38
|
+
const { messageClasses } = useGetMessagesStyles();
|
|
37
39
|
const { isMobile } = useIsMobile();
|
|
38
40
|
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
39
41
|
const { onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.FULL_PAGE_SALES_AGENT, (text) => text);
|
|
@@ -84,7 +86,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
84
86
|
theme: resolvedTheme
|
|
85
87
|
});
|
|
86
88
|
const footer = /* @__PURE__ */ jsx(ChatFooter, {
|
|
87
|
-
className:
|
|
89
|
+
className: footerClasses,
|
|
88
90
|
style: footerStyles,
|
|
89
91
|
theme: resolvedTheme,
|
|
90
92
|
isScrolled: isMobile ? isFloatingLayout : false,
|
|
@@ -114,6 +116,7 @@ const FullPageSalesAgent = ({ theme = Theme.GLOBAL_CUSTOM, floatingChatConfig, l
|
|
|
114
116
|
parentWidget: WidgetInteractionComponent.FULL_PAGE_SALES_AGENT
|
|
115
117
|
});
|
|
116
118
|
const chatMessages = /* @__PURE__ */ jsx(FloatingChatComponents.ChatMessages, {
|
|
119
|
+
className: messageClasses,
|
|
117
120
|
theme: resolvedTheme,
|
|
118
121
|
ref: chatMessagesRef,
|
|
119
122
|
isLoading: isPendingResponse && !isResponseStreaming,
|
|
@@ -3,6 +3,7 @@ const require_theme = require('../../packages/components-v3/tokens/theme/theme.c
|
|
|
3
3
|
const require_Stack = require('../../Stack/Stack.cjs');
|
|
4
4
|
require('../../Stack/index.cjs');
|
|
5
5
|
const require_useGetContainerStyles = require('../hooks/useGetContainerStyles.cjs');
|
|
6
|
+
const require_useIsMobile = require('../hooks/useIsMobile.cjs');
|
|
6
7
|
const require_useGetFooterStyles = require('../hooks/useGetFooterStyles.cjs');
|
|
7
8
|
const require_useGetScrollContentStyles = require('../hooks/useGetScrollContentStyles.cjs');
|
|
8
9
|
let react = require("react");
|
|
@@ -14,6 +15,7 @@ classnames = require_rolldown_runtime.__toESM(classnames);
|
|
|
14
15
|
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
15
16
|
const hasWelcomeMessage = (0, react.isValidElement)(welcomeMessage);
|
|
16
17
|
const hasAnswerSuggestions = (0, react.isValidElement)(answerSuggestions);
|
|
18
|
+
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
17
19
|
const { contentClasses, messageContainerClasses } = require_useGetScrollContentStyles.useGetScrollContentStyles();
|
|
18
20
|
const { footerContainerClasses } = require_useGetFooterStyles.useGetFooterStyles();
|
|
19
21
|
const { containerClasses, containerStyles } = require_useGetContainerStyles.useGetContainerStyles({
|
|
@@ -33,7 +35,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
33
35
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.Stack, {
|
|
34
36
|
direction: "column",
|
|
35
37
|
gap: "0",
|
|
36
|
-
className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", "envive-tw-pt-4"),
|
|
38
|
+
className: (0, classnames.default)((!hasWelcomeMessage || hasWelcomeMessage && theme === require_theme.Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
|
|
37
39
|
children: [chatMessages, answerSuggestions]
|
|
38
40
|
})]
|
|
39
41
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -2,6 +2,7 @@ import { Theme } from "../../packages/components-v3/tokens/theme/theme.js";
|
|
|
2
2
|
import { Stack } from "../../Stack/Stack.js";
|
|
3
3
|
import "../../Stack/index.js";
|
|
4
4
|
import { useGetContainerStyles } from "../hooks/useGetContainerStyles.js";
|
|
5
|
+
import { useIsMobile } from "../hooks/useIsMobile.js";
|
|
5
6
|
import { useGetFooterStyles } from "../hooks/useGetFooterStyles.js";
|
|
6
7
|
import { useGetScrollContentStyles } from "../hooks/useGetScrollContentStyles.js";
|
|
7
8
|
import { isValidElement } from "react";
|
|
@@ -12,6 +13,7 @@ import classNames from "classnames";
|
|
|
12
13
|
const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions, scrollToBottomButton, disclaimer, headerContainer, autoHeight }) => {
|
|
13
14
|
const hasWelcomeMessage = isValidElement(welcomeMessage);
|
|
14
15
|
const hasAnswerSuggestions = isValidElement(answerSuggestions);
|
|
16
|
+
const { isMobile } = useIsMobile();
|
|
15
17
|
const { contentClasses, messageContainerClasses } = useGetScrollContentStyles();
|
|
16
18
|
const { footerContainerClasses } = useGetFooterStyles();
|
|
17
19
|
const { containerClasses, containerStyles } = useGetContainerStyles({
|
|
@@ -31,7 +33,7 @@ const Layout = ({ theme, welcomeMessage, footer, chatMessages, answerSuggestions
|
|
|
31
33
|
}), /* @__PURE__ */ jsxs(Stack, {
|
|
32
34
|
direction: "column",
|
|
33
35
|
gap: "0",
|
|
34
|
-
className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", "envive-tw-pt-4"),
|
|
36
|
+
className: classNames((!hasWelcomeMessage || hasWelcomeMessage && theme === Theme.STANDARD) && !hasAnswerSuggestions && "envive-tw-pb-4", isMobile ? "envive-tw-pt-4" : "envive-tw-pt-6"),
|
|
35
37
|
children: [chatMessages, answerSuggestions]
|
|
36
38
|
})]
|
|
37
39
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -8,7 +8,8 @@ const useGetFooterStyles = () => {
|
|
|
8
8
|
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
|
|
9
9
|
borderWidth: "1px"
|
|
10
10
|
} : null,
|
|
11
|
-
|
|
11
|
+
footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
|
|
12
|
+
footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -8,7 +8,8 @@ const useGetFooterStyles = () => {
|
|
|
8
8
|
boxShadow: "0px 2px 10px 0px rgba(0, 0, 0, 0.2)",
|
|
9
9
|
borderWidth: "1px"
|
|
10
10
|
} : null,
|
|
11
|
-
|
|
11
|
+
footerClasses: isMobile ? "envive-tw-rounded-t-[var(--envive-global-custom-border-radius)]" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)]",
|
|
12
|
+
footerContainerClasses: isMobile ? "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-[0] envive-tw-left-[0] envive-tw-right-[0]" : "envive-tw-z-10 envive-tw-absolute envive-tw-bottom-5 envive-tw-left-[calc((100vw-768px)/2)] envive-tw-right-[calc((100vw-768px)/2)] envive-tw-max-w-[768px]"
|
|
12
13
|
};
|
|
13
14
|
};
|
|
14
15
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const require_useIsMobile = require('./useIsMobile.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts
|
|
4
|
+
const useGetMessagesStyles = () => {
|
|
5
|
+
const { isMobile } = require_useIsMobile.useIsMobile();
|
|
6
|
+
return { messageClasses: !isMobile ? "!envive-tw-gap-6" : "" };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.useGetMessagesStyles = useGetMessagesStyles;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useIsMobile } from "./useIsMobile.js";
|
|
2
|
+
|
|
3
|
+
//#region src/components/FullPageSalesAgent/hooks/useGetMessagesStyles.ts
|
|
4
|
+
const useGetMessagesStyles = () => {
|
|
5
|
+
const { isMobile } = useIsMobile();
|
|
6
|
+
return { messageClasses: !isMobile ? "!envive-tw-gap-6" : "" };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { useGetMessagesStyles };
|
|
@@ -9,9 +9,11 @@ const useGetScrollContentStyles = () => {
|
|
|
9
9
|
return {
|
|
10
10
|
contentClasses: (0, classnames.default)({
|
|
11
11
|
"envive-tw-flex-1 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-transition-all envive-tw-duration-300 envive-tw-ease-in-out": true,
|
|
12
|
-
"envive-tw-
|
|
12
|
+
"envive-tw-mb-5": !isMobile,
|
|
13
|
+
"envive-tw-pb-[131px]": isMobile,
|
|
14
|
+
"envive-tw-pb-[150px]": !isMobile
|
|
13
15
|
}),
|
|
14
|
-
messageContainerClasses: !isMobile ? "envive-tw-
|
|
16
|
+
messageContainerClasses: !isMobile ? "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mt-4 envive-tw-overflow-hidden" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mx-4 envive-tw-overflow-hidden"
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
|
|
@@ -7,9 +7,11 @@ const useGetScrollContentStyles = () => {
|
|
|
7
7
|
return {
|
|
8
8
|
contentClasses: classNames({
|
|
9
9
|
"envive-tw-flex-1 envive-tw-overflow-y-auto envive-tw-overflow-x-hidden envive-tw-transition-all envive-tw-duration-300 envive-tw-ease-in-out": true,
|
|
10
|
-
"envive-tw-
|
|
10
|
+
"envive-tw-mb-5": !isMobile,
|
|
11
|
+
"envive-tw-pb-[131px]": isMobile,
|
|
12
|
+
"envive-tw-pb-[150px]": !isMobile
|
|
11
13
|
}),
|
|
12
|
-
messageContainerClasses: !isMobile ? "envive-tw-
|
|
14
|
+
messageContainerClasses: !isMobile ? "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mt-4 envive-tw-overflow-hidden" : "envive-tw-rounded-[var(--envive-global-custom-border-radius)] envive-tw-mx-4 envive-tw-overflow-hidden"
|
|
13
15
|
};
|
|
14
16
|
};
|
|
15
17
|
|
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_runtime19 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_runtime19.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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime21 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_runtime21.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_runtime0 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_runtime0.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 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_runtime26.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { MarkdownProcessor };
|
|
@@ -11,7 +11,7 @@ let classnames = require("classnames");
|
|
|
11
11
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
12
12
|
|
|
13
13
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
14
|
-
const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onInputClick }) => {
|
|
14
|
+
const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onInputClick }) => {
|
|
15
15
|
const resolvedTheme = require_resolveTheme.resolveTheme(theme);
|
|
16
16
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_index$1.ProductCardWidgetComponents.Poster, {
|
|
17
17
|
imageSrc,
|
|
@@ -30,7 +30,13 @@ const ProductCard = ({ theme = require_theme.Theme.GLOBAL_CUSTOM, imageSrc, head
|
|
|
30
30
|
carouselId,
|
|
31
31
|
prompts,
|
|
32
32
|
promptButtonType,
|
|
33
|
-
onSelect
|
|
33
|
+
onSelect,
|
|
34
|
+
onDrag,
|
|
35
|
+
onHover,
|
|
36
|
+
onMouseDown,
|
|
37
|
+
onMouseUp,
|
|
38
|
+
onTouchStart,
|
|
39
|
+
onTouchEnd
|
|
34
40
|
}),
|
|
35
41
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_WidgetTextField.WidgetTextField, {
|
|
36
42
|
theme: resolvedTheme,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -17,7 +17,13 @@ declare const ProductCard: ({
|
|
|
17
17
|
textTransition,
|
|
18
18
|
loop,
|
|
19
19
|
onSelect,
|
|
20
|
+
onDrag,
|
|
21
|
+
onHover,
|
|
22
|
+
onMouseDown,
|
|
23
|
+
onMouseUp,
|
|
24
|
+
onTouchStart,
|
|
25
|
+
onTouchEnd,
|
|
20
26
|
onInputClick
|
|
21
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime18.JSX.Element;
|
|
22
28
|
//#endregion
|
|
23
29
|
export { ProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductCardProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ProductCard/ProductCard.d.ts
|
|
5
5
|
declare const ProductCard: ({
|
|
@@ -17,7 +17,13 @@ declare const ProductCard: ({
|
|
|
17
17
|
textTransition,
|
|
18
18
|
loop,
|
|
19
19
|
onSelect,
|
|
20
|
+
onDrag,
|
|
21
|
+
onHover,
|
|
22
|
+
onMouseDown,
|
|
23
|
+
onMouseUp,
|
|
24
|
+
onTouchStart,
|
|
25
|
+
onTouchEnd,
|
|
20
26
|
onInputClick
|
|
21
|
-
}: ProductCardProps) =>
|
|
27
|
+
}: ProductCardProps) => react_jsx_runtime26.JSX.Element;
|
|
22
28
|
//#endregion
|
|
23
29
|
export { ProductCard };
|
|
@@ -9,7 +9,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
import classNames from "classnames";
|
|
10
10
|
|
|
11
11
|
//#region src/components/ProductCard/ProductCard.tsx
|
|
12
|
-
const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onInputClick }) => {
|
|
12
|
+
const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italicizeHeadline, animatedText, prompts, promptButtonType, carouselId, fallbackColor, placeholder, textTypingDuration, textTransition, loop, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onInputClick }) => {
|
|
13
13
|
const resolvedTheme = resolveTheme(theme);
|
|
14
14
|
return /* @__PURE__ */ jsxs(ProductCardWidgetComponents.Poster, {
|
|
15
15
|
imageSrc,
|
|
@@ -28,7 +28,13 @@ const ProductCard = ({ theme = Theme.GLOBAL_CUSTOM, imageSrc, headline, italiciz
|
|
|
28
28
|
carouselId,
|
|
29
29
|
prompts,
|
|
30
30
|
promptButtonType,
|
|
31
|
-
onSelect
|
|
31
|
+
onSelect,
|
|
32
|
+
onDrag,
|
|
33
|
+
onHover,
|
|
34
|
+
onMouseDown,
|
|
35
|
+
onMouseUp,
|
|
36
|
+
onTouchStart,
|
|
37
|
+
onTouchEnd
|
|
32
38
|
}),
|
|
33
39
|
/* @__PURE__ */ jsx(WidgetTextField, {
|
|
34
40
|
theme: resolvedTheme,
|
|
@@ -7,17 +7,23 @@ const require_useGetCarouselProperties = require('../hooks/useGetCarouselPropert
|
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
|
|
9
9
|
//#region src/components/ProductCard/components/Carousel.tsx
|
|
10
|
-
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect }) => {
|
|
10
|
+
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd }) => {
|
|
11
11
|
const resolvedTheme = require_resolveTheme.resolveTheme(theme);
|
|
12
12
|
const { carouselClasses } = require_useGetCarouselProperties.useGetCarouselProperties();
|
|
13
13
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PromptCarousel.PromptCarousel, {
|
|
14
14
|
className: carouselClasses,
|
|
15
|
-
handleButtonClick: onSelect,
|
|
16
15
|
id: carouselId,
|
|
17
16
|
promptCarouselRows: require_PromptCarousel_types_types.PromptCarouselRows.ALWAYS_TWO,
|
|
18
17
|
theme: resolvedTheme,
|
|
19
18
|
promptButtonType,
|
|
20
|
-
promptButtonTexts: prompts
|
|
19
|
+
promptButtonTexts: prompts,
|
|
20
|
+
handleButtonClick: onSelect,
|
|
21
|
+
handleButtonDrag: onDrag,
|
|
22
|
+
handleButtonHover: onHover,
|
|
23
|
+
handleButtonMouseDown: onMouseDown,
|
|
24
|
+
handleButtonMouseUp: onMouseUp,
|
|
25
|
+
handleButtonTouchStart: onTouchStart,
|
|
26
|
+
handleButtonTouchEnd: onTouchEnd
|
|
21
27
|
});
|
|
22
28
|
};
|
|
23
29
|
|
|
@@ -6,17 +6,23 @@ import { useGetCarouselProperties } from "../hooks/useGetCarouselProperties.js";
|
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ProductCard/components/Carousel.tsx
|
|
9
|
-
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect }) => {
|
|
9
|
+
const Carousel = ({ theme, carouselId, prompts, promptButtonType, onSelect, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd }) => {
|
|
10
10
|
const resolvedTheme = resolveTheme(theme);
|
|
11
11
|
const { carouselClasses } = useGetCarouselProperties();
|
|
12
12
|
return /* @__PURE__ */ jsx(PromptCarousel, {
|
|
13
13
|
className: carouselClasses,
|
|
14
|
-
handleButtonClick: onSelect,
|
|
15
14
|
id: carouselId,
|
|
16
15
|
promptCarouselRows: PromptCarouselRows.ALWAYS_TWO,
|
|
17
16
|
theme: resolvedTheme,
|
|
18
17
|
promptButtonType,
|
|
19
|
-
promptButtonTexts: prompts
|
|
18
|
+
promptButtonTexts: prompts,
|
|
19
|
+
handleButtonClick: onSelect,
|
|
20
|
+
handleButtonDrag: onDrag,
|
|
21
|
+
handleButtonHover: onHover,
|
|
22
|
+
handleButtonMouseDown: onMouseDown,
|
|
23
|
+
handleButtonMouseUp: onMouseUp,
|
|
24
|
+
handleButtonTouchStart: onTouchStart,
|
|
25
|
+
handleButtonTouchEnd: onTouchEnd
|
|
20
26
|
});
|
|
21
27
|
};
|
|
22
28
|
|