@envive-ai/react-widgets-v3 0.3.14 → 0.3.15-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debug/chatEmbed.cjs +1 -1
- package/dist/debug/chatEmbed.js +1 -1
- package/dist/debug/reportIssue.cjs +1 -1
- package/dist/debug/reportIssue.js +1 -1
- package/dist/hocs/withBaseWidget/types.d.cts +3 -3
- package/dist/hocs/withBaseWidget/types.d.ts +5 -3
- package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
- package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
- package/dist/hooks/dist/application/models/api/widgetText.d.cts +8 -0
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +12 -0
- package/dist/hooks/dist/contexts/types.d.cts +38 -0
- package/dist/hooks/dist/contexts/typesV3.d.cts +230 -0
- package/dist/hooks/dist/services/amplitudeService/eventNames.d.cts +43 -0
- package/dist/hooks/dist/types/customerService.d.cts +21 -0
- package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +1 -0
- package/dist/packages/hooks/dist/application/models/api/orgConfigResults.d.ts +1 -0
- package/dist/packages/hooks/dist/application/models/api/widgetText.d.ts +8 -0
- package/dist/packages/hooks/dist/application/models/frontendConfig.d.ts +1 -0
- package/dist/packages/hooks/dist/contexts/amplitudeContext/amplitudeContext.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/amplitudeContext/index.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +2 -0
- package/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +14 -0
- package/dist/packages/hooks/dist/contexts/hardcopyContext/index.d.ts +1 -0
- package/dist/packages/hooks/dist/contexts/types.d.ts +42 -0
- package/dist/packages/hooks/dist/contexts/typesV3.d.ts +230 -0
- package/dist/packages/hooks/dist/services/amplitudeService/amplitudeService.d.ts +1 -0
- package/dist/packages/hooks/dist/services/amplitudeService/eventNames.d.ts +43 -0
- package/dist/packages/hooks/dist/types/customerService.d.ts +21 -0
- package/dist/packages/icons/dist/IconCloseVariant.cjs +5 -6
- package/dist/packages/icons/dist/IconCloseVariant.js +4 -6
- package/dist/packages/widgets/dist/SearchResults/SearchResults.d.ts +4 -3
- package/dist/packages/widgets/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
- package/dist/packages/widgets/dist/SearchZeroState/index.d.ts +2 -1
- package/dist/packages/widgets/dist/SearchZeroState/types.d.ts +2 -2
- package/dist/packages/widgets/dist/SuggestionBar/SuggestionBar.d.ts +3 -3
- package/dist/packages/widgets/dist/SuggestionButtonContainer/index.d.ts +2 -0
- package/dist/packages/widgets/dist/SuggestionButtonContainer/types.d.ts +3 -2
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/response.d.ts +14 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/api/search.d.ts +15 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.ts +73 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +61 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.ts +25 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.ts +35 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.ts +32 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +32 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/application/models/variantInfo/variantInfo.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.ts +15 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/contexts/types.d.ts +63 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.ts +60 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/hooks/utils.d.ts +13 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/OrgInfo.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/index.d.ts +1 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/search-filter-types.d.ts +28 -0
- package/dist/packages/widgets/dist/packages/hooks/dist/types/test-types.d.ts +10 -0
- package/dist/src/CXIntegration/hooks/useUnifiedCXButton.d.ts +10 -0
- package/dist/src/CXIntegration/hooks/useUnifiedCXButton.js +29 -0
- package/dist/src/CXIntegration/implementations/useDefaultUnifiedCXButton.d.ts +2 -0
- package/dist/src/CXIntegration/implementations/useDefaultUnifiedCXButton.js +6 -0
- package/dist/src/CXIntegration/implementations/useEightByEightUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useEightByEightUnifiedCXButton.js +63 -0
- package/dist/src/CXIntegration/implementations/useGladlyUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useGladlyUnifiedCXButton.js +23 -0
- package/dist/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +54 -0
- package/dist/src/CXIntegration/implementations/useGrooveUnifiedCXButton.d.ts +18 -0
- package/dist/src/CXIntegration/implementations/useGrooveUnifiedCXButton.js +48 -0
- package/dist/src/CXIntegration/implementations/useHelpScoutUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useHelpScoutUnifiedCXButton.js +84 -0
- package/dist/src/CXIntegration/implementations/useKustomerUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useKustomerUnifiedCXButton.js +86 -0
- package/dist/src/CXIntegration/implementations/useReDoUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useReDoUnifiedCXButton.js +59 -0
- package/dist/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +62 -0
- package/dist/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +49 -0
- package/dist/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useTalkdeskUnifiedCXButton.js +77 -0
- package/dist/src/CXIntegration/implementations/useTidioUnifiedCXButton.d.ts +13 -0
- package/dist/src/CXIntegration/implementations/useTidioUnifiedCXButton.js +20 -0
- package/dist/src/CXIntegration/implementations/useZendeskUnifiedCXButton.d.ts +5 -0
- package/dist/src/CXIntegration/implementations/useZendeskUnifiedCXButton.js +55 -0
- package/dist/src/CXIntegration/implementations/useZowieUnifiedCXButton.d.ts +13 -0
- package/dist/src/CXIntegration/implementations/useZowieUnifiedCXButton.js +20 -0
- package/dist/src/CXIntegration/types.d.ts +26 -0
- package/dist/src/CXIntegration/types.js +17 -0
- package/dist/src/CXIntegration/utils/functions.d.ts +2 -0
- package/dist/src/CXIntegration/utils/functions.js +57 -0
- package/dist/src/debug/GenericSelect.d.ts +11 -0
- package/dist/src/debug/GenericSelect.js +151 -0
- package/dist/src/debug/MessageContent.d.ts +4 -0
- package/dist/src/debug/MessageContent.js +87 -0
- package/dist/src/debug/chatEmbed.d.ts +2 -0
- package/dist/src/debug/chatEmbed.js +58 -0
- package/dist/src/debug/debugBar.d.ts +1 -0
- package/dist/src/debug/debugBar.js +9 -0
- package/dist/src/debug/reportIssue.d.ts +1 -0
- package/dist/src/debug/reportIssue.js +322 -0
- package/dist/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.d.ts +1 -0
- package/dist/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.js +452 -0
- package/dist/src/hocs/withBaseWidget/index.d.ts +2 -0
- package/dist/src/hocs/withBaseWidget/index.js +1 -0
- package/dist/src/hocs/withBaseWidget/types.d.ts +33 -0
- package/dist/src/hocs/withBaseWidget/types.js +0 -0
- package/dist/src/hocs/withBaseWidget/withBaseWidget.d.ts +5 -0
- package/dist/src/hocs/withBaseWidget/withBaseWidget.js +80 -0
- package/dist/src/stories/FloatingChatWidget.stories.d.ts +25 -0
- package/dist/src/stories/FloatingChatWidget.stories.js +44 -0
- package/dist/src/stories/FullPageSalesAgentWidget.stories.d.ts +31 -0
- package/dist/src/stories/FullPageSalesAgentWidget.stories.js +51 -0
- package/dist/src/stories/ProductCardWidget.stories.d.ts +31 -0
- package/dist/src/stories/ProductCardWidget.stories.js +44 -0
- package/dist/src/stories/PromptButtonCarouselWithImageWidget.stories.d.ts +31 -0
- package/dist/src/stories/PromptButtonCarouselWithImageWidget.stories.js +40 -0
- package/dist/src/stories/PromptCarouselWidget.stories.d.ts +31 -0
- package/dist/src/stories/PromptCarouselWidget.stories.js +40 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.d.ts +1 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.js +40 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.stories.d.ts +12 -0
- package/dist/src/stories/SalesAgentTest/SalesAgentTest.stories.js +12 -0
- package/dist/src/stories/SalesAgentTest/index.d.ts +0 -0
- package/dist/src/stories/SalesAgentTest/index.js +0 -0
- package/dist/src/stories/SearchResults.stories.d.ts +6 -0
- package/dist/src/stories/SearchResults.stories.js +23 -0
- package/dist/src/stories/SearchZeroState.stories.d.ts +38 -0
- package/dist/src/stories/SearchZeroState.stories.js +42 -0
- package/dist/src/stories/SocialProofFlowWidget.stories.d.ts +35 -0
- package/dist/src/stories/SocialProofFlowWidget.stories.js +60 -0
- package/dist/src/stories/SuggestionBar.stories.d.ts +7 -0
- package/dist/src/stories/SuggestionBar.stories.js +36 -0
- package/dist/src/stories/TitledPromptCarouselWidget.stories.d.ts +32 -0
- package/dist/src/stories/TitledPromptCarouselWidget.stories.js +55 -0
- package/dist/src/stories/TypingAnimationFlowWidget.stories.d.ts +34 -0
- package/dist/src/stories/TypingAnimationFlowWidget.stories.js +51 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +12 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +112 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewComparisonWidget/index.js +2 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +9 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.js +34 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewLoadingWidget/index.js +2 -0
- package/dist/src/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +12 -0
- package/dist/src/widgets/ChatPreviewWidget/ChatPreviewWidget.js +111 -0
- package/dist/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.d.ts +1 -0
- package/dist/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.js +97 -0
- package/dist/src/widgets/ChatPreviewWidget/index.d.ts +3 -0
- package/dist/src/widgets/ChatPreviewWidget/index.js +2 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatOverlay.d.ts +14 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatOverlay.js +44 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +8 -0
- package/dist/src/widgets/FloatingChatWidget/FloatingChatWidget.js +134 -0
- package/dist/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.d.ts +1 -0
- package/dist/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.js +100 -0
- package/dist/src/widgets/FloatingChatWidget/constants.d.ts +1 -0
- package/dist/src/widgets/FloatingChatWidget/constants.js +1 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useAutoPopup.d.ts +4 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useAutoPopup.js +51 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.d.ts +11 -0
- package/dist/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +21 -0
- package/dist/src/widgets/FloatingChatWidget/index.d.ts +4 -0
- package/dist/src/widgets/FloatingChatWidget/index.js +3 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +12 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +14 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/index.d.ts +1 -0
- package/dist/src/widgets/FullPageSalesAgentWidget/index.js +1 -0
- package/dist/src/widgets/ProductCardWidget/ProductCardWidget.d.ts +7 -0
- package/dist/src/widgets/ProductCardWidget/ProductCardWidget.js +94 -0
- package/dist/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.d.ts +1 -0
- package/dist/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.js +106 -0
- package/dist/src/widgets/ProductCardWidget/index.d.ts +2 -0
- package/dist/src/widgets/ProductCardWidget/index.js +1 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +12 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +88 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.d.ts +1 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.js +132 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/index.d.ts +2 -0
- package/dist/src/widgets/PromptButtonCarouselWithImageWidget/index.js +2 -0
- package/dist/src/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +7 -0
- package/dist/src/widgets/PromptCarouselWidget/PromptCarouselWidget.js +74 -0
- package/dist/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.d.ts +1 -0
- package/dist/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.js +106 -0
- package/dist/src/widgets/PromptCarouselWidget/index.d.ts +2 -0
- package/dist/src/widgets/PromptCarouselWidget/index.js +1 -0
- package/dist/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +7 -0
- package/dist/src/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +25 -0
- package/dist/src/widgets/SocialProofFlowWidget/index.d.ts +3 -0
- package/dist/src/widgets/SocialProofFlowWidget/index.js +2 -0
- package/dist/src/widgets/SocialProofWidget/SocialProofWidget.d.ts +12 -0
- package/dist/src/widgets/SocialProofWidget/SocialProofWidget.js +203 -0
- package/dist/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.d.ts +1 -0
- package/dist/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.js +135 -0
- package/dist/src/widgets/SocialProofWidget/index.d.ts +2 -0
- package/dist/src/widgets/SocialProofWidget/index.js +1 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +7 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +75 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.d.ts +1 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.js +106 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/index.d.ts +2 -0
- package/dist/src/widgets/TitledPromptCarouselWidget/index.js +1 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +7 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +25 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/index.d.ts +3 -0
- package/dist/src/widgets/TypingAnimationFlowWidget/index.js +2 -0
- package/dist/src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +12 -0
- package/dist/src/widgets/TypingAnimationWidget/TypingAnimationWidget.js +126 -0
- package/dist/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.d.ts +1 -0
- package/dist/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.js +118 -0
- package/dist/src/widgets/TypingAnimationWidget/index.d.ts +2 -0
- package/dist/src/widgets/TypingAnimationWidget/index.js +1 -0
- package/dist/src/widgets/__tests__/testUtils.d.ts +60 -0
- package/dist/src/widgets/__tests__/testUtils.js +46 -0
- package/dist/src/widgets/__tests__/trackEventCanary.test.d.ts +1 -0
- package/dist/src/widgets/__tests__/trackEventCanary.test.js +37 -0
- package/dist/src/widgets/hooks/useGetWidgetStatus.d.ts +7 -0
- package/dist/src/widgets/hooks/useGetWidgetStatus.js +17 -0
- package/dist/src/widgets/utils/functions.d.ts +16 -0
- package/dist/src/widgets/utils/functions.js +87 -0
- package/dist/src/widgets-v2/SearchResults/index.d.ts +2 -0
- package/dist/src/widgets-v2/SearchResults/index.js +2 -0
- package/dist/src/widgets-v2/SearchZeroState/index.d.ts +2 -0
- package/dist/src/widgets-v2/SearchZeroState/index.js +2 -0
- package/dist/src/widgets-v2/SuggestionBar/index.d.ts +2 -0
- package/dist/src/widgets-v2/SuggestionBar/index.js +2 -0
- package/dist/src/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -0
- package/dist/src/widgets-v2/SuggestionButtonContainer/index.js +2 -0
- package/dist/tsdown.config.d.ts +2 -0
- package/dist/tsdown.config.js +12 -0
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +36 -5
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +36 -5
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +34 -4
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
- package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +35 -5
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +0 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +31 -7
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
- package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +32 -8
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +2 -2
- package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +25 -3
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
- package/dist/widgets/ProductCardWidget/ProductCardWidget.js +25 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +23 -4
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
- package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +23 -4
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +15 -3
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +17 -5
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
- package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
- package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +53 -6
- package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
- package/dist/widgets/SocialProofWidget/SocialProofWidget.js +54 -7
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +10 -1
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
- package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +11 -2
- package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +24 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
- package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +25 -4
- package/dist/widgets/dist/SearchResults/SearchResults.d.cts +4 -3
- package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
- package/dist/widgets/dist/SearchZeroState/types.d.cts +2 -2
- package/dist/widgets/dist/SuggestionBar/SuggestionBar.d.cts +3 -3
- package/dist/widgets/dist/SuggestionButtonContainer/types.d.cts +3 -2
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/response.d.cts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/api/search.d.cts +15 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCase.d.cts +73 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/internal.d.cts +25 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/splitWords.d.cts +35 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/trim.d.cts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +32 -0
- package/dist/widgets/dist/packages/hooks/dist/atoms/search/searchAPI.d.cts +14 -0
- package/dist/widgets/dist/packages/hooks/dist/contexts/types.d.cts +61 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/Search/useSearch.d.cts +60 -0
- package/dist/widgets/dist/packages/hooks/dist/hooks/utils.d.cts +12 -0
- package/dist/widgets/dist/packages/hooks/dist/types/search-filter-types.d.cts +28 -0
- package/dist/widgets/dist/packages/hooks/dist/types/test-types.d.cts +10 -0
- package/dist/widgets/hooks/useGetWidgetStatus.cjs +1 -1
- package/dist/widgets/hooks/useGetWidgetStatus.js +1 -1
- package/dist/widgets/utils/functions.cjs +0 -14
- package/dist/widgets/utils/functions.js +1 -14
- package/dist/widgets-v2/SearchZeroState/index.d.cts +2 -1
- package/dist/widgets-v2/SearchZeroState/index.d.ts +2 -1
- package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +1 -0
- package/package.json +4 -4
- package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +68 -302
- package/src/hocs/withBaseWidget/types.ts +6 -6
- package/src/hocs/withBaseWidget/withBaseWidget.tsx +46 -61
- package/src/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.tsx +59 -8
- package/src/widgets/ChatPreviewWidget/ChatPreviewWidget.tsx +54 -18
- package/src/widgets/ChatPreviewWidget/__tests__/ChatPreviewWidget.test.tsx +11 -5
- package/src/widgets/FloatingChatWidget/FloatingChatOverlay.tsx +48 -19
- package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +100 -52
- package/src/widgets/FloatingChatWidget/__tests__/FloatingChatWidget.test.tsx +11 -5
- package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +37 -16
- package/src/widgets/ProductCardWidget/__tests__/ProductCardWidget.test.tsx +12 -8
- package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +38 -19
- package/src/widgets/PromptButtonCarouselWithImageWidget/__tests__/PromptButtonCarouselWithImageWidget.test.tsx +19 -8
- package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +32 -19
- package/src/widgets/PromptCarouselWidget/__tests__/PromptCarouselWidget.test.tsx +21 -8
- package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +77 -18
- package/src/widgets/SocialProofWidget/__tests__/SocialProofWidget.test.tsx +19 -8
- package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +23 -19
- package/src/widgets/TitledPromptCarouselWidget/__tests__/TitledPromptCarouselWidget.test.tsx +19 -8
- package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +45 -21
- package/src/widgets/TypingAnimationWidget/__tests__/TypingAnimationWidget.test.tsx +19 -8
- package/src/widgets/__tests__/trackEventCanary.test.ts +1 -1
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +0 -27
- package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +0 -25
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -696
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +0 -696
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +0 -43
- package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -43
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +0 -1528
- package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +0 -1528
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +0 -329
- package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +0 -329
- package/dist/packages/icons/dist/node_modules/react/index.cjs +0 -13
- package/dist/packages/icons/dist/node_modules/react/index.js +0 -13
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +0 -13
- package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +0 -13
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ widgetConfigId }: import("../widgets/TitledPromptCarouselWidget").TitledPromptCarouselWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
widgetConfigId: {
|
|
14
|
+
control: "text";
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parameters: {
|
|
19
|
+
docs: {
|
|
20
|
+
description: {
|
|
21
|
+
component: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
26
|
+
widgetConfigId: string;
|
|
27
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const Light: Story;
|
|
32
|
+
export declare const Dark: Story;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TitledPromptCarouselWidget } from '../widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Widgets V3/TitledPromptCarouselWidget',
|
|
5
|
+
component: TitledPromptCarouselWidget,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
widgetConfigId: 'titled-prompt-carousel-test-light-widget',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
widgetConfigId: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'Unique identifier for the widget configuration. The widget will fetch the widget config and hardcopy content based on this ID.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
component: 'TitledPromptCarouselWidget is a widget wrapper that combines a Title component with a PromptCarousel component. It includes base widget functionality such as visibility tracking, widget config fetching and hardcopy content fetching. The widget automatically fetches title label, title logo, and prompt button texts from hardcopy and widget config based on the widgetConfigId.',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
Story => (_jsx("div", { style: {
|
|
25
|
+
padding: '1rem',
|
|
26
|
+
maxWidth: '100%',
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
}, children: _jsx(Story, {}) })),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
export const Light = {
|
|
33
|
+
args: {
|
|
34
|
+
widgetConfigId: 'titled-prompt-carousel-test-light-widget',
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
description: {
|
|
39
|
+
story: 'TitledPromptCarouselWidget in light mode. The widget displays with light prompt buttons.',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export const Dark = {
|
|
45
|
+
args: {
|
|
46
|
+
widgetConfigId: 'titled-prompt-carousel-test-dark-widget',
|
|
47
|
+
},
|
|
48
|
+
parameters: {
|
|
49
|
+
docs: {
|
|
50
|
+
description: {
|
|
51
|
+
story: 'TitledPromptCarouselWidget in dark mode. The widget displays with dark prompt buttons.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
({ widgetConfigId }: import("../widgets/TypingAnimationFlowWidget").TypingAnimationFlowWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
args: {
|
|
10
|
+
widgetConfigId: string;
|
|
11
|
+
};
|
|
12
|
+
argTypes: {
|
|
13
|
+
widgetConfigId: {
|
|
14
|
+
control: "select";
|
|
15
|
+
options: string[];
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
27
|
+
widgetConfigId: string;
|
|
28
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
export declare const Playground: Story;
|
|
33
|
+
export declare const LightButtons: Story;
|
|
34
|
+
export declare const DarkButtons: Story;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TypingAnimationFlowWidget } from '../widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Widgets V3/TypingAnimationFlowWidget',
|
|
5
|
+
component: TypingAnimationFlowWidget,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
args: {
|
|
8
|
+
widgetConfigId: 'typing-animation-test-light-widget',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
widgetConfigId: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['typing-animation-test-light-widget', 'typing-animation-test-dark-widget'],
|
|
14
|
+
description: 'Unique identifier for the widget configuration. The widget will fetch the widget config based on this ID.',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
parameters: {
|
|
18
|
+
docs: {
|
|
19
|
+
description: {
|
|
20
|
+
component: 'TypingAnimationFlowWidget is a widget wrapper around TypingAnimation, ChatPreviewLoading and ChatPreview that includes base widget functionality such as visibility tracking, widget config fetching and hardcopy content fetching. The widget automatically fetches typing animation content (title, headline, animated text sequence, prompt buttons) from hardcopy and widget config based on the widgetConfigId. It handles post-interaction actions by transitioning to ChatPreview widget when the user interacts.',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
decorators: [
|
|
25
|
+
Story => (_jsx("div", { style: {
|
|
26
|
+
padding: '1rem',
|
|
27
|
+
maxWidth: '100%',
|
|
28
|
+
overflow: 'hidden',
|
|
29
|
+
}, children: _jsx(Story, {}) })),
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
export const Playground = {
|
|
34
|
+
parameters: {
|
|
35
|
+
docs: {
|
|
36
|
+
description: {
|
|
37
|
+
story: 'Experiment with different widgetConfigId values. The widget will fetch typing animation content (title, headline, animated text sequence, prompt buttons) from hardcopy content and widget config based on the widgetConfigId. After user interaction, it will transition to ChatPreview widget.',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const LightButtons = {
|
|
43
|
+
args: {
|
|
44
|
+
widgetConfigId: 'typing-animation-test-light-widget',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
export const DarkButtons = {
|
|
48
|
+
args: {
|
|
49
|
+
widgetConfigId: 'typing-animation-test-dark-widget',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseWidgetProps } from '../../hocs/withBaseWidget/types';
|
|
2
|
+
export declare const ChatPreviewComparisonWidgetWithBaseWidget: {
|
|
3
|
+
(props: BaseWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export interface ChatPreviewComparisonWidgetProps {
|
|
7
|
+
widgetConfigId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatPreviewComparisonWidget: {
|
|
10
|
+
({ widgetConfigId, }: ChatPreviewComparisonWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { chatAtom, lastAssistantMessageAtom } from '@envive-ai/react-hooks/atoms/chat';
|
|
3
|
+
import { useSalesAgent } from '@envive-ai/react-hooks/contexts/salesAgentContext';
|
|
4
|
+
import { WidgetTypeV3, } from '@envive-ai/react-hooks/contexts/typesV3';
|
|
5
|
+
import { useChatToggle } from '@envive-ai/react-hooks/hooks/ChatToggle';
|
|
6
|
+
import { useAtomValue } from 'jotai';
|
|
7
|
+
import { ChatElementDisplayLocationV3, VariantTypeEnum, } from '@envive-ai/react-hooks/application/models';
|
|
8
|
+
import { variantInfoAtom } from '@envive-ai/react-hooks/atoms/app';
|
|
9
|
+
import { EnviveMetricsEventName } from '@envive-ai/react-hooks/contexts/amplitudeContext';
|
|
10
|
+
import { useWidgetInteraction } from '@envive-ai/react-hooks/hooks/WidgetInteraction';
|
|
11
|
+
import { WidgetInteractionComponent, WidgetInteractionType, } from '@envive-ai/react-hooks/hooks/WidgetInteraction/types';
|
|
12
|
+
import { ChatPreviewComparison } from '@envive-ai/react-toolkit-v3/ChatPreviewComparison';
|
|
13
|
+
import { usePromptCarouselAnalytics } from '@envive-ai/react-toolkit-v3/PromptCarousel';
|
|
14
|
+
import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
|
|
15
|
+
import { useCallback, useMemo } from 'react';
|
|
16
|
+
import { withBaseWidget } from '../../hocs/withBaseWidget/withBaseWidget';
|
|
17
|
+
import { ChatPreviewLoadingWidgetWithBaseWidget } from '../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget';
|
|
18
|
+
import { getMessageText, getRecentProductImageUrls } from '../utils/functions';
|
|
19
|
+
const ChatPreviewComparisonWidgetHandler = (props) => {
|
|
20
|
+
const { onSuggestionClicked } = useSalesAgent();
|
|
21
|
+
const { openChat } = useChatToggle();
|
|
22
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
23
|
+
const { onClick: onPromptClicked, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, } = usePromptCarouselAnalytics(WidgetInteractionComponent.POST_INTERACTION_COMPARISON, text => text);
|
|
24
|
+
const lastAssistantMessage = useAtomValue(lastAssistantMessageAtom);
|
|
25
|
+
const variantInfo = useAtomValue(variantInfoAtom);
|
|
26
|
+
const productId = variantInfo.variant === VariantTypeEnum.Pdp ? variantInfo.productId : undefined;
|
|
27
|
+
const { suggestions } = useAtomValue(chatAtom);
|
|
28
|
+
const messageText = useMemo(() => getMessageText(lastAssistantMessage), [lastAssistantMessage]);
|
|
29
|
+
const productImageUrls = useMemo(() => (lastAssistantMessage ? getRecentProductImageUrls(lastAssistantMessage, productId) : []), [lastAssistantMessage, productId]);
|
|
30
|
+
const images = useMemo(() => productImageUrls
|
|
31
|
+
? productImageUrls.map((url, index) => ({ src: url, alt: `Product Image ${index + 1}` }))
|
|
32
|
+
: [], [productImageUrls]);
|
|
33
|
+
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
34
|
+
const chatPreviewComparisonWidgetConfig = widgetConfig;
|
|
35
|
+
const id = widgetConfig?.contentId;
|
|
36
|
+
const hardCopyContent = {
|
|
37
|
+
titleLabel: hardcopyContent?.values?.titleLabel,
|
|
38
|
+
headlineText: hardcopyContent?.values?.headlineText,
|
|
39
|
+
textFieldPlaceholderText: hardcopyContent?.values?.textFieldPlaceholderText,
|
|
40
|
+
messageText,
|
|
41
|
+
};
|
|
42
|
+
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
43
|
+
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
44
|
+
const handlePromptButtonClick = useCallback((suggestion) => {
|
|
45
|
+
onSuggestionClicked(suggestion, ChatElementDisplayLocationV3.CHAT_PREVIEW_COMPARISON_PROMPT_BUTTON);
|
|
46
|
+
openChat(ChatElementDisplayLocationV3.CHAT_PREVIEW_COMPARISON_PROMPT_BUTTON);
|
|
47
|
+
onPromptClicked(suggestion.id);
|
|
48
|
+
}, [onSuggestionClicked, openChat]);
|
|
49
|
+
const handleTextFieldClick = useCallback(() => {
|
|
50
|
+
openChat(ChatElementDisplayLocationV3.CHAT_PREVIEW_COMPARISON_TEXT_FIELD);
|
|
51
|
+
trackWidgetInteraction({
|
|
52
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
53
|
+
trigger: {
|
|
54
|
+
widget: WidgetInteractionComponent.POST_INTERACTION_COMPARISON,
|
|
55
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED,
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}, [openChat]);
|
|
59
|
+
const handleLinkClick = (url) => {
|
|
60
|
+
trackWidgetInteraction({
|
|
61
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
62
|
+
trigger: {
|
|
63
|
+
widget: WidgetInteractionComponent.POST_INTERACTION_COMPARISON,
|
|
64
|
+
widget_interaction: WidgetInteractionType.LINK_CLICKED,
|
|
65
|
+
widget_interaction_data: {
|
|
66
|
+
link_clicked: {
|
|
67
|
+
url,
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
if (isLoading) {
|
|
74
|
+
return (_jsx(ChatPreviewLoadingWidgetWithBaseWidget, { widgetConfigId: widgetConfigId, widgetType: WidgetTypeV3.ChatPreviewLoadingV3 }));
|
|
75
|
+
}
|
|
76
|
+
const widgetStyleProps = {
|
|
77
|
+
theme: Theme.GLOBAL_CUSTOM,
|
|
78
|
+
variant: chatPreviewComparisonWidgetConfig?.variant,
|
|
79
|
+
hideImage: images?.length === 0 || images === undefined
|
|
80
|
+
? true
|
|
81
|
+
: chatPreviewComparisonWidgetConfig?.hideImage,
|
|
82
|
+
hideTextField: chatPreviewComparisonWidgetConfig?.hideTextField,
|
|
83
|
+
hideLogo,
|
|
84
|
+
hexCardColor: chatPreviewComparisonWidgetConfig?.hexCardColor,
|
|
85
|
+
};
|
|
86
|
+
const widgetContentProps = {
|
|
87
|
+
titleLabel: hardCopyContent?.titleLabel,
|
|
88
|
+
headlineText: hardCopyContent?.headlineText,
|
|
89
|
+
messageText: hardCopyContent?.messageText,
|
|
90
|
+
promptButtons: suggestions,
|
|
91
|
+
textFieldPlaceholderText: hardCopyContent?.textFieldPlaceholderText,
|
|
92
|
+
images: images ?? [],
|
|
93
|
+
logoSrc: logoSrc ?? undefined,
|
|
94
|
+
};
|
|
95
|
+
const widgetEventProps = {
|
|
96
|
+
handlePromptButtonClick,
|
|
97
|
+
handlePromptButtonDrag: onDrag,
|
|
98
|
+
handlePromptButtonHover: onHover,
|
|
99
|
+
handlePromptButtonMouseDown: onMouseDown,
|
|
100
|
+
handlePromptButtonMouseUp: onMouseUp,
|
|
101
|
+
handlePromptButtonTouchStart: onTouchStart,
|
|
102
|
+
handlePromptButtonTouchEnd: onTouchEnd,
|
|
103
|
+
handleLinkClick,
|
|
104
|
+
handleTextFieldClick,
|
|
105
|
+
};
|
|
106
|
+
return (_jsx(ChatPreviewComparison, { baseProps: { id }, widgetStyleProps: widgetStyleProps, widgetContentProps: widgetContentProps, widgetEventProps: widgetEventProps }));
|
|
107
|
+
};
|
|
108
|
+
export const ChatPreviewComparisonWidgetWithBaseWidget = withBaseWidget(ChatPreviewComparisonWidgetHandler);
|
|
109
|
+
export const ChatPreviewComparisonWidget = ({ widgetConfigId, }) => {
|
|
110
|
+
return (_jsx(ChatPreviewComparisonWidgetWithBaseWidget, { widgetConfigId: widgetConfigId, widgetType: WidgetTypeV3.ChatPreviewComparisonV3 }));
|
|
111
|
+
};
|
|
112
|
+
ChatPreviewComparisonWidget.displayName = 'ChatPreviewComparisonWidget';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ChatPreviewComparisonWidget, ChatPreviewComparisonWidgetWithBaseWidget } from './ChatPreviewComparisonWidget';
|
|
2
|
+
export { ChatPreviewComparisonWidget, ChatPreviewComparisonWidgetWithBaseWidget };
|
|
3
|
+
export type { ChatPreviewComparisonWidgetProps } from './ChatPreviewComparisonWidget';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseWidgetProps } from '../../hocs/withBaseWidget/types';
|
|
2
|
+
export declare const ChatPreviewLoadingWidgetWithBaseWidget: {
|
|
3
|
+
(props: BaseWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export interface ChatPreviewLoadingWidgetProps {
|
|
7
|
+
widgetConfigId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatPreviewLoadingWidget: ({ widgetConfigId }: ChatPreviewLoadingWidgetProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { WidgetTypeV3, } from '@envive-ai/react-hooks/contexts/typesV3';
|
|
3
|
+
import { useAtomValue } from 'jotai';
|
|
4
|
+
import { ChatPreviewLoading } from '@envive-ai/react-toolkit-v3/ChatPreviewLoading';
|
|
5
|
+
import { chatPreviewLoadingDataAtom } from '@envive-ai/react-hooks/atoms/widget';
|
|
6
|
+
import { withBaseWidget } from '../../hocs/withBaseWidget/withBaseWidget';
|
|
7
|
+
import { PromptCarouselWidget } from '../PromptCarouselWidget/PromptCarouselWidget';
|
|
8
|
+
const ChatPreviewLoadingWidgetHandler = (props) => {
|
|
9
|
+
const { widgetConfig, isLoading, widgetConfigId, hardcopyContent, uiConfig } = props;
|
|
10
|
+
const chatPreviewLoadingWidgetConfig = widgetConfig;
|
|
11
|
+
const id = widgetConfig?.contentId;
|
|
12
|
+
const chatPreviewLoadingDataMap = useAtomValue(chatPreviewLoadingDataAtom);
|
|
13
|
+
const chatPreviewLoadingData = chatPreviewLoadingDataMap[widgetConfigId] ?? undefined;
|
|
14
|
+
const isCacheEmpty = !chatPreviewLoadingData ||
|
|
15
|
+
Object.values(chatPreviewLoadingData).every(value => value === undefined) ||
|
|
16
|
+
Object.keys(chatPreviewLoadingData).length === 0;
|
|
17
|
+
if (isLoading && isCacheEmpty) {
|
|
18
|
+
return _jsx(ChatPreviewLoading, { fullIsLoading: true });
|
|
19
|
+
}
|
|
20
|
+
const titleLabel = hardcopyContent?.values?.titleLabel ?? chatPreviewLoadingData?.titleLabel;
|
|
21
|
+
const textFieldPlaceholder = hardcopyContent?.values?.textFieldPlaceholderText ??
|
|
22
|
+
chatPreviewLoadingData?.textFieldPlaceholder;
|
|
23
|
+
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo ?? chatPreviewLoadingData?.hideLogo;
|
|
24
|
+
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc ?? chatPreviewLoadingData?.logoSrc;
|
|
25
|
+
const variant = chatPreviewLoadingWidgetConfig?.variant ?? chatPreviewLoadingData?.variant;
|
|
26
|
+
const hexCardColor = chatPreviewLoadingWidgetConfig?.hexCardColor ?? chatPreviewLoadingData?.hexCardColor;
|
|
27
|
+
const hideTextField = chatPreviewLoadingWidgetConfig?.hideTextField ?? chatPreviewLoadingData?.hideTextField;
|
|
28
|
+
return (_jsx(ChatPreviewLoading, { id: id, variant: variant, hexCardColor: hexCardColor, hideTextField: hideTextField, textFieldPlaceholder: textFieldPlaceholder, hideLogo: hideLogo, logoSrc: logoSrc, titleLabel: titleLabel }));
|
|
29
|
+
};
|
|
30
|
+
export const ChatPreviewLoadingWidgetWithBaseWidget = withBaseWidget(ChatPreviewLoadingWidgetHandler);
|
|
31
|
+
export const ChatPreviewLoadingWidget = ({ widgetConfigId }) => {
|
|
32
|
+
return (_jsx(ChatPreviewLoadingWidgetWithBaseWidget, { widgetConfigId: widgetConfigId, widgetType: WidgetTypeV3.ChatPreviewLoadingV3 }));
|
|
33
|
+
};
|
|
34
|
+
PromptCarouselWidget.displayName = 'PromptCarouselWidget';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseWidgetProps } from '../../hocs/withBaseWidget/types';
|
|
2
|
+
export declare const ChatPreviewWidgetWithBaseWidget: {
|
|
3
|
+
(props: BaseWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
6
|
+
export interface ChatPreviewWidgetProps {
|
|
7
|
+
widgetConfigId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatPreviewWidget: {
|
|
10
|
+
({ widgetConfigId }: ChatPreviewWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { chatAtom, lastAssistantMessageAtom } from '@envive-ai/react-hooks/atoms/chat';
|
|
3
|
+
import { useSalesAgent } from '@envive-ai/react-hooks/contexts/salesAgentContext';
|
|
4
|
+
import { WidgetTypeV3 } from '@envive-ai/react-hooks/contexts/typesV3';
|
|
5
|
+
import { useChatToggle } from '@envive-ai/react-hooks/hooks/ChatToggle';
|
|
6
|
+
import { useAtomValue } from 'jotai';
|
|
7
|
+
import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
|
|
8
|
+
import { ChatElementDisplayLocationV3, } from '@envive-ai/react-hooks/application/models';
|
|
9
|
+
import { EnviveMetricsEventName, SpiffyMetricsEventName, useAmplitude, } from '@envive-ai/react-hooks/contexts/amplitudeContext';
|
|
10
|
+
import { useWidgetInteraction } from '@envive-ai/react-hooks/hooks/WidgetInteraction';
|
|
11
|
+
import { WidgetInteractionComponent, WidgetInteractionType, } from '@envive-ai/react-hooks/hooks/WidgetInteraction/types';
|
|
12
|
+
import { ChatPreview } from '@envive-ai/react-toolkit-v3/ChatPreview';
|
|
13
|
+
import { usePromptCarouselAnalytics } from '@envive-ai/react-toolkit-v3/PromptCarousel';
|
|
14
|
+
import { useCallback, useEffect, useMemo } from 'react';
|
|
15
|
+
import { withBaseWidget } from '../../hocs/withBaseWidget/withBaseWidget';
|
|
16
|
+
import { ChatPreviewLoadingWidgetWithBaseWidget } from '../ChatPreviewLoadingWidget/ChatPreviewLoadingWidget';
|
|
17
|
+
import { getMessageText } from '../utils/functions';
|
|
18
|
+
const ChatPreviewWidgetHandler = (props) => {
|
|
19
|
+
const { onSuggestionClicked } = useSalesAgent();
|
|
20
|
+
const { openChat } = useChatToggle();
|
|
21
|
+
const lastAssistantMessage = useAtomValue(lastAssistantMessageAtom);
|
|
22
|
+
const { suggestions } = useAtomValue(chatAtom);
|
|
23
|
+
const messageText = useMemo(() => getMessageText(lastAssistantMessage), [lastAssistantMessage]);
|
|
24
|
+
const { hardcopyContent, widgetConfig, uiConfig, isLoading, widgetConfigId } = props;
|
|
25
|
+
const chatPreviewWidgetConfig = widgetConfig;
|
|
26
|
+
const id = widgetConfig?.contentId;
|
|
27
|
+
const hardCopyContent = {
|
|
28
|
+
titleLabel: hardcopyContent?.values?.titleLabel,
|
|
29
|
+
textFieldPlaceholderText: hardcopyContent?.values?.textFieldPlaceholderText,
|
|
30
|
+
promptButtons: suggestions,
|
|
31
|
+
messageText,
|
|
32
|
+
};
|
|
33
|
+
const { trackEvent } = useAmplitude();
|
|
34
|
+
const { trackWidgetInteraction } = useWidgetInteraction();
|
|
35
|
+
const { onClick: onPromptClicked, onDrag, onHover, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, } = usePromptCarouselAnalytics(WidgetInteractionComponent.CHAT_PREVIEW, text => text);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
// TODO: -Add Widget Interaction here
|
|
38
|
+
trackEvent({
|
|
39
|
+
eventName: SpiffyMetricsEventName.ChatComponentVisible,
|
|
40
|
+
eventProps: {
|
|
41
|
+
widget_config_id: widgetConfigId,
|
|
42
|
+
widget_type: WidgetTypeV3.ChatPreviewV3,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
}, [trackEvent, widgetConfigId]);
|
|
46
|
+
const logoSrc = uiConfig?.lookAndFeel?.widgetLogoSrc;
|
|
47
|
+
const hideLogo = uiConfig?.lookAndFeel?.hideWidgetLogo;
|
|
48
|
+
const handlePromptButtonClick = useCallback((suggestion) => {
|
|
49
|
+
onSuggestionClicked(suggestion, ChatElementDisplayLocationV3.CHAT_PREVIEW_PROMPT_BUTTON);
|
|
50
|
+
openChat(ChatElementDisplayLocationV3.CHAT_PREVIEW_PROMPT_BUTTON);
|
|
51
|
+
onPromptClicked(suggestion.id);
|
|
52
|
+
}, [onSuggestionClicked, openChat]);
|
|
53
|
+
const handleTextFieldClick = useCallback(() => {
|
|
54
|
+
openChat(ChatElementDisplayLocationV3.CHAT_PREVIEW_TEXT_FIELD);
|
|
55
|
+
trackWidgetInteraction({
|
|
56
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
57
|
+
trigger: {
|
|
58
|
+
widget: WidgetInteractionComponent.CHAT_PREVIEW,
|
|
59
|
+
widget_interaction: WidgetInteractionType.QUERY_INPUT_CLICKED,
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}, [openChat]);
|
|
63
|
+
const handleLinkClick = (url) => {
|
|
64
|
+
trackWidgetInteraction({
|
|
65
|
+
eventName: EnviveMetricsEventName.WidgetInteraction,
|
|
66
|
+
trigger: {
|
|
67
|
+
widget: WidgetInteractionComponent.CHAT_PREVIEW,
|
|
68
|
+
widget_interaction: WidgetInteractionType.LINK_CLICKED,
|
|
69
|
+
widget_interaction_data: {
|
|
70
|
+
link_clicked: {
|
|
71
|
+
url,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
if (isLoading) {
|
|
78
|
+
return (_jsx(ChatPreviewLoadingWidgetWithBaseWidget, { widgetConfigId: widgetConfigId, widgetType: WidgetTypeV3.ChatPreviewLoadingV3 }));
|
|
79
|
+
}
|
|
80
|
+
const widgetStyleProps = {
|
|
81
|
+
theme: Theme.GLOBAL_CUSTOM,
|
|
82
|
+
variant: chatPreviewWidgetConfig?.variant,
|
|
83
|
+
hideTextField: chatPreviewWidgetConfig?.hideTextField,
|
|
84
|
+
hideLogo,
|
|
85
|
+
hexCardColor: chatPreviewWidgetConfig?.hexCardColor,
|
|
86
|
+
};
|
|
87
|
+
const widgetContentProps = {
|
|
88
|
+
titleLabel: hardCopyContent?.titleLabel,
|
|
89
|
+
messageText: hardCopyContent?.messageText,
|
|
90
|
+
promptButtons: hardCopyContent?.promptButtons,
|
|
91
|
+
textFieldPlaceholderText: hardCopyContent?.textFieldPlaceholderText,
|
|
92
|
+
logoSrc: logoSrc ?? undefined,
|
|
93
|
+
};
|
|
94
|
+
const widgetEventProps = {
|
|
95
|
+
handlePromptButtonClick,
|
|
96
|
+
handlePromptButtonDrag: onDrag,
|
|
97
|
+
handlePromptButtonHover: onHover,
|
|
98
|
+
handlePromptButtonMouseDown: onMouseDown,
|
|
99
|
+
handlePromptButtonMouseUp: onMouseUp,
|
|
100
|
+
handlePromptButtonTouchStart: onTouchStart,
|
|
101
|
+
handlePromptButtonTouchEnd: onTouchEnd,
|
|
102
|
+
handleLinkClick,
|
|
103
|
+
handleTextFieldClick,
|
|
104
|
+
};
|
|
105
|
+
return (_jsx(ChatPreview, { baseProps: { id }, widgetStyleProps: widgetStyleProps, widgetContentProps: widgetContentProps, widgetEventProps: widgetEventProps }));
|
|
106
|
+
};
|
|
107
|
+
export const ChatPreviewWidgetWithBaseWidget = withBaseWidget(ChatPreviewWidgetHandler);
|
|
108
|
+
export const ChatPreviewWidget = ({ widgetConfigId }) => {
|
|
109
|
+
return (_jsx(ChatPreviewWidgetWithBaseWidget, { widgetConfigId: widgetConfigId, widgetType: WidgetTypeV3.ChatPreviewV3 }));
|
|
110
|
+
};
|
|
111
|
+
ChatPreviewWidget.displayName = 'ChatPreviewWidget';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { render, waitFor } from '@testing-library/react';
|
|
3
|
+
import { SpiffyMetricsEventName } from '@envive-ai/react-hooks/contexts/amplitudeContext';
|
|
4
|
+
import { WidgetTypeV3 } from '@envive-ai/react-hooks/contexts/typesV3';
|
|
5
|
+
import { UserEventCategory } from '@spiffy-ai/commerce-api-client';
|
|
6
|
+
import { ChatPreviewWidget } from '../ChatPreviewWidget';
|
|
7
|
+
const mockTrackEvent = vi.fn();
|
|
8
|
+
const mockGetHardcopy = vi.fn();
|
|
9
|
+
vi.mock('@envive-ai/react-toolkit-v3/ChatPreview', () => ({
|
|
10
|
+
ChatPreview: () => _jsx("div", { "data-testid": "chat-preview-mock", children: "Chat Preview" }),
|
|
11
|
+
}));
|
|
12
|
+
vi.mock('@envive-ai/react-hooks/contexts/amplitudeContext', () => ({
|
|
13
|
+
useAmplitude: () => ({
|
|
14
|
+
trackEvent: mockTrackEvent,
|
|
15
|
+
isReady: true,
|
|
16
|
+
}),
|
|
17
|
+
SpiffyMetricsEventName: {
|
|
18
|
+
ChatComponentVisible: 'Chat Component Visible',
|
|
19
|
+
SearchComponentVisible: 'Search Component Visible',
|
|
20
|
+
},
|
|
21
|
+
}));
|
|
22
|
+
vi.mock('@envive-ai/react-hooks/contexts/hardcopyContext', () => ({
|
|
23
|
+
useHardcopy: () => ({
|
|
24
|
+
getHardcopy: mockGetHardcopy,
|
|
25
|
+
}),
|
|
26
|
+
}));
|
|
27
|
+
vi.mock('@envive-ai/react-hooks/contexts/pageContext', () => ({
|
|
28
|
+
usePage: () => ({
|
|
29
|
+
userEvent: {
|
|
30
|
+
id: 'test-user-event-id',
|
|
31
|
+
category: UserEventCategory.PageVisit,
|
|
32
|
+
created_at: '2025-01-01T00:00:00Z',
|
|
33
|
+
event_id: 'test-event-id',
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
}));
|
|
37
|
+
vi.mock('@envive-ai/react-hooks/contexts/widgetConfigContext', () => ({
|
|
38
|
+
useWidgetConfig: () => ({
|
|
39
|
+
getWidgetConfig: vi.fn().mockResolvedValue({}),
|
|
40
|
+
}),
|
|
41
|
+
}));
|
|
42
|
+
vi.mock('@envive-ai/react-hooks/contexts/uiConfigContext', () => ({
|
|
43
|
+
useUiConfig: () => ({
|
|
44
|
+
getUiConfig: vi.fn().mockResolvedValue({}),
|
|
45
|
+
}),
|
|
46
|
+
}));
|
|
47
|
+
vi.mock('@envive-ai/react-hooks/contexts/salesAgentContext', () => ({
|
|
48
|
+
useSalesAgent: () => ({
|
|
49
|
+
onSuggestionClicked: vi.fn(),
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
vi.mock('@envive-ai/react-hooks/hooks/ChatToggle', () => ({
|
|
53
|
+
useChatToggle: () => ({
|
|
54
|
+
openChat: vi.fn(),
|
|
55
|
+
}),
|
|
56
|
+
}));
|
|
57
|
+
vi.mock('@envive-ai/react-hooks/atoms/chat', () => ({
|
|
58
|
+
chatAtom: {},
|
|
59
|
+
lastAssistantMessageAtom: {},
|
|
60
|
+
}));
|
|
61
|
+
vi.mock('jotai', async (importOriginal) => {
|
|
62
|
+
const actual = await importOriginal();
|
|
63
|
+
return {
|
|
64
|
+
...actual,
|
|
65
|
+
useAtomValue: vi
|
|
66
|
+
.fn()
|
|
67
|
+
.mockReturnValueOnce([])
|
|
68
|
+
.mockReturnValueOnce({ messages: [], suggestions: [] })
|
|
69
|
+
.mockReturnValue([]),
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
describe('ChatPreviewWidget analytics', () => {
|
|
73
|
+
const defaultHardcopy = {
|
|
74
|
+
responseId: 'test-response-id',
|
|
75
|
+
language: 'en',
|
|
76
|
+
values: {
|
|
77
|
+
titleLabel: 'Chat Preview',
|
|
78
|
+
textFieldPlaceholderText: 'Type here',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
beforeEach(() => {
|
|
82
|
+
vi.clearAllMocks();
|
|
83
|
+
mockGetHardcopy.mockResolvedValue(defaultHardcopy);
|
|
84
|
+
});
|
|
85
|
+
it('should track ChatComponentVisible when widget mounts', async () => {
|
|
86
|
+
render(_jsx(ChatPreviewWidget, { widgetConfigId: "test-config-1" }));
|
|
87
|
+
await waitFor(() => {
|
|
88
|
+
expect(mockTrackEvent).toHaveBeenCalledWith({
|
|
89
|
+
eventName: SpiffyMetricsEventName.ChatComponentVisible,
|
|
90
|
+
eventProps: {
|
|
91
|
+
widget_config_id: 'test-config-1',
|
|
92
|
+
widget_type: WidgetTypeV3.ChatPreviewV3,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
}, { timeout: 3000 });
|
|
96
|
+
}, 5000);
|
|
97
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FloatingChatOverlayProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
isOpened: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
dataTestId?: string;
|
|
8
|
+
previewMode?: boolean;
|
|
9
|
+
isResultsModalOpen?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const FloatingChatOverlay: {
|
|
12
|
+
({ children, isOpened, onClose, className, dataTestId, previewMode, isResultsModalOpen, }: FloatingChatOverlayProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|