@microsoft/omnichannel-chat-widget 1.8.4-main.7bdb634 → 1.8.4-main.c687f88

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 (104) hide show
  1. package/README.md +27 -0
  2. package/lib/cjs/common/Constants.js +3 -0
  3. package/lib/cjs/common/telemetry/AppInsightsEvents.js +14 -9
  4. package/lib/cjs/common/telemetry/TelemetryConstants.js +15 -2
  5. package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
  6. package/lib/cjs/common/telemetry/loggers/appInsightsLogger.js +29 -13
  7. package/lib/cjs/common/utils.js +14 -1
  8. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +16 -4
  9. package/lib/cjs/components/citationpanestateful/CitationPaneStateful.js +20 -1
  10. package/lib/cjs/components/errorboundary/ErrorBoundary.js +2 -1
  11. package/lib/cjs/components/headerstateful/HeaderStateful.js +8 -2
  12. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  13. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
  14. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  15. package/lib/cjs/components/livechatwidget/common/endChat.js +26 -9
  16. package/lib/cjs/components/livechatwidget/common/initWebChatComposer.js +9 -2
  17. package/lib/cjs/components/livechatwidget/common/liveChatConfigUtils.js +36 -4
  18. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  19. package/lib/cjs/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  20. package/lib/cjs/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  21. package/lib/cjs/components/livechatwidget/common/startChat.js +5 -1
  22. package/lib/cjs/components/livechatwidget/common/startChatErrorHandler.js +24 -4
  23. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +124 -28
  24. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +37 -8
  25. package/lib/cjs/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +12 -3
  26. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +28 -30
  27. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +12 -12
  28. package/lib/cjs/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  29. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  30. package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  31. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  32. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
  33. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  34. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
  35. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -0
  36. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  37. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  38. package/lib/cjs/contexts/common/LiveChatWidgetActionType.js +1 -0
  39. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
  40. package/lib/cjs/contexts/createReducer.js +15 -0
  41. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  42. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  43. package/lib/cjs/plugins/newMessageEventHandler.js +4 -1
  44. package/lib/esm/common/Constants.js +3 -0
  45. package/lib/esm/common/telemetry/AppInsightsEvents.js +14 -9
  46. package/lib/esm/common/telemetry/TelemetryConstants.js +13 -1
  47. package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
  48. package/lib/esm/common/telemetry/loggers/appInsightsLogger.js +30 -14
  49. package/lib/esm/common/utils.js +11 -0
  50. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +17 -5
  51. package/lib/esm/components/citationpanestateful/CitationPaneStateful.js +20 -1
  52. package/lib/esm/components/errorboundary/ErrorBoundary.js +4 -2
  53. package/lib/esm/components/headerstateful/HeaderStateful.js +9 -3
  54. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  55. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +26 -20
  56. package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  57. package/lib/esm/components/livechatwidget/common/endChat.js +26 -9
  58. package/lib/esm/components/livechatwidget/common/initWebChatComposer.js +9 -2
  59. package/lib/esm/components/livechatwidget/common/liveChatConfigUtils.js +33 -2
  60. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  61. package/lib/esm/components/livechatwidget/common/renderSurveyHelpers.js +2 -2
  62. package/lib/esm/components/livechatwidget/common/setPostChatContextAndLoadSurvey.js +3 -3
  63. package/lib/esm/components/livechatwidget/common/startChat.js +7 -3
  64. package/lib/esm/components/livechatwidget/common/startChatErrorHandler.js +23 -4
  65. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +125 -29
  66. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +39 -10
  67. package/lib/esm/components/prechatsurveypanestateful/PreChatSurveyPaneStateful.js +13 -4
  68. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +29 -34
  69. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +12 -12
  70. package/lib/esm/components/webchatcontainerstateful/common/defaultProps/defaultMiddlewareLocalizedTexts.js +2 -1
  71. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  72. package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  73. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  74. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/ConversationDividerActivity.js +30 -1
  75. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  76. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.js +7 -2
  77. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/NotDeliveredTimestamp.js +3 -0
  78. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/channelDataMiddleware.js +1 -0
  79. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  80. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.js +29 -7
  81. package/lib/esm/contexts/common/LiveChatWidgetActionType.js +1 -0
  82. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +7 -1
  83. package/lib/esm/contexts/createReducer.js +15 -0
  84. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +3 -2
  85. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +6 -2
  86. package/lib/esm/plugins/newMessageEventHandler.js +4 -1
  87. package/lib/types/common/Constants.d.ts +3 -0
  88. package/lib/types/common/telemetry/TelemetryConstants.d.ts +12 -1
  89. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
  90. package/lib/types/common/utils.d.ts +9 -1
  91. package/lib/types/components/errorboundary/ErrorBoundary.d.ts +1 -1
  92. package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +1 -1
  93. package/lib/types/components/livechatwidget/common/liveChatConfigUtils.d.ts +11 -0
  94. package/lib/types/components/livechatwidget/common/startChatErrorHandler.d.ts +1 -0
  95. package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +5 -1
  96. package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
  97. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +1 -2
  98. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +1 -1
  99. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activityMiddleware.d.ts +2 -1
  100. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/localizedStringsBotInitialsMiddleware.d.ts +1 -1
  101. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -0
  102. package/lib/types/contexts/common/ILiveChatWidgetLocalizedTexts.d.ts +5 -0
  103. package/lib/types/contexts/common/LiveChatWidgetActionType.d.ts +2 -1
  104. package/package.json +3 -3
@@ -31,7 +31,7 @@ export const createTrackingForFirstMessage = () => {
31
31
  * Starts tracking the time for the first bot message after widget loads.
32
32
  * Sets a 5-second timeout to auto-reset if no bot message is received.
33
33
  */
34
- const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.WidgetLoadComplete).subscribe(() => {
34
+ const widgetLoadListener = BroadcastService.getMessageByEventName(TelemetryEvent.StartChatComplete).subscribe(() => {
35
35
  if (isTracking) return;
36
36
  isTracking = true;
37
37
  startTime = new Date().getTime();
@@ -86,7 +86,8 @@ export const createTrackingForFirstMessage = () => {
86
86
  CustomProperties: {
87
87
  elapsedTime,
88
88
  widgetLoadedAt: startTime,
89
- botMessage: stopTrackingMessage
89
+ botMessage: stopTrackingMessage,
90
+ type: payload === null || payload === void 0 ? void 0 : payload.type
90
91
  }
91
92
  });
92
93
  disconnectListener();
@@ -7,6 +7,7 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
7
7
  import { BroadcastEvent, LogLevel, TelemetryEvent } from "../common/telemetry/TelemetryConstants";
8
8
  import { BroadcastService } from "@microsoft/omnichannel-chat-components";
9
9
  import { TelemetryHelper } from "../common/telemetry/TelemetryHelper";
10
+ import { Constants } from "../common/Constants";
10
11
  export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
11
12
  function FirstResponseLatencyTracker() {
12
13
  _classCallCheck(this, FirstResponseLatencyTracker);
@@ -127,7 +128,8 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
127
128
  CustomProperties: {
128
129
  elapsedTime,
129
130
  userMessage: this.startTrackingMessage,
130
- botMessage: this.stopTrackingMessage
131
+ botMessage: this.stopTrackingMessage,
132
+ type: payload === null || payload === void 0 ? void 0 : payload.type
131
133
  }
132
134
  });
133
135
  }
@@ -168,7 +170,9 @@ export let FirstResponseLatencyTracker = /*#__PURE__*/function () {
168
170
  value: function stopClock(payload) {
169
171
  try {
170
172
  if (!payload || !payload.Id) {
171
- throw new Error("Invalid payload");
173
+ if ((payload === null || payload === void 0 ? void 0 : payload.type) !== Constants.typing) {
174
+ throw new Error("Invalid payload");
175
+ }
172
176
  }
173
177
 
174
178
  // Only allow stopTracking if sender is valid and tracking is active
@@ -78,6 +78,9 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
78
78
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
79
  const messageHasNoAttachments = !(activity !== null && activity !== void 0 && activity.attachments) || (activity === null || activity === void 0 ? void 0 : activity.attachments.length) === 0;
80
80
  if (messageHasNoTags && messageHasNoText && messageHasNoAttachments) {
81
+ if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
82
+ return true;
83
+ }
81
84
  return false;
82
85
  }
83
86
  return true;
@@ -106,7 +109,7 @@ export const createOnNewAdapterActivityHandler = (chatId, userId, startTime) =>
106
109
  });
107
110
  };
108
111
  const raiseMessageEvent = activity => {
109
- if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message) {
112
+ if ((activity === null || activity === void 0 ? void 0 : activity.type) === Constants.message || (activity === null || activity === void 0 ? void 0 : activity.type) === Constants.typing) {
110
113
  const scenarioType = getScenarioType(activity);
111
114
  switch (scenarioType) {
112
115
  case ScenarioType.UserSendMessageStrategy:
@@ -46,6 +46,7 @@ export declare class Constants {
46
46
  static readonly averageWaitTimeMessageTag = "averagewaittime";
47
47
  static readonly message = "message";
48
48
  static readonly hiddenTag = "Hidden";
49
+ static readonly typing = "typing";
49
50
  static readonly prefixTimestampTag = "ServerMessageTimestamp_";
50
51
  static readonly acsChannel = "ACS_CHANNEL";
51
52
  static readonly publicMessageTag = "public";
@@ -106,6 +107,7 @@ export declare class Constants {
106
107
  static readonly customEventValue = "customEventValue";
107
108
  static readonly Hidden = "Hidden";
108
109
  static readonly EndConversationDueToOverflow = "endconversationduetooverflow";
110
+ static readonly SkipSessionCloseForPersistentChatFlag = "skipSessionCloseForPersistentChat";
109
111
  }
110
112
  export declare const Regex: {
111
113
  new (): {};
@@ -284,6 +286,7 @@ export declare class PrepareEndChatDescriptionConstants {
284
286
  static readonly PrepareEndChatError = "There's an error while preparing to end chat. Closing chat widget.";
285
287
  static readonly WidgetLoadFailedAfterSessionInit = "SessionInit was successful, but widget load failed. Ending chat to avoid ghost chats in OC.";
286
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.";
287
290
  static readonly EndChatReceivedFromOtherTabs = "Received EndChat BroadcastEvent from other tabs. Closing this chat.";
288
291
  static readonly CustomerCloseChatOnFailureOrPostChat = "Customer is trying to close chat widget on start chat failure or post chat pane.";
289
292
  static readonly CustomerCloseInactiveChat = "Chat was Inactive and customer is trying to close chat widget or refreshing the page.";
@@ -106,6 +106,7 @@ export declare enum TelemetryEvent {
106
106
  EndChatFailed = "EndChatFailed",
107
107
  SettingCustomContext = "SettingCustomContext",
108
108
  WebChatLoaded = "WebChatLoaded",
109
+ PersistentChatHistoryEnabled = "PersistentChatHistoryEnabled",
109
110
  LCWChatButtonActionCompleted = "LCWChatButtonActionCompleted",
110
111
  LCWChatButtonClicked = "LCWChatButtonClicked",
111
112
  LCWChatButtonShow = "LCWChatButtonShow",
@@ -270,6 +271,8 @@ export declare enum TelemetryEvent {
270
271
  UXCitationPaneCompleted = "UXCitationPaneCompleted",
271
272
  UXLiveChatWidgetStart = "UXLiveChatWidgetStart",
272
273
  UXLiveChatWidgetCompleted = "UXLiveChatWidgetCompleted",
274
+ UXPostChatPaneStarted = "UXPostChatPaneStarted",
275
+ UXPostChatPaneCompleted = "UXPostChatPaneCompleted",
273
276
  AppInsightsInitialized = "AppInsightsInitialized",
274
277
  AppInsightsInitFailed = "AppInsightsInitFailed",
275
278
  ConvertPersistentChatHistoryMessageToActivityFailed = "ConvertPersistentChatHistoryMessageToActivityFailed",
@@ -285,6 +288,7 @@ export declare enum TelemetryEvent {
285
288
  LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
286
289
  LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
287
290
  LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
291
+ LCWPersistentHistoryReturnedNull = "LCWPersistentHistoryReturnedNull",
288
292
  LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
289
293
  LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
290
294
  LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
@@ -294,10 +298,12 @@ export declare enum TelemetryEvent {
294
298
  LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
295
299
  LCWLazyLoadReset = "LCWLazyLoadReset",
296
300
  LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
301
+ LCWLazyLoadHistoryError = "LCWLazyLoadHistoryError",
297
302
  LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
298
303
  SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
299
304
  SecureEventBusListenerError = "SecureEventBusListenerError",
300
- SecureEventBusDispatchError = "SecureEventBusDispatchError"
305
+ SecureEventBusDispatchError = "SecureEventBusDispatchError",
306
+ StartChatComplete = "StartChatComplete"
301
307
  }
302
308
  export interface TelemetryInput {
303
309
  scenarioType: ScenarioType;
@@ -308,3 +314,8 @@ export declare class TelemetryConstants {
308
314
  private static map;
309
315
  static mapEventToScenario(eventTypeOrScenarioType: TelemetryEvent): ScenarioType;
310
316
  }
317
+ export declare enum ConversationStage {
318
+ Initialization = "Initialization",
319
+ CSREngagement = "CSR Engagement",
320
+ ConversationEnd = "Conversation End"
321
+ }
@@ -20,4 +20,5 @@ export interface IInternalTelemetryData {
20
20
  channelId?: string;
21
21
  chatWidgetVersion?: string;
22
22
  chatComponentVersion?: string;
23
+ chatConfigAppInsightsKey?: string;
23
24
  }
@@ -1,6 +1,6 @@
1
+ import * as CustomEventType from "../contexts/common/CustomEventType";
1
2
  import { FacadeChatSDK } from "./facades/FacadeChatSDK";
2
3
  import { ITimer } from "./interfaces/ITimer";
3
- import * as CustomEventType from "../contexts/common/CustomEventType";
4
4
  export declare const setTabIndices: (elements: HTMLElement[] | null, tabIndexMap: Map<string, number>, shouldBeFocusable: boolean) => void;
5
5
  export declare const findParentFocusableElementsWithoutChildContainer: (elementId: string) => HTMLElement[] | null;
6
6
  export declare const findAllFocusableElement: (parent: string | HTMLElement) => any[] | null;
@@ -55,3 +55,11 @@ export declare function isEndConversationDueToOverflowActivity(activity: {
55
55
  tags?: string[];
56
56
  };
57
57
  }): boolean | undefined;
58
+ /**
59
+ * Parses a value that can be boolean or string ("true"/"false") into a boolean.
60
+ * Handles null/undefined by returning false.
61
+ *
62
+ * @param value - The value to parse (can be boolean, string, null, or undefined)
63
+ * @returns true if value is true or "true" (case-insensitive), false otherwise
64
+ */
65
+ export declare function parseBooleanFromConfig(value: boolean | string | null | undefined): boolean;
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import React, { Component } from "react";
2
2
  interface ErrorBoundaryProps {
3
3
  children: React.ReactNode | (() => React.ReactNode);
4
4
  onError?: (error: Error) => void;
@@ -2,6 +2,6 @@ declare enum ChatWidgetEvents {
2
2
  ADD_ACTIVITY = "CHAT_WIDGET/ADD_ACTIVITY",
3
3
  FETCH_PERSISTENT_CHAT_HISTORY = "CHAT_WIDGET/FETCH_PERSISTENT_CHAT_HISTORY",
4
4
  NO_MORE_HISTORY_AVAILABLE = "CHAT_WIDGET/NO_MORE_HISTORY_AVAILABLE",
5
- HIDE_LOADING_BANNER = "CHAT_WIDGET/HIDE_LOADING_BANNER"
5
+ HISTORY_LOAD_ERROR = "CHAT_WIDGET/HISTORY_LOAD_ERROR"
6
6
  }
7
7
  export default ChatWidgetEvents;
@@ -1,4 +1,15 @@
1
+ import { ExtendedChatConfig } from "../../webchatcontainerstateful/interfaces/IExtendedChatConffig";
1
2
  import { FacadeChatSDK } from "../../../common/facades/FacadeChatSDK";
2
3
  export declare const isPostChatSurveyEnabled: (facadeChatSDK: FacadeChatSDK) => Promise<boolean>;
3
4
  export declare const getPostChatSurveyConfig: (facadeChatSDK: FacadeChatSDK) => Promise<any>;
4
5
  export declare const isPersistentChatEnabled: (conversationMode: string | undefined) => boolean;
6
+ /**
7
+ * Determines if persistent chat history should be loaded based on all required conditions.
8
+ *
9
+ * @param extendedChatConfig - The extended chat configuration object
10
+ * @returns true if ALL conditions are met:
11
+ * 1. Conversation mode must be Persistent ("192350001")
12
+ * 2. History is enabled in admin config (msdyn_enablepersistentchatpreviousconversations)
13
+ * 3. History is enabled via feature flag (lcwPersistentChatHistoryEnabled)
14
+ */
15
+ export declare const shouldLoadPersistentChatHistory: (extendedChatConfig: ExtendedChatConfig | undefined) => boolean;
@@ -4,4 +4,5 @@ import { ILiveChatWidgetAction } from "../../../contexts/common/ILiveChatWidgetA
4
4
  import { ILiveChatWidgetProps } from "../interfaces/ILiveChatWidgetProps";
5
5
  export declare const handleStartChatError: (dispatch: Dispatch<ILiveChatWidgetAction>, facadeChatSDK: FacadeChatSDK, props: ILiveChatWidgetProps | undefined, ex: any, isStartChatSuccessful: boolean) => void;
6
6
  export declare const logWidgetLoadComplete: (additionalMessage?: string) => void;
7
+ export declare const logStartChatComplete: (additionalMessage?: string) => void;
7
8
  export declare const logWidgetLoadWithUnexpectedError: (ex: any) => void;
@@ -1,7 +1,11 @@
1
1
  import { IStyle } from "@fluentui/react";
2
2
  export interface IPersistentChatHistoryProps {
3
- persistentChatHistoryEnabled?: boolean;
4
3
  pageSize?: number;
5
4
  dividerActivityStyle?: IStyle;
5
+ /**
6
+ * Accessible label announced by screen readers for the conversation divider element.
7
+ * If not supplied, a default provided in defaultPersistentChatHistoryProps will be used.
8
+ */
9
+ dividerActivityAriaLabel?: string;
6
10
  bannerStyle?: IStyle;
7
11
  }
@@ -0,0 +1,15 @@
1
+ export interface ExtendedChatConfig {
2
+ LcwFcbConfiguration?: LcwFcbConfiguration;
3
+ LiveChatConfigAuthSettings?: LiveChatConfigAuthSettings;
4
+ LiveWSAndLiveChatEngJoin?: {
5
+ msdyn_conversationmode?: string;
6
+ msdyn_enablepersistentchatpreviousconversations?: string;
7
+ };
8
+ }
9
+ interface LcwFcbConfiguration {
10
+ lcwPersistentChatHistoryEnabled?: boolean;
11
+ }
12
+ interface LiveChatConfigAuthSettings {
13
+ msdyn_javascriptclientfunction?: string;
14
+ }
15
+ export {};
@@ -1,7 +1,6 @@
1
- import { IPersistentChatHistoryProps } from "../../livechatwidget/interfaces/IPersistentChatHistoryProps";
2
1
  /**
3
2
  * Component to handle persistent chat history events.
4
3
  * Uses WebChatStoreLoader instead of hooks to avoid context issues.
5
4
  */
6
- declare const WebChatEventSubscribers: (props: IPersistentChatHistoryProps) => null;
5
+ declare const WebChatEventSubscribers: () => null;
7
6
  export default WebChatEventSubscribers;
@@ -53,7 +53,7 @@ declare class LazyLoadHandler {
53
53
  static paused: boolean;
54
54
  static observer: IntersectionObserver | null;
55
55
  private static scrollState;
56
- private static pendingScrollAction;
56
+ static pendingScrollAction: boolean;
57
57
  private static retryTimeouts;
58
58
  static resetPending: boolean;
59
59
  private static initTimer;
@@ -6,5 +6,6 @@
6
6
  * 2. Changes the font size of user messages
7
7
  * 3. Decodes certain html characters that came through from chat services
8
8
  ******/
9
+ import { ILiveChatWidgetLocalizedTexts } from "../../../../../contexts/common/ILiveChatWidgetLocalizedTexts";
9
10
  import React from "react";
10
- export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties) => () => (next: any) => (...args: any) => any;
11
+ export declare const createActivityMiddleware: (renderMarkdown: (text: string) => string, systemMessageStyleProps?: React.CSSProperties, userMessageStyleProps?: React.CSSProperties, localizedTexts?: ILiveChatWidgetLocalizedTexts) => () => (next: any) => (...args: any) => any;
@@ -1,5 +1,5 @@
1
1
  import { IWebChatAction } from "../../../interfaces/IWebChatAction";
2
- export declare const localizedStringsBotInitialsMiddleware: () => ({ dispatch }: {
2
+ export declare const localizedStringsBotInitialsMiddleware: (onInitialsChange?: (initials: string) => void) => ({ dispatch }: {
3
3
  dispatch: any;
4
4
  }) => (next: any) => (action: IWebChatAction) => any;
5
5
  export declare const getOverriddenLocalizedStrings: (existingOverrides?: any) => (strings: any) => any;
@@ -26,6 +26,7 @@ export interface ILiveChatWidgetContext {
26
26
  confirmationPaneConfirmedOptionClicked: boolean;
27
27
  confirmationState: ConfirmationState;
28
28
  startChatFailureType: StartChatFailureType;
29
+ botAvatarInitials?: string;
29
30
  };
30
31
  appStates: {
31
32
  conversationState: ConversationState;
@@ -1,5 +1,10 @@
1
1
  export interface ILiveChatWidgetLocalizedTexts {
2
2
  PREVIOUS_MESSAGES_LOADING?: string;
3
+ /**
4
+ * Aria label announced by screen readers for the conversation history divider element.
5
+ * e.g. "Conversation history divider" or localized equivalent.
6
+ */
7
+ CONVERSATION_DIVIDER_ARIA_LABEL?: string;
3
8
  MIDDLEWARE_BANNER_FILE_NULL_ERROR?: string;
4
9
  MIDDLEWARE_BANNER_FILE_SIZE_WITHOUT_EXTENSION_ERROR?: string;
5
10
  MIDDLEWARE_BANNER_FILE_SIZE_EXTENSION_ERROR?: string;
@@ -47,5 +47,6 @@ export declare enum LiveChatWidgetActionType {
47
47
  SET_POST_CHAT_PARTICIPANT_TYPE = 45,
48
48
  SET_CONVERSATIONAL_SURVEY_ENABLED = 46,
49
49
  SET_CONVERSATIONAL_SURVEY_DISPLAY = 47,
50
- GET_IN_MEMORY_STATE = 48
50
+ GET_IN_MEMORY_STATE = 48,
51
+ SET_BOT_AVATAR_INITIALS = 49
51
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.8.4-main.7bdb634",
3
+ "version": "1.8.4-main.c687f88",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -86,7 +86,7 @@
86
86
  "dependencies": {
87
87
  "@azure/core-tracing": "^1.2.0",
88
88
  "@microsoft/applicationinsights-web": "^3.3.6",
89
- "@microsoft/omnichannel-chat-components": "1.1.15",
89
+ "@microsoft/omnichannel-chat-components": "1.1.16",
90
90
  "@microsoft/omnichannel-chat-sdk": "^1.11.7-main.3418dc3",
91
91
  "@opentelemetry/api": "^1.9.0",
92
92
  "abort-controller": "^3",
@@ -108,7 +108,7 @@
108
108
  "compose-storybook": "start-storybook -c stories/.storybook -p 9009",
109
109
  "build-composite-storybook": "build-storybook -c stories/.storybook -o storybook-build",
110
110
  "build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider build-storybook",
111
- "build": "yarn clean yarn lint && yarn build:esm && yarn build:cjs && tsc",
111
+ "build": "yarn clean && yarn lint && yarn build:esm && yarn build:cjs && tsc",
112
112
  "test:unit": "jest -c jest.config.unit.cjs --env=jsdom --runInBand --force-exit",
113
113
  "test:e2e": "cd automation_tests && yarn test",
114
114
  "test:e2e:build": "yarn build-sample && cd automation_tests && yarn test",