@elliemae/ds-chat 3.5.0-rc.7 → 3.5.1-next.0
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/cjs/exported-related/bubble/ChatBubble.js +63 -33
- package/dist/cjs/exported-related/bubble/ChatBubble.js.map +1 -1
- package/dist/cjs/exported-related/bubble/ChatBubbleArrow.js +83 -60
- package/dist/cjs/exported-related/bubble/ChatBubbleArrow.js.map +2 -2
- package/dist/cjs/exported-related/chat-card/ChatCard.js +28 -14
- package/dist/cjs/exported-related/chat-card/ChatCard.js.map +2 -2
- package/dist/cjs/exported-related/chat-card/props.js +2 -1
- package/dist/cjs/exported-related/chat-card/props.js.map +1 -1
- package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js +20 -13
- package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/dist/cjs/exported-related/chat-empty-state/ChatEmptyState.js +31 -19
- package/dist/cjs/exported-related/chat-empty-state/ChatEmptyState.js.map +2 -2
- package/dist/cjs/exported-related/chat-empty-state/props.js +2 -1
- package/dist/cjs/exported-related/chat-empty-state/props.js.map +1 -1
- package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js +22 -16
- package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
- package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +16 -9
- package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
- package/dist/cjs/exported-related/floating-button/FloatingButton.js +7 -6
- package/dist/cjs/exported-related/floating-button/FloatingButton.js.map +2 -2
- package/dist/cjs/exported-related/grid-influencer/InfluencerContainer.js +8 -3
- package/dist/cjs/exported-related/grid-influencer/InfluencerContainer.js.map +1 -1
- package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js +14 -8
- package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js.map +2 -2
- package/dist/cjs/exported-related/system-message/SystemMessage.js +24 -12
- package/dist/cjs/exported-related/system-message/SystemMessage.js.map +2 -2
- package/dist/cjs/exported-related/tile-button/TileButton.js +59 -35
- package/dist/cjs/exported-related/tile-button/TileButton.js.map +1 -1
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js +85 -60
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/dist/cjs/parts/chat-container/ChatContainer.js +64 -50
- package/dist/cjs/parts/chat-container/ChatContainer.js.map +1 -1
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +64 -37
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/dist/esm/exported-related/bubble/ChatBubble.js +63 -33
- package/dist/esm/exported-related/bubble/ChatBubble.js.map +1 -1
- package/dist/esm/exported-related/bubble/ChatBubbleArrow.js +83 -60
- package/dist/esm/exported-related/bubble/ChatBubbleArrow.js.map +2 -2
- package/dist/esm/exported-related/chat-card/ChatCard.js +28 -14
- package/dist/esm/exported-related/chat-card/ChatCard.js.map +2 -2
- package/dist/esm/exported-related/chat-card/props.js +2 -1
- package/dist/esm/exported-related/chat-card/props.js.map +1 -1
- package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js +20 -13
- package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/dist/esm/exported-related/chat-empty-state/ChatEmptyState.js +31 -19
- package/dist/esm/exported-related/chat-empty-state/ChatEmptyState.js.map +2 -2
- package/dist/esm/exported-related/chat-empty-state/props.js +2 -1
- package/dist/esm/exported-related/chat-empty-state/props.js.map +1 -1
- package/dist/esm/exported-related/chat-sidebar/SideBarChat.js +22 -16
- package/dist/esm/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
- package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +16 -9
- package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
- package/dist/esm/exported-related/floating-button/FloatingButton.js +7 -6
- package/dist/esm/exported-related/floating-button/FloatingButton.js.map +2 -2
- package/dist/esm/exported-related/grid-influencer/InfluencerContainer.js +8 -3
- package/dist/esm/exported-related/grid-influencer/InfluencerContainer.js.map +1 -1
- package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js +14 -8
- package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js.map +2 -2
- package/dist/esm/exported-related/system-message/SystemMessage.js +24 -12
- package/dist/esm/exported-related/system-message/SystemMessage.js.map +2 -2
- package/dist/esm/exported-related/tile-button/TileButton.js +59 -35
- package/dist/esm/exported-related/tile-button/TileButton.js.map +1 -1
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js +85 -60
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/dist/esm/parts/chat-container/ChatContainer.js +64 -50
- package/dist/esm/parts/chat-container/ChatContainer.js.map +1 -1
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +64 -37
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
5
|
import { WarningCircleFill } from "@elliemae/ds-icons";
|
|
@@ -19,39 +20,68 @@ const ChatBubble = (props) => {
|
|
|
19
20
|
useValidateTypescriptPropTypes(propsWithDefault, BubblesPropTypes);
|
|
20
21
|
const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;
|
|
21
22
|
const bodyParts = React2.useMemo(() => typeof body === "string" ? body.split("\n") : [body], [body]);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
"data-testid": `ds-chat-bubble-${dsId}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
return /* @__PURE__ */ jsxs(StyledWrapper, {
|
|
24
|
+
"data-testid": `ds-chat-bubble-${dsId}`,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsxs(StyledColoredBubble, {
|
|
27
|
+
type,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(StyledTitleBubble, {
|
|
30
|
+
cols: [1, "auto"],
|
|
31
|
+
gutter: "xs",
|
|
32
|
+
alignItems: "flex-end",
|
|
33
|
+
className: "sr-only",
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsx(StyledTitleLeftBubble, {
|
|
36
|
+
alignItems: "center",
|
|
37
|
+
"data-testid": `chat-bubble-title-${dsId}`,
|
|
38
|
+
children: title
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ jsx(StyledTitleRightBubble, {
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
type,
|
|
43
|
+
"data-testid": `chat-bubble-time-${dsId}`,
|
|
44
|
+
children: time
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx(StyleBodyWrapper, {
|
|
49
|
+
"data-testid": `chat-bubble-body-${dsId}`,
|
|
50
|
+
children: bodyParts.map((item, index) => /* @__PURE__ */ jsxs(React2.Fragment, {
|
|
51
|
+
children: [
|
|
52
|
+
item,
|
|
53
|
+
index < bodyParts.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
|
|
54
|
+
]
|
|
55
|
+
}, `${item}-${dsId}`))
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ jsx(ChatBubbleArrow, {
|
|
58
|
+
type
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}),
|
|
62
|
+
errorMessage ? /* @__PURE__ */ jsxs(StyleErrorMessage, {
|
|
63
|
+
"data-testid": `chat-bubble-error-message-${dsId}`,
|
|
64
|
+
p: "xxs",
|
|
65
|
+
gutter: "xxs",
|
|
66
|
+
cols: [1, "auto"],
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx("span", {
|
|
69
|
+
children: errorMessage
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ jsx(WarningCircleFill, {})
|
|
72
|
+
]
|
|
73
|
+
}) : null,
|
|
74
|
+
helpMessage ? /* @__PURE__ */ jsx(StyleHelpMessage, {
|
|
75
|
+
"data-testid": `chat-bubble-help-message-${dsId}`,
|
|
76
|
+
p: "xxs",
|
|
77
|
+
gutter: "xxs",
|
|
78
|
+
cols: [1, "auto"],
|
|
79
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
80
|
+
children: helpMessage
|
|
81
|
+
})
|
|
82
|
+
}) : null
|
|
83
|
+
]
|
|
84
|
+
});
|
|
55
85
|
};
|
|
56
86
|
ChatBubble.propTypes = BubblesPropTypes;
|
|
57
87
|
ChatBubble.displayName = "ChatBubble";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/bubble/ChatBubble.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { WarningCircleFill } from '@elliemae/ds-icons';\nimport {\n StyledWrapper,\n StyledColoredBubble,\n StyledTitleBubble,\n StyledTitleLeftBubble,\n StyledTitleRightBubble,\n StyleBodyWrapper,\n StyleErrorMessage,\n StyleHelpMessage,\n} from './styled';\nimport { BubblesPropTypes, BubblePropsT, defaultBubbleProps } from './props';\nimport { ChatBubbleArrow } from './ChatBubbleArrow';\n\nconst ChatBubble: React.ComponentType<BubblePropsT> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultBubbleProps);\n useValidateTypescriptPropTypes(propsWithDefault, BubblesPropTypes);\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = propsWithDefault;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n return (\n <StyledWrapper data-testid={`ds-chat-bubble-${dsId}`}>\n <StyledColoredBubble type={type}>\n <StyledTitleBubble cols={[1, 'auto']} gutter=\"xs\" alignItems=\"flex-end\" className=\"sr-only\">\n <StyledTitleLeftBubble alignItems=\"center\" data-testid={`chat-bubble-title-${dsId}`}>\n {title}\n </StyledTitleLeftBubble>\n <StyledTitleRightBubble alignItems=\"center\" type={type} data-testid={`chat-bubble-time-${dsId}`}>\n {time}\n </StyledTitleRightBubble>\n </StyledTitleBubble>\n <StyleBodyWrapper data-testid={`chat-bubble-body-${dsId}`}>\n {bodyParts.map((item, index) => (\n <React.Fragment key={`${item}-${dsId}`}>\n {item}\n {index < bodyParts.length - 1 ? <br /> : null}\n </React.Fragment>\n ))}\n </StyleBodyWrapper>\n <ChatBubbleArrow type={type} />\n </StyledColoredBubble>\n {errorMessage ? (\n <StyleErrorMessage data-testid={`chat-bubble-error-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{errorMessage}</span>\n <WarningCircleFill />\n </StyleErrorMessage>\n ) : null}\n {helpMessage ? (\n <StyleHelpMessage data-testid={`chat-bubble-help-message-${dsId}`} p=\"xxs\" gutter=\"xxs\" cols={[1, 'auto']}>\n <span>{helpMessage}</span>\n </StyleHelpMessage>\n ) : null}\n </StyledWrapper>\n );\n};\n\nChatBubble.propTypes = BubblesPropTypes as WeakValidationMap<unknown>;\nChatBubble.displayName = 'ChatBubble';\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = BubblesPropTypes as WeakValidationMap<unknown>;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAgC,0BAA0B;AACnE,SAAS,uBAAuB;AAEhC,MAAM,aAAgD,CAAC,UAAU;AAC/D,QAAM,mBAAmB,6BAA6B,OAAO,kBAAkB;AAC/E,iCAA+B,kBAAkB,gBAAgB;AAEjE,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,YAAY,IAAI;AACrE,QAAM,YAAYA,OAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,GAAI,CAAC,IAAI,CAAC;AACpG,SACE,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAkC;AACzC,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,yBAAyB;AAClC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAgC,0BAA0B;AACnE,SAAS,uBAAuB;AAEhC,MAAM,aAAgD,CAAC,UAAU;AAC/D,QAAM,mBAAmB,6BAA6B,OAAO,kBAAkB;AAC/E,iCAA+B,kBAAkB,gBAAgB;AAEjE,QAAM,EAAE,MAAM,MAAM,OAAO,MAAM,MAAM,cAAc,YAAY,IAAI;AACrE,QAAM,YAAYA,OAAM,QAAQ,MAAO,OAAO,SAAS,WAAW,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,GAAI,CAAC,IAAI,CAAC;AACpG,SACE,qBAAC;AAAA,IAAc,eAAa,kBAAkB;AAAA,IAC5C;AAAA,2BAAC;AAAA,QAAoB;AAAA,QACnB;AAAA,+BAAC;AAAA,YAAkB,MAAM,CAAC,GAAG,MAAM;AAAA,YAAG,QAAO;AAAA,YAAK,YAAW;AAAA,YAAW,WAAU;AAAA,YAChF;AAAA,kCAAC;AAAA,gBAAsB,YAAW;AAAA,gBAAS,eAAa,qBAAqB;AAAA,gBAC1E;AAAA,eACH;AAAA,cACA,oBAAC;AAAA,gBAAuB,YAAW;AAAA,gBAAS;AAAA,gBAAY,eAAa,oBAAoB;AAAA,gBACtF;AAAA,eACH;AAAA;AAAA,WACF;AAAA,UACA,oBAAC;AAAA,YAAiB,eAAa,oBAAoB;AAAA,YAChD,oBAAU,IAAI,CAAC,MAAM,UACpB,qBAACA,OAAM,UAAN;AAAA,cACE;AAAA;AAAA,gBACA,QAAQ,UAAU,SAAS,IAAI,oBAAC,QAAG,IAAK;AAAA;AAAA,eAFtB,GAAG,QAAQ,MAGhC,CACD;AAAA,WACH;AAAA,UACA,oBAAC;AAAA,YAAgB;AAAA,WAAY;AAAA;AAAA,OAC/B;AAAA,MACC,eACC,qBAAC;AAAA,QAAkB,eAAa,6BAA6B;AAAA,QAAQ,GAAE;AAAA,QAAM,QAAO;AAAA,QAAM,MAAM,CAAC,GAAG,MAAM;AAAA,QACxG;AAAA,8BAAC;AAAA,YAAM;AAAA,WAAa;AAAA,UACpB,oBAAC,qBAAkB;AAAA;AAAA,OACrB,IACE;AAAA,MACH,cACC,oBAAC;AAAA,QAAiB,eAAa,4BAA4B;AAAA,QAAQ,GAAE;AAAA,QAAM,QAAO;AAAA,QAAM,MAAM,CAAC,GAAG,MAAM;AAAA,QACtG,8BAAC;AAAA,UAAM;AAAA,SAAY;AAAA,OACrB,IACE;AAAA;AAAA,GACN;AAEJ;AAEA,WAAW,YAAY;AACvB,WAAW,cAAc;AACzB,MAAM,uBAAuB,SAAS,UAAU;AAChD,qBAAqB,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,66 +1,89 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { StyledBubbleArrow } from "./styled";
|
|
4
4
|
import { BUBBLE_TYPES, propsArrowBubble } from "./props";
|
|
5
|
-
const ChatBubbleArrow = ({ type }) => /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
5
|
+
const ChatBubbleArrow = ({ type }) => /* @__PURE__ */ jsx(StyledBubbleArrow, {
|
|
6
|
+
children: type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ jsxs("svg", {
|
|
7
|
+
width: "15px",
|
|
8
|
+
height: "14px",
|
|
9
|
+
viewBox: "0 0 15 14",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ jsxs("defs", {
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx("path", {
|
|
14
|
+
d: "M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z",
|
|
15
|
+
id: "path-chat-bubble"
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsxs("filter", {
|
|
18
|
+
x: "-55.6%",
|
|
19
|
+
y: "-50.0%",
|
|
20
|
+
width: "211.1%",
|
|
21
|
+
height: "225.0%",
|
|
22
|
+
filterUnits: "objectBoundingBox",
|
|
23
|
+
id: "filter-2",
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ jsx("feOffset", {
|
|
26
|
+
dx: "2.3",
|
|
27
|
+
dy: "1.2",
|
|
28
|
+
in: "SourceAlpha",
|
|
29
|
+
result: "shadowOffsetOuter1"
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx("feGaussianBlur", {
|
|
32
|
+
stdDeviation: "1.5",
|
|
33
|
+
in: "shadowOffsetOuter1",
|
|
34
|
+
result: "shadowBlurOuter1"
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx("feColorMatrix", {
|
|
37
|
+
values: "0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0",
|
|
38
|
+
type: "matrix",
|
|
39
|
+
in: "shadowBlurOuter1"
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ jsx("g", {
|
|
46
|
+
id: "[DSK]-Visual-Design",
|
|
47
|
+
stroke: "none",
|
|
48
|
+
strokeWidth: "1",
|
|
49
|
+
fill: "none",
|
|
50
|
+
fillRule: "evenodd",
|
|
51
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
52
|
+
id: "Path-Copy",
|
|
53
|
+
transform: "translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) ",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx("use", {
|
|
56
|
+
fill: "black",
|
|
57
|
+
fillOpacity: "1",
|
|
58
|
+
filter: "url(#filter-2)",
|
|
59
|
+
xlinkHref: "#path-chat-bubble"
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ jsx("use", {
|
|
62
|
+
fill: "#FFFFFF",
|
|
63
|
+
fillRule: "evenodd",
|
|
64
|
+
xlinkHref: "#path-chat-bubble"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
}) : /* @__PURE__ */ jsx("svg", {
|
|
71
|
+
width: "9px",
|
|
72
|
+
height: "8px",
|
|
73
|
+
viewBox: "0 0 9 8",
|
|
74
|
+
children: /* @__PURE__ */ jsx("g", {
|
|
75
|
+
stroke: "none",
|
|
76
|
+
strokeWidth: "1",
|
|
77
|
+
fill: "none",
|
|
78
|
+
fillRule: "evenodd",
|
|
79
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
80
|
+
d: "M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z",
|
|
81
|
+
id: "Path",
|
|
82
|
+
fill: "#1E79C2"
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
});
|
|
64
87
|
ChatBubbleArrow.propTypes = propsArrowBubble;
|
|
65
88
|
export {
|
|
66
89
|
ChatBubbleArrow
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/bubble/ChatBubbleArrow.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { StyledBubbleArrow } from './styled';\nimport { BUBBLE_TYPES, BubblePropsT, propsArrowBubble } from './props';\n\nexport const ChatBubbleArrow: React.ComponentType<Pick<BubblePropsT, 'type'>> = ({ type }) => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\n <defs>\n <path\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n id=\"path-chat-bubble\"\n ></path>\n <filter x=\"-55.6%\" y=\"-50.0%\" width=\"211.1%\" height=\"225.0%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g id=\"[DSK]-Visual-Design\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Path-Copy\" transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use fill=\"black\" fillOpacity=\"1\" filter=\"url(#filter-2)\" xlinkHref=\"#path-chat-bubble\"></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref=\"#path-chat-bubble\"></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"9px\" height=\"8px\" viewBox=\"0 0 9 8\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n id=\"Path\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nChatBubbleArrow.propTypes = propsArrowBubble as WeakValidationMap<unknown>;\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,yBAAyB;AAClC,SAAS,cAA4B,wBAAwB;AAEtD,MAAM,kBAAmE,CAAC,EAAE,KAAK,MACtF,oBAAC;AAAA,EACE,mBAAS,aAAa,YACrB,qBAAC;AAAA,IAAI,OAAM;AAAA,IAAO,QAAO;AAAA,IAAO,SAAQ;AAAA,IACtC;AAAA,2BAAC;AAAA,QACC;AAAA,8BAAC;AAAA,YACC,GAAE;AAAA,YACF,IAAG;AAAA,WACJ;AAAA,UACD,qBAAC;AAAA,YAAO,GAAE;AAAA,YAAS,GAAE;AAAA,YAAS,OAAM;AAAA,YAAS,QAAO;AAAA,YAAS,aAAY;AAAA,YAAoB,IAAG;AAAA,YAC9F;AAAA,kCAAC;AAAA,gBAAS,IAAG;AAAA,gBAAM,IAAG;AAAA,gBAAM,IAAG;AAAA,gBAAc,QAAO;AAAA,eAAqB;AAAA,cACzE,oBAAC;AAAA,gBAAe,cAAa;AAAA,gBAAM,IAAG;AAAA,gBAAqB,QAAO;AAAA,eAAmB;AAAA,cACrF,oBAAC;AAAA,gBACC,QAAO;AAAA,gBAIP,MAAK;AAAA,gBACL,IAAG;AAAA,eACJ;AAAA;AAAA,WACH;AAAA;AAAA,OACF;AAAA,MACA,oBAAC;AAAA,QAAE,IAAG;AAAA,QAAsB,QAAO;AAAA,QAAO,aAAY;AAAA,QAAI,MAAK;AAAA,QAAO,UAAS;AAAA,QAC7E,+BAAC;AAAA,UAAE,IAAG;AAAA,UAAY,WAAU;AAAA,UAC1B;AAAA,gCAAC;AAAA,cAAI,MAAK;AAAA,cAAQ,aAAY;AAAA,cAAI,QAAO;AAAA,cAAiB,WAAU;AAAA,aAAoB;AAAA,YACxF,oBAAC;AAAA,cAAI,MAAK;AAAA,cAAU,UAAS;AAAA,cAAU,WAAU;AAAA,aAAoB;AAAA;AAAA,SACvE;AAAA,OACF;AAAA;AAAA,GACF,IAEA,oBAAC;AAAA,IAAI,OAAM;AAAA,IAAM,QAAO;AAAA,IAAM,SAAQ;AAAA,IACpC,8BAAC;AAAA,MAAE,QAAO;AAAA,MAAO,aAAY;AAAA,MAAI,MAAK;AAAA,MAAO,UAAS;AAAA,MACpD,8BAAC;AAAA,QACC,GAAE;AAAA,QACF,IAAG;AAAA,QACH,MAAK;AAAA,OACN;AAAA,KACH;AAAA,GACF;AAAA,CAEJ;AAGF,gBAAgB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
4
|
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
5
5
|
import { propTypes, defaultProps } from "./props";
|
|
@@ -8,20 +8,34 @@ const ChatCard = (props) => {
|
|
|
8
8
|
const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);
|
|
9
9
|
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
10
10
|
const { title, content, time, rightAddon } = props;
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsxs(Wrapper, {
|
|
12
12
|
cols: ["1fr", "auto"],
|
|
13
|
-
"data-testid": "chat-card-wrapper"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
"data-testid": "chat-card-wrapper",
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsxs(MainContent, {
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Title, {
|
|
18
|
+
"data-testid": "chat-card-title",
|
|
19
|
+
children: title
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ jsx(Content, {
|
|
22
|
+
"data-testid": "chat-card-content",
|
|
23
|
+
children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, {
|
|
24
|
+
value: content
|
|
25
|
+
})
|
|
26
|
+
}),
|
|
27
|
+
time && /* @__PURE__ */ jsx(Time, {
|
|
28
|
+
"data-testid": "chat-card-time",
|
|
29
|
+
children: time
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
}),
|
|
33
|
+
rightAddon && /* @__PURE__ */ jsx(RightAddon, {
|
|
34
|
+
"data-testid": "chat-card-right-addon",
|
|
35
|
+
children: rightAddon
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
25
39
|
};
|
|
26
40
|
ChatCard.propTypes = propTypes;
|
|
27
41
|
ChatCard.displayName = "ChatCard";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-card/ChatCard.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { propTypes, CardPropTypes, defaultProps } from './props';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\n\nconst ChatCard: React.ComponentType<CardPropTypes> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid=\"chat-card-wrapper\">\n <MainContent>\n <Title data-testid=\"chat-card-title\">{title}</Title>\n <Content data-testid=\"chat-card-content\">\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid=\"chat-card-time\">{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid=\"chat-card-right-addon\">{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes as WeakValidationMap<unknown>;\nChatCard.displayName = 'ChatCard';\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { ChatCard, ChatCardWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AACA,SAAS,UAAU,gCAAgC,oCAAoC;AAEvF,SAAS,kCAAkC;AAC3C,SAAS,WAA0B,oBAAoB;AACvD,SAAS,SAAS,aAAa,OAAO,SAAS,MAAM,kBAAkB;AAEvE,MAAM,WAA+C,CAAC,UAAU;AAC9D,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,SAAS;AAE1D,QAAM,EAAE,OAAO,SAAS,MAAM,WAAW,IAAI;AAC7C,SACE,qBAAC;AAAA,IAAQ,MAAM,CAAC,OAAO,MAAM;AAAA,IAAG,eAAY;AAAA,IAC1C;AAAA,2BAAC;AAAA,QACC;AAAA,8BAAC;AAAA,YAAM,eAAY;AAAA,YAAmB;AAAA,WAAM;AAAA,UAC5C,oBAAC;AAAA,YAAQ,eAAY;AAAA,YACnB,8BAAC;AAAA,cAA2B,OAAO;AAAA,aAAS;AAAA,WAC9C;AAAA,UACC,QAAQ,oBAAC;AAAA,YAAK,eAAY;AAAA,YAAkB;AAAA,WAAK;AAAA;AAAA,OACpD;AAAA,MACC,cAAc,oBAAC;AAAA,QAAW,eAAY;AAAA,QAAyB;AAAA,OAAW;AAAA;AAAA,GAC7E;AAEJ;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
3
|
import { PropTypes } from "@elliemae/ds-utilities";
|
|
3
4
|
const defaultProps = {
|
|
4
5
|
title: "",
|
|
5
6
|
content: "",
|
|
6
7
|
time: "",
|
|
7
|
-
rightAddon: /* @__PURE__ */
|
|
8
|
+
rightAddon: /* @__PURE__ */ jsx(Fragment, {})
|
|
8
9
|
};
|
|
9
10
|
const propTypes = {
|
|
10
11
|
title: PropTypes.string.isRequired.description(`Card's title`),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-card/props.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const defaultProps: CardPropTypes = {\n title: '',\n content: '',\n time: '',\n rightAddon: <></>,\n};\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n\nexport interface CardPropTypes {\n title: string;\n content: string;\n time: string;\n rightAddon: JSX.Element;\n}\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,eAA8B;AAAA,EACzC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,YAAY,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAS,iBAAiB;AAEnB,MAAM,eAA8B;AAAA,EACzC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,YAAY,gCAAE;AAChB;AAEO,MAAM,YAAY;AAAA,EACvB,OAAO,UAAU,OAAO,WAAW,YAAY,cAAc;AAAA,EAC7D,SAAS,UAAU,OAAO,YAAY,gBAAgB;AAAA,EACtD,MAAM,UAAU,OAAO,YAAY,MAAM;AAAA,EACzC,YAAY,UAAU,QAAQ,YAAY,4BAA4B;AACxE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React2 from "react";
|
|
3
4
|
import {
|
|
4
5
|
describe,
|
|
@@ -18,22 +19,28 @@ const ChatContainerHeader = (props) => {
|
|
|
18
19
|
useValidateTypescriptPropTypes(propsWithDefault, propTypes);
|
|
19
20
|
const globalsAttr = useGetGlobalAttributes(propsWithDefault);
|
|
20
21
|
const { title, children } = propsWithDefault;
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(StyledChatContainerContentHeader, {
|
|
22
23
|
alignItems: "center",
|
|
23
24
|
cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
24
25
|
role: "heading",
|
|
25
|
-
...globalsAttr
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
...globalsAttr,
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ jsx(StyledChatContainerContentHeaderLabel, {
|
|
29
|
+
"data-testid": "chat-container-header-title",
|
|
30
|
+
pl: "xxs",
|
|
31
|
+
pr: "xxs",
|
|
32
|
+
children: /* @__PURE__ */ jsx(SimpleTruncatedTooltipText, {
|
|
33
|
+
value: title
|
|
34
|
+
})
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ jsx(StyledChatContainerContentHeaderActions, {
|
|
37
|
+
cols: React2.Children.toArray(children).filter(Boolean).map(() => "32px"),
|
|
38
|
+
justifyContent: "flex-end",
|
|
39
|
+
"data-testid": "chat-container-header-children",
|
|
40
|
+
children
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
37
44
|
};
|
|
38
45
|
ChatContainerHeader.propTypes = propTypes;
|
|
39
46
|
ChatContainerHeader.displayName = "ChatContainerHeader";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-container-header/ChatContainerHeader.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n} from '@elliemae/ds-utilities';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\nimport { defaultProps, propTypes, HeaderProps } from './props';\n\nconst ChatContainerHeader: React.ComponentType<HeaderProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n const globalsAttr = useGetGlobalAttributes(propsWithDefault);\n\n const { title, children } = propsWithDefault;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n role=\"heading\"\n {...globalsAttr}\n >\n <StyledChatContainerContentHeaderLabel data-testid=\"chat-container-header-title\" pl=\"xxs\" pr=\"xxs\">\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={React.Children.toArray(children)\n .filter(Boolean)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n\nChatContainerHeader.propTypes = propTypes as WeakValidationMap<unknown>;\nChatContainerHeader.displayName = 'ChatContainerHeader';\nconst ChatContainerHeaderWithSchema = describe(ChatContainerHeader);\nChatContainerHeaderWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { ChatContainerHeader, ChatContainerHeaderWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,OAAOA,YAAkC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,iBAA8B;AAErD,MAAM,sBAAwD,CAAC,UAAU;AACvE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,SAAS;AAE1D,QAAM,cAAc,uBAAuB,gBAAgB;AAE3D,QAAM,EAAE,OAAO,SAAS,IAAI;AAE5B,SACE,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAOA,YAAkC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,kCAAkC;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,iBAA8B;AAErD,MAAM,sBAAwD,CAAC,UAAU;AACvE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,SAAS;AAE1D,QAAM,cAAc,uBAAuB,gBAAgB;AAE3D,QAAM,EAAE,OAAO,SAAS,IAAI;AAE5B,SACE,qBAAC;AAAA,IACC,YAAW;AAAA,IACX,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,MAAK;AAAA,IACJ,GAAG;AAAA,IAEJ;AAAA,0BAAC;AAAA,QAAsC,eAAY;AAAA,QAA8B,IAAG;AAAA,QAAM,IAAG;AAAA,QAC3F,8BAAC;AAAA,UAA2B,OAAO;AAAA,SAAO;AAAA,OAC5C;AAAA,MACA,oBAAC;AAAA,QACC,MAAMA,OAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,QACnB,gBAAe;AAAA,QACf,eAAY;AAAA,QAEX;AAAA,OACH;AAAA;AAAA,GACF;AAEJ;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
3
4
|
import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
|
|
4
5
|
import { Grid } from "@elliemae/ds-grid";
|
|
5
6
|
import { Communications } from "@elliemae/ds-icons";
|
|
@@ -10,28 +11,39 @@ const ChatEmptyState = (props) => {
|
|
|
10
11
|
useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps);
|
|
11
12
|
const { label, action } = propsWithDefault;
|
|
12
13
|
const MainContent = useMemo(
|
|
13
|
-
() => /* @__PURE__ */
|
|
14
|
+
() => /* @__PURE__ */ jsxs(Grid, {
|
|
14
15
|
alignItems: "center",
|
|
15
|
-
justifyContent: "center"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
justifyContent: "center",
|
|
21
|
+
children: /* @__PURE__ */ jsx(Communications, {
|
|
22
|
+
size: "xxl",
|
|
23
|
+
color: ["neutral", 400]
|
|
24
|
+
})
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
children: /* @__PURE__ */ jsx(MessageWrapper, {
|
|
30
|
+
children: label
|
|
31
|
+
})
|
|
32
|
+
}),
|
|
33
|
+
/* @__PURE__ */ jsx(Grid, {
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
justifyContent: "center",
|
|
36
|
+
children: action
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}),
|
|
29
40
|
[label, action]
|
|
30
41
|
);
|
|
31
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ jsx(ChatEmptyStateWrapper, {
|
|
32
43
|
alignItems: "center",
|
|
33
|
-
justifyContent: "center"
|
|
34
|
-
|
|
44
|
+
justifyContent: "center",
|
|
45
|
+
children: MainContent
|
|
46
|
+
});
|
|
35
47
|
};
|
|
36
48
|
ChatEmptyState.propTypes = emptyStateProps;
|
|
37
49
|
ChatEmptyState.displayName = "ChatEmptyState";
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-empty-state/ChatEmptyState.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useMemo, WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport { ChatEmptyStateProps, emptyStateProps, defaultProps } from './props';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled';\n\nconst ChatEmptyState: React.ComponentType<ChatEmptyStateProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps);\n\n const { label, action } = propsWithDefault;\n const MainContent = useMemo(\n () => (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Communications size=\"xxl\" color={['neutral', 400]} />\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <MessageWrapper>{label}</MessageWrapper>\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {action}\n </Grid>\n </Grid>\n ),\n [label, action],\n );\n return (\n <ChatEmptyStateWrapper alignItems=\"center\" justifyContent=\"center\">\n {MainContent}\n </ChatEmptyStateWrapper>\n );\n};\n\nChatEmptyState.propTypes = emptyStateProps as WeakValidationMap<unknown>;\nChatEmptyState.displayName = 'ChatEmptyState';\nconst ChatEmptyStateWithSchema = describe(ChatEmptyState);\nChatEmptyStateWithSchema.propTypes = emptyStateProps as WeakValidationMap<unknown>;\n\nexport { ChatEmptyState, ChatEmptyStateWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
6
|
-
"names": [
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAgB,eAAkC;AAClD,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAC/B,SAA8B,iBAAiB,oBAAoB;AACnE,SAAS,uBAAuB,sBAAsB;AAEtD,MAAM,iBAA2D,CAAC,UAAU;AAC1E,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,eAAe;AAEhE,QAAM,EAAE,OAAO,OAAO,IAAI;AAC1B,QAAM,cAAc;AAAA,IAClB,MACE,qBAAC;AAAA,MAAK,YAAW;AAAA,MAAS,gBAAe;AAAA,MACvC;AAAA,4BAAC;AAAA,UAAK,YAAW;AAAA,UAAS,gBAAe;AAAA,UACvC,8BAAC;AAAA,YAAe,MAAK;AAAA,YAAM,OAAO,CAAC,WAAW,GAAG;AAAA,WAAG;AAAA,SACtD;AAAA,QACA,oBAAC;AAAA,UAAK,YAAW;AAAA,UAAS,gBAAe;AAAA,UACvC,8BAAC;AAAA,YAAgB;AAAA,WAAM;AAAA,SACzB;AAAA,QACA,oBAAC;AAAA,UAAK,YAAW;AAAA,UAAS,gBAAe;AAAA,UACtC;AAAA,SACH;AAAA;AAAA,KACF;AAAA,IAEF,CAAC,OAAO,MAAM;AAAA,EAChB;AACA,SACE,oBAAC;AAAA,IAAsB,YAAW;AAAA,IAAS,gBAAe;AAAA,IACvD;AAAA,GACH;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
3
|
import { PropTypes } from "@elliemae/ds-utilities";
|
|
3
4
|
const defaultProps = {
|
|
4
5
|
label: "No Messages Yet",
|
|
5
|
-
action: /* @__PURE__ */
|
|
6
|
+
action: /* @__PURE__ */ jsx(Fragment, {})
|
|
6
7
|
};
|
|
7
8
|
const emptyStateProps = {
|
|
8
9
|
label: PropTypes.string.description("No Message to show text helper").defaultValue(defaultProps.label),
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-empty-state/props.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport interface ChatEmptyStateProps {\n label: string;\n action: JSX.Element;\n}\n\nexport const defaultProps: ChatEmptyStateProps = {\n label: 'No Messages Yet',\n action: <></>,\n};\n\nexport const emptyStateProps = {\n label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element').defaultValue(defaultProps.action),\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAOnB,MAAM,eAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,QAAQ,
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,SAAS,iBAAiB;AAOnB,MAAM,eAAoC;AAAA,EAC/C,OAAO;AAAA,EACP,QAAQ,gCAAE;AACZ;AAEO,MAAM,kBAAkB;AAAA,EAC7B,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,aAAa,KAAK;AAAA,EACrG,QAAQ,UAAU,KAAK,YAAY,gBAAgB,EAAE,aAAa,aAAa,MAAM;AACvF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|