@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.
Files changed (83) hide show
  1. package/README.md +27 -0
  2. package/lib/cjs/common/Constants.js +2 -0
  3. package/lib/cjs/common/telemetry/AppInsightsEvents.js +11 -5
  4. package/lib/cjs/common/telemetry/TelemetryConstants.js +3 -0
  5. package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
  6. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +7 -7
  7. package/lib/cjs/common/utils.js +14 -1
  8. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +20 -1
  9. package/lib/cjs/components/errorboundary/ErrorBoundary.js +2 -1
  10. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  11. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
  12. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  13. package/lib/cjs/components/livechatwidget/common/endChat.js +26 -9
  14. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -2
  15. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +36 -4
  16. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  17. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +113 -26
  18. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +8 -6
  19. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +28 -30
  20. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
  21. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  22. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  23. package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  24. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  25. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
  26. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  27. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
  28. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -0
  29. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  30. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  31. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
  32. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
  33. package/lib/cjs/contexts/createReducer.js +15 -0
  34. package/lib/esm/common/Constants.js +2 -0
  35. package/lib/esm/common/telemetry/AppInsightsEvents.js +11 -5
  36. package/lib/esm/common/telemetry/TelemetryConstants.js +3 -0
  37. package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
  38. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +7 -7
  39. package/lib/esm/common/utils.js +11 -0
  40. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +20 -1
  41. package/lib/esm/components/errorboundary/ErrorBoundary.js +4 -2
  42. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  43. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
  44. package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  45. package/lib/esm/components/livechatwidget/common/endChat.js +26 -9
  46. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -2
  47. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +33 -2
  48. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  49. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +113 -26
  50. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +8 -6
  51. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +29 -34
  52. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
  53. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  54. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  55. package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  56. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  57. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
  58. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  59. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
  60. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +2 -0
  61. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -0
  62. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  63. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  64. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
  65. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
  66. package/lib/esm/contexts/createReducer.js +15 -0
  67. package/lib/types/common/Constants.d.ts +2 -0
  68. package/lib/types/common/telemetry/TelemetryConstants.d.ts +3 -0
  69. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
  70. package/lib/types/common/utils.d.ts +9 -1
  71. package/lib/types/components/errorboundary/ErrorBoundary.d.ts +1 -1
  72. package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +1 -1
  73. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +11 -0
  74. package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +5 -1
  75. package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
  76. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +1 -2
  77. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +1 -1
  78. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
  79. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
  80. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
  81. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +5 -0
  82. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
  83. package/package.json +2 -2
@@ -21,13 +21,10 @@ import { defaultSentMessageAnchorStyles } from "./webchatcontroller/middlewares/
21
21
  import { defaultSystemMessageBoxStyles } from "./webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultSystemMessageBoxStyles";
22
22
  import { defaultUserMessageBoxStyles } from "./webchatcontroller/middlewares/renderingmiddlewares/defaultStyles/defaultUserMessageBoxStyles";
23
23
  import { defaultWebChatContainerStatefulProps } from "./common/defaultProps/defaultWebChatContainerStatefulProps";
24
- import { isPersistentChatEnabled } from "../livechatwidget/common/liveChatConfigUtils";
24
+ import { shouldLoadPersistentChatHistory } from "../livechatwidget/common/liveChatConfigUtils";
25
25
  import { useChatContextStore } from "../..";
26
26
  import useFacadeSDKStore from "../../hooks/useFacadeChatSDKStore";
27
27
  import usePersistentChatHistory from "./hooks/usePersistentChatHistory";
28
-
29
- // Types for better type safety
30
-
31
28
  let uiTimer;
32
29
  const broadcastChannelMessageEvent = "message";
33
30
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -56,7 +53,7 @@ const createMagicCodeSuccessResponse = signin => {
56
53
  };
57
54
  };
58
55
  export const WebChatContainerStateful = props => {
59
- var _props$webChatContain, _defaultWebChatContai, _extendedChatConfig$L, _props$persistentChat, _extendedChatConfig$L2, _extendedChatConfig$L3, _webChatContainerProp, _webChatContainerProp2, _webChatContainerProp3, _webChatContainerProp4, _webChatContainerProp5, _webChatContainerProp6, _webChatContainerProp7, _webChatContainerProp8, _props$webChatContain6, _props$webChatContain7, _defaultWebChatContai2, _props$webChatContain8, _props$webChatContain9, _defaultWebChatContai3, _webChatContainerProp9, _webChatContainerProp10, _webChatContainerProp11, _webChatContainerProp12, _webChatContainerProp13, _webChatContainerProp14, _webChatContainerProp15, _webChatContainerProp16, _webChatContainerProp17, _webChatContainerProp18, _webChatContainerProp19, _webChatContainerProp20, _webChatContainerProp21, _webChatContainerProp22, _webChatContainerProp23, _props$webChatContain10, _props$webChatContain11, _webChatContainerProp24, _webChatContainerProp25, _webChatContainerProp26, _webChatContainerProp27, _props$persistentChat2, _props$citationPanePr, _props$citationPanePr2, _props$citationPanePr3, _props$citationPanePr4, _props$citationPanePr5;
56
+ 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;
60
57
  const [facadeChatSDK] = useFacadeSDKStore();
61
58
 
62
59
  // Create a font family that includes emoji support, based on the primary font or default
@@ -90,17 +87,13 @@ export const WebChatContainerStateful = props => {
90
87
 
91
88
  // Type the chatConfig properly to avoid 'any' usage
92
89
  const extendedChatConfig = props.chatConfig;
93
- const isHistoryEnabledInConfig = extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L = extendedChatConfig.LcwFcbConfiguration) === null || _extendedChatConfig$L === void 0 ? void 0 : _extendedChatConfig$L.lcwPersistentChatHistoryEnabled;
94
- const isHistoryEnabledViaProps = props === null || props === void 0 ? void 0 : (_props$persistentChat = props.persistentChatHistoryProps) === null || _props$persistentChat === void 0 ? void 0 : _props$persistentChat.persistentChatHistoryEnabled;
95
- const isPersistentChatEnabledForWidget = !!(extendedChatConfig !== null && extendedChatConfig !== void 0 && (_extendedChatConfig$L2 = extendedChatConfig.LiveChatConfigAuthSettings) !== null && _extendedChatConfig$L2 !== void 0 && _extendedChatConfig$L2.msdyn_javascriptclientfunction) || isPersistentChatEnabled(extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L3 = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L3 === void 0 ? void 0 : _extendedChatConfig$L3.msdyn_conversationmode);
96
90
 
97
- // Persistent chat history is enabled if explicitly set via props, or if enabled in config
98
- // Props take precedence over config settings
99
- const isPersistentHistoryEnabled = isHistoryEnabledViaProps || isHistoryEnabledInConfig;
100
-
101
- // Check if both persistent chat and widget support are enabled
102
- const shouldLoadPersistentHistoryMessages = isPersistentHistoryEnabled && isPersistentChatEnabledForWidget;
91
+ // Determine if persistent chat history should be loaded based on all conditions
92
+ const shouldLoadPersistentHistoryMessages = shouldLoadPersistentChatHistory(extendedChatConfig);
103
93
  if (shouldLoadPersistentHistoryMessages) {
94
+ TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
95
+ Event: TelemetryEvent.PersistentChatHistoryEnabled
96
+ });
104
97
  usePersistentChatHistory(facadeChatSDK, (props === null || props === void 0 ? void 0 : props.persistentChatHistoryProps) ?? {});
105
98
  }
106
99
  // Delegated click handler for citation anchors. Placed after state is
@@ -265,24 +258,28 @@ export const WebChatContainerStateful = props => {
265
258
  background: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp === void 0 ? void 0 : _webChatContainerProp.background) ?? defaultAdaptiveCardStyles.background};
266
259
  }
267
260
 
268
- .webchat__bubble__content>div#ms_lcw_webchat_adaptive_card .ac-textBlock {
269
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp2 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp2 === void 0 ? void 0 : _webChatContainerProp2.color) ?? defaultAdaptiveCardStyles.color};
261
+ .webchat__bubble__content>div#ms_lcw_webchat_adaptive_card .ac-textBlock[role=heading] {
262
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp2 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp2 === void 0 ? void 0 : _webChatContainerProp2.color) ?? defaultAdaptiveCardStyles.color} !important;
263
+ }
264
+
265
+ .webchat__bubble__content>div#ms_lcw_webchat_adaptive_card label .ac-textRun:first-child {
266
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp3 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp3 === void 0 ? void 0 : _webChatContainerProp3.color) ?? defaultAdaptiveCardStyles.color} !important;
270
267
  }
271
268
 
272
269
  .webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__bubble--from-user {
273
- max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp3 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp3 === void 0 ? void 0 : (_webChatContainerProp4 = _webChatContainerProp3.userMessageBoxStyles) === null || _webChatContainerProp4 === void 0 ? void 0 : _webChatContainerProp4.maxWidth) ?? (defaultUserMessageBoxStyles === null || defaultUserMessageBoxStyles === void 0 ? void 0 : defaultUserMessageBoxStyles.maxWidth)}
270
+ 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 === null || defaultUserMessageBoxStyles === void 0 ? void 0 : defaultUserMessageBoxStyles.maxWidth)}
274
271
  }
275
272
 
276
273
  .webchat__stacked-layout--show-avatar div.webchat__stacked-layout__content div.webchat__stacked-layout__message-row div.webchat__stacked-layout__message {
277
- max-width: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp5 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp5 === void 0 ? void 0 : (_webChatContainerProp6 = _webChatContainerProp5.systemMessageBoxStyles) === null || _webChatContainerProp6 === void 0 ? void 0 : _webChatContainerProp6.maxWidth) ?? (defaultSystemMessageBoxStyles === null || defaultSystemMessageBoxStyles === void 0 ? void 0 : defaultSystemMessageBoxStyles.maxWidth)}
274
+ 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 === null || defaultSystemMessageBoxStyles === void 0 ? void 0 : defaultSystemMessageBoxStyles.maxWidth)}
278
275
  }
279
276
 
280
277
  div[class="ac-textBlock"] *,
281
- div[class="ac-input-container"] * {white-space:${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp7 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp7 === void 0 ? void 0 : _webChatContainerProp7.textWhiteSpace) ?? defaultAdaptiveCardStyles.textWhiteSpace}}
278
+ 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.textWhiteSpace}}
282
279
 
283
280
  div[class="ac-input-container"] input.ac-multichoiceInput,
284
281
  div[class="ac-input-container"] select.ac-multichoiceInput {
285
- ${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp8 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp8 !== void 0 && _webChatContainerProp8.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
282
+ ${webChatContainerProps !== null && webChatContainerProps !== void 0 && (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) !== null && _webChatContainerProp9 !== void 0 && _webChatContainerProp9.choiceInputPadding ? `padding: ${webChatContainerProps.adaptiveCardStyles.choiceInputPadding} !important;` : ""}
286
283
  }
287
284
 
288
285
  .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 {
@@ -294,15 +291,15 @@ export const WebChatContainerStateful = props => {
294
291
  div[class="ac-textBlock"] a:visited,
295
292
  div[class="ac-textBlock"] a:hover,
296
293
  div[class="ac-textBlock"] a:active {
297
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp9 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp9 === void 0 ? void 0 : _webChatContainerProp9.anchorColor) ?? defaultAdaptiveCardStyles.anchorColor};
294
+ color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp10 === void 0 ? void 0 : _webChatContainerProp10.anchorColor) ?? defaultAdaptiveCardStyles.anchorColor};
298
295
  }
299
296
 
300
- .webchat__stacked-layout__content .ac-actionSet > .ac-pushButton > div {white-space: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp10 = webChatContainerProps.adaptiveCardStyles) === null || _webChatContainerProp10 === void 0 ? void 0 : _webChatContainerProp10.buttonWhiteSpace) ?? defaultAdaptiveCardStyles.buttonWhiteSpace} !important;}
297
+ .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.buttonWhiteSpace} !important;}
301
298
 
302
299
  .ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
303
300
  /* Fallback for browsers that don't support mask */
304
301
  background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
305
- filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp11 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp11 === void 0 ? void 0 : (_webChatContainerProp12 = _webChatContainerProp11.receivedMessageAnchorStyles) === null || _webChatContainerProp12 === void 0 ? void 0 : _webChatContainerProp12.filter) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.filter)};
302
+ 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 === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.filter)};
306
303
  height: .75em;
307
304
  width: .75em;
308
305
  margin-left: .25em;
@@ -312,7 +309,7 @@ export const WebChatContainerStateful = props => {
312
309
  .ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
313
310
  /* Fallback for browsers that don't support mask */
314
311
  background-image: url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4IDEzLjEzMDNMMTkuNDk4NyAxMy4yMzIxVjE2LjczODRDMTkuNDk4NyAxOC43NDA3IDE3LjkyOTMgMjAuMzc2OSAxNS45NTI4IDIwLjQ4MjlMMTUuNzUzOCAyMC40ODg0TDcuMjU4MjcgMjAuNTAwMUw3LjA1NDk1IDIwLjQ5NDlDNS4xNDIzOSAyMC4zOTU0IDMuNjA4OTUgMTguODYyNyAzLjUwODM3IDE2Ljk1MDJMMy41MDMxMiAxNi43NTExTDMuNTAwODkgOC4yNTI3TDMuNTA1MjkgOC4wNTAyQzMuNjA1MzkgNi4xMzc0OSA1LjEzODY3IDQuNjA0NDkgNy4wNTA5NiA0LjUwNTI3TDcuMjUwMSA0LjUwMDE3SDEwLjc0OTVINy4yNTAxWk0xMy43NDgxIDMuMDAxNDZMMjAuMzAxOCAzLjAwMTk3TDIwLjQwMTQgMy4wMTU3NUwyMC41MDIyIDMuMDQzOTNMMjAuNTU5IDMuMDY4MDNDMjAuNjEyMiAzLjA5MTIyIDIwLjY2MzQgMy4xMjE2MyAyMC43MTExIDMuMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjRkZGRkZGIiAvPjwvc3ZnPg==);
315
- filter: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp13 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp13 === void 0 ? void 0 : (_webChatContainerProp14 = _webChatContainerProp13.sentMessageAnchorStyles) === null || _webChatContainerProp14 === void 0 ? void 0 : _webChatContainerProp14.filter) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.filter)};
312
+ 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 === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.filter)};
316
313
  height: .75em;
317
314
  width: .75em;
318
315
  margin-left: .25em;
@@ -322,7 +319,7 @@ export const WebChatContainerStateful = props => {
322
319
  /* Modern browsers with mask support */
323
320
  @supports (mask: url()) or (-webkit-mask: url()) {
324
321
  .ms_lcw_webchat_received_message img.webchat__render-markdown__external-link-icon {
325
- background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp15 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp15 === void 0 ? void 0 : (_webChatContainerProp16 = _webChatContainerProp15.receivedMessageAnchorStyles) === null || _webChatContainerProp16 === void 0 ? void 0 : _webChatContainerProp16.color) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)} !important;
322
+ 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 === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)} !important;
326
323
  background-image: none !important;
327
324
  filter: none !important;
328
325
  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;
@@ -332,7 +329,7 @@ export const WebChatContainerStateful = props => {
332
329
  }
333
330
 
334
331
  .ms_lcw_webchat_sent_message img.webchat__render-markdown__external-link-icon {
335
- background-color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp17 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp17 === void 0 ? void 0 : (_webChatContainerProp18 = _webChatContainerProp17.sentMessageAnchorStyles) === null || _webChatContainerProp18 === void 0 ? void 0 : _webChatContainerProp18.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)} !important;
332
+ 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 === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)} !important;
336
333
  background-image: none !important;
337
334
  filter: none !important;
338
335
  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;
@@ -350,18 +347,18 @@ export const WebChatContainerStateful = props => {
350
347
  .ms_lcw_webchat_received_message a:visited,
351
348
  .ms_lcw_webchat_received_message a:hover,
352
349
  .ms_lcw_webchat_received_message a:active {
353
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp19 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp19 === void 0 ? void 0 : (_webChatContainerProp20 = _webChatContainerProp19.receivedMessageAnchorStyles) === null || _webChatContainerProp20 === void 0 ? void 0 : _webChatContainerProp20.color) ?? (defaultReceivedMessageAnchorStyles === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)};
350
+ 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 === null || defaultReceivedMessageAnchorStyles === void 0 ? void 0 : defaultReceivedMessageAnchorStyles.color)};
354
351
  }
355
352
  .ms_lcw_webchat_sent_message a:link,
356
353
  .ms_lcw_webchat_sent_message a:visited,
357
354
  .ms_lcw_webchat_sent_message a:hover,
358
355
  .ms_lcw_webchat_sent_message a:active {
359
- color: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp21 = webChatContainerProps.renderingMiddlewareProps) === null || _webChatContainerProp21 === void 0 ? void 0 : (_webChatContainerProp22 = _webChatContainerProp21.sentMessageAnchorStyles) === null || _webChatContainerProp22 === void 0 ? void 0 : _webChatContainerProp22.color) ?? (defaultSentMessageAnchorStyles === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
356
+ 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 === null || defaultSentMessageAnchorStyles === void 0 ? void 0 : defaultSentMessageAnchorStyles.color)};
360
357
  }
361
358
 
362
359
  // 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
363
360
  .webchat__bubble:not(.webchat__bubble--from-user) .webchat__bubble__content {
364
- border-radius: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp23 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp23 === void 0 ? void 0 : _webChatContainerProp23.bubbleBorderRadius) ?? 0} !important; /* Override border-radius */
361
+ 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 */
365
362
  }
366
363
 
367
364
  .webchat__stacked-layout_container>div {
@@ -398,8 +395,8 @@ export const WebChatContainerStateful = props => {
398
395
 
399
396
  /* Suggested actions carousel previous/next navigation focus */
400
397
  .webchat__suggested-actions .webchat__suggested-actions__carousel .react-film__flipper:focus-visible .react-film__flipper__body {
401
- outline: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp24 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp24 === void 0 ? void 0 : _webChatContainerProp24.suggestedActionKeyboardFocusIndicatorBorderStyle) ?? "dashed"} ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp25 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp25 === void 0 ? void 0 : _webChatContainerProp25.suggestedActionKeyboardFocusIndicatorBorderWidth) ?? "1px"} ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp26 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp26 === void 0 ? void 0 : _webChatContainerProp26.suggestedActionKeyboardFocusIndicatorBorderColor) ?? "#605E5C"} !important;
402
- outline-offset: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp27 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp27 === void 0 ? void 0 : _webChatContainerProp27.suggestedActionKeyboardFocusIndicatorInset) ?? "2px"} !important;
398
+ 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;
399
+ outline-offset: ${(webChatContainerProps === null || webChatContainerProps === void 0 ? void 0 : (_webChatContainerProp28 = webChatContainerProps.webChatStyles) === null || _webChatContainerProp28 === void 0 ? void 0 : _webChatContainerProp28.suggestedActionKeyboardFocusIndicatorInset) ?? "2px"} !important;
403
400
 
404
401
  `), /*#__PURE__*/React.createElement(Stack, {
405
402
  styles: containerStyles,
@@ -410,9 +407,7 @@ export const WebChatContainerStateful = props => {
410
407
  height: "100%",
411
408
  width: "100%"
412
409
  }
413
- }, shouldLoadPersistentHistoryMessages && /*#__PURE__*/React.createElement(WebChatEventSubscribers, {
414
- persistentChatHistoryEnabled: props === null || props === void 0 ? void 0 : (_props$persistentChat2 = props.persistentChatHistoryProps) === null || _props$persistentChat2 === void 0 ? void 0 : _props$persistentChat2.persistentChatHistoryEnabled
415
- }), /*#__PURE__*/React.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/React.createElement(CitationPaneStateful, {
410
+ }, shouldLoadPersistentHistoryMessages && /*#__PURE__*/React.createElement(WebChatEventSubscribers, null), /*#__PURE__*/React.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/React.createElement(CitationPaneStateful, {
416
411
  id: ((_props$citationPanePr = props.citationPaneProps) === null || _props$citationPanePr === void 0 ? void 0 : _props$citationPanePr.id) || HtmlAttributeNames.ocwCitationPaneClassName,
417
412
  title: ((_props$citationPanePr2 = props.citationPaneProps) === null || _props$citationPanePr2 === void 0 ? void 0 : _props$citationPanePr2.title) || HtmlAttributeNames.ocwCitationPaneTitle,
418
413
  contentHtml: citationPaneText,
@@ -56,11 +56,17 @@ const convertPersistentChatHistoryMessageToActivity = message => {
56
56
  }
57
57
  if (tags) {
58
58
  const formattedTags = additionalData.tags.split(",");
59
- activity.channelData.tags = [...activity.channelData.tags, ...formattedTags];
59
+ activity.channelData = {
60
+ ...activity.channelData,
61
+ tags: [...activity.channelData.tags, ...formattedTags]
62
+ };
60
63
  }
61
64
  }
62
65
  if (from !== null && from !== void 0 && (_from$user = from.user) !== null && _from$user !== void 0 && _from$user.displayName) {
63
- activity.from.name = from.user.displayName;
66
+ activity.from = {
67
+ ...activity.from,
68
+ name: from.user.displayName
69
+ };
64
70
  }
65
71
  if ((from === null || from === void 0 ? void 0 : (_from$application = from.application) === null || _from$application === void 0 ? void 0 : _from$application.displayName) === "Customer") {
66
72
  activity.from = {
@@ -29,5 +29,6 @@ export const defaultMiddlewareLocalizedTexts = {
29
29
  MIDDLEWARE_BANNER_FILE_IS_MALICIOUS: "{0} has been blocked because the file may contain a malware.",
30
30
  MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_SUCCESS: "Email will be sent after chat ends!",
31
31
  MIDDLEWARE_BANNER_FILE_EMAIL_ADDRESS_RECORDED_ERROR: "Email {0} could not be saved, try again later.",
32
- PREVIOUS_MESSAGES_LOADING: "Loading previous messages..."
32
+ PREVIOUS_MESSAGES_LOADING: "Loading previous messages...",
33
+ CONVERSATION_DIVIDER_ARIA_LABEL: "Conversation history divider"
33
34
  };
@@ -2,9 +2,8 @@ import { LogLevel, TelemetryEvent } from "../../../common/telemetry/TelemetryCon
2
2
  import { useEffect, useRef } from "react";
3
3
  import ChatWidgetEvents from "../../livechatwidget/common/ChatWidgetEvents";
4
4
  import PersistentConversationHandler from "../../livechatwidget/common/PersistentConversationHandler";
5
- import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
6
- import dispatchCustomEvent from "../../../common/utils/dispatchCustomEvent";
7
5
  import SecureEventBus from "../../../common/utils/SecureEventBus";
6
+ import { TelemetryHelper } from "../../../common/telemetry/TelemetryHelper";
8
7
  const usePersistentChatHistory = (facadeChatSDK, props) => {
9
8
  const handlerRef = useRef(null);
10
9
  useEffect(() => {
@@ -24,7 +23,6 @@ const usePersistentChatHistory = (facadeChatSDK, props) => {
24
23
  try {
25
24
  var _handlerRef$current;
26
25
  await ((_handlerRef$current = handlerRef.current) === null || _handlerRef$current === void 0 ? void 0 : _handlerRef$current.pullHistory());
27
- dispatchCustomEvent(ChatWidgetEvents.HIDE_LOADING_BANNER);
28
26
  TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
29
27
  Event: TelemetryEvent.LCWPersistentChatHistoryFetchCompleted,
30
28
  Description: "Persistent chat history fetch completed successfully"
@@ -11,14 +11,13 @@ import dispatchCustomEvent from "../../../common/utils/dispatchCustomEvent";
11
11
  * Component to handle persistent chat history events.
12
12
  * Uses WebChatStoreLoader instead of hooks to avoid context issues.
13
13
  */
14
- const WebChatEventSubscribers = props => {
14
+ const WebChatEventSubscribers = () => {
15
15
  const [isConnected, setIsConnected] = useState(false);
16
16
  const [storeReady, setStoreReady] = useState(false);
17
17
  const storeWaitTimer = createTimer();
18
+ // Type the chatConfig properly to avoid 'any' usage
19
+
18
20
  useEffect(() => {
19
- if (!props.persistentChatHistoryEnabled) {
20
- return;
21
- }
22
21
  TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
23
22
  Event: TelemetryEvent.LCWWebChatStorePollingStarted,
24
23
  Description: "WebChat store polling started"
@@ -50,9 +49,9 @@ const WebChatEventSubscribers = props => {
50
49
  clearInterval(storeCheckInterval);
51
50
  };
52
51
  }
53
- }, [props.persistentChatHistoryEnabled]);
52
+ }, []);
54
53
  useEffect(() => {
55
- if (!props.persistentChatHistoryEnabled || !storeReady) {
54
+ if (!storeReady) {
56
55
  return;
57
56
  }
58
57
  const checkConnectionStatus = () => {
@@ -109,7 +108,7 @@ const WebChatEventSubscribers = props => {
109
108
  return () => {
110
109
  clearInterval(interval);
111
110
  };
112
- }, [isConnected, props.persistentChatHistoryEnabled, storeReady]);
111
+ }, [isConnected, storeReady]);
113
112
  return null;
114
113
  };
115
114
  export default WebChatEventSubscribers;
@@ -1,10 +1,39 @@
1
1
  import React from "react";
2
+ import { defaultMiddlewareLocalizedTexts } from "../../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
2
3
  import { defaultPersistentChatHistoryProps } from "../../../../../livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps";
3
4
  import { mergeStyles } from "@fluentui/react";
4
5
  const ConversationDividerActivity = props => {
5
6
  const styleApplied = mergeStyles(defaultPersistentChatHistoryProps.dividerActivityStyle, props.dividerActivityStyle);
7
+ const ariaLabel = props.dividerActivityAriaLabel || defaultMiddlewareLocalizedTexts.CONVERSATION_DIVIDER_ARIA_LABEL;
8
+
9
+ // Create a simple separator that screen readers can detect without being interactive
10
+ // Preserve the visual divider styling while making it accessible
11
+ // Use a ref to programmatically remove only the "EL said:" prefix from the label
12
+ const dividerRef = React.useRef(null);
13
+ React.useEffect(() => {
14
+ if (dividerRef.current) {
15
+ // Find and hardcode the text in the label div to just show the divider label
16
+ const article = dividerRef.current.closest(".webchat__basic-transcript__activity");
17
+ if (article) {
18
+ const labelDiv = article.querySelector("div[id*=\"webchat__basic-transcript__active-descendant-label--\"]");
19
+ if (labelDiv) {
20
+ // Hardcode the text to just the aria label
21
+ labelDiv.textContent = ariaLabel || "";
22
+ }
23
+ }
24
+ }
25
+ }, [ariaLabel]);
6
26
  return /*#__PURE__*/React.createElement("div", {
7
- className: styleApplied
27
+ ref: dividerRef,
28
+ role: "separator",
29
+ "aria-label": ariaLabel,
30
+ "aria-hidden": false,
31
+ className: styleApplied,
32
+ "data-accessibility-divider": "true",
33
+ style: {
34
+ // Add accessibility enhancements
35
+ position: "relative"
36
+ }
8
37
  });
9
38
  };
10
39
  export default ConversationDividerActivity;
@@ -85,7 +85,7 @@ let LazyLoadHandler = /*#__PURE__*/function () {
85
85
 
86
86
  // Scroll operation state
87
87
  // Current scroll operation tracking
88
- // Prevents concurrent scroll operations
88
+ // Prevents concurrent scroll operations (public for event handlers)
89
89
 
90
90
  // Timeout and queue management
91
91
  // Tracks all setTimeout IDs for cleanup
@@ -956,6 +956,21 @@ const LazyLoadActivity = props => {
956
956
  setHasMoreHistory(false);
957
957
  };
958
958
 
959
+ // Event listener for HISTORY_LOAD_ERROR - hides banner temporarily without disabling future loads
960
+ const handleHistoryLoadError = () => {
961
+ // Temporarily hide the banner by pausing, but keep hasMoreHistory true to allow retry
962
+ LazyLoadHandler.paused = true;
963
+ LazyLoadHandler.pendingScrollAction = false;
964
+
965
+ // Re-enable after a delay to allow retry on next scroll
966
+ // Note: This timeout is intentionally not tracked as it's scoped to the component lifecycle
967
+ window.setTimeout(() => {
968
+ LazyLoadHandler.paused = false;
969
+ }, 2000); // 2 second delay before allowing retry
970
+
971
+ LazyLoadHandler.logLifecycleEvent(TelemetryEvent.LCWLazyLoadHistoryError, "History load error - will retry on next scroll");
972
+ };
973
+
959
974
  // Event listener for PersistentConversationReset to sync React state
960
975
  // This fixes the issue where banner doesn't appear in start chat + close chat + start chat sequence
961
976
  // by ensuring React state (hasMoreHistory) is synchronized with handler state when reset occurs
@@ -968,6 +983,9 @@ const LazyLoadActivity = props => {
968
983
  const eventBus = SecureEventBus.getInstance();
969
984
  const unsubscribeNoMoreHistory = eventBus.subscribe(ChatWidgetEvents.NO_MORE_HISTORY_AVAILABLE, handleNoMoreHistory);
970
985
 
986
+ // Add event listener for history load errors
987
+ const unsubscribeHistoryError = eventBus.subscribe(ChatWidgetEvents.HISTORY_LOAD_ERROR, handleHistoryLoadError);
988
+
971
989
  // Add event listener for persistent conversation reset
972
990
  const resetSubscription = BroadcastService.getMessageByEventName(BroadcastEvent.PersistentConversationReset).subscribe(handlePersistentConversationReset);
973
991
 
@@ -984,6 +1002,7 @@ const LazyLoadActivity = props => {
984
1002
  // Still need to return cleanup function even after reset
985
1003
  return () => {
986
1004
  unsubscribeNoMoreHistory();
1005
+ unsubscribeHistoryError();
987
1006
  resetSubscription.unsubscribe();
988
1007
  };
989
1008
  }
@@ -1036,6 +1055,7 @@ const LazyLoadActivity = props => {
1036
1055
 
1037
1056
  // Remove event listeners
1038
1057
  unsubscribeNoMoreHistory();
1058
+ unsubscribeHistoryError();
1039
1059
  resetSubscription.unsubscribe();
1040
1060
  if (container) {
1041
1061
  container.removeEventListener("scroll", handleScroll);
@@ -17,6 +17,7 @@ import { DirectLineActivityType } from "../../enums/DirectLineActivityType";
17
17
  import { DirectLineSenderRole } from "../../enums/DirectLineSenderRole";
18
18
  import React from "react";
19
19
  import { TelemetryHelper } from "../../../../../common/telemetry/TelemetryHelper";
20
+ import { defaultMiddlewareLocalizedTexts } from "../../../common/defaultProps/defaultMiddlewareLocalizedTexts";
20
21
  import { defaultSystemMessageStyles } from "./defaultStyles/defaultSystemMessageStyles";
21
22
  import { defaultUserMessageStyles } from "./defaultStyles/defaultUserMessageStyles";
22
23
  import { escapeHtml } from "../../../../../common/utils";
@@ -70,7 +71,7 @@ const isDataTagsPresent = card => {
70
71
  };
71
72
 
72
73
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
- export const createActivityMiddleware = (renderMarkdown, systemMessageStyleProps, userMessageStyleProps) => () => next => function () {
74
+ export const createActivityMiddleware = (renderMarkdown, systemMessageStyleProps, userMessageStyleProps, localizedTexts) => () => next => function () {
74
75
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
75
76
  args[_key] = arguments[_key];
76
77
  }
@@ -121,7 +122,11 @@ export const createActivityMiddleware = (renderMarkdown, systemMessageStyleProps
121
122
  };
122
123
  }
123
124
  if (isTagIncluded(card, Constants.conversationDividerTag)) {
124
- return /*#__PURE__*/React.createElement(ConversationDividerActivity, null);
125
+ const conversationDividerLabel = (localizedTexts === null || localizedTexts === void 0 ? void 0 : localizedTexts.CONVERSATION_DIVIDER_ARIA_LABEL) || defaultMiddlewareLocalizedTexts.CONVERSATION_DIVIDER_ARIA_LABEL;
126
+ // Pass the computed localized text to the divider component
127
+ return /*#__PURE__*/React.createElement(ConversationDividerActivity, {
128
+ dividerActivityAriaLabel: conversationDividerLabel
129
+ });
125
130
  }
126
131
  if (card.activity.text && card.activity.type === DirectLineActivityType.Message) {
127
132
  if (!card.activity.channelData.isHtmlEncoded && card.activity.channelId === Constants.webchatChannelId) {
@@ -1,3 +1,5 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+
1
3
  import React, { useCallback, useEffect, useRef } from "react";
2
4
  import { KeyCodes } from "../../../../../../common/KeyCodes";
3
5
  import { Stack } from "@fluentui/react";
@@ -7,6 +7,7 @@
7
7
  import { Constants } from "../../../../../common/Constants";
8
8
  import { DeliveryMode } from "@microsoft/omnichannel-chat-sdk";
9
9
  import { WebChatActionType } from "../../enums/WebChatActionType";
10
+
10
11
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unused-vars
11
12
  const channelDataMiddleware = addConversationalSurveyTagsCallback => _ref => {
12
13
  let {
@@ -27,7 +27,12 @@ export const createCitationsMiddleware = (state, dispatch) => () => next => acti
27
27
  const citations = (_gptFeedback$summariz = gptFeedback.summarizationOpenAIResponse) === null || _gptFeedback$summariz === void 0 ? void 0 : (_gptFeedback$summariz2 = _gptFeedback$summariz.result) === null || _gptFeedback$summariz2 === void 0 ? void 0 : _gptFeedback$summariz2.textCitations;
28
28
  // Rewrite inline citation labels in activity.text to match the global map keys
29
29
  const updatedText = replaceCitations(action.payload.activity.text, citations, messagePrefix);
30
- action.payload.activity.text = updatedText;
30
+
31
+ // Create new activity object to avoid mutation
32
+ action.payload.activity = {
33
+ ...action.payload.activity,
34
+ text: updatedText
35
+ };
31
36
  // Build a global citation map keyed by the prefixed citation id and
32
37
  // dispatch it to app state so the UI container can render citations.
33
38
  try {
@@ -1,15 +1,23 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
 
3
+ import { BroadcastService } from "@microsoft/omnichannel-chat-components";
3
4
  import { Constants } from "../../../../../common/Constants";
4
- import { getIconText } from "../../../../../common/utils";
5
- import { defaultWebChatStyles } from "../../../common/defaultStyles/defaultWebChatStyles";
6
5
  import { WebChatActionType } from "../../enums/WebChatActionType";
6
+ import { defaultWebChatStyles } from "../../../common/defaultStyles/defaultWebChatStyles";
7
+ import { getIconText } from "../../../../../common/utils";
7
8
  let currentAgentInitials = defaultWebChatStyles.botAvatarInitials;
8
- export const localizedStringsBotInitialsMiddleware = () => _ref => {
9
+
10
+ // Optional external updater (React context dispatch wrapper) set at runtime
11
+ let externalInitialsUpdater;
12
+ export const localizedStringsBotInitialsMiddleware = onInitialsChange => _ref => {
9
13
  let {
10
14
  dispatch
11
15
  } = _ref;
12
16
  return next => action => {
17
+ if (onInitialsChange && !externalInitialsUpdater) {
18
+ externalInitialsUpdater = onInitialsChange; // capture once
19
+ }
20
+
13
21
  if (action.type === WebChatActionType.DIRECT_LINE_INCOMING_ACTIVITY) {
14
22
  var _action$payload, _activity$from;
15
23
  const activity = (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.activity;
@@ -17,10 +25,25 @@ export const localizedStringsBotInitialsMiddleware = () => _ref => {
17
25
  var _activity$channelData, _activity$channelData2, _activity$tags;
18
26
  const agentName = activity.from.name.trim();
19
27
  const isSystemMessage = agentName === "__agent__" || agentName.startsWith("__") || ((_activity$channelData = activity.channelData) === null || _activity$channelData === void 0 ? void 0 : (_activity$channelData2 = _activity$channelData.tags) === null || _activity$channelData2 === void 0 ? void 0 : _activity$channelData2.includes(Constants.systemMessageTag)) || ((_activity$tags = activity.tags) === null || _activity$tags === void 0 ? void 0 : _activity$tags.includes(Constants.systemMessageTag));
20
- if (!isSystemMessage && agentName !== "") {
21
- // Update initials for valid agent/bot names
28
+ if (!isSystemMessage && agentName) {
22
29
  const newInitials = getIconText(agentName) || currentAgentInitials;
23
- currentAgentInitials = newInitials;
30
+ if (newInitials !== currentAgentInitials) {
31
+ var _externalInitialsUpda;
32
+ currentAgentInitials = newInitials;
33
+ // Notify external React context if provided
34
+ (_externalInitialsUpda = externalInitialsUpdater) === null || _externalInitialsUpda === void 0 ? void 0 : _externalInitialsUpda(currentAgentInitials || "");
35
+ // Broadcast (optional) for multi-tab sync without forcing consumers
36
+ BroadcastService.postMessage({
37
+ eventName: "BotAvatarInitialsUpdated",
38
+ payload: {
39
+ initials: currentAgentInitials
40
+ }
41
+ });
42
+ // Also dispatch a no-op action into WebChat store to encourage re-render (cheap)
43
+ dispatch({
44
+ type: "__BOT_INITIALS_UPDATED__"
45
+ });
46
+ }
24
47
  }
25
48
  }
26
49
  }
@@ -33,7 +56,6 @@ export const getOverriddenLocalizedStrings = existingOverrides => {
33
56
  ...strings,
34
57
  ...existingOverrides
35
58
  };
36
-
37
59
  // Apply dynamic bot initials to alt text if not already overridden through props
38
60
  if (!(existingOverrides !== null && existingOverrides !== void 0 && existingOverrides.ACTIVITY_BOT_SAID_ALT)) {
39
61
  result.ACTIVITY_BOT_SAID_ALT = `${currentAgentInitials} said:`;
@@ -49,4 +49,5 @@ export let LiveChatWidgetActionType;
49
49
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_ENABLED"] = 46] = "SET_CONVERSATIONAL_SURVEY_ENABLED";
50
50
  LiveChatWidgetActionType[LiveChatWidgetActionType["SET_CONVERSATIONAL_SURVEY_DISPLAY"] = 47] = "SET_CONVERSATIONAL_SURVEY_DISPLAY";
51
51
  LiveChatWidgetActionType[LiveChatWidgetActionType["GET_IN_MEMORY_STATE"] = 48] = "GET_IN_MEMORY_STATE";
52
+ LiveChatWidgetActionType[LiveChatWidgetActionType["SET_BOT_AVATAR_INITIALS"] = 49] = "SET_BOT_AVATAR_INITIALS";
52
53
  })(LiveChatWidgetActionType || (LiveChatWidgetActionType = {}));
@@ -4,6 +4,7 @@ import { ConversationState } from "./ConversationState";
4
4
  import { StartChatFailureType } from "./StartChatFailureType";
5
5
  import { defaultClientDataStoreProvider } from "../../common/storage/default/defaultClientDataStoreProvider";
6
6
  import { defaultMiddlewareLocalizedTexts } from "../../components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts";
7
+ import { defaultWebChatStyles } from "../../components/webchatcontainerstateful/common/defaultStyles/defaultWebChatStyles";
7
8
  export const getLiveChatWidgetContextInitialState = props => {
8
9
  var _props$controlProps, _props$webChatContain;
9
10
  const isOutsideOperatingHours = () => {
@@ -33,6 +34,10 @@ export const getLiveChatWidgetContextInitialState = props => {
33
34
  initialStateFromCache.domainStates.liveChatConfig = props.chatConfig;
34
35
  // Cache the result of isOutsideOperatingHours() to ensure consistency
35
36
  initialStateFromCache.appStates.outsideOperatingHours = outsideOperatingHours;
37
+ // Backward compatibility: if botAvatarInitials not cached (older sessions), seed with default
38
+ if (!initialStateFromCache.domainStates.botAvatarInitials) {
39
+ initialStateFromCache.domainStates.botAvatarInitials = defaultWebChatStyles.botAvatarInitials;
40
+ }
36
41
  return initialStateFromCache;
37
42
  }
38
43
  const LiveChatWidgetContextInitialState = {
@@ -56,7 +61,8 @@ export const getLiveChatWidgetContextInitialState = props => {
56
61
  transcriptRequestId: "",
57
62
  confirmationPaneConfirmedOptionClicked: false,
58
63
  confirmationState: ConfirmationState.NotSet,
59
- startChatFailureType: StartChatFailureType.Generic
64
+ startChatFailureType: StartChatFailureType.Generic,
65
+ botAvatarInitials: defaultWebChatStyles.botAvatarInitials
60
66
  },
61
67
  appStates: {
62
68
  conversationState: ConversationState.Closed,
@@ -554,6 +554,21 @@ const reducer = (state, action) => {
554
554
  widgetSize: action.payload
555
555
  }
556
556
  };
557
+ case LiveChatWidgetActionType.SET_BOT_AVATAR_INITIALS:
558
+ inMemory = {
559
+ ...inMemory,
560
+ domainStates: {
561
+ ...inMemory.domainStates,
562
+ botAvatarInitials: action.payload
563
+ }
564
+ };
565
+ return {
566
+ ...state,
567
+ domainStates: {
568
+ ...state.domainStates,
569
+ botAvatarInitials: action.payload
570
+ }
571
+ };
557
572
  case LiveChatWidgetActionType.SET_WIDGET_INSTANCE_ID:
558
573
  inMemory = {
559
574
  ...inMemory,
@@ -107,6 +107,7 @@ export declare class Constants {
107
107
  static readonly customEventValue = "customEventValue";
108
108
  static readonly Hidden = "Hidden";
109
109
  static readonly EndConversationDueToOverflow = "endconversationduetooverflow";
110
+ static readonly SkipSessionCloseForPersistentChatFlag = "skipSessionCloseForPersistentChat";
110
111
  }
111
112
  export declare const Regex: {
112
113
  new (): {};
@@ -285,6 +286,7 @@ export declare class PrepareEndChatDescriptionConstants {
285
286
  static readonly PrepareEndChatError = "There's an error while preparing to end chat. Closing chat widget.";
286
287
  static readonly WidgetLoadFailedAfterSessionInit = "SessionInit was successful, but widget load failed. Ending chat to avoid ghost chats in OC.";
287
288
  static readonly InitiateEndChatReceived = "Received InitiateEndChat BroadcastEvent while conversation state is not Active. Ending chat.";
289
+ static readonly InitiateEndChatReceivedActiveChat = "Received InitiateEndChat BroadcastEvent while conversation state is Active. Updating conversation states.";
288
290
  static readonly EndChatReceivedFromOtherTabs = "Received EndChat BroadcastEvent from other tabs. Closing this chat.";
289
291
  static readonly CustomerCloseChatOnFailureOrPostChat = "Customer is trying to close chat widget on start chat failure or post chat pane.";
290
292
  static readonly CustomerCloseInactiveChat = "Chat was Inactive and customer is trying to close chat widget or refreshing the page.";