@microsoft/omnichannel-chat-widget 0.1.0-main.d5846c0 → 0.1.0-main.d5e0dfe
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 +32 -0
- package/lib/cjs/assets/Icons.js +4 -2
- package/lib/cjs/common/Constants.js +30 -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 +102 -0
- package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +78 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +44 -27
- package/lib/cjs/common/telemetry/TelemetryHelper.js +21 -59
- package/lib/cjs/common/telemetry/TelemetryManager.js +3 -32
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +0 -2
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +30 -36
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +0 -9
- package/lib/cjs/common/utils.js +65 -93
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +8 -46
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +14 -26
- 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 +126 -48
- package/lib/cjs/components/livechatwidget/common/disposeTelemetryLoggers.js +0 -3
- package/lib/cjs/components/livechatwidget/common/endChat.js +95 -48
- 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 +32 -53
- 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 +232 -126
- 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 +311 -218
- package/lib/cjs/components/loadingpanestateful/LoadingPaneStateful.js +19 -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 +10 -42
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +3 -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 +13 -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/index.js +0 -5
- package/lib/cjs/plugins/newMessageEventHandler.js +19 -36
- package/lib/esm/assets/Icons.js +2 -1
- package/lib/esm/common/Constants.js +27 -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 +95 -0
- package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +70 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +48 -24
- package/lib/esm/common/telemetry/TelemetryHelper.js +21 -47
- package/lib/esm/common/telemetry/TelemetryManager.js +3 -19
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +28 -24
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +0 -5
- package/lib/esm/common/utils.js +60 -50
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +8 -17
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +16 -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 +127 -34
- package/lib/esm/components/livechatwidget/common/endChat.js +97 -32
- 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 +35 -22
- 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 +230 -102
- 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 +315 -161
- package/lib/esm/components/loadingpanestateful/LoadingPaneStateful.js +19 -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 +13 -26
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +5 -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 +13 -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/plugins/newMessageEventHandler.js +19 -26
- package/lib/types/assets/Icons.d.ts +1 -0
- package/lib/types/common/Constants.d.ts +20 -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 +31 -9
- package/lib/types/common/telemetry/definitions/Contracts.d.ts +4 -4
- package/lib/types/common/telemetry/definitions/Payload.d.ts +1 -0
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +4 -0
- package/lib/types/common/utils.d.ts +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 +6 -2
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +2 -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/package.json +5 -4
|
@@ -7,7 +7,7 @@ import { PostChatSurveyMode } from "../../postchatsurveypanestateful/enums/PostC
|
|
|
7
7
|
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
8
8
|
import { WebChatStoreLoader } from "../../webchatcontainerstateful/webchatcontroller/WebChatStoreLoader";
|
|
9
9
|
import attachmentProcessingMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/attachmentProcessingMiddleware";
|
|
10
|
-
import { changeLanguageCodeFormatForWebChat } from "../../../common/utils";
|
|
10
|
+
import { addDelayInMs, changeLanguageCodeFormatForWebChat } from "../../../common/utils";
|
|
11
11
|
import channelDataMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware";
|
|
12
12
|
import { createActivityMiddleware } from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware";
|
|
13
13
|
import createAttachmentMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware";
|
|
@@ -26,43 +26,50 @@ import gifUploadMiddleware from "../../webchatcontainerstateful/webchatcontrolle
|
|
|
26
26
|
import htmlPlayerMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlPlayerMiddleware";
|
|
27
27
|
import htmlTextMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/htmlTextMiddleware";
|
|
28
28
|
import preProcessingMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/preProcessingMiddleware";
|
|
29
|
-
import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware";
|
|
29
|
+
import sanitizationMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/sanitizationMiddleware";
|
|
30
|
+
import { createCardActionMiddleware } from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware";
|
|
31
|
+
import createMessageTimeStampMiddleware from "../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware";
|
|
32
|
+
import { Constants } from "../../../common/Constants";
|
|
30
33
|
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
35
|
export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatStyles) => {
|
|
32
|
-
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4, _state$domainStates$l8, _state$domainStates$l9, _props$webChatContain7, _props$webChatContain8, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain9, _props$webChatContain10, _state$domainStates$r3, _state$domainStates$r4, _props$webChatContain11, _props$webChatContain12, _defaultWebChatContai, _props$webChatContain13, _props$webChatContain14, _props$webChatContain15, _props$webChatContain16, _state$domainStates$r5, _state$domainStates$r6, _props$webChatContain17, _props$webChatContain18, _defaultWebChatContai2, _props$webChatContain19, _props$webChatContain20, _defaultWebChatContai3, _props$webChatContain21;
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3, _state$domainStates$l4, _state$domainStates$l8, _state$domainStates$l9, _props$webChatContain7, _props$webChatContain8, _state$domainStates$r, _state$domainStates$r2, _props$webChatContain9, _props$webChatContain10, _state$domainStates$r3, _state$domainStates$r4, _props$webChatContain11, _props$webChatContain12, _defaultWebChatContai, _props$webChatContain13, _props$webChatContain14, _props$webChatContain15, _props$webChatContain16, _state$domainStates$r5, _state$domainStates$r6, _props$webChatContain17, _props$webChatContain18, _defaultWebChatContai2, _props$webChatContain19, _props$webChatContain20, _defaultWebChatContai3, _props$webChatContain21, _props$webChatContain22;
|
|
37
|
+
const localizedTexts = {
|
|
38
|
+
...defaultMiddlewareLocalizedTexts,
|
|
35
39
|
...((_props$webChatContain = props.webChatContainerProps) === null || _props$webChatContain === void 0 ? void 0 : _props$webChatContain.localizedTexts)
|
|
36
40
|
};
|
|
37
|
-
const disableNewLineMarkdownSupport = ((_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.disableNewLineMarkdownSupport) ?? defaultWebChatContainerStatefulProps.disableNewLineMarkdownSupport;
|
|
38
|
-
|
|
41
|
+
const disableNewLineMarkdownSupport = ((_props$webChatContain2 = props.webChatContainerProps) === null || _props$webChatContain2 === void 0 ? void 0 : _props$webChatContain2.disableNewLineMarkdownSupport) ?? defaultWebChatContainerStatefulProps.disableNewLineMarkdownSupport;
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
39
43
|
const markdown = createMarkdown(((_props$webChatContain3 = props.webChatContainerProps) === null || _props$webChatContain3 === void 0 ? void 0 : _props$webChatContain3.disableMarkdownMessageFormatting) ?? defaultWebChatContainerStatefulProps.disableMarkdownMessageFormatting, disableNewLineMarkdownSupport);
|
|
40
44
|
const isPostChatEnabled = (_state$domainStates$l = state.domainStates.liveChatConfig) === null || _state$domainStates$l === void 0 ? void 0 : (_state$domainStates$l2 = _state$domainStates$l.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l2 === void 0 ? void 0 : _state$domainStates$l2.msdyn_postconversationsurveyenable;
|
|
41
|
-
const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
|
|
45
|
+
const postChatSurveyMode = (_state$domainStates$l3 = state.domainStates.liveChatConfig) === null || _state$domainStates$l3 === void 0 ? void 0 : (_state$domainStates$l4 = _state$domainStates$l3.LiveWSAndLiveChatEngJoin) === null || _state$domainStates$l4 === void 0 ? void 0 : _state$domainStates$l4.msdyn_postconversationsurveymode;
|
|
42
46
|
|
|
47
|
+
// Initialize Web Chat's redux store
|
|
43
48
|
let webChatStore = WebChatStoreLoader.store;
|
|
44
|
-
|
|
45
49
|
if (!webChatStore) {
|
|
46
50
|
var _state$domainStates$l5, _state$domainStates$l6, _state$domainStates$l7, _props$webChatContain6;
|
|
47
|
-
|
|
48
51
|
const conversationEndCallback = async () => {
|
|
49
52
|
var _props$webChatContain4, _props$webChatContain5;
|
|
50
|
-
|
|
51
53
|
TelemetryHelper.logActionEvent(LogLevel.INFO, {
|
|
52
54
|
Event: TelemetryEvent.ConversationEndedThreadEventReceived,
|
|
53
55
|
Description: "Conversation is ended by agent side or by timeout."
|
|
54
56
|
});
|
|
55
|
-
|
|
56
57
|
if ((props === null || props === void 0 ? void 0 : (_props$webChatContain4 = props.webChatContainerProps) === null || _props$webChatContain4 === void 0 ? void 0 : (_props$webChatContain5 = _props$webChatContain4.renderingMiddlewareProps) === null || _props$webChatContain5 === void 0 ? void 0 : _props$webChatContain5.hideSendboxOnConversationEnd) !== false) {
|
|
57
58
|
setWebChatStyles(styles => {
|
|
58
|
-
return {
|
|
59
|
+
return {
|
|
60
|
+
...styles,
|
|
59
61
|
hideSendBox: true
|
|
60
62
|
};
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
|
-
|
|
64
65
|
if (isPostChatEnabled === "true") {
|
|
65
66
|
if (postChatSurveyMode === PostChatSurveyMode.Embed) {
|
|
67
|
+
WebChatStoreLoader.store = null;
|
|
68
|
+
dispatch({
|
|
69
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
70
|
+
payload: ConversationState.PostchatLoading
|
|
71
|
+
});
|
|
72
|
+
await addDelayInMs(Constants.PostChatLoadingDurationInMs);
|
|
66
73
|
const loadPostChatEvent = {
|
|
67
74
|
eventName: BroadcastEvent.LoadPostChatSurvey
|
|
68
75
|
};
|
|
@@ -74,12 +81,15 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
74
81
|
});
|
|
75
82
|
}
|
|
76
83
|
} else {
|
|
84
|
+
dispatch({
|
|
85
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
86
|
+
payload: ConversationState.InActive
|
|
87
|
+
});
|
|
77
88
|
dispatch({
|
|
78
89
|
type: LiveChatWidgetActionType.SET_CONVERSATION_ENDED_BY_AGENT,
|
|
79
90
|
payload: true
|
|
80
91
|
});
|
|
81
92
|
}
|
|
82
|
-
|
|
83
93
|
dispatch({
|
|
84
94
|
type: LiveChatWidgetActionType.SET_CHAT_TOKEN,
|
|
85
95
|
payload: undefined
|
|
@@ -89,15 +99,17 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
89
99
|
payload: undefined
|
|
90
100
|
});
|
|
91
101
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
preProcessingMiddleware, attachmentProcessingMiddleware, createAttachmentUploadValidatorMiddleware((_state$domainStates$l5 = state.domainStates.liveChatConfig) === null || _state$domainStates$l5 === void 0 ? void 0 : _state$domainStates$l5.allowedFileExtensions, (_state$domainStates$l6 = state.domainStates.liveChatConfig) === null || _state$domainStates$l6 === void 0 ? void 0 : _state$domainStates$l6.maxUploadFileSize, localizedTexts), channelDataMiddleware, createConversationEndMiddleware(conversationEndCallback), createDataMaskingMiddleware((_state$domainStates$l7 = state.domainStates.liveChatConfig) === null || _state$domainStates$l7 === void 0 ? void 0 : _state$domainStates$l7.DataMaskingInfo), gifUploadMiddleware, htmlPlayerMiddleware, htmlTextMiddleware, createMaxMessageSizeValidator(localizedTexts), sanitizationMiddleware,
|
|
102
|
+
webChatStore = createStore({},
|
|
103
|
+
//initial state
|
|
104
|
+
preProcessingMiddleware, attachmentProcessingMiddleware, createAttachmentUploadValidatorMiddleware((_state$domainStates$l5 = state.domainStates.liveChatConfig) === null || _state$domainStates$l5 === void 0 ? void 0 : _state$domainStates$l5.allowedFileExtensions, (_state$domainStates$l6 = state.domainStates.liveChatConfig) === null || _state$domainStates$l6 === void 0 ? void 0 : _state$domainStates$l6.maxUploadFileSize, localizedTexts), channelDataMiddleware, createConversationEndMiddleware(conversationEndCallback), createDataMaskingMiddleware((_state$domainStates$l7 = state.domainStates.liveChatConfig) === null || _state$domainStates$l7 === void 0 ? void 0 : _state$domainStates$l7.DataMaskingInfo), createMessageTimeStampMiddleware, gifUploadMiddleware, htmlPlayerMiddleware, htmlTextMiddleware, createMaxMessageSizeValidator(localizedTexts), sanitizationMiddleware,
|
|
105
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
106
|
...(((_props$webChatContain6 = props.webChatContainerProps) === null || _props$webChatContain6 === void 0 ? void 0 : _props$webChatContain6.storeMiddlewares) ?? []));
|
|
96
107
|
WebChatStoreLoader.store = webChatStore;
|
|
97
|
-
}
|
|
98
|
-
|
|
108
|
+
}
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
// Initialize the remaining Web Chat props
|
|
111
|
+
const webChatProps = {
|
|
112
|
+
...defaultWebChatContainerStatefulProps.webChatProps,
|
|
101
113
|
dir: state.domainStates.globalDir,
|
|
102
114
|
locale: changeLanguageCodeFormatForWebChat(getLocaleStringFromId((_state$domainStates$l8 = state.domainStates.liveChatConfig) === null || _state$domainStates$l8 === void 0 ? void 0 : (_state$domainStates$l9 = _state$domainStates$l8.ChatWidgetLanguage) === null || _state$domainStates$l9 === void 0 ? void 0 : _state$domainStates$l9.msdyn_localeid)),
|
|
103
115
|
store: webChatStore,
|
|
@@ -109,7 +121,8 @@ export const initWebChatComposer = (props, chatSDK, state, dispatch, setWebChatS
|
|
|
109
121
|
groupActivitiesMiddleware: (_props$webChatContain17 = props.webChatContainerProps) !== null && _props$webChatContain17 !== void 0 && (_props$webChatContain18 = _props$webChatContain17.renderingMiddlewareProps) !== null && _props$webChatContain18 !== void 0 && _props$webChatContain18.disableGroupActivitiesMiddleware ? undefined : (_defaultWebChatContai2 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai2 === void 0 ? void 0 : _defaultWebChatContai2.groupActivitiesMiddleware,
|
|
110
122
|
typingIndicatorMiddleware: (_props$webChatContain19 = props.webChatContainerProps) !== null && _props$webChatContain19 !== void 0 && (_props$webChatContain20 = _props$webChatContain19.renderingMiddlewareProps) !== null && _props$webChatContain20 !== void 0 && _props$webChatContain20.disableTypingIndicatorMiddleware ? undefined : (_defaultWebChatContai3 = defaultWebChatContainerStatefulProps.webChatProps) === null || _defaultWebChatContai3 === void 0 ? void 0 : _defaultWebChatContai3.typingIndicatorMiddleware,
|
|
111
123
|
onTelemetry: createWebChatTelemetry(),
|
|
112
|
-
|
|
124
|
+
cardActionMiddleware: createCardActionMiddleware(((_props$webChatContain21 = props.webChatContainerProps) === null || _props$webChatContain21 === void 0 ? void 0 : _props$webChatContain21.botMagicCode) || undefined),
|
|
125
|
+
...((_props$webChatContain22 = props.webChatContainerProps) === null || _props$webChatContain22 === void 0 ? void 0 : _props$webChatContain22.webChatProps)
|
|
113
126
|
};
|
|
114
127
|
return webChatProps;
|
|
115
128
|
};
|
|
@@ -1,76 +1,88 @@
|
|
|
1
1
|
import "regenerator-runtime/runtime";
|
|
2
2
|
import { BroadcastEvent, LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryConstants";
|
|
3
|
+
import { handleAuthentication, removeAuthTokenProvider } from "./authHelper";
|
|
4
|
+
import { isNullOrEmptyString, isNullOrUndefined } from "../../../common/utils";
|
|
3
5
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
4
6
|
import { ConversationState } from "../../../contexts/common/ConversationState";
|
|
5
7
|
import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
|
|
6
|
-
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
8
|
+
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
const handleChatReconnect = async (chatSDK, props, dispatch, setAdapter, initStartChat, state) => {
|
|
12
|
+
var _props$chatConfig, _props$chatConfig$Liv;
|
|
13
|
+
if (!isReconnectEnabled(props.chatConfig)) return;
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
const isAuthenticatedChat = (_props$chatConfig = props.chatConfig) !== null && _props$chatConfig !== void 0 && (_props$chatConfig$Liv = _props$chatConfig.LiveChatConfigAuthSettings) !== null && _props$chatConfig$Liv !== void 0 && _props$chatConfig$Liv.msdyn_javascriptclientfunction ? true : false;
|
|
17
|
+
|
|
18
|
+
// Get chat reconnect context
|
|
19
|
+
const reconnectChatContext = await getChatReconnectContext(chatSDK, props.chatConfig, props, isAuthenticatedChat);
|
|
20
|
+
if (hasReconnectId(reconnectChatContext)) {
|
|
21
|
+
var _props$reconnectChatP2, _props$reconnectChatP3;
|
|
22
|
+
//Redirect if enabled
|
|
23
|
+
if (reconnectChatContext.redirectURL && !isNullOrEmptyString(reconnectChatContext.redirectURL)) {
|
|
24
|
+
var _props$reconnectChatP;
|
|
25
|
+
redirectPage(reconnectChatContext.redirectURL, (_props$reconnectChatP = props.reconnectChatPaneProps) === null || _props$reconnectChatP === void 0 ? void 0 : _props$reconnectChatP.redirectInSameWindow);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//if reconnect id is provided in props, don't show reconnect pane
|
|
30
|
+
if ((_props$reconnectChatP2 = props.reconnectChatPaneProps) !== null && _props$reconnectChatP2 !== void 0 && _props$reconnectChatP2.reconnectId && !isNullOrEmptyString((_props$reconnectChatP3 = props.reconnectChatPaneProps) === null || _props$reconnectChatP3 === void 0 ? void 0 : _props$reconnectChatP3.reconnectId)) {
|
|
31
|
+
const reconnectChatContext = await getChatReconnectContext(chatSDK, props.chatConfig, props, isAuthenticatedChat);
|
|
32
|
+
await setReconnectIdAndStartChat(isAuthenticatedChat, chatSDK, props, dispatch, setAdapter, reconnectChatContext.reconnectId ?? "", initStartChat);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
7
35
|
|
|
8
|
-
|
|
36
|
+
//show reconnect pane
|
|
37
|
+
state.appStates.conversationState = ConversationState.ReconnectChat;
|
|
38
|
+
dispatch({
|
|
39
|
+
type: LiveChatWidgetActionType.SET_RECONNECT_ID,
|
|
40
|
+
payload: reconnectChatContext.reconnectId ?? ""
|
|
41
|
+
});
|
|
42
|
+
dispatch({
|
|
43
|
+
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
44
|
+
payload: ConversationState.ReconnectChat
|
|
45
|
+
});
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
+
const getChatReconnectContext = async (chatSDK, chatConfig, props, isAuthenticatedChat) => {
|
|
9
52
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
53
|
+
var _props$reconnectChatP4;
|
|
54
|
+
const chatReconnectOptionalParams = {
|
|
55
|
+
reconnectId: (_props$reconnectChatP4 = props.reconnectChatPaneProps) === null || _props$reconnectChatP4 === void 0 ? void 0 : _props$reconnectChatP4.reconnectId
|
|
56
|
+
};
|
|
57
|
+
if (isAuthenticatedChat) {
|
|
58
|
+
// Get auth token for for getting chat reconnect context
|
|
59
|
+
await handleAuthentication(chatSDK, chatConfig, props.getAuthToken);
|
|
60
|
+
}
|
|
61
|
+
const reconnectChatContext = await (chatSDK === null || chatSDK === void 0 ? void 0 : chatSDK.getChatReconnectContext(chatReconnectOptionalParams));
|
|
62
|
+
if (isAuthenticatedChat) {
|
|
63
|
+
// remove auth token after reconnectId is fetched
|
|
64
|
+
// this will be reset later at start chat
|
|
65
|
+
removeAuthTokenProvider(chatSDK);
|
|
17
66
|
}
|
|
18
|
-
|
|
67
|
+
return reconnectChatContext;
|
|
68
|
+
} catch (error) {
|
|
19
69
|
TelemetryHelper.logSDKEvent(LogLevel.ERROR, {
|
|
20
70
|
Event: TelemetryEvent.GetChatReconnectContextSDKCallFailed,
|
|
21
71
|
ExceptionDetails: {
|
|
22
|
-
exception:
|
|
72
|
+
exception: error
|
|
23
73
|
}
|
|
24
74
|
});
|
|
25
75
|
}
|
|
76
|
+
};
|
|
26
77
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if ((_props$reconnectChatP = props.reconnectChatPaneProps) !== null && _props$reconnectChatP !== void 0 && _props$reconnectChatP.isReconnectEnabled && (_props$reconnectChatP2 = props.reconnectChatPaneProps) !== null && _props$reconnectChatP2 !== void 0 && _props$reconnectChatP2.authClientFunction // TODO: Implement this after storage is in place
|
|
35
|
-
|
|
36
|
-
/* && !isLoadWithState() */
|
|
37
|
-
) {
|
|
38
|
-
const previousActiveSessionResponse = await getChatReconnectContext(chatSDK);
|
|
39
|
-
|
|
40
|
-
if (previousActiveSessionResponse && previousActiveSessionResponse.reconnectId) {
|
|
41
|
-
return previousActiveSessionResponse.reconnectId;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
return undefined;
|
|
46
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const handleUnauthenticatedReconnectChat = async (chatSDK, dispatch, setAdapter, reconnectId, initStartChat, redirectInSameWindow) => {
|
|
50
|
-
const reconnectAvailabilityResponse = await getChatReconnectContext(chatSDK, reconnectId);
|
|
51
|
-
|
|
52
|
-
if (shouldRedirectOrStartNewChat(reconnectAvailabilityResponse)) {
|
|
53
|
-
await redirectOrStartNewChat(reconnectAvailabilityResponse, chatSDK, dispatch, setAdapter, initStartChat, redirectInSameWindow);
|
|
54
|
-
} else {
|
|
55
|
-
await setReconnectIdAndStartChat(chatSDK, dispatch, setAdapter, reconnectId, initStartChat);
|
|
56
|
-
}
|
|
57
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const startUnauthenticatedReconnectChat = async (chatSDK, dispatch, setAdapter, reconnectId, initStartChat) => {
|
|
61
|
-
const reconnectAvailabilityResponse = await getChatReconnectContext(chatSDK, reconnectId);
|
|
62
|
-
|
|
63
|
-
if (!shouldRedirectOrStartNewChat(reconnectAvailabilityResponse)) {
|
|
64
|
-
await setReconnectIdAndStartChat(chatSDK, dispatch, setAdapter, reconnectId, initStartChat);
|
|
78
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
+
const setReconnectIdAndStartChat = async (isAuthenticatedChat, chatSDK, props, dispatch, setAdapter, reconnectId, initStartChat) => {
|
|
80
|
+
if (!isAuthenticatedChat) {
|
|
81
|
+
const startUnauthenticatedReconnectChat = {
|
|
82
|
+
eventName: BroadcastEvent.StartUnauthenticatedReconnectChat
|
|
83
|
+
};
|
|
84
|
+
BroadcastService.postMessage(startUnauthenticatedReconnectChat);
|
|
65
85
|
}
|
|
66
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const setReconnectIdAndStartChat = async (chatSDK, dispatch, setAdapter, reconnectId, initStartChat) => {
|
|
70
|
-
const startUnauthenticatedReconnectChat = {
|
|
71
|
-
eventName: BroadcastEvent.StartUnauthenticatedReconnectChat
|
|
72
|
-
};
|
|
73
|
-
BroadcastService.postMessage(startUnauthenticatedReconnectChat);
|
|
74
86
|
const optionalParams = {
|
|
75
87
|
reconnectId: reconnectId
|
|
76
88
|
};
|
|
@@ -82,9 +94,8 @@ const setReconnectIdAndStartChat = async (chatSDK, dispatch, setAdapter, reconne
|
|
|
82
94
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
83
95
|
payload: ConversationState.Loading
|
|
84
96
|
});
|
|
85
|
-
await initStartChat(chatSDK, dispatch, setAdapter, optionalParams);
|
|
97
|
+
await initStartChat(chatSDK, props.chatConfig, props.getAuthToken, dispatch, setAdapter, optionalParams);
|
|
86
98
|
};
|
|
87
|
-
|
|
88
99
|
const redirectPage = (redirectURL, redirectInSameWindow) => {
|
|
89
100
|
const redirectPageRequest = {
|
|
90
101
|
eventName: BroadcastEvent.RedirectPageRequest,
|
|
@@ -93,60 +104,15 @@ const redirectPage = (redirectURL, redirectInSameWindow) => {
|
|
|
93
104
|
}
|
|
94
105
|
};
|
|
95
106
|
BroadcastService.postMessage(redirectPageRequest);
|
|
96
|
-
|
|
97
107
|
if (redirectInSameWindow) {
|
|
98
108
|
window.location.href = redirectURL;
|
|
99
109
|
}
|
|
100
110
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return
|
|
104
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const startNewChatEmptyRedirectionUrl = async (chatSDK, dispatch, setAdapter, initStartChat) => {
|
|
108
|
-
const startUnauthenticatedReconnectChat = {
|
|
109
|
-
eventName: BroadcastEvent.StartUnauthenticatedReconnectChat
|
|
110
|
-
};
|
|
111
|
-
BroadcastService.postMessage(startUnauthenticatedReconnectChat); // Getting PreChat Survey Context
|
|
112
|
-
|
|
113
|
-
const parseToJson = false;
|
|
114
|
-
const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
|
|
115
|
-
|
|
116
|
-
if (preChatSurveyResponse) {
|
|
117
|
-
dispatch({
|
|
118
|
-
type: LiveChatWidgetActionType.SET_PRE_CHAT_SURVEY_RESPONSE,
|
|
119
|
-
payload: preChatSurveyResponse
|
|
120
|
-
});
|
|
121
|
-
dispatch({
|
|
122
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
123
|
-
payload: ConversationState.Prechat
|
|
124
|
-
});
|
|
125
|
-
} else {
|
|
126
|
-
dispatch({
|
|
127
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
128
|
-
payload: ConversationState.Loading
|
|
129
|
-
});
|
|
130
|
-
await initStartChat(chatSDK, dispatch, setAdapter);
|
|
131
|
-
}
|
|
132
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const handleRedirectUnauthenticatedReconnectChat = async (chatSDK, dispatch, setAdapter, initStartChat, reconnectId, redirectInSameWindow) => {
|
|
136
|
-
const reconnectAvailabilityResponse = await getChatReconnectContext(chatSDK, reconnectId);
|
|
137
|
-
|
|
138
|
-
if (shouldRedirectOrStartNewChat(reconnectAvailabilityResponse)) {
|
|
139
|
-
await redirectOrStartNewChat(reconnectAvailabilityResponse, chatSDK, dispatch, setAdapter, initStartChat, redirectInSameWindow);
|
|
140
|
-
}
|
|
141
|
-
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const redirectOrStartNewChat = async (reconnectAvailabilityResponse, chatSDK, dispatch, setAdapter, initStartChat, redirectInSameWindow) => {
|
|
145
|
-
if (reconnectAvailabilityResponse.redirectURL) {
|
|
146
|
-
redirectPage(reconnectAvailabilityResponse.redirectURL, redirectInSameWindow);
|
|
147
|
-
} else {
|
|
148
|
-
await startNewChatEmptyRedirectionUrl(chatSDK, dispatch, setAdapter, initStartChat);
|
|
149
|
-
}
|
|
111
|
+
const isReconnectEnabled = chatConfig => {
|
|
112
|
+
var _chatConfig$LiveWSAnd;
|
|
113
|
+
return chatConfig && ((_chatConfig$LiveWSAnd = chatConfig.LiveWSAndLiveChatEngJoin) === null || _chatConfig$LiveWSAnd === void 0 ? void 0 : _chatConfig$LiveWSAnd.msdyn_enablechatreconnect) && (chatConfig.LiveWSAndLiveChatEngJoin.msdyn_enablechatreconnect === "true" || chatConfig.LiveWSAndLiveChatEngJoin.msdyn_enablechatreconnect === true);
|
|
150
114
|
};
|
|
151
|
-
|
|
152
|
-
|
|
115
|
+
const hasReconnectId = reconnectAvailabilityResponse => {
|
|
116
|
+
return reconnectAvailabilityResponse && !isNullOrUndefined(reconnectAvailabilityResponse.reconnectId);
|
|
117
|
+
};
|
|
118
|
+
export { handleChatReconnect, isReconnectEnabled, getChatReconnectContext };
|
|
@@ -6,27 +6,23 @@ import { defaultInternalTelemetryData } from "../../../common/telemetry/defaultC
|
|
|
6
6
|
import { defaultTelemetryConfiguration } from "../../../common/telemetry/defaultConfigs/defaultTelemetryConfiguration";
|
|
7
7
|
export const registerTelemetryLoggers = (props, dispatch) => {
|
|
8
8
|
var _props$liveChatContex, _props$liveChatContex2;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const telemetryConfig = {
|
|
10
|
+
...defaultTelemetryConfiguration,
|
|
11
11
|
...props.telemetryConfig
|
|
12
12
|
};
|
|
13
|
-
|
|
14
13
|
if ((_props$liveChatContex = props.liveChatContextFromCache) !== null && _props$liveChatContex !== void 0 && (_props$liveChatContex2 = _props$liveChatContex.domainStates) !== null && _props$liveChatContex2 !== void 0 && _props$liveChatContex2.telemetryInternalData) {
|
|
15
14
|
var _props$liveChatContex3, _props$liveChatContex4;
|
|
16
|
-
|
|
17
15
|
TelemetryManager.InternalTelemetryData = (_props$liveChatContex3 = props.liveChatContextFromCache) === null || _props$liveChatContex3 === void 0 ? void 0 : (_props$liveChatContex4 = _props$liveChatContex3.domainStates) === null || _props$liveChatContex4 === void 0 ? void 0 : _props$liveChatContex4.telemetryInternalData;
|
|
18
16
|
} else {
|
|
19
17
|
var _props$chatSDK, _props$chatSDK$omnich, _props$chatSDK2, _props$chatSDK2$omnic, _props$chatSDK3, _props$chatSDK3$omnic;
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
let telemetryData = {
|
|
19
|
+
...defaultInternalTelemetryData,
|
|
22
20
|
telemetryConfig: Object.assign({}, defaultTelemetryConfiguration, telemetryConfig),
|
|
23
21
|
ariaConfig: Object.assign({}, defaultAriaConfig, telemetryConfig === null || telemetryConfig === void 0 ? void 0 : telemetryConfig.ariaConfigurations)
|
|
24
22
|
};
|
|
25
|
-
|
|
26
23
|
if (props.chatConfig) {
|
|
27
24
|
telemetryData = TelemetryHelper.addChatConfigDataToTelemetry(props === null || props === void 0 ? void 0 : props.chatConfig, telemetryData);
|
|
28
25
|
}
|
|
29
|
-
|
|
30
26
|
telemetryData = TelemetryHelper.addWidgetDataToTelemetry(telemetryConfig, telemetryData);
|
|
31
27
|
telemetryData.OCChatSDKVersion = telemetryConfig.OCChatSDKVersion ?? "0.0.0-0";
|
|
32
28
|
telemetryData.chatComponentVersion = telemetryConfig.chatComponentVersion ?? "0.0.0-0";
|
|
@@ -40,6 +36,5 @@ export const registerTelemetryLoggers = (props, dispatch) => {
|
|
|
40
36
|
payload: telemetryData
|
|
41
37
|
});
|
|
42
38
|
}
|
|
43
|
-
|
|
44
39
|
RegisterLoggers();
|
|
45
40
|
};
|
|
@@ -2,8 +2,9 @@ import { LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryCon
|
|
|
2
2
|
import { BroadcastService } from "@microsoft/omnichannel-chat-components";
|
|
3
3
|
import { ConversationState } from "../../../contexts/common/ConversationState";
|
|
4
4
|
import { LiveChatWidgetActionType } from "../../../contexts/common/LiveChatWidgetActionType";
|
|
5
|
-
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
5
|
+
import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
|
|
6
6
|
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
8
|
export const setPostChatContextAndLoadSurvey = async (chatSDK, dispatch, persistedChat) => {
|
|
8
9
|
try {
|
|
9
10
|
if (!persistedChat) {
|
|
@@ -25,14 +26,10 @@ export const setPostChatContextAndLoadSurvey = async (chatSDK, dispatch, persist
|
|
|
25
26
|
exception: ex
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
|
-
}
|
|
29
|
-
|
|
29
|
+
}
|
|
30
30
|
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
32
|
BroadcastService.getMessageByEventName("LoadPostChatSurvey").subscribe(msg => {
|
|
32
|
-
dispatch({
|
|
33
|
-
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
34
|
-
payload: ConversationState.Loading
|
|
35
|
-
});
|
|
36
33
|
dispatch({
|
|
37
34
|
type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
38
35
|
payload: ConversationState.Postchat
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2
|
+
export function shareObservable(observable) {
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
let observers = [];
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
let subscription;
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10
|
+
return new window.Observable(observer => {
|
|
11
|
+
if (!subscription) {
|
|
12
|
+
subscription = observable.subscribe({
|
|
13
|
+
complete() {
|
|
14
|
+
observers.forEach(observer => observer.complete());
|
|
15
|
+
},
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
error(err) {
|
|
18
|
+
observers.forEach(observer => observer.error(err));
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
+
next(value) {
|
|
22
|
+
observers.forEach(observer => observer.next(value));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
observers.push(observer);
|
|
27
|
+
return () => {
|
|
28
|
+
observers = observers.filter(o => o !== observer);
|
|
29
|
+
if (!observers.length) {
|
|
30
|
+
subscription.unsubscribe();
|
|
31
|
+
subscription = null;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
}
|