@microsoft/omnichannel-chat-widget 1.7.8-main.270960e → 1.7.8-main.2bcb0b6

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 (398) hide show
  1. package/lib/cjs/common/Constants.js +67 -20
  2. package/lib/cjs/common/KeyCodes.js +6 -1
  3. package/lib/cjs/common/contextDataStore/DataStoreManager.js +6 -1
  4. package/lib/cjs/common/facades/FacadeChatSDK.js +392 -295
  5. package/lib/cjs/common/storage/default/defaultCacheManager.js +6 -3
  6. package/lib/cjs/common/telemetry/AppInsightsEvents.js +31 -0
  7. package/lib/cjs/common/telemetry/ScenarioMarker.js +66 -0
  8. package/lib/cjs/common/telemetry/TelemetryConstants.js +158 -129
  9. package/lib/cjs/common/telemetry/TelemetryHelper.js +281 -250
  10. package/lib/cjs/common/telemetry/TelemetryManager.js +32 -12
  11. package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +11 -0
  12. package/lib/cjs/common/telemetry/interfaces/IAppInsightsConfig.js +1 -0
  13. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +149 -0
  14. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +17 -14
  15. package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +3 -2
  16. package/lib/cjs/components/footerstateful/FooterStateful.js +11 -6
  17. package/lib/cjs/components/headerstateful/HeaderStateful.js +21 -11
  18. package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +32 -19
  19. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +70 -58
  20. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +17 -8
  21. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +65 -52
  22. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +31 -18
  23. package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +14 -6
  24. package/lib/cjs/components/livechatwidget/common/Deferred.js +14 -6
  25. package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
  26. package/lib/cjs/components/livechatwidget/common/endChat.js +4 -18
  27. package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +0 -5
  28. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -1
  29. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +6 -3
  30. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +7 -2
  31. package/lib/cjs/components/livechatwidget/common/startChat.js +8 -25
  32. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +5 -4
  33. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +14 -12
  34. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
  35. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +16 -10
  36. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
  37. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
  38. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
  39. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
  40. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
  41. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
  42. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
  43. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +62 -52
  44. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
  45. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
  46. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
  47. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
  48. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  49. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
  50. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
  51. package/lib/cjs/firstresponselatency/Constants.js +13 -0
  52. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +118 -0
  53. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +201 -0
  54. package/lib/cjs/firstresponselatency/util.js +98 -0
  55. package/lib/cjs/plugins/createChatTranscript.js +88 -58
  56. package/lib/cjs/plugins/newMessageEventHandler.js +102 -88
  57. package/lib/esm/common/Constants.js +65 -19
  58. package/lib/esm/common/KeyCodes.js +6 -1
  59. package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -1
  60. package/lib/esm/common/facades/FacadeChatSDK.js +392 -295
  61. package/lib/esm/common/storage/default/defaultCacheManager.js +6 -1
  62. package/lib/esm/common/telemetry/AppInsightsEvents.js +24 -0
  63. package/lib/esm/common/telemetry/ScenarioMarker.js +59 -0
  64. package/lib/esm/common/telemetry/TelemetryConstants.js +158 -129
  65. package/lib/esm/common/telemetry/TelemetryHelper.js +281 -250
  66. package/lib/esm/common/telemetry/TelemetryManager.js +32 -12
  67. package/lib/esm/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +4 -0
  68. package/lib/esm/common/telemetry/interfaces/IAppInsightsConfig.js +1 -0
  69. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +139 -0
  70. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -14
  71. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +3 -2
  72. package/lib/esm/components/footerstateful/FooterStateful.js +11 -6
  73. package/lib/esm/components/headerstateful/HeaderStateful.js +21 -11
  74. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +32 -19
  75. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +70 -58
  76. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +17 -8
  77. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +65 -52
  78. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +31 -18
  79. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +14 -6
  80. package/lib/esm/components/livechatwidget/common/Deferred.js +14 -6
  81. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
  82. package/lib/esm/components/livechatwidget/common/endChat.js +4 -18
  83. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -6
  84. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -1
  85. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +6 -3
  86. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +7 -2
  87. package/lib/esm/components/livechatwidget/common/startChat.js +9 -26
  88. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +5 -4
  89. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +14 -12
  90. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
  91. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +16 -10
  92. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
  93. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
  94. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
  95. package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
  96. package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
  97. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
  98. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
  99. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +63 -52
  100. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
  101. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
  102. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
  103. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
  104. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  105. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
  106. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
  107. package/lib/esm/firstresponselatency/Constants.js +6 -0
  108. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +112 -0
  109. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +194 -0
  110. package/lib/esm/firstresponselatency/util.js +87 -0
  111. package/lib/esm/plugins/createChatTranscript.js +88 -58
  112. package/lib/esm/plugins/newMessageEventHandler.js +100 -86
  113. package/lib/types/assets/Audios.d.ts +1 -1
  114. package/lib/types/assets/Icons.d.ts +16 -16
  115. package/lib/types/common/Constants.d.ts +283 -277
  116. package/lib/types/common/KeyCodes.d.ts +5 -5
  117. package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -4
  118. package/lib/types/common/facades/FacadeChatSDK.d.ts +75 -74
  119. package/lib/types/common/facades/types/IFacadeChatSDKInput.d.ts +13 -13
  120. package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -14
  121. package/lib/types/common/interfaces/ITimer.d.ts +3 -3
  122. package/lib/types/common/storage/default/defaultCacheManager.d.ts +5 -5
  123. package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +4 -4
  124. package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -6
  125. package/lib/types/common/telemetry/AppInsightsEvents.d.ts +1 -0
  126. package/lib/types/common/telemetry/ScenarioMarker.d.ts +19 -0
  127. package/lib/types/common/telemetry/TelemetryConstants.d.ts +272 -257
  128. package/lib/types/common/telemetry/TelemetryHelper.d.ts +48 -43
  129. package/lib/types/common/telemetry/TelemetryManager.d.ts +12 -12
  130. package/lib/types/common/telemetry/defaultConfigs/defaultAppInsightsConfig.d.ts +2 -0
  131. package/lib/types/common/telemetry/defaultConfigs/defaultAriaConfig.d.ts +2 -2
  132. package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.d.ts +2 -2
  133. package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryInternalData.d.ts +2 -2
  134. package/lib/types/common/telemetry/definitions/Contracts.d.ts +77 -77
  135. package/lib/types/common/telemetry/definitions/Payload.d.ts +105 -105
  136. package/lib/types/common/telemetry/interfaces/IAppInsightsConfig.d.ts +4 -0
  137. package/lib/types/common/telemetry/interfaces/IAriaConfigurations.d.ts +18 -18
  138. package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +6 -5
  139. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +23 -21
  140. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +48 -48
  141. package/lib/types/common/telemetry/interfaces/ITelemetryEvents.d.ts +7 -7
  142. package/lib/types/common/telemetry/loggers/appInsightsLogger.d.ts +10 -0
  143. package/lib/types/common/telemetry/loggers/ariaTelemetryLogger.d.ts +2 -2
  144. package/lib/types/common/telemetry/loggers/consoleLogger.d.ts +2 -2
  145. package/lib/types/common/utils.d.ts +49 -49
  146. package/lib/types/components/callingcontainerstateful/CallingContainerStateful.d.ts +4 -3
  147. package/lib/types/components/callingcontainerstateful/ICallingContainerStatefulProps.d.ts +4 -4
  148. package/lib/types/components/chatbuttonstateful/ChatButtonStateful.d.ts +4 -3
  149. package/lib/types/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.d.ts +2 -2
  150. package/lib/types/components/chatbuttonstateful/interfaces/IChatButtonStatefulParams.d.ts +17 -17
  151. package/lib/types/components/confirmationpanestateful/ConfirmationPaneStateful.d.ts +4 -3
  152. package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +2 -2
  153. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneInputs.d.ts +4 -4
  154. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.d.ts +10 -10
  155. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +13 -13
  156. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +8 -8
  157. package/lib/types/components/dimlayer/DimLayer.d.ts +6 -5
  158. package/lib/types/components/draggable/DraggableChatWidget.d.ts +9 -9
  159. package/lib/types/components/draggable/DraggableEventEmitter.d.ts +27 -27
  160. package/lib/types/components/draggable/DraggableEventNames.d.ts +6 -6
  161. package/lib/types/components/draggable/DraggableEventReceiver.d.ts +27 -27
  162. package/lib/types/components/draggable/IDraggableElementPosition.d.ts +5 -5
  163. package/lib/types/components/draggable/IDraggableElementPositionDelta.d.ts +5 -5
  164. package/lib/types/components/draggable/IDraggableEvent.d.ts +12 -12
  165. package/lib/types/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.d.ts +4 -3
  166. package/lib/types/components/emailtranscriptpanestateful/interfaces/IChatTranscriptBody.d.ts +5 -5
  167. package/lib/types/components/emailtranscriptpanestateful/interfaces/IEmailTranscriptPaneProps.d.ts +11 -11
  168. package/lib/types/components/footerstateful/FooterStateful.d.ts +3 -2
  169. package/lib/types/components/footerstateful/audionotificationstateful/AudioNotificationStateful.d.ts +4 -3
  170. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationProps.d.ts +3 -3
  171. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +4 -4
  172. package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +4 -4
  173. package/lib/types/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.d.ts +23 -23
  174. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps.d.ts +19 -19
  175. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +14 -14
  176. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/TranscriptHtmlScripts.d.ts +33 -33
  177. package/lib/types/components/headerstateful/HeaderStateful.d.ts +4 -3
  178. package/lib/types/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.d.ts +2 -2
  179. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +33 -33
  180. package/lib/types/components/livechatwidget/LiveChatWidget.d.ts +4 -3
  181. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -14
  182. package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +12 -12
  183. package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -5
  184. package/lib/types/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.d.ts +7 -7
  185. package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -6
  186. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -7
  187. package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -7
  188. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -9
  189. package/lib/types/components/livechatwidget/common/authHelper.d.ts +18 -18
  190. package/lib/types/components/livechatwidget/common/chatDisconnectHelper.d.ts +4 -4
  191. package/lib/types/components/livechatwidget/common/createAdapter.d.ts +3 -3
  192. package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +25 -25
  193. package/lib/types/components/livechatwidget/common/createFooter.d.ts +4 -3
  194. package/lib/types/components/livechatwidget/common/createInternetConnectionChangeHandler.d.ts +2 -2
  195. package/lib/types/components/livechatwidget/common/createMarkdown.d.ts +2 -2
  196. package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -2
  197. package/lib/types/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.d.ts +2 -2
  198. package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -1
  199. package/lib/types/components/livechatwidget/common/endChat.d.ts +13 -13
  200. package/lib/types/components/livechatwidget/common/getGeneralStylesForButton.d.ts +3 -3
  201. package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -1
  202. package/lib/types/components/livechatwidget/common/helpers/markdownHelper.d.ts +2 -2
  203. package/lib/types/components/livechatwidget/common/initCallingSdk.d.ts +2 -2
  204. package/lib/types/components/livechatwidget/common/initConfirmationPropsComposer.d.ts +3 -3
  205. package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +7 -7
  206. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +3 -3
  207. package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -3
  208. package/lib/types/components/livechatwidget/common/persistentChatHelper.d.ts +1 -1
  209. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +12 -12
  210. package/lib/types/components/livechatwidget/common/registerTelemetryLoggers.d.ts +4 -4
  211. package/lib/types/components/livechatwidget/common/renderSurveyHelpers.d.ts +10 -10
  212. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +4 -4
  213. package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -1
  214. package/lib/types/components/livechatwidget/common/startChat.d.ts +11 -11
  215. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +6 -6
  216. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +4 -4
  217. package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +4 -4
  218. package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -4
  219. package/lib/types/components/livechatwidget/interfaces/IDraggableChatWidgetProps.d.ts +10 -10
  220. package/lib/types/components/livechatwidget/interfaces/IFeatureConfigProps.d.ts +3 -3
  221. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +17 -17
  222. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +21 -21
  223. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +70 -68
  224. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetStyleProps.d.ts +5 -5
  225. package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -8
  226. package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -22
  227. package/lib/types/components/livechatwidget/interfaces/ISendBox.d.ts +12 -12
  228. package/lib/types/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.d.ts +3 -3
  229. package/lib/types/components/loadingpanestateful/LoadingPaneStateful.d.ts +3 -2
  230. package/lib/types/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.d.ts +2 -2
  231. package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -2
  232. package/lib/types/components/notificationpanestateful/NotificationPaneStateful.d.ts +4 -3
  233. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.d.ts +2 -2
  234. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.d.ts +2 -2
  235. package/lib/types/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.d.ts +13 -13
  236. package/lib/types/components/ooohpanestateful/OOOHPaneStateful.d.ts +4 -3
  237. package/lib/types/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.d.ts +2 -2
  238. package/lib/types/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.d.ts +4 -3
  239. package/lib/types/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.d.ts +2 -2
  240. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +4 -3
  241. package/lib/types/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.d.ts +2 -2
  242. package/lib/types/components/postchatsurveypanestateful/common/isValidSurveyUrl.d.ts +2 -2
  243. package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -5
  244. package/lib/types/components/postchatsurveypanestateful/enums/PostChatSurveyMode.d.ts +4 -4
  245. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +5 -5
  246. package/lib/types/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.d.ts +4 -3
  247. package/lib/types/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.d.ts +2 -2
  248. package/lib/types/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.d.ts +2 -2
  249. package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +5 -5
  250. package/lib/types/components/proactivechatpanestateful/ProactiveChatPaneStateful.d.ts +3 -2
  251. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -3
  252. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps.d.ts +4 -4
  253. package/lib/types/components/reconnectchatpanestateful/ReconnectChatPaneStateful.d.ts +4 -3
  254. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatContext.d.ts +4 -4
  255. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatOptionalParams.d.ts +3 -3
  256. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulParams.d.ts +5 -5
  257. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +5 -5
  258. package/lib/types/components/startchaterrorpanestateful/StartChatErrorPaneStateful.d.ts +4 -3
  259. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.d.ts +2 -2
  260. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.d.ts +2 -2
  261. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.d.ts +2 -2
  262. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.d.ts +2 -2
  263. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.d.ts +2 -2
  264. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.d.ts +5 -5
  265. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.d.ts +6 -6
  266. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +14 -14
  267. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +8 -8
  268. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.d.ts +10 -10
  269. package/lib/types/components/webchatcontainerstateful/WebChatContainerStateful.d.ts +4 -3
  270. package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -10
  271. package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -6
  272. package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -8
  273. package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +31 -31
  274. package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -6
  275. package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -11
  276. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.d.ts +2 -2
  277. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.d.ts +2 -2
  278. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.d.ts +2 -2
  279. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.d.ts +2 -2
  280. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.d.ts +2 -2
  281. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -2
  282. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.d.ts +2 -2
  283. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.d.ts +2 -2
  284. package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +14 -14
  285. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +45 -45
  286. package/lib/types/components/webchatcontainerstateful/common/utils/BrowserInfo.d.ts +5 -5
  287. package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +7 -7
  288. package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -9
  289. package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -9
  290. package/lib/types/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.d.ts +2 -2
  291. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +8 -8
  292. package/lib/types/components/webchatcontainerstateful/interfaces/IAttachmentProps.d.ts +5 -5
  293. package/lib/types/components/webchatcontainerstateful/interfaces/IBotAuthConfig.d.ts +4 -4
  294. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -4
  295. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingInfo.d.ts +6 -6
  296. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingRule.d.ts +3 -3
  297. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingSetting.d.ts +4 -4
  298. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +37 -37
  299. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatAction.d.ts +4 -4
  300. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +28 -28
  301. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatProps.d.ts +39 -39
  302. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -3
  303. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.d.ts +3 -3
  304. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.d.ts +9 -9
  305. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.d.ts +4 -4
  306. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.d.ts +5 -5
  307. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.d.ts +11 -11
  308. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.d.ts +6 -6
  309. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +11 -11
  310. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.d.ts +5 -5
  311. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts +24 -24
  312. package/lib/types/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.d.ts +9 -9
  313. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.d.ts +2 -2
  314. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.d.ts +2 -2
  315. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +10 -10
  316. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
  317. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.d.ts +6 -6
  318. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +3 -2
  319. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +3 -2
  320. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +3 -2
  321. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +3 -2
  322. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -6
  323. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +3 -2
  324. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +3 -2
  325. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +3 -2
  326. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +8 -8
  327. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -2
  328. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.d.ts +1 -2
  329. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.d.ts +1 -2
  330. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.d.ts +1 -2
  331. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.d.ts +1 -2
  332. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.d.ts +1 -2
  333. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.d.ts +1 -2
  334. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.d.ts +1 -2
  335. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.d.ts +1 -2
  336. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.d.ts +1 -2
  337. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.d.ts +1 -2
  338. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +1 -2
  339. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.d.ts +1 -2
  340. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -3
  341. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.d.ts +11 -11
  342. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.d.ts +2 -2
  343. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.d.ts +1 -2
  344. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.d.ts +1 -2
  345. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.d.ts +1 -2
  346. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.d.ts +1 -2
  347. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.d.ts +1 -2
  348. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -3
  349. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.d.ts +3 -3
  350. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.d.ts +10 -10
  351. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/index.d.ts +10 -10
  352. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.d.ts +4 -4
  353. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +4 -4
  354. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.d.ts +2 -1
  355. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.d.ts +2 -1
  356. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +2 -1
  357. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.d.ts +2 -2
  358. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.d.ts +7 -6
  359. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.d.ts +10 -10
  360. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +11 -11
  361. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.d.ts +10 -10
  362. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.d.ts +11 -11
  363. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.d.ts +11 -11
  364. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.d.ts +10 -10
  365. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.d.ts +10 -10
  366. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.d.ts +10 -10
  367. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.d.ts +11 -11
  368. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.d.ts +10 -10
  369. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.d.ts +10 -10
  370. package/lib/types/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.d.ts +12 -12
  371. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -1
  372. package/lib/types/contexts/ChatAdapterStore.d.ts +1 -2
  373. package/lib/types/contexts/ChatContextStore.d.ts +1 -1
  374. package/lib/types/contexts/ChatSDKStore.d.ts +1 -1
  375. package/lib/types/contexts/FacadeChatSDKStore.d.ts +1 -1
  376. package/lib/types/contexts/common/ConversationState.d.ts +13 -13
  377. package/lib/types/contexts/common/ILiveChatWidgetAction.d.ts +5 -5
  378. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +63 -63
  379. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +40 -40
  380. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +48 -48
  381. package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +3 -3
  382. package/lib/types/contexts/common/StartChatFailureType.d.ts +5 -5
  383. package/lib/types/contexts/createReducer.d.ts +4 -4
  384. package/lib/types/controller/componentController.d.ts +16 -16
  385. package/lib/types/firstresponselatency/Constants.d.ts +30 -0
  386. package/lib/types/firstresponselatency/FirstMessageTrackerFromBot.d.ts +1 -0
  387. package/lib/types/firstresponselatency/FirstResponseLatencyTracker.d.ts +22 -0
  388. package/lib/types/firstresponselatency/util.d.ts +7 -0
  389. package/lib/types/hooks/useChatAdapterStore.d.ts +2 -2
  390. package/lib/types/hooks/useChatContextStore.d.ts +5 -5
  391. package/lib/types/hooks/useChatSDKStore.d.ts +2 -2
  392. package/lib/types/hooks/useDebounce.d.ts +3 -3
  393. package/lib/types/hooks/useFacadeChatSDKStore.d.ts +3 -3
  394. package/lib/types/hooks/useWindowDimensions.d.ts +4 -4
  395. package/lib/types/index.d.ts +11 -11
  396. package/lib/types/plugins/createChatTranscript.d.ts +3 -3
  397. package/lib/types/plugins/newMessageEventHandler.d.ts +2 -2
  398. package/package.json +41 -16
@@ -1,3 +1,6 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -62,9 +65,10 @@ const fetchBotAuthConfig = async (retries, interval) => {
62
65
  await delay(interval);
63
66
  return await fetchBotAuthConfig(--retries, interval);
64
67
  };
65
- export class BotAuthActivitySubscriber {
66
- constructor() {
68
+ export let BotAuthActivitySubscriber = /*#__PURE__*/function () {
69
+ function BotAuthActivitySubscriber() {
67
70
  let optionalParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
71
+ _classCallCheck(this, BotAuthActivitySubscriber);
68
72
  _defineProperty(this, "observer", void 0);
69
73
  _defineProperty(this, "signInCardSeen", void 0);
70
74
  _defineProperty(this, "fetchBotAuthConfigRetries", void 0);
@@ -79,71 +83,79 @@ export class BotAuthActivitySubscriber {
79
83
  this.fetchBotAuthConfigRetryInterval = optionalParams.fetchBotAuthConfigRetryInterval;
80
84
  }
81
85
  }
82
- applicable(activity) {
83
- var _activity$attachments;
84
- return (activity === null || activity === void 0 ? void 0 : (_activity$attachments = activity.attachments) === null || _activity$attachments === void 0 ? void 0 : _activity$attachments.length) > 0 && activity.attachments[0] && supportedSignInCardContentTypes.indexOf(activity.attachments[0].contentType) >= 0;
85
- }
86
- async apply(activity) {
87
- var _TelemetryManager$Int;
88
- this.observer.next(false); // Hides card
89
- const attachment = activity.attachments[0];
90
- const signInUrl = attachment.content.buttons[0].value;
91
- const signInId = extractSignInId(signInUrl);
92
- if (!signInId) {
93
- TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
94
- Event: TelemetryEvent.BotAuthActivityUndefinedSignInId
95
- });
96
- return activity;
97
- }
98
- if (this.signInCardSeen.has(signInId)) {
99
- // Prevents duplicate auth
100
- return;
86
+ _createClass(BotAuthActivitySubscriber, [{
87
+ key: "applicable",
88
+ value: function applicable(activity) {
89
+ var _activity$attachments;
90
+ return (activity === null || activity === void 0 ? void 0 : (_activity$attachments = activity.attachments) === null || _activity$attachments === void 0 ? void 0 : _activity$attachments.length) > 0 && activity.attachments[0] && supportedSignInCardContentTypes.indexOf(activity.attachments[0].contentType) >= 0;
101
91
  }
102
- this.signInCardSeen.add(signInId);
103
- const sasUrl = await extractSasUrl(attachment);
104
- const event = {
105
- eventName: BroadcastEvent.SigninCardReceived,
106
- payload: {
107
- sasUrl,
108
- conversationId: (_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.conversationId
92
+ }, {
93
+ key: "apply",
94
+ value: async function apply(activity) {
95
+ var _TelemetryManager$Int;
96
+ this.observer.next(false); // Hides card
97
+ const attachment = activity.attachments[0];
98
+ const signInUrl = attachment.content.buttons[0].value;
99
+ const signInId = extractSignInId(signInUrl);
100
+ if (!signInId) {
101
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
102
+ Event: TelemetryEvent.BotAuthActivityUndefinedSignInId
103
+ });
104
+ return activity;
109
105
  }
110
- };
111
- if (!sasUrl) {
112
- TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
113
- Event: TelemetryEvent.BotAuthActivityEmptySasUrl,
114
- Description: "SaS Url is empty"
115
- });
116
- return activity;
117
- } else {
118
- BroadcastService.postMessage(event);
119
- }
120
- try {
121
- const response = await fetchBotAuthConfig(this.fetchBotAuthConfigRetries, this.fetchBotAuthConfigRetryInterval);
122
- if (response === false) {
106
+ if (this.signInCardSeen.has(signInId)) {
107
+ // Prevents duplicate auth
108
+ return;
109
+ }
110
+ this.signInCardSeen.add(signInId);
111
+ const sasUrl = await extractSasUrl(attachment);
112
+ const event = {
113
+ eventName: BroadcastEvent.SigninCardReceived,
114
+ payload: {
115
+ sasUrl,
116
+ conversationId: (_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.conversationId
117
+ }
118
+ };
119
+ if (!sasUrl) {
123
120
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
124
- Event: TelemetryEvent.SetBotAuthProviderHideCard
121
+ Event: TelemetryEvent.BotAuthActivityEmptySasUrl,
122
+ Description: "SaS Url is empty"
125
123
  });
124
+ return activity;
126
125
  } else {
126
+ BroadcastService.postMessage(event);
127
+ }
128
+ try {
129
+ const response = await fetchBotAuthConfig(this.fetchBotAuthConfigRetries, this.fetchBotAuthConfigRetryInterval);
130
+ if (response === false) {
131
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
132
+ Event: TelemetryEvent.SetBotAuthProviderHideCard
133
+ });
134
+ } else {
135
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
136
+ Event: TelemetryEvent.SetBotAuthProviderDisplayCard
137
+ });
138
+ return activity;
139
+ }
140
+ } catch {
127
141
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
128
- Event: TelemetryEvent.SetBotAuthProviderDisplayCard
142
+ Event: TelemetryEvent.SetBotAuthProviderNotFound
129
143
  });
144
+ //this is to ensure listener continues waiting for response
145
+ if (this.signInCardSeen.has(signInId)) {
146
+ this.signInCardSeen.delete(signInId);
147
+ }
130
148
  return activity;
131
149
  }
132
- } catch {
133
- TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
134
- Event: TelemetryEvent.SetBotAuthProviderNotFound
135
- });
136
- //this is to ensure listener continues waiting for response
137
- if (this.signInCardSeen.has(signInId)) {
138
- this.signInCardSeen.delete(signInId);
150
+ }
151
+ }, {
152
+ key: "next",
153
+ value: async function next(activity) {
154
+ if (this.applicable(activity)) {
155
+ return await this.apply(activity);
139
156
  }
140
157
  return activity;
141
158
  }
142
- }
143
- async next(activity) {
144
- if (this.applicable(activity)) {
145
- return await this.apply(activity);
146
- }
147
- return activity;
148
- }
149
- }
159
+ }]);
160
+ return BotAuthActivitySubscriber;
161
+ }();
@@ -1,14 +1,23 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
- export class DefaultActivitySubscriber {
5
- constructor() {
7
+ export let DefaultActivitySubscriber = /*#__PURE__*/function () {
8
+ function DefaultActivitySubscriber() {
9
+ _classCallCheck(this, DefaultActivitySubscriber);
6
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
11
  _defineProperty(this, "observer", void 0);
8
12
  }
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- async next(activity) {
11
- this.observer.next(activity);
12
- return false;
13
- }
14
- }
13
+ _createClass(DefaultActivitySubscriber, [{
14
+ key: "next",
15
+ value:
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ async function next(activity) {
18
+ this.observer.next(activity);
19
+ return false;
20
+ }
21
+ }]);
22
+ return DefaultActivitySubscriber;
23
+ }();
@@ -1,3 +1,6 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -5,66 +8,76 @@ import { Constants } from "../../../../common/Constants";
5
8
  import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../../common/telemetry/TelemetryConstants";
6
9
  import { TelemetryHelper } from "../../../../common/telemetry/TelemetryHelper";
7
10
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
8
- export class HiddenAdaptiveCardActivitySubscriber {
9
- constructor() {
11
+ export let HiddenAdaptiveCardActivitySubscriber = /*#__PURE__*/function () {
12
+ function HiddenAdaptiveCardActivitySubscriber() {
13
+ _classCallCheck(this, HiddenAdaptiveCardActivitySubscriber);
10
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
15
  _defineProperty(this, "observer", void 0);
12
16
  }
13
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- async apply(activity) {
15
- const {
16
- attachments,
17
- attachment
18
- } = activity;
19
- this.observer.next(false);
20
- BroadcastService.postMessage({
21
- eventName: BroadcastEvent.NewMessageReceived,
22
- payload: {
23
- attachments: attachments || [attachment],
24
- text: "Custom Event"
25
- }
26
- });
27
- return;
28
- }
17
+ _createClass(HiddenAdaptiveCardActivitySubscriber, [{
18
+ key: "apply",
19
+ value:
20
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
21
+ async function apply(activity) {
22
+ const {
23
+ attachments,
24
+ attachment
25
+ } = activity;
26
+ this.observer.next(false);
27
+ BroadcastService.postMessage({
28
+ eventName: BroadcastEvent.NewMessageReceived,
29
+ payload: {
30
+ attachments: attachments || [attachment],
31
+ text: "Custom Event"
32
+ }
33
+ });
34
+ return;
35
+ }
29
36
 
30
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
31
- applicable(activity) {
32
- const {
33
- attachments,
34
- attachment
35
- } = activity;
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
38
+ }, {
39
+ key: "applicable",
40
+ value: function applicable(activity) {
41
+ const {
42
+ attachments,
43
+ attachment
44
+ } = activity;
36
45
 
37
- // Use `attachments` or `attachment` (whichever exists)
38
- const cards = attachments || [attachment];
46
+ // Use `attachments` or `attachment` (whichever exists)
47
+ const cards = attachments || [attachment];
39
48
 
40
- // Check if contentType is "AdaptiveCard"
41
- const adaptiveCard = cards === null || cards === void 0 ? void 0 : cards.find(
42
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
43
- item => Constants.supportedAdaptiveCardContentTypes.indexOf(item === null || item === void 0 ? void 0 : item.contentType) >= 0);
44
- if (adaptiveCard && adaptiveCard.content) {
45
- const {
46
- body
47
- } = adaptiveCard.content;
48
- if (Array.isArray(body)) {
49
- // Check if all elements in `body` have `isVisible: false`
50
- const allInvisible = body.every(item => item.isVisible === false);
51
- if (allInvisible) {
52
- TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
53
- Event: TelemetryEvent.HiddenAdaptiveCardMessageReceived,
54
- Description: "All elements in AdaptiveCard are invisible"
55
- });
56
- return true;
49
+ // Check if contentType is "AdaptiveCard"
50
+ const adaptiveCard = cards === null || cards === void 0 ? void 0 : cards.find(
51
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
+ item => Constants.supportedAdaptiveCardContentTypes.indexOf(item === null || item === void 0 ? void 0 : item.contentType) >= 0);
53
+ if (adaptiveCard && adaptiveCard.content) {
54
+ const {
55
+ body
56
+ } = adaptiveCard.content;
57
+ if (Array.isArray(body)) {
58
+ // Check if all elements in `body` have `isVisible: false`
59
+ const allInvisible = body.every(item => item.isVisible === false);
60
+ if (allInvisible) {
61
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
62
+ Event: TelemetryEvent.HiddenAdaptiveCardMessageReceived,
63
+ Description: "All elements in AdaptiveCard are invisible"
64
+ });
65
+ return true;
66
+ }
57
67
  }
58
68
  }
69
+ return false;
59
70
  }
60
- return false;
61
- }
62
71
 
63
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
- async next(activity) {
65
- if (this.applicable(activity)) {
66
- return await this.apply(activity);
72
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
+ }, {
74
+ key: "next",
75
+ value: async function next(activity) {
76
+ if (this.applicable(activity)) {
77
+ return await this.apply(activity);
78
+ }
79
+ return activity;
67
80
  }
68
- return activity;
69
- }
70
- }
81
+ }]);
82
+ return HiddenAdaptiveCardActivitySubscriber;
83
+ }();
@@ -1,28 +1,41 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
7
  import { ActivityStreamHandler } from "../ActivityStreamHandler";
5
- export class PauseActivitySubscriber {
6
- constructor() {
8
+ export let PauseActivitySubscriber = /*#__PURE__*/function () {
9
+ function PauseActivitySubscriber() {
10
+ _classCallCheck(this, PauseActivitySubscriber);
7
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
12
  _defineProperty(this, "observer", void 0);
9
13
  }
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- async apply(activity) {
12
- await ActivityStreamHandler.restorePromise;
13
- return activity;
14
- }
14
+ _createClass(PauseActivitySubscriber, [{
15
+ key: "apply",
16
+ value:
17
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
+ async function apply(activity) {
19
+ await ActivityStreamHandler.restorePromise;
20
+ return activity;
21
+ }
15
22
 
16
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
17
- applicable(activity) {
18
- return true;
19
- }
23
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
24
+ }, {
25
+ key: "applicable",
26
+ value: function applicable(activity) {
27
+ return true;
28
+ }
20
29
 
21
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
- async next(activity) {
23
- if (this.applicable(activity)) {
24
- return await this.apply(activity);
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ }, {
32
+ key: "next",
33
+ value: async function next(activity) {
34
+ if (this.applicable(activity)) {
35
+ return await this.apply(activity);
36
+ }
37
+ return activity;
25
38
  }
26
- return activity;
27
- }
28
- }
39
+ }]);
40
+ return PauseActivitySubscriber;
41
+ }();
@@ -1,9 +1,12 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
7
  import { DefaultActivitySubscriber } from "./ActivitySubscriber/DefaultActivitySubscriber";
5
8
  import { shareObservable } from "./shareObservable";
6
- export class ChatAdapterShim {
9
+ export let ChatAdapterShim = /*#__PURE__*/function () {
7
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
11
 
9
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -11,7 +14,8 @@ export class ChatAdapterShim {
11
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
15
 
13
16
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- constructor(chatAdapter) {
17
+ function ChatAdapterShim(chatAdapter) {
18
+ _classCallCheck(this, ChatAdapterShim);
15
19
  _defineProperty(this, "chatAdapter", void 0);
16
20
  _defineProperty(this, "activityObserver", void 0);
17
21
  _defineProperty(this, "subscribers", void 0);
@@ -51,7 +55,11 @@ export class ChatAdapterShim {
51
55
  }
52
56
 
53
57
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
54
- addSubscriber(subscriber) {
55
- this.subscribers.push(subscriber);
56
- }
57
- }
58
+ _createClass(ChatAdapterShim, [{
59
+ key: "addSubscriber",
60
+ value: function addSubscriber(subscriber) {
61
+ this.subscribers.push(subscriber);
62
+ }
63
+ }]);
64
+ return ChatAdapterShim;
65
+ }();
@@ -1,10 +1,14 @@
1
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
6
  function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
- export class Deferred {
7
+ export let Deferred = /*#__PURE__*/function () {
5
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
9
 
7
- constructor() {
10
+ function Deferred() {
11
+ _classCallCheck(this, Deferred);
8
12
  _defineProperty(this, "_promise", void 0);
9
13
  _defineProperty(this, "_resolve", void 0);
10
14
  _defineProperty(this, "_reject", () => {
@@ -23,7 +27,11 @@ export class Deferred {
23
27
  this._reject = reject;
24
28
  });
25
29
  }
26
- get promise() {
27
- return this._promise;
28
- }
29
- }
30
+ _createClass(Deferred, [{
31
+ key: "promise",
32
+ get: function () {
33
+ return this._promise;
34
+ }
35
+ }]);
36
+ return Deferred;
37
+ }();
@@ -6,7 +6,7 @@ import { defaultMiddlewareLocalizedTexts } from "../../webchatcontainerstateful/
6
6
 
7
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
8
  const handleChatDisconnect = (props, state, setWebChatStyles) => {
9
- var _state$appStates, _state$domainStates, _state$domainStates$m, _props$webChatContain, _props$webChatContain2;
9
+ var _state$appStates, _state$domainStates, _state$domainStates$m, _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4;
10
10
  const chatDisconnectState = state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.chatDisconnectEventReceived;
11
11
  const chatDisconnectMessage = (state === null || state === void 0 ? void 0 : (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : (_state$domainStates$m = _state$domainStates.middlewareLocalizedTexts) === null || _state$domainStates$m === void 0 ? void 0 : _state$domainStates$m.MIDDLEWARE_BANNER_CHAT_DISCONNECT) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_CHAT_DISCONNECT;
12
12
  const hideSendBoxOnConversationEnd = props === null || props === void 0 ? void 0 : (_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : (_props$webChatContain2 = _props$webChatContain.renderingMiddlewareProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.hideSendboxOnConversationEnd;
@@ -27,6 +27,8 @@ const handleChatDisconnect = (props, state, setWebChatStyles) => {
27
27
  });
28
28
  break;
29
29
  case false:
30
+ // this means customer on purpose wants to hide the send box, we should not override it
31
+ if ((props === null || props === void 0 ? void 0 : (_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : (_props$webChatContain4 = _props$webChatContain3.webChatStyles) === null || _props$webChatContain4 === void 0 ? void 0 : _props$webChatContain4.hideSendBox) === true) return;
30
32
  if (hideSendBoxOnConversationEnd !== false) {
31
33
  setWebChatStyles(styles => {
32
34
  return {
@@ -203,7 +203,7 @@ const endChat = async (props, facadeChatSDK, state, dispatch, setAdapter, setWeb
203
203
  payload: undefined
204
204
  });
205
205
  // Always allow to close the chat for embedded mode irrespective of end chat errors
206
- closeChatWidget(dispatch, props, state);
206
+ closeChatWidget(dispatch);
207
207
  facadeChatSDK.destroy();
208
208
  }
209
209
  }
@@ -327,21 +327,7 @@ export const endVoiceVideoCallIfOngoing = async (facadeChatSDK, dispatch) => {
327
327
  }, callId);
328
328
  }
329
329
  };
330
- const closeChatWidget = (dispatch, props, state) => {
331
- var _state$appStates5;
332
- if (state !== null && state !== void 0 && (_state$appStates5 = state.appStates) !== null && _state$appStates5 !== void 0 && _state$appStates5.hideStartChatButton) {
333
- var _props$controlProps2, _props$controlProps3;
334
- // Only close chat if header is enabled for popout
335
- // TODO : This condition needs to be removed eventually when the filler UX is ready for popout, removing this condition would show a blank screen for OOB Widget
336
- if ((props === null || props === void 0 ? void 0 : (_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.hideHeader) === undefined || (props === null || props === void 0 ? void 0 : (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.hideHeader) === false) {
337
- dispatch({
338
- type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
339
- payload: ConversationState.Closed
340
- });
341
- }
342
- return;
343
- }
344
-
330
+ const closeChatWidget = dispatch => {
345
331
  // Embedded chat
346
332
  dispatch({
347
333
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
@@ -361,7 +347,7 @@ const chatTokenCleanUp = async dispatch => {
361
347
  };
362
348
 
363
349
  const getEndChatEventName = async (facadeChatSDK, props) => {
364
- var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3, _facadeChatSDK$getCha4, _facadeChatSDK$getCha5, _props$controlProps4;
365
- return getWidgetEndChatEventName((_facadeChatSDK$getCha2 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha2 === void 0 ? void 0 : (_facadeChatSDK$getCha3 = _facadeChatSDK$getCha2.omnichannelConfig) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : _facadeChatSDK$getCha3.orgId, (_facadeChatSDK$getCha4 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha4 === void 0 ? void 0 : (_facadeChatSDK$getCha5 = _facadeChatSDK$getCha4.omnichannelConfig) === null || _facadeChatSDK$getCha5 === void 0 ? void 0 : _facadeChatSDK$getCha5.widgetId, (props === null || props === void 0 ? void 0 : (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.widgetInstanceId) ?? "");
350
+ var _facadeChatSDK$getCha2, _facadeChatSDK$getCha3, _facadeChatSDK$getCha4, _facadeChatSDK$getCha5, _props$controlProps2;
351
+ return getWidgetEndChatEventName((_facadeChatSDK$getCha2 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha2 === void 0 ? void 0 : (_facadeChatSDK$getCha3 = _facadeChatSDK$getCha2.omnichannelConfig) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : _facadeChatSDK$getCha3.orgId, (_facadeChatSDK$getCha4 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha4 === void 0 ? void 0 : (_facadeChatSDK$getCha5 = _facadeChatSDK$getCha4.omnichannelConfig) === null || _facadeChatSDK$getCha5 === void 0 ? void 0 : _facadeChatSDK$getCha5.widgetId, (props === null || props === void 0 ? void 0 : (_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.widgetInstanceId) ?? "");
366
352
  };
367
353
  export { prepareEndChat, endChat };
@@ -2,7 +2,7 @@ import "regenerator-runtime/runtime";
2
2
  import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
3
3
  import { ConversationMode, WidgetLoadCustomErrorString } from "../../../common/Constants";
4
4
  import { checkContactIdError, isNullOrEmptyString, isNullOrUndefined } from "../../../common/utils";
5
- import { handleAuthentication, removeAuthTokenProvider } from "./authHelper";
5
+ import { removeAuthTokenProvider } from "./authHelper";
6
6
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
7
7
  import { ConversationState } from "../../../contexts/common/ConversationState";
8
8
  import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
@@ -61,11 +61,6 @@ const getChatReconnectContext = async (facadeChatSDK, chatConfig, props, isAuthe
61
61
  const chatReconnectOptionalParams = {
62
62
  reconnectId: (_props$reconnectChatP4 = props.reconnectChatPaneProps) === null || _props$reconnectChatP4 === void 0 ? void 0 : _props$reconnectChatP4.reconnectId
63
63
  };
64
- // Get auth token for getting chat reconnect context
65
- if (isAuthenticatedChat) {
66
- // handle authentication will throw error if auth token is not available, so no need to check for response
67
- await handleAuthentication(facadeChatSDK.getChatSDK(), chatConfig, props.getAuthToken);
68
- }
69
64
  const reconnectChatContext = await (facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.getChatReconnectContext(chatReconnectOptionalParams));
70
65
  if (isAuthenticatedChat) {
71
66
  // remove auth token after reconnectId is fetched
@@ -5,6 +5,7 @@ import { defaultAriaConfig } from "../../../common/telemetry/defaultConfigs/defa
5
5
  import { defaultInternalTelemetryData } from "../../../common/telemetry/defaultConfigs/defaultTelemetryInternalData";
6
6
  import { defaultTelemetryConfiguration } from "../../../common/telemetry/defaultConfigs/defaultTelemetryConfiguration";
7
7
  import { newGuid } from "../../../common/utils";
8
+ import { defaultAppInsightsConfig } from "../../../common/telemetry/defaultConfigs/defaultAppInsightsConfig";
8
9
  export const registerTelemetryLoggers = (props, dispatch) => {
9
10
  var _props$liveChatContex, _props$liveChatContex2;
10
11
  const telemetryConfig = {
@@ -19,7 +20,8 @@ export const registerTelemetryLoggers = (props, dispatch) => {
19
20
  let telemetryData = {
20
21
  ...defaultInternalTelemetryData,
21
22
  telemetryConfig: Object.assign({}, defaultTelemetryConfiguration, telemetryConfig),
22
- ariaConfig: Object.assign({}, defaultAriaConfig, telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.ariaConfigurations)
23
+ ariaConfig: Object.assign({}, defaultAriaConfig, telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.ariaConfigurations),
24
+ appInsightsConfig: Object.assign({}, defaultAppInsightsConfig, props.appInsightsConfig)
23
25
  };
24
26
  if (props.chatConfig) {
25
27
  telemetryData = TelemetryHelper.addChatConfigDataToTelemetry(props === null || props === void 0 ? void 0 : props.chatConfig, telemetryData);
@@ -108,7 +108,7 @@ const getPostChatContext = async (facadeChatSDK, state, dispatch) => {
108
108
  if ((state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.postChatContext) === undefined) {
109
109
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
110
  const context = await facadeChatSDK.getPostChatSurveyContext();
111
- TelemetryHelper.logSDKEvent(LogLevel.INFO, {
111
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
112
112
  Event: TelemetryEvent.PostChatContextCallSucceed,
113
113
  Description: PostChatSurveyTelemetryMessage.PostChatContextCallSucceed
114
114
  });
@@ -120,9 +120,12 @@ const getPostChatContext = async (facadeChatSDK, state, dispatch) => {
120
120
  }
121
121
  }
122
122
  } catch (error) {
123
- TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
123
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.ERROR, {
124
124
  Event: TelemetryEvent.PostChatContextCallFailed,
125
- Description: PostChatSurveyTelemetryMessage.PostChatContextCallFailed
125
+ Description: PostChatSurveyTelemetryMessage.PostChatContextCallFailed,
126
+ ExceptionDetails: {
127
+ exception: error
128
+ }
126
129
  });
127
130
  }
128
131
  };
@@ -12,9 +12,13 @@ export const setPostChatContextAndLoadSurvey = async (facadeChatSDK, dispatch, p
12
12
  const postChatEnabled = await isPostChatSurveyEnabled(facadeChatSDK);
13
13
  if (postChatEnabled) {
14
14
  if (!persistedChat) {
15
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
16
+ Event: TelemetryEvent.PostChatContextCallStarted,
17
+ Description: PostChatSurveyTelemetryMessage.PostChatContextCallStarted
18
+ });
15
19
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
20
  const context = await facadeChatSDK.getPostChatSurveyContext();
17
- TelemetryHelper.logSDKEvent(LogLevel.INFO, {
21
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
18
22
  Event: TelemetryEvent.PostChatContextCallSucceed,
19
23
  Description: PostChatSurveyTelemetryMessage.PostChatContextCallSucceed
20
24
  });
@@ -25,8 +29,9 @@ export const setPostChatContextAndLoadSurvey = async (facadeChatSDK, dispatch, p
25
29
  }
26
30
  }
27
31
  } catch (ex) {
28
- TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
32
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.ERROR, {
29
33
  Event: TelemetryEvent.PostChatContextCallFailed,
34
+ Description: PostChatSurveyTelemetryMessage.PostChatContextCallFailed,
30
35
  ExceptionDetails: {
31
36
  exception: ex
32
37
  }