@microsoft/omnichannel-chat-widget 1.7.8-main.29ce174 → 1.7.8-main.2bcb0b6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +158 -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 +8 -25
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +5 -4
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +14 -12
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +16 -10
- 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/notification/NotificationHandler.js +88 -60
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
- 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 +102 -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 +158 -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 +9 -26
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +5 -4
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +14 -12
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +12 -8
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +16 -10
- 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/notification/NotificationHandler.js +88 -60
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
- 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 +100 -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 -257
- 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 -2
- 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 +41 -16
|
@@ -1,3 +1,6 @@
|
|
|
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); }
|
|
@@ -7,11 +10,16 @@ import { ariaTelemetryLogger } from "./loggers/ariaTelemetryLogger";
|
|
|
7
10
|
import { consoleLogger } from "./loggers/consoleLogger";
|
|
8
11
|
import { defaultAriaConfig } from "./defaultConfigs/defaultAriaConfig";
|
|
9
12
|
import { TelemetryHelper } from "./TelemetryHelper";
|
|
10
|
-
|
|
13
|
+
import { appInsightsLogger } from "./loggers/appInsightsLogger";
|
|
14
|
+
export let TelemetryTimers = /*#__PURE__*/_createClass(function TelemetryTimers() {
|
|
15
|
+
_classCallCheck(this, TelemetryTimers);
|
|
16
|
+
});
|
|
11
17
|
_defineProperty(TelemetryTimers, "LcwLoadToChatButtonTimer", void 0);
|
|
12
18
|
_defineProperty(TelemetryTimers, "ProactiveChatScreenTimer", void 0);
|
|
13
19
|
_defineProperty(TelemetryTimers, "WidgetLoadTimer", void 0);
|
|
14
|
-
export
|
|
20
|
+
export let TelemetryManager = /*#__PURE__*/_createClass(function TelemetryManager() {
|
|
21
|
+
_classCallCheck(this, TelemetryManager);
|
|
22
|
+
});
|
|
15
23
|
_defineProperty(TelemetryManager, "InternalTelemetryData", void 0);
|
|
16
24
|
const loggers = [];
|
|
17
25
|
export const disposeLoggers = () => {
|
|
@@ -21,29 +29,36 @@ export const disposeLoggers = () => {
|
|
|
21
29
|
};
|
|
22
30
|
export const RegisterLoggers = () => {
|
|
23
31
|
const registerLoggers = () => {
|
|
24
|
-
var _TelemetryManager$Int, _TelemetryManager$Int2, _TelemetryManager$Int3, _TelemetryManager$Int4, _TelemetryManager$Int5, _TelemetryManager$Int6, _TelemetryManager$Int7, _TelemetryManager$Int8;
|
|
25
|
-
if (((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) === null || _TelemetryManager$Int2 === void 0 ? void 0 : _TelemetryManager$Int2.disableConsoleLog) === false || ((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int3 === void 0 ? void 0 : (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) === null || _TelemetryManager$Int4 === void 0 ? void 0 : _TelemetryManager$Int4.telemetryDisabled) === false) {
|
|
32
|
+
var _TelemetryManager$Int, _TelemetryManager$Int2, _TelemetryManager$Int3, _TelemetryManager$Int4, _TelemetryManager$Int5, _TelemetryManager$Int6, _TelemetryManager$Int7, _TelemetryManager$Int8, _TelemetryManager$Int9, _TelemetryManager$Int10;
|
|
33
|
+
if (((_TelemetryManager$Int = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int === void 0 ? void 0 : (_TelemetryManager$Int2 = _TelemetryManager$Int.telemetryConfig) === null || _TelemetryManager$Int2 === void 0 ? void 0 : _TelemetryManager$Int2.disableConsoleLog) === false || ((_TelemetryManager$Int3 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int3 === void 0 ? void 0 : (_TelemetryManager$Int4 = _TelemetryManager$Int3.telemetryConfig) === null || _TelemetryManager$Int4 === void 0 ? void 0 : _TelemetryManager$Int4.telemetryDisabled) === false || ((_TelemetryManager$Int5 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int5 === void 0 ? void 0 : (_TelemetryManager$Int6 = _TelemetryManager$Int5.appInsightsConfig) === null || _TelemetryManager$Int6 === void 0 ? void 0 : _TelemetryManager$Int6.appInsightsDisabled) === false) {
|
|
26
34
|
BroadcastService.getAnyMessage().subscribe(event => {
|
|
27
35
|
if (event.payload && event.eventName in TelemetryEvent) {
|
|
28
36
|
logTelemetry(event);
|
|
29
37
|
}
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
|
-
if (((_TelemetryManager$
|
|
40
|
+
if (((_TelemetryManager$Int7 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int7 === void 0 ? void 0 : (_TelemetryManager$Int8 = _TelemetryManager$Int7.telemetryConfig) === null || _TelemetryManager$Int8 === void 0 ? void 0 : _TelemetryManager$Int8.disableConsoleLog) === false) {
|
|
33
41
|
loggers.push(consoleLogger());
|
|
34
42
|
}
|
|
35
|
-
if (((_TelemetryManager$
|
|
36
|
-
var _TelemetryManager$
|
|
37
|
-
if ((_TelemetryManager$
|
|
38
|
-
var _TelemetryManager$
|
|
39
|
-
loggers.push(ariaTelemetryLogger(((_TelemetryManager$
|
|
43
|
+
if (((_TelemetryManager$Int9 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int9 === void 0 ? void 0 : (_TelemetryManager$Int10 = _TelemetryManager$Int9.telemetryConfig) === null || _TelemetryManager$Int10 === void 0 ? void 0 : _TelemetryManager$Int10.telemetryDisabled) === false) {
|
|
44
|
+
var _TelemetryManager$Int11, _TelemetryManager$Int20, _TelemetryManager$Int21, _TelemetryManager$Int22, _TelemetryManager$Int23;
|
|
45
|
+
if ((_TelemetryManager$Int11 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int11 !== void 0 && _TelemetryManager$Int11.ariaConfig) {
|
|
46
|
+
var _TelemetryManager$Int12, _TelemetryManager$Int13, _TelemetryManager$Int14, _TelemetryManager$Int15, _TelemetryManager$Int16, _TelemetryManager$Int17, _TelemetryManager$Int18, _TelemetryManager$Int19;
|
|
47
|
+
loggers.push(ariaTelemetryLogger(((_TelemetryManager$Int12 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int12 === void 0 ? void 0 : (_TelemetryManager$Int13 = _TelemetryManager$Int12.ariaConfig) === null || _TelemetryManager$Int13 === void 0 ? void 0 : _TelemetryManager$Int13.ariaTelemetryKey) ?? defaultAriaConfig.ariaTelemetryKey, ((_TelemetryManager$Int14 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int14 === void 0 ? void 0 : (_TelemetryManager$Int15 = _TelemetryManager$Int14.ariaConfig) === null || _TelemetryManager$Int15 === void 0 ? void 0 : _TelemetryManager$Int15.disableCookieUsage) ?? defaultAriaConfig.disableCookieUsage, ((_TelemetryManager$Int16 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int16 === void 0 ? void 0 : (_TelemetryManager$Int17 = _TelemetryManager$Int16.ariaConfig) === null || _TelemetryManager$Int17 === void 0 ? void 0 : _TelemetryManager$Int17.collectorUriForTelemetry) ?? defaultAriaConfig.collectorUriForTelemetry, ((_TelemetryManager$Int18 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int18 === void 0 ? void 0 : (_TelemetryManager$Int19 = _TelemetryManager$Int18.ariaConfig) === null || _TelemetryManager$Int19 === void 0 ? void 0 : _TelemetryManager$Int19.ariaTelemetryApplicationName) ?? defaultAriaConfig.ariaTelemetryApplicationName));
|
|
40
48
|
}
|
|
41
|
-
const customLoggers = (_TelemetryManager$
|
|
49
|
+
const customLoggers = (_TelemetryManager$Int20 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int20 === void 0 ? void 0 : (_TelemetryManager$Int21 = _TelemetryManager$Int20.telemetryConfig) === null || _TelemetryManager$Int21 === void 0 ? void 0 : _TelemetryManager$Int21.telemetryLoggers;
|
|
42
50
|
if (customLoggers) {
|
|
43
51
|
customLoggers.map(logger => {
|
|
44
52
|
loggers.push(logger);
|
|
45
53
|
});
|
|
46
54
|
}
|
|
55
|
+
if (((_TelemetryManager$Int22 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int22 === void 0 ? void 0 : (_TelemetryManager$Int23 = _TelemetryManager$Int22.appInsightsConfig) === null || _TelemetryManager$Int23 === void 0 ? void 0 : _TelemetryManager$Int23.appInsightsDisabled) === false) {
|
|
56
|
+
var _TelemetryManager$Int24;
|
|
57
|
+
if ((_TelemetryManager$Int24 = TelemetryManager.InternalTelemetryData) !== null && _TelemetryManager$Int24 !== void 0 && _TelemetryManager$Int24.appInsightsConfig.appInsightsKey) {
|
|
58
|
+
var _TelemetryManager$Int25, _TelemetryManager$Int26, _TelemetryManager$Int27;
|
|
59
|
+
loggers.push(appInsightsLogger((_TelemetryManager$Int25 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int25 === void 0 ? void 0 : _TelemetryManager$Int25.appInsightsConfig.appInsightsKey, ((_TelemetryManager$Int26 = TelemetryManager.InternalTelemetryData) === null || _TelemetryManager$Int26 === void 0 ? void 0 : (_TelemetryManager$Int27 = _TelemetryManager$Int26.ariaConfig) === null || _TelemetryManager$Int27 === void 0 ? void 0 : _TelemetryManager$Int27.disableCookieUsage) ?? defaultAriaConfig.disableCookieUsage));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
47
62
|
}
|
|
48
63
|
};
|
|
49
64
|
const parseInput = function (payload) {
|
|
@@ -64,7 +79,12 @@ export const RegisterLoggers = () => {
|
|
|
64
79
|
};
|
|
65
80
|
//Do not log events without an Event Name
|
|
66
81
|
if (telemetryInput !== null && telemetryInput !== void 0 && (_telemetryInput$paylo = telemetryInput.payload) !== null && _telemetryInput$paylo !== void 0 && _telemetryInput$paylo.Event) {
|
|
67
|
-
|
|
82
|
+
var _telemetryEvent$paylo;
|
|
83
|
+
if (logger.type === "appInsightsLogger" && (telemetryEvent === null || telemetryEvent === void 0 ? void 0 : (_telemetryEvent$paylo = telemetryEvent.payload) === null || _telemetryEvent$paylo === void 0 ? void 0 : _telemetryEvent$paylo.LogToAll) !== true) {
|
|
84
|
+
return; // skip logging to AppInsights
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
Promise.resolve(logger.log(logLevel, telemetryInput));
|
|
68
88
|
}
|
|
69
89
|
});
|
|
70
90
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { LogLevel, TelemetryEvent } from "../TelemetryConstants";
|
|
2
|
+
import ScenarioMarker from "../ScenarioMarker";
|
|
3
|
+
import { TelemetryHelper } from "../TelemetryHelper";
|
|
4
|
+
import { AppInsightsTelemetryMessage } from "../../Constants";
|
|
5
|
+
import { AppInsightsEventMapping } from "../AppInsightsEvents";
|
|
6
|
+
var AllowedKeys;
|
|
7
|
+
(function (AllowedKeys) {
|
|
8
|
+
AllowedKeys["LogLevel"] = "LogLevel";
|
|
9
|
+
AllowedKeys["Description"] = "Description";
|
|
10
|
+
AllowedKeys["ExceptionDetails"] = "ExceptionDetails";
|
|
11
|
+
AllowedKeys["ChannelId"] = "ChannelId";
|
|
12
|
+
AllowedKeys["LCWRuntimeId"] = "ClientSessionId";
|
|
13
|
+
AllowedKeys["ConversationId"] = "LiveWorkItemId";
|
|
14
|
+
AllowedKeys["ChatId"] = "ChatThreadId";
|
|
15
|
+
AllowedKeys["OrganizationId"] = "OrganizationId";
|
|
16
|
+
AllowedKeys["ElapsedTimeInMilliseconds"] = "DurationInMilliseconds";
|
|
17
|
+
})(AllowedKeys || (AllowedKeys = {}));
|
|
18
|
+
let initializationPromise = null;
|
|
19
|
+
export const appInsightsLogger = (appInsightsKey, disableCookiesUsage) => {
|
|
20
|
+
const isValidKey = key => {
|
|
21
|
+
const INSTRUMENTATION_KEY_PATTERN = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
|
|
22
|
+
const INSTRUMENTATION_KEY_REGEX = new RegExp(`^${INSTRUMENTATION_KEY_PATTERN}$`);
|
|
23
|
+
const CONNECTION_STRING_REGEX = new RegExp(`^InstrumentationKey=${INSTRUMENTATION_KEY_PATTERN};IngestionEndpoint=https://[a-zA-Z0-9\\-\\.]+\\.applicationinsights\\.azure\\.com/.*`);
|
|
24
|
+
return INSTRUMENTATION_KEY_REGEX.test(key) || CONNECTION_STRING_REGEX.test(key);
|
|
25
|
+
};
|
|
26
|
+
const initializeAppInsights = async (appInsightsKey, disableCookiesUsage) => {
|
|
27
|
+
if (!window.appInsights && appInsightsKey) {
|
|
28
|
+
if (!isValidKey(appInsightsKey)) {
|
|
29
|
+
TelemetryHelper.logActionEvent(LogLevel.ERROR, {
|
|
30
|
+
Event: TelemetryEvent.AppInsightsInitFailed,
|
|
31
|
+
Description: AppInsightsTelemetryMessage.AppInsightsKeyError,
|
|
32
|
+
ExceptionDetails: {
|
|
33
|
+
message: AppInsightsTelemetryMessage.AppInsightsKeyError
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
// Dynamically import Application Insights
|
|
40
|
+
const {
|
|
41
|
+
ApplicationInsights
|
|
42
|
+
} = await import("@microsoft/applicationinsights-web");
|
|
43
|
+
const config = {
|
|
44
|
+
...(appInsightsKey.includes("IngestionEndpoint") ? {
|
|
45
|
+
connectionString: appInsightsKey
|
|
46
|
+
} : {
|
|
47
|
+
instrumentationKey: appInsightsKey
|
|
48
|
+
}),
|
|
49
|
+
disableCookiesUsage: disableCookiesUsage
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// Initialize Application Insights instance
|
|
53
|
+
window.appInsights = new ApplicationInsights({
|
|
54
|
+
config
|
|
55
|
+
});
|
|
56
|
+
window.appInsights.loadAppInsights();
|
|
57
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
58
|
+
Event: TelemetryEvent.AppInsightsInitialized,
|
|
59
|
+
Description: AppInsightsTelemetryMessage.AppInsightsInitialized
|
|
60
|
+
});
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(AppInsightsTelemetryMessage.AppInsightsInitError, error);
|
|
63
|
+
TelemetryHelper.logActionEvent(LogLevel.ERROR, {
|
|
64
|
+
Event: TelemetryEvent.AppInsightsInitFailed,
|
|
65
|
+
Description: AppInsightsTelemetryMessage.AppInsightsInitError,
|
|
66
|
+
ExceptionDetails: {
|
|
67
|
+
message: `${AppInsightsTelemetryMessage.AppInsightsInitError} with key ending: ${appInsightsKey.slice(-3)}`,
|
|
68
|
+
exception: error
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const logger = async () => {
|
|
75
|
+
if (!initializationPromise) {
|
|
76
|
+
initializationPromise = initializeAppInsights(appInsightsKey, disableCookiesUsage);
|
|
77
|
+
}
|
|
78
|
+
await initializationPromise;
|
|
79
|
+
return window.appInsights;
|
|
80
|
+
};
|
|
81
|
+
const aiLogger = {
|
|
82
|
+
type: "appInsightsLogger",
|
|
83
|
+
log: async (logLevel, telemetryInput) => {
|
|
84
|
+
try {
|
|
85
|
+
var _telemetryInput$paylo, _telemetryInput$telem;
|
|
86
|
+
const _logger = await logger();
|
|
87
|
+
if (!_logger) return;
|
|
88
|
+
const eventName = telemetryInput === null || telemetryInput === void 0 ? void 0 : (_telemetryInput$paylo = telemetryInput.payload) === null || _telemetryInput$paylo === void 0 ? void 0 : _telemetryInput$paylo.Event;
|
|
89
|
+
const telemetryInfo = telemetryInput === null || telemetryInput === void 0 ? void 0 : (_telemetryInput$telem = telemetryInput.telemetryInfo) === null || _telemetryInput$telem === void 0 ? void 0 : _telemetryInput$telem.telemetryInfo;
|
|
90
|
+
const eventProperties = setEventProperties(telemetryInfo);
|
|
91
|
+
if (eventName) {
|
|
92
|
+
const trackingEventName = getTrackingEventName(logLevel, eventName);
|
|
93
|
+
_logger.trackEvent({
|
|
94
|
+
name: trackingEventName,
|
|
95
|
+
properties: eventProperties
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
} catch (error) {
|
|
99
|
+
console.error("Error in logging telemetry to Application Insights:", error);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
dispose: () => {
|
|
103
|
+
if (window.appInsights) {
|
|
104
|
+
window.appInsights.unload(); //flush and unload
|
|
105
|
+
window.appInsights = null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
111
|
+
function setEventProperties(telemetryInfo) {
|
|
112
|
+
const eventProperties = {};
|
|
113
|
+
if (telemetryInfo) {
|
|
114
|
+
for (const key in AllowedKeys) {
|
|
115
|
+
const finalKey = AllowedKeys[key]; // get renamed keys for LCWRuntimeId, ConversationId, ChatId
|
|
116
|
+
const value = telemetryInfo[key];
|
|
117
|
+
if (value !== undefined && value !== null && value !== "") {
|
|
118
|
+
eventProperties[finalKey] = value;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return eventProperties;
|
|
123
|
+
}
|
|
124
|
+
function getTrackingEventName(logLevel, eventName) {
|
|
125
|
+
// Rename and Remove "UX" or "LCW" prefix if present
|
|
126
|
+
const event = (AppInsightsEventMapping[eventName] || eventName).replace(/^(UX|LCW)/, "");
|
|
127
|
+
if (logLevel === LogLevel.ERROR) {
|
|
128
|
+
return ScenarioMarker.failScenario(event);
|
|
129
|
+
}
|
|
130
|
+
if (logLevel === LogLevel.WARN) {
|
|
131
|
+
return ScenarioMarker.warnScenario(event);
|
|
132
|
+
}
|
|
133
|
+
if (event.toLowerCase().includes("complete")) {
|
|
134
|
+
return ScenarioMarker.completeScenario(event);
|
|
135
|
+
}
|
|
136
|
+
return ScenarioMarker.startScenario(event);
|
|
137
|
+
}
|
|
138
|
+
return aiLogger;
|
|
139
|
+
};
|
|
@@ -11,12 +11,13 @@ import { defaultOutOfOfficeChatButtonStyleProps } from "./common/styleProps/defa
|
|
|
11
11
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
12
12
|
let uiTimer;
|
|
13
13
|
export const ChatButtonStateful = props => {
|
|
14
|
-
var
|
|
14
|
+
var _buttonProps$controlP, _props$buttonProps, _props$buttonProps$co, _props$buttonProps2, _props$buttonProps2$c, _props$buttonProps3, _props$buttonProps3$c;
|
|
15
15
|
// this is to ensure the telemetry is set only once and start the load timer
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
uiTimer = createTimer();
|
|
18
|
-
TelemetryHelper.
|
|
19
|
-
Event: TelemetryEvent.
|
|
18
|
+
TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
|
|
19
|
+
Event: TelemetryEvent.UXLCWChatButtonLoadingStart,
|
|
20
|
+
Description: "Chat button loading started"
|
|
20
21
|
});
|
|
21
22
|
}, []);
|
|
22
23
|
|
|
@@ -28,13 +29,15 @@ export const ChatButtonStateful = props => {
|
|
|
28
29
|
startChat
|
|
29
30
|
} = props;
|
|
30
31
|
//Setting OutOfOperatingHours Flag
|
|
31
|
-
|
|
32
|
+
//Setting OutOfOperatingHours Flag - to string conversion to normalize the value (could be boolean from other states or string directly from config)
|
|
33
|
+
const [outOfOperatingHours, setOutOfOperatingHours] = useState(state.appStates.outsideOperatingHours);
|
|
32
34
|
const ref = useRef(() => {
|
|
33
35
|
return;
|
|
34
36
|
});
|
|
35
37
|
ref.current = async () => {
|
|
36
|
-
TelemetryHelper.
|
|
37
|
-
Event: TelemetryEvent.LCWChatButtonClicked
|
|
38
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
39
|
+
Event: TelemetryEvent.LCWChatButtonClicked,
|
|
40
|
+
Description: "Chat button click action started"
|
|
38
41
|
});
|
|
39
42
|
if (state.appStates.isMinimized) {
|
|
40
43
|
dispatch({
|
|
@@ -52,6 +55,10 @@ export const ChatButtonStateful = props => {
|
|
|
52
55
|
} else {
|
|
53
56
|
await startChat();
|
|
54
57
|
}
|
|
58
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
59
|
+
Event: TelemetryEvent.LCWChatButtonActionCompleted,
|
|
60
|
+
Description: "Chat button action completed"
|
|
61
|
+
});
|
|
55
62
|
};
|
|
56
63
|
const outOfOfficeStyleProps = Object.assign({}, defaultOutOfOfficeChatButtonStyleProps, outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0 ? void 0 : outOfOfficeButtonProps.styleProps);
|
|
57
64
|
const controlProps = {
|
|
@@ -71,9 +78,6 @@ export const ChatButtonStateful = props => {
|
|
|
71
78
|
titleText: "We're Offline",
|
|
72
79
|
subtitleText: "No agents available",
|
|
73
80
|
onClick: async () => {
|
|
74
|
-
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
75
|
-
Event: TelemetryEvent.LCWChatButtonClicked
|
|
76
|
-
});
|
|
77
81
|
state.appStates.isMinimized && dispatch({
|
|
78
82
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
79
83
|
payload: false
|
|
@@ -87,9 +91,7 @@ export const ChatButtonStateful = props => {
|
|
|
87
91
|
...(outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0 ? void 0 : outOfOfficeButtonProps.controlProps)
|
|
88
92
|
};
|
|
89
93
|
useEffect(() => {
|
|
90
|
-
|
|
91
|
-
setOutOfOperatingHours(true);
|
|
92
|
-
}
|
|
94
|
+
setOutOfOperatingHours(state.appStates.outsideOperatingHours);
|
|
93
95
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
94
96
|
Event: TelemetryEvent.LCWChatButtonShow,
|
|
95
97
|
ElapsedTimeInMilliseconds: TelemetryTimers.LcwLoadToChatButtonTimer.milliSecondsElapsed
|
|
@@ -102,8 +104,9 @@ export const ChatButtonStateful = props => {
|
|
|
102
104
|
payload: true
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
|
-
TelemetryHelper.
|
|
106
|
-
Event: TelemetryEvent.
|
|
107
|
+
TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
|
|
108
|
+
Event: TelemetryEvent.UXLCWChatButtonLoadingCompleted,
|
|
109
|
+
Description: "Chat button loading completed",
|
|
107
110
|
ElapsedTimeInMilliseconds: uiTimer.milliSecondsElapsed
|
|
108
111
|
});
|
|
109
112
|
}, []);
|
|
@@ -57,14 +57,15 @@ export const EmailTranscriptPaneStateful = props => {
|
|
|
57
57
|
liveChatContext
|
|
58
58
|
}));
|
|
59
59
|
NotificationHandler.notifySuccess(NotificationScenarios.EmailAddressSaved, (state === null || state === void 0 ? void 0 : (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : (_state$domainStates2$ = _state$domainStates2.middlewareLocalizedTexts) === null || _state$domainStates2$ === void 0 ? void 0 : _state$domainStates2$.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS) ?? (defaultMiddlewareLocalizedTexts === null || defaultMiddlewareLocalizedTexts === void 0 ? void 0 : defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS));
|
|
60
|
-
TelemetryHelper.
|
|
60
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
61
61
|
Event: TelemetryEvent.EmailTranscriptSent,
|
|
62
62
|
Description: "Transcript sent to email successfully."
|
|
63
63
|
});
|
|
64
64
|
} catch (ex) {
|
|
65
65
|
var _state$domainStates3, _state$domainStates3$;
|
|
66
|
-
TelemetryHelper.
|
|
66
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.ERROR, {
|
|
67
67
|
Event: TelemetryEvent.EmailTranscriptFailed,
|
|
68
|
+
Description: "Email transcript failed.",
|
|
68
69
|
ExceptionDetails: {
|
|
69
70
|
exception: ex
|
|
70
71
|
}
|
|
@@ -40,14 +40,19 @@ export const FooterStateful = props => {
|
|
|
40
40
|
dir: state.domainStates.globalDir,
|
|
41
41
|
onDownloadTranscriptClick: async () => {
|
|
42
42
|
try {
|
|
43
|
-
TelemetryHelper.
|
|
43
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
44
44
|
Event: TelemetryEvent.DownloadTranscriptButtonClicked,
|
|
45
|
-
Description: "Download
|
|
45
|
+
Description: "Download transcript action started."
|
|
46
46
|
});
|
|
47
47
|
await downloadTranscript(facadeChatSDK, downloadTranscriptProps, state);
|
|
48
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
49
|
+
Event: TelemetryEvent.DownloadTranscriptActionCompleted,
|
|
50
|
+
Description: "Download transcript action completed."
|
|
51
|
+
});
|
|
48
52
|
} catch (ex) {
|
|
49
|
-
TelemetryHelper.
|
|
50
|
-
Event: TelemetryEvent.
|
|
53
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.ERROR, {
|
|
54
|
+
Event: TelemetryEvent.DownloadTranscriptActionFailed,
|
|
55
|
+
Description: "Download transcript action failed.",
|
|
51
56
|
ExceptionDetails: {
|
|
52
57
|
exception: ex
|
|
53
58
|
}
|
|
@@ -57,9 +62,9 @@ export const FooterStateful = props => {
|
|
|
57
62
|
},
|
|
58
63
|
onEmailTranscriptClick: () => {
|
|
59
64
|
var _footerProps$controlP, _footerProps$controlP2;
|
|
60
|
-
TelemetryHelper.
|
|
65
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
61
66
|
Event: TelemetryEvent.EmailTranscriptButtonClicked,
|
|
62
|
-
Description: "Email Transcript
|
|
67
|
+
Description: "Email Transcript action started."
|
|
63
68
|
});
|
|
64
69
|
const emailTranscriptButtonId = (footerProps === null || footerProps === void 0 ? void 0 : (_footerProps$controlP = footerProps.controlProps) === null || _footerProps$controlP === void 0 ? void 0 : (_footerProps$controlP2 = _footerProps$controlP.emailTranscriptButtonProps) === null || _footerProps$controlP2 === void 0 ? void 0 : _footerProps$controlP2.id) ?? `${controlProps.id}-emailtranscript-button`;
|
|
65
70
|
if (emailTranscriptButtonId) {
|
|
@@ -12,7 +12,7 @@ import useChatAdapterStore from "../../hooks/useChatAdapterStore";
|
|
|
12
12
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
13
13
|
let uiTimer;
|
|
14
14
|
export const HeaderStateful = props => {
|
|
15
|
-
var _state$domainStates
|
|
15
|
+
var _state$domainStates, _headerProps$controlP, _headerProps$controlP2, _headerProps$controlP3, _outOfOfficeHeaderPro, _state$domainStates3;
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
uiTimer = createTimer();
|
|
18
18
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
@@ -28,7 +28,7 @@ export const HeaderStateful = props => {
|
|
|
28
28
|
endChat
|
|
29
29
|
} = props;
|
|
30
30
|
//Setting OutOfOperatingHours Flag
|
|
31
|
-
const [outOfOperatingHours, setOutOfOperatingHours] = useState(
|
|
31
|
+
const [outOfOperatingHours, setOutOfOperatingHours] = useState(state.appStates.outsideOperatingHours);
|
|
32
32
|
const outOfOfficeStyleProps = Object.assign({}, defaultOutOfOfficeHeaderStyleProps, outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.styleProps);
|
|
33
33
|
|
|
34
34
|
// For some reason state object is not getting updated values in this component
|
|
@@ -37,9 +37,9 @@ export const HeaderStateful = props => {
|
|
|
37
37
|
id: "oc-lcw-header",
|
|
38
38
|
dir: state.domainStates.globalDir,
|
|
39
39
|
onMinimizeClick: () => {
|
|
40
|
-
TelemetryHelper.
|
|
40
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
41
41
|
Event: TelemetryEvent.HeaderMinimizeButtonClicked,
|
|
42
|
-
Description: "Header Minimize
|
|
42
|
+
Description: "Header Minimize action started."
|
|
43
43
|
});
|
|
44
44
|
dispatch({
|
|
45
45
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
@@ -49,12 +49,16 @@ export const HeaderStateful = props => {
|
|
|
49
49
|
type: LiveChatWidgetActionType.SET_UNREAD_MESSAGE_COUNT,
|
|
50
50
|
payload: 0
|
|
51
51
|
});
|
|
52
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
53
|
+
Event: TelemetryEvent.MinimizeChatActionCompleted,
|
|
54
|
+
Description: "Header Minimize action completed."
|
|
55
|
+
});
|
|
52
56
|
},
|
|
53
57
|
onCloseClick: async () => {
|
|
54
58
|
var _props$headerProps, _props$headerProps$co, _props$headerProps$co2;
|
|
55
|
-
TelemetryHelper.
|
|
59
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
56
60
|
Event: TelemetryEvent.HeaderCloseButtonClicked,
|
|
57
|
-
Description: "Header Close
|
|
61
|
+
Description: "Header Close action started."
|
|
58
62
|
});
|
|
59
63
|
if (localConfirmationPaneState.current !== ConfirmationState.Ok) {
|
|
60
64
|
dispatch({
|
|
@@ -67,6 +71,10 @@ export const HeaderStateful = props => {
|
|
|
67
71
|
const postMessageToOtherTabs = true;
|
|
68
72
|
await endChat(adapter, skipEndChatSDK, skipCloseChat, postMessageToOtherTabs);
|
|
69
73
|
}
|
|
74
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
75
|
+
Event: TelemetryEvent.CloseChatActionCompleted,
|
|
76
|
+
Description: "Header Close action completed."
|
|
77
|
+
});
|
|
70
78
|
const closeButtonId = ((_props$headerProps = props.headerProps) === null || _props$headerProps === void 0 ? void 0 : (_props$headerProps$co = _props$headerProps.controlProps) === null || _props$headerProps$co === void 0 ? void 0 : (_props$headerProps$co2 = _props$headerProps$co.closeButtonProps) === null || _props$headerProps$co2 === void 0 ? void 0 : _props$headerProps$co2.id) ?? `${controlProps.id}-close-button`;
|
|
71
79
|
if (closeButtonId) {
|
|
72
80
|
dispatch({
|
|
@@ -87,22 +95,24 @@ export const HeaderStateful = props => {
|
|
|
87
95
|
text: "We're Offline"
|
|
88
96
|
},
|
|
89
97
|
onMinimizeClick: () => {
|
|
90
|
-
TelemetryHelper.
|
|
98
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
91
99
|
Event: TelemetryEvent.HeaderMinimizeButtonClicked,
|
|
92
|
-
Description: "Header Minimize
|
|
100
|
+
Description: "Header Minimize action started."
|
|
93
101
|
});
|
|
94
102
|
dispatch({
|
|
95
103
|
type: LiveChatWidgetActionType.SET_MINIMIZED,
|
|
96
104
|
payload: true
|
|
97
105
|
});
|
|
106
|
+
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
107
|
+
Event: TelemetryEvent.MinimizeChatActionCompleted,
|
|
108
|
+
Description: "Header Minimize action completed."
|
|
109
|
+
});
|
|
98
110
|
},
|
|
99
111
|
...(outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.controlProps),
|
|
100
112
|
hideCloseButton: state.appStates.conversationState === ConversationState.OutOfOffice || (outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : (_outOfOfficeHeaderPro = outOfOfficeHeaderProps.controlProps) === null || _outOfOfficeHeaderPro === void 0 ? void 0 : _outOfOfficeHeaderPro.hideCloseButton)
|
|
101
113
|
};
|
|
102
114
|
useEffect(() => {
|
|
103
|
-
|
|
104
|
-
setOutOfOperatingHours(true);
|
|
105
|
-
}
|
|
115
|
+
setOutOfOperatingHours(state.appStates.outsideOperatingHours);
|
|
106
116
|
}, []);
|
|
107
117
|
useEffect(() => {
|
|
108
118
|
var _state$domainStates2;
|
|
@@ -1,29 +1,42 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
1
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
3
6
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
7
|
import { Deferred } from "./Deferred";
|
|
5
|
-
export
|
|
6
|
-
|
|
8
|
+
export let ActivityStreamHandler = /*#__PURE__*/function () {
|
|
9
|
+
function ActivityStreamHandler() {
|
|
10
|
+
_classCallCheck(this, ActivityStreamHandler);
|
|
11
|
+
}
|
|
12
|
+
_createClass(ActivityStreamHandler, null, [{
|
|
13
|
+
key: "cork",
|
|
14
|
+
value:
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
16
|
|
|
8
|
-
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
18
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Use of a deferred pattern, to hold the execution of the activity.
|
|
21
|
+
*
|
|
22
|
+
* */
|
|
23
|
+
function cork() {
|
|
24
|
+
ActivityStreamHandler.restoreDeferred = new Deferred();
|
|
25
|
+
ActivityStreamHandler.restorePromise = ActivityStreamHandler.restoreDeferred.promise;
|
|
26
|
+
}
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the promise, releasing it to continue with the execution of the activity.
|
|
30
|
+
*
|
|
31
|
+
* */
|
|
32
|
+
}, {
|
|
33
|
+
key: "uncork",
|
|
34
|
+
value: function uncork() {
|
|
35
|
+
ActivityStreamHandler.restoreDeferred.resolve();
|
|
36
|
+
}
|
|
37
|
+
}]);
|
|
38
|
+
return ActivityStreamHandler;
|
|
39
|
+
}();
|
|
27
40
|
_defineProperty(ActivityStreamHandler, "restoreDeferred", {
|
|
28
41
|
resolve: () => {
|
|
29
42
|
return "initialState";
|