@envive-ai/react-widgets-v3 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CXIntegration/hooks/useUnifiedCXButton.cjs +23 -0
- package/dist/CXIntegration/hooks/useUnifiedCXButton.js +22 -0
- package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.cjs +11 -0
- package/dist/CXIntegration/implementations/useDefaultUnifiedCXButton.js +10 -0
- package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.cjs +20 -0
- package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.js +19 -0
- package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.cjs +53 -0
- package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +52 -0
- package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.cjs +45 -0
- package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.js +44 -0
- package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.cjs +70 -0
- package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.js +69 -0
- package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.cjs +59 -0
- package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.js +58 -0
- package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.cjs +65 -0
- package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +64 -0
- package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.cjs +53 -0
- package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +52 -0
- package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.cjs +18 -0
- package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.js +17 -0
- package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.cjs +54 -0
- package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.js +53 -0
- package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.cjs +18 -0
- package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.js +17 -0
- package/dist/CXIntegration/types.cjs +19 -0
- package/dist/CXIntegration/types.js +18 -0
- package/dist/CXIntegration/utils/functions.cjs +30 -0
- package/dist/CXIntegration/utils/functions.js +30 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/hocs/withBaseWidget/index.cjs +3 -0
- package/dist/hocs/withBaseWidget/index.d.cts +3 -0
- package/dist/hocs/withBaseWidget/index.d.ts +3 -0
- package/dist/hocs/withBaseWidget/index.js +3 -0
- package/dist/hocs/withBaseWidget/types.d.cts +37 -0
- package/dist/hocs/withBaseWidget/types.d.ts +39 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.cjs +101 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +10 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +10 -0
- package/dist/hocs/withBaseWidget/withBaseWidget.js +100 -0
- package/dist/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
- package/dist/hooks/dist/application/models/frontendConfig.d.ts +1 -0
- package/dist/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
- package/dist/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
- package/dist/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +8 -0
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +11 -0
- package/dist/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
- package/dist/hooks/dist/contexts/types.d.cts +44 -0
- package/dist/hooks/dist/contexts/types.d.ts +47 -0
- package/dist/hooks/dist/contexts/typesV3.d.cts +201 -0
- package/dist/hooks/dist/contexts/typesV3.d.ts +201 -0
- package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.cts +36 -0
- package/dist/hooks/dist/services/amplitudeService/amplitudeService.d.ts +37 -0
- package/dist/hooks/dist/types/customerService.d.cts +18 -0
- package/dist/hooks/dist/types/customerService.d.ts +18 -0
- package/dist/stories/SalesAgentTest/index.cjs +0 -0
- package/dist/stories/SalesAgentTest/index.d.cts +1 -0
- package/dist/stories/SalesAgentTest/index.d.ts +1 -0
- package/dist/stories/SalesAgentTest/index.js +0 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +98 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +19 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +19 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +96 -0
- package/dist/widgets/ChatPreviewComparisonWidget/index.cjs +4 -0
- package/dist/widgets/ChatPreviewComparisonWidget/index.d.cts +2 -0
- package/dist/widgets/ChatPreviewComparisonWidget/index.d.ts +2 -0
- package/dist/widgets/ChatPreviewComparisonWidget/index.js +3 -0
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs +44 -0
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +16 -0
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +16 -0
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +42 -0
- package/dist/widgets/ChatPreviewLoadingWidget/index.cjs +4 -0
- package/dist/widgets/ChatPreviewLoadingWidget/index.d.cts +2 -0
- package/dist/widgets/ChatPreviewLoadingWidget/index.d.ts +2 -0
- package/dist/widgets/ChatPreviewLoadingWidget/index.js +3 -0
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +86 -0
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +19 -0
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +19 -0
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +84 -0
- package/dist/widgets/ChatPreviewWidget/index.cjs +4 -0
- package/dist/widgets/ChatPreviewWidget/index.d.cts +2 -0
- package/dist/widgets/ChatPreviewWidget/index.d.ts +2 -0
- package/dist/widgets/ChatPreviewWidget/index.js +3 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +66 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +64 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +70 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +10 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +10 -0
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +69 -0
- package/dist/widgets/FloatingChatWidget/constants.cjs +6 -0
- package/dist/widgets/FloatingChatWidget/constants.d.cts +4 -0
- package/dist/widgets/FloatingChatWidget/constants.d.ts +4 -0
- package/dist/widgets/FloatingChatWidget/constants.js +5 -0
- package/dist/widgets/FloatingChatWidget/index.cjs +5 -0
- package/dist/widgets/FloatingChatWidget/index.d.cts +3 -0
- package/dist/widgets/FloatingChatWidget/index.d.ts +3 -0
- package/dist/widgets/FloatingChatWidget/index.js +4 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +60 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +19 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +19 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +58 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/index.cjs +4 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.cts +2 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/index.d.ts +2 -0
- package/dist/widgets/PromptButtonCarouselWithImageWidget/index.js +3 -0
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +64 -0
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +14 -0
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +14 -0
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +63 -0
- package/dist/widgets/PromptCarouselWidget/index.cjs +3 -0
- package/dist/widgets/PromptCarouselWidget/index.d.cts +2 -0
- package/dist/widgets/PromptCarouselWidget/index.d.ts +2 -0
- package/dist/widgets/PromptCarouselWidget/index.js +3 -0
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +35 -0
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +14 -0
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +14 -0
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +34 -0
- package/dist/widgets/SocialProofFlowWidget/index.cjs +3 -0
- package/dist/widgets/SocialProofFlowWidget/index.d.cts +2 -0
- package/dist/widgets/SocialProofFlowWidget/index.d.ts +2 -0
- package/dist/widgets/SocialProofFlowWidget/index.js +3 -0
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +118 -0
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +19 -0
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +19 -0
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +116 -0
- package/dist/widgets/SocialProofWidget/index.cjs +4 -0
- package/dist/widgets/SocialProofWidget/index.d.cts +2 -0
- package/dist/widgets/SocialProofWidget/index.d.ts +2 -0
- package/dist/widgets/SocialProofWidget/index.js +3 -0
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +67 -0
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +14 -0
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +14 -0
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +66 -0
- package/dist/widgets/TitledPromptCarouselWidget/index.cjs +3 -0
- package/dist/widgets/TitledPromptCarouselWidget/index.d.cts +2 -0
- package/dist/widgets/TitledPromptCarouselWidget/index.d.ts +2 -0
- package/dist/widgets/TitledPromptCarouselWidget/index.js +3 -0
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +35 -0
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +14 -0
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +14 -0
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +34 -0
- package/dist/widgets/TypingAnimationFlowWidget/index.cjs +3 -0
- package/dist/widgets/TypingAnimationFlowWidget/index.d.cts +2 -0
- package/dist/widgets/TypingAnimationFlowWidget/index.d.ts +2 -0
- package/dist/widgets/TypingAnimationFlowWidget/index.js +3 -0
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +90 -0
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +19 -0
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +19 -0
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +88 -0
- package/dist/widgets/TypingAnimationWidget/index.cjs +4 -0
- package/dist/widgets/TypingAnimationWidget/index.d.cts +2 -0
- package/dist/widgets/TypingAnimationWidget/index.d.ts +2 -0
- package/dist/widgets/TypingAnimationWidget/index.js +3 -0
- package/dist/widgets/dist/SearchResults/SearchResults.d.cts +15 -0
- package/dist/widgets/dist/SearchResults/SearchResults.d.ts +15 -0
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +9 -0
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.ts +9 -0
- package/dist/widgets/dist/SearchResults/index.d.ts +2 -0
- package/dist/widgets/dist/SearchResults/types.d.cts +20 -0
- package/dist/widgets/dist/SearchResults/types.d.ts +20 -0
- package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.cts +10 -0
- package/dist/widgets/dist/SearchZeroState/SearchZeroState.d.ts +10 -0
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +18 -0
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +18 -0
- package/dist/widgets/dist/SearchZeroState/index.d.ts +4 -0
- package/dist/widgets/dist/SearchZeroState/types.d.cts +13 -0
- package/dist/widgets/dist/SearchZeroState/types.d.ts +13 -0
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +36 -0
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.ts +36 -0
- package/dist/widgets/dist/SuggestionBar/index.d.ts +2 -0
- package/dist/widgets/dist/SuggestionBar/types.d.cts +9 -0
- package/dist/widgets/dist/SuggestionBar/types.d.ts +9 -0
- package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.cts +9 -0
- package/dist/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +9 -0
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +20 -0
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.ts +20 -0
- package/dist/widgets/dist/config/BaseWidgetConfig.d.cts +13 -0
- package/dist/widgets/dist/config/BaseWidgetConfig.d.ts +13 -0
- package/dist/widgets/dist/config/WidgetType.d.cts +23 -0
- package/dist/widgets/dist/config/WidgetType.d.ts +23 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +15 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +73 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +25 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +35 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.ts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +11 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +11 -0
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
- package/dist/widgets/hooks/useGetWidgetStatus.cjs +27 -0
- package/dist/widgets/hooks/useGetWidgetStatus.js +26 -0
- package/dist/widgets/utils/functions.cjs +55 -0
- package/dist/widgets/utils/functions.js +48 -0
- package/dist/widgets-v2/SearchResults/index.cjs +5 -0
- package/dist/widgets-v2/SearchResults/index.d.cts +3 -0
- package/dist/widgets-v2/SearchResults/index.d.ts +4 -0
- package/dist/widgets-v2/SearchResults/index.js +3 -0
- package/dist/widgets-v2/SearchZeroState/index.cjs +8 -0
- package/dist/widgets-v2/SearchZeroState/index.d.cts +5 -0
- package/dist/widgets-v2/SearchZeroState/index.d.ts +6 -0
- package/dist/widgets-v2/SearchZeroState/index.js +3 -0
- package/dist/widgets-v2/SuggestionBar/index.cjs +5 -0
- package/dist/widgets-v2/SuggestionBar/index.d.cts +3 -0
- package/dist/widgets-v2/SuggestionBar/index.d.ts +4 -0
- package/dist/widgets-v2/SuggestionBar/index.js +3 -0
- package/dist/widgets-v2/SuggestionButtonContainer/index.cjs +5 -0
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.cts +3 -0
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +3 -0
- package/dist/widgets-v2/SuggestionButtonContainer/index.js +3 -0
- package/package.json +158 -0
- package/src/CXIntegration/hooks/useUnifiedCXButton.ts +38 -0
- package/src/CXIntegration/implementations/useDefaultUnifiedCXButton.ts +8 -0
- package/src/CXIntegration/implementations/useGladlyUnifiedCXButton.ts +28 -0
- package/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.ts +67 -0
- package/src/CXIntegration/implementations/useGrooveUnifiedCXButton.ts +83 -0
- package/src/CXIntegration/implementations/useKustomerUnifiedCXButton.ts +120 -0
- package/src/CXIntegration/implementations/useReDoUnifiedCXButton.ts +80 -0
- package/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts +83 -0
- package/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts +78 -0
- package/src/CXIntegration/implementations/useTidioUnifiedCXButton.ts +34 -0
- package/src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts +69 -0
- package/src/CXIntegration/implementations/useZowieUnifiedCXButton.ts +34 -0
- package/src/CXIntegration/types.ts +24 -0
- package/src/CXIntegration/utils/functions.ts +50 -0
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +689 -0
- package/src/hocs/withBaseWidget/index.ts +2 -0
- package/src/hocs/withBaseWidget/types.ts +39 -0
- package/src/hocs/withBaseWidget/withBaseWidget.tsx +126 -0
- package/src/stories/FloatingChatWidget.stories.tsx +56 -0
- package/src/stories/PromptButtonCarouselWithImageWidget.stories.tsx +54 -0
- package/src/stories/PromptCarouselWidget.stories.tsx +54 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.stories.tsx +18 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +111 -0
- package/src/stories/SalesAgentTest/index.ts +0 -0
- package/src/stories/SearchResults.stories.tsx +29 -0
- package/src/stories/SearchZeroState.stories.tsx +52 -0
- package/src/stories/SocialProofFlowWidget.stories.tsx +77 -0
- package/src/stories/SuggestionBar.stories.tsx +45 -0
- package/src/stories/TitledPromptCarouselWidget.stories.tsx +71 -0
- package/src/stories/TypingAnimationFlowWidget.stories.tsx +67 -0
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +152 -0
- package/src/widgets/ChatPreviewComparisonWidget/index.ts +7 -0
- package/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.tsx +82 -0
- package/src/widgets/ChatPreviewLoadingWidget/index.ts +7 -0
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +119 -0
- package/src/widgets/ChatPreviewWidget/index.ts +4 -0
- package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +115 -0
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +110 -0
- package/src/widgets/FloatingChatWidget/constants.ts +1 -0
- package/src/widgets/FloatingChatWidget/index.ts +5 -0
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +87 -0
- package/src/widgets/PromptButtonCarouselWithImageWidget/index.ts +6 -0
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +83 -0
- package/src/widgets/PromptCarouselWidget/index.ts +2 -0
- package/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.tsx +61 -0
- package/src/widgets/SocialProofFlowWidget/index.ts +4 -0
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +160 -0
- package/src/widgets/SocialProofWidget/index.ts +2 -0
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +93 -0
- package/src/widgets/TitledPromptCarouselWidget/index.ts +2 -0
- package/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.tsx +61 -0
- package/src/widgets/TypingAnimationFlowWidget/index.ts +4 -0
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +115 -0
- package/src/widgets/TypingAnimationWidget/index.ts +2 -0
- package/src/widgets/hooks/useGetWidgetStatus.tsx +29 -0
- package/src/widgets/utils/functions.ts +104 -0
- package/src/widgets-v2/SearchResults/index.ts +3 -0
- package/src/widgets-v2/SearchZeroState/index.ts +15 -0
- package/src/widgets-v2/SuggestionBar/index.ts +6 -0
- package/src/widgets-v2/SuggestionButtonContainer/index.ts +6 -0
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
6
|
+
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
7
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
8
|
+
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
9
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
10
|
+
let __envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage = require("@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage");
|
|
11
|
+
|
|
12
|
+
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
13
|
+
const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
14
|
+
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
15
|
+
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
16
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
17
|
+
const promptButtonCarouselWithImageWidgetConfig = widgetConfig;
|
|
18
|
+
const id = widgetConfig?.contentId;
|
|
19
|
+
const hardCopyContent = {
|
|
20
|
+
title: hardcopyContent?.values?.titleLabel,
|
|
21
|
+
promptButtonsTexts: hardcopyContent?.values?.promptButtonsTexts,
|
|
22
|
+
textFieldPlaceholder: hardcopyContent?.values?.textFieldPlaceholderText
|
|
23
|
+
};
|
|
24
|
+
const handlePromptButtonClick = (0, react.useCallback)((text) => {
|
|
25
|
+
onTypedMessageSubmitted({
|
|
26
|
+
query: text,
|
|
27
|
+
userTyped: false
|
|
28
|
+
});
|
|
29
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON);
|
|
30
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
31
|
+
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
32
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
33
|
+
}, [openChat]);
|
|
34
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptButtonCarouselWithImage.PromptButtonCarouselWithImage, {
|
|
35
|
+
id,
|
|
36
|
+
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
37
|
+
isLoading,
|
|
38
|
+
title: hardCopyContent?.title,
|
|
39
|
+
promptButtonsTexts: hardCopyContent?.promptButtonsTexts,
|
|
40
|
+
promptButtonType: promptButtonCarouselWithImageWidgetConfig?.promptButtonType,
|
|
41
|
+
imageSrc: promptButtonCarouselWithImageWidgetConfig?.image?.src,
|
|
42
|
+
alt: promptButtonCarouselWithImageWidgetConfig?.image?.alt,
|
|
43
|
+
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
44
|
+
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
45
|
+
handlePromptButtonClick,
|
|
46
|
+
handleTextFieldClick
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
const PromptButtonCarouselWithImageWidgetWithBaseWidget = require_withBaseWidget.withBaseWidget(PromptButtonCarouselWithImageWidgetHandler);
|
|
50
|
+
const PromptButtonCarouselWithImageWidget = ({ widgetConfigId }) => {
|
|
51
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromptButtonCarouselWithImageWidgetWithBaseWidget, {
|
|
52
|
+
widgetConfigId,
|
|
53
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.PromptButtonCarouselWithImageV3
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
PromptButtonCarouselWithImageWidget.displayName = "PromptButtonCarouselWithImageWidget";
|
|
57
|
+
|
|
58
|
+
//#endregion
|
|
59
|
+
exports.PromptButtonCarouselWithImageWidget = PromptButtonCarouselWithImageWidget;
|
|
60
|
+
exports.PromptButtonCarouselWithImageWidgetWithBaseWidget = PromptButtonCarouselWithImageWidgetWithBaseWidget;
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
|
+
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime14.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
interface PromptButtonCarouselWithImageWidgetProps {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
}
|
|
12
|
+
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
|
+
({
|
|
14
|
+
widgetConfigId
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime14.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { PromptButtonCarouselWithImageWidget, PromptButtonCarouselWithImageWidgetWithBaseWidget };
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
+
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts
|
|
5
|
+
declare const PromptButtonCarouselWithImageWidgetWithBaseWidget: {
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
interface PromptButtonCarouselWithImageWidgetProps {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
}
|
|
12
|
+
declare const PromptButtonCarouselWithImageWidget: {
|
|
13
|
+
({
|
|
14
|
+
widgetConfigId
|
|
15
|
+
}: PromptButtonCarouselWithImageWidgetProps): react_jsx_runtime11.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { PromptButtonCarouselWithImageWidget, PromptButtonCarouselWithImageWidgetWithBaseWidget };
|
package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
5
|
+
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
6
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
7
|
+
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
8
|
+
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
9
|
+
import { PromptButtonCarouselWithImage } from "@envive-ai/react-toolkit-v3/PromptButtonCarouselWithImage";
|
|
10
|
+
|
|
11
|
+
//#region src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx
|
|
12
|
+
const PromptButtonCarouselWithImageWidgetHandler = (props) => {
|
|
13
|
+
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
14
|
+
const { openChat } = useChatToggle();
|
|
15
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
16
|
+
const promptButtonCarouselWithImageWidgetConfig = widgetConfig;
|
|
17
|
+
const id = widgetConfig?.contentId;
|
|
18
|
+
const hardCopyContent = {
|
|
19
|
+
title: hardcopyContent?.values?.titleLabel,
|
|
20
|
+
promptButtonsTexts: hardcopyContent?.values?.promptButtonsTexts,
|
|
21
|
+
textFieldPlaceholder: hardcopyContent?.values?.textFieldPlaceholderText
|
|
22
|
+
};
|
|
23
|
+
const handlePromptButtonClick = useCallback((text) => {
|
|
24
|
+
onTypedMessageSubmitted({
|
|
25
|
+
query: text,
|
|
26
|
+
userTyped: false
|
|
27
|
+
});
|
|
28
|
+
openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON);
|
|
29
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
30
|
+
const handleTextFieldClick = useCallback(() => {
|
|
31
|
+
openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_TEXT_FIELD);
|
|
32
|
+
}, [openChat]);
|
|
33
|
+
return /* @__PURE__ */ jsx(PromptButtonCarouselWithImage, {
|
|
34
|
+
id,
|
|
35
|
+
theme: Theme.GLOBAL_CUSTOM,
|
|
36
|
+
isLoading,
|
|
37
|
+
title: hardCopyContent?.title,
|
|
38
|
+
promptButtonsTexts: hardCopyContent?.promptButtonsTexts,
|
|
39
|
+
promptButtonType: promptButtonCarouselWithImageWidgetConfig?.promptButtonType,
|
|
40
|
+
imageSrc: promptButtonCarouselWithImageWidgetConfig?.image?.src,
|
|
41
|
+
alt: promptButtonCarouselWithImageWidgetConfig?.image?.alt,
|
|
42
|
+
textFieldPlaceholder: hardCopyContent?.textFieldPlaceholder,
|
|
43
|
+
hideTextField: promptButtonCarouselWithImageWidgetConfig?.hideTextField,
|
|
44
|
+
handlePromptButtonClick,
|
|
45
|
+
handleTextFieldClick
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
const PromptButtonCarouselWithImageWidgetWithBaseWidget = withBaseWidget(PromptButtonCarouselWithImageWidgetHandler);
|
|
49
|
+
const PromptButtonCarouselWithImageWidget = ({ widgetConfigId }) => {
|
|
50
|
+
return /* @__PURE__ */ jsx(PromptButtonCarouselWithImageWidgetWithBaseWidget, {
|
|
51
|
+
widgetConfigId,
|
|
52
|
+
widgetType: WidgetTypeV3.PromptButtonCarouselWithImageV3
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
PromptButtonCarouselWithImageWidget.displayName = "PromptButtonCarouselWithImageWidget";
|
|
56
|
+
|
|
57
|
+
//#endregion
|
|
58
|
+
export { PromptButtonCarouselWithImageWidget, PromptButtonCarouselWithImageWidgetWithBaseWidget };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const require_PromptButtonCarouselWithImageWidget = require('./PromptButtonCarouselWithImageWidget.cjs');
|
|
2
|
+
|
|
3
|
+
exports.PromptButtonCarouselWithImageWidget = require_PromptButtonCarouselWithImageWidget.PromptButtonCarouselWithImageWidget;
|
|
4
|
+
exports.PromptButtonCarouselWithImageWidgetWithBaseWidget = require_PromptButtonCarouselWithImageWidget.PromptButtonCarouselWithImageWidgetWithBaseWidget;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
|
+
require('../../hocs/withBaseWidget/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
7
|
+
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
8
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
9
|
+
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
10
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
11
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel_types_types = require("@envive-ai/react-toolkit-v3/PromptCarousel/types/types");
|
|
12
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
13
|
+
|
|
14
|
+
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx
|
|
15
|
+
const mockButtonTexts = [
|
|
16
|
+
"Loading button 1",
|
|
17
|
+
"Loading button 2",
|
|
18
|
+
"Loading button 3",
|
|
19
|
+
"Loading button 4",
|
|
20
|
+
"Loading button 5"
|
|
21
|
+
];
|
|
22
|
+
const PromptCarouselWidgetHandler = (props) => {
|
|
23
|
+
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
24
|
+
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
25
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
26
|
+
const promptButtonTexts = hardcopyContent?.values?.promptButtonTexts || [];
|
|
27
|
+
const buttonTexts = isLoading ? mockButtonTexts : promptButtonTexts;
|
|
28
|
+
const promptCarouselWidgetConfig = widgetConfig;
|
|
29
|
+
const id = promptCarouselWidgetConfig?.contentId;
|
|
30
|
+
const boldFirstButton = promptCarouselWidgetConfig?.boldFirstButton;
|
|
31
|
+
const promptButtonType = promptCarouselWidgetConfig?.promptButtonType;
|
|
32
|
+
const promptCarouselRows = promptCarouselWidgetConfig?.promptCarouselRows;
|
|
33
|
+
const animationSpeed = isLoading ? __envive_ai_react_toolkit_v3_PromptCarousel_types_types.AnimationSpeed.FAST : promptCarouselWidgetConfig?.animationSpeed;
|
|
34
|
+
const handleButtonClick = (0, react.useCallback)((text) => {
|
|
35
|
+
onTypedMessageSubmitted({
|
|
36
|
+
query: text,
|
|
37
|
+
userTyped: false
|
|
38
|
+
});
|
|
39
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.PROMPT_CAROUSEL);
|
|
40
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_PromptCarousel.PromptCarousel, {
|
|
42
|
+
id,
|
|
43
|
+
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
44
|
+
isLoading,
|
|
45
|
+
boldFirstButton,
|
|
46
|
+
promptButtonType,
|
|
47
|
+
promptCarouselRows,
|
|
48
|
+
animationSpeed,
|
|
49
|
+
handleButtonClick,
|
|
50
|
+
promptButtonTexts: buttonTexts,
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
const PromptCarouselWidgetWithBaseWidget = require_withBaseWidget.withBaseWidget(PromptCarouselWidgetHandler);
|
|
55
|
+
const PromptCarouselWidget = ({ widgetConfigId }) => {
|
|
56
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromptCarouselWidgetWithBaseWidget, {
|
|
57
|
+
widgetConfigId,
|
|
58
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.PromptCarouselV3
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
PromptCarouselWidget.displayName = "PromptCarouselWidget";
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
exports.PromptCarouselWidget = PromptCarouselWidget;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
|
+
interface PromptCarouselWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const PromptCarouselWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime9.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PromptCarouselWidget, PromptCarouselWidgetProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts
|
|
4
|
+
interface PromptCarouselWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const PromptCarouselWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: PromptCarouselWidgetProps): react_jsx_runtime2.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { PromptCarouselWidget, PromptCarouselWidgetProps };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
|
+
import "../../hocs/withBaseWidget/index.js";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
6
|
+
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
7
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
8
|
+
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
9
|
+
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
10
|
+
import { AnimationSpeed } from "@envive-ai/react-toolkit-v3/PromptCarousel/types/types";
|
|
11
|
+
import { PromptCarousel } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
12
|
+
|
|
13
|
+
//#region src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx
|
|
14
|
+
const mockButtonTexts = [
|
|
15
|
+
"Loading button 1",
|
|
16
|
+
"Loading button 2",
|
|
17
|
+
"Loading button 3",
|
|
18
|
+
"Loading button 4",
|
|
19
|
+
"Loading button 5"
|
|
20
|
+
];
|
|
21
|
+
const PromptCarouselWidgetHandler = (props) => {
|
|
22
|
+
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
23
|
+
const { openChat } = useChatToggle();
|
|
24
|
+
const { hardcopyContent, widgetConfig, isLoading } = props;
|
|
25
|
+
const promptButtonTexts = hardcopyContent?.values?.promptButtonTexts || [];
|
|
26
|
+
const buttonTexts = isLoading ? mockButtonTexts : promptButtonTexts;
|
|
27
|
+
const promptCarouselWidgetConfig = widgetConfig;
|
|
28
|
+
const id = promptCarouselWidgetConfig?.contentId;
|
|
29
|
+
const boldFirstButton = promptCarouselWidgetConfig?.boldFirstButton;
|
|
30
|
+
const promptButtonType = promptCarouselWidgetConfig?.promptButtonType;
|
|
31
|
+
const promptCarouselRows = promptCarouselWidgetConfig?.promptCarouselRows;
|
|
32
|
+
const animationSpeed = isLoading ? AnimationSpeed.FAST : promptCarouselWidgetConfig?.animationSpeed;
|
|
33
|
+
const handleButtonClick = useCallback((text) => {
|
|
34
|
+
onTypedMessageSubmitted({
|
|
35
|
+
query: text,
|
|
36
|
+
userTyped: false
|
|
37
|
+
});
|
|
38
|
+
openChat(ChatElementDisplayLocationV3.PROMPT_CAROUSEL);
|
|
39
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
40
|
+
return /* @__PURE__ */ jsx(PromptCarousel, {
|
|
41
|
+
id,
|
|
42
|
+
theme: Theme.GLOBAL_CUSTOM,
|
|
43
|
+
isLoading,
|
|
44
|
+
boldFirstButton,
|
|
45
|
+
promptButtonType,
|
|
46
|
+
promptCarouselRows,
|
|
47
|
+
animationSpeed,
|
|
48
|
+
handleButtonClick,
|
|
49
|
+
promptButtonTexts: buttonTexts,
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
const PromptCarouselWidgetWithBaseWidget = withBaseWidget(PromptCarouselWidgetHandler);
|
|
54
|
+
const PromptCarouselWidget = ({ widgetConfigId }) => {
|
|
55
|
+
return /* @__PURE__ */ jsx(PromptCarouselWidgetWithBaseWidget, {
|
|
56
|
+
widgetConfigId,
|
|
57
|
+
widgetType: WidgetTypeV3.PromptCarouselV3
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
PromptCarouselWidget.displayName = "PromptCarouselWidget";
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
export { PromptCarouselWidget };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_useGetWidgetStatus = require('../hooks/useGetWidgetStatus.cjs');
|
|
3
|
+
const require_ChatPreviewLoadingWidget = require('../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.cjs');
|
|
4
|
+
const require_ChatPreviewWidget = require('../ChatPreviewWidget/ChatPreviewWidget.cjs');
|
|
5
|
+
const require_ChatPreviewComparisonWidget = require('../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs');
|
|
6
|
+
const require_SocialProofWidget = require('../SocialProofWidget/SocialProofWidget.cjs');
|
|
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
|
+
let __envive_ai_react_toolkit_v3_ChatPreviewLoading = require("@envive-ai/react-toolkit-v3/ChatPreviewLoading");
|
|
10
|
+
|
|
11
|
+
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.tsx
|
|
12
|
+
const SocialProofFlowWidget = ({ widgetConfigId }) => {
|
|
13
|
+
const { userHasInteractedValue, userHasNotInteractedValue, isLoadingValue, isProductComparisonValue } = require_useGetWidgetStatus.default();
|
|
14
|
+
if (userHasInteractedValue) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChatPreviewWidget.ChatPreviewWidgetWithBaseWidget, {
|
|
15
|
+
widgetConfigId,
|
|
16
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.ChatPreviewV3
|
|
17
|
+
});
|
|
18
|
+
if (userHasNotInteractedValue) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_SocialProofWidget.SocialProofWidgetWithBaseWidget, {
|
|
19
|
+
widgetConfigId,
|
|
20
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.SocialProofV3
|
|
21
|
+
});
|
|
22
|
+
if (isLoadingValue) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChatPreviewLoadingWidget.ChatPreviewLoadingWidgetWithBaseWidget, {
|
|
23
|
+
widgetConfigId,
|
|
24
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.ChatPreviewLoadingV3
|
|
25
|
+
});
|
|
26
|
+
if (isProductComparisonValue) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ChatPreviewComparisonWidget.ChatPreviewComparisonWidgetWithBaseWidget, {
|
|
27
|
+
widgetConfigId,
|
|
28
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.ChatPreviewComparisonV3
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ChatPreviewLoading.ChatPreviewLoading, { fullIsLoading: true });
|
|
31
|
+
};
|
|
32
|
+
SocialProofFlowWidget.displayName = "SocialProofFlowWidget";
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.SocialProofFlowWidget = SocialProofFlowWidget;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
|
+
interface SocialProofFlowWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const SocialProofFlowWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime1.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SocialProofFlowWidget, SocialProofFlowWidgetProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts
|
|
4
|
+
interface SocialProofFlowWidgetProps {
|
|
5
|
+
widgetConfigId: string;
|
|
6
|
+
}
|
|
7
|
+
declare const SocialProofFlowWidget: {
|
|
8
|
+
({
|
|
9
|
+
widgetConfigId
|
|
10
|
+
}: SocialProofFlowWidgetProps): react_jsx_runtime0.JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { SocialProofFlowWidget, SocialProofFlowWidgetProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import useGetWidgetStatus_default from "../hooks/useGetWidgetStatus.js";
|
|
2
|
+
import { ChatPreviewLoadingWidgetWithBaseWidget } from "../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js";
|
|
3
|
+
import { ChatPreviewWidgetWithBaseWidget } from "../ChatPreviewWidget/ChatPreviewWidget.js";
|
|
4
|
+
import { ChatPreviewComparisonWidgetWithBaseWidget } from "../ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js";
|
|
5
|
+
import { SocialProofWidgetWithBaseWidget } from "../SocialProofWidget/SocialProofWidget.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
8
|
+
import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
|
|
9
|
+
|
|
10
|
+
//#region src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.tsx
|
|
11
|
+
const SocialProofFlowWidget = ({ widgetConfigId }) => {
|
|
12
|
+
const { userHasInteractedValue, userHasNotInteractedValue, isLoadingValue, isProductComparisonValue } = useGetWidgetStatus_default();
|
|
13
|
+
if (userHasInteractedValue) return /* @__PURE__ */ jsx(ChatPreviewWidgetWithBaseWidget, {
|
|
14
|
+
widgetConfigId,
|
|
15
|
+
widgetType: WidgetTypeV3.ChatPreviewV3
|
|
16
|
+
});
|
|
17
|
+
if (userHasNotInteractedValue) return /* @__PURE__ */ jsx(SocialProofWidgetWithBaseWidget, {
|
|
18
|
+
widgetConfigId,
|
|
19
|
+
widgetType: WidgetTypeV3.SocialProofV3
|
|
20
|
+
});
|
|
21
|
+
if (isLoadingValue) return /* @__PURE__ */ jsx(ChatPreviewLoadingWidgetWithBaseWidget, {
|
|
22
|
+
widgetConfigId,
|
|
23
|
+
widgetType: WidgetTypeV3.ChatPreviewLoadingV3
|
|
24
|
+
});
|
|
25
|
+
if (isProductComparisonValue) return /* @__PURE__ */ jsx(ChatPreviewComparisonWidgetWithBaseWidget, {
|
|
26
|
+
widgetConfigId,
|
|
27
|
+
widgetType: WidgetTypeV3.ChatPreviewComparisonV3
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ jsx(ChatPreviewLoading, { fullIsLoading: true });
|
|
30
|
+
};
|
|
31
|
+
SocialProofFlowWidget.displayName = "SocialProofFlowWidget";
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { SocialProofFlowWidget };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_withBaseWidget = require('../../hocs/withBaseWidget/withBaseWidget.cjs');
|
|
3
|
+
const require_functions = require('../utils/functions.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
7
|
+
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
8
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
9
|
+
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
10
|
+
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
11
|
+
let jotai = require("jotai");
|
|
12
|
+
let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
|
|
13
|
+
let __envive_ai_react_toolkit_v3_ChatPreviewLoading = require("@envive-ai/react-toolkit-v3/ChatPreviewLoading");
|
|
14
|
+
let __envive_ai_react_hooks_atoms_widget = require("@envive-ai/react-hooks/atoms/widget");
|
|
15
|
+
let __envive_ai_react_toolkit_v3_SocialProof = require("@envive-ai/react-toolkit-v3/SocialProof");
|
|
16
|
+
|
|
17
|
+
//#region src/widgets/SocialProofWidget/SocialProofWidget.tsx
|
|
18
|
+
const SocialProofWidgetHandler = (props) => {
|
|
19
|
+
const setChatPreviewLoadingData = (0, jotai.useSetAtom)(__envive_ai_react_hooks_atoms_widget.chatPreviewLoadingDataAtom);
|
|
20
|
+
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
21
|
+
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
22
|
+
const lastAssistantMessage = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_chat.lastAssistantMessageAtom);
|
|
23
|
+
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
24
|
+
const socialProofWidgetConfig = widgetConfig;
|
|
25
|
+
const id = widgetConfig?.contentId;
|
|
26
|
+
const hardCopyContent = {
|
|
27
|
+
titleLabel: hardcopyContent?.values?.titleLabel,
|
|
28
|
+
numberOfCustomersText: hardcopyContent?.values?.numberOfCustomersText,
|
|
29
|
+
customerQueryText: hardcopyContent?.values?.customerQueryText,
|
|
30
|
+
primaryButtonText: hardcopyContent?.values?.primaryButtonText,
|
|
31
|
+
secondaryButtonTitleText: hardcopyContent?.values?.secondaryButtonTitleText,
|
|
32
|
+
secondaryButtonTexts: hardcopyContent?.values?.secondaryButtonTexts,
|
|
33
|
+
textFieldPlaceholderText: hardcopyContent?.values?.textFieldPlaceholderText
|
|
34
|
+
};
|
|
35
|
+
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
36
|
+
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
37
|
+
const dynamicImageUrl = require_functions.getProductImageUrl(lastAssistantMessage);
|
|
38
|
+
const images = socialProofWidgetConfig?.kind !== __envive_ai_react_hooks_contexts_typesV3.SocialProofWidgetKind.DYNAMIC ? socialProofWidgetConfig?.images : [{
|
|
39
|
+
src: dynamicImageUrl,
|
|
40
|
+
alt: "Product Image"
|
|
41
|
+
}];
|
|
42
|
+
const handlePrimaryButtonClick = (0, react.useCallback)((text) => {
|
|
43
|
+
onTypedMessageSubmitted({
|
|
44
|
+
query: text,
|
|
45
|
+
userTyped: false
|
|
46
|
+
});
|
|
47
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
|
|
48
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
49
|
+
const handleSecondaryButtonClick = (0, react.useCallback)((text) => {
|
|
50
|
+
onTypedMessageSubmitted({
|
|
51
|
+
query: text,
|
|
52
|
+
userTyped: false
|
|
53
|
+
});
|
|
54
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
|
|
55
|
+
}, [onTypedMessageSubmitted, openChat]);
|
|
56
|
+
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
57
|
+
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_TEXT_FIELD);
|
|
58
|
+
}, [openChat]);
|
|
59
|
+
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ChatPreviewLoading.ChatPreviewLoading, { fullIsLoading: true });
|
|
60
|
+
setChatPreviewLoadingData({
|
|
61
|
+
widgetConfigId,
|
|
62
|
+
data: {
|
|
63
|
+
titleLabel: hardcopyContent?.values?.titleLabel,
|
|
64
|
+
textFieldPlaceholder: hardcopyContent?.values?.textFieldPlaceholderText,
|
|
65
|
+
logoSrc,
|
|
66
|
+
hideLogo: hideLogo ?? false,
|
|
67
|
+
variant: socialProofWidgetConfig?.variant,
|
|
68
|
+
hexCardColor: socialProofWidgetConfig?.hexCardColor,
|
|
69
|
+
hideTextField: socialProofWidgetConfig?.hideTextField ?? false
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const widgetStyleProps = {
|
|
73
|
+
theme: __envive_ai_react_toolkit_v3_Tokens.Theme.GLOBAL_CUSTOM,
|
|
74
|
+
variant: socialProofWidgetConfig?.variant,
|
|
75
|
+
primaryButtonVariant: socialProofWidgetConfig?.primaryButtonVariant,
|
|
76
|
+
secondaryButtonVariant: socialProofWidgetConfig?.secondaryButtonVariant,
|
|
77
|
+
promptCarouselRows: socialProofWidgetConfig?.promptCarouselRows,
|
|
78
|
+
imageGalleryLayout: socialProofWidgetConfig?.imageGalleryLayout,
|
|
79
|
+
hideImage: images?.length === 0 || images === void 0 ? true : socialProofWidgetConfig?.hideImage,
|
|
80
|
+
hideTextField: socialProofWidgetConfig?.hideTextField,
|
|
81
|
+
hideLogo,
|
|
82
|
+
hexCardColor: socialProofWidgetConfig?.hexCardColor,
|
|
83
|
+
dynamicLayout: socialProofWidgetConfig?.dynamicLayout ?? void 0
|
|
84
|
+
};
|
|
85
|
+
const widgetContentProps = {
|
|
86
|
+
titleLabel: hardCopyContent?.titleLabel,
|
|
87
|
+
numberOfCustomersText: hardCopyContent?.numberOfCustomersText,
|
|
88
|
+
customerQueryText: hardCopyContent?.customerQueryText,
|
|
89
|
+
primaryButtonText: hardCopyContent?.primaryButtonText,
|
|
90
|
+
secondaryButtonTitleText: hardCopyContent?.secondaryButtonTitleText,
|
|
91
|
+
secondaryButtonTexts: hardCopyContent?.secondaryButtonTexts,
|
|
92
|
+
textFieldPlaceholderText: hardCopyContent?.textFieldPlaceholderText,
|
|
93
|
+
images: images ?? [],
|
|
94
|
+
logoSrc: logoSrc ?? void 0
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_SocialProof.SocialProof, {
|
|
97
|
+
baseProps: { id },
|
|
98
|
+
widgetStyleProps,
|
|
99
|
+
widgetContentProps,
|
|
100
|
+
widgetEventProps: {
|
|
101
|
+
handlePrimaryButtonClick,
|
|
102
|
+
handleSecondaryButtonClick,
|
|
103
|
+
handleTextFieldClick
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const SocialProofWidgetWithBaseWidget = require_withBaseWidget.withBaseWidget(SocialProofWidgetHandler);
|
|
108
|
+
const SocialProofWidget = ({ widgetConfigId }) => {
|
|
109
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SocialProofWidgetWithBaseWidget, {
|
|
110
|
+
widgetConfigId,
|
|
111
|
+
widgetType: __envive_ai_react_hooks_contexts_typesV3.WidgetTypeV3.SocialProofV3
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
SocialProofWidget.displayName = "SocialProofWidget";
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
exports.SocialProofWidget = SocialProofWidget;
|
|
118
|
+
exports.SocialProofWidgetWithBaseWidget = SocialProofWidgetWithBaseWidget;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
|
+
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
interface SocialProofWidgetProps {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
}
|
|
12
|
+
declare const SocialProofWidget: {
|
|
13
|
+
({
|
|
14
|
+
widgetConfigId
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { SocialProofWidget, SocialProofWidgetProps, SocialProofWidgetWithBaseWidget };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
+
import * as react_jsx_runtime7 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
|
+
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
interface SocialProofWidgetProps {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
}
|
|
12
|
+
declare const SocialProofWidget: {
|
|
13
|
+
({
|
|
14
|
+
widgetConfigId
|
|
15
|
+
}: SocialProofWidgetProps): react_jsx_runtime7.JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { SocialProofWidget, SocialProofWidgetProps, SocialProofWidgetWithBaseWidget };
|