@microsoft/omnichannel-chat-widget 1.8.4-main.424a580 → 1.8.4-main.6672d3a

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 (46) 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 +2 -0
  5. package/lib/cjs/common/telemetry/TelemetryManager.js +10 -7
  6. package/lib/cjs/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  7. package/lib/cjs/components/livechatwidget/common/PersistentConversationHandler.js +24 -21
  8. package/lib/cjs/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  9. package/lib/cjs/components/livechatwidget/common/endChat.js +21 -9
  10. package/lib/cjs/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  11. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +102 -26
  12. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +2 -2
  13. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +3 -11
  14. package/lib/cjs/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
  15. package/lib/cjs/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  16. package/lib/cjs/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  17. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  18. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  19. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  20. package/lib/esm/common/Constants.js +2 -0
  21. package/lib/esm/common/telemetry/AppInsightsEvents.js +11 -5
  22. package/lib/esm/common/telemetry/TelemetryConstants.js +2 -0
  23. package/lib/esm/common/telemetry/TelemetryManager.js +10 -7
  24. package/lib/esm/components/livechatwidget/common/ChatWidgetEvents.js +1 -1
  25. package/lib/esm/components/livechatwidget/common/PersistentConversationHandler.js +24 -21
  26. package/lib/esm/components/livechatwidget/common/defaultProps/defaultPersistentChatHistoryProps.js +1 -2
  27. package/lib/esm/components/livechatwidget/common/endChat.js +21 -9
  28. package/lib/esm/components/livechatwidget/common/registerTelemetryLoggers.js +3 -0
  29. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +102 -26
  30. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +2 -2
  31. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +3 -14
  32. package/lib/esm/components/webchatcontainerstateful/common/activityConverters/convertPersistentChatHistoryMessageToActivity.js +8 -2
  33. package/lib/esm/components/webchatcontainerstateful/hooks/usePersistentChatHistory.js +1 -3
  34. package/lib/esm/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.js +1 -0
  35. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.js +6 -7
  36. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.js +21 -1
  37. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/storemiddlewares/citationsMiddleware.js +6 -1
  38. package/lib/types/common/Constants.d.ts +2 -0
  39. package/lib/types/common/telemetry/TelemetryConstants.d.ts +2 -0
  40. package/lib/types/common/telemetry/interfaces/IInternalTelemetryData.d.ts +1 -0
  41. package/lib/types/components/livechatwidget/common/ChatWidgetEvents.d.ts +1 -1
  42. package/lib/types/components/livechatwidget/interfaces/IPersistentChatHistoryProps.d.ts +0 -1
  43. package/lib/types/components/webchatcontainerstateful/interfaces/IExtendedChatConffig.d.ts +15 -0
  44. package/lib/types/components/webchatcontainerstateful/webchatcontroller/WebChatEventSubscribers.d.ts +1 -2
  45. package/lib/types/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/activities/LazyLoadActivity.d.ts +1 -1
  46. package/package.json +1 -1
@@ -54,9 +54,10 @@ import { startProactiveChat } from "../common/startProactiveChat";
54
54
  import useChatAdapterStore from "../../../hooks/useChatAdapterStore";
55
55
  import useChatContextStore from "../../../hooks/useChatContextStore";
56
56
  import useFacadeSDKStore from "../../../hooks/useFacadeChatSDKStore";
57
+ import { getPostChatContext, initiatePostChat } from "../common/renderSurveyHelpers";
57
58
  let uiTimer;
58
59
  export const LiveChatWidgetStateful = props => {
59
- 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$appStates14, _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;
60
+ 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;
60
61
  useEffect(() => {
61
62
  uiTimer = createTimer();
62
63
  TelemetryHelper.logLoadingEventToAllTelemetry(LogLevel.INFO, {
@@ -317,7 +318,7 @@ export const LiveChatWidgetStateful = props => {
317
318
  });
318
319
  });
319
320
  BroadcastService.getMessageByEventName(BroadcastEvent.StartProactiveChat).subscribe(msg => {
320
- TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
321
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
321
322
  Event: TelemetryEvent.StartProactiveChatEventReceived,
322
323
  Description: "Start proactive chat event received."
323
324
  });
@@ -443,7 +444,7 @@ export const LiveChatWidgetStateful = props => {
443
444
  payload: msg === null || msg === void 0 ? void 0 : (_msg$payload8 = msg.payload) === null || _msg$payload8 === void 0 ? void 0 : _msg$payload8.customContext
444
445
  });
445
446
  }
446
- TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
447
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
447
448
  Event: TelemetryEvent.StartChatEventReceived,
448
449
  Description: "Start chat event received."
449
450
  });
@@ -490,21 +491,91 @@ export const LiveChatWidgetStateful = props => {
490
491
  return;
491
492
  }
492
493
  });
494
+ const handleInitiateEndChatForPersistentChat = async (msg, conversationDetails) => {
495
+ var _msg$payload10, _msg$payload11, _msg$payload12;
496
+ //If the payload does NOT include the skipSessionCloseForPersistentChat flag, default is false. Upon receiving the customer event, always ending session from C2.
497
+ const skipSessionCloseForPersistentChat = typeof (msg === null || msg === void 0 ? void 0 : (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10[Constants.SkipSessionCloseForPersistentChatFlag]) === Constants.String && (msg === null || msg === void 0 ? void 0 : (_msg$payload11 = msg.payload) === null || _msg$payload11 === void 0 ? void 0 : _msg$payload11[Constants.SkipSessionCloseForPersistentChatFlag]).toLowerCase() === Constants.true || (msg === null || msg === void 0 ? void 0 : (_msg$payload12 = msg.payload) === null || _msg$payload12 === void 0 ? void 0 : _msg$payload12[Constants.SkipSessionCloseForPersistentChatFlag]) === true;
498
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
499
+ Event: TelemetryEvent.EndChatEventReceived,
500
+ Description: "Processing initiateEndChat for persistent chat",
501
+ CustomProperties: {
502
+ conversationDetails
503
+ }
504
+ });
505
+ const conversationState = conversationDetails === null || conversationDetails === void 0 ? void 0 : conversationDetails.state;
506
+ if (conversationState !== LiveWorkItemState.Closed && conversationState !== LiveWorkItemState.WrapUp) {
507
+ if (skipSessionCloseForPersistentChat) {
508
+ var _conversationDetails$;
509
+ if (((_conversationDetails$ = conversationDetails.canRenderPostChat) === null || _conversationDetails$ === void 0 ? void 0 : _conversationDetails$.toLowerCase()) === "true") {
510
+ var _state$domainStates3;
511
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
512
+ Event: TelemetryEvent.EndChatEventReceived,
513
+ Description: "Processing initiateEndChat, fetching postChatContext"
514
+ });
515
+ const postchatContext = (await 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);
516
+ if (postchatContext) {
517
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
518
+ Event: TelemetryEvent.EndChatEventReceived,
519
+ Description: "Processing initiateEndChat, initiatePostChat",
520
+ CustomProperties: {
521
+ postchatContext
522
+ }
523
+ });
524
+ await initiatePostChat(props, conversationDetails, state, dispatch, postchatContext);
525
+ }
526
+ }
527
+ } else {
528
+ const skipEndChatSDK = false;
529
+ const skipCloseChat = false;
530
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
531
+ Event: TelemetryEvent.EndChatEventReceived,
532
+ Description: "Processing initiateEndChat, trigger endChat"
533
+ });
534
+ await endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
535
+ }
536
+ }
537
+ //if conversation already closed, it is safe to unmount it upon receiving the closeChat event
538
+ else {
539
+ BroadcastService.postMessage({
540
+ eventName: BroadcastEvent.CloseChat
541
+ });
542
+ }
543
+ };
493
544
 
494
545
  // End chat
495
- BroadcastService.getMessageByEventName(BroadcastEvent.InitiateEndChat).subscribe(async () => {
546
+ BroadcastService.getMessageByEventName(BroadcastEvent.InitiateEndChat).subscribe(async msg => {
496
547
  TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
497
548
  Event: TelemetryEvent.EndChatEventReceived,
498
549
  Description: "Received InitiateEndChat BroadcastEvent.",
499
550
  CustomProperties: {
500
- ConversationStage: ConversationStage.ConversationEnd
551
+ ConversationStage: ConversationStage.ConversationEnd,
552
+ payload: msg === null || msg === void 0 ? void 0 : msg.payload
501
553
  }
502
554
  });
503
-
504
- // This is to ensure to get latest state from cache in multitab
555
+ const conversationDetails = await getConversationDetailsCall(facadeChatSDK);
556
+ const {
557
+ chatConfig
558
+ } = props;
559
+ const isPersistent = isPersistentEnabled(chatConfig);
560
+ TelemetryHelper.logSDKEventToAllTelemetry(LogLevel.INFO, {
561
+ Event: TelemetryEvent.EndChatEventReceived,
562
+ Description: "Processing initiateEndChat, fetched conversation details",
563
+ CustomProperties: {
564
+ conversationDetails,
565
+ isPersistent
566
+ }
567
+ });
568
+ if (isPersistent && conversationDetails) {
569
+ await handleInitiateEndChatForPersistentChat(msg, conversationDetails);
570
+ return;
571
+ }
505
572
  const persistedState = getStateFromCache(getWidgetCacheIdfromProps(props));
506
573
  if (persistedState && persistedState.appStates.conversationState === ConversationState.Active) {
507
- // We need to simulate states for closing chat, in order to messup with close confirmation pane.
574
+ TelemetryHelper.logSDKEvent(LogLevel.INFO, {
575
+ Event: TelemetryEvent.PrepareEndChat,
576
+ Description: PrepareEndChatDescriptionConstants.InitiateEndChatReceivedActiveChat
577
+ });
578
+ //We need to simulate states for closing chat, in order to messup with close confirmation pane.
508
579
  dispatch({
509
580
  type: LiveChatWidgetActionType.SET_CONFIRMATION_STATE,
510
581
  payload: ConfirmationState.Ok
@@ -524,11 +595,8 @@ export const LiveChatWidgetStateful = props => {
524
595
  Event: TelemetryEvent.PrepareEndChat,
525
596
  Description: PrepareEndChatDescriptionConstants.InitiateEndChatReceived
526
597
  });
527
- endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
598
+ await endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, skipEndChatSDK, skipCloseChat);
528
599
  }
529
- BroadcastService.postMessage({
530
- eventName: BroadcastEvent.CloseChat
531
- });
532
600
  });
533
601
 
534
602
  // End chat on browser unload
@@ -539,8 +607,8 @@ export const LiveChatWidgetStateful = props => {
539
607
  // Listen to end chat event from other tabs
540
608
  const endChatEventName = 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) ?? "");
541
609
  BroadcastService.getMessageByEventName(endChatEventName).subscribe(msg => {
542
- var _msg$payload10;
543
- if ((msg === null || msg === void 0 ? void 0 : (_msg$payload10 = msg.payload) === null || _msg$payload10 === void 0 ? void 0 : _msg$payload10.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
610
+ var _msg$payload13;
611
+ if ((msg === null || msg === void 0 ? void 0 : (_msg$payload13 = msg.payload) === null || _msg$payload13 === void 0 ? void 0 : _msg$payload13.runtimeId) !== TelemetryManager.InternalTelemetryData.lcwRuntimeId) {
544
612
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
545
613
  Event: TelemetryEvent.PrepareEndChat,
546
614
  Description: "Received EndChat BroadcastEvent from other tabs. Closing this chat."
@@ -582,8 +650,8 @@ export const LiveChatWidgetStateful = props => {
582
650
 
583
651
  // Retrieve convId
584
652
  BroadcastService.getMessageByEventName(BroadcastEvent.UpdateConversationDataForTelemetry).subscribe(msg => {
585
- var _msg$payload11, _msg$payload11$liveWo;
586
- if ((_msg$payload11 = msg.payload) !== null && _msg$payload11 !== void 0 && (_msg$payload11$liveWo = _msg$payload11.liveWorkItem) !== null && _msg$payload11$liveWo !== void 0 && _msg$payload11$liveWo.conversationId) {
653
+ var _msg$payload14, _msg$payload14$liveWo;
654
+ 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) {
587
655
  setConversationId(msg.payload.liveWorkItem.conversationId);
588
656
  }
589
657
  });
@@ -701,14 +769,22 @@ export const LiveChatWidgetStateful = props => {
701
769
  }
702
770
  }, [state.domainStates.confirmationState]);
703
771
  useEffect(() => {
704
- var _state$appStates8, _state$appStates9, _state$appStates10, _state$appStates11, _state$appStates12, _state$appStates13;
772
+ var _inMemoryState$appSta7, _inMemoryState$appSta8, _inMemoryState$appSta9, _inMemoryState$appSta10, _inMemoryState$appSta11, _inMemoryState$appSta12, _inMemoryState$appSta13;
773
+ const inMemoryState = executeReducer(state, {
774
+ type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
775
+ payload: null
776
+ });
705
777
  // Do not process anything during initialization
706
- if ((state === null || state === void 0 ? void 0 : (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy) === ConversationEndEntity.NotSet) {
778
+ if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.conversationEndedBy) === ConversationEndEntity.NotSet) {
779
+ TelemetryHelper.logSDKEvent(LogLevel.INFO, {
780
+ Event: TelemetryEvent.PrepareEndChat,
781
+ Description: "conversationEndedBy is not set"
782
+ });
707
783
  return;
708
784
  }
709
785
 
710
786
  // If start chat failed, and C2 is trying to close chat widget
711
- if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed || (state === null || state === void 0 ? void 0 : (_state$appStates10 = state.appStates) === null || _state$appStates10 === void 0 ? void 0 : _state$appStates10.conversationState) === ConversationState.Postchat) {
787
+ 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.Postchat) {
712
788
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
713
789
  Event: TelemetryEvent.PrepareEndChat,
714
790
  Description: PrepareEndChatDescriptionConstants.CustomerCloseChatOnFailureOrPostChat
@@ -718,7 +794,7 @@ export const LiveChatWidgetStateful = props => {
718
794
  }
719
795
 
720
796
  // Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
721
- if ((state === null || state === void 0 ? void 0 : (_state$appStates11 = state.appStates) === null || _state$appStates11 === void 0 ? void 0 : _state$appStates11.conversationState) === ConversationState.InActive) {
797
+ if ((inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta10 = inMemoryState.appStates) === null || _inMemoryState$appSta10 === void 0 ? void 0 : _inMemoryState$appSta10.conversationState) === ConversationState.InActive) {
722
798
  TelemetryHelper.logSDKEvent(LogLevel.INFO, {
723
799
  Event: TelemetryEvent.PrepareEndChat,
724
800
  Description: PrepareEndChatDescriptionConstants.CustomerCloseInactiveChat
@@ -726,11 +802,11 @@ export const LiveChatWidgetStateful = props => {
726
802
  endChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true);
727
803
  return;
728
804
  }
729
- const isConversationalSurveyEnabled = state.appStates.isConversationalSurveyEnabled;
805
+ const isConversationalSurveyEnabled = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta11 = inMemoryState.appStates) === null || _inMemoryState$appSta11 === void 0 ? void 0 : _inMemoryState$appSta11.isConversationalSurveyEnabled;
730
806
 
731
807
  // In conversational survey, we need to check post chat survey logics before we set ConversationState to InActive
732
808
  // Hence setting ConversationState to InActive will be done later in the post chat flows
733
- if (!isConversationalSurveyEnabled && ((state === null || state === void 0 ? void 0 : (_state$appStates12 = state.appStates) === null || _state$appStates12 === void 0 ? void 0 : _state$appStates12.conversationEndedBy) === ConversationEndEntity.Agent || (state === null || state === void 0 ? void 0 : (_state$appStates13 = state.appStates) === null || _state$appStates13 === void 0 ? void 0 : _state$appStates13.conversationEndedBy) === ConversationEndEntity.Bot)) {
809
+ if (!isConversationalSurveyEnabled && (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta12 = inMemoryState.appStates) === null || _inMemoryState$appSta12 === void 0 ? void 0 : _inMemoryState$appSta12.conversationEndedBy) === ConversationEndEntity.Agent || (inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta13 = inMemoryState.appStates) === null || _inMemoryState$appSta13 === void 0 ? void 0 : _inMemoryState$appSta13.conversationEndedBy) === ConversationEndEntity.Bot) {
734
810
  dispatch({
735
811
  type: LiveChatWidgetActionType.SET_CONVERSATION_STATE,
736
812
  payload: ConversationState.InActive
@@ -738,8 +814,8 @@ export const LiveChatWidgetStateful = props => {
738
814
  }
739
815
 
740
816
  // All other cases
741
- prepareEndChat(props, facadeChatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter);
742
- }, [state === null || state === void 0 ? void 0 : (_state$appStates14 = state.appStates) === null || _state$appStates14 === void 0 ? void 0 : _state$appStates14.conversationEndedBy]);
817
+ prepareEndChat(props, facadeChatSDK, inMemoryState, dispatch, setAdapter, setWebChatStyles, adapter);
818
+ }, [state === null || state === void 0 ? void 0 : (_state$appStates8 = state.appStates) === null || _state$appStates8 === void 0 ? void 0 : _state$appStates8.conversationEndedBy]);
743
819
 
744
820
  // Publish chat widget state
745
821
  useEffect(() => {
@@ -771,13 +847,13 @@ export const LiveChatWidgetStateful = props => {
771
847
 
772
848
  // Handle Chat disconnect cases
773
849
  useEffect(() => {
774
- var _inMemoryState$appSta7;
850
+ var _inMemoryState$appSta14;
775
851
  const inMemoryState = executeReducer(state, {
776
852
  type: LiveChatWidgetActionType.GET_IN_MEMORY_STATE,
777
853
  payload: null
778
854
  });
779
855
  handleChatDisconnect(props, inMemoryState, setWebChatStyles);
780
- const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta7 = inMemoryState.appStates) === null || _inMemoryState$appSta7 === void 0 ? void 0 : _inMemoryState$appSta7.chatDisconnectEventReceived;
856
+ const chatDisconnectState = inMemoryState === null || inMemoryState === void 0 ? void 0 : (_inMemoryState$appSta14 = inMemoryState.appStates) === null || _inMemoryState$appSta14 === void 0 ? void 0 : _inMemoryState$appSta14.chatDisconnectEventReceived;
781
857
  if (chatDisconnectState && adapter) {
782
858
  try {
783
859
  adapter.end();
@@ -103,7 +103,7 @@ export const PostChatSurveyPaneStateful = props => {
103
103
  Event: TelemetryEvent.CustomerVoiceResponsePageLoaded
104
104
  });
105
105
  } else if (data === CustomerVoiceEvents.FormResponseSubmitted) {
106
- TelemetryHelper.logActionEventToAllTelemetry(LogLevel.INFO, {
106
+ TelemetryHelper.logActionEvent(LogLevel.INFO, {
107
107
  Event: TelemetryEvent.CustomerVoiceFormResponseSubmitted,
108
108
  Description: "Customer Voice form response submitted.",
109
109
  CustomProperties: {
@@ -111,7 +111,7 @@ export const PostChatSurveyPaneStateful = props => {
111
111
  }
112
112
  });
113
113
  } else if (data === CustomerVoiceEvents.FormResponseError) {
114
- TelemetryHelper.logActionEventToAllTelemetry(LogLevel.ERROR, {
114
+ TelemetryHelper.logActionEvent(LogLevel.ERROR, {
115
115
  Event: TelemetryEvent.CustomerVoiceFormResponseError,
116
116
  Description: "Customer Voice form response error.",
117
117
  ExceptionDetails: {
@@ -25,9 +25,6 @@ import { isPersistentChatEnabled } from "../livechatwidget/common/liveChatConfig
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, _props$persistentChat, _extendedChatConfig$L, _extendedChatConfig$L2, _extendedChatConfig$L3, _extendedChatConfig$L4, _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, _extendedChatConfig$L, _extendedChatConfig$L2, _extendedChatConfig$L3, _extendedChatConfig$L4, _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$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,18 +87,12 @@ export const WebChatContainerStateful = props => {
90
87
 
91
88
  // Type the chatConfig properly to avoid 'any' usage
92
89
  const extendedChatConfig = props.chatConfig;
93
- const isHistoryEnabledViaProps = props === null || props === void 0 ? void 0 : (_props$persistentChat = props.persistentChatHistoryProps) === null || _props$persistentChat === void 0 ? void 0 : _props$persistentChat.persistentChatHistoryEnabled;
94
90
  const isHistoryEnabledInConfig = extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L === void 0 ? void 0 : _extendedChatConfig$L.msdyn_enablepersistentchatpreviousconversations;
95
91
  const isHistoryEnabledViaFCB = extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L2 = extendedChatConfig.LcwFcbConfiguration) === null || _extendedChatConfig$L2 === void 0 ? void 0 : _extendedChatConfig$L2.lcwPersistentChatHistoryEnabled;
96
92
  const isPersistentChatEnabledForWidget = !!(extendedChatConfig !== null && extendedChatConfig !== void 0 && (_extendedChatConfig$L3 = extendedChatConfig.LiveChatConfigAuthSettings) !== null && _extendedChatConfig$L3 !== void 0 && _extendedChatConfig$L3.msdyn_javascriptclientfunction) || isPersistentChatEnabled(extendedChatConfig === null || extendedChatConfig === void 0 ? void 0 : (_extendedChatConfig$L4 = extendedChatConfig.LiveWSAndLiveChatEngJoin) === null || _extendedChatConfig$L4 === void 0 ? void 0 : _extendedChatConfig$L4.msdyn_conversationmode);
97
93
 
98
- // isPersistentHistoryEnabled can only be true if isHistoryEnabledViaFCB is true, and next conditions are met:
99
- // 1. isHistoryEnabledViaProps is true (takes precedence over config)
100
- // 2. isHistoryEnabledInConfig is true and isHistoryEnabledViaProps is undefined
101
- const isPersistentHistoryEnabled = isHistoryEnabledViaProps || isHistoryEnabledInConfig && !isHistoryEnabledViaProps;
102
-
103
94
  // Check if both persistent chat and widget support are enabled
104
- const shouldLoadPersistentHistoryMessages = isPersistentHistoryEnabled && isHistoryEnabledViaFCB && isPersistentChatEnabledForWidget;
95
+ const shouldLoadPersistentHistoryMessages = isHistoryEnabledInConfig && isHistoryEnabledViaFCB && isPersistentChatEnabledForWidget;
105
96
  if (shouldLoadPersistentHistoryMessages) {
106
97
  TelemetryHelper.logLoadingEvent(LogLevel.INFO, {
107
98
  Event: TelemetryEvent.PersistentChatHistoryEnabled
@@ -415,9 +406,7 @@ export const WebChatContainerStateful = props => {
415
406
  height: "100%",
416
407
  width: "100%"
417
408
  }
418
- }, shouldLoadPersistentHistoryMessages && /*#__PURE__*/React.createElement(WebChatEventSubscribers, {
419
- persistentChatHistoryEnabled: props === null || props === void 0 ? void 0 : (_props$persistentChat2 = props.persistentChatHistoryProps) === null || _props$persistentChat2 === void 0 ? void 0 : _props$persistentChat2.persistentChatHistoryEnabled
420
- }), /*#__PURE__*/React.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/React.createElement(CitationPaneStateful, {
409
+ }, shouldLoadPersistentHistoryMessages && /*#__PURE__*/React.createElement(WebChatEventSubscribers, null), /*#__PURE__*/React.createElement(BasicWebChat, null))), citationPaneOpen && /*#__PURE__*/React.createElement(CitationPaneStateful, {
421
410
  id: ((_props$citationPanePr = props.citationPaneProps) === null || _props$citationPanePr === void 0 ? void 0 : _props$citationPanePr.id) || HtmlAttributeNames.ocwCitationPaneClassName,
422
411
  title: ((_props$citationPanePr2 = props.citationPaneProps) === null || _props$citationPanePr2 === void 0 ? void 0 : _props$citationPanePr2.title) || HtmlAttributeNames.ocwCitationPaneTitle,
423
412
  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 = {
@@ -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;
@@ -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);
@@ -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 {
@@ -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.";
@@ -288,6 +288,7 @@ export declare enum TelemetryEvent {
288
288
  LCWPersistentConversationHandlerInitialized = "LCWPersistentConversationHandlerInitialized",
289
289
  LCWPersistentHistoryPullBlocked = "LCWPersistentHistoryPullBlocked",
290
290
  LCWPersistentHistoryPullCompleted = "LCWPersistentHistoryPullCompleted",
291
+ LCWPersistentHistoryReturnedNull = "LCWPersistentHistoryReturnedNull",
291
292
  LCWLazyLoadInitializationStarted = "LCWLazyLoadInitializationStarted",
292
293
  LCWLazyLoadContainerNotFound = "LCWLazyLoadContainerNotFound",
293
294
  LCWLazyLoadInitializationCompleted = "LCWLazyLoadInitializationCompleted",
@@ -297,6 +298,7 @@ export declare enum TelemetryEvent {
297
298
  LCWLazyLoadActivityMounted = "LCWLazyLoadActivityMounted",
298
299
  LCWLazyLoadReset = "LCWLazyLoadReset",
299
300
  LCWLazyLoadNoMoreHistory = "LCWLazyLoadNoMoreHistory",
301
+ LCWLazyLoadHistoryError = "LCWLazyLoadHistoryError",
300
302
  LCWLazyLoadDestroyed = "LCWLazyLoadDestroyed",
301
303
  SecureEventBusUnauthorizedDispatch = "SecureEventBusUnauthorizedDispatch",
302
304
  SecureEventBusListenerError = "SecureEventBusListenerError",
@@ -20,4 +20,5 @@ export interface IInternalTelemetryData {
20
20
  channelId?: string;
21
21
  chatWidgetVersion?: string;
22
22
  chatComponentVersion?: string;
23
+ chatConfigAppInsightsKey?: string;
23
24
  }
@@ -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,6 +1,5 @@
1
1
  import { IStyle } from "@fluentui/react";
2
2
  export interface IPersistentChatHistoryProps {
3
- persistentChatHistoryEnabled?: boolean;
4
3
  pageSize?: number;
5
4
  dividerActivityStyle?: IStyle;
6
5
  /**
@@ -0,0 +1,15 @@
1
+ export interface ExtendedChatConfig {
2
+ LcwFcbConfiguration?: LcwFcbConfiguration;
3
+ LiveChatConfigAuthSettings?: LiveChatConfigAuthSettings;
4
+ LiveWSAndLiveChatEngJoin?: {
5
+ msdyn_conversationmode?: string;
6
+ msdyn_enablepersistentchatpreviousconversations?: boolean;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.8.4-main.424a580",
3
+ "version": "1.8.4-main.6672d3a",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",