@elliemae/ds-chat 1.61.10 → 1.61.13
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/ChatDataTestids.js.map +1 -1
- package/cjs/index.js +2 -1
- package/cjs/index.js.map +1 -1
- package/cjs/parts/bubble/ChatBubble.js.map +1 -1
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +1 -1
- package/cjs/parts/bubble/config/useValidateProps.js.map +1 -1
- package/cjs/parts/bubble/props.js.map +1 -1
- package/cjs/parts/bubble/styled.js.map +1 -1
- package/cjs/parts/chat-card/ChatCard.js.map +1 -1
- package/cjs/parts/chat-card/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-card/props.js.map +1 -1
- package/cjs/parts/chat-card/styled.js.map +1 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-composer/props.js.map +1 -1
- package/cjs/parts/chat-composer/styled.js.map +1 -1
- package/cjs/parts/chat-container/ChatContainer.js +1 -0
- package/cjs/parts/chat-container/ChatContainer.js.map +1 -1
- package/cjs/parts/chat-container/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-container/index.js +1 -0
- package/cjs/parts/chat-container/index.js.map +1 -1
- package/cjs/parts/chat-container/props.js.map +1 -1
- package/cjs/parts/chat-container/styled.js.map +1 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/cjs/parts/chat-container-header/helpers.js.map +1 -1
- package/cjs/parts/chat-container-header/styled.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +9 -3
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/index.js +2 -0
- package/cjs/parts/chat-container-messages-list/index.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/props.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/styled.js +7 -3
- package/cjs/parts/chat-container-messages-list/styled.js.map +1 -1
- package/cjs/parts/chat-container-messages-list/useGetNewMessages.js +34 -0
- package/cjs/parts/chat-container-messages-list/useGetNewMessages.js.map +1 -0
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-empty-state/props.js.map +1 -1
- package/cjs/parts/chat-empty-state/styled.js.map +1 -1
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +1 -1
- package/cjs/parts/chat-sidebar/props.js.map +1 -1
- package/cjs/parts/chat-sidebar/styled.js.map +1 -1
- package/cjs/parts/floating-button/FloatingButton.js.map +1 -1
- package/cjs/parts/floating-button/props.js.map +1 -1
- package/cjs/parts/floating-button/styled.js.map +1 -1
- package/cjs/parts/floating-container/styled.js.map +1 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js +1 -0
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/cjs/parts/grid-influencer/styled.js.map +1 -1
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +1 -1
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +1 -1
- package/cjs/parts/message-delimiter/props.js.map +1 -1
- package/cjs/parts/message-delimiter/styled.js.map +1 -1
- package/cjs/parts/sidebar-button/SidebarButton.js.map +1 -1
- package/cjs/parts/sidebar-button/props.js.map +1 -1
- package/cjs/parts/sidebar-button/styled.js.map +1 -1
- package/cjs/parts/system-message/SystemMessage.js.map +1 -1
- package/cjs/parts/system-message/config/useValidateProps.js.map +1 -1
- package/cjs/parts/system-message/props.js.map +1 -1
- package/cjs/parts/system-message/style.js.map +1 -1
- package/cjs/parts/tile-button/TileButton.js.map +1 -1
- package/cjs/parts/tile-button/config/useValidateProps.js.map +1 -1
- package/cjs/parts/tile-button/props.js.map +1 -1
- package/cjs/parts/tile-button/styled.js.map +1 -1
- package/cjs/prop-types.js.map +1 -1
- package/cjs/tests/utils.js.map +1 -1
- package/esm/ChatDataTestids.js.map +1 -1
- package/esm/index.js +2 -1
- package/esm/index.js.map +1 -1
- package/esm/parts/bubble/ChatBubble.js.map +1 -1
- package/esm/parts/bubble/ChatBubbleArrow.js.map +1 -1
- package/esm/parts/bubble/config/useValidateProps.js.map +1 -1
- package/esm/parts/bubble/props.js.map +1 -1
- package/esm/parts/bubble/styled.js.map +1 -1
- package/esm/parts/chat-card/ChatCard.js.map +1 -1
- package/esm/parts/chat-card/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-card/props.js.map +1 -1
- package/esm/parts/chat-card/styled.js.map +1 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
- package/esm/parts/chat-composer/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-composer/props.js.map +1 -1
- package/esm/parts/chat-composer/styled.js.map +1 -1
- package/esm/parts/chat-container/ChatContainer.js +1 -0
- package/esm/parts/chat-container/ChatContainer.js.map +1 -1
- package/esm/parts/chat-container/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-container/index.js +1 -0
- package/esm/parts/chat-container/index.js.map +1 -1
- package/esm/parts/chat-container/props.js.map +1 -1
- package/esm/parts/chat-container/styled.js.map +1 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
- package/esm/parts/chat-container-header/helpers.js.map +1 -1
- package/esm/parts/chat-container-header/styled.js.map +1 -1
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +10 -4
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-container-messages-list/index.js +2 -0
- package/esm/parts/chat-container-messages-list/index.js.map +1 -1
- package/esm/parts/chat-container-messages-list/props.js.map +1 -1
- package/esm/parts/chat-container-messages-list/styled.js +7 -4
- package/esm/parts/chat-container-messages-list/styled.js.map +1 -1
- package/esm/parts/chat-container-messages-list/useGetNewMessages.js +26 -0
- package/esm/parts/chat-container-messages-list/useGetNewMessages.js.map +1 -0
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-empty-state/props.js.map +1 -1
- package/esm/parts/chat-empty-state/styled.js.map +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +1 -1
- package/esm/parts/chat-sidebar/props.js.map +1 -1
- package/esm/parts/chat-sidebar/styled.js.map +1 -1
- package/esm/parts/floating-button/FloatingButton.js.map +1 -1
- package/esm/parts/floating-button/props.js.map +1 -1
- package/esm/parts/floating-button/styled.js.map +1 -1
- package/esm/parts/floating-container/styled.js.map +1 -1
- package/esm/parts/grid-influencer/InfluencerContainer.js +1 -0
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +1 -1
- package/esm/parts/grid-influencer/styled.js.map +1 -1
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +1 -1
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +1 -1
- package/esm/parts/message-delimiter/props.js.map +1 -1
- package/esm/parts/message-delimiter/styled.js.map +1 -1
- package/esm/parts/sidebar-button/SidebarButton.js.map +1 -1
- package/esm/parts/sidebar-button/props.js.map +1 -1
- package/esm/parts/sidebar-button/styled.js.map +1 -1
- package/esm/parts/system-message/SystemMessage.js.map +1 -1
- package/esm/parts/system-message/config/useValidateProps.js.map +1 -1
- package/esm/parts/system-message/props.js.map +1 -1
- package/esm/parts/system-message/style.js.map +1 -1
- package/esm/parts/tile-button/TileButton.js.map +1 -1
- package/esm/parts/tile-button/config/useValidateProps.js.map +1 -1
- package/esm/parts/tile-button/props.js.map +1 -1
- package/esm/parts/tile-button/styled.js.map +1 -1
- package/esm/prop-types.js.map +1 -1
- package/esm/tests/utils.js.map +1 -1
- package/package.json +9 -9
- package/parts/chat-container-messages-list/useGetNewMessages/package.json +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDataTestids.js","sources":["../../src/ChatDataTestids.tsx"],"sourcesContent":["export const ChatDataTestIds = {\n COMPOSER_TEXTAREA: 'chat-composer-textarea',\n COMPOSER_SEND_BUTTON: 'chat-composer-send-button',\n CARD_TITLE: 'chat-card-title',\n CARD_WRAPPER: 'chat-card-wrapper',\n CARD_TIME: 'chat-card-time',\n CARD_RIGHT_ADDON: 'chat-right-addon',\n CARD_CONTENT: 'chat-card-content',\n LOADING_INDICATOR: 'ds-chat-loading-indicator',\n HEADER_TITLE: 'chat-header-title',\n HEADER_CHILDREN: 'chat-header-children',\n THREAD_CONTAINER: 'chat-thread-container',\n LOAD_MORE_BUTTON: 'ds-chat-load-more-btn',\n FLOATING_BUTTON: 'chat-floating-button',\n SYSTEM_MSG_TITLE: 'chat-system-message-title',\n SYSTEM_MSG_BODY: 'chat-system-message-body',\n SYSTEM_MSG_TIME: 'chat-system-message-time',\n BUBBLE: 'ds-chat-bubble',\n BUBBLE_TITLE: 'chat-bubble-title',\n BUBBLE_BODY: 'chat-bubble-body',\n BANNER: 'ds-banner-container',\n};\n"],"names":["ChatDataTestIds","COMPOSER_TEXTAREA","COMPOSER_SEND_BUTTON","CARD_TITLE","CARD_WRAPPER","CARD_TIME","CARD_RIGHT_ADDON","CARD_CONTENT","LOADING_INDICATOR","HEADER_TITLE","HEADER_CHILDREN","THREAD_CONTAINER","LOAD_MORE_BUTTON","FLOATING_BUTTON","SYSTEM_MSG_TITLE","SYSTEM_MSG_BODY","SYSTEM_MSG_TIME","BUBBLE","BUBBLE_TITLE","BUBBLE_BODY","BANNER"],"mappings":";;;;IAAaA,eAAe,GAAG;
|
|
1
|
+
{"version":3,"file":"ChatDataTestids.js","sources":["../../src/ChatDataTestids.tsx"],"sourcesContent":["export const ChatDataTestIds = {\n COMPOSER_TEXTAREA: 'chat-composer-textarea',\n COMPOSER_SEND_BUTTON: 'chat-composer-send-button',\n CARD_TITLE: 'chat-card-title',\n CARD_WRAPPER: 'chat-card-wrapper',\n CARD_TIME: 'chat-card-time',\n CARD_RIGHT_ADDON: 'chat-right-addon',\n CARD_CONTENT: 'chat-card-content',\n LOADING_INDICATOR: 'ds-chat-loading-indicator',\n HEADER_TITLE: 'chat-header-title',\n HEADER_CHILDREN: 'chat-header-children',\n THREAD_CONTAINER: 'chat-thread-container',\n LOAD_MORE_BUTTON: 'ds-chat-load-more-btn',\n FLOATING_BUTTON: 'chat-floating-button',\n SYSTEM_MSG_TITLE: 'chat-system-message-title',\n SYSTEM_MSG_BODY: 'chat-system-message-body',\n SYSTEM_MSG_TIME: 'chat-system-message-time',\n BUBBLE: 'ds-chat-bubble',\n BUBBLE_TITLE: 'chat-bubble-title',\n BUBBLE_BODY: 'chat-bubble-body',\n BANNER: 'ds-banner-container',\n};\n"],"names":["ChatDataTestIds","COMPOSER_TEXTAREA","COMPOSER_SEND_BUTTON","CARD_TITLE","CARD_WRAPPER","CARD_TIME","CARD_RIGHT_ADDON","CARD_CONTENT","LOADING_INDICATOR","HEADER_TITLE","HEADER_CHILDREN","THREAD_CONTAINER","LOAD_MORE_BUTTON","FLOATING_BUTTON","SYSTEM_MSG_TITLE","SYSTEM_MSG_BODY","SYSTEM_MSG_TIME","BUBBLE","BUBBLE_TITLE","BUBBLE_BODY","BANNER"],"mappings":";;;;IAAaA,eAAe,GAAG;EAC7BC,iBAAiB,EAAE,wBADU;EAE7BC,oBAAoB,EAAE,2BAFO;EAG7BC,UAAU,EAAE,iBAHiB;EAI7BC,YAAY,EAAE,mBAJe;EAK7BC,SAAS,EAAE,gBALkB;EAM7BC,gBAAgB,EAAE,kBANW;EAO7BC,YAAY,EAAE,mBAPe;EAQ7BC,iBAAiB,EAAE,2BARU;EAS7BC,YAAY,EAAE,mBATe;EAU7BC,eAAe,EAAE,sBAVY;EAW7BC,gBAAgB,EAAE,uBAXW;EAY7BC,gBAAgB,EAAE,uBAZW;EAa7BC,eAAe,EAAE,sBAbY;EAc7BC,gBAAgB,EAAE,2BAdW;EAe7BC,eAAe,EAAE,0BAfY;EAgB7BC,eAAe,EAAE,0BAhBY;EAiB7BC,MAAM,EAAE,gBAjBqB;EAkB7BC,YAAY,EAAE,mBAlBe;EAmB7BC,WAAW,EAAE,kBAnBgB;EAoB7BC,MAAM,EAAE;AApBqB;;;;"}
|
package/cjs/index.js
CHANGED
|
@@ -43,13 +43,14 @@ require('@elliemae/ds-button');
|
|
|
43
43
|
require('./parts/chat-container-messages-list/styled.js');
|
|
44
44
|
require('./parts/chat-container-messages-list/props.js');
|
|
45
45
|
require('./parts/chat-container-messages-list/config/useValidateProps.js');
|
|
46
|
+
require('./parts/chat-container-messages-list/useGetNewMessages.js');
|
|
47
|
+
require('@babel/runtime/helpers/slicedToArray');
|
|
46
48
|
require('./parts/message-delimiter/styled.js');
|
|
47
49
|
require('./parts/message-delimiter/props.js');
|
|
48
50
|
require('./parts/message-delimiter/config/useValidateProps.js');
|
|
49
51
|
require('./parts/system-message/style.js');
|
|
50
52
|
require('./parts/system-message/props.js');
|
|
51
53
|
require('./parts/system-message/config/useValidateProps.js');
|
|
52
|
-
require('@babel/runtime/helpers/slicedToArray');
|
|
53
54
|
require('./parts/chat-composer/styled.js');
|
|
54
55
|
require('./parts/chat-composer/config/useValidateProps.js');
|
|
55
56
|
require('./parts/chat-composer/props.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -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 { 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}-${index}`}>\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;
|
|
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}-${index}`}>\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;EACtDC,qDAAgB,CAACD,KAAD,EAAQE,oBAAoB,CAACC,MAArB,EAAR,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,GAAmB,CAA3B,gBAA+BZ,mDAA/B,GAAwC,IAF3C,CADa;GAAd,CADH,CATF,eAiBEA,wCAACa,4CAAD;IAAiB,IAAI,EAAEpB;IAjBzB,CADF,EAoBGI,YAAY,gBACXG,wCAACc,qCAAD;IAAmB,mDAA0CtB,IAA1C,CAAnB;IAAqE,CAAC,EAAC,KAAvE;IAA6E,MAAM,EAAC,KAApF;IAA0F,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;kBAC9FQ,sDAAOH,YAAP,CADF,eAEEG,wCAACe,yBAAD,OAFF,CADW,GAKT,IAzBN,EA0BGjB,WAAW,gBACVE,wCAACgB,oCAAD;IAAkB,kDAAyCxB,IAAzC,CAAlB;IAAmE,CAAC,EAAC,KAArE;IAA2E,MAAM,EAAC,KAAlF;IAAwF,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;kBAC5FQ,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;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatBubbleArrow.js","sources":["../../../../src/parts/bubble/ChatBubbleArrow.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledBubbleArrow } from './styled';\nimport { BUBBLE_TYPES, BubbleProps, propsArrowBubble } from './props';\n\nexport const ChatBubbleArrow = ({ type }: Pick<BubbleProps, 'type'>): JSX.Element => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\n <defs>\n <path\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n id=\"path-chat-bubble\"\n ></path>\n <filter x=\"-55.6%\" y=\"-50.0%\" width=\"211.1%\" height=\"225.0%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g id=\"[DSK]-Visual-Design\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Path-Copy\" transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use fill=\"black\" fillOpacity=\"1\" filter=\"url(#filter-2)\" xlinkHref=\"#path-chat-bubble\"></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref=\"#path-chat-bubble\"></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"9px\" height=\"8px\" viewBox=\"0 0 9 8\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n id=\"Path\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nChatBubbleArrow.propTypes = propsArrowBubble;\n"],"names":["ChatBubbleArrow","type","React","StyledBubbleArrow","BUBBLE_TYPES","RECIPIENT","propTypes","propsArrowBubble"],"mappings":";;;;;;;;;;;;;;;;;IAIaA,eAAe,GAAG,SAAlBA,eAAkB;
|
|
1
|
+
{"version":3,"file":"ChatBubbleArrow.js","sources":["../../../../src/parts/bubble/ChatBubbleArrow.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledBubbleArrow } from './styled';\nimport { BUBBLE_TYPES, BubbleProps, propsArrowBubble } from './props';\n\nexport const ChatBubbleArrow = ({ type }: Pick<BubbleProps, 'type'>): JSX.Element => (\n <StyledBubbleArrow>\n {type === BUBBLE_TYPES.RECIPIENT ? (\n <svg width=\"15px\" height=\"14px\" viewBox=\"0 0 15 14\">\n <defs>\n <path\n d=\"M12,8.5 C12,7.9373169 11.6782751,7.4856453 11.2282104,7.196228 C11.2286673,7.1967363 3,2 3,2 L3,10 L10.5627441,10 L10.5658569,9.9933472 C11.3630371,9.9580688 12,9.3058472 12,8.5 Z\"\n id=\"path-chat-bubble\"\n ></path>\n <filter x=\"-55.6%\" y=\"-50.0%\" width=\"211.1%\" height=\"225.0%\" filterUnits=\"objectBoundingBox\" id=\"filter-2\">\n <feOffset dx=\"2.3\" dy=\"1.2\" in=\"SourceAlpha\" result=\"shadowOffsetOuter1\"></feOffset>\n <feGaussianBlur stdDeviation=\"1.5\" in=\"shadowOffsetOuter1\" result=\"shadowBlurOuter1\"></feGaussianBlur>\n <feColorMatrix\n values=\"0 0 0 0 0.207843137 \n 0 0 0 0 0.235294118 \n 0 0 0 0 0.274509804 \n 0 0 0 0.8 0\"\n type=\"matrix\"\n in=\"shadowBlurOuter1\"\n ></feColorMatrix>\n </filter>\n </defs>\n <g id=\"[DSK]-Visual-Design\" stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <g id=\"Path-Copy\" transform=\"translate(7.500000, 6.000000) scale(-1, 1) translate(-7.500000, -6.000000) \">\n <use fill=\"black\" fillOpacity=\"1\" filter=\"url(#filter-2)\" xlinkHref=\"#path-chat-bubble\"></use>\n <use fill=\"#FFFFFF\" fillRule=\"evenodd\" xlinkHref=\"#path-chat-bubble\"></use>\n </g>\n </g>\n </svg>\n ) : (\n <svg width=\"9px\" height=\"8px\" viewBox=\"0 0 9 8\">\n <g stroke=\"none\" strokeWidth=\"1\" fill=\"none\" fillRule=\"evenodd\">\n <path\n d=\"M9,6.5 C9,5.9373169 8.6782751,5.4856453 8.2282104,5.196228 C8.2286673,5.1967363 0,0 0,0 L0,8 L7.5627441,8 L7.5658569,7.9933472 C8.3630371,7.9580688 9,7.3058472 9,6.5 Z\"\n id=\"Path\"\n fill=\"#1E79C2\"\n ></path>\n </g>\n </svg>\n )}\n </StyledBubbleArrow>\n);\n\nChatBubbleArrow.propTypes = propsArrowBubble;\n"],"names":["ChatBubbleArrow","type","React","StyledBubbleArrow","BUBBLE_TYPES","RECIPIENT","propTypes","propsArrowBubble"],"mappings":";;;;;;;;;;;;;;;;;IAIaA,eAAe,GAAG,SAAlBA,eAAkB;EAAA,IAAGC,IAAH,QAAGA,IAAH;EAAA,oBAC7BC,wCAACC,qCAAD,QACGF,IAAI,KAAKG,+BAAY,CAACC,SAAtB,gBACCH;IAAK,KAAK,EAAC,MAAX;IAAkB,MAAM,EAAC,MAAzB;IAAgC,OAAO,EAAC;kBACtCA,mEACEA;IACE,CAAC,EAAC,qLADJ;IAEE,EAAE,EAAC;IAHP,eAKEA;IAAQ,CAAC,EAAC,QAAV;IAAmB,CAAC,EAAC,QAArB;IAA8B,KAAK,EAAC,QAApC;IAA6C,MAAM,EAAC,QAApD;IAA6D,WAAW,EAAC,mBAAzE;IAA6F,EAAE,EAAC;kBAC9FA;IAAU,EAAE,EAAC,KAAb;IAAmB,EAAE,EAAC,KAAtB;IAA4B,EAAE,EAAC,aAA/B;IAA6C,MAAM,EAAC;IADtD,eAEEA;IAAgB,YAAY,EAAC,KAA7B;IAAmC,EAAE,EAAC,oBAAtC;IAA2D,MAAM,EAAC;IAFpE,eAGEA;IACE,MAAM,EAAC,iFADT;IAKE,IAAI,EAAC,QALP;IAME,EAAE,EAAC;IATP,CALF,CADF,eAmBEA;IAAG,EAAE,EAAC,qBAAN;IAA4B,MAAM,EAAC,MAAnC;IAA0C,WAAW,EAAC,GAAtD;IAA0D,IAAI,EAAC,MAA/D;IAAsE,QAAQ,EAAC;kBAC7EA;IAAG,EAAE,EAAC,WAAN;IAAkB,SAAS,EAAC;kBAC1BA;IAAK,IAAI,EAAC,OAAV;IAAkB,WAAW,EAAC,GAA9B;IAAkC,MAAM,EAAC,gBAAzC;IAA0D,SAAS,EAAC;IADtE,eAEEA;IAAK,IAAI,EAAC,SAAV;IAAoB,QAAQ,EAAC,SAA7B;IAAuC,SAAS,EAAC;IAFnD,CADF,CAnBF,CADD,gBA4BCA;IAAK,KAAK,EAAC,KAAX;IAAiB,MAAM,EAAC,KAAxB;IAA8B,OAAO,EAAC;kBACpCA;IAAG,MAAM,EAAC,MAAV;IAAiB,WAAW,EAAC,GAA7B;IAAiC,IAAI,EAAC,MAAtC;IAA6C,QAAQ,EAAC;kBACpDA;IACE,CAAC,EAAC,yKADJ;IAEE,EAAE,EAAC,MAFL;IAGE,IAAI,EAAC;IAJT,CADF,CA7BJ,CAD6B;AAAA;AA2C/BF,eAAe,CAACM,SAAhB,GAA4BC,mCAA5B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/bubble/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { BubbleProps } from '../props';\n\nconst throwError = (message: string): void => {\n throw new Error(\n `Bubble:: ${message}\n `,\n );\n};\n\nexport const useValidateProps = (props: BubbleProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n if (typeof props.title === 'undefined') {\n throwError(`Please provide a title property to use this component.`);\n }\n if (typeof props.time === 'undefined') {\n throwError(`Please provide a time property to use this component.`);\n }\n if (typeof props.body === 'undefined') {\n throwError(`Please provide a body property to use this component.`);\n }\n if (typeof props.type === 'undefined') {\n throwError(`Please provide a type property to use this component.`);\n }\n};\n"],"names":["throwError","message","Error","useValidateProps","props","schema","useValidatePropTypes","title","time","body","type"],"mappings":";;;;;;AAGA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAA2B;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/bubble/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { BubbleProps } from '../props';\n\nconst throwError = (message: string): void => {\n throw new Error(\n `Bubble:: ${message}\n `,\n );\n};\n\nexport const useValidateProps = (props: BubbleProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n if (typeof props.title === 'undefined') {\n throwError(`Please provide a title property to use this component.`);\n }\n if (typeof props.time === 'undefined') {\n throwError(`Please provide a time property to use this component.`);\n }\n if (typeof props.body === 'undefined') {\n throwError(`Please provide a body property to use this component.`);\n }\n if (typeof props.type === 'undefined') {\n throwError(`Please provide a type property to use this component.`);\n }\n};\n"],"names":["throwError","message","Error","useValidateProps","props","schema","useValidatePropTypes","title","time","body","type"],"mappings":";;;;;;AAGA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,OAAD,EAA2B;EAC5C,MAAM,IAAIC,KAAJ,oBACQD,OADR,UAAN;AAID,CALD;;IAOaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAqBC,MAArB,EAA+C;EAC7EC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;;EACA,IAAI,OAAOD,KAAK,CAACG,KAAb,KAAuB,WAA3B,EAAwC;IACtCP,UAAU,0DAAV;;;EAEF,IAAI,OAAOI,KAAK,CAACI,IAAb,KAAsB,WAA1B,EAAuC;IACrCR,UAAU,yDAAV;;;EAEF,IAAI,OAAOI,KAAK,CAACK,IAAb,KAAsB,WAA1B,EAAuC;IACrCT,UAAU,yDAAV;;;EAEF,IAAI,OAAOI,KAAK,CAACM,IAAb,KAAsB,WAA1B,EAAuC;IACrCV,UAAU,yDAAV;;AAEH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/bubble/props.ts"],"sourcesContent":["import propTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\n/**\n *\n * BUBBLE\n *\n */\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\nexport type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];\n\nexport interface BubbleProps {\n dsId: string | number;\n type: BubbleTypesValues;\n title: string;\n body: string;\n time: string;\n errorMessage: string | React.ReactChild;\n helpMessage: string | React.ReactChild;\n onClick: (id: string | number) => void;\n}\n\nexport const defaultBubbleProps: BubbleProps = {\n dsId: undefined,\n type: BUBBLE_TYPES.SENDER,\n title: undefined,\n time: undefined,\n body: undefined,\n onClick: noop,\n errorMessage: undefined,\n helpMessage: undefined,\n};\n\nexport const propsBubbles = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue(defaultBubbleProps.dsId),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultBubbleProps.type),\n title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),\n time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),\n body: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .isRequired.description('Bubble content')\n .defaultValue(defaultBubbleProps.body),\n onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Error message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Help message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n};\n\n/**\n *\n * BUBBLE ARROW\n *\n */\nexport const propsArrowBubble = {\n type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]),\n};\n"],"names":["BUBBLE_TYPES","SENDER","RECIPIENT","DELIMITER","SYSTEM","defaultBubbleProps","dsId","undefined","type","title","time","body","onClick","noop","errorMessage","helpMessage","propsBubbles","PropTypes","oneOfType","string","number","description","defaultValue","oneOf","isRequired","element","propsArrowBubble","propTypes"],"mappings":";;;;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;IACaA,YAAY,GAAG;
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/bubble/props.ts"],"sourcesContent":["import propTypes from 'prop-types';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\n/**\n *\n * BUBBLE\n *\n */\nexport const BUBBLE_TYPES = {\n SENDER: 'SENDER',\n RECIPIENT: 'RECIPIENT',\n DELIMITER: 'DELIMITER',\n SYSTEM: 'SYSTEM',\n};\n\nexport type BubbleTypesKeys = keyof typeof BUBBLE_TYPES;\nexport type BubbleTypesValues = typeof BUBBLE_TYPES[BubbleTypesKeys];\n\nexport interface BubbleProps {\n dsId: string | number;\n type: BubbleTypesValues;\n title: string;\n body: string;\n time: string;\n errorMessage: string | React.ReactChild;\n helpMessage: string | React.ReactChild;\n onClick: (id: string | number) => void;\n}\n\nexport const defaultBubbleProps: BubbleProps = {\n dsId: undefined,\n type: BUBBLE_TYPES.SENDER,\n title: undefined,\n time: undefined,\n body: undefined,\n onClick: noop,\n errorMessage: undefined,\n helpMessage: undefined,\n};\n\nexport const propsBubbles = {\n dsId: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n .description('Unique id for bubble')\n .defaultValue(defaultBubbleProps.dsId),\n type: PropTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER])\n .isRequired.description('Define bubble type ')\n .defaultValue(defaultBubbleProps.type),\n title: PropTypes.string.isRequired.description('Title of the bubble').defaultValue(defaultBubbleProps.title),\n time: PropTypes.string.isRequired.description('Time of the bubble').defaultValue(defaultBubbleProps.title),\n body: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .isRequired.description('Bubble content')\n .defaultValue(defaultBubbleProps.body),\n onClick: PropTypes.string.description('Callback when the bubble is tapped').defaultValue(defaultBubbleProps.onClick),\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Error message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n helpMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.element])\n .description('Help message to display at bottom of the bubble')\n .defaultValue(defaultBubbleProps.onClick),\n};\n\n/**\n *\n * BUBBLE ARROW\n *\n */\nexport const propsArrowBubble = {\n type: propTypes.oneOf([BUBBLE_TYPES.RECIPIENT, BUBBLE_TYPES.SENDER]),\n};\n"],"names":["BUBBLE_TYPES","SENDER","RECIPIENT","DELIMITER","SYSTEM","defaultBubbleProps","dsId","undefined","type","title","time","body","onClick","noop","errorMessage","helpMessage","propsBubbles","PropTypes","oneOfType","string","number","description","defaultValue","oneOf","isRequired","element","propsArrowBubble","propTypes"],"mappings":";;;;;;;;;;;;AAKA;AACA;AACA;AACA;AACA;IACaA,YAAY,GAAG;EAC1BC,MAAM,EAAE,QADkB;EAE1BC,SAAS,EAAE,WAFe;EAG1BC,SAAS,EAAE,WAHe;EAI1BC,MAAM,EAAE;AAJkB;IAqBfC,kBAA+B,GAAG;EAC7CC,IAAI,EAAEC,SADuC;EAE7CC,IAAI,EAAER,YAAY,CAACC,MAF0B;EAG7CQ,KAAK,EAAEF,SAHsC;EAI7CG,IAAI,EAAEH,SAJuC;EAK7CI,IAAI,EAAEJ,SALuC;EAM7CK,OAAO,EAAEC,WANoC;EAO7CC,YAAY,EAAEP,SAP+B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,mBAAS,CAACC,SAAV,CAAoB,CAACD,mBAAS,CAACE,MAAX,EAAmBF,mBAAS,CAACQ,OAA7B,CAApB,EACVJ,WADU,CACE,iDADF,EAEVC,YAFU,CAEGjB,kBAAkB,CAACO,OAFtB;AAhBa;AAqB5B;AACA;AACA;AACA;AACA;;IACac,gBAAgB,GAAG;EAC9BlB,IAAI,EAAEmB,8BAAS,CAACJ,KAAV,CAAgB,CAACvB,YAAY,CAACE,SAAd,EAAyBF,YAAY,CAACC,MAAtC,CAAhB;AADwB;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/bubble/styled.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './props';\n\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 600;\n`;\nexport const StyledTitleRightBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 400;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div<any>`\n font-size: 13px;\n font-weight: 400;\n line-height: 15px;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div<any>`\n font-size: 12px;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 15px;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 12px;\n line-height: 15px;\n color: ${(props) => props.theme.colors.neutral[500]};\n svg {\n fill: ${(props) => props.theme.colors.danger[500]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[500]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div<any>`\n display: block;\n content: '';\n position: absolute;\n bottom: 10px;\n height: 15px;\n`;\n\nexport const StyledColoredBubble = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n a {\n color: #FFF;\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n"],"names":["StyledWrapper","styled","div","StyledTitleBubble","Grid","StyledTitleLeftBubble","StyledTitleRightBubble","props","type","BUBBLE_TYPES","SENDER","StyleBodyWrapper","StyleErrorMessage","theme","space","xxxs","colors","danger","StyleHelpMessage","neutral","StyledBubbleArrow","StyledColoredBubble","brand"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAMaA,aAAa,gBAAGC,0BAAM,CAACC,GAAV;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/bubble/styled.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BUBBLE_TYPES } from './props';\n\n// Bubble WRAPPER\nexport const StyledWrapper = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n`;\n\n// Bubble HEADER\nexport const StyledTitleBubble = styled(Grid)`\n padding-top: 6px;\n padding-left: 10px;\n padding-right: 10px;\n padding-bottom: 4px;\n`;\n\nexport const StyledTitleLeftBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 600;\n`;\nexport const StyledTitleRightBubble = styled(Grid)`\n font-size: 13px;\n font-weight: 400;\n color: ${(props) => (props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489')};\n`;\n\nexport const StyleBodyWrapper = styled.div<any>`\n font-size: 13px;\n font-weight: 400;\n line-height: 15px;\n min-height: 18px;\n padding: 0px 10px 8px 10px;\n`;\n\nexport const StyleErrorMessage = styled.div<any>`\n font-size: 12px;\n font-weight: 400;\n padding-top: ${(props) => props.theme.space.xxxs};\n color: ${(props) => props.theme.colors.danger[900]};\n align-items: flex-end;\n justify-content: center;\n text-align: right;\n line-height: 15px;\n svg {\n fill: ${(props) => props.theme.colors.danger[900]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[900]};\n }\n .em-ds-icon {\n margin-left: 8px;\n }\n`;\n\nexport const StyleHelpMessage = styled(StyleErrorMessage)`\n font-size: 12px;\n line-height: 15px;\n color: ${(props) => props.theme.colors.neutral[500]};\n svg {\n fill: ${(props) => props.theme.colors.danger[500]};\n }\n a {\n font-size: 12px;\n color: ${(props) => props.theme.colors.danger[500]};\n }\n`;\n\n// bubble sender/ recipient\nexport const StyledBubbleArrow = styled.div<any>`\n display: block;\n content: '';\n position: absolute;\n bottom: 10px;\n height: 15px;\n`;\n\nexport const StyledColoredBubble = styled.div<any>`\n min-width: 224px;\n border-radius: 10px;\n position: relative;\n\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER\n ? `\n border: 1px solid ${props.theme.colors.brand['700']};\n background: ${props.theme.colors.brand[600]};\n color: ${props.theme.colors.neutral['000']};\n ${StyledBubbleArrow}{ \n right: -9px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.brand[600]};\n }\n }\n\n a {\n color: #FFF;\n }\n\n `\n : `\n box-shadow: 0 1px 3px 0 rgba(53,60,70,0.80);\n background: ${props.theme.colors.neutral['000']};\n color: ${props.theme.colors.neutral[700]};\n\n ${StyledBubbleArrow}{ \n left: -11px;\n bottom: 6px;\n svg{\n fill: ${props.theme.colors.neutral['000']};\n }\n }\n\n `}\n`;\n"],"names":["StyledWrapper","styled","div","StyledTitleBubble","Grid","StyledTitleLeftBubble","StyledTitleRightBubble","props","type","BUBBLE_TYPES","SENDER","StyleBodyWrapper","StyleErrorMessage","theme","space","xxxs","colors","danger","StyleHelpMessage","neutral","StyledBubbleArrow","StyledColoredBubble","brand"],"mappings":";;;;;;;;;;;;;;;AAAA;;IAMaA,aAAa,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;;IAMbC,iBAAiB,gBAAGF,0BAAM,CAACG,WAAD,CAAT;EAAA;AAAA;IAOjBC,qBAAqB,gBAAGJ,0BAAM,CAACG,WAAD,CAAT;EAAA;AAAA;IAIrBE,sBAAsB,gBAAGL,0BAAM,CAACG,WAAD,CAAT;EAAA;AAAA,mDAGxB,UAACG,KAAD;EAAA,OAAYA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACC,MAA5B,GAAqC,MAArC,GAA8C,SAA1D;AAAA,CAHwB;IAMtBC,gBAAgB,gBAAGV,0BAAM,CAACC,GAAV;EAAA;AAAA;IAQhBU,iBAAiB,gBAAGX,0BAAM,CAACC,GAAV;EAAA;AAAA,2NAGb,UAACK,KAAD;EAAA,OAAWA,KAAK,CAACM,KAAN,CAAYC,KAAZ,CAAkBC,IAA7B;AAAA,CAHa,EAInB,UAACR,KAAD;EAAA,OAAWA,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBC,MAAnB,CAA0B,GAA1B,CAAX;AAAA,CAJmB,EAUlB,UAACV,KAAD;EAAA,OAAWA,KAAK,CAACM,KAAN,CAAYG,MAAZ,C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CAA2B,GAA3B,CArBb,0BAuBMC,iBAvBN,wHA2BoBb,KAAK,CAACM,KAAN,CAAYG,MAAZ,CAAmBG,OAAnB,CAA2B,KAA3B,CA3BpB,wCADA;AAAA,CAL4B;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatCard.js","sources":["../../../../src/parts/chat-card/ChatCard.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { propTypes, CardPropTypes } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\n\nconst ChatCard = (props: CardPropTypes): JSX.Element => {\n useValidateProps(props, ChatCardWithSchema.toJSON());\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid=\"chat-card-wrapper\">\n <MainContent>\n <Title data-testid=\"chat-card-title\">{title}</Title>\n <Content data-testid=\"chat-card-content\">\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid=\"chat-card-time\">{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid=\"chat-card-right-addon\">{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes;\n\nexport { ChatCard, ChatCardWithSchema };\n"],"names":["ChatCard","props","useValidateProps","ChatCardWithSchema","toJSON","title","content","time","rightAddon","React","Wrapper","MainContent","Title","Content","SimpleTruncatedTooltipText","Time","RightAddon","propTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;IAQMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAuC;
|
|
1
|
+
{"version":3,"file":"ChatCard.js","sources":["../../../../src/parts/chat-card/ChatCard.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport { propTypes, CardPropTypes } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { Wrapper, MainContent, Title, Content, Time, RightAddon } from './styled';\n\nconst ChatCard = (props: CardPropTypes): JSX.Element => {\n useValidateProps(props, ChatCardWithSchema.toJSON());\n const { title, content, time, rightAddon } = props;\n return (\n <Wrapper cols={['1fr', 'auto']} data-testid=\"chat-card-wrapper\">\n <MainContent>\n <Title data-testid=\"chat-card-title\">{title}</Title>\n <Content data-testid=\"chat-card-content\">\n <SimpleTruncatedTooltipText value={content} />\n </Content>\n {time && <Time data-testid=\"chat-card-time\">{time}</Time>}\n </MainContent>\n {rightAddon && <RightAddon data-testid=\"chat-card-right-addon\">{rightAddon}</RightAddon>}\n </Wrapper>\n );\n};\n\nChatCard.propTypes = propTypes;\nconst ChatCardWithSchema = describe(ChatCard);\nChatCardWithSchema.propTypes = propTypes;\n\nexport { ChatCard, ChatCardWithSchema };\n"],"names":["ChatCard","props","useValidateProps","ChatCardWithSchema","toJSON","title","content","time","rightAddon","React","Wrapper","MainContent","Title","Content","SimpleTruncatedTooltipText","Time","RightAddon","propTypes","describe"],"mappings":";;;;;;;;;;;;;;;;;;IAQMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAuC;EACtDC,uDAAgB,CAACD,KAAD,EAAQE,kBAAkB,CAACC,MAAnB,EAAR,CAAhB;EACA,IAAQC,KAAR,GAA6CJ,KAA7C,CAAQI,KAAR;MAAeC,OAAf,GAA6CL,KAA7C,CAAeK,OAAf;MAAwBC,IAAxB,GAA6CN,KAA7C,CAAwBM,IAAxB;MAA8BC,UAA9B,GAA6CP,KAA7C,CAA8BO,UAA9B;EACA,oBACEC,wCAACC,6BAAD;IAAS,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,CAAf;IAAgC,eAAY;kBAC1CD,wCAACE,iCAAD,qBACEF,wCAACG,2BAAD;IAAO,eAAY;KAAmBP,KAAtC,CADF,eAEEI,wCAACI,6BAAD;IAAS,eAAY;kBACnBJ,wCAACK,iDAAD;IAA4B,KAAK,EAAER;IADrC,CAFF,EAKGC,IAAI,iBAAIE,wCAACM,0BAAD;IAAM,eAAY;KAAkBR,IAApC,CALX,CADF,EAQGC,UAAU,iBAAIC,wCAACO,gCAAD;IAAY,eAAY;KAAyBR,UAAjD,CARjB,CADF;AAYD;;AAEDR,QAAQ,CAACiB,SAAT,GAAqBA,8BAArB;IACMd,kBAAkB,GAAGe,kBAAQ,CAAClB,QAAD;AACnCG,kBAAkB,CAACc,SAAnB,GAA+BA,8BAA/B;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-card/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { CardPropTypes } from '../props';\n\nexport const useValidateProps = (props: CardPropTypes, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAuBC,MAAvB,EAAiD;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-card/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { CardPropTypes } from '../props';\n\nexport const useValidateProps = (props: CardPropTypes, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAuBC,MAAvB,EAAiD;EAC/EC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-card/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n\nexport interface CardPropTypes {\n title: string;\n content: string;\n time: string;\n rightAddon: JSX.Element;\n}\n"],"names":["propTypes","title","PropTypes","string","isRequired","description","content","time","rightAddon","element"],"mappings":";;;;;;IAEaA,SAAS,GAAG;
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-card/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n title: PropTypes.string.isRequired.description(`Card's title`),\n content: PropTypes.string.description(`Card's content`),\n time: PropTypes.string.description('Time'),\n rightAddon: PropTypes.element.description('Right addon, badge or icon'),\n};\n\nexport interface CardPropTypes {\n title: string;\n content: string;\n time: string;\n rightAddon: JSX.Element;\n}\n"],"names":["propTypes","title","PropTypes","string","isRequired","description","content","time","rightAddon","element"],"mappings":";;;;;;IAEaA,SAAS,GAAG;EACvBC,KAAK,EAAEC,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,gBADgB;EAEvBC,OAAO,EAAEJ,mBAAS,CAACC,MAAV,CAAiBE,WAAjB,kBAFc;EAGvBE,IAAI,EAAEL,mBAAS,CAACC,MAAV,CAAiBE,WAAjB,CAA6B,MAA7B,CAHiB;EAIvBG,UAAU,EAAEN,mBAAS,CAACO,OAAV,CAAkBJ,WAAlB,CAA8B,4BAA9B;AAJW;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-card/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(Grid)`\n min-width: 248px;\n border: 1px;\n border-bottom: 1px solid #ccc;\n padding: 12px 12px;\n`;\n\nexport const MainContent = styled.div``;\n\nexport const Title = styled.p`\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n`;\n\nexport const Content = styled.p`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n margin: 0;\n`;\n\nexport const Time = styled.p`\n font-size: 12px;\n font-weight: 100;\n margin: 0;\n margin-top: 8px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['500']};\n`;\n\nexport const RightAddon = styled.div`\n height: fit-content;\n margin-left: 12px;\n`;\n"],"names":["Wrapper","styled","Grid","MainContent","div","Title","p","Content","Time","props","theme","fontWeights","regular","colors","neutral","RightAddon"],"mappings":";;;;;;;;;;;IAGaA,OAAO,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-card/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const Wrapper = styled(Grid)`\n min-width: 248px;\n border: 1px;\n border-bottom: 1px solid #ccc;\n padding: 12px 12px;\n`;\n\nexport const MainContent = styled.div``;\n\nexport const Title = styled.p`\n font-size: 16px;\n font-weight: 600;\n margin: 0;\n`;\n\nexport const Content = styled.p`\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n margin: 0;\n`;\n\nexport const Time = styled.p`\n font-size: 12px;\n font-weight: 100;\n margin: 0;\n margin-top: 8px;\n font-weight: ${(props) => props.theme.fontWeights.regular};\n color: ${(props) => props.theme.colors.neutral['500']};\n`;\n\nexport const RightAddon = styled.div`\n height: fit-content;\n margin-left: 12px;\n`;\n"],"names":["Wrapper","styled","Grid","MainContent","div","Title","p","Content","Time","props","theme","fontWeights","regular","colors","neutral","RightAddon"],"mappings":";;;;;;;;;;;IAGaA,OAAO,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA;IAOPC,WAAW,gBAAGF,0BAAM,CAACG,GAAV;EAAA;AAAA;IAEXC,KAAK,gBAAGJ,0BAAM,CAACK,CAAV;EAAA;AAAA;IAMLC,OAAO,gBAAGN,0BAAM,CAACK,CAAV;EAAA;AAAA;IAOPE,IAAI,gBAAGP,0BAAM,CAACK,CAAV;EAAA;AAAA,4FAKA,UAACG,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,WAAZ,CAAwBC,OAAnC;AAAA,CALA,EAMN,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYG,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CANM;IASJC,UAAU,gBAAGd,0BAAM,CAACG,GAAV;EAAA;AAAA;;;;;;;;;"}
|
|
@@ -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';\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\n// eslint-disable-next-line complexity\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 onKeyDown,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n ariaMaxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const COMPOSER_MIN_HEIGHT = 32;\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 if (newHeight !== height && newHeight > COMPOSER_MIN_HEIGHT) onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, height, 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 return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid\n cols={['1fr', '24px']}\n style={{ height: heightProps.height }}\n justifyContent=\"center\"\n alignItems=\"flex-end\"\n gutter=\"xxs\"\n >\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n name=\"chat-composer-textarea\"\n id=\"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 />\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 {ariaMaxLengthMessage ||\n `You have entered ${inputLength} characters and have exceeded the limit by ${\n inputLength - inputMaxLength\n }. Please limit to less than ${inputMaxLength} characters. `}\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","onKeyDown","maxHeight","placeholder","inputMaxLength","maxLengthMessage","ariaMaxLengthMessage","buttonDisabled","dataTestid","actionRef","COMPOSER_MIN_HEIGHT","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAA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AAW,GAAGlC,cAFG,yCAGYA,cAHZ,kBADvB,CADF,EAOGC,gBAAgB,wCAAiCD,cAAjC,kBAPnB,CADD,GAWC,EAZJ,EAcGA,cAAc,cAAOkC,WAAP,gBAAwBlC,cAAxB,IAA2C,EAd5D,CADF,eAiBEQ,wCAAC+B,WAAD,OAjBF,CAjDF,CADF;AAuED;;AAEDrD,YAAY,CAACiE,SAAb,GAAyBC,sCAAzB;AACAlE,YAAY,CAACmE,YAAb,GAA4BC,4CAA5B;IACMjE,sBAAsB,GAAGkE,kBAAQ,CAACrE,YAAD;AACvCG,sBAAsB,CAAC8D,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\n// eslint-disable-next-line complexity\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 onKeyDown,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n ariaMaxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const COMPOSER_MIN_HEIGHT = 32;\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 if (newHeight !== height && newHeight > COMPOSER_MIN_HEIGHT) onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, height, 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 return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid\n cols={['1fr', '24px']}\n style={{ height: heightProps.height }}\n justifyContent=\"center\"\n alignItems=\"flex-end\"\n gutter=\"xxs\"\n >\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n name=\"chat-composer-textarea\"\n id=\"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 />\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 {ariaMaxLengthMessage ||\n `You have entered ${inputLength} characters and have exceeded the limit by ${\n inputLength - inputMaxLength\n }. Please limit to less than ${inputMaxLength} characters. `}\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","onKeyDown","maxHeight","placeholder","inputMaxLength","maxLengthMessage","ariaMaxLengthMessage","buttonDisabled","dataTestid","actionRef","COMPOSER_MIN_HEIGHT","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBMA,YAAY,GAAG,SAAfA,YAAe,C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ADP;IAEE,KAAK,EAAE;MACLG,MAAM,EAAE,EADH;MAEL8B,UAAU,EAAE,QAFP;MAGLC,aAAa,EAAE,MAHV;MAILC,QAAQ,EAAE,UAJL;MAKLC,GAAG,EAAE,CALA;MAMLC,KAAK,oBAAExC,KAAK,CAACc,OAAR,mDAAE,eAAe2B;KAR1B;IAUE,QAAQ,EAAErB,YAVZ;IAWE,KAAK,EAAEpC;IA/CX,eAiDEiB,wCAAC+B,WAAD;IAAM,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,CAAZ;IAA6B,cAAc,EAAC,UAA5C;IAAuD,UAAU,EAAC,QAAlE;IAA2E,MAAM,EAAC,KAAlF;IAAwF,EAAE,EAAC;kBACzF/B,wCAACyC,2CAAD;IAAmB,QAAQ,EAAEZ,QAA7B;IAAuC,eAAY;KAChDrC,cAAc,IAAIqC,QAAlB,gBACC7B,+FACEA,wCAAC0C,gDAAD;IAAwB,IAAI,EAAC;KAC1BhD,oBAAoB,+BACCgC,WADD,wDAEjBA,WAAW,GAAGlC,cAFG,yCAGYA,cAHZ,kBADvB,CADF,EAOGC,gBAAgB,wCAAiCD,cAAjC,kBAPnB,CADD,GAWC,EAZJ,EAcGA,cAAc,cAAOkC,WAAP,gBAAwBlC,cAAxB,IAA2C,EAd5D,CADF,eAiBEQ,wCAAC+B,WAAD,OAjBF,CAjDF,CADF;AAuED;;AAEDrD,YAAY,CAACiE,SAAb,GAAyBC,sCAAzB;AACAlE,YAAY,CAACmE,YAAb,GAA4BC,4CAA5B;IACMjE,sBAAsB,GAAGkE,kBAAQ,CAACrE,YAAD;AACvCG,sBAAsB,CAAC8D,SAAvB,GAAmCC,sCAAnC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-composer/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatComposerProps } from '../props';\n\nexport const useValidateProps = (props: ChatComposerProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA2BC,MAA3B,EAAqD;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-composer/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatComposerProps } from '../props';\n\nexport const useValidateProps = (props: ChatComposerProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA2BC,MAA3B,EAAqD;EACnFC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
|
|
@@ -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 ariaMaxLengthMessage: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n onKeyDown: 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 ariaMaxLengthMessage?: 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 onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => 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 ariaMaxLengthMessage: PropTypes.string\n .description('Aria message for Max length message when exceeded')\n .defaultValue(defaultComposerPros.maxLengthMessage),\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 onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultComposerPros.onKeyDown),\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","ariaMaxLengthMessage","onChange","noop","onResize","onSend","onFocus","onBlur","onKeyDown","maxHeight","inputMaxLength","undefined","maxLengthMessage","buttonDisabled","dataTestid","actionRef","composerProps","PropTypes","string","description","defaultValue","func","number","bool","object"],"mappings":";;;;;;;IASaA,mBAAsC,GAAG;
|
|
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 ariaMaxLengthMessage: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n onKeyDown: 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 ariaMaxLengthMessage?: 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 onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => 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 ariaMaxLengthMessage: PropTypes.string\n .description('Aria message for Max length message when exceeded')\n .defaultValue(defaultComposerPros.maxLengthMessage),\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 onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultComposerPros.onKeyDown),\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","ariaMaxLengthMessage","onChange","noop","onResize","onSend","onFocus","onBlur","onKeyDown","maxHeight","inputMaxLength","undefined","maxLengthMessage","buttonDisabled","dataTestid","actionRef","composerProps","PropTypes","string","description","defaultValue","func","number","bool","object"],"mappings":";;;;;;;IASaA,mBAAsC,GAAG;EACpDC,WAAW,EAAE,mBADuC;EAEpDC,UAAU,EAAE,EAFwC;EAGpDC,oBAAoB,EAAE,EAH8B;EAIpDC,QAAQ,EAAEC,WAJ0C;EAKpDC,QAAQ,EAAED,WAL0C;EAMpDE,MAAM,EAAEF,WAN4C;EAOpDG,OAAO,EAAEH,WAP2C;EAQpDI,MAAM,EAAEJ,WAR4C;EASpDK,SAAS,EAAE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AA3B,EAAyCC,YAAzC,CAAsDtB,mBAAmB,CAACS,MAA1E,CAfmB;EAgB3BC,SAAS,EAAES,mBAAS,CAACI,IAAV,CAAeF,WAAf,CAA2B,mBAA3B,EAAgDC,YAAhD,CAA6DtB,mBAAmB,CAACU,SAAjF,CAhBgB;EAiB3BC,SAAS,EAAEQ,mBAAS,CAACK,MAAV,CACRH,WADQ,CACI,gDADJ,EAERC,YAFQ,CAEKtB,mBAAmB,CAACS,MAFzB,CAjBgB;EAoB3BG,cAAc,EAAEO,mBAAS,CAACK,MAAV,CACbH,WADa,CACD,sDADC,EAEbC,YAFa,CAEAtB,mBAAmB,CAACY,cAFpB,CApBW;EAuB3BG,cAAc,EAAEI,mBAAS,CAACM,IAAV,CACbJ,WADa,CACD,0CADC,EAEbC,YAFa,CAEAtB,mBAAmB,CAACe,cAFpB,CAvBW;EA0B3BC,UAAU,EAAEG,mBAAS,CAACC,MAAV,CAAiBC,WAAjB,CAA6B,aAA7B,EAA4CC,YAA5C,CAAyDtB,mBAAmB,CAACC,WAA7E,CA1Be;EA2B3BgB,SAAS,EAAEE,mBAAS,CAACO,MAAV,CACRL,WADQ,oTAcRC,YAdQ,CAcKtB,mBAAmB,CAACiB,SAdzB;AA3BgB;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-composer/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButton } from '@elliemae/ds-button';\nimport { TextAreaProps } from './props';\n\n// Composer\nexport const StyledChatContainerContentComposer = styled(Grid)`\n width: 100%;\n min-height: 56px;\n background: ${(props) => props.theme.colors.neutral['050']};\n padding: ${(props) => props.theme.space.xxs};\n padding-bottom: 3px;\n padding-top: 6px;\n padding-left: ${(props) => props.theme.space.xs};\n max-height: ${(props) => props.maxHeight};\n border-top: 1px solid #cbcfd7;\n`;\n\nexport const StyledComposerInput = styled.textarea<any>`\n padding: ${(props) => props.theme.space.xxs};\n resize: none;\n min-height: 32px;\n border-radius: 2px;\n border: solid 1px #cbcfd7;\n color: #25292f;\n height: ${(props: TextAreaProps) => (typeof props.height === 'number' ? `${props.height}px` : props.height)};\n min-width: 244px;\n overflow-y: auto;\n font-size: 13px;\n font-weight: 400;\n line-height: 1;\n transition: height 0.05s;\n &:focus {\n outline: none;\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n box-shadow: inset 0 0 0 1px #8cc2ed;\n border-radius: 2px;\n }\n`;\nexport const StyledComposerButton = styled(DSButton)`\n &:disabled {\n background: none;\n svg {\n fill: #5d6775;\n }\n }\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:focus {\n background: ${(props) => props.theme.colors.brand[200]};\n }\n`;\n\nexport const StyledCounterArea = styled(Grid)`\n text-align: right;\n font-size: 11px;\n height: 15px;\n align-items: center;\n font-style: italic;\n ${(props) => (props.hasError ? `color:${props.theme.colors.danger[900]};` : '')}\n position:relative;\n`;\n\nexport const StyledCounterErrorA11y = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledChatContainerContentComposer","styled","Grid","props","theme","colors","neutral","space","xxs","xs","maxHeight","StyledComposerInput","textarea","height","brand","StyledComposerButton","DSButton","StyledCounterArea","hasError","danger","StyledCounterErrorA11y","span"],"mappings":";;;;;;;;;;;;AAKA;IACaA,kCAAkC,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-composer/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButton } from '@elliemae/ds-button';\nimport { TextAreaProps } from './props';\n\n// Composer\nexport const StyledChatContainerContentComposer = styled(Grid)`\n width: 100%;\n min-height: 56px;\n background: ${(props) => props.theme.colors.neutral['050']};\n padding: ${(props) => props.theme.space.xxs};\n padding-bottom: 3px;\n padding-top: 6px;\n padding-left: ${(props) => props.theme.space.xs};\n max-height: ${(props) => props.maxHeight};\n border-top: 1px solid #cbcfd7;\n`;\n\nexport const StyledComposerInput = styled.textarea<any>`\n padding: ${(props) => props.theme.space.xxs};\n resize: none;\n min-height: 32px;\n border-radius: 2px;\n border: solid 1px #cbcfd7;\n color: #25292f;\n height: ${(props: TextAreaProps) => (typeof props.height === 'number' ? `${props.height}px` : props.height)};\n min-width: 244px;\n overflow-y: auto;\n font-size: 13px;\n font-weight: 400;\n line-height: 1;\n transition: height 0.05s;\n &:focus {\n outline: none;\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n box-shadow: inset 0 0 0 1px #8cc2ed;\n border-radius: 2px;\n }\n`;\nexport const StyledComposerButton = styled(DSButton)`\n &:disabled {\n background: none;\n svg {\n fill: #5d6775;\n }\n }\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:focus {\n background: ${(props) => props.theme.colors.brand[200]};\n }\n`;\n\nexport const StyledCounterArea = styled(Grid)`\n text-align: right;\n font-size: 11px;\n height: 15px;\n align-items: center;\n font-style: italic;\n ${(props) => (props.hasError ? `color:${props.theme.colors.danger[900]};` : '')}\n position:relative;\n`;\n\nexport const StyledCounterErrorA11y = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],"names":["StyledChatContainerContentComposer","styled","Grid","props","theme","colors","neutral","space","xxs","xs","maxHeight","StyledComposerInput","textarea","height","brand","StyledComposerButton","DSButton","StyledCounterArea","hasError","danger","StyledCounterErrorA11y","span"],"mappings":";;;;;;;;;;;;AAKA;IACaA,kCAAkC,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,mKAG/B,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAH+B,EAIlC,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAY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js');
|
|
|
41
41
|
require('../chat-container-messages-list/styled.js');
|
|
42
42
|
require('../chat-container-messages-list/props.js');
|
|
43
43
|
require('../chat-container-messages-list/config/useValidateProps.js');
|
|
44
|
+
require('../chat-container-messages-list/useGetNewMessages.js');
|
|
44
45
|
|
|
45
46
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
46
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContainer.js","sources":["../../../../src/parts/chat-container/ChatContainer.tsx"],"sourcesContent":["/* eslint-disable max-lines */\n/* 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, onKeyDown: onComposerKeyDown },\n actionRef,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n ariaLabel,\n } = props;\n const bannerRef = React.useRef({ focusOnWrapper: noop, focusOnLink: noop });\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n /*\n setTimeout is used to equal the animation duration from the \n composer text area when increase its size\n */\n setTimeout(() => {\n actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'start',\n });\n }, 50);\n },\n [onComposerResize, messagesListProps.messages, actionRef],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n const handleTabs = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (onComposerKeyDown) onComposerKeyDown(e);\n else {\n const ref = actionRef || listRef;\n if (e.shiftKey && e.key === 'Tab') {\n if (messagesListProps.messages?.length > 0) {\n e.preventDefault();\n if (['top', 'bottom'].includes(bannerPosition)) {\n bannerRef.current.focusOnWrapper();\n } else {\n const last = ref.current.getMessagesInView().pop();\n ref.current?.focusToIndexWithoutScroll(last);\n }\n }\n }\n }\n },\n [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length],\n );\n\n // Map actions\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;\n actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;\n }\n }, [actionRef]);\n\n return (\n <Container rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\" aria-label={ariaLabel}>\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 bannerPosition={bannerPosition}\n bannerRef={bannerRef}\n />\n {['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading} data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer linear 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={bannerProps.type || BANNER_TYPES.INFO}\n actionRef={bannerRef}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title={sendingText} lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onKeyDown={handleTabs}\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","onComposerKeyDown","onKeyDown","actionRef","device","isLoading","hasMoreItems","getMoreMessages","ariaLabel","bannerRef","React","useRef","focusOnWrapper","noop","focusOnLink","containerRef","listRef","scrollToIndex","useCallback","height","setTimeout","current","messages","length","align","Container","StyledChatContainerContent","MobileStyledChatContainerContent","handleTabs","e","ref","shiftKey","key","preventDefault","includes","last","getMessagesInView","pop","focusToIndexWithoutScroll","useEffect","focusOnBanner","focusOnBannerLink","position","overflow","ChatContainerMessagesList","StyledIndicatorContainer","DSIndeterminateProgressIndicator","DSBanner","label","id","viewLabel","onClick","onView","onClose","type","BANNER_TYPES","INFO","ChatComposer","clientHeight","propTypes","containerProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA4C;AAAA;;AAChEC,EAAAA,4DAAgB,CAACD,KAAD,EAAQE,uBAAuB,CAACC,YAAxB,EAAR,CAAhB;AAEA,MACEC,WADF,GAcIJ,KAdJ,C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Content":["/* eslint-disable max-lines */\n/* 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, onKeyDown: onComposerKeyDown },\n actionRef,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n ariaLabel,\n } = props;\n const bannerRef = React.useRef({ focusOnWrapper: noop, focusOnLink: noop });\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n /*\n setTimeout is used to equal the animation duration from the \n composer text area when increase its size\n */\n setTimeout(() => {\n actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'start',\n });\n }, 50);\n },\n [onComposerResize, messagesListProps.messages, actionRef],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n const handleTabs = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (onComposerKeyDown) onComposerKeyDown(e);\n else {\n const ref = actionRef || listRef;\n if (e.shiftKey && e.key === 'Tab') {\n if (messagesListProps.messages?.length > 0) {\n e.preventDefault();\n if (['top', 'bottom'].includes(bannerPosition)) {\n bannerRef.current.focusOnWrapper();\n } else {\n const last = ref.current.getMessagesInView().pop();\n ref.current?.focusToIndexWithoutScroll(last);\n }\n }\n }\n }\n },\n [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length],\n );\n\n // Map actions\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;\n actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;\n }\n }, [actionRef]);\n\n return (\n <Container rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\" aria-label={ariaLabel}>\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 bannerPosition={bannerPosition}\n bannerRef={bannerRef}\n />\n {['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading} data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer linear 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={bannerProps.type || BANNER_TYPES.INFO}\n actionRef={bannerRef}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title={sendingText} lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onKeyDown={handleTabs}\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","onComposerKeyDown","onKeyDown","actionRef","device","isLoading","hasMoreItems","getMoreMessages","ariaLabel","bannerRef","React","useRef","focusOnWrapper","noop","focusOnLink","containerRef","listRef","scrollToIndex","useCallback","height","setTimeout","current","messages","length","align","Container","StyledChatContainerContent","MobileStyledChatContainerContent","handleTabs","e","ref","shiftKey","key","preventDefault","includes","last","getMessagesInView","pop","focusToIndexWithoutScroll","useEffect","focusOnBanner","focusOnBannerLink","position","overflow","ChatContainerMessagesList","StyledIndicatorContainer","DSIndeterminateProgressIndicator","DSBanner","label","id","viewLabel","onClick","onView","onClose","type","BANNER_TYPES","INFO","ChatComposer","clientHeight","propTypes","containerProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAaMA,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD,EAA4C;EAAA;;EAChEC,4DAAgB,CAACD,KAAD,EAAQE,uBAAuB,CAACC,YAAxB,EAAR,CAAhB;EAEA,IACEC,WADF,GAcIJ,KAdJ,CACEI,WADF;MAEEC,eAFF,GAcIL,KAdJ,CAEEK,eAFF;MAGEC,cAHF,GAcIN,KAdJ,CAGEM,cAHF;MAIEC,WAJF,GAcIP,KAdJ,CAIEO,WAJF;MAKEC,iBALF,GAcIR,KAdJ,CAKEQ,iBALF;MAMEC,aANF,GAcIT,KAdJ,CAMES,aANF;6BAcIT,KAdJ,CAOES,aAPF;MAO6BC,gBAP7B,wBAOmBC,QAPnB;MAO0DC,iBAP1D,wBAO+CC,SAP/C;MAQEC,SARF,GAcId,KAdJ,CAQEc,SARF;MASEC,MATF,GAc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,CAJzD;IAKE,SAAS,EAAEvD,SAAS,IAAIa;KA5C5B,CADF;AAiDD;;AAED5B,aAAa,CAACuE,SAAd,GAA0BC,wCAA1B;AACAxE,aAAa,CAACyE,YAAd,GAA6BA,sCAA7B;IACMtE,uBAAuB,GAAGuE,kBAAQ,CAAC1E,aAAD;AACxCG,uBAAuB,CAACoE,SAAxB,GAAoCC,wCAApC;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-container/config/useValidateProps.tsx"],"sourcesContent":["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerProps, schema: unknown): void => {\n useValidateTypescriptPropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidateTypescriptPropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA4BC,MAA5B,EAAsD;
|
|
1
|
+
{"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-container/config/useValidateProps.tsx"],"sourcesContent":["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerProps, schema: unknown): void => {\n useValidateTypescriptPropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidateTypescriptPropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA4BC,MAA5B,EAAsD;EACpFC,6CAA8B,CAACF,KAAD,EAAQC,MAAR,CAA9B;AACD;;;;"}
|
|
@@ -39,6 +39,7 @@ require('../system-message/config/useValidateProps.js');
|
|
|
39
39
|
require('../chat-container-messages-list/styled.js');
|
|
40
40
|
require('../chat-container-messages-list/props.js');
|
|
41
41
|
require('../chat-container-messages-list/config/useValidateProps.js');
|
|
42
|
+
require('../chat-container-messages-list/useGetNewMessages.js');
|
|
42
43
|
require('./props.js');
|
|
43
44
|
require('./styled.js');
|
|
44
45
|
require('./config/useValidateProps.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-container/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BANNER_TYPES } from '@elliemae/ds-banner';\nimport {\n ChatContainerMessagesListProps,\n defaultProps as defaultListProps,\n} from '../chat-container-messages-list/props';\nimport { defaultComposerPros, ChatComposerProps } from '../chat-composer/props';\n\ninterface ChatBannerProps {\n label: string;\n viewLabel: string;\n type?: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n}\nexport interface ChatContainerProps {\n messagesListProps: Pick<ChatContainerMessagesListProps, 'messages' | 'onScrollEnds'>;\n composerProps: ChatComposerProps;\n actionRef: PropTypes.func;\n autoScroll: boolean;\n device: 'desktop' | 'mobile';\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n bannerPosition?: 'top' | 'bottom';\n bannerProps?: ChatBannerProps;\n sendingMessages?: string[] | number[];\n sendingText: string;\n ariaLabel: string;\n}\n\nexport const defaultProps: ChatContainerProps = {\n messagesListProps: defaultListProps,\n composerProps: defaultComposerPros,\n actionRef: undefined,\n autoScroll: false,\n device: 'desktop',\n isLoading: undefined,\n hasMoreItems: undefined,\n getMoreMessages: noop,\n bannerPosition: undefined,\n bannerProps: {\n type: BANNER_TYPES.INFO,\n label: 'Unread Messages',\n viewLabel: 'View',\n onView: noop,\n onClose: noop,\n },\n sendingMessages: undefined,\n sendingText: 'Sending',\n ariaLabel: 'Chat window',\n};\n\nexport const containerProps = {\n messagesListProps: PropTypes.object\n .description('ChatMessageList props \"messages\" / \"onScrollEnds\"')\n .defaultValue(defaultProps.messagesListProps),\n composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),\n autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),\n device: PropTypes.string\n .description('Option to render mobile or desktop style composer')\n .defaultValue(defaultProps.device),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n bannerProps: PropTypes.object\n .description(\n `Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n `,\n )\n .defaultValue(defaultProps.bannerProps),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\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(defaultProps.actionRef),\n ariaLabel: PropTypes.string\n .description('Aria Label description for chat container')\n .defaultValue(defaultProps.ariaLabel),\n};\n"],"names":["defaultProps","messagesListProps","defaultListProps","composerProps","defaultComposerPros","actionRef","undefined","autoScroll","device","isLoading","hasMoreItems","getMoreMessages","noop","bannerPosition","bannerProps","type","BANNER_TYPES","INFO","label","viewLabel","onView","onClose","sendingMessages","sendingText","ariaLabel","containerProps","PropTypes","object","description","defaultValue","bool","string","oneOf","func","oneOfType","arrayOf","number"],"mappings":";;;;;;;;;;IAgCaA,YAAgC,GAAG;
|
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../../src/parts/chat-container/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BANNER_TYPES } from '@elliemae/ds-banner';\nimport {\n ChatContainerMessagesListProps,\n defaultProps as defaultListProps,\n} from '../chat-container-messages-list/props';\nimport { defaultComposerPros, ChatComposerProps } from '../chat-composer/props';\n\ninterface ChatBannerProps {\n label: string;\n viewLabel: string;\n type?: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n}\nexport interface ChatContainerProps {\n messagesListProps: Pick<ChatContainerMessagesListProps, 'messages' | 'onScrollEnds'>;\n composerProps: ChatComposerProps;\n actionRef: PropTypes.func;\n autoScroll: boolean;\n device: 'desktop' | 'mobile';\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n bannerPosition?: 'top' | 'bottom';\n bannerProps?: ChatBannerProps;\n sendingMessages?: string[] | number[];\n sendingText: string;\n ariaLabel: string;\n}\n\nexport const defaultProps: ChatContainerProps = {\n messagesListProps: defaultListProps,\n composerProps: defaultComposerPros,\n actionRef: undefined,\n autoScroll: false,\n device: 'desktop',\n isLoading: undefined,\n hasMoreItems: undefined,\n getMoreMessages: noop,\n bannerPosition: undefined,\n bannerProps: {\n type: BANNER_TYPES.INFO,\n label: 'Unread Messages',\n viewLabel: 'View',\n onView: noop,\n onClose: noop,\n },\n sendingMessages: undefined,\n sendingText: 'Sending',\n ariaLabel: 'Chat window',\n};\n\nexport const containerProps = {\n messagesListProps: PropTypes.object\n .description('ChatMessageList props \"messages\" / \"onScrollEnds\"')\n .defaultValue(defaultProps.messagesListProps),\n composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),\n autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),\n device: PropTypes.string\n .description('Option to render mobile or desktop style composer')\n .defaultValue(defaultProps.device),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n bannerProps: PropTypes.object\n .description(\n `Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n `,\n )\n .defaultValue(defaultProps.bannerProps),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\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(defaultProps.actionRef),\n ariaLabel: PropTypes.string\n .description('Aria Label description for chat container')\n .defaultValue(defaultProps.ariaLabel),\n};\n"],"names":["defaultProps","messagesListProps","defaultListProps","composerProps","defaultComposerPros","actionRef","undefined","autoScroll","device","isLoading","hasMoreItems","getMoreMessages","noop","bannerPosition","bannerProps","type","BANNER_TYPES","INFO","label","viewLabel","onView","onClose","sendingMessages","sendingText","ariaLabel","containerProps","P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,CATiB;EAY5BlB,YAAY,EAAEgB,mBAAS,CAACM,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkB1B,SAAlB,CAAhB,EAA8CsB,WAA9C,CACZ,iEADY,CAZc;EAe5BjB,eAAe,EAAEe,mBAAS,CAACO,IAAV,CACdL,WADc,CACF,0CADE,EAEdC,YAFc,CAED7B,YAAY,CAACW,eAFZ,CAfW;EAkB5BE,cAAc,EAAEa,mBAAS,CAACM,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkB1B,SAAlB,CAAhB,EAA8CsB,WAA9C,CACd,2EADc,CAlBY;EAqB5Bd,WAAW,EAAEY,mBAAS,CAACC,MAAV,CACVC,WADU,4IAUVC,YAVU,CAUG7B,YAAY,CAACc,WAVhB,CArBe;EAgC5BQ,eAAe,EAAEI,mBAAS,CAACQ,SAAV,CAAoB,CAACR,mBAAS,CAACS,OAAV,CAAkBT,mBAAS,CAACK,MAA5B,CAAD,EAAsCL,mBAAS,CAACS,OAAV,CAAkBT,mBAAS,CAACU,MAA5B,CAAtC,CAApB,EACdR,WADc,CACF,kCADE,EAEdC,YAFc,CAED7B,YAAY,CAACsB,eAFZ,CAhCW;EAmC5BC,WAAW,EAAEG,mBAAS,CAACK,MAAV,CACVH,WADU,CACE,kDADF,EAEVC,YAFU,CAEG7B,YAAY,CAACuB,WAFhB,CAnCe;EAsC5BlB,SAAS,EAAEqB,mBAAS,CAACC,MAAV,CACRC,WADQ,oTAcRC,YAdQ,CAcK7B,YAAY,CAACK,SAdlB,CAtCiB;EAqD5BmB,SAAS,EAAEE,mBAAS,CAACK,MAAV,CACRH,WADQ,CACI,2CADJ,EAERC,YAFQ,CAEK7B,YAAY,CAACwB,SAFlB;AArDiB;;;;;"}
|
|
@@ -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 transition: 0.4s ease-in-out;\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: 100%;\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: 0;\n right: 0;\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 & div,a {\n font-size: 13px;\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 ${StyledIndicatorContainer} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","linear","space","xxs","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,0BAAM,CAACC,WAAD,CAAT;
|
|
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: 100%;\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: 0;\n right: 0;\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 & div,a {\n font-size: 13px;\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 ${StyledIndicatorContainer} {\n font-size: 16px;\n }\n`;\n"],"names":["CONTAINER_WIDTH","StyledChatContainerContent","styled","Grid","props","theme","colors","neutral","StyledIndicatorContainer","div","linear","space","xxs","isLoading","MobileStyledChatContainerContent","StyledTitleLeftBubble","StyleBodyWrapper","StyledTitleRightBubble","Wrapper","Title","Message","Time","StyledComposerInput"],"mappings":";;;;;;;;;;;;;;;;;;;IAKaA,eAAe,GAAG;IAElBC,0BAA0B,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,wFAExBH,eAFwB,EAIvB,UAACI,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJuB;IAO1BC,wBAAwB,gBAAGN,0BAAM,CAACO,GAAV;EAAA;AAAA,wLAStB,UAACL,KAAD;EAAA,OAAY,CAACA,KAAK,CAACM,MAAP,GAAgBN,KAAK,CAACC,KAAN,CAAYM,KAAZ,CAAkBC,GAAlC,GAAwC,CAApD;AAAA,CATsB,EAYrB,UAACR,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAZqB,EAajC,UAACH,KAAD;EAAA,OACAA,KAAK,CAACS,SAAN,KAAoB,KAApB,8GAOI,EARJ;AAAA,CAbiC,EAsBjC,UAACT,KAAD;EAAA,OACAA,KAAK,CAACS,SAAN,KAAoB,QAApB,kHAOI,EARJ;AAAA,CAtBiC;IAqCxBC,gCAAgC,gBAAGZ,0BAAM,CAACD,0BAAD,CAAT;EAAA;AAAA,sOACzCc,yCADyC,EAEzCC,oCAFyC,EAMzCC,0CANyC,EAUzCC,iCAVyC,EAezCC,+BAfyC,EAgBzCC,iCAhByC,EAqBzCC,8BArByC,EAyBzCC,6CAzByC,EA6BzCd,wBA7ByC;;;;;;;"}
|
|
@@ -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';\nimport { validHeaderChilds } from './helpers';\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={validHeaderChilds(children)}\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","validHeaderChilds"],"mappings":";;;;;;;;;;;;;;;IASaA,mBAAwC,GAAG,SAA3CA,mBAA2C,CAACC,KAAD,EAAgB;
|
|
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';\nimport { validHeaderChilds } from './helpers';\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={validHeaderChilds(children)}\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","validHeaderChilds"],"mappings":";;;;;;;;;;;;;;;IASaA,mBAAwC,GAAG,SAA3CA,mBAA2C,CAACC,KAAD,EAAgB;EACtE,IAAQC,KAAR,GAAsCD,KAAtC,CAAQC,KAAR;MAAeC,QAAf,GAAsCF,KAAtC,CAAeE,QAAf;MAAyBC,QAAzB,GAAsCH,KAAtC,CAAyBG,QAAzB;EAEA,oBACEC,wCAACC,iEAAD;IACE,UAAU,EAAC,QADb;IAEE,IAAI,EAAE,CAAC,gCAAD,EAAmCF,QAAQ,GAAG,MAAH,GAAY,KAAvD,CAFR;IAGE,QAAQ,EAAED,QAHZ;IAIE,IAAI,EAAC;kBAELE,wCAACE,sEAAD;IAAuC,eAAY,6BAAnD;IAAiF,EAAE,EAAC,KAApF;IAA0F,EAAE,EAAC;kBAC3FF,wCAACG,iDAAD;IAA4B,KAAK,EAAEN;IADrC,CANF,eASEG,wCAACI,wEAAD;IACE,IAAI,EAAEC,mDAAiB,CAACN,QAAD,CADzB;IAEE,cAAc,EAAC,UAFjB;IAGE,eAAY;KAEXA,QALH,CATF,CADF;AAmBD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../src/parts/chat-container-header/helpers.tsx"],"sourcesContent":["import React from 'react';\n\ninterface validParamT {\n childs: React.ReactChild | React.ReactFragment | React.ReactPortal;\n}\n\nexport const validHeaderChilds = (children: validParamT): any =>\n React.Children.toArray(children)\n .filter((e) => {\n if (Array.isArray(e.props.children)) {\n return false;\n }\n if (e.props.children === undefined && e.$$typeof.toString() === 'Symbol(react.element)') {\n return true;\n }\n return !!e.props.children;\n })\n .map(() => '32px');\n"],"names":["validHeaderChilds","children","React","Children","toArray","filter","e","Array","isArray","props","undefined","$$typeof","toString","map"],"mappings":";;;;;;;;;;IAMaA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,QAAD;
|
|
1
|
+
{"version":3,"file":"helpers.js","sources":["../../../../src/parts/chat-container-header/helpers.tsx"],"sourcesContent":["import React from 'react';\n\ninterface validParamT {\n childs: React.ReactChild | React.ReactFragment | React.ReactPortal;\n}\n\nexport const validHeaderChilds = (children: validParamT): any =>\n React.Children.toArray(children)\n .filter((e) => {\n if (Array.isArray(e.props.children)) {\n return false;\n }\n if (e.props.children === undefined && e.$$typeof.toString() === 'Symbol(react.element)') {\n return true;\n }\n return !!e.props.children;\n })\n .map(() => '32px');\n"],"names":["validHeaderChilds","children","React","Children","toArray","filter","e","Array","isArray","props","undefined","$$typeof","toString","map"],"mappings":";;;;;;;;;;IAMaA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,QAAD;EAAA,OAC/BC,yBAAK,CAACC,QAAN,CAAeC,OAAf,CAAuBH,QAAvB,EACGI,MADH,CACU,UAACC,CAAD,EAAO;IACb,IAAIC,KAAK,CAACC,OAAN,CAAcF,CAAC,CAACG,KAAF,CAAQR,QAAtB,CAAJ,EAAqC;MACnC,OAAO,KAAP;;;IAEF,IAAIK,CAAC,CAACG,KAAF,CAAQR,QAAR,KAAqBS,SAArB,IAAkCJ,CAAC,CAACK,QAAF,CAAWC,QAAX,OAA0B,uBAAhE,EAAyF;MACvF,OAAO,IAAP;;;IAEF,OAAO,CAAC,CAACN,CAAC,CAACG,KAAF,CAAQR,QAAjB;GARJ,EAUGY,GAVH,CAUO;IAAA,OAAM,MAAN;GAVP,CAD+B;AAAA;;;;"}
|
|
@@ -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 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;
|
|
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;EAAA;AAAA;IAIvCC,gCAAgC,gBAAGF,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,wHAGhB,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHgB,EAI7B,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJ6B,EAKzCP,uCALyC;IAYhCQ,qCAAqC,gBAAGP,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,8FAKvC,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CALuC;;;;;;"}
|