@envive-ai/react-widgets-v3 0.3.32 → 0.3.33
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/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +2 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +3 -1
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +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 +15 -13
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +15 -13
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/package.json +1 -1
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +3 -1
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +22 -13
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
5
|
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
-
(props: P):
|
|
6
|
+
(props: P): react_jsx_runtime13.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
5
|
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
-
(props: P):
|
|
6
|
+
(props: P): react_jsx_runtime0.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts
|
|
5
5
|
declare const ChatPreviewComparisonWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime6.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewComparisonWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewComparisonWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewComparisonWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewComparisonWidgetProps):
|
|
15
|
+
}: ChatPreviewComparisonWidgetProps): react_jsx_runtime6.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_runtime9 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts
|
|
5
5
|
declare const ChatPreviewComparisonWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime9.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewComparisonWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewComparisonWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewComparisonWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewComparisonWidgetProps):
|
|
15
|
+
}: ChatPreviewComparisonWidgetProps): react_jsx_runtime9.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
|
|
5
5
|
declare const ChatPreviewLoadingWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime4.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewLoadingWidgetProps {
|
|
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const ChatPreviewLoadingWidget: ({
|
|
13
13
|
widgetConfigId
|
|
14
|
-
}: ChatPreviewLoadingWidgetProps) =>
|
|
14
|
+
}: ChatPreviewLoadingWidgetProps) => react_jsx_runtime4.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts
|
|
5
5
|
declare const ChatPreviewLoadingWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime15.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewLoadingWidgetProps {
|
|
@@ -11,6 +11,6 @@ interface ChatPreviewLoadingWidgetProps {
|
|
|
11
11
|
}
|
|
12
12
|
declare const ChatPreviewLoadingWidget: ({
|
|
13
13
|
widgetConfigId
|
|
14
|
-
}: ChatPreviewLoadingWidgetProps) =>
|
|
14
|
+
}: ChatPreviewLoadingWidgetProps) => react_jsx_runtime15.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { ChatPreviewLoadingWidget, ChatPreviewLoadingWidgetProps, ChatPreviewLoadingWidgetWithBaseWidget };
|
|
@@ -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/ChatPreviewWidget/ChatPreviewWidget.d.ts
|
|
5
5
|
declare const ChatPreviewWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface ChatPreviewWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface ChatPreviewWidgetProps {
|
|
|
12
12
|
declare const ChatPreviewWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: ChatPreviewWidgetProps):
|
|
15
|
+
}: ChatPreviewWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#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/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
|
|
|
13
13
|
previewChatAlwaysOpen,
|
|
14
14
|
previewCXButtonsEnabled,
|
|
15
15
|
previewDisclaimer
|
|
16
|
-
}?: FloatingChatWidgetProps):
|
|
16
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime10.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts
|
|
4
4
|
interface FloatingChatWidgetProps {
|
|
@@ -13,7 +13,7 @@ declare const FloatingChatWidget: {
|
|
|
13
13
|
previewChatAlwaysOpen,
|
|
14
14
|
previewCXButtonsEnabled,
|
|
15
15
|
previewDisclaimer
|
|
16
|
-
}?: FloatingChatWidgetProps):
|
|
16
|
+
}?: FloatingChatWidgetProps): react_jsx_runtime8.JSX.Element;
|
|
17
17
|
displayName: string;
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 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_runtime8.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime17 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_runtime17.JSX.Element;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
@@ -44,6 +44,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
44
44
|
const italicizeHeadline = productCardWidgetConfig?.italicizeHeadline;
|
|
45
45
|
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
46
46
|
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
47
|
+
const variant = productCardWidgetConfig?.mode ?? __envive_ai_react_toolkit_v3_ProductCard.ProductCardVariant.DARK;
|
|
47
48
|
const voiceInputEnabled = uiConfig?.lookAndFeel?.voiceInputEnabled;
|
|
48
49
|
const { featureFlagService } = (0, __envive_ai_react_hooks_contexts_featureFlagServiceContext.useFeatureFlagService)();
|
|
49
50
|
const isVoiceInputEnabled = featureFlagService?.isFeatureGateEnabled(__envive_ai_react_hooks_application_models.FeatureGates.IsVoiceInputEnabled) || voiceInputEnabled;
|
|
@@ -108,6 +109,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
108
109
|
}, []);
|
|
109
110
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ProductCard.ProductCard, {
|
|
110
111
|
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
112
|
+
variant,
|
|
111
113
|
imageSrc,
|
|
112
114
|
fallbackColor,
|
|
113
115
|
headline,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 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_runtime19.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -13,7 +13,7 @@ import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInterac
|
|
|
13
13
|
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
14
14
|
import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
15
15
|
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
16
|
-
import { ProductCard } from "@envive-ai/react-toolkit-v3/ProductCard";
|
|
16
|
+
import { ProductCard, ProductCardVariant } from "@envive-ai/react-toolkit-v3/ProductCard";
|
|
17
17
|
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
|
|
18
18
|
|
|
19
19
|
//#region src/widgets/ProductCardWidget/ProductCardWidget.tsx
|
|
@@ -43,6 +43,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
43
43
|
const italicizeHeadline = productCardWidgetConfig?.italicizeHeadline;
|
|
44
44
|
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
45
45
|
const imageSrc = productCardWidgetConfig?.imageSrc || "";
|
|
46
|
+
const variant = productCardWidgetConfig?.mode ?? ProductCardVariant.DARK;
|
|
46
47
|
const voiceInputEnabled = uiConfig?.lookAndFeel?.voiceInputEnabled;
|
|
47
48
|
const { featureFlagService } = useFeatureFlagService();
|
|
48
49
|
const isVoiceInputEnabled = featureFlagService?.isFeatureGateEnabled(FeatureGates.IsVoiceInputEnabled) || voiceInputEnabled;
|
|
@@ -107,6 +108,7 @@ const ProductCardWidgetHandler = (props) => {
|
|
|
107
108
|
}, []);
|
|
108
109
|
return /* @__PURE__ */ jsx(ProductCard, {
|
|
109
110
|
theme: Theme.GLOBAL_CUSTOM,
|
|
111
|
+
variant,
|
|
110
112
|
imageSrc,
|
|
111
113
|
fallbackColor,
|
|
112
114
|
headline,
|
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_runtime16 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_runtime16.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_runtime16.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_runtime0 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_runtime0.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_runtime0.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#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/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_runtime2 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_runtime2.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime4 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_runtime4.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -28,7 +28,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
28
28
|
const variantInfo = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_app.variantInfoAtom);
|
|
29
29
|
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
30
30
|
const { onClick: onSuggestionClick, onHover, onDrag, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = (0, __envive_ai_react_toolkit_v3_PromptCarousel.usePromptCarouselAnalytics)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SOCIAL_PROOF, (text) => text);
|
|
31
|
-
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
31
|
+
const { hardcopyContent: rawHardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
32
32
|
const socialProofWidgetConfig = widgetConfig;
|
|
33
33
|
const id = widgetConfig?.contentId;
|
|
34
34
|
const { pageVariant, countKey } = (0, react.useMemo)(() => {
|
|
@@ -46,12 +46,13 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
46
46
|
};
|
|
47
47
|
}, [variantInfo]);
|
|
48
48
|
const hardCopyContent = {
|
|
49
|
-
titleLabel:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
titleLabel: rawHardcopyContent?.values?.titleLabel,
|
|
50
|
+
numberOfCustomersText: rawHardcopyContent?.values.numberOfCustomersText,
|
|
51
|
+
customerQueryText: rawHardcopyContent?.values?.customerQueryText,
|
|
52
|
+
primaryButtonText: rawHardcopyContent?.values?.primaryButtonText,
|
|
53
|
+
secondaryButtonTitleText: rawHardcopyContent?.values?.secondaryButtonTitleText,
|
|
54
|
+
secondaryButtonTexts: rawHardcopyContent?.values?.secondaryButtonTexts,
|
|
55
|
+
textFieldPlaceholderText: rawHardcopyContent?.values?.textFieldPlaceholderText
|
|
55
56
|
};
|
|
56
57
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
57
58
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
@@ -65,12 +66,12 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
65
66
|
}];
|
|
66
67
|
const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
|
|
67
68
|
const handlePrimaryButtonClick = (0, react.useCallback)((text) => {
|
|
68
|
-
const rawValues =
|
|
69
|
+
const rawValues = rawHardcopyContent?.rawValues;
|
|
69
70
|
const stringId = require_functions.getStringIdForText(rawValues, text);
|
|
70
71
|
trackEvent({
|
|
71
72
|
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetTextClicked,
|
|
72
73
|
eventProps: {
|
|
73
|
-
response_id:
|
|
74
|
+
response_id: rawHardcopyContent?.responseId,
|
|
74
75
|
string_id: stringId,
|
|
75
76
|
text
|
|
76
77
|
}
|
|
@@ -101,12 +102,12 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
101
102
|
});
|
|
102
103
|
}, []);
|
|
103
104
|
const handleSecondaryButtonClick = (0, react.useCallback)((text) => {
|
|
104
|
-
const rawValues =
|
|
105
|
+
const rawValues = rawHardcopyContent?.rawValues;
|
|
105
106
|
const stringId = require_functions.getStringIdForText(rawValues, text);
|
|
106
107
|
trackEvent({
|
|
107
108
|
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetTextClicked,
|
|
108
109
|
eventProps: {
|
|
109
|
-
response_id:
|
|
110
|
+
response_id: rawHardcopyContent?.responseId,
|
|
110
111
|
string_id: stringId,
|
|
111
112
|
text
|
|
112
113
|
}
|
|
@@ -152,8 +153,8 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
152
153
|
setChatPreviewLoadingData({
|
|
153
154
|
widgetConfigId,
|
|
154
155
|
data: {
|
|
155
|
-
titleLabel:
|
|
156
|
-
textFieldPlaceholder:
|
|
156
|
+
titleLabel: hardCopyContent?.titleLabel,
|
|
157
|
+
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholderText,
|
|
157
158
|
logoSrc,
|
|
158
159
|
hideLogo: hideLogo ?? false,
|
|
159
160
|
variant: socialProofWidgetConfig?.variant,
|
|
@@ -177,6 +178,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
177
178
|
};
|
|
178
179
|
const widgetContentProps = {
|
|
179
180
|
titleLabel: hardCopyContent?.titleLabel,
|
|
181
|
+
numberOfCustomersText: hardCopyContent?.numberOfCustomersText,
|
|
180
182
|
customerQueryText: hardCopyContent?.customerQueryText,
|
|
181
183
|
primaryButtonText: hardCopyContent?.primaryButtonText,
|
|
182
184
|
secondaryButtonTitleText: hardCopyContent?.secondaryButtonTitleText,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 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_runtime14.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_runtime14.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_runtime13 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_runtime13.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_runtime13.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -27,7 +27,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
27
27
|
const variantInfo = useAtomValue(variantInfoAtom);
|
|
28
28
|
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
29
29
|
const { onClick: onSuggestionClick, onHover, onDrag, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.SOCIAL_PROOF, (text) => text);
|
|
30
|
-
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
30
|
+
const { hardcopyContent: rawHardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
31
31
|
const socialProofWidgetConfig = widgetConfig;
|
|
32
32
|
const id = widgetConfig?.contentId;
|
|
33
33
|
const { pageVariant, countKey } = useMemo(() => {
|
|
@@ -45,12 +45,13 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
45
45
|
};
|
|
46
46
|
}, [variantInfo]);
|
|
47
47
|
const hardCopyContent = {
|
|
48
|
-
titleLabel:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
titleLabel: rawHardcopyContent?.values?.titleLabel,
|
|
49
|
+
numberOfCustomersText: rawHardcopyContent?.values.numberOfCustomersText,
|
|
50
|
+
customerQueryText: rawHardcopyContent?.values?.customerQueryText,
|
|
51
|
+
primaryButtonText: rawHardcopyContent?.values?.primaryButtonText,
|
|
52
|
+
secondaryButtonTitleText: rawHardcopyContent?.values?.secondaryButtonTitleText,
|
|
53
|
+
secondaryButtonTexts: rawHardcopyContent?.values?.secondaryButtonTexts,
|
|
54
|
+
textFieldPlaceholderText: rawHardcopyContent?.values?.textFieldPlaceholderText
|
|
54
55
|
};
|
|
55
56
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
56
57
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
@@ -64,12 +65,12 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
64
65
|
}];
|
|
65
66
|
const { trackEvent } = useAmplitude();
|
|
66
67
|
const handlePrimaryButtonClick = useCallback((text) => {
|
|
67
|
-
const rawValues =
|
|
68
|
+
const rawValues = rawHardcopyContent?.rawValues;
|
|
68
69
|
const stringId = getStringIdForText(rawValues, text);
|
|
69
70
|
trackEvent({
|
|
70
71
|
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
71
72
|
eventProps: {
|
|
72
|
-
response_id:
|
|
73
|
+
response_id: rawHardcopyContent?.responseId,
|
|
73
74
|
string_id: stringId,
|
|
74
75
|
text
|
|
75
76
|
}
|
|
@@ -100,12 +101,12 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
100
101
|
});
|
|
101
102
|
}, []);
|
|
102
103
|
const handleSecondaryButtonClick = useCallback((text) => {
|
|
103
|
-
const rawValues =
|
|
104
|
+
const rawValues = rawHardcopyContent?.rawValues;
|
|
104
105
|
const stringId = getStringIdForText(rawValues, text);
|
|
105
106
|
trackEvent({
|
|
106
107
|
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
107
108
|
eventProps: {
|
|
108
|
-
response_id:
|
|
109
|
+
response_id: rawHardcopyContent?.responseId,
|
|
109
110
|
string_id: stringId,
|
|
110
111
|
text
|
|
111
112
|
}
|
|
@@ -151,8 +152,8 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
151
152
|
setChatPreviewLoadingData({
|
|
152
153
|
widgetConfigId,
|
|
153
154
|
data: {
|
|
154
|
-
titleLabel:
|
|
155
|
-
textFieldPlaceholder:
|
|
155
|
+
titleLabel: hardCopyContent?.titleLabel,
|
|
156
|
+
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholderText,
|
|
156
157
|
logoSrc,
|
|
157
158
|
hideLogo: hideLogo ?? false,
|
|
158
159
|
variant: socialProofWidgetConfig?.variant,
|
|
@@ -176,6 +177,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
176
177
|
};
|
|
177
178
|
const widgetContentProps = {
|
|
178
179
|
titleLabel: hardCopyContent?.titleLabel,
|
|
180
|
+
numberOfCustomersText: hardCopyContent?.numberOfCustomersText,
|
|
179
181
|
customerQueryText: hardCopyContent?.customerQueryText,
|
|
180
182
|
primaryButtonText: hardCopyContent?.primaryButtonText,
|
|
181
183
|
secondaryButtonTitleText: hardCopyContent?.secondaryButtonTitleText,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime0 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_runtime0.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#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/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_runtime0.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime3 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_runtime3.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime18.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime18.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_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
|
|
5
5
|
declare const TypingAnimationWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
interface TypingAnimationWidgetProps {
|
|
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
|
|
|
12
12
|
declare const TypingAnimationWidget: {
|
|
13
13
|
({
|
|
14
14
|
widgetConfigId
|
|
15
|
-
}: TypingAnimationWidgetProps):
|
|
15
|
+
}: TypingAnimationWidgetProps): react_jsx_runtime5.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
WidgetInteractionComponent,
|
|
16
16
|
WidgetInteractionType,
|
|
17
17
|
} from '@envive-ai/react-hooks/hooks/WidgetInteraction/types';
|
|
18
|
-
import { ProductCard } from '@envive-ai/react-toolkit-v3/ProductCard';
|
|
18
|
+
import { ProductCard, ProductCardVariant } from '@envive-ai/react-toolkit-v3/ProductCard';
|
|
19
19
|
import { PromptButtonVariant } from '@envive-ai/react-toolkit-v3/PromptButton/types';
|
|
20
20
|
import { usePromptCarouselAnalytics } from '@envive-ai/react-toolkit-v3/PromptCarousel';
|
|
21
21
|
import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
|
|
@@ -59,6 +59,7 @@ const ProductCardWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
59
59
|
const italicizeHeadline = productCardWidgetConfig?.italicizeHeadline;
|
|
60
60
|
const fallbackColor = productCardWidgetConfig?.fallbackColor;
|
|
61
61
|
const imageSrc = productCardWidgetConfig?.imageSrc || '';
|
|
62
|
+
const variant = (productCardWidgetConfig?.mode as ProductCardVariant) ?? ProductCardVariant.DARK;
|
|
62
63
|
const voiceInputEnabled = uiConfig?.lookAndFeel?.voiceInputEnabled;
|
|
63
64
|
const { featureFlagService } = useFeatureFlagService();
|
|
64
65
|
const isVoiceInputEnabled =
|
|
@@ -139,6 +140,7 @@ const ProductCardWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
139
140
|
return (
|
|
140
141
|
<ProductCard
|
|
141
142
|
theme={Theme.GLOBAL_CUSTOM}
|
|
143
|
+
variant={variant}
|
|
142
144
|
imageSrc={imageSrc}
|
|
143
145
|
fallbackColor={fallbackColor}
|
|
144
146
|
headline={headline}
|
|
@@ -53,7 +53,13 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
53
53
|
onTouchEnd,
|
|
54
54
|
} = usePromptCarouselAnalytics(WidgetInteractionComponent.SOCIAL_PROOF, text => text);
|
|
55
55
|
|
|
56
|
-
const {
|
|
56
|
+
const {
|
|
57
|
+
hardcopyContent: rawHardcopyContent,
|
|
58
|
+
widgetConfig,
|
|
59
|
+
uiConfig,
|
|
60
|
+
isLoading,
|
|
61
|
+
widgetConfigId,
|
|
62
|
+
} = props;
|
|
57
63
|
|
|
58
64
|
const socialProofWidgetConfig = widgetConfig as SocialProofWidgetV3Config;
|
|
59
65
|
|
|
@@ -79,15 +85,17 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
79
85
|
}, [variantInfo]);
|
|
80
86
|
|
|
81
87
|
const hardCopyContent = {
|
|
82
|
-
titleLabel:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
titleLabel: rawHardcopyContent?.values?.titleLabel,
|
|
89
|
+
numberOfCustomersText: rawHardcopyContent?.values.numberOfCustomersText,
|
|
90
|
+
customerQueryText: rawHardcopyContent?.values?.customerQueryText,
|
|
91
|
+
primaryButtonText: rawHardcopyContent?.values?.primaryButtonText,
|
|
92
|
+
secondaryButtonTitleText: rawHardcopyContent?.values?.secondaryButtonTitleText,
|
|
93
|
+
secondaryButtonTexts: rawHardcopyContent?.values?.secondaryButtonTexts,
|
|
94
|
+
textFieldPlaceholderText: rawHardcopyContent?.values?.textFieldPlaceholderText,
|
|
88
95
|
} as Pick<
|
|
89
96
|
SocialProofProps['widgetContentProps'],
|
|
90
97
|
| 'titleLabel'
|
|
98
|
+
| 'numberOfCustomersText'
|
|
91
99
|
| 'customerQueryText'
|
|
92
100
|
| 'primaryButtonText'
|
|
93
101
|
| 'secondaryButtonTitleText'
|
|
@@ -116,12 +124,12 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
116
124
|
|
|
117
125
|
const handlePrimaryButtonClick = useCallback(
|
|
118
126
|
(text: string) => {
|
|
119
|
-
const rawValues = (
|
|
127
|
+
const rawValues = (rawHardcopyContent as { rawValues?: RawValues } | undefined)?.rawValues;
|
|
120
128
|
const stringId = getStringIdForText(rawValues, text);
|
|
121
129
|
trackEvent({
|
|
122
130
|
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
123
131
|
eventProps: {
|
|
124
|
-
response_id:
|
|
132
|
+
response_id: rawHardcopyContent?.responseId,
|
|
125
133
|
string_id: stringId,
|
|
126
134
|
text,
|
|
127
135
|
},
|
|
@@ -166,12 +174,12 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
166
174
|
|
|
167
175
|
const handleSecondaryButtonClick = useCallback(
|
|
168
176
|
(text: string) => {
|
|
169
|
-
const rawValues = (
|
|
177
|
+
const rawValues = (rawHardcopyContent as { rawValues?: RawValues } | undefined)?.rawValues;
|
|
170
178
|
const stringId = getStringIdForText(rawValues, text);
|
|
171
179
|
trackEvent({
|
|
172
180
|
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
173
181
|
eventProps: {
|
|
174
|
-
response_id:
|
|
182
|
+
response_id: rawHardcopyContent?.responseId,
|
|
175
183
|
string_id: stringId,
|
|
176
184
|
text,
|
|
177
185
|
},
|
|
@@ -228,8 +236,8 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
228
236
|
setChatPreviewLoadingData({
|
|
229
237
|
widgetConfigId,
|
|
230
238
|
data: {
|
|
231
|
-
titleLabel:
|
|
232
|
-
textFieldPlaceholder:
|
|
239
|
+
titleLabel: hardCopyContent?.titleLabel as string,
|
|
240
|
+
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholderText as string,
|
|
233
241
|
logoSrc: logoSrc as string,
|
|
234
242
|
hideLogo: hideLogo ?? false,
|
|
235
243
|
variant: socialProofWidgetConfig?.variant,
|
|
@@ -256,6 +264,7 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
|
|
|
256
264
|
|
|
257
265
|
const widgetContentProps: SocialProofProps['widgetContentProps'] = {
|
|
258
266
|
titleLabel: hardCopyContent?.titleLabel,
|
|
267
|
+
numberOfCustomersText: hardCopyContent?.numberOfCustomersText,
|
|
259
268
|
customerQueryText: hardCopyContent?.customerQueryText,
|
|
260
269
|
primaryButtonText: hardCopyContent?.primaryButtonText,
|
|
261
270
|
secondaryButtonTitleText: hardCopyContent?.secondaryButtonTitleText,
|