@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,64 @@
|
|
|
1
|
+
import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
|
|
2
|
+
import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
|
|
3
|
+
import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
|
|
4
|
+
|
|
5
|
+
//#region src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts
|
|
6
|
+
const useRichpanelUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
|
|
7
|
+
const chatWindow = useElementObserver(SelectorFactory.chain("id|richpanel_messenger_iframe @ query|.rp-messenger-container"));
|
|
8
|
+
const chatButton = useElementObserver(SelectorFactory.query(".rp-messenger-trigger"));
|
|
9
|
+
const chatAlternativeButton = useElementObserver(SelectorFactory.query(".rp-micro-app-dummy-icon"));
|
|
10
|
+
const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
|
|
11
|
+
const toggle = () => {
|
|
12
|
+
chatWindow.show();
|
|
13
|
+
onSwitchToAgent();
|
|
14
|
+
if (chatButton) {
|
|
15
|
+
chatButton.show();
|
|
16
|
+
chatButton.fire("click");
|
|
17
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
18
|
+
}
|
|
19
|
+
if (chatAlternativeButton) {
|
|
20
|
+
chatAlternativeButton.show();
|
|
21
|
+
chatAlternativeButton.fire("click");
|
|
22
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const isRichpanelButtonEnabled = () => {
|
|
26
|
+
return !!chatButton || !!chatAlternativeButton;
|
|
27
|
+
};
|
|
28
|
+
const isSwitchEnabled = () => isRichpanelButtonEnabled();
|
|
29
|
+
chatButton.onAdd(() => {
|
|
30
|
+
if (suppressMerchantButton) {
|
|
31
|
+
chatButton.hide();
|
|
32
|
+
chatWindow.hide();
|
|
33
|
+
}
|
|
34
|
+
enviveFloatingButton.show();
|
|
35
|
+
});
|
|
36
|
+
chatAlternativeButton.onAdd(() => {
|
|
37
|
+
if (suppressMerchantButton) {
|
|
38
|
+
chatAlternativeButton.hide();
|
|
39
|
+
chatWindow.hide();
|
|
40
|
+
}
|
|
41
|
+
enviveFloatingButton.show();
|
|
42
|
+
});
|
|
43
|
+
chatWindow.onChange((el) => {
|
|
44
|
+
if (el && suppressMerchantButton) {
|
|
45
|
+
const { classList } = el;
|
|
46
|
+
if (classList.contains("opened")) {
|
|
47
|
+
enviveFloatingButton.hide();
|
|
48
|
+
chatWindow.show();
|
|
49
|
+
} else if (classList.length === 1 && classList.contains("rp-messenger-container")) {
|
|
50
|
+
enviveFloatingButton.show();
|
|
51
|
+
chatButton.hide();
|
|
52
|
+
chatAlternativeButton.hide();
|
|
53
|
+
chatWindow.hide();
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
return {
|
|
58
|
+
toggle,
|
|
59
|
+
isSwitchEnabled
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { useRichpanelUnifiedCXButton };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_constants = require('../../widgets/FloatingChatWidget/constants.cjs');
|
|
3
|
+
let __envive_ai_react_hooks_application_utils = require("@envive-ai/react-hooks/application/utils");
|
|
4
|
+
let __envive_ai_react_hooks_hooks_ElementObserver = require("@envive-ai/react-hooks/hooks/ElementObserver");
|
|
5
|
+
|
|
6
|
+
//#region src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts
|
|
7
|
+
const useShopifyChatUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
|
|
8
|
+
const shopifyChatContainer = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("ShopifyChat"));
|
|
9
|
+
const shopifyButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|ShopifyChat @ query|.chat-app > button"));
|
|
10
|
+
const enviveFloatingButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id(require_constants.FLOATING_BUTTON_ID));
|
|
11
|
+
const toggle = () => {
|
|
12
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
13
|
+
shopifyButton.show();
|
|
14
|
+
onSwitchToAgent();
|
|
15
|
+
shopifyButton.fire("click");
|
|
16
|
+
};
|
|
17
|
+
const isShopifyButtonEnabled = () => {
|
|
18
|
+
return !!shopifyButton;
|
|
19
|
+
};
|
|
20
|
+
const isSwitchEnabled = () => isShopifyButtonEnabled();
|
|
21
|
+
const hideEnviveFloatingButton = () => {
|
|
22
|
+
enviveFloatingButton.hide();
|
|
23
|
+
shopifyButton.show();
|
|
24
|
+
};
|
|
25
|
+
const showEnviveFloatingButton = () => {
|
|
26
|
+
enviveFloatingButton.show();
|
|
27
|
+
shopifyButton.hide();
|
|
28
|
+
shopifyChatContainer.hide();
|
|
29
|
+
};
|
|
30
|
+
const handleChatStateChange = async (isOpen) => {
|
|
31
|
+
if (isOpen) {
|
|
32
|
+
hideEnviveFloatingButton();
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
showEnviveFloatingButton();
|
|
36
|
+
};
|
|
37
|
+
shopifyButton.onAdd(() => {
|
|
38
|
+
if (suppressMerchantButton) handleChatStateChange(shopifyChatContainer.targetNode?.getAttribute("is-open") === "true");
|
|
39
|
+
});
|
|
40
|
+
shopifyChatContainer.onAdd((el) => {
|
|
41
|
+
if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
|
|
42
|
+
});
|
|
43
|
+
shopifyChatContainer.onChange((el) => {
|
|
44
|
+
if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
toggle,
|
|
48
|
+
isSwitchEnabled
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
exports.useShopifyChatUnifiedCXButton = useShopifyChatUnifiedCXButton;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
|
|
2
|
+
import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
|
|
3
|
+
import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
|
|
4
|
+
|
|
5
|
+
//#region src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts
|
|
6
|
+
const useShopifyChatUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
|
|
7
|
+
const shopifyChatContainer = useElementObserver(SelectorFactory.id("ShopifyChat"));
|
|
8
|
+
const shopifyButton = useElementObserver(SelectorFactory.chain("id|ShopifyChat @ query|.chat-app > button"));
|
|
9
|
+
const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
|
|
10
|
+
const toggle = () => {
|
|
11
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
12
|
+
shopifyButton.show();
|
|
13
|
+
onSwitchToAgent();
|
|
14
|
+
shopifyButton.fire("click");
|
|
15
|
+
};
|
|
16
|
+
const isShopifyButtonEnabled = () => {
|
|
17
|
+
return !!shopifyButton;
|
|
18
|
+
};
|
|
19
|
+
const isSwitchEnabled = () => isShopifyButtonEnabled();
|
|
20
|
+
const hideEnviveFloatingButton = () => {
|
|
21
|
+
enviveFloatingButton.hide();
|
|
22
|
+
shopifyButton.show();
|
|
23
|
+
};
|
|
24
|
+
const showEnviveFloatingButton = () => {
|
|
25
|
+
enviveFloatingButton.show();
|
|
26
|
+
shopifyButton.hide();
|
|
27
|
+
shopifyChatContainer.hide();
|
|
28
|
+
};
|
|
29
|
+
const handleChatStateChange = async (isOpen) => {
|
|
30
|
+
if (isOpen) {
|
|
31
|
+
hideEnviveFloatingButton();
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
showEnviveFloatingButton();
|
|
35
|
+
};
|
|
36
|
+
shopifyButton.onAdd(() => {
|
|
37
|
+
if (suppressMerchantButton) handleChatStateChange(shopifyChatContainer.targetNode?.getAttribute("is-open") === "true");
|
|
38
|
+
});
|
|
39
|
+
shopifyChatContainer.onAdd((el) => {
|
|
40
|
+
if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
|
|
41
|
+
});
|
|
42
|
+
shopifyChatContainer.onChange((el) => {
|
|
43
|
+
if (suppressMerchantButton) handleChatStateChange(el?.getAttribute("is-open") === "true");
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
toggle,
|
|
47
|
+
isSwitchEnabled
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { useShopifyChatUnifiedCXButton };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/CXIntegration/implementations/useTidioUnifiedCXButton.ts
|
|
3
|
+
const useTidioUnifiedCXButton = ({ onSwitchToAgent }) => {
|
|
4
|
+
const tidioButton = window.tidioChatApi;
|
|
5
|
+
const toggle = () => {
|
|
6
|
+
onSwitchToAgent();
|
|
7
|
+
if (tidioButton) tidioButton.open();
|
|
8
|
+
};
|
|
9
|
+
const isTidioButtonEnabled = () => !!document.getElementById("tidio-chat-iframe");
|
|
10
|
+
const isSwitchEnabled = () => isTidioButtonEnabled();
|
|
11
|
+
return {
|
|
12
|
+
toggle,
|
|
13
|
+
isSwitchEnabled
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.useTidioUnifiedCXButton = useTidioUnifiedCXButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/CXIntegration/implementations/useTidioUnifiedCXButton.ts
|
|
2
|
+
const useTidioUnifiedCXButton = ({ onSwitchToAgent }) => {
|
|
3
|
+
const tidioButton = window.tidioChatApi;
|
|
4
|
+
const toggle = () => {
|
|
5
|
+
onSwitchToAgent();
|
|
6
|
+
if (tidioButton) tidioButton.open();
|
|
7
|
+
};
|
|
8
|
+
const isTidioButtonEnabled = () => !!document.getElementById("tidio-chat-iframe");
|
|
9
|
+
const isSwitchEnabled = () => isTidioButtonEnabled();
|
|
10
|
+
return {
|
|
11
|
+
toggle,
|
|
12
|
+
isSwitchEnabled
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useTidioUnifiedCXButton };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_constants = require('../../widgets/FloatingChatWidget/constants.cjs');
|
|
3
|
+
let __envive_ai_react_hooks_application_utils = require("@envive-ai/react-hooks/application/utils");
|
|
4
|
+
let __envive_ai_react_hooks_hooks_ElementObserver = require("@envive-ai/react-hooks/hooks/ElementObserver");
|
|
5
|
+
|
|
6
|
+
//#region src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts
|
|
7
|
+
const useZendeskUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
|
|
8
|
+
const zendeskButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|launcher @ query|button"));
|
|
9
|
+
const zendeskAlternativeIframe = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.chain("id|webWidget"));
|
|
10
|
+
const enviveFloatingButton = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id(require_constants.FLOATING_BUTTON_ID));
|
|
11
|
+
const zendeskIframe = (0, __envive_ai_react_hooks_hooks_ElementObserver.useElementObserver)(__envive_ai_react_hooks_application_utils.SelectorFactory.id("launcher"));
|
|
12
|
+
const toggle = () => {
|
|
13
|
+
zendeskIframe.hide();
|
|
14
|
+
onSwitchToAgent();
|
|
15
|
+
zendeskButton.fire("click");
|
|
16
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
17
|
+
};
|
|
18
|
+
const isZendeskButtonEnabled = () => {
|
|
19
|
+
return !!(document?.getElementById("launcher"))?.contentWindow?.document?.querySelector("button");
|
|
20
|
+
};
|
|
21
|
+
const isSwitchEnabled = () => isZendeskButtonEnabled();
|
|
22
|
+
zendeskIframe.onAdd(() => {
|
|
23
|
+
if (suppressMerchantButton) {
|
|
24
|
+
enviveFloatingButton.show();
|
|
25
|
+
zendeskIframe.hide();
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
zendeskButton.onChange((el) => {
|
|
29
|
+
if (el && suppressMerchantButton) {
|
|
30
|
+
const ariaLabel = el.getAttribute("aria-label");
|
|
31
|
+
if (ariaLabel === "Open messaging window") {
|
|
32
|
+
enviveFloatingButton.show();
|
|
33
|
+
zendeskIframe.hide();
|
|
34
|
+
}
|
|
35
|
+
if (ariaLabel === "Close messaging window") {
|
|
36
|
+
enviveFloatingButton.hide();
|
|
37
|
+
zendeskIframe.show();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
zendeskAlternativeIframe.onRemove(() => {
|
|
42
|
+
if (suppressMerchantButton) {
|
|
43
|
+
enviveFloatingButton.show();
|
|
44
|
+
zendeskIframe.hide();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
toggle,
|
|
49
|
+
isSwitchEnabled
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
exports.useZendeskUnifiedCXButton = useZendeskUnifiedCXButton;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FLOATING_BUTTON_ID } from "../../widgets/FloatingChatWidget/constants.js";
|
|
2
|
+
import { SelectorFactory } from "@envive-ai/react-hooks/application/utils";
|
|
3
|
+
import { useElementObserver } from "@envive-ai/react-hooks/hooks/ElementObserver";
|
|
4
|
+
|
|
5
|
+
//#region src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts
|
|
6
|
+
const useZendeskUnifiedCXButton = ({ onSwitchToAgent, suppressMerchantButton }) => {
|
|
7
|
+
const zendeskButton = useElementObserver(SelectorFactory.chain("id|launcher @ query|button"));
|
|
8
|
+
const zendeskAlternativeIframe = useElementObserver(SelectorFactory.chain("id|webWidget"));
|
|
9
|
+
const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
|
|
10
|
+
const zendeskIframe = useElementObserver(SelectorFactory.id("launcher"));
|
|
11
|
+
const toggle = () => {
|
|
12
|
+
zendeskIframe.hide();
|
|
13
|
+
onSwitchToAgent();
|
|
14
|
+
zendeskButton.fire("click");
|
|
15
|
+
if (suppressMerchantButton) enviveFloatingButton.hide();
|
|
16
|
+
};
|
|
17
|
+
const isZendeskButtonEnabled = () => {
|
|
18
|
+
return !!(document?.getElementById("launcher"))?.contentWindow?.document?.querySelector("button");
|
|
19
|
+
};
|
|
20
|
+
const isSwitchEnabled = () => isZendeskButtonEnabled();
|
|
21
|
+
zendeskIframe.onAdd(() => {
|
|
22
|
+
if (suppressMerchantButton) {
|
|
23
|
+
enviveFloatingButton.show();
|
|
24
|
+
zendeskIframe.hide();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
zendeskButton.onChange((el) => {
|
|
28
|
+
if (el && suppressMerchantButton) {
|
|
29
|
+
const ariaLabel = el.getAttribute("aria-label");
|
|
30
|
+
if (ariaLabel === "Open messaging window") {
|
|
31
|
+
enviveFloatingButton.show();
|
|
32
|
+
zendeskIframe.hide();
|
|
33
|
+
}
|
|
34
|
+
if (ariaLabel === "Close messaging window") {
|
|
35
|
+
enviveFloatingButton.hide();
|
|
36
|
+
zendeskIframe.show();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
zendeskAlternativeIframe.onRemove(() => {
|
|
41
|
+
if (suppressMerchantButton) {
|
|
42
|
+
enviveFloatingButton.show();
|
|
43
|
+
zendeskIframe.hide();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return {
|
|
47
|
+
toggle,
|
|
48
|
+
isSwitchEnabled
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { useZendeskUnifiedCXButton };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/CXIntegration/implementations/useZowieUnifiedCXButton.ts
|
|
3
|
+
const useZowieUnifiedCXButton = ({ onSwitchToAgent }) => {
|
|
4
|
+
const zowieButton = window?.Zowie;
|
|
5
|
+
const toggle = () => {
|
|
6
|
+
onSwitchToAgent();
|
|
7
|
+
if (zowieButton) zowieButton?.open();
|
|
8
|
+
};
|
|
9
|
+
const isZowieButtonEnabled = () => !!zowieButton;
|
|
10
|
+
const isSwitchEnabled = () => isZowieButtonEnabled();
|
|
11
|
+
return {
|
|
12
|
+
toggle,
|
|
13
|
+
isSwitchEnabled
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.useZowieUnifiedCXButton = useZowieUnifiedCXButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region src/CXIntegration/implementations/useZowieUnifiedCXButton.ts
|
|
2
|
+
const useZowieUnifiedCXButton = ({ onSwitchToAgent }) => {
|
|
3
|
+
const zowieButton = window?.Zowie;
|
|
4
|
+
const toggle = () => {
|
|
5
|
+
onSwitchToAgent();
|
|
6
|
+
if (zowieButton) zowieButton?.open();
|
|
7
|
+
};
|
|
8
|
+
const isZowieButtonEnabled = () => !!zowieButton;
|
|
9
|
+
const isSwitchEnabled = () => isZowieButtonEnabled();
|
|
10
|
+
return {
|
|
11
|
+
toggle,
|
|
12
|
+
isSwitchEnabled
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { useZowieUnifiedCXButton };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/CXIntegration/types.ts
|
|
3
|
+
let CustomerServiceType = /* @__PURE__ */ function(CustomerServiceType$1) {
|
|
4
|
+
CustomerServiceType$1["shopify"] = "shopify";
|
|
5
|
+
CustomerServiceType$1["gorgias"] = "gorgias";
|
|
6
|
+
CustomerServiceType$1["kustomer"] = "kustomer";
|
|
7
|
+
CustomerServiceType$1["groove"] = "groove";
|
|
8
|
+
CustomerServiceType$1["tidio"] = "tidio";
|
|
9
|
+
CustomerServiceType$1["zowie"] = "zowie";
|
|
10
|
+
CustomerServiceType$1["redo"] = "redo";
|
|
11
|
+
CustomerServiceType$1["gladly"] = "gladly";
|
|
12
|
+
CustomerServiceType$1["richpanel"] = "richpanel";
|
|
13
|
+
CustomerServiceType$1["zendesk"] = "zendesk";
|
|
14
|
+
CustomerServiceType$1["unsupported"] = "unsupported";
|
|
15
|
+
return CustomerServiceType$1;
|
|
16
|
+
}({});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.CustomerServiceType = CustomerServiceType;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/CXIntegration/types.ts
|
|
2
|
+
let CustomerServiceType = /* @__PURE__ */ function(CustomerServiceType$1) {
|
|
3
|
+
CustomerServiceType$1["shopify"] = "shopify";
|
|
4
|
+
CustomerServiceType$1["gorgias"] = "gorgias";
|
|
5
|
+
CustomerServiceType$1["kustomer"] = "kustomer";
|
|
6
|
+
CustomerServiceType$1["groove"] = "groove";
|
|
7
|
+
CustomerServiceType$1["tidio"] = "tidio";
|
|
8
|
+
CustomerServiceType$1["zowie"] = "zowie";
|
|
9
|
+
CustomerServiceType$1["redo"] = "redo";
|
|
10
|
+
CustomerServiceType$1["gladly"] = "gladly";
|
|
11
|
+
CustomerServiceType$1["richpanel"] = "richpanel";
|
|
12
|
+
CustomerServiceType$1["zendesk"] = "zendesk";
|
|
13
|
+
CustomerServiceType$1["unsupported"] = "unsupported";
|
|
14
|
+
return CustomerServiceType$1;
|
|
15
|
+
}({});
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { CustomerServiceType };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_types = require('../types.cjs');
|
|
2
|
+
const require_useGrooveUnifiedCXButton = require('../implementations/useGrooveUnifiedCXButton.cjs');
|
|
3
|
+
const require_useShopifyChatUnifiedCXButton = require('../implementations/useShopifyChatUnifiedCXButton.cjs');
|
|
4
|
+
const require_useGladlyUnifiedCXButton = require('../implementations/useGladlyUnifiedCXButton.cjs');
|
|
5
|
+
const require_useGorgiasUnifiedCXButton = require('../implementations/useGorgiasUnifiedCXButton.cjs');
|
|
6
|
+
const require_useTidioUnifiedCXButton = require('../implementations/useTidioUnifiedCXButton.cjs');
|
|
7
|
+
const require_useZowieUnifiedCXButton = require('../implementations/useZowieUnifiedCXButton.cjs');
|
|
8
|
+
const require_useReDoUnifiedCXButton = require('../implementations/useReDoUnifiedCXButton.cjs');
|
|
9
|
+
const require_useRichpanelUnifiedCXButton = require('../implementations/useRichpanelUnifiedCXButton.cjs');
|
|
10
|
+
const require_useZendeskUnifiedCXButton = require('../implementations/useZendeskUnifiedCXButton.cjs');
|
|
11
|
+
const require_useKustomerUnifiedCXButton = require('../implementations/useKustomerUnifiedCXButton.cjs');
|
|
12
|
+
const require_useDefaultUnifiedCXButton = require('../implementations/useDefaultUnifiedCXButton.cjs');
|
|
13
|
+
|
|
14
|
+
//#region src/CXIntegration/utils/functions.ts
|
|
15
|
+
const findCustomerServiceImpl = (provider) => {
|
|
16
|
+
if (provider === require_types.CustomerServiceType.kustomer) return require_useKustomerUnifiedCXButton.useKustomerUnifiedCXButton;
|
|
17
|
+
if (provider === require_types.CustomerServiceType.groove) return require_useGrooveUnifiedCXButton.useGrooveUnifiedCXButton;
|
|
18
|
+
if (provider === require_types.CustomerServiceType.gladly) return require_useGladlyUnifiedCXButton.useGladlyUnifiedCXButton;
|
|
19
|
+
if (provider === require_types.CustomerServiceType.shopify) return require_useShopifyChatUnifiedCXButton.useShopifyChatUnifiedCXButton;
|
|
20
|
+
if (provider === require_types.CustomerServiceType.gorgias) return require_useGorgiasUnifiedCXButton.useGorgiasUnifiedCXButton;
|
|
21
|
+
if (provider === require_types.CustomerServiceType.tidio) return require_useTidioUnifiedCXButton.useTidioUnifiedCXButton;
|
|
22
|
+
if (provider === require_types.CustomerServiceType.zowie) return require_useZowieUnifiedCXButton.useZowieUnifiedCXButton;
|
|
23
|
+
if (provider === require_types.CustomerServiceType.redo) return require_useReDoUnifiedCXButton.useReDoUnifiedCXButton;
|
|
24
|
+
if (provider === require_types.CustomerServiceType.richpanel) return require_useRichpanelUnifiedCXButton.useRichpanelUnifiedCXButton;
|
|
25
|
+
if (provider === require_types.CustomerServiceType.zendesk) return require_useZendeskUnifiedCXButton.useZendeskUnifiedCXButton;
|
|
26
|
+
return require_useDefaultUnifiedCXButton.useDefaultUnifiedCXButton;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
exports.findCustomerServiceImpl = findCustomerServiceImpl;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CustomerServiceType } from "../types.js";
|
|
2
|
+
import { useGrooveUnifiedCXButton } from "../implementations/useGrooveUnifiedCXButton.js";
|
|
3
|
+
import { useShopifyChatUnifiedCXButton } from "../implementations/useShopifyChatUnifiedCXButton.js";
|
|
4
|
+
import { useGladlyUnifiedCXButton } from "../implementations/useGladlyUnifiedCXButton.js";
|
|
5
|
+
import { useGorgiasUnifiedCXButton } from "../implementations/useGorgiasUnifiedCXButton.js";
|
|
6
|
+
import { useTidioUnifiedCXButton } from "../implementations/useTidioUnifiedCXButton.js";
|
|
7
|
+
import { useZowieUnifiedCXButton } from "../implementations/useZowieUnifiedCXButton.js";
|
|
8
|
+
import { useReDoUnifiedCXButton } from "../implementations/useReDoUnifiedCXButton.js";
|
|
9
|
+
import { useRichpanelUnifiedCXButton } from "../implementations/useRichpanelUnifiedCXButton.js";
|
|
10
|
+
import { useZendeskUnifiedCXButton } from "../implementations/useZendeskUnifiedCXButton.js";
|
|
11
|
+
import { useKustomerUnifiedCXButton } from "../implementations/useKustomerUnifiedCXButton.js";
|
|
12
|
+
import { useDefaultUnifiedCXButton } from "../implementations/useDefaultUnifiedCXButton.js";
|
|
13
|
+
|
|
14
|
+
//#region src/CXIntegration/utils/functions.ts
|
|
15
|
+
const findCustomerServiceImpl = (provider) => {
|
|
16
|
+
if (provider === CustomerServiceType.kustomer) return useKustomerUnifiedCXButton;
|
|
17
|
+
if (provider === CustomerServiceType.groove) return useGrooveUnifiedCXButton;
|
|
18
|
+
if (provider === CustomerServiceType.gladly) return useGladlyUnifiedCXButton;
|
|
19
|
+
if (provider === CustomerServiceType.shopify) return useShopifyChatUnifiedCXButton;
|
|
20
|
+
if (provider === CustomerServiceType.gorgias) return useGorgiasUnifiedCXButton;
|
|
21
|
+
if (provider === CustomerServiceType.tidio) return useTidioUnifiedCXButton;
|
|
22
|
+
if (provider === CustomerServiceType.zowie) return useZowieUnifiedCXButton;
|
|
23
|
+
if (provider === CustomerServiceType.redo) return useReDoUnifiedCXButton;
|
|
24
|
+
if (provider === CustomerServiceType.richpanel) return useRichpanelUnifiedCXButton;
|
|
25
|
+
if (provider === CustomerServiceType.zendesk) return useZendeskUnifiedCXButton;
|
|
26
|
+
return useDefaultUnifiedCXButton;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
export { findCustomerServiceImpl };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OrgUIConfigV3, WidgetConfigV3, WidgetTypeV3 } from "../../hooks/dist/contexts/typesV3.cjs";
|
|
2
|
+
import { SpiffyMetricsEventName } from "../../hooks/dist/services/amplitudeService/amplitudeService.cjs";
|
|
3
|
+
import { HardcopyResponse } from "../../hooks/dist/contexts/hardcopyContext/hardcopyContext.cjs";
|
|
4
|
+
import { RefObject } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/hocs/withBaseWidget/types.d.ts
|
|
7
|
+
interface BaseWidgetProps {
|
|
8
|
+
widgetConfigId?: string;
|
|
9
|
+
widgetType: WidgetTypeV3;
|
|
10
|
+
observedWidget?: RefObject<BaseWidgetProps>;
|
|
11
|
+
hardcopyContent?: HardcopyResponse;
|
|
12
|
+
widgetConfig?: WidgetConfigV3;
|
|
13
|
+
uiConfig?: OrgUIConfigV3;
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
isHardcopyLoading?: boolean;
|
|
16
|
+
isPageLoading?: boolean;
|
|
17
|
+
isWidgetConfigLoading?: boolean;
|
|
18
|
+
isUiConfigLoading?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface WithBaseWidgetOptions {
|
|
21
|
+
/**
|
|
22
|
+
* The Amplitude event name to track when the widget becomes visible.
|
|
23
|
+
* Defaults to a generic component visible event if not provided.
|
|
24
|
+
*/
|
|
25
|
+
visibilityEventName?: SpiffyMetricsEventName;
|
|
26
|
+
/**
|
|
27
|
+
* Additional properties to include with the visibility event.
|
|
28
|
+
*/
|
|
29
|
+
visibilityEventProps?: Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Root margin for the IntersectionObserver (e.g., '0px', '100px').
|
|
32
|
+
* Defaults to '0px'.
|
|
33
|
+
*/
|
|
34
|
+
rootMargin?: string;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { BaseWidgetProps, WithBaseWidgetOptions };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { OrgUIConfigV3, WidgetConfigV3, WidgetTypeV3 } from "../../hooks/dist/contexts/typesV3.js";
|
|
2
|
+
import { SpiffyMetricsEventName } from "../../hooks/dist/services/amplitudeService/amplitudeService.js";
|
|
3
|
+
import "../../hooks/dist/contexts/amplitudeContext/index.js";
|
|
4
|
+
import { HardcopyResponse } from "../../hooks/dist/contexts/hardcopyContext/hardcopyContext.js";
|
|
5
|
+
import "../../hooks/dist/contexts/hardcopyContext/index.js";
|
|
6
|
+
import { RefObject } from "react";
|
|
7
|
+
|
|
8
|
+
//#region src/hocs/withBaseWidget/types.d.ts
|
|
9
|
+
interface BaseWidgetProps {
|
|
10
|
+
widgetConfigId?: string;
|
|
11
|
+
widgetType: WidgetTypeV3;
|
|
12
|
+
observedWidget?: RefObject<BaseWidgetProps>;
|
|
13
|
+
hardcopyContent?: HardcopyResponse;
|
|
14
|
+
widgetConfig?: WidgetConfigV3;
|
|
15
|
+
uiConfig?: OrgUIConfigV3;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
isHardcopyLoading?: boolean;
|
|
18
|
+
isPageLoading?: boolean;
|
|
19
|
+
isWidgetConfigLoading?: boolean;
|
|
20
|
+
isUiConfigLoading?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface WithBaseWidgetOptions {
|
|
23
|
+
/**
|
|
24
|
+
* The Amplitude event name to track when the widget becomes visible.
|
|
25
|
+
* Defaults to a generic component visible event if not provided.
|
|
26
|
+
*/
|
|
27
|
+
visibilityEventName?: SpiffyMetricsEventName;
|
|
28
|
+
/**
|
|
29
|
+
* Additional properties to include with the visibility event.
|
|
30
|
+
*/
|
|
31
|
+
visibilityEventProps?: Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* Root margin for the IntersectionObserver (e.g., '0px', '100px').
|
|
34
|
+
* Defaults to '0px'.
|
|
35
|
+
*/
|
|
36
|
+
rootMargin?: string;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { BaseWidgetProps, WithBaseWidgetOptions };
|