@envive-ai/react-widgets-v3 0.3.14 → 0.3.15-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debug/chatEmbed.cjs +1 -1
- package/dist/debug/chatEmbed.js +1 -1
- package/dist/debug/reportIssue.cjs +1 -1
- package/dist/debug/reportIssue.js +1 -1
- package/dist/hocs/withBaseWidget/types.d.cts +3 -3
- package/dist/hocs/withBaseWidget/types.d.ts +5 -3
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/hooks/dist/application/models/api/widgetText.d.cts +8 -0
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +12 -0
- package/dist/hooks/dist/contexts/types.d.cts +38 -0
- package/dist/hooks/dist/contexts/typesV3.d.cts +230 -0
- package/dist/hooks/dist/services/amplitudeService/eventNames.d.cts +43 -0
- package/dist/hooks/dist/types/customerService.d.cts +21 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +1 -0
- package/dist/packages/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
- package/dist/packages/hooks/dist/application/models/api/widgetText.d.ts +8 -0
- package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +1 -0
- package/dist/packages/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +14 -0
- package/dist/packages/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
- package/dist/packages/hooks/dist/contexts/types.d.ts +42 -0
- package/dist/packages/hooks/dist/contexts/typesV3.d.ts +230 -0
- package/dist/packages/hooks/dist/services/amplitudeService/amplitudeService.d.ts +1 -0
- package/dist/packages/hooks/dist/services/amplitudeService/eventNames.d.ts +43 -0
- package/dist/packages/hooks/dist/types/customerService.d.ts +21 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +5 -6
- package/dist/packages/icons/dist/IconCloseVariant.js +4 -6
- package/dist/packages/widgets/dist/SearchResults/SearchResults.d.ts +4 -3
- package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/index.d.ts +2 -1
- package/dist/packages/widgets/dist/SearchZeroState/types.d.ts +2 -2
- package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
- package/dist/packages/widgets/dist/SuggestionButtonContainer/index.d.ts +2 -0
- package/dist/packages/widgets/dist/SuggestionButtonContainer/types.d.ts +3 -2
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/types.d.ts +63 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +13 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/OrgInfo.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/index.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
- package/dist/src/CXIntegration/hooks/useUnifiedCXButton.d.ts +10 -0
- package/dist/src/CXIntegration/hooks/useUnifiedCXButton.js +29 -0
- package/dist/src/CXIntegration/implementations/useDefaultUnifiedCXButton.d.ts +2 -0
- package/dist/src/CXIntegration/implementations/useDefaultUnifiedCXButton.js +6 -0
- package/dist/src/CXIntegration/implementations/useEightByEightUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useEightByEightUnifiedCXButton.js +63 -0
- package/dist/src/CXIntegration/implementations/useGladlyUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useGladlyUnifiedCXButton.js +23 -0
- package/dist/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +54 -0
- package/dist/src/CXIntegration/implementations/useGrooveUnifiedCXButton.d.ts +18 -0
- package/dist/src/CXIntegration/implementations/useGrooveUnifiedCXButton.js +48 -0
- package/dist/src/CXIntegration/implementations/useHelpScoutUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useHelpScoutUnifiedCXButton.js +84 -0
- package/dist/src/CXIntegration/implementations/useKustomerUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useKustomerUnifiedCXButton.js +86 -0
- package/dist/src/CXIntegration/implementations/useReDoUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useReDoUnifiedCXButton.js +59 -0
- package/dist/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +62 -0
- package/dist/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +49 -0
- package/dist/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.js +77 -0
- package/dist/src/CXIntegration/implementations/useTidioUnifiedCXButton.d.ts +13 -0
- package/dist/src/CXIntegration/implementations/useTidioUnifiedCXButton.js +20 -0
- package/dist/src/CXIntegration/implementations/useZendeskUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useZendeskUnifiedCXButton.js +55 -0
- package/dist/src/CXIntegration/implementations/useZowieUnifiedCXButton.d.ts +13 -0
- package/dist/src/CXIntegration/implementations/useZowieUnifiedCXButton.js +20 -0
- package/dist/src/CXIntegration/types.d.ts +26 -0
- package/dist/src/CXIntegration/types.js +17 -0
- package/dist/src/CXIntegration/utils/functions.d.ts +2 -0
- package/dist/src/CXIntegration/utils/functions.js +57 -0
- package/dist/src/debug/GenericSelect.d.ts +11 -0
- package/dist/src/debug/GenericSelect.js +151 -0
- package/dist/src/debug/MessageContent.d.ts +4 -0
- package/dist/src/debug/MessageContent.js +87 -0
- package/dist/src/debug/chatEmbed.d.ts +2 -0
- package/dist/src/debug/chatEmbed.js +58 -0
- package/dist/src/debug/debugBar.d.ts +1 -0
- package/dist/src/debug/debugBar.js +9 -0
- package/dist/src/debug/reportIssue.d.ts +1 -0
- package/dist/src/debug/reportIssue.js +322 -0
- package/dist/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.d.ts +1 -0
- package/dist/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.js +452 -0
- package/dist/src/hocs/withBaseWidget/index.d.ts +2 -0
- package/dist/src/hocs/withBaseWidget/index.js +1 -0
- package/dist/src/hocs/withBaseWidget/types.d.ts +33 -0
- package/dist/src/hocs/withBaseWidget/types.js +0 -0
- package/dist/src/hocs/withBaseWidget/withBaseWidget.d.ts +5 -0
- package/dist/src/hocs/withBaseWidget/withBaseWidget.js +80 -0
- package/dist/src/stories/FloatingChatWidget.stories.d.ts +25 -0
- package/dist/src/stories/FloatingChatWidget.stories.js +44 -0
- package/dist/src/stories/FullPageSalesAgentWidget.stories.d.ts +31 -0
- package/dist/src/stories/FullPageSalesAgentWidget.stories.js +51 -0
- package/dist/src/stories/ProductCardWidget.stories.d.ts +31 -0
- package/dist/src/stories/ProductCardWidget.stories.js +44 -0
- package/dist/src/stories/PromptButtonCarouselWithImageWidget.stories.d.ts +31 -0
- package/dist/src/stories/PromptButtonCarouselWithImageWidget.stories.js +40 -0
- package/dist/src/stories/PromptCarouselWidget.stories.d.ts +31 -0
- package/dist/src/stories/PromptCarouselWidget.stories.js +40 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.d.ts +1 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.js +40 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.stories.d.ts +12 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.stories.js +12 -0
- package/dist/src/stories/SalesAgentTest/index.d.ts +0 -0
- package/dist/src/stories/SalesAgentTest/index.js +0 -0
- package/dist/src/stories/SearchResults.stories.d.ts +6 -0
- package/dist/src/stories/SearchResults.stories.js +23 -0
- package/dist/src/stories/SearchZeroState.stories.d.ts +38 -0
- package/dist/src/stories/SearchZeroState.stories.js +42 -0
- package/dist/src/stories/SocialProofFlowWidget.stories.d.ts +35 -0
- package/dist/src/stories/SocialProofFlowWidget.stories.js +60 -0
- package/dist/src/stories/SuggestionBar.stories.d.ts +7 -0
- package/dist/src/stories/SuggestionBar.stories.js +36 -0
- package/dist/src/stories/TitledPromptCarouselWidget.stories.d.ts +32 -0
- package/dist/src/stories/TitledPromptCarouselWidget.stories.js +55 -0
- package/dist/src/stories/TypingAnimationFlowWidget.stories.d.ts +34 -0
- package/dist/src/stories/TypingAnimationFlowWidget.stories.js +51 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +12 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +112 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/index.js +2 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +9 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +34 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/index.js +2 -0
- package/dist/src/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +12 -0
- package/dist/src/widgets/ChatPreviewWidget/ChatPreviewWidget.js +111 -0
- package/dist/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.d.ts +1 -0
- package/dist/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.js +97 -0
- package/dist/src/widgets/ChatPreviewWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewWidget/index.js +2 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatOverlay.d.ts +14 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatOverlay.js +44 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +8 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatWidget.js +134 -0
- package/dist/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.d.ts +1 -0
- package/dist/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.js +100 -0
- package/dist/src/widgets/FloatingChatWidget/constants.d.ts +1 -0
- package/dist/src/widgets/FloatingChatWidget/constants.js +1 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useAutoPopup.d.ts +4 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useAutoPopup.js +51 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.d.ts +11 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +21 -0
- package/dist/src/widgets/FloatingChatWidget/index.d.ts +4 -0
- package/dist/src/widgets/FloatingChatWidget/index.js +3 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +12 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +14 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/index.d.ts +1 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/index.js +1 -0
- package/dist/src/widgets/ProductCardWidget/ProductCardWidget.d.ts +7 -0
- package/dist/src/widgets/ProductCardWidget/ProductCardWidget.js +94 -0
- package/dist/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.d.ts +1 -0
- package/dist/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.js +106 -0
- package/dist/src/widgets/ProductCardWidget/index.d.ts +2 -0
- package/dist/src/widgets/ProductCardWidget/index.js +1 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +12 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +88 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.d.ts +1 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.js +132 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/index.d.ts +2 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/index.js +2 -0
- package/dist/src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +7 -0
- package/dist/src/widgets/PromptCarouselWidget/PromptCarouselWidget.js +74 -0
- package/dist/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.d.ts +1 -0
- package/dist/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.js +106 -0
- package/dist/src/widgets/PromptCarouselWidget/index.d.ts +2 -0
- package/dist/src/widgets/PromptCarouselWidget/index.js +1 -0
- package/dist/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +7 -0
- package/dist/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +25 -0
- package/dist/src/widgets/SocialProofFlowWidget/index.d.ts +3 -0
- package/dist/src/widgets/SocialProofFlowWidget/index.js +2 -0
- package/dist/src/widgets/SocialProofWidget/SocialProofWidget.d.ts +12 -0
- package/dist/src/widgets/SocialProofWidget/SocialProofWidget.js +203 -0
- package/dist/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.d.ts +1 -0
- package/dist/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.js +135 -0
- package/dist/src/widgets/SocialProofWidget/index.d.ts +2 -0
- package/dist/src/widgets/SocialProofWidget/index.js +1 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +7 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +75 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.d.ts +1 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.js +106 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/index.d.ts +2 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/index.js +1 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +7 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +25 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/index.d.ts +3 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/index.js +2 -0
- package/dist/src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +12 -0
- package/dist/src/widgets/TypingAnimationWidget/TypingAnimationWidget.js +126 -0
- package/dist/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.d.ts +1 -0
- package/dist/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.js +118 -0
- package/dist/src/widgets/TypingAnimationWidget/index.d.ts +2 -0
- package/dist/src/widgets/TypingAnimationWidget/index.js +1 -0
- package/dist/src/widgets/__tests__/testUtils.d.ts +60 -0
- package/dist/src/widgets/__tests__/testUtils.js +46 -0
- package/dist/src/widgets/__tests__/trackEventCanary.test.d.ts +1 -0
- package/dist/src/widgets/__tests__/trackEventCanary.test.js +37 -0
- package/dist/src/widgets/hooks/useGetWidgetStatus.d.ts +7 -0
- package/dist/src/widgets/hooks/useGetWidgetStatus.js +17 -0
- package/dist/src/widgets/utils/functions.d.ts +16 -0
- package/dist/src/widgets/utils/functions.js +87 -0
- package/dist/src/widgets-v2/SearchResults/index.d.ts +2 -0
- package/dist/src/widgets-v2/SearchResults/index.js +2 -0
- package/dist/src/widgets-v2/SearchZeroState/index.d.ts +2 -0
- package/dist/src/widgets-v2/SearchZeroState/index.js +2 -0
- package/dist/src/widgets-v2/SuggestionBar/index.d.ts +2 -0
- package/dist/src/widgets-v2/SuggestionBar/index.js +2 -0
- package/dist/src/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -0
- package/dist/src/widgets-v2/SuggestionButtonContainer/index.js +2 -0
- package/dist/tsdown.config.d.ts +2 -0
- package/dist/tsdown.config.js +12 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +36 -5
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +36 -5
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +34 -4
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +35 -5
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +31 -7
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +32 -8
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +25 -3
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +25 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +23 -4
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +23 -4
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +15 -3
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +17 -5
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +53 -6
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +54 -7
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +10 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +11 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +24 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +25 -4
- package/dist/widgets/dist/SearchResults/SearchResults.d.cts +4 -3
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +3 -2
- 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/search.d.cts +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/camelCasedPropertiesDeep.d.cts +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/splitWords.d.cts +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/unknownArray.d.cts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +12 -0
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
- package/dist/widgets/hooks/useGetWidgetStatus.cjs +1 -1
- package/dist/widgets/hooks/useGetWidgetStatus.js +1 -1
- package/dist/widgets/utils/functions.cjs +0 -14
- package/dist/widgets/utils/functions.js +1 -14
- package/dist/widgets-v2/SearchZeroState/index.d.cts +2 -1
- package/dist/widgets-v2/SearchZeroState/index.d.ts +2 -1
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +68 -302
- package/src/hocs/withBaseWidget/types.ts +6 -6
- package/src/hocs/withBaseWidget/withBaseWidget.tsx +46 -61
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +59 -8
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +54 -18
- package/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.tsx +11 -5
- package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +48 -19
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +100 -52
- package/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.tsx +11 -5
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +37 -16
- package/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.tsx +12 -8
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +38 -19
- package/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.tsx +19 -8
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +32 -19
- package/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.tsx +21 -8
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +77 -18
- package/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.tsx +19 -8
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +23 -19
- package/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.tsx +19 -8
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +45 -21
- package/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.tsx +19 -8
- package/src/widgets/__tests__/trackEventCanary.test.ts +1 -1
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +0 -27
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +0 -25
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -696
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -696
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +0 -43
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -43
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +0 -1528
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +0 -1528
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +0 -329
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +0 -329
- package/dist/packages/icons/dist/node_modules/react/index.cjs +0 -13
- package/dist/packages/icons/dist/node_modules/react/index.js +0 -13
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +0 -13
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +0 -13
|
@@ -4,25 +4,29 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
8
|
-
let jotai = require("jotai");
|
|
9
7
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
8
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
10
9
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
|
-
let
|
|
12
|
-
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
10
|
+
let jotai = require("jotai");
|
|
13
11
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
14
12
|
let __envive_ai_react_hooks_atoms_app = require("@envive-ai/react-hooks/atoms/app");
|
|
13
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
14
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
15
|
+
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
16
|
+
let __envive_ai_react_toolkit_v3_Tokens = require("@envive-ai/react-toolkit-v3/Tokens");
|
|
15
17
|
let __envive_ai_react_toolkit_v3_ChatPreviewLoading = require("@envive-ai/react-toolkit-v3/ChatPreviewLoading");
|
|
16
18
|
let __envive_ai_react_hooks_atoms_widget = require("@envive-ai/react-hooks/atoms/widget");
|
|
17
19
|
let __envive_ai_react_toolkit_v3_SocialProof = require("@envive-ai/react-toolkit-v3/SocialProof");
|
|
20
|
+
let __envive_ai_react_hooks_hooks_ProductImageUrl = require("@envive-ai/react-hooks/hooks/ProductImageUrl");
|
|
18
21
|
|
|
19
22
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.tsx
|
|
20
23
|
const SocialProofWidgetHandler = (props) => {
|
|
21
24
|
const setChatPreviewLoadingData = (0, jotai.useSetAtom)(__envive_ai_react_hooks_atoms_widget.chatPreviewLoadingDataAtom);
|
|
22
25
|
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
23
26
|
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
24
|
-
const lastAssistantMessage = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_chat.lastAssistantMessageAtom);
|
|
25
27
|
const variantInfo = (0, jotai.useAtomValue)(__envive_ai_react_hooks_atoms_app.variantInfoAtom);
|
|
28
|
+
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
29
|
+
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);
|
|
26
30
|
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
27
31
|
const socialProofWidgetConfig = widgetConfig;
|
|
28
32
|
const id = widgetConfig?.contentId;
|
|
@@ -50,7 +54,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
50
54
|
};
|
|
51
55
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
52
56
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
53
|
-
const dynamicImageUrl =
|
|
57
|
+
const dynamicImageUrl = (0, __envive_ai_react_hooks_hooks_ProductImageUrl.useProductImageUrl)(variantInfo.variant === __envive_ai_react_hooks_application_models.VariantTypeEnum.Pdp ? variantInfo.productId : void 0);
|
|
54
58
|
const images = socialProofWidgetConfig?.kind !== __envive_ai_react_toolkit_v3_SocialProof.WidgetKind.DYNAMIC ? socialProofWidgetConfig?.images : [{
|
|
55
59
|
src: dynamicImageUrl,
|
|
56
60
|
alt: "Product Image"
|
|
@@ -82,17 +86,53 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
82
86
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON
|
|
83
87
|
});
|
|
84
88
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
|
|
89
|
+
trackWidgetInteraction({
|
|
90
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
91
|
+
trigger: {
|
|
92
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SOCIAL_PROOF,
|
|
93
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.SUGGESTION_CLICKED,
|
|
94
|
+
widget_interaction_data: { suggestion_clicked: { suggestion_id: text } }
|
|
95
|
+
}
|
|
96
|
+
});
|
|
85
97
|
}, [onTypedMessageSubmitted, openChat]);
|
|
98
|
+
const handlePrimaryButtonHover = (0, react.useCallback)((text) => {
|
|
99
|
+
trackWidgetInteraction({
|
|
100
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
101
|
+
trigger: {
|
|
102
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SOCIAL_PROOF,
|
|
103
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.WIDGET_HOVERED,
|
|
104
|
+
widget_interaction_data: { suggestion_hovered: { suggestion_id: text } }
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}, []);
|
|
86
108
|
const handleSecondaryButtonClick = (0, react.useCallback)((text) => {
|
|
109
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
110
|
+
const stringId = require_functions.getStringIdForText(rawValues, text);
|
|
111
|
+
trackEvent({
|
|
112
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetTextClicked,
|
|
113
|
+
eventProps: {
|
|
114
|
+
response_id: hardcopyContent?.responseId,
|
|
115
|
+
string_id: stringId,
|
|
116
|
+
text
|
|
117
|
+
}
|
|
118
|
+
});
|
|
87
119
|
onTypedMessageSubmitted({
|
|
88
120
|
query: text,
|
|
89
121
|
userTyped: false,
|
|
90
122
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON
|
|
91
123
|
});
|
|
92
124
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
|
|
125
|
+
onSuggestionClick(text);
|
|
93
126
|
}, [onTypedMessageSubmitted, openChat]);
|
|
94
127
|
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
95
128
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.SOCIAL_PROOF_TEXT_FIELD);
|
|
129
|
+
trackWidgetInteraction({
|
|
130
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
131
|
+
trigger: {
|
|
132
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.SOCIAL_PROOF,
|
|
133
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
134
|
+
}
|
|
135
|
+
});
|
|
96
136
|
}, [openChat]);
|
|
97
137
|
if (isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_ChatPreviewLoading.ChatPreviewLoading, { fullIsLoading: true });
|
|
98
138
|
setChatPreviewLoadingData({
|
|
@@ -141,7 +181,14 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
141
181
|
widgetContentProps,
|
|
142
182
|
widgetEventProps: {
|
|
143
183
|
handlePrimaryButtonClick,
|
|
184
|
+
handlePrimaryButtonHover,
|
|
144
185
|
handleSecondaryButtonClick,
|
|
186
|
+
handleSecondaryButtonHover: onHover,
|
|
187
|
+
handleSecondaryButtonDrag: onDrag,
|
|
188
|
+
handleSecondaryButtonMouseDown: onMouseDown,
|
|
189
|
+
handleSecondaryButtonMouseUp: onMouseUp,
|
|
190
|
+
handleSecondaryButtonTouchStart: onTouchStart,
|
|
191
|
+
handleSecondaryButtonTouchEnd: onTouchEnd,
|
|
145
192
|
handleTextFieldClick
|
|
146
193
|
}
|
|
147
194
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.d.ts
|
|
5
5
|
declare const SocialProofWidgetWithBaseWidget: {
|
|
6
|
-
(props: BaseWidgetProps):
|
|
6
|
+
(props: BaseWidgetProps): react_jsx_runtime2.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_runtime2.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import { withBaseWidget } from "../../hocs/withBaseWidget/withBaseWidget.js";
|
|
2
|
-
import {
|
|
2
|
+
import { getStringIdForText } from "../utils/functions.js";
|
|
3
3
|
import { useCallback, useEffect, useMemo } from "react";
|
|
4
4
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
7
|
-
import { useAtomValue, useSetAtom } from "jotai";
|
|
8
6
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
7
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
9
8
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
|
-
import {
|
|
11
|
-
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
9
|
+
import { useAtomValue, useSetAtom } from "jotai";
|
|
12
10
|
import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
|
|
13
11
|
import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
|
|
12
|
+
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
13
|
+
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
14
|
+
import { usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
15
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
14
16
|
import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
|
|
15
17
|
import { chatPreviewLoadingDataAtom } from "@envive-ai/react-hooks/atoms/widget";
|
|
16
18
|
import { PageVariant, SocialProof, WidgetKind } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
19
|
+
import { useProductImageUrl } from "@envive-ai/react-hooks/hooks/ProductImageUrl";
|
|
17
20
|
|
|
18
21
|
//#region src/widgets/SocialProofWidget/SocialProofWidget.tsx
|
|
19
22
|
const SocialProofWidgetHandler = (props) => {
|
|
20
23
|
const setChatPreviewLoadingData = useSetAtom(chatPreviewLoadingDataAtom);
|
|
21
24
|
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
22
25
|
const { openChat } = useChatToggle();
|
|
23
|
-
const lastAssistantMessage = useAtomValue(lastAssistantMessageAtom);
|
|
24
26
|
const variantInfo = useAtomValue(variantInfoAtom);
|
|
27
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
28
|
+
const { onClick: onSuggestionClick, onHover, onDrag, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.SOCIAL_PROOF, (text) => text);
|
|
25
29
|
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
26
30
|
const socialProofWidgetConfig = widgetConfig;
|
|
27
31
|
const id = widgetConfig?.contentId;
|
|
@@ -49,7 +53,7 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
49
53
|
};
|
|
50
54
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
51
55
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
52
|
-
const dynamicImageUrl =
|
|
56
|
+
const dynamicImageUrl = useProductImageUrl(variantInfo.variant === VariantTypeEnum.Pdp ? variantInfo.productId : void 0);
|
|
53
57
|
const images = socialProofWidgetConfig?.kind !== WidgetKind.DYNAMIC ? socialProofWidgetConfig?.images : [{
|
|
54
58
|
src: dynamicImageUrl,
|
|
55
59
|
alt: "Product Image"
|
|
@@ -81,17 +85,53 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
81
85
|
displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON
|
|
82
86
|
});
|
|
83
87
|
openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
|
|
88
|
+
trackWidgetInteraction({
|
|
89
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
90
|
+
trigger: {
|
|
91
|
+
widget: WidgetInteractionComponent.SOCIAL_PROOF,
|
|
92
|
+
widget_interaction: WidgetInteractionType.SUGGESTION_CLICKED,
|
|
93
|
+
widget_interaction_data: { suggestion_clicked: { suggestion_id: text } }
|
|
94
|
+
}
|
|
95
|
+
});
|
|
84
96
|
}, [onTypedMessageSubmitted, openChat]);
|
|
97
|
+
const handlePrimaryButtonHover = useCallback((text) => {
|
|
98
|
+
trackWidgetInteraction({
|
|
99
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
100
|
+
trigger: {
|
|
101
|
+
widget: WidgetInteractionComponent.SOCIAL_PROOF,
|
|
102
|
+
widget_interaction: WidgetInteractionType.WIDGET_HOVERED,
|
|
103
|
+
widget_interaction_data: { suggestion_hovered: { suggestion_id: text } }
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}, []);
|
|
85
107
|
const handleSecondaryButtonClick = useCallback((text) => {
|
|
108
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
109
|
+
const stringId = getStringIdForText(rawValues, text);
|
|
110
|
+
trackEvent({
|
|
111
|
+
eventName: EnviveMetricsEventName.WidgetTextClicked,
|
|
112
|
+
eventProps: {
|
|
113
|
+
response_id: hardcopyContent?.responseId,
|
|
114
|
+
string_id: stringId,
|
|
115
|
+
text
|
|
116
|
+
}
|
|
117
|
+
});
|
|
86
118
|
onTypedMessageSubmitted({
|
|
87
119
|
query: text,
|
|
88
120
|
userTyped: false,
|
|
89
121
|
displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON
|
|
90
122
|
});
|
|
91
123
|
openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
|
|
124
|
+
onSuggestionClick(text);
|
|
92
125
|
}, [onTypedMessageSubmitted, openChat]);
|
|
93
126
|
const handleTextFieldClick = useCallback(() => {
|
|
94
127
|
openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_TEXT_FIELD);
|
|
128
|
+
trackWidgetInteraction({
|
|
129
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
130
|
+
trigger: {
|
|
131
|
+
widget: WidgetInteractionComponent.SOCIAL_PROOF,
|
|
132
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
133
|
+
}
|
|
134
|
+
});
|
|
95
135
|
}, [openChat]);
|
|
96
136
|
if (isLoading) return /* @__PURE__ */ jsx(ChatPreviewLoading, { fullIsLoading: true });
|
|
97
137
|
setChatPreviewLoadingData({
|
|
@@ -140,7 +180,14 @@ const SocialProofWidgetHandler = (props) => {
|
|
|
140
180
|
widgetContentProps,
|
|
141
181
|
widgetEventProps: {
|
|
142
182
|
handlePrimaryButtonClick,
|
|
183
|
+
handlePrimaryButtonHover,
|
|
143
184
|
handleSecondaryButtonClick,
|
|
185
|
+
handleSecondaryButtonHover: onHover,
|
|
186
|
+
handleSecondaryButtonDrag: onDrag,
|
|
187
|
+
handleSecondaryButtonMouseDown: onMouseDown,
|
|
188
|
+
handleSecondaryButtonMouseUp: onMouseUp,
|
|
189
|
+
handleSecondaryButtonTouchStart: onTouchStart,
|
|
190
|
+
handleSecondaryButtonTouchEnd: onTouchEnd,
|
|
144
191
|
handleTextFieldClick
|
|
145
192
|
}
|
|
146
193
|
});
|
|
@@ -5,10 +5,11 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
-
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
9
8
|
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
9
|
+
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
10
10
|
let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
|
|
11
11
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
12
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
12
13
|
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
13
14
|
let __envive_ai_react_toolkit_v3_TitledPromptCarousel = require("@envive-ai/react-toolkit-v3/TitledPromptCarousel");
|
|
14
15
|
|
|
@@ -25,6 +26,7 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
25
26
|
const { onTypedMessageSubmitted } = (0, __envive_ai_react_hooks_contexts_salesAgentContext.useSalesAgent)();
|
|
26
27
|
const { openChat } = (0, __envive_ai_react_hooks_hooks_ChatToggle.useChatToggle)();
|
|
27
28
|
const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
|
|
29
|
+
const { onClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = (0, __envive_ai_react_toolkit_v3_PromptCarousel.usePromptCarouselAnalytics)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.EMBEDDED_WIDGET, (text) => text);
|
|
28
30
|
const hardCopyTitleLabel = hardcopyContent?.values?.titleLabel;
|
|
29
31
|
const titleLabel = isLoading ? mockTitleLabel : hardCopyTitleLabel;
|
|
30
32
|
const titleAriaLabel = hardcopyContent?.values?.titleAriaLabel;
|
|
@@ -73,7 +75,14 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
73
75
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
|
|
74
76
|
});
|
|
75
77
|
openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
|
|
78
|
+
onClick(text);
|
|
76
79
|
}, [onTypedMessageSubmitted, openChat]),
|
|
80
|
+
handleButtonDrag: onDrag,
|
|
81
|
+
handleButtonHover: onHover,
|
|
82
|
+
handleButtonMouseDown: onMouseDown,
|
|
83
|
+
handleButtonMouseUp: onMouseUp,
|
|
84
|
+
handleButtonTouchStart: onTouchStart,
|
|
85
|
+
handleButtonTouchEnd: onTouchEnd,
|
|
77
86
|
promptButtonTexts: buttonTexts,
|
|
78
87
|
promptCarouselAriaLabel
|
|
79
88
|
});
|
|
@@ -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_runtime1 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_runtime1.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -4,11 +4,12 @@ import { getStringIdForText } from "../utils/functions.js";
|
|
|
4
4
|
import { useCallback, useEffect } from "react";
|
|
5
5
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
8
7
|
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
8
|
+
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
9
9
|
import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
|
|
10
10
|
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
11
|
-
import {
|
|
11
|
+
import { WidgetInteractionComponent } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
12
|
+
import { AnimationSpeed, usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
12
13
|
import { TitledPromptCarousel } from "@envive-ai/react-toolkit-v3/TitledPromptCarousel";
|
|
13
14
|
|
|
14
15
|
//#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx
|
|
@@ -24,6 +25,7 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
24
25
|
const { onTypedMessageSubmitted } = useSalesAgent();
|
|
25
26
|
const { openChat } = useChatToggle();
|
|
26
27
|
const { hardcopyContent, widgetConfig, isLoading, widgetConfigId } = props;
|
|
28
|
+
const { onClick, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.EMBEDDED_WIDGET, (text) => text);
|
|
27
29
|
const hardCopyTitleLabel = hardcopyContent?.values?.titleLabel;
|
|
28
30
|
const titleLabel = isLoading ? mockTitleLabel : hardCopyTitleLabel;
|
|
29
31
|
const titleAriaLabel = hardcopyContent?.values?.titleAriaLabel;
|
|
@@ -72,7 +74,14 @@ const TitledPromptCarouselWidgetHandler = (props) => {
|
|
|
72
74
|
displayLocation: ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
|
|
73
75
|
});
|
|
74
76
|
openChat(ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
|
|
77
|
+
onClick(text);
|
|
75
78
|
}, [onTypedMessageSubmitted, openChat]),
|
|
79
|
+
handleButtonDrag: onDrag,
|
|
80
|
+
handleButtonHover: onHover,
|
|
81
|
+
handleButtonMouseDown: onMouseDown,
|
|
82
|
+
handleButtonMouseUp: onMouseUp,
|
|
83
|
+
handleButtonTouchStart: onTouchStart,
|
|
84
|
+
handleButtonTouchEnd: onTouchEnd,
|
|
76
85
|
promptButtonTexts: buttonTexts,
|
|
77
86
|
promptCarouselAriaLabel
|
|
78
87
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime19 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_runtime19.JSX.Element;
|
|
11
11
|
displayName: string;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
@@ -5,15 +5,17 @@ const require_functions = require('../utils/functions.cjs');
|
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
8
9
|
let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
|
|
9
10
|
let jotai = require("jotai");
|
|
10
|
-
let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
|
|
11
11
|
let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
|
|
12
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction = require("@envive-ai/react-hooks/hooks/WidgetInteraction");
|
|
13
|
+
let __envive_ai_react_hooks_hooks_WidgetInteraction_types = require("@envive-ai/react-hooks/hooks/WidgetInteraction/types");
|
|
12
14
|
let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
|
|
13
|
-
let __envive_ai_react_hooks_atoms_chat_chatState = require("@envive-ai/react-hooks/atoms/chat/chatState");
|
|
14
15
|
let __envive_ai_react_toolkit_v3_PromptButton_types = require("@envive-ai/react-toolkit-v3/PromptButton/types");
|
|
15
|
-
let
|
|
16
|
+
let __envive_ai_react_hooks_atoms_chat_chatState = require("@envive-ai/react-hooks/atoms/chat/chatState");
|
|
16
17
|
let __envive_ai_react_toolkit_v3_TypingAnimation = require("@envive-ai/react-toolkit-v3/TypingAnimation");
|
|
18
|
+
let __envive_ai_react_toolkit_v3_WidgetWrapper = require("@envive-ai/react-toolkit-v3/WidgetWrapper");
|
|
17
19
|
|
|
18
20
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx
|
|
19
21
|
const mockButtonTexts = [
|
|
@@ -47,6 +49,11 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
47
49
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
48
50
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
49
51
|
const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
|
|
52
|
+
const { trackWidgetInteraction } = (0, __envive_ai_react_hooks_hooks_WidgetInteraction.useWidgetInteraction)();
|
|
53
|
+
const { onClick: onPromptClicked, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = (0, __envive_ai_react_toolkit_v3_PromptCarousel.usePromptCarouselAnalytics)(__envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.EMBEDDED_WIDGET, (text) => {
|
|
54
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
55
|
+
return require_functions.getStringIdForText(rawValues, text);
|
|
56
|
+
});
|
|
50
57
|
(0, react.useEffect)(() => {
|
|
51
58
|
trackEvent({
|
|
52
59
|
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.SpiffyMetricsEventName.ChatComponentVisible,
|
|
@@ -73,6 +80,7 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
73
80
|
displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION
|
|
74
81
|
});
|
|
75
82
|
onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
83
|
+
onPromptClicked(text);
|
|
76
84
|
}, [
|
|
77
85
|
hardcopyContent,
|
|
78
86
|
trackEvent,
|
|
@@ -81,6 +89,13 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
81
89
|
]);
|
|
82
90
|
const handleTextFieldClick = (0, react.useCallback)(() => {
|
|
83
91
|
onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
92
|
+
trackWidgetInteraction({
|
|
93
|
+
eventName: __envive_ai_react_hooks_contexts_amplitudeContext.EnviveMetricsEventName.WidgetInteraction,
|
|
94
|
+
trigger: {
|
|
95
|
+
widget: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionComponent.EMBEDDED_WIDGET,
|
|
96
|
+
widget_interaction: __envive_ai_react_hooks_hooks_WidgetInteraction_types.WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
97
|
+
}
|
|
98
|
+
});
|
|
84
99
|
}, [onToggle]);
|
|
85
100
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__envive_ai_react_toolkit_v3_TypingAnimation.TypingAnimation, {
|
|
86
101
|
baseProps: { id },
|
|
@@ -104,6 +119,12 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
104
119
|
},
|
|
105
120
|
widgetEventProps: {
|
|
106
121
|
handleButtonClick,
|
|
122
|
+
handleButtonDrag: onDrag,
|
|
123
|
+
handleButtonHover: onHover,
|
|
124
|
+
handleButtonMouseDown: onMouseDown,
|
|
125
|
+
handleButtonMouseUp: onMouseUp,
|
|
126
|
+
handleButtonTouchStart: onTouchStart,
|
|
127
|
+
handleButtonTouchEnd: onTouchEnd,
|
|
107
128
|
handleTextFieldClick
|
|
108
129
|
}
|
|
109
130
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 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_runtime15.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_runtime15.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_runtime11 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_runtime11.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_runtime11.JSX.Element;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
@@ -4,15 +4,17 @@ import { getStringIdForText } from "../utils/functions.js";
|
|
|
4
4
|
import { useCallback, useEffect } from "react";
|
|
5
5
|
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
7
8
|
import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
|
|
8
9
|
import { useSetAtom } from "jotai";
|
|
9
|
-
import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
|
|
10
10
|
import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { useWidgetInteraction } from "@envive-ai/react-hooks/hooks/WidgetInteraction";
|
|
12
|
+
import { WidgetInteractionComponent, WidgetInteractionType } from "@envive-ai/react-hooks/hooks/WidgetInteraction/types";
|
|
13
|
+
import { PromptCarouselRows, usePromptCarouselAnalytics } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
13
14
|
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
|
|
14
|
-
import {
|
|
15
|
+
import { chatOnToggleAtom } from "@envive-ai/react-hooks/atoms/chat/chatState";
|
|
15
16
|
import { TypingAnimation } from "@envive-ai/react-toolkit-v3/TypingAnimation";
|
|
17
|
+
import { WidgetWrapperVariant } from "@envive-ai/react-toolkit-v3/WidgetWrapper";
|
|
16
18
|
|
|
17
19
|
//#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx
|
|
18
20
|
const mockButtonTexts = [
|
|
@@ -46,6 +48,11 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
46
48
|
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
47
49
|
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
48
50
|
const { trackEvent } = useAmplitude();
|
|
51
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
52
|
+
const { onClick: onPromptClicked, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = usePromptCarouselAnalytics(WidgetInteractionComponent.EMBEDDED_WIDGET, (text) => {
|
|
53
|
+
const rawValues = hardcopyContent?.rawValues;
|
|
54
|
+
return getStringIdForText(rawValues, text);
|
|
55
|
+
});
|
|
49
56
|
useEffect(() => {
|
|
50
57
|
trackEvent({
|
|
51
58
|
eventName: SpiffyMetricsEventName.ChatComponentVisible,
|
|
@@ -72,6 +79,7 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
72
79
|
displayLocation: ChatElementDisplayLocationV3.TYPING_ANIMATION
|
|
73
80
|
});
|
|
74
81
|
onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
82
|
+
onPromptClicked(text);
|
|
75
83
|
}, [
|
|
76
84
|
hardcopyContent,
|
|
77
85
|
trackEvent,
|
|
@@ -80,6 +88,13 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
80
88
|
]);
|
|
81
89
|
const handleTextFieldClick = useCallback(() => {
|
|
82
90
|
onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
|
|
91
|
+
trackWidgetInteraction({
|
|
92
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
93
|
+
trigger: {
|
|
94
|
+
widget: WidgetInteractionComponent.EMBEDDED_WIDGET,
|
|
95
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED
|
|
96
|
+
}
|
|
97
|
+
});
|
|
83
98
|
}, [onToggle]);
|
|
84
99
|
return /* @__PURE__ */ jsx(TypingAnimation, {
|
|
85
100
|
baseProps: { id },
|
|
@@ -103,6 +118,12 @@ const TypingAnimationWidgetHandler = (props) => {
|
|
|
103
118
|
},
|
|
104
119
|
widgetEventProps: {
|
|
105
120
|
handleButtonClick,
|
|
121
|
+
handleButtonDrag: onDrag,
|
|
122
|
+
handleButtonHover: onHover,
|
|
123
|
+
handleButtonMouseDown: onMouseDown,
|
|
124
|
+
handleButtonMouseUp: onMouseUp,
|
|
125
|
+
handleButtonTouchStart: onTouchStart,
|
|
126
|
+
handleButtonTouchEnd: onTouchEnd,
|
|
106
127
|
handleTextFieldClick
|
|
107
128
|
}
|
|
108
129
|
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { SearchResultsHocProps } from "../packages/hooks/dist/hooks/Search/useSearch.cjs";
|
|
1
2
|
import { SearchResultsEntryPointWidgetConfig } from "./types.cjs";
|
|
2
|
-
import * as
|
|
3
|
-
import { SearchResultsHocProps } from "@envive-ai/react-hooks/hooks/Search";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region ../widgets/dist/SearchResults/SearchResults.d.ts
|
|
6
|
+
|
|
6
7
|
//#region src/SearchResults/SearchResults.d.ts
|
|
7
8
|
interface SearchResultsProps extends SearchResultsHocProps {
|
|
8
9
|
widgetConfig: SearchResultsEntryPointWidgetConfig;
|
|
9
10
|
}
|
|
10
|
-
declare const SearchResults: (props: Omit<SearchResultsProps,
|
|
11
|
+
declare const SearchResults: (props: Omit<SearchResultsProps, keyof SearchResultsHocProps>) => react_jsx_runtime0.JSX.Element;
|
|
11
12
|
//#endregion
|
|
12
13
|
|
|
13
14
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime1 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchResults/SearchResultsWidget.d.ts
|
|
4
4
|
//#region src/SearchResults/SearchResultsWidget.d.ts
|
|
5
|
-
declare const SearchResultsWidget: () =>
|
|
5
|
+
declare const SearchResultsWidget: () => react_jsx_runtime1.JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
4
4
|
//#region src/SearchZeroState/SearchZeroStateWidget.d.ts
|
|
@@ -11,7 +11,7 @@ declare const SearchZeroStateWidget: ({
|
|
|
11
11
|
initialIsOpen,
|
|
12
12
|
widgetConfigId,
|
|
13
13
|
entryPointRef
|
|
14
|
-
}: SearchZeroStateWidgetProps) =>
|
|
14
|
+
}: SearchZeroStateWidgetProps) => react_jsx_runtime2.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SearchEntryPointWidgetConfig
|
|
1
|
+
import { SearchEntryPointWidgetConfig } from "../packages/hooks/dist/contexts/types.cjs";
|
|
2
2
|
|
|
3
3
|
//#region ../widgets/dist/SearchZeroState/types.d.ts
|
|
4
4
|
//#region src/SearchZeroState/types.d.ts
|
|
@@ -10,4 +10,4 @@ interface SearchZeroStateProps {
|
|
|
10
10
|
//#endregion
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { SearchZeroStateProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.cjs";
|
|
1
2
|
import { SuggestionBarLocationForMetrics } from "./types.cjs";
|
|
2
|
-
import * as
|
|
3
|
-
import { SuggestionButtonVariant } from "@envive-ai/react-hooks/contexts/types";
|
|
3
|
+
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
4
4
|
import { Message } from "postcss";
|
|
5
5
|
|
|
6
6
|
//#region ../widgets/dist/SuggestionBar/SuggestionBar.d.ts
|
|
@@ -30,7 +30,7 @@ declare function SuggestionBar({
|
|
|
30
30
|
buttonBorderRadius,
|
|
31
31
|
handleReply,
|
|
32
32
|
dataTestId
|
|
33
|
-
}: Readonly<SuggestionBarProps>):
|
|
33
|
+
}: Readonly<SuggestionBarProps>): react_jsx_runtime3.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
//#endregion
|
|
36
36
|
export { SuggestionBar };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TestProps } from "../packages/hooks/dist/types/test-types.cjs";
|
|
2
|
+
import { SuggestionButtonVariant } from "../packages/hooks/dist/contexts/types.cjs";
|
|
3
3
|
|
|
4
4
|
//#region ../widgets/dist/SuggestionButtonContainer/types.d.ts
|
|
5
|
+
|
|
5
6
|
//#region src/SuggestionButtonContainer/types.d.ts
|
|
6
7
|
interface SuggestionButtonContainerProps extends TestProps {
|
|
7
8
|
buttonVariation: SuggestionButtonVariant;
|