@envive-ai/react-toolkit-v3 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AnimatedText/AnimatedText.d.cts +3 -3
- package/dist/AnimatedText/AnimatedText.d.ts +3 -3
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.cts +2 -2
- package/dist/CSSVariablesEditor/CssVariablesEditorComponent.d.ts +2 -2
- package/dist/Carousel/Carousel.d.cts +2 -2
- package/dist/Carousel/Carousel.d.ts +2 -2
- package/dist/ChatFooter/ChatFooter.d.cts +2 -2
- package/dist/ChatFooter/ChatFooter.d.ts +2 -2
- package/dist/ChatFooter/components/index.d.cts +5 -5
- package/dist/ChatFooter/components/index.d.ts +5 -5
- package/dist/ChatFooter/hooks/useGetContainerProperties.cjs +2 -2
- package/dist/ChatFooter/hooks/useGetContainerProperties.js +2 -2
- package/dist/ChatHeader/ChatHeader.cjs +3 -2
- package/dist/ChatHeader/ChatHeader.d.cts +3 -2
- package/dist/ChatHeader/ChatHeader.d.ts +3 -2
- package/dist/ChatHeader/ChatHeader.js +3 -2
- package/dist/ChatHeader/components/Handle.cjs +27 -1
- package/dist/ChatHeader/components/Handle.js +27 -1
- package/dist/ChatHeader/types/index.d.cts +2 -0
- package/dist/ChatHeader/types/index.d.ts +2 -0
- package/dist/ChatPreview/ChatPreview.d.cts +2 -2
- package/dist/ChatPreview/ChatPreview.d.ts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.cts +2 -2
- package/dist/ChatPreviewComparison/ChatPreviewComparison.d.ts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.cts +2 -2
- package/dist/ChatPreviewLoading/ChatPreviewLoading.d.ts +2 -2
- package/dist/Container/Container.d.cts +176 -176
- package/dist/Container/Container.d.ts +176 -176
- package/dist/DesignTokens/DesignTokensComponent.d.cts +2 -2
- package/dist/DesignTokens/DesignTokensComponent.d.ts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.cts +2 -2
- package/dist/DocumentRetrievalCard/DocumentRetrievalCard.d.ts +2 -2
- package/dist/FloatingButton/FloatingButton.cjs +2 -1
- package/dist/FloatingButton/FloatingButton.d.cts +4 -3
- package/dist/FloatingButton/FloatingButton.d.ts +4 -3
- package/dist/FloatingButton/FloatingButton.js +2 -1
- package/dist/FloatingButton/components/Container.cjs +2 -2
- package/dist/FloatingButton/components/Container.js +2 -2
- package/dist/FloatingButton/hooks/useGetContainerProperties.cjs +2 -2
- package/dist/FloatingButton/hooks/useGetContainerProperties.js +2 -2
- package/dist/FloatingButton/types/types.cjs +4 -4
- package/dist/FloatingButton/types/types.d.cts +8 -4
- package/dist/FloatingButton/types/types.d.ts +8 -4
- package/dist/FloatingButton/types/types.js +4 -4
- package/dist/FloatingChat/FloatingChat.cjs +106 -39
- package/dist/FloatingChat/FloatingChat.d.cts +3 -2
- package/dist/FloatingChat/FloatingChat.d.ts +3 -2
- package/dist/FloatingChat/FloatingChat.js +108 -41
- package/dist/FloatingChat/components/AgentMessage.cjs +3 -2
- package/dist/FloatingChat/components/AgentMessage.js +3 -2
- package/dist/FloatingChat/components/ChatMessages.cjs +59 -41
- package/dist/FloatingChat/components/ChatMessages.js +58 -40
- package/dist/FloatingChat/components/Layout.cjs +2 -2
- package/dist/FloatingChat/components/Layout.js +2 -2
- package/dist/FloatingChat/components/ModalSheet.cjs +184 -0
- package/dist/FloatingChat/components/ModalSheet.js +182 -0
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.cjs +3 -2
- package/dist/FloatingChat/components/SalesAgentProductCardsCarousel.js +3 -2
- package/dist/FloatingChat/components/index.cjs +1 -0
- package/dist/FloatingChat/components/index.js +1 -0
- package/dist/FloatingChat/hooks/useChatSuggestions.cjs +25 -0
- package/dist/FloatingChat/hooks/useChatSuggestions.js +24 -0
- package/dist/FloatingChat/hooks/useFilteredChatMessages.cjs +24 -0
- package/dist/FloatingChat/hooks/useFilteredChatMessages.js +23 -0
- package/dist/FloatingChat/hooks/usePreventScroll.cjs +117 -0
- package/dist/FloatingChat/hooks/usePreventScroll.js +116 -0
- package/dist/FloatingChat/hooks/useSnapCalculator.cjs +37 -0
- package/dist/FloatingChat/hooks/useSnapCalculator.js +35 -0
- package/dist/FloatingChat/hooks/useSnapControl.cjs +82 -0
- package/dist/FloatingChat/hooks/useSnapControl.js +81 -0
- package/dist/FloatingChat/hooks/useSnapSetup.cjs +59 -0
- package/dist/FloatingChat/hooks/useSnapSetup.js +58 -0
- package/dist/FloatingChat/types/types.d.cts +4 -0
- package/dist/FloatingChat/types/types.d.ts +4 -0
- package/dist/Image/Image.d.cts +2 -2
- package/dist/Image/Image.d.ts +2 -2
- package/dist/ImageGallery/ImageGallery.d.cts +2 -2
- package/dist/ImageGallery/ImageGallery.d.ts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.cts +2 -2
- package/dist/MarkdownProcessor/MarkdownProcessor.d.ts +2 -2
- package/dist/PromptButton/PromptButton.d.cts +2 -2
- package/dist/PromptButton/PromptButton.d.ts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.cts +2 -2
- package/dist/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts +2 -2
- package/dist/PromptCarousel/PromptCarousel.cjs +0 -1
- package/dist/PromptCarousel/PromptCarousel.d.cts +2 -2
- package/dist/PromptCarousel/PromptCarousel.d.ts +2 -2
- package/dist/PromptCarousel/PromptCarousel.js +0 -1
- package/dist/ReviewCard/ReviewCard.d.cts +2 -2
- package/dist/ReviewCard/ReviewCard.d.ts +2 -2
- package/dist/ReviewCard/components/index.d.cts +6 -6
- package/dist/ReviewCard/components/index.d.ts +6 -6
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.cts +2 -2
- package/dist/SalesAgentProductCard/SalesAgentProductCard.d.ts +2 -2
- package/dist/SalesAgentProductCard/components/index.d.cts +2 -2
- package/dist/SalesAgentProductCard/components/index.d.ts +8 -8
- package/dist/SocialProof/SocialProof.cjs +9 -2
- package/dist/SocialProof/SocialProof.d.cts +2 -2
- package/dist/SocialProof/SocialProof.d.ts +2 -2
- package/dist/SocialProof/SocialProof.js +9 -2
- package/dist/SocialProof/hooks/index.cjs +1 -0
- package/dist/SocialProof/hooks/index.js +3 -0
- package/dist/SocialProof/hooks/useSocialProofCount.cjs +48 -0
- package/dist/SocialProof/hooks/useSocialProofCount.d.cts +15 -0
- package/dist/SocialProof/hooks/useSocialProofCount.d.ts +15 -0
- package/dist/SocialProof/hooks/useSocialProofCount.js +46 -0
- package/dist/SocialProof/index.cjs +5 -1
- package/dist/SocialProof/index.d.cts +3 -2
- package/dist/SocialProof/index.d.ts +3 -2
- package/dist/SocialProof/index.js +4 -2
- package/dist/SocialProof/types/types.cjs +8 -1
- package/dist/SocialProof/types/types.d.cts +16 -6
- package/dist/SocialProof/types/types.d.ts +16 -6
- package/dist/SocialProof/types/types.js +7 -1
- package/dist/Stack/Stack.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.cts +2 -2
- package/dist/TitledPromptCarousel/TitledPromptCarousel.d.ts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.cts +2 -2
- package/dist/TypingAnimation/TypingAnimation.d.ts +2 -2
- package/dist/Typography/Typography.d.cts +4 -4
- package/dist/Typography/Typography.d.ts +4 -4
- package/dist/WidgetTextField/WidgetTextField.d.cts +2 -2
- package/dist/WidgetTextField/WidgetTextField.d.ts +2 -2
- package/dist/WidgetWrapper/WidgetWrapper.d.cts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.cts +2 -2
- package/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.d.ts +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ChatFooter/hooks/useGetContainerProperties.ts +2 -2
- package/src/components/ChatHeader/ChatHeader.tsx +2 -0
- package/src/components/ChatHeader/components/Handle.tsx +29 -1
- package/src/components/ChatHeader/types/index.ts +3 -0
- package/src/components/FloatingButton/FloatingButton.tsx +2 -0
- package/src/components/FloatingButton/components/Container.tsx +3 -0
- package/src/components/FloatingButton/hooks/useGetContainerProperties.ts +2 -1
- package/src/components/FloatingButton/types/types.ts +9 -4
- package/src/components/FloatingChat/FloatingChat.tsx +160 -59
- package/src/components/FloatingChat/components/AgentMessage.tsx +3 -0
- package/src/components/FloatingChat/components/ChatMessages.tsx +25 -0
- package/src/components/FloatingChat/components/Layout.tsx +2 -2
- package/src/components/FloatingChat/components/ModalSheet.tsx +288 -0
- package/src/components/FloatingChat/components/SalesAgentProductCardsCarousel.tsx +7 -2
- package/src/components/FloatingChat/components/index.ts +3 -0
- package/src/components/FloatingChat/hooks/useChatSuggestions.ts +49 -0
- package/src/components/FloatingChat/hooks/useFilteredChatMessages.ts +43 -0
- package/src/components/FloatingChat/hooks/usePreventScroll.ts +207 -0
- package/src/components/FloatingChat/hooks/useSnapCalculator.ts +41 -0
- package/src/components/FloatingChat/hooks/useSnapControl.ts +131 -0
- package/src/components/FloatingChat/hooks/useSnapSetup.ts +106 -0
- package/src/components/FloatingChat/types/types.ts +4 -0
- package/src/components/PromptCarousel/PromptCarousel.tsx +0 -1
- package/src/components/SocialProof/SocialProof.tsx +8 -2
- package/src/components/SocialProof/__tests__/SocialProof.test.tsx +66 -17
- package/src/components/SocialProof/hooks/index.ts +2 -0
- package/src/components/SocialProof/hooks/useSocialProofCount.ts +67 -0
- package/src/components/SocialProof/index.ts +2 -1
- package/src/components/SocialProof/types/types.ts +18 -6
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useCheckIsMobile } from "../../utils/useCheckIsMobile.js";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { useMotionValue, useTransform } from "framer-motion";
|
|
4
|
+
|
|
5
|
+
//#region src/components/FloatingChat/hooks/useSnapSetup.ts
|
|
6
|
+
const useSnapSetup = ({ isFloatingChatOpen }) => {
|
|
7
|
+
const maxSwipeableViewHeight = 89;
|
|
8
|
+
const modalSheetControl = useRef(null);
|
|
9
|
+
const { viewportWidth } = useCheckIsMobile();
|
|
10
|
+
const isMobile = viewportWidth !== void 0 && viewportWidth < 512;
|
|
11
|
+
const shouldAutoExpand = Boolean(isMobile && window?._spiffy?.selectedCustomizeOption);
|
|
12
|
+
const snaps = shouldAutoExpand ? [43, 100] : [
|
|
13
|
+
0,
|
|
14
|
+
43,
|
|
15
|
+
100
|
|
16
|
+
];
|
|
17
|
+
const initialSnap = 1;
|
|
18
|
+
const [currentSnapPercentage, setCurrentSnapPercentage] = useState(snaps[initialSnap] || 43);
|
|
19
|
+
const animationKey = useMotionValue(0);
|
|
20
|
+
const snap43Percent = 57 / 100 * window.innerHeight;
|
|
21
|
+
const snap100Percent = 0;
|
|
22
|
+
const mobileHeaderHeight = useTransform(animationKey, [snap100Percent, snap43Percent], [56, 0]);
|
|
23
|
+
const [shouldShowHeader, setShouldShowHeader] = useState(false);
|
|
24
|
+
const [shouldShowScrolled, setShouldShowScrolled] = useState(false);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
return animationKey.on("change", (value) => {
|
|
27
|
+
setShouldShowHeader(value < snap43Percent - 10);
|
|
28
|
+
setShouldShowScrolled(value > snap43Percent);
|
|
29
|
+
});
|
|
30
|
+
}, [animationKey, snap43Percent]);
|
|
31
|
+
const isFullView = isMobile && currentSnapPercentage === 100;
|
|
32
|
+
const isPartialView = isMobile && currentSnapPercentage >= 0 && currentSnapPercentage <= 43;
|
|
33
|
+
const handleSnapChange = (snapPercentage) => {
|
|
34
|
+
setCurrentSnapPercentage(snapPercentage);
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
modalSheetControl,
|
|
38
|
+
maxSwipeableViewHeight,
|
|
39
|
+
isOpen: window?._spiffy?.selectedCustomizeOption === "SalesAgent" ? true : Boolean(isFloatingChatOpen),
|
|
40
|
+
isMobile,
|
|
41
|
+
snaps,
|
|
42
|
+
initialSnap,
|
|
43
|
+
shouldAutoExpand,
|
|
44
|
+
currentSnapPercentage,
|
|
45
|
+
handleSnapChange,
|
|
46
|
+
animationKey,
|
|
47
|
+
mobileHeaderHeight,
|
|
48
|
+
snap43Percent,
|
|
49
|
+
snap100Percent,
|
|
50
|
+
shouldShowHeader,
|
|
51
|
+
shouldShowScrolled,
|
|
52
|
+
isFullView,
|
|
53
|
+
isPartialView
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { useSnapSetup };
|
package/dist/Image/Image.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime21 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime21.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
package/dist/Image/Image.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Image/Image.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const Image: ({
|
|
|
25
25
|
role,
|
|
26
26
|
"aria-hidden": ariaHidden,
|
|
27
27
|
...rest
|
|
28
|
-
}: ImageProps) =>
|
|
28
|
+
}: ImageProps) => react_jsx_runtime20.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { Image };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ImageGallery/ImageGallery.d.ts
|
|
5
5
|
|
|
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
|
|
|
40
40
|
"aria-describedby": ariaDescribedBy,
|
|
41
41
|
role,
|
|
42
42
|
"aria-hidden": ariaHidden
|
|
43
|
-
}: ImageGalleryProps) =>
|
|
43
|
+
}: ImageGalleryProps) => react_jsx_runtime26.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageGalleryProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime30 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ImageGallery/ImageGallery.d.ts
|
|
5
5
|
|
|
@@ -40,6 +40,6 @@ declare const ImageGallery: ({
|
|
|
40
40
|
"aria-describedby": ariaDescribedBy,
|
|
41
41
|
role,
|
|
42
42
|
"aria-hidden": ariaHidden
|
|
43
|
-
}: ImageGalleryProps) =>
|
|
43
|
+
}: ImageGalleryProps) => react_jsx_runtime30.JSX.Element;
|
|
44
44
|
//#endregion
|
|
45
45
|
export { ImageGallery };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime20 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -9,6 +9,6 @@ declare const MarkdownProcessor: ({
|
|
|
9
9
|
textVariant,
|
|
10
10
|
subTextVariant,
|
|
11
11
|
subTextColor
|
|
12
|
-
}: MarkdownProcessorProps) =>
|
|
12
|
+
}: MarkdownProcessorProps) => react_jsx_runtime20.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MarkdownProcessorProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime19 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/MarkdownProcessor/MarkdownProcessor.d.ts
|
|
5
5
|
declare const MarkdownProcessor: ({
|
|
@@ -9,6 +9,6 @@ declare const MarkdownProcessor: ({
|
|
|
9
9
|
textVariant,
|
|
10
10
|
subTextVariant,
|
|
11
11
|
subTextColor
|
|
12
|
-
}: MarkdownProcessorProps) =>
|
|
12
|
+
}: MarkdownProcessorProps) => react_jsx_runtime19.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MarkdownProcessor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -16,6 +16,6 @@ declare const PromptButton: ({
|
|
|
16
16
|
onClick,
|
|
17
17
|
ariaLabel,
|
|
18
18
|
ariaDescribedBy
|
|
19
|
-
}: PromptButtonProps) =>
|
|
19
|
+
}: PromptButtonProps) => react_jsx_runtime17.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonProps } from "./types/index.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButton/PromptButton.d.ts
|
|
5
5
|
declare const PromptButton: ({
|
|
@@ -16,6 +16,6 @@ declare const PromptButton: ({
|
|
|
16
16
|
onClick,
|
|
17
17
|
ariaLabel,
|
|
18
18
|
ariaDescribedBy
|
|
19
|
-
}: PromptButtonProps) =>
|
|
19
|
+
}: PromptButtonProps) => react_jsx_runtime14.JSX.Element;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { PromptButton };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonCarouselWithImageProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImage: ({
|
|
@@ -18,6 +18,6 @@ declare const PromptButtonCarouselWithImage: ({
|
|
|
18
18
|
handlePromptButtonClick,
|
|
19
19
|
textFieldPlaceholder,
|
|
20
20
|
handleTextFieldClick
|
|
21
|
-
}: PromptButtonCarouselWithImageProps) =>
|
|
21
|
+
}: PromptButtonCarouselWithImageProps) => react_jsx_runtime12.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PromptButtonCarouselWithImage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptButtonCarouselWithImageProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptButtonCarouselWithImage/PromptButtonCarouselWithImage.d.ts
|
|
5
5
|
declare const PromptButtonCarouselWithImage: ({
|
|
@@ -18,6 +18,6 @@ declare const PromptButtonCarouselWithImage: ({
|
|
|
18
18
|
handlePromptButtonClick,
|
|
19
19
|
textFieldPlaceholder,
|
|
20
20
|
handleTextFieldClick
|
|
21
|
-
}: PromptButtonCarouselWithImageProps) =>
|
|
21
|
+
}: PromptButtonCarouselWithImageProps) => react_jsx_runtime18.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PromptButtonCarouselWithImage };
|
|
@@ -31,7 +31,6 @@ const PromptCarousel = ({ id, theme = require_theme.Theme.GLOBAL_CUSTOM, testId,
|
|
|
31
31
|
animationSpeed,
|
|
32
32
|
isAnimated: isAnimatedValue
|
|
33
33
|
});
|
|
34
|
-
console.log("PromptCarousel", promptButtonTexts, isLoading);
|
|
35
34
|
const { visibleButtonsFirstRow, visibleButtonsSecondRow } = require_useCarouselButtons.useCarouselButtons({
|
|
36
35
|
promptButtonTexts,
|
|
37
36
|
shouldShowTwoRows: shouldShowTwoRowsValue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptCarouselProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptCarousel/PromptCarousel.d.ts
|
|
5
5
|
declare const PromptCarousel: ({
|
|
@@ -19,6 +19,6 @@ declare const PromptCarousel: ({
|
|
|
19
19
|
"aria-labelledby": ariaLabelledBy,
|
|
20
20
|
"aria-describedby": ariaDescribedBy,
|
|
21
21
|
role
|
|
22
|
-
}: PromptCarouselProps) =>
|
|
22
|
+
}: PromptCarouselProps) => react_jsx_runtime6.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { PromptCarousel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PromptCarouselProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime16 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/PromptCarousel/PromptCarousel.d.ts
|
|
5
5
|
declare const PromptCarousel: ({
|
|
@@ -19,6 +19,6 @@ declare const PromptCarousel: ({
|
|
|
19
19
|
"aria-labelledby": ariaLabelledBy,
|
|
20
20
|
"aria-describedby": ariaDescribedBy,
|
|
21
21
|
role
|
|
22
|
-
}: PromptCarouselProps) =>
|
|
22
|
+
}: PromptCarouselProps) => react_jsx_runtime16.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
export { PromptCarousel };
|
|
@@ -30,7 +30,6 @@ const PromptCarousel = ({ id, theme = Theme.GLOBAL_CUSTOM, testId, className, st
|
|
|
30
30
|
animationSpeed,
|
|
31
31
|
isAnimated: isAnimatedValue
|
|
32
32
|
});
|
|
33
|
-
console.log("PromptCarousel", promptButtonTexts, isLoading);
|
|
34
33
|
const { visibleButtonsFirstRow, visibleButtonsSecondRow } = useCarouselButtons({
|
|
35
34
|
promptButtonTexts,
|
|
36
35
|
shouldShowTwoRows: shouldShowTwoRowsValue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReviewCardProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ReviewCard/ReviewCard.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const ReviewCard: ({
|
|
|
25
25
|
readMoreLabel,
|
|
26
26
|
readLessLabel,
|
|
27
27
|
verifiedBuyerLabel
|
|
28
|
-
}: ReviewCardProps) =>
|
|
28
|
+
}: ReviewCardProps) => react_jsx_runtime13.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ReviewCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReviewCardProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime12 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ReviewCard/ReviewCard.d.ts
|
|
5
5
|
|
|
@@ -25,6 +25,6 @@ declare const ReviewCard: ({
|
|
|
25
25
|
readMoreLabel,
|
|
26
26
|
readLessLabel,
|
|
27
27
|
verifiedBuyerLabel
|
|
28
|
-
}: ReviewCardProps) =>
|
|
28
|
+
}: ReviewCardProps) => react_jsx_runtime12.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { ReviewCard };
|
|
@@ -2,8 +2,8 @@ import { Theme } from "../../tokens/theme/theme.cjs";
|
|
|
2
2
|
import { ContainerProps } from "./Container.cjs";
|
|
3
3
|
import { RatingProps } from "./Rating.cjs";
|
|
4
4
|
import { ReadMoreButtonProps } from "./ReadMoreButton.cjs";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as react178 from "react";
|
|
6
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ReviewCard/components/index.d.ts
|
|
9
9
|
declare const ReviewCardComponents: {
|
|
@@ -31,12 +31,12 @@ declare const ReviewCardComponents: {
|
|
|
31
31
|
verifiedBuyerLabel?: string;
|
|
32
32
|
className?: string;
|
|
33
33
|
style?: React.CSSProperties;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime14.JSX.Element;
|
|
35
35
|
Rating: ({
|
|
36
36
|
rating,
|
|
37
37
|
theme,
|
|
38
38
|
style
|
|
39
|
-
}: RatingProps) =>
|
|
39
|
+
}: RatingProps) => react_jsx_runtime14.JSX.Element;
|
|
40
40
|
StarIcon: ({
|
|
41
41
|
theme,
|
|
42
42
|
style,
|
|
@@ -45,7 +45,7 @@ declare const ReviewCardComponents: {
|
|
|
45
45
|
theme: Theme;
|
|
46
46
|
style?: React.CSSProperties;
|
|
47
47
|
className?: string;
|
|
48
|
-
}) =>
|
|
48
|
+
}) => react178.ReactElement<react178.SVGProps<SVGSVGElement>, string | react178.JSXElementConstructor<any>>;
|
|
49
49
|
ReviewText: ({
|
|
50
50
|
reviewText,
|
|
51
51
|
isExpanded,
|
|
@@ -56,7 +56,7 @@ declare const ReviewCardComponents: {
|
|
|
56
56
|
isExpanded: boolean;
|
|
57
57
|
className?: string;
|
|
58
58
|
style?: React.CSSProperties;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime14.JSX.Element;
|
|
60
60
|
ReadMoreButton: ({
|
|
61
61
|
isExpanded,
|
|
62
62
|
onToggle,
|
|
@@ -2,8 +2,8 @@ import { Theme } from "../../tokens/theme/theme.js";
|
|
|
2
2
|
import { ContainerProps } from "./Container.js";
|
|
3
3
|
import { RatingProps } from "./Rating.js";
|
|
4
4
|
import { ReadMoreButtonProps } from "./ReadMoreButton.js";
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
5
|
+
import * as react7 from "react";
|
|
6
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
7
7
|
|
|
8
8
|
//#region src/components/ReviewCard/components/index.d.ts
|
|
9
9
|
declare const ReviewCardComponents: {
|
|
@@ -31,12 +31,12 @@ declare const ReviewCardComponents: {
|
|
|
31
31
|
verifiedBuyerLabel?: string;
|
|
32
32
|
className?: string;
|
|
33
33
|
style?: React.CSSProperties;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime9.JSX.Element;
|
|
35
35
|
Rating: ({
|
|
36
36
|
rating,
|
|
37
37
|
theme,
|
|
38
38
|
style
|
|
39
|
-
}: RatingProps) =>
|
|
39
|
+
}: RatingProps) => react_jsx_runtime9.JSX.Element;
|
|
40
40
|
StarIcon: ({
|
|
41
41
|
theme,
|
|
42
42
|
style,
|
|
@@ -45,7 +45,7 @@ declare const ReviewCardComponents: {
|
|
|
45
45
|
theme: Theme;
|
|
46
46
|
style?: React.CSSProperties;
|
|
47
47
|
className?: string;
|
|
48
|
-
}) =>
|
|
48
|
+
}) => react7.ReactElement<react7.SVGProps<SVGSVGElement>, string | react7.JSXElementConstructor<any>>;
|
|
49
49
|
ReviewText: ({
|
|
50
50
|
reviewText,
|
|
51
51
|
isExpanded,
|
|
@@ -56,7 +56,7 @@ declare const ReviewCardComponents: {
|
|
|
56
56
|
isExpanded: boolean;
|
|
57
57
|
className?: string;
|
|
58
58
|
style?: React.CSSProperties;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime9.JSX.Element;
|
|
60
60
|
ReadMoreButton: ({
|
|
61
61
|
isExpanded,
|
|
62
62
|
onToggle,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SalesAgentProductCardProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SalesAgentProductCard/SalesAgentProductCard.d.ts
|
|
5
5
|
|
|
@@ -29,6 +29,6 @@ declare const SalesAgentProductCard: ({
|
|
|
29
29
|
image,
|
|
30
30
|
url,
|
|
31
31
|
onClick
|
|
32
|
-
}: SalesAgentProductCardProps) =>
|
|
32
|
+
}: SalesAgentProductCardProps) => react_jsx_runtime4.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { SalesAgentProductCard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SalesAgentProductCardProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime6 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SalesAgentProductCard/SalesAgentProductCard.d.ts
|
|
5
5
|
|
|
@@ -29,6 +29,6 @@ declare const SalesAgentProductCard: ({
|
|
|
29
29
|
image,
|
|
30
30
|
url,
|
|
31
31
|
onClick
|
|
32
|
-
}: SalesAgentProductCardProps) =>
|
|
32
|
+
}: SalesAgentProductCardProps) => react_jsx_runtime6.JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { SalesAgentProductCard };
|
|
@@ -4,7 +4,7 @@ import { ProductNameProps } from "./ProductName.cjs";
|
|
|
4
4
|
import { PriceProps } from "./Price.cjs";
|
|
5
5
|
import { RateProps } from "./Rate.cjs";
|
|
6
6
|
import { ProductImageProps } from "./ProductImage.cjs";
|
|
7
|
-
import * as
|
|
7
|
+
import * as react0 from "react";
|
|
8
8
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/SalesAgentProductCard/components/index.d.ts
|
|
@@ -54,7 +54,7 @@ declare const SalesAgentProductCardComponents: {
|
|
|
54
54
|
}: {
|
|
55
55
|
theme: Theme;
|
|
56
56
|
style?: React.CSSProperties;
|
|
57
|
-
}) =>
|
|
57
|
+
}) => react0.ReactElement<react0.SVGProps<SVGSVGElement>, string | react0.JSXElementConstructor<any>>;
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
export { SalesAgentProductCardComponents };
|
|
@@ -4,8 +4,8 @@ import { ProductNameProps } from "./ProductName.js";
|
|
|
4
4
|
import { PriceProps } from "./Price.js";
|
|
5
5
|
import { RateProps } from "./Rate.js";
|
|
6
6
|
import { ProductImageProps } from "./ProductImage.js";
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
7
|
+
import * as react2 from "react";
|
|
8
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
9
9
|
|
|
10
10
|
//#region src/components/SalesAgentProductCard/components/index.d.ts
|
|
11
11
|
declare const SalesAgentProductCardComponents: {
|
|
@@ -22,24 +22,24 @@ declare const SalesAgentProductCardComponents: {
|
|
|
22
22
|
image,
|
|
23
23
|
url,
|
|
24
24
|
onClick
|
|
25
|
-
}: ContainerProps) =>
|
|
25
|
+
}: ContainerProps) => react_jsx_runtime1.JSX.Element;
|
|
26
26
|
ProductName: ({
|
|
27
27
|
label,
|
|
28
28
|
theme,
|
|
29
29
|
style,
|
|
30
30
|
className
|
|
31
|
-
}: ProductNameProps) =>
|
|
31
|
+
}: ProductNameProps) => react_jsx_runtime1.JSX.Element;
|
|
32
32
|
Price: ({
|
|
33
33
|
previousPrice,
|
|
34
34
|
currentPrice,
|
|
35
35
|
pricePrefix,
|
|
36
36
|
forceShowCurrentPriceSpace
|
|
37
|
-
}: PriceProps) =>
|
|
37
|
+
}: PriceProps) => react_jsx_runtime1.JSX.Element;
|
|
38
38
|
Rate: ({
|
|
39
39
|
rate,
|
|
40
40
|
numberOfReviews,
|
|
41
41
|
theme
|
|
42
|
-
}: RateProps) =>
|
|
42
|
+
}: RateProps) => react_jsx_runtime1.JSX.Element;
|
|
43
43
|
ProductImage: ({
|
|
44
44
|
src,
|
|
45
45
|
alt,
|
|
@@ -47,14 +47,14 @@ declare const SalesAgentProductCardComponents: {
|
|
|
47
47
|
aspectRatio,
|
|
48
48
|
className,
|
|
49
49
|
...props
|
|
50
|
-
}: ProductImageProps) =>
|
|
50
|
+
}: ProductImageProps) => react_jsx_runtime1.JSX.Element;
|
|
51
51
|
StarIcon: ({
|
|
52
52
|
theme,
|
|
53
53
|
style
|
|
54
54
|
}: {
|
|
55
55
|
theme: Theme;
|
|
56
56
|
style?: React.CSSProperties;
|
|
57
|
-
}) =>
|
|
57
|
+
}) => react2.ReactElement<react2.SVGProps<SVGSVGElement>, string | react2.JSXElementConstructor<any>>;
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
export { SalesAgentProductCardComponents };
|
|
@@ -12,13 +12,20 @@ require('../WidgetWrapper/index.cjs');
|
|
|
12
12
|
const require_WidgetWrapperWithTitle = require('../WidgetWrapperWithTitle/WidgetWrapperWithTitle.cjs');
|
|
13
13
|
const require_types$1 = require('../ImageGallery/types/types.cjs');
|
|
14
14
|
const require_index = require('./components/index.cjs');
|
|
15
|
+
const require_useSocialProofCount = require('./hooks/useSocialProofCount.cjs');
|
|
16
|
+
require('./hooks/index.cjs');
|
|
15
17
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
16
18
|
|
|
17
19
|
//#region src/components/SocialProof/SocialProof.tsx
|
|
18
20
|
const SocialProof = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
|
|
19
|
-
const { id, testId, className, style } = baseProps ?? {};
|
|
21
|
+
const { id, testId, className, style, pageVariant, countKey } = baseProps ?? {};
|
|
20
22
|
const { theme = require_theme.Theme.GLOBAL_CUSTOM, variant = require_types.WidgetWrapperVariant.CARD_WITH_BORDER, hexCardColor, promptCarouselRows = require_PromptCarousel_types_types.PromptCarouselRows.TWO_ON_MOBILE_ONE_ON_DESKTOP, hideImage, imageGalleryLayout, hideTextField, primaryButtonVariant = require_PromptButton_types_index.PromptButtonVariant.DARK, secondaryButtonVariant = require_PromptButton_types_index.PromptButtonVariant.LIGHT, hideLogo, dynamicLayout } = widgetStyleProps ?? {};
|
|
21
|
-
const {
|
|
23
|
+
const { customerQueryText, primaryButtonText, secondaryButtonTitleText, secondaryButtonTexts, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
|
|
24
|
+
const numberOfCustomersText = require_useSocialProofCount.useSocialProofCount({
|
|
25
|
+
pageVariant,
|
|
26
|
+
countKey,
|
|
27
|
+
id
|
|
28
|
+
});
|
|
22
29
|
const { handlePrimaryButtonClick, handleSecondaryButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
|
|
23
30
|
const finalTheme = require_resolveTheme.resolveTheme(theme);
|
|
24
31
|
const { isMobile } = require_useCheckIsMobile.useCheckIsMobile("sm");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SocialProofProps } from "./types/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SocialProof/SocialProof.d.ts
|
|
5
5
|
declare const SocialProof: ({
|
|
@@ -7,6 +7,6 @@ declare const SocialProof: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: SocialProofProps) =>
|
|
10
|
+
}: SocialProofProps) => react_jsx_runtime5.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SocialProof };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SocialProofProps } from "./types/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime17 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/SocialProof/SocialProof.d.ts
|
|
5
5
|
declare const SocialProof: ({
|
|
@@ -7,6 +7,6 @@ declare const SocialProof: ({
|
|
|
7
7
|
widgetContentProps,
|
|
8
8
|
widgetStyleProps,
|
|
9
9
|
widgetEventProps
|
|
10
|
-
}: SocialProofProps) =>
|
|
10
|
+
}: SocialProofProps) => react_jsx_runtime17.JSX.Element;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SocialProof };
|
|
@@ -11,13 +11,20 @@ import "../WidgetWrapper/index.js";
|
|
|
11
11
|
import { WidgetWrapperWithTitle } from "../WidgetWrapperWithTitle/WidgetWrapperWithTitle.js";
|
|
12
12
|
import { ImageGalleryLayout } from "../ImageGallery/types/types.js";
|
|
13
13
|
import { SocialProofComponents } from "./components/index.js";
|
|
14
|
+
import { useSocialProofCount } from "./hooks/useSocialProofCount.js";
|
|
15
|
+
import "./hooks/index.js";
|
|
14
16
|
import { jsx } from "react/jsx-runtime";
|
|
15
17
|
|
|
16
18
|
//#region src/components/SocialProof/SocialProof.tsx
|
|
17
19
|
const SocialProof = ({ baseProps, widgetContentProps, widgetStyleProps, widgetEventProps }) => {
|
|
18
|
-
const { id, testId, className, style } = baseProps ?? {};
|
|
20
|
+
const { id, testId, className, style, pageVariant, countKey } = baseProps ?? {};
|
|
19
21
|
const { theme = Theme.GLOBAL_CUSTOM, variant = WidgetWrapperVariant.CARD_WITH_BORDER, hexCardColor, promptCarouselRows = PromptCarouselRows.TWO_ON_MOBILE_ONE_ON_DESKTOP, hideImage, imageGalleryLayout, hideTextField, primaryButtonVariant = PromptButtonVariant.DARK, secondaryButtonVariant = PromptButtonVariant.LIGHT, hideLogo, dynamicLayout } = widgetStyleProps ?? {};
|
|
20
|
-
const {
|
|
22
|
+
const { customerQueryText, primaryButtonText, secondaryButtonTitleText, secondaryButtonTexts, textFieldPlaceholderText, images, logoSrc, titleLabel } = widgetContentProps ?? {};
|
|
23
|
+
const numberOfCustomersText = useSocialProofCount({
|
|
24
|
+
pageVariant,
|
|
25
|
+
countKey,
|
|
26
|
+
id
|
|
27
|
+
});
|
|
21
28
|
const { handlePrimaryButtonClick, handleSecondaryButtonClick, handleTextFieldClick } = widgetEventProps ?? {};
|
|
22
29
|
const finalTheme = resolveTheme(theme);
|
|
23
30
|
const { isMobile } = useCheckIsMobile("sm");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_useSocialProofCount = require('./useSocialProofCount.cjs');
|