impact-chatbot 2.3.13 → 2.3.14

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.esm.js CHANGED
@@ -2793,6 +2793,8 @@ const colours = {
2793
2793
  oceanGreen: "#3BB273",
2794
2794
  linen: "#FCEEEE",
2795
2795
  greyishBlue: "#F2F4FA",
2796
+ denim: "#1A56DB",
2797
+ pattensBlue: "#DBEAFE"
2796
2798
  };
2797
2799
 
2798
2800
  const rem = (px) => `${px / 16}rem`;
@@ -4300,21 +4302,37 @@ const useStyles$5 = makeStyles((theme) => ({
4300
4302
  height: "100%",
4301
4303
  }
4302
4304
  },
4305
+ headingContainer: {
4306
+ display: "flex",
4307
+ alignItems: "center",
4308
+ justifyContent: "center",
4309
+ gap: pxToRem(8),
4310
+ marginBottom: pxToRem(5),
4311
+ },
4303
4312
  heading: {
4304
4313
  fontFamily: "Manrope, sans-serif",
4305
4314
  fontSize: pxToRem(20),
4306
4315
  fontWeight: 800,
4307
4316
  lineHeight: pxToRem(30),
4308
- color: "#31416E",
4309
- marginBottom: pxToRem(5),
4317
+ color: colours.boldHeadingBlue,
4310
4318
  textAlign: "center",
4311
4319
  },
4320
+ alphaTag: {
4321
+ fontFamily: "Manrope, sans-serif",
4322
+ fontSize: pxToRem(11),
4323
+ fontWeight: 700,
4324
+ color: colours.denim,
4325
+ backgroundColor: colours.pattensBlue,
4326
+ borderRadius: pxToRem(4),
4327
+ padding: `${pxToRem(2)} ${pxToRem(8)}`,
4328
+ lineHeight: pxToRem(16),
4329
+ },
4312
4330
  headingHelperText: {
4313
4331
  fontFamily: "Manrope, sans-serif",
4314
4332
  fontSize: pxToRem(14),
4315
4333
  fontWeight: 400,
4316
4334
  lineHeight: pxToRem(16),
4317
- color: "#31416E",
4335
+ color: colours.boldHeadingBlue,
4318
4336
  marginBottom: pxToRem(44),
4319
4337
  // maxWidth: pxToRem(420),
4320
4338
  textAlign: "center",
@@ -4341,7 +4359,7 @@ const useStyles$5 = makeStyles((theme) => ({
4341
4359
  const useRectangleStyles = makeStyles((theme) => ({
4342
4360
  rectangle: {
4343
4361
  width: "100%",
4344
- height: pxToRem(80),
4362
+ height: "4rem",
4345
4363
  borderRadius: pxToRem(12),
4346
4364
  padding: pxToRem(16),
4347
4365
  display: "flex",
@@ -4418,11 +4436,16 @@ const useRectangleStyles = makeStyles((theme) => ({
4418
4436
  },
4419
4437
  title: {
4420
4438
  fontFamily: "Manrope, sans-serif",
4421
- fontSize: pxToRem(16),
4422
- fontWeight: 800,
4439
+ fontSize: pxToRem(14),
4440
+ fontWeight: 600,
4423
4441
  lineHeight: pxToRem(21),
4424
4442
  color: "#1F2B4D",
4425
4443
  marginBottom: pxToRem(2),
4444
+ overflow: "hidden",
4445
+ textOverflow: "ellipsis",
4446
+ display: "-webkit-box",
4447
+ WebkitLineClamp: 2,
4448
+ WebkitBoxOrient: "vertical",
4426
4449
  },
4427
4450
  description: {
4428
4451
  fontFamily: "Manrope, sans-serif",
@@ -4434,7 +4457,18 @@ const useRectangleStyles = makeStyles((theme) => ({
4434
4457
  }));
4435
4458
  const Rectangle = ({ type, icon, title, description, onClick, hoverable }) => {
4436
4459
  const classes = useRectangleStyles();
4437
- return (jsx("div", { className: `${classes.rectangle} ${classes[type]} ${hoverable ? classes.rectangleHoverable : ''}`, onClick: onClick, children: jsxs("div", { className: classes.textContainer, children: [jsx(Typography, { className: classes.title, children: title }), jsx(Typography, { className: classes.description, children: description })] }) }));
4460
+ const titleRef = useRef(null);
4461
+ const [isTruncated, setIsTruncated] = useState(false);
4462
+ const checkTruncation = useCallback(() => {
4463
+ const el = titleRef.current;
4464
+ if (el) {
4465
+ setIsTruncated(el.scrollHeight > el.clientHeight);
4466
+ }
4467
+ }, []);
4468
+ useEffect(() => {
4469
+ checkTruncation();
4470
+ }, [title, checkTruncation]);
4471
+ return (jsxs("div", { className: `${classes.rectangle} ${classes[type]} ${hoverable ? classes.rectangleHoverable : ''}`, onClick: onClick, title: isTruncated ? title : null, children: [jsxs("div", { className: classes.textContainer, children: [jsx(Typography, { className: classes.title, ref: titleRef, children: title }), jsx(Typography, { className: classes.description, children: description })] }), jsx("div", { className: classes.iconContainer, children: jsx("div", { className: classes.icon, children: icon }) })] }));
4438
4472
  };
4439
4473
  const ChatPlaceholder = (props) => {
4440
4474
  const { dateFormat, chatDataRef, currentMode, setShowChatPlaceholder, setLoader, setCurrentAgentId, baseUrl, setBaseUrl, setCurrentSessionId, customChatConfig, chatDataInfoRef, setChatDataState, userInput, legacyAgentScreen, activeConversationId, chatBodyRef, chatbotContext, setInitValue, setSessionId, thinkingContent, setThinkingContent, isThinking, setIsThinking, chatId, setChatId, isStop, setIsStop, functionsRef, functionsState, setFunctionsState, thinkingHeaderMessage, setThinkingHeaderMessage, uniqueChatId, setUniqueChatId, fieldNumber, setFieldNumber, setAdditionalArgs, questions, displayQuestions } = props;
@@ -4561,7 +4595,7 @@ const ChatPlaceholder = (props) => {
4561
4595
  agentId: card.agentId || card.id
4562
4596
  }));
4563
4597
  const dataToMap = legacyAgentScreen || displayQuestions ? transformedCardList : rectangleData;
4564
- return (jsxs("div", { className: classes.placeholderContainer, children: [jsx("div", { className: classes.centerIconContainer, children: jsx(SvgCenter3D, { className: classes.centerIcon }) }), jsx(Typography, { variant: "h1", className: classes.heading, children: "Alan's Capabilities" }), jsx(Typography, { variant: "body1", className: classes.headingHelperText, children: "Discover potential issues & opportunities Alan can help you with!" }), jsx("div", { className: classes.rectanglesContainer, children: dataToMap.map((item, index) => (jsx(Rectangle, { type: item.type, icon: item.icon, title: item.title, description: item.description, onClick: () => handleRectangleClick(item?.agentId, item?.title), hoverable: legacyAgentScreen || displayQuestions }, index))) })] }));
4598
+ return (jsxs("div", { className: classes.placeholderContainer, children: [jsx("div", { className: classes.centerIconContainer, children: jsx(SvgCenter3D, { className: classes.centerIcon }) }), jsxs("div", { className: classes.headingContainer, children: [jsx(Typography, { variant: "h1", className: classes.heading, children: "Alan's Capabilities" }), jsx("span", { className: classes.alphaTag, children: "Alpha" })] }), jsx(Typography, { variant: "body1", className: classes.headingHelperText, children: "Discover potential issues & opportunities Alan can help you with!" }), jsx("div", { className: classes.rectanglesContainer, children: dataToMap.map((item, index) => (jsx(Rectangle, { type: item.type, icon: item.icon, title: item.title, description: item.description, onClick: () => handleRectangleClick(item?.agentId, item?.title), hoverable: legacyAgentScreen || displayQuestions }, index))) })] }));
4565
4599
  };
4566
4600
 
4567
4601
  const dateFormat = "DD-MM-YYYY HH:mm:ss";