@microsoft/omnichannel-chat-widget 0.1.0-main.a7e4e7d → 0.1.0-main.ada8ec0
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 -2
- package/lib/cjs/assets/Icons.js +4 -2
- package/lib/cjs/common/Constants.js +32 -163
- 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 +53 -25
- 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 +65 -93
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +8 -46
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +19 -25
- package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +8 -33
- 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 +14 -43
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -8
- package/lib/cjs/components/headerstateful/HeaderStateful.js +20 -32
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +2 -14
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +39 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +20 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +34 -0
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +64 -0
- package/lib/cjs/components/livechatwidget/common/Deferred.js +37 -0
- package/lib/cjs/components/livechatwidget/common/authHelper.js +50 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +10 -9
- 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 +36 -43
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +14 -0
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +133 -51
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +0 -3
- package/lib/cjs/components/livechatwidget/common/endChat.js +107 -54
- 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 +49 -58
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +76 -129
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +4 -17
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +2 -15
- package/lib/cjs/components/livechatwidget/common/shareObservable.js +41 -0
- package/lib/cjs/components/livechatwidget/common/startChat.js +235 -127
- 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 +321 -205
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +26 -19
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +57 -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 +32 -23
- 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 +11 -43
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +19 -33
- package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -24
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -19
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -7
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -6
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -27
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +6 -17
- 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/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +12 -0
- 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 +27 -37
- 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 +41 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +82 -0
- 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 +89 -0
- 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 +13 -30
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -34
- 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/ConversationState.js +3 -3
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +30 -26
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +15 -13
- package/lib/cjs/contexts/createReducer.js +164 -102
- package/lib/cjs/controller/componentController.js +4 -33
- 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 +29 -150
- 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 +57 -22
- 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 +61 -51
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +8 -17
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -12
- package/lib/esm/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +3 -0
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +10 -14
- 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 +14 -36
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.spec.js +6 -6
- package/lib/esm/components/headerstateful/HeaderStateful.js +20 -17
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +2 -2
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +32 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +13 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +27 -0
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +57 -0
- package/lib/esm/components/livechatwidget/common/Deferred.js +30 -0
- package/lib/esm/components/livechatwidget/common/authHelper.js +42 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -4
- 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 +38 -37
- package/lib/esm/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +7 -0
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +134 -37
- package/lib/esm/components/livechatwidget/common/endChat.js +108 -37
- 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 +52 -27
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +77 -111
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +4 -9
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +4 -7
- package/lib/esm/components/livechatwidget/common/shareObservable.js +35 -0
- package/lib/esm/components/livechatwidget/common/startChat.js +233 -103
- 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 +323 -148
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +26 -7
- package/lib/esm/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +50 -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 +32 -11
- 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 +14 -27
- package/lib/esm/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +1 -1
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +21 -9
- package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +94 -4
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +12 -19
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +6 -13
- 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/interfaces/IAdaptiveCardStyles.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +5 -0
- 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 +27 -22
- 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 +34 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +80 -0
- 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 +83 -0
- 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 +15 -19
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +5 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -29
- 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/ConversationState.js +3 -3
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +30 -26
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +15 -9
- package/lib/esm/contexts/createReducer.js +164 -99
- package/lib/esm/controller/componentController.js +5 -4
- 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 +22 -0
- package/lib/types/common/interfaces/IContextDataStore.d.ts +1 -1
- 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 +40 -7
- 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 +7 -3
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +2 -1
- package/lib/types/components/livechatwidget/common/ActivityStreamHandler.d.ts +14 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.d.ts +6 -0
- package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/ChatAdapterShim.d.ts +7 -0
- package/lib/types/components/livechatwidget/common/Deferred.d.ts +9 -0
- package/lib/types/components/livechatwidget/common/authHelper.d.ts +5 -0
- package/lib/types/components/livechatwidget/common/defaultProps/defaultScrollBarProps.d.ts +2 -0
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -7
- package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/startChat.d.ts +5 -2
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +4 -1
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +5 -2
- package/lib/types/components/livechatwidget/interfaces/IScrollBarProps.d.ts +22 -0
- package/lib/types/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.d.ts +2 -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 -2
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +1 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IAdaptiveCardStyles.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IBotMagicCodeConfig.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/interfaces/IRenderingMiddlewareProps.d.ts +4 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IWebChatContainerStatefulProps.d.ts +4 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.d.ts +3 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.d.ts +1 -0
- 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/messageTimestampMiddleware.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.d.ts +1 -1
- package/lib/types/contexts/common/ConversationState.d.ts +3 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +5 -3
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +30 -25
- 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 +5 -4
|
@@ -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+";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare class Constants {
|
|
2
|
+
static readonly magicCodeBroadcastChannel = "MagicCodeChannel";
|
|
3
|
+
static readonly magicCodeResponseBroadcastChannel = "MagicCodeResponseChannel";
|
|
2
4
|
static readonly systemMessageTag = "system";
|
|
3
5
|
static readonly userMessageTag = "user";
|
|
4
6
|
static readonly historyMessageTag = "history";
|
|
@@ -32,6 +34,10 @@ export declare class Constants {
|
|
|
32
34
|
static readonly queuePositionMessageTag = "queueposition";
|
|
33
35
|
static readonly averageWaitTimeMessageTag = "averagewaittime";
|
|
34
36
|
static readonly message = "message";
|
|
37
|
+
static readonly hiddenTag = "Hidden";
|
|
38
|
+
static readonly prefixTimestampTag = "ServerMessageTimestamp_";
|
|
39
|
+
static readonly acsChannel = "ACS_CHANNEL";
|
|
40
|
+
static readonly publicMessageTag = "public";
|
|
35
41
|
static readonly supportedAdaptiveCardContentTypes: Array<string>;
|
|
36
42
|
static readonly maxUploadFileSize = "500000";
|
|
37
43
|
static readonly imageRegex: RegExp;
|
|
@@ -70,6 +76,9 @@ export declare class Constants {
|
|
|
70
76
|
static readonly internetConnectionTestUrl = "https://ocsdk-prod.azureedge.net/public/connecttest.txt";
|
|
71
77
|
static readonly internetConnectionTestUrlText = "Omnichannel Connect Test";
|
|
72
78
|
static readonly ChatWidgetStateChangedPrefix = "ChatWidgetStateChanged";
|
|
79
|
+
static readonly PostChatLoadingDurationInMs = 2000;
|
|
80
|
+
static readonly BrowserUnloadConfirmationMessage = "Do you want to leave chat?";
|
|
81
|
+
static readonly CacheTtlInMinutes = 15;
|
|
73
82
|
}
|
|
74
83
|
export declare const Regex: {
|
|
75
84
|
new (): {};
|
|
@@ -117,6 +126,7 @@ export declare class HtmlAttributeNames {
|
|
|
117
126
|
static readonly adaptiveCardClassName = "ac-adaptiveCard";
|
|
118
127
|
static readonly adaptiveCardTextBlockClassName = "ac-textBlock";
|
|
119
128
|
static readonly adaptiveCardToggleInputClassName = "ac-toggleInput";
|
|
129
|
+
static readonly adaptiveCardActionSetClassName = "ac-actionSet";
|
|
120
130
|
}
|
|
121
131
|
export declare class WebChatMiddlewareConstants {
|
|
122
132
|
static readonly nextVisibleActivity = "nextVisibleActivity";
|
|
@@ -142,6 +152,18 @@ export declare enum EnvironmentVersion {
|
|
|
142
152
|
int = "int",
|
|
143
153
|
test = "test"
|
|
144
154
|
}
|
|
155
|
+
export declare enum E2VVOptions {
|
|
156
|
+
NoCalling = "192350000",
|
|
157
|
+
VideoAndVoiceCalling = "192350001",
|
|
158
|
+
VoiceOnly = "192350002"
|
|
159
|
+
}
|
|
160
|
+
export declare enum LiveWorkItemState {
|
|
161
|
+
Active = "Active",
|
|
162
|
+
Closed = "Closed",
|
|
163
|
+
Open = "Open",
|
|
164
|
+
Waiting = "Waiting",
|
|
165
|
+
WrapUp = "WrapUp"
|
|
166
|
+
}
|
|
145
167
|
export declare class TranscriptConstants {
|
|
146
168
|
static readonly ChatTranscriptsBodyColor = "#F5F5F5";
|
|
147
169
|
static readonly TranscriptMessageEmojiMessageType = "http://schema.skype.com/emoji";
|
|
@@ -19,19 +19,32 @@ export declare enum LogLevel {
|
|
|
19
19
|
}
|
|
20
20
|
export declare enum BroadcastEvent {
|
|
21
21
|
LoadPostChatSurvey = "LoadPostChatSurvey",
|
|
22
|
-
|
|
22
|
+
ChatEnded = "ChatEnded",
|
|
23
23
|
NewMessageNotification = "NewMessageNotification",
|
|
24
24
|
UnreadMessageCount = "UnreadMessageCount",
|
|
25
|
+
StartProactiveChat = "StartProactiveChat",
|
|
25
26
|
ProactiveChatStartChat = "ProactiveChatStartChat",
|
|
26
27
|
ProactiveChatStartPopoutChat = "ProactiveChatStartPopoutChat",
|
|
28
|
+
ProactiveChatIsInPopoutMode = "ProactiveChatIsInPopoutMode",
|
|
29
|
+
ResetProactiveChatParams = "ResetProactiveChatParams",
|
|
27
30
|
InvalidAdaptiveCardFormat = "InvalidAdaptiveCardFormat",
|
|
28
31
|
NewMessageSent = "NewMessageSent",
|
|
29
32
|
NewMessageReceived = "NewMessageReceived",
|
|
33
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
30
34
|
RedirectPageRequest = "RedirectPageRequest",
|
|
31
|
-
|
|
35
|
+
StartChat = "StartChat",
|
|
32
36
|
StartUnauthenticatedReconnectChat = "StartUnauthenticatedReconnectChat",
|
|
37
|
+
InitiateEndChat = "InitiateEndChat",
|
|
33
38
|
SetCustomContext = "SetCustomContext",
|
|
34
|
-
ChatRetrievedFromCache = "ChatRetrievedFromCache"
|
|
39
|
+
ChatRetrievedFromCache = "ChatRetrievedFromCache",
|
|
40
|
+
MaximizeChat = "MaximizeChat",
|
|
41
|
+
ChatInitiated = "ChatInitiated",
|
|
42
|
+
CloseChat = "CloseChat",
|
|
43
|
+
InitiateEndChatOnBrowserUnload = "InitiateEndChatOnBrowserUnload",
|
|
44
|
+
ClosePopoutWindow = "ClosePopoutWindow",
|
|
45
|
+
RaiseErrorEvent = "RaiseErrorEvent",
|
|
46
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
47
|
+
NetworkReconnected = "NetworkReconnected"
|
|
35
48
|
}
|
|
36
49
|
export declare enum TelemetryEvent {
|
|
37
50
|
CallAdded = "CallAdded",
|
|
@@ -42,8 +55,8 @@ export declare enum TelemetryEvent {
|
|
|
42
55
|
CallDisconnected = "CallDisconnected",
|
|
43
56
|
CallDisconnectedException = "CallDisconnectedException",
|
|
44
57
|
IncomingCallEnded = "incomingCallEnded",
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
VoiceVideoSdkInitialize = "VoiceVideoSdkInitialize",
|
|
59
|
+
VoiceVideoSdkInitializeException = "VoiceVideoSdkInitializeException",
|
|
47
60
|
VoiceVideoLoading = "VoiceVideoLoading",
|
|
48
61
|
VoiceVideoNotLoaded = "VoiceVideoNotLoaded",
|
|
49
62
|
VoiceVideoLoadingException = "VoiceVideoLoadingException",
|
|
@@ -69,9 +82,12 @@ export declare enum TelemetryEvent {
|
|
|
69
82
|
PostChatContextCallSucceed = "PostChatContextCallSucceed",
|
|
70
83
|
PostChatContextCallFailed = "PostChatContextCallFailed",
|
|
71
84
|
ParseAdaptiveCardFailed = "ParseAdaptiveCardFailed",
|
|
85
|
+
ClientDataStoreProviderFailed = "ClientDataStoreProviderFailed",
|
|
86
|
+
InMemoryDataStoreFailed = "InMemoryDataStoreFailed",
|
|
72
87
|
WebChatLoaded = "WebChatLoaded",
|
|
73
88
|
LCWChatButtonClicked = "LCWChatButtonClicked",
|
|
74
89
|
LCWChatButtonShow = "LCWChatButtonShow",
|
|
90
|
+
WidgetLoadStarted = "WidgetLoadStarted",
|
|
75
91
|
WidgetLoadComplete = "WidgetLoadComplete",
|
|
76
92
|
WidgetLoadFailed = "WidgetLoadFailed",
|
|
77
93
|
StartChatMethodException = "StartChatMethodException",
|
|
@@ -80,13 +96,15 @@ export declare enum TelemetryEvent {
|
|
|
80
96
|
PrechatSubmitted = "PrechatSubmitted",
|
|
81
97
|
StartChatSDKCall = "StartChatCall",
|
|
82
98
|
StartChatEventRecevied = "StartChatEventReceived",
|
|
83
|
-
EndChatSDKCall = "
|
|
99
|
+
EndChatSDKCall = "EndChatSDKCall",
|
|
84
100
|
EndChatEventReceived = "EndChatEventReceived",
|
|
101
|
+
WindowClosed = "WindowClosed",
|
|
85
102
|
OnNewMessageFailed = "OnNewMessageFailed",
|
|
86
103
|
OnNewMessageAudioNotificationFailed = "OnNewMessageAudioNotificationFailed",
|
|
87
104
|
DownloadTranscriptResponseNullOrUndefined = "DownloadTranscriptResponseNullOrUndefined",
|
|
88
105
|
EmailTranscriptSent = "EmailTranscriptSent",
|
|
89
106
|
EmailTranscriptFailed = "EmailTranscriptFailed",
|
|
107
|
+
ErrorUIPaneLoaded = "ErrorUIPaneLoaded",
|
|
90
108
|
DownloadTranscriptFailed = "DownloadTranscriptFailed",
|
|
91
109
|
StartChatFailed = "StartChatFailed",
|
|
92
110
|
IC3ThreadUpdateEventReceived = "IC3ThreadUpdateEventReceived",
|
|
@@ -106,12 +124,23 @@ export declare enum TelemetryEvent {
|
|
|
106
124
|
EmailTranscriptButtonClicked = "EmailTranscriptButtonClicked",
|
|
107
125
|
EmailTranscriptCancelButtonClicked = "EmailTranscriptCancelButtonClicked",
|
|
108
126
|
AudioToggleButtonClicked = "AudioToggleButtonClicked",
|
|
127
|
+
SuppressBotMagicCodeSucceeded = "SuppressBotMagicCodeSucceeded",
|
|
128
|
+
SuppressBotMagicCodeFailed = "SuppressBotMagicCodeFailed",
|
|
129
|
+
GetConversationDetailsException = "GetConversationDetailsException",
|
|
130
|
+
BrowserUnloadEventStarted = "BrowserUnloadEventStarted",
|
|
131
|
+
GetAuthTokenCalled = "GetAuthTokenCalled",
|
|
132
|
+
GetAuthTokenFailed = "GetAuthTokenFailed",
|
|
133
|
+
ReceivedNullOrEmptyToken = "ReceivedNullOrEmptyToken",
|
|
134
|
+
CustomerVoiceResponsePageLoaded = "CustomerVoiceResponsePageLoaded",
|
|
135
|
+
CustomerVoiceFormResponseSubmitted = "CustomerVoiceFormResponseSubmitted",
|
|
136
|
+
CustomerVoiceFormResponseError = "CustomerVoiceFormResponseError",
|
|
109
137
|
ProcessingHTMLTextMiddlewareFailed = "ProcessingHTMLTextMiddlewareFailed",
|
|
110
138
|
ProcessingSanitizationMiddlewareFailed = "ProcessingSanitizationMiddlewareFailed",
|
|
111
139
|
FormatTagsMiddlewareJSONStringifyFailed = "FormatTagsMiddlewareJSONStringifyFailed",
|
|
112
140
|
QueuePositionMessageRecieved = "QueuePositionMessageRecieved",
|
|
113
141
|
AverageWaitTimeMessageRecieved = "AverageWaitTimeMessageRecieved",
|
|
114
142
|
DataMaskingRuleApplied = "DataMaskingRuleApplied",
|
|
143
|
+
DataMaskingRuleApplyFailed = "DataMaskingRuleApplyFailed",
|
|
115
144
|
IC3ClientEvent = "IC3ClientEvent",
|
|
116
145
|
ConversationEndedThreadEventReceived = "ConversationEndedThreadEventReceived",
|
|
117
146
|
InvalidConfiguration = "InvalidConfiguration",
|
|
@@ -131,7 +160,11 @@ export declare enum TelemetryEvent {
|
|
|
131
160
|
ReconnectChatMinimize = "ReconnectChatMinimize",
|
|
132
161
|
MessageSent = "MessageSent",
|
|
133
162
|
MessageReceived = "MessageReceived",
|
|
134
|
-
|
|
163
|
+
SystemMessageReceived = "SystemMessageReceived",
|
|
164
|
+
HistoryMessageReceived = "HistoryMessageReceived",
|
|
165
|
+
CustomContextReceived = "CustomContextReceived",
|
|
166
|
+
NetworkDisconnected = "NetworkDisconnected",
|
|
167
|
+
NetworkReconnected = "NetworkReconnected"
|
|
135
168
|
}
|
|
136
169
|
export interface TelemetryInput {
|
|
137
170
|
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;
|
|
@@ -18,9 +18,13 @@ export declare const extractPreChatSurveyResponseValues: (preChatSurvey: string,
|
|
|
18
18
|
value: string;
|
|
19
19
|
}[]) => {};
|
|
20
20
|
export declare const isNullOrUndefined: (obj: any) => boolean;
|
|
21
|
-
export declare const isNullOrEmptyString: (s: string) => boolean;
|
|
21
|
+
export declare const isNullOrEmptyString: (s: string | null) => boolean;
|
|
22
22
|
export declare const newGuid: () => string;
|
|
23
23
|
export declare const createTimer: () => ITimer;
|
|
24
24
|
export declare const getDomain: (hostValue: any) => string;
|
|
25
|
-
export declare const getWidgetCacheId: (orgId: string, widgetId: string) => string;
|
|
26
|
-
export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string) => string;
|
|
25
|
+
export declare const getWidgetCacheId: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
|
|
26
|
+
export declare const getWidgetEndChatEventName: (orgId: string, widgetId: string, widgetInstanceId: string) => string;
|
|
27
|
+
export declare const getStateFromCache: (orgId: string, widgetId: string, widgetInstanceId: string) => any;
|
|
28
|
+
export declare const isUndefinedOrEmpty: (object: any) => boolean;
|
|
29
|
+
export declare const addDelayInMs: (ms: number) => Promise<void>;
|
|
30
|
+
export declare const getBroadcastChannelName: (widgetId: string, widgetInstanceId: string) => string;
|
|
@@ -15,6 +15,7 @@ export interface IHeaderStatefulParams {
|
|
|
15
15
|
* @param adapter : The chat adapter for the live chat session
|
|
16
16
|
* @param skipEndChatSDK : If set to true endchat will skip chatSDK endChat call
|
|
17
17
|
* @param skipCloseChat : If set to true endchat will skip closing the live chat instance
|
|
18
|
+
* @param postMessageToOtherTab : If set to true endchat will send a message to other tabs(multi-tabs)
|
|
18
19
|
*/
|
|
19
|
-
endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean) => Promise<void>;
|
|
20
|
+
endChat: (adapter: any, skipEndChatSDK?: boolean, skipCloseChat?: boolean, postMessageToOtherTab?: boolean) => Promise<void>;
|
|
20
21
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class ActivityStreamHandler {
|
|
2
|
+
static restoreDeferred: any;
|
|
3
|
+
static restorePromise: Promise<any>;
|
|
4
|
+
/**
|
|
5
|
+
* Use of a deferred pattern, to hold the execution of the activity.
|
|
6
|
+
*
|
|
7
|
+
* */
|
|
8
|
+
static cork(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Resolve the promise, releasing it to continue with the execution of the activity.
|
|
11
|
+
*
|
|
12
|
+
* */
|
|
13
|
+
static uncork(): void;
|
|
14
|
+
}
|
package/lib/types/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IActivitySubscriber } from "./IActivitySubscriber";
|
|
2
|
+
export declare class PauseActivitySubscriber implements IActivitySubscriber {
|
|
3
|
+
observer: any;
|
|
4
|
+
apply(activity: any): Promise<void>;
|
|
5
|
+
applicable(activity: any): boolean;
|
|
6
|
+
next(activity: any): Promise<any>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
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>;
|
|
4
|
+
declare const removeAuthTokenProvider: (chatSDK: any) => void;
|
|
5
|
+
export { getAuthClientFunction, handleAuthentication, removeAuthTokenProvider };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "regenerator-runtime/runtime";
|
|
2
|
+
import ChatConfig from "@microsoft/omnichannel-chat-sdk/lib/core/ChatConfig";
|
|
2
3
|
import { Dispatch } from "react";
|
|
3
4
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
4
|
-
import {
|
|
5
|
-
declare const
|
|
6
|
-
declare const
|
|
7
|
-
declare const
|
|
8
|
-
|
|
9
|
-
declare const handleRedirectUnauthenticatedReconnectChat: (chatSDK: any, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any, initStartChat: any, reconnectId: string, redirectInSameWindow: boolean | undefined) => Promise<void>;
|
|
10
|
-
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) => any;
|
|
9
|
+
export { handleChatReconnect, isReconnectEnabled, getChatReconnectContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function shareObservable(observable: any): any;
|
|
@@ -2,6 +2,9 @@ import { Dispatch } from "react";
|
|
|
2
2
|
import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetAction";
|
|
3
3
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
4
4
|
import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
|
|
5
|
+
import StartChatOptionalParams from "@microsoft/omnichannel-chat-sdk/lib/core/StartChatOptionalParams";
|
|
5
6
|
declare const prepareStartChat: (props: ILiveChatWidgetProps, chatSDK: any, state: ILiveChatWidgetContext, dispatch: Dispatch<ILiveChatWidgetAction>, setAdapter: any) => Promise<void>;
|
|
6
|
-
declare const
|
|
7
|
-
|
|
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, props: ILiveChatWidgetProps, requestId: any, dispatch: Dispatch<ILiveChatWidgetAction>) => 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,5 +14,7 @@ export interface ILiveChatWidgetControlProps {
|
|
|
13
14
|
hideProactiveChatPane?: boolean;
|
|
14
15
|
hideReconnectChatPane?: boolean;
|
|
15
16
|
hideWebChatContainer?: boolean;
|
|
16
|
-
|
|
17
|
+
hideStartChatButton?: boolean;
|
|
18
|
+
widgetInstanceId?: string | undefined;
|
|
19
|
+
cacheTtlInMins?: number;
|
|
17
20
|
}
|
|
@@ -12,7 +12,6 @@ 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";
|
|
@@ -21,6 +20,8 @@ import { IWebChatContainerStatefulProps } from "../../webchatcontainerstateful/i
|
|
|
21
20
|
import { OmnichannelChatSDK } from "@microsoft/omnichannel-chat-sdk";
|
|
22
21
|
import { ILiveChatWidgetContext } from "../../../contexts/common/ILiveChatWidgetContext";
|
|
23
22
|
import { IContextDataStore } from "../../../common/interfaces/IContextDataStore";
|
|
23
|
+
import { IPostChatSurveyPaneStatefulProps } from "../../postchatsurveypanestateful/interfaces/IPostChatSurveyPaneStatefulProps";
|
|
24
|
+
import { IScrollBarProps } from "./IScrollBarProps";
|
|
24
25
|
export interface ILiveChatWidgetProps {
|
|
25
26
|
audioNotificationProps?: IAudioNotificationProps;
|
|
26
27
|
callingContainerProps?: ICallingContainerProps;
|
|
@@ -40,7 +41,7 @@ export interface ILiveChatWidgetProps {
|
|
|
40
41
|
outOfOfficeHeaderProps?: IHeaderProps;
|
|
41
42
|
outOfOfficeHoursPaneProps?: IOOOHPaneProps;
|
|
42
43
|
postChatLoadingPaneProps?: ILoadingPaneProps;
|
|
43
|
-
postChatSurveyPaneProps?:
|
|
44
|
+
postChatSurveyPaneProps?: IPostChatSurveyPaneStatefulProps;
|
|
44
45
|
preChatSurveyPaneProps?: IPreChatSurveyPaneProps;
|
|
45
46
|
proactiveChatPaneProps?: IProactiveChatPaneStatefulProps;
|
|
46
47
|
reconnectChatPaneProps?: IReconnectChatPaneStatefulProps;
|
|
@@ -49,4 +50,6 @@ export interface ILiveChatWidgetProps {
|
|
|
49
50
|
webChatContainerProps?: IWebChatContainerStatefulProps;
|
|
50
51
|
liveChatContextFromCache?: ILiveChatWidgetContext;
|
|
51
52
|
contextDataStore?: IContextDataStore;
|
|
53
|
+
getAuthToken?: (authClientFunction?: string) => Promise<string | null>;
|
|
54
|
+
scrollBarProps?: IScrollBarProps;
|
|
52
55
|
}
|
|
@@ -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,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,7 +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
|
-
authClientFunction?: string;
|
|
4
|
-
isReconnectEnabled?: boolean;
|
|
5
3
|
reconnectId?: string;
|
|
6
4
|
redirectInSameWindow?: boolean;
|
|
7
5
|
}
|