@microsoft/omnichannel-chat-widget 1.7.8-main.ab4d3b4 → 1.7.8-main.cf04c1c

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