@microsoft/omnichannel-chat-widget 1.8.5 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/assets/Audios.js +1 -2
- package/lib/cjs/assets/Icons.js +16 -32
- package/lib/cjs/common/Constants.js +58 -86
- package/lib/cjs/common/KeyCodes.js +9 -10
- package/lib/cjs/common/contextDataStore/DataStoreManager.js +7 -8
- package/lib/cjs/common/facades/FacadeChatSDK.js +11 -13
- package/lib/cjs/common/storage/default/defaultCacheManager.js +7 -8
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +2 -3
- package/lib/cjs/common/telemetry/ScenarioMarker.js +10 -12
- package/lib/cjs/common/telemetry/TelemetryConstants.js +31 -29
- package/lib/cjs/common/telemetry/TelemetryHelper.js +39 -39
- package/lib/cjs/common/telemetry/TelemetryManager.js +21 -24
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAppInsightsConfig.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +2 -3
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryInternalData.js +2 -3
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -8
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
- package/lib/cjs/common/utils/SecureEventBus.js +36 -10
- package/lib/cjs/common/utils/dispatchCustomEvent.js +2 -3
- package/lib/cjs/common/utils/xssUtils.js +1 -1
- package/lib/cjs/common/utils.js +10 -11
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +15 -17
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +10 -12
- package/lib/cjs/components/chatbuttonstateful/common/styleProps/defaultOutOfOfficeChatButtonStyleProps.js +2 -3
- package/lib/cjs/components/citationpanestateful/CitationDim.js +3 -4
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +3 -6
- package/lib/cjs/components/citationpanestateful/common/defaultProps/defaultCitationPaneProps.js +3 -5
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +3 -5
- package/lib/cjs/components/confirmationpanestateful/common/defaultProps/defaultConfirmationPaneLocalizedTexts.js +2 -3
- package/lib/cjs/components/dimlayer/DimLayer.js +1 -1
- package/lib/cjs/components/draggable/DraggableChatWidget.js +3 -5
- package/lib/cjs/components/draggable/DraggableEventEmitter.js +4 -6
- package/lib/cjs/components/draggable/DraggableEventNames.js +4 -5
- package/lib/cjs/components/draggable/DraggableEventReceiver.js +2 -4
- package/lib/cjs/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +8 -10
- package/lib/cjs/components/errorboundary/ErrorBoundary.js +17 -21
- package/lib/cjs/components/footerstateful/FooterStateful.js +9 -11
- package/lib/cjs/components/footerstateful/audionotificationstateful/AudioNotificationStateful.js +2 -4
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +4 -4
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/common/defaultLibraryScripts.js +1 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +13 -15
- package/lib/cjs/components/headerstateful/common/styleProps/defaultOutOfOfficeHeaderStyleProps.js +2 -3
- package/lib/cjs/components/livechatwidget/LiveChatWidget.js +6 -8
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +10 -14
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +26 -32
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +10 -12
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +9 -11
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +12 -17
- package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +4 -5
- package/lib/cjs/components/livechatwidget/common/Deferred.js +10 -13
- package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +12 -15
- package/lib/cjs/components/livechatwidget/common/authHelper.js +1 -1
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +3 -3
- package/lib/cjs/components/livechatwidget/common/createDownloadTranscriptProps.js +1 -2
- package/lib/cjs/components/livechatwidget/common/createFooter.js +1 -1
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +1 -2
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +2 -3
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultScrollBarProps.js +2 -3
- package/lib/cjs/components/livechatwidget/common/defaultStyles/defaultLiveChatWidgetGeneralStyles.js +2 -3
- package/lib/cjs/components/livechatwidget/common/endChat.js +12 -13
- package/lib/cjs/components/livechatwidget/common/helpers/markdownHelper.js +1 -1
- package/lib/cjs/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +17 -17
- package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
- package/lib/cjs/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +4 -5
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +6 -6
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
- package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
- package/lib/cjs/components/livechatwidget/common/startChat.js +37 -37
- package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +6 -7
- package/lib/cjs/components/livechatwidget/interfaces/IMockProps.js +3 -4
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +76 -78
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +6 -8
- package/lib/cjs/components/loadingpanestateful/common/defaultStyleProps/defaultgeneralLoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/loadingpanestateful/common/errorUIStyleProps/errorUILoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/notificationpanestateful/NotificationPaneStateful.js +37 -40
- package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectControlProps.js +2 -3
- package/lib/cjs/components/notificationpanestateful/defaultProps/defaultChatDisconnectStyleProps.js +2 -3
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +3 -5
- package/lib/cjs/components/ooohpanestateful/common/defaultStyleProps/defaultgeneralOOOHPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +3 -5
- package/lib/cjs/components/postchatloadingpanestateful/common/defaultgeneralPostChatLoadingPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +4 -6
- package/lib/cjs/components/postchatsurveypanestateful/common/defaultStyleProps/defaultgeneralPostChatSurveyPaneStyleProps.js +2 -3
- package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +1 -2
- package/lib/cjs/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -4
- package/lib/cjs/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -4
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +10 -12
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultProps/defaultPreChatSurveyLocalizedTexts.js +2 -3
- package/lib/cjs/components/prechatsurveypanestateful/common/defaultStyles/defaultGeneralPreChatSurveyPaneStyleProps.js +2 -3
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +8 -10
- package/lib/cjs/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +4 -6
- package/lib/cjs/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +15 -17
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneGeneralStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconImageProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneIconStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneSubtitleStyleProps.js +2 -3
- package/lib/cjs/components/startchaterrorpanestateful/common/defaultStartChatErrorPaneTitleStyleProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +34 -37
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatAdapter.js +18 -21
- package/lib/cjs/components/webchatcontainerstateful/common/DemoChatSDK.js +17 -20
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatAdapter.js +21 -24
- package/lib/cjs/components/webchatcontainerstateful/common/DesignerChatSDK.js +20 -23
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCardCommandType.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/common/MockBotCommand.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/common/activities/botActivity.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/common/activities/conversationDividerActivity.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultAttachmentProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatStatefulProps.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStatefulContainerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/common/mockadapter.js +12 -15
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +10 -12
- package/lib/cjs/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
- package/lib/cjs/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +10 -13
- package/lib/cjs/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +9 -11
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsEgressMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/adaptermiddlewares/formatTagsIngressMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/Constants.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +60 -42
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LoadInlineBannerActivity.js +2 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +8 -9
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +4 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +11 -12
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentContent.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/AttachmentIcon.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Spinner.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/avatarMiddleware.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentContentStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDividerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentDownloadIconStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentFileNameStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAttachmentSizeStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentAdaptiveCardStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentIconStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAtttachmentStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultAvatarTextStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultInLineBannerStyle.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSentMessageAnchorStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTimestampContentStyles.js +2 -3
- 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/defaultTypingIndicatorBubbleStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorContainerStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultTypingIndicatorMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageStyles.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/HistoryMessageTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/SendingTimestamp.js +1 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +7 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/callActionMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +9 -10
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/dataMaskingMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +4 -5
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +3 -4
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware.js +1 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware.js +2 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +8 -10
- package/lib/cjs/contexts/ChatAdapterStore.js +1 -2
- package/lib/cjs/contexts/ChatContextStore.js +1 -2
- package/lib/cjs/contexts/ChatSDKStore.js +1 -2
- package/lib/cjs/contexts/FacadeChatSDKStore.js +1 -2
- package/lib/cjs/contexts/common/ConversationState.js +3 -4
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +211 -4
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
- package/lib/cjs/contexts/common/StartChatFailureType.js +3 -4
- package/lib/cjs/controller/componentController.js +1 -1
- package/lib/cjs/firstresponselatency/Constants.js +3 -4
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +9 -11
- package/lib/cjs/firstresponselatency/util.js +8 -8
- package/lib/cjs/hooks/useChatAdapterStore.js +1 -2
- package/lib/cjs/hooks/useChatContextStore.js +1 -2
- package/lib/cjs/hooks/useChatSDKStore.js +1 -2
- package/lib/cjs/hooks/useFacadeChatSDKStore.js +1 -2
- package/lib/cjs/hooks/useWindowDimensions.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/plugins/createChatTranscript.js +25 -28
- package/lib/cjs/plugins/newMessageEventHandler.js +2 -2
- package/lib/esm/common/Constants.js +40 -39
- package/lib/esm/common/KeyCodes.js +9 -9
- package/lib/esm/common/contextDataStore/DataStoreManager.js +6 -6
- package/lib/esm/common/facades/FacadeChatSDK.js +9 -10
- package/lib/esm/common/storage/default/defaultCacheManager.js +6 -6
- package/lib/esm/common/telemetry/ScenarioMarker.js +9 -10
- package/lib/esm/common/telemetry/TelemetryConstants.js +33 -25
- package/lib/esm/common/telemetry/TelemetryHelper.js +38 -37
- package/lib/esm/common/telemetry/TelemetryManager.js +19 -20
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +5 -5
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +1 -1
- package/lib/esm/common/utils/SecureEventBus.js +9 -8
- package/lib/esm/common/utils.js +10 -11
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +12 -12
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +7 -7
- package/lib/esm/components/citationpanestateful/CitationDim.js +1 -1
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +0 -1
- package/lib/esm/components/draggable/DraggableEventEmitter.js +1 -1
- package/lib/esm/components/draggable/DraggableEventNames.js +3 -3
- package/lib/esm/components/emailtranscriptpanestateful/EmailTranscriptPaneStateful.js +5 -5
- package/lib/esm/components/errorboundary/ErrorBoundary.js +15 -17
- package/lib/esm/components/footerstateful/FooterStateful.js +6 -6
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +3 -3
- package/lib/esm/components/headerstateful/HeaderStateful.js +10 -10
- package/lib/esm/components/livechatwidget/LiveChatWidget.js +3 -3
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +9 -12
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js +23 -28
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +8 -9
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/HiddenAdaptiveCardActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +7 -8
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +10 -14
- package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +3 -3
- package/lib/esm/components/livechatwidget/common/Deferred.js +8 -10
- package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +10 -12
- package/lib/esm/components/livechatwidget/common/authHelper.js +1 -1
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +5 -5
- package/lib/esm/components/livechatwidget/common/createAdapter.js +3 -3
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +6 -6
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +0 -1
- package/lib/esm/components/livechatwidget/common/endChat.js +12 -13
- package/lib/esm/components/livechatwidget/common/initConfirmationPropsComposer.js +4 -4
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +16 -16
- package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +8 -8
- package/lib/esm/components/livechatwidget/common/overridePropsOnMockIfApplicable.js +3 -3
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +6 -6
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +11 -11
- package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +10 -10
- package/lib/esm/components/livechatwidget/common/startChat.js +37 -37
- package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +6 -7
- package/lib/esm/components/livechatwidget/interfaces/IMockProps.js +3 -3
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +73 -73
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +3 -3
- package/lib/esm/components/notificationpanestateful/NotificationPaneStateful.js +34 -35
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +1 -1
- package/lib/esm/components/postchatsurveypanestateful/enums/CustomerVoiceEvents.js +3 -3
- package/lib/esm/components/postchatsurveypanestateful/enums/PostChatSurveyMode.js +3 -3
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -7
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +5 -5
- package/lib/esm/components/reconnectchatpanestateful/ReconnectChatPaneStateful.js +1 -1
- package/lib/esm/components/startchaterrorpanestateful/StartChatErrorPaneStateful.js +12 -12
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +31 -32
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatAdapter.js +15 -17
- package/lib/esm/components/webchatcontainerstateful/common/DemoChatSDK.js +15 -17
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatAdapter.js +18 -20
- package/lib/esm/components/webchatcontainerstateful/common/DesignerChatSDK.js +18 -20
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCardCommandType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/common/MockBotCommand.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/common/mockadapter.js +10 -12
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +7 -8
- package/lib/esm/components/webchatcontainerstateful/common/utils/attachmentActivityUtils.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/common/utils/chatAdapterUtils.js +7 -7
- package/lib/esm/components/webchatcontainerstateful/common/utils/isMaskingFromCustomer.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/BotMagicCodeStore.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatStoreLoader.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/BrowserVendor.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineActivityType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/DirectLineSenderRole.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/MessageType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationLevel.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/NotificationScenarios.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/SendStatus.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/enums/WebChatActionType.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/markdownrenderers/HyperlinkTextOverrideRenderer.js +7 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +28 -35
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/Attachment.js +9 -9
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/DownloadBlockedAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/FileScanStatus.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/MaliciousAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachments/ScanInProgressAttachment.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageSequenceIdOverrideMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +7 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +1 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/toastMiddleware.js +0 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentUploadValidatorMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +8 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +8 -8
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/customEventMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/gifUploadMiddleware.js +3 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +3 -4
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/maxMessageSizeValidator.js +2 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/notification/NotificationHandler.js +6 -7
- package/lib/esm/contexts/common/ConversationState.js +3 -3
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +211 -3
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +3 -3
- package/lib/esm/contexts/common/StartChatFailureType.js +3 -3
- package/lib/esm/controller/componentController.js +1 -2
- package/lib/esm/firstresponselatency/Constants.js +3 -3
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +7 -8
- package/lib/esm/firstresponselatency/util.js +8 -8
- package/lib/esm/plugins/createChatTranscript.js +23 -25
- package/lib/esm/plugins/newMessageEventHandler.js +2 -2
- package/package.json +28 -22
|
@@ -6,7 +6,7 @@ import { TelemetryHelper } from "../../common/telemetry/TelemetryHelper";
|
|
|
6
6
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
7
7
|
import useFacadeSDKStore from "../../hooks/useFacadeChatSDKStore";
|
|
8
8
|
export const CallingContainerStateful = props => {
|
|
9
|
-
var _props$controlProps, _props$controlProps2, _props$
|
|
9
|
+
var _props$controlProps, _props$controlProps2, _props$controlProps3, _props$controlProps4, _props$controlProps5;
|
|
10
10
|
const [state, dispatch] = useChatContextStore();
|
|
11
11
|
const [facadeChatSDK] = useFacadeSDKStore();
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -41,14 +41,14 @@ export const CallingContainerStateful = props => {
|
|
|
41
41
|
useEffect(() => {
|
|
42
42
|
const init = async () => {
|
|
43
43
|
try {
|
|
44
|
-
var _controlProps$current, _controlProps$current2,
|
|
44
|
+
var _controlProps$current, _controlProps$current2, _facadeChatSDK$getCha;
|
|
45
45
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
46
|
TelemetryHelper.callId = callId;
|
|
47
47
|
await voiceVideoCallingSdk.initialize({
|
|
48
48
|
chatToken: state.domainStates.chatToken,
|
|
49
|
-
selfVideoHTMLElementId: (_controlProps$current = controlProps.currentCallControlProps) === null || _controlProps$current === void 0
|
|
49
|
+
selfVideoHTMLElementId: (_controlProps$current = controlProps.currentCallControlProps) === null || _controlProps$current === void 0 || (_controlProps$current = _controlProps$current.nonActionIds) === null || _controlProps$current === void 0 ? void 0 : _controlProps$current.selfVideoTileId,
|
|
50
50
|
// HTML element id where video stream of the agent will be rendered
|
|
51
|
-
remoteVideoHTMLElementId: (_controlProps$
|
|
51
|
+
remoteVideoHTMLElementId: (_controlProps$current2 = controlProps.currentCallControlProps) === null || _controlProps$current2 === void 0 || (_controlProps$current2 = _controlProps$current2.nonActionIds) === null || _controlProps$current2 === void 0 ? void 0 : _controlProps$current2.remoteVideoTileId,
|
|
52
52
|
// HTML element id where video stream of the customer will be rendered
|
|
53
53
|
OCClient: (_facadeChatSDK$getCha = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha === void 0 ? void 0 : _facadeChatSDK$getCha.OCClient
|
|
54
54
|
});
|
|
@@ -168,11 +168,11 @@ export const CallingContainerStateful = props => {
|
|
|
168
168
|
});
|
|
169
169
|
window.addEventListener("beforeunload", () => {
|
|
170
170
|
if (state.uiStates.isIncomingCall) {
|
|
171
|
-
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0
|
|
171
|
+
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0 || voiceVideoCallingSdk.rejectCall();
|
|
172
172
|
} else {
|
|
173
|
-
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0
|
|
173
|
+
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0 || voiceVideoCallingSdk.stopCall();
|
|
174
174
|
}
|
|
175
|
-
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0
|
|
175
|
+
voiceVideoCallingSdk === null || voiceVideoCallingSdk === void 0 || voiceVideoCallingSdk.close();
|
|
176
176
|
dispatch({
|
|
177
177
|
type: LiveChatWidgetActionType.SET_E2VV_ENABLED,
|
|
178
178
|
payload: false
|
|
@@ -253,7 +253,7 @@ export const CallingContainerStateful = props => {
|
|
|
253
253
|
payload: false
|
|
254
254
|
});
|
|
255
255
|
}, []),
|
|
256
|
-
...(props === null || props === void 0
|
|
256
|
+
...(props === null || props === void 0 || (_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.incomingCallControlProps)
|
|
257
257
|
},
|
|
258
258
|
currentCallControlProps: {
|
|
259
259
|
hideCallTimer: true,
|
|
@@ -304,14 +304,14 @@ export const CallingContainerStateful = props => {
|
|
|
304
304
|
}
|
|
305
305
|
}, []),
|
|
306
306
|
nonActionIds: {
|
|
307
|
-
...(props === null || props === void 0
|
|
308
|
-
selfVideoTileId: (props === null || props === void 0
|
|
309
|
-
remoteVideoTileId: (props === null || props === void 0
|
|
307
|
+
...(props === null || props === void 0 || (_props$controlProps2 = props.controlProps) === null || _props$controlProps2 === void 0 || (_props$controlProps2 = _props$controlProps2.currentCallControlProps) === null || _props$controlProps2 === void 0 ? void 0 : _props$controlProps2.nonActionIds),
|
|
308
|
+
selfVideoTileId: (props === null || props === void 0 || (_props$controlProps3 = props.controlProps) === null || _props$controlProps3 === void 0 || (_props$controlProps3 = _props$controlProps3.currentCallControlProps) === null || _props$controlProps3 === void 0 || (_props$controlProps3 = _props$controlProps3.nonActionIds) === null || _props$controlProps3 === void 0 ? void 0 : _props$controlProps3.selfVideoTileId) ?? "selfVideo",
|
|
309
|
+
remoteVideoTileId: (props === null || props === void 0 || (_props$controlProps4 = props.controlProps) === null || _props$controlProps4 === void 0 || (_props$controlProps4 = _props$controlProps4.currentCallControlProps) === null || _props$controlProps4 === void 0 || (_props$controlProps4 = _props$controlProps4.nonActionIds) === null || _props$controlProps4 === void 0 ? void 0 : _props$controlProps4.remoteVideoTileId) ?? "remoteVideo"
|
|
310
310
|
},
|
|
311
311
|
videoCallDisabled: state.uiStates.disableVideoCall,
|
|
312
312
|
selfVideoDisabled: state.uiStates.disableSelfVideo,
|
|
313
313
|
remoteVideoDisabled: state.uiStates.disableRemoteVideo,
|
|
314
|
-
...(props === null || props === void 0
|
|
314
|
+
...(props === null || props === void 0 || (_props$controlProps5 = props.controlProps) === null || _props$controlProps5 === void 0 ? void 0 : _props$controlProps5.currentCallControlProps)
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
317
|
return /*#__PURE__*/React.createElement(React.Fragment, null, state.uiStates.showCallingPopup && /*#__PURE__*/React.createElement(CallingContainer, {
|
|
@@ -11,7 +11,7 @@ import { defaultOutOfOfficeChatButtonStyleProps } from "./common/styleProps/defa
|
|
|
11
11
|
import useChatContextStore from "../../hooks/useChatContextStore";
|
|
12
12
|
let uiTimer;
|
|
13
13
|
export const ChatButtonStateful = props => {
|
|
14
|
-
var _buttonProps$controlP, _props$buttonProps, _props$
|
|
14
|
+
var _buttonProps$controlP, _props$buttonProps, _props$buttonProps2, _outOfOfficeButtonPro, _outOfOfficeButtonPro2, _props$buttonProps3;
|
|
15
15
|
// this is to ensure the telemetry is set only once and start the load timer
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
uiTimer = createTimer();
|
|
@@ -78,9 +78,9 @@ export const ChatButtonStateful = props => {
|
|
|
78
78
|
dir: state.domainStates.globalDir,
|
|
79
79
|
titleText: "Let's Chat!",
|
|
80
80
|
subtitleText: "We're online.",
|
|
81
|
-
hideNotificationBubble: (buttonProps === null || buttonProps === void 0
|
|
82
|
-
unreadMessageCount: state.appStates.unreadMessageCount ? state.appStates.unreadMessageCount > Constants.maximumUnreadMessageCount ? (_props$buttonProps = props.buttonProps) === null || _props$buttonProps === void 0
|
|
83
|
-
unreadMessageString: (_props$buttonProps2 = props.buttonProps) === null || _props$buttonProps2 === void 0
|
|
81
|
+
hideNotificationBubble: (buttonProps === null || buttonProps === void 0 || (_buttonProps$controlP = buttonProps.controlProps) === null || _buttonProps$controlP === void 0 ? void 0 : _buttonProps$controlP.hideNotificationBubble) === true || state.appStates.isMinimized === false,
|
|
82
|
+
unreadMessageCount: state.appStates.unreadMessageCount ? state.appStates.unreadMessageCount > Constants.maximumUnreadMessageCount ? (_props$buttonProps = props.buttonProps) === null || _props$buttonProps === void 0 || (_props$buttonProps = _props$buttonProps.controlProps) === null || _props$buttonProps === void 0 ? void 0 : _props$buttonProps.largeUnreadMessageString : state.appStates.unreadMessageCount.toString() : "0",
|
|
83
|
+
unreadMessageString: (_props$buttonProps2 = props.buttonProps) === null || _props$buttonProps2 === void 0 || (_props$buttonProps2 = _props$buttonProps2.controlProps) === null || _props$buttonProps2 === void 0 ? void 0 : _props$buttonProps2.unreadMessageString,
|
|
84
84
|
// Regular chat button onClick - this will always take precedence
|
|
85
85
|
onClick: () => ref.current(),
|
|
86
86
|
...(buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.controlProps)
|
|
@@ -89,9 +89,9 @@ export const ChatButtonStateful = props => {
|
|
|
89
89
|
// Only take specific properties from outOfOfficeButtonProps, never onClick
|
|
90
90
|
id: "oc-lcw-chat-button",
|
|
91
91
|
dir: state.domainStates.globalDir,
|
|
92
|
-
titleText: (outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0
|
|
93
|
-
subtitleText: (outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0
|
|
94
|
-
unreadMessageString: (_props$buttonProps3 = props.buttonProps) === null || _props$buttonProps3 === void 0
|
|
92
|
+
titleText: (outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0 || (_outOfOfficeButtonPro = outOfOfficeButtonProps.controlProps) === null || _outOfOfficeButtonPro === void 0 ? void 0 : _outOfOfficeButtonPro.titleText) || "We're Offline",
|
|
93
|
+
subtitleText: (outOfOfficeButtonProps === null || outOfOfficeButtonProps === void 0 || (_outOfOfficeButtonPro2 = outOfOfficeButtonProps.controlProps) === null || _outOfOfficeButtonPro2 === void 0 ? void 0 : _outOfOfficeButtonPro2.subtitleText) || "No agents available",
|
|
94
|
+
unreadMessageString: (_props$buttonProps3 = props.buttonProps) === null || _props$buttonProps3 === void 0 || (_props$buttonProps3 = _props$buttonProps3.controlProps) === null || _props$buttonProps3 === void 0 ? void 0 : _props$buttonProps3.unreadMessageString,
|
|
95
95
|
// Out-of-office specific onClick - this will ALWAYS take precedence
|
|
96
96
|
onClick: () => {
|
|
97
97
|
if (state.appStates.isMinimized) {
|
|
@@ -8,7 +8,7 @@ export const CitationDim = _ref => {
|
|
|
8
8
|
} = _ref;
|
|
9
9
|
const container = document.querySelector(CONTAINER_SELECTOR);
|
|
10
10
|
if (!container) return null;
|
|
11
|
-
return /*#__PURE__*/ReactDOM.createPortal(
|
|
11
|
+
return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/React.createElement("div", {
|
|
12
12
|
style: {
|
|
13
13
|
position: "absolute",
|
|
14
14
|
inset: 0
|
|
@@ -193,7 +193,6 @@ export const CitationPaneStateful = props => {
|
|
|
193
193
|
...(props === null || props === void 0 ? void 0 : props.controlProps) // User props override defaults
|
|
194
194
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
195
195
|
};
|
|
196
|
-
|
|
197
196
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CitationDim, {
|
|
198
197
|
brightness: controlProps.brightnessValueOnDim
|
|
199
198
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -55,7 +55,7 @@ const DraggableEventEmitter = props => {
|
|
|
55
55
|
useEffect(() => {
|
|
56
56
|
if (!initialized && props.elementId) {
|
|
57
57
|
const element = document.getElementById(props.elementId);
|
|
58
|
-
element === null || element === void 0
|
|
58
|
+
element === null || element === void 0 || element.addEventListener("mousedown", dragStart);
|
|
59
59
|
setInitialized(true);
|
|
60
60
|
}
|
|
61
61
|
}, [dragStart, props.elementId, initialized]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var DraggableEventNames
|
|
2
|
-
(function (DraggableEventNames) {
|
|
1
|
+
var DraggableEventNames = /*#__PURE__*/function (DraggableEventNames) {
|
|
3
2
|
DraggableEventNames["DragStart"] = "DragStart";
|
|
4
3
|
DraggableEventNames["Dragging"] = "Dragging";
|
|
5
4
|
DraggableEventNames["DragEnd"] = "DragEnd";
|
|
6
|
-
|
|
5
|
+
return DraggableEventNames;
|
|
6
|
+
}(DraggableEventNames || {});
|
|
7
7
|
export default DraggableEventNames;
|
|
@@ -45,24 +45,24 @@ export const EmailTranscriptPaneStateful = props => {
|
|
|
45
45
|
};
|
|
46
46
|
const onSend = useCallback(async email => {
|
|
47
47
|
var _state$domainStates;
|
|
48
|
-
const liveChatContext = state === null || state === void 0
|
|
48
|
+
const liveChatContext = state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.liveChatContext;
|
|
49
49
|
closeEmailTranscriptPane();
|
|
50
50
|
const chatTranscriptBody = {
|
|
51
51
|
emailAddress: email,
|
|
52
52
|
attachmentMessage: (props === null || props === void 0 ? void 0 : props.attachmentMessage) ?? "The following attachment was uploaded during the conversation:"
|
|
53
53
|
};
|
|
54
54
|
try {
|
|
55
|
-
var _state$domainStates2
|
|
55
|
+
var _state$domainStates2;
|
|
56
56
|
await (facadeChatSDK === null || facadeChatSDK === void 0 ? void 0 : facadeChatSDK.emailLiveChatTranscript(chatTranscriptBody, {
|
|
57
57
|
liveChatContext
|
|
58
58
|
}));
|
|
59
|
-
NotificationHandler.notifySuccess(NotificationScenarios.EmailAddressSaved, (state === null || state === void 0
|
|
59
|
+
NotificationHandler.notifySuccess(NotificationScenarios.EmailAddressSaved, (state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 || (_state$domainStates2 = _state$domainStates2.middlewareLocalizedTexts) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS) ?? (defaultMiddlewareLocalizedTexts === null || defaultMiddlewareLocalizedTexts === void 0 ? void 0 : defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS));
|
|
60
60
|
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
61
61
|
Event: TelemetryEvent.EmailTranscriptSent,
|
|
62
62
|
Description: "Transcript sent to email successfully."
|
|
63
63
|
});
|
|
64
64
|
} catch (ex) {
|
|
65
|
-
var _state$domainStates3
|
|
65
|
+
var _state$domainStates3;
|
|
66
66
|
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.ERROR, {
|
|
67
67
|
Event: TelemetryEvent.EmailTranscriptFailed,
|
|
68
68
|
Description: "Email transcript failed.",
|
|
@@ -70,7 +70,7 @@ export const EmailTranscriptPaneStateful = props => {
|
|
|
70
70
|
exception: ex
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
const message = formatTemplateString((state === null || state === void 0
|
|
73
|
+
const message = formatTemplateString((state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 || (_state$domainStates3 = _state$domainStates3.middlewareLocalizedTexts) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_ERROR) ?? defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_ERROR, [email]);
|
|
74
74
|
NotificationHandler.notifyError(NotificationScenarios.EmailTranscriptError, (props === null || props === void 0 ? void 0 : props.bannerMessageOnError) ?? message);
|
|
75
75
|
}
|
|
76
76
|
}, [props.attachmentMessage, props.bannerMessageOnError, facadeChatSDK, state.domainStates.liveChatContext]);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _toPropertyKey(
|
|
5
|
-
function _toPrimitive(
|
|
6
|
-
function
|
|
7
|
-
function
|
|
8
|
-
function
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
8
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
10
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
11
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
12
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
13
13
|
import React, { Component } from "react";
|
|
14
14
|
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -20,18 +20,17 @@ const RenderChildrenFunction = _ref => {
|
|
|
20
20
|
return typeof children === "function" ? children() : children;
|
|
21
21
|
};
|
|
22
22
|
let ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
23
|
-
_inherits(ErrorBoundary, _Component);
|
|
24
|
-
var _super = _createSuper(ErrorBoundary);
|
|
25
23
|
function ErrorBoundary(props) {
|
|
26
24
|
var _this;
|
|
27
25
|
_classCallCheck(this, ErrorBoundary);
|
|
28
|
-
_this =
|
|
26
|
+
_this = _callSuper(this, ErrorBoundary, [props]);
|
|
29
27
|
_this.state = {
|
|
30
28
|
hasError: false
|
|
31
29
|
};
|
|
32
30
|
return _this;
|
|
33
31
|
}
|
|
34
|
-
|
|
32
|
+
_inherits(ErrorBoundary, _Component);
|
|
33
|
+
return _createClass(ErrorBoundary, [{
|
|
35
34
|
key: "componentDidCatch",
|
|
36
35
|
value: function componentDidCatch(error) {
|
|
37
36
|
const {
|
|
@@ -56,6 +55,5 @@ let ErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
|
56
55
|
return !hasError && /*#__PURE__*/React.createElement(RenderChildrenFunction, null, children);
|
|
57
56
|
}
|
|
58
57
|
}]);
|
|
59
|
-
return ErrorBoundary;
|
|
60
58
|
}(Component);
|
|
61
59
|
export default ErrorBoundary;
|
|
@@ -17,7 +17,7 @@ let uiTimer;
|
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
19
|
export const FooterStateful = props => {
|
|
20
|
-
var _footerProps$
|
|
20
|
+
var _footerProps$controlP2;
|
|
21
21
|
useEffect(() => {
|
|
22
22
|
uiTimer = createTimer();
|
|
23
23
|
TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
|
|
@@ -61,12 +61,12 @@ export const FooterStateful = props => {
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
onEmailTranscriptClick: () => {
|
|
64
|
-
var _footerProps$controlP
|
|
64
|
+
var _footerProps$controlP;
|
|
65
65
|
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
66
66
|
Event: TelemetryEvent.EmailTranscriptButtonClicked,
|
|
67
67
|
Description: "Email Transcript action started."
|
|
68
68
|
});
|
|
69
|
-
const emailTranscriptButtonId = (footerProps === null || footerProps === void 0
|
|
69
|
+
const emailTranscriptButtonId = (footerProps === null || footerProps === void 0 || (_footerProps$controlP = footerProps.controlProps) === null || _footerProps$controlP === void 0 || (_footerProps$controlP = _footerProps$controlP.emailTranscriptButtonProps) === null || _footerProps$controlP === void 0 ? void 0 : _footerProps$controlP.id) ?? `${controlProps.id}-emailtranscript-button`;
|
|
70
70
|
if (emailTranscriptButtonId) {
|
|
71
71
|
dispatch({
|
|
72
72
|
type: LiveChatWidgetActionType.SET_PREVIOUS_FOCUSED_ELEMENT_ID,
|
|
@@ -90,17 +90,17 @@ export const FooterStateful = props => {
|
|
|
90
90
|
},
|
|
91
91
|
...(footerProps === null || footerProps === void 0 ? void 0 : footerProps.controlProps),
|
|
92
92
|
audioNotificationButtonProps: {
|
|
93
|
-
...(footerProps === null || footerProps === void 0
|
|
93
|
+
...(footerProps === null || footerProps === void 0 || (_footerProps$controlP2 = footerProps.controlProps) === null || _footerProps$controlP2 === void 0 ? void 0 : _footerProps$controlP2.audioNotificationButtonProps),
|
|
94
94
|
isAudioMuted: state.appStates.isAudioMuted
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
97
|
useEffect(() => {
|
|
98
98
|
if (state.appStates.conversationState === ConversationState.Active) {
|
|
99
99
|
if (state.appStates.isAudioMuted === null) {
|
|
100
|
-
var _footerProps$
|
|
100
|
+
var _footerProps$controlP3, _footerProps$controlP4;
|
|
101
101
|
dispatch({
|
|
102
102
|
type: LiveChatWidgetActionType.SET_AUDIO_NOTIFICATION,
|
|
103
|
-
payload: footerProps !== null && footerProps !== void 0 && (_footerProps$
|
|
103
|
+
payload: footerProps !== null && footerProps !== void 0 && (_footerProps$controlP3 = footerProps.controlProps) !== null && _footerProps$controlP3 !== void 0 && _footerProps$controlP3.hideAudioNotificationButton ? true : (footerProps === null || footerProps === void 0 || (_footerProps$controlP4 = footerProps.controlProps) === null || _footerProps$controlP4 === void 0 || (_footerProps$controlP4 = _footerProps$controlP4.audioNotificationButtonProps) === null || _footerProps$controlP4 === void 0 ? void 0 : _footerProps$controlP4.isAudioMuted) ?? false
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
}
|
package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js
CHANGED
|
@@ -161,7 +161,7 @@ const beautifyChatTranscripts = (chatTranscripts, renderMarkDown, attachmentMess
|
|
|
161
161
|
export const downloadTranscript = async (facadeChatSDK, downloadTranscriptProps, state) => {
|
|
162
162
|
var _state$domainStates;
|
|
163
163
|
// Need to keep existing live chat context for scenarios when transcript is downloaded after endchat
|
|
164
|
-
let liveChatContext = state === null || state === void 0
|
|
164
|
+
let liveChatContext = state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.liveChatContext;
|
|
165
165
|
if (!liveChatContext) {
|
|
166
166
|
var _inMemoryState$appSta;
|
|
167
167
|
const inMemoryState = executeReducer(state, {
|
|
@@ -169,9 +169,9 @@ export const downloadTranscript = async (facadeChatSDK, downloadTranscriptProps,
|
|
|
169
169
|
payload: null
|
|
170
170
|
});
|
|
171
171
|
liveChatContext = inMemoryState.domainStates.liveChatContext;
|
|
172
|
-
if ((inMemoryState === null || inMemoryState === void 0
|
|
172
|
+
if ((inMemoryState === null || inMemoryState === void 0 || (_inMemoryState$appSta = inMemoryState.appStates) === null || _inMemoryState$appSta === void 0 ? void 0 : _inMemoryState$appSta.conversationState) !== ConversationState.Active && !liveChatContext) {
|
|
173
173
|
var _state$domainStates2;
|
|
174
|
-
const chatToken = (state === null || state === void 0
|
|
174
|
+
const chatToken = (state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.chatToken) || inMemoryState.domainStates.chatToken;
|
|
175
175
|
if (chatToken && Object.keys(chatToken).length > 0) {
|
|
176
176
|
liveChatContext = {
|
|
177
177
|
chatToken: chatToken,
|
|
@@ -35,7 +35,7 @@ export const HeaderStateful = props => {
|
|
|
35
35
|
const outOfOfficeStyleProps = Object.assign({}, defaultOutOfOfficeHeaderStyleProps, outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.styleProps);
|
|
36
36
|
|
|
37
37
|
// For some reason state object is not getting updated values in this component
|
|
38
|
-
const localConfirmationPaneState = useRef(state === null || state === void 0
|
|
38
|
+
const localConfirmationPaneState = useRef(state === null || state === void 0 || (_state$domainStates = state.domainStates) === null || _state$domainStates === void 0 ? void 0 : _state$domainStates.confirmationState);
|
|
39
39
|
const controlProps = {
|
|
40
40
|
id: "oc-lcw-header",
|
|
41
41
|
dir: state.domainStates.globalDir,
|
|
@@ -58,7 +58,7 @@ export const HeaderStateful = props => {
|
|
|
58
58
|
});
|
|
59
59
|
},
|
|
60
60
|
onCloseClick: async () => {
|
|
61
|
-
var _props$headerProps
|
|
61
|
+
var _props$headerProps;
|
|
62
62
|
TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
|
|
63
63
|
Event: TelemetryEvent.HeaderCloseButtonClicked,
|
|
64
64
|
Description: "Header Close action started.",
|
|
@@ -84,7 +84,7 @@ export const HeaderStateful = props => {
|
|
|
84
84
|
ConversationStage: ConversationStage.ConversationEnd
|
|
85
85
|
}
|
|
86
86
|
});
|
|
87
|
-
const closeButtonId = ((_props$headerProps = props.headerProps) === null || _props$headerProps === void 0
|
|
87
|
+
const closeButtonId = ((_props$headerProps = props.headerProps) === null || _props$headerProps === void 0 || (_props$headerProps = _props$headerProps.controlProps) === null || _props$headerProps === void 0 || (_props$headerProps = _props$headerProps.closeButtonProps) === null || _props$headerProps === void 0 ? void 0 : _props$headerProps.id) ?? `${controlProps.id}-close-button`;
|
|
88
88
|
if (closeButtonId) {
|
|
89
89
|
dispatch({
|
|
90
90
|
type: LiveChatWidgetActionType.SET_PREVIOUS_FOCUSED_ELEMENT_ID,
|
|
@@ -93,9 +93,9 @@ export const HeaderStateful = props => {
|
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
...(headerProps === null || headerProps === void 0 ? void 0 : headerProps.controlProps),
|
|
96
|
-
hideTitle: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0
|
|
97
|
-
hideIcon: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0
|
|
98
|
-
hideCloseButton: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || state.appStates.conversationState === ConversationState.Prechat || state.appStates.conversationState === ConversationState.ReconnectChat || (headerProps === null || headerProps === void 0
|
|
96
|
+
hideTitle: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 || (_headerProps$controlP = headerProps.controlProps) === null || _headerProps$controlP === void 0 ? void 0 : _headerProps$controlP.hideTitle),
|
|
97
|
+
hideIcon: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || (headerProps === null || headerProps === void 0 || (_headerProps$controlP2 = headerProps.controlProps) === null || _headerProps$controlP2 === void 0 ? void 0 : _headerProps$controlP2.hideIcon),
|
|
98
|
+
hideCloseButton: state.appStates.conversationState === ConversationState.Loading && !state.appStates.startChatFailed || state.appStates.conversationState === ConversationState.PostchatLoading || state.appStates.conversationState === ConversationState.Prechat || state.appStates.conversationState === ConversationState.ReconnectChat || (headerProps === null || headerProps === void 0 || (_headerProps$controlP3 = headerProps.controlProps) === null || _headerProps$controlP3 === void 0 ? void 0 : _headerProps$controlP3.hideCloseButton)
|
|
99
99
|
};
|
|
100
100
|
const outOfOfficeControlProps = {
|
|
101
101
|
id: "oc-lcw-header",
|
|
@@ -125,12 +125,12 @@ export const HeaderStateful = props => {
|
|
|
125
125
|
});
|
|
126
126
|
},
|
|
127
127
|
...(outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 ? void 0 : outOfOfficeHeaderProps.controlProps),
|
|
128
|
-
hideCloseButton: state.appStates.conversationState === ConversationState.OutOfOffice || (outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0
|
|
128
|
+
hideCloseButton: state.appStates.conversationState === ConversationState.OutOfOffice || (outOfOfficeHeaderProps === null || outOfOfficeHeaderProps === void 0 || (_outOfOfficeHeaderPro = outOfOfficeHeaderProps.controlProps) === null || _outOfOfficeHeaderPro === void 0 ? void 0 : _outOfOfficeHeaderPro.hideCloseButton)
|
|
129
129
|
};
|
|
130
130
|
useEffect(() => {
|
|
131
131
|
var _state$domainStates2;
|
|
132
|
-
localConfirmationPaneState.current = state === null || state === void 0
|
|
133
|
-
}, [state === null || state === void 0
|
|
132
|
+
localConfirmationPaneState.current = state === null || state === void 0 || (_state$domainStates2 = state.domainStates) === null || _state$domainStates2 === void 0 ? void 0 : _state$domainStates2.confirmationState;
|
|
133
|
+
}, [state === null || state === void 0 || (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.confirmationState]);
|
|
134
134
|
const draggableEventEmitterProps = {
|
|
135
135
|
channel: props.draggableEventChannel ?? "lcw",
|
|
136
136
|
elementId: outOfOperatingHours || state.appStates.conversationState === ConversationState.OutOfOffice ? outOfOfficeControlProps.id : controlProps.id,
|
|
@@ -157,7 +157,7 @@ export const HeaderStateful = props => {
|
|
|
157
157
|
cursor: "move"
|
|
158
158
|
}
|
|
159
159
|
};
|
|
160
|
-
const selectors = Object.assign({}, (styleProps === null || styleProps === void 0
|
|
160
|
+
const selectors = Object.assign({}, (styleProps === null || styleProps === void 0 || (_generalStyleProps = styleProps.generalStyleProps) === null || _generalStyleProps === void 0 ? void 0 : _generalStyleProps.selectors) || {}, draggableSelectors); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
161
161
|
const generalStyleProps = Object.assign({}, styleProps === null || styleProps === void 0 ? void 0 : styleProps.generalStyleProps, {
|
|
162
162
|
selectors
|
|
163
163
|
});
|
|
@@ -13,7 +13,7 @@ import { isPersistentChatEnabled } from "./common/liveChatConfigUtils";
|
|
|
13
13
|
import overridePropsOnMockIfApplicable from "./common/overridePropsOnMockIfApplicable";
|
|
14
14
|
import { registerTelemetryLoggers } from "./common/registerTelemetryLoggers";
|
|
15
15
|
export const LiveChatWidget = props => {
|
|
16
|
-
var _props$featureConfigP, _props$chatConfig, _props$
|
|
16
|
+
var _props$featureConfigP, _props$chatConfig, _props$chatConfig2;
|
|
17
17
|
const reducer = createReducer();
|
|
18
18
|
const [state, dispatch] = useReducer(reducer, getLiveChatWidgetContextInitialState(props));
|
|
19
19
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -27,7 +27,7 @@ export const LiveChatWidget = props => {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30
|
-
const isAuthenticatedChat = !!((_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig
|
|
30
|
+
const isAuthenticatedChat = !!((_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig = _props$chatConfig.LiveChatConfigAuthSettings) !== null && _props$chatConfig !== void 0 && _props$chatConfig.msdyn_javascriptclientfunction) || isPersistentChatEnabled((_props$chatConfig2 = props.chatConfig) === null || _props$chatConfig2 === void 0 || (_props$chatConfig2 = _props$chatConfig2.LiveWSAndLiveChatEngJoin) === null || _props$chatConfig2 === void 0 ? void 0 : _props$chatConfig2.msdyn_conversationmode);
|
|
31
31
|
if (!facadeChatSDK) {
|
|
32
32
|
var _props$mock;
|
|
33
33
|
setFacadeChatSDK(new FacadeChatSDK({
|
|
@@ -36,7 +36,7 @@ export const LiveChatWidget = props => {
|
|
|
36
36
|
"isAuthenticated": isAuthenticatedChat,
|
|
37
37
|
"getAuthToken": props === null || props === void 0 ? void 0 : props.getAuthToken,
|
|
38
38
|
//when type is not undefined, it means the SDK is mocked
|
|
39
|
-
"isSDKMocked": !isNullOrUndefined(props === null || props === void 0
|
|
39
|
+
"isSDKMocked": !isNullOrUndefined(props === null || props === void 0 || (_props$mock = props.mock) === null || _props$mock === void 0 ? void 0 : _props$mock.type)
|
|
40
40
|
}, disableReauthentication));
|
|
41
41
|
}
|
|
42
42
|
useEffect(() => {
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { Deferred } from "./Deferred";
|
|
8
8
|
export let ActivityStreamHandler = /*#__PURE__*/function () {
|
|
9
9
|
function ActivityStreamHandler() {
|
|
10
10
|
_classCallCheck(this, ActivityStreamHandler);
|
|
11
11
|
}
|
|
12
|
-
_createClass(ActivityStreamHandler, null, [{
|
|
12
|
+
return _createClass(ActivityStreamHandler, null, [{
|
|
13
13
|
key: "cork",
|
|
14
14
|
value:
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
-
|
|
19
15
|
/**
|
|
20
16
|
* Use of a deferred pattern, to hold the execution of the activity.
|
|
21
17
|
*
|
|
@@ -35,11 +31,12 @@ export let ActivityStreamHandler = /*#__PURE__*/function () {
|
|
|
35
31
|
ActivityStreamHandler.restoreDeferred.resolve();
|
|
36
32
|
}
|
|
37
33
|
}]);
|
|
38
|
-
return ActivityStreamHandler;
|
|
39
34
|
}();
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
40
36
|
_defineProperty(ActivityStreamHandler, "restoreDeferred", {
|
|
41
37
|
resolve: () => {
|
|
42
38
|
return "initialState";
|
|
43
39
|
}
|
|
44
40
|
});
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
42
|
_defineProperty(ActivityStreamHandler, "restorePromise", void 0);
|
package/lib/esm/components/livechatwidget/common/ActivitySubscriber/AddActivitySubscriber.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _classCallCheck(
|
|
2
|
-
function _defineProperties(
|
|
3
|
-
function _createClass(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
1
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
2
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
3
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { BroadcastEvent } from "../../../../common/telemetry/TelemetryConstants";
|
|
8
8
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
9
9
|
import ChatWidgetEvents from "../ChatWidgetEvents";
|
|
@@ -17,25 +17,6 @@ import SecureEventBus from "../../../../common/utils/SecureEventBus";
|
|
|
17
17
|
* the event system and the observer pattern.
|
|
18
18
|
*/
|
|
19
19
|
export let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
20
|
-
/**
|
|
21
|
-
* The observer that will be notified when a new activity is added.
|
|
22
|
-
* This is expected to be an object with a `next` method, such as an RxJS `Observer`.
|
|
23
|
-
*/
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Set to track processed activity IDs to prevent duplicate processing.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Unsubscribe function for the secure event listener
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Subscription for PersistentConversationReset event
|
|
36
|
-
*/
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
-
|
|
39
20
|
/**
|
|
40
21
|
* Constructor initializes the `AddActivitySubscriber` and sets up a secure event listener
|
|
41
22
|
* for the `ChatWidgetEvents.ADD_ACTIVITY` event. When the event is triggered, it checks
|
|
@@ -43,9 +24,24 @@ export let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
43
24
|
*/
|
|
44
25
|
function AddActivitySubscriber() {
|
|
45
26
|
_classCallCheck(this, AddActivitySubscriber);
|
|
27
|
+
/**
|
|
28
|
+
* The observer that will be notified when a new activity is added.
|
|
29
|
+
* This is expected to be an object with a `next` method, such as an RxJS `Observer`.
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
32
|
_defineProperty(this, "observer", void 0);
|
|
33
|
+
/**
|
|
34
|
+
* Set to track processed activity IDs to prevent duplicate processing.
|
|
35
|
+
*/
|
|
47
36
|
_defineProperty(this, "processedActivityIds", new Set());
|
|
37
|
+
/**
|
|
38
|
+
* Unsubscribe function for the secure event listener
|
|
39
|
+
*/
|
|
48
40
|
_defineProperty(this, "unsubscribeFromSecureEvent", null);
|
|
41
|
+
/**
|
|
42
|
+
* Subscription for PersistentConversationReset event
|
|
43
|
+
*/
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
45
|
_defineProperty(this, "resetEventListener", void 0);
|
|
50
46
|
const eventBus = SecureEventBus.getInstance();
|
|
51
47
|
|
|
@@ -74,7 +70,7 @@ export let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
74
70
|
}
|
|
75
71
|
|
|
76
72
|
// Notify the observer with the new activity
|
|
77
|
-
(_this$observer = this.observer) === null || _this$observer === void 0
|
|
73
|
+
(_this$observer = this.observer) === null || _this$observer === void 0 || _this$observer.next(activity);
|
|
78
74
|
}
|
|
79
75
|
});
|
|
80
76
|
|
|
@@ -101,7 +97,7 @@ export let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
101
97
|
* @returns The activity object (asynchronously).
|
|
102
98
|
*/
|
|
103
99
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
104
|
-
_createClass(AddActivitySubscriber, [{
|
|
100
|
+
return _createClass(AddActivitySubscriber, [{
|
|
105
101
|
key: "next",
|
|
106
102
|
value: async function next(activity) {
|
|
107
103
|
return activity;
|
|
@@ -116,5 +112,4 @@ export let AddActivitySubscriber = /*#__PURE__*/function () {
|
|
|
116
112
|
this.processedActivityIds.clear();
|
|
117
113
|
}
|
|
118
114
|
}]);
|
|
119
|
-
return AddActivitySubscriber;
|
|
120
115
|
}();
|