@microsoft/omnichannel-chat-widget 0.1.0-main.fdf1fdf → 1.0.1-main.068a14e
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/README.md +7 -34
- package/lib/cjs/assets/Icons.js +4 -2
- package/lib/cjs/common/Constants.js +31 -171
- package/lib/cjs/common/KeyCodes.js +3 -4
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +3 -5
- package/lib/cjs/common/storage/default/defaultCacheManager.js +26 -0
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +111 -0
- package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +78 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +63 -27
- package/lib/cjs/common/telemetry/TelemetryHelper.js +21 -59
- package/lib/cjs/common/telemetry/TelemetryManager.js +3 -32
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +0 -2
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +30 -36
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +0 -9
- package/lib/cjs/common/utils.js +40 -106
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +8 -46
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +2 -24
- package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +18 -49
- package/lib/cjs/components/dimlayer/DimLayer.js +0 -4
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +9 -37
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -8
- package/lib/cjs/components/footerstateful/FooterStateful.js +11 -42
- package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +0 -6
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +7 -45
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -8
- package/lib/cjs/components/headerstateful/HeaderStateful.js +19 -31
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -14
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +5 -10
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +139 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -6
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -12
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +14 -20
- package/lib/cjs/components/livechatwidget/common/Deferred.js +6 -11
- package/lib/cjs/components/livechatwidget/common/agentEndConversationHelper.js +36 -0
- package/lib/cjs/components/livechatwidget/common/authHelper.js +13 -15
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +4 -13
- package/lib/cjs/components/livechatwidget/common/createFooter.js +4 -23
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -10
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +16 -24
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +14 -0
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +127 -49
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +0 -3
- package/lib/cjs/components/livechatwidget/common/endChat.js +65 -70
- package/lib/cjs/components/livechatwidget/common/getGeneralStylesForButton.js +0 -6
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +7 -16
- package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -8
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +25 -101
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +82 -151
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +4 -17
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +256 -12
- package/lib/cjs/components/livechatwidget/common/shareObservable.js +4 -8
- package/lib/cjs/components/livechatwidget/common/startChat.js +185 -128
- package/lib/cjs/components/livechatwidget/common/startProactiveChat.js +0 -8
- package/lib/cjs/components/livechatwidget/common/updateSessionDataForTelemetry.js +2 -11
- package/lib/cjs/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +284 -253
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +37 -25
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +57 -0
- package/lib/cjs/components/loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
- package/lib/cjs/components/loadingpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +4 -17
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -17
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +35 -24
- package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
- package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +13 -0
- package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
- package/lib/cjs/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +10 -38
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +2 -32
- package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +8 -24
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +21 -37
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +0 -7
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -6
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -27
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +5 -18
- package/lib/cjs/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -24
- package/lib/cjs/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +5 -15
- package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +0 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +17 -41
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +10 -22
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +25 -61
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +7 -15
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +2 -13
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -16
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +2 -30
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +7 -18
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +8 -42
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +4 -22
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +20 -33
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +81 -45
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -10
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +1 -12
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -19
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +1 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +13 -34
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +1 -10
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +7 -11
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +5 -14
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -21
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +0 -12
- package/lib/cjs/contexts/ChatAdapterStore.js +0 -2
- package/lib/cjs/contexts/ChatContextStore.js +0 -2
- package/lib/cjs/contexts/ChatSDKStore.js +0 -2
- package/lib/cjs/contexts/common/ConversationEndEntity.js +12 -0
- package/lib/cjs/contexts/common/ConversationState.js +0 -1
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +34 -29
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +18 -13
- package/lib/cjs/contexts/createReducer.js +190 -110
- package/lib/cjs/controller/componentController.js +2 -31
- package/lib/cjs/hooks/useChatAdapterStore.js +0 -6
- package/lib/cjs/hooks/useChatContextStore.js +0 -6
- package/lib/cjs/hooks/useChatSDKStore.js +0 -6
- package/lib/cjs/hooks/useDebounce.js +28 -0
- package/lib/cjs/hooks/useWindowDimensions.js +30 -0
- package/lib/cjs/index.js +0 -5
- package/lib/cjs/plugins/newMessageEventHandler.js +29 -36
- package/lib/esm/assets/Icons.js +2 -1
- package/lib/esm/common/Constants.js +27 -158
- package/lib/esm/common/KeyCodes.js +3 -3
- package/lib/esm/common/contextDataStore/DataStoreManager.js +3 -3
- package/lib/esm/common/storage/default/defaultCacheManager.js +18 -0
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +104 -0
- package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +70 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +67 -24
- package/lib/esm/common/telemetry/TelemetryHelper.js +21 -47
- package/lib/esm/common/telemetry/TelemetryManager.js +3 -19
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +28 -24
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +0 -5
- package/lib/esm/common/utils.js +38 -53
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +8 -17
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +2 -7
- package/lib/esm/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +20 -30
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +9 -16
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.spec.js +6 -6
- package/lib/esm/components/footerstateful/FooterStateful.js +13 -23
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +7 -35
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -6
- package/lib/esm/components/headerstateful/HeaderStateful.js +19 -16
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -2
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +5 -7
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +134 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +3 -4
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -9
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +14 -16
- package/lib/esm/components/livechatwidget/common/Deferred.js +6 -9
- package/lib/esm/components/livechatwidget/common/agentEndConversationHelper.js +30 -0
- package/lib/esm/components/livechatwidget/common/authHelper.js +13 -10
- package/lib/esm/components/livechatwidget/common/createAdapter.js +6 -6
- package/lib/esm/components/livechatwidget/common/createFooter.js +4 -16
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +10 -5
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +18 -18
- package/lib/esm/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +7 -0
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +128 -35
- package/lib/esm/components/livechatwidget/common/endChat.js +69 -57
- package/lib/esm/components/livechatwidget/common/getGeneralStylesForButton.js +0 -2
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +9 -11
- package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -5
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +28 -67
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +80 -129
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +4 -9
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +259 -6
- package/lib/esm/components/livechatwidget/common/shareObservable.js +4 -7
- package/lib/esm/components/livechatwidget/common/startChat.js +184 -99
- package/lib/esm/components/livechatwidget/common/updateSessionDataForTelemetry.js +4 -2
- package/lib/esm/components/livechatwidget/interfaces/IScrollBarProps.js +1 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +287 -188
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +38 -13
- package/lib/esm/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +50 -0
- package/lib/esm/components/loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.js +1 -0
- package/lib/esm/components/loadingpanestateful/interfaces/IStartChatErrorPaneProps.js +1 -0
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +4 -5
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +4 -5
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +35 -12
- package/lib/esm/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +1 -1
- package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +6 -0
- package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +0 -1
- package/lib/esm/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.js +1 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -22
- package/lib/esm/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +4 -8
- package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +8 -6
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +19 -11
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +12 -19
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +5 -14
- package/lib/esm/components/webchatcontainerstateful/common/utils/BrowserInfo.js +2 -16
- package/lib/esm/components/webchatcontainerstateful/common/utils/FileAttachmentIconManager.js +5 -5
- package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +5 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +2 -5
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +0 -4
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +17 -26
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +12 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +25 -39
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +9 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +2 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +0 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampFailedStyles.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampRetryStyles.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/groupActivitiesMiddleware.js +3 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +4 -28
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +8 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +9 -28
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +5 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +20 -22
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +5 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +81 -40
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +3 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +17 -14
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +15 -27
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -5
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +9 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +7 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +1 -13
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +0 -5
- package/lib/esm/contexts/ChatAdapterStore.js +2 -1
- package/lib/esm/contexts/ChatContextStore.js +2 -1
- package/lib/esm/contexts/ChatSDKStore.js +2 -1
- package/lib/esm/contexts/common/ConversationEndEntity.js +5 -0
- package/lib/esm/contexts/common/ConversationState.js +0 -1
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +34 -29
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +18 -9
- package/lib/esm/contexts/createReducer.js +190 -107
- package/lib/esm/controller/componentController.js +3 -2
- package/lib/esm/hooks/useChatAdapterStore.js +0 -4
- package/lib/esm/hooks/useChatContextStore.js +0 -4
- package/lib/esm/hooks/useChatSDKStore.js +0 -4
- package/lib/esm/hooks/useDebounce.js +22 -0
- package/lib/esm/hooks/useWindowDimensions.js +23 -0
- package/lib/esm/plugins/newMessageEventHandler.js +29 -26
- package/lib/types/assets/Icons.d.ts +1 -0
- package/lib/types/common/Constants.d.ts +21 -0
- package/lib/types/common/storage/default/defaultCacheManager.d.ts +4 -0
- package/lib/types/common/storage/default/defaultClientDataStoreProvider.d.ts +2 -0
- package/lib/types/common/storage/default/defaultInMemoryDataStore.d.ts +6 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +45 -9
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +4 -4
- package/lib/types/common/telemetry/definitions/Payload.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +4 -0
- package/lib/types/common/utils.d.ts +1 -0
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +0 -7
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/agentEndConversationHelper.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +3 -2
- package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -0
- package/lib/types/components/livechatwidget/common/initWebChatComposer.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +5 -7
- package/lib/types/components/livechatwidget/common/setPostChatContextAndLoadSurvey.d.ts +6 -1
- package/lib/types/components/livechatwidget/common/startChat.d.ts +5 -4
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +3 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +6 -2
- package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -0
- package/lib/types/components/loadingpanestateful/LoadingPaneStateful.d.ts +1 -2
- package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -0
- package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneControlProps.d.ts +4 -0
- package/lib/types/components/loadingpanestateful/interfaces/IStartChatErrorPaneProps.d.ts +4 -0
- package/lib/types/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.d.ts +2 -2
- package/lib/types/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.d.ts +5 -0
- package/lib/types/components/postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps.d.ts +4 -0
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +0 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +4 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.d.ts +1 -1
- package/lib/types/contexts/common/ConversationEndEntity.d.ts +4 -0
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +9 -3
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +34 -28
- package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
- package/lib/types/hooks/useDebounce.d.ts +3 -0
- package/lib/types/hooks/useWindowDimensions.d.ts +4 -0
- package/package.json +3 -3
|
@@ -5,19 +5,14 @@ import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
|
|
|
5
5
|
export const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
6
6
|
const onNewAdapterActivityHandler = activity => {
|
|
7
7
|
var _activity$channelData, _activity$channelData2, _activity$channelData3;
|
|
8
|
-
|
|
9
8
|
const isActivityMessage = (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message;
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
if (isNotHistoryMessage) {
|
|
13
|
-
raiseMessageEvent(activity);
|
|
14
|
-
}
|
|
9
|
+
const isHistoryMessage = isActivityMessage && ((activity === null || activity === void 0 ? void 0 : (_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 ? void 0 : (_activity$channelData2 = _activity$channelData.tags) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.includes(Constants.historyMessageTag)) || (activity === null || activity === void 0 ? void 0 : (_activity$channelData3 = activity.channelData) === null || _activity$channelData3 === void 0 ? void 0 : _activity$channelData3.fromList));
|
|
10
|
+
raiseMessageEvent(activity, isHistoryMessage);
|
|
15
11
|
};
|
|
16
|
-
|
|
17
|
-
const raiseMessageEvent = activity => {
|
|
12
|
+
let isHistoryMessageReceivedEventRasied = false;
|
|
13
|
+
const raiseMessageEvent = (activity, isHistoryMessage) => {
|
|
18
14
|
if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
|
|
19
15
|
var _text, _text2, _activity$channelData4, _activity$from;
|
|
20
|
-
|
|
21
16
|
const payload = {
|
|
22
17
|
// To identify hidden contents vs empty content
|
|
23
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -28,7 +23,6 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
|
28
23
|
tags: activity === null || activity === void 0 ? void 0 : (_activity$channelData4 = activity.channelData) === null || _activity$channelData4 === void 0 ? void 0 : _activity$channelData4.tags,
|
|
29
24
|
messageType: ""
|
|
30
25
|
};
|
|
31
|
-
|
|
32
26
|
if ((activity === null || activity === void 0 ? void 0 : (_activity$from = activity.from) === null || _activity$from === void 0 ? void 0 : _activity$from.role) === Constants.userMessageTag) {
|
|
33
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
28
|
payload.messageType = Constants.userMessageTag;
|
|
@@ -43,40 +37,49 @@ export const createOnNewAdapterActivityHandler = (chatId, userId) => {
|
|
|
43
37
|
});
|
|
44
38
|
} else {
|
|
45
39
|
var _activity$channelData5, _activity$channelData6;
|
|
46
|
-
|
|
47
40
|
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.systemMessageTag)) {
|
|
48
41
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
42
|
payload.messageType = Constants.systemMessageTag;
|
|
43
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
44
|
+
Event: TelemetryEvent.SystemMessageReceived,
|
|
45
|
+
Description: "System message received"
|
|
46
|
+
});
|
|
50
47
|
} else {
|
|
51
48
|
var _activity$channelData7, _activity$channelData8, _activity$channelData9;
|
|
52
|
-
|
|
53
49
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
54
|
-
const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
|
|
55
|
-
|
|
56
|
-
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;
|
|
57
|
-
|
|
50
|
+
const messageHasNoText = !(activity !== null && activity !== void 0 && activity.text);
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
|
+
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;
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
54
|
const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
|
|
59
|
-
|
|
60
55
|
if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
|
|
61
56
|
return;
|
|
62
57
|
}
|
|
63
|
-
|
|
64
58
|
payload.messageType = Constants.userMessageTag;
|
|
65
59
|
}
|
|
66
|
-
|
|
67
60
|
const newMessageReceivedEvent = {
|
|
68
|
-
eventName: BroadcastEvent.NewMessageReceived,
|
|
61
|
+
eventName: isHistoryMessage ? BroadcastEvent.HistoryMessageReceived : BroadcastEvent.NewMessageReceived,
|
|
69
62
|
payload: payload
|
|
70
63
|
};
|
|
71
64
|
BroadcastService.postMessage(newMessageReceivedEvent);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
if (!isHistoryMessage) {
|
|
66
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
67
|
+
Event: TelemetryEvent.MessageReceived,
|
|
68
|
+
Description: "New message received",
|
|
69
|
+
Data: payload
|
|
70
|
+
});
|
|
71
|
+
} else {
|
|
72
|
+
if (!isHistoryMessageReceivedEventRasied) {
|
|
73
|
+
isHistoryMessageReceivedEventRasied = true;
|
|
74
|
+
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
75
|
+
Event: TelemetryEvent.HistoryMessageReceived,
|
|
76
|
+
Description: "History message received",
|
|
77
|
+
Data: payload
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
77
81
|
}
|
|
78
82
|
}
|
|
79
83
|
};
|
|
80
|
-
|
|
81
84
|
return onNewAdapterActivityHandler;
|
|
82
85
|
};
|
|
@@ -9,3 +9,4 @@ export declare const PowerpointIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0
|
|
|
9
9
|
export declare const VideoIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0wIDI1NmgyMDQ4djE0MDhIMFYyNTZ6bTI1NiAxMjgwdi0xMjhIMTI4djEyOGgxMjh6bTAtMjU2di0xMjhIMTI4djEyOGgxMjh6bTAtMjU2Vjg5NkgxMjh2MTI4aDEyOHptMC0yNTZWNjQwSDEyOHYxMjhoMTI4em0wLTI1NlYzODRIMTI4djEyOGgxMjh6bTE0MDggNzg2VjM4NEgzODR2ODIzbDQxMS01NDkgNzQxIDg3OC0zMjktNTU4IDEzNy0xMzcgMzIwIDQ1N3ptMjU2IDIzOHYtMTI4aC0xMjh2MTI4aDEyOHptMC0yNTZ2LTEyOGgtMTI4djEyOGgxMjh6bTAtMjU2Vjg5NmgtMTI4djEyOGgxMjh6bTAtMjU2VjY0MGgtMTI4djEyOGgxMjh6bTAtMjU2VjM4NGgtMTI4djEyOGgxMjh6IiAvPg0KPC9zdmc+";
|
|
10
10
|
export declare const VisioIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0yMDQ4IDQ3NXYxNDQ1cTAgMjctMTAgNTB0LTI3IDQwLTQxIDI4LTUwIDEwSDY0MHEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTB2LTI1NkgxMTVxLTI0IDAtNDQtOXQtMzctMjUtMjUtMzYtOS00NVY2MjdxMC0yNCA5LTQ0dDI1LTM3IDM2LTI1IDQ1LTloMzk3VjEyOHEwLTI3IDEwLTUwdDI3LTQwIDQxLTI4IDUwLTEwaDkzM3EyNiAwIDQ5IDl0NDIgMjhsMzQ3IDM0N3ExOCAxOCAyNyA0MXQxMCA1MHptLTM4NC0yNTZ2MTY1aDE2NWwtMTY1LTE2NXpNNDkzIDE0MjRoMTYzbDI1NS02NzJINzQ1bC0xNDcgNDI3cS01IDE2LTEwIDMxdC0xMSAzMXEtNDEtMTIzLTgyLTI0NHQtODQtMjQ1SDI0MWwyNDggNjYyIDQgMTB6bTE0NyA0OTZoMTI4MFY1MTJoLTI1NnEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTBWMTI4SDY0MHYzODRoMzk3cTI0IDAgNDQgOXQzNyAyNSAyNSAzNiA5IDQ1djkyMnEwIDI0LTkgNDR0LTI1IDM3LTM2IDI1LTQ1IDlINjQwdjI1NnptOTYwLTEyODBsMTkyIDE5Mi0xMjggMTI4djQ0OGgtMjU2djEyOGgtMTI4di0zODRoMTI4djEyOGgxMjhWOTYwbC0xMjgtMTI4IDE5Mi0xOTJ6IiAvPg0KPC9zdmc+";
|
|
11
11
|
export declare const WordIcon = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciDQogICAgdmlld0JveD0iMCAwIDIwNDggMjA0OCINCiAgICB3aWR0aD0iMTJweCINCiAgICBoZWlnaHQ9IjEycHgiPg0KICAgIDxwYXRoIGQ9Ik0yMDQ4IDQ3NXYxNDQ1cTAgMjctMTAgNTB0LTI3IDQwLTQxIDI4LTUwIDEwSDY0MHEtMjcgMC01MC0xMHQtNDAtMjctMjgtNDEtMTAtNTB2LTI1NkgxMTVxLTI0IDAtNDQtOXQtMzctMjUtMjUtMzYtOS00NVY2MjdxMC0yNCA5LTQ0dDI1LTM3IDM2LTI1IDQ1LTloMzk3VjEyOHEwLTI3IDEwLTUwdDI3LTQwIDQxLTI4IDUwLTEwaDkzM3EyNiAwIDQ5IDl0NDIgMjhsMzQ3IDM0N3ExOCAxOCAyNyA0MXQxMCA1MHptLTM4NC0yNTZ2MTY1aDE2NWwtMTY1LTE2NXpNMzIwIDE0MjRoMTYxcTItOCA5LTQzdDE4LTgzIDIxLTEwMyAyMi0xMDEgMTYtNzYgOC0zMWw3IDMwcTcgMzAgMTcgNzd0MjMgMTAwIDIzIDEwMyAxOSA4NCAxMCA0M2gxNjBsMTQ4LTY3Mkg4MzRsLTgwIDQzOC0xMDAtNDM4SDUwMmwtOTYgNDQwLTg2LTQ0MEgxNzBsMTUwIDY3MnptMzIwIDQ5NmgxMjgwVjUxMmgtMjU2cS0yNyAwLTUwLTEwdC00MC0yNy0yOC00MS0xMC01MFYxMjhINjQwdjM4NGgzOTdxMjQgMCA0NCA5dDM3IDI1IDI1IDM2IDkgNDV2OTIycTAgMjQtOSA0NHQtMjUgMzctMzYgMjUtNDUgOUg2NDB2MjU2em02NDAtMTAyNFY3NjhoNTEydjEyOGgtNTEyem0wIDI1NnYtMTI4aDUxMnYxMjhoLTUxMnptMCAyNTZ2LTEyOGg1MTJ2MTI4aC01MTJ6IiAvPg0KPC9zdmc+";
|
|
12
|
+
export declare const AlertIcon = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMC8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMtU1ZHLTIwMDEwOTA0L0RURC9zdmcxMC5kdGQnPjxzdmcgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIGlkPSJMYXllcl8xIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHBhdGggZD0iTTEzLDE3aC0ydi0yaDJWMTd6IE0xMywxM2gtMlY3aDJWMTN6Ii8+PGc+PHBhdGggZD0iTTEyLDRjNC40LDAsOCwzLjYsOCw4cy0zLjYsOC04LDhzLTgtMy42LTgtOFM3LjYsNCwxMiw0IE0xMiwyQzYuNSwyLDIsNi41LDIsMTJjMCw1LjUsNC41LDEwLDEwLDEwczEwLTQuNSwxMC0xMCAgIEMyMiw2LjUsMTcuNSwyLDEyLDJMMTIsMnoiLz48L2c+PC9zdmc+";
|
|
@@ -17,6 +17,8 @@ export declare class Constants {
|
|
|
17
17
|
static readonly true = "true";
|
|
18
18
|
static readonly false = "false";
|
|
19
19
|
static readonly maximumUnreadMessageCount = 99;
|
|
20
|
+
static readonly userParticipantTypeTag = "User";
|
|
21
|
+
static readonly botParticipantTypeTag = "Bot";
|
|
20
22
|
static readonly channelIdKey = "ChannelId-";
|
|
21
23
|
static readonly ChannelId = "lcw";
|
|
22
24
|
static readonly CustomerTag = "FromCustomer";
|
|
@@ -78,6 +80,7 @@ export declare class Constants {
|
|
|
78
80
|
static readonly ChatWidgetStateChangedPrefix = "ChatWidgetStateChanged";
|
|
79
81
|
static readonly PostChatLoadingDurationInMs = 2000;
|
|
80
82
|
static readonly BrowserUnloadConfirmationMessage = "Do you want to leave chat?";
|
|
83
|
+
static readonly CacheTtlInMinutes = 15;
|
|
81
84
|
}
|
|
82
85
|
export declare const Regex: {
|
|
83
86
|
new (): {};
|
|
@@ -125,6 +128,7 @@ export declare class HtmlAttributeNames {
|
|
|
125
128
|
static readonly adaptiveCardClassName = "ac-adaptiveCard";
|
|
126
129
|
static readonly adaptiveCardTextBlockClassName = "ac-textBlock";
|
|
127
130
|
static readonly adaptiveCardToggleInputClassName = "ac-toggleInput";
|
|
131
|
+
static readonly adaptiveCardActionSetClassName = "ac-actionSet";
|
|
128
132
|
}
|
|
129
133
|
export declare class WebChatMiddlewareConstants {
|
|
130
134
|
static readonly nextVisibleActivity = "nextVisibleActivity";
|
|
@@ -132,6 +136,11 @@ export declare class WebChatMiddlewareConstants {
|
|
|
132
136
|
static readonly maxTextLength = 6000;
|
|
133
137
|
static readonly adaptiveCard = "AdaptiveCard";
|
|
134
138
|
}
|
|
139
|
+
export declare class AMSConstants {
|
|
140
|
+
static readonly supportedImagesMimeTypes: string[];
|
|
141
|
+
static readonly maxSupportedImageSize = 20;
|
|
142
|
+
static readonly maxSupportedFileSize = 300;
|
|
143
|
+
}
|
|
135
144
|
export declare class MimeTypes {
|
|
136
145
|
static readonly UnknownFileType = "application/octet-stream";
|
|
137
146
|
}
|
|
@@ -150,6 +159,18 @@ export declare enum EnvironmentVersion {
|
|
|
150
159
|
int = "int",
|
|
151
160
|
test = "test"
|
|
152
161
|
}
|
|
162
|
+
export declare enum E2VVOptions {
|
|
163
|
+
NoCalling = "192350000",
|
|
164
|
+
VideoAndVoiceCalling = "192350001",
|
|
165
|
+
VoiceOnly = "192350002"
|
|
166
|
+
}
|
|
167
|
+
export declare enum LiveWorkItemState {
|
|
168
|
+
Active = "Active",
|
|
169
|
+
Closed = "Closed",
|
|
170
|
+
Open = "Open",
|
|
171
|
+
Waiting = "Waiting",
|
|
172
|
+
WrapUp = "WrapUp"
|
|
173
|
+
}
|
|
153
174
|
export declare class TranscriptConstants {
|
|
154
175
|
static readonly ChatTranscriptsBodyColor = "#F5F5F5";
|
|
155
176
|
static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
|
|
@@ -30,9 +30,9 @@ export declare enum BroadcastEvent {
|
|
|
30
30
|
InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
|
|
31
31
|
NewMessageSent = "NewMessageSent",
|
|
32
32
|
NewMessageReceived = "NewMessageReceived",
|
|
33
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
33
34
|
RedirectPageRequest = "RedirectPageRequest",
|
|
34
35
|
StartChat = "StartChat",
|
|
35
|
-
StartChatSkippingChatButtonRendering = "StartChatSkippingChatButtonRendering",
|
|
36
36
|
StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
|
|
37
37
|
InitiateEndChat = "InitiateEndChat",
|
|
38
38
|
SetCustomContext = "SetCustomContext",
|
|
@@ -41,7 +41,14 @@ export declare enum BroadcastEvent {
|
|
|
41
41
|
ChatInitiated = "ChatInitiated",
|
|
42
42
|
CloseChat = "CloseChat",
|
|
43
43
|
InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
|
|
44
|
-
ClosePopoutWindow = "ClosePopoutWindow"
|
|
44
|
+
ClosePopoutWindow = "ClosePopoutWindow",
|
|
45
|
+
RaiseErrorEvent = "RaiseErrorEvent",
|
|
46
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
47
|
+
NetworkReconnected = "NetworkReconnected",
|
|
48
|
+
SigninCardReceived = "SignInCardReceived",
|
|
49
|
+
BotAuthConfigRequest = "BotAuthConfigRequest",
|
|
50
|
+
BotAuthConfigResponse = "BotAuthConfigResponse",
|
|
51
|
+
HideChatVisibilityChangeEvent = "hideChatVisibilityChangeEvent"
|
|
45
52
|
}
|
|
46
53
|
export declare enum TelemetryEvent {
|
|
47
54
|
CallAdded = "CallAdded",
|
|
@@ -52,8 +59,8 @@ export declare enum TelemetryEvent {
|
|
|
52
59
|
CallDisconnected = "CallDisconnected",
|
|
53
60
|
CallDisconnectedException = "CallDisconnectedException",
|
|
54
61
|
IncomingCallEnded = "incomingCallEnded",
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
VoiceVideoSdkInitialize = "VoiceVideoSdkInitialize",
|
|
63
|
+
VoiceVideoSdkInitializeException = "VoiceVideoSdkInitializeException",
|
|
57
64
|
VoiceVideoLoading = "VoiceVideoLoading",
|
|
58
65
|
VoiceVideoNotLoaded = "VoiceVideoNotLoaded",
|
|
59
66
|
VoiceVideoLoadingException = "VoiceVideoLoadingException",
|
|
@@ -76,15 +83,18 @@ export declare enum TelemetryEvent {
|
|
|
76
83
|
GetConversationDetailsCallFailed = "GetConversationDetailsCallFailed",
|
|
77
84
|
EndChatSDKCallFailed = "EndChatSDKCallFailed",
|
|
78
85
|
GetChatReconnectContextSDKCallFailed = "GetChatReconnectContextSDKCallFailed",
|
|
79
|
-
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
80
|
-
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
81
86
|
ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
|
|
87
|
+
ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
|
|
88
|
+
InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
|
|
89
|
+
ChatVisibilityChanged = "ChatVisibilityChanged",
|
|
82
90
|
WebChatLoaded = "WebChatLoaded",
|
|
83
91
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
84
92
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
93
|
+
WidgetLoadStarted = "WidgetLoadStarted",
|
|
85
94
|
WidgetLoadComplete = "WidgetLoadComplete",
|
|
86
95
|
WidgetLoadFailed = "WidgetLoadFailed",
|
|
87
96
|
StartChatMethodException = "StartChatMethodException",
|
|
97
|
+
CloseChatCall = "CloseChatCall",
|
|
88
98
|
CloseChatMethodException = "CloseChatMethodException",
|
|
89
99
|
PrechatSurveyLoaded = "PrechatSurveyLoaded",
|
|
90
100
|
PrechatSubmitted = "PrechatSubmitted",
|
|
@@ -98,6 +108,7 @@ export declare enum TelemetryEvent {
|
|
|
98
108
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
99
109
|
EmailTranscriptSent = "EmailTranscriptSent",
|
|
100
110
|
EmailTranscriptFailed = "EmailTranscriptFailed",
|
|
111
|
+
ErrorUIPaneLoaded = "ErrorUIPaneLoaded",
|
|
101
112
|
DownloadTranscriptFailed = "DownloadTranscriptFailed",
|
|
102
113
|
StartChatFailed = "StartChatFailed",
|
|
103
114
|
IC3ThreadUpdateEventReceived = "IC3ThreadUpdateEventReceived",
|
|
@@ -106,8 +117,6 @@ export declare enum TelemetryEvent {
|
|
|
106
117
|
LoadingPaneLoaded = "LoadingPaneLoaded",
|
|
107
118
|
EmailTranscriptLoaded = "EmailTranscriptLoaded",
|
|
108
119
|
OutOfOfficePaneLoaded = "OutOfOfficePaneLoaded",
|
|
109
|
-
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
110
|
-
PostChatSurveyLoaded = "PostChatSurveyLoaded",
|
|
111
120
|
ConfirmationPaneLoaded = "ConfirmationPaneLoaded",
|
|
112
121
|
ProactiveChatPaneLoaded = "ProactiveChatPaneLoaded",
|
|
113
122
|
ReconnectChatPaneLoaded = "ReconnectChatPaneLoaded",
|
|
@@ -120,17 +129,31 @@ export declare enum TelemetryEvent {
|
|
|
120
129
|
SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
|
|
121
130
|
SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
|
|
122
131
|
GetConversationDetailsException = "GetConversationDetailsException",
|
|
132
|
+
AppStatesException = "AppStatesException",
|
|
123
133
|
BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
|
|
124
134
|
GetAuthTokenCalled = "GetAuthTokenCalled",
|
|
135
|
+
GetAuthTokenFailed = "GetAuthTokenFailed",
|
|
125
136
|
ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
|
|
137
|
+
CustomerVoiceResponsePageLoaded = "CustomerVoiceResponsePageLoaded",
|
|
138
|
+
CustomerVoiceFormResponseSubmitted = "CustomerVoiceFormResponseSubmitted",
|
|
139
|
+
CustomerVoiceFormResponseError = "CustomerVoiceFormResponseError",
|
|
140
|
+
BotAuthActivityEmptySasUrl = "BotAuthActivityEmptySasUrl",
|
|
141
|
+
SetBotAuthProviderFetchConfig = "SetBotAuthProviderFetchConfig",
|
|
142
|
+
SetBotAuthProviderHideCard = "SetBotAuthProviderHideCard",
|
|
143
|
+
SetBotAuthProviderDisplayCard = "SetBotAuthProviderDisplayCard",
|
|
144
|
+
SetBotAuthProviderNotFound = "SetBotAuthProviderNotFound",
|
|
126
145
|
ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
|
|
127
146
|
ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
|
|
128
147
|
FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
|
|
148
|
+
AttachmentUploadValidatorMiddlewareFailed = "AttachmentUploadValidatorMiddlewareFailed",
|
|
129
149
|
QueuePositionMessageRecieved = "QueuePositionMessageRecieved",
|
|
130
150
|
AverageWaitTimeMessageRecieved = "AverageWaitTimeMessageRecieved",
|
|
131
151
|
DataMaskingRuleApplied = "DataMaskingRuleApplied",
|
|
152
|
+
DataMaskingRuleApplyFailed = "DataMaskingRuleApplyFailed",
|
|
132
153
|
IC3ClientEvent = "IC3ClientEvent",
|
|
133
154
|
ConversationEndedThreadEventReceived = "ConversationEndedThreadEventReceived",
|
|
155
|
+
ConversationEndedByCustomer = "ConversationEndedByCustomer",
|
|
156
|
+
ConversationEndedByAgent = "ConversationEndedByAgent",
|
|
134
157
|
InvalidConfiguration = "InvalidConfiguration",
|
|
135
158
|
SendTypingIndicatorSucceeded = "SendTypingIndicatorSucceeded",
|
|
136
159
|
SendTypingIndicatorFailed = "SendTypingIndicatorFailed",
|
|
@@ -148,7 +171,20 @@ export declare enum TelemetryEvent {
|
|
|
148
171
|
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
149
172
|
MessageSent = "MessageSent",
|
|
150
173
|
MessageReceived = "MessageReceived",
|
|
151
|
-
|
|
174
|
+
SystemMessageReceived = "SystemMessageReceived",
|
|
175
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
176
|
+
CustomContextReceived = "CustomContextReceived",
|
|
177
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
178
|
+
NetworkReconnected = "NetworkReconnected",
|
|
179
|
+
LinkModePostChatWorkflowStarted = "LinkModePostChatWorkflowStarted",
|
|
180
|
+
EmbedModePostChatWorkflowStarted = "EmbedModePostChatWorkflowStarted",
|
|
181
|
+
PostChatWorkflowFromCustomer = "PostChatWorkflowFromCustomer",
|
|
182
|
+
PostChatWorkflowFromAgent = "PostChatWorkflowFromAgent",
|
|
183
|
+
PostChatWorkflowFromBot = "PostChatWorkflowFromBot",
|
|
184
|
+
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
185
|
+
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
186
|
+
PostChatSurveyLoadingPaneLoaded = "PostChatSurveyLoadingPaneLoaded",
|
|
187
|
+
PostChatSurveyLoaded = "PostChatSurveyLoaded"
|
|
152
188
|
}
|
|
153
189
|
export interface TelemetryInput {
|
|
154
190
|
scenarioType: ScenarioType;
|
|
@@ -7,8 +7,9 @@ export interface BaseContract {
|
|
|
7
7
|
OrganizationId: string;
|
|
8
8
|
LCWRuntimeId: string;
|
|
9
9
|
CurrentRequestId: string;
|
|
10
|
-
ExceptionDetails?:
|
|
10
|
+
ExceptionDetails?: any;
|
|
11
11
|
LogLevel: string;
|
|
12
|
+
Description?: string;
|
|
12
13
|
}
|
|
13
14
|
export interface ConfigValidationContract extends BaseContract {
|
|
14
15
|
Event?: string;
|
|
@@ -31,6 +32,8 @@ export interface LoadContract extends BaseContract {
|
|
|
31
32
|
export interface ActionsContract extends BaseContract {
|
|
32
33
|
Event?: string;
|
|
33
34
|
ActionType?: string;
|
|
35
|
+
Description?: string;
|
|
36
|
+
CustomProperties?: any;
|
|
34
37
|
}
|
|
35
38
|
export interface IC3ClientContract extends BaseContract {
|
|
36
39
|
Event?: string;
|
|
@@ -40,7 +43,6 @@ export interface IC3ClientContract extends BaseContract {
|
|
|
40
43
|
EndpointId?: string;
|
|
41
44
|
ErrorCode?: string;
|
|
42
45
|
ShouldBubbleToHost?: boolean;
|
|
43
|
-
Description?: string;
|
|
44
46
|
}
|
|
45
47
|
export interface OCChatSDKContract extends BaseContract {
|
|
46
48
|
RequestId: string;
|
|
@@ -58,7 +60,6 @@ export interface WebChatContract extends BaseContract {
|
|
|
58
60
|
export interface CallingContract extends BaseContract {
|
|
59
61
|
CallId?: string;
|
|
60
62
|
Event?: string;
|
|
61
|
-
Description?: string;
|
|
62
63
|
}
|
|
63
64
|
export interface ACSAdapterContract extends BaseContract {
|
|
64
65
|
Description?: string;
|
|
@@ -68,6 +69,5 @@ export interface ACSAdapterContract extends BaseContract {
|
|
|
68
69
|
TimeStamp?: string;
|
|
69
70
|
Event?: string;
|
|
70
71
|
ErrorCode?: string;
|
|
71
|
-
ExceptionDetails?: any;
|
|
72
72
|
}
|
|
73
73
|
export declare type TelemetryContract = OCChatSDKContract | IC3ClientContract | ActionsContract | LoadContract | WebChatContract | ConfigValidationContract | CallingContract | ACSAdapterContract | BaseContract | any;
|
|
@@ -72,6 +72,7 @@ export interface ActionTelemetryData extends BaseTelemetryData {
|
|
|
72
72
|
ActionType?: string;
|
|
73
73
|
ExceptionDetails?: object;
|
|
74
74
|
Description?: string;
|
|
75
|
+
CustomProperties?: any;
|
|
75
76
|
}
|
|
76
77
|
export interface CallingTelemetryData extends BaseTelemetryData {
|
|
77
78
|
CallId?: string;
|
|
@@ -28,3 +28,4 @@ export declare const getStateFromCache: (orgId: string, widgetId: string, widget
|
|
|
28
28
|
export declare const isUndefinedOrEmpty: (object: any) => boolean;
|
|
29
29
|
export declare const addDelayInMs: (ms: number) => Promise<void>;
|
|
30
30
|
export declare const getBroadcastChannelName: (widgetId: string, widgetInstanceId: string) => string;
|
|
31
|
+
export declare const debounceLeading: (fn: any, ms?: number) => (...args: any[]) => void;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
2
1
|
import { IConfirmationPaneStatefulProps } from "./IConfirmationPaneStatefulProps";
|
|
3
2
|
export interface IConfirmationPaneStatefulParams extends IConfirmationPaneStatefulProps {
|
|
4
3
|
/**
|
|
5
4
|
* setPostChatContext: Internal Prop injected for setting Post Chat Context
|
|
6
5
|
*/
|
|
7
6
|
setPostChatContext: () => Promise<void>;
|
|
8
|
-
/**
|
|
9
|
-
* prepareEndChat: Internal Prop injected for checking PostChat contexts and trigerring end of chat
|
|
10
|
-
* @param adapter : The chat adapter for the live chat session
|
|
11
|
-
* @param state : The chat state where the conversation is currently in
|
|
12
|
-
*/
|
|
13
|
-
prepareEndChat: (adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
14
7
|
}
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IActivitySubscriber } from "./IActivitySubscriber";
|
|
2
|
+
export declare class BotAuthActivitySubscriber implements IActivitySubscriber {
|
|
3
|
+
observer: any;
|
|
4
|
+
private signInCardSeen;
|
|
5
|
+
constructor();
|
|
6
|
+
applicable(activity: any): boolean;
|
|
7
|
+
apply(activity: any): Promise<any>;
|
|
8
|
+
next(activity: any): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Dispatch } from "react";
|
|
2
|
+
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
declare const handleAgentEndConversation: (props: ILiveChatWidgetProps, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>) => void;
|
|
6
|
+
export { handleAgentEndConversation };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
|
-
declare const
|
|
2
|
+
declare const getAuthClientFunction: (chatConfig: ChatConfig | undefined) => string | undefined;
|
|
3
|
+
declare const handleAuthentication: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined) => Promise<boolean>;
|
|
3
4
|
declare const removeAuthTokenProvider: (chatSDK: any) => void;
|
|
4
|
-
export { handleAuthentication, removeAuthTokenProvider };
|
|
5
|
+
export { getAuthClientFunction, handleAuthentication, removeAuthTokenProvider };
|
|
@@ -3,4 +3,4 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
|
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
5
|
import { IWebChatProps } from "../../webchatcontainerstateful/interfaces/IWebChatProps";
|
|
6
|
-
export declare const initWebChatComposer: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setWebChatStyles: any) => IWebChatProps;
|
|
6
|
+
export declare const initWebChatComposer: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, setWebChatStyles: any) => IWebChatProps;
|
|
@@ -2,10 +2,8 @@ import "regenerator-runtime/runtime";
|
|
|
2
2
|
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
3
3
|
import { Dispatch } from "react";
|
|
4
4
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
5
|
-
import {
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
declare const
|
|
9
|
-
|
|
10
|
-
declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, chatConfig: ChatConfig | undefined, getAuthToken: ((authClientFunction?: string | undefined) => Promise<string | null>) | undefined, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, isReconnectEnabled: boolean | undefined, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
11
|
-
export { getChatReconnectContext, getReconnectIdForAuthenticatedChat, handleUnauthenticatedReconnectChat, startUnauthenticatedReconnectChat, handleRedirectUnauthenticatedReconnectChat };
|
|
5
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
6
|
+
declare const handleChatReconnect: (chatSDK: any, props: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
7
|
+
declare const getChatReconnectContext: (chatSDK: any, chatConfig: ChatConfig, props: any, isAuthenticatedChat: boolean) => Promise<any>;
|
|
8
|
+
declare const isReconnectEnabled: (chatConfig?: ChatConfig | undefined) => boolean;
|
|
9
|
+
export { handleChatReconnect, isReconnectEnabled, getChatReconnectContext };
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { Dispatch } from "react";
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
|
-
|
|
3
|
+
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
|
+
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
declare const setPostChatContextAndLoadSurvey: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, persistedChat?: boolean | undefined) => Promise<void>;
|
|
6
|
+
declare const checkPostChatEnabled: (props: ILiveChatWidgetProps, state: ILiveChatWidgetContext) => boolean;
|
|
7
|
+
declare const initiatePostChat: (props: ILiveChatWidgetProps, chatSDK: any, setAdapter: any, setWebChatStyles: any, dispatch: Dispatch<ILiveChatWidgetAction>, adapter: any, state: ILiveChatWidgetContext) => Promise<void>;
|
|
8
|
+
export { setPostChatContextAndLoadSurvey, checkPostChatEnabled, initiatePostChat };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
1
|
import { Dispatch } from "react";
|
|
3
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
5
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
|
|
6
6
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
7
|
-
declare const setPreChatAndInitiateChat: (chatSDK: any,
|
|
8
|
-
declare const initStartChat: (chatSDK: any,
|
|
9
|
-
|
|
7
|
+
declare const setPreChatAndInitiateChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, isProactiveChat?: boolean | undefined, proactiveChatEnablePrechatState?: boolean | undefined, state?: ILiveChatWidgetContext | undefined, props?: ILiveChatWidgetProps | undefined) => Promise<void>;
|
|
8
|
+
declare const initStartChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, props?: ILiveChatWidgetProps | undefined, params?: StartChatOptionalParams | undefined, persistedState?: any) => Promise<void>;
|
|
9
|
+
declare const checkIfConversationStillValid: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, state: ILiveChatWidgetContext) => Promise<boolean>;
|
|
10
|
+
export { prepareStartChat, initStartChat, setPreChatAndInitiateChat, checkIfConversationStillValid };
|
|
@@ -4,6 +4,7 @@ export interface ILiveChatWidgetControlProps {
|
|
|
4
4
|
hideCallingContainer?: boolean;
|
|
5
5
|
hideChatButton?: boolean;
|
|
6
6
|
hideConfirmationPane?: boolean;
|
|
7
|
+
hideErrorUIPane?: boolean;
|
|
7
8
|
hideFooter?: boolean;
|
|
8
9
|
hideHeader?: boolean;
|
|
9
10
|
hideLoadingPane?: boolean;
|
|
@@ -13,6 +14,7 @@ export interface ILiveChatWidgetControlProps {
|
|
|
13
14
|
hideProactiveChatPane?: boolean;
|
|
14
15
|
hideReconnectChatPane?: boolean;
|
|
15
16
|
hideWebChatContainer?: boolean;
|
|
16
|
-
|
|
17
|
+
hideStartChatButton?: boolean;
|
|
17
18
|
widgetInstanceId?: string | undefined;
|
|
19
|
+
cacheTtlInMins?: number;
|
|
18
20
|
}
|
|
@@ -12,15 +12,17 @@ import { ILiveChatWidgetControlProps } from "./ILiveChatWidgetControlProps";
|
|
|
12
12
|
import { ILiveChatWidgetStyleProps } from "./ILiveChatWidgetStyleProps";
|
|
13
13
|
import { ILoadingPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/loadingpane/interfaces/ILoadingPaneProps";
|
|
14
14
|
import { IOOOHPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/outofofficehourspane/interfaces/IOOOHPaneProps";
|
|
15
|
-
import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
|
|
16
15
|
import { IPreChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/prechatsurveypane/interfaces/IPreChatSurveyPaneProps";
|
|
17
16
|
import { IProactiveChatPaneStatefulProps } from "../../proactivechatpanestateful/interfaces/IProactiveChatPaneStatefulProps";
|
|
18
17
|
import { IReconnectChatPaneStatefulProps } from "../../reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps";
|
|
18
|
+
import { IStartChatErrorPaneProps } from "../../loadingpanestateful/interfaces/IStartChatErrorPaneProps";
|
|
19
19
|
import { ITelemetryConfig } from "../../../common/telemetry/interfaces/ITelemetryConfig";
|
|
20
20
|
import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps";
|
|
21
21
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
22
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
23
|
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
24
|
+
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
25
|
+
import { IScrollBarProps } from "./IScrollBarProps";
|
|
24
26
|
export interface ILiveChatWidgetProps {
|
|
25
27
|
audioNotificationProps?: IAudioNotificationProps;
|
|
26
28
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -40,14 +42,16 @@ export interface ILiveChatWidgetProps {
|
|
|
40
42
|
outOfOfficeHeaderProps?: IHeaderProps;
|
|
41
43
|
outOfOfficeHoursPaneProps?: IOOOHPaneProps;
|
|
42
44
|
postChatLoadingPaneProps?: ILoadingPaneProps;
|
|
43
|
-
postChatSurveyPaneProps?:
|
|
45
|
+
postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
|
|
44
46
|
preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
|
|
45
47
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
46
48
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
49
|
+
startChatErrorPaneProps?: IStartChatErrorPaneProps;
|
|
47
50
|
styleProps?: ILiveChatWidgetStyleProps;
|
|
48
51
|
telemetryConfig: ITelemetryConfig;
|
|
49
52
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
50
53
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
54
|
contextDataStore?: IContextDataStore;
|
|
52
55
|
getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
|
|
56
|
+
scrollBarProps?: IScrollBarProps;
|
|
53
57
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface IScrollBarProps {
|
|
2
|
+
/**
|
|
3
|
+
* Scrollbar width in px
|
|
4
|
+
*/
|
|
5
|
+
width?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Scrollbar track background color
|
|
8
|
+
*/
|
|
9
|
+
trackBackgroundColor?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Scrollbar thumb background color
|
|
12
|
+
*/
|
|
13
|
+
thumbBackgroundColor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Scrollbar thumb border radius in px
|
|
16
|
+
*/
|
|
17
|
+
thumbBorderRadius?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Scrollbar thumb hover color
|
|
20
|
+
*/
|
|
21
|
+
thumbHoverColor?: string;
|
|
22
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const LoadingPaneStateful: (props: ILoadingPaneProps) => JSX.Element;
|
|
1
|
+
export declare const LoadingPaneStateful: (props: any) => JSX.Element;
|
|
3
2
|
export default LoadingPaneStateful;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const PostChatSurveyPaneStateful: (props:
|
|
1
|
+
import { IPostChatSurveyPaneStatefulProps } from "./interfaces/IPostChatSurveyPaneStatefulProps";
|
|
2
|
+
export declare const PostChatSurveyPaneStateful: (props: IPostChatSurveyPaneStatefulProps) => JSX.Element;
|
|
3
3
|
export default PostChatSurveyPaneStateful;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { IPostChatSurveyPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/postchatsurveypane/interfaces/IPostChatSurveyPaneProps";
|
|
2
|
+
export interface IPostChatSurveyPaneStatefulProps extends IPostChatSurveyPaneProps {
|
|
3
|
+
isCustomerVoiceSurveyCompact?: boolean;
|
|
4
|
+
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IReconnectChatPaneProps } from "@microsoft/omnichannel-chat-components/lib/types/components/reconnectchatpane/interfaces/IReconnectChatPaneProps";
|
|
2
2
|
export interface IReconnectChatPaneStatefulProps extends IReconnectChatPaneProps {
|
|
3
|
-
isReconnectEnabled?: boolean;
|
|
4
3
|
reconnectId?: string;
|
|
5
4
|
redirectInSameWindow?: boolean;
|
|
6
5
|
}
|