@microsoft/omnichannel-chat-widget 0.1.0-main.eb80fb1 → 0.1.0-main.f514612
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 +35 -11
- package/lib/cjs/common/Constants.js +54 -6
- package/lib/cjs/common/storage/default/defaultCacheManager.js +34 -0
- package/lib/cjs/common/storage/default/defaultClientDataStoreProvider.js +114 -0
- package/lib/cjs/common/storage/default/defaultInMemoryDataStore.js +86 -0
- package/lib/cjs/common/telemetry/TelemetryConstants.js +64 -6
- package/lib/cjs/common/telemetry/TelemetryHelper.js +13 -0
- package/lib/cjs/common/telemetry/TelemetryManager.js +17 -6
- package/lib/cjs/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
- package/lib/cjs/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/cjs/common/telemetry/loggers/ariaTelemetryLogger.js +33 -13
- package/lib/cjs/common/telemetry/loggers/consoleLogger.js +6 -5
- package/lib/cjs/common/utils.js +89 -2
- package/lib/cjs/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +20 -4
- package/lib/cjs/components/confirmationpanestateful/ConfirmationPaneStateful.js +6 -40
- package/lib/cjs/components/footerstateful/FooterStateful.js +2 -10
- package/lib/cjs/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +11 -2
- package/lib/cjs/components/headerstateful/HeaderStateful.js +14 -10
- package/lib/cjs/components/livechatwidget/common/ActivityStreamHandler.js +44 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +23 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +39 -0
- package/lib/cjs/components/livechatwidget/common/ChatAdapterShim.js +70 -0
- package/lib/cjs/components/livechatwidget/common/Deferred.js +42 -0
- package/lib/cjs/components/livechatwidget/common/authHelper.js +65 -0
- package/lib/cjs/components/livechatwidget/common/createAdapter.js +13 -1
- package/lib/cjs/components/livechatwidget/common/createFooter.js +7 -16
- package/lib/cjs/components/livechatwidget/common/createInternetConnectionChangeHandler.js +12 -0
- package/lib/cjs/components/livechatwidget/common/createMarkdown.js +32 -32
- package/lib/cjs/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +34 -19
- package/lib/cjs/components/livechatwidget/common/endChat.js +141 -50
- package/lib/cjs/components/livechatwidget/common/initCallingSdk.js +1 -1
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +51 -9
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +144 -39
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +6 -17
- package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +6 -9
- package/lib/cjs/components/livechatwidget/common/shareObservable.js +45 -0
- package/lib/cjs/components/livechatwidget/common/startChat.js +171 -51
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +308 -81
- package/lib/cjs/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +8 -0
- package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +5 -10
- package/lib/cjs/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +19 -3
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +96 -2
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +4 -1
- package/lib/cjs/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +11 -0
- package/lib/cjs/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
- 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 +14 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +25 -48
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +3 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +52 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +98 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +10 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +117 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +45 -0
- package/lib/cjs/contexts/common/ConversationState.js +4 -2
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +17 -4
- package/lib/cjs/contexts/createReducer.js +24 -10
- package/lib/cjs/controller/componentController.js +5 -5
- package/lib/cjs/plugins/newMessageEventHandler.js +99 -0
- package/lib/esm/common/Constants.js +50 -5
- package/lib/esm/common/storage/default/defaultCacheManager.js +19 -0
- package/lib/esm/common/storage/default/defaultClientDataStoreProvider.js +102 -0
- package/lib/esm/common/storage/default/defaultInMemoryDataStore.js +71 -0
- package/lib/esm/common/telemetry/TelemetryConstants.js +60 -5
- package/lib/esm/common/telemetry/TelemetryHelper.js +13 -1
- package/lib/esm/common/telemetry/TelemetryManager.js +15 -6
- package/lib/esm/common/telemetry/defaultConfigs/defaultAriaConfig.js +1 -1
- package/lib/esm/common/telemetry/defaultConfigs/defaultTelemetryConfiguration.js +4 -1
- package/lib/esm/common/telemetry/loggers/ariaTelemetryLogger.js +36 -14
- package/lib/esm/common/telemetry/loggers/consoleLogger.js +6 -5
- package/lib/esm/common/utils.js +64 -1
- package/lib/esm/components/callingcontainerstateful/CallingContainerStateful.js +14 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +22 -7
- package/lib/esm/components/confirmationpanestateful/ConfirmationPaneStateful.js +6 -36
- package/lib/esm/components/footerstateful/FooterStateful.js +2 -10
- package/lib/esm/components/footerstateful/downloadtranscriptstateful/DownloadTranscriptStateful.js +9 -3
- package/lib/esm/components/headerstateful/HeaderStateful.js +15 -11
- package/lib/esm/components/livechatwidget/common/ActivityStreamHandler.js +34 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js +14 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/IActivitySubscriber.js +1 -0
- package/lib/esm/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js +29 -0
- package/lib/esm/components/livechatwidget/common/ChatAdapterShim.js +59 -0
- package/lib/esm/components/livechatwidget/common/Deferred.js +33 -0
- package/lib/esm/components/livechatwidget/common/authHelper.js +50 -0
- package/lib/esm/components/livechatwidget/common/createAdapter.js +12 -2
- package/lib/esm/components/livechatwidget/common/createFooter.js +4 -15
- package/lib/esm/components/livechatwidget/common/createInternetConnectionChangeHandler.js +8 -0
- package/lib/esm/components/livechatwidget/common/createMarkdown.js +32 -31
- package/lib/esm/components/livechatwidget/common/defaultProps/dummyDefaultProps.js +34 -20
- package/lib/esm/components/livechatwidget/common/endChat.js +139 -50
- package/lib/esm/components/livechatwidget/common/initCallingSdk.js +1 -1
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +46 -11
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +134 -41
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +5 -14
- package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +6 -9
- package/lib/esm/components/livechatwidget/common/shareObservable.js +38 -0
- package/lib/esm/components/livechatwidget/common/startChat.js +165 -54
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +293 -84
- package/lib/esm/components/postchatloadingpanestateful/PostChatLoadingPaneStateful.js +6 -0
- package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +7 -11
- package/lib/esm/components/proactivechatpanestateful/ProactiveChatPaneStateful.js +20 -4
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +86 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultWebChatContainerStatefulProps.js +3 -1
- package/lib/esm/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.js +4 -0
- package/lib/esm/components/webchatcontainerstateful/common/mockchatsdk.js +6 -0
- 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/middlewares/renderingmiddlewares/activityMiddleware.js +23 -46
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityStatusMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/attachmentMiddleware.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.js +41 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/cardActionMiddleware.spec.js +94 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultReceivedMessageAnchorStyles.js +3 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/messageTimestampMiddleware.js +107 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/conversationEndMiddleware.js +6 -6
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.js +32 -0
- package/lib/esm/contexts/common/ConversationState.js +4 -2
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +10 -7
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +15 -4
- package/lib/esm/contexts/createReducer.js +24 -9
- package/lib/esm/controller/componentController.js +5 -5
- package/lib/esm/plugins/newMessageEventHandler.js +82 -0
- package/lib/types/common/Constants.d.ts +27 -2
- package/lib/types/common/interfaces/IContextDataStore.d.ts +2 -2
- 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 +46 -4
- package/lib/types/common/telemetry/TelemetryHelper.d.ts +2 -0
- package/lib/types/common/telemetry/definitions/Payload.d.ts +12 -9
- package/lib/types/common/telemetry/interfaces/ITelemetryConfig.d.ts +3 -3
- package/lib/types/common/utils.d.ts +8 -1
- package/lib/types/components/confirmationpanestateful/interfaces/IConfirmationPaneStatefulParams.d.ts +5 -2
- package/lib/types/components/footerstateful/audionotificationstateful/interfaces/IAudioNotificationStatefulParams.d.ts +0 -1
- package/lib/types/components/headerstateful/interfaces/IHeaderStatefulParams.d.ts +5 -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/endChat.d.ts +4 -1
- package/lib/types/components/livechatwidget/common/reconnectChatHelper.d.ts +6 -2
- package/lib/types/components/livechatwidget/common/shareObservable.d.ts +1 -0
- package/lib/types/components/livechatwidget/common/startChat.d.ts +4 -2
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetComponentOverrides.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetControlProps.d.ts +1 -0
- package/lib/types/components/livechatwidget/interfaces/ILiveChatWidgetProps.d.ts +2 -1
- package/lib/types/components/reconnectchatpanestateful/interfaces/IReconnectChatPaneStatefulProps.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/common/defaultStyles/defaultAdaptiveCardStyles.d.ts +2 -0
- package/lib/types/components/webchatcontainerstateful/common/mockchatsdk.d.ts +2 -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 +2 -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/activityMiddleware.d.ts +0 -1
- 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/messageTimestampMiddleware.d.ts +5 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger.d.ts +1 -0
- package/lib/types/contexts/common/ConversationState.d.ts +4 -2
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +3 -1
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +11 -8
- package/lib/types/contexts/common/LiveChatWidgetContextInitialState.d.ts +1 -2
- package/lib/types/plugins/newMessageEventHandler.d.ts +2 -0
- package/package.json +11 -12
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ActivityStreamHandler = void 0;
|
|
7
|
+
|
|
8
|
+
var _Deferred = require("./Deferred");
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
12
|
+
class ActivityStreamHandler {
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Use of a deferred pattern, to hold the execution of the activity.
|
|
18
|
+
*
|
|
19
|
+
* */
|
|
20
|
+
static cork() {
|
|
21
|
+
ActivityStreamHandler.restoreDeferred = new _Deferred.Deferred();
|
|
22
|
+
ActivityStreamHandler.restorePromise = ActivityStreamHandler.restoreDeferred.promise;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the promise, releasing it to continue with the execution of the activity.
|
|
26
|
+
*
|
|
27
|
+
* */
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
static uncork() {
|
|
31
|
+
ActivityStreamHandler.restoreDeferred.resolve();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
exports.ActivityStreamHandler = ActivityStreamHandler;
|
|
37
|
+
|
|
38
|
+
_defineProperty(ActivityStreamHandler, "restoreDeferred", {
|
|
39
|
+
resolve: () => {
|
|
40
|
+
return "initialState";
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
_defineProperty(ActivityStreamHandler, "restorePromise", void 0);
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/DefaultActivitySubscriber.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.DefaultActivitySubscriber = void 0;
|
|
7
|
+
|
|
8
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
|
|
10
|
+
class DefaultActivitySubscriber {
|
|
11
|
+
constructor() {
|
|
12
|
+
_defineProperty(this, "observer", void 0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
async next(activity) {
|
|
17
|
+
this.observer.next(activity);
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
exports.DefaultActivitySubscriber = DefaultActivitySubscriber;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/PauseActivitySubscriber.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PauseActivitySubscriber = void 0;
|
|
7
|
+
|
|
8
|
+
var _ActivityStreamHandler = require("../ActivityStreamHandler");
|
|
9
|
+
|
|
10
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11
|
+
|
|
12
|
+
class PauseActivitySubscriber {
|
|
13
|
+
constructor() {
|
|
14
|
+
_defineProperty(this, "observer", void 0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
async apply(activity) {
|
|
19
|
+
await _ActivityStreamHandler.ActivityStreamHandler.restorePromise;
|
|
20
|
+
return activity;
|
|
21
|
+
} // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
applicable(activity) {
|
|
25
|
+
return true;
|
|
26
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
async next(activity) {
|
|
30
|
+
if (this.applicable(activity)) {
|
|
31
|
+
return await this.apply(activity);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return activity;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.PauseActivitySubscriber = PauseActivitySubscriber;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ChatAdapterShim = void 0;
|
|
7
|
+
|
|
8
|
+
var _DefaultActivitySubscriber = require("./ActivitySubscriber/DefaultActivitySubscriber");
|
|
9
|
+
|
|
10
|
+
var _shareObservable = require("./shareObservable");
|
|
11
|
+
|
|
12
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
|
|
14
|
+
class ChatAdapterShim {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
constructor(chatAdapter) {
|
|
20
|
+
_defineProperty(this, "chatAdapter", void 0);
|
|
21
|
+
|
|
22
|
+
_defineProperty(this, "activityObserver", void 0);
|
|
23
|
+
|
|
24
|
+
_defineProperty(this, "subscribers", void 0);
|
|
25
|
+
|
|
26
|
+
this.subscribers = [];
|
|
27
|
+
this.chatAdapter = { ...chatAdapter,
|
|
28
|
+
activity$: (0, _shareObservable.shareObservable)( // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
+
new window.Observable(observer => {
|
|
30
|
+
this.activityObserver = observer; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
+
|
|
32
|
+
const abortController = new window.AbortController();
|
|
33
|
+
|
|
34
|
+
(async () => {
|
|
35
|
+
try {
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
37
|
+
for await (let activity of chatAdapter.activities({
|
|
38
|
+
signal: abortController.signal
|
|
39
|
+
})) {
|
|
40
|
+
for (const subscriber of [...this.subscribers, new _DefaultActivitySubscriber.DefaultActivitySubscriber()]) {
|
|
41
|
+
subscriber.observer = this.activityObserver;
|
|
42
|
+
activity = await subscriber.next(activity);
|
|
43
|
+
|
|
44
|
+
if (!activity) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
observer.complete();
|
|
51
|
+
} catch (error) {
|
|
52
|
+
observer.error(error);
|
|
53
|
+
}
|
|
54
|
+
})();
|
|
55
|
+
|
|
56
|
+
return () => {
|
|
57
|
+
abortController.abort();
|
|
58
|
+
};
|
|
59
|
+
}))
|
|
60
|
+
};
|
|
61
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
addSubscriber(subscriber) {
|
|
65
|
+
this.subscribers.push(subscriber);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
exports.ChatAdapterShim = ChatAdapterShim;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Deferred = void 0;
|
|
7
|
+
|
|
8
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
|
|
10
|
+
class Deferred {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12
|
+
constructor() {
|
|
13
|
+
_defineProperty(this, "_promise", void 0);
|
|
14
|
+
|
|
15
|
+
_defineProperty(this, "_resolve", void 0);
|
|
16
|
+
|
|
17
|
+
_defineProperty(this, "_reject", () => {
|
|
18
|
+
return;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
_defineProperty(this, "resolve", value => {
|
|
22
|
+
this._resolve(value);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
_defineProperty(this, "reject", value => {
|
|
26
|
+
this._reject(value);
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
this._promise = new Promise((resolve, reject) => {
|
|
30
|
+
this._resolve = resolve;
|
|
31
|
+
this._reject = reject;
|
|
32
|
+
});
|
|
33
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
get promise() {
|
|
37
|
+
return this._promise;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.Deferred = Deferred;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.removeAuthTokenProvider = exports.handleAuthentication = exports.getAuthClientFunction = void 0;
|
|
7
|
+
|
|
8
|
+
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
9
|
+
|
|
10
|
+
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
11
|
+
|
|
12
|
+
var _utils = require("../../../common/utils");
|
|
13
|
+
|
|
14
|
+
const getAuthClientFunction = chatConfig => {
|
|
15
|
+
let authClientFunction = undefined;
|
|
16
|
+
|
|
17
|
+
if (chatConfig !== null && chatConfig !== void 0 && chatConfig.LiveChatConfigAuthSettings) {
|
|
18
|
+
var _chatConfig$LiveChatC;
|
|
19
|
+
|
|
20
|
+
authClientFunction = (chatConfig === null || chatConfig === void 0 ? void 0 : (_chatConfig$LiveChatC = chatConfig.LiveChatConfigAuthSettings) === null || _chatConfig$LiveChatC === void 0 ? void 0 : _chatConfig$LiveChatC.msdyn_javascriptclientfunction) ?? undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return authClientFunction;
|
|
24
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
exports.getAuthClientFunction = getAuthClientFunction;
|
|
28
|
+
|
|
29
|
+
const handleAuthentication = async (chatSDK, chatConfig, getAuthToken) => {
|
|
30
|
+
const authClientFunction = getAuthClientFunction(chatConfig);
|
|
31
|
+
|
|
32
|
+
if (getAuthToken && authClientFunction) {
|
|
33
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
34
|
+
Event: _TelemetryConstants.TelemetryEvent.GetAuthTokenCalled
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const token = await getAuthToken(authClientFunction);
|
|
38
|
+
|
|
39
|
+
if (!(0, _utils.isNullOrEmptyString)(token)) {
|
|
40
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
41
|
+
chatSDK.setAuthTokenProvider(async () => {
|
|
42
|
+
return token;
|
|
43
|
+
});
|
|
44
|
+
return true;
|
|
45
|
+
} else {
|
|
46
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
47
|
+
Event: _TelemetryConstants.TelemetryEvent.ReceivedNullOrEmptyToken
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return false;
|
|
55
|
+
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
exports.handleAuthentication = handleAuthentication;
|
|
59
|
+
|
|
60
|
+
const removeAuthTokenProvider = chatSDK => {
|
|
61
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
62
|
+
chatSDK.authenticatedUserToken = null;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
exports.removeAuthTokenProvider = removeAuthTokenProvider;
|
|
@@ -13,6 +13,10 @@ var _NotificationScenarios = require("../../webchatcontainerstateful/webchatcont
|
|
|
13
13
|
|
|
14
14
|
var _defaultMiddlewareLocalizedTexts = require("../../webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts");
|
|
15
15
|
|
|
16
|
+
var _ChatAdapterShim = require("./ChatAdapterShim");
|
|
17
|
+
|
|
18
|
+
var _PauseActivitySubscriber = require("./ActivitySubscriber/PauseActivitySubscriber");
|
|
19
|
+
|
|
16
20
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
21
|
const createAdapter = async chatSDK => {
|
|
18
22
|
const chatAdapterOptionalParams = {
|
|
@@ -34,7 +38,15 @@ const createAdapter = async chatSDK => {
|
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
};
|
|
37
|
-
|
|
41
|
+
let adapter = await chatSDK.createChatAdapter(chatAdapterOptionalParams); //so far, there is no need to convert to the shim adapter when using visual tests
|
|
42
|
+
|
|
43
|
+
if (chatSDK.isMockModeOn !== true) {
|
|
44
|
+
adapter = new _ChatAdapterShim.ChatAdapterShim(adapter);
|
|
45
|
+
adapter.addSubscriber(new _PauseActivitySubscriber.PauseActivitySubscriber());
|
|
46
|
+
return adapter.chatAdapter;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return adapter;
|
|
38
50
|
};
|
|
39
51
|
|
|
40
52
|
exports.createAdapter = createAdapter;
|
|
@@ -16,26 +16,17 @@ var _componentController = require("../../../controller/componentController");
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
18
|
const createFooter = (props, state) => {
|
|
19
|
-
var _props$
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hideEmailTranscriptButton: true,
|
|
25
|
-
hideAudioNotificationButton: true
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const footer = !((_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hideFooter) && (0, _componentController.shouldShowFooter)(state) ? (0, _omnichannelChatComponents.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.footer) || /*#__PURE__*/_react.default.createElement(_FooterStateful.default, {
|
|
19
|
+
var _props$controlProps, _props$componentOverr;
|
|
20
|
+
|
|
21
|
+
const hideFooterDisplay = !((_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hideFooter) && (0, _componentController.shouldShowFooter)(state) ? false : true;
|
|
22
|
+
|
|
23
|
+
const footer = (0, _omnichannelChatComponents.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.footer) || /*#__PURE__*/_react.default.createElement(_FooterStateful.default, {
|
|
29
24
|
footerProps: props.footerProps,
|
|
30
25
|
downloadTranscriptProps: props.downloadTranscriptProps,
|
|
31
26
|
audioNotificationProps: props.audioNotificationProps,
|
|
32
|
-
hideFooterDisplay:
|
|
33
|
-
}) : (0, _omnichannelChatComponents.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.footer) || /*#__PURE__*/_react.default.createElement(_FooterStateful.default, {
|
|
34
|
-
footerProps: footerPropsHidden,
|
|
35
|
-
downloadTranscriptProps: props.downloadTranscriptProps,
|
|
36
|
-
audioNotificationProps: props.audioNotificationProps,
|
|
37
|
-
hideFooterDisplay: true
|
|
27
|
+
hideFooterDisplay: hideFooterDisplay
|
|
38
28
|
});
|
|
29
|
+
|
|
39
30
|
return footer;
|
|
40
31
|
};
|
|
41
32
|
|
|
@@ -13,6 +13,10 @@ var _NotificationScenarios = require("../../webchatcontainerstateful/webchatcont
|
|
|
13
13
|
|
|
14
14
|
var _defaultMiddlewareLocalizedTexts = require("../../webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts");
|
|
15
15
|
|
|
16
|
+
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
17
|
+
|
|
18
|
+
var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants");
|
|
19
|
+
|
|
16
20
|
const isInternetConnected = async () => {
|
|
17
21
|
try {
|
|
18
22
|
const response = await fetch(_Constants.Constants.internetConnectionTestUrl);
|
|
@@ -28,8 +32,16 @@ const createInternetConnectionChangeHandler = async () => {
|
|
|
28
32
|
const connected = await isInternetConnected();
|
|
29
33
|
|
|
30
34
|
if (!connected) {
|
|
35
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.WARN, {
|
|
36
|
+
Event: _TelemetryConstants.TelemetryEvent.NetworkDisconnected
|
|
37
|
+
});
|
|
38
|
+
|
|
31
39
|
_NotificationHandler.NotificationHandler.notifyError(_NotificationScenarios.NotificationScenarios.InternetConnection, _defaultMiddlewareLocalizedTexts.defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_NO_INTERNET_CONNECTION);
|
|
32
40
|
} else {
|
|
41
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.WARN, {
|
|
42
|
+
Event: _TelemetryConstants.TelemetryEvent.NetworkReconnected
|
|
43
|
+
});
|
|
44
|
+
|
|
33
45
|
_NotificationHandler.NotificationHandler.notifySuccess(_NotificationScenarios.NotificationScenarios.InternetConnection, _defaultMiddlewareLocalizedTexts.defaultMiddlewareLocalizedTexts.MIDDLEWARE_BANNER_INTERNET_BACK_ONLINE);
|
|
34
46
|
}
|
|
35
47
|
}; // Checking connection status on online & offline events due to possible false positives
|
|
@@ -7,8 +7,6 @@ exports.createMarkdown = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _markdownIt = _interopRequireDefault(require("markdown-it"));
|
|
9
9
|
|
|
10
|
-
var _slackMarkdownIt = _interopRequireDefault(require("slack-markdown-it"));
|
|
11
|
-
|
|
12
10
|
var _markdownItForInline = _interopRequireDefault(require("markdown-it-for-inline"));
|
|
13
11
|
|
|
14
12
|
var _defaultMarkdownLocalizedTexts = require("../../webchatcontainerstateful/common/defaultProps/defaultMarkdownLocalizedTexts");
|
|
@@ -26,27 +24,42 @@ const createMarkdown = (disableMarkdownMessageFormatting, disableNewLineMarkdown
|
|
|
26
24
|
html: true,
|
|
27
25
|
linkify: true,
|
|
28
26
|
breaks: !disableNewLineMarkdownSupport
|
|
27
|
+
}); // ToDo: Commenting below usage of plugin until deferred bug is resolved: https://github.com/mayashavin/markdown-it-slack/issues/1
|
|
28
|
+
// markdown.use(MarkdownSlack);
|
|
29
|
+
} else {
|
|
30
|
+
markdown = new _markdownIt.default(_Constants.Constants.Zero, {
|
|
31
|
+
html: true,
|
|
32
|
+
linkify: true,
|
|
33
|
+
breaks: !disableNewLineMarkdownSupport
|
|
29
34
|
});
|
|
30
|
-
markdown.
|
|
31
|
-
//
|
|
35
|
+
markdown.enable(["entity", // Rule to process html entity - {, ¯, "
|
|
36
|
+
"linkify", // Rule to replace link-like texts with link nodes
|
|
37
|
+
"html_block", // Rule to process html blocks and paragraphs
|
|
38
|
+
"html_inline", // Rule to process html tags
|
|
39
|
+
"newline" // Rule to proceess '\n'
|
|
40
|
+
]);
|
|
41
|
+
} // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
42
|
|
|
33
|
-
markdown.use(_markdownItForInline.default, "url_new_win", "link_open", function (tokens, idx, env) {
|
|
34
|
-
const targetAttrIndex = tokens[idx].attrIndex(_Constants.Constants.Target); // Put a transparent pixel instead of the "open in new window" icon, so developers can easily modify the icon in CSS.
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
markdown.use(_markdownItForInline.default, "url_new_win", "link_open", function (tokens, idx, env) {
|
|
45
|
+
const targetAttrIndex = tokens[idx].attrIndex(_Constants.Constants.Target); // Put a transparent pixel instead of the "open in new window" icon, so developers can easily modify the icon in CSS.
|
|
37
46
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
const TRANSPARENT_GIF = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
|
48
|
+
|
|
49
|
+
if (~targetAttrIndex) {
|
|
50
|
+
tokens[idx].attrs[targetAttrIndex][1] = _Constants.Constants.Blank;
|
|
51
|
+
} else {
|
|
52
|
+
tokens[idx].attrPush([_Constants.Constants.Target, _Constants.Constants.Blank]);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const relAttrIndex = tokens[idx].attrIndex(_Constants.Constants.TargetRelationship);
|
|
43
56
|
|
|
44
|
-
|
|
57
|
+
if (~relAttrIndex) {
|
|
58
|
+
tokens[idx].attrs[relAttrIndex][1] = _Constants.Constants.TargetRelationshipAttributes;
|
|
59
|
+
} else {
|
|
60
|
+
tokens[idx].attrPush([_Constants.Constants.TargetRelationship, _Constants.Constants.TargetRelationshipAttributes]);
|
|
45
61
|
|
|
46
|
-
if (
|
|
47
|
-
tokens[idx].attrs[relAttrIndex][1] = _Constants.Constants.TargetRelationshipAttributes;
|
|
48
|
-
} else {
|
|
49
|
-
tokens[idx].attrPush([_Constants.Constants.TargetRelationship, _Constants.Constants.TargetRelationshipAttributes]);
|
|
62
|
+
if (!disableMarkdownMessageFormatting) {
|
|
50
63
|
tokens[idx].attrPush([_Constants.Constants.Title, _defaultMarkdownLocalizedTexts.defaultMarkdownLocalizedTexts.MARKDOWN_EXTERNAL_LINK_ALT]); // eslint-disable-next-line quotes
|
|
51
64
|
|
|
52
65
|
const iconTokens = markdown.parseInline(``, env)[0].children;
|
|
@@ -56,21 +69,8 @@ const createMarkdown = (disableMarkdownMessageFormatting, disableNewLineMarkdown
|
|
|
56
69
|
tokens.splice(idx + 2, 0, ...iconTokens);
|
|
57
70
|
}
|
|
58
71
|
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
markdown = new _markdownIt.default(_Constants.Constants.Zero, {
|
|
62
|
-
html: true,
|
|
63
|
-
linkify: true,
|
|
64
|
-
breaks: !disableNewLineMarkdownSupport
|
|
65
|
-
});
|
|
66
|
-
markdown.enable(["entity", // Rule to process html entity - {, ¯, "
|
|
67
|
-
"linkify", // Rule to replace link-like texts with link nodes
|
|
68
|
-
"html_block", // Rule to process html blocks and paragraphs
|
|
69
|
-
"html_inline", // Rule to process html tags
|
|
70
|
-
"newline" // Rule to proceess '\n'
|
|
71
|
-
]);
|
|
72
|
-
}
|
|
73
|
-
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
74
|
return markdown;
|
|
75
75
|
};
|
|
76
76
|
|
|
@@ -27,6 +27,8 @@ var _groupActivitiesMiddleware = require("../../../webchatcontainerstateful/webc
|
|
|
27
27
|
|
|
28
28
|
var _typingIndicatorMiddleware = require("../../../webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/typingIndicatorMiddleware");
|
|
29
29
|
|
|
30
|
+
var _WebChatLogger = require("../../../webchatcontainerstateful/webchatcontroller/webchattelemetry/WebChatLogger");
|
|
31
|
+
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
32
34
|
/* eslint-disable @typescript-eslint/no-empty-function, @typescript-eslint/no-explicit-any */
|
|
@@ -272,18 +274,6 @@ const dummyDefaultProps = {
|
|
|
272
274
|
width: "50px",
|
|
273
275
|
fontSize: "18px"
|
|
274
276
|
},
|
|
275
|
-
currentCallTimerStyleProps: {
|
|
276
|
-
borderRadius: "2px",
|
|
277
|
-
margin: "1px",
|
|
278
|
-
color: "#FFFFFF",
|
|
279
|
-
paddingTop: "18px",
|
|
280
|
-
fontSize: 12,
|
|
281
|
-
fontFamily: "Segoe UI, Arial, sans-serif",
|
|
282
|
-
backgroundColor: "darkgrey",
|
|
283
|
-
height: "45px",
|
|
284
|
-
width: "50px",
|
|
285
|
-
textAlign: "center"
|
|
286
|
-
},
|
|
287
277
|
videoTileStyleProps: {
|
|
288
278
|
width: "100%",
|
|
289
279
|
marginLeft: "auto",
|
|
@@ -347,7 +337,10 @@ const dummyDefaultProps = {
|
|
|
347
337
|
hideChatTextContainer: false,
|
|
348
338
|
hideChatSubtitle: false,
|
|
349
339
|
hideChatTitle: false,
|
|
350
|
-
hideNotificationBubble: true
|
|
340
|
+
hideNotificationBubble: true,
|
|
341
|
+
unreadMessageString: "new messages",
|
|
342
|
+
largeUnreadMessageString: "99+",
|
|
343
|
+
ariaLabelUnreadMessageString: "you have new messages"
|
|
351
344
|
},
|
|
352
345
|
styleProps: {
|
|
353
346
|
generalStyleProps: {
|
|
@@ -898,7 +891,7 @@ const dummyDefaultProps = {
|
|
|
898
891
|
className: undefined
|
|
899
892
|
},
|
|
900
893
|
closeButtonProps: {
|
|
901
|
-
id: "oc-lcw-header-
|
|
894
|
+
id: "oc-lcw-header-close-button",
|
|
902
895
|
type: "icon",
|
|
903
896
|
iconName: "ChromeClose",
|
|
904
897
|
ariaLabel: "Close",
|
|
@@ -1214,7 +1207,17 @@ const dummyDefaultProps = {
|
|
|
1214
1207
|
hideSubtitle: false,
|
|
1215
1208
|
subtitleText: "Live chat support!",
|
|
1216
1209
|
hideCloseButton: false,
|
|
1217
|
-
|
|
1210
|
+
closeButtonProps: {
|
|
1211
|
+
id: "oc-lcw-proactivechat-closebutton",
|
|
1212
|
+
type: "icon",
|
|
1213
|
+
iconName: "ChromeClose",
|
|
1214
|
+
ariaLabel: "Close",
|
|
1215
|
+
imageIconProps: undefined,
|
|
1216
|
+
text: "Close",
|
|
1217
|
+
onClick: undefined,
|
|
1218
|
+
className: undefined,
|
|
1219
|
+
hideButtonTitle: true
|
|
1220
|
+
},
|
|
1218
1221
|
isBodyContainerHorizantal: false,
|
|
1219
1222
|
hideBodyTitle: false,
|
|
1220
1223
|
bodyTitleText: "Hi! Have any questions? I am here to help.",
|
|
@@ -1442,9 +1445,9 @@ const dummyDefaultProps = {
|
|
|
1442
1445
|
startNewChatButtonClassName: undefined
|
|
1443
1446
|
}
|
|
1444
1447
|
},
|
|
1445
|
-
authClientFunction: undefined,
|
|
1446
1448
|
isReconnectEnabled: undefined,
|
|
1447
|
-
reconnectId: undefined
|
|
1449
|
+
reconnectId: undefined,
|
|
1450
|
+
redirectInSameWindow: undefined
|
|
1448
1451
|
},
|
|
1449
1452
|
styleProps: {
|
|
1450
1453
|
generalStyles: {
|
|
@@ -1516,7 +1519,7 @@ const dummyDefaultProps = {
|
|
|
1516
1519
|
internalErrorBoxClass: undefined,
|
|
1517
1520
|
internalRenderErrorBox: undefined,
|
|
1518
1521
|
locale: "en-US",
|
|
1519
|
-
onTelemetry:
|
|
1522
|
+
onTelemetry: (0, _WebChatLogger.createWebChatTelemetry)(),
|
|
1520
1523
|
overrideLocalizedStrings: undefined,
|
|
1521
1524
|
renderMarkdown: (0, _createMarkdown.createMarkdown)(false, false),
|
|
1522
1525
|
scrollToEndButtonMiddleware: undefined,
|
|
@@ -1683,6 +1686,9 @@ const dummyDefaultProps = {
|
|
|
1683
1686
|
},
|
|
1684
1687
|
attachmentSizeStyles: {
|
|
1685
1688
|
display: "none"
|
|
1689
|
+
},
|
|
1690
|
+
receivedMessageAnchorStyles: {
|
|
1691
|
+
color: "white"
|
|
1686
1692
|
}
|
|
1687
1693
|
},
|
|
1688
1694
|
localizedTexts: {
|
|
@@ -1706,8 +1712,17 @@ const dummyDefaultProps = {
|
|
|
1706
1712
|
MIDDLEWARE_MESSAGE_RETRY: "Retry",
|
|
1707
1713
|
PRECHAT_REQUIRED_FIELD_MISSING_MESSAGE: "{0} field is required",
|
|
1708
1714
|
MARKDOWN_EXTERNAL_LINK_ALT: "Opens in a new window; external."
|
|
1715
|
+
},
|
|
1716
|
+
botMagicCode: {
|
|
1717
|
+
disabled: false,
|
|
1718
|
+
fwdUrl: ""
|
|
1719
|
+
},
|
|
1720
|
+
adaptiveCardStyles: {
|
|
1721
|
+
background: "white",
|
|
1722
|
+
color: "black"
|
|
1709
1723
|
}
|
|
1710
1724
|
},
|
|
1711
|
-
telemetryConfig: undefined
|
|
1725
|
+
telemetryConfig: undefined,
|
|
1726
|
+
getAuthToken: undefined
|
|
1712
1727
|
};
|
|
1713
1728
|
exports.dummyDefaultProps = dummyDefaultProps;
|