@microsoft/omnichannel-chat-widget 1.7.8-main.f60b0b7 → 1.8.0

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 (404) 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 +160 -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 +71 -56
  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 +45 -40
  32. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +5 -4
  33. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +28 -23
  34. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
  35. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -10
  36. package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +28 -0
  37. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
  38. package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
  39. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
  40. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
  41. package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
  42. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
  43. package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
  44. package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +62 -52
  45. package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
  46. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
  47. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
  48. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
  49. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  50. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +2 -0
  51. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
  52. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +17 -6
  53. package/lib/cjs/controller/componentController.js +3 -2
  54. package/lib/cjs/firstresponselatency/Constants.js +13 -0
  55. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +118 -0
  56. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +201 -0
  57. package/lib/cjs/firstresponselatency/util.js +98 -0
  58. package/lib/cjs/plugins/createChatTranscript.js +88 -58
  59. package/lib/cjs/plugins/newMessageEventHandler.js +105 -88
  60. package/lib/esm/common/Constants.js +65 -19
  61. package/lib/esm/common/KeyCodes.js +6 -1
  62. package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -1
  63. package/lib/esm/common/facades/FacadeChatSDK.js +392 -295
  64. package/lib/esm/common/storage/default/defaultCacheManager.js +6 -1
  65. package/lib/esm/common/telemetry/AppInsightsEvents.js +24 -0
  66. package/lib/esm/common/telemetry/ScenarioMarker.js +59 -0
  67. package/lib/esm/common/telemetry/TelemetryConstants.js +160 -129
  68. package/lib/esm/common/telemetry/TelemetryHelper.js +281 -250
  69. package/lib/esm/common/telemetry/TelemetryManager.js +32 -12
  70. package/lib/esm/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +4 -0
  71. package/lib/esm/common/telemetry/interfaces/IAppInsightsConfig.js +1 -0
  72. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +139 -0
  73. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -14
  74. package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +3 -2
  75. package/lib/esm/components/footerstateful/FooterStateful.js +11 -6
  76. package/lib/esm/components/headerstateful/HeaderStateful.js +21 -11
  77. package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +32 -19
  78. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +71 -56
  79. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +17 -8
  80. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +65 -52
  81. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +31 -18
  82. package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +14 -6
  83. package/lib/esm/components/livechatwidget/common/Deferred.js +14 -6
  84. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
  85. package/lib/esm/components/livechatwidget/common/endChat.js +4 -18
  86. package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -6
  87. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -1
  88. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +6 -3
  89. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +7 -2
  90. package/lib/esm/components/livechatwidget/common/startChat.js +46 -41
  91. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +5 -4
  92. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +28 -23
  93. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
  94. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -10
  95. package/lib/esm/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +21 -0
  96. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
  97. package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
  98. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
  99. package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
  100. package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
  101. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
  102. package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
  103. package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +63 -52
  104. package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
  105. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
  106. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
  107. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
  108. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  109. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +2 -0
  110. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
  111. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +17 -6
  112. package/lib/esm/controller/componentController.js +3 -2
  113. package/lib/esm/firstresponselatency/Constants.js +6 -0
  114. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +112 -0
  115. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +194 -0
  116. package/lib/esm/firstresponselatency/util.js +87 -0
  117. package/lib/esm/plugins/createChatTranscript.js +88 -58
  118. package/lib/esm/plugins/newMessageEventHandler.js +103 -86
  119. package/lib/types/assets/Audios.d.ts +1 -1
  120. package/lib/types/assets/Icons.d.ts +16 -16
  121. package/lib/types/common/Constants.d.ts +283 -277
  122. package/lib/types/common/KeyCodes.d.ts +5 -5
  123. package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -4
  124. package/lib/types/common/facades/FacadeChatSDK.d.ts +75 -74
  125. package/lib/types/common/facades/types/IFacadeChatSDKInput.d.ts +13 -13
  126. package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -14
  127. package/lib/types/common/interfaces/ITimer.d.ts +3 -3
  128. package/lib/types/common/storage/default/defaultCacheManager.d.ts +5 -5
  129. package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +4 -4
  130. package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -6
  131. package/lib/types/common/telemetry/AppInsightsEvents.d.ts +1 -0
  132. package/lib/types/common/telemetry/ScenarioMarker.d.ts +19 -0
  133. package/lib/types/common/telemetry/TelemetryConstants.d.ts +272 -255
  134. package/lib/types/common/telemetry/TelemetryHelper.d.ts +48 -43
  135. package/lib/types/common/telemetry/TelemetryManager.d.ts +12 -12
  136. package/lib/types/common/telemetry/defaultConfigs/defaultAppInsightsConfig.d.ts +2 -0
  137. package/lib/types/common/telemetry/defaultConfigs/defaultAriaConfig.d.ts +2 -2
  138. package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.d.ts +2 -2
  139. package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryInternalData.d.ts +2 -2
  140. package/lib/types/common/telemetry/definitions/Contracts.d.ts +77 -77
  141. package/lib/types/common/telemetry/definitions/Payload.d.ts +105 -105
  142. package/lib/types/common/telemetry/interfaces/IAppInsightsConfig.d.ts +4 -0
  143. package/lib/types/common/telemetry/interfaces/IAriaConfigurations.d.ts +18 -18
  144. package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +6 -5
  145. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +23 -21
  146. package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +48 -48
  147. package/lib/types/common/telemetry/interfaces/ITelemetryEvents.d.ts +7 -7
  148. package/lib/types/common/telemetry/loggers/appInsightsLogger.d.ts +10 -0
  149. package/lib/types/common/telemetry/loggers/ariaTelemetryLogger.d.ts +2 -2
  150. package/lib/types/common/telemetry/loggers/consoleLogger.d.ts +2 -2
  151. package/lib/types/common/utils.d.ts +49 -49
  152. package/lib/types/components/callingcontainerstateful/CallingContainerStateful.d.ts +4 -3
  153. package/lib/types/components/callingcontainerstateful/ICallingContainerStatefulProps.d.ts +4 -4
  154. package/lib/types/components/chatbuttonstateful/ChatButtonStateful.d.ts +4 -3
  155. package/lib/types/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.d.ts +2 -2
  156. package/lib/types/components/chatbuttonstateful/interfaces/IChatButtonStatefulParams.d.ts +17 -17
  157. package/lib/types/components/confirmationpanestateful/ConfirmationPaneStateful.d.ts +4 -3
  158. package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +2 -2
  159. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneInputs.d.ts +4 -4
  160. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.d.ts +10 -10
  161. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +13 -13
  162. package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +8 -8
  163. package/lib/types/components/dimlayer/DimLayer.d.ts +6 -5
  164. package/lib/types/components/draggable/DraggableChatWidget.d.ts +9 -9
  165. package/lib/types/components/draggable/DraggableEventEmitter.d.ts +27 -27
  166. package/lib/types/components/draggable/DraggableEventNames.d.ts +6 -6
  167. package/lib/types/components/draggable/DraggableEventReceiver.d.ts +27 -27
  168. package/lib/types/components/draggable/IDraggableElementPosition.d.ts +5 -5
  169. package/lib/types/components/draggable/IDraggableElementPositionDelta.d.ts +5 -5
  170. package/lib/types/components/draggable/IDraggableEvent.d.ts +12 -12
  171. package/lib/types/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.d.ts +4 -3
  172. package/lib/types/components/emailtranscriptpanestateful/interfaces/IChatTranscriptBody.d.ts +5 -5
  173. package/lib/types/components/emailtranscriptpanestateful/interfaces/IEmailTranscriptPaneProps.d.ts +11 -11
  174. package/lib/types/components/footerstateful/FooterStateful.d.ts +3 -2
  175. package/lib/types/components/footerstateful/audionotificationstateful/AudioNotificationStateful.d.ts +4 -3
  176. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationProps.d.ts +3 -3
  177. package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +4 -4
  178. package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +4 -4
  179. package/lib/types/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.d.ts +23 -23
  180. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps.d.ts +19 -19
  181. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +14 -14
  182. package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/TranscriptHtmlScripts.d.ts +33 -33
  183. package/lib/types/components/headerstateful/HeaderStateful.d.ts +4 -3
  184. package/lib/types/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.d.ts +2 -2
  185. package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +33 -33
  186. package/lib/types/components/livechatwidget/LiveChatWidget.d.ts +4 -3
  187. package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -14
  188. package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +12 -12
  189. package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -5
  190. package/lib/types/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.d.ts +7 -7
  191. package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -6
  192. package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -7
  193. package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -7
  194. package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -9
  195. package/lib/types/components/livechatwidget/common/authHelper.d.ts +18 -18
  196. package/lib/types/components/livechatwidget/common/chatDisconnectHelper.d.ts +4 -4
  197. package/lib/types/components/livechatwidget/common/createAdapter.d.ts +3 -3
  198. package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +25 -25
  199. package/lib/types/components/livechatwidget/common/createFooter.d.ts +4 -3
  200. package/lib/types/components/livechatwidget/common/createInternetConnectionChangeHandler.d.ts +2 -2
  201. package/lib/types/components/livechatwidget/common/createMarkdown.d.ts +2 -2
  202. package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -2
  203. package/lib/types/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.d.ts +2 -2
  204. package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -1
  205. package/lib/types/components/livechatwidget/common/endChat.d.ts +13 -13
  206. package/lib/types/components/livechatwidget/common/getGeneralStylesForButton.d.ts +3 -3
  207. package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -1
  208. package/lib/types/components/livechatwidget/common/helpers/markdownHelper.d.ts +2 -2
  209. package/lib/types/components/livechatwidget/common/initCallingSdk.d.ts +2 -2
  210. package/lib/types/components/livechatwidget/common/initConfirmationPropsComposer.d.ts +3 -3
  211. package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +7 -7
  212. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +3 -3
  213. package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -3
  214. package/lib/types/components/livechatwidget/common/persistentChatHelper.d.ts +1 -1
  215. package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +12 -12
  216. package/lib/types/components/livechatwidget/common/registerTelemetryLoggers.d.ts +4 -4
  217. package/lib/types/components/livechatwidget/common/renderSurveyHelpers.d.ts +10 -10
  218. package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +4 -4
  219. package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -1
  220. package/lib/types/components/livechatwidget/common/startChat.d.ts +11 -11
  221. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +6 -6
  222. package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +4 -4
  223. package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +4 -4
  224. package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -4
  225. package/lib/types/components/livechatwidget/interfaces/IDraggableChatWidgetProps.d.ts +10 -10
  226. package/lib/types/components/livechatwidget/interfaces/IFeatureConfigProps.d.ts +3 -3
  227. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +17 -17
  228. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +21 -21
  229. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +70 -68
  230. package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetStyleProps.d.ts +5 -5
  231. package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -8
  232. package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -22
  233. package/lib/types/components/livechatwidget/interfaces/ISendBox.d.ts +12 -12
  234. package/lib/types/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.d.ts +3 -3
  235. package/lib/types/components/loadingpanestateful/LoadingPaneStateful.d.ts +3 -2
  236. package/lib/types/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.d.ts +2 -2
  237. package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -2
  238. package/lib/types/components/notificationpanestateful/NotificationPaneStateful.d.ts +4 -3
  239. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.d.ts +2 -2
  240. package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.d.ts +2 -2
  241. package/lib/types/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.d.ts +13 -13
  242. package/lib/types/components/ooohpanestateful/OOOHPaneStateful.d.ts +4 -3
  243. package/lib/types/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.d.ts +2 -2
  244. package/lib/types/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.d.ts +4 -3
  245. package/lib/types/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.d.ts +2 -2
  246. package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +4 -3
  247. package/lib/types/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.d.ts +2 -2
  248. package/lib/types/components/postchatsurveypanestateful/common/isValidSurveyUrl.d.ts +2 -0
  249. package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -5
  250. package/lib/types/components/postchatsurveypanestateful/enums/PostChatSurveyMode.d.ts +4 -4
  251. package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +5 -5
  252. package/lib/types/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.d.ts +4 -3
  253. package/lib/types/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.d.ts +2 -2
  254. package/lib/types/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.d.ts +2 -2
  255. package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +5 -5
  256. package/lib/types/components/proactivechatpanestateful/ProactiveChatPaneStateful.d.ts +3 -2
  257. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -3
  258. package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps.d.ts +4 -4
  259. package/lib/types/components/reconnectchatpanestateful/ReconnectChatPaneStateful.d.ts +4 -3
  260. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatContext.d.ts +4 -4
  261. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatOptionalParams.d.ts +3 -3
  262. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulParams.d.ts +5 -5
  263. package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +5 -5
  264. package/lib/types/components/startchaterrorpanestateful/StartChatErrorPaneStateful.d.ts +4 -3
  265. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.d.ts +2 -2
  266. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.d.ts +2 -2
  267. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.d.ts +2 -2
  268. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.d.ts +2 -2
  269. package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.d.ts +2 -2
  270. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.d.ts +5 -5
  271. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.d.ts +6 -6
  272. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +14 -14
  273. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +8 -8
  274. package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.d.ts +10 -10
  275. package/lib/types/components/webchatcontainerstateful/WebChatContainerStateful.d.ts +4 -3
  276. package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -10
  277. package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -6
  278. package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -8
  279. package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +31 -31
  280. package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -6
  281. package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -11
  282. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.d.ts +2 -2
  283. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.d.ts +2 -2
  284. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.d.ts +2 -2
  285. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.d.ts +2 -2
  286. package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.d.ts +2 -2
  287. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -2
  288. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.d.ts +2 -2
  289. package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.d.ts +2 -2
  290. package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +14 -14
  291. package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +45 -45
  292. package/lib/types/components/webchatcontainerstateful/common/utils/BrowserInfo.d.ts +5 -5
  293. package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +7 -7
  294. package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -9
  295. package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -9
  296. package/lib/types/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.d.ts +2 -2
  297. package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +8 -8
  298. package/lib/types/components/webchatcontainerstateful/interfaces/IAttachmentProps.d.ts +5 -5
  299. package/lib/types/components/webchatcontainerstateful/interfaces/IBotAuthConfig.d.ts +4 -4
  300. package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -4
  301. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingInfo.d.ts +6 -6
  302. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingRule.d.ts +3 -3
  303. package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingSetting.d.ts +4 -4
  304. package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +37 -37
  305. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatAction.d.ts +4 -4
  306. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +28 -28
  307. package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatProps.d.ts +39 -39
  308. package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -3
  309. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.d.ts +3 -3
  310. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.d.ts +9 -9
  311. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.d.ts +4 -4
  312. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.d.ts +5 -5
  313. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.d.ts +11 -11
  314. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.d.ts +6 -6
  315. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +11 -11
  316. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.d.ts +5 -5
  317. package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts +24 -24
  318. package/lib/types/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.d.ts +9 -9
  319. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.d.ts +2 -2
  320. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.d.ts +2 -2
  321. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +10 -10
  322. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
  323. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.d.ts +6 -6
  324. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +3 -2
  325. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +3 -2
  326. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +3 -2
  327. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +3 -2
  328. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -6
  329. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +3 -2
  330. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +3 -2
  331. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +3 -2
  332. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +8 -8
  333. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -2
  334. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.d.ts +1 -2
  335. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.d.ts +1 -2
  336. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.d.ts +1 -2
  337. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.d.ts +1 -2
  338. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.d.ts +1 -2
  339. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.d.ts +1 -2
  340. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.d.ts +1 -2
  341. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.d.ts +1 -2
  342. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.d.ts +1 -2
  343. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.d.ts +1 -2
  344. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +1 -2
  345. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.d.ts +1 -2
  346. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -3
  347. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.d.ts +11 -11
  348. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.d.ts +2 -2
  349. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.d.ts +1 -2
  350. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.d.ts +1 -2
  351. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.d.ts +1 -2
  352. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.d.ts +1 -2
  353. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.d.ts +1 -2
  354. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -3
  355. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.d.ts +3 -3
  356. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.d.ts +10 -10
  357. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/index.d.ts +10 -10
  358. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.d.ts +4 -4
  359. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +4 -4
  360. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.d.ts +2 -1
  361. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.d.ts +2 -1
  362. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +2 -1
  363. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.d.ts +2 -2
  364. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.d.ts +7 -6
  365. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.d.ts +10 -10
  366. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +11 -11
  367. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.d.ts +10 -10
  368. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.d.ts +11 -11
  369. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.d.ts +11 -11
  370. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.d.ts +10 -10
  371. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.d.ts +10 -10
  372. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.d.ts +10 -10
  373. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.d.ts +11 -11
  374. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.d.ts +10 -10
  375. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.d.ts +10 -10
  376. package/lib/types/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.d.ts +12 -12
  377. package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -1
  378. package/lib/types/contexts/ChatAdapterStore.d.ts +1 -2
  379. package/lib/types/contexts/ChatContextStore.d.ts +1 -1
  380. package/lib/types/contexts/ChatSDKStore.d.ts +1 -1
  381. package/lib/types/contexts/FacadeChatSDKStore.d.ts +1 -1
  382. package/lib/types/contexts/common/ConversationState.d.ts +13 -13
  383. package/lib/types/contexts/common/ILiveChatWidgetAction.d.ts +5 -5
  384. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +63 -63
  385. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +40 -40
  386. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +48 -48
  387. package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +3 -3
  388. package/lib/types/contexts/common/StartChatFailureType.d.ts +5 -5
  389. package/lib/types/contexts/createReducer.d.ts +4 -4
  390. package/lib/types/controller/componentController.d.ts +16 -16
  391. package/lib/types/firstresponselatency/Constants.d.ts +30 -0
  392. package/lib/types/firstresponselatency/FirstMessageTrackerFromBot.d.ts +1 -0
  393. package/lib/types/firstresponselatency/FirstResponseLatencyTracker.d.ts +22 -0
  394. package/lib/types/firstresponselatency/util.d.ts +7 -0
  395. package/lib/types/hooks/useChatAdapterStore.d.ts +2 -2
  396. package/lib/types/hooks/useChatContextStore.d.ts +5 -5
  397. package/lib/types/hooks/useChatSDKStore.d.ts +2 -2
  398. package/lib/types/hooks/useDebounce.d.ts +3 -3
  399. package/lib/types/hooks/useFacadeChatSDKStore.d.ts +3 -3
  400. package/lib/types/hooks/useWindowDimensions.d.ts +4 -4
  401. package/lib/types/index.d.ts +11 -11
  402. package/lib/types/plugins/createChatTranscript.d.ts +3 -3
  403. package/lib/types/plugins/newMessageEventHandler.d.ts +2 -2
  404. package/package.json +42 -17
@@ -1,12 +1,12 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
 
3
+ import { Constants, HtmlAttributeNames, HtmlClassNames } from "../../common/Constants";
3
4
  import { Stack } from "@fluentui/react";
4
5
  import { LogLevel, TelemetryEvent } from "../../common/telemetry/TelemetryConstants";
5
6
  import React, { useEffect } from "react";
6
7
  import { createTimer, getDeviceType, setFocusOnSendBox } from "../../common/utils";
7
8
  import { BotMagicCodeStore } from "./webchatcontroller/BotMagicCodeStore";
8
9
  import { Components } from "botframework-webchat";
9
- import { Constants, HtmlAttributeNames, HtmlClassNames } from "../../common/Constants";
10
10
  import { LiveChatWidgetActionType } from "../../contexts/common/LiveChatWidgetActionType";
11
11
  import { NotificationHandler } from "./webchatcontroller/notification/NotificationHandler";
12
12
  import { NotificationScenarios } from "./webchatcontroller/enums/NotificationScenarios";
@@ -48,7 +48,7 @@ const createMagicCodeSuccessResponse = signin => {
48
48
  };
49
49
  };
50
50
  export const WebChatContainerStateful = props => {
51
- var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _props$webChatContain9, _props$webChatContain10;
51
+ var _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _props$webChatContain5, _props$webChatContain6, _defaultWebChatContai, _props$webChatContain7, _props$webChatContain8, _defaultWebChatContai2, _webChatContainerProp8, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _webChatContainerProp16, _props$webChatContain9, _props$webChatContain10;
52
52
  useEffect(() => {
53
53
  uiTimer = createTimer();
54
54
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
@@ -233,16 +233,23 @@ export const WebChatContainerStateful = props => {
233
233
  color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp14 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp14 === void 0 ? void 0 : (_webChatContainerProp15 = _webChatContainerProp14.sentMessageAnchorStyles) === null || _webChatContainerProp15 === void 0 ? void 0 : _webChatContainerProp15.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
234
234
  }
235
235
 
236
+ // we had a nasty bug long time ago with crashing borders messing with the sendbox, so if customer adds this value, they need to deal with that
236
237
  .webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
237
- border-radius: 0 !important; /* Override border-radius */
238
+ border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp16 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp16 === void 0 ? void 0 : _webChatContainerProp16.bubbleBorderRadius) ?? 0} !important; /* Override border-radius */
238
239
  }
239
240
 
240
241
  .webchat__stacked-layout_container>div {
241
242
  background: ${(props === null || props === void 0 ? void 0 : (_props$webChatContain9 = props.webChatContainerProps) === null || _props$webChatContain9 === void 0 ? void 0 : (_props$webChatContain10 = _props$webChatContain9.containerStyles) === null || _props$webChatContain10 === void 0 ? void 0 : _props$webChatContain10.background) ?? ""}
242
243
  }
243
- .webchat__toaster__expandText {
244
+ .webchat__toast_text {
244
245
  display: flex;
246
+
245
247
  }
248
+ .webchat__toaster {
249
+ overflow-y: unset;
250
+ }
251
+
252
+
246
253
  `), /*#__PURE__*/React.createElement(Stack, {
247
254
  styles: containerStyles,
248
255
  className: "webchat__stacked-layout_container"
@@ -1,3 +1,15 @@
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; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ 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); }
6
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
7
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1
13
  import "rxjs/add/operator/share";
2
14
  import "rxjs/add/observable/of";
3
15
  import { Observable } from "rxjs/Observable";
@@ -6,74 +18,85 @@ import { customerUser, postBotMessageActivity, postBotAttachmentActivity, postBo
6
18
  import { createHeroCardAttachment, createJpgFileAttachment, createSigninCardAttachment, createThumbnailCardAttachment } from "./utils/attachmentActivityUtils";
7
19
  import MockBotCommand from "./MockBotCommand";
8
20
  import MockBotCardCommandType from "./MockBotCardCommandType";
9
- export class DemoChatAdapter extends MockAdapter {
10
- constructor() {
11
- super();
21
+ export let DemoChatAdapter = /*#__PURE__*/function (_MockAdapter) {
22
+ _inherits(DemoChatAdapter, _MockAdapter);
23
+ var _super = _createSuper(DemoChatAdapter);
24
+ function DemoChatAdapter() {
25
+ var _this;
26
+ _classCallCheck(this, DemoChatAdapter);
27
+ _this = _super.call(this);
12
28
  setTimeout(() => {
13
- postSystemMessageActivity(this.activityObserver, "You're currently using a demo.", 0);
14
- postBotMessageActivity(this.activityObserver, "Type `/help` to learn more", undefined, 0); // send init message from bot
29
+ postSystemMessageActivity(_this.activityObserver, "You're currently using a demo.", 0);
30
+ postBotMessageActivity(_this.activityObserver, "Type `/help` to learn more", undefined, 0); // send init message from bot
15
31
  }, 1000);
32
+ return _this;
16
33
  }
17
- postBotCommandsActivity() {
18
- let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;
19
- postBotAttachmentActivity(this.activityObserver, [{
20
- contentType: "application/vnd.microsoft.card.thumbnail",
21
- content: {
22
- buttons: [{
23
- title: "Send system message",
24
- type: "imBack",
25
- value: "send system message"
26
- }, {
27
- title: "Send typing",
28
- type: "imBack",
29
- value: "send typing"
30
- }, {
31
- title: "Send bot message",
32
- type: "imBack",
33
- value: "send bot message"
34
- }],
35
- title: "Commands"
36
- }
37
- }], delay);
38
- }
39
- postActivity(activity) {
40
- if (activity) {
41
- postEchoActivity(this.activityObserver, activity, customerUser);
42
- if (activity.text) {
43
- switch (true) {
44
- case activity.text === MockBotCommand.Help:
45
- this.postBotCommandsActivity();
46
- break;
47
- case activity.text === MockBotCommand.SendSystemMessage:
48
- postSystemMessageActivity(this.activityObserver, "Contoso has joined the chat.");
49
- break;
50
- case activity.text === MockBotCommand.SendTyping:
51
- postBotTypingActivity(this.activityObserver);
52
- break;
53
- case activity.text === MockBotCommand.SendAttachment:
54
- postBotAttachmentActivity(this.activityObserver, [createJpgFileAttachment()]);
55
- break;
56
- case activity.text === MockBotCommand.SendBotMessage:
57
- postBotMessageActivity(this.activityObserver, "Hi, how can I help you?");
58
- break;
59
- case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Signin}`:
60
- postBotAttachmentActivity(this.activityObserver, [createSigninCardAttachment()]);
61
- break;
62
- case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Hero}`:
63
- postBotAttachmentActivity(this.activityObserver, [createHeroCardAttachment()]);
64
- break;
65
- case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Thumbnail}`:
66
- postBotAttachmentActivity(this.activityObserver, [createThumbnailCardAttachment()]);
67
- break;
68
- case activity.text.startsWith(`${MockBotCommand.Bot} `):
69
- postBotMessageActivity(this.activityObserver, activity.text.substring(5));
70
- break;
71
- case activity.text.startsWith(`${MockBotCommand.System} `):
72
- postSystemMessageActivity(this.activityObserver, activity.text.substring(8));
73
- break;
34
+ _createClass(DemoChatAdapter, [{
35
+ key: "postBotCommandsActivity",
36
+ value: function postBotCommandsActivity() {
37
+ let delay = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1000;
38
+ postBotAttachmentActivity(this.activityObserver, [{
39
+ contentType: "application/vnd.microsoft.card.thumbnail",
40
+ content: {
41
+ buttons: [{
42
+ title: "Send system message",
43
+ type: "imBack",
44
+ value: "send system message"
45
+ }, {
46
+ title: "Send typing",
47
+ type: "imBack",
48
+ value: "send typing"
49
+ }, {
50
+ title: "Send bot message",
51
+ type: "imBack",
52
+ value: "send bot message"
53
+ }],
54
+ title: "Commands"
55
+ }
56
+ }], delay);
57
+ }
58
+ }, {
59
+ key: "postActivity",
60
+ value: function postActivity(activity) {
61
+ if (activity) {
62
+ postEchoActivity(this.activityObserver, activity, customerUser);
63
+ if (activity.text) {
64
+ switch (true) {
65
+ case activity.text === MockBotCommand.Help:
66
+ this.postBotCommandsActivity();
67
+ break;
68
+ case activity.text === MockBotCommand.SendSystemMessage:
69
+ postSystemMessageActivity(this.activityObserver, "Contoso has joined the chat.");
70
+ break;
71
+ case activity.text === MockBotCommand.SendTyping:
72
+ postBotTypingActivity(this.activityObserver);
73
+ break;
74
+ case activity.text === MockBotCommand.SendAttachment:
75
+ postBotAttachmentActivity(this.activityObserver, [createJpgFileAttachment()]);
76
+ break;
77
+ case activity.text === MockBotCommand.SendBotMessage:
78
+ postBotMessageActivity(this.activityObserver, "Hi, how can I help you?");
79
+ break;
80
+ case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Signin}`:
81
+ postBotAttachmentActivity(this.activityObserver, [createSigninCardAttachment()]);
82
+ break;
83
+ case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Hero}`:
84
+ postBotAttachmentActivity(this.activityObserver, [createHeroCardAttachment()]);
85
+ break;
86
+ case activity.text === `${MockBotCommand.Card} ${MockBotCardCommandType.Thumbnail}`:
87
+ postBotAttachmentActivity(this.activityObserver, [createThumbnailCardAttachment()]);
88
+ break;
89
+ case activity.text.startsWith(`${MockBotCommand.Bot} `):
90
+ postBotMessageActivity(this.activityObserver, activity.text.substring(5));
91
+ break;
92
+ case activity.text.startsWith(`${MockBotCommand.System} `):
93
+ postSystemMessageActivity(this.activityObserver, activity.text.substring(8));
94
+ break;
95
+ }
74
96
  }
75
97
  }
98
+ return Observable.of(activity.id || "");
76
99
  }
77
- return Observable.of(activity.id || "");
78
- }
79
- }
100
+ }]);
101
+ return DemoChatAdapter;
102
+ }(MockAdapter);
@@ -1,10 +1,29 @@
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; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ 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); }
6
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
7
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1
13
  import { DemoChatAdapter } from "./DemoChatAdapter";
2
14
  import { MockChatSDK } from "./mockchatsdk";
3
- export class DemoChatSDK extends MockChatSDK {
4
- constructor() {
5
- super();
15
+ export let DemoChatSDK = /*#__PURE__*/function (_MockChatSDK) {
16
+ _inherits(DemoChatSDK, _MockChatSDK);
17
+ var _super = _createSuper(DemoChatSDK);
18
+ function DemoChatSDK() {
19
+ _classCallCheck(this, DemoChatSDK);
20
+ return _super.call(this);
6
21
  }
7
- createChatAdapter() {
8
- return new DemoChatAdapter();
9
- }
10
- }
22
+ _createClass(DemoChatSDK, [{
23
+ key: "createChatAdapter",
24
+ value: function createChatAdapter() {
25
+ return new DemoChatAdapter();
26
+ }
27
+ }]);
28
+ return DemoChatSDK;
29
+ }(MockChatSDK);
@@ -1,33 +1,56 @@
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; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ 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); }
6
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
7
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
9
+ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
10
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
11
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1
13
  import { Observable } from "rxjs/Observable";
2
14
  import MockAdapter from "./mockadapter";
3
15
  import { customerUser, postBotMessageActivity, postEchoActivity, postSystemMessageActivity } from "./utils/chatAdapterUtils";
4
- export class DesignerChatAdapter extends MockAdapter {
5
- constructor() {
6
- super();
16
+ export let DesignerChatAdapter = /*#__PURE__*/function (_MockAdapter) {
17
+ _inherits(DesignerChatAdapter, _MockAdapter);
18
+ var _super = _createSuper(DesignerChatAdapter);
19
+ function DesignerChatAdapter() {
20
+ var _this;
21
+ _classCallCheck(this, DesignerChatAdapter);
22
+ _this = _super.call(this);
7
23
  setTimeout(() => {
8
- postBotMessageActivity(this.activityObserver, "Thank you for contacting us! How can I help you today?", undefined, 0);
9
- this.postUserActivity("I need to change my address.", 0);
10
- postBotMessageActivity(this.activityObserver, "Okay, let me connect you with a live agent.", undefined, 100);
11
- postSystemMessageActivity(this.activityObserver, "John has joined the chat", 100);
12
- postBotMessageActivity(this.activityObserver, "I'd be happy to help you update your account.", undefined, 100);
24
+ postBotMessageActivity(_this.activityObserver, "Thank you for contacting us! How can I help you today?", undefined, 0);
25
+ _this.postUserActivity("I need to change my address.", 0);
26
+ postBotMessageActivity(_this.activityObserver, "Okay, let me connect you with a live agent.", undefined, 100);
27
+ postSystemMessageActivity(_this.activityObserver, "John has joined the chat", 100);
28
+ postBotMessageActivity(_this.activityObserver, "I'd be happy to help you update your account.", undefined, 100);
13
29
  }, 1000);
30
+ return _this;
14
31
  }
15
- postUserActivity(text) {
16
- let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
17
- setTimeout(() => {
18
- postEchoActivity(this.activityObserver, {
19
- text,
20
- from: {
21
- ...customerUser
22
- },
23
- type: "message"
24
- }, customerUser, 0);
25
- }, delay);
26
- }
27
- postActivity(activity) {
28
- if (activity) {
29
- postEchoActivity(this.activityObserver, activity, customerUser);
32
+ _createClass(DesignerChatAdapter, [{
33
+ key: "postUserActivity",
34
+ value: function postUserActivity(text) {
35
+ let delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;
36
+ setTimeout(() => {
37
+ postEchoActivity(this.activityObserver, {
38
+ text,
39
+ from: {
40
+ ...customerUser
41
+ },
42
+ type: "message"
43
+ }, customerUser, 0);
44
+ }, delay);
30
45
  }
31
- return Observable.of(activity.id || "");
32
- }
33
- }
46
+ }, {
47
+ key: "postActivity",
48
+ value: function postActivity(activity) {
49
+ if (activity) {
50
+ postEchoActivity(this.activityObserver, activity, customerUser);
51
+ }
52
+ return Observable.of(activity.id || "");
53
+ }
54
+ }]);
55
+ return DesignerChatAdapter;
56
+ }(MockAdapter);
@@ -1,41 +1,63 @@
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; }
4
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
5
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
6
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
7
+ function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
8
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
9
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
1
11
  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
12
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
13
  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
14
  import { DesignerChatAdapter } from "./DesignerChatAdapter";
5
15
  import { MockChatSDK } from "./mockchatsdk";
6
- export class DesignerChatSDK extends MockChatSDK {
7
- constructor() {
8
- super();
9
- _defineProperty(this, "localeId", this.getLiveChatConfig().ChatWidgetLanguage.msdyn_localeid);
16
+ export let DesignerChatSDK = /*#__PURE__*/function (_MockChatSDK) {
17
+ _inherits(DesignerChatSDK, _MockChatSDK);
18
+ var _super = _createSuper(DesignerChatSDK);
19
+ function DesignerChatSDK() {
20
+ var _this;
21
+ _classCallCheck(this, DesignerChatSDK);
22
+ _this = _super.call(this);
23
+ _defineProperty(_assertThisInitialized(_this), "localeId", _this.getLiveChatConfig().ChatWidgetLanguage.msdyn_localeid);
24
+ return _this;
10
25
  }
11
- createChatAdapter() {
12
- return new DesignerChatAdapter();
13
- }
14
- /**
15
- * If the widget is running in designer mode, we mock the initialize response. We don't want
16
- * any interactions with a real server in when designing LCW widget visually in Modern Admin.
17
- *
18
- * - All GUIDs were changed to 00000000-0000-0000-0000-000000000000.
19
- * - msdyn_callingoptions was changed to disable calling functionality
20
- */
21
- getLiveChatConfig() {
22
- return {
23
- LiveWSAndLiveChatEngJoin: {
24
- msdyn_widgetthemecolor: "19236002",
25
- // msdyn_callingoptions was changed to disable calling functionality
26
- msdyn_callingoptions: "192350000",
27
- msdyn_widgettitle: "Let\u0027s chat",
28
- msdyn_conversationmode: "192350000",
29
- msdyn_avatarurl: "https://oc-cdn-ocprod.azureedge.net/livechatwidget/images/chatIcon.svg",
30
- msdyn_name: "Let's Chat",
31
- msdyn_postconversationsurveyenable: "false",
32
- OutOfOperatingHours: "False",
33
- ShowWidget: "True"
34
- },
35
- ChatWidgetLanguage: {
36
- msdyn_localeid: "1033",
37
- msdyn_languagename: "English - United States"
38
- }
39
- };
40
- }
41
- }
26
+ _createClass(DesignerChatSDK, [{
27
+ key: "createChatAdapter",
28
+ value: function createChatAdapter() {
29
+ return new DesignerChatAdapter();
30
+ }
31
+ }, {
32
+ key: "getLiveChatConfig",
33
+ value:
34
+ /**
35
+ * If the widget is running in designer mode, we mock the initialize response. We don't want
36
+ * any interactions with a real server in when designing LCW widget visually in Modern Admin.
37
+ *
38
+ * - All GUIDs were changed to 00000000-0000-0000-0000-000000000000.
39
+ * - msdyn_callingoptions was changed to disable calling functionality
40
+ */
41
+ function getLiveChatConfig() {
42
+ return {
43
+ LiveWSAndLiveChatEngJoin: {
44
+ msdyn_widgetthemecolor: "19236002",
45
+ // msdyn_callingoptions was changed to disable calling functionality
46
+ msdyn_callingoptions: "192350000",
47
+ msdyn_widgettitle: "Let\u0027s chat",
48
+ msdyn_conversationmode: "192350000",
49
+ msdyn_avatarurl: "https://oc-cdn-ocprod.azureedge.net/livechatwidget/images/chatIcon.svg",
50
+ msdyn_name: "Let's Chat",
51
+ msdyn_postconversationsurveyenable: "false",
52
+ OutOfOperatingHours: "False",
53
+ ShowWidget: "True"
54
+ },
55
+ ChatWidgetLanguage: {
56
+ msdyn_localeid: "1033",
57
+ msdyn_languagename: "English - United States"
58
+ }
59
+ };
60
+ }
61
+ }]);
62
+ return DesignerChatSDK;
63
+ }(MockChatSDK);
@@ -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); }
@@ -7,8 +10,9 @@ import { ConnectionStatus } from "botframework-directlinejs";
7
10
  import { BehaviorSubject } from "rxjs";
8
11
  import { Observable } from "rxjs/Observable";
9
12
  import { uuidv4 } from "@microsoft/omnichannel-chat-sdk";
10
- export default class MockAdapter {
11
- constructor() {
13
+ let MockAdapter = /*#__PURE__*/function () {
14
+ function MockAdapter() {
15
+ _classCallCheck(this, MockAdapter);
12
16
  _defineProperty(this, "activityObserver", void 0);
13
17
  _defineProperty(this, "activity$", void 0);
14
18
  _defineProperty(this, "connectionStatus$", new BehaviorSubject(ConnectionStatus.Uninitialized));
@@ -27,56 +31,63 @@ export default class MockAdapter {
27
31
  });
28
32
  }).share();
29
33
  }
30
- postActivity(activity) {
31
- if (activity) {
32
- var _activity$text;
33
- let modActivity;
34
- let typingActivity;
35
- const userId = "userId",
36
- botId = "botId";
37
- if ((_activity$text = activity.text) !== null && _activity$text !== void 0 && _activity$text.startsWith(":")) {
38
- var _this$activityObserve, _this$activityObserve2;
39
- modActivity = {
40
- ...activity,
41
- id: uuidv4(),
42
- from: {
43
- ...activity.from,
44
- id: botId,
45
- name: "Bot",
46
- role: "bot"
47
- },
48
- text: activity.text.substr(1)
49
- };
50
- typingActivity = {
51
- id: uuidv4(),
52
- from: {
34
+ _createClass(MockAdapter, [{
35
+ key: "postActivity",
36
+ value: function postActivity(activity) {
37
+ if (activity) {
38
+ var _activity$text;
39
+ let modActivity;
40
+ let typingActivity;
41
+ const userId = "userId",
42
+ botId = "botId";
43
+ if ((_activity$text = activity.text) !== null && _activity$text !== void 0 && _activity$text.startsWith(":")) {
44
+ var _this$activityObserve, _this$activityObserve2;
45
+ modActivity = {
46
+ ...activity,
53
47
  id: uuidv4(),
54
- name: "Bot",
55
- role: "bot"
56
- },
57
- type: "typing"
58
- };
59
- (_this$activityObserve = this.activityObserver) === null || _this$activityObserve === void 0 ? void 0 : _this$activityObserve.next(modActivity); // mock echo message
60
- (_this$activityObserve2 = this.activityObserver) === null || _this$activityObserve2 === void 0 ? void 0 : _this$activityObserve2.next(typingActivity); // mock typing
61
- } else {
62
- var _this$activityObserve3;
63
- modActivity = {
64
- ...activity,
65
- id: uuidv4(),
66
- from: {
67
- ...activity.from,
68
- id: userId,
69
- name: "User",
70
- role: "user"
71
- }
72
- };
73
- (_this$activityObserve3 = this.activityObserver) === null || _this$activityObserve3 === void 0 ? void 0 : _this$activityObserve3.next(modActivity); // mock message sent
48
+ from: {
49
+ ...activity.from,
50
+ id: botId,
51
+ name: "Bot",
52
+ role: "bot"
53
+ },
54
+ text: activity.text.substr(1)
55
+ };
56
+ typingActivity = {
57
+ id: uuidv4(),
58
+ from: {
59
+ id: uuidv4(),
60
+ name: "Bot",
61
+ role: "bot"
62
+ },
63
+ type: "typing"
64
+ };
65
+ (_this$activityObserve = this.activityObserver) === null || _this$activityObserve === void 0 ? void 0 : _this$activityObserve.next(modActivity); // mock echo message
66
+ (_this$activityObserve2 = this.activityObserver) === null || _this$activityObserve2 === void 0 ? void 0 : _this$activityObserve2.next(typingActivity); // mock typing
67
+ } else {
68
+ var _this$activityObserve3;
69
+ modActivity = {
70
+ ...activity,
71
+ id: uuidv4(),
72
+ from: {
73
+ ...activity.from,
74
+ id: userId,
75
+ name: "User",
76
+ role: "user"
77
+ }
78
+ };
79
+ (_this$activityObserve3 = this.activityObserver) === null || _this$activityObserve3 === void 0 ? void 0 : _this$activityObserve3.next(modActivity); // mock message sent
80
+ }
74
81
  }
75
- }
76
82
 
77
- return Observable.of(activity.id || "");
78
- }
79
- end() {
80
- return;
81
- }
82
- }
83
+ return Observable.of(activity.id || "");
84
+ }
85
+ }, {
86
+ key: "end",
87
+ value: function end() {
88
+ return;
89
+ }
90
+ }]);
91
+ return MockAdapter;
92
+ }();
93
+ export { MockAdapter as default };