@envive-ai/react-widgets-v3 0.3.10 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/CXIntegration/hooks/useUnifiedCXButton.cjs +2 -1
  2. package/dist/CXIntegration/hooks/useUnifiedCXButton.js +2 -1
  3. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.cjs +6 -0
  4. package/dist/CXIntegration/implementations/useGladlyUnifiedCXButton.js +6 -0
  5. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.cjs +7 -6
  6. package/dist/CXIntegration/implementations/useGorgiasUnifiedCXButton.js +7 -6
  7. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.cjs +10 -11
  8. package/dist/CXIntegration/implementations/useGrooveUnifiedCXButton.js +10 -11
  9. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.cjs +10 -7
  10. package/dist/CXIntegration/implementations/useKustomerUnifiedCXButton.js +10 -7
  11. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.cjs +2 -2
  12. package/dist/CXIntegration/implementations/useReDoUnifiedCXButton.js +2 -2
  13. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.cjs +9 -7
  14. package/dist/CXIntegration/implementations/useRichpanelUnifiedCXButton.js +9 -7
  15. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.cjs +13 -16
  16. package/dist/CXIntegration/implementations/useShopifyChatUnifiedCXButton.js +13 -16
  17. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.cjs +6 -0
  18. package/dist/CXIntegration/implementations/useTidioUnifiedCXButton.js +6 -0
  19. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.cjs +7 -5
  20. package/dist/CXIntegration/implementations/useZendeskUnifiedCXButton.js +7 -5
  21. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.cjs +6 -0
  22. package/dist/CXIntegration/implementations/useZowieUnifiedCXButton.js +6 -0
  23. package/dist/_virtual/rolldown_runtime.cjs +2 -0
  24. package/dist/debug/GenericSelect.cjs +167 -0
  25. package/dist/debug/GenericSelect.js +165 -0
  26. package/dist/debug/MessageContent.cjs +151 -0
  27. package/dist/debug/MessageContent.js +149 -0
  28. package/dist/debug/chatEmbed.cjs +95 -0
  29. package/dist/debug/chatEmbed.js +92 -0
  30. package/dist/debug/debugBar.cjs +17 -0
  31. package/dist/debug/debugBar.js +16 -0
  32. package/dist/debug/reportIssue.cjs +528 -0
  33. package/dist/debug/reportIssue.js +524 -0
  34. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/CustomerServiceApi.cjs +265 -0
  35. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/DefaultApi.cjs +591 -0
  36. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/InferenceApi.cjs +265 -0
  37. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/ProductsApi.cjs +105 -0
  38. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/SearchApi.cjs +229 -0
  39. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/index.cjs +43 -0
  40. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/index.cjs +39 -0
  41. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationRequest.cjs +68 -0
  42. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationResponse.cjs +60 -0
  43. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddToCartAttributes.cjs +53 -0
  44. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsIdentifyRequest.cjs +86 -0
  45. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsTrackEventRequest.cjs +62 -0
  46. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AttachmentRequest.cjs +63 -0
  47. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AutoForm.cjs +55 -0
  48. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Context.cjs +89 -0
  49. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ConversationStatus.cjs +63 -0
  50. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationRequest.cjs +68 -0
  51. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationResponse.cjs +64 -0
  52. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceAttachment.cjs +68 -0
  53. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversation.cjs +69 -0
  54. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversationMessages.cjs +67 -0
  55. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceCustomer.cjs +60 -0
  56. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceMessage.cjs +85 -0
  57. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustomerServiceProvider.cjs +63 -0
  58. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributes.cjs +61 -0
  59. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributesFormCategory.cjs +55 -0
  60. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormSubmittedAttributes.cjs +65 -0
  61. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormType.cjs +61 -0
  62. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FulfillmentDisplayStatus.cjs +84 -0
  63. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GenerationParams.cjs +74 -0
  64. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GetConversationMessagesRequest.cjs +61 -0
  65. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursRequest.cjs +54 -0
  66. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursResponse.cjs +59 -0
  67. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/LabelValue.cjs +60 -0
  68. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ManualForm.cjs +55 -0
  69. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRule.cjs +70 -0
  70. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleAction.cjs +62 -0
  71. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionAttribute.cjs +58 -0
  72. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionType.cjs +64 -0
  73. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleCondition.cjs +60 -0
  74. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleOp.cjs +61 -0
  75. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleStatus.cjs +62 -0
  76. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/NextMessageRequest.cjs +78 -0
  77. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderItemInfo.cjs +78 -0
  78. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderResponseAttributes.cjs +71 -0
  79. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Organization.cjs +83 -0
  80. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfig.cjs +82 -0
  81. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfigResults.cjs +70 -0
  82. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationSettings.cjs +62 -0
  83. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PDPAttributes.cjs +61 -0
  84. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributeCategory.cjs +61 -0
  85. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributes.cjs +64 -0
  86. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributesAttributes.cjs +55 -0
  87. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPIdAttributes.cjs +53 -0
  88. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPUrlAttributes.cjs +53 -0
  89. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitAttributes.cjs +62 -0
  90. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitCategory.cjs +65 -0
  91. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalRequest.cjs +62 -0
  92. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalResponse.cjs +55 -0
  93. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchFilterResponseAttributes.cjs +53 -0
  94. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchRequest.cjs +71 -0
  95. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponse.cjs +64 -0
  96. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseAttributes.cjs +60 -0
  97. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseV2.cjs +64 -0
  98. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/QueryTypedAttributes.cjs +53 -0
  99. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportContent.cjs +59 -0
  100. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportSessionRequest.cjs +99 -0
  101. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Response.cjs +68 -0
  102. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseCategory.cjs +69 -0
  103. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseProductAttributes.cjs +91 -0
  104. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchAttributes.cjs +65 -0
  105. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchResponseProduct.cjs +93 -0
  106. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchSuggestionsResponse.cjs +58 -0
  107. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageRequest.cjs +71 -0
  108. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageResponse.cjs +55 -0
  109. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigExperiment.cjs +64 -0
  110. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigFeatureGate.cjs +62 -0
  111. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Suggestion.cjs +70 -0
  112. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionCategory.cjs +62 -0
  113. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionClickedAttributes.cjs +53 -0
  114. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventProductCategory.cjs +62 -0
  115. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventRequest.cjs +67 -0
  116. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventResponse.cjs +78 -0
  117. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfo.cjs +70 -0
  118. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfoPrevUserEvent.cjs +60 -0
  119. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingGenericConfig.cjs +52 -0
  120. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPDPConfig.cjs +65 -0
  121. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPLPConfig.cjs +61 -0
  122. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingRequest.cjs +69 -0
  123. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponse.cjs +73 -0
  124. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponseSpecificDetails.cjs +59 -0
  125. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingType.cjs +67 -0
  126. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEvent.cjs +69 -0
  127. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventAttributes.cjs +75 -0
  128. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventCategory.cjs +70 -0
  129. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1GetSessionMessages200Response.cjs +67 -0
  130. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1SearchExplainGet200Response.cjs +63 -0
  131. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetString.cjs +60 -0
  132. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextRequest.cjs +75 -0
  133. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextResponse.cjs +66 -0
  134. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +69 -0
  135. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/index.cjs +221 -0
  136. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/runtime.cjs +324 -0
  137. package/dist/node_modules/react-icons/fa/index.cjs +65 -0
  138. package/dist/node_modules/react-icons/fa/index.js +61 -0
  139. package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
  140. package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
  141. package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
  142. package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
  143. package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
  144. package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
  145. package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +27 -0
  146. package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +25 -0
  147. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
  148. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
  149. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
  150. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
  151. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
  152. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
  153. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
  154. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
  155. package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
  156. package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
  157. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
  158. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
  159. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.cjs +3 -3
  160. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
  161. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
  162. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.js +3 -3
  163. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
  164. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
  165. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.cjs +3 -3
  166. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.cts +3 -3
  167. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
  168. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.js +3 -3
  169. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +2 -2
  170. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +1 -1
  171. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +66 -36
  172. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
  173. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
  174. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +67 -37
  175. package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.cjs +50 -0
  176. package/dist/widgets/FloatingChatWidget/hooks/useAutoPopup.js +49 -0
  177. package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +4 -1
  178. package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +5 -2
  179. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +31 -0
  180. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +15 -0
  181. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +15 -0
  182. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +30 -0
  183. package/dist/widgets/FullPageSalesAgentWidget/index.cjs +3 -0
  184. package/dist/widgets/FullPageSalesAgentWidget/index.d.cts +2 -0
  185. package/dist/widgets/FullPageSalesAgentWidget/index.d.ts +2 -0
  186. package/dist/widgets/FullPageSalesAgentWidget/index.js +3 -0
  187. package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +3 -2
  188. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
  189. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.ts +2 -2
  190. package/dist/widgets/ProductCardWidget/ProductCardWidget.js +3 -2
  191. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +4 -3
  192. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
  193. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
  194. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +4 -3
  195. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +29 -5
  196. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
  197. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
  198. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +30 -6
  199. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
  200. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.ts +2 -2
  201. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +8 -6
  202. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
  203. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +8 -6
  204. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +4 -3
  205. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
  206. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
  207. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +4 -3
  208. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
  209. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
  210. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +3 -2
  211. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
  212. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
  213. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +3 -2
  214. package/dist/widgets/utils/functions.cjs +1 -1
  215. package/dist/widgets/utils/functions.js +1 -1
  216. package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
  217. package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -4
  218. package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
  219. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
  220. package/package.json +5 -1
  221. package/src/CXIntegration/hooks/useUnifiedCXButton.ts +4 -1
  222. package/src/CXIntegration/implementations/useGladlyUnifiedCXButton.ts +5 -0
  223. package/src/CXIntegration/implementations/useGorgiasUnifiedCXButton.ts +11 -8
  224. package/src/CXIntegration/implementations/useGrooveUnifiedCXButton.ts +12 -15
  225. package/src/CXIntegration/implementations/useKustomerUnifiedCXButton.ts +11 -11
  226. package/src/CXIntegration/implementations/useReDoUnifiedCXButton.ts +2 -4
  227. package/src/CXIntegration/implementations/useRichpanelUnifiedCXButton.ts +9 -10
  228. package/src/CXIntegration/implementations/useShopifyChatUnifiedCXButton.ts +18 -28
  229. package/src/CXIntegration/implementations/useTidioUnifiedCXButton.ts +5 -0
  230. package/src/CXIntegration/implementations/useZendeskUnifiedCXButton.ts +11 -6
  231. package/src/CXIntegration/implementations/useZowieUnifiedCXButton.ts +5 -0
  232. package/src/CXIntegration/types.ts +1 -0
  233. package/src/debug/GenericSelect.tsx +236 -0
  234. package/src/debug/MessageContent.tsx +248 -0
  235. package/src/debug/chatEmbed.tsx +119 -0
  236. package/src/debug/debugBar.tsx +12 -0
  237. package/src/debug/reportIssue.tsx +649 -0
  238. package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +6 -0
  239. package/src/stories/FullPageSalesAgentWidget.stories.tsx +68 -0
  240. package/src/stories/SalesAgentTest/SalesAgentTest.tsx +10 -2
  241. package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +110 -65
  242. package/src/widgets/FloatingChatWidget/hooks/useAutoPopup.ts +65 -0
  243. package/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.ts +11 -5
  244. package/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx +46 -0
  245. package/src/widgets/FullPageSalesAgentWidget/index.ts +1 -0
  246. package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +5 -1
  247. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +6 -1
  248. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +32 -3
  249. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +10 -2
  250. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +6 -2
  251. package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +5 -1
  252. /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +0 -0
  253. /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResultsWidget.d.ts +0 -0
  254. /package/dist/{widgets → packages/widgets}/dist/SearchResults/index.d.ts +0 -0
  255. /package/dist/{widgets → packages/widgets}/dist/SearchResults/types.d.ts +0 -0
  256. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroState.d.ts +0 -0
  257. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroStateWidget.d.ts +0 -0
  258. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/index.d.ts +0 -0
  259. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +0 -0
  260. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +0 -0
  261. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/index.d.ts +0 -0
  262. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/types.d.ts +0 -0
  263. /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +0 -0
  264. /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +0 -0
  265. /package/dist/{widgets → packages/widgets}/dist/config/BaseWidgetConfig.d.ts +0 -0
  266. /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
@@ -5,14 +5,14 @@ import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/con
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
7
7
  import { useAtomValue, useSetAtom } from "jotai";
8
- import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
9
- import { chatPreviewLoadingDataAtom } from "@envive-ai/react-hooks/atoms/widget";
10
- import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
11
8
  import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
12
9
  import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
13
- import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
14
10
  import { lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
11
+ import { Theme } from "@envive-ai/react-toolkit-v3/Tokens";
12
+ import { ChatElementDisplayLocationV3, VariantTypeEnum } from "@envive-ai/react-hooks/application/models";
15
13
  import { variantInfoAtom } from "@envive-ai/react-hooks/atoms/app";
14
+ import { ChatPreviewLoading } from "@envive-ai/react-toolkit-v3/ChatPreviewLoading";
15
+ import { chatPreviewLoadingDataAtom } from "@envive-ai/react-hooks/atoms/widget";
16
16
  import { PageVariant, SocialProof, WidgetKind } from "@envive-ai/react-toolkit-v3/SocialProof";
17
17
 
18
18
  //#region src/widgets/SocialProofWidget/SocialProofWidget.tsx
@@ -67,14 +67,16 @@ const SocialProofWidgetHandler = (props) => {
67
67
  const handlePrimaryButtonClick = useCallback((text) => {
68
68
  onTypedMessageSubmitted({
69
69
  query: text,
70
- userTyped: false
70
+ userTyped: false,
71
+ displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON
71
72
  });
72
73
  openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
73
74
  }, [onTypedMessageSubmitted, openChat]);
74
75
  const handleSecondaryButtonClick = useCallback((text) => {
75
76
  onTypedMessageSubmitted({
76
77
  query: text,
77
- userTyped: false
78
+ userTyped: false,
79
+ displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON
78
80
  });
79
81
  openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
80
82
  }, [onTypedMessageSubmitted, openChat]);
@@ -5,9 +5,9 @@ let react = require("react");
5
5
  let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/react-hooks/contexts/amplitudeContext");
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
8
- let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
9
8
  let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
10
9
  let __envive_ai_react_hooks_hooks_ChatToggle = require("@envive-ai/react-hooks/hooks/ChatToggle");
10
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
11
11
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
12
12
  let __envive_ai_react_toolkit_v3_TitledPromptCarousel = require("@envive-ai/react-toolkit-v3/TitledPromptCarousel");
13
13
 
@@ -35,7 +35,7 @@ const TitledPromptCarouselWidgetHandler = (props) => {
35
35
  const boldFirstButton = titledPromptCarouselWidgetConfig?.boldFirstButton;
36
36
  const promptButtonType = titledPromptCarouselWidgetConfig?.promptButtonType;
37
37
  const promptCarouselRows = titledPromptCarouselWidgetConfig?.promptCarouselRows;
38
- const animationSpeed = isLoading ? __envive_ai_react_toolkit_v3_PromptCarousel.AnimationSpeed.FAST : titledPromptCarouselWidgetConfig?.animationSpeed;
38
+ const animationSpeed = isLoading ? __envive_ai_react_toolkit_v3_PromptCarousel.AnimationSpeed.NONE : titledPromptCarouselWidgetConfig?.animationSpeed;
39
39
  const { trackEvent } = (0, __envive_ai_react_hooks_contexts_amplitudeContext.useAmplitude)();
40
40
  (0, react.useEffect)(() => {
41
41
  trackEvent({
@@ -58,7 +58,8 @@ const TitledPromptCarouselWidgetHandler = (props) => {
58
58
  handleButtonClick: (0, react.useCallback)((text) => {
59
59
  onTypedMessageSubmitted({
60
60
  query: text,
61
- userTyped: false
61
+ userTyped: false,
62
+ displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
62
63
  });
63
64
  openChat(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
64
65
  }, [onTypedMessageSubmitted, openChat]),
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime1 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
4
4
  interface TitledPromptCarouselWidgetProps {
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
7
7
  declare const TitledPromptCarouselWidget: {
8
8
  ({
9
9
  widgetConfigId
10
- }: TitledPromptCarouselWidgetProps): react_jsx_runtime1.JSX.Element;
10
+ }: TitledPromptCarouselWidgetProps): react_jsx_runtime6.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts
4
4
  interface TitledPromptCarouselWidgetProps {
@@ -7,7 +7,7 @@ interface TitledPromptCarouselWidgetProps {
7
7
  declare const TitledPromptCarouselWidget: {
8
8
  ({
9
9
  widgetConfigId
10
- }: TitledPromptCarouselWidgetProps): react_jsx_runtime3.JSX.Element;
10
+ }: TitledPromptCarouselWidgetProps): react_jsx_runtime0.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -4,9 +4,9 @@ import { useCallback, useEffect } from "react";
4
4
  import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/contexts/amplitudeContext";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
7
- import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
8
7
  import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
9
8
  import { useChatToggle } from "@envive-ai/react-hooks/hooks/ChatToggle";
9
+ import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
10
10
  import { AnimationSpeed } from "@envive-ai/react-toolkit-v3/PromptCarousel";
11
11
  import { TitledPromptCarousel } from "@envive-ai/react-toolkit-v3/TitledPromptCarousel";
12
12
 
@@ -34,7 +34,7 @@ const TitledPromptCarouselWidgetHandler = (props) => {
34
34
  const boldFirstButton = titledPromptCarouselWidgetConfig?.boldFirstButton;
35
35
  const promptButtonType = titledPromptCarouselWidgetConfig?.promptButtonType;
36
36
  const promptCarouselRows = titledPromptCarouselWidgetConfig?.promptCarouselRows;
37
- const animationSpeed = isLoading ? AnimationSpeed.FAST : titledPromptCarouselWidgetConfig?.animationSpeed;
37
+ const animationSpeed = isLoading ? AnimationSpeed.NONE : titledPromptCarouselWidgetConfig?.animationSpeed;
38
38
  const { trackEvent } = useAmplitude();
39
39
  useEffect(() => {
40
40
  trackEvent({
@@ -57,7 +57,8 @@ const TitledPromptCarouselWidgetHandler = (props) => {
57
57
  handleButtonClick: useCallback((text) => {
58
58
  onTypedMessageSubmitted({
59
59
  query: text,
60
- userTyped: false
60
+ userTyped: false,
61
+ displayLocation: ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL
61
62
  });
62
63
  openChat(ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
63
64
  }, [onTypedMessageSubmitted, openChat]),
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
4
4
  interface TypingAnimationFlowWidgetProps {
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
7
7
  declare const TypingAnimationFlowWidget: {
8
8
  ({
9
9
  widgetConfigId
10
- }: TypingAnimationFlowWidgetProps): react_jsx_runtime0.JSX.Element;
10
+ }: TypingAnimationFlowWidgetProps): react_jsx_runtime1.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts
4
4
  interface TypingAnimationFlowWidgetProps {
@@ -7,7 +7,7 @@ interface TypingAnimationFlowWidgetProps {
7
7
  declare const TypingAnimationFlowWidget: {
8
8
  ({
9
9
  widgetConfigId
10
- }: TypingAnimationFlowWidgetProps): react_jsx_runtime4.JSX.Element;
10
+ }: TypingAnimationFlowWidgetProps): react_jsx_runtime8.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  //#endregion
@@ -6,8 +6,8 @@ let __envive_ai_react_hooks_contexts_amplitudeContext = require("@envive-ai/reac
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  let __envive_ai_react_hooks_contexts_typesV3 = require("@envive-ai/react-hooks/contexts/typesV3");
8
8
  let jotai = require("jotai");
9
- let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
10
9
  let __envive_ai_react_hooks_contexts_salesAgentContext = require("@envive-ai/react-hooks/contexts/salesAgentContext");
10
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
11
11
  let __envive_ai_react_toolkit_v3_PromptCarousel = require("@envive-ai/react-toolkit-v3/PromptCarousel");
12
12
  let __envive_ai_react_hooks_atoms_chat_chatState = require("@envive-ai/react-hooks/atoms/chat/chatState");
13
13
  let __envive_ai_react_toolkit_v3_PromptButton_types = require("@envive-ai/react-toolkit-v3/PromptButton/types");
@@ -56,7 +56,8 @@ const TypingAnimationWidgetHandler = (props) => {
56
56
  const handleButtonClick = (0, react.useCallback)((text) => {
57
57
  onTypedMessageSubmitted({
58
58
  query: text,
59
- userTyped: false
59
+ userTyped: false,
60
+ displayLocation: __envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION
60
61
  });
61
62
  onToggle(__envive_ai_react_hooks_application_models.ChatElementDisplayLocationV3.TYPING_ANIMATION);
62
63
  }, [onTypedMessageSubmitted, onToggle]);
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.cjs";
2
- import * as react_jsx_runtime16 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
5
5
  declare const TypingAnimationWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime16.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime2.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface TypingAnimationWidgetProps {
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
12
12
  declare const TypingAnimationWidget: {
13
13
  ({
14
14
  widgetConfigId
15
- }: TypingAnimationWidgetProps): react_jsx_runtime16.JSX.Element;
15
+ }: TypingAnimationWidgetProps): react_jsx_runtime2.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { BaseWidgetProps } from "../../hocs/withBaseWidget/types.js";
2
- import * as react_jsx_runtime16 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts
5
5
  declare const TypingAnimationWithBaseWidget: {
6
- (props: BaseWidgetProps): react_jsx_runtime16.JSX.Element;
6
+ (props: BaseWidgetProps): react_jsx_runtime5.JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  interface TypingAnimationWidgetProps {
@@ -12,7 +12,7 @@ interface TypingAnimationWidgetProps {
12
12
  declare const TypingAnimationWidget: {
13
13
  ({
14
14
  widgetConfigId
15
- }: TypingAnimationWidgetProps): react_jsx_runtime16.JSX.Element;
15
+ }: TypingAnimationWidgetProps): react_jsx_runtime5.JSX.Element;
16
16
  displayName: string;
17
17
  };
18
18
  //#endregion
@@ -5,8 +5,8 @@ import { SpiffyMetricsEventName, useAmplitude } from "@envive-ai/react-hooks/con
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { WidgetTypeV3 } from "@envive-ai/react-hooks/contexts/typesV3";
7
7
  import { useSetAtom } from "jotai";
8
- import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
9
8
  import { useSalesAgent } from "@envive-ai/react-hooks/contexts/salesAgentContext";
9
+ import { ChatElementDisplayLocationV3 } from "@envive-ai/react-hooks/application/models";
10
10
  import { PromptCarouselRows } from "@envive-ai/react-toolkit-v3/PromptCarousel";
11
11
  import { chatOnToggleAtom } from "@envive-ai/react-hooks/atoms/chat/chatState";
12
12
  import { PromptButtonVariant } from "@envive-ai/react-toolkit-v3/PromptButton/types";
@@ -55,7 +55,8 @@ const TypingAnimationWidgetHandler = (props) => {
55
55
  const handleButtonClick = useCallback((text) => {
56
56
  onTypedMessageSubmitted({
57
57
  query: text,
58
- userTyped: false
58
+ userTyped: false,
59
+ displayLocation: ChatElementDisplayLocationV3.TYPING_ANIMATION
59
60
  });
60
61
  onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
61
62
  }, [onTypedMessageSubmitted, onToggle]);
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
3
2
  let __envive_ai_react_hooks_atoms_chat = require("@envive-ai/react-hooks/atoms/chat");
3
+ let __envive_ai_react_hooks_application_models = require("@envive-ai/react-hooks/application/models");
4
4
  let __envive_ai_react_hooks_atoms_atomStore = require("@envive-ai/react-hooks/atoms/atomStore");
5
5
 
6
6
  //#region src/widgets/utils/functions.ts
@@ -1,5 +1,5 @@
1
- import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
2
1
  import { chatAtom, lastAssistantMessageAtom } from "@envive-ai/react-hooks/atoms/chat";
2
+ import { MessageRole, MessageType } from "@envive-ai/react-hooks/application/models";
3
3
  import { getAtomStore } from "@envive-ai/react-hooks/atoms/atomStore";
4
4
 
5
5
  //#region src/widgets/utils/functions.ts
@@ -1,4 +1,4 @@
1
- import { SearchResultsWidget } from "../../widgets/dist/SearchResults/SearchResultsWidget.js";
2
- import { SearchResults } from "../../widgets/dist/SearchResults/SearchResults.js";
3
- import "../../widgets/dist/SearchResults/index.js";
1
+ import { SearchResultsWidget } from "../../packages/widgets/dist/SearchResults/SearchResultsWidget.js";
2
+ import { SearchResults } from "../../packages/widgets/dist/SearchResults/SearchResults.js";
3
+ import "../../packages/widgets/dist/SearchResults/index.js";
4
4
  export { SearchResults, SearchResultsWidget };
@@ -1,5 +1,5 @@
1
- import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "../../widgets/dist/SearchZeroState/types.js";
2
- import { SearchZeroState } from "../../widgets/dist/SearchZeroState/SearchZeroState.js";
3
- import { SearchZeroStateWidget } from "../../widgets/dist/SearchZeroState/SearchZeroStateWidget.js";
4
- import "../../widgets/dist/SearchZeroState/index.js";
1
+ import { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroStateProps } from "../../packages/widgets/dist/SearchZeroState/types.js";
2
+ import { SearchZeroState } from "../../packages/widgets/dist/SearchZeroState/SearchZeroState.js";
3
+ import { SearchZeroStateWidget } from "../../packages/widgets/dist/SearchZeroState/SearchZeroStateWidget.js";
4
+ import "../../packages/widgets/dist/SearchZeroState/index.js";
5
5
  export { SearchEntryPointWidgetConfig, SearchInputVariant, SearchZeroState, SearchZeroStateProps, SearchZeroStateWidget };
@@ -1,4 +1,4 @@
1
- import { SuggestionBarLocationForMetrics } from "../../widgets/dist/SuggestionBar/types.js";
2
- import { SuggestionBar } from "../../widgets/dist/SuggestionBar/SuggestionBar.js";
3
- import "../../widgets/dist/SuggestionBar/index.js";
1
+ import { SuggestionBarLocationForMetrics } from "../../packages/widgets/dist/SuggestionBar/types.js";
2
+ import { SuggestionBar } from "../../packages/widgets/dist/SuggestionBar/SuggestionBar.js";
3
+ import "../../packages/widgets/dist/SuggestionBar/index.js";
4
4
  export { SuggestionBar, SuggestionBarLocationForMetrics };
@@ -1,3 +1,3 @@
1
- import { SuggestionButtonContainerProps } from "../../widgets/dist/SuggestionButtonContainer/types.js";
2
- import { SuggestionButtonContainer } from "../../widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.js";
1
+ import { SuggestionButtonContainerProps } from "../../packages/widgets/dist/SuggestionButtonContainer/types.js";
2
+ import { SuggestionButtonContainer } from "../../packages/widgets/dist/SuggestionButtonContainer/SuggestionButtonContainer.js";
3
3
  export { SuggestionButtonContainer, SuggestionButtonContainerProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envive-ai/react-widgets-v3",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "description": "React widget library v3 for Envive services.",
5
5
  "keywords": [
6
6
  "react",
@@ -120,6 +120,10 @@
120
120
  "import": "./dist/widgets/FloatingChatWidget/index.js",
121
121
  "require": "./dist/widgets/FloatingChatWidget/index.cjs"
122
122
  },
123
+ "./widgets/FullPageSalesAgentWidget": {
124
+ "import": "./dist/widgets/FullPageSalesAgentWidget/index.js",
125
+ "require": "./dist/widgets/FullPageSalesAgentWidget/index.cjs"
126
+ },
123
127
  "./widgets/ProductCardWidget": {
124
128
  "import": "./dist/widgets/ProductCardWidget/index.js",
125
129
  "require": "./dist/widgets/ProductCardWidget/index.cjs"
@@ -9,7 +9,8 @@ interface UseUnifiedCXButtonProps {
9
9
  enabled: boolean;
10
10
  provider: CustomerServiceType;
11
11
  suppressMerchantButton?: boolean;
12
- onSwitchToAgent?: () => void;
12
+ onSwitchToAgent: () => void;
13
+ onCXClose?: () => void;
13
14
  }
14
15
 
15
16
  export const useUnifiedCXButton = ({
@@ -17,6 +18,7 @@ export const useUnifiedCXButton = ({
17
18
  provider = CustomerServiceType.unsupported,
18
19
  suppressMerchantButton = false,
19
20
  onSwitchToAgent,
21
+ onCXClose,
20
22
  }: UseUnifiedCXButtonProps): UnifiedCXButton | undefined => {
21
23
  const { isSupported } = usePage();
22
24
  const hasParsedVariantInfo = useAtomValue(hasParsedVariantInfoAtom);
@@ -25,6 +27,7 @@ export const useUnifiedCXButton = ({
25
27
 
26
28
  const selectedCustomerService = customerService({
27
29
  onSwitchToAgent,
30
+ onCXClose,
28
31
  suppressMerchantButton,
29
32
  });
30
33
 
@@ -1,3 +1,6 @@
1
+ import { SelectorFactory } from '@envive-ai/react-hooks/application/utils';
2
+ import { useElementObserver } from '@envive-ai/react-hooks/hooks/ElementObserver';
3
+ import { FLOATING_BUTTON_ID } from '../../widgets/FloatingChatWidget/constants';
1
4
  import { CustomerServiceImplProps, UnifiedCXButton } from '../types';
2
5
 
3
6
  interface UseGladlyUnifiedCXButtonProps extends CustomerServiceImplProps {}
@@ -6,9 +9,11 @@ export const useGladlyUnifiedCXButton = ({
6
9
  onSwitchToAgent,
7
10
  }: UseGladlyUnifiedCXButtonProps): UnifiedCXButton => {
8
11
  const gladlyButton = document.querySelector('[data-aid*="gladlyChatChatButton"]');
12
+ const enviveFloatingButton = useElementObserver(SelectorFactory.id(FLOATING_BUTTON_ID));
9
13
 
10
14
  const toggle = () => {
11
15
  onSwitchToAgent();
16
+ enviveFloatingButton.hide();
12
17
  if (gladlyButton && gladlyButton instanceof HTMLElement) {
13
18
  gladlyButton.click();
14
19
  }
@@ -11,6 +11,7 @@ interface UseGorgiasUnifiedCXButtonProps extends CustomerServiceImplProps {}
11
11
 
12
12
  export const useGorgiasUnifiedCXButton = ({
13
13
  onSwitchToAgent,
14
+ onCXClose,
14
15
  suppressMerchantButton,
15
16
  }: UseGorgiasUnifiedCXButtonProps): UnifiedCXButton => {
16
17
  const chatWindow = useElementObserver(SelectorFactory.id(CHAT_WINDOW_ID));
@@ -22,10 +23,7 @@ export const useGorgiasUnifiedCXButton = ({
22
23
  onSwitchToAgent();
23
24
  chatButton.show();
24
25
  trigger.fire('click');
25
-
26
- if (suppressMerchantButton) {
27
- enviveFloatingButton.hide();
28
- }
26
+ enviveFloatingButton.hide();
29
27
  };
30
28
 
31
29
  const isSwitchEnabled = () => !!SelectorFactory.chain(GORGIAS_BUTTON_SELECTOR).parse();
@@ -38,23 +36,28 @@ export const useGorgiasUnifiedCXButton = ({
38
36
  });
39
37
 
40
38
  chatWindow.onAdd(el => {
41
- if (el && suppressMerchantButton) {
39
+ if (el) {
42
40
  const styles = window.getComputedStyle(el);
43
41
  const chatWindowDisplay = styles.getPropertyValue('display');
44
42
  const chatButtonDisplay = chatButton.targetNode?.style.display;
45
43
 
46
44
  if (chatWindowDisplay === 'block' && chatButtonDisplay === 'none') {
47
- chatButton.show();
45
+ if (suppressMerchantButton) {
46
+ chatButton.show();
47
+ }
48
48
  enviveFloatingButton.hide();
49
49
  }
50
50
  }
51
51
  });
52
52
 
53
53
  chatWindow.onChange(el => {
54
- if (el && suppressMerchantButton) {
54
+ if (el) {
55
55
  const styles = window.getComputedStyle(el);
56
56
  if (styles.getPropertyValue('display') === 'none') {
57
- chatButton.hide();
57
+ onCXClose?.();
58
+ if (suppressMerchantButton) {
59
+ chatButton.hide();
60
+ }
58
61
  enviveFloatingButton.show();
59
62
  }
60
63
  }
@@ -22,6 +22,7 @@ interface UseGrooveUnifiedCXButtonProps extends CustomerServiceImplProps {}
22
22
 
23
23
  export const useGrooveUnifiedCXButton = ({
24
24
  onSwitchToAgent,
25
+ onCXClose,
25
26
  suppressMerchantButton,
26
27
  }: UseGrooveUnifiedCXButtonProps): UnifiedCXButton => {
27
28
  const grooveChatContainer = useElementObserver(
@@ -32,10 +33,7 @@ export const useGrooveUnifiedCXButton = ({
32
33
  const previousIsOpenRef = useRef<boolean | undefined>(undefined);
33
34
 
34
35
  const toggle = () => {
35
- if (suppressMerchantButton) {
36
- enviveFloatingButton.hide();
37
- }
38
-
36
+ enviveFloatingButton.hide();
39
37
  onSwitchToAgent();
40
38
  if (windowGrooveWidget) {
41
39
  windowGrooveWidget.open();
@@ -48,30 +46,29 @@ export const useGrooveUnifiedCXButton = ({
48
46
 
49
47
  const hideEnviveFloatingButton = () => {
50
48
  enviveFloatingButton.hide();
51
- if (windowGrooveWidget) {
49
+ if (suppressMerchantButton && windowGrooveWidget) {
52
50
  windowGrooveWidget.open();
53
51
  }
54
52
  };
55
53
 
56
54
  const showEnviveFloatingButton = () => {
55
+ onCXClose?.();
57
56
  enviveFloatingButton.show();
58
- if (windowGrooveWidget) {
57
+ if (suppressMerchantButton && windowGrooveWidget) {
59
58
  windowGrooveWidget.close();
60
59
  }
61
60
  };
62
61
 
63
62
  grooveChatContainer.onChange(() => {
64
- if (suppressMerchantButton) {
65
- const isOpen = windowGrooveWidget?.shim.isOpen;
63
+ const isOpen = windowGrooveWidget?.shim.isOpen;
66
64
 
67
- if (isOpen !== previousIsOpenRef.current) {
68
- previousIsOpenRef.current = isOpen;
65
+ if (isOpen !== previousIsOpenRef.current) {
66
+ previousIsOpenRef.current = isOpen;
69
67
 
70
- if (isOpen) {
71
- hideEnviveFloatingButton();
72
- } else {
73
- showEnviveFloatingButton();
74
- }
68
+ if (isOpen) {
69
+ hideEnviveFloatingButton();
70
+ } else {
71
+ showEnviveFloatingButton();
75
72
  }
76
73
  }
77
74
  });
@@ -7,6 +7,7 @@ interface UseKustomerUnifiedCXButtonProps extends CustomerServiceImplProps {}
7
7
 
8
8
  export const useKustomerUnifiedCXButton = ({
9
9
  onSwitchToAgent,
10
+ onCXClose,
10
11
  suppressMerchantButton,
11
12
  }: UseKustomerUnifiedCXButtonProps): UnifiedCXButton => {
12
13
  const kustomerButton = useElementObserver(
@@ -24,9 +25,7 @@ export const useKustomerUnifiedCXButton = ({
24
25
 
25
26
  const toggle = () => {
26
27
  onSwitchToAgent();
27
- if (suppressMerchantButton) {
28
- enviveFloatingButton.hide();
29
- }
28
+ enviveFloatingButton.hide();
30
29
  kustomerButton.show();
31
30
  kustomerButton.fire('click');
32
31
  };
@@ -53,16 +52,17 @@ export const useKustomerUnifiedCXButton = ({
53
52
  });
54
53
 
55
54
  kustomerWidgetRoot.onChange(async el => {
56
- if (suppressMerchantButton) {
57
- for (const child of el?.children || []) {
58
- if ([...child.classList].some(cls => cls.includes('widget__widgetWrapper'))) {
59
- enviveFloatingButton.hide();
55
+ for (const child of el?.children || []) {
56
+ if ([...child.classList].some(cls => cls.includes('widget__widgetWrapper'))) {
57
+ enviveFloatingButton.hide();
58
+ if (suppressMerchantButton) {
60
59
  kustomerButton.show();
61
60
  kustomerNotification.show();
62
- } else if (
63
- [...child.classList].some(cls => cls.includes('chatRootIcon__chatIconWrapper'))
64
- ) {
65
- enviveFloatingButton.show();
61
+ }
62
+ } else if ([...child.classList].some(cls => cls.includes('chatRootIcon__chatIconWrapper'))) {
63
+ onCXClose?.();
64
+ enviveFloatingButton.show();
65
+ if (suppressMerchantButton) {
66
66
  kustomerButton.hide();
67
67
  kustomerNotification.hide();
68
68
  }
@@ -13,6 +13,7 @@ interface UseReDoUnifiedCXButtonProps extends CustomerServiceImplProps {}
13
13
 
14
14
  export const useReDoUnifiedCXButton = ({
15
15
  onSwitchToAgent,
16
+ onCXClose,
16
17
  suppressMerchantButton,
17
18
  }: UseReDoUnifiedCXButtonProps): UnifiedCXButton => {
18
19
  const chatContainer = useElementObserver(SelectorFactory.id(REDO_CHAT_CONTAINER_SELECTOR));
@@ -25,10 +26,7 @@ export const useReDoUnifiedCXButton = ({
25
26
  onSwitchToAgent();
26
27
  chatButton.show();
27
28
  chatButton.fire('click');
28
-
29
- if (suppressMerchantButton) {
30
- enviveFloatingButton.hide();
31
- }
29
+ enviveFloatingButton.hide();
32
30
  };
33
31
 
34
32
  const isReDoButtonEnabled = () => !!SelectorFactory.chain(REDO_BUTTON_SELECTOR).parse();
@@ -7,6 +7,7 @@ interface UseRichpanelUnifiedCXButtonProps extends CustomerServiceImplProps {}
7
7
 
8
8
  export const useRichpanelUnifiedCXButton = ({
9
9
  onSwitchToAgent,
10
+ onCXClose,
10
11
  suppressMerchantButton,
11
12
  }: UseRichpanelUnifiedCXButtonProps): UnifiedCXButton => {
12
13
  const chatWindow = useElementObserver(
@@ -21,21 +22,16 @@ export const useRichpanelUnifiedCXButton = ({
21
22
  const toggle = () => {
22
23
  chatWindow.show();
23
24
  onSwitchToAgent();
25
+ enviveFloatingButton.hide();
24
26
 
25
27
  if (chatButton) {
26
28
  chatButton.show();
27
29
  chatButton.fire('click');
28
- if (suppressMerchantButton) {
29
- enviveFloatingButton.hide();
30
- }
31
30
  }
32
31
 
33
32
  if (chatAlternativeButton) {
34
33
  chatAlternativeButton.show();
35
34
  chatAlternativeButton.fire('click');
36
- if (suppressMerchantButton) {
37
- enviveFloatingButton.hide();
38
- }
39
35
  }
40
36
  };
41
37
 
@@ -62,16 +58,19 @@ export const useRichpanelUnifiedCXButton = ({
62
58
  });
63
59
 
64
60
  chatWindow.onChange(el => {
65
- if (el && suppressMerchantButton) {
61
+ if (el) {
66
62
  const { classList } = el;
67
63
  if (classList.contains('opened')) {
68
64
  enviveFloatingButton.hide();
69
65
  chatWindow.show();
70
66
  } else if (classList.length === 1 && classList.contains('rp-messenger-container')) {
67
+ onCXClose?.();
71
68
  enviveFloatingButton.show();
72
- chatButton.hide();
73
- chatAlternativeButton.hide();
74
- chatWindow.hide();
69
+ if (suppressMerchantButton) {
70
+ chatButton.hide();
71
+ chatAlternativeButton.hide();
72
+ chatWindow.hide();
73
+ }
75
74
  }
76
75
  }
77
76
  });