@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.
- package/lib/cjs/common/Constants.js +67 -20
- package/lib/cjs/common/KeyCodes.js +6 -1
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +6 -1
- package/lib/cjs/common/facades/FacadeChatSDK.js +392 -295
- package/lib/cjs/common/storage/default/defaultCacheManager.js +6 -3
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +31 -0
- package/lib/cjs/common/telemetry/ScenarioMarker.js +66 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +160 -129
- package/lib/cjs/common/telemetry/TelemetryHelper.js +281 -250
- package/lib/cjs/common/telemetry/TelemetryManager.js +32 -12
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +11 -0
- package/lib/cjs/common/telemetry/interfaces/IAppInsightsConfig.js +1 -0
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +149 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +17 -14
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +3 -2
- package/lib/cjs/components/footerstateful/FooterStateful.js +11 -6
- package/lib/cjs/components/headerstateful/HeaderStateful.js +21 -11
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +32 -19
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +71 -56
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +17 -8
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +65 -52
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +31 -18
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +14 -6
- package/lib/cjs/components/livechatwidget/common/Deferred.js +14 -6
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
- package/lib/cjs/components/livechatwidget/common/endChat.js +4 -18
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +0 -5
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -1
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +6 -3
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +7 -2
- package/lib/cjs/components/livechatwidget/common/startChat.js +45 -40
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +5 -4
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +28 -23
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -10
- package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +28 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +62 -52
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +2 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +17 -6
- package/lib/cjs/controller/componentController.js +3 -2
- package/lib/cjs/firstresponselatency/Constants.js +13 -0
- package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +118 -0
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +201 -0
- package/lib/cjs/firstresponselatency/util.js +98 -0
- package/lib/cjs/plugins/createChatTranscript.js +88 -58
- package/lib/cjs/plugins/newMessageEventHandler.js +105 -88
- package/lib/esm/common/Constants.js +65 -19
- package/lib/esm/common/KeyCodes.js +6 -1
- package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -1
- package/lib/esm/common/facades/FacadeChatSDK.js +392 -295
- package/lib/esm/common/storage/default/defaultCacheManager.js +6 -1
- package/lib/esm/common/telemetry/AppInsightsEvents.js +24 -0
- package/lib/esm/common/telemetry/ScenarioMarker.js +59 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +160 -129
- package/lib/esm/common/telemetry/TelemetryHelper.js +281 -250
- package/lib/esm/common/telemetry/TelemetryManager.js +32 -12
- package/lib/esm/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +4 -0
- package/lib/esm/common/telemetry/interfaces/IAppInsightsConfig.js +1 -0
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +139 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -14
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +3 -2
- package/lib/esm/components/footerstateful/FooterStateful.js +11 -6
- package/lib/esm/components/headerstateful/HeaderStateful.js +21 -11
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +32 -19
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +71 -56
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +17 -8
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +65 -52
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +31 -18
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +14 -6
- package/lib/esm/components/livechatwidget/common/Deferred.js +14 -6
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
- package/lib/esm/components/livechatwidget/common/endChat.js +4 -18
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -6
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -1
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +6 -3
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +7 -2
- package/lib/esm/components/livechatwidget/common/startChat.js +46 -41
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +5 -4
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +28 -23
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +31 -10
- package/lib/esm/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +21 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +9 -6
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -6
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +11 -4
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +88 -65
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +26 -7
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +49 -26
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +57 -35
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +63 -52
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +95 -61
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +53 -39
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +2 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +88 -60
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +17 -6
- package/lib/esm/controller/componentController.js +3 -2
- package/lib/esm/firstresponselatency/Constants.js +6 -0
- package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +112 -0
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +194 -0
- package/lib/esm/firstresponselatency/util.js +87 -0
- package/lib/esm/plugins/createChatTranscript.js +88 -58
- package/lib/esm/plugins/newMessageEventHandler.js +103 -86
- package/lib/types/assets/Audios.d.ts +1 -1
- package/lib/types/assets/Icons.d.ts +16 -16
- package/lib/types/common/Constants.d.ts +283 -277
- package/lib/types/common/KeyCodes.d.ts +5 -5
- package/lib/types/common/contextDataStore/DataStoreManager.d.ts +4 -4
- package/lib/types/common/facades/FacadeChatSDK.d.ts +75 -74
- package/lib/types/common/facades/types/IFacadeChatSDKInput.d.ts +13 -13
- package/lib/types/common/interfaces/IContextDataStore.d.ts +14 -14
- package/lib/types/common/interfaces/ITimer.d.ts +3 -3
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +5 -5
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +4 -4
- package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -6
- package/lib/types/common/telemetry/AppInsightsEvents.d.ts +1 -0
- package/lib/types/common/telemetry/ScenarioMarker.d.ts +19 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +272 -255
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +48 -43
- package/lib/types/common/telemetry/TelemetryManager.d.ts +12 -12
- package/lib/types/common/telemetry/defaultConfigs/defaultAppInsightsConfig.d.ts +2 -0
- package/lib/types/common/telemetry/defaultConfigs/defaultAriaConfig.d.ts +2 -2
- package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.d.ts +2 -2
- package/lib/types/common/telemetry/defaultConfigs/defaultTelemetryInternalData.d.ts +2 -2
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +77 -77
- package/lib/types/common/telemetry/definitions/Payload.d.ts +105 -105
- package/lib/types/common/telemetry/interfaces/IAppInsightsConfig.d.ts +4 -0
- package/lib/types/common/telemetry/interfaces/IAriaConfigurations.d.ts +18 -18
- package/lib/types/common/telemetry/interfaces/IChatSDKLogger.d.ts +6 -5
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +23 -21
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +48 -48
- package/lib/types/common/telemetry/interfaces/ITelemetryEvents.d.ts +7 -7
- package/lib/types/common/telemetry/loggers/appInsightsLogger.d.ts +10 -0
- package/lib/types/common/telemetry/loggers/ariaTelemetryLogger.d.ts +2 -2
- package/lib/types/common/telemetry/loggers/consoleLogger.d.ts +2 -2
- package/lib/types/common/utils.d.ts +49 -49
- package/lib/types/components/callingcontainerstateful/CallingContainerStateful.d.ts +4 -3
- package/lib/types/components/callingcontainerstateful/ICallingContainerStatefulProps.d.ts +4 -4
- package/lib/types/components/chatbuttonstateful/ChatButtonStateful.d.ts +4 -3
- package/lib/types/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.d.ts +2 -2
- package/lib/types/components/chatbuttonstateful/interfaces/IChatButtonStatefulParams.d.ts +17 -17
- package/lib/types/components/confirmationpanestateful/ConfirmationPaneStateful.d.ts +4 -3
- package/lib/types/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.d.ts +2 -2
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneInputs.d.ts +4 -4
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneLocalizedText.d.ts +10 -10
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +13 -13
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulProps.d.ts +8 -8
- package/lib/types/components/dimlayer/DimLayer.d.ts +6 -5
- package/lib/types/components/draggable/DraggableChatWidget.d.ts +9 -9
- package/lib/types/components/draggable/DraggableEventEmitter.d.ts +27 -27
- package/lib/types/components/draggable/DraggableEventNames.d.ts +6 -6
- package/lib/types/components/draggable/DraggableEventReceiver.d.ts +27 -27
- package/lib/types/components/draggable/IDraggableElementPosition.d.ts +5 -5
- package/lib/types/components/draggable/IDraggableElementPositionDelta.d.ts +5 -5
- package/lib/types/components/draggable/IDraggableEvent.d.ts +12 -12
- package/lib/types/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.d.ts +4 -3
- package/lib/types/components/emailtranscriptpanestateful/interfaces/IChatTranscriptBody.d.ts +5 -5
- package/lib/types/components/emailtranscriptpanestateful/interfaces/IEmailTranscriptPaneProps.d.ts +11 -11
- package/lib/types/components/footerstateful/FooterStateful.d.ts +3 -2
- package/lib/types/components/footerstateful/audionotificationstateful/AudioNotificationStateful.d.ts +4 -3
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationProps.d.ts +3 -3
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +4 -4
- package/lib/types/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.d.ts +4 -4
- package/lib/types/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.d.ts +23 -23
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IDownloadTranscriptProps.d.ts +19 -19
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/IWebChatTranscriptConfig.d.ts +14 -14
- package/lib/types/components/footerstateful/downloadtranscriptstateful/interfaces/TranscriptHtmlScripts.d.ts +33 -33
- package/lib/types/components/headerstateful/HeaderStateful.d.ts +4 -3
- package/lib/types/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.d.ts +2 -2
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +33 -33
- package/lib/types/components/livechatwidget/LiveChatWidget.d.ts +4 -3
- package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -14
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +12 -12
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -5
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.d.ts +7 -7
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -6
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -7
- package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -7
- package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -9
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +18 -18
- package/lib/types/components/livechatwidget/common/chatDisconnectHelper.d.ts +4 -4
- package/lib/types/components/livechatwidget/common/createAdapter.d.ts +3 -3
- package/lib/types/components/livechatwidget/common/createDownloadTranscriptProps.d.ts +25 -25
- package/lib/types/components/livechatwidget/common/createFooter.d.ts +4 -3
- package/lib/types/components/livechatwidget/common/createInternetConnectionChangeHandler.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/createMarkdown.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/disposeTelemetryLoggers.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/endChat.d.ts +13 -13
- package/lib/types/components/livechatwidget/common/getGeneralStylesForButton.d.ts +3 -3
- package/lib/types/components/livechatwidget/common/getMockChatSDKIfApplicable.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/helpers/markdownHelper.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/initCallingSdk.d.ts +2 -2
- package/lib/types/components/livechatwidget/common/initConfirmationPropsComposer.d.ts +3 -3
- package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +7 -7
- package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +3 -3
- package/lib/types/components/livechatwidget/common/overridePropsOnMockIfApplicable.d.ts +3 -3
- package/lib/types/components/livechatwidget/common/persistentChatHelper.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +12 -12
- package/lib/types/components/livechatwidget/common/registerTelemetryLoggers.d.ts +4 -4
- package/lib/types/components/livechatwidget/common/renderSurveyHelpers.d.ts +10 -10
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +4 -4
- package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +11 -11
- package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +6 -6
- package/lib/types/components/livechatwidget/common/startProactiveChat.d.ts +4 -4
- package/lib/types/components/livechatwidget/common/updateSessionDataForTelemetry.d.ts +4 -4
- package/lib/types/components/livechatwidget/interfaces/IBotAuthActivitySubscriberOptionalParams.d.ts +4 -4
- package/lib/types/components/livechatwidget/interfaces/IDraggableChatWidgetProps.d.ts +10 -10
- package/lib/types/components/livechatwidget/interfaces/IFeatureConfigProps.d.ts +3 -3
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +17 -17
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +21 -21
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +70 -68
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetStyleProps.d.ts +5 -5
- package/lib/types/components/livechatwidget/interfaces/IMockProps.d.ts +8 -8
- package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -22
- package/lib/types/components/livechatwidget/interfaces/ISendBox.d.ts +12 -12
- package/lib/types/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.d.ts +3 -3
- package/lib/types/components/loadingpanestateful/LoadingPaneStateful.d.ts +3 -2
- package/lib/types/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.d.ts +2 -2
- package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -2
- package/lib/types/components/notificationpanestateful/NotificationPaneStateful.d.ts +4 -3
- package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.d.ts +2 -2
- package/lib/types/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.d.ts +2 -2
- package/lib/types/components/notificationpanestateful/interfaces/INotificationPaneStatefulProps.d.ts +13 -13
- package/lib/types/components/ooohpanestateful/OOOHPaneStateful.d.ts +4 -3
- package/lib/types/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.d.ts +2 -2
- package/lib/types/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.d.ts +4 -3
- package/lib/types/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.d.ts +2 -2
- package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +4 -3
- package/lib/types/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.d.ts +2 -2
- package/lib/types/components/postchatsurveypanestateful/common/isValidSurveyUrl.d.ts +2 -0
- package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -5
- package/lib/types/components/postchatsurveypanestateful/enums/PostChatSurveyMode.d.ts +4 -4
- package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +5 -5
- package/lib/types/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.d.ts +4 -3
- package/lib/types/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.d.ts +2 -2
- package/lib/types/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.d.ts +2 -2
- package/lib/types/components/prechatsurveypanestateful/interfaces/IPreChatSurveyPaneStatefulParams.d.ts +5 -5
- package/lib/types/components/proactivechatpanestateful/ProactiveChatPaneStateful.d.ts +3 -2
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatNotificationConfig.d.ts +3 -3
- package/lib/types/components/proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps.d.ts +4 -4
- package/lib/types/components/reconnectchatpanestateful/ReconnectChatPaneStateful.d.ts +4 -3
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatContext.d.ts +4 -4
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatOptionalParams.d.ts +3 -3
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulParams.d.ts +5 -5
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +5 -5
- package/lib/types/components/startchaterrorpanestateful/StartChatErrorPaneStateful.d.ts +4 -3
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.d.ts +2 -2
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.d.ts +2 -2
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.d.ts +2 -2
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.d.ts +2 -2
- package/lib/types/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.d.ts +2 -2
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneClassNames.d.ts +5 -5
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneComponentOverrides.d.ts +6 -6
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +14 -14
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +8 -8
- package/lib/types/components/startchaterrorpanestateful/interfaces/IStartChatErrorPaneStyleProps.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/WebChatContainerStateful.d.ts +4 -3
- package/lib/types/components/webchatcontainerstateful/common/DemoChatAdapter.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/common/DemoChatSDK.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatAdapter.d.ts +8 -8
- package/lib/types/components/webchatcontainerstateful/common/DesignerChatSDK.d.ts +31 -31
- package/lib/types/components/webchatcontainerstateful/common/MockBotCardCommandType.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/common/MockBotCommand.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/common/mockadapter.d.ts +14 -14
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +45 -45
- package/lib/types/components/webchatcontainerstateful/common/utils/BrowserInfo.d.ts +5 -5
- package/lib/types/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.d.ts +7 -7
- package/lib/types/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.d.ts +9 -9
- package/lib/types/components/webchatcontainerstateful/common/utils/chatAdapterUtils.d.ts +9 -9
- package/lib/types/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +8 -8
- package/lib/types/components/webchatcontainerstateful/interfaces/IAttachmentProps.d.ts +5 -5
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotAuthConfig.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingInfo.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingRule.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/interfaces/IDataMaskingSetting.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +37 -37
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatAction.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +28 -28
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatProps.d.ts +39 -39
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.d.ts +9 -9
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.d.ts +5 -5
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.d.ts +5 -5
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.d.ts +24 -24
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.d.ts +9 -9
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.d.ts +6 -6
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.d.ts +3 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.d.ts +8 -8
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorBubbleStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.d.ts +3 -3
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/index.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.d.ts +4 -4
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.d.ts +2 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.d.ts +7 -6
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.d.ts +11 -11
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.d.ts +10 -10
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.d.ts +12 -12
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -1
- package/lib/types/contexts/ChatAdapterStore.d.ts +1 -2
- package/lib/types/contexts/ChatContextStore.d.ts +1 -1
- package/lib/types/contexts/ChatSDKStore.d.ts +1 -1
- package/lib/types/contexts/FacadeChatSDKStore.d.ts +1 -1
- package/lib/types/contexts/common/ConversationState.d.ts +13 -13
- package/lib/types/contexts/common/ILiveChatWidgetAction.d.ts +5 -5
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +63 -63
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +40 -40
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +48 -48
- package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +3 -3
- package/lib/types/contexts/common/StartChatFailureType.d.ts +5 -5
- package/lib/types/contexts/createReducer.d.ts +4 -4
- package/lib/types/controller/componentController.d.ts +16 -16
- package/lib/types/firstresponselatency/Constants.d.ts +30 -0
- package/lib/types/firstresponselatency/FirstMessageTrackerFromBot.d.ts +1 -0
- package/lib/types/firstresponselatency/FirstResponseLatencyTracker.d.ts +22 -0
- package/lib/types/firstresponselatency/util.d.ts +7 -0
- package/lib/types/hooks/useChatAdapterStore.d.ts +2 -2
- package/lib/types/hooks/useChatContextStore.d.ts +5 -5
- package/lib/types/hooks/useChatSDKStore.d.ts +2 -2
- package/lib/types/hooks/useDebounce.d.ts +3 -3
- package/lib/types/hooks/useFacadeChatSDKStore.d.ts +3 -3
- package/lib/types/hooks/useWindowDimensions.d.ts +4 -4
- package/lib/types/index.d.ts +11 -11
- package/lib/types/plugins/createChatTranscript.d.ts +3 -3
- package/lib/types/plugins/newMessageEventHandler.d.ts +2 -2
- package/package.json +42 -17
|
@@ -5,102 +5,119 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createOnNewAdapterActivityHandler = void 0;
|
|
7
7
|
var _TelemetryConstants = require("../common/telemetry/TelemetryConstants");
|
|
8
|
+
var _Constants = require("../firstresponselatency/Constants");
|
|
9
|
+
var _util = require("../firstresponselatency/util");
|
|
8
10
|
var _omnichannelChatComponents = require("@microsoft/omnichannel-chat-components");
|
|
9
|
-
var
|
|
11
|
+
var _Constants2 = require("../common/Constants");
|
|
12
|
+
var _FirstResponseLatencyTracker = require("../firstresponselatency/FirstResponseLatencyTracker");
|
|
10
13
|
var _TelemetryHelper = require("../common/telemetry/TelemetryHelper");
|
|
11
14
|
var _TelemetryManager = require("../common/telemetry/TelemetryManager");
|
|
12
15
|
const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
16
|
+
// Hooking the message tracker in the listener, a bit invasive but easier to control.
|
|
17
|
+
const firstResponseLatencyTracker = new _FirstResponseLatencyTracker.FirstResponseLatencyTracker();
|
|
18
|
+
// epoch time in utc for when start to listen.
|
|
19
|
+
// We dont longer have a mechanism to know if a message is history or new, so any message older than the time we start listening will be considered a history message.
|
|
20
|
+
// this is a workaround for the fact that we dont have a way to identify if a message is history or new, and it will provide consistency across different scenarios
|
|
21
|
+
const startTime = new Date().getTime();
|
|
22
|
+
let isHistoryMessageReceivedEventRaised = false;
|
|
13
23
|
const onNewAdapterActivityHandler = activity => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
24
|
+
raiseMessageEvent(activity);
|
|
25
|
+
};
|
|
26
|
+
const userSendMessageStrategy = activity => {
|
|
27
|
+
var _TelemetryManager$Int;
|
|
28
|
+
const payload = (0, _util.buildMessagePayload)(activity, userId);
|
|
29
|
+
payload.messageType = _Constants2.Constants.userMessageTag;
|
|
30
|
+
const newMessageSentEvent = {
|
|
31
|
+
eventName: _TelemetryConstants.BroadcastEvent.NewMessageSent,
|
|
32
|
+
payload: (0, _util.polyfillMessagePayloadForEvent)(activity, payload, (_TelemetryManager$Int = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : _TelemetryManager$Int.conversationId)
|
|
33
|
+
};
|
|
34
|
+
_omnichannelChatComponents.BroadcastService.postMessage(newMessageSentEvent);
|
|
35
|
+
if (!(0, _util.isHistoryMessage)(activity, startTime)) {
|
|
36
|
+
firstResponseLatencyTracker.startClock(payload);
|
|
37
|
+
}
|
|
38
|
+
_TelemetryHelper.TelemetryHelper.logActionEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
39
|
+
Event: _TelemetryConstants.TelemetryEvent.MessageSent,
|
|
40
|
+
Description: "New message sent"
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const systemMessageStrategy = activity => {
|
|
44
|
+
const payload = (0, _util.buildMessagePayload)(activity, userId);
|
|
45
|
+
payload.messageType = _Constants2.Constants.systemMessageTag;
|
|
46
|
+
if ((0, _util.isHistoryMessage)(activity, startTime)) {
|
|
47
|
+
var _TelemetryManager$Int2;
|
|
48
|
+
historyMessageStrategy((0, _util.polyfillMessagePayloadForEvent)(activity, payload, (_TelemetryManager$Int2 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int2 === void 0 ? void 0 : _TelemetryManager$Int2.conversationId));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
_TelemetryHelper.TelemetryHelper.logActionEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
52
|
+
Event: _TelemetryConstants.TelemetryEvent.SystemMessageReceived,
|
|
53
|
+
Description: "System message received"
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const historyMessageStrategy = payload => {
|
|
57
|
+
const newMessageReceivedEvent = {
|
|
58
|
+
eventName: _TelemetryConstants.BroadcastEvent.HistoryMessageReceived,
|
|
59
|
+
payload: payload
|
|
60
|
+
};
|
|
61
|
+
_omnichannelChatComponents.BroadcastService.postMessage(newMessageReceivedEvent);
|
|
62
|
+
if (!isHistoryMessageReceivedEventRaised) {
|
|
63
|
+
// this is needed for reload scenarios, it helps to identify the last message received before the reload
|
|
64
|
+
isHistoryMessageReceivedEventRaised = true;
|
|
65
|
+
_TelemetryHelper.TelemetryHelper.logActionEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
66
|
+
Event: _TelemetryConstants.TelemetryEvent.RehydrateMessageReceived,
|
|
67
|
+
Description: "History message received",
|
|
68
|
+
CustomProperties: payload
|
|
69
|
+
});
|
|
70
|
+
}
|
|
18
71
|
};
|
|
19
|
-
|
|
20
|
-
|
|
72
|
+
const isValidMessage = activity => {
|
|
73
|
+
var _activity$channelData, _activity$channelData2, _activity$channelData3;
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
+
const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
|
|
76
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
+
const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData = activity.channelData) !== null && _activity$channelData !== void 0 && _activity$channelData.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData2 = activity.channelData) === null || _activity$channelData2 === void 0 ? void 0 : (_activity$channelData3 = _activity$channelData2.tags) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.length) === 0;
|
|
21
78
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
79
|
+
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
80
|
+
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
return true;
|
|
84
|
+
};
|
|
85
|
+
const receivedMessageStrategy = activity => {
|
|
86
|
+
var _TelemetryManager$Int4;
|
|
87
|
+
if (!isValidMessage(activity)) return;
|
|
88
|
+
const isHistoryMessageReceived = (0, _util.isHistoryMessage)(activity, startTime);
|
|
89
|
+
const payload = (0, _util.buildMessagePayload)(activity, userId);
|
|
90
|
+
payload.messageType = _Constants2.Constants.userMessageTag;
|
|
91
|
+
if (isHistoryMessageReceived) {
|
|
92
|
+
var _TelemetryManager$Int3;
|
|
93
|
+
historyMessageStrategy((0, _util.polyfillMessagePayloadForEvent)(activity, payload, (_TelemetryManager$Int3 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int3 === void 0 ? void 0 : _TelemetryManager$Int3.conversationId));
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
firstResponseLatencyTracker.stopClock(payload);
|
|
97
|
+
const newMessageReceivedEvent = {
|
|
98
|
+
eventName: _TelemetryConstants.BroadcastEvent.NewMessageReceived,
|
|
99
|
+
payload: (0, _util.polyfillMessagePayloadForEvent)(activity, payload, (_TelemetryManager$Int4 = _TelemetryManager.TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int4 === void 0 ? void 0 : _TelemetryManager$Int4.conversationId)
|
|
36
100
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
58
|
-
Event: _TelemetryConstants.TelemetryEvent.MessageSent,
|
|
59
|
-
Description: "New message sent"
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
var _activity$channelData5, _activity$channelData6;
|
|
63
|
-
if (activity !== null && activity !== void 0 && (_activity$channelData5 = activity.channelData) !== null && _activity$channelData5 !== void 0 && (_activity$channelData6 = _activity$channelData5.tags) !== null && _activity$channelData6 !== void 0 && _activity$channelData6.includes(_Constants.Constants.systemMessageTag)) {
|
|
64
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
-
payload.messageType = _Constants.Constants.systemMessageTag;
|
|
66
|
-
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
67
|
-
Event: _TelemetryConstants.TelemetryEvent.SystemMessageReceived,
|
|
68
|
-
Description: "System message received"
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
var _activity$channelData7, _activity$channelData8, _activity$channelData9;
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
75
|
-
const messageHasNoTags = !(activity !== null && activity !== void 0 && activity.channelData) || !(activity !== null && activity !== void 0 && (_activity$channelData7 = activity.channelData) !== null && _activity$channelData7 !== void 0 && _activity$channelData7.tags) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData8 = activity.channelData) === null || _activity$channelData8 === void 0 ? void 0 : (_activity$channelData9 = _activity$channelData8.tags) === null || _activity$channelData9 === void 0 ? void 0 : _activity$channelData9.length) === 0;
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
-
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
78
|
-
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
payload.messageType = _Constants.Constants.userMessageTag;
|
|
82
|
-
}
|
|
83
|
-
const newMessageReceivedEvent = {
|
|
84
|
-
eventName: isHistoryMessage ? _TelemetryConstants.BroadcastEvent.HistoryMessageReceived : _TelemetryConstants.BroadcastEvent.NewMessageReceived,
|
|
85
|
-
payload: polyfillMessagePayloadForEvent(payload)
|
|
86
|
-
};
|
|
87
|
-
_omnichannelChatComponents.BroadcastService.postMessage(newMessageReceivedEvent);
|
|
88
|
-
if (!isHistoryMessage) {
|
|
89
|
-
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
90
|
-
Event: _TelemetryConstants.TelemetryEvent.MessageReceived,
|
|
91
|
-
Description: "New message received",
|
|
92
|
-
CustomProperties: payload
|
|
93
|
-
});
|
|
94
|
-
} else {
|
|
95
|
-
if (!isHistoryMessageReceivedEventRasied) {
|
|
96
|
-
isHistoryMessageReceivedEventRasied = true;
|
|
97
|
-
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
98
|
-
Event: _TelemetryConstants.TelemetryEvent.RehydrateMessageReceived,
|
|
99
|
-
Description: "History message received",
|
|
100
|
-
CustomProperties: payload
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
101
|
+
_omnichannelChatComponents.BroadcastService.postMessage(newMessageReceivedEvent);
|
|
102
|
+
_TelemetryHelper.TelemetryHelper.logActionEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
103
|
+
Event: _TelemetryConstants.TelemetryEvent.MessageReceived,
|
|
104
|
+
Description: "New message received",
|
|
105
|
+
CustomProperties: payload
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
const raiseMessageEvent = activity => {
|
|
109
|
+
if ((activity === null || activity === void 0 ? void 0 : activity.type) === _Constants2.Constants.message) {
|
|
110
|
+
const scenarioType = (0, _util.getScenarioType)(activity);
|
|
111
|
+
switch (scenarioType) {
|
|
112
|
+
case _Constants.ScenarioType.UserSendMessageStrategy:
|
|
113
|
+
userSendMessageStrategy(activity);
|
|
114
|
+
break;
|
|
115
|
+
case _Constants.ScenarioType.SystemMessageStrategy:
|
|
116
|
+
systemMessageStrategy(activity);
|
|
117
|
+
break;
|
|
118
|
+
case _Constants.ScenarioType.ReceivedMessageStrategy:
|
|
119
|
+
receivedMessageStrategy(activity);
|
|
120
|
+
break;
|
|
104
121
|
}
|
|
105
122
|
}
|
|
106
123
|
};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
var _class;
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
5
|
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; }
|
|
3
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
7
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
|
-
export
|
|
8
|
+
export let Constants = /*#__PURE__*/_createClass(function Constants() {
|
|
9
|
+
_classCallCheck(this, Constants);
|
|
10
|
+
});
|
|
6
11
|
_defineProperty(Constants, "magicCodeBroadcastChannel", "MagicCodeChannel");
|
|
7
12
|
_defineProperty(Constants, "magicCodeResponseBroadcastChannel", "MagicCodeResponseChannel");
|
|
8
13
|
_defineProperty(Constants, "systemMessageTag", "system");
|
|
@@ -116,16 +121,26 @@ _defineProperty(Constants, "InitContextParamsResponse", "initContextParamsRespon
|
|
|
116
121
|
_defineProperty(Constants, "OCOriginalMessageId", "OriginalMessageId");
|
|
117
122
|
_defineProperty(Constants, "WebchatSequenceIdAttribute", "webchat:sequence-id");
|
|
118
123
|
_defineProperty(Constants, "MessageSequenceIdOverride", "MessageSequenceIdOverride");
|
|
119
|
-
export const Regex = (_class =
|
|
120
|
-
|
|
124
|
+
export const Regex = (_class = /*#__PURE__*/_createClass(function Regex() {
|
|
125
|
+
_classCallCheck(this, Regex);
|
|
126
|
+
}), _defineProperty(_class, "EmailRegex", "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"), _class);
|
|
127
|
+
export let HtmlIdNames = /*#__PURE__*/_createClass(function HtmlIdNames() {
|
|
128
|
+
_classCallCheck(this, HtmlIdNames);
|
|
129
|
+
});
|
|
121
130
|
_defineProperty(HtmlIdNames, "MSLiveChatWidget", "MSLiveChatWidget");
|
|
122
|
-
export
|
|
131
|
+
export let HtmlClassNames = /*#__PURE__*/_createClass(function HtmlClassNames() {
|
|
132
|
+
_classCallCheck(this, HtmlClassNames);
|
|
133
|
+
});
|
|
123
134
|
_defineProperty(HtmlClassNames, "webChatBannerCloseButton", "webchat__toast__dismissButton");
|
|
124
135
|
_defineProperty(HtmlClassNames, "webChatBannerExpandButton", "webchat__toaster__expandIcon");
|
|
125
136
|
_defineProperty(HtmlClassNames, "webChatHistoryContainer", "webchat__basic-transcript");
|
|
126
|
-
export
|
|
137
|
+
export let HtmlElementSelectors = /*#__PURE__*/_createClass(function HtmlElementSelectors() {
|
|
138
|
+
_classCallCheck(this, HtmlElementSelectors);
|
|
139
|
+
});
|
|
127
140
|
_defineProperty(HtmlElementSelectors, "sendBoxSelector", "textarea[data-id=\"webchat-sendbox-input\"]");
|
|
128
|
-
export
|
|
141
|
+
export let HtmlAttributeNames = /*#__PURE__*/_createClass(function HtmlAttributeNames() {
|
|
142
|
+
_classCallCheck(this, HtmlAttributeNames);
|
|
143
|
+
});
|
|
129
144
|
_defineProperty(HtmlAttributeNames, "role", "role");
|
|
130
145
|
_defineProperty(HtmlAttributeNames, "navigation", "navigation");
|
|
131
146
|
_defineProperty(HtmlAttributeNames, "ariaLabel", "aria-label");
|
|
@@ -159,20 +174,28 @@ _defineProperty(HtmlAttributeNames, "adaptiveCardClassName", "ac-adaptiveCard");
|
|
|
159
174
|
_defineProperty(HtmlAttributeNames, "adaptiveCardTextBlockClassName", "ac-textBlock");
|
|
160
175
|
_defineProperty(HtmlAttributeNames, "adaptiveCardToggleInputClassName", "ac-toggleInput");
|
|
161
176
|
_defineProperty(HtmlAttributeNames, "adaptiveCardActionSetClassName", "ac-actionSet");
|
|
162
|
-
export
|
|
177
|
+
export let WebChatMiddlewareConstants = /*#__PURE__*/_createClass(function WebChatMiddlewareConstants() {
|
|
178
|
+
_classCallCheck(this, WebChatMiddlewareConstants);
|
|
179
|
+
});
|
|
163
180
|
_defineProperty(WebChatMiddlewareConstants, "nextVisibleActivity", "nextVisibleActivity");
|
|
164
181
|
_defineProperty(WebChatMiddlewareConstants, "timeBetweenTimestampGroups", 300000);
|
|
165
182
|
//5 minutes
|
|
166
183
|
_defineProperty(WebChatMiddlewareConstants, "maxTextLength", 6000);
|
|
167
184
|
_defineProperty(WebChatMiddlewareConstants, "adaptiveCard", "AdaptiveCard");
|
|
168
|
-
export
|
|
185
|
+
export let AMSConstants = /*#__PURE__*/_createClass(function AMSConstants() {
|
|
186
|
+
_classCallCheck(this, AMSConstants);
|
|
187
|
+
});
|
|
169
188
|
_defineProperty(AMSConstants, "supportedImagesMimeTypes", ["image/jpeg", "image/png", "image/gif", "image/heic", "image/webp"]);
|
|
170
189
|
_defineProperty(AMSConstants, "maxSupportedImageSize", 20);
|
|
171
190
|
// AMS max file limit outside of supported Images MIME Types.
|
|
172
191
|
_defineProperty(AMSConstants, "maxSupportedFileSize", 300);
|
|
173
|
-
export
|
|
192
|
+
export let MimeTypes = /*#__PURE__*/_createClass(function MimeTypes() {
|
|
193
|
+
_classCallCheck(this, MimeTypes);
|
|
194
|
+
});
|
|
174
195
|
_defineProperty(MimeTypes, "UnknownFileType", "application/octet-stream");
|
|
175
|
-
export
|
|
196
|
+
export let LocaleConstants = /*#__PURE__*/_createClass(function LocaleConstants() {
|
|
197
|
+
_classCallCheck(this, LocaleConstants);
|
|
198
|
+
});
|
|
176
199
|
_defineProperty(LocaleConstants, "RTL_LOCALES", ["1025", "1037"]);
|
|
177
200
|
export let ElementType;
|
|
178
201
|
(function (ElementType) {
|
|
@@ -227,7 +250,9 @@ export let ConfirmationState;
|
|
|
227
250
|
ConfirmationState["Cancel"] = "Cancel";
|
|
228
251
|
ConfirmationState["NotSet"] = "NotSet";
|
|
229
252
|
})(ConfirmationState || (ConfirmationState = {}));
|
|
230
|
-
export
|
|
253
|
+
export let TranscriptConstants = /*#__PURE__*/_createClass(function TranscriptConstants() {
|
|
254
|
+
_classCallCheck(this, TranscriptConstants);
|
|
255
|
+
});
|
|
231
256
|
_defineProperty(TranscriptConstants, "ChatTranscriptsBodyColor", "#F5F5F5");
|
|
232
257
|
_defineProperty(TranscriptConstants, "TranscriptMessageEmojiMessageType", "http://schema.skype.com/emoji");
|
|
233
258
|
_defineProperty(TranscriptConstants, "ChatTranscriptDownloadFile", "ChatTranscripts.html");
|
|
@@ -238,7 +263,9 @@ _defineProperty(TranscriptConstants, "AdaptiveCardType", "adaptivecard");
|
|
|
238
263
|
_defineProperty(TranscriptConstants, "InternalMode", "internal");
|
|
239
264
|
_defineProperty(TranscriptConstants, "AgentDialogColor", "#2266E3");
|
|
240
265
|
_defineProperty(TranscriptConstants, "AgentFontColor", "white");
|
|
241
|
-
export
|
|
266
|
+
export let NotificationPaneConstants = /*#__PURE__*/_createClass(function NotificationPaneConstants() {
|
|
267
|
+
_classCallCheck(this, NotificationPaneConstants);
|
|
268
|
+
});
|
|
242
269
|
_defineProperty(NotificationPaneConstants, "DefaultNotificationPaneId", "lcw-notification-pane");
|
|
243
270
|
_defineProperty(NotificationPaneConstants, "DismissId", "lcw-notification-pane-dismiss-button");
|
|
244
271
|
_defineProperty(NotificationPaneConstants, "DismissText", "Dismiss");
|
|
@@ -251,7 +278,9 @@ _defineProperty(NotificationPaneConstants, "IconText", "Notification Icon");
|
|
|
251
278
|
_defineProperty(NotificationPaneConstants, "ChatDisconnectTitleText", "Chat disconnected");
|
|
252
279
|
_defineProperty(NotificationPaneConstants, "ChatDisconnectSubtitleText", "For additional assistance, please close the chat and try again.");
|
|
253
280
|
_defineProperty(NotificationPaneConstants, "ChromeCloseIconName", "ChromeClose");
|
|
254
|
-
export
|
|
281
|
+
export let StartChatErrorPaneConstants = /*#__PURE__*/_createClass(function StartChatErrorPaneConstants() {
|
|
282
|
+
_classCallCheck(this, StartChatErrorPaneConstants);
|
|
283
|
+
});
|
|
255
284
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorPaneId", "oc-lcw-start-chat-error-pane");
|
|
256
285
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorTitleText", "We are unable to load chat at this time.");
|
|
257
286
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorSubtitleText", "Please try again later.");
|
|
@@ -259,7 +288,9 @@ _defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorUnauthorizedT
|
|
|
259
288
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorAuthSetupErrorTitleText", "Chat authentication has failed.");
|
|
260
289
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorUnauthorizedSubtitleText", "UNAUTHORIZED");
|
|
261
290
|
_defineProperty(StartChatErrorPaneConstants, "DefaultStartChatErrorAuthSetupErrorSubtitleText", "AUTH SETUP ERROR");
|
|
262
|
-
export
|
|
291
|
+
export let AriaTelemetryConstants = /*#__PURE__*/_createClass(function AriaTelemetryConstants() {
|
|
292
|
+
_classCallCheck(this, AriaTelemetryConstants);
|
|
293
|
+
});
|
|
263
294
|
// Aria Endpoint for different environment types.
|
|
264
295
|
_defineProperty(AriaTelemetryConstants, "GERMANY_ENDPOINT", "https://de.pipe.aria.microsoft.com/Collector/3.0/");
|
|
265
296
|
_defineProperty(AriaTelemetryConstants, "GCCH_ENDPOINT", "https://tb.pipe.aria.microsoft.com/Collector/3.0/");
|
|
@@ -273,14 +304,20 @@ _defineProperty(AriaTelemetryConstants, "Public", "Public");
|
|
|
273
304
|
_defineProperty(AriaTelemetryConstants, "EU", "Europe");
|
|
274
305
|
// EUR: crm4; FRA: crm12; GER: crm16; CHE: crm17; NOR: crm19
|
|
275
306
|
_defineProperty(AriaTelemetryConstants, "lcwEUDomainNames", ["crm4.omnichannelengagementhub.com", "crm12.omnichannelengagementhub.com", "crm16.omnichannelengagementhub.com", "crm17.omnichannelengagementhub.com", "crm19.omnichannelengagementhub.com"]);
|
|
276
|
-
export
|
|
307
|
+
export let WidgetLoadTelemetryMessage = /*#__PURE__*/_createClass(function WidgetLoadTelemetryMessage() {
|
|
308
|
+
_classCallCheck(this, WidgetLoadTelemetryMessage);
|
|
309
|
+
});
|
|
277
310
|
_defineProperty(WidgetLoadTelemetryMessage, "OOOHMessage", "Widget is OOOH");
|
|
278
311
|
_defineProperty(WidgetLoadTelemetryMessage, "PersistedStateRetrievedMessage", "Persisted state retrieved");
|
|
279
|
-
export
|
|
312
|
+
export let WidgetLoadCustomErrorString = /*#__PURE__*/_createClass(function WidgetLoadCustomErrorString() {
|
|
313
|
+
_classCallCheck(this, WidgetLoadCustomErrorString);
|
|
314
|
+
});
|
|
280
315
|
_defineProperty(WidgetLoadCustomErrorString, "AuthenticationFailedErrorString", "Authentication was not successful");
|
|
281
316
|
_defineProperty(WidgetLoadCustomErrorString, "NetworkErrorString", "Network Error");
|
|
282
317
|
_defineProperty(WidgetLoadCustomErrorString, "CloseAdapterAfterDisconnectionErrorString", "Error trying to end/close chat adapter after the widget is back on-line, for an already disconnected session");
|
|
283
|
-
export
|
|
318
|
+
export let PrepareEndChatDescriptionConstants = /*#__PURE__*/_createClass(function PrepareEndChatDescriptionConstants() {
|
|
319
|
+
_classCallCheck(this, PrepareEndChatDescriptionConstants);
|
|
320
|
+
});
|
|
284
321
|
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithoutPostChat", "Conversation ended by customer. Post chat not configured or should not show.");
|
|
285
322
|
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedByCustomerWithInvalidPostChat", "Conversation ended by customer. Post chat context is invalid.");
|
|
286
323
|
_defineProperty(PrepareEndChatDescriptionConstants, "ConversationEndedBy", "Conversation ended by");
|
|
@@ -291,6 +328,15 @@ _defineProperty(PrepareEndChatDescriptionConstants, "EndChatReceivedFromOtherTab
|
|
|
291
328
|
_defineProperty(PrepareEndChatDescriptionConstants, "CustomerCloseChatOnFailureOrPostChat", "Customer is trying to close chat widget on start chat failure or post chat pane.");
|
|
292
329
|
_defineProperty(PrepareEndChatDescriptionConstants, "CustomerCloseInactiveChat", "Chat was Inactive and customer is trying to close chat widget or refreshing the page.");
|
|
293
330
|
_defineProperty(PrepareEndChatDescriptionConstants, "BrowserUnload", "Browser unload event received. Ending chat.");
|
|
294
|
-
export
|
|
331
|
+
export let PostChatSurveyTelemetryMessage = /*#__PURE__*/_createClass(function PostChatSurveyTelemetryMessage() {
|
|
332
|
+
_classCallCheck(this, PostChatSurveyTelemetryMessage);
|
|
333
|
+
});
|
|
295
334
|
_defineProperty(PostChatSurveyTelemetryMessage, "PostChatContextCallFailed", "Failed to get post chat context.");
|
|
296
|
-
_defineProperty(PostChatSurveyTelemetryMessage, "PostChatContextCallSucceed", "Postchat context call succeed.");
|
|
335
|
+
_defineProperty(PostChatSurveyTelemetryMessage, "PostChatContextCallSucceed", "Postchat context call succeed.");
|
|
336
|
+
_defineProperty(PostChatSurveyTelemetryMessage, "PostChatContextCallStarted", "Postchat context call started.");
|
|
337
|
+
export let AppInsightsTelemetryMessage = /*#__PURE__*/_createClass(function AppInsightsTelemetryMessage() {
|
|
338
|
+
_classCallCheck(this, AppInsightsTelemetryMessage);
|
|
339
|
+
});
|
|
340
|
+
_defineProperty(AppInsightsTelemetryMessage, "AppInsightsInitialized", "Application Insights initialized successfully.");
|
|
341
|
+
_defineProperty(AppInsightsTelemetryMessage, "AppInsightsInitError", "Error initializing Application Insights");
|
|
342
|
+
_defineProperty(AppInsightsTelemetryMessage, "AppInsightsKeyError", "Invalid Application Insights key provided.");
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
var _class;
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
5
|
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; }
|
|
3
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
4
7
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
|
-
export const KeyCodes = (_class =
|
|
8
|
+
export const KeyCodes = (_class = /*#__PURE__*/_createClass(function KeyCodes() {
|
|
9
|
+
_classCallCheck(this, KeyCodes);
|
|
10
|
+
}), _defineProperty(_class, "ENTER", "Enter"), _defineProperty(_class, "TAB", "Tab"), _class);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
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); } }
|
|
2
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
3
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
6
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
-
export
|
|
7
|
+
export let DataStoreManager = /*#__PURE__*/_createClass(function DataStoreManager() {
|
|
8
|
+
_classCallCheck(this, DataStoreManager);
|
|
9
|
+
});
|
|
5
10
|
_defineProperty(DataStoreManager, "clientDataStore", void 0);
|