impact-chatbot 2.3.6 → 2.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -4509,7 +4509,10 @@ const ChatPlaceholder = (props) => {
4509
4509
  setLoading(false);
4510
4510
  }
4511
4511
  };
4512
- if (baseUrl && legacyAgentScreen && !displayQuestions) {
4512
+ if (baseUrl &&
4513
+ legacyAgentScreen &&
4514
+ !displayQuestions &&
4515
+ lodash.isEmpty(cardList)) {
4513
4516
  loadCards();
4514
4517
  }
4515
4518
  if (questions &&
@@ -4523,7 +4526,7 @@ const ChatPlaceholder = (props) => {
4523
4526
  getBaseUrl();
4524
4527
  }, []);
4525
4528
  const handleRectangleClick = (agentId, title) => {
4526
- if (legacyAgentScreen) {
4529
+ if (legacyAgentScreen || displayQuestions) {
4527
4530
  setCurrentAgentId(agentId);
4528
4531
  const initiateAgentPayload = {
4529
4532
  agent_id: agentId,
@@ -4572,7 +4575,7 @@ const ChatPlaceholder = (props) => {
4572
4575
  agentId: card.agentId || card.id
4573
4576
  }));
4574
4577
  const dataToMap = legacyAgentScreen || displayQuestions ? transformedCardList : rectangleData;
4575
- return (jsxRuntime.jsxs("div", { className: classes.placeholderContainer, children: [jsxRuntime.jsx("div", { className: classes.centerIconContainer, children: jsxRuntime.jsx(SvgCenter3D, { className: classes.centerIcon }) }), jsxRuntime.jsx(material.Typography, { variant: "h1", className: classes.heading, children: "Alan's Capabilities" }), jsxRuntime.jsx(material.Typography, { variant: "body1", className: classes.headingHelperText, children: "Discover potential issues & opportunities Alan can help you with!" }), jsxRuntime.jsx("div", { className: classes.rectanglesContainer, children: dataToMap.map((item, index) => (jsxRuntime.jsx(Rectangle, { type: item.type, icon: item.icon, title: item.title, description: item.description, onClick: () => handleRectangleClick(item?.agentId, item?.title), hoverable: legacyAgentScreen }, index))) })] }));
4578
+ return (jsxRuntime.jsxs("div", { className: classes.placeholderContainer, children: [jsxRuntime.jsx("div", { className: classes.centerIconContainer, children: jsxRuntime.jsx(SvgCenter3D, { className: classes.centerIcon }) }), jsxRuntime.jsx(material.Typography, { variant: "h1", className: classes.heading, children: "Alan's Capabilities" }), jsxRuntime.jsx(material.Typography, { variant: "body1", className: classes.headingHelperText, children: "Discover potential issues & opportunities Alan can help you with!" }), jsxRuntime.jsx("div", { className: classes.rectanglesContainer, children: dataToMap.map((item, index) => (jsxRuntime.jsx(Rectangle, { type: item.type, icon: item.icon, title: item.title, description: item.description, onClick: () => handleRectangleClick(item?.agentId, item?.title), hoverable: legacyAgentScreen || displayQuestions }, index))) })] }));
4576
4579
  };
4577
4580
 
4578
4581
  const dateFormat = "DD-MM-YYYY HH:mm:ss";