@elliemae/ds-chat 1.57.0-rc.0 → 1.57.0-rc.12
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/cjs/index.js +3 -10
- package/cjs/index.js.map +1 -1
- package/cjs/parts/bubble/ChatBubble.js +10 -4
- package/cjs/parts/bubble/ChatBubble.js.map +1 -1
- package/cjs/parts/bubble/index.js +1 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js +6 -6
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/cjs/parts/chat-composer/index.js +1 -1
- package/cjs/parts/chat-composer/props.js +2 -0
- package/cjs/parts/chat-composer/props.js.map +1 -1
- package/cjs/parts/chat-composer/styled.js +2 -2
- package/cjs/parts/chat-container/ChatContainer.js +2 -4
- package/cjs/parts/chat-container/ChatContainer.js.map +1 -1
- package/cjs/parts/chat-container/index.js +2 -4
- package/cjs/parts/chat-container/index.js.map +1 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +3 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/cjs/parts/chat-container-header/styled.js +7 -7
- package/cjs/parts/chat-container-header/styled.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +3 -3
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/index.js +2 -2
- package/cjs/parts/chat-container-messages-list/styled.js +2 -2
- package/cjs/parts/chat-container-messages-list/styled.js.map +1 -1
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +2 -3
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/cjs/parts/chat-sidebar/SideBarChat.js +2 -7
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/cjs/parts/chat-sidebar/index.js +1 -4
- package/cjs/parts/chat-sidebar/index.js.map +1 -1
- package/cjs/parts/chat-sidebar/styled.js +2 -2
- package/cjs/parts/chat-sidebar/styled.js.map +1 -1
- package/cjs/parts/floating-button/FloatingButton.js +2 -3
- package/cjs/parts/floating-button/FloatingButton.js.map +1 -1
- package/cjs/parts/floating-button/index.js +1 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js +2 -8
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/cjs/parts/sidebar-button/SidebarButton.js +1 -1
- package/cjs/parts/sidebar-button/props.js +2 -3
- package/cjs/parts/sidebar-button/props.js.map +1 -1
- package/cjs/parts/tile-button/TileButton.js +2 -4
- package/cjs/parts/tile-button/TileButton.js.map +1 -1
- package/cjs/parts/tile-button/index.js +1 -2
- package/cjs/parts/tile-button/index.js.map +1 -1
- package/cjs/parts/tile-button/props.js +2 -6
- package/cjs/parts/tile-button/props.js.map +1 -1
- package/esm/index.js +3 -10
- package/esm/index.js.map +1 -1
- package/esm/parts/bubble/ChatBubble.js +10 -3
- package/esm/parts/bubble/ChatBubble.js.map +1 -1
- package/esm/parts/bubble/index.js +1 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js +5 -4
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/esm/parts/chat-composer/index.js +1 -1
- package/esm/parts/chat-composer/props.js +2 -0
- package/esm/parts/chat-composer/props.js.map +1 -1
- package/esm/parts/chat-container/ChatContainer.js +2 -4
- package/esm/parts/chat-container/ChatContainer.js.map +1 -1
- package/esm/parts/chat-container/index.js +2 -4
- package/esm/parts/chat-container/index.js.map +1 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js +3 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/esm/parts/chat-container-header/styled.js +7 -7
- package/esm/parts/chat-container-header/styled.js.map +1 -1
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +3 -3
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/esm/parts/chat-container-messages-list/index.js +2 -2
- package/esm/parts/chat-container-messages-list/styled.js +2 -2
- package/esm/parts/chat-container-messages-list/styled.js.map +1 -1
- package/esm/parts/chat-empty-state/ChatEmptyState.js +1 -1
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +1 -4
- package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/esm/parts/chat-sidebar/index.js +1 -4
- package/esm/parts/chat-sidebar/index.js.map +1 -1
- package/esm/parts/chat-sidebar/styled.js +2 -2
- package/esm/parts/chat-sidebar/styled.js.map +1 -1
- package/esm/parts/floating-button/FloatingButton.js +1 -1
- package/esm/parts/floating-button/FloatingButton.js.map +1 -1
- package/esm/parts/floating-button/index.js +1 -1
- package/esm/parts/grid-influencer/InfluencerContainer.js +2 -8
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/esm/parts/sidebar-button/SidebarButton.js +1 -1
- package/esm/parts/sidebar-button/props.js +1 -1
- package/esm/parts/sidebar-button/props.js.map +1 -1
- package/esm/parts/tile-button/TileButton.js +1 -2
- package/esm/parts/tile-button/TileButton.js.map +1 -1
- package/esm/parts/tile-button/index.js +1 -2
- package/esm/parts/tile-button/index.js.map +1 -1
- package/esm/parts/tile-button/props.js +1 -1
- package/esm/parts/tile-button/props.js.map +1 -1
- package/package.json +9 -9
package/cjs/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var parts_systemMessage_SystemMessage = require('./parts/system-message/SystemMe
|
|
|
18
18
|
var parts_chatCard_ChatCard = require('./parts/chat-card/ChatCard.js');
|
|
19
19
|
require('react');
|
|
20
20
|
require('react-desc');
|
|
21
|
-
require('@elliemae/ds-icons
|
|
21
|
+
require('@elliemae/ds-icons');
|
|
22
22
|
require('./parts/bubble/styled.js');
|
|
23
23
|
require('styled-components');
|
|
24
24
|
require('@elliemae/ds-grid');
|
|
@@ -27,20 +27,18 @@ require('lodash');
|
|
|
27
27
|
require('./parts/bubble/config/useValidateProps.js');
|
|
28
28
|
require('@elliemae/ds-props-helpers');
|
|
29
29
|
require('./parts/bubble/ChatBubbleArrow.js');
|
|
30
|
-
require('@elliemae/ds-icons/Comments');
|
|
31
30
|
require('./parts/floating-button/styled.js');
|
|
32
31
|
require('./parts/floating-button/props.js');
|
|
33
32
|
require('./styled.js');
|
|
34
33
|
require('@elliemae/ds-truncated-tooltip-text');
|
|
35
34
|
require('./parts/chat-container-header/styled.js');
|
|
36
|
-
require('@elliemae/ds-icons/Communications');
|
|
37
35
|
require('./parts/chat-empty-state/props.js');
|
|
38
36
|
require('./parts/chat-empty-state/styled.js');
|
|
39
37
|
require('./parts/chat-empty-state/config/useValidateProps.js');
|
|
40
38
|
require('@babel/runtime/helpers/extends');
|
|
41
39
|
require('@babel/runtime/helpers/defineProperty');
|
|
42
40
|
require('react-virtual');
|
|
43
|
-
require('@elliemae/ds-
|
|
41
|
+
require('@elliemae/ds-button');
|
|
44
42
|
require('./parts/chat-container-messages-list/styled.js');
|
|
45
43
|
require('./parts/chat-container-messages-list/props.js');
|
|
46
44
|
require('./parts/chat-container-messages-list/config/useValidateProps.js');
|
|
@@ -51,13 +49,9 @@ require('./parts/system-message/style.js');
|
|
|
51
49
|
require('./parts/system-message/props.js');
|
|
52
50
|
require('./parts/system-message/config/useValidateProps.js');
|
|
53
51
|
require('@babel/runtime/helpers/slicedToArray');
|
|
54
|
-
require('@elliemae/ds-icons/PaperAirplane');
|
|
55
52
|
require('./parts/chat-composer/styled.js');
|
|
56
|
-
require('@elliemae/ds-button');
|
|
57
53
|
require('./parts/chat-composer/config/useValidateProps.js');
|
|
58
54
|
require('./parts/chat-composer/props.js');
|
|
59
|
-
require('@elliemae/ds-icons/MenuExpand');
|
|
60
|
-
require('@elliemae/ds-icons/MenuCollapse');
|
|
61
55
|
require('./parts/chat-sidebar/styled.js');
|
|
62
56
|
require('./parts/sidebar-button/SidebarButton.js');
|
|
63
57
|
require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -66,11 +60,10 @@ require('./parts/sidebar-button/props.js');
|
|
|
66
60
|
require('./parts/chat-sidebar/props.js');
|
|
67
61
|
require('./parts/chat-sidebar/config/useValidateProps.js');
|
|
68
62
|
require('@elliemae/ds-tooltip');
|
|
69
|
-
require('@elliemae/ds-icons/CloseXsmall');
|
|
70
63
|
require('./parts/tile-button/styled.js');
|
|
71
64
|
require('./parts/tile-button/props.js');
|
|
72
65
|
require('./parts/tile-button/config/useValidateProps.js');
|
|
73
|
-
require('@elliemae/ds-
|
|
66
|
+
require('@elliemae/ds-indeterminate-progress-indicator');
|
|
74
67
|
require('@elliemae/ds-banner');
|
|
75
68
|
require('./parts/chat-container/props.js');
|
|
76
69
|
require('./parts/chat-container/styled.js');
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var reactDesc = require('react-desc');
|
|
7
|
-
var
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
8
8
|
var parts_bubble_styled = require('./styled.js');
|
|
9
9
|
var parts_bubble_props = require('./props.js');
|
|
10
10
|
var parts_bubble_config_useValidateProps = require('./config/useValidateProps.js');
|
|
@@ -18,7 +18,6 @@ require('@elliemae/ds-props-helpers');
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var Warning__default = /*#__PURE__*/_interopDefaultLegacy(Warning);
|
|
22
21
|
|
|
23
22
|
var ChatBubble = function ChatBubble(props) {
|
|
24
23
|
parts_bubble_config_useValidateProps.useValidateProps(props, ChatBubbleWithSchema.toJSON());
|
|
@@ -29,6 +28,9 @@ var ChatBubble = function ChatBubble(props) {
|
|
|
29
28
|
body = props.body,
|
|
30
29
|
errorMessage = props.errorMessage,
|
|
31
30
|
helpMessage = props.helpMessage;
|
|
31
|
+
var bodyParts = React__default['default'].useMemo(function () {
|
|
32
|
+
return typeof body === 'string' ? body.split('\n') : [body];
|
|
33
|
+
}, [body]);
|
|
32
34
|
return /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyledWrapper, {
|
|
33
35
|
"data-testid": "ds-chat-bubble-".concat(dsId),
|
|
34
36
|
type: type
|
|
@@ -48,14 +50,18 @@ var ChatBubble = function ChatBubble(props) {
|
|
|
48
50
|
"data-testid": "chat-bubble-time-".concat(dsId)
|
|
49
51
|
}, time)), /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyleBodyWrapper, {
|
|
50
52
|
"data-testid": "chat-bubble-body-".concat(dsId)
|
|
51
|
-
},
|
|
53
|
+
}, bodyParts.map(function (item, index) {
|
|
54
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
|
|
55
|
+
key: item
|
|
56
|
+
}, item, index < bodyParts.length - 1 ? /*#__PURE__*/React__default['default'].createElement("br", null) : null);
|
|
57
|
+
})), /*#__PURE__*/React__default['default'].createElement(parts_bubble_ChatBubbleArrow.ChatBubbleArrow, {
|
|
52
58
|
type: type
|
|
53
59
|
})), errorMessage ? /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyleErrorMessage, {
|
|
54
60
|
"data-testid": "chat-bubble-error-message-".concat(dsId),
|
|
55
61
|
p: "xxs",
|
|
56
62
|
gutter: "xxs",
|
|
57
63
|
cols: [1, 'auto']
|
|
58
|
-
}, /*#__PURE__*/React__default['default'].createElement("span", null, errorMessage), /*#__PURE__*/React__default['default'].createElement(
|
|
64
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, errorMessage), /*#__PURE__*/React__default['default'].createElement(dsIcons.WarningCircleFill, null)) : null, helpMessage ? /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyleHelpMessage, {
|
|
59
65
|
"data-testid": "chat-bubble-help-message-".concat(dsId),
|
|
60
66
|
p: "xxs",
|
|
61
67
|
gutter: "xxs",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport
|
|
1
|
+
{"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\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 { propsBubbles, BubbleProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { ChatBubbleArrow } from './ChatBubbleArrow';\n\nconst ChatBubble = (props: BubbleProps): JSX.Element => {\n useValidateProps(props, ChatBubbleWithSchema.toJSON());\n\n const { dsId, type, title, time, body, errorMessage, helpMessage } = props;\n const bodyParts = React.useMemo(() => (typeof body === 'string' ? body.split('\\n') : [body]), [body]);\n\n return (\n <StyledWrapper data-testid={`ds-chat-bubble-${dsId}`} type={type}>\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}>\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};\nChatBubble.propTypes = propsBubbles;\n\nconst ChatBubbleWithSchema = describe(ChatBubble);\nChatBubbleWithSchema.propTypes = propsBubbles;\n\nexport { ChatBubble, ChatBubbleWithSchema };\n"],"names":["ChatBubble","props","useValidateProps","ChatBubbleWithSchema","toJSON","dsId","type","title","time","body","errorMessage","helpMessage","bodyParts","React","useMemo","split","StyledWrapper","StyledColoredBubble","StyledTitleBubble","StyledTitleLeftBubble","StyledTitleRightBubble","StyleBodyWrapper","map","item","index","length","ChatBubbleArrow","StyleErrorMessage","WarningCircleFill","StyleHelpMessage","propTypes","propsBubbles","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;IAiBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAqC;AACtDC,EAAAA,qDAAgB,CAACD,KAAD,EAAQE,oBAAoB,CAACC,MAArB,EAAR,CAAhB;AAEA,MAAQC,IAAR,GAAqEJ,KAArE,CAAQI,IAAR;AAAA,MAAcC,IAAd,GAAqEL,KAArE,CAAcK,IAAd;AAAA,MAAoBC,KAApB,GAAqEN,KAArE,CAAoBM,KAApB;AAAA,MAA2BC,IAA3B,GAAqEP,KAArE,CAA2BO,IAA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eAiBEA,wCAACa,4CAAD;AAAiB,IAAA,IAAI,EAAEpB;AAAvB,IAjBF,CADF,EAoBGI,YAAY,gBACXG,wCAACc,qCAAD;AAAmB,uDAA0CtB,IAA1C,CAAnB;AAAqE,IAAA,CAAC,EAAC,KAAvE;AAA6E,IAAA,MAAM,EAAC,KAApF;AAA0F,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAAhG,kBACEQ,sDAAOH,YAAP,CADF,eAEEG,wCAACe,yBAAD,OAFF,CADW,GAKT,IAzBN,EA0BGjB,WAAW,gBACVE,wCAACgB,oCAAD;AAAkB,sDAAyCxB,IAAzC,CAAlB;AAAmE,IAAA,CAAC,EAAC,KAArE;AAA2E,IAAA,MAAM,EAAC,KAAlF;AAAwF,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAA9F,kBACEQ,sDAAOF,WAAP,CADF,CADU,GAIR,IA9BN,CADF;AAkCD;;AACDX,UAAU,CAAC8B,SAAX,GAAuBC,+BAAvB;IAEM5B,oBAAoB,GAAG6B,kBAAQ,CAAChC,UAAD;AACrCG,oBAAoB,CAAC2B,SAArB,GAAiCC,+BAAjC;;;;;"}
|
|
@@ -6,7 +6,7 @@ var parts_bubble_ChatBubble = require('./ChatBubble.js');
|
|
|
6
6
|
var parts_bubble_props = require('./props.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('react-desc');
|
|
9
|
-
require('@elliemae/ds-icons
|
|
9
|
+
require('@elliemae/ds-icons');
|
|
10
10
|
require('./styled.js');
|
|
11
11
|
require('styled-components');
|
|
12
12
|
require('@elliemae/ds-grid');
|
|
@@ -7,7 +7,7 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var dsGrid = require('@elliemae/ds-grid');
|
|
9
9
|
var reactDesc = require('react-desc');
|
|
10
|
-
var
|
|
10
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
11
11
|
var parts_chatComposer_styled = require('./styled.js');
|
|
12
12
|
var parts_chatComposer_config_useValidateProps = require('./config/useValidateProps.js');
|
|
13
13
|
var parts_chatComposer_props = require('./props.js');
|
|
@@ -21,7 +21,6 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
22
|
var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
-
var PaperAirplane__default = /*#__PURE__*/_interopDefaultLegacy(PaperAirplane);
|
|
25
24
|
|
|
26
25
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
27
26
|
|
|
@@ -41,6 +40,7 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
41
40
|
maxHeight = _props$maxHeight === void 0 ? 300 : _props$maxHeight,
|
|
42
41
|
placeholder = props.placeholder,
|
|
43
42
|
inputMaxLength = props.inputMaxLength,
|
|
43
|
+
maxLengthMessage = props.maxLengthMessage,
|
|
44
44
|
buttonDisabled = props.buttonDisabled,
|
|
45
45
|
dataTestid = props.dataTestid,
|
|
46
46
|
actionRef = props.actionRef;
|
|
@@ -69,7 +69,7 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
69
69
|
onResize(newHeight);
|
|
70
70
|
setHeight(newHeight);
|
|
71
71
|
setShowScroll(((_inputSize$current3 = inputSize.current) === null || _inputSize$current3 === void 0 ? void 0 : _inputSize$current3.scrollHeight) - ((_inputSize$current4 = inputSize.current) === null || _inputSize$current4 === void 0 ? void 0 : _inputSize$current4.clientHeight) > 5);
|
|
72
|
-
}, [inputValue, internalMaxHeight]);
|
|
72
|
+
}, [inputValue, internalMaxHeight, onResize]);
|
|
73
73
|
React__default['default'].useEffect(function () {
|
|
74
74
|
if (actionRef && actionRef.current) {
|
|
75
75
|
actionRef.current.focusToComposer = function () {
|
|
@@ -80,7 +80,7 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
80
80
|
inputSend.current.focus();
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
}, [actionRef
|
|
83
|
+
}, [actionRef]);
|
|
84
84
|
var handleChange = React__default['default'].useCallback(function (e) {
|
|
85
85
|
onChange(e.target.value);
|
|
86
86
|
}, [onChange]);
|
|
@@ -116,7 +116,7 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
116
116
|
alignItems: "center"
|
|
117
117
|
}, /*#__PURE__*/React__default['default'].createElement(parts_chatComposer_styled.StyledComposerButton, {
|
|
118
118
|
buttonType: "text",
|
|
119
|
-
icon: /*#__PURE__*/React__default['default'].createElement(
|
|
119
|
+
icon: /*#__PURE__*/React__default['default'].createElement(dsIcons.PaperAirplane, {
|
|
120
120
|
width: 18,
|
|
121
121
|
height: 18
|
|
122
122
|
}),
|
|
@@ -150,7 +150,7 @@ var ChatComposer = function ChatComposer(props) {
|
|
|
150
150
|
"data-testid": "composer-counter-area"
|
|
151
151
|
}, inputMaxLength && hasError ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(parts_chatComposer_styled.StyledCounterErrorA11y, {
|
|
152
152
|
role: "alert"
|
|
153
|
-
}, "You have exceeded the character limit by "
|
|
153
|
+
}, maxLengthMessage || "You have exceeded the character limit by ".concat(inputLength - inputMaxLength)), maxLengthMessage || "Please limit to less than ".concat(inputMaxLength, " characters. ")) : '', inputMaxLength ? " ".concat(inputLength, " / ").concat(inputMaxLength) : ''), /*#__PURE__*/React__default['default'].createElement(dsGrid.Grid, null)));
|
|
154
154
|
};
|
|
155
155
|
|
|
156
156
|
ChatComposer.propTypes = parts_chatComposer_props.composerProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainerComposer.js","sources":["../../../../src/parts/chat-composer/ChatContainerComposer.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe } from 'react-desc';\nimport PaperAirplane from '@elliemae/ds-icons/PaperAirplane';\nimport {\n StyledChatContainerContentComposer,\n StyledComposerInput,\n StyledComposerButton,\n StyledCounterArea,\n StyledCounterErrorA11y,\n} from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nimport { defaultComposerPros, composerProps, ChatComposerProps } from './props';\n\nconst ChatComposer = (props: ChatComposerProps): JSX.Element => {\n useValidateProps(props, ChatComposerWithSchema.toJSON());\n\n const {\n inputValue,\n onChange,\n onResize,\n onSend,\n onFocus,\n onBlur,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const input = React.useRef<HTMLTextAreaElement>();\n const inputSize = React.useRef<HTMLTextAreaElement>();\n const inputSend = React.useRef<HTMLButtonElement>();\n const [height, setHeight] = React.useState(32);\n const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);\n const [showScroll, setShowScroll] = React.useState(true);\n\n React.useEffect(() => {\n const newHeight =\n inputSize.current?.scrollHeight > internalMaxHeight ? internalMaxHeight : inputSize.current?.scrollHeight;\n onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight]);\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToComposer = () => {\n input.current.focus();\n };\n actionRef.current.focusToSend = () => {\n inputSend.current.focus();\n };\n }\n }, [actionRef.current]);\n\n const handleChange = React.useCallback(\n (e) => {\n onChange(e.target.value);\n },\n [onChange],\n );\n const heightProps = { height, overflow: showScroll ? 'auto' : 'hidden' };\n\n const inputLength = String(inputValue || '').length;\n const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);\n\n return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid cols={['1fr', '24px']} justifyContent=\"center\" alignItems=\"flex-end\" gutter=\"xxs\">\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n />\n\n <Grid height=\"32px\" alignItems=\"center\">\n <StyledComposerButton\n buttonType=\"text\"\n icon={<PaperAirplane width={18} height={18} />}\n onClick={onSend}\n size=\"s\"\n disabled={!inputValue || buttonDisabled || hasError}\n data-testid=\"chat-composer-send-button\"\n aria-label=\"Send\"\n innerRef={inputSend}\n />\n </Grid>\n </Grid>\n <StyledComposerInput\n ref={inputSize}\n style={{\n height: 32,\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n width: input.current?.clientWidth,\n }}\n onChange={handleChange}\n value={inputValue}\n // maxLength={inputMaxLength}\n />\n <Grid cols={['1fr', '24px']} justifyContent=\"flex-end\" alignItems=\"center\" gutter=\"xxs\" pb=\"xxs\">\n <StyledCounterArea hasError={hasError} data-testid=\"composer-counter-area\">\n {inputMaxLength && hasError ? (\n <>\n <StyledCounterErrorA11y role=\"alert\">\n You have exceeded the character limit by {inputLength - inputMaxLength}\n </StyledCounterErrorA11y>\n Please limit to less than {inputMaxLength} characters.{' '}\n </>\n ) : (\n ''\n )}\n {inputMaxLength ? `${inputLength} / ${inputMaxLength}` : ''}\n </StyledCounterArea>\n <Grid />\n </Grid>\n </StyledChatContainerContentComposer>\n );\n};\n\nChatComposer.propTypes = composerProps;\nChatComposer.defaultProps = defaultComposerPros;\nconst ChatComposerWithSchema = describe(ChatComposer);\nChatComposerWithSchema.propTypes = composerProps;\n\nexport { ChatComposer, ChatComposerWithSchema };\n"],"names":["ChatComposer","props","useValidateProps","ChatComposerWithSchema","toJSON","inputValue","onChange","onResize","onSend","onFocus","onBlur","maxHeight","placeholder","inputMaxLength","buttonDisabled","dataTestid","actionRef","input","React","useRef","inputSize","inputSend","useState","height","setHeight","internalMaxHeight","useMemo","showScroll","setShowScroll","useEffect","newHeight","current","scrollHeight","clientHeight","focusToComposer","focus","focusToSend","handleChange","useCallback","e","target","value","heightProps","overflow","inputLength","String","length","hasError","StyledChatContainerContentComposer","Grid","StyledComposerInput","StyledComposerButton","PaperAirplane","visibility","pointerEvents","position","top","width","clientWidth","StyledCounterArea","StyledCounterErrorA11y","propTypes","composerProps","defaultProps","defaultComposerPros","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA2C;AAAA;;AAC9DC,EAAAA,2DAAgB,CAACD,KAAD,EAAQE,sBAAsB,CAACC,MAAvB,EAAR,CAAhB;AAEA,MACEC,UADF,GAaIJ,KAbJ,CACEI,UADF;AAAA,MAEEC,QAFF,GAaIL,KAbJ,CAEEK,QAFF;AAAA,MAGEC,QAHF,GAaIN,KAbJ,CAGEM,QAHF;AAAA,MAIEC,MAJF,GAaIP,KAbJ,CAIEO,MAJF;AAAA,MAKEC,OALF,GAaIR,KAbJ,CAKEQ,OALF;AAAA,MAMEC,MANF,GAaIT,KAbJ,CAMES,MANF;AAAA,yBAaIT,KAbJ,CAOEU,SAPF;AAAA,MAOEA,SAPF,iCAOc,GAPd;AAAA,MAQEC,WARF,GAaIX,KAbJ,CAQEW,WARF;AAAA,MASEC,cATF,GAaIZ,KAbJ,CASEY,cATF;AAAA,MAUEC,cAVF,GAaIb,KAbJ,CAUEa,cAVF;AAAA,MAWEC,UAXF,GAaId,KAbJ,CAWEc,UAXF;AAAA,MAYEC,SAZF,GAaIf,KAbJ,CAYEe,SAZF;AAeA,MAAMC,KAAK,GAAGC,yBAAK,CAACC,MAAN,EAAd;AACA,MAAMC,SAAS,GAA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ChB,WAAW,GAAG/B,cAD1D,CADF,gCAI6BA,cAJ7B,kBAIyD,GAJzD,CADD,GAQC,EATJ,EAWGA,cAAc,aAAM+B,WAAN,gBAAuB/B,cAAvB,IAA0C,EAX3D,CADF,eAcEK,wCAAC+B,WAAD,OAdF,CAzCF,CADF;AA4DD;;AAEDjD,YAAY,CAAC6D,SAAb,GAAyBC,sCAAzB;AACA9D,YAAY,CAAC+D,YAAb,GAA4BC,4CAA5B;IACM7D,sBAAsB,GAAG8D,kBAAQ,CAACjE,YAAD;AACvCG,sBAAsB,CAAC0D,SAAvB,GAAmCC,sCAAnC;;;;;"}
|
|
1
|
+
{"version":3,"file":"ChatContainerComposer.js","sources":["../../../../src/parts/chat-composer/ChatContainerComposer.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe } from 'react-desc';\nimport { PaperAirplane } from '@elliemae/ds-icons';\nimport {\n StyledChatContainerContentComposer,\n StyledComposerInput,\n StyledComposerButton,\n StyledCounterArea,\n StyledCounterErrorA11y,\n} from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nimport { defaultComposerPros, composerProps, ChatComposerProps } from './props';\n\nconst ChatComposer = (props: ChatComposerProps): JSX.Element => {\n useValidateProps(props, ChatComposerWithSchema.toJSON());\n\n const {\n inputValue,\n onChange,\n onResize,\n onSend,\n onFocus,\n onBlur,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const input = React.useRef<HTMLTextAreaElement>();\n const inputSize = React.useRef<HTMLTextAreaElement>();\n const inputSend = React.useRef<HTMLButtonElement>();\n const [height, setHeight] = React.useState(32);\n const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);\n const [showScroll, setShowScroll] = React.useState(true);\n\n React.useEffect(() => {\n const newHeight =\n inputSize.current?.scrollHeight > internalMaxHeight ? internalMaxHeight : inputSize.current?.scrollHeight;\n onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, onResize]);\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToComposer = () => {\n input.current.focus();\n };\n actionRef.current.focusToSend = () => {\n inputSend.current.focus();\n };\n }\n }, [actionRef]);\n\n const handleChange = React.useCallback(\n (e) => {\n onChange(e.target.value);\n },\n [onChange],\n );\n const heightProps = { height, overflow: showScroll ? 'auto' : 'hidden' };\n\n const inputLength = String(inputValue || '').length;\n const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);\n\n return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid cols={['1fr', '24px']} justifyContent=\"center\" alignItems=\"flex-end\" gutter=\"xxs\">\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n />\n\n <Grid height=\"32px\" alignItems=\"center\">\n <StyledComposerButton\n buttonType=\"text\"\n icon={<PaperAirplane width={18} height={18} />}\n onClick={onSend}\n size=\"s\"\n disabled={!inputValue || buttonDisabled || hasError}\n data-testid=\"chat-composer-send-button\"\n aria-label=\"Send\"\n innerRef={inputSend}\n />\n </Grid>\n </Grid>\n <StyledComposerInput\n ref={inputSize}\n style={{\n height: 32,\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n width: input.current?.clientWidth,\n }}\n onChange={handleChange}\n value={inputValue}\n // maxLength={inputMaxLength}\n />\n <Grid cols={['1fr', '24px']} justifyContent=\"flex-end\" alignItems=\"center\" gutter=\"xxs\" pb=\"xxs\">\n <StyledCounterArea hasError={hasError} data-testid=\"composer-counter-area\">\n {inputMaxLength && hasError ? (\n <>\n <StyledCounterErrorA11y role=\"alert\">\n {maxLengthMessage || `You have exceeded the character limit by ${inputLength - inputMaxLength}`}\n </StyledCounterErrorA11y>\n {maxLengthMessage || `Please limit to less than ${inputMaxLength} characters. `}\n </>\n ) : (\n ''\n )}\n {inputMaxLength ? ` ${inputLength} / ${inputMaxLength}` : ''}\n </StyledCounterArea>\n <Grid />\n </Grid>\n </StyledChatContainerContentComposer>\n );\n};\n\nChatComposer.propTypes = composerProps;\nChatComposer.defaultProps = defaultComposerPros;\nconst ChatComposerWithSchema = describe(ChatComposer);\nChatComposerWithSchema.propTypes = composerProps;\n\nexport { ChatComposer, ChatComposerWithSchema };\n"],"names":["ChatComposer","props","useValidateProps","ChatComposerWithSchema","toJSON","inputValue","onChange","onResize","onSend","onFocus","onBlur","maxHeight","placeholder","inputMaxLength","maxLengthMessage","buttonDisabled","dataTestid","actionRef","input","React","useRef","inputSize","inputSend","useState","height","setHeight","internalMaxHeight","useMemo","showScroll","setShowScroll","useEffect","newHeight","current","scrollHeight","clientHeight","focusToComposer","focus","focusToSend","handleChange","useCallback","e","target","value","heightProps","overflow","inputLength","String","length","hasError","StyledChatContainerContentComposer","Grid","StyledComposerInput","StyledComposerButton","PaperAirplane","visibility","pointerEvents","position","top","width","clientWidth","StyledCounterArea","StyledCounterErrorA11y","propTypes","composerProps","defaultProps","defaultComposerPros","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD,EAA2C;AAAA;;AAC9DC,EAAAA,2DAAgB,CAACD,KAAD,EAAQE,sBAAsB,CAACC,MAAvB,EAAR,CAAhB;AAEA,MACEC,UADF,GAcIJ,KAdJ,CACEI,UADF;AAAA,MAEEC,QAFF,GAcIL,KAdJ,CAEEK,QAFF;AAAA,MAGEC,QAHF,GAcIN,KAdJ,CAGEM,QAHF;AAAA,MAIEC,MAJF,GAcIP,KAdJ,CAIEO,MAJF;AAAA,MAKEC,OALF,GAcIR,K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Ae2B;AANjB,KAFT;AAUE,IAAA,QAAQ,EAAErB,YAVZ;AAWE,IAAA,KAAK,EAAEjC,UAXT;;AAAA,IA3BF,eAyCEc,wCAAC+B,WAAD;AAAM,IAAA,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,CAAZ;AAA6B,IAAA,cAAc,EAAC,UAA5C;AAAuD,IAAA,UAAU,EAAC,QAAlE;AAA2E,IAAA,MAAM,EAAC,KAAlF;AAAwF,IAAA,EAAE,EAAC;AAA3F,kBACE/B,wCAACyC,2CAAD;AAAmB,IAAA,QAAQ,EAAEZ,QAA7B;AAAuC,mBAAY;AAAnD,KACGnC,cAAc,IAAImC,QAAlB,gBACC7B,+FACEA,wCAAC0C,gDAAD;AAAwB,IAAA,IAAI,EAAC;AAA7B,KACG/C,gBAAgB,uDAAgD+B,WAAW,GAAGhC,cAA9D,CADnB,CADF,EAIGC,gBAAgB,wCAAiCD,cAAjC,kBAJnB,CADD,GAQC,EATJ,EAWGA,cAAc,cAAOgC,WAAP,gBAAwBhC,cAAxB,IAA2C,EAX5D,CADF,eAcEM,wCAAC+B,WAAD,OAdF,CAzCF,CADF;AA4DD;;AAEDlD,YAAY,CAAC8D,SAAb,GAAyBC,sCAAzB;AACA/D,YAAY,CAACgE,YAAb,GAA4BC,4CAA5B;IACM9D,sBAAsB,GAAG+D,kBAAQ,CAAClE,YAAD;AACvCG,sBAAsB,CAAC2D,SAAvB,GAAmCC,sCAAnC;;;;;"}
|
|
@@ -8,7 +8,7 @@ require('@babel/runtime/helpers/slicedToArray');
|
|
|
8
8
|
require('react');
|
|
9
9
|
require('@elliemae/ds-grid');
|
|
10
10
|
require('react-desc');
|
|
11
|
-
require('@elliemae/ds-icons
|
|
11
|
+
require('@elliemae/ds-icons');
|
|
12
12
|
require('./styled.js');
|
|
13
13
|
require('styled-components');
|
|
14
14
|
require('@elliemae/ds-button');
|
|
@@ -15,6 +15,7 @@ var defaultComposerPros = {
|
|
|
15
15
|
onBlur: lodash.noop,
|
|
16
16
|
maxHeight: 0,
|
|
17
17
|
inputMaxLength: undefined,
|
|
18
|
+
maxLengthMessage: undefined,
|
|
18
19
|
buttonDisabled: false,
|
|
19
20
|
dataTestid: 'ds-chat-composer',
|
|
20
21
|
actionRef: lodash.noop
|
|
@@ -22,6 +23,7 @@ var defaultComposerPros = {
|
|
|
22
23
|
var composerProps = {
|
|
23
24
|
placeholder: reactDesc.PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),
|
|
24
25
|
inputValue: reactDesc.PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),
|
|
26
|
+
maxLengthMessage: reactDesc.PropTypes.string.description('Max length message').defaultValue(defaultComposerPros.maxLengthMessage),
|
|
25
27
|
onChange: reactDesc.PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),
|
|
26
28
|
onResize: reactDesc.PropTypes.func.description('Called the input changes his height').defaultValue(defaultComposerPros.onResize),
|
|
27
29
|
onSend: reactDesc.PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-composer/props.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\n\nexport interface TextAreaProps {\n height: string | number;\n style: React.CSSProperties;\n}\n\nexport const defaultComposerPros: ChatComposerProps = {\n placeholder: 'Type your message',\n inputValue: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n maxHeight: 0,\n inputMaxLength: undefined,\n buttonDisabled: false,\n dataTestid: 'ds-chat-composer',\n actionRef: noop,\n};\n\nexport interface ChatComposerProps {\n placeholder
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-composer/props.tsx"],"sourcesContent":["import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\n\nexport interface TextAreaProps {\n height: string | number;\n style: React.CSSProperties;\n}\n\nexport const defaultComposerPros: ChatComposerProps = {\n placeholder: 'Type your message',\n inputValue: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n maxHeight: 0,\n inputMaxLength: undefined,\n maxLengthMessage: undefined,\n buttonDisabled: false,\n dataTestid: 'ds-chat-composer',\n actionRef: noop,\n};\n\nexport interface ChatComposerProps {\n placeholder?: string;\n inputValue?: string;\n maxLengthMessage?: string;\n onChange: (value: string) => void;\n onResize?: (value: number) => void;\n onSend: (value: string) => void;\n onFocus?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n maxHeight?: number;\n inputMaxLength: number | undefined;\n buttonDisabled: boolean;\n dataTestid?: string;\n actionRef: PropTypes.func;\n}\n\nexport const composerProps = {\n placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),\n inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),\n maxLengthMessage: PropTypes.string\n .description('Max length message')\n .defaultValue(defaultComposerPros.maxLengthMessage),\n onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),\n onResize: PropTypes.func\n .description('Called the input changes his height')\n .defaultValue(defaultComposerPros.onResize),\n onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),\n onFocus: PropTypes.func.description('Input focus').defaultValue(defaultComposerPros.onFocus),\n onBlur: PropTypes.func.description('Input blur').defaultValue(defaultComposerPros.onBlur),\n maxHeight: PropTypes.number\n .description('Max height of the composer. Use 0 for no limit')\n .defaultValue(defaultComposerPros.onBlur),\n inputMaxLength: PropTypes.number\n .description('Max length of the composer. `undefined` for no limit')\n .defaultValue(defaultComposerPros.inputMaxLength),\n buttonDisabled: PropTypes.bool\n .description('Control the disabled for the send button')\n .defaultValue(defaultComposerPros.buttonDisabled),\n dataTestid: PropTypes.string.description('Data testid').defaultValue(defaultComposerPros.placeholder),\n actionRef: PropTypes.object\n .description(\n `Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n `,\n )\n .defaultValue(defaultComposerPros.actionRef),\n};\n"],"names":["defaultComposerPros","placeholder","inputValue","onChange","noop","onResize","onSend","onFocus","onBlur","maxHeight","inputMaxLength","undefined","maxLengthMessage","buttonDisabled","dataTestid","actionRef","composerProps","PropTypes","string","description","defaultValue","func","number","bool","object"],"mappings":";;;;;;;IASaA,mBAAsC,GAAG;AACpDC,EAAAA,WAAW,EAAE,mBADuC;AAEpDC,EAAAA,UAAU,EAAE,EAFwC;AAGpDC,EAAAA,QAAQ,EAAEC,WAH0C;AAIpDC,EAAAA,QAAQ,EAAED,WAJ0C;AAKpDE,EAAAA,MAAM,EAAEF,WAL4C;AAMpDG,EAAAA,OAAO,EAAEH,WAN2C;AAOpDI,EAAAA,MAAM,EAAEJ,WAP4C;AAQpDK,EAAAA,SAAS,EAAE,CARyC;AASpDC,EAAAA,cAAc,EAAEC,SAToC;AAUpDC,EAAAA,gBAAgB,EAAED,SAVkC;AAWpDE,EAAAA,cAAc,EAAE,KAXoC;AAYpDC,EAAAA,UAAU,EAAE,kBAZwC;AAapDC,EAAAA,SAAS,EAAEX;AAbyC;IAgCzCY,aAAa,GAAG;AAC3Bf,EAAAA,WAAW,EAAEgB,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,mBAA7B,EAAkDC,YAAlD,CAA+DpB,mBAAmB,CAACC,WAAnF,CADc;AAE3BC,EAAAA,UAAU,EAAEe,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,EAA4CC,YAA5C,CAAyDpB,mBAAmB,CAACE,UAA7E,CAFe;AAG3BU,EAAAA,gBAAgB,EAAEK,mBAAS,CAACC,MAAV,CACfC,WADe,CACH,oBADG,EAEfC,YAFe,CAEFpB,mBAA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TAcRC,YAdQ,CAcKpB,mBAAmB,CAACe,SAdzB;AAvBgB;;;;;"}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var styled = require('styled-components');
|
|
6
6
|
var dsGrid = require('@elliemae/ds-grid');
|
|
7
|
-
var
|
|
7
|
+
var DSButton = require('@elliemae/ds-button');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
10
|
|
|
@@ -31,7 +31,7 @@ var StyledComposerInput = /*#__PURE__*/styled__default['default'].textarea.withC
|
|
|
31
31
|
}, function (props) {
|
|
32
32
|
return props.theme.colors.brand[600];
|
|
33
33
|
});
|
|
34
|
-
var StyledComposerButton = /*#__PURE__*/styled__default['default'](
|
|
34
|
+
var StyledComposerButton = /*#__PURE__*/styled__default['default'](DSButton.DSButton).withConfig({
|
|
35
35
|
componentId: "sc-1ahwpce-2"
|
|
36
36
|
})(["&:disabled{background:none;svg{fill:#5d6775;}}svg{fill:", ";}&:focus{background:", ";}"], function (props) {
|
|
37
37
|
return props.theme.colors.brand[600];
|
|
@@ -6,7 +6,7 @@ var _extends = require('@babel/runtime/helpers/extends');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var lodash = require('lodash');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
|
-
var DSIndeterminateProgressIndicator = require('@elliemae/ds-
|
|
9
|
+
var DSIndeterminateProgressIndicator = require('@elliemae/ds-indeterminate-progress-indicator');
|
|
10
10
|
var DSBanner = require('@elliemae/ds-banner');
|
|
11
11
|
var parts_chatComposer_ChatContainerComposer = require('../chat-composer/ChatContainerComposer.js');
|
|
12
12
|
var parts_chatContainerMessagesList_ChatContainerMessagesList = require('../chat-container-messages-list/ChatContainerMessagesList.js');
|
|
@@ -16,7 +16,7 @@ var parts_chatContainer_config_useValidateProps = require('./config/useValidateP
|
|
|
16
16
|
require('@babel/runtime/helpers/defineProperty');
|
|
17
17
|
require('@babel/runtime/helpers/slicedToArray');
|
|
18
18
|
require('@elliemae/ds-grid');
|
|
19
|
-
require('@elliemae/ds-icons
|
|
19
|
+
require('@elliemae/ds-icons');
|
|
20
20
|
require('../chat-composer/styled.js');
|
|
21
21
|
require('styled-components');
|
|
22
22
|
require('@elliemae/ds-button');
|
|
@@ -24,9 +24,7 @@ require('../chat-composer/config/useValidateProps.js');
|
|
|
24
24
|
require('@elliemae/ds-props-helpers');
|
|
25
25
|
require('../chat-composer/props.js');
|
|
26
26
|
require('react-virtual');
|
|
27
|
-
require('@elliemae/ds-basic/Button');
|
|
28
27
|
require('../bubble/ChatBubble.js');
|
|
29
|
-
require('@elliemae/ds-icons/WarningCircleFill');
|
|
30
28
|
require('../bubble/styled.js');
|
|
31
29
|
require('../bubble/props.js');
|
|
32
30
|
require('prop-types');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainer.js","sources":["../../../../src/parts/chat-container/ChatContainer.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React from 'react';\nimport { noop } from 'lodash';\nimport { describe } from 'react-desc';\nimport DSIndeterminateProgressIndicator from '@elliemae/ds-
|
|
1
|
+
{"version":3,"file":"ChatContainer.js","sources":["../../../../src/parts/chat-container/ChatContainer.tsx"],"sourcesContent":["/* eslint-disable complexity */\nimport React from 'react';\nimport { noop } from 'lodash';\nimport { describe } from 'react-desc';\nimport DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';\nimport DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';\nimport { ChatComposer } from '../chat-composer';\nimport { ChatContainerMessagesList } from '../chat-container-messages-list';\nimport { ChatContainerProps, defaultProps, containerProps } from './props';\nimport { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst ChatContainer = (props: ChatContainerProps): JSX.Element => {\n useValidateProps(props, ChatContainerWithSchema.toTypescript());\n\n const {\n sendingText,\n sendingMessages,\n bannerPosition,\n bannerProps,\n messagesListProps,\n composerProps,\n composerProps: { onResize: onComposerResize },\n actionRef,\n autoScroll,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n } = props;\n\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n if (autoScroll) {\n listRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'end',\n });\n }\n },\n [onComposerResize, messagesListProps.messages, autoScroll],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n\n return (\n <Container rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\" aria-label=\"chat window\">\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <ChatContainerMessagesList\n {...messagesListProps}\n actionRef={actionRef || listRef}\n isLoading={isLoading}\n hasMoreItems={hasMoreItems}\n getMoreMessages={getMoreMessages}\n sendingMessages={sendingMessages}\n sendingText={sendingText}\n />\n {['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading}>\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer isLoading={bannerPosition}>\n <DSBanner\n showCloseButton\n label={bannerProps.label || 'Unread messages'}\n containerProps={{ id: 'ds-chat-banner' }}\n actionLink={{\n label: bannerProps.viewLabel || 'View',\n onClick: bannerProps.onView,\n }}\n onClose={bannerProps.onClose}\n isOpen\n type={BANNER_TYPES.INFO}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear>\n <DSIndeterminateProgressIndicator processing title=\"Loading\" lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onResize={onResize}\n maxHeight={(containerRef.current?.clientHeight || 0) / 2}\n actionRef={actionRef || listRef}\n />\n </Container>\n );\n};\n\nChatContainer.propTypes = containerProps;\nChatContainer.defaultProps = defaultProps;\nconst ChatContainerWithSchema = describe(ChatContainer);\nChatContainerWithSchema.propTypes = containerProps;\n\nexport { ChatContainer, ChatContainerWithSchema };\n"],"names":["ChatContainer","props","useValidateProps","ChatContainerWithSchema","toTypescript","sendingText","sendingMessages","bannerPosition","bannerProps","messagesListProps","composerProps","onComposerResize","onResize","actionRef","autoScroll","device","isLoading","hasMoreItems","getMoreMessages","containerRef","React","useRef","listRef","scrollToIndex","noop","useCallback","height","current","messages","length","align","Container","StyledChatContainerContent","MobileStyledChatContainerContent","position","overflow","ChatContainerMessagesList","includes","StyledIndicatorContainer","DSIndeterminateProgressIndicator","DSBanner","label","id","viewLabel","onClick","onView","onClose","BANNER_TYPES","INFO","ChatComposer","clientHeight","propTypes","containerProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA4C;AAAA;;AAChEC,EAAAA,4DAAgB,CAACD,KAAD,EAAQE,uBAAuB,CAACC,YAAxB,EAAR,CAAhB;AAEA,MACEC,WADF,GAcIJ,KAdJ,CACEI,WADF;AAAA,MAEEC,eAFF,GAcIL,KAdJ,CAEEK,eAFF;AAAA,MAGEC,cAHF,GAcIN,KAdJ,CAGEM,cAHF;AAAA,MAIEC,WAJF,GAcIP,KAdJ,CAIEO,WAJF;AAAA,MAKEC,iBALF,GAcIR,KAdJ,CAKEQ,iBALF;AAAA,MAMEC,aANF,GAcIT,KAdJ,CAMES,aANF;AAAA,MAO6BC,gBAP7B,GAcIV,KAdJ,CAOES,aAPF,CAOmBE,QAPnB;AAAA,MAQEC,SARF,GAcIZ,KAdJ,CAQEY,SARF;AAAA,MASEC,UATF,GAcIb,KAdJ,CASEa,UATF;AAAA,MAUEC,MAVF,GAcId,KA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uB,YAAtB,KAAsC,CAAvC,IAA4C,CAHzD;AAIE,IAAA,SAAS,EAAErC,SAAS,IAAIS;AAJ1B,KApCF,CADF;AA6CD;;AAEDtB,aAAa,CAACmD,SAAd,GAA0BC,wCAA1B;AACApD,aAAa,CAACqD,YAAd,GAA6BA,sCAA7B;IACMlD,uBAAuB,GAAGmD,kBAAQ,CAACtD,aAAD;AACxCG,uBAAuB,CAACgD,SAAxB,GAAoCC,wCAApC;;;;;"}
|
|
@@ -7,13 +7,13 @@ require('@babel/runtime/helpers/extends');
|
|
|
7
7
|
require('react');
|
|
8
8
|
require('lodash');
|
|
9
9
|
require('react-desc');
|
|
10
|
-
require('@elliemae/ds-
|
|
10
|
+
require('@elliemae/ds-indeterminate-progress-indicator');
|
|
11
11
|
require('@elliemae/ds-banner');
|
|
12
12
|
require('../chat-composer/ChatContainerComposer.js');
|
|
13
13
|
require('@babel/runtime/helpers/defineProperty');
|
|
14
14
|
require('@babel/runtime/helpers/slicedToArray');
|
|
15
15
|
require('@elliemae/ds-grid');
|
|
16
|
-
require('@elliemae/ds-icons
|
|
16
|
+
require('@elliemae/ds-icons');
|
|
17
17
|
require('../chat-composer/styled.js');
|
|
18
18
|
require('styled-components');
|
|
19
19
|
require('@elliemae/ds-button');
|
|
@@ -22,9 +22,7 @@ require('@elliemae/ds-props-helpers');
|
|
|
22
22
|
require('../chat-composer/props.js');
|
|
23
23
|
require('../chat-container-messages-list/ChatContainerMessagesList.js');
|
|
24
24
|
require('react-virtual');
|
|
25
|
-
require('@elliemae/ds-basic/Button');
|
|
26
25
|
require('../bubble/ChatBubble.js');
|
|
27
|
-
require('@elliemae/ds-icons/WarningCircleFill');
|
|
28
26
|
require('../bubble/styled.js');
|
|
29
27
|
require('../bubble/props.js');
|
|
30
28
|
require('prop-types');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -29,7 +29,9 @@ var ChatContainerHeader = function ChatContainerHeader(props) {
|
|
|
29
29
|
value: title
|
|
30
30
|
})), /*#__PURE__*/React__default['default'].createElement(parts_chatContainerHeader_styled.StyledChatContainerContentHeaderActions, {
|
|
31
31
|
cols: React__default['default'].Children.toArray(children).filter(function (e) {
|
|
32
|
-
|
|
32
|
+
var _e$props;
|
|
33
|
+
|
|
34
|
+
return e && ((_e$props = e.props) === null || _e$props === void 0 ? void 0 : _e$props.children) !== false;
|
|
33
35
|
}).map(function () {
|
|
34
36
|
return '32px';
|
|
35
37
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainerHeader.js","sources":["../../../../src/parts/chat-container-header/ChatContainerHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\n\nexport const ChatContainerHeader: React.ComponentType = (props: any) => {\n const { title, floating, children } = props;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n floating={floating}\n role=\"heading\"\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((e) => e)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n"],"names":["ChatContainerHeader","props","title","floating","children","React","StyledChatContainerContentHeader","StyledChatContainerContentHeaderLabel","SimpleTruncatedTooltipText","StyledChatContainerContentHeaderActions","Children","toArray","filter","e","map"],"mappings":";;;;;;;;;;;;;;IAQaA,mBAAwC,GAAG,SAA3CA,mBAA2C,CAACC,KAAD,EAAgB;AACtE,MAAQC,KAAR,GAAsCD,KAAtC,CAAQC,KAAR;AAAA,MAAeC,QAAf,GAAsCF,KAAtC,CAAeE,QAAf;AAAA,MAAyBC,QAAzB,GAAsCH,KAAtC,CAAyBG,QAAzB;AAEA,sBACEC,wCAACC,iEAAD;AACE,IAAA,UAAU,EAAC,QADb;AAEE,IAAA,IAAI,EAAE,CAAC,gCAAD,EAAmCF,QAAQ,GAAG,MAAH,GAAY,KAAvD,CAFR;AAGE,IAAA,QAAQ,EAAED,QAHZ;AAIE,IAAA,IAAI,EAAC;AAJP,kBAMEE,wCAACE,sEAAD;AAAuC,mBAAY,6BAAnD;AAAiF,IAAA,EAAE,EAAC,KAApF;AAA0F,IAAA,EAAE,EAAC;AAA7F,kBACEF,wCAACG,iDAAD;AAA4B,IAAA,KAAK,EAAEN;AAAnC,IADF,CANF,eASEG,wCAACI,wEAAD;AACE,IAAA,IAAI,EAAEJ,yBAAK,CAACK,QAAN,CAAeC,OAAf,CAAuBP,QAAvB,EACHQ,MADG,CACI,UAACC,CAAD;AAAA,aAAOA,
|
|
1
|
+
{"version":3,"file":"ChatContainerHeader.js","sources":["../../../../src/parts/chat-container-header/ChatContainerHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\n\nexport const ChatContainerHeader: React.ComponentType = (props: any) => {\n const { title, floating, children } = props;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n floating={floating}\n role=\"heading\"\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((e) => e && e.props?.children !== false)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n"],"names":["ChatContainerHeader","props","title","floating","children","React","StyledChatContainerContentHeader","StyledChatContainerContentHeaderLabel","SimpleTruncatedTooltipText","StyledChatContainerContentHeaderActions","Children","toArray","filter","e","map"],"mappings":";;;;;;;;;;;;;;IAQaA,mBAAwC,GAAG,SAA3CA,mBAA2C,CAACC,KAAD,EAAgB;AACtE,MAAQC,KAAR,GAAsCD,KAAtC,CAAQC,KAAR;AAAA,MAAeC,QAAf,GAAsCF,KAAtC,CAAeE,QAAf;AAAA,MAAyBC,QAAzB,GAAsCH,KAAtC,CAAyBG,QAAzB;AAEA,sBACEC,wCAACC,iEAAD;AACE,IAAA,UAAU,EAAC,QADb;AAEE,IAAA,IAAI,EAAE,CAAC,gCAAD,EAAmCF,QAAQ,GAAG,MAAH,GAAY,KAAvD,CAFR;AAGE,IAAA,QAAQ,EAAED,QAHZ;AAIE,IAAA,IAAI,EAAC;AAJP,kBAMEE,wCAACE,sEAAD;AAAuC,mBAAY,6BAAnD;AAAiF,IAAA,EAAE,EAAC,KAApF;AAA0F,IAAA,EAAE,EAAC;AAA7F,kBACEF,wCAACG,iDAAD;AAA4B,IAAA,KAAK,EAAEN;AAAnC,IADF,CANF,eASEG,wCAACI,wEAAD;AACE,IAAA,IAAI,EAAEJ,yBAAK,CAACK,QAAN,CAAeC,OAAf,CAAuBP,QAAvB,EACHQ,MADG,CACI,UAACC,CAAD;AAAA;;AAAA,aAAOA,CAAC,IAAI,aAAAA,CAAC,CAACZ,KAAF,sDAASG,QAAT,MAAsB,KAAlC;AAAA,KADJ,EAEHU,GAFG,CAEC;AAAA,aAAM,MAAN;AAAA,KAFD,CADR;AAIE,IAAA,cAAc,EAAC,UAJjB;AAKE,mBAAY;AALd,KAOGV,QAPH,CATF,CADF;AAqBD;;;;"}
|
|
@@ -9,21 +9,21 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var StyledChatContainerContentHeaderActions = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
13
13
|
componentId: "sc-jmynvr-0"
|
|
14
|
-
})(["width:
|
|
14
|
+
})(["max-width:80px;"]);
|
|
15
|
+
var StyledChatContainerContentHeader = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
16
|
+
componentId: "sc-jmynvr-1"
|
|
17
|
+
})(["width:100%;min-height:48px;border-bottom:1px solid ", ";background:", ";", "{& button{background:transparent;}}"], function (props) {
|
|
15
18
|
return props.theme.colors.neutral['200'];
|
|
16
19
|
}, function (props) {
|
|
17
20
|
return props.theme.colors.neutral['050'];
|
|
18
|
-
});
|
|
21
|
+
}, StyledChatContainerContentHeaderActions);
|
|
19
22
|
var StyledChatContainerContentHeaderLabel = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
20
|
-
componentId: "sc-jmynvr-
|
|
23
|
+
componentId: "sc-jmynvr-2"
|
|
21
24
|
})(["justify-content:center;align-items:center;font-weight:bold;font-size:18px;color:", ";"], function (props) {
|
|
22
25
|
return props.theme.colors.neutral['700'];
|
|
23
26
|
});
|
|
24
|
-
var StyledChatContainerContentHeaderActions = /*#__PURE__*/styled__default['default'](dsGrid.Grid).withConfig({
|
|
25
|
-
componentId: "sc-jmynvr-2"
|
|
26
|
-
})(["max-width:80px;"]);
|
|
27
27
|
|
|
28
28
|
exports.StyledChatContainerContentHeader = StyledChatContainerContentHeader;
|
|
29
29
|
exports.StyledChatContainerContentHeaderActions = StyledChatContainerContentHeaderActions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container-header/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const StyledChatContainerContentHeader = styled(Grid)`\n width: 100%;\n min-height: 48px;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n background: ${(props) => props.theme.colors.neutral['050']};\n`;\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid)`\n justify-content: center;\n align-items: center;\n font-weight: bold;\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container-header/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const StyledChatContainerContentHeaderActions = styled(Grid)`\n max-width: 80px;\n`;\n\nexport const StyledChatContainerContentHeader = styled(Grid)`\n width: 100%;\n min-height: 48px;\n border-bottom: 1px solid ${(props) => props.theme.colors.neutral['200']};\n background: ${(props) => props.theme.colors.neutral['050']};\n ${StyledChatContainerContentHeaderActions} {\n & button {\n background: transparent;\n }\n }\n`;\n\nexport const StyledChatContainerContentHeaderLabel = styled(Grid)`\n justify-content: center;\n align-items: center;\n font-weight: bold;\n font-size: 18px;\n color: ${(props) => props.theme.colors.neutral['700']};\n`;\n"],"names":["StyledChatContainerContentHeaderActions","styled","Grid","StyledChatContainerContentHeader","props","theme","colors","neutral","StyledChatContainerContentHeaderLabel"],"mappings":";;;;;;;;;;;IAGaA,uCAAuC,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA;IAIvCC,gCAAgC,gBAAGF,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,wHAGhB,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHgB,EAI7B,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJ6B,EAKzCP,uCALyC;IAYhCQ,qCAAqC,gBAAGP,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,8FAKvC,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CALuC;;;;;;"}
|
|
@@ -7,7 +7,7 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
9
|
var reactVirtual = require('react-virtual');
|
|
10
|
-
var DSButton = require('@elliemae/ds-
|
|
10
|
+
var DSButton = require('@elliemae/ds-button');
|
|
11
11
|
var parts_bubble_ChatBubble = require('../bubble/ChatBubble.js');
|
|
12
12
|
var parts_bubble_props = require('../bubble/props.js');
|
|
13
13
|
var parts_messageDelimiter_MessageDelimiter = require('../message-delimiter/MessageDelimiter.js');
|
|
@@ -15,7 +15,7 @@ var parts_systemMessage_SystemMessage = require('../system-message/SystemMessage
|
|
|
15
15
|
var parts_chatContainerMessagesList_styled = require('./styled.js');
|
|
16
16
|
var parts_chatContainerMessagesList_props = require('./props.js');
|
|
17
17
|
var parts_chatContainerMessagesList_config_useValidateProps = require('./config/useValidateProps.js');
|
|
18
|
-
require('@elliemae/ds-icons
|
|
18
|
+
require('@elliemae/ds-icons');
|
|
19
19
|
require('../bubble/styled.js');
|
|
20
20
|
require('styled-components');
|
|
21
21
|
require('@elliemae/ds-grid');
|
|
@@ -189,7 +189,7 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
|
|
|
189
189
|
return /*#__PURE__*/React__default['default'].createElement(parts_chatContainerMessagesList_styled.ListItem, {
|
|
190
190
|
"data-element": "chat-element-list-item",
|
|
191
191
|
"data-index": index,
|
|
192
|
-
key: "ds-chat-bubble-".concat(index),
|
|
192
|
+
key: "ds-chat-bubble-".concat(index, "-").concat(row.dsId, "-").concat(row.type),
|
|
193
193
|
style: style,
|
|
194
194
|
ref: measureRef,
|
|
195
195
|
tabIndex: 0,
|