@microsoft/omnichannel-chat-widget 1.7.1-main.794ed1e → 1.7.1-main.9703140

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.
@@ -61,12 +61,12 @@ const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) =>
61
61
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
62
  exports.prepareStartChat = prepareStartChat;
63
63
  const setPreChatAndInitiateChat = async (chatSDK, dispatch, setAdapter, isProactiveChat, proactiveChatEnablePrechatState, state, props) => {
64
- var _props$controlProps;
64
+ var _props$preChatSurveyP, _props$preChatSurveyP2, _props$controlProps;
65
65
  //Handle reconnect scenario
66
66
 
67
67
  // Getting prechat Survey Context
68
68
  const parseToJson = false;
69
- const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
69
+ const preChatSurveyResponse = (props === null || props === void 0 ? void 0 : (_props$preChatSurveyP = props.preChatSurveyPaneProps) === null || _props$preChatSurveyP === void 0 ? void 0 : (_props$preChatSurveyP2 = _props$preChatSurveyP.controlProps) === null || _props$preChatSurveyP2 === void 0 ? void 0 : _props$preChatSurveyP2.payload) ?? (await chatSDK.getPreChatSurvey(parseToJson));
70
70
  const showPrechat = isProactiveChat ? preChatSurveyResponse && proactiveChatEnablePrechatState : preChatSurveyResponse && !(props !== null && props !== void 0 && (_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hidePreChatSurveyPane);
71
71
  if (showPrechat) {
72
72
  var _state$domainStates, _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3;
@@ -55,12 +55,12 @@ const prepareStartChat = async (props, chatSDK, state, dispatch, setAdapter) =>
55
55
 
56
56
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
57
57
  const setPreChatAndInitiateChat = async (chatSDK, dispatch, setAdapter, isProactiveChat, proactiveChatEnablePrechatState, state, props) => {
58
- var _props$controlProps;
58
+ var _props$preChatSurveyP, _props$preChatSurveyP2, _props$controlProps;
59
59
  //Handle reconnect scenario
60
60
 
61
61
  // Getting prechat Survey Context
62
62
  const parseToJson = false;
63
- const preChatSurveyResponse = await chatSDK.getPreChatSurvey(parseToJson);
63
+ const preChatSurveyResponse = (props === null || props === void 0 ? void 0 : (_props$preChatSurveyP = props.preChatSurveyPaneProps) === null || _props$preChatSurveyP === void 0 ? void 0 : (_props$preChatSurveyP2 = _props$preChatSurveyP.controlProps) === null || _props$preChatSurveyP2 === void 0 ? void 0 : _props$preChatSurveyP2.payload) ?? (await chatSDK.getPreChatSurvey(parseToJson));
64
64
  const showPrechat = isProactiveChat ? preChatSurveyResponse && proactiveChatEnablePrechatState : preChatSurveyResponse && !(props !== null && props !== void 0 && (_props$controlProps = props.controlProps) !== null && _props$controlProps !== void 0 && _props$controlProps.hidePreChatSurveyPane);
65
65
  if (showPrechat) {
66
66
  var _state$domainStates, _state$domainStates$l, _state$domainStates$l2, _state$domainStates$l3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.7.1-main.794ed1e",
3
+ "version": "1.7.1-main.9703140",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",