@microsoft/omnichannel-chat-widget 1.8.4-main.4478bbf → 1.8.4-main.4f09da2
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 +27 -0
- package/lib/cjs/common/Constants.js +2 -0
- package/lib/cjs/common/telemetry/AppInsightsEvents.js +11 -5
- package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
- package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -7
- package/lib/cjs/common/utils.js +14 -1
- package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +20 -1
- package/lib/cjs/components/errorboundary/ErrorBoundary.js +2 -1
- package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
- package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
- package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
- package/lib/cjs/components/livechatwidget/common/endChat.js +26 -9
- package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -2
- package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +36 -4
- package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +113 -26
- package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +8 -6
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +28 -30
- package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
- package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
- package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -0
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
- package/lib/cjs/contexts/createReducer.js +15 -0
- package/lib/esm/common/Constants.js +2 -0
- package/lib/esm/common/telemetry/AppInsightsEvents.js +11 -5
- package/lib/esm/common/telemetry/TelemetryConstants.js +3 -0
- package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
- package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +7 -7
- package/lib/esm/common/utils.js +11 -0
- package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +20 -1
- package/lib/esm/components/errorboundary/ErrorBoundary.js +4 -2
- package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
- package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
- package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
- package/lib/esm/components/livechatwidget/common/endChat.js +26 -9
- package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -2
- package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +33 -2
- package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +113 -26
- package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +8 -6
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +29 -34
- package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
- package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
- package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
- package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -0
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
- package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
- package/lib/esm/contexts/createReducer.js +15 -0
- package/lib/types/common/Constants.d.ts +2 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +3 -0
- package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
- package/lib/types/common/utils.d.ts +9 -1
- package/lib/types/components/errorboundary/ErrorBoundary.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +1 -1
- package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +11 -0
- package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +5 -1
- package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +1 -2
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +1 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
- package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
- package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
- package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +5 -0
- package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
- package/package.json +2 -2
|
@@ -58,13 +58,14 @@ var _startProactiveChat = require("../common/startProactiveChat");
|
|
|
58
58
|
var _useChatAdapterStore = _interopRequireDefault(require("../../../hooks/useChatAdapterStore"));
|
|
59
59
|
var _useChatContextStore = _interopRequireDefault(require("../../../hooks/useChatContextStore"));
|
|
60
60
|
var _useFacadeChatSDKStore = _interopRequireDefault(require("../../../hooks/useFacadeChatSDKStore"));
|
|
61
|
+
var _renderSurveyHelpers = require("../common/renderSurveyHelpers");
|
|
61
62
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
62
63
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
63
64
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
64
65
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
65
66
|
let uiTimer;
|
|
66
67
|
const LiveChatWidgetStateful = props => {
|
|
67
|
-
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$webChatContain6, _props$webChatContain7, _props$webChatContain8, _props$webChatContain9, _props$styleProps, _props$webChatContain10, _props$webChatContain11, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain15, _state$
|
|
68
|
+
var _props$webChatContain, _props$webChatContain2, _props$webChatContain3, _props$webChatContain4, _props$webChatContain5, _props$webChatContain6, _props$webChatContain7, _props$webChatContain8, _props$webChatContain9, _props$styleProps, _props$webChatContain10, _props$webChatContain11, _props$controlProps, _props$controlProps3, _state$appStates7, _props$webChatContain15, _state$appStates8, _props$webChatContain17, _props$webChatContain18, _props$controlProps12, _props$draggableChatW, _props$draggableChatW2, _props$draggableChatW3, _props$draggableChatW4, _props$draggableChatW5, _livechatProps$webCha, _livechatProps$styleP, _livechatProps$contro, _livechatProps$contro2, _livechatProps$compon, _livechatProps$contro3, _livechatProps$compon2, _livechatProps$contro4, _livechatProps$compon3, _livechatProps$contro5, _livechatProps$compon4, _livechatProps$contro6, _livechatProps$compon5, _livechatProps$contro7, _livechatProps$compon6, _livechatProps$contro8, _livechatProps$compon7, _livechatProps$contro9, _livechatProps$compon8, _livechatProps$contro10, _livechatProps$contro11, _livechatProps$compon9, _livechatProps$contro12, _livechatProps$compon10, _livechatProps$contro13, _livechatProps$compon11, _livechatProps$compon12, _livechatProps$compon13;
|
|
68
69
|
(0, _react2.useEffect)(() => {
|
|
69
70
|
uiTimer = (0, _utils.createTimer)();
|
|
70
71
|
_TelemetryHelper.TelemetryHelper.logLoadingEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
@@ -325,7 +326,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
325
326
|
});
|
|
326
327
|
});
|
|
327
328
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.StartProactiveChat).subscribe(msg => {
|
|
328
|
-
_TelemetryHelper.TelemetryHelper.
|
|
329
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
329
330
|
Event: _TelemetryConstants.TelemetryEvent.StartProactiveChatEventReceived,
|
|
330
331
|
Description: "Start proactive chat event received."
|
|
331
332
|
});
|
|
@@ -451,7 +452,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
451
452
|
payload: msg === null || msg === void 0 ? void 0 : (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
|
|
452
453
|
});
|
|
453
454
|
}
|
|
454
|
-
_TelemetryHelper.TelemetryHelper.
|
|
455
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
455
456
|
Event: _TelemetryConstants.TelemetryEvent.StartChatEventReceived,
|
|
456
457
|
Description: "Start chat event received."
|
|
457
458
|
});
|
|
@@ -498,21 +499,91 @@ const LiveChatWidgetStateful = props => {
|
|
|
498
499
|
return;
|
|
499
500
|
}
|
|
500
501
|
});
|
|
502
|
+
const handleInitiateEndChatForPersistentChat = async (msg, conversationDetails) => {
|
|
503
|
+
var _msg$payload10, _msg$payload11, _msg$payload12;
|
|
504
|
+
//If the payload does NOT include the skipSessionCloseForPersistentChat flag, default is false. Upon receiving the customer event, always ending session from C2.
|
|
505
|
+
const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 ? void 0 : (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === _Constants.Constants.String && (msg === null || msg === void 0 ? void 0 : (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === _Constants.Constants.true || (msg === null || msg === void 0 ? void 0 : (_msg$payload12 = msg.payload) === null || _msg$payload12 === void 0 ? void 0 : _msg$payload12[_Constants.Constants.SkipSessionCloseForPersistentChatFlag]) === true;
|
|
506
|
+
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
507
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
508
|
+
Description: "Processing initiateEndChat for persistent chat",
|
|
509
|
+
CustomProperties: {
|
|
510
|
+
conversationDetails
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
const conversationState = conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.state;
|
|
514
|
+
if (conversationState !== _Constants.LiveWorkItemState.Closed && conversationState !== _Constants.LiveWorkItemState.WrapUp) {
|
|
515
|
+
if (skipSessionCloseForPersistentChat) {
|
|
516
|
+
var _conversationDetails$;
|
|
517
|
+
if (((_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === "true") {
|
|
518
|
+
var _state$domainStates3;
|
|
519
|
+
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
520
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
521
|
+
Description: "Processing initiateEndChat, fetching postChatContext"
|
|
522
|
+
});
|
|
523
|
+
const postchatContext = (await (0, _renderSurveyHelpers.getPostChatContext)(facadeChatSDK, state, dispatch)) ?? (state === null || state === void 0 ? void 0 : (_state$domainStates3 = state.domainStates) === null || _state$domainStates3 === void 0 ? void 0 : _state$domainStates3.postChatContext);
|
|
524
|
+
if (postchatContext) {
|
|
525
|
+
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
526
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
527
|
+
Description: "Processing initiateEndChat, initiatePostChat",
|
|
528
|
+
CustomProperties: {
|
|
529
|
+
postchatContext
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
await (0, _renderSurveyHelpers.initiatePostChat)(props, conversationDetails, state, dispatch, postchatContext);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
} else {
|
|
536
|
+
const skipEndChatSDK = false;
|
|
537
|
+
const skipCloseChat = false;
|
|
538
|
+
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
539
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
540
|
+
Description: "Processing initiateEndChat, trigger endChat"
|
|
541
|
+
});
|
|
542
|
+
await (0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
//if conversation already closed, it is safe to unmount it upon receiving the closeChat event
|
|
546
|
+
else {
|
|
547
|
+
_omnichannelChatComponents.BroadcastService.postMessage({
|
|
548
|
+
eventName: _TelemetryConstants.BroadcastEvent.CloseChat
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
};
|
|
501
552
|
|
|
502
553
|
// End chat
|
|
503
|
-
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.InitiateEndChat).subscribe(async
|
|
554
|
+
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.InitiateEndChat).subscribe(async msg => {
|
|
504
555
|
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
505
556
|
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
506
557
|
Description: "Received InitiateEndChat BroadcastEvent.",
|
|
507
558
|
CustomProperties: {
|
|
508
|
-
ConversationStage: _TelemetryConstants.ConversationStage.ConversationEnd
|
|
559
|
+
ConversationStage: _TelemetryConstants.ConversationStage.ConversationEnd,
|
|
560
|
+
payload: msg === null || msg === void 0 ? void 0 : msg.payload
|
|
509
561
|
}
|
|
510
562
|
});
|
|
511
|
-
|
|
512
|
-
|
|
563
|
+
const conversationDetails = await (0, _utils.getConversationDetailsCall)(facadeChatSDK);
|
|
564
|
+
const {
|
|
565
|
+
chatConfig
|
|
566
|
+
} = props;
|
|
567
|
+
const isPersistent = (0, _reconnectChatHelper.isPersistentEnabled)(chatConfig);
|
|
568
|
+
_TelemetryHelper.TelemetryHelper.logSDKEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
569
|
+
Event: _TelemetryConstants.TelemetryEvent.EndChatEventReceived,
|
|
570
|
+
Description: "Processing initiateEndChat, fetched conversation details",
|
|
571
|
+
CustomProperties: {
|
|
572
|
+
conversationDetails,
|
|
573
|
+
isPersistent
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
if (isPersistent && conversationDetails) {
|
|
577
|
+
await handleInitiateEndChatForPersistentChat(msg, conversationDetails);
|
|
578
|
+
return;
|
|
579
|
+
}
|
|
513
580
|
const persistedState = (0, _utils.getStateFromCache)((0, _utils.getWidgetCacheIdfromProps)(props));
|
|
514
581
|
if (persistedState && persistedState.appStates.conversationState === _ConversationState.ConversationState.Active) {
|
|
515
|
-
|
|
582
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
583
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
584
|
+
Description: _Constants.PrepareEndChatDescriptionConstants.InitiateEndChatReceivedActiveChat
|
|
585
|
+
});
|
|
586
|
+
//We need to simulate states for closing chat, in order to messup with close confirmation pane.
|
|
516
587
|
dispatch({
|
|
517
588
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONFIRMATION_STATE,
|
|
518
589
|
payload: _Constants.ConfirmationState.Ok
|
|
@@ -532,11 +603,8 @@ const LiveChatWidgetStateful = props => {
|
|
|
532
603
|
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
533
604
|
Description: _Constants.PrepareEndChatDescriptionConstants.InitiateEndChatReceived
|
|
534
605
|
});
|
|
535
|
-
(0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
|
|
606
|
+
await (0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
|
|
536
607
|
}
|
|
537
|
-
_omnichannelChatComponents.BroadcastService.postMessage({
|
|
538
|
-
eventName: _TelemetryConstants.BroadcastEvent.CloseChat
|
|
539
|
-
});
|
|
540
608
|
});
|
|
541
609
|
|
|
542
610
|
// End chat on browser unload
|
|
@@ -547,8 +615,8 @@ const LiveChatWidgetStateful = props => {
|
|
|
547
615
|
// Listen to end chat event from other tabs
|
|
548
616
|
const endChatEventName = (0, _utils.getWidgetEndChatEventName)((_facadeChatSDK$getCha3 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha3 === void 0 ? void 0 : (_facadeChatSDK$getCha4 = _facadeChatSDK$getCha3.omnichannelConfig) === null || _facadeChatSDK$getCha4 === void 0 ? void 0 : _facadeChatSDK$getCha4.orgId, (_facadeChatSDK$getCha5 = facadeChatSDK.getChatSDK()) === null || _facadeChatSDK$getCha5 === void 0 ? void 0 : (_facadeChatSDK$getCha6 = _facadeChatSDK$getCha5.omnichannelConfig) === null || _facadeChatSDK$getCha6 === void 0 ? void 0 : _facadeChatSDK$getCha6.widgetId, ((_props$controlProps11 = props.controlProps) === null || _props$controlProps11 === void 0 ? void 0 : _props$controlProps11.widgetInstanceId) ?? "");
|
|
549
617
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
|
|
550
|
-
var _msg$
|
|
551
|
-
if ((msg === null || msg === void 0 ? void 0 : (_msg$
|
|
618
|
+
var _msg$payload13;
|
|
619
|
+
if ((msg === null || msg === void 0 ? void 0 : (_msg$payload13 = msg.payload) === null || _msg$payload13 === void 0 ? void 0 : _msg$payload13.runtimeId) !== _TelemetryManager.TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
|
|
552
620
|
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
553
621
|
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
554
622
|
Description: "Received EndChat BroadcastEvent from other tabs. Closing this chat."
|
|
@@ -590,8 +658,8 @@ const LiveChatWidgetStateful = props => {
|
|
|
590
658
|
|
|
591
659
|
// Retrieve convId
|
|
592
660
|
_omnichannelChatComponents.BroadcastService.getMessageByEventName(_TelemetryConstants.BroadcastEvent.UpdateConversationDataForTelemetry).subscribe(msg => {
|
|
593
|
-
var _msg$
|
|
594
|
-
if ((_msg$
|
|
661
|
+
var _msg$payload14, _msg$payload14$liveWo;
|
|
662
|
+
if ((_msg$payload14 = msg.payload) !== null && _msg$payload14 !== void 0 && (_msg$payload14$liveWo = _msg$payload14.liveWorkItem) !== null && _msg$payload14$liveWo !== void 0 && _msg$payload14$liveWo.conversationId) {
|
|
595
663
|
setConversationId(msg.payload.liveWorkItem.conversationId);
|
|
596
664
|
}
|
|
597
665
|
});
|
|
@@ -709,14 +777,22 @@ const LiveChatWidgetStateful = props => {
|
|
|
709
777
|
}
|
|
710
778
|
}, [state.domainStates.confirmationState]);
|
|
711
779
|
(0, _react2.useEffect)(() => {
|
|
712
|
-
var
|
|
780
|
+
var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta10, _inMemoryState$appSta11, _inMemoryState$appSta12, _inMemoryState$appSta13;
|
|
781
|
+
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
782
|
+
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
783
|
+
payload: null
|
|
784
|
+
});
|
|
713
785
|
// Do not process anything during initialization
|
|
714
|
-
if ((
|
|
786
|
+
if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === _Constants.ConversationEndEntity.NotSet) {
|
|
787
|
+
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
788
|
+
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
789
|
+
Description: "conversationEndedBy is not set"
|
|
790
|
+
});
|
|
715
791
|
return;
|
|
716
792
|
}
|
|
717
793
|
|
|
718
794
|
// If start chat failed, and C2 is trying to close chat widget
|
|
719
|
-
if (
|
|
795
|
+
if (inMemoryState !== null && inMemoryState !== void 0 && (_inMemoryState$appSta8 = inMemoryState.appStates) !== null && _inMemoryState$appSta8 !== void 0 && _inMemoryState$appSta8.startChatFailed || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta9 = inMemoryState.appStates) === null || _inMemoryState$appSta9 === void 0 ? void 0 : _inMemoryState$appSta9.conversationState) === _ConversationState.ConversationState.Postchat) {
|
|
720
796
|
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
721
797
|
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
722
798
|
Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseChatOnFailureOrPostChat
|
|
@@ -726,7 +802,7 @@ const LiveChatWidgetStateful = props => {
|
|
|
726
802
|
}
|
|
727
803
|
|
|
728
804
|
// Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
|
|
729
|
-
if ((
|
|
805
|
+
if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationState) === _ConversationState.ConversationState.InActive) {
|
|
730
806
|
_TelemetryHelper.TelemetryHelper.logSDKEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
731
807
|
Event: _TelemetryConstants.TelemetryEvent.PrepareEndChat,
|
|
732
808
|
Description: _Constants.PrepareEndChatDescriptionConstants.CustomerCloseInactiveChat
|
|
@@ -734,11 +810,11 @@ const LiveChatWidgetStateful = props => {
|
|
|
734
810
|
(0, _endChat.endChat)(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
|
|
735
811
|
return;
|
|
736
812
|
}
|
|
737
|
-
const isConversationalSurveyEnabled =
|
|
813
|
+
const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.isConversationalSurveyEnabled;
|
|
738
814
|
|
|
739
815
|
// In conversational survey, we need to check post chat survey logics before we set ConversationState to InActive
|
|
740
816
|
// Hence setting ConversationState to InActive will be done later in the post chat flows
|
|
741
|
-
if (!isConversationalSurveyEnabled && ((
|
|
817
|
+
if (!isConversationalSurveyEnabled && ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.conversationEndedBy) === _Constants.ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta13 = inMemoryState.appStates) === null || _inMemoryState$appSta13 === void 0 ? void 0 : _inMemoryState$appSta13.conversationEndedBy) === _Constants.ConversationEndEntity.Bot)) {
|
|
742
818
|
dispatch({
|
|
743
819
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.SET_CONVERSATION_STATE,
|
|
744
820
|
payload: _ConversationState.ConversationState.InActive
|
|
@@ -746,8 +822,8 @@ const LiveChatWidgetStateful = props => {
|
|
|
746
822
|
}
|
|
747
823
|
|
|
748
824
|
// All other cases
|
|
749
|
-
(0, _endChat.prepareEndChat)(props, facadeChatSDK,
|
|
750
|
-
}, [state === null || state === void 0 ? void 0 : (_state$
|
|
825
|
+
(0, _endChat.prepareEndChat)(props, facadeChatSDK, inMemoryState, dispatch, setAdapter, setWebChatStyles, adapter);
|
|
826
|
+
}, [state === null || state === void 0 ? void 0 : (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
|
|
751
827
|
|
|
752
828
|
// Publish chat widget state
|
|
753
829
|
(0, _react2.useEffect)(() => {
|
|
@@ -779,13 +855,13 @@ const LiveChatWidgetStateful = props => {
|
|
|
779
855
|
|
|
780
856
|
// Handle Chat disconnect cases
|
|
781
857
|
(0, _react2.useEffect)(() => {
|
|
782
|
-
var _inMemoryState$
|
|
858
|
+
var _inMemoryState$appSta14;
|
|
783
859
|
const inMemoryState = (0, _createReducer.executeReducer)(state, {
|
|
784
860
|
type: _LiveChatWidgetActionType.LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
|
|
785
861
|
payload: null
|
|
786
862
|
});
|
|
787
863
|
(0, _chatDisconnectHelper.handleChatDisconnect)(props, inMemoryState, setWebChatStyles);
|
|
788
|
-
const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$
|
|
864
|
+
const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta14 = inMemoryState.appStates) === null || _inMemoryState$appSta14 === void 0 ? void 0 : _inMemoryState$appSta14.chatDisconnectEventReceived;
|
|
789
865
|
if (chatDisconnectState && adapter) {
|
|
790
866
|
try {
|
|
791
867
|
adapter.end();
|
|
@@ -884,6 +960,17 @@ const LiveChatWidgetStateful = props => {
|
|
|
884
960
|
bubbleTextColor
|
|
885
961
|
}), [webChatStyles, bubbleBackground, bubbleTextColor]);
|
|
886
962
|
|
|
963
|
+
// React to dynamic bot avatar initials updates from context
|
|
964
|
+
(0, _react2.useEffect)(() => {
|
|
965
|
+
if (state.domainStates.botAvatarInitials && state.domainStates.botAvatarInitials !== webChatStyles.botAvatarInitials) {
|
|
966
|
+
/* eslint-disable-next-line @typescript-eslint/no-non-null-assertion */
|
|
967
|
+
setWebChatStyles(styles => ({
|
|
968
|
+
...styles,
|
|
969
|
+
botAvatarInitials: state.domainStates.botAvatarInitials
|
|
970
|
+
}));
|
|
971
|
+
}
|
|
972
|
+
}, [state.domainStates.botAvatarInitials]);
|
|
973
|
+
|
|
887
974
|
// WebChat's Composer can only be rendered if a directLine object is defined
|
|
888
975
|
return directLine && /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement("style", null, `
|
|
889
976
|
#oc-lcw .webchat__basic-transcript__scrollable::-webkit-scrollbar {
|
|
@@ -31,7 +31,7 @@ const generateSurveyInviteLink = function (surveyInviteLink, isEmbed, locale, co
|
|
|
31
31
|
return `${surveyInviteLink}&${surveyLinkParams.toString()}`;
|
|
32
32
|
};
|
|
33
33
|
const PostChatSurveyPaneStateful = props => {
|
|
34
|
-
var _props$styleProps, _state$appStates, _props$controlProps;
|
|
34
|
+
var _props$styleProps, _state$appStates, _state$domainStates$p, _props$controlProps;
|
|
35
35
|
(0, _react.useEffect)(() => {
|
|
36
36
|
uiTimer = (0, _utils.createTimer)();
|
|
37
37
|
_TelemetryHelper.TelemetryHelper.logLoadingEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
@@ -48,13 +48,15 @@ const PostChatSurveyPaneStateful = props => {
|
|
|
48
48
|
});
|
|
49
49
|
let surveyInviteLink = "";
|
|
50
50
|
const surveyMode = (state === null || state === void 0 ? void 0 : (_state$appStates = state.appStates) === null || _state$appStates === void 0 ? void 0 : _state$appStates.selectedSurveyMode) === _PostChatSurveyMode.PostChatSurveyMode.Embed;
|
|
51
|
-
if (state.domainStates.postChatContext.botSurveyInviteLink &&
|
|
51
|
+
if ((_state$domainStates$p = state.domainStates.postChatContext) !== null && _state$domainStates$p !== void 0 && _state$domainStates$p.botSurveyInviteLink &&
|
|
52
52
|
// Bot survey enabled
|
|
53
53
|
state.appStates.postChatParticipantType === _Constants.ParticipantType.Bot) {
|
|
54
|
+
var _state$domainStates$p2, _state$domainStates$p3;
|
|
54
55
|
// Only Bot has engaged
|
|
55
|
-
surveyInviteLink = generateSurveyInviteLink(state.domainStates.postChatContext.botSurveyInviteLink, surveyMode, state.domainStates.postChatContext.botFormsProLocale, props.isCustomerVoiceSurveyCompact ?? true, props.customerVoiceSurveyCorrelationId || "");
|
|
56
|
+
surveyInviteLink = generateSurveyInviteLink((_state$domainStates$p2 = state.domainStates.postChatContext) === null || _state$domainStates$p2 === void 0 ? void 0 : _state$domainStates$p2.botSurveyInviteLink, surveyMode, (_state$domainStates$p3 = state.domainStates.postChatContext) === null || _state$domainStates$p3 === void 0 ? void 0 : _state$domainStates$p3.botFormsProLocale, props.isCustomerVoiceSurveyCompact ?? true, props.customerVoiceSurveyCorrelationId || "");
|
|
56
57
|
} else {
|
|
57
|
-
|
|
58
|
+
var _state$domainStates$p4, _state$domainStates$p5;
|
|
59
|
+
surveyInviteLink = generateSurveyInviteLink((_state$domainStates$p4 = state.domainStates.postChatContext) === null || _state$domainStates$p4 === void 0 ? void 0 : _state$domainStates$p4.surveyInviteLink, surveyMode, (_state$domainStates$p5 = state.domainStates.postChatContext) === null || _state$domainStates$p5 === void 0 ? void 0 : _state$domainStates$p5.formsProLocale, props.isCustomerVoiceSurveyCompact ?? true, props.customerVoiceSurveyCorrelationId || "");
|
|
58
60
|
}
|
|
59
61
|
if (props.copilotSurveyContext) {
|
|
60
62
|
surveyInviteLink = `${surveyInviteLink}&mcs_additionalcontext=${JSON.stringify(props.copilotSurveyContext)}`;
|
|
@@ -112,7 +114,7 @@ const PostChatSurveyPaneStateful = props => {
|
|
|
112
114
|
Event: _TelemetryConstants.TelemetryEvent.CustomerVoiceResponsePageLoaded
|
|
113
115
|
});
|
|
114
116
|
} else if (data === _CustomerVoiceEvents.CustomerVoiceEvents.FormResponseSubmitted) {
|
|
115
|
-
_TelemetryHelper.TelemetryHelper.
|
|
117
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
116
118
|
Event: _TelemetryConstants.TelemetryEvent.CustomerVoiceFormResponseSubmitted,
|
|
117
119
|
Description: "Customer Voice form response submitted.",
|
|
118
120
|
CustomProperties: {
|
|
@@ -120,7 +122,7 @@ const PostChatSurveyPaneStateful = props => {
|
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
124
|
} else if (data === _CustomerVoiceEvents.CustomerVoiceEvents.FormResponseError) {
|
|
123
|
-
_TelemetryHelper.TelemetryHelper.
|
|
125
|
+
_TelemetryHelper.TelemetryHelper.logActionEvent(_TelemetryConstants.LogLevel.ERROR, {
|
|
124
126
|
Event: _TelemetryConstants.TelemetryEvent.CustomerVoiceFormResponseError,
|
|
125
127
|
Description: "Customer Voice form response error.",
|
|
126
128
|
ExceptionDetails: {
|
|
@@ -62,7 +62,7 @@ const createMagicCodeSuccessResponse = signin => {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
const WebChatContainerStateful = props => {
|
|
65
|
-
var _props$webChatContain, _defaultWebChatContai,
|
|
65
|
+
var _props$webChatContain, _defaultWebChatContai, _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _webChatContainerProp8, _webChatContainerProp9, _props$webChatContain6, _props$webChatContain7, _defaultWebChatContai2, _props$webChatContain8, _props$webChatContain9, _defaultWebChatContai3, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _webChatContainerProp16, _webChatContainerProp17, _webChatContainerProp18, _webChatContainerProp19, _webChatContainerProp20, _webChatContainerProp21, _webChatContainerProp22, _webChatContainerProp23, _webChatContainerProp24, _props$webChatContain10, _props$webChatContain11, _webChatContainerProp25, _webChatContainerProp26, _webChatContainerProp27, _webChatContainerProp28, _props$citationPanePr, _props$citationPanePr2, _props$citationPanePr3, _props$citationPanePr4, _props$citationPanePr5;
|
|
66
66
|
const [facadeChatSDK] = (0, _useFacadeChatSDKStore.default)();
|
|
67
67
|
|
|
68
68
|
// Create a font family that includes emoji support, based on the primary font or default
|
|
@@ -96,17 +96,13 @@ const WebChatContainerStateful = props => {
|
|
|
96
96
|
|
|
97
97
|
// Type the chatConfig properly to avoid 'any' usage
|
|
98
98
|
const extendedChatConfig = props.chatConfig;
|
|
99
|
-
const isHistoryEnabledInConfig = extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L = extendedChatConfig.LcwFcbConfiguration) === null || _extendedChatConfig$L === void 0 ? void 0 : _extendedChatConfig$L.lcwPersistentChatHistoryEnabled;
|
|
100
|
-
const isHistoryEnabledViaProps = props === null || props === void 0 ? void 0 : (_props$persistentChat = props.persistentChatHistoryProps) === null || _props$persistentChat === void 0 ? void 0 : _props$persistentChat.persistentChatHistoryEnabled;
|
|
101
|
-
const isPersistentChatEnabledForWidget = !!(extendedChatConfig !== null && extendedChatConfig !== void 0 && (_extendedChatConfig$L2 = extendedChatConfig.LiveChatConfigAuthSettings) !== null && _extendedChatConfig$L2 !== void 0 && _extendedChatConfig$L2.msdyn_javascriptclientfunction) || (0, _liveChatConfigUtils.isPersistentChatEnabled)(extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L3 = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L3 === void 0 ? void 0 : _extendedChatConfig$L3.msdyn_conversationmode);
|
|
102
99
|
|
|
103
|
-
//
|
|
104
|
-
|
|
105
|
-
const isPersistentHistoryEnabled = isHistoryEnabledViaProps || isHistoryEnabledInConfig;
|
|
106
|
-
|
|
107
|
-
// Check if both persistent chat and widget support are enabled
|
|
108
|
-
const shouldLoadPersistentHistoryMessages = isPersistentHistoryEnabled && isPersistentChatEnabledForWidget;
|
|
100
|
+
// Determine if persistent chat history should be loaded based on all conditions
|
|
101
|
+
const shouldLoadPersistentHistoryMessages = (0, _liveChatConfigUtils.shouldLoadPersistentChatHistory)(extendedChatConfig);
|
|
109
102
|
if (shouldLoadPersistentHistoryMessages) {
|
|
103
|
+
_TelemetryHelper.TelemetryHelper.logLoadingEvent(_TelemetryConstants.LogLevel.INFO, {
|
|
104
|
+
Event: _TelemetryConstants.TelemetryEvent.PersistentChatHistoryEnabled
|
|
105
|
+
});
|
|
110
106
|
(0, _usePersistentChatHistory.default)(facadeChatSDK, (props === null || props === void 0 ? void 0 : props.persistentChatHistoryProps) ?? {});
|
|
111
107
|
}
|
|
112
108
|
// Delegated click handler for citation anchors. Placed after state is
|
|
@@ -271,24 +267,28 @@ const WebChatContainerStateful = props => {
|
|
|
271
267
|
background: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp === void 0 ? void 0 : _webChatContainerProp.background) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.background};
|
|
272
268
|
}
|
|
273
269
|
|
|
274
|
-
.webchat__bubble__content>div#ms_lcw_webchat_adaptive_card .ac-textBlock {
|
|
275
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp2 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp2 === void 0 ? void 0 : _webChatContainerProp2.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color};
|
|
270
|
+
.webchat__bubble__content>div#ms_lcw_webchat_adaptive_card .ac-textBlock[role=heading] {
|
|
271
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp2 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp2 === void 0 ? void 0 : _webChatContainerProp2.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color} !important;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.webchat__bubble__content>div#ms_lcw_webchat_adaptive_card label .ac-textRun:first-child {
|
|
275
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp3 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp3 === void 0 ? void 0 : _webChatContainerProp3.color) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.color} !important;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
.webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__bubble--from-user {
|
|
279
|
-
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
279
|
+
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp4 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp4 === void 0 ? void 0 : (_webChatContainerProp5 = _webChatContainerProp4.userMessageBoxStyles) === null || _webChatContainerProp5 === void 0 ? void 0 : _webChatContainerProp5.maxWidth) ?? (_defaultUserMessageBoxStyles.defaultUserMessageBoxStyles === null || _defaultUserMessageBoxStyles.defaultUserMessageBoxStyles === void 0 ? void 0 : _defaultUserMessageBoxStyles.defaultUserMessageBoxStyles.maxWidth)}
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
.webchat__stacked-layout--show-avatar div.webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__stacked-layout__message {
|
|
283
|
-
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
283
|
+
max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp6 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp6 === void 0 ? void 0 : (_webChatContainerProp7 = _webChatContainerProp6.systemMessageBoxStyles) === null || _webChatContainerProp7 === void 0 ? void 0 : _webChatContainerProp7.maxWidth) ?? (_defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles === null || _defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles === void 0 ? void 0 : _defaultSystemMessageBoxStyles.defaultSystemMessageBoxStyles.maxWidth)}
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
div[class="ac-textBlock"] *,
|
|
287
|
-
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
287
|
+
div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp8 === void 0 ? void 0 : _webChatContainerProp8.textWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.textWhiteSpace}}
|
|
288
288
|
|
|
289
289
|
div[class="ac-input-container"] input.ac-multichoiceInput,
|
|
290
290
|
div[class="ac-input-container"] select.ac-multichoiceInput {
|
|
291
|
-
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (
|
|
291
|
+
${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp9 !== void 0 && _webChatContainerProp9.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
.ms_lcw_webchat_received_message>div.webchat__stacked-layout>div.webchat__stacked-layout__main>div.webchat__stacked-layout__content>div.webchat__stacked-layout__message-row>[class^=webchat]:not(.webchat__bubble--from-user)>.webchat__bubble__content {
|
|
@@ -300,15 +300,15 @@ const WebChatContainerStateful = props => {
|
|
|
300
300
|
div[class="ac-textBlock"] a:visited,
|
|
301
301
|
div[class="ac-textBlock"] a:hover,
|
|
302
302
|
div[class="ac-textBlock"] a:active {
|
|
303
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
303
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp10 === void 0 ? void 0 : _webChatContainerProp10.anchorColor) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.anchorColor};
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
306
|
+
.webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp11 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp11 === void 0 ? void 0 : _webChatContainerProp11.buttonWhiteSpace) ?? _defaultAdaptiveCardStyles.defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
|
|
307
307
|
|
|
308
308
|
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
309
309
|
/* Fallback for browsers that don't support mask */
|
|
310
310
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
|
|
311
|
-
filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
311
|
+
filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp12 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp12 === void 0 ? void 0 : (_webChatContainerProp13 = _webChatContainerProp12.receivedMessageAnchorStyles) === null || _webChatContainerProp13 === void 0 ? void 0 : _webChatContainerProp13.filter) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.filter)};
|
|
312
312
|
height: .75em;
|
|
313
313
|
width: .75em;
|
|
314
314
|
margin-left: .25em;
|
|
@@ -318,7 +318,7 @@ const WebChatContainerStateful = props => {
|
|
|
318
318
|
.ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
|
|
319
319
|
/* Fallback for browsers that don't support mask */
|
|
320
320
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
|
|
321
|
-
filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
321
|
+
filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp14 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp14 === void 0 ? void 0 : (_webChatContainerProp15 = _webChatContainerProp14.sentMessageAnchorStyles) === null || _webChatContainerProp15 === void 0 ? void 0 : _webChatContainerProp15.filter) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.filter)};
|
|
322
322
|
height: .75em;
|
|
323
323
|
width: .75em;
|
|
324
324
|
margin-left: .25em;
|
|
@@ -328,7 +328,7 @@ const WebChatContainerStateful = props => {
|
|
|
328
328
|
/* Modern browsers with mask support */
|
|
329
329
|
@supports (mask: url()) or (-webkit-mask: url()) {
|
|
330
330
|
.ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
|
|
331
|
-
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
331
|
+
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp16 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp16 === void 0 ? void 0 : (_webChatContainerProp17 = _webChatContainerProp16.receivedMessageAnchorStyles) === null || _webChatContainerProp17 === void 0 ? void 0 : _webChatContainerProp17.color) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.color)} !important;
|
|
332
332
|
background-image: none !important;
|
|
333
333
|
filter: none !important;
|
|
334
334
|
mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
@@ -338,7 +338,7 @@ const WebChatContainerStateful = props => {
|
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
.ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
|
|
341
|
-
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
341
|
+
background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp18 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp18 === void 0 ? void 0 : (_webChatContainerProp19 = _webChatContainerProp18.sentMessageAnchorStyles) === null || _webChatContainerProp19 === void 0 ? void 0 : _webChatContainerProp19.color) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.color)} !important;
|
|
342
342
|
background-image: none !important;
|
|
343
343
|
filter: none !important;
|
|
344
344
|
mask: url("data:image/svg+xml,%3Csvg viewBox='3 3 18 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7.2501 4.50017H10.7495C11.1637 4.50017 11.4995 4.83596 11.4995 5.25017C11.4995 5.62986 11.2173 5.94366 10.8513 5.99332L10.7495 6.00017H7.24974C6.07079 5.99961 5.10349 6.90656 5.00786 8.06112L5.00028 8.22003L5.00312 16.7507C5.00343 17.9415 5.92885 18.9161 7.09966 18.9949L7.25371 19.0001L15.7518 18.9884C16.9415 18.9868 17.9145 18.062 17.9935 16.8923L17.9987 16.7384V13.2321C17.9987 12.8179 18.3345 12.4821 18.7487 12.4821C19.1284 12.4821 19.4422 12.7643 19.4918 13.1303L19.4987 13.2321V16.7384C19.4987 18.7407 17.9293 20.3769 15.9528 20.4829L15.7538 20.4884L7.25827 20.5001L7.05495 20.4949C5.14239 20.3954 3.60895 18.8627 3.50837 16.9502L3.50312 16.7511L3.50089 8.2527L3.50529 8.0502C3.60539 6.13749 5.13867 4.60449 7.05096 4.50527L7.2501 4.50017H10.7495H7.2501ZM13.7481 3.00146L20.3018 3.00197L20.4014 3.01575L20.5022 3.04393L20.559 3.06803C20.6122 3.09122 20.6634 3.12163 20.7111 3.15885L20.7804 3.22156L20.8641 3.32014L20.9183 3.41025L20.957 3.50057L20.9762 3.56476L20.9898 3.62862L20.9992 3.72282L20.9997 10.2554C20.9997 10.6696 20.6639 11.0054 20.2497 11.0054C19.87 11.0054 19.5562 10.7232 19.5065 10.3571L19.4997 10.2554L19.4989 5.56147L12.2797 12.7847C12.0134 13.051 11.5968 13.0753 11.3031 12.8575L11.219 12.7849C10.9527 12.5187 10.9284 12.1021 11.1462 11.8084L11.2188 11.7243L18.4369 4.50146H13.7481C13.3684 4.50146 13.0546 4.21931 13.005 3.85324L12.9981 3.75146C12.9981 3.37177 13.2803 3.05797 13.6464 3.00831L13.7481 3.00146Z' fill='currentColor' /%3E%3C/svg%3E") no-repeat center;
|
|
@@ -356,18 +356,18 @@ const WebChatContainerStateful = props => {
|
|
|
356
356
|
.ms_lcw_webchat_received_message a:visited,
|
|
357
357
|
.ms_lcw_webchat_received_message a:hover,
|
|
358
358
|
.ms_lcw_webchat_received_message a:active {
|
|
359
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
359
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp20 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp20 === void 0 ? void 0 : (_webChatContainerProp21 = _webChatContainerProp20.receivedMessageAnchorStyles) === null || _webChatContainerProp21 === void 0 ? void 0 : _webChatContainerProp21.color) ?? (_defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === null || _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles === void 0 ? void 0 : _defaultReceivedMessageAnchorStyles.defaultReceivedMessageAnchorStyles.color)};
|
|
360
360
|
}
|
|
361
361
|
.ms_lcw_webchat_sent_message a:link,
|
|
362
362
|
.ms_lcw_webchat_sent_message a:visited,
|
|
363
363
|
.ms_lcw_webchat_sent_message a:hover,
|
|
364
364
|
.ms_lcw_webchat_sent_message a:active {
|
|
365
|
-
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
365
|
+
color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp22 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp22 === void 0 ? void 0 : (_webChatContainerProp23 = _webChatContainerProp22.sentMessageAnchorStyles) === null || _webChatContainerProp23 === void 0 ? void 0 : _webChatContainerProp23.color) ?? (_defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === null || _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles === void 0 ? void 0 : _defaultSentMessageAnchorStyles.defaultSentMessageAnchorStyles.color)};
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// we had a nasty bug long time ago with crashing borders messing with the sendbox, so if customer adds this value, they need to deal with that
|
|
369
369
|
.webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
|
|
370
|
-
border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
370
|
+
border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp24 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp24 === void 0 ? void 0 : _webChatContainerProp24.bubbleBorderRadius) ?? 0} !important; /* Override border-radius */
|
|
371
371
|
}
|
|
372
372
|
|
|
373
373
|
.webchat__stacked-layout_container>div {
|
|
@@ -404,8 +404,8 @@ const WebChatContainerStateful = props => {
|
|
|
404
404
|
|
|
405
405
|
/* Suggested actions carousel previous/next navigation focus */
|
|
406
406
|
.webchat__suggested-actions .webchat__suggested-actions__carousel .react-film__flipper:focus-visible .react-film__flipper__body {
|
|
407
|
-
outline: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
408
|
-
outline-offset: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (
|
|
407
|
+
outline: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp25 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp25 === void 0 ? void 0 : _webChatContainerProp25.suggestedActionKeyboardFocusIndicatorBorderStyle) ?? "dashed"} ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp26 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp26 === void 0 ? void 0 : _webChatContainerProp26.suggestedActionKeyboardFocusIndicatorBorderWidth) ?? "1px"} ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp27 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp27 === void 0 ? void 0 : _webChatContainerProp27.suggestedActionKeyboardFocusIndicatorBorderColor) ?? "#605E5C"} !important;
|
|
408
|
+
outline-offset: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp28 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp28 === void 0 ? void 0 : _webChatContainerProp28.suggestedActionKeyboardFocusIndicatorInset) ?? "2px"} !important;
|
|
409
409
|
|
|
410
410
|
`), /*#__PURE__*/_react2.default.createElement(_react.Stack, {
|
|
411
411
|
styles: containerStyles,
|
|
@@ -416,9 +416,7 @@ const WebChatContainerStateful = props => {
|
|
|
416
416
|
height: "100%",
|
|
417
417
|
width: "100%"
|
|
418
418
|
}
|
|
419
|
-
}, shouldLoadPersistentHistoryMessages && /*#__PURE__*/_react2.default.createElement(_WebChatEventSubscribers.default, {
|
|
420
|
-
persistentChatHistoryEnabled: props === null || props === void 0 ? void 0 : (_props$persistentChat2 = props.persistentChatHistoryProps) === null || _props$persistentChat2 === void 0 ? void 0 : _props$persistentChat2.persistentChatHistoryEnabled
|
|
421
|
-
}), /*#__PURE__*/_react2.default.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/_react2.default.createElement(_CitationPaneStateful.default, {
|
|
419
|
+
}, shouldLoadPersistentHistoryMessages && /*#__PURE__*/_react2.default.createElement(_WebChatEventSubscribers.default, null), /*#__PURE__*/_react2.default.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/_react2.default.createElement(_CitationPaneStateful.default, {
|
|
422
420
|
id: ((_props$citationPanePr = props.citationPaneProps) === null || _props$citationPanePr === void 0 ? void 0 : _props$citationPanePr.id) || _Constants.HtmlAttributeNames.ocwCitationPaneClassName,
|
|
423
421
|
title: ((_props$citationPanePr2 = props.citationPaneProps) === null || _props$citationPanePr2 === void 0 ? void 0 : _props$citationPanePr2.title) || _Constants.HtmlAttributeNames.ocwCitationPaneTitle,
|
|
424
422
|
contentHtml: citationPaneText,
|
|
@@ -62,11 +62,17 @@ const convertPersistentChatHistoryMessageToActivity = message => {
|
|
|
62
62
|
}
|
|
63
63
|
if (tags) {
|
|
64
64
|
const formattedTags = additionalData.tags.split(",");
|
|
65
|
-
activity.channelData
|
|
65
|
+
activity.channelData = {
|
|
66
|
+
...activity.channelData,
|
|
67
|
+
tags: [...activity.channelData.tags, ...formattedTags]
|
|
68
|
+
};
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
if (from !== null && from !== void 0 && (_from$user = from.user) !== null && _from$user !== void 0 && _from$user.displayName) {
|
|
69
|
-
activity.from
|
|
72
|
+
activity.from = {
|
|
73
|
+
...activity.from,
|
|
74
|
+
name: from.user.displayName
|
|
75
|
+
};
|
|
70
76
|
}
|
|
71
77
|
if ((from === null || from === void 0 ? void 0 : (_from$application = from.application) === null || _from$application === void 0 ? void 0 : _from$application.displayName) === "Customer") {
|
|
72
78
|
activity.from = {
|
|
@@ -35,6 +35,7 @@ const defaultMiddlewareLocalizedTexts = {
|
|
|
35
35
|
MIDDLEWARE_BANNER_FILE_IS_MALICIOUS: "{0} has been blocked because the file may contain a malware.",
|
|
36
36
|
MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS: "Email will be sent after chat ends!",
|
|
37
37
|
MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_ERROR: "Email {0} could not be saved, try again later.",
|
|
38
|
-
PREVIOUS_MESSAGES_LOADING: "Loading previous messages..."
|
|
38
|
+
PREVIOUS_MESSAGES_LOADING: "Loading previous messages...",
|
|
39
|
+
CONVERSATION_DIVIDER_ARIA_LABEL: "Conversation history divider"
|
|
39
40
|
};
|
|
40
41
|
exports.defaultMiddlewareLocalizedTexts = defaultMiddlewareLocalizedTexts;
|
|
@@ -8,9 +8,8 @@ var _TelemetryConstants = require("../../../common/telemetry/TelemetryConstants"
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _ChatWidgetEvents = _interopRequireDefault(require("../../livechatwidget/common/ChatWidgetEvents"));
|
|
10
10
|
var _PersistentConversationHandler = _interopRequireDefault(require("../../livechatwidget/common/PersistentConversationHandler"));
|
|
11
|
-
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
12
|
-
var _dispatchCustomEvent = _interopRequireDefault(require("../../../common/utils/dispatchCustomEvent"));
|
|
13
11
|
var _SecureEventBus = _interopRequireDefault(require("../../../common/utils/SecureEventBus"));
|
|
12
|
+
var _TelemetryHelper = require("../../../common/telemetry/TelemetryHelper");
|
|
14
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
14
|
const usePersistentChatHistory = (facadeChatSDK, props) => {
|
|
16
15
|
const handlerRef = (0, _react.useRef)(null);
|
|
@@ -31,7 +30,6 @@ const usePersistentChatHistory = (facadeChatSDK, props) => {
|
|
|
31
30
|
try {
|
|
32
31
|
var _handlerRef$current;
|
|
33
32
|
await ((_handlerRef$current = handlerRef.current) === null || _handlerRef$current === void 0 ? void 0 : _handlerRef$current.pullHistory());
|
|
34
|
-
(0, _dispatchCustomEvent.default)(_ChatWidgetEvents.default.HIDE_LOADING_BANNER);
|
|
35
33
|
_TelemetryHelper.TelemetryHelper.logActionEventToAllTelemetry(_TelemetryConstants.LogLevel.INFO, {
|
|
36
34
|
Event: _TelemetryConstants.TelemetryEvent.LCWPersistentChatHistoryFetchCompleted,
|
|
37
35
|
Description: "Persistent chat history fetch completed successfully"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|