@envive-ai/react-widgets-v3 0.3.9 → 0.3.11

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 (229) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +2 -0
  2. package/dist/debug/GenericSelect.cjs +167 -0
  3. package/dist/debug/GenericSelect.js +165 -0
  4. package/dist/debug/MessageContent.cjs +151 -0
  5. package/dist/debug/MessageContent.js +149 -0
  6. package/dist/debug/chatEmbed.cjs +95 -0
  7. package/dist/debug/chatEmbed.js +92 -0
  8. package/dist/debug/debugBar.cjs +18 -0
  9. package/dist/debug/debugBar.js +17 -0
  10. package/dist/debug/reportIssue.cjs +528 -0
  11. package/dist/debug/reportIssue.js +524 -0
  12. package/dist/hocs/withBaseWidget/withBaseWidget.d.cts +2 -2
  13. package/dist/hocs/withBaseWidget/withBaseWidget.d.ts +2 -2
  14. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/CustomerServiceApi.cjs +265 -0
  15. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/DefaultApi.cjs +591 -0
  16. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/InferenceApi.cjs +265 -0
  17. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/ProductsApi.cjs +105 -0
  18. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/SearchApi.cjs +229 -0
  19. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/apis/index.cjs +43 -0
  20. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/index.cjs +39 -0
  21. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationRequest.cjs +68 -0
  22. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddNoteToLatestConversationResponse.cjs +60 -0
  23. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AddToCartAttributes.cjs +53 -0
  24. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsIdentifyRequest.cjs +86 -0
  25. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AnalyticsTrackEventRequest.cjs +62 -0
  26. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AttachmentRequest.cjs +63 -0
  27. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/AutoForm.cjs +55 -0
  28. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Context.cjs +89 -0
  29. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ConversationStatus.cjs +63 -0
  30. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationRequest.cjs +68 -0
  31. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CreateConversationResponse.cjs +64 -0
  32. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceAttachment.cjs +68 -0
  33. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversation.cjs +69 -0
  34. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceConversationMessages.cjs +67 -0
  35. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceCustomer.cjs +60 -0
  36. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustServiceMessage.cjs +85 -0
  37. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/CustomerServiceProvider.cjs +63 -0
  38. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributes.cjs +61 -0
  39. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormResponseAttributesFormCategory.cjs +55 -0
  40. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormSubmittedAttributes.cjs +65 -0
  41. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FormType.cjs +61 -0
  42. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/FulfillmentDisplayStatus.cjs +84 -0
  43. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GenerationParams.cjs +74 -0
  44. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/GetConversationMessagesRequest.cjs +61 -0
  45. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursRequest.cjs +54 -0
  46. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/IsBusinessHoursResponse.cjs +59 -0
  47. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/LabelValue.cjs +60 -0
  48. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ManualForm.cjs +55 -0
  49. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRule.cjs +70 -0
  50. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleAction.cjs +62 -0
  51. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionAttribute.cjs +58 -0
  52. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleActionType.cjs +64 -0
  53. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleCondition.cjs +60 -0
  54. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleOp.cjs +61 -0
  55. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/MerchRuleStatus.cjs +62 -0
  56. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/NextMessageRequest.cjs +78 -0
  57. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderItemInfo.cjs +78 -0
  58. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrderResponseAttributes.cjs +71 -0
  59. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Organization.cjs +83 -0
  60. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfig.cjs +82 -0
  61. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationConfigResults.cjs +70 -0
  62. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/OrganizationSettings.cjs +62 -0
  63. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PDPAttributes.cjs +61 -0
  64. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributeCategory.cjs +61 -0
  65. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributes.cjs +64 -0
  66. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPAttributesAttributes.cjs +55 -0
  67. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPIdAttributes.cjs +53 -0
  68. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PLPUrlAttributes.cjs +53 -0
  69. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitAttributes.cjs +62 -0
  70. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/PageVisitCategory.cjs +65 -0
  71. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalRequest.cjs +62 -0
  72. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductRetrievalResponse.cjs +55 -0
  73. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchFilterResponseAttributes.cjs +53 -0
  74. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchRequest.cjs +71 -0
  75. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponse.cjs +64 -0
  76. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseAttributes.cjs +60 -0
  77. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ProductSearchResponseV2.cjs +64 -0
  78. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/QueryTypedAttributes.cjs +53 -0
  79. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportContent.cjs +59 -0
  80. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ReportSessionRequest.cjs +99 -0
  81. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Response.cjs +68 -0
  82. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseCategory.cjs +69 -0
  83. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/ResponseProductAttributes.cjs +91 -0
  84. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchAttributes.cjs +65 -0
  85. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchResponseProduct.cjs +93 -0
  86. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SearchSuggestionsResponse.cjs +58 -0
  87. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageRequest.cjs +71 -0
  88. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SendMessageResponse.cjs +55 -0
  89. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigExperiment.cjs +64 -0
  90. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/StatsigFeatureGate.cjs +62 -0
  91. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/Suggestion.cjs +70 -0
  92. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionCategory.cjs +62 -0
  93. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SuggestionClickedAttributes.cjs +53 -0
  94. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventProductCategory.cjs +62 -0
  95. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventRequest.cjs +67 -0
  96. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/SupportedEventResponse.cjs +78 -0
  97. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfo.cjs +70 -0
  98. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/TurnInfoPrevUserEvent.cjs +60 -0
  99. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingGenericConfig.cjs +52 -0
  100. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPDPConfig.cjs +65 -0
  101. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingPLPConfig.cjs +61 -0
  102. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingRequest.cjs +65 -0
  103. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponse.cjs +73 -0
  104. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingResponseSpecificDetails.cjs +59 -0
  105. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UrlResolvingType.cjs +67 -0
  106. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEvent.cjs +69 -0
  107. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventAttributes.cjs +75 -0
  108. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/UserEventCategory.cjs +70 -0
  109. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1GetSessionMessages200Response.cjs +67 -0
  110. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/V1SearchExplainGet200Response.cjs +63 -0
  111. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetString.cjs +60 -0
  112. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextRequest.cjs +73 -0
  113. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetTextResponse.cjs +66 -0
  114. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/WidgetType.cjs +69 -0
  115. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/models/index.cjs +221 -0
  116. package/dist/node_modules/@spiffy-ai/commerce-api-client/dist/runtime.cjs +324 -0
  117. package/dist/node_modules/react-icons/fa/index.cjs +65 -0
  118. package/dist/node_modules/react-icons/fa/index.js +61 -0
  119. package/dist/node_modules/react-icons/lib/iconBase.cjs +121 -0
  120. package/dist/node_modules/react-icons/lib/iconBase.js +119 -0
  121. package/dist/node_modules/react-icons/lib/iconContext.cjs +17 -0
  122. package/dist/node_modules/react-icons/lib/iconContext.js +14 -0
  123. package/dist/packages/icons/dist/IconCloseVariant.cjs +22 -0
  124. package/dist/packages/icons/dist/IconCloseVariant.js +22 -0
  125. package/dist/packages/icons/dist/_virtual/rolldown_runtime.cjs +27 -0
  126. package/dist/packages/icons/dist/_virtual/rolldown_runtime.js +25 -0
  127. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +696 -0
  128. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.development.js +696 -0
  129. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.cjs +43 -0
  130. package/dist/packages/icons/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +43 -0
  131. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.cjs +1528 -0
  132. package/dist/packages/icons/dist/node_modules/react/cjs/react.development.js +1528 -0
  133. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.cjs +329 -0
  134. package/dist/packages/icons/dist/node_modules/react/cjs/react.production.min.js +329 -0
  135. package/dist/packages/icons/dist/node_modules/react/index.cjs +13 -0
  136. package/dist/packages/icons/dist/node_modules/react/index.js +13 -0
  137. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.cjs +13 -0
  138. package/dist/packages/icons/dist/node_modules/react/jsx-runtime.js +13 -0
  139. package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResultsWidget.d.ts +2 -2
  140. package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroStateWidget.d.ts +2 -2
  141. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.cts +3 -3
  142. package/dist/widgets/ChatPreviewComparisonWidget/ChatPreviewComparisonWidget.d.ts +3 -3
  143. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.cts +3 -3
  144. package/dist/widgets/ChatPreviewLoadingWidget/ChatPreviewLoadingWidget.d.ts +3 -3
  145. package/dist/widgets/ChatPreviewWidget/ChatPreviewWidget.d.ts +3 -3
  146. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.cjs +2 -2
  147. package/dist/widgets/FloatingChatWidget/FloatingChatOverlay.js +1 -1
  148. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.cjs +2 -0
  149. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.cts +2 -2
  150. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.d.ts +2 -2
  151. package/dist/widgets/FloatingChatWidget/FloatingChatWidget.js +2 -0
  152. package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.cjs +4 -1
  153. package/dist/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.js +5 -2
  154. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.cjs +31 -0
  155. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.cts +15 -0
  156. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.d.ts +15 -0
  157. package/dist/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.js +30 -0
  158. package/dist/widgets/FullPageSalesAgentWidget/index.cjs +3 -0
  159. package/dist/widgets/FullPageSalesAgentWidget/index.d.cts +2 -0
  160. package/dist/widgets/FullPageSalesAgentWidget/index.d.ts +2 -0
  161. package/dist/widgets/FullPageSalesAgentWidget/index.js +3 -0
  162. package/dist/widgets/ProductCardWidget/ProductCardWidget.cjs +2 -1
  163. package/dist/widgets/ProductCardWidget/ProductCardWidget.d.cts +2 -2
  164. package/dist/widgets/ProductCardWidget/ProductCardWidget.js +2 -1
  165. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.cjs +2 -1
  166. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.cts +3 -3
  167. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.d.ts +3 -3
  168. package/dist/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.js +2 -1
  169. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.cjs +26 -2
  170. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.cts +2 -2
  171. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.d.ts +2 -2
  172. package/dist/widgets/PromptCarouselWidget/PromptCarouselWidget.js +27 -3
  173. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.cjs +1 -1
  174. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.d.cts +2 -2
  175. package/dist/widgets/SocialProofFlowWidget/SocialProofFlowWidget.js +1 -1
  176. package/dist/widgets/SocialProofWidget/SocialProofWidget.cjs +4 -2
  177. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.cts +3 -3
  178. package/dist/widgets/SocialProofWidget/SocialProofWidget.d.ts +3 -3
  179. package/dist/widgets/SocialProofWidget/SocialProofWidget.js +4 -2
  180. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.cjs +2 -1
  181. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.cts +2 -2
  182. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.d.ts +2 -2
  183. package/dist/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.js +2 -1
  184. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.cjs +1 -1
  185. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.cts +2 -2
  186. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.d.ts +2 -2
  187. package/dist/widgets/TypingAnimationFlowWidget/TypingAnimationFlowWidget.js +1 -1
  188. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.cjs +2 -1
  189. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.cts +3 -3
  190. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.d.ts +3 -3
  191. package/dist/widgets/TypingAnimationWidget/TypingAnimationWidget.js +2 -1
  192. package/dist/widgets/dist/SearchResults/SearchResultsWidget.d.cts +2 -2
  193. package/dist/widgets/dist/SearchZeroState/SearchZeroStateWidget.d.cts +2 -2
  194. package/dist/widgets-v2/SearchResults/index.d.ts +3 -3
  195. package/dist/widgets-v2/SearchZeroState/index.d.ts +4 -4
  196. package/dist/widgets-v2/SuggestionBar/index.d.ts +3 -3
  197. package/dist/widgets-v2/SuggestionButtonContainer/index.d.ts +2 -2
  198. package/package.json +5 -1
  199. package/src/debug/GenericSelect.tsx +236 -0
  200. package/src/debug/MessageContent.tsx +248 -0
  201. package/src/debug/chatEmbed.tsx +119 -0
  202. package/src/debug/debugBar.tsx +13 -0
  203. package/src/debug/reportIssue.tsx +649 -0
  204. package/src/hocs/withBaseWidget/__tests__/withBaseWidget.test.tsx +6 -0
  205. package/src/stories/FullPageSalesAgentWidget.stories.tsx +68 -0
  206. package/src/stories/SalesAgentTest/SalesAgentTest.tsx +10 -2
  207. package/src/widgets/FloatingChatWidget/FloatingChatWidget.tsx +2 -0
  208. package/src/widgets/FloatingChatWidget/hooks/useFloatingButtonVisibility.ts +11 -5
  209. package/src/widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget.tsx +46 -0
  210. package/src/widgets/FullPageSalesAgentWidget/index.ts +1 -0
  211. package/src/widgets/ProductCardWidget/ProductCardWidget.tsx +5 -1
  212. package/src/widgets/PromptButtonCarouselWithImageWidget/PromptButtonCarouselWithImageWidget.tsx +6 -1
  213. package/src/widgets/PromptCarouselWidget/PromptCarouselWidget.tsx +31 -2
  214. package/src/widgets/SocialProofWidget/SocialProofWidget.tsx +10 -2
  215. package/src/widgets/TitledPromptCarouselWidget/TitledPromptCarouselWidget.tsx +5 -1
  216. package/src/widgets/TypingAnimationWidget/TypingAnimationWidget.tsx +5 -1
  217. /package/dist/{widgets → packages/widgets}/dist/SearchResults/SearchResults.d.ts +0 -0
  218. /package/dist/{widgets → packages/widgets}/dist/SearchResults/index.d.ts +0 -0
  219. /package/dist/{widgets → packages/widgets}/dist/SearchResults/types.d.ts +0 -0
  220. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/SearchZeroState.d.ts +0 -0
  221. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/index.d.ts +0 -0
  222. /package/dist/{widgets → packages/widgets}/dist/SearchZeroState/types.d.ts +0 -0
  223. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/SuggestionBar.d.ts +0 -0
  224. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/index.d.ts +0 -0
  225. /package/dist/{widgets → packages/widgets}/dist/SuggestionBar/types.d.ts +0 -0
  226. /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/SuggestionButtonContainer.d.ts +0 -0
  227. /package/dist/{widgets → packages/widgets}/dist/SuggestionButtonContainer/types.d.ts +0 -0
  228. /package/dist/{widgets → packages/widgets}/dist/config/BaseWidgetConfig.d.ts +0 -0
  229. /package/dist/{widgets → packages/widgets}/dist/config/WidgetType.d.ts +0 -0
@@ -0,0 +1,68 @@
1
+ import {
2
+ PageVisitCategory,
3
+ useSalesAgent,
4
+ } from '@envive-ai/react-hooks/contexts/salesAgentContext';
5
+ import { UserEventCategory } from '@spiffy-ai/commerce-api-client';
6
+ import type { Meta, StoryObj } from '@storybook/react-vite';
7
+ import { useEffect } from 'react';
8
+ import { v4 as uuid } from 'uuid';
9
+ import { FullPageSalesAgentWidget } from '../widgets/FullPageSalesAgentWidget/FullPageSalesAgentWidget';
10
+
11
+ const meta = {
12
+ title: 'Widgets V3/FullPageSalesAgentWidget',
13
+ component: FullPageSalesAgentWidget,
14
+ tags: ['autodocs'],
15
+ args: {
16
+ widgetConfigId: 'full-page-sales-agent-widget',
17
+ },
18
+ argTypes: {
19
+ widgetConfigId: {
20
+ control: 'text',
21
+ description:
22
+ 'Unique identifier for the widget configuration. The widget will fetch the widget config and hardcopy content based on this ID.',
23
+ },
24
+ },
25
+ parameters: {
26
+ docs: {
27
+ description: {
28
+ component:
29
+ 'FullPageSalesAgentWidget is a widget wrapper around the FullPageSalesAgent component that includes base widget functionality such as visibility tracking, widget config fetching and hardcopy content fetching. The widget renders a full-page sales agent experience.',
30
+ },
31
+ },
32
+ },
33
+ decorators: [
34
+ Story => {
35
+ const { logPageVisit, logUserEvent } = useSalesAgent();
36
+
37
+ useEffect(() => {
38
+ logUserEvent({
39
+ eventId: uuid(),
40
+ category: UserEventCategory.AppLoaded,
41
+ createdAt: new Date().toISOString(),
42
+ });
43
+ logPageVisit({ pageVisitCategory: PageVisitCategory.Homepage });
44
+ }, []);
45
+
46
+ return (
47
+ <div style={{ height: '100vh' }}>
48
+ <Story />
49
+ </div>
50
+ );
51
+ },
52
+ ],
53
+ } satisfies Meta<typeof FullPageSalesAgentWidget>;
54
+
55
+ export default meta;
56
+
57
+ type Story = StoryObj<typeof meta>;
58
+
59
+ export const Playground: Story = {
60
+ parameters: {
61
+ docs: {
62
+ description: {
63
+ story:
64
+ 'Experiment with different widgetConfigId values. The widget will fetch configuration from the widget config based on the widgetConfigId.',
65
+ },
66
+ },
67
+ },
68
+ };
@@ -61,7 +61,11 @@ export const SalesAgentTest = () => {
61
61
  onChange={e => setQuery(e.target.value)}
62
62
  onKeyDown={e => {
63
63
  if (e.key === 'Enter') {
64
- onTypedMessageSubmitted({ query, userTyped: true });
64
+ onTypedMessageSubmitted({
65
+ query,
66
+ userTyped: true,
67
+ displayLocation: ChatElementDisplayLocationV3.FLOATING_CHAT_TEXT_INPUT,
68
+ });
65
69
  setQuery('');
66
70
  }
67
71
  }}
@@ -70,7 +74,11 @@ export const SalesAgentTest = () => {
70
74
  <button
71
75
  type="button"
72
76
  onClick={() => {
73
- onTypedMessageSubmitted({ query, userTyped: true });
77
+ onTypedMessageSubmitted({
78
+ query,
79
+ userTyped: true,
80
+ displayLocation: ChatElementDisplayLocationV3.FLOATING_CHAT_TEXT_INPUT,
81
+ });
74
82
  setQuery('');
75
83
  }}
76
84
  >
@@ -20,6 +20,7 @@ import {
20
20
  } from '@envive-ai/react-toolkit-v3/FloatingButton';
21
21
  import { useChatToggle } from '@envive-ai/react-hooks/hooks/ChatToggle';
22
22
  import { ChatElementDisplayLocationV3 } from '@envive-ai/react-hooks/application/models';
23
+ import { DebugBar } from 'src/debug/debugBar';
23
24
  import { BaseWidgetProps, withBaseWidget } from '../../hocs/withBaseWidget';
24
25
  import { FloatingChatOverlay } from './FloatingChatOverlay';
25
26
  import useGetWidgetStatus from '../hooks/useGetWidgetStatus';
@@ -124,6 +125,7 @@ const FloatingChatWidgetHandler = (props: FloatingChatWidgetHandlerProps) => {
124
125
  isCXButtonSwitchEnabled={!!isSwitchEnabled?.()}
125
126
  isFloatingChatOpen={effectiveIsOpen}
126
127
  onToggleCXButton={toggle}
128
+ debugBar={<DebugBar />}
127
129
  onClose={
128
130
  previewChatAlwaysOpen
129
131
  ? () => {}
@@ -1,8 +1,9 @@
1
- import { useMemo } from 'react';
2
- import { useAtomValue } from 'jotai';
3
- import { featureFlagServiceAtom } from '@envive-ai/react-hooks/atoms/org';
4
1
  import { FeatureGates } from '@envive-ai/react-hooks/application/models';
2
+ import { variantInfoAtom } from '@envive-ai/react-hooks/atoms/app';
3
+ import { featureFlagServiceAtom } from '@envive-ai/react-hooks/atoms/org';
5
4
  import { FloatingButtonShow } from '@envive-ai/react-toolkit-v3/FloatingButton';
5
+ import { useAtom, useAtomValue } from 'jotai';
6
+ import { useMemo } from 'react';
6
7
 
7
8
  export interface UseFloatingButtonVisibilityProps {
8
9
  floatingButtonShowConfig?: FloatingButtonShow;
@@ -21,6 +22,10 @@ export const useFloatingButtonVisibility = ({
21
22
  userHasInteracted,
22
23
  }: UseFloatingButtonVisibilityProps): UseFloatingButtonVisibilityReturn => {
23
24
  const featureFlagService = useAtomValue(featureFlagServiceAtom);
25
+ const [variantInfo] = useAtom(variantInfoAtom);
26
+
27
+ const internalfloatingButtonShowConfig =
28
+ variantInfo.floatingButtonOverride ?? floatingButtonShowConfig;
24
29
 
25
30
  const isSalesAgentEnabled = useMemo(
26
31
  () =>
@@ -33,8 +38,9 @@ export const useFloatingButtonVisibility = ({
33
38
  const shouldShowFloatingButton =
34
39
  (isSalesAgentEnabled || isSalesAgentEnabled === undefined) &&
35
40
  !isChatOpen &&
36
- (floatingButtonShowConfig === FloatingButtonShow.ALWAYS ||
37
- (floatingButtonShowConfig === FloatingButtonShow.POST_INTERACTION && userHasInteracted));
41
+ (internalfloatingButtonShowConfig === FloatingButtonShow.ALWAYS ||
42
+ (internalfloatingButtonShowConfig === FloatingButtonShow.POST_INTERACTION &&
43
+ userHasInteracted));
38
44
 
39
45
  return {
40
46
  shouldShowFloatingButton,
@@ -0,0 +1,46 @@
1
+ import {
2
+ FloatingChatConfig,
3
+ FullPageSalesAgentWidgetV3Config,
4
+ LookAndFeelConfig,
5
+ WidgetTypeV3,
6
+ } from '@envive-ai/react-hooks/contexts/typesV3';
7
+ import { FullPageSalesAgent } from '@envive-ai/react-toolkit-v3/FullPageSalesAgent';
8
+ import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
9
+ import { BaseWidgetProps, withBaseWidget } from 'src/hocs/withBaseWidget';
10
+
11
+ const FullPageSalesAgentHandler = ({
12
+ uiConfig,
13
+ hardcopyContent,
14
+ widgetConfig,
15
+ }: BaseWidgetProps) => {
16
+ const { headerContainer, autoHeight } = (widgetConfig as FullPageSalesAgentWidgetV3Config) || {};
17
+
18
+ return (
19
+ <FullPageSalesAgent
20
+ theme={Theme.STANDARD}
21
+ floatingChatConfig={uiConfig?.floatingChat ?? ({} as FloatingChatConfig)}
22
+ lookAndFeelConfig={uiConfig?.lookAndFeel ?? ({} as LookAndFeelConfig)}
23
+ hardcopyContent={hardcopyContent}
24
+ headerContainer={headerContainer}
25
+ autoHeight={autoHeight}
26
+ />
27
+ );
28
+ };
29
+
30
+ export const FullPageSalesAgentBaseWidget =
31
+ withBaseWidget<BaseWidgetProps>(FullPageSalesAgentHandler);
32
+
33
+ export interface FullPageSalesAgentBaseWidgetProps {
34
+ widgetConfigId: string;
35
+ }
36
+
37
+ export const FullPageSalesAgentWidget = ({ widgetConfigId }: FullPageSalesAgentBaseWidgetProps) => {
38
+ return (
39
+ <FullPageSalesAgentBaseWidget
40
+ widgetConfigId={widgetConfigId}
41
+ widgetType={WidgetTypeV3.FullPageSalesAgentV3}
42
+ />
43
+ );
44
+ };
45
+
46
+ FullPageSalesAgentWidget.displayName = 'FullPageSalesAgentWidget';
@@ -0,0 +1 @@
1
+ export { FullPageSalesAgentWidget } from './FullPageSalesAgentWidget';
@@ -64,7 +64,11 @@ const ProductCardWidgetHandler = (props: BaseWidgetProps) => {
64
64
 
65
65
  const handleSelect = useCallback(
66
66
  (prompt: string) => {
67
- onTypedMessageSubmitted({ query: prompt, userTyped: false });
67
+ onTypedMessageSubmitted({
68
+ query: prompt,
69
+ userTyped: false,
70
+ displayLocation: ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON,
71
+ });
68
72
  openChat(ChatElementDisplayLocationV3.PRODUCT_CARD_PROMPT_BUTTON);
69
73
  },
70
74
  [onTypedMessageSubmitted, openChat],
@@ -60,7 +60,12 @@ const PromptButtonCarouselWithImageWidgetHandler = (props: BaseWidgetProps) => {
60
60
 
61
61
  const handlePromptButtonClick = useCallback(
62
62
  (text: string) => {
63
- onTypedMessageSubmitted({ query: text, userTyped: false });
63
+ onTypedMessageSubmitted({
64
+ query: text,
65
+ userTyped: false,
66
+ displayLocation:
67
+ ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON,
68
+ });
64
69
  openChat(ChatElementDisplayLocationV3.PROMPT_BUTTON_CAROUSEL_WITH_IMAGE_PROMPT_BUTTON);
65
70
  },
66
71
  [onTypedMessageSubmitted, openChat],
@@ -7,6 +7,7 @@ import { ChatElementDisplayLocationV3 } from '@envive-ai/react-hooks/application
7
7
  import { useSalesAgent } from '@envive-ai/react-hooks/contexts/salesAgentContext';
8
8
  import { useCallback, useEffect } from 'react';
9
9
  import {
10
+ EnviveMetricsEventName,
10
11
  SpiffyMetricsEventName,
11
12
  useAmplitude,
12
13
  } from '@envive-ai/react-hooks/contexts/amplitudeContext';
@@ -17,6 +18,20 @@ import { Theme } from '@envive-ai/react-toolkit-v3/Tokens';
17
18
  import { PromptCarousel } from '@envive-ai/react-toolkit-v3/PromptCarousel';
18
19
  import { BaseWidgetProps, withBaseWidget } from '../../hocs/withBaseWidget';
19
20
 
21
+ type RawWidgetString = { id: string; value: string };
22
+ type RawValues = Record<string, RawWidgetString | RawWidgetString[]>;
23
+
24
+ /** Finds the string_id (id) from raw widget text values for the given display text */
25
+ function getStringIdForText(rawValues: RawValues | undefined, text: string): string | undefined {
26
+ if (!rawValues) return undefined;
27
+ for (const raw of Object.values(rawValues)) {
28
+ const list = Array.isArray(raw) ? raw : [raw];
29
+ const found = list.find((s: RawWidgetString) => s.value === text);
30
+ if (found) return found.id;
31
+ }
32
+ return undefined;
33
+ }
34
+
20
35
  const mockButtonTexts = [
21
36
  'Loading button 1',
22
37
  'Loading button 2',
@@ -58,10 +73,24 @@ const PromptCarouselWidgetHandler = (props: BaseWidgetProps) => {
58
73
 
59
74
  const handleButtonClick = useCallback(
60
75
  (text: string) => {
61
- onTypedMessageSubmitted({ query: text, userTyped: false });
76
+ const rawValues = (hardcopyContent as { rawValues?: RawValues } | undefined)?.rawValues;
77
+ const stringId = getStringIdForText(rawValues, text);
78
+ trackEvent({
79
+ eventName: EnviveMetricsEventName.WidgetTextClicked,
80
+ eventProps: {
81
+ response_id: hardcopyContent?.responseId,
82
+ string_id: stringId,
83
+ text,
84
+ },
85
+ });
86
+ onTypedMessageSubmitted({
87
+ query: text,
88
+ userTyped: false,
89
+ displayLocation: ChatElementDisplayLocationV3.PROMPT_CAROUSEL,
90
+ });
62
91
  openChat(ChatElementDisplayLocationV3.PROMPT_CAROUSEL);
63
92
  },
64
- [onTypedMessageSubmitted, openChat],
93
+ [trackEvent, hardcopyContent, onTypedMessageSubmitted, openChat],
65
94
  );
66
95
 
67
96
  return (
@@ -102,7 +102,11 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
102
102
 
103
103
  const handlePrimaryButtonClick = useCallback(
104
104
  (text: string) => {
105
- onTypedMessageSubmitted({ query: text, userTyped: false });
105
+ onTypedMessageSubmitted({
106
+ query: text,
107
+ userTyped: false,
108
+ displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON,
109
+ });
106
110
  openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_PRIMARY_BUTTON);
107
111
  },
108
112
  [onTypedMessageSubmitted, openChat],
@@ -110,7 +114,11 @@ const SocialProofWidgetHandler = (props: BaseWidgetProps) => {
110
114
 
111
115
  const handleSecondaryButtonClick = useCallback(
112
116
  (text: string) => {
113
- onTypedMessageSubmitted({ query: text, userTyped: false });
117
+ onTypedMessageSubmitted({
118
+ query: text,
119
+ userTyped: false,
120
+ displayLocation: ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON,
121
+ });
114
122
  openChat(ChatElementDisplayLocationV3.SOCIAL_PROOF_SECONDARY_BUTTON);
115
123
  },
116
124
  [onTypedMessageSubmitted, openChat],
@@ -67,7 +67,11 @@ const TitledPromptCarouselWidgetHandler = (props: BaseWidgetProps) => {
67
67
 
68
68
  const handleButtonClick = useCallback(
69
69
  (text: string) => {
70
- onTypedMessageSubmitted({ query: text, userTyped: false });
70
+ onTypedMessageSubmitted({
71
+ query: text,
72
+ userTyped: false,
73
+ displayLocation: ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL,
74
+ });
71
75
  openChat(ChatElementDisplayLocationV3.TITLED_PROMPT_CAROUSEL);
72
76
  },
73
77
  [onTypedMessageSubmitted, openChat],
@@ -72,7 +72,11 @@ const TypingAnimationWidgetHandler = (props: BaseWidgetProps) => {
72
72
 
73
73
  const handleButtonClick = useCallback(
74
74
  (text: string) => {
75
- onTypedMessageSubmitted({ query: text, userTyped: false });
75
+ onTypedMessageSubmitted({
76
+ query: text,
77
+ userTyped: false,
78
+ displayLocation: ChatElementDisplayLocationV3.TYPING_ANIMATION,
79
+ });
76
80
  onToggle(ChatElementDisplayLocationV3.TYPING_ANIMATION);
77
81
  },
78
82
  [onTypedMessageSubmitted, onToggle],