@envive-ai/react-hooks 0.3.7 → 0.3.8
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/application/commerce-api.cjs +1 -1
- package/dist/application/commerce-api.js +1 -1
- package/dist/application/models/chatElementDisplayLocationV3.cjs +3 -1
- package/dist/application/models/chatElementDisplayLocationV3.d.cts +3 -1
- package/dist/application/models/chatElementDisplayLocationV3.d.ts +3 -1
- package/dist/application/models/chatElementDisplayLocationV3.js +3 -1
- package/dist/application/models/frontendConfigV3.d.cts +2 -2
- package/dist/application/models/frontendConfigV3.d.ts +2 -2
- package/dist/application/utils/widgetTextRequestToApiRequest.cjs +5 -2
- package/dist/application/utils/widgetTextRequestToApiRequest.js +5 -2
- package/dist/atoms/app/index.cjs +4 -4
- package/dist/atoms/app/index.d.cts +7 -7
- package/dist/atoms/app/index.d.ts +7 -7
- package/dist/atoms/app/index.js +4 -4
- package/dist/atoms/app/variant.d.cts +6 -6
- package/dist/atoms/app/variant.d.ts +6 -6
- package/dist/atoms/chat/chatState.d.cts +18 -18
- package/dist/atoms/chat/chatState.d.ts +17 -17
- package/dist/atoms/chat/form.d.cts +2 -2
- package/dist/atoms/chat/form.d.ts +2 -2
- package/dist/atoms/chat/index.d.cts +2 -2
- package/dist/atoms/chat/index.d.ts +2 -2
- package/dist/atoms/chat/lastMessage.d.cts +2 -2
- package/dist/atoms/chat/lastMessage.d.ts +2 -2
- package/dist/atoms/chat/performanceMetrics.d.cts +6 -6
- package/dist/atoms/chat/performanceMetrics.d.ts +6 -6
- package/dist/atoms/chat/renderedWidgetRefs.d.cts +2 -2
- package/dist/atoms/chat/renderedWidgetRefs.d.ts +2 -2
- package/dist/atoms/chat/replies.cjs +46 -0
- package/dist/atoms/chat/replies.d.cts +14 -0
- package/dist/atoms/chat/replies.d.ts +14 -0
- package/dist/atoms/chat/replies.js +45 -0
- package/dist/atoms/chat/suggestions.d.cts +2 -2
- package/dist/atoms/chat/suggestions.d.ts +2 -2
- package/dist/atoms/globalSearch/globalSearch.d.cts +5 -5
- package/dist/atoms/globalSearch/globalSearch.d.ts +5 -5
- package/dist/atoms/org/customerService.d.cts +6 -6
- package/dist/atoms/org/customerService.d.ts +6 -6
- package/dist/atoms/org/graphqlConfig.d.cts +4 -4
- package/dist/atoms/org/graphqlConfig.d.ts +4 -4
- package/dist/atoms/org/index.cjs +2 -2
- package/dist/atoms/org/index.js +2 -2
- package/dist/atoms/org/newOrgConfigAtom.d.cts +2 -2
- package/dist/atoms/org/newOrgConfigAtom.d.ts +2 -2
- package/dist/atoms/org/orgAnalyticsConfig.d.cts +5 -5
- package/dist/atoms/org/orgAnalyticsConfig.d.ts +5 -5
- package/dist/atoms/search/chatSearch.cjs +1 -1
- package/dist/atoms/search/chatSearch.d.cts +17 -17
- package/dist/atoms/search/chatSearch.d.ts +17 -17
- package/dist/atoms/search/chatSearch.js +1 -1
- package/dist/atoms/search/searchAPI.cjs +1 -1
- package/dist/atoms/search/searchAPI.d.cts +13 -13
- package/dist/atoms/search/searchAPI.d.ts +13 -13
- package/dist/atoms/search/searchAPI.js +1 -1
- package/dist/atoms/search/types.d.cts +1 -1
- package/dist/atoms/widget/chatPreviewLoading.d.cts +2 -2
- package/dist/atoms/widget/chatPreviewLoading.d.ts +2 -2
- package/dist/contexts/amplitudeContext/amplitudeContext.cjs +6 -4
- package/dist/contexts/amplitudeContext/amplitudeContext.js +6 -4
- package/dist/contexts/enviveContext/enviveContext.cjs +38 -16
- package/dist/contexts/enviveContext/enviveContext.d.cts +4 -1
- package/dist/contexts/enviveContext/enviveContext.d.ts +4 -1
- package/dist/contexts/enviveContext/enviveContext.js +38 -16
- package/dist/contexts/enviveContext/types.d.cts +1 -1
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.cjs +56 -2
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.cts +6 -1
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.d.ts +6 -1
- package/dist/contexts/featureFlagServiceContext/featureFlagServiceContext.js +56 -2
- package/dist/contexts/graphqlContext/graphqlContext.cjs +10 -4
- package/dist/contexts/graphqlContext/graphqlContext.js +10 -4
- package/dist/contexts/graphqlContext/mockV3Config.cjs +18 -7
- package/dist/contexts/graphqlContext/mockV3Config.js +17 -6
- package/dist/contexts/hardcopyContext/hardcopyContext.cjs +29 -1
- package/dist/contexts/hardcopyContext/hardcopyContext.js +29 -1
- package/dist/contexts/newOrgConfigContext/newOrgConfigContext.cjs +1 -1
- package/dist/contexts/newOrgConfigContext/newOrgConfigContext.js +1 -1
- package/dist/contexts/salesAgentContext/chatAPI.cjs +33 -5
- package/dist/contexts/salesAgentContext/chatAPI.d.cts +4 -4
- package/dist/contexts/salesAgentContext/chatAPI.d.ts +4 -4
- package/dist/contexts/salesAgentContext/chatAPI.js +33 -5
- package/dist/contexts/salesAgentContext/formSubmittedUtils.cjs +37 -0
- package/dist/contexts/salesAgentContext/formSubmittedUtils.js +36 -0
- package/dist/contexts/salesAgentContext/index.d.cts +2 -2
- package/dist/contexts/salesAgentContext/index.d.ts +2 -2
- package/dist/contexts/salesAgentContext/salesAgentContext.cjs +33 -4
- package/dist/contexts/salesAgentContext/salesAgentContext.d.cts +11 -4
- package/dist/contexts/salesAgentContext/salesAgentContext.d.ts +11 -4
- package/dist/contexts/salesAgentContext/salesAgentContext.js +33 -4
- package/dist/contexts/salesAgentContext/salesAgentService.cjs +13 -7
- package/dist/contexts/salesAgentContext/salesAgentService.js +13 -7
- package/dist/contexts/searchContext/searchContext.cjs +1 -1
- package/dist/contexts/searchContext/searchContext.js +1 -1
- package/dist/contexts/types.d.cts +1 -1
- package/dist/contexts/types.d.ts +1 -1
- package/dist/contexts/typesV3.cjs +2 -7
- package/dist/contexts/typesV3.d.cts +12 -9
- package/dist/contexts/typesV3.d.ts +12 -9
- package/dist/contexts/typesV3.js +3 -7
- package/dist/contexts/userIdentityContext/userIdentityContext.cjs +22 -29
- package/dist/contexts/userIdentityContext/userIdentityContext.d.cts +9 -8
- package/dist/contexts/userIdentityContext/userIdentityContext.d.ts +9 -8
- package/dist/contexts/userIdentityContext/userIdentityContext.js +22 -29
- package/dist/hooks/ElementObserver/useElementObserver.cjs +3 -2
- package/dist/hooks/ElementObserver/useElementObserver.js +3 -2
- package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.cts +2 -2
- package/dist/hooks/GrabAndScroll/useGrabAndScroll.d.ts +2 -2
- package/dist/hooks/Search/useSearch.cjs +2 -2
- package/dist/hooks/Search/useSearch.js +2 -2
- package/dist/hooks/Search/useSearchInput.cjs +2 -2
- package/dist/hooks/Search/useSearchInput.js +2 -2
- package/dist/hooks/utils.d.cts +1 -1
- package/dist/mocks/index.cjs +5 -0
- package/dist/mocks/index.d.cts +2 -0
- package/dist/mocks/index.d.ts +2 -0
- package/dist/mocks/index.js +3 -0
- package/dist/mocks/salesAgentMockData.cjs +207 -0
- package/dist/mocks/salesAgentMockData.d.cts +11 -0
- package/dist/mocks/salesAgentMockData.d.ts +11 -0
- package/dist/mocks/salesAgentMockData.js +204 -0
- package/dist/packages/components-v3/dist/ChatHeader/components/CloseButton.cjs +2 -2
- package/dist/packages/components-v3/dist/ChatHeader/components/CloseButton.js +2 -2
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetCloseButtonProperties.cjs +2 -2
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetCloseButtonProperties.js +2 -2
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetHandleProperties.cjs +18 -18
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetHandleProperties.js +18 -18
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetLayoutProperties.cjs +1 -1
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetLayoutProperties.js +1 -1
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleProperties.cjs +4 -4
- package/dist/packages/components-v3/dist/ChatHeader/hooks/useGetToggleProperties.js +4 -4
- package/dist/packages/components-v3/dist/ChatPreviewLoading/components/Skeleton.cjs +1 -0
- package/dist/packages/components-v3/dist/ChatPreviewLoading/components/Skeleton.js +3 -0
- package/dist/packages/components-v3/dist/Container/Container.cjs +19 -3
- package/dist/packages/components-v3/dist/Container/Container.js +19 -4
- package/dist/packages/components-v3/dist/Container/hooks/useGetCenterContentProperties.cjs +13 -0
- package/dist/packages/components-v3/dist/Container/hooks/useGetCenterContentProperties.js +11 -1
- package/dist/packages/components-v3/dist/Container/hooks/useGetFluidProperties.cjs +13 -0
- package/dist/packages/components-v3/dist/Container/hooks/useGetFluidProperties.js +11 -1
- package/dist/packages/components-v3/dist/Container/index.cjs +1 -1
- package/dist/packages/components-v3/dist/Container/index.js +1 -1
- package/dist/packages/components-v3/dist/DesignTokens/components/utils.cjs +16 -0
- package/dist/packages/components-v3/dist/DesignTokens/components/utils.js +15 -0
- package/dist/packages/components-v3/dist/ImageGallery/components/Layout.cjs +2 -2
- package/dist/packages/components-v3/dist/ImageGallery/components/Layout.js +2 -2
- package/dist/packages/components-v3/dist/PromptButton/PromptButton.cjs +40 -4
- package/dist/packages/components-v3/dist/PromptButton/PromptButton.js +40 -5
- package/dist/packages/components-v3/dist/PromptButton/components/Icon.cjs +10 -0
- package/dist/packages/components-v3/dist/PromptButton/components/Icon.js +8 -1
- package/dist/packages/components-v3/dist/PromptButton/components/Label.cjs +18 -1
- package/dist/packages/components-v3/dist/PromptButton/components/Label.js +16 -2
- package/dist/packages/components-v3/dist/PromptButton/components/Layout.cjs +31 -3
- package/dist/packages/components-v3/dist/PromptButton/components/Layout.js +31 -4
- package/dist/packages/components-v3/dist/PromptButton/components/Loading.cjs +5 -1
- package/dist/packages/components-v3/dist/PromptButton/components/Loading.js +5 -2
- package/dist/packages/components-v3/dist/PromptButton/components/index.cjs +16 -4
- package/dist/packages/components-v3/dist/PromptButton/components/index.js +15 -5
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBackgroundColorsProperties.cjs +18 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBackgroundColorsProperties.js +18 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBoldTextProperties.cjs +12 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBoldTextProperties.js +10 -1
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBorderColorsProperties.cjs +18 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetBorderColorsProperties.js +18 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetIconColorsProperties.cjs +32 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetIconColorsProperties.js +32 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetLayoutBaseProperties.cjs +9 -1
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetLayoutBaseProperties.js +9 -2
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetTextColorsProperties.cjs +19 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetTextColorsProperties.js +19 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetVariantColorsProperties.cjs +29 -0
- package/dist/packages/components-v3/dist/PromptButton/hooks/useGetVariantColorsProperties.js +29 -0
- package/dist/packages/components-v3/dist/PromptButton/index.cjs +1 -1
- package/dist/packages/components-v3/dist/PromptButton/index.js +1 -1
- package/dist/packages/components-v3/dist/PromptButton/utils/functions.cjs +10 -0
- package/dist/packages/components-v3/dist/PromptButton/utils/functions.js +10 -0
- package/dist/packages/components-v3/dist/PromptCarousel/hooks/useCarouselRefs.js +1 -1
- package/dist/packages/components-v3/dist/SocialProof/SocialProof.cjs +10 -0
- package/dist/packages/components-v3/dist/SocialProof/SocialProof.js +12 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Headline.cjs +53 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Headline.js +54 -0
- package/dist/packages/components-v3/dist/SocialProof/components/ImageGallery.cjs +5 -0
- package/dist/packages/components-v3/dist/SocialProof/components/ImageGallery.js +7 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutFourGrid.cjs +6 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutFourGrid.js +8 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutFourHorizontal.cjs +16 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutFourHorizontal.js +17 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutSingle.cjs +8 -0
- package/dist/packages/components-v3/dist/SocialProof/components/LayoutSingle.js +10 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Skeleton.cjs +1 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Skeleton.js +3 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Subheadline.cjs +8 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Subheadline.js +10 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Textfield.cjs +3 -0
- package/dist/packages/components-v3/dist/SocialProof/components/Textfield.js +5 -0
- package/dist/packages/components-v3/dist/SocialProof/components/index.cjs +8 -0
- package/dist/packages/components-v3/dist/SocialProof/components/index.js +10 -0
- package/dist/packages/components-v3/dist/SocialProof/hooks/index.cjs +1 -0
- package/dist/packages/components-v3/dist/SocialProof/hooks/index.js +3 -0
- package/dist/packages/components-v3/dist/SocialProof/hooks/useSocialProofCount.cjs +1 -0
- package/dist/packages/components-v3/dist/SocialProof/hooks/useSocialProofCount.js +3 -0
- package/dist/packages/components-v3/dist/SocialProof/index.cjs +4 -0
- package/dist/packages/components-v3/dist/SocialProof/index.js +6 -0
- package/dist/packages/components-v3/dist/SocialProof/types/types.cjs +11 -0
- package/dist/packages/components-v3/dist/SocialProof/types/types.js +10 -0
- package/dist/packages/components-v3/dist/SocialProof/utils/functions.cjs +1 -0
- package/dist/packages/components-v3/dist/SocialProof/utils/functions.js +3 -0
- package/dist/packages/components-v3/dist/Title/Title.cjs +11 -0
- package/dist/packages/components-v3/dist/Title/Title.js +12 -0
- package/dist/packages/components-v3/dist/Title/components/Image.cjs +2 -0
- package/dist/packages/components-v3/dist/Title/components/Image.js +4 -0
- package/dist/packages/components-v3/dist/Title/components/Label.cjs +3 -0
- package/dist/packages/components-v3/dist/Title/components/Label.js +5 -0
- package/dist/packages/components-v3/dist/Title/components/Layout.cjs +11 -0
- package/dist/packages/components-v3/dist/Title/components/Layout.js +12 -0
- package/dist/packages/components-v3/dist/Title/components/index.cjs +3 -0
- package/dist/packages/components-v3/dist/Title/components/index.js +5 -0
- package/dist/packages/components-v3/dist/Title/index.cjs +1 -0
- package/dist/packages/components-v3/dist/Title/index.js +3 -0
- package/dist/packages/components-v3/dist/Tokens/index.cjs +11 -11
- package/dist/packages/components-v3/dist/Tokens/index.js +11 -11
- package/dist/packages/components-v3/dist/Typography/Typography.cjs +35 -7
- package/dist/packages/components-v3/dist/Typography/Typography.js +35 -8
- package/dist/packages/components-v3/dist/Typography/hooks/useGetAccessibilityAttributes.cjs +30 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetAccessibilityAttributes.js +28 -1
- package/dist/packages/components-v3/dist/Typography/hooks/useGetAlignProperties.cjs +19 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetAlignProperties.js +17 -1
- package/dist/packages/components-v3/dist/Typography/hooks/useGetColorProperties.cjs +20 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetColorProperties.js +18 -1
- package/dist/packages/components-v3/dist/Typography/hooks/useGetNoWrapProperties.cjs +12 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetNoWrapProperties.js +10 -1
- package/dist/packages/components-v3/dist/Typography/hooks/useGetNumberOfLinesProperties.cjs +21 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetNumberOfLinesProperties.js +19 -1
- package/dist/packages/components-v3/dist/Typography/hooks/useGetVariantProperties.cjs +61 -0
- package/dist/packages/components-v3/dist/Typography/hooks/useGetVariantProperties.js +59 -1
- package/dist/packages/components-v3/dist/Typography/index.cjs +2 -1
- package/dist/packages/components-v3/dist/Typography/index.js +2 -1
- package/dist/packages/components-v3/dist/Typography/types/index.cjs +47 -0
- package/dist/packages/components-v3/dist/Typography/types/index.js +44 -0
- package/dist/packages/components-v3/dist/Typography/utils/utils.cjs +12 -0
- package/dist/packages/components-v3/dist/Typography/utils/utils.js +10 -0
- package/dist/packages/components-v3/dist/WelcomeMessage/components/Container.cjs +1 -1
- package/dist/packages/components-v3/dist/WelcomeMessage/components/Container.js +1 -1
- package/dist/packages/components-v3/dist/WelcomeMessage/types/types.cjs +2 -2
- package/dist/packages/components-v3/dist/WelcomeMessage/types/types.js +2 -2
- package/dist/packages/components-v3/dist/WidgetTextField/WidgetTextField.cjs +2 -0
- package/dist/packages/components-v3/dist/WidgetTextField/WidgetTextField.js +4 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Container.cjs +14 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Container.js +15 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/FakeTextInput.cjs +3 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/FakeTextInput.js +5 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Icon.cjs +7 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Icon.js +9 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Skeleton.cjs +10 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/Skeleton.js +11 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/index.cjs +4 -0
- package/dist/packages/components-v3/dist/WidgetTextField/components/index.js +6 -0
- package/dist/packages/components-v3/dist/WidgetTextField/hooks/useGetContainerProperties.cjs +1 -0
- package/dist/packages/components-v3/dist/WidgetTextField/hooks/useGetContainerProperties.js +3 -0
- package/dist/packages/components-v3/dist/WidgetTextField/index.cjs +1 -0
- package/dist/packages/components-v3/dist/WidgetTextField/index.js +3 -0
- package/dist/packages/components-v3/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.cjs +8 -0
- package/dist/packages/components-v3/dist/WidgetWrapperWithTitle/WidgetWrapperWithTitle.js +10 -0
- package/dist/packages/components-v3/dist/packages/components-v3/src/models/colorsConfig.cjs +26 -0
- package/dist/packages/components-v3/dist/packages/components-v3/src/models/colorsConfig.js +25 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/aspectRatio/aspectRatio.cjs +16 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/aspectRatio/aspectRatio.js +17 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.cjs +25 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/breakpoints/breakpoints.js +23 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/colors/colors.cjs +51 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/colors/colors.js +51 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/radius/radius.cjs +64 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/radius/radius.js +65 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/theme/theme.cjs +18 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/theme/theme.js +16 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontFamily.cjs +25 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontFamily.js +25 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontSize.cjs +37 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontSize.js +38 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontWeight.cjs +17 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/fontWeight.js +18 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/letterSpacing.cjs +15 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/letterSpacing.js +16 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/lineHeight.cjs +31 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/typography/lineHeight.js +32 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/utils.cjs +7 -0
- package/dist/packages/components-v3/dist/packages/components-v3/tokens/utils.js +6 -0
- package/dist/packages/components-v3/dist/utils/resolveTheme.cjs +13 -0
- package/dist/packages/components-v3/dist/utils/resolveTheme.js +13 -0
- package/dist/packages/components-v3/dist/utils/useGetContentSize.cjs +1 -0
- package/dist/packages/components-v3/dist/utils/useGetContentSize.js +3 -0
- package/dist/packages/components-v3/dist/utils/useResponsiveValue.cjs +2 -2
- package/dist/packages/components-v3/dist/utils/useResponsiveValue.js +2 -2
- package/dist/packages/icons/dist/FourPointStar.cjs +16 -1
- package/dist/packages/icons/dist/FourPointStar.js +16 -2
- package/dist/packages/icons/dist/MagnifyingGlass.cjs +8 -0
- package/dist/packages/icons/dist/MagnifyingGlass.js +9 -0
- package/dist/packages/icons/dist/MagnifyingThin.cjs +8 -0
- package/dist/packages/icons/dist/MagnifyingThin.js +9 -0
- package/dist/packages/icons/dist/SendMinimalist.cjs +8 -0
- package/dist/packages/icons/dist/SendMinimalist.js +9 -0
- package/dist/packages/icons/dist/SendModern.cjs +8 -0
- package/dist/packages/icons/dist/SendModern.js +9 -0
- package/dist/packages/icons/dist/SendStandard.cjs +8 -0
- package/dist/packages/icons/dist/SendStandard.js +9 -0
- package/dist/services/amplitudeService/amplitudeService.cjs +37 -12
- package/dist/services/amplitudeService/amplitudeService.d.cts +11 -3
- package/dist/services/amplitudeService/amplitudeService.d.ts +11 -3
- package/dist/services/amplitudeService/amplitudeService.js +37 -12
- package/dist/services/userIdentityService/index.cjs +3 -0
- package/dist/services/userIdentityService/index.d.cts +2 -0
- package/dist/services/userIdentityService/index.d.ts +2 -0
- package/dist/services/userIdentityService/index.js +3 -0
- package/dist/services/userIdentityService/userIdentityService.cjs +49 -0
- package/dist/services/userIdentityService/userIdentityService.d.cts +19 -0
- package/dist/services/userIdentityService/userIdentityService.d.ts +19 -0
- package/dist/services/userIdentityService/userIdentityService.js +48 -0
- package/package.json +18 -5
- package/src/application/models/chatElementDisplayLocationV3.ts +2 -0
- package/src/application/models/frontendConfigV3.ts +1 -1
- package/src/application/utils/widgetTextRequestToApiRequest.ts +5 -5
- package/src/atoms/app/index.ts +9 -7
- package/src/atoms/chat/replies.ts +56 -0
- package/src/contexts/amplitudeContext/__tests__/amplitudeContext.test.tsx +47 -66
- package/src/contexts/amplitudeContext/amplitudeContext.tsx +4 -1
- package/src/contexts/enviveContext/enviveContext.tsx +47 -6
- package/src/contexts/featureFlagServiceContext/featureFlagServiceContext.tsx +101 -2
- package/src/contexts/graphqlContext/graphqlContext.tsx +11 -2
- package/src/contexts/graphqlContext/mockV3Config.ts +15 -4
- package/src/contexts/hardcopyContext/hardcopyContext.tsx +29 -0
- package/src/contexts/salesAgentContext/chatAPI.ts +36 -7
- package/src/contexts/salesAgentContext/formSubmittedUtils.ts +57 -0
- package/src/contexts/salesAgentContext/salesAgentContext.tsx +63 -2
- package/src/contexts/salesAgentContext/salesAgentService.ts +15 -9
- package/src/contexts/searchContext/__tests__/searchContext.test.tsx +3 -1
- package/src/contexts/typesV3.ts +13 -10
- package/src/contexts/userIdentityContext/__tests__/userIdentityContext.test.tsx +18 -131
- package/src/contexts/userIdentityContext/userIdentityContext.tsx +47 -41
- package/src/hooks/ElementObserver/useElementObserver.ts +2 -1
- package/src/hooks/Search/__tests__/useSearch.test.tsx +11 -1
- package/src/mocks/index.ts +1 -0
- package/src/mocks/salesAgentMockData.ts +247 -0
- package/src/services/amplitudeService/__tests__/amplitudeService.test.ts +17 -0
- package/src/services/amplitudeService/amplitudeService.ts +50 -11
- package/src/services/userIdentityService/index.ts +1 -0
- package/src/services/userIdentityService/userIdentityService.ts +64 -0
- package/dist/contexts/featureFlagContext/featureFlagContext.cjs +0 -105
- package/dist/contexts/featureFlagContext/featureFlagContext.d.cts +0 -19
- package/dist/contexts/featureFlagContext/featureFlagContext.d.ts +0 -19
- package/dist/contexts/featureFlagContext/featureFlagContext.js +0 -102
- package/dist/contexts/featureFlagContext/index.cjs +0 -4
- package/dist/contexts/featureFlagContext/index.d.cts +0 -2
- package/dist/contexts/featureFlagContext/index.d.ts +0 -2
- package/dist/contexts/featureFlagContext/index.js +0 -3
- package/dist/packages/components-v3/dist/src/models/colorsConfig.cjs +0 -26
- package/dist/packages/components-v3/dist/src/models/colorsConfig.js +0 -25
- package/dist/packages/components-v3/dist/tokens/aspectRatio/aspectRatio.cjs +0 -16
- package/dist/packages/components-v3/dist/tokens/aspectRatio/aspectRatio.js +0 -17
- package/dist/packages/components-v3/dist/tokens/breakpoints/breakpoints.cjs +0 -25
- package/dist/packages/components-v3/dist/tokens/breakpoints/breakpoints.js +0 -23
- package/dist/packages/components-v3/dist/tokens/colors/colors.cjs +0 -51
- package/dist/packages/components-v3/dist/tokens/colors/colors.js +0 -51
- package/dist/packages/components-v3/dist/tokens/radius/radius.cjs +0 -64
- package/dist/packages/components-v3/dist/tokens/radius/radius.js +0 -65
- package/dist/packages/components-v3/dist/tokens/theme/theme.cjs +0 -13
- package/dist/packages/components-v3/dist/tokens/theme/theme.js +0 -12
- package/dist/packages/components-v3/dist/tokens/typography/fontFamily.cjs +0 -25
- package/dist/packages/components-v3/dist/tokens/typography/fontFamily.js +0 -25
- package/dist/packages/components-v3/dist/tokens/typography/fontSize.cjs +0 -37
- package/dist/packages/components-v3/dist/tokens/typography/fontSize.js +0 -38
- package/dist/packages/components-v3/dist/tokens/typography/fontWeight.cjs +0 -17
- package/dist/packages/components-v3/dist/tokens/typography/fontWeight.js +0 -18
- package/dist/packages/components-v3/dist/tokens/typography/letterSpacing.cjs +0 -15
- package/dist/packages/components-v3/dist/tokens/typography/letterSpacing.js +0 -16
- package/dist/packages/components-v3/dist/tokens/typography/lineHeight.cjs +0 -31
- package/dist/packages/components-v3/dist/tokens/typography/lineHeight.js +0 -32
- package/dist/packages/components-v3/dist/tokens/utils.cjs +0 -7
- package/dist/packages/components-v3/dist/tokens/utils.js +0 -6
- package/src/contexts/featureFlagContext/featureFlagContext.tsx +0 -180
- package/src/contexts/featureFlagContext/index.ts +0 -1
- /package/dist/packages/components-v3/dist/{tokens → packages/components-v3/tokens}/typography/typography.cjs +0 -0
- /package/dist/packages/components-v3/dist/{tokens → packages/components-v3/tokens}/typography/typography.js +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
UserIdentityProvider,
|
|
6
6
|
useUserIdentity,
|
|
7
7
|
} from 'src/contexts/userIdentityContext/userIdentityContext';
|
|
8
|
-
import { LocalStorageProvider } from 'src/contexts/localStorageContext';
|
|
8
|
+
import { LocalStorageKeys, LocalStorageProvider } from 'src/contexts/localStorageContext';
|
|
9
9
|
import { EnviveConfigProvider } from 'src/contexts/enviveConfigContext/enviveConfigContext';
|
|
10
10
|
import {
|
|
11
11
|
FeatureFlagService,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
} from 'src/contexts/featureFlagServiceContext/featureFlagServiceContext';
|
|
14
14
|
import { userIdAtom } from 'src/atoms/app';
|
|
15
15
|
import { AmplitudeService } from 'src/services/amplitudeService/amplitudeService';
|
|
16
|
+
import { UserIdentityService } from 'src/services/userIdentityService';
|
|
16
17
|
import { AmplitudeProvider, SpiffyMetricsEventName, useAmplitude } from '../amplitudeContext';
|
|
17
18
|
|
|
18
19
|
// Mock AmplitudeService
|
|
@@ -111,10 +112,20 @@ const AtomReaderComponent: React.FC = () => {
|
|
|
111
112
|
const CombinedContextComponent: React.FC = () => {
|
|
112
113
|
const userIdentity = useUserIdentity();
|
|
113
114
|
const amplitude = useAmplitude();
|
|
115
|
+
const [userId, setUserId] = React.useState<string>('');
|
|
116
|
+
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
const fetchUserId = async () => {
|
|
119
|
+
const id = await userIdentity.getUserIdOrDefault();
|
|
120
|
+
setUserId(id);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
fetchUserId();
|
|
124
|
+
}, [userIdentity]);
|
|
114
125
|
|
|
115
126
|
return (
|
|
116
127
|
<div data-testid="combined-component">
|
|
117
|
-
<div data-testid="user-id-from-identity">{
|
|
128
|
+
<div data-testid="user-id-from-identity">{userId}</div>
|
|
118
129
|
<div data-testid="amplitude-ready">{amplitude.isReady.toString()}</div>
|
|
119
130
|
</div>
|
|
120
131
|
);
|
|
@@ -123,18 +134,33 @@ const CombinedContextComponent: React.FC = () => {
|
|
|
123
134
|
// FeatureFlagService
|
|
124
135
|
const testFeatureFlagService = new FeatureFlagService([]);
|
|
125
136
|
|
|
137
|
+
// userID service
|
|
138
|
+
const mockInitializeUser = vi.fn().mockResolvedValue(undefined);
|
|
139
|
+
const mockGetUserId = vi.fn().mockImplementation(async () => {
|
|
140
|
+
// Check for override first
|
|
141
|
+
const override = localStorage.getItem('v1-spiffy-user-id-override');
|
|
142
|
+
if (override) return override;
|
|
143
|
+
return 'test-user-id';
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const testUserIdService = {
|
|
147
|
+
getUserIdOrDefault: mockGetUserId,
|
|
148
|
+
initializeUser: mockInitializeUser,
|
|
149
|
+
getUserIdOverrideFromLocalStorage: vi.fn().mockImplementation(() => {
|
|
150
|
+
return localStorage.getItem('v1-spiffy-user-id-override') || undefined;
|
|
151
|
+
}),
|
|
152
|
+
} as unknown as UserIdentityService;
|
|
153
|
+
|
|
126
154
|
// Wrapper component with all required providers
|
|
127
155
|
const TestWrapper: React.FC<{
|
|
128
156
|
children: React.ReactNode;
|
|
129
157
|
amplitudeApiKey?: string;
|
|
130
158
|
userIdOverride?: string;
|
|
131
|
-
userIdDefault?: string;
|
|
132
159
|
externalAmplitudeService?: AmplitudeService;
|
|
133
160
|
}> = ({
|
|
134
161
|
children,
|
|
135
162
|
amplitudeApiKey = 'test-amplitude-key',
|
|
136
163
|
userIdOverride,
|
|
137
|
-
userIdDefault,
|
|
138
164
|
externalAmplitudeService,
|
|
139
165
|
}) => {
|
|
140
166
|
// Set up localStorage with user IDs if provided
|
|
@@ -142,10 +168,7 @@ const TestWrapper: React.FC<{
|
|
|
142
168
|
if (userIdOverride) {
|
|
143
169
|
localStorage.setItem('v1-spiffy-user-id-override', userIdOverride);
|
|
144
170
|
}
|
|
145
|
-
|
|
146
|
-
localStorage.setItem('v1-spiffy-user-id-default', userIdDefault);
|
|
147
|
-
}
|
|
148
|
-
}, [userIdOverride, userIdDefault]);
|
|
171
|
+
}, [userIdOverride]);
|
|
149
172
|
|
|
150
173
|
return (
|
|
151
174
|
<Provider>
|
|
@@ -159,7 +182,7 @@ const TestWrapper: React.FC<{
|
|
|
159
182
|
featureGates={[]}
|
|
160
183
|
>
|
|
161
184
|
<LocalStorageProvider>
|
|
162
|
-
<UserIdentityProvider>
|
|
185
|
+
<UserIdentityProvider userIdService={testUserIdService}>
|
|
163
186
|
<FeatureFlagServiceProvider featureFlagService={testFeatureFlagService}>
|
|
164
187
|
<AmplitudeProvider externalAmplitudeService={externalAmplitudeService}>
|
|
165
188
|
{children}
|
|
@@ -173,8 +196,16 @@ const TestWrapper: React.FC<{
|
|
|
173
196
|
};
|
|
174
197
|
|
|
175
198
|
describe('AmplitudeProvider - React Context Integration', () => {
|
|
199
|
+
let mockGetLocalStorageItem: (key: string) => string | null;
|
|
176
200
|
beforeEach(() => {
|
|
177
201
|
vi.clearAllMocks();
|
|
202
|
+
vi.clearAllMocks();
|
|
203
|
+
mockGetLocalStorageItem = vi.fn((key: string) => {
|
|
204
|
+
if (key === LocalStorageKeys.ChatId) {
|
|
205
|
+
return 'test-chat-id';
|
|
206
|
+
}
|
|
207
|
+
return null;
|
|
208
|
+
});
|
|
178
209
|
if (typeof localStorage !== 'undefined') {
|
|
179
210
|
localStorage.clear();
|
|
180
211
|
}
|
|
@@ -227,62 +258,6 @@ describe('AmplitudeProvider - React Context Integration', () => {
|
|
|
227
258
|
});
|
|
228
259
|
});
|
|
229
260
|
|
|
230
|
-
it('should use default userId from UserIdentityContext when override is not set', async () => {
|
|
231
|
-
const testUserId = 'default-user-id-456';
|
|
232
|
-
render(
|
|
233
|
-
<TestWrapper userIdDefault={testUserId}>
|
|
234
|
-
<MockAmplitudeComponent />
|
|
235
|
-
</TestWrapper>,
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
await waitFor(() => {
|
|
239
|
-
expect(screen.getByTestId('is-ready').textContent).toBe('true');
|
|
240
|
-
});
|
|
241
|
-
|
|
242
|
-
await act(async () => {
|
|
243
|
-
screen.getByTestId('track-event-button').click();
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
await waitFor(() => {
|
|
247
|
-
expect(mockTrackEvent).toHaveBeenCalled();
|
|
248
|
-
const callArgs = mockTrackEvent.mock.calls[0];
|
|
249
|
-
expect(callArgs[0]).toEqual({
|
|
250
|
-
eventName: SpiffyMetricsEventName.ChatUserMessageInput,
|
|
251
|
-
eventProps: { message: 'test message' },
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it('should prioritize override userId over default userId', async () => {
|
|
257
|
-
const overrideUserId = 'override-user-id-789';
|
|
258
|
-
const defaultUserId = 'default-user-id-012';
|
|
259
|
-
render(
|
|
260
|
-
<TestWrapper
|
|
261
|
-
userIdOverride={overrideUserId}
|
|
262
|
-
userIdDefault={defaultUserId}
|
|
263
|
-
>
|
|
264
|
-
<MockAmplitudeComponent />
|
|
265
|
-
</TestWrapper>,
|
|
266
|
-
);
|
|
267
|
-
|
|
268
|
-
await waitFor(() => {
|
|
269
|
-
expect(screen.getByTestId('is-ready').textContent).toBe('true');
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
await act(async () => {
|
|
273
|
-
screen.getByTestId('track-event-button').click();
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
await waitFor(() => {
|
|
277
|
-
expect(mockTrackEvent).toHaveBeenCalled();
|
|
278
|
-
const callArgs = mockTrackEvent.mock.calls[0];
|
|
279
|
-
expect(callArgs[0]).toEqual({
|
|
280
|
-
eventName: SpiffyMetricsEventName.ChatUserMessageInput,
|
|
281
|
-
eventProps: { message: 'test message' },
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
|
|
286
261
|
it('should initialize AmplitudeService with userId from UserIdentityContext', async () => {
|
|
287
262
|
const testUserId = 'init-user-id-345';
|
|
288
263
|
render(
|
|
@@ -369,7 +344,7 @@ describe('AmplitudeProvider - React Context Integration', () => {
|
|
|
369
344
|
featureGates={[]}
|
|
370
345
|
>
|
|
371
346
|
<LocalStorageProvider>
|
|
372
|
-
<UserIdentityProvider>
|
|
347
|
+
<UserIdentityProvider userIdService={testUserIdService}>
|
|
373
348
|
<FeatureFlagServiceProvider featureFlagService={testFeatureFlagService}>
|
|
374
349
|
<AmplitudeProvider>{children}</AmplitudeProvider>
|
|
375
350
|
</FeatureFlagServiceProvider>
|
|
@@ -399,6 +374,9 @@ describe('AmplitudeProvider - React Context Integration', () => {
|
|
|
399
374
|
userId: 'external-user-id',
|
|
400
375
|
amplitudeApiKey: 'external-api-key',
|
|
401
376
|
dataResidency: 'EU',
|
|
377
|
+
orgId: 'test-org-id',
|
|
378
|
+
show: true,
|
|
379
|
+
getLocalStorageItem: mockGetLocalStorageItem,
|
|
402
380
|
featureFlagService: new FeatureFlagService([]),
|
|
403
381
|
env: 'test', // Provide required fields to match AmplitudeServiceConfig
|
|
404
382
|
contextSource: 'test-source',
|
|
@@ -435,6 +413,9 @@ describe('AmplitudeProvider - React Context Integration', () => {
|
|
|
435
413
|
userId: 'external-user-id',
|
|
436
414
|
amplitudeApiKey: 'external-api-key',
|
|
437
415
|
dataResidency: 'EU',
|
|
416
|
+
orgId: 'test-org-id',
|
|
417
|
+
show: true,
|
|
418
|
+
getLocalStorageItem: mockGetLocalStorageItem,
|
|
438
419
|
featureFlagService: new FeatureFlagService([]),
|
|
439
420
|
env: 'test',
|
|
440
421
|
contextSource: 'test-source',
|
|
@@ -43,6 +43,7 @@ export const AmplitudeProvider: React.FC<{
|
|
|
43
43
|
variantUrlOverride,
|
|
44
44
|
variantInfoOverride,
|
|
45
45
|
show,
|
|
46
|
+
orgId,
|
|
46
47
|
orgShortName,
|
|
47
48
|
featureGates,
|
|
48
49
|
} = useEnviveConfig();
|
|
@@ -67,9 +68,10 @@ export const AmplitudeProvider: React.FC<{
|
|
|
67
68
|
env: env || '',
|
|
68
69
|
contextSource: contextSource || '',
|
|
69
70
|
orgShortName: orgShortName || '',
|
|
71
|
+
orgId: orgId || '',
|
|
70
72
|
featureFlagService,
|
|
71
73
|
orgGaConfig,
|
|
72
|
-
show,
|
|
74
|
+
show: show ?? false,
|
|
73
75
|
getLocalStorageItem: getItem,
|
|
74
76
|
});
|
|
75
77
|
setService(amplitudeService);
|
|
@@ -92,6 +94,7 @@ export const AmplitudeProvider: React.FC<{
|
|
|
92
94
|
featureGates,
|
|
93
95
|
getItem,
|
|
94
96
|
externalAmplitudeService,
|
|
97
|
+
orgId,
|
|
95
98
|
]);
|
|
96
99
|
|
|
97
100
|
const value = useMemo(
|
|
@@ -4,6 +4,7 @@ import { OrgConfigFeatureGate } from 'src/application/models/api/orgConfigResult
|
|
|
4
4
|
import { EnviveConfigService, EnviveServiceConfig } from 'src/services/enviveConfigService';
|
|
5
5
|
import { AmplitudeService } from 'src/services/amplitudeService/amplitudeService';
|
|
6
6
|
import Logger from 'src/application/logging/logger';
|
|
7
|
+
import { UserIdentityService } from 'src/services/userIdentityService';
|
|
7
8
|
import { AmplitudeProvider } from '../amplitudeContext';
|
|
8
9
|
import { EnviveConfigProvider } from '../enviveConfigContext';
|
|
9
10
|
import { EnviveCssProvider } from '../enviveCssContext';
|
|
@@ -50,8 +51,10 @@ interface EnviveProviderProps extends AgentWrapperProps {
|
|
|
50
51
|
amplitudeService?: AmplitudeService;
|
|
51
52
|
mockV3ConfigToDeprecatedConfig?: boolean;
|
|
52
53
|
requestV3Config?: boolean;
|
|
54
|
+
userIdentityService?: UserIdentityService;
|
|
53
55
|
previewMode?: boolean;
|
|
54
56
|
overrideConfig?: GraphQlConfigValues;
|
|
57
|
+
mockSalesAgentData?: any;
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
const SearchAgentWrapper: React.FC<AgentWrapperProps> = ({ children, enabledAgents }) => {
|
|
@@ -61,13 +64,28 @@ const SearchAgentWrapper: React.FC<AgentWrapperProps> = ({ children, enabledAgen
|
|
|
61
64
|
return <SearchProvider>{children}</SearchProvider>;
|
|
62
65
|
};
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
interface SalesAgentWrapperProps extends AgentWrapperProps {
|
|
68
|
+
previewMode?: boolean;
|
|
69
|
+
mockSalesAgentData?: any;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const SalesAgentWrapper: React.FC<SalesAgentWrapperProps> = ({
|
|
73
|
+
children,
|
|
74
|
+
enabledAgents,
|
|
75
|
+
previewMode,
|
|
76
|
+
mockSalesAgentData,
|
|
77
|
+
}) => {
|
|
65
78
|
if (!enabledAgents.includes(EnviveAgent.SalesAgent)) {
|
|
66
79
|
return children;
|
|
67
80
|
}
|
|
68
81
|
return (
|
|
69
82
|
<SystemSettingsContextProvider>
|
|
70
|
-
<SalesAgentProvider
|
|
83
|
+
<SalesAgentProvider
|
|
84
|
+
previewMode={previewMode}
|
|
85
|
+
mockData={mockSalesAgentData}
|
|
86
|
+
>
|
|
87
|
+
{children}
|
|
88
|
+
</SalesAgentProvider>
|
|
71
89
|
</SystemSettingsContextProvider>
|
|
72
90
|
);
|
|
73
91
|
};
|
|
@@ -80,11 +98,30 @@ export const EnviveProvider: React.FC<EnviveProviderProps> = ({
|
|
|
80
98
|
enviveConfigService: inputEnviveConfigService,
|
|
81
99
|
featureFlagService: inputFeatureFlagService,
|
|
82
100
|
amplitudeService: inputAmplitudeService,
|
|
101
|
+
userIdentityService: inputUserIdentityService,
|
|
83
102
|
mockV3ConfigToDeprecatedConfig = false,
|
|
84
103
|
requestV3Config = false,
|
|
104
|
+
mockSalesAgentData,
|
|
85
105
|
...config
|
|
86
106
|
}) => {
|
|
87
|
-
const userId = '
|
|
107
|
+
const [userId, setUserId] = useState<string>('');
|
|
108
|
+
|
|
109
|
+
const userIdService = useMemo(
|
|
110
|
+
() =>
|
|
111
|
+
inputUserIdentityService ??
|
|
112
|
+
new UserIdentityService({ apiKey: config?.amplitudeApiKey || '' }),
|
|
113
|
+
[config?.amplitudeApiKey, inputUserIdentityService],
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
useEffect(() => {
|
|
117
|
+
const fetchUserId = async () => {
|
|
118
|
+
const id = await userIdService.getUserIdOrDefault();
|
|
119
|
+
setUserId(id);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
fetchUserId();
|
|
123
|
+
}, [config.amplitudeApiKey, inputUserIdentityService, userIdService]);
|
|
124
|
+
|
|
88
125
|
const namespace = 'spiffy-react-components'; // TODO: Should this be different from the current namespace?
|
|
89
126
|
const source = 'app'; // TODO: Make this dependent upon the "spiffy_on" query param
|
|
90
127
|
const [enviveServiceConfig, setEnviveServiceConfig] = useState<EnviveServiceConfig | null>(null);
|
|
@@ -97,7 +134,7 @@ export const EnviveProvider: React.FC<EnviveProviderProps> = ({
|
|
|
97
134
|
new EnviveConfigService({
|
|
98
135
|
baseUrl: config?.baseUrl || '',
|
|
99
136
|
apiKey: config?.orgLevelApiKey || '',
|
|
100
|
-
userId
|
|
137
|
+
userId,
|
|
101
138
|
namespace: namespace || '',
|
|
102
139
|
source: source || '',
|
|
103
140
|
});
|
|
@@ -138,7 +175,7 @@ export const EnviveProvider: React.FC<EnviveProviderProps> = ({
|
|
|
138
175
|
<NewOrgConfigProvider overrideConfig={overrideConfig}>
|
|
139
176
|
<LocalStorageProvider>
|
|
140
177
|
<FeatureFlagServiceProvider featureFlagService={featureFlagService}>
|
|
141
|
-
<UserIdentityProvider>
|
|
178
|
+
<UserIdentityProvider userIdService={userIdService}>
|
|
142
179
|
<AmplitudeProvider externalAmplitudeService={inputAmplitudeService}>
|
|
143
180
|
<PageProvider previewMode={previewMode}>
|
|
144
181
|
<UiConfigProvider>
|
|
@@ -146,7 +183,11 @@ export const EnviveProvider: React.FC<EnviveProviderProps> = ({
|
|
|
146
183
|
<HardcopyProvider>
|
|
147
184
|
<EnviveCssProvider>
|
|
148
185
|
<SearchAgentWrapper enabledAgents={enabledAgents}>
|
|
149
|
-
<SalesAgentWrapper
|
|
186
|
+
<SalesAgentWrapper
|
|
187
|
+
enabledAgents={enabledAgents}
|
|
188
|
+
previewMode={previewMode}
|
|
189
|
+
mockSalesAgentData={mockSalesAgentData}
|
|
190
|
+
>
|
|
150
191
|
{children}
|
|
151
192
|
</SalesAgentWrapper>
|
|
152
193
|
</SearchAgentWrapper>
|
|
@@ -3,6 +3,8 @@ import { OrgConfigFeatureGate } from 'src/application/models/api/orgConfigResult
|
|
|
3
3
|
import { FeatureGates } from 'src/application/models/featureGates';
|
|
4
4
|
import Logger from 'src/application/logging/logger';
|
|
5
5
|
|
|
6
|
+
const FEATURE_FLAGS_STORAGE_KEY = 'spiffy-feature-flags';
|
|
7
|
+
|
|
6
8
|
// This is the class that was previously implicitly used or defined elsewhere
|
|
7
9
|
export class FeatureFlagService {
|
|
8
10
|
private featureGates: OrgConfigFeatureGate[];
|
|
@@ -11,11 +13,94 @@ export class FeatureFlagService {
|
|
|
11
13
|
this.featureGates = featureGates;
|
|
12
14
|
}
|
|
13
15
|
|
|
16
|
+
static getQueryParamFeatureGateOverrides(featureGate: FeatureGates): boolean | undefined {
|
|
17
|
+
const url = window.location?.href ?? '';
|
|
18
|
+
if (url.includes('?')) {
|
|
19
|
+
const urlObj = new URL(url);
|
|
20
|
+
const params = new URLSearchParams(urlObj.search);
|
|
21
|
+
const paramsObj = Object.fromEntries(params.entries());
|
|
22
|
+
const value = paramsObj[featureGate];
|
|
23
|
+
|
|
24
|
+
if (value != null) {
|
|
25
|
+
return value === 'true';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getWindowFeatureGateOverrides(featureGate: FeatureGates): boolean | undefined {
|
|
33
|
+
if (typeof window === 'undefined') {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
const windowOverride = window as Window & {
|
|
37
|
+
_envive?: { featureOverrides?: Record<string, boolean> };
|
|
38
|
+
_spiffy?: { featureOverrides?: Record<string, boolean> };
|
|
39
|
+
};
|
|
40
|
+
const featureOverrides =
|
|
41
|
+
windowOverride?._envive?.featureOverrides ?? windowOverride?._spiffy?.featureOverrides;
|
|
42
|
+
const value = featureOverrides?.[String(featureGate)];
|
|
43
|
+
if (value != null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static getStoredFeatureGateOverrides(featureGate: FeatureGates): boolean | undefined {
|
|
50
|
+
if (typeof window === 'undefined' || typeof window.localStorage === 'undefined') {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
const featureFlags = window.localStorage.getItem(FEATURE_FLAGS_STORAGE_KEY);
|
|
55
|
+
if (!featureFlags) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
const featureFlagsObj = JSON.parse(featureFlags) as Record<string, boolean>;
|
|
59
|
+
return featureFlagsObj[featureGate];
|
|
60
|
+
} catch (err) {
|
|
61
|
+
Logger.logError(
|
|
62
|
+
'[spiffy-ai] getStoredFeatureGateOverrides: error parsing feature flags',
|
|
63
|
+
err,
|
|
64
|
+
);
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static getFeatureFlagOverride(featureGate: FeatureGates): boolean | undefined {
|
|
70
|
+
const queryOverride = FeatureFlagService.getQueryParamFeatureGateOverrides(featureGate);
|
|
71
|
+
if (queryOverride != null) {
|
|
72
|
+
Logger.logDebug(
|
|
73
|
+
`[spiffy-ai] isFeatureGateEnabled featureGate:${featureGate} overridden by URL param. New value: ${queryOverride}`,
|
|
74
|
+
);
|
|
75
|
+
return queryOverride;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const windowOverride = FeatureFlagService.getWindowFeatureGateOverrides(featureGate);
|
|
79
|
+
if (windowOverride != null) {
|
|
80
|
+
Logger.logDebug(
|
|
81
|
+
`[spiffy-ai] isFeatureGateEnabled featureGate:${featureGate} overridden by window param. New value: ${windowOverride}`,
|
|
82
|
+
);
|
|
83
|
+
return windowOverride;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const storedOverride = FeatureFlagService.getStoredFeatureGateOverrides(featureGate);
|
|
87
|
+
if (storedOverride != null) {
|
|
88
|
+
Logger.logDebug(
|
|
89
|
+
`[spiffy-ai] isFeatureGateEnabled featureGate:${featureGate} overridden by stored value. New value: ${storedOverride}`,
|
|
90
|
+
);
|
|
91
|
+
return storedOverride;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
14
97
|
isFeatureGateEnabled = (featureGate: FeatureGates): boolean => {
|
|
15
98
|
const gateValue = this.featureGates.find(gate => gate.name === featureGate);
|
|
16
99
|
|
|
17
|
-
|
|
18
|
-
|
|
100
|
+
const featureFlagOverride = FeatureFlagService.getFeatureFlagOverride(featureGate);
|
|
101
|
+
if (featureFlagOverride !== undefined) {
|
|
102
|
+
return featureFlagOverride;
|
|
103
|
+
}
|
|
19
104
|
|
|
20
105
|
if (gateValue == null || gateValue.value == null) {
|
|
21
106
|
Logger.logDebug(
|
|
@@ -38,6 +123,20 @@ export class FeatureFlagService {
|
|
|
38
123
|
]),
|
|
39
124
|
);
|
|
40
125
|
};
|
|
126
|
+
|
|
127
|
+
static persistFeatureGateOverrides(): void {
|
|
128
|
+
if (typeof window === 'undefined' || typeof window.localStorage === 'undefined') {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
const overrides = Object.values(FeatureGates)
|
|
132
|
+
.map(
|
|
133
|
+
featureGate =>
|
|
134
|
+
[featureGate, FeatureFlagService.getFeatureFlagOverride(featureGate)] as const,
|
|
135
|
+
)
|
|
136
|
+
.filter(([, value]) => value !== undefined)
|
|
137
|
+
.reduce<Record<string, boolean>>((acc, [key, value]) => ({ ...acc, [key]: value! }), {});
|
|
138
|
+
window.localStorage.setItem(FEATURE_FLAGS_STORAGE_KEY, JSON.stringify(overrides));
|
|
139
|
+
}
|
|
41
140
|
}
|
|
42
141
|
|
|
43
142
|
export interface FeatureFlagContextType {
|
|
@@ -214,11 +214,17 @@ export const GraphQLProvider = ({
|
|
|
214
214
|
|
|
215
215
|
// We may update this root config location in the future
|
|
216
216
|
const v3RootConfig = response.me.getProductsConfigByVersion?.v_three_config?.values;
|
|
217
|
+
const frontendValues = response.me.getProductsConfigByVersion?.frontend?.values;
|
|
217
218
|
|
|
218
219
|
const v3FrontendConfig = v3FrontendConfigCleanup(
|
|
219
220
|
transformSnakeToCamel(v3RootConfig) as FrontendConfigV3Response,
|
|
220
221
|
);
|
|
221
222
|
|
|
223
|
+
// Get merchant_override_css from frontend.values if v3RootConfig is not available
|
|
224
|
+
const frontendMerchantOverrideCss = frontendValues?.merchant_override_css;
|
|
225
|
+
const v3MerchantOverrideCss = v3FrontendConfig.uiConfigs?.merchantOverrideCss;
|
|
226
|
+
const merchantOverrideCss = v3MerchantOverrideCss || frontendMerchantOverrideCss;
|
|
227
|
+
|
|
222
228
|
const v3MountingConfigsArray = (transformSnakeToCamel(v3RootConfig?.mounting_configs) ??
|
|
223
229
|
[]) as unknown as { key: string; config: WidgetMountingConfig }[];
|
|
224
230
|
|
|
@@ -243,9 +249,11 @@ export const GraphQLProvider = ({
|
|
|
243
249
|
: DEFAULT_PAGE_VARIANTS;
|
|
244
250
|
|
|
245
251
|
const v3ColorsConfig = transformSnakeToCamel(v3RootConfig?.colors?.values);
|
|
252
|
+
const isSemanticColors = !window.location.href.includes('globals=merchant');
|
|
253
|
+
const isStorybook = window.top?.location.href.includes('?path=');
|
|
254
|
+
|
|
246
255
|
// If the v3 root config is not found and we are configured to return the deprecated config, we will return the mocked config
|
|
247
|
-
if (!v3RootConfig && mockV3ConfigToDeprecatedConfig) {
|
|
248
|
-
const isSemanticColors = !window.location.href.includes('globals=merchant');
|
|
256
|
+
if ((!v3RootConfig && mockV3ConfigToDeprecatedConfig) || (isStorybook && isSemanticColors)) {
|
|
249
257
|
Logger.logInfo('GraphQLContext | Returning mock v3 config', {
|
|
250
258
|
colorsConfig: mockV3ColorsConfig as ColorsConfigV3Response,
|
|
251
259
|
frontendConfig: mockV3FrontendConfig as FrontendConfigV3Response,
|
|
@@ -279,6 +287,7 @@ export const GraphQLProvider = ({
|
|
|
279
287
|
colorsConfig: v3ColorsConfig as ColorsConfigV3Response,
|
|
280
288
|
frontendConfig: {
|
|
281
289
|
...(v3FrontendConfig as FrontendConfigV3Response),
|
|
290
|
+
merchantOverrideCss,
|
|
282
291
|
// Need to replace the automatic widget configs with the object based ones
|
|
283
292
|
widgetConfigs: v3WidgetConfigs,
|
|
284
293
|
},
|
|
@@ -7,11 +7,12 @@ import { AnimationSpeed, PromptCarouselRows } from '@envive-ai/react-toolkit-v3/
|
|
|
7
7
|
import { WidgetWrapperVariant } from '@envive-ai/react-toolkit-v3/WidgetWrapper';
|
|
8
8
|
import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
|
|
9
9
|
import { ChatHeaderVariant } from '@envive-ai/react-toolkit-v3/ChatHeader';
|
|
10
|
+
import { WidgetKind } from '@envive-ai/react-toolkit-v3/SocialProof';
|
|
10
11
|
import { SparkleIconColor } from '@envive-ai/react-toolkit-v3/WelcomeMessage';
|
|
11
12
|
|
|
12
13
|
import { CustomerServiceType } from 'src/types/customerService';
|
|
13
14
|
import { FloatingButtonLocation } from '@envive-ai/react-toolkit-v3/FloatingButton';
|
|
14
|
-
import { ConfigVersionEnum,
|
|
15
|
+
import { ConfigVersionEnum, WidgetTypeV3 } from '../typesV3';
|
|
15
16
|
|
|
16
17
|
const mockImages = [
|
|
17
18
|
{
|
|
@@ -188,7 +189,7 @@ export const mockV3FrontendConfig: FrontendConfigV3 = {
|
|
|
188
189
|
type: WidgetTypeV3.SocialProofV3,
|
|
189
190
|
|
|
190
191
|
imageGalleryLayout: ImageGalleryLayout.FOUR_GRID,
|
|
191
|
-
kind:
|
|
192
|
+
kind: WidgetKind.STATIC,
|
|
192
193
|
variant: WidgetWrapperVariant.INLINE_WITH_BORDER,
|
|
193
194
|
promptCarouselRows: PromptCarouselRows.TWO_ON_MOBILE_ONE_ON_DESKTOP,
|
|
194
195
|
primaryButtonVariant: PromptButtonVariant.DARK,
|
|
@@ -201,7 +202,7 @@ export const mockV3FrontendConfig: FrontendConfigV3 = {
|
|
|
201
202
|
type: WidgetTypeV3.SocialProofV3,
|
|
202
203
|
|
|
203
204
|
imageGalleryLayout: ImageGalleryLayout.SINGLE,
|
|
204
|
-
kind:
|
|
205
|
+
kind: WidgetKind.STATIC,
|
|
205
206
|
variant: WidgetWrapperVariant.CARD_NO_BORDER,
|
|
206
207
|
promptCarouselRows: PromptCarouselRows.TWO_ON_MOBILE_ONE_ON_DESKTOP,
|
|
207
208
|
primaryButtonVariant: PromptButtonVariant.DARK,
|
|
@@ -214,7 +215,7 @@ export const mockV3FrontendConfig: FrontendConfigV3 = {
|
|
|
214
215
|
type: WidgetTypeV3.SocialProofV3,
|
|
215
216
|
|
|
216
217
|
imageGalleryLayout: ImageGalleryLayout.FOUR_HORIZONTAL,
|
|
217
|
-
kind:
|
|
218
|
+
kind: WidgetKind.STATIC,
|
|
218
219
|
variant: WidgetWrapperVariant.CARD_WITH_BORDER,
|
|
219
220
|
promptCarouselRows: PromptCarouselRows.TWO_ON_MOBILE_ONE_ON_DESKTOP,
|
|
220
221
|
primaryButtonVariant: PromptButtonVariant.DARK,
|
|
@@ -247,5 +248,15 @@ export const mockV3FrontendConfig: FrontendConfigV3 = {
|
|
|
247
248
|
image: mockImages[0],
|
|
248
249
|
hideTextField: false,
|
|
249
250
|
},
|
|
251
|
+
'product-card-test-widget': {
|
|
252
|
+
widgetConfigId: 'product-card-test-widget',
|
|
253
|
+
contentId: 'product-card-test-widget',
|
|
254
|
+
type: WidgetTypeV3.ProductCardV3,
|
|
255
|
+
promptButtonType: PromptButtonVariant.LIGHT,
|
|
256
|
+
italicizeHeadline: false,
|
|
257
|
+
fallbackColor: '#F9F6EA',
|
|
258
|
+
imageSrc:
|
|
259
|
+
'https://www.bandolierstyle.com/cdn/shop/files/Lily17_Black_Gold_Chrome_MOD_Dec25_6.jpg?v=1765844272',
|
|
260
|
+
},
|
|
250
261
|
},
|
|
251
262
|
};
|
|
@@ -137,6 +137,35 @@ const MOCK_HARDCOPY_RESPONSE: Partial<Record<WidgetTypeV3, HardcopyResponse>> =
|
|
|
137
137
|
textFieldPlaceholderText: 'Ask me anything...',
|
|
138
138
|
},
|
|
139
139
|
},
|
|
140
|
+
[WidgetTypeV3.ProductCardV3]: {
|
|
141
|
+
language: 'en',
|
|
142
|
+
values: {
|
|
143
|
+
headline: 'Discover Your Perfect Style',
|
|
144
|
+
animatedText: [
|
|
145
|
+
'the perfect outfit for any occasion',
|
|
146
|
+
'trending fashion that fits your lifestyle',
|
|
147
|
+
'quality pieces that last',
|
|
148
|
+
],
|
|
149
|
+
prompts: [
|
|
150
|
+
'What are your best sellers?',
|
|
151
|
+
'Show me summer dresses',
|
|
152
|
+
'Do you have free shipping?',
|
|
153
|
+
'What sizes are available?',
|
|
154
|
+
'Can I return items?',
|
|
155
|
+
],
|
|
156
|
+
placeholder: 'Ask me anything...',
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
[WidgetTypeV3.FloatingChatV3]: {
|
|
160
|
+
language: 'en',
|
|
161
|
+
values: {
|
|
162
|
+
welcomeMessageTitle: 'Welcome to Envive AI',
|
|
163
|
+
welcomeMessageText:
|
|
164
|
+
'Your personal shopper trained on the collective knowledge of thousands of real experts!',
|
|
165
|
+
chatFooterTextFieldPlaceholderText: 'Ask me anything...',
|
|
166
|
+
disclaimerText: 'This is a disclaimer...',
|
|
167
|
+
},
|
|
168
|
+
},
|
|
140
169
|
};
|
|
141
170
|
|
|
142
171
|
const HardcopyContext = createContext<HardcopyContextType | undefined>(undefined);
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
// This component will interact with the backend API to get the responses from the sales agent.
|
|
2
2
|
|
|
3
3
|
import { PageVisitCategory, UserEventCategory } from '@spiffy-ai/commerce-api-client';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
FormSubmittedAttributes,
|
|
6
|
+
MessageRole,
|
|
7
|
+
MessageType,
|
|
8
|
+
Suggestion,
|
|
9
|
+
UserEvent,
|
|
10
|
+
} from 'src/application/models';
|
|
5
11
|
import { useSetAtom } from 'jotai';
|
|
6
12
|
import { useCallback } from 'react';
|
|
7
13
|
import { v4 as uuid } from 'uuid';
|
|
14
|
+
import { formSubmitAtom, replyEventCategoryAtom } from 'src/atoms/chat';
|
|
8
15
|
import { queueUserEventAtom } from 'src/atoms/chat/messageQueue';
|
|
9
16
|
import { SpiffyMetricsEventName, useAmplitude } from '../amplitudeContext';
|
|
10
17
|
|
|
@@ -13,13 +20,15 @@ export interface SalesAgentChatAPI {
|
|
|
13
20
|
logUserEvent: (event: UserEvent) => void;
|
|
14
21
|
onSuggestionClicked: (suggestion: Suggestion) => void;
|
|
15
22
|
onTypedMessageSubmitted: ({ query, userTyped }: { query: string; userTyped: boolean }) => void;
|
|
16
|
-
onFormResponseSubmitted: (formResponse:
|
|
23
|
+
onFormResponseSubmitted: (formResponse: FormSubmittedAttributes) => void;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
export const useSalesAgentChatAPI = () => {
|
|
20
27
|
// TODO: Each of these functions will trigger both the necessary amplitude events and initiate the
|
|
21
28
|
// necessary actions to trigger the backend API
|
|
22
29
|
const queueUserEvent = useSetAtom(queueUserEventAtom);
|
|
30
|
+
const setReplyEventCategory = useSetAtom(replyEventCategoryAtom);
|
|
31
|
+
const setFormSubmit = useSetAtom(formSubmitAtom);
|
|
23
32
|
const { trackEvent } = useAmplitude();
|
|
24
33
|
|
|
25
34
|
const logPageVisit = useCallback(
|
|
@@ -68,15 +77,24 @@ export const useSalesAgentChatAPI = () => {
|
|
|
68
77
|
);
|
|
69
78
|
const onTypedMessageSubmitted = useCallback(
|
|
70
79
|
({ query, userTyped }: { query: string; userTyped: boolean }) => {
|
|
80
|
+
const eventId = uuid();
|
|
71
81
|
trackEvent({
|
|
72
82
|
eventName: SpiffyMetricsEventName.ChatUserMessageInput,
|
|
73
83
|
eventProps: {
|
|
74
84
|
query,
|
|
75
|
-
userTyped,
|
|
85
|
+
user_typed: userTyped,
|
|
86
|
+
message_id: eventId,
|
|
87
|
+
message_role: MessageRole.User,
|
|
88
|
+
message_type: MessageType.QueryTyped,
|
|
89
|
+
message_metadata: {
|
|
90
|
+
content: query,
|
|
91
|
+
created_at: new Date().toISOString(),
|
|
92
|
+
user_typed: userTyped,
|
|
93
|
+
},
|
|
76
94
|
},
|
|
77
95
|
});
|
|
78
96
|
const event: UserEvent = {
|
|
79
|
-
eventId
|
|
97
|
+
eventId,
|
|
80
98
|
category: UserEventCategory.QueryTyped,
|
|
81
99
|
createdAt: new Date().toISOString(),
|
|
82
100
|
attributes: {
|
|
@@ -88,9 +106,20 @@ export const useSalesAgentChatAPI = () => {
|
|
|
88
106
|
},
|
|
89
107
|
[queueUserEvent, trackEvent],
|
|
90
108
|
);
|
|
91
|
-
const onFormResponseSubmitted = useCallback(
|
|
92
|
-
|
|
93
|
-
|
|
109
|
+
const onFormResponseSubmitted = useCallback(
|
|
110
|
+
(form: FormSubmittedAttributes) => {
|
|
111
|
+
setReplyEventCategory(UserEventCategory.FormSubmitted);
|
|
112
|
+
setFormSubmit(form);
|
|
113
|
+
const event: UserEvent = {
|
|
114
|
+
eventId: uuid(),
|
|
115
|
+
category: UserEventCategory.FormSubmitted,
|
|
116
|
+
createdAt: new Date().toISOString(),
|
|
117
|
+
attributes: form,
|
|
118
|
+
};
|
|
119
|
+
queueUserEvent(event);
|
|
120
|
+
},
|
|
121
|
+
[queueUserEvent, setReplyEventCategory, setFormSubmit],
|
|
122
|
+
);
|
|
94
123
|
|
|
95
124
|
return {
|
|
96
125
|
logPageVisit,
|