@envive-ai/react-widgets-v3 0.3.10 → 0.3.12
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 +2 -1
- package/dist/CXIntegration/hooks/useUnifiedCXButton.js +2 -1
- package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.cjs +6 -0
- package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.js +6 -0
- package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.cjs +7 -6
- package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +7 -6
- package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.cjs +10 -11
- package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.js +10 -11
- package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.cjs +10 -7
- package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.js +10 -7
- package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.cjs +2 -2
- package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.js +2 -2
- package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.cjs +9 -7
- package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +9 -7
- package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.cjs +13 -16
- package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +13 -16
- package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.cjs +6 -0
- package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.js +6 -0
- package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.cjs +7 -5
- package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.js +7 -5
- package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.cjs +6 -0
- package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.js +6 -0
- package/dist/_virtual/rolldown_runtime.cjs +2 -0
- package/dist/debug/GenericSelect.cjs +167 -0
- package/dist/debug/GenericSelect.js +165 -0
- package/dist/debug/MessageContent.cjs +151 -0
- package/dist/debug/MessageContent.js +149 -0
- package/dist/debug/chatEmbed.cjs +95 -0
- package/dist/debug/chatEmbed.js +92 -0
- package/dist/debug/debugBar.cjs +17 -0
- package/dist/debug/debugBar.js +16 -0
- package/dist/debug/reportIssue.cjs +528 -0
- package/dist/debug/reportIssue.js +524 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/CustomerServiceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/DefaultApi.cjs +591 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/InferenceApi.cjs +265 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/ProductsApi.cjs +105 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/SearchApi.cjs +229 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/index.cjs +43 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/index.cjs +39 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationResponse.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddToCartAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsIdentifyRequest.cjs +86 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsTrackEventRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AttachmentRequest.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AutoForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Context.cjs +89 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ConversationStatus.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationRequest.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceAttachment.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversation.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversationMessages.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceCustomer.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceMessage.cjs +85 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustomerServiceProvider.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributesFormCategory.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormSubmittedAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormType.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FulfillmentDisplayStatus.cjs +84 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GenerationParams.cjs +74 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GetConversationMessagesRequest.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursRequest.cjs +54 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursResponse.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/LabelValue.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ManualForm.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRule.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleAction.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionAttribute.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionType.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleCondition.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleOp.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleStatus.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/NextMessageRequest.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderItemInfo.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderResponseAttributes.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Organization.cjs +83 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfig.cjs +82 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfigResults.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationSettings.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PDPAttributes.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributeCategory.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributes.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributesAttributes.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPIdAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPUrlAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitAttributes.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitCategory.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalRequest.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchFilterResponseAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponse.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseAttributes.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseV2.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/QueryTypedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportContent.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportSessionRequest.cjs +99 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Response.cjs +68 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseCategory.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseProductAttributes.cjs +91 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchAttributes.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchResponseProduct.cjs +93 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchSuggestionsResponse.cjs +58 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageRequest.cjs +71 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageResponse.cjs +55 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigExperiment.cjs +64 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigFeatureGate.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Suggestion.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionClickedAttributes.cjs +53 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventProductCategory.cjs +62 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventRequest.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventResponse.cjs +78 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfo.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfoPrevUserEvent.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingGenericConfig.cjs +52 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPDPConfig.cjs +65 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPLPConfig.cjs +61 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingRequest.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponse.cjs +73 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponseSpecificDetails.cjs +59 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingType.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEvent.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventAttributes.cjs +75 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventCategory.cjs +70 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1GetSessionMessages200Response.cjs +67 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1SearchExplainGet200Response.cjs +63 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetString.cjs +60 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextRequest.cjs +75 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextResponse.cjs +66 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +69 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/index.cjs +221 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/runtime.cjs +324 -0
- package/dist/node_modules/react-icons/fa/index.cjs +65 -0
- package/dist/node_modules/react-icons/fa/index.js +61 -0
- package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
- package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
- package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
- package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
- package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +27 -0
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +25 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
- package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +3 -3
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +1 -1
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +66 -36
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +67 -37
- package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.cjs +50 -0
- package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.js +49 -0
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +4 -1
- package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +5 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +31 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +15 -0
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +30 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.cjs +3 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.cts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.d.ts +2 -0
- package/dist/widgets/FullPageSalesAgentWidget/index.js +3 -0
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +3 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +3 -2
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +4 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +4 -3
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +29 -5
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +30 -6
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +8 -6
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +8 -6
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +4 -3
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +4 -3
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +3 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +3 -2
- package/dist/widgets/utils/functions.cjs +1 -1
- package/dist/widgets/utils/functions.js +1 -1
- package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
- package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -4
- package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
- package/package.json +5 -1
- package/src/CXIntegration/hooks/useUnifiedCXButton.ts +4 -1
- package/src/CXIntegration/implementations/useGladlyUnifiedCXButton.ts +5 -0
- package/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.ts +11 -8
- package/src/CXIntegration/implementations/useGrooveUnifiedCXButton.ts +12 -15
- package/src/CXIntegration/implementations/useKustomerUnifiedCXButton.ts +11 -11
- package/src/CXIntegration/implementations/useReDoUnifiedCXButton.ts +2 -4
- package/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts +9 -10
- package/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts +18 -28
- package/src/CXIntegration/implementations/useTidioUnifiedCXButton.ts +5 -0
- package/src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts +11 -6
- package/src/CXIntegration/implementations/useZowieUnifiedCXButton.ts +5 -0
- package/src/CXIntegration/types.ts +1 -0
- package/src/debug/GenericSelect.tsx +236 -0
- package/src/debug/MessageContent.tsx +248 -0
- package/src/debug/chatEmbed.tsx +119 -0
- package/src/debug/debugBar.tsx +12 -0
- package/src/debug/reportIssue.tsx +649 -0
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +6 -0
- package/src/stories/FullPageSalesAgentWidget.stories.tsx +68 -0
- package/src/stories/SalesAgentTest/SalesAgentTest.tsx +10 -2
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +110 -65
- package/src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts +65 -0
- package/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.ts +11 -5
- package/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx +46 -0
- package/src/widgets/FullPageSalesAgentWidget/index.ts +1 -0
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +5 -1
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +6 -1
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +32 -3
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +10 -2
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +6 -2
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +5 -1
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResultsWidget.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchResults/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroState.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroStateWidget.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/index.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/BaseWidgetConfig.d.ts +0 -0
- /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useAtomValue } from 'jotai';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { chatAtom } from '@envive-ai/react-hooks/atoms/chat';
|
|
5
|
+
import { MessageType } from '@envive-ai/react-hooks/application/models';
|
|
6
|
+
import { PromptCarousel, PromptCarouselRows } from '@envive-ai/react-toolkit-v3/PromptCarousel';
|
|
7
|
+
import { MessageContent } from './MessageContent';
|
|
8
|
+
|
|
9
|
+
const containerClassNames = classNames({
|
|
10
|
+
'envive-tw-font-sans': true,
|
|
11
|
+
'envive-tw-text-base': true,
|
|
12
|
+
'envive-tw-leading-6': true,
|
|
13
|
+
'envive-tw-font-normal': true,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const messagesContainerClassNames = classNames({
|
|
17
|
+
'envive-tw-flex': true,
|
|
18
|
+
'envive-tw-flex-col': true,
|
|
19
|
+
'envive-tw-gap-4': true,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const turnContainerClassNames = classNames({
|
|
23
|
+
'envive-tw-flex': true,
|
|
24
|
+
'envive-tw-flex-col': true,
|
|
25
|
+
'envive-tw-gap-2': true,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const messageBodyClassNames = classNames({
|
|
29
|
+
'envive-tw-whitespace-pre-wrap': true,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const lastTurnClassNames = classNames({
|
|
33
|
+
'envive-tw-bg-[#FFFFF0]': true,
|
|
34
|
+
'envive-tw-p-2': true,
|
|
35
|
+
'envive-tw-rounded-lg': true,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const lastTurnContentClassNames = classNames({
|
|
39
|
+
'envive-tw-flex': true,
|
|
40
|
+
'envive-tw-flex-col': true,
|
|
41
|
+
'envive-tw-gap-2': true,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const ChatEmbed = () => {
|
|
45
|
+
const { messages, suggestions } = useAtomValue(chatAtom);
|
|
46
|
+
const lastTurnRef = React.useRef<HTMLDivElement>(null);
|
|
47
|
+
|
|
48
|
+
// Scroll the last turn into view when messages change
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
if (lastTurnRef.current && messages.length > 0) {
|
|
51
|
+
lastTurnRef.current.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
|
52
|
+
}
|
|
53
|
+
}, [messages]);
|
|
54
|
+
|
|
55
|
+
const answerSuggestions = suggestions.filter(s => s.isAnswer);
|
|
56
|
+
const generalSuggestions = suggestions.filter(s => !s.isAnswer);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<div className={containerClassNames}>
|
|
60
|
+
<div className={messagesContainerClassNames}>
|
|
61
|
+
{messages.map((turn, turnIdx) => {
|
|
62
|
+
const isLastTurn = turnIdx === messages.length - 1;
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<div key={turnIdx}>
|
|
66
|
+
<div className={turnContainerClassNames}>
|
|
67
|
+
{turn
|
|
68
|
+
.filter(m => m.type === MessageType.Separator)
|
|
69
|
+
.map(message => (
|
|
70
|
+
<div key={message.id}>
|
|
71
|
+
<div className={messageBodyClassNames}>
|
|
72
|
+
<MessageContent message={message} />
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
))}
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div
|
|
79
|
+
ref={isLastTurn ? lastTurnRef : null}
|
|
80
|
+
className={`${turnContainerClassNames} ${isLastTurn ? lastTurnClassNames : ''}`}
|
|
81
|
+
>
|
|
82
|
+
{turn
|
|
83
|
+
.filter(m => m.type !== MessageType.Separator)
|
|
84
|
+
.map(message => (
|
|
85
|
+
<div key={message.id}>
|
|
86
|
+
<div className={messageBodyClassNames}>
|
|
87
|
+
<MessageContent message={message} />
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
))}
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
);
|
|
94
|
+
})}
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
{suggestions.length > 0 && (
|
|
98
|
+
<div className={lastTurnClassNames}>
|
|
99
|
+
<div className={lastTurnContentClassNames}>
|
|
100
|
+
<PromptCarousel
|
|
101
|
+
promptButtonTexts={answerSuggestions.map(s => s.content)}
|
|
102
|
+
handleButtonClick={() => {}}
|
|
103
|
+
promptCarouselRows={PromptCarouselRows.ALWAYS_ONE}
|
|
104
|
+
isLoading={false}
|
|
105
|
+
/>
|
|
106
|
+
<PromptCarousel
|
|
107
|
+
promptButtonTexts={generalSuggestions.map(s => s.content)}
|
|
108
|
+
handleButtonClick={() => {}}
|
|
109
|
+
promptCarouselRows={PromptCarouselRows.ALWAYS_ONE}
|
|
110
|
+
isLoading={false}
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export default ChatEmbed;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useSystemSettingsContext } from '@envive-ai/react-hooks/hooks/SystemSettingsContext';
|
|
2
|
+
import { ReportIssue } from './reportIssue';
|
|
3
|
+
|
|
4
|
+
export const DebugBar = () => {
|
|
5
|
+
const { showDebugBar } = useSystemSettingsContext();
|
|
6
|
+
if (!showDebugBar) return null;
|
|
7
|
+
return (
|
|
8
|
+
<div className="envive-tw-flex envive-tw-items-center envive-tw-p-[4px]">
|
|
9
|
+
<ReportIssue />
|
|
10
|
+
</div>
|
|
11
|
+
);
|
|
12
|
+
};
|