impact-chatbot 2.3.13 → 2.3.15
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/core/styles/colours.d.ts +2 -0
- package/dist/index.cjs.js +42 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +42 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2815,6 +2815,8 @@ const colours = {
|
|
|
2815
2815
|
oceanGreen: "#3BB273",
|
|
2816
2816
|
linen: "#FCEEEE",
|
|
2817
2817
|
greyishBlue: "#F2F4FA",
|
|
2818
|
+
denim: "#1A56DB",
|
|
2819
|
+
pattensBlue: "#DBEAFE"
|
|
2818
2820
|
};
|
|
2819
2821
|
|
|
2820
2822
|
const rem = (px) => `${px / 16}rem`;
|
|
@@ -4322,21 +4324,37 @@ const useStyles$5 = styles.makeStyles((theme) => ({
|
|
|
4322
4324
|
height: "100%",
|
|
4323
4325
|
}
|
|
4324
4326
|
},
|
|
4327
|
+
headingContainer: {
|
|
4328
|
+
display: "flex",
|
|
4329
|
+
alignItems: "center",
|
|
4330
|
+
justifyContent: "center",
|
|
4331
|
+
gap: pxToRem(8),
|
|
4332
|
+
marginBottom: pxToRem(5),
|
|
4333
|
+
},
|
|
4325
4334
|
heading: {
|
|
4326
4335
|
fontFamily: "Manrope, sans-serif",
|
|
4327
4336
|
fontSize: pxToRem(20),
|
|
4328
4337
|
fontWeight: 800,
|
|
4329
4338
|
lineHeight: pxToRem(30),
|
|
4330
|
-
color:
|
|
4331
|
-
marginBottom: pxToRem(5),
|
|
4339
|
+
color: colours.boldHeadingBlue,
|
|
4332
4340
|
textAlign: "center",
|
|
4333
4341
|
},
|
|
4342
|
+
alphaTag: {
|
|
4343
|
+
fontFamily: "Manrope, sans-serif",
|
|
4344
|
+
fontSize: pxToRem(11),
|
|
4345
|
+
fontWeight: 700,
|
|
4346
|
+
color: colours.denim,
|
|
4347
|
+
backgroundColor: colours.pattensBlue,
|
|
4348
|
+
borderRadius: pxToRem(4),
|
|
4349
|
+
padding: `${pxToRem(2)} ${pxToRem(8)}`,
|
|
4350
|
+
lineHeight: pxToRem(16),
|
|
4351
|
+
},
|
|
4334
4352
|
headingHelperText: {
|
|
4335
4353
|
fontFamily: "Manrope, sans-serif",
|
|
4336
4354
|
fontSize: pxToRem(14),
|
|
4337
4355
|
fontWeight: 400,
|
|
4338
4356
|
lineHeight: pxToRem(16),
|
|
4339
|
-
color:
|
|
4357
|
+
color: colours.boldHeadingBlue,
|
|
4340
4358
|
marginBottom: pxToRem(44),
|
|
4341
4359
|
// maxWidth: pxToRem(420),
|
|
4342
4360
|
textAlign: "center",
|
|
@@ -4363,7 +4381,7 @@ const useStyles$5 = styles.makeStyles((theme) => ({
|
|
|
4363
4381
|
const useRectangleStyles = styles.makeStyles((theme) => ({
|
|
4364
4382
|
rectangle: {
|
|
4365
4383
|
width: "100%",
|
|
4366
|
-
height:
|
|
4384
|
+
height: "4rem",
|
|
4367
4385
|
borderRadius: pxToRem(12),
|
|
4368
4386
|
padding: pxToRem(16),
|
|
4369
4387
|
display: "flex",
|
|
@@ -4440,11 +4458,16 @@ const useRectangleStyles = styles.makeStyles((theme) => ({
|
|
|
4440
4458
|
},
|
|
4441
4459
|
title: {
|
|
4442
4460
|
fontFamily: "Manrope, sans-serif",
|
|
4443
|
-
fontSize: pxToRem(
|
|
4444
|
-
fontWeight:
|
|
4461
|
+
fontSize: pxToRem(14),
|
|
4462
|
+
fontWeight: 600,
|
|
4445
4463
|
lineHeight: pxToRem(21),
|
|
4446
4464
|
color: "#1F2B4D",
|
|
4447
4465
|
marginBottom: pxToRem(2),
|
|
4466
|
+
overflow: "hidden",
|
|
4467
|
+
textOverflow: "ellipsis",
|
|
4468
|
+
display: "-webkit-box",
|
|
4469
|
+
WebkitLineClamp: 2,
|
|
4470
|
+
WebkitBoxOrient: "vertical",
|
|
4448
4471
|
},
|
|
4449
4472
|
description: {
|
|
4450
4473
|
fontFamily: "Manrope, sans-serif",
|
|
@@ -4456,7 +4479,18 @@ const useRectangleStyles = styles.makeStyles((theme) => ({
|
|
|
4456
4479
|
}));
|
|
4457
4480
|
const Rectangle = ({ type, icon, title, description, onClick, hoverable }) => {
|
|
4458
4481
|
const classes = useRectangleStyles();
|
|
4459
|
-
|
|
4482
|
+
const titleRef = React.useRef(null);
|
|
4483
|
+
const [isTruncated, setIsTruncated] = React.useState(false);
|
|
4484
|
+
const checkTruncation = React.useCallback(() => {
|
|
4485
|
+
const el = titleRef.current;
|
|
4486
|
+
if (el) {
|
|
4487
|
+
setIsTruncated(el.scrollHeight > el.clientHeight);
|
|
4488
|
+
}
|
|
4489
|
+
}, []);
|
|
4490
|
+
React.useEffect(() => {
|
|
4491
|
+
checkTruncation();
|
|
4492
|
+
}, [title, checkTruncation]);
|
|
4493
|
+
return (jsxRuntime.jsx("div", { className: `${classes.rectangle} ${classes[type]} ${hoverable ? classes.rectangleHoverable : ''}`, onClick: onClick, title: isTruncated ? title : null, children: jsxRuntime.jsxs("div", { className: classes.textContainer, children: [jsxRuntime.jsx(material.Typography, { className: classes.title, ref: titleRef, children: title }), jsxRuntime.jsx(material.Typography, { className: classes.description, children: description })] }) }));
|
|
4460
4494
|
};
|
|
4461
4495
|
const ChatPlaceholder = (props) => {
|
|
4462
4496
|
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;
|
|
@@ -4583,7 +4617,7 @@ const ChatPlaceholder = (props) => {
|
|
|
4583
4617
|
agentId: card.agentId || card.id
|
|
4584
4618
|
}));
|
|
4585
4619
|
const dataToMap = legacyAgentScreen || displayQuestions ? transformedCardList : rectangleData;
|
|
4586
|
-
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))) })] }));
|
|
4620
|
+
return (jsxRuntime.jsxs("div", { className: classes.placeholderContainer, children: [jsxRuntime.jsx("div", { className: classes.centerIconContainer, children: jsxRuntime.jsx(SvgCenter3D, { className: classes.centerIcon }) }), jsxRuntime.jsxs("div", { className: classes.headingContainer, children: [jsxRuntime.jsx(material.Typography, { variant: "h1", className: classes.heading, children: "Alan's Capabilities" }), jsxRuntime.jsx("span", { className: classes.alphaTag, children: "Alpha" })] }), 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))) })] }));
|
|
4587
4621
|
};
|
|
4588
4622
|
|
|
4589
4623
|
const dateFormat = "DD-MM-YYYY HH:mm:ss";
|