@elliemae/ds-chat 1.56.0 → 1.57.0-rc.2

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.
@@ -29,6 +29,9 @@ var ChatBubble = function ChatBubble(props) {
29
29
  body = props.body,
30
30
  errorMessage = props.errorMessage,
31
31
  helpMessage = props.helpMessage;
32
+ var bodyParts = React__default['default'].useMemo(function () {
33
+ return body.split('\n');
34
+ }, [body]);
32
35
  return /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyledWrapper, {
33
36
  "data-testid": "ds-chat-bubble-".concat(dsId),
34
37
  type: type
@@ -48,7 +51,11 @@ var ChatBubble = function ChatBubble(props) {
48
51
  "data-testid": "chat-bubble-time-".concat(dsId)
49
52
  }, time)), /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyleBodyWrapper, {
50
53
  "data-testid": "chat-bubble-body-".concat(dsId)
51
- }, body), /*#__PURE__*/React__default['default'].createElement(parts_bubble_ChatBubbleArrow.ChatBubbleArrow, {
54
+ }, bodyParts.map(function (item, index) {
55
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
56
+ key: item
57
+ }, item, index < bodyParts.length - 1 ? /*#__PURE__*/React__default['default'].createElement("br", null) : null);
58
+ })), /*#__PURE__*/React__default['default'].createElement(parts_bubble_ChatBubbleArrow.ChatBubbleArrow, {
52
59
  type: type
53
60
  })), errorMessage ? /*#__PURE__*/React__default['default'].createElement(parts_bubble_styled.StyleErrorMessage, {
54
61
  "data-testid": "chat-bubble-error-message-".concat(dsId),
@@ -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 Warning from '@elliemae/ds-icons/WarningCircleFill';\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 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}`}>{body}</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 <Warning />\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","React","StyledWrapper","StyledColoredBubble","StyledTitleBubble","StyledTitleLeftBubble","StyledTitleRightBubble","StyleBodyWrapper","ChatBubbleArrow","StyleErrorMessage","Warning","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,IAA3B;AAAA,MAAiCC,IAAjC,GAAqER,KAArE,CAAiCQ,IAAjC;AAAA,MAAuCC,YAAvC,GAAqET,KAArE,CAAuCS,YAAvC;AAAA,MAAqDC,WAArD,GAAqEV,KAArE,CAAqDU,WAArD;AACA,sBACEC,wCAACC,iCAAD;AAAe,4CAA+BR,IAA/B,CAAf;AAAsD,IAAA,IAAI,EAAEC;AAA5D,kBACEM,wCAACE,uCAAD;AAAqB,IAAA,IAAI,EAAER;AAA3B,kBACEM,wCAACG,qCAAD;AAAmB,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ,CAAzB;AAAsC,IAAA,MAAM,EAAC,IAA7C;AAAkD,IAAA,UAAU,EAAC,UAA7D;AAAwE,IAAA,SAAS,EAAC;AAAlF,kBACEH,wCAACI,yCAAD;AAAuB,IAAA,UAAU,EAAC,QAAlC;AAA2C,+CAAkCX,IAAlC;AAA3C,KACGE,KADH,CADF,eAIEK,wCAACK,0CAAD;AAAwB,IAAA,UAAU,EAAC,QAAnC;AAA4C,IAAA,IAAI,EAAEX,IAAlD;AAAwD,8CAAiCD,IAAjC;AAAxD,KACGG,IADH,CAJF,CADF,eASEI,wCAACM,oCAAD;AAAkB,8CAAiCb,IAAjC;AAAlB,KAA4DI,IAA5D,CATF,eAUEG,wCAACO,4CAAD;AAAiB,IAAA,IAAI,EAAEb;AAAvB,IAVF,CADF,EAaGI,YAAY,gBACXE,wCAACQ,qCAAD;AAAmB,uDAA0Cf,IAA1C,CAAnB;AAAqE,IAAA,CAAC,EAAC,KAAvE;AAA6E,IAAA,MAAM,EAAC,KAApF;AAA0F,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAAhG,kBACEO,sDAAOF,YAAP,CADF,eAEEE,wCAACS,2BAAD,OAFF,CADW,GAKT,IAlBN,EAmBGV,WAAW,gBACVC,wCAACU,oCAAD;AAAkB,sDAAyCjB,IAAzC,CAAlB;AAAmE,IAAA,CAAC,EAAC,KAArE;AAA2E,IAAA,MAAM,EAAC,KAAlF;AAAwF,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAA9F,kBACEO,sDAAOD,WAAP,CADF,CADU,GAIR,IAvBN,CADF;AA2BD;;AACDX,UAAU,CAACuB,SAAX,GAAuBC,+BAAvB;IAEMrB,oBAAoB,GAAGsB,kBAAQ,CAACzB,UAAD;AACrCG,oBAAoB,CAACoB,SAArB,GAAiCC,+BAAjC;;;;;"}
1
+ {"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport Warning from '@elliemae/ds-icons/WarningCircleFill';\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(() => body.split('\\n'), [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 <Warning />\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","Warning","StyleHelpMessage","propTypes","propsBubbles","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAiBMA,UAAU,GAAG,SAAbA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AV,CAAc,UAACC,IAAD,EAAOC,KAAP;AAAA,wBACbX,wCAACA,yBAAD,CAAO,QAAP;AAAgB,MAAA,GAAG,EAAEU;AAArB,OACGA,IADH,EAEGC,KAAK,GAAGZ,SAAS,CAACa,MAAV,GAAmB,CAA3B,gBAA+BZ,mDAA/B,GAAwC,IAF3C,CADa;AAAA,GAAd,CADH,CATF,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,2BAAD,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;;;;;"}
@@ -89,7 +89,8 @@ var ChatContainer = function ChatContainer(props) {
89
89
  "aria-label": "chat window"
90
90
  }, /*#__PURE__*/React__default['default'].createElement("div", {
91
91
  style: {
92
- position: 'relative'
92
+ position: 'relative',
93
+ overflow: 'hidden'
93
94
  }
94
95
  }, /*#__PURE__*/React__default['default'].createElement(parts_chatContainerMessagesList_ChatContainerMessagesList.ChatContainerMessagesList, _extends__default['default']({}, messagesListProps, {
95
96
  actionRef: actionRef || listRef,
@@ -103,7 +104,7 @@ var ChatContainer = function ChatContainer(props) {
103
104
  }, /*#__PURE__*/React__default['default'].createElement(DSIndeterminateProgressIndicator__default['default'], {
104
105
  processing: true,
105
106
  title: "Loading"
106
- })) : null, ['top', 'bottom'].includes(bannerPosition) ? /*#__PURE__*/React__default['default'].createElement(parts_chatContainer_styled.StyledIndicatorContainer, {
107
+ })) : null, /*#__PURE__*/React__default['default'].createElement(parts_chatContainer_styled.StyledIndicatorContainer, {
107
108
  isLoading: bannerPosition
108
109
  }, /*#__PURE__*/React__default['default'].createElement(DSBanner__default['default'], {
109
110
  showCloseButton: true,
@@ -118,7 +119,7 @@ var ChatContainer = function ChatContainer(props) {
118
119
  onClose: bannerProps.onClose,
119
120
  isOpen: true,
120
121
  type: DSBanner.BANNER_TYPES.INFO
121
- })) : null, sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/React__default['default'].createElement(parts_chatContainer_styled.StyledIndicatorContainer, {
122
+ })), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/React__default['default'].createElement(parts_chatContainer_styled.StyledIndicatorContainer, {
122
123
  isLoading: "bottom",
123
124
  linear: true
124
125
  }, /*#__PURE__*/React__default['default'].createElement(DSIndeterminateProgressIndicator__default['default'], {
@@ -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-basic/IndeterminateProgressIndicator';\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' }}>\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 {['top', 'bottom'].includes(bannerPosition) ? (\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 ) : null}\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","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,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qDAAD,mCACMtC,aADN;AAEE,IAAA,QAAQ,EAAEE,QAFZ;AAGE,IAAA,SAAS,EAAE,CAAC,0BAAAO,YAAY,CAACQ,OAAb,gFAAsBsB,YAAtB,KAAsC,CAAvC,IAA4C,CAHzD;AAIE,IAAA,SAAS,EAAEpC,SAAS,IAAIS;AAJ1B,KAtCF,CADF;AA+CD;;AAEDtB,aAAa,CAACkD,SAAd,GAA0BC,wCAA1B;AACAnD,aAAa,CAACoD,YAAd,GAA6BA,sCAA7B;IACMjD,uBAAuB,GAAGkD,kBAAQ,CAACrD,aAAD;AACxCG,uBAAuB,CAAC+C,SAAxB,GAAoCC,wCAApC;;;;;"}
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-basic/IndeterminateProgressIndicator';\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,KAdJ,CAUEc,MAVF;AAAA,MAWEC,SAXF,GAcIf,KAdJ,CAWEe,SAXF;AAAA,MAYEC,YAZF,GAcIhB,KAdJ,CAYEgB,YAZF;AAAA,MAaEC,eAbF,GAcIjB,KAdJ,CAaEiB,eAbF;AAgBA,MAAMC,YAAY,GAAGC,yBAAK,CAACC,MAAN,EAArB;AACA,MAAMC,OAAO,GAAGF,yBAAK,CAACC,MAAN,CAAa;AAAEE,IAAAA,aAAa,EAAEC;AAAjB,GAAb,CAAhB;AACA,MAAMZ,QAAQ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__*/styled__default['default'](dsGrid.
25
25
  });
26
26
  var StyledIndicatorContainer = /*#__PURE__*/styled__default['default'].div.withConfig({
27
27
  componentId: "sc-d732wo-1"
28
- })(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";background:", ";", " ", ""], function (props) {
29
- return props.theme.space.xxs;
28
+ })(["transition:0.4s ease-in-out;position:absolute;visibility:hidden;pointer-events:none;width:calc(100% + ", ");padding:0 ", ";left:-", ";right:-", ";background:", ";", " ", ""], function (props) {
29
+ return props.theme.space.xxs * 2;
30
30
  }, function (props) {
31
31
  return !props.linear ? props.theme.space.xxs : 0;
32
32
  }, function (props) {
@@ -36,9 +36,9 @@ var StyledIndicatorContainer = /*#__PURE__*/styled__default['default'].div.withC
36
36
  }, function (props) {
37
37
  return props.theme.colors.neutral['000'];
38
38
  }, function (props) {
39
- return props.isLoading === 'top' ? 'top: 0;' : '';
39
+ return props.isLoading === 'top' ? "\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto\n " : '';
40
40
  }, function (props) {
41
- return props.isLoading === 'bottom' ? 'bottom: 0;' : '';
41
+ return props.isLoading === 'bottom' ? "\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n " : '';
42
42
  });
43
43
  var MobileStyledChatContainerContent = /*#__PURE__*/styled__default['default'](StyledChatContainerContent).withConfig({
44
44
  componentId: "sc-d732wo-2"
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n position: absolute;\n width: calc(100% + ${(props) => props.theme.space.xxs});\n padding: ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) => (props.isLoading === 'top' ? 'top: 0;' : '')}\n ${(props) => (props.isLoading === 'bottom' ? 'bottom: 0;' : '')}\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","space","xxs","linear","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,wFAExBH,eAFwB,EAIvB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJuB;IAO1BC,wBAAwB,gBAAGN,0BAAM,CAACO,GAAV;AAAA;AAAA,gHAKd,UAACL,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CALc,EAMxB,UAACP,KAAD;AAAA,SAAY,CAACA,KAAK,CAACQ,MAAP,GAAgBR,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlC,GAAwC,CAApD;AAAA,CANwB,EAO1B,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAP0B,EAQzB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CARyB,EASrB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CATqB,EAUjC,UAACH,KAAD;AAAA,SAAYA,KAAK,CAACS,SAAN,KAAoB,KAApB,GAA4B,SAA5B,GAAwC,EAApD;AAAA,CAViC,EAWjC,UAACT,KAAD;AAAA,SAAYA,KAAK,CAACS,SAAN,KAAoB,QAApB,GAA+B,YAA/B,GAA8C,EAA1D;AAAA,CAXiC;IAcxBC,gCAAgC,gBAAGZ,0BAAM,CAACD,0BAAD,CAAT;AAAA;AAAA,iNACzCc,yCADyC,EAEzCC,oCAFyC,EAMzCC,0CANyC,EAUzCC,iCAVyC,EAezCC,+BAfyC,EAgBzCC,iCAhByC,EAqBzCC,8BArByC,EAyBzCC,6CAzByC;;;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n transition: 0.4s ease-in-out;\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: calc(100% + ${(props) => props.theme.space.xxs * 2});\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) =>\n props.isLoading === 'top'\n ? `\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto\n `\n : ''}\n ${(props) =>\n props.isLoading === 'bottom'\n ? `\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","space","xxs","linear","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,wFAExBH,eAFwB,EAIvB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJuB;IAO1BC,wBAAwB,gBAAGN,0BAAM,CAACO,GAAV;AAAA;AAAA,oLAQd,UAACL,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlB,GAAwB,CAAnC;AAAA,CARc,EAStB,UAACP,KAAD;AAAA,SAAY,CAACA,KAAK,CAACQ,MAAP,GAAgBR,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlC,GAAwC,CAApD;AAAA,CATsB,EAU1B,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAV0B,EAWzB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAXyB,EAYrB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAZqB,EAajC,UAACH,KAAD;AAAA,SACAA,KAAK,CAACS,SAAN,KAAoB,KAApB,6GAOI,EARJ;AAAA,CAbiC,EAsBjC,UAACT,KAAD;AAAA,SACAA,KAAK,CAACS,SAAN,KAAoB,QAApB,kHAOI,EARJ;AAAA,CAtBiC;IAiCxBC,gCAAgC,gBAAGZ,0BAAM,CAACD,0BAAD,CAAT;AAAA;AAAA,iNACzCc,yCADyC,EAEzCC,oCAFyC,EAMzCC,0CANyC,EAUzCC,iCAVyC,EAezCC,+BAfyC,EAgBzCC,iCAhByC,EAqBzCC,8BArByC,EAyBzCC,6CAzByC;;;;;;;"}
@@ -20,6 +20,9 @@ var ChatBubble = function ChatBubble(props) {
20
20
  body = props.body,
21
21
  errorMessage = props.errorMessage,
22
22
  helpMessage = props.helpMessage;
23
+ var bodyParts = React.useMemo(function () {
24
+ return body.split('\n');
25
+ }, [body]);
23
26
  return /*#__PURE__*/React.createElement(StyledWrapper, {
24
27
  "data-testid": "ds-chat-bubble-".concat(dsId),
25
28
  type: type
@@ -39,7 +42,11 @@ var ChatBubble = function ChatBubble(props) {
39
42
  "data-testid": "chat-bubble-time-".concat(dsId)
40
43
  }, time)), /*#__PURE__*/React.createElement(StyleBodyWrapper, {
41
44
  "data-testid": "chat-bubble-body-".concat(dsId)
42
- }, body), /*#__PURE__*/React.createElement(ChatBubbleArrow, {
45
+ }, bodyParts.map(function (item, index) {
46
+ return /*#__PURE__*/React.createElement(React.Fragment, {
47
+ key: item
48
+ }, item, index < bodyParts.length - 1 ? /*#__PURE__*/React.createElement("br", null) : null);
49
+ })), /*#__PURE__*/React.createElement(ChatBubbleArrow, {
43
50
  type: type
44
51
  })), errorMessage ? /*#__PURE__*/React.createElement(StyleErrorMessage, {
45
52
  "data-testid": "chat-bubble-error-message-".concat(dsId),
@@ -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 Warning from '@elliemae/ds-icons/WarningCircleFill';\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 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}`}>{body}</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 <Warning />\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","propTypes","propsBubbles","describe"],"mappings":";;;;;;;;;;;;;IAiBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAqC;AACtDC,EAAAA,gBAAgB,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,IAA3B;AAAA,MAAiCC,IAAjC,GAAqER,KAArE,CAAiCQ,IAAjC;AAAA,MAAuCC,YAAvC,GAAqET,KAArE,CAAuCS,YAAvC;AAAA,MAAqDC,WAArD,GAAqEV,KAArE,CAAqDU,WAArD;AACA,sBACE,oBAAC,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,QAAQ,CAACd,UAAD;AACrCG,oBAAoB,CAACS,SAArB,GAAiCC,YAAjC;;;;"}
1
+ {"version":3,"file":"ChatBubble.js","sources":["../../../../src/parts/bubble/ChatBubble.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport Warning from '@elliemae/ds-icons/WarningCircleFill';\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(() => body.split('\\n'), [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 <Warning />\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","map","item","index","length","propTypes","propsBubbles","describe"],"mappings":";;;;;;;;;;;;;IAiBMA,UAAU,GAAG,SAAbA,UAAa,CAACC,KAAD,EAAqC;AACtDC,EAAAA,gBAAgB,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,IAA3B;AAAA,MAAiCC,IAAjC,GAAqER,KAArE,CAAiCQ,IAAjC;AAAA,MAAuCC,YAAvC,GAAqET,KAArE,CAAuCS,YAAvC;AAAA,MAAqDC,WAArD,GAAqEV,KAArE,CAAqDU,WAArD;AACA,MAAMC,SAAS,GAAGC,KAAK,CAACC,OAAN,CAAc;AAAA,WAAML,IAAI,CAACM,KAAL,CAAW,IAAX,CAAN;AAAA,GAAd,EAAsC,CAACN,IAAD,CAAtC,CAAlB;AAEA,sBACE,oBAAC,aAAD;AAAe,4CAA+BJ,IAA/B,CAAf;AAAsD,IAAA,IAAI,EAAEC;AAA5D,kBACE,oBAAC,mBAAD;AAAqB,IAAA,IAAI,EAAEA;AAA3B,kBACE,oBAAC,iBAAD;AAAmB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9BN,CADF;AAkCD;;AACDX,UAAU,CAACoB,SAAX,GAAuBC,YAAvB;IAEMlB,oBAAoB,GAAGmB,QAAQ,CAACtB,UAAD;AACrCG,oBAAoB,CAACiB,SAArB,GAAiCC,YAAjC;;;;"}
@@ -78,7 +78,8 @@ var ChatContainer = function ChatContainer(props) {
78
78
  "aria-label": "chat window"
79
79
  }, /*#__PURE__*/React.createElement("div", {
80
80
  style: {
81
- position: 'relative'
81
+ position: 'relative',
82
+ overflow: 'hidden'
82
83
  }
83
84
  }, /*#__PURE__*/React.createElement(ChatContainerMessagesList, _extends({}, messagesListProps, {
84
85
  actionRef: actionRef || listRef,
@@ -92,7 +93,7 @@ var ChatContainer = function ChatContainer(props) {
92
93
  }, /*#__PURE__*/React.createElement(DSIndeterminateProgressIndicator, {
93
94
  processing: true,
94
95
  title: "Loading"
95
- })) : null, ['top', 'bottom'].includes(bannerPosition) ? /*#__PURE__*/React.createElement(StyledIndicatorContainer, {
96
+ })) : null, /*#__PURE__*/React.createElement(StyledIndicatorContainer, {
96
97
  isLoading: bannerPosition
97
98
  }, /*#__PURE__*/React.createElement(DSBanner, {
98
99
  showCloseButton: true,
@@ -107,7 +108,7 @@ var ChatContainer = function ChatContainer(props) {
107
108
  onClose: bannerProps.onClose,
108
109
  isOpen: true,
109
110
  type: BANNER_TYPES.INFO
110
- })) : null, sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/React.createElement(StyledIndicatorContainer, {
111
+ })), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/React.createElement(StyledIndicatorContainer, {
111
112
  isLoading: "bottom",
112
113
  linear: true
113
114
  }, /*#__PURE__*/React.createElement(DSIndeterminateProgressIndicator, {
@@ -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-basic/IndeterminateProgressIndicator';\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' }}>\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 {['top', 'bottom'].includes(bannerPosition) ? (\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 ) : null}\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","includes","label","id","viewLabel","onClick","onView","onClose","BANNER_TYPES","INFO","clientHeight","propTypes","containerProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA4C;AAAA;;AAChEC,EAAAA,gBAAgB,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,iB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BACE,oBAAC,gCAAD;AAAkC,IAAA,UAAU,MAA5C;AAA6C,IAAA,KAAK,EAAC,SAAnD;AAA6D,IAAA,QAAQ;AAArE,IADF,CADD,GAIG,IAnCN,CADF,eAsCE,oBAAC,YAAD,eACMnB,aADN;AAEE,IAAA,QAAQ,EAAEE,QAFZ;AAGE,IAAA,SAAS,EAAE,CAAC,0BAAAO,YAAY,CAACQ,OAAb,gFAAsBiB,YAAtB,KAAsC,CAAvC,IAA4C,CAHzD;AAIE,IAAA,SAAS,EAAE/B,SAAS,IAAIS;AAJ1B,KAtCF,CADF;AA+CD;;AAEDtB,aAAa,CAAC6C,SAAd,GAA0BC,cAA1B;AACA9C,aAAa,CAAC+C,YAAd,GAA6BA,YAA7B;IACM5C,uBAAuB,GAAG6C,QAAQ,CAAChD,aAAD;AACxCG,uBAAuB,CAAC0C,SAAxB,GAAoCC,cAApC;;;;"}
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-basic/IndeterminateProgressIndicator';\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","includes","label","id","viewLabel","onClick","onView","onClose","BANNER_TYPES","INFO","clientHeight","propTypes","containerProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA4C;AAAA;;AAChEC,EAAAA,gBAAgB,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,KAdJ,CAUEc,MAVF;AAAA,MAWEC,SAXF,GAcIf,KAdJ,CAWEe,SAXF;AAAA,MAYEC,YAZF,GAcIhB,KAdJ,CAYEgB,YAZF;AAAA,MAaEC,eAbF,GAcIjB,KAdJ,CAaEiB,eAbF;AAgBA,MAAMC,YAAY,GAAGC,KAAK,CAACC,MAAN,EAArB;AACA,MAAMC,OAAO,GAAGF,KAAK,CAACC,MAAN,CAAa;AAAEE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 @@ var StyledChatContainerContent = /*#__PURE__*/styled(Grid).withConfig({
17
17
  });
18
18
  var StyledIndicatorContainer = /*#__PURE__*/styled.div.withConfig({
19
19
  componentId: "sc-d732wo-1"
20
- })(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";background:", ";", " ", ""], function (props) {
21
- return props.theme.space.xxs;
20
+ })(["transition:0.4s ease-in-out;position:absolute;visibility:hidden;pointer-events:none;width:calc(100% + ", ");padding:0 ", ";left:-", ";right:-", ";background:", ";", " ", ""], function (props) {
21
+ return props.theme.space.xxs * 2;
22
22
  }, function (props) {
23
23
  return !props.linear ? props.theme.space.xxs : 0;
24
24
  }, function (props) {
@@ -28,9 +28,9 @@ var StyledIndicatorContainer = /*#__PURE__*/styled.div.withConfig({
28
28
  }, function (props) {
29
29
  return props.theme.colors.neutral['000'];
30
30
  }, function (props) {
31
- return props.isLoading === 'top' ? 'top: 0;' : '';
31
+ return props.isLoading === 'top' ? "\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto\n " : '';
32
32
  }, function (props) {
33
- return props.isLoading === 'bottom' ? 'bottom: 0;' : '';
33
+ return props.isLoading === 'bottom' ? "\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n " : '';
34
34
  });
35
35
  var MobileStyledChatContainerContent = /*#__PURE__*/styled(StyledChatContainerContent).withConfig({
36
36
  componentId: "sc-d732wo-2"
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n position: absolute;\n width: calc(100% + ${(props) => props.theme.space.xxs});\n padding: ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) => (props.isLoading === 'top' ? 'top: 0;' : '')}\n ${(props) => (props.isLoading === 'bottom' ? 'bottom: 0;' : '')}\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","space","xxs","linear","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,MAAM,CAACC,IAAD,CAAT;AAAA;AAAA,wFAExBH,eAFwB,EAIvB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJuB;IAO1BC,wBAAwB,gBAAGN,MAAM,CAACO,GAAV;AAAA;AAAA,gHAKd,UAACL,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CALc,EAMxB,UAACP,KAAD;AAAA,SAAY,CAACA,KAAK,CAACQ,MAAP,GAAgBR,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlC,GAAwC,CAApD;AAAA,CANwB,EAO1B,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAP0B,EAQzB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CARyB,EASrB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CATqB,EAUjC,UAACH,KAAD;AAAA,SAAYA,KAAK,CAACS,SAAN,KAAoB,KAApB,GAA4B,SAA5B,GAAwC,EAApD;AAAA,CAViC,EAWjC,UAACT,KAAD;AAAA,SAAYA,KAAK,CAACS,SAAN,KAAoB,QAApB,GAA+B,YAA/B,GAA8C,EAA1D;AAAA,CAXiC;IAcxBC,gCAAgC,gBAAGZ,MAAM,CAACD,0BAAD,CAAT;AAAA;AAAA,iNACzCc,qBADyC,EAEzCC,gBAFyC,EAMzCC,sBANyC,EAUzCC,OAVyC,EAezCC,KAfyC,EAgBzCC,OAhByC,EAqBzCC,IArByC,EAyBzCC,mBAzByC;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n transition: 0.4s ease-in-out;\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: calc(100% + ${(props) => props.theme.space.xxs * 2});\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) =>\n props.isLoading === 'top'\n ? `\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto\n `\n : ''}\n ${(props) =>\n props.isLoading === 'bottom'\n ? `\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","space","xxs","linear","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,MAAM,CAACC,IAAD,CAAT;AAAA;AAAA,wFAExBH,eAFwB,EAIvB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJuB;IAO1BC,wBAAwB,gBAAGN,MAAM,CAACO,GAAV;AAAA;AAAA,oLAQd,UAACL,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlB,GAAwB,CAAnC;AAAA,CARc,EAStB,UAACP,KAAD;AAAA,SAAY,CAACA,KAAK,CAACQ,MAAP,GAAgBR,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAAlC,GAAwC,CAApD;AAAA,CATsB,EAU1B,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAV0B,EAWzB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYK,KAAZ,CAAkBC,GAA7B;AAAA,CAXyB,EAYrB,UAACP,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAZqB,EAajC,UAACH,KAAD;AAAA,SACAA,KAAK,CAACS,SAAN,KAAoB,KAApB,6GAOI,EARJ;AAAA,CAbiC,EAsBjC,UAACT,KAAD;AAAA,SACAA,KAAK,CAACS,SAAN,KAAoB,QAApB,kHAOI,EARJ;AAAA,CAtBiC;IAiCxBC,gCAAgC,gBAAGZ,MAAM,CAACD,0BAAD,CAAT;AAAA;AAAA,iNACzCc,qBADyC,EAEzCC,gBAFyC,EAMzCC,sBANyC,EAUzCC,OAVyC,EAezCC,KAfyC,EAgBzCC,OAhByC,EAqBzCC,IArByC,EAyBzCC,mBAzByC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat",
3
- "version": "1.56.0",
3
+ "version": "1.57.0-rc.2",
4
4
  "license": "MIT",
5
5
  "description": "Ellie Mae - Dim Sum - Chat",
6
6
  "main": "cjs/index.js",
@@ -16,14 +16,14 @@
16
16
  "directory": "dist"
17
17
  },
18
18
  "dependencies": {
19
- "@elliemae/ds-banner": "1.56.0",
20
- "@elliemae/ds-basic": "1.56.0",
21
- "@elliemae/ds-button": "1.56.0",
22
- "@elliemae/ds-grid": "1.56.0",
23
- "@elliemae/ds-icons": "1.56.0",
24
- "@elliemae/ds-props-helpers": "1.56.0",
25
- "@elliemae/ds-tooltip": "1.56.0",
26
- "@elliemae/ds-truncated-tooltip-text": "1.56.0",
19
+ "@elliemae/ds-banner": "1.57.0-rc.2",
20
+ "@elliemae/ds-basic": "1.57.0-rc.2",
21
+ "@elliemae/ds-button": "1.57.0-rc.2",
22
+ "@elliemae/ds-grid": "1.57.0-rc.2",
23
+ "@elliemae/ds-icons": "1.57.0-rc.2",
24
+ "@elliemae/ds-props-helpers": "1.57.0-rc.2",
25
+ "@elliemae/ds-tooltip": "1.57.0-rc.2",
26
+ "@elliemae/ds-truncated-tooltip-text": "1.57.0-rc.2",
27
27
  "prop-types": "~15.7.2",
28
28
  "react-desc": "^4.1.2",
29
29
  "react-virtual": "^2.3.2"