@envive-ai/react-widgets-v3 0.3.15-beta.1 → 0.3.16
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/debug/chatEmbed.cjs +1 -1
- package/dist/debug/chatEmbed.js +1 -1
- package/dist/debug/reportIssue.cjs +1 -1
- package/dist/debug/reportIssue.js +1 -1
- package/dist/hocs/withBaseWidget/types.d.cts +3 -3
- package/dist/hocs/withBaseWidget/types.d.ts +3 -5
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchResults/SearchResults.d.ts +2 -3
- package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/index.d.ts +1 -2
- package/dist/packages/widgets/dist/SearchZeroState/types.d.ts +2 -2
- package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
- package/dist/packages/widgets/dist/SuggestionButtonContainer/types.d.ts +2 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +36 -5
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +36 -5
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +34 -4
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +35 -5
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +3 -3
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +25 -3
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +25 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +23 -4
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +23 -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.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +53 -6
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +54 -7
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +10 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +11 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +23 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +24 -3
- package/dist/widgets/dist/SearchResults/SearchResults.d.cts +2 -3
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +2 -3
- package/dist/widgets/hooks/useGetWidgetStatus.cjs +1 -1
- package/dist/widgets/hooks/useGetWidgetStatus.js +1 -1
- package/dist/widgets/utils/functions.cjs +0 -14
- package/dist/widgets/utils/functions.js +1 -14
- package/dist/widgets-v2/SearchZeroState/index.d.cts +1 -2
- package/dist/widgets-v2/SearchZeroState/index.d.ts +1 -2
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +0 -1
- package/package.json +1 -1
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +59 -8
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +55 -7
- package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +0 -6
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +37 -4
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +38 -8
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +3 -2
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +77 -7
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +23 -8
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +45 -10
- package/dist/hooks/dist/application/models/api/widgetText.d.cts +0 -8
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +0 -12
- package/dist/hooks/dist/contexts/types.d.cts +0 -38
- package/dist/hooks/dist/contexts/typesV3.d.cts +0 -239
- package/dist/hooks/dist/services/amplitudeService/eventNames.d.cts +0 -43
- package/dist/hooks/dist/types/customerService.d.cts +0 -21
- package/dist/packages/hooks/dist/application/models/api/orgConfigResults.d.ts +0 -1
- package/dist/packages/hooks/dist/application/models/api/widgetText.d.ts +0 -8
- package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +0 -1
- package/dist/packages/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +0 -2
- package/dist/packages/hooks/dist/contexts/amplitudeContext/index.d.ts +0 -2
- package/dist/packages/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +0 -2
- package/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -14
- package/dist/packages/hooks/dist/contexts/hardcopyContext/index.d.ts +0 -1
- package/dist/packages/hooks/dist/contexts/types.d.ts +0 -42
- package/dist/packages/hooks/dist/contexts/typesV3.d.ts +0 -239
- package/dist/packages/hooks/dist/services/amplitudeService/amplitudeService.d.ts +0 -1
- package/dist/packages/hooks/dist/services/amplitudeService/eventNames.d.ts +0 -43
- package/dist/packages/hooks/dist/types/customerService.d.ts +0 -21
- package/dist/packages/widgets/dist/SuggestionButtonContainer/index.d.ts +0 -2
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +0 -14
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +0 -15
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +0 -73
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +0 -61
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +0 -25
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +0 -35
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +0 -32
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +0 -32
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +0 -1
- package/dist/packages/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +0 -15
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -1
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/types.d.ts +0 -63
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +0 -60
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +0 -13
- package/dist/packages/widgets/dist/packages/hooks/dist/types/OrgInfo.d.ts +0 -1
- package/dist/packages/widgets/dist/packages/hooks/dist/types/index.d.ts +0 -1
- package/dist/packages/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +0 -28
- package/dist/packages/widgets/dist/packages/hooks/dist/types/test-types.d.ts +0 -10
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +0 -14
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +0 -15
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +0 -73
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +0 -25
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +0 -35
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +0 -32
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +0 -14
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +0 -61
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +0 -60
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +0 -12
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +0 -28
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +0 -10
|
@@ -12,13 +12,13 @@ const require_useAutoPopup = require('./hooks/useAutoPopup.cjs');
|
|
|
12
12
|
let react = require("react");
|
|
13
13
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
14
14
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
15
|
-
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
16
15
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
16
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
17
17
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
18
|
-
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
19
18
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
20
|
-
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
21
19
|
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
20
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
21
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
22
22
|
let __envive_ai_react_toolkit_v3_FloatingButton = require("@envive-ai/react-toolkit-v3/FloatingButton");
|
|
23
23
|
|
|
24
24
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -9,7 +9,7 @@ declare const FloatingChatWidget: {
|
|
|
9
9
|
({
|
|
10
10
|
previewButtonOnly,
|
|
11
11
|
previewChatAlwaysOpen
|
|
12
|
-
}?: FloatingChatWidgetProps):
|
|
12
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime16.JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -9,7 +9,7 @@ declare const FloatingChatWidget: {
|
|
|
9
9
|
({
|
|
10
10
|
previewButtonOnly,
|
|
11
11
|
previewChatAlwaysOpen
|
|
12
|
-
}?: FloatingChatWidgetProps):
|
|
12
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
13
13
|
displayName: string;
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
@@ -11,13 +11,13 @@ import { useAutoPopup } from "./hooks/useAutoPopup.js";
|
|
|
11
11
|
import { Suspense, lazy, useEffect, useMemo, useRef, useState } from "react";
|
|
12
12
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
15
14
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
15
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
16
16
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
17
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
18
17
|
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
19
|
-
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
20
18
|
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
19
|
+
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
20
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
21
21
|
import { FloatingButton } from "@envive-ai/react-toolkit-v3/FloatingButton";
|
|
22
22
|
|
|
23
23
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
|
|
|
8
8
|
declare const FullPageSalesAgentWidget: {
|
|
9
9
|
({
|
|
10
10
|
widgetConfigId
|
|
11
|
-
}: FullPageSalesAgentBaseWidgetProps):
|
|
11
|
+
}: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime3.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts
|
|
4
4
|
|
|
@@ -8,7 +8,7 @@ interface FullPageSalesAgentBaseWidgetProps {
|
|
|
8
8
|
declare const FullPageSalesAgentWidget: {
|
|
9
9
|
({
|
|
10
10
|
widgetConfigId
|
|
11
|
-
}: FullPageSalesAgentBaseWidgetProps):
|
|
11
|
+
}: FullPageSalesAgentBaseWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -5,13 +5,16 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
9
8
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
9
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
10
10
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
|
-
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
12
11
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
13
|
-
let
|
|
12
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
13
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
14
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
15
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
14
16
|
let __envive_ai_react_toolkit_v3_ProductCard = require("@envive-ai/react-toolkit-v3/ProductCard");
|
|
17
|
+
let __envive_ai_react_toolkit_v3_PromptButton_types = require("@envive-ai/react-toolkit-v3/PromptButton/types");
|
|
15
18
|
|
|
16
19
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.tsx
|
|
17
20
|
const mockPrompts = [
|
|
@@ -41,6 +44,11 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
41
44
|
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
42
45
|
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
43
46
|
const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
|
|
47
|
+
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
48
|
+
const { onClick: onSuggestionClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = (0, __envive_ai_react_toolkit_v3_PromptCarousel.usePromptCarouselAnalytics)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.IMAGE_PROMPT_CARD, (text) => {
|
|
49
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
50
|
+
return require_functions.getStringIdForText(rawValues, text);
|
|
51
|
+
});
|
|
44
52
|
const { widgetConfigId } = props;
|
|
45
53
|
(0, react.useEffect)(() => {
|
|
46
54
|
trackEvent({
|
|
@@ -68,6 +76,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
68
76
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON
|
|
69
77
|
});
|
|
70
78
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON);
|
|
79
|
+
onSuggestionClick(text);
|
|
71
80
|
}, [
|
|
72
81
|
hardcopyContent,
|
|
73
82
|
onTypedMessageSubmitted,
|
|
@@ -76,6 +85,13 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
76
85
|
]);
|
|
77
86
|
const handleInputClick = (0, react.useCallback)(() => {
|
|
78
87
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PRODUCT_CARD_TEXT_FIELD);
|
|
88
|
+
trackWidgetInteraction({
|
|
89
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
90
|
+
trigger: {
|
|
91
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.IMAGE_PROMPT_CARD,
|
|
92
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
93
|
+
}
|
|
94
|
+
});
|
|
79
95
|
}, [openChat]);
|
|
80
96
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ProductCard.ProductCard, {
|
|
81
97
|
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
@@ -91,6 +107,12 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
91
107
|
textTypingDuration: 800,
|
|
92
108
|
textTransition: 2e3,
|
|
93
109
|
onSelect: handleSelect,
|
|
110
|
+
onDrag,
|
|
111
|
+
onHover,
|
|
112
|
+
onMouseDown,
|
|
113
|
+
onMouseUp,
|
|
114
|
+
onTouchStart,
|
|
115
|
+
onTouchEnd,
|
|
94
116
|
onInputClick: handleInputClick
|
|
95
117
|
});
|
|
96
118
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
4
|
interface ProductCardWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface ProductCardWidgetProps {
|
|
|
7
7
|
declare const ProductCardWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: ProductCardWidgetProps):
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime15.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.d.ts
|
|
4
4
|
interface ProductCardWidgetProps {
|
|
@@ -7,7 +7,7 @@ interface ProductCardWidgetProps {
|
|
|
7
7
|
declare const ProductCardWidget: {
|
|
8
8
|
({
|
|
9
9
|
widgetConfigId
|
|
10
|
-
}: ProductCardWidgetProps):
|
|
10
|
+
}: ProductCardWidgetProps): react_jsx_runtime13.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -4,13 +4,16 @@ import { getStringIdForText } from "../utils/functions.js";
|
|
|
4
4
|
import { useCallback, useEffect } from "react";
|
|
5
5
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
8
7
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
8
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
9
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
11
10
|
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
12
|
-
import {
|
|
11
|
+
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
12
|
+
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
13
|
+
import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
14
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
13
15
|
import { ProductCard } from "@envive-ai/react-toolkit-v3/ProductCard";
|
|
16
|
+
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
|
|
14
17
|
|
|
15
18
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.tsx
|
|
16
19
|
const mockPrompts = [
|
|
@@ -40,6 +43,11 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
40
43
|
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
41
44
|
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
42
45
|
const { trackEvent } = useAmplitude();
|
|
46
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
47
|
+
const { onClick: onSuggestionClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.IMAGE_PROMPT_CARD, (text) => {
|
|
48
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
49
|
+
return getStringIdForText(rawValues, text);
|
|
50
|
+
});
|
|
43
51
|
const { widgetConfigId } = props;
|
|
44
52
|
useEffect(() => {
|
|
45
53
|
trackEvent({
|
|
@@ -67,6 +75,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
67
75
|
displayLocation: ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON
|
|
68
76
|
});
|
|
69
77
|
openChat(ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON);
|
|
78
|
+
onSuggestionClick(text);
|
|
70
79
|
}, [
|
|
71
80
|
hardcopyContent,
|
|
72
81
|
onTypedMessageSubmitted,
|
|
@@ -75,6 +84,13 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
75
84
|
]);
|
|
76
85
|
const handleInputClick = useCallback(() => {
|
|
77
86
|
openChat(ChatElementDisplayLocationV3.PRODUCT_CARD_TEXT_FIELD);
|
|
87
|
+
trackWidgetInteraction({
|
|
88
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
89
|
+
trigger: {
|
|
90
|
+
widget: WidgetInteractionComponent.IMAGE_PROMPT_CARD,
|
|
91
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
92
|
+
}
|
|
93
|
+
});
|
|
78
94
|
}, [openChat]);
|
|
79
95
|
return /* @__PURE__ */ jsx(ProductCard, {
|
|
80
96
|
theme: Theme.GLOBAL_CUSTOM,
|
|
@@ -90,6 +106,12 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
90
106
|
textTypingDuration: 800,
|
|
91
107
|
textTransition: 2e3,
|
|
92
108
|
onSelect: handleSelect,
|
|
109
|
+
onDrag,
|
|
110
|
+
onHover,
|
|
111
|
+
onMouseDown,
|
|
112
|
+
onMouseUp,
|
|
113
|
+
onTouchStart,
|
|
114
|
+
onTouchEnd,
|
|
93
115
|
onInputClick: handleInputClick
|
|
94
116
|
});
|
|
95
117
|
};
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs
CHANGED
|
@@ -4,20 +4,25 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let
|
|
8
|
-
let jotai = require("jotai");
|
|
7
|
+
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
9
8
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
9
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
10
10
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
|
-
let
|
|
12
|
-
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
11
|
+
let jotai = require("jotai");
|
|
13
12
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
14
13
|
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
14
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
15
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
16
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
17
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
15
18
|
let __envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage = require("@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage");
|
|
16
19
|
|
|
17
20
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
18
21
|
const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
19
22
|
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
20
23
|
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
24
|
+
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
25
|
+
const { onClick: onSuggestionClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = (0, __envive_ai_react_toolkit_v3_PromptCarousel.usePromptCarouselAnalytics)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SINGLE_IMAGE_PROMPT, (text) => text);
|
|
21
26
|
const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
|
|
22
27
|
const promptButtonCarouselWithImageWidgetConfig = widgetConfig;
|
|
23
28
|
const id = widgetConfig?.contentId;
|
|
@@ -53,9 +58,17 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
53
58
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON
|
|
54
59
|
});
|
|
55
60
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON);
|
|
61
|
+
onSuggestionClick(text);
|
|
56
62
|
}, [onTypedMessageSubmitted, openChat]);
|
|
57
63
|
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
58
64
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
65
|
+
trackWidgetInteraction({
|
|
66
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
67
|
+
trigger: {
|
|
68
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SINGLE_IMAGE_PROMPT,
|
|
69
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
70
|
+
}
|
|
71
|
+
});
|
|
59
72
|
}, [openChat]);
|
|
60
73
|
const variantInfo = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_app.variantInfoAtom);
|
|
61
74
|
const productId = variantInfo.variant === __envive_ai_react_hooks_application_models.VariantTypeEnum.Pdp ? variantInfo.productId : void 0;
|
|
@@ -77,6 +90,12 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
77
90
|
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
78
91
|
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
79
92
|
handlePromptButtonClick,
|
|
93
|
+
handlePromptButtonDrag: onDrag,
|
|
94
|
+
handlePromptButtonHover: onHover,
|
|
95
|
+
handlePromptButtonMouseDown: onMouseDown,
|
|
96
|
+
handlePromptButtonMouseUp: onMouseUp,
|
|
97
|
+
handlePromptButtonTouchStart: onTouchStart,
|
|
98
|
+
handlePromptButtonTouchEnd: onTouchEnd,
|
|
80
99
|
handleTextFieldClick
|
|
81
100
|
});
|
|
82
101
|
};
|
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_runtime11 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_runtime11.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_runtime11.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js
CHANGED
|
@@ -3,20 +3,25 @@ import { getRecentProductImageUrls, getStringIdForText } from "../utils/function
|
|
|
3
3
|
import { useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { useAtomValue } from "jotai";
|
|
6
|
+
import { lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
|
|
8
7
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
8
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
9
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
|
-
import {
|
|
11
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
10
|
+
import { useAtomValue } from "jotai";
|
|
12
11
|
import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
|
|
13
12
|
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
13
|
+
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
14
|
+
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
15
|
+
import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
16
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
14
17
|
import { PromptButtonCarouselWithImage } from "@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage";
|
|
15
18
|
|
|
16
19
|
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
17
20
|
const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
18
21
|
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
19
22
|
const { openChat } = useChatToggle();
|
|
23
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
24
|
+
const { onClick: onSuggestionClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.SINGLE_IMAGE_PROMPT, (text) => text);
|
|
20
25
|
const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
|
|
21
26
|
const promptButtonCarouselWithImageWidgetConfig = widgetConfig;
|
|
22
27
|
const id = widgetConfig?.contentId;
|
|
@@ -52,9 +57,17 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
52
57
|
displayLocation: ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON
|
|
53
58
|
});
|
|
54
59
|
openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON);
|
|
60
|
+
onSuggestionClick(text);
|
|
55
61
|
}, [onTypedMessageSubmitted, openChat]);
|
|
56
62
|
const handleTextFieldClick = useCallback(() => {
|
|
57
63
|
openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
64
|
+
trackWidgetInteraction({
|
|
65
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
66
|
+
trigger: {
|
|
67
|
+
widget: WidgetInteractionComponent.SINGLE_IMAGE_PROMPT,
|
|
68
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
69
|
+
}
|
|
70
|
+
});
|
|
58
71
|
}, [openChat]);
|
|
59
72
|
const variantInfo = useAtomValue(variantInfoAtom);
|
|
60
73
|
const productId = variantInfo.variant === VariantTypeEnum.Pdp ? variantInfo.productId : void 0;
|
|
@@ -76,6 +89,12 @@ const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
|
76
89
|
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
77
90
|
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
78
91
|
handlePromptButtonClick,
|
|
92
|
+
handlePromptButtonDrag: onDrag,
|
|
93
|
+
handlePromptButtonHover: onHover,
|
|
94
|
+
handlePromptButtonMouseDown: onMouseDown,
|
|
95
|
+
handlePromptButtonMouseUp: onMouseUp,
|
|
96
|
+
handlePromptButtonTouchStart: onTouchStart,
|
|
97
|
+
handlePromptButtonTouchEnd: onTouchEnd,
|
|
79
98
|
handleTextFieldClick
|
|
80
99
|
});
|
|
81
100
|
};
|
|
@@ -5,13 +5,13 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
9
8
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
9
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
10
10
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
|
-
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
12
11
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
13
12
|
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
14
13
|
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
14
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
15
15
|
let __envive_ai_react_toolkit_v3_PromptCarousel_types_types = require("@envive-ai/react-toolkit-v3/PromptCarousel/types/types");
|
|
16
16
|
|
|
17
17
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 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_runtime9.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 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_runtime9.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -4,13 +4,13 @@ import { getStringIdForText } from "../utils/functions.js";
|
|
|
4
4
|
import { useCallback, useEffect } from "react";
|
|
5
5
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
8
7
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
8
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
9
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
11
10
|
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
12
11
|
import { WidgetInteractionComponent } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
13
12
|
import { PromptCarousel, usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
13
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
14
14
|
import { AnimationSpeed as AnimationSpeed$1 } from "@envive-ai/react-toolkit-v3/PromptCarousel/types/types";
|
|
15
15
|
|
|
16
16
|
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 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_runtime0.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -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
|