@envive-ai/react-widgets-v3 0.3.7 → 0.3.9
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/CXIntegration/hooks/useUnifiedCXButton.cjs +3 -2
- package/dist/CXIntegration/hooks/useUnifiedCXButton.js +4 -3
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +6 -13
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +6 -13
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +7 -13
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +7 -13
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +5 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +5 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +6 -5
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +7 -6
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +90 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +14 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +14 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +89 -0
- package/dist/widgets/ProductCardWidget/index.cjs +3 -0
- package/dist/widgets/ProductCardWidget/index.d.cts +2 -0
- package/dist/widgets/ProductCardWidget/index.d.ts +2 -0
- package/dist/widgets/ProductCardWidget/index.js +3 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +14 -2
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +16 -4
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +1 -1
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +1 -1
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +2 -1
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +4 -3
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +1 -1
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +1 -1
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.ts +2 -2
- package/package.json +5 -1
- package/src/CXIntegration/hooks/useUnifiedCXButton.ts +4 -3
- package/src/stories/ProductCardWidget.stories.tsx +58 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +24 -8
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +10 -11
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +11 -12
- package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +2 -3
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +24 -18
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +112 -0
- package/src/widgets/ProductCardWidget/index.ts +2 -0
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +32 -4
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +1 -1
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +4 -6
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
|
+
require('../../hocs/withBaseWidget/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
8
|
+
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
9
|
+
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
10
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
11
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
12
|
+
let __envive_ai_react_toolkit_v3_PromptButton_types = require("@envive-ai/react-toolkit-v3/PromptButton/types");
|
|
13
|
+
let __envive_ai_react_toolkit_v3_ProductCard = require("@envive-ai/react-toolkit-v3/ProductCard");
|
|
14
|
+
|
|
15
|
+
//#region src/widgets/ProductCardWidget/ProductCardWidget.tsx
|
|
16
|
+
const mockPrompts = [
|
|
17
|
+
"Loading prompt 1",
|
|
18
|
+
"Loading prompt 2",
|
|
19
|
+
"Loading prompt 3",
|
|
20
|
+
"Loading prompt 4",
|
|
21
|
+
"Loading prompt 5"
|
|
22
|
+
];
|
|
23
|
+
const mockHeadline = "Loading...";
|
|
24
|
+
const mockAnimatedText = ["Loading..."];
|
|
25
|
+
const ProductCardWidgetHandler = (props) => {
|
|
26
|
+
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
27
|
+
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
28
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
29
|
+
const hardCopyHeadline = hardcopyContent?.values?.headline;
|
|
30
|
+
const headline = isLoading ? mockHeadline : hardCopyHeadline || "";
|
|
31
|
+
const hardCopyAnimatedText = hardcopyContent?.values?.animatedText || [];
|
|
32
|
+
const animatedText = isLoading ? mockAnimatedText : hardCopyAnimatedText;
|
|
33
|
+
const hardCopyPrompts = hardcopyContent?.values?.prompts || [];
|
|
34
|
+
const prompts = isLoading ? mockPrompts : hardCopyPrompts;
|
|
35
|
+
const placeholder = hardcopyContent?.values?.placeholder;
|
|
36
|
+
const productCardWidgetConfig = widgetConfig;
|
|
37
|
+
const carouselId = productCardWidgetConfig?.contentId || "";
|
|
38
|
+
const promptButtonType = productCardWidgetConfig?.promptButtonType || __envive_ai_react_toolkit_v3_PromptButton_types.PromptButtonVariant.LIGHT;
|
|
39
|
+
const italicizeHeadline = productCardWidgetConfig?.italicizeHeadline;
|
|
40
|
+
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
41
|
+
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
42
|
+
const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
|
|
43
|
+
const { widgetConfigId } = props;
|
|
44
|
+
(0, react.useEffect)(() => {
|
|
45
|
+
trackEvent({
|
|
46
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.SpiffyMetricsEventName.ChatComponentVisible,
|
|
47
|
+
eventProps: {
|
|
48
|
+
widget_config_id: widgetConfigId,
|
|
49
|
+
widget_type: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.ProductCardV3
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}, [trackEvent, widgetConfigId]);
|
|
53
|
+
const handleSelect = (0, react.useCallback)((prompt) => {
|
|
54
|
+
onTypedMessageSubmitted({
|
|
55
|
+
query: prompt,
|
|
56
|
+
userTyped: false
|
|
57
|
+
});
|
|
58
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON);
|
|
59
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
60
|
+
const handleInputClick = (0, react.useCallback)(() => {
|
|
61
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PRODUCT_CARD_TEXT_FIELD);
|
|
62
|
+
}, [openChat]);
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ProductCard.ProductCard, {
|
|
64
|
+
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
65
|
+
imageSrc,
|
|
66
|
+
fallbackColor,
|
|
67
|
+
headline,
|
|
68
|
+
italicizeHeadline,
|
|
69
|
+
animatedText,
|
|
70
|
+
prompts,
|
|
71
|
+
promptButtonType,
|
|
72
|
+
carouselId,
|
|
73
|
+
placeholder,
|
|
74
|
+
textTypingDuration: 800,
|
|
75
|
+
textTransition: 2e3,
|
|
76
|
+
onSelect: handleSelect,
|
|
77
|
+
onInputClick: handleInputClick
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const ProductCardWidgetWithBaseWidget = require_withBaseWidget.withBaseWidget(ProductCardWidgetHandler);
|
|
81
|
+
const ProductCardWidget = ({ widgetConfigId }) => {
|
|
82
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProductCardWidgetWithBaseWidget, {
|
|
83
|
+
widgetConfigId,
|
|
84
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.ProductCardV3
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
ProductCardWidget.displayName = "ProductCardWidget";
|
|
88
|
+
|
|
89
|
+
//#endregion
|
|
90
|
+
exports.ProductCardWidget = ProductCardWidget;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
|
+
interface ProductCardWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ProductCardWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime1.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ProductCardWidget, ProductCardWidgetProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
|
+
interface ProductCardWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const ProductCardWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ProductCardWidget, ProductCardWidgetProps };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
|
+
import "../../hocs/withBaseWidget/index.js";
|
|
3
|
+
import { useCallback, useEffect } from "react";
|
|
4
|
+
import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
7
|
+
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
8
|
+
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
9
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
10
|
+
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
11
|
+
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
|
|
12
|
+
import { ProductCard } from "@envive-ai/react-toolkit-v3/ProductCard";
|
|
13
|
+
|
|
14
|
+
//#region src/widgets/ProductCardWidget/ProductCardWidget.tsx
|
|
15
|
+
const mockPrompts = [
|
|
16
|
+
"Loading prompt 1",
|
|
17
|
+
"Loading prompt 2",
|
|
18
|
+
"Loading prompt 3",
|
|
19
|
+
"Loading prompt 4",
|
|
20
|
+
"Loading prompt 5"
|
|
21
|
+
];
|
|
22
|
+
const mockHeadline = "Loading...";
|
|
23
|
+
const mockAnimatedText = ["Loading..."];
|
|
24
|
+
const ProductCardWidgetHandler = (props) => {
|
|
25
|
+
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
26
|
+
const { openChat } = useChatToggle();
|
|
27
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
28
|
+
const hardCopyHeadline = hardcopyContent?.values?.headline;
|
|
29
|
+
const headline = isLoading ? mockHeadline : hardCopyHeadline || "";
|
|
30
|
+
const hardCopyAnimatedText = hardcopyContent?.values?.animatedText || [];
|
|
31
|
+
const animatedText = isLoading ? mockAnimatedText : hardCopyAnimatedText;
|
|
32
|
+
const hardCopyPrompts = hardcopyContent?.values?.prompts || [];
|
|
33
|
+
const prompts = isLoading ? mockPrompts : hardCopyPrompts;
|
|
34
|
+
const placeholder = hardcopyContent?.values?.placeholder;
|
|
35
|
+
const productCardWidgetConfig = widgetConfig;
|
|
36
|
+
const carouselId = productCardWidgetConfig?.contentId || "";
|
|
37
|
+
const promptButtonType = productCardWidgetConfig?.promptButtonType || PromptButtonVariant.LIGHT;
|
|
38
|
+
const italicizeHeadline = productCardWidgetConfig?.italicizeHeadline;
|
|
39
|
+
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
40
|
+
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
41
|
+
const { trackEvent } = useAmplitude();
|
|
42
|
+
const { widgetConfigId } = props;
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
trackEvent({
|
|
45
|
+
eventName: SpiffyMetricsEventName.ChatComponentVisible,
|
|
46
|
+
eventProps: {
|
|
47
|
+
widget_config_id: widgetConfigId,
|
|
48
|
+
widget_type: WidgetTypeV3.ProductCardV3
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}, [trackEvent, widgetConfigId]);
|
|
52
|
+
const handleSelect = useCallback((prompt) => {
|
|
53
|
+
onTypedMessageSubmitted({
|
|
54
|
+
query: prompt,
|
|
55
|
+
userTyped: false
|
|
56
|
+
});
|
|
57
|
+
openChat(ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON);
|
|
58
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
59
|
+
const handleInputClick = useCallback(() => {
|
|
60
|
+
openChat(ChatElementDisplayLocationV3.PRODUCT_CARD_TEXT_FIELD);
|
|
61
|
+
}, [openChat]);
|
|
62
|
+
return /* @__PURE__ */ jsx(ProductCard, {
|
|
63
|
+
theme: Theme.GLOBAL_CUSTOM,
|
|
64
|
+
imageSrc,
|
|
65
|
+
fallbackColor,
|
|
66
|
+
headline,
|
|
67
|
+
italicizeHeadline,
|
|
68
|
+
animatedText,
|
|
69
|
+
prompts,
|
|
70
|
+
promptButtonType,
|
|
71
|
+
carouselId,
|
|
72
|
+
placeholder,
|
|
73
|
+
textTypingDuration: 800,
|
|
74
|
+
textTransition: 2e3,
|
|
75
|
+
onSelect: handleSelect,
|
|
76
|
+
onInputClick: handleInputClick
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
const ProductCardWidgetWithBaseWidget = withBaseWidget(ProductCardWidgetHandler);
|
|
80
|
+
const ProductCardWidget = ({ widgetConfigId }) => {
|
|
81
|
+
return /* @__PURE__ */ jsx(ProductCardWidgetWithBaseWidget, {
|
|
82
|
+
widgetConfigId,
|
|
83
|
+
widgetType: WidgetTypeV3.ProductCardV3
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
ProductCardWidget.displayName = "ProductCardWidget";
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { ProductCardWidget };
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
|
+
const require_functions = require('../utils/functions.cjs');
|
|
3
4
|
let react = require("react");
|
|
4
5
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
5
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
7
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
8
|
+
let jotai = require("jotai");
|
|
7
9
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
8
10
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
|
+
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
9
12
|
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
10
13
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
14
|
+
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
11
15
|
let __envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage = require("@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage");
|
|
12
16
|
|
|
13
17
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
@@ -42,6 +46,14 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
42
46
|
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
43
47
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
44
48
|
}, [openChat]);
|
|
49
|
+
const variantInfo = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_app.variantInfoAtom);
|
|
50
|
+
const productId = variantInfo.variant === __envive_ai_react_hooks_application_models.VariantTypeEnum.Pdp ? variantInfo.productId : void 0;
|
|
51
|
+
const lastAssistantMessage = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_chat.lastAssistantMessageAtom);
|
|
52
|
+
const productImageUrls = (0, react.useMemo)(() => lastAssistantMessage ? require_functions.getRecentProductImageUrls(lastAssistantMessage, productId) : [], [lastAssistantMessage, productId]);
|
|
53
|
+
const productImageUrl = productImageUrls[1] ?? productImageUrls[0] ?? "";
|
|
54
|
+
const isDynamic = promptButtonCarouselWithImageWidgetConfig?.isDynamic ?? false;
|
|
55
|
+
const finalImageSrc = isDynamic ? productImageUrl : promptButtonCarouselWithImageWidgetConfig?.image?.src;
|
|
56
|
+
const finalImageAlt = isDynamic ? "Product Image From Page" : promptButtonCarouselWithImageWidgetConfig?.image?.alt;
|
|
45
57
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage.PromptButtonCarouselWithImage, {
|
|
46
58
|
id,
|
|
47
59
|
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
@@ -49,8 +61,8 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
49
61
|
title: hardCopyContent?.title,
|
|
50
62
|
promptButtonsTexts: hardCopyContent?.promptButtonsTexts,
|
|
51
63
|
promptButtonType: promptButtonCarouselWithImageWidgetConfig?.promptButtonType,
|
|
52
|
-
imageSrc:
|
|
53
|
-
alt:
|
|
64
|
+
imageSrc: finalImageSrc,
|
|
65
|
+
alt: finalImageAlt,
|
|
54
66
|
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
55
67
|
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
56
68
|
handlePromptButtonClick,
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface PromptButtonCarouselWithImageWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface PromptButtonCarouselWithImageWidgetProps {
|
|
|
12
12
|
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: PromptButtonCarouselWithImageWidgetProps):
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface PromptButtonCarouselWithImageWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface PromptButtonCarouselWithImageWidgetProps {
|
|
|
12
12
|
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: PromptButtonCarouselWithImageWidgetProps):
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getRecentProductImageUrls } from "../utils/functions.js";
|
|
3
|
+
import { useCallback, useEffect, useMemo } from "react";
|
|
3
4
|
import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
6
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
7
|
+
import { useAtomValue } from "jotai";
|
|
6
8
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
7
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
|
+
import { lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
8
11
|
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
9
|
-
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
12
|
+
import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
|
|
13
|
+
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
10
14
|
import { PromptButtonCarouselWithImage } from "@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage";
|
|
11
15
|
|
|
12
16
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
@@ -41,6 +45,14 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
41
45
|
const handleTextFieldClick = useCallback(() => {
|
|
42
46
|
openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
43
47
|
}, [openChat]);
|
|
48
|
+
const variantInfo = useAtomValue(variantInfoAtom);
|
|
49
|
+
const productId = variantInfo.variant === VariantTypeEnum.Pdp ? variantInfo.productId : void 0;
|
|
50
|
+
const lastAssistantMessage = useAtomValue(lastAssistantMessageAtom);
|
|
51
|
+
const productImageUrls = useMemo(() => lastAssistantMessage ? getRecentProductImageUrls(lastAssistantMessage, productId) : [], [lastAssistantMessage, productId]);
|
|
52
|
+
const productImageUrl = productImageUrls[1] ?? productImageUrls[0] ?? "";
|
|
53
|
+
const isDynamic = promptButtonCarouselWithImageWidgetConfig?.isDynamic ?? false;
|
|
54
|
+
const finalImageSrc = isDynamic ? productImageUrl : promptButtonCarouselWithImageWidgetConfig?.image?.src;
|
|
55
|
+
const finalImageAlt = isDynamic ? "Product Image From Page" : promptButtonCarouselWithImageWidgetConfig?.image?.alt;
|
|
44
56
|
return /* @__PURE__ */ jsx(PromptButtonCarouselWithImage, {
|
|
45
57
|
id,
|
|
46
58
|
theme: Theme.GLOBAL_CUSTOM,
|
|
@@ -48,8 +60,8 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
48
60
|
title: hardCopyContent?.title,
|
|
49
61
|
promptButtonsTexts: hardCopyContent?.promptButtonsTexts,
|
|
50
62
|
promptButtonType: promptButtonCarouselWithImageWidgetConfig?.promptButtonType,
|
|
51
|
-
imageSrc:
|
|
52
|
-
alt:
|
|
63
|
+
imageSrc: finalImageSrc,
|
|
64
|
+
alt: finalImageAlt,
|
|
53
65
|
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
54
66
|
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
55
67
|
handlePromptButtonClick,
|
|
@@ -50,6 +50,7 @@ const PromptCarouselWidgetHandler = (props) => {
|
|
|
50
50
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_CAROUSEL);
|
|
51
51
|
}, [onTypedMessageSubmitted, openChat]);
|
|
52
52
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptCarousel.PromptCarousel, {
|
|
53
|
+
...props,
|
|
53
54
|
id,
|
|
54
55
|
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
55
56
|
isLoading,
|
|
@@ -58,8 +59,7 @@ const PromptCarouselWidgetHandler = (props) => {
|
|
|
58
59
|
promptCarouselRows,
|
|
59
60
|
animationSpeed,
|
|
60
61
|
handleButtonClick,
|
|
61
|
-
promptButtonTexts: buttonTexts
|
|
62
|
-
...props
|
|
62
|
+
promptButtonTexts: buttonTexts
|
|
63
63
|
});
|
|
64
64
|
};
|
|
65
65
|
const PromptCarouselWidgetWithBaseWidget = require_withBaseWidget.withBaseWidget(PromptCarouselWidgetHandler);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
4
|
interface PromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface PromptCarouselWidgetProps {
|
|
|
7
7
|
declare const PromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: PromptCarouselWidgetProps):
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
4
|
interface PromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface PromptCarouselWidgetProps {
|
|
|
7
7
|
declare const PromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: PromptCarouselWidgetProps):
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime14.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -49,6 +49,7 @@ const PromptCarouselWidgetHandler = (props) => {
|
|
|
49
49
|
openChat(ChatElementDisplayLocationV3.PROMPT_CAROUSEL);
|
|
50
50
|
}, [onTypedMessageSubmitted, openChat]);
|
|
51
51
|
return /* @__PURE__ */ jsx(PromptCarousel, {
|
|
52
|
+
...props,
|
|
52
53
|
id,
|
|
53
54
|
theme: Theme.GLOBAL_CUSTOM,
|
|
54
55
|
isLoading,
|
|
@@ -57,8 +58,7 @@ const PromptCarouselWidgetHandler = (props) => {
|
|
|
57
58
|
promptCarouselRows,
|
|
58
59
|
animationSpeed,
|
|
59
60
|
handleButtonClick,
|
|
60
|
-
promptButtonTexts: buttonTexts
|
|
61
|
-
...props
|
|
61
|
+
promptButtonTexts: buttonTexts
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
const PromptCarouselWidgetWithBaseWidget = withBaseWidget(PromptCarouselWidgetHandler);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
3
3
|
const require_ChatPreviewComparisonWidget = require('../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs');
|
|
4
|
-
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
5
4
|
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
5
|
+
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
6
6
|
const require_SocialProofWidget = require('../SocialProofWidget/SocialProofWidget.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime10 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
4
|
interface SocialProofFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface SocialProofFlowWidgetProps {
|
|
|
7
7
|
declare const SocialProofFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: SocialProofFlowWidgetProps):
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime10.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
4
|
interface SocialProofFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface SocialProofFlowWidgetProps {
|
|
|
7
7
|
declare const SocialProofFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: SocialProofFlowWidgetProps):
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
2
2
|
import { ChatPreviewComparisonWidgetWithBaseWidget } from "../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js";
|
|
3
|
-
import { ChatPreviewWidgetWithBaseWidget } from "../ChatPreviewWidget/ChatPreviewWidget.js";
|
|
4
3
|
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
4
|
+
import { ChatPreviewWidgetWithBaseWidget } from "../ChatPreviewWidget/ChatPreviewWidget.js";
|
|
5
5
|
import { SocialProofWidgetWithBaseWidget } from "../SocialProofWidget/SocialProofWidget.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
@@ -51,7 +51,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
51
51
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
52
52
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
53
53
|
const dynamicImageUrl = require_functions.getProductImageUrl(lastAssistantMessage);
|
|
54
|
-
const images = socialProofWidgetConfig?.kind !==
|
|
54
|
+
const images = socialProofWidgetConfig?.kind !== __envive_ai_react_toolkit_v3_SocialProof.WidgetKind.DYNAMIC ? socialProofWidgetConfig?.images : [{
|
|
55
55
|
src: dynamicImageUrl,
|
|
56
56
|
alt: "Product Image"
|
|
57
57
|
}];
|
|
@@ -98,6 +98,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
98
98
|
const widgetStyleProps = {
|
|
99
99
|
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
100
100
|
variant: socialProofWidgetConfig?.variant,
|
|
101
|
+
kind: socialProofWidgetConfig?.kind,
|
|
101
102
|
primaryButtonVariant: socialProofWidgetConfig?.primaryButtonVariant,
|
|
102
103
|
secondaryButtonVariant: socialProofWidgetConfig?.secondaryButtonVariant,
|
|
103
104
|
promptCarouselRows: socialProofWidgetConfig?.promptCarouselRows,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime8.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime8.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime4.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface SocialProofWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface SocialProofWidgetProps {
|
|
|
12
12
|
declare const SocialProofWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: SocialProofWidgetProps):
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime4.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -3,7 +3,7 @@ import { getProductImageUrl } from "../utils/functions.js";
|
|
|
3
3
|
import { useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
6
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
7
7
|
import { useAtomValue, useSetAtom } from "jotai";
|
|
8
8
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
9
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
@@ -13,7 +13,7 @@ import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-
|
|
|
13
13
|
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
14
14
|
import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
|
|
15
15
|
import { chatPreviewLoadingDataAtom } from "@envive-ai/react-hooks/atoms/widget";
|
|
16
|
-
import { PageVariant, SocialProof } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
16
|
+
import { PageVariant, SocialProof, WidgetKind } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
17
17
|
|
|
18
18
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.tsx
|
|
19
19
|
const SocialProofWidgetHandler = (props) => {
|
|
@@ -50,7 +50,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
50
50
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
51
51
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
52
52
|
const dynamicImageUrl = getProductImageUrl(lastAssistantMessage);
|
|
53
|
-
const images = socialProofWidgetConfig?.kind !==
|
|
53
|
+
const images = socialProofWidgetConfig?.kind !== WidgetKind.DYNAMIC ? socialProofWidgetConfig?.images : [{
|
|
54
54
|
src: dynamicImageUrl,
|
|
55
55
|
alt: "Product Image"
|
|
56
56
|
}];
|
|
@@ -97,6 +97,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
97
97
|
const widgetStyleProps = {
|
|
98
98
|
theme: Theme.GLOBAL_CUSTOM,
|
|
99
99
|
variant: socialProofWidgetConfig?.variant,
|
|
100
|
+
kind: socialProofWidgetConfig?.kind,
|
|
100
101
|
primaryButtonVariant: socialProofWidgetConfig?.primaryButtonVariant,
|
|
101
102
|
secondaryButtonVariant: socialProofWidgetConfig?.secondaryButtonVariant,
|
|
102
103
|
promptCarouselRows: socialProofWidgetConfig?.promptCarouselRows,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
|
|
4
4
|
interface TitledPromptCarouselWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
|
|
|
7
7
|
declare const TitledPromptCarouselWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TitledPromptCarouselWidgetProps):
|
|
10
|
+
}: TitledPromptCarouselWidgetProps): react_jsx_runtime8.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
2
|
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
3
3
|
const require_ChatPreviewComparisonWidget = require('../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs');
|
|
4
|
-
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
5
4
|
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
5
|
+
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
6
6
|
const require_TypingAnimationWidget = require('../TypingAnimationWidget/TypingAnimationWidget.cjs');
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
|
|
4
4
|
interface TypingAnimationFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
|
|
|
7
7
|
declare const TypingAnimationFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TypingAnimationFlowWidgetProps):
|
|
10
|
+
}: TypingAnimationFlowWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
|
|
4
4
|
interface TypingAnimationFlowWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
|
|
|
7
7
|
declare const TypingAnimationFlowWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: TypingAnimationFlowWidgetProps):
|
|
10
|
+
}: TypingAnimationFlowWidgetProps): react_jsx_runtime6.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|