@microsoft/omnichannel-chat-widget 0.1.0-main.a27ec4b → 0.1.0-main.a2e5071

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 (264) hide show
  1. package/lib/cjs/common/Constants.js +17 -168
  2. package/lib/cjs/common/KeyCodes.js +0 -3
  3. package/lib/cjs/common/contextDataStore/DataStoreManager.js +0 -4
  4. package/lib/cjs/common/storage/default/defaultCacheManager.js +0 -10
  5. package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +4 -16
  6. package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +2 -10
  7. package/lib/cjs/common/telemetry/TelemetryConstants.js +22 -23
  8. package/lib/cjs/common/telemetry/TelemetryHelper.js +16 -57
  9. package/lib/cjs/common/telemetry/TelemetryManager.js +0 -31
  10. package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +0 -2
  11. package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +30 -36
  12. package/lib/cjs/common/telemetry/loggers/consoleLogger.js +0 -9
  13. package/lib/cjs/common/utils.js +18 -105
  14. package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +8 -46
  15. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +2 -24
  16. package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
  17. package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -32
  18. package/lib/cjs/components/dimlayer/DimLayer.js +0 -4
  19. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -36
  20. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -8
  21. package/lib/cjs/components/footerstateful/FooterStateful.js +10 -34
  22. package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +0 -6
  23. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +7 -45
  24. package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -8
  25. package/lib/cjs/components/headerstateful/HeaderStateful.js +12 -27
  26. package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -14
  27. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +2 -9
  28. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +0 -5
  29. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +4 -11
  30. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +11 -19
  31. package/lib/cjs/components/livechatwidget/common/Deferred.js +3 -10
  32. package/lib/cjs/components/livechatwidget/common/authHelper.js +4 -19
  33. package/lib/cjs/components/livechatwidget/common/createAdapter.js +2 -13
  34. package/lib/cjs/components/livechatwidget/common/createFooter.js +0 -10
  35. package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +2 -14
  36. package/lib/cjs/components/livechatwidget/common/createMarkdown.js +16 -24
  37. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +14 -0
  38. package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +41 -35
  39. package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +0 -3
  40. package/lib/cjs/components/livechatwidget/common/endChat.js +30 -33
  41. package/lib/cjs/components/livechatwidget/common/getGeneralStylesForButton.js +0 -6
  42. package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +7 -16
  43. package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -8
  44. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +16 -54
  45. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +80 -150
  46. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +4 -17
  47. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +2 -11
  48. package/lib/cjs/components/livechatwidget/common/shareObservable.js +4 -8
  49. package/lib/cjs/components/livechatwidget/common/startChat.js +126 -109
  50. package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +0 -8
  51. package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +2 -11
  52. package/lib/cjs/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
  53. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +201 -256
  54. package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +4 -17
  55. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +4 -17
  56. package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -17
  57. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +32 -23
  58. package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  59. package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +13 -0
  60. package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  61. package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  62. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -37
  63. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +2 -32
  64. package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -24
  65. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +19 -38
  66. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +0 -7
  67. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -6
  68. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +9 -26
  69. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +2 -17
  70. package/lib/cjs/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -24
  71. package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +3 -15
  72. package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -8
  73. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +0 -4
  74. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +0 -4
  75. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  76. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  77. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  78. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  79. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  80. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  81. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  82. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  83. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +0 -7
  84. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -5
  85. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +17 -41
  86. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +8 -19
  87. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +23 -60
  88. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +7 -15
  89. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +2 -13
  90. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -16
  91. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +10 -0
  92. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
  93. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
  94. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +10 -0
  95. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -9
  96. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +2 -30
  97. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +2 -12
  98. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +6 -28
  99. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +2 -11
  100. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +13 -30
  101. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -9
  102. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -34
  103. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -10
  104. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +1 -12
  105. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -19
  106. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +1 -9
  107. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -9
  108. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +13 -34
  109. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +1 -10
  110. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +7 -11
  111. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +5 -14
  112. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -21
  113. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +0 -12
  114. package/lib/cjs/contexts/ChatAdapterStore.js +0 -2
  115. package/lib/cjs/contexts/ChatContextStore.js +0 -2
  116. package/lib/cjs/contexts/ChatSDKStore.js +0 -2
  117. package/lib/cjs/contexts/common/ConversationState.js +0 -1
  118. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +3 -3
  119. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +2 -11
  120. package/lib/cjs/contexts/createReducer.js +146 -108
  121. package/lib/cjs/controller/componentController.js +2 -31
  122. package/lib/cjs/hooks/useChatAdapterStore.js +0 -6
  123. package/lib/cjs/hooks/useChatContextStore.js +0 -6
  124. package/lib/cjs/hooks/useChatSDKStore.js +0 -6
  125. package/lib/cjs/index.js +0 -5
  126. package/lib/cjs/plugins/newMessageEventHandler.js +15 -36
  127. package/lib/esm/common/Constants.js +14 -155
  128. package/lib/esm/common/KeyCodes.js +0 -2
  129. package/lib/esm/common/contextDataStore/DataStoreManager.js +0 -2
  130. package/lib/esm/common/storage/default/defaultCacheManager.js +0 -3
  131. package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +4 -11
  132. package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +2 -3
  133. package/lib/esm/common/telemetry/TelemetryConstants.js +26 -20
  134. package/lib/esm/common/telemetry/TelemetryHelper.js +16 -45
  135. package/lib/esm/common/telemetry/TelemetryManager.js +0 -18
  136. package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +28 -24
  137. package/lib/esm/common/telemetry/loggers/consoleLogger.js +0 -5
  138. package/lib/esm/common/utils.js +18 -53
  139. package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +8 -17
  140. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +2 -7
  141. package/lib/esm/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
  142. package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +10 -13
  143. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -15
  144. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -6
  145. package/lib/esm/components/footerstateful/FooterStateful.js +12 -15
  146. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +7 -35
  147. package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -6
  148. package/lib/esm/components/headerstateful/HeaderStateful.js +12 -12
  149. package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -2
  150. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +2 -6
  151. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +0 -3
  152. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +4 -8
  153. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +11 -15
  154. package/lib/esm/components/livechatwidget/common/Deferred.js +3 -8
  155. package/lib/esm/components/livechatwidget/common/authHelper.js +4 -12
  156. package/lib/esm/components/livechatwidget/common/createAdapter.js +4 -6
  157. package/lib/esm/components/livechatwidget/common/createFooter.js +0 -1
  158. package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +2 -5
  159. package/lib/esm/components/livechatwidget/common/createMarkdown.js +18 -18
  160. package/lib/esm/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +7 -0
  161. package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +43 -22
  162. package/lib/esm/components/livechatwidget/common/endChat.js +32 -18
  163. package/lib/esm/components/livechatwidget/common/getGeneralStylesForButton.js +0 -2
  164. package/lib/esm/components/livechatwidget/common/initCallingSdk.js +9 -11
  165. package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -5
  166. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +18 -19
  167. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +79 -130
  168. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +4 -9
  169. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +4 -3
  170. package/lib/esm/components/livechatwidget/common/shareObservable.js +4 -7
  171. package/lib/esm/components/livechatwidget/common/startChat.js +126 -81
  172. package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +4 -2
  173. package/lib/esm/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
  174. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +203 -190
  175. package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +4 -5
  176. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +4 -5
  177. package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -5
  178. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +32 -11
  179. package/lib/esm/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
  180. package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +6 -0
  181. package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
  182. package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
  183. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +11 -21
  184. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +4 -8
  185. package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -6
  186. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +17 -11
  187. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
  188. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +9 -18
  189. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +2 -13
  190. package/lib/esm/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -16
  191. package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +3 -5
  192. package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -6
  193. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +0 -2
  194. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +0 -2
  195. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
  196. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
  197. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
  198. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
  199. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
  200. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
  201. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
  202. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
  203. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +2 -5
  204. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -4
  205. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +17 -26
  206. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +10 -11
  207. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +23 -38
  208. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +9 -8
  209. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +2 -9
  210. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -14
  211. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +3 -0
  212. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -1
  213. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -1
  214. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +3 -0
  215. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -7
  216. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +4 -28
  217. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +3 -3
  218. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +7 -14
  219. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +3 -3
  220. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +15 -19
  221. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +5 -8
  222. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -29
  223. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -7
  224. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +3 -8
  225. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -14
  226. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -7
  227. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -7
  228. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +15 -27
  229. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -5
  230. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +9 -9
  231. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +7 -9
  232. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -13
  233. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +0 -5
  234. package/lib/esm/contexts/ChatAdapterStore.js +2 -1
  235. package/lib/esm/contexts/ChatContextStore.js +2 -1
  236. package/lib/esm/contexts/ChatSDKStore.js +2 -1
  237. package/lib/esm/contexts/common/ConversationState.js +0 -1
  238. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +3 -3
  239. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +2 -5
  240. package/lib/esm/contexts/createReducer.js +146 -105
  241. package/lib/esm/controller/componentController.js +3 -2
  242. package/lib/esm/hooks/useChatAdapterStore.js +0 -4
  243. package/lib/esm/hooks/useChatContextStore.js +0 -4
  244. package/lib/esm/hooks/useChatSDKStore.js +0 -4
  245. package/lib/esm/plugins/newMessageEventHandler.js +15 -26
  246. package/lib/types/common/Constants.d.ts +12 -0
  247. package/lib/types/common/telemetry/TelemetryConstants.d.ts +11 -4
  248. package/lib/types/common/telemetry/definitions/Contracts.d.ts +2 -4
  249. package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -0
  250. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -7
  251. package/lib/types/components/livechatwidget/common/startChat.d.ts +3 -2
  252. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -1
  253. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +4 -2
  254. package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -0
  255. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
  256. package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -0
  257. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
  258. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +0 -1
  259. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +2 -0
  260. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -0
  261. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -0
  262. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +2 -2
  263. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +4 -3
  264. package/package.json +3 -3
@@ -1,14 +1,10 @@
1
1
  import { useContext } from "react";
2
2
  import { ChatContextStore } from "../contexts/ChatContextStore";
3
-
4
3
  const useChatContextStore = () => {
5
4
  const context = useContext(ChatContextStore);
6
-
7
5
  if (!context) {
8
6
  throw new Error("This hook can only be used on component that is descendants of <ChatContextStore.Provider>");
9
7
  }
10
-
11
8
  return context;
12
9
  };
13
-
14
10
  export default useChatContextStore;
@@ -1,14 +1,10 @@
1
1
  import { ChatSDKStore } from "../contexts/ChatSDKStore";
2
2
  import { useContext } from "react";
3
-
4
3
  const useChatSDKStore = () => {
5
4
  const sdk = useContext(ChatSDKStore);
6
-
7
5
  if (!sdk) {
8
6
  throw new Error("This hook is not called on component that is descendants of <ChatSDKStore.Provider>, or ChatSDK is not passed into LiveChatWidget component.");
9
7
  }
10
-
11
8
  return sdk;
12
9
  };
13
-
14
10
  export default useChatSDKStore;
@@ -5,19 +5,13 @@ import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
5
5
  export const createOnNewAdapterActivityHandler = (chatId, userId) => {
6
6
  const onNewAdapterActivityHandler = activity => {
7
7
  var _activity$channelData, _activity$channelData2, _activity$channelData3;
8
-
9
8
  const isActivityMessage = (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message;
10
- const isNotHistoryMessage = isActivityMessage && !(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && (_activity$channelData2 = _activity$channelData.tags) !== null && _activity$channelData2 !== void 0 && _activity$channelData2.includes(Constants.historyMessageTag)) && !(activity !== null && activity !== void 0 && (_activity$channelData3 = activity.channelData) !== null && _activity$channelData3 !== void 0 && _activity$channelData3.fromList);
11
-
12
- if (isNotHistoryMessage) {
13
- raiseMessageEvent(activity);
14
- }
9
+ const isHistoryMessage = isActivityMessage && ((activity === null || activity === void 0 ? void 0 : (_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 ? void 0 : (_activity$channelData2 = _activity$channelData.tags) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.includes(Constants.historyMessageTag)) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.fromList));
10
+ raiseMessageEvent(activity, isHistoryMessage);
15
11
  };
16
-
17
- const raiseMessageEvent = activity => {
12
+ const raiseMessageEvent = (activity, isHistoryMessage) => {
18
13
  if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
19
14
  var _text, _text2, _activity$channelData4, _activity$from;
20
-
21
15
  const payload = {
22
16
  // To identify hidden contents vs empty content
23
17
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -28,7 +22,6 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
28
22
  tags: activity === null || activity === void 0 ? void 0 : (_activity$channelData4 = activity.channelData) === null || _activity$channelData4 === void 0 ? void 0 : _activity$channelData4.tags,
29
23
  messageType: ""
30
24
  };
31
-
32
25
  if ((activity === null || activity === void 0 ? void 0 : (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === Constants.userMessageTag) {
33
26
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
34
27
  payload.messageType = Constants.userMessageTag;
@@ -43,40 +36,36 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
43
36
  });
44
37
  } else {
45
38
  var _activity$channelData5, _activity$channelData6;
46
-
47
39
  if (activity !== null && activity !== void 0 && (_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData6 = _activity$channelData5.tags) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.includes(Constants.systemMessageTag)) {
48
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
41
  payload.messageType = Constants.systemMessageTag;
50
42
  } else {
51
43
  var _activity$channelData7, _activity$channelData8, _activity$channelData9;
52
-
53
44
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text); // eslint-disable-next-line @typescript-eslint/no-explicit-any
55
-
56
- const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && _activity$channelData7.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData8 = activity.channelData) === null || _activity$channelData8 === void 0 ? void 0 : (_activity$channelData9 = _activity$channelData8.tags) === null || _activity$channelData9 === void 0 ? void 0 : _activity$channelData9.length) === 0; // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
-
45
+ const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && _activity$channelData7.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData8 = activity.channelData) === null || _activity$channelData8 === void 0 ? void 0 : (_activity$channelData9 = _activity$channelData8.tags) === null || _activity$channelData9 === void 0 ? void 0 : _activity$channelData9.length) === 0;
48
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
58
49
  const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
59
-
60
50
  if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
61
51
  return;
62
52
  }
63
-
64
53
  payload.messageType = Constants.userMessageTag;
65
54
  }
66
-
67
55
  const newMessageReceivedEvent = {
68
- eventName: BroadcastEvent.NewMessageReceived,
56
+ eventName: isHistoryMessage ? BroadcastEvent.HistoryMessageReceived : BroadcastEvent.NewMessageReceived,
69
57
  payload: payload
70
58
  };
71
59
  BroadcastService.postMessage(newMessageReceivedEvent);
72
- TelemetryHelper.logActionEvent(LogLevel.INFO, {
73
- Event: TelemetryEvent.MessageReceived,
74
- Description: "New message received",
75
- Data: payload
76
- });
60
+ if (!isHistoryMessage) {
61
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
62
+ Event: TelemetryEvent.MessageReceived,
63
+ Description: "New message received",
64
+ Data: payload
65
+ });
66
+ }
77
67
  }
78
68
  }
79
69
  };
80
-
81
70
  return onNewAdapterActivityHandler;
82
71
  };
@@ -150,6 +150,18 @@ export declare enum EnvironmentVersion {
150
150
  int = "int",
151
151
  test = "test"
152
152
  }
153
+ export declare enum E2VVOptions {
154
+ NoCalling = "192350000",
155
+ VideoAndVoiceCalling = "192350001",
156
+ VoiceOnly = "192350002"
157
+ }
158
+ export declare enum LiveWorkItemState {
159
+ Active = "Active",
160
+ Closed = "Closed",
161
+ Open = "Open",
162
+ Waiting = "Waiting",
163
+ WrapUp = "WrapUp"
164
+ }
153
165
  export declare class TranscriptConstants {
154
166
  static readonly ChatTranscriptsBodyColor = "#F5F5F5";
155
167
  static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
@@ -30,9 +30,9 @@ export declare enum BroadcastEvent {
30
30
  InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
31
31
  NewMessageSent = "NewMessageSent",
32
32
  NewMessageReceived = "NewMessageReceived",
33
+ HistoryMessageReceived = "HistoryMessageReceived",
33
34
  RedirectPageRequest = "RedirectPageRequest",
34
35
  StartChat = "StartChat",
35
- StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
36
36
  StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
37
37
  InitiateEndChat = "InitiateEndChat",
38
38
  SetCustomContext = "SetCustomContext",
@@ -41,7 +41,8 @@ export declare enum BroadcastEvent {
41
41
  ChatInitiated = "ChatInitiated",
42
42
  CloseChat = "CloseChat",
43
43
  InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
44
- ClosePopoutWindow = "ClosePopoutWindow"
44
+ ClosePopoutWindow = "ClosePopoutWindow",
45
+ RaiseErrorEvent = "RaiseErrorEvent"
45
46
  }
46
47
  export declare enum TelemetryEvent {
47
48
  CallAdded = "CallAdded",
@@ -52,8 +53,8 @@ export declare enum TelemetryEvent {
52
53
  CallDisconnected = "CallDisconnected",
53
54
  CallDisconnectedException = "CallDisconnectedException",
54
55
  IncomingCallEnded = "incomingCallEnded",
55
- VoiceVideoInitialize = "VoiceVideoInitialize",
56
- VoiceVideoInitializeException = "VoiceVideoInitializeException",
56
+ VoiceVideoSdkInitialize = "VoiceVideoSdkInitialize",
57
+ VoiceVideoSdkInitializeException = "VoiceVideoSdkInitializeException",
57
58
  VoiceVideoLoading = "VoiceVideoLoading",
58
59
  VoiceVideoNotLoaded = "VoiceVideoNotLoaded",
59
60
  VoiceVideoLoadingException = "VoiceVideoLoadingException",
@@ -84,6 +85,7 @@ export declare enum TelemetryEvent {
84
85
  WebChatLoaded = "WebChatLoaded",
85
86
  LCWChatButtonClicked = "LCWChatButtonClicked",
86
87
  LCWChatButtonShow = "LCWChatButtonShow",
88
+ WidgetLoadStarted = "WidgetLoadStarted",
87
89
  WidgetLoadComplete = "WidgetLoadComplete",
88
90
  WidgetLoadFailed = "WidgetLoadFailed",
89
91
  StartChatMethodException = "StartChatMethodException",
@@ -124,13 +126,18 @@ export declare enum TelemetryEvent {
124
126
  GetConversationDetailsException = "GetConversationDetailsException",
125
127
  BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
126
128
  GetAuthTokenCalled = "GetAuthTokenCalled",
129
+ GetAuthTokenFailed = "GetAuthTokenFailed",
127
130
  ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
131
+ CustomerVoiceResponsePageLoaded = "CustomerVoiceResponsePageLoaded",
132
+ CustomerVoiceFormResponseSubmitted = "CustomerVoiceFormResponseSubmitted",
133
+ CustomerVoiceFormResponseError = "CustomerVoiceFormResponseError",
128
134
  ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
129
135
  ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
130
136
  FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
131
137
  QueuePositionMessageRecieved = "QueuePositionMessageRecieved",
132
138
  AverageWaitTimeMessageRecieved = "AverageWaitTimeMessageRecieved",
133
139
  DataMaskingRuleApplied = "DataMaskingRuleApplied",
140
+ DataMaskingRuleApplyFailed = "DataMaskingRuleApplyFailed",
134
141
  IC3ClientEvent = "IC3ClientEvent",
135
142
  ConversationEndedThreadEventReceived = "ConversationEndedThreadEventReceived",
136
143
  InvalidConfiguration = "InvalidConfiguration",
@@ -7,8 +7,9 @@ export interface BaseContract {
7
7
  OrganizationId: string;
8
8
  LCWRuntimeId: string;
9
9
  CurrentRequestId: string;
10
- ExceptionDetails?: string;
10
+ ExceptionDetails?: any;
11
11
  LogLevel: string;
12
+ Description?: string;
12
13
  }
13
14
  export interface ConfigValidationContract extends BaseContract {
14
15
  Event?: string;
@@ -40,7 +41,6 @@ export interface IC3ClientContract extends BaseContract {
40
41
  EndpointId?: string;
41
42
  ErrorCode?: string;
42
43
  ShouldBubbleToHost?: boolean;
43
- Description?: string;
44
44
  }
45
45
  export interface OCChatSDKContract extends BaseContract {
46
46
  RequestId: string;
@@ -58,7 +58,6 @@ export interface WebChatContract extends BaseContract {
58
58
  export interface CallingContract extends BaseContract {
59
59
  CallId?: string;
60
60
  Event?: string;
61
- Description?: string;
62
61
  }
63
62
  export interface ACSAdapterContract extends BaseContract {
64
63
  Description?: string;
@@ -68,6 +67,5 @@ export interface ACSAdapterContract extends BaseContract {
68
67
  TimeStamp?: string;
69
68
  Event?: string;
70
69
  ErrorCode?: string;
71
- ExceptionDetails?: any;
72
70
  }
73
71
  export declare type TelemetryContract = OCChatSDKContract | IC3ClientContract | ActionsContract | LoadContract | WebChatContract | ConfigValidationContract | CallingContract | ACSAdapterContract | BaseContract | any;
@@ -0,0 +1,2 @@
1
+ import { IScrollBarProps } from "../../interfaces/IScrollBarProps";
2
+ export declare const defaultScrollBarProps: IScrollBarProps;
@@ -2,10 +2,8 @@ import "regenerator-runtime/runtime";
2
2
  import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
3
3
  import { Dispatch } from "react";
4
4
  import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
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>;
7
- declare const getReconnectIdForAuthenticatedChat: (props: ILiveChatWidgetProps, chatSDK: any) => Promise<string | undefined>;
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 };
5
+ import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
6
+ declare const handleChatReconnect: (chatSDK: any, props: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<void>;
7
+ declare const getChatReconnectContext: (chatSDK: any, chatConfig: ChatConfig, props: any, isAuthenticatedChat: boolean) => Promise<any>;
8
+ declare const isReconnectEnabled: (chatConfig: ChatConfig) => any;
9
+ export { handleChatReconnect, isReconnectEnabled, getChatReconnectContext };
@@ -4,6 +4,7 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
4
4
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
5
5
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
6
6
  declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
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>;
7
+ declare const setPreChatAndInitiateChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined, state?: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps | undefined) => Promise<void>;
8
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 };
9
+ declare const checkIfConversationStillValid: (chatSDK: any, props: any, requestId: any) => Promise<boolean>;
10
+ export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
@@ -13,6 +13,6 @@ export interface ILiveChatWidgetControlProps {
13
13
  hideProactiveChatPane?: boolean;
14
14
  hideReconnectChatPane?: boolean;
15
15
  hideWebChatContainer?: boolean;
16
- skipChatButtonRendering?: boolean;
16
+ hideStartChatButton?: boolean;
17
17
  widgetInstanceId?: string | undefined;
18
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";
@@ -21,6 +20,8 @@ import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/i
21
20
  import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
22
21
  import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
23
22
  import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
23
+ import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
24
+ import { IScrollBarProps } from "./IScrollBarProps";
24
25
  export interface ILiveChatWidgetProps {
25
26
  audioNotificationProps?: IAudioNotificationProps;
26
27
  callingContainerProps?: ICallingContainerProps;
@@ -40,7 +41,7 @@ export interface ILiveChatWidgetProps {
40
41
  outOfOfficeHeaderProps?: IHeaderProps;
41
42
  outOfOfficeHoursPaneProps?: IOOOHPaneProps;
42
43
  postChatLoadingPaneProps?: ILoadingPaneProps;
43
- postChatSurveyPaneProps?: IPostChatSurveyPaneProps;
44
+ postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
44
45
  preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
45
46
  proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
46
47
  reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
@@ -50,4 +51,5 @@ export interface ILiveChatWidgetProps {
50
51
  liveChatContextFromCache?: ILiveChatWidgetContext;
51
52
  contextDataStore?: IContextDataStore;
52
53
  getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
54
+ scrollBarProps?: IScrollBarProps;
53
55
  }
@@ -0,0 +1,22 @@
1
+ export interface IScrollBarProps {
2
+ /**
3
+ * Scrollbar width in px
4
+ */
5
+ width?: string;
6
+ /**
7
+ * Scrollbar track background color
8
+ */
9
+ trackBackgroundColor?: string;
10
+ /**
11
+ * Scrollbar thumb background color
12
+ */
13
+ thumbBackgroundColor?: string;
14
+ /**
15
+ * Scrollbar thumb border radius in px
16
+ */
17
+ thumbBorderRadius?: string;
18
+ /**
19
+ * Scrollbar thumb hover color
20
+ */
21
+ thumbHoverColor?: string;
22
+ }
@@ -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,5 @@
1
+ export declare enum CustomerVoiceEvents {
2
+ ResponsePageLoaded = "ResponsePageLoaded",
3
+ FormResponseSubmitted = "FormResponseSubmitted",
4
+ FormResponseError = "FormResponseError"
5
+ }
@@ -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,6 +1,5 @@
1
1
  import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
2
2
  export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
3
- isReconnectEnabled?: boolean;
4
3
  reconnectId?: string;
5
4
  redirectInSameWindow?: boolean;
6
5
  }
@@ -11,6 +11,8 @@ export interface IRenderingMiddlewareProps {
11
11
  hideSendboxOnConversationEnd?: boolean;
12
12
  userMessageStyleProps?: React.CSSProperties;
13
13
  systemMessageStyleProps?: React.CSSProperties;
14
+ userMessageBoxStyles?: React.CSSProperties;
15
+ systemMessageBoxStyles?: React.CSSProperties;
14
16
  typingIndicatorStyleProps?: React.CSSProperties;
15
17
  typingIndicatorBubbleStyleProps?: React.CSSProperties;
16
18
  typingIndicatorMessageStyleProps?: React.CSSProperties;
@@ -0,0 +1,3 @@
1
+ export declare const defaultSystemMessageBoxStyles: {
2
+ maxWidth: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ export declare const defaultUserMessageBoxStyles: {
2
+ maxWidth: string;
3
+ };
@@ -22,12 +22,12 @@ export interface ILiveChatWidgetContext {
22
22
  appStates: {
23
23
  conversationState: ConversationState;
24
24
  isMinimized: boolean;
25
- previousElementOnFocusBeforeModalOpen: HTMLElement | null;
25
+ previousElementIdOnFocusBeforeModalOpen: string | null;
26
26
  outsideOperatingHours: boolean;
27
27
  preChatResponseEmail: string;
28
28
  isAudioMuted: boolean | null;
29
29
  newMessage: boolean;
30
- skipChatButtonRendering: boolean;
30
+ hideStartChatButton: boolean;
31
31
  reconnectId: string | undefined;
32
32
  proactiveChatStates: {
33
33
  proactiveChatBodyTitle: string;
@@ -5,7 +5,7 @@ export declare enum LiveChatWidgetActionType {
5
5
  SET_GLOBAL_DIR = 3,
6
6
  SET_MINIMIZED = 4,
7
7
  SET_CONVERSATION_STATE = 5,
8
- SET_PREVIOUS_FOCUSED_ELEMENT = 6,
8
+ SET_PREVIOUS_FOCUSED_ELEMENT_ID = 6,
9
9
  SET_OUTSIDE_OPERATING_HOURS = 7,
10
10
  SET_PRE_CHAT_SURVEY_RESPONSE = 8,
11
11
  SET_CUSTOM_CONTEXT = 9,
@@ -21,7 +21,7 @@ export declare enum LiveChatWidgetActionType {
21
21
  DISABLE_LOCAL_VIDEO = 19,
22
22
  DISABLE_REMOTE_VIDEO = 20,
23
23
  SET_CHAT_TOKEN = 21,
24
- SET_SKIP_CHAT_BUTTON_RENDERING = 22,
24
+ SET_START_CHAT_BUTTON_DISPLAY = 22,
25
25
  SET_PROACTIVE_CHAT_PARAMS = 23,
26
26
  SET_TELEMETRY_DATA = 24,
27
27
  SET_RECONNECT_ID = 25,
@@ -32,5 +32,6 @@ export declare enum LiveChatWidgetActionType {
32
32
  SET_LIVE_CHAT_CONTEXT = 30,
33
33
  SET_BOT_OAUTH_SIGNIN_ID = 31,
34
34
  SET_WIDGET_SIZE = 32,
35
- SET_WIDGET_INSTANCE_ID = 33
35
+ SET_WIDGET_INSTANCE_ID = 33,
36
+ SET_LIVE_CHAT_CONFIG = 34
36
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "0.1.0-main.a27ec4b",
3
+ "version": "0.1.0-main.a2e5071",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -74,8 +74,8 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@fluentui/react": "^8.49.1",
77
- "@microsoft/omnichannel-chat-components": "0.1.0-main.d40108a",
78
- "@microsoft/omnichannel-chat-sdk": "1.0.1-main.077d17c",
77
+ "@microsoft/omnichannel-chat-components": "0.1.0-main.cb39af7",
78
+ "@microsoft/omnichannel-chat-sdk": "1.1.1-main.b88f92d",
79
79
  "abort-controller-es5": "^2.0.1",
80
80
  "dompurify": "^2.3.4",
81
81
  "markdown-it": "^12.3.2",