@microsoft/omnichannel-chat-widget 0.1.0-main.861673e → 0.1.0-main.875499b

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 (242) hide show
  1. package/README.md +259 -0
  2. package/lib/cjs/assets/Audios.js +8 -0
  3. package/lib/cjs/assets/Icons.js +28 -0
  4. package/lib/cjs/common/Constants.js +54 -4
  5. package/lib/cjs/common/contextDataStore/DataStoreManager.js +14 -0
  6. package/lib/cjs/{assets/assets.d.js → common/interfaces/IContextDataStore.js} +0 -0
  7. package/lib/cjs/common/storage/default/defaultCacheManager.js +34 -0
  8. package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +114 -0
  9. package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +86 -0
  10. package/lib/cjs/common/telemetry/TelemetryConstants.js +74 -5
  11. package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
  12. package/lib/cjs/common/telemetry/TelemetryManager.js +17 -6
  13. package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  14. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  15. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +54 -21
  16. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -5
  17. package/lib/cjs/common/utils.js +89 -2
  18. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  19. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -4
  20. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +11 -58
  21. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +6 -6
  22. package/lib/cjs/components/footerstateful/FooterStateful.js +9 -18
  23. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
  24. package/lib/cjs/components/headerstateful/HeaderStateful.js +23 -13
  25. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +44 -0
  26. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +23 -0
  27. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  28. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +39 -0
  29. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +70 -0
  30. package/lib/cjs/components/livechatwidget/common/Deferred.js +42 -0
  31. package/lib/cjs/components/livechatwidget/common/authHelper.js +65 -0
  32. package/lib/cjs/components/livechatwidget/common/createAdapter.js +13 -1
  33. package/lib/cjs/components/livechatwidget/common/createFooter.js +7 -16
  34. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +12 -0
  35. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +32 -32
  36. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +79 -40
  37. package/lib/cjs/components/livechatwidget/common/endChat.js +142 -47
  38. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +5 -0
  39. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +48 -12
  40. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +144 -39
  41. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -5
  42. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +22 -24
  43. package/lib/cjs/components/livechatwidget/common/shareObservable.js +45 -0
  44. package/lib/cjs/components/livechatwidget/common/startChat.js +207 -41
  45. package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +3 -3
  46. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +331 -77
  47. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
  48. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +8 -0
  49. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
  50. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +6 -4
  51. package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  52. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +22 -10
  53. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +27 -5
  54. package/lib/cjs/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
  55. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +110 -2
  56. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +4 -1
  57. package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
  58. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
  59. package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +51 -73
  60. package/lib/cjs/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  61. package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  62. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +14 -0
  63. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +25 -48
  64. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
  65. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -1
  66. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
  67. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
  68. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
  69. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +10 -0
  70. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +10 -0
  71. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +117 -0
  72. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
  73. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
  74. package/lib/cjs/contexts/common/ConversationState.js +4 -2
  75. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +13 -8
  76. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +19 -5
  77. package/lib/cjs/contexts/createReducer.js +39 -12
  78. package/lib/cjs/controller/componentController.js +5 -5
  79. package/lib/cjs/plugins/newMessageEventHandler.js +99 -0
  80. package/lib/esm/assets/Audios.js +1 -0
  81. package/lib/esm/assets/Icons.js +11 -0
  82. package/lib/esm/common/Constants.js +50 -3
  83. package/lib/esm/common/contextDataStore/DataStoreManager.js +5 -0
  84. package/lib/esm/common/interfaces/IContextDataStore.js +1 -0
  85. package/lib/esm/common/storage/default/defaultCacheManager.js +19 -0
  86. package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +102 -0
  87. package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +71 -0
  88. package/lib/esm/common/telemetry/TelemetryConstants.js +70 -4
  89. package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
  90. package/lib/esm/common/telemetry/TelemetryManager.js +15 -6
  91. package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
  92. package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
  93. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +55 -17
  94. package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -5
  95. package/lib/esm/common/utils.js +64 -1
  96. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
  97. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -7
  98. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +11 -54
  99. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +6 -6
  100. package/lib/esm/components/footerstateful/FooterStateful.js +9 -18
  101. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
  102. package/lib/esm/components/headerstateful/HeaderStateful.js +24 -14
  103. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +34 -0
  104. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +14 -0
  105. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
  106. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +29 -0
  107. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +59 -0
  108. package/lib/esm/components/livechatwidget/common/Deferred.js +33 -0
  109. package/lib/esm/components/livechatwidget/common/authHelper.js +50 -0
  110. package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -2
  111. package/lib/esm/components/livechatwidget/common/createFooter.js +4 -15
  112. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +8 -0
  113. package/lib/esm/components/livechatwidget/common/createMarkdown.js +32 -31
  114. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +77 -41
  115. package/lib/esm/components/livechatwidget/common/endChat.js +139 -46
  116. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +3 -0
  117. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +42 -13
  118. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +134 -41
  119. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +10 -4
  120. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +19 -22
  121. package/lib/esm/components/livechatwidget/common/shareObservable.js +38 -0
  122. package/lib/esm/components/livechatwidget/common/startChat.js +195 -39
  123. package/lib/esm/components/livechatwidget/common/startProactiveChat.js +5 -5
  124. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +318 -82
  125. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +1 -1
  126. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -0
  127. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
  128. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +5 -4
  129. package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  130. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +22 -10
  131. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +26 -6
  132. package/lib/esm/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.js +1 -0
  133. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +97 -2
  134. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
  135. package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
  136. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
  137. package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +2 -12
  138. package/lib/esm/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.js +1 -0
  139. package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
  140. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
  141. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +23 -46
  142. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
  143. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
  144. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
  145. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
  146. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
  147. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +3 -0
  148. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +3 -0
  149. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +107 -0
  150. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
  151. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
  152. package/lib/esm/contexts/common/ConversationState.js +4 -2
  153. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +13 -8
  154. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +17 -5
  155. package/lib/esm/contexts/createReducer.js +39 -11
  156. package/lib/esm/controller/componentController.js +5 -5
  157. package/lib/esm/plugins/newMessageEventHandler.js +82 -0
  158. package/lib/types/assets/Audios.d.ts +1 -0
  159. package/lib/types/assets/Icons.d.ts +11 -0
  160. package/lib/types/common/Constants.d.ts +27 -1
  161. package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -0
  162. package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -0
  163. package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
  164. package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
  165. package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
  166. package/lib/types/common/telemetry/TelemetryConstants.d.ts +48 -2
  167. package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
  168. package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
  169. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
  170. package/lib/types/common/utils.d.ts +8 -1
  171. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
  172. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
  173. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +5 -1
  174. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
  175. package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
  176. package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
  177. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
  178. package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
  179. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
  180. package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
  181. package/lib/types/components/livechatwidget/common/endChat.d.ts +4 -1
  182. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -2
  183. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +1 -1
  184. package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
  185. package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
  186. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +2 -1
  187. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
  188. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
  189. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +5 -2
  190. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
  191. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
  192. package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +1 -1
  193. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -0
  194. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -1
  195. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
  196. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +2 -0
  197. package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +1 -1
  198. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
  199. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
  200. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +4 -1
  201. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
  202. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
  203. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +0 -1
  204. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
  205. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
  206. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
  207. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
  208. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -0
  209. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -0
  210. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +5 -0
  211. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
  212. package/lib/types/contexts/common/ConversationState.d.ts +4 -2
  213. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +5 -2
  214. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +14 -9
  215. package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
  216. package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
  217. package/package.json +14 -13
  218. package/lib/cjs/assets/audios/newMessageNotification.mp3 +0 -0
  219. package/lib/cjs/assets/icons/archiveIcon.svg +0 -3
  220. package/lib/cjs/assets/icons/audioIcon.svg +0 -6
  221. package/lib/cjs/assets/icons/blankIcon.svg +0 -6
  222. package/lib/cjs/assets/icons/excelIcon.svg +0 -6
  223. package/lib/cjs/assets/icons/imageIcon.svg +0 -6
  224. package/lib/cjs/assets/icons/oneNoteIcon.svg +0 -6
  225. package/lib/cjs/assets/icons/pdfIcon.svg +0 -6
  226. package/lib/cjs/assets/icons/powerpointIcon.svg +0 -6
  227. package/lib/cjs/assets/icons/videoIcon.svg +0 -6
  228. package/lib/cjs/assets/icons/visioIcon.svg +0 -6
  229. package/lib/cjs/assets/icons/wordIcon.svg +0 -6
  230. package/lib/esm/assets/assets.d.js +0 -0
  231. package/lib/esm/assets/audios/newMessageNotification.mp3 +0 -0
  232. package/lib/esm/assets/icons/archiveIcon.svg +0 -3
  233. package/lib/esm/assets/icons/audioIcon.svg +0 -6
  234. package/lib/esm/assets/icons/blankIcon.svg +0 -6
  235. package/lib/esm/assets/icons/excelIcon.svg +0 -6
  236. package/lib/esm/assets/icons/imageIcon.svg +0 -6
  237. package/lib/esm/assets/icons/oneNoteIcon.svg +0 -6
  238. package/lib/esm/assets/icons/pdfIcon.svg +0 -6
  239. package/lib/esm/assets/icons/powerpointIcon.svg +0 -6
  240. package/lib/esm/assets/icons/videoIcon.svg +0 -6
  241. package/lib/esm/assets/icons/visioIcon.svg +0 -6
  242. package/lib/esm/assets/icons/wordIcon.svg +0 -6
@@ -1,7 +1,11 @@
1
1
  export declare class Constants {
2
+ static readonly magicCodeBroadcastChannel = "MagicCodeChannel";
3
+ static readonly magicCodeResponseBroadcastChannel = "MagicCodeResponseChannel";
2
4
  static readonly systemMessageTag = "system";
3
5
  static readonly userMessageTag = "user";
6
+ static readonly historyMessageTag = "history";
4
7
  static readonly agentEndConversationMessageTag = "agentendconversation";
8
+ static readonly supervisorForceCloseMessageTag = "supervisorforceclosedconversation";
5
9
  static readonly receivedMessageClassName = "ms_lcw_webchat_received_message";
6
10
  static readonly sentMessageClassName = "ms_lcw_webchat_sent_message";
7
11
  static readonly webchatChannelId = "webchat";
@@ -30,6 +34,10 @@ export declare class Constants {
30
34
  static readonly queuePositionMessageTag = "queueposition";
31
35
  static readonly averageWaitTimeMessageTag = "averagewaittime";
32
36
  static readonly message = "message";
37
+ static readonly hiddenTag = "Hidden";
38
+ static readonly prefixTimestampTag = "ServerMessageTimestamp_";
39
+ static readonly acsChannel = "ACS_CHANNEL";
40
+ static readonly publicMessageTag = "public";
33
41
  static readonly supportedAdaptiveCardContentTypes: Array<string>;
34
42
  static readonly maxUploadFileSize = "500000";
35
43
  static readonly imageRegex: RegExp;
@@ -55,7 +63,6 @@ export declare class Constants {
55
63
  static readonly ProactiveChatInviteTimeoutInMs = 60000;
56
64
  static readonly InputSubmit = "InputSubmit";
57
65
  static readonly ReconnectIdAttributeName = "oc.reconnectid";
58
- static readonly redirectPageRequest = "redirectPageRequest";
59
66
  static readonly LiveChatWidget = "LiveChatWidgetNew";
60
67
  static readonly GuidPattern = "xx-x-4m-ym-xxx";
61
68
  static readonly Default = "default";
@@ -68,6 +75,9 @@ export declare class Constants {
68
75
  static readonly OpenLinkIconCssClass = "webchat__markdown__external-link-icon";
69
76
  static readonly internetConnectionTestUrl = "https://ocsdk-prod.azureedge.net/public/connecttest.txt";
70
77
  static readonly internetConnectionTestUrlText = "Omnichannel Connect Test";
78
+ static readonly ChatWidgetStateChangedPrefix = "ChatWidgetStateChanged";
79
+ static readonly PostChatLoadingDurationInMs = 2000;
80
+ static readonly BrowserUnloadConfirmationMessage = "Do you want to leave chat?";
71
81
  }
72
82
  export declare const Regex: {
73
83
  new (): {};
@@ -134,6 +144,12 @@ export declare enum ElementType {
134
144
  export declare enum ChatSDKError {
135
145
  WidgetUseOutsideOperatingHour = "WidgetUseOutsideOperatingHour"
136
146
  }
147
+ export declare enum EnvironmentVersion {
148
+ prod = "prod",
149
+ dogfood = "df",
150
+ int = "int",
151
+ test = "test"
152
+ }
137
153
  export declare class TranscriptConstants {
138
154
  static readonly ChatTranscriptsBodyColor = "#F5F5F5";
139
155
  static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
@@ -146,3 +162,13 @@ export declare class TranscriptConstants {
146
162
  static readonly AgentDialogColor = "#2266E3";
147
163
  static readonly AgentFontColor = "white";
148
164
  }
165
+ export declare class AriaTelemetryConstants {
166
+ static readonly GERMANY_ENDPOINT: string;
167
+ static readonly GCCH_ENDPOINT: string;
168
+ static readonly DOD_ENDPOINT: string;
169
+ static readonly EUROPE_ENDPOINT: string;
170
+ static readonly MOONCAKE_ENDPOINT: string;
171
+ static readonly Public: string;
172
+ static readonly EU: string;
173
+ static readonly lcwEUDomainNames: Array<string>;
174
+ }
@@ -0,0 +1,4 @@
1
+ import { IContextDataStore } from "../interfaces/IContextDataStore";
2
+ export declare class DataStoreManager {
3
+ static clientDataStore?: IContextDataStore;
4
+ }
@@ -0,0 +1,14 @@
1
+ export interface IContextDataStore {
2
+ /**
3
+ * getData: Get data from data store
4
+ */
5
+ getData: (key: string, type: string) => any;
6
+ /**
7
+ * setData: Set data to data store
8
+ */
9
+ setData: (key: string, value: any, type: string) => void;
10
+ /**
11
+ * removeData: Remove data from data store by key
12
+ */
13
+ removeData: (key: string, type: string) => void;
14
+ }
@@ -0,0 +1,4 @@
1
+ export declare class defaultCacheManager {
2
+ static InternalCache: any;
3
+ }
4
+ export declare const registerBroadcastServiceForLocalStorage: (orgid: string, widgetId: string, widgetInstanceId: string) => void;
@@ -0,0 +1,2 @@
1
+ import { IContextDataStore } from "../../interfaces/IContextDataStore";
2
+ export declare const defaultClientDataStoreProvider: () => IContextDataStore;
@@ -0,0 +1,6 @@
1
+ export declare const defaultInitializeInMemoryDataStore: (widgetId: string) => void;
2
+ export declare const inMemoryDataStore: () => {
3
+ getData: (key: string) => any;
4
+ setData: (key: any, data: any) => void;
5
+ removeData: (key: string) => void;
6
+ };
@@ -17,6 +17,32 @@ export declare enum LogLevel {
17
17
  WARN = "WARN",
18
18
  ERROR = "ERROR"
19
19
  }
20
+ export declare enum BroadcastEvent {
21
+ LoadPostChatSurvey = "LoadPostChatSurvey",
22
+ ChatEnded = "ChatEnded",
23
+ NewMessageNotification = "NewMessageNotification",
24
+ UnreadMessageCount = "UnreadMessageCount",
25
+ StartProactiveChat = "StartProactiveChat",
26
+ ProactiveChatStartChat = "ProactiveChatStartChat",
27
+ ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
28
+ ProactiveChatIsInPopoutMode = "ProactiveChatIsInPopoutMode",
29
+ ResetProactiveChatParams = "ResetProactiveChatParams",
30
+ InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
31
+ NewMessageSent = "NewMessageSent",
32
+ NewMessageReceived = "NewMessageReceived",
33
+ RedirectPageRequest = "RedirectPageRequest",
34
+ StartChat = "StartChat",
35
+ StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
36
+ StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
37
+ InitiateEndChat = "InitiateEndChat",
38
+ SetCustomContext = "SetCustomContext",
39
+ ChatRetrievedFromCache = "ChatRetrievedFromCache",
40
+ MaximizeChat = "MaximizeChat",
41
+ ChatInitiated = "ChatInitiated",
42
+ CloseChat = "CloseChat",
43
+ InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
44
+ ClosePopoutWindow = "ClosePopoutWindow"
45
+ }
20
46
  export declare enum TelemetryEvent {
21
47
  CallAdded = "CallAdded",
22
48
  LocalVideoStreamAdded = "LocalVideoStreamAdded",
@@ -53,6 +79,8 @@ export declare enum TelemetryEvent {
53
79
  PostChatContextCallSucceed = "PostChatContextCallSucceed",
54
80
  PostChatContextCallFailed = "PostChatContextCallFailed",
55
81
  ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
82
+ ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
83
+ InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
56
84
  WebChatLoaded = "WebChatLoaded",
57
85
  LCWChatButtonClicked = "LCWChatButtonClicked",
58
86
  LCWChatButtonShow = "LCWChatButtonShow",
@@ -63,7 +91,10 @@ export declare enum TelemetryEvent {
63
91
  PrechatSurveyLoaded = "PrechatSurveyLoaded",
64
92
  PrechatSubmitted = "PrechatSubmitted",
65
93
  StartChatSDKCall = "StartChatCall",
66
- EndChatSDKCall = "EndChatCall",
94
+ StartChatEventRecevied = "StartChatEventReceived",
95
+ EndChatSDKCall = "EndChatSDKCall",
96
+ EndChatEventReceived = "EndChatEventReceived",
97
+ WindowClosed = "WindowClosed",
67
98
  OnNewMessageFailed = "OnNewMessageFailed",
68
99
  OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
69
100
  DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
@@ -77,6 +108,7 @@ export declare enum TelemetryEvent {
77
108
  LoadingPaneLoaded = "LoadingPaneLoaded",
78
109
  EmailTranscriptLoaded = "EmailTranscriptLoaded",
79
110
  OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
111
+ PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
80
112
  PostChatSurveyLoaded = "PostChatSurveyLoaded",
81
113
  ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
82
114
  ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
@@ -87,6 +119,12 @@ export declare enum TelemetryEvent {
87
119
  EmailTranscriptButtonClicked = "EmailTranscriptButtonClicked",
88
120
  EmailTranscriptCancelButtonClicked = "EmailTranscriptCancelButtonClicked",
89
121
  AudioToggleButtonClicked = "AudioToggleButtonClicked",
122
+ SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
123
+ SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
124
+ GetConversationDetailsException = "GetConversationDetailsException",
125
+ BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
126
+ GetAuthTokenCalled = "GetAuthTokenCalled",
127
+ ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
90
128
  ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
91
129
  ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
92
130
  FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
@@ -98,7 +136,10 @@ export declare enum TelemetryEvent {
98
136
  InvalidConfiguration = "InvalidConfiguration",
99
137
  SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
100
138
  SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
139
+ WebChatEvent = "WebChatEvent",
101
140
  PreChatSurveyStartChatMethodFailed = "PreChatSurveyStartChatMethodFailed",
141
+ ChatAlreadyTriggered = "ChatAlreadyTriggered",
142
+ StartProactiveChatEventReceived = "StartProactiveChatEventReceived",
102
143
  StartProactiveChatMethodFailed = "StartProactiveChatMethodFailed",
103
144
  ProactiveChatAccepted = "ProactiveChatAccepted",
104
145
  ProactiveChatRejected = "ProactiveChatRejected",
@@ -107,11 +148,16 @@ export declare enum TelemetryEvent {
107
148
  ReconnectChatContinueConversation = "ReconnectChatContinueConversation",
108
149
  ReconnectChatStartNewConversation = "ReconnectChatStartNewConversation",
109
150
  ReconnectChatMinimize = "ReconnectChatMinimize",
110
- ChatWidgetStateChanged = "ChatWidgetStateChanged"
151
+ MessageSent = "MessageSent",
152
+ MessageReceived = "MessageReceived",
153
+ CustomContextReceived = "CustomContextReceived",
154
+ NetworkDisconnected = "NetworkDisconnected",
155
+ NetworkReconnected = "NetworkReconnected"
111
156
  }
112
157
  export interface TelemetryInput {
113
158
  scenarioType: ScenarioType;
114
159
  payload: TelemetryData;
160
+ telemetryInfo?: any;
115
161
  }
116
162
  export declare class TelemetryConstants {
117
163
  private static map;
@@ -11,6 +11,7 @@ export interface TelemetryEventWrapper {
11
11
  Description?: string;
12
12
  ExceptionDetails?: any;
13
13
  ElapsedTimeInMilliseconds?: number;
14
+ Data?: any;
14
15
  }
15
16
  export declare class TelemetryHelper {
16
17
  static callId: string;
@@ -35,4 +36,5 @@ export declare class TelemetryHelper {
35
36
  static logActionEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
36
37
  static logSDKEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
37
38
  static logConfigDataEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
39
+ static logWebChatEvent: (logLevel: LogLevel, payload: TelemetryEventWrapper) => void;
38
40
  }
@@ -1,4 +1,7 @@
1
- export interface ConfigValidationTelemetryData {
1
+ export interface BaseTelemetryData {
2
+ Data?: any;
3
+ }
4
+ export interface ConfigValidationTelemetryData extends BaseTelemetryData {
2
5
  Event?: string;
3
6
  RequestId?: string;
4
7
  LCWVersion?: string;
@@ -8,7 +11,7 @@ export interface ConfigValidationTelemetryData {
8
11
  ExceptionDetails?: object;
9
12
  Domain?: string;
10
13
  }
11
- export interface LoadTelemetryData {
14
+ export interface LoadTelemetryData extends BaseTelemetryData {
12
15
  Event?: string;
13
16
  ResourcePath?: string;
14
17
  ElapsedTimeInMilliseconds?: number;
@@ -20,18 +23,18 @@ export interface LoadTelemetryData {
20
23
  OCChatWidgetVersion?: string;
21
24
  OCChatComponentsVersion?: string;
22
25
  }
23
- export interface MessageProcessingErrorData {
26
+ export interface MessageProcessingErrorData extends BaseTelemetryData {
24
27
  Event: string;
25
28
  ExceptionDetails: object;
26
29
  }
27
- export interface OCChatSDKTelemetryData {
30
+ export interface OCChatSDKTelemetryData extends BaseTelemetryData {
28
31
  RequestId: string;
29
32
  Event?: string;
30
33
  ElapsedTimeInMilliseconds?: number;
31
34
  TransactionId: string;
32
35
  ExceptionDetails?: object;
33
36
  }
34
- export interface IC3ClientTelemetryData {
37
+ export interface IC3ClientTelemetryData extends BaseTelemetryData {
35
38
  SubscriptionId?: string;
36
39
  EndpointUrl?: string;
37
40
  EndpointId?: string;
@@ -42,7 +45,7 @@ export interface IC3ClientTelemetryData {
42
45
  ShouldBubbleToHost?: boolean;
43
46
  Description?: string;
44
47
  }
45
- export interface WebChatTelemetryData {
48
+ export interface WebChatTelemetryData extends BaseTelemetryData {
46
49
  data?: any;
47
50
  dimensions?: any;
48
51
  duration?: number;
@@ -53,7 +56,7 @@ export interface WebChatTelemetryData {
53
56
  name?: string;
54
57
  type?: string;
55
58
  }
56
- export interface ACSAdapterTelemetryData {
59
+ export interface ACSAdapterTelemetryData extends BaseTelemetryData {
57
60
  Description?: string;
58
61
  ACSUserId?: string;
59
62
  ChatThreadId?: string;
@@ -63,14 +66,14 @@ export interface ACSAdapterTelemetryData {
63
66
  ErrorCode?: string;
64
67
  ExceptionDetails?: any;
65
68
  }
66
- export interface ActionTelemetryData {
69
+ export interface ActionTelemetryData extends BaseTelemetryData {
67
70
  Event?: string;
68
71
  ElapsedTimeInMilliseconds?: number;
69
72
  ActionType?: string;
70
73
  ExceptionDetails?: object;
71
74
  Description?: string;
72
75
  }
73
- export interface CallingTelemetryData {
76
+ export interface CallingTelemetryData extends BaseTelemetryData {
74
77
  CallId?: string;
75
78
  Event?: string;
76
79
  ElapsedTimeInMilliseconds?: number;
@@ -32,13 +32,13 @@ export interface ITelemetryConfig {
32
32
  /**
33
33
  * Omnichannel chat widget version
34
34
  */
35
- chatWidgetVersion?: string;
35
+ chatWidgetVersion: string;
36
36
  /**
37
37
  * Omnichannel chat components version
38
38
  */
39
- chatComponentVersion?: string;
39
+ chatComponentVersion: string;
40
40
  /**
41
41
  * Omnichannel Chat SDK Version
42
42
  */
43
- OCChatSDKVersion?: string;
43
+ OCChatSDKVersion: string;
44
44
  }
@@ -18,6 +18,13 @@ export declare const extractPreChatSurveyResponseValues: (preChatSurvey: string,
18
18
  value: string;
19
19
  }[]) => {};
20
20
  export declare const isNullOrUndefined: (obj: any) => boolean;
21
- export declare const isNullOrEmptyString: (s: string) => boolean;
21
+ export declare const isNullOrEmptyString: (s: string | null) => boolean;
22
22
  export declare const newGuid: () => string;
23
23
  export declare const createTimer: () => ITimer;
24
+ export declare const getDomain: (hostValue: any) => string;
25
+ export declare const getWidgetCacheId: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
26
+ export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
27
+ export declare const getStateFromCache: (orgId: string, widgetId: string, widgetInstanceId: string) => any;
28
+ export declare const isUndefinedOrEmpty: (object: any) => boolean;
29
+ export declare const addDelayInMs: (ms: number) => Promise<void>;
30
+ export declare const getBroadcastChannelName: (widgetId: string, widgetInstanceId: string) => string;
@@ -1,3 +1,4 @@
1
+ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
1
2
  import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
2
3
  export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
3
4
  /**
@@ -5,7 +6,9 @@ export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatef
5
6
  */
6
7
  setPostChatContext: () => Promise<void>;
7
8
  /**
8
- * endChat: Internal Prop injected for triggering end of a chat using chatSDK
9
+ * prepareEndChat: Internal Prop injected for checking PostChat contexts and trigerring end of chat
10
+ * @param adapter : The chat adapter for the live chat session
11
+ * @param state : The chat state where the conversation is currently in
9
12
  */
10
- endChat: (adapter: any) => Promise<void>;
13
+ prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
11
14
  }
@@ -1,5 +1,4 @@
1
1
  export interface IAudioNotificationStatefulParams {
2
2
  audioSrc?: string;
3
- hideAudioNotificationButton?: boolean;
4
3
  isAudioMuted?: boolean;
5
4
  }
@@ -12,6 +12,10 @@ export interface IHeaderStatefulParams {
12
12
  outOfOfficeHeaderProps?: IHeaderProps;
13
13
  /**
14
14
  * endChat: Internal Prop injected for triggering end of a chat using chatSDK
15
+ * @param adapter : The chat adapter for the live chat session
16
+ * @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
17
+ * @param skipCloseChat : If set to true endchat will skip closing the live chat instance
18
+ * @param postMessageToOtherTab : If set to true endchat will send a message to other tabs(multi-tabs)
15
19
  */
16
- endChat: (adapter: any) => Promise<void>;
20
+ endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
17
21
  }
@@ -0,0 +1,14 @@
1
+ export declare class ActivityStreamHandler {
2
+ static restoreDeferred: any;
3
+ static restorePromise: Promise<any>;
4
+ /**
5
+ * Use of a deferred pattern, to hold the execution of the activity.
6
+ *
7
+ * */
8
+ static cork(): void;
9
+ /**
10
+ * Resolve the promise, releasing it to continue with the execution of the activity.
11
+ *
12
+ * */
13
+ static uncork(): void;
14
+ }
@@ -0,0 +1,5 @@
1
+ import { IActivitySubscriber } from "./IActivitySubscriber";
2
+ export declare class DefaultActivitySubscriber implements IActivitySubscriber {
3
+ observer: any;
4
+ next(activity: any): Promise<boolean>;
5
+ }
@@ -0,0 +1,6 @@
1
+ export interface IActivitySubscriber {
2
+ observer: any;
3
+ next(activity: any): Promise<any>;
4
+ applicable?(activity: any): boolean;
5
+ apply?(activity: any): Promise<any>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { IActivitySubscriber } from "./IActivitySubscriber";
2
+ export declare class PauseActivitySubscriber implements IActivitySubscriber {
3
+ observer: any;
4
+ apply(activity: any): Promise<void>;
5
+ applicable(activity: any): boolean;
6
+ next(activity: any): Promise<any>;
7
+ }
@@ -0,0 +1,7 @@
1
+ export declare class ChatAdapterShim {
2
+ chatAdapter: any;
3
+ activityObserver: any;
4
+ private subscribers;
5
+ constructor(chatAdapter: any);
6
+ addSubscriber(subscriber: any): void;
7
+ }
@@ -0,0 +1,9 @@
1
+ export declare class Deferred<T> {
2
+ private _promise;
3
+ private _resolve;
4
+ private _reject;
5
+ constructor();
6
+ resolve: (value?: any | PromiseLike<T>) => void;
7
+ reject: (value?: any | PromiseLike<T>) => void;
8
+ get promise(): Promise<T>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
2
+ declare const getAuthClientFunction: (chatConfig: ChatConfig | undefined) => string | undefined;
3
+ declare const handleAuthentication: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined) => Promise<boolean>;
4
+ declare const removeAuthTokenProvider: (chatSDK: any) => void;
5
+ export { getAuthClientFunction, handleAuthentication, removeAuthTokenProvider };
@@ -1,4 +1,7 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
3
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
4
- export declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any) => Promise<void>;
4
+ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
+ declare const prepareEndChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
6
+ declare const endChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, skipEndChatSDK?: boolean | undefined, skipCloseChat?: boolean | undefined, postMessageToOtherTab?: boolean | undefined) => Promise<void>;
7
+ export { prepareEndChat, endChat };
@@ -1,7 +1,11 @@
1
1
  import "regenerator-runtime/runtime";
2
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
2
3
  import { Dispatch } from "react";
3
4
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
4
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
6
+ declare const getChatReconnectContext: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, isReconnectEnabled?: boolean | undefined, reconnectId?: string | undefined) => Promise<any>;
5
7
  declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
6
- declare const handleUnauthenticatedReconnectChat: (dispatch: Dispatch<ILiveChatWidgetAction>, reconnectId: string, initStartChat: any) => Promise<void>;
7
- export { getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat };
8
+ declare const handleUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any, redirectInSameWindow: boolean | undefined) => Promise<void>;
9
+ declare const startUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isReconnectEnabled: boolean | undefined, reconnectId: string, initStartChat: any) => Promise<void>;
10
+ declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, isReconnectEnabled: boolean | undefined, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
11
+ export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
@@ -1,3 +1,3 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
- export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, loadSurvey: boolean) => Promise<void>;
3
+ export declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function shareObservable(observable: any): any;
@@ -1,7 +1,9 @@
1
+ import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
1
2
  import { Dispatch } from "react";
2
3
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
4
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
6
  declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
6
- declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any) => Promise<void>;
7
- export { prepareStartChat, initStartChat };
7
+ declare const setPreChatAndInitiateChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined) => Promise<void>;
8
+ declare const initStartChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, params?: any, persistedState?: any) => Promise<void>;
9
+ export { prepareStartChat, initStartChat, setPreChatAndInitiateChat };
@@ -1,3 +1,4 @@
1
1
  import { Dispatch } from "react";
2
2
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
3
- export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, bodyTitle?: string | undefined, showPrechat?: boolean | undefined, inNewWindow?: boolean | undefined) => void;
3
+ import { IProactiveChatNotificationConfig } from "../../proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig";
4
+ export declare const startProactiveChat: (dispatch: Dispatch<ILiveChatWidgetAction>, notificationConfig?: IProactiveChatNotificationConfig | undefined, enablePreChat?: boolean | undefined, inNewWindow?: boolean | undefined) => void;
@@ -9,6 +9,7 @@ export interface ILiveChatWidgetComponentOverrides {
9
9
  outOfOfficeHoursPane?: ReactNode | string;
10
10
  postChatLoadingPane?: ReactNode | string;
11
11
  postChatSurveyPane?: ReactNode | string;
12
+ preChatSurveyPane?: ReactNode | string;
12
13
  proactiveChatPane?: ReactNode | string;
13
14
  reconnectChatPane?: ReactNode | string;
14
15
  webChatContainer?: ReactNode | string;
@@ -14,4 +14,5 @@ export interface ILiveChatWidgetControlProps {
14
14
  hideReconnectChatPane?: boolean;
15
15
  hideWebChatContainer?: boolean;
16
16
  skipChatButtonRendering?: boolean;
17
+ widgetInstanceId?: string | undefined;
17
18
  }
@@ -12,7 +12,6 @@ import { ILiveChatWidgetControlProps } from "./ILiveChatWidgetControlProps";
12
12
  import { ILiveChatWidgetStyleProps } from "./ILiveChatWidgetStyleProps";
13
13
  import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/loadingpane/interfaces/ILoadingPaneProps";
14
14
  import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
15
- import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
16
15
  import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
17
16
  import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
18
17
  import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
@@ -20,6 +19,8 @@ import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetr
20
19
  import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
21
20
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
22
21
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
22
+ import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
23
+ import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
23
24
  export interface ILiveChatWidgetProps {
24
25
  audioNotificationProps?: IAudioNotificationProps;
25
26
  callingContainerProps?: ICallingContainerProps;
@@ -39,7 +40,7 @@ export interface ILiveChatWidgetProps {
39
40
  outOfOfficeHeaderProps?: IHeaderProps;
40
41
  outOfOfficeHoursPaneProps?: IOOOHPaneProps;
41
42
  postChatLoadingPaneProps?: ILoadingPaneProps;
42
- postChatSurveyPaneProps?: IPostChatSurveyPaneProps;
43
+ postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
43
44
  preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
44
45
  proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
45
46
  reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
@@ -47,4 +48,6 @@ export interface ILiveChatWidgetProps {
47
48
  telemetryConfig: ITelemetryConfig;
48
49
  webChatContainerProps?: IWebChatContainerStatefulProps;
49
50
  liveChatContextFromCache?: ILiveChatWidgetContext;
51
+ contextDataStore?: IContextDataStore;
52
+ getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
50
53
  }
@@ -1,3 +1,3 @@
1
- import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
2
- export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneProps) => JSX.Element;
1
+ import { IPostChatSurveyPaneStatefulProps } from "./interfaces/IPostChatSurveyPaneStatefulProps";
2
+ export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneStatefulProps) => JSX.Element;
3
3
  export default PostChatSurveyPaneStateful;
@@ -0,0 +1,4 @@
1
+ import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
2
+ export interface IPostChatSurveyPaneStatefulProps extends IPostChatSurveyPaneProps {
3
+ isCustomerVoiceSurveyCompact?: boolean;
4
+ }
@@ -1,5 +1,5 @@
1
1
  import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
2
2
  export interface IPreChatSurveyPaneStatefulParams {
3
3
  surveyProps?: IPreChatSurveyPaneProps;
4
- initStartChat: (params?: any) => Promise<void>;
4
+ initStartChat: (params?: any, persistedState?: any) => Promise<void>;
5
5
  }
@@ -0,0 +1,3 @@
1
+ export interface IProactiveChatNotificationConfig {
2
+ message?: string;
3
+ }
@@ -1,6 +1,6 @@
1
1
  import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
2
2
  export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
3
- authClientFunction?: string;
4
3
  isReconnectEnabled?: boolean;
5
4
  reconnectId?: string;
5
+ redirectInSameWindow?: boolean;
6
6
  }
@@ -0,0 +1,2 @@
1
+ import { IAdaptiveCardStyles } from "../../interfaces/IAdaptiveCardStyles";
2
+ export declare const defaultAdaptiveCardStyles: IAdaptiveCardStyles;
@@ -1,8 +1,10 @@
1
1
  import MockAdapter from "./mockadapter";
2
2
  export declare class MockChatSDK {
3
3
  protected sleep: (ms: any) => Promise<unknown>;
4
+ isMockModeOn: boolean;
4
5
  startChat(): Promise<void>;
5
6
  endChat(): null;
7
+ getChatToken(): null;
6
8
  createChatAdapter(): MockAdapter;
7
9
  getPreChatSurvey(parseToJson: boolean): string;
8
10
  getConversationDetails(): {};
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @param extension File extension
5
5
  */
6
- export declare const getFileAttachmentIconData: (extension: string) => any;
6
+ export declare const getFileAttachmentIconData: (extension: string) => unknown;
7
7
  export declare const isInlineMediaSupported: (attachmentName: string) => boolean;
@@ -0,0 +1,4 @@
1
+ export interface IAdaptiveCardStyles {
2
+ background?: string;
3
+ color?: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface IBotMagicCodeConfig {
2
+ disabled?: boolean;
3
+ fwdUrl?: string;
4
+ }