@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
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let react = require("react");
|
|
3
|
+
let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
|
|
4
|
+
let __envive_ai_react_hooks_contexts_hardcopyContext = require("@envive-ai/react-hooks/contexts/hardcopyContext");
|
|
5
|
+
let __envive_ai_react_hooks_contexts_pageContext = require("@envive-ai/react-hooks/contexts/pageContext");
|
|
6
|
+
let __envive_ai_react_hooks_contexts_widgetConfigContext = require("@envive-ai/react-hooks/contexts/widgetConfigContext");
|
|
7
|
+
let __envive_ai_react_hooks_contexts_uiConfigContext = require("@envive-ai/react-hooks/contexts/uiConfigContext");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
//#region src/hocs/withBaseWidget/withBaseWidget.tsx
|
|
11
|
+
function withBaseWidget(Widget, options) {
|
|
12
|
+
const WrappedWidget = (props) => {
|
|
13
|
+
const { widgetConfigId, widgetType } = props;
|
|
14
|
+
const widgetRef = (0, react.useRef)(null);
|
|
15
|
+
const hasTrackedEvent = (0, react.useRef)(false);
|
|
16
|
+
const { trackEvent, isReady } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
|
|
17
|
+
const [hardcopyContent, setHardcopyContent] = (0, react.useState)(void 0);
|
|
18
|
+
const { getHardcopy, isLoading: isHardcopyLoading } = (0, __envive_ai_react_hooks_contexts_hardcopyContext.useHardcopy)();
|
|
19
|
+
const { userEvent, isLoading: isPageLoading } = (0, __envive_ai_react_hooks_contexts_pageContext.usePage)();
|
|
20
|
+
const [widgetConfig, setWidgetConfig] = (0, react.useState)(void 0);
|
|
21
|
+
const { getWidgetConfig, isLoading: isWidgetConfigLoading } = (0, __envive_ai_react_hooks_contexts_widgetConfigContext.useWidgetConfig)();
|
|
22
|
+
const [uiConfig, setUiConfig] = (0, react.useState)(void 0);
|
|
23
|
+
const { getUiConfig, isLoading: isUiConfigLoading } = (0, __envive_ai_react_hooks_contexts_uiConfigContext.useUiConfig)();
|
|
24
|
+
const isLoading = isHardcopyLoading || isPageLoading || isWidgetConfigLoading || isUiConfigLoading;
|
|
25
|
+
(0, react.useEffect)(() => {
|
|
26
|
+
if (!isReady || hasTrackedEvent.current || !widgetRef.current) return;
|
|
27
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
28
|
+
if (entry.isIntersecting && !hasTrackedEvent.current) {
|
|
29
|
+
trackEvent({
|
|
30
|
+
eventName: options?.visibilityEventName || __envive_ai_react_hooks_contexts_amplitudeContext.SpiffyMetricsEventName.ChatComponentVisible,
|
|
31
|
+
eventProps: {
|
|
32
|
+
widget_config_id: widgetConfigId,
|
|
33
|
+
widget_type: widgetType,
|
|
34
|
+
...options?.visibilityEventProps
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
hasTrackedEvent.current = true;
|
|
38
|
+
observer.disconnect();
|
|
39
|
+
}
|
|
40
|
+
}, { rootMargin: options?.rootMargin || "0px" });
|
|
41
|
+
observer.observe(widgetRef.current);
|
|
42
|
+
return () => {
|
|
43
|
+
observer.disconnect();
|
|
44
|
+
};
|
|
45
|
+
}, [
|
|
46
|
+
isReady,
|
|
47
|
+
widgetConfigId,
|
|
48
|
+
widgetType,
|
|
49
|
+
trackEvent
|
|
50
|
+
]);
|
|
51
|
+
(0, react.useEffect)(() => {
|
|
52
|
+
if (!widgetType || !userEvent) return;
|
|
53
|
+
getHardcopy({
|
|
54
|
+
widgetType,
|
|
55
|
+
userEvent
|
|
56
|
+
}).then(setHardcopyContent).catch(() => {});
|
|
57
|
+
}, [
|
|
58
|
+
widgetConfigId,
|
|
59
|
+
widgetType,
|
|
60
|
+
getHardcopy,
|
|
61
|
+
userEvent
|
|
62
|
+
]);
|
|
63
|
+
(0, react.useEffect)(() => {
|
|
64
|
+
getUiConfig().then(setUiConfig).catch(() => {});
|
|
65
|
+
}, [
|
|
66
|
+
getUiConfig,
|
|
67
|
+
widgetConfigId,
|
|
68
|
+
widgetType
|
|
69
|
+
]);
|
|
70
|
+
(0, react.useEffect)(() => {
|
|
71
|
+
if (!widgetConfigId || !widgetType) return;
|
|
72
|
+
getWidgetConfig({
|
|
73
|
+
widgetConfigId,
|
|
74
|
+
widgetType
|
|
75
|
+
}).then(setWidgetConfig).catch((e) => {
|
|
76
|
+
console.error("Error getting widget config", widgetConfigId, widgetType, e);
|
|
77
|
+
});
|
|
78
|
+
}, [
|
|
79
|
+
widgetConfigId,
|
|
80
|
+
widgetType,
|
|
81
|
+
getWidgetConfig
|
|
82
|
+
]);
|
|
83
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Widget, {
|
|
84
|
+
...props,
|
|
85
|
+
isLoading,
|
|
86
|
+
isHardcopyLoading,
|
|
87
|
+
isPageLoading,
|
|
88
|
+
isWidgetConfigLoading,
|
|
89
|
+
isUiConfigLoading,
|
|
90
|
+
uiConfig,
|
|
91
|
+
widgetConfig,
|
|
92
|
+
hardcopyContent,
|
|
93
|
+
observedWidget: widgetRef
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
WrappedWidget.displayName = `withBaseWidget(${Widget.displayName || Widget.name || "Component"})`;
|
|
97
|
+
return WrappedWidget;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
exports.withBaseWidget = withBaseWidget;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.cjs";
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
|
+
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
+
(props: P): react_jsx_runtime4.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { withBaseWidget };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseWidgetProps, WithBaseWidgetOptions } from "./types.js";
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/hocs/withBaseWidget/withBaseWidget.d.ts
|
|
5
|
+
declare function withBaseWidget<P extends BaseWidgetProps>(Widget: React.ComponentType<P>, options?: WithBaseWidgetOptions): {
|
|
6
|
+
(props: P): react_jsx_runtime13.JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { withBaseWidget };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
|
|
3
|
+
import { useHardcopy } from "@envive-ai/react-hooks/contexts/hardcopyContext";
|
|
4
|
+
import { usePage } from "@envive-ai/react-hooks/contexts/pageContext";
|
|
5
|
+
import { useWidgetConfig } from "@envive-ai/react-hooks/contexts/widgetConfigContext";
|
|
6
|
+
import { useUiConfig } from "@envive-ai/react-hooks/contexts/uiConfigContext";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/hocs/withBaseWidget/withBaseWidget.tsx
|
|
10
|
+
function withBaseWidget(Widget, options) {
|
|
11
|
+
const WrappedWidget = (props) => {
|
|
12
|
+
const { widgetConfigId, widgetType } = props;
|
|
13
|
+
const widgetRef = useRef(null);
|
|
14
|
+
const hasTrackedEvent = useRef(false);
|
|
15
|
+
const { trackEvent, isReady } = useAmplitude();
|
|
16
|
+
const [hardcopyContent, setHardcopyContent] = useState(void 0);
|
|
17
|
+
const { getHardcopy, isLoading: isHardcopyLoading } = useHardcopy();
|
|
18
|
+
const { userEvent, isLoading: isPageLoading } = usePage();
|
|
19
|
+
const [widgetConfig, setWidgetConfig] = useState(void 0);
|
|
20
|
+
const { getWidgetConfig, isLoading: isWidgetConfigLoading } = useWidgetConfig();
|
|
21
|
+
const [uiConfig, setUiConfig] = useState(void 0);
|
|
22
|
+
const { getUiConfig, isLoading: isUiConfigLoading } = useUiConfig();
|
|
23
|
+
const isLoading = isHardcopyLoading || isPageLoading || isWidgetConfigLoading || isUiConfigLoading;
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (!isReady || hasTrackedEvent.current || !widgetRef.current) return;
|
|
26
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
27
|
+
if (entry.isIntersecting && !hasTrackedEvent.current) {
|
|
28
|
+
trackEvent({
|
|
29
|
+
eventName: options?.visibilityEventName || SpiffyMetricsEventName.ChatComponentVisible,
|
|
30
|
+
eventProps: {
|
|
31
|
+
widget_config_id: widgetConfigId,
|
|
32
|
+
widget_type: widgetType,
|
|
33
|
+
...options?.visibilityEventProps
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
hasTrackedEvent.current = true;
|
|
37
|
+
observer.disconnect();
|
|
38
|
+
}
|
|
39
|
+
}, { rootMargin: options?.rootMargin || "0px" });
|
|
40
|
+
observer.observe(widgetRef.current);
|
|
41
|
+
return () => {
|
|
42
|
+
observer.disconnect();
|
|
43
|
+
};
|
|
44
|
+
}, [
|
|
45
|
+
isReady,
|
|
46
|
+
widgetConfigId,
|
|
47
|
+
widgetType,
|
|
48
|
+
trackEvent
|
|
49
|
+
]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (!widgetType || !userEvent) return;
|
|
52
|
+
getHardcopy({
|
|
53
|
+
widgetType,
|
|
54
|
+
userEvent
|
|
55
|
+
}).then(setHardcopyContent).catch(() => {});
|
|
56
|
+
}, [
|
|
57
|
+
widgetConfigId,
|
|
58
|
+
widgetType,
|
|
59
|
+
getHardcopy,
|
|
60
|
+
userEvent
|
|
61
|
+
]);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
getUiConfig().then(setUiConfig).catch(() => {});
|
|
64
|
+
}, [
|
|
65
|
+
getUiConfig,
|
|
66
|
+
widgetConfigId,
|
|
67
|
+
widgetType
|
|
68
|
+
]);
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!widgetConfigId || !widgetType) return;
|
|
71
|
+
getWidgetConfig({
|
|
72
|
+
widgetConfigId,
|
|
73
|
+
widgetType
|
|
74
|
+
}).then(setWidgetConfig).catch((e) => {
|
|
75
|
+
console.error("Error getting widget config", widgetConfigId, widgetType, e);
|
|
76
|
+
});
|
|
77
|
+
}, [
|
|
78
|
+
widgetConfigId,
|
|
79
|
+
widgetType,
|
|
80
|
+
getWidgetConfig
|
|
81
|
+
]);
|
|
82
|
+
return /* @__PURE__ */ jsx(Widget, {
|
|
83
|
+
...props,
|
|
84
|
+
isLoading,
|
|
85
|
+
isHardcopyLoading,
|
|
86
|
+
isPageLoading,
|
|
87
|
+
isWidgetConfigLoading,
|
|
88
|
+
isUiConfigLoading,
|
|
89
|
+
uiConfig,
|
|
90
|
+
widgetConfig,
|
|
91
|
+
hardcopyContent,
|
|
92
|
+
observedWidget: widgetRef
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
WrappedWidget.displayName = `withBaseWidget(${Widget.displayName || Widget.name || "Component"})`;
|
|
96
|
+
return WrappedWidget;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { withBaseWidget };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../frontendConfig.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../contexts/types.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../typesV3.js";
|
|
2
|
+
import "react";
|
|
3
|
+
|
|
4
|
+
//#region ../hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts
|
|
5
|
+
|
|
6
|
+
type HardcopyResponse = {
|
|
7
|
+
language: string;
|
|
8
|
+
values: Record<string, string | string[]>;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { HardcopyResponse };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { HardcopyResponse } from "./hardcopyContext.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region ../hooks/dist/contexts/types.d.ts
|
|
2
|
+
|
|
3
|
+
interface AlphabeticFilterSorting {
|
|
4
|
+
type: 'alphabetic';
|
|
5
|
+
}
|
|
6
|
+
interface ProductCountFilterSorting {
|
|
7
|
+
type: 'productCount';
|
|
8
|
+
}
|
|
9
|
+
interface CustomFilterSorting {
|
|
10
|
+
type: 'custom';
|
|
11
|
+
map: Record<string, number>;
|
|
12
|
+
}
|
|
13
|
+
type FilterSorting = AlphabeticFilterSorting | ProductCountFilterSorting | CustomFilterSorting;
|
|
14
|
+
interface BaseFilterConfig {
|
|
15
|
+
filterId: string;
|
|
16
|
+
displayName: string;
|
|
17
|
+
}
|
|
18
|
+
interface DynamicFilterConfig extends BaseFilterConfig {
|
|
19
|
+
type: 'dynamic';
|
|
20
|
+
attribute: string;
|
|
21
|
+
sorting: FilterSorting;
|
|
22
|
+
}
|
|
23
|
+
interface PriceFilterConfig extends BaseFilterConfig {
|
|
24
|
+
type: 'price';
|
|
25
|
+
bucketSize: number;
|
|
26
|
+
}
|
|
27
|
+
type FilterAttribute = DynamicFilterConfig | PriceFilterConfig;
|
|
28
|
+
interface MerchantVariantSettings {
|
|
29
|
+
dynamicVariants: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
refreshInterval?: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface SearchConfig {
|
|
35
|
+
enableGlobalSearch: boolean;
|
|
36
|
+
searchFilterConfig: FilterAttribute[];
|
|
37
|
+
searchOverlayHeading?: string;
|
|
38
|
+
redirectSearchResultsUrl?: string;
|
|
39
|
+
additiveDynamicFilters?: boolean;
|
|
40
|
+
recommendedProducts?: string[];
|
|
41
|
+
recommendedProductsHeading?: string;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { type MerchantVariantSettings, type SearchConfig };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import "./typesV3.js";
|
|
2
|
+
import "../application/models/api/orgConfigResults.js";
|
|
3
|
+
|
|
4
|
+
//#region ../hooks/dist/contexts/types.d.ts
|
|
5
|
+
|
|
6
|
+
interface AlphabeticFilterSorting {
|
|
7
|
+
type: 'alphabetic';
|
|
8
|
+
}
|
|
9
|
+
interface ProductCountFilterSorting {
|
|
10
|
+
type: 'productCount';
|
|
11
|
+
}
|
|
12
|
+
interface CustomFilterSorting {
|
|
13
|
+
type: 'custom';
|
|
14
|
+
map: Record<string, number>;
|
|
15
|
+
}
|
|
16
|
+
type FilterSorting = AlphabeticFilterSorting | ProductCountFilterSorting | CustomFilterSorting;
|
|
17
|
+
interface BaseFilterConfig {
|
|
18
|
+
filterId: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
}
|
|
21
|
+
interface DynamicFilterConfig extends BaseFilterConfig {
|
|
22
|
+
type: 'dynamic';
|
|
23
|
+
attribute: string;
|
|
24
|
+
sorting: FilterSorting;
|
|
25
|
+
}
|
|
26
|
+
interface PriceFilterConfig extends BaseFilterConfig {
|
|
27
|
+
type: 'price';
|
|
28
|
+
bucketSize: number;
|
|
29
|
+
}
|
|
30
|
+
type FilterAttribute = DynamicFilterConfig | PriceFilterConfig;
|
|
31
|
+
interface MerchantVariantSettings {
|
|
32
|
+
dynamicVariants: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
refreshInterval?: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
interface SearchConfig {
|
|
38
|
+
enableGlobalSearch: boolean;
|
|
39
|
+
searchFilterConfig: FilterAttribute[];
|
|
40
|
+
searchOverlayHeading?: string;
|
|
41
|
+
redirectSearchResultsUrl?: string;
|
|
42
|
+
additiveDynamicFilters?: boolean;
|
|
43
|
+
recommendedProducts?: string[];
|
|
44
|
+
recommendedProductsHeading?: string;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { type MerchantVariantSettings, type SearchConfig };
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { CustomerServiceType } from "../types/customerService.cjs";
|
|
2
|
+
import { MerchantVariantSettings, SearchConfig } from "./types.cjs";
|
|
3
|
+
import { AnimationSpeed, PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
|
|
4
|
+
import { ImageGalleryImage, ImageGalleryLayout } from "@envive-ai/react-toolkit-v3/ImageGallery";
|
|
5
|
+
import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton";
|
|
6
|
+
import { WidgetWrapperVariant } from "@envive-ai/react-toolkit-v3/WidgetWrapper";
|
|
7
|
+
import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
|
|
8
|
+
import { DynamicLayout } from "@envive-ai/react-toolkit-v3/SocialProof";
|
|
9
|
+
import { SparkleIconColor } from "@envive-ai/react-toolkit-v3/WelcomeMessage";
|
|
10
|
+
|
|
11
|
+
//#region ../hooks/dist/contexts/typesV3.d.ts
|
|
12
|
+
|
|
13
|
+
type ImageAspectRatio = '1/1' | '3/4';
|
|
14
|
+
type ButtonColors = {
|
|
15
|
+
lightButtonBackgroundColor: string;
|
|
16
|
+
lightButtonIconColor: string;
|
|
17
|
+
darkButtonBackgroundColor: string;
|
|
18
|
+
darkButtonIconColor: string;
|
|
19
|
+
};
|
|
20
|
+
type Typography = {
|
|
21
|
+
titleFontFamily: string;
|
|
22
|
+
headerFontFamily: string;
|
|
23
|
+
bodyFontFamily: string;
|
|
24
|
+
fontSize?: {
|
|
25
|
+
t1: string;
|
|
26
|
+
t2: string;
|
|
27
|
+
t3: string;
|
|
28
|
+
h1: string;
|
|
29
|
+
h2: string;
|
|
30
|
+
h3: string;
|
|
31
|
+
b1: string;
|
|
32
|
+
b2: string;
|
|
33
|
+
b3: string;
|
|
34
|
+
b4: string;
|
|
35
|
+
b5: string;
|
|
36
|
+
l1: string;
|
|
37
|
+
l2: string;
|
|
38
|
+
};
|
|
39
|
+
fontWeight?: {
|
|
40
|
+
rg: string;
|
|
41
|
+
md: string;
|
|
42
|
+
sb: string;
|
|
43
|
+
};
|
|
44
|
+
letterSpacing?: {
|
|
45
|
+
'0': string;
|
|
46
|
+
'wide-1': string;
|
|
47
|
+
};
|
|
48
|
+
lineHeight?: {
|
|
49
|
+
'124': number;
|
|
50
|
+
'120': number;
|
|
51
|
+
'118': number;
|
|
52
|
+
'116': number;
|
|
53
|
+
'114': number;
|
|
54
|
+
'148': number;
|
|
55
|
+
'140': number;
|
|
56
|
+
'128': number;
|
|
57
|
+
'130': number;
|
|
58
|
+
'133': number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type LookAndFeelConfig = {
|
|
62
|
+
theme: Theme;
|
|
63
|
+
agentName: string;
|
|
64
|
+
chatHeaderLogoDarkSrc: string;
|
|
65
|
+
chatHeaderLogoLightSrc: string;
|
|
66
|
+
widgetLogoSrc: string;
|
|
67
|
+
hideWidgetLogo: boolean;
|
|
68
|
+
elementRadius: number;
|
|
69
|
+
imageAspectRatio: ImageAspectRatio;
|
|
70
|
+
buttonColors: ButtonColors;
|
|
71
|
+
typography: Typography;
|
|
72
|
+
};
|
|
73
|
+
declare enum ConfigVersionEnum {
|
|
74
|
+
V3 = "v3",
|
|
75
|
+
Deprecated = "deprecated",
|
|
76
|
+
}
|
|
77
|
+
type ConfigVersion = ConfigVersionEnum.V3 | ConfigVersionEnum.Deprecated | undefined;
|
|
78
|
+
type Mode = 'dark' | 'light';
|
|
79
|
+
type Position = 'bottomLeft' | 'middleLeft' | 'middleRight' | 'bottomRight';
|
|
80
|
+
type ShowOptions = 'always' | 'postInteraction' | 'none';
|
|
81
|
+
type Style = 'attached' | 'detached';
|
|
82
|
+
type FloatingButtonConfig = {
|
|
83
|
+
position: Position;
|
|
84
|
+
backgroundColor?: string;
|
|
85
|
+
mode: Mode;
|
|
86
|
+
showOption: ShowOptions;
|
|
87
|
+
iconSVGSrc?: string;
|
|
88
|
+
style: Style;
|
|
89
|
+
};
|
|
90
|
+
type FloatingChatConfig = {
|
|
91
|
+
headerBackgroundColor?: string;
|
|
92
|
+
headerMode: Mode;
|
|
93
|
+
welcomeMessageIconColor: SparkleIconColor;
|
|
94
|
+
showVerifiedBuyer: boolean;
|
|
95
|
+
userQueryInputEnabled: boolean;
|
|
96
|
+
showEnviveLogo: boolean;
|
|
97
|
+
ignoreFirstModelResponse?: boolean;
|
|
98
|
+
neverShowSingleProductCards?: boolean;
|
|
99
|
+
welcomeMessageTitle: string;
|
|
100
|
+
welcomeMessageText: string;
|
|
101
|
+
chatFooterTextFieldPlaceholderText: string;
|
|
102
|
+
};
|
|
103
|
+
type CustomerServiceIntegration = {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
provider: CustomerServiceType;
|
|
106
|
+
suppressMerchantButton?: boolean;
|
|
107
|
+
};
|
|
108
|
+
type OrgUIConfigV3 = {
|
|
109
|
+
id?: string;
|
|
110
|
+
version: ConfigVersion;
|
|
111
|
+
shortName: string;
|
|
112
|
+
lookAndFeel: LookAndFeelConfig;
|
|
113
|
+
floatingButton: FloatingButtonConfig;
|
|
114
|
+
floatingChat: FloatingChatConfig;
|
|
115
|
+
merchantOverrideCss?: string;
|
|
116
|
+
customerServiceIntegration?: CustomerServiceIntegration;
|
|
117
|
+
merchantVariantSettings?: MerchantVariantSettings;
|
|
118
|
+
searchConfig?: SearchConfig;
|
|
119
|
+
};
|
|
120
|
+
declare enum WidgetTypeV3 {
|
|
121
|
+
PromptCarouselV3 = "PromptCarouselV3",
|
|
122
|
+
TitledPromptCarouselV3 = "TitledPromptCarouselV3",
|
|
123
|
+
SocialProofV3 = "SocialProofV3",
|
|
124
|
+
TypingAnimationV3 = "TypingAnimationV3",
|
|
125
|
+
ChatPreviewV3 = "ChatPreviewV3",
|
|
126
|
+
ChatPreviewComparisonV3 = "ChatPreviewComparisonV3",
|
|
127
|
+
ChatPreviewLoadingV3 = "ChatPreviewLoadingV3",
|
|
128
|
+
ImagePromptCardV3 = "ImagePromptCardV3",
|
|
129
|
+
PromptButtonCarouselWithImageV3 = "PromptButtonCarouselWithImageV3",
|
|
130
|
+
ImageBannerV3 = "ImageBannerV3",
|
|
131
|
+
SingleImagePromptV3 = "SingleImagePromptV3",
|
|
132
|
+
FloatingChatV3 = "FloatingChatV3",
|
|
133
|
+
FloatingButtonV3 = "FloatingButtonV3",
|
|
134
|
+
}
|
|
135
|
+
interface BaseWidgetConfig<T extends WidgetTypeV3> {
|
|
136
|
+
widgetConfigId: string;
|
|
137
|
+
type: T;
|
|
138
|
+
contentId?: string;
|
|
139
|
+
}
|
|
140
|
+
interface PromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptCarouselV3> {
|
|
141
|
+
promptButtonType?: PromptButtonVariant;
|
|
142
|
+
boldFirstButton?: boolean;
|
|
143
|
+
promptCarouselRows?: PromptCarouselRows;
|
|
144
|
+
animationSpeed?: AnimationSpeed;
|
|
145
|
+
}
|
|
146
|
+
interface TitledPromptCarouselWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TitledPromptCarouselV3> {
|
|
147
|
+
promptButtonType?: PromptButtonVariant;
|
|
148
|
+
boldFirstButton?: boolean;
|
|
149
|
+
promptCarouselRows?: PromptCarouselRows;
|
|
150
|
+
animationSpeed?: AnimationSpeed;
|
|
151
|
+
}
|
|
152
|
+
declare enum SocialProofWidgetKind {
|
|
153
|
+
STATIC = "static",
|
|
154
|
+
DYNAMIC = "dynamic",
|
|
155
|
+
}
|
|
156
|
+
interface SocialProofWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.SocialProofV3> {
|
|
157
|
+
kind: SocialProofWidgetKind;
|
|
158
|
+
variant: WidgetWrapperVariant;
|
|
159
|
+
hexCardColor?: string;
|
|
160
|
+
promptCarouselRows: PromptCarouselRows;
|
|
161
|
+
hideImage?: boolean;
|
|
162
|
+
imageGalleryLayout: Exclude<ImageGalleryLayout, 'TWO_SIDE'>;
|
|
163
|
+
hideTextField?: boolean;
|
|
164
|
+
primaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
165
|
+
secondaryButtonVariant: Exclude<PromptButtonVariant, 'suggestedResponse' | 'ghost'>;
|
|
166
|
+
dynamicLayout?: DynamicLayout;
|
|
167
|
+
images?: ImageGalleryImage[];
|
|
168
|
+
}
|
|
169
|
+
interface TypingAnimationWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.TypingAnimationV3> {
|
|
170
|
+
widgetVariant?: WidgetWrapperVariant;
|
|
171
|
+
cardColor?: string;
|
|
172
|
+
promptButtonType?: PromptButtonVariant;
|
|
173
|
+
promptCarouselRows?: PromptCarouselRows;
|
|
174
|
+
showTextField?: boolean;
|
|
175
|
+
}
|
|
176
|
+
interface ChatPreviewComparisonWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewComparisonV3> {
|
|
177
|
+
variant: WidgetWrapperVariant;
|
|
178
|
+
hexCardColor?: string;
|
|
179
|
+
hideImage?: boolean;
|
|
180
|
+
hideTextField?: boolean;
|
|
181
|
+
}
|
|
182
|
+
interface ChatPreviewLoadingWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewLoadingV3> {
|
|
183
|
+
variant: WidgetWrapperVariant;
|
|
184
|
+
hexCardColor?: string;
|
|
185
|
+
hideTextField?: boolean;
|
|
186
|
+
}
|
|
187
|
+
interface ChatPreviewWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.ChatPreviewV3> {
|
|
188
|
+
variant: WidgetWrapperVariant;
|
|
189
|
+
hexCardColor?: string;
|
|
190
|
+
hideTextField?: boolean;
|
|
191
|
+
}
|
|
192
|
+
interface PromptButtonCarouselWithImageWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.PromptButtonCarouselWithImageV3> {
|
|
193
|
+
promptButtonType?: PromptButtonVariant;
|
|
194
|
+
image?: ImageGalleryImage;
|
|
195
|
+
hideTextField?: boolean;
|
|
196
|
+
}
|
|
197
|
+
interface FloatingChatWidgetV3Config extends BaseWidgetConfig<WidgetTypeV3.FloatingChatV3> {}
|
|
198
|
+
type WidgetConfigV3 = PromptCarouselWidgetV3Config | SocialProofWidgetV3Config | TitledPromptCarouselWidgetV3Config | ChatPreviewComparisonWidgetV3Config | ChatPreviewLoadingWidgetV3Config | TypingAnimationWidgetV3Config | ChatPreviewWidgetV3Config | PromptButtonCarouselWithImageWidgetV3Config | FloatingChatWidgetV3Config;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#endregion
|
|
201
|
+
export { type OrgUIConfigV3, type WidgetConfigV3, WidgetTypeV3 };
|