@elliemae/ds-chat 2.2.0-alpha.4 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ChatDataTestids.js +26 -54
- package/cjs/index.d.js +2 -27
- package/cjs/index.js +44 -69
- package/cjs/parts/bubble/ChatBubble.js +64 -74
- package/cjs/parts/bubble/ChatBubbleArrow.js +79 -96
- package/cjs/parts/bubble/config/useValidateProps.js +24 -47
- package/cjs/parts/bubble/index.js +12 -38
- package/cjs/parts/bubble/props.js +48 -60
- package/cjs/parts/bubble/styled.js +48 -141
- package/cjs/parts/chat-card/ChatCard.js +39 -55
- package/cjs/parts/chat-card/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-card/index.js +10 -36
- package/cjs/parts/chat-card/props.js +12 -39
- package/cjs/parts/chat-card/styled.js +36 -71
- package/cjs/parts/chat-composer/ChatContainerComposer.js +98 -92
- package/cjs/parts/chat-composer/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-composer/index.js +10 -36
- package/cjs/parts/chat-composer/props.js +36 -73
- package/cjs/parts/chat-composer/styled.js +34 -102
- package/cjs/parts/chat-container/ChatContainer.js +140 -122
- package/cjs/parts/chat-container/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-container/index.js +10 -36
- package/cjs/parts/chat-container/props.js +42 -85
- package/cjs/parts/chat-container/styled.js +23 -104
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +30 -48
- package/cjs/parts/chat-container-header/helpers.js +25 -38
- package/cjs/parts/chat-container-header/styled.js +24 -59
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +225 -163
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-container-messages-list/index.js +10 -36
- package/cjs/parts/chat-container-messages-list/props.js +24 -62
- package/cjs/parts/chat-container-messages-list/styled.js +38 -100
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +42 -58
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-empty-state/props.js +12 -39
- package/cjs/parts/chat-empty-state/styled.js +21 -47
- package/cjs/parts/chat-sidebar/SideBarChat.js +81 -82
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +9 -36
- package/cjs/parts/chat-sidebar/index.js +10 -36
- package/cjs/parts/chat-sidebar/props.js +30 -72
- package/cjs/parts/chat-sidebar/styled.js +20 -56
- package/cjs/parts/floating-button/FloatingButton.js +34 -47
- package/cjs/parts/floating-button/index.js +9 -28
- package/cjs/parts/floating-button/props.js +15 -42
- package/cjs/parts/floating-button/styled.js +17 -63
- package/cjs/parts/floating-container/styled.js +17 -47
- package/cjs/parts/grid-influencer/InfluencerContainer.js +21 -41
- package/cjs/parts/grid-influencer/styled.js +21 -56
- package/cjs/parts/message-delimiter/MessageDelimiter.js +39 -53
- package/cjs/parts/message-delimiter/config/useValidateProps.js +9 -36
- package/cjs/parts/message-delimiter/index.js +10 -36
- package/cjs/parts/message-delimiter/props.js +19 -44
- package/cjs/parts/message-delimiter/styled.js +24 -53
- package/cjs/parts/sidebar-button/SidebarButton.js +53 -52
- package/cjs/parts/sidebar-button/index.js +2 -20
- package/cjs/parts/sidebar-button/props.js +26 -49
- package/cjs/parts/sidebar-button/styled.js +24 -68
- package/cjs/parts/system-message/SystemMessage.js +40 -55
- package/cjs/parts/system-message/config/useValidateProps.js +9 -36
- package/cjs/parts/system-message/index.js +10 -36
- package/cjs/parts/system-message/props.js +15 -42
- package/cjs/parts/system-message/style.js +32 -75
- package/cjs/parts/tile-button/TileButton.js +68 -98
- package/cjs/parts/tile-button/config/useValidateProps.js +9 -36
- package/cjs/parts/tile-button/index.js +10 -36
- package/cjs/parts/tile-button/props.js +45 -83
- package/cjs/parts/tile-button/styled.js +77 -229
- package/cjs/prop-types.js +26 -53
- package/cjs/styled.js +14 -42
- package/esm/ChatDataTestids.js +22 -25
- package/esm/index.d.js +1 -2
- package/esm/index.js +14 -40
- package/esm/parts/bubble/ChatBubble.js +51 -51
- package/esm/parts/bubble/ChatBubbleArrow.js +71 -67
- package/esm/parts/bubble/config/useValidateProps.js +19 -17
- package/esm/parts/bubble/index.js +2 -9
- package/esm/parts/bubble/props.js +36 -30
- package/esm/parts/bubble/styled.js +32 -112
- package/esm/parts/chat-card/ChatCard.js +27 -23
- package/esm/parts/chat-card/config/useValidateProps.js +4 -6
- package/esm/parts/chat-card/index.js +1 -7
- package/esm/parts/chat-card/props.js +8 -10
- package/esm/parts/chat-card/styled.js +23 -42
- package/esm/parts/chat-composer/ChatContainerComposer.js +83 -65
- package/esm/parts/chat-composer/config/useValidateProps.js +4 -6
- package/esm/parts/chat-composer/index.js +1 -7
- package/esm/parts/chat-composer/props.js +24 -37
- package/esm/parts/chat-composer/styled.js +22 -73
- package/esm/parts/chat-container/ChatContainer.js +122 -88
- package/esm/parts/chat-container/config/useValidateProps.js +4 -6
- package/esm/parts/chat-container/index.js +1 -7
- package/esm/parts/chat-container/props.js +31 -52
- package/esm/parts/chat-container/styled.js +16 -79
- package/esm/parts/chat-container-header/ChatContainerHeader.js +21 -22
- package/esm/parts/chat-container-header/helpers.js +17 -9
- package/esm/parts/chat-container-header/styled.js +14 -30
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +210 -138
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +4 -6
- package/esm/parts/chat-container-messages-list/index.js +1 -10
- package/esm/parts/chat-container-messages-list/props.js +17 -31
- package/esm/parts/chat-container-messages-list/styled.js +25 -71
- package/esm/parts/chat-empty-state/ChatEmptyState.js +29 -25
- package/esm/parts/chat-empty-state/config/useValidateProps.js +4 -6
- package/esm/parts/chat-empty-state/props.js +7 -10
- package/esm/parts/chat-empty-state/styled.js +11 -18
- package/esm/parts/chat-sidebar/SideBarChat.js +67 -50
- package/esm/parts/chat-sidebar/config/useValidateProps.js +4 -6
- package/esm/parts/chat-sidebar/index.js +1 -7
- package/esm/parts/chat-sidebar/props.js +21 -39
- package/esm/parts/chat-sidebar/styled.js +11 -27
- package/esm/parts/floating-button/FloatingButton.js +26 -18
- package/esm/parts/floating-button/index.js +1 -3
- package/esm/parts/floating-button/props.js +8 -11
- package/esm/parts/floating-button/styled.js +9 -34
- package/esm/parts/floating-container/styled.js +9 -18
- package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
- package/esm/parts/grid-influencer/styled.js +12 -27
- package/esm/parts/message-delimiter/MessageDelimiter.js +26 -20
- package/esm/parts/message-delimiter/config/useValidateProps.js +4 -6
- package/esm/parts/message-delimiter/index.js +1 -10
- package/esm/parts/message-delimiter/props.js +14 -15
- package/esm/parts/message-delimiter/styled.js +14 -24
- package/esm/parts/sidebar-button/SidebarButton.js +41 -22
- package/esm/parts/sidebar-button/index.js +1 -2
- package/esm/parts/sidebar-button/props.js +15 -18
- package/esm/parts/sidebar-button/styled.js +14 -39
- package/esm/parts/system-message/SystemMessage.js +27 -22
- package/esm/parts/system-message/config/useValidateProps.js +4 -6
- package/esm/parts/system-message/index.js +1 -7
- package/esm/parts/system-message/props.js +10 -13
- package/esm/parts/system-message/style.js +20 -46
- package/esm/parts/tile-button/TileButton.js +54 -75
- package/esm/parts/tile-button/config/useValidateProps.js +4 -6
- package/esm/parts/tile-button/index.js +1 -7
- package/esm/parts/tile-button/props.js +33 -47
- package/esm/parts/tile-button/styled.js +60 -200
- package/esm/prop-types.js +16 -19
- package/esm/styled.js +5 -13
- package/package.json +10 -10
- package/cjs/ChatDataTestids.js.map +0 -7
- package/cjs/index.d.js.map +0 -7
- package/cjs/index.js.map +0 -7
- package/cjs/parts/bubble/ChatBubble.js.map +0 -7
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -7
- package/cjs/parts/bubble/config/useValidateProps.js.map +0 -7
- package/cjs/parts/bubble/index.js.map +0 -7
- package/cjs/parts/bubble/props.js.map +0 -7
- package/cjs/parts/bubble/styled.js.map +0 -7
- package/cjs/parts/chat-card/ChatCard.js.map +0 -7
- package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-card/index.js.map +0 -7
- package/cjs/parts/chat-card/props.js.map +0 -7
- package/cjs/parts/chat-card/styled.js.map +0 -7
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -7
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-composer/index.js.map +0 -7
- package/cjs/parts/chat-composer/props.js.map +0 -7
- package/cjs/parts/chat-composer/styled.js.map +0 -7
- package/cjs/parts/chat-container/ChatContainer.js.map +0 -7
- package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-container/index.js.map +0 -7
- package/cjs/parts/chat-container/props.js.map +0 -7
- package/cjs/parts/chat-container/styled.js.map +0 -7
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
- package/cjs/parts/chat-container-header/helpers.js.map +0 -7
- package/cjs/parts/chat-container-header/styled.js.map +0 -7
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-container-messages-list/index.js.map +0 -7
- package/cjs/parts/chat-container-messages-list/props.js.map +0 -7
- package/cjs/parts/chat-container-messages-list/styled.js.map +0 -7
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-empty-state/props.js.map +0 -7
- package/cjs/parts/chat-empty-state/styled.js.map +0 -7
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -7
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
- package/cjs/parts/chat-sidebar/index.js.map +0 -7
- package/cjs/parts/chat-sidebar/props.js.map +0 -7
- package/cjs/parts/chat-sidebar/styled.js.map +0 -7
- package/cjs/parts/floating-button/FloatingButton.js.map +0 -7
- package/cjs/parts/floating-button/index.js.map +0 -7
- package/cjs/parts/floating-button/props.js.map +0 -7
- package/cjs/parts/floating-button/styled.js.map +0 -7
- package/cjs/parts/floating-container/styled.js.map +0 -7
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -7
- package/cjs/parts/grid-influencer/styled.js.map +0 -7
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -7
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -7
- package/cjs/parts/message-delimiter/index.js.map +0 -7
- package/cjs/parts/message-delimiter/props.js.map +0 -7
- package/cjs/parts/message-delimiter/styled.js.map +0 -7
- package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -7
- package/cjs/parts/sidebar-button/index.js.map +0 -7
- package/cjs/parts/sidebar-button/props.js.map +0 -7
- package/cjs/parts/sidebar-button/styled.js.map +0 -7
- package/cjs/parts/system-message/SystemMessage.js.map +0 -7
- package/cjs/parts/system-message/config/useValidateProps.js.map +0 -7
- package/cjs/parts/system-message/index.js.map +0 -7
- package/cjs/parts/system-message/props.js.map +0 -7
- package/cjs/parts/system-message/style.js.map +0 -7
- package/cjs/parts/tile-button/TileButton.js.map +0 -7
- package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -7
- package/cjs/parts/tile-button/index.js.map +0 -7
- package/cjs/parts/tile-button/props.js.map +0 -7
- package/cjs/parts/tile-button/styled.js.map +0 -7
- package/cjs/prop-types.js.map +0 -7
- package/cjs/styled.js.map +0 -7
- package/cjs/tests/utils.js +0 -66
- package/cjs/tests/utils.js.map +0 -7
- package/esm/ChatDataTestids.js.map +0 -7
- package/esm/index.d.js.map +0 -7
- package/esm/index.js.map +0 -7
- package/esm/parts/bubble/ChatBubble.js.map +0 -7
- package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -7
- package/esm/parts/bubble/config/useValidateProps.js.map +0 -7
- package/esm/parts/bubble/index.js.map +0 -7
- package/esm/parts/bubble/props.js.map +0 -7
- package/esm/parts/bubble/styled.js.map +0 -7
- package/esm/parts/chat-card/ChatCard.js.map +0 -7
- package/esm/parts/chat-card/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-card/index.js.map +0 -7
- package/esm/parts/chat-card/props.js.map +0 -7
- package/esm/parts/chat-card/styled.js.map +0 -7
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -7
- package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-composer/index.js.map +0 -7
- package/esm/parts/chat-composer/props.js.map +0 -7
- package/esm/parts/chat-composer/styled.js.map +0 -7
- package/esm/parts/chat-container/ChatContainer.js.map +0 -7
- package/esm/parts/chat-container/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-container/index.js.map +0 -7
- package/esm/parts/chat-container/props.js.map +0 -7
- package/esm/parts/chat-container/styled.js.map +0 -7
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
- package/esm/parts/chat-container-header/helpers.js.map +0 -7
- package/esm/parts/chat-container-header/styled.js.map +0 -7
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-container-messages-list/index.js.map +0 -7
- package/esm/parts/chat-container-messages-list/props.js.map +0 -7
- package/esm/parts/chat-container-messages-list/styled.js.map +0 -7
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-empty-state/props.js.map +0 -7
- package/esm/parts/chat-empty-state/styled.js.map +0 -7
- package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -7
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
- package/esm/parts/chat-sidebar/index.js.map +0 -7
- package/esm/parts/chat-sidebar/props.js.map +0 -7
- package/esm/parts/chat-sidebar/styled.js.map +0 -7
- package/esm/parts/floating-button/FloatingButton.js.map +0 -7
- package/esm/parts/floating-button/index.js.map +0 -7
- package/esm/parts/floating-button/props.js.map +0 -7
- package/esm/parts/floating-button/styled.js.map +0 -7
- package/esm/parts/floating-container/styled.js.map +0 -7
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -7
- package/esm/parts/grid-influencer/styled.js.map +0 -7
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -7
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -7
- package/esm/parts/message-delimiter/index.js.map +0 -7
- package/esm/parts/message-delimiter/props.js.map +0 -7
- package/esm/parts/message-delimiter/styled.js.map +0 -7
- package/esm/parts/sidebar-button/SidebarButton.js.map +0 -7
- package/esm/parts/sidebar-button/index.js.map +0 -7
- package/esm/parts/sidebar-button/props.js.map +0 -7
- package/esm/parts/sidebar-button/styled.js.map +0 -7
- package/esm/parts/system-message/SystemMessage.js.map +0 -7
- package/esm/parts/system-message/config/useValidateProps.js.map +0 -7
- package/esm/parts/system-message/index.js.map +0 -7
- package/esm/parts/system-message/props.js.map +0 -7
- package/esm/parts/system-message/style.js.map +0 -7
- package/esm/parts/tile-button/TileButton.js.map +0 -7
- package/esm/parts/tile-button/config/useValidateProps.js.map +0 -7
- package/esm/parts/tile-button/index.js.map +0 -7
- package/esm/parts/tile-button/props.js.map +0 -7
- package/esm/parts/tile-button/styled.js.map +0 -7
- package/esm/prop-types.js.map +0 -7
- package/esm/styled.js.map +0 -7
- package/esm/tests/utils.js +0 -37
- package/esm/tests/utils.js.map +0 -7
|
@@ -1,15 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
3
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.async-iterator.for-each.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.for-each.js';
|
|
6
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { noop } from 'lodash';
|
|
10
|
+
import { describe } from 'react-desc';
|
|
11
|
+
import DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';
|
|
12
|
+
import DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';
|
|
13
|
+
import { ChatComposer } from '../chat-composer/ChatContainerComposer.js';
|
|
14
|
+
import { ChatContainerMessagesList } from '../chat-container-messages-list/ChatContainerMessagesList.js';
|
|
15
|
+
import { containerProps, defaultProps } from './props.js';
|
|
16
|
+
import { StyledIndicatorContainer, StyledChatContainerContent, MobileStyledChatContainerContent } from './styled.js';
|
|
17
|
+
import { useValidateProps } from './config/useValidateProps.js';
|
|
18
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
19
|
+
|
|
20
|
+
var _DSIndeterminateProgr;
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
const ChatContainer = props => {
|
|
27
|
+
var _messagesListProps$me2, _containerRef$current;
|
|
28
|
+
|
|
13
29
|
useValidateProps(props, containerProps);
|
|
14
30
|
const {
|
|
15
31
|
sendingText,
|
|
@@ -18,7 +34,10 @@ const ChatContainer = (props) => {
|
|
|
18
34
|
bannerProps,
|
|
19
35
|
messagesListProps,
|
|
20
36
|
composerProps,
|
|
21
|
-
composerProps: {
|
|
37
|
+
composerProps: {
|
|
38
|
+
onResize: onComposerResize,
|
|
39
|
+
onKeyDown: onComposerKeyDown
|
|
40
|
+
},
|
|
22
41
|
actionRef,
|
|
23
42
|
device,
|
|
24
43
|
isLoading,
|
|
@@ -26,103 +45,118 @@ const ChatContainer = (props) => {
|
|
|
26
45
|
getMoreMessages,
|
|
27
46
|
ariaLabel
|
|
28
47
|
} = props;
|
|
29
|
-
const bannerRef =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
48
|
+
const bannerRef = React.useRef({
|
|
49
|
+
focusOnWrapper: noop,
|
|
50
|
+
focusOnLink: noop
|
|
51
|
+
});
|
|
52
|
+
const containerRef = React.useRef();
|
|
53
|
+
const listRef = React.useRef({
|
|
54
|
+
scrollToIndex: noop
|
|
55
|
+
});
|
|
56
|
+
const onResize = React.useCallback(height => {
|
|
57
|
+
if (onComposerResize) onComposerResize(height);
|
|
58
|
+
/*
|
|
59
|
+
setTimeout is used to equal the animation duration from the
|
|
60
|
+
composer text area when increase its size
|
|
61
|
+
*/
|
|
62
|
+
|
|
35
63
|
setTimeout(() => {
|
|
36
64
|
actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {
|
|
37
|
-
align:
|
|
65
|
+
align: 'start'
|
|
38
66
|
});
|
|
39
67
|
}, 50);
|
|
40
68
|
}, [onComposerResize, messagesListProps.messages, actionRef]);
|
|
41
|
-
const Container = device ===
|
|
42
|
-
const handleTabs =
|
|
43
|
-
if (onComposerKeyDown)
|
|
44
|
-
onComposerKeyDown(e);
|
|
45
|
-
else {
|
|
69
|
+
const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;
|
|
70
|
+
const handleTabs = React.useCallback(e => {
|
|
71
|
+
if (onComposerKeyDown) onComposerKeyDown(e);else {
|
|
46
72
|
const ref = actionRef || listRef;
|
|
47
|
-
|
|
48
|
-
|
|
73
|
+
|
|
74
|
+
if (e.shiftKey && e.key === 'Tab') {
|
|
75
|
+
var _messagesListProps$me;
|
|
76
|
+
|
|
77
|
+
if (((_messagesListProps$me = messagesListProps.messages) === null || _messagesListProps$me === void 0 ? void 0 : _messagesListProps$me.length) > 0) {
|
|
49
78
|
e.preventDefault();
|
|
50
|
-
|
|
79
|
+
|
|
80
|
+
if (['top', 'bottom'].includes(bannerPosition)) {
|
|
51
81
|
bannerRef.current.focusOnWrapper();
|
|
52
82
|
} else {
|
|
83
|
+
var _ref$current;
|
|
84
|
+
|
|
53
85
|
const last = ref.current.getMessagesInView().pop();
|
|
54
|
-
ref.current
|
|
86
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focusToIndexWithoutScroll(last);
|
|
55
87
|
}
|
|
56
88
|
}
|
|
57
89
|
}
|
|
58
90
|
}
|
|
59
|
-
}, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages
|
|
60
|
-
|
|
91
|
+
}, [actionRef, onComposerKeyDown, bannerPosition, (_messagesListProps$me2 = messagesListProps.messages) === null || _messagesListProps$me2 === void 0 ? void 0 : _messagesListProps$me2.length]); // Map actions
|
|
92
|
+
|
|
93
|
+
React.useEffect(() => {
|
|
61
94
|
if (actionRef && actionRef.current) {
|
|
62
95
|
actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;
|
|
63
96
|
actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;
|
|
64
97
|
}
|
|
65
98
|
}, [actionRef]);
|
|
66
|
-
return
|
|
67
|
-
rows: [
|
|
99
|
+
return /*#__PURE__*/jsxs(Container, {
|
|
100
|
+
rows: ['minmax(0, 1fr)', 'auto'],
|
|
68
101
|
ref: containerRef,
|
|
69
102
|
role: "region",
|
|
70
|
-
"aria-label": ariaLabel
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
103
|
+
"aria-label": ariaLabel,
|
|
104
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
105
|
+
style: {
|
|
106
|
+
position: 'relative',
|
|
107
|
+
overflow: 'hidden'
|
|
108
|
+
}
|
|
109
|
+
}, void 0, /*#__PURE__*/jsx(ChatContainerMessagesList, _objectSpread(_objectSpread({}, messagesListProps), {}, {
|
|
110
|
+
actionRef: actionRef || listRef,
|
|
111
|
+
isLoading: isLoading,
|
|
112
|
+
hasMoreItems: hasMoreItems,
|
|
113
|
+
getMoreMessages: getMoreMessages,
|
|
114
|
+
sendingMessages: sendingMessages,
|
|
115
|
+
sendingText: sendingText,
|
|
116
|
+
bannerPosition: bannerPosition,
|
|
117
|
+
bannerRef: bannerRef
|
|
118
|
+
})), ['top', 'bottom'].includes(isLoading) ? /*#__PURE__*/_jsx(StyledIndicatorContainer, {
|
|
119
|
+
isLoading: isLoading,
|
|
120
|
+
"data-testid": "ds-chat-loading-indicator"
|
|
121
|
+
}, void 0, _DSIndeterminateProgr || (_DSIndeterminateProgr = /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
|
|
122
|
+
processing: true,
|
|
123
|
+
title: "Loading"
|
|
124
|
+
}))) : null, /*#__PURE__*/_jsx(StyledIndicatorContainer, {
|
|
125
|
+
linear: true,
|
|
126
|
+
isLoading: bannerPosition
|
|
127
|
+
}, void 0, /*#__PURE__*/_jsx(DSBanner, {
|
|
128
|
+
showCloseButton: true,
|
|
129
|
+
label: bannerProps.label || 'Unread messages',
|
|
130
|
+
containerProps: {
|
|
131
|
+
id: 'ds-chat-banner'
|
|
132
|
+
},
|
|
133
|
+
actionLink: {
|
|
134
|
+
label: bannerProps.viewLabel || 'View',
|
|
135
|
+
onClick: bannerProps.onView
|
|
136
|
+
},
|
|
137
|
+
onClose: bannerProps.onClose,
|
|
138
|
+
isOpen: true,
|
|
139
|
+
type: bannerProps.type || BANNER_TYPES.INFO,
|
|
140
|
+
actionRef: bannerRef
|
|
141
|
+
})), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/_jsx(StyledIndicatorContainer, {
|
|
142
|
+
isLoading: "bottom",
|
|
143
|
+
linear: true,
|
|
144
|
+
"data-testid": "ds-chat-loading-indicator"
|
|
145
|
+
}, void 0, /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
|
|
146
|
+
processing: true,
|
|
147
|
+
title: sendingText,
|
|
148
|
+
lineOnly: true
|
|
149
|
+
})) : null), /*#__PURE__*/jsx(ChatComposer, _objectSpread(_objectSpread({}, composerProps), {}, {
|
|
150
|
+
onKeyDown: handleTabs,
|
|
151
|
+
onResize: onResize,
|
|
152
|
+
maxHeight: (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight) || 0) / 2,
|
|
153
|
+
actionRef: actionRef || listRef
|
|
154
|
+
}))]
|
|
155
|
+
});
|
|
119
156
|
};
|
|
120
|
-
|
|
157
|
+
|
|
121
158
|
ChatContainer.defaultProps = defaultProps;
|
|
122
159
|
const ChatContainerWithSchema = describe(ChatContainer);
|
|
123
160
|
ChatContainerWithSchema.propTypes = containerProps;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
ChatContainerWithSchema
|
|
127
|
-
};
|
|
128
|
-
//# sourceMappingURL=ChatContainer.js.map
|
|
161
|
+
|
|
162
|
+
export { ChatContainer, ChatContainerWithSchema };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
2
|
+
|
|
3
3
|
const useValidateProps = (props, propTypes) => {
|
|
4
4
|
useValidateTypescriptPropTypes(props, propTypes);
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
6
|
+
|
|
7
|
+
export { useValidateProps };
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ChatContainer, ChatContainerWithSchema } from "./ChatContainer";
|
|
3
|
-
export {
|
|
4
|
-
ChatContainer,
|
|
5
|
-
ChatContainerWithSchema
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { ChatContainer, ChatContainerWithSchema } from './ChatContainer.js';
|
|
@@ -1,65 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
} from "../chat-container-messages-list/props";
|
|
8
|
-
import { defaultComposerPros } from "../chat-composer/props";
|
|
1
|
+
import { PropTypes } from 'react-desc';
|
|
2
|
+
import { noop } from 'lodash';
|
|
3
|
+
import { BANNER_TYPES } from '@elliemae/ds-banner';
|
|
4
|
+
import { defaultProps as defaultProps$1 } from '../chat-container-messages-list/props.js';
|
|
5
|
+
import { defaultComposerPros } from '../chat-composer/props.js';
|
|
6
|
+
|
|
9
7
|
const defaultProps = {
|
|
10
|
-
messagesListProps:
|
|
8
|
+
messagesListProps: defaultProps$1,
|
|
11
9
|
composerProps: defaultComposerPros,
|
|
12
|
-
actionRef:
|
|
10
|
+
actionRef: undefined,
|
|
13
11
|
autoScroll: false,
|
|
14
|
-
device:
|
|
15
|
-
isLoading:
|
|
16
|
-
hasMoreItems:
|
|
12
|
+
device: 'desktop',
|
|
13
|
+
isLoading: undefined,
|
|
14
|
+
hasMoreItems: undefined,
|
|
17
15
|
getMoreMessages: noop,
|
|
18
|
-
bannerPosition:
|
|
16
|
+
bannerPosition: undefined,
|
|
19
17
|
bannerProps: {
|
|
20
18
|
type: BANNER_TYPES.INFO,
|
|
21
|
-
label:
|
|
22
|
-
viewLabel:
|
|
19
|
+
label: 'Unread Messages',
|
|
20
|
+
viewLabel: 'View',
|
|
23
21
|
onView: noop,
|
|
24
22
|
onClose: noop
|
|
25
23
|
},
|
|
26
|
-
sendingMessages:
|
|
27
|
-
sendingText:
|
|
28
|
-
ariaLabel:
|
|
24
|
+
sendingMessages: undefined,
|
|
25
|
+
sendingText: 'Sending',
|
|
26
|
+
ariaLabel: 'Chat window'
|
|
29
27
|
};
|
|
30
28
|
const containerProps = {
|
|
31
29
|
messagesListProps: PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
|
|
32
|
-
composerProps: PropTypes.object.description(
|
|
33
|
-
autoScroll: PropTypes.bool.description(
|
|
34
|
-
device: PropTypes.string.description(
|
|
35
|
-
isLoading: PropTypes.oneOf([
|
|
36
|
-
hasMoreItems: PropTypes.oneOf([
|
|
37
|
-
getMoreMessages: PropTypes.func.description(
|
|
38
|
-
bannerPosition: PropTypes.oneOf([
|
|
39
|
-
bannerProps: PropTypes.object.description(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
onClose: () => void;
|
|
45
|
-
`).defaultValue(defaultProps.bannerProps),
|
|
46
|
-
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description("Array of ids of sending messages").defaultValue(defaultProps.sendingMessages),
|
|
47
|
-
sendingText: PropTypes.string.description("Label description for messages in sending status").defaultValue(defaultProps.sendingText),
|
|
48
|
-
actionRef: PropTypes.object.description(`Reference:
|
|
49
|
-
{
|
|
50
|
-
scrollToIndex: (n: number) => void,
|
|
51
|
-
getMessagesInView: () => number[],
|
|
52
|
-
focusToIndex: (n: number) => void,
|
|
53
|
-
focusToList: () => void,
|
|
54
|
-
focusToComposer: () => void,
|
|
55
|
-
focusToSend: () => void,
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
`).defaultValue(defaultProps.actionRef),
|
|
59
|
-
ariaLabel: PropTypes.string.description("Aria Label description for chat container").defaultValue(defaultProps.ariaLabel)
|
|
30
|
+
composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),
|
|
31
|
+
autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),
|
|
32
|
+
device: PropTypes.string.description('Option to render mobile or desktop style composer').defaultValue(defaultProps.device),
|
|
33
|
+
isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
|
|
34
|
+
hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
35
|
+
getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
|
|
36
|
+
bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
|
|
37
|
+
bannerProps: PropTypes.object.description("Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n ").defaultValue(defaultProps.bannerProps),
|
|
38
|
+
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description('Array of ids of sending messages').defaultValue(defaultProps.sendingMessages),
|
|
39
|
+
sendingText: PropTypes.string.description('Label description for messages in sending status').defaultValue(defaultProps.sendingText),
|
|
40
|
+
actionRef: PropTypes.object.description("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 ").defaultValue(defaultProps.actionRef),
|
|
41
|
+
ariaLabel: PropTypes.string.description('Aria Label description for chat container').defaultValue(defaultProps.ariaLabel)
|
|
60
42
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
defaultProps
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=props.js.map
|
|
43
|
+
|
|
44
|
+
export { containerProps, defaultProps };
|
|
@@ -1,81 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Wrapper, Title, Time, Message } from "../system-message/style";
|
|
7
|
-
const CONTAINER_WIDTH = 300;
|
|
8
|
-
const StyledChatContainerContent = styled(Grid)`
|
|
9
|
-
height: 100%;
|
|
10
|
-
min-width: ${CONTAINER_WIDTH}px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
13
|
-
position: relative;
|
|
14
|
-
`;
|
|
15
|
-
const StyledIndicatorContainer = styled.div`
|
|
16
|
-
transition: 0.4s ease-in-out;
|
|
17
|
-
position: absolute;
|
|
18
|
-
visibility: hidden;
|
|
19
|
-
pointer-events: none;
|
|
20
|
-
width: 100%;
|
|
21
|
-
padding: 0 ${(props) => !props.linear ? props.theme.space.xxs : 0};
|
|
22
|
-
left: 0;
|
|
23
|
-
right: 0;
|
|
24
|
-
background: ${(props) => props.theme.colors.neutral["000"]};
|
|
25
|
-
${(props) => props.isLoading === "top" ? `
|
|
26
|
-
top: -41px;
|
|
27
|
-
transform: translate(0, 41px);
|
|
28
|
-
visibility: visible;
|
|
29
|
-
pointer-events: auto;
|
|
30
|
-
` : ""}
|
|
31
|
-
${(props) => props.isLoading === "bottom" ? `
|
|
32
|
-
bottom: -41px;
|
|
33
|
-
transform: translate(0, -41px);
|
|
34
|
-
visibility: visible;
|
|
35
|
-
pointer-events: auto;
|
|
36
|
-
` : ""}
|
|
37
|
-
|
|
38
|
-
& div,a {
|
|
39
|
-
font-size: 13px;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`
|
|
43
|
-
${StyledTitleLeftBubble},
|
|
44
|
-
${StyleBodyWrapper} {
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
${StyledTitleRightBubble} {
|
|
49
|
-
font-size: 13px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${Wrapper} {
|
|
53
|
-
background-color: #fff;
|
|
54
|
-
box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);
|
|
55
|
-
}
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
3
|
+
import { StyledTitleLeftBubble, StyleBodyWrapper, StyledTitleRightBubble } from '../bubble/styled.js';
|
|
4
|
+
import { StyledComposerInput } from '../chat-composer/styled.js';
|
|
5
|
+
import { Wrapper, Title, Message, Time } from '../system-message/style.js';
|
|
56
6
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
${StyledComposerInput} {
|
|
68
|
-
font-size: 16px;
|
|
69
|
-
}
|
|
7
|
+
const CONTAINER_WIDTH = 300;
|
|
8
|
+
const StyledChatContainerContent = /*#__PURE__*/styled(Grid).withConfig({
|
|
9
|
+
componentId: "sc-d732wo-0"
|
|
10
|
+
})(["height:100%;min-width:", "px;overflow:hidden;background:", ";position:relative;"], CONTAINER_WIDTH, props => props.theme.colors.neutral['050']);
|
|
11
|
+
const StyledIndicatorContainer = /*#__PURE__*/styled.div.withConfig({
|
|
12
|
+
componentId: "sc-d732wo-1"
|
|
13
|
+
})(["transition:0.4s ease-in-out;position:absolute;visibility:hidden;pointer-events:none;width:100%;padding:0 ", ";left:0;right:0;background:", ";", " ", " & div,a{font-size:13px;}"], props => !props.linear ? props.theme.space.xxs : 0, props => props.theme.colors.neutral['000'], props => props.isLoading === 'top' ? "\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto;\n " : '', props => props.isLoading === 'bottom' ? "\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n " : '');
|
|
14
|
+
const MobileStyledChatContainerContent = /*#__PURE__*/styled(StyledChatContainerContent).withConfig({
|
|
15
|
+
componentId: "sc-d732wo-2"
|
|
16
|
+
})(["", ",", "{font-size:16px;}", "{font-size:13px;}", "{background-color:#fff;box-shadow:-0 1px 3px rgba(53,60,70,0.8);}", ",", "{font-size:16px;text-align:left;}", "{font-size:13px;}", "{font-size:16px;}", "{font-size:16px;}"], StyledTitleLeftBubble, StyleBodyWrapper, StyledTitleRightBubble, Wrapper, Title, Message, Time, StyledComposerInput, StyledIndicatorContainer);
|
|
70
17
|
|
|
71
|
-
|
|
72
|
-
font-size: 16px;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
export {
|
|
76
|
-
CONTAINER_WIDTH,
|
|
77
|
-
MobileStyledChatContainerContent,
|
|
78
|
-
StyledChatContainerContent,
|
|
79
|
-
StyledIndicatorContainer
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=styled.js.map
|
|
18
|
+
export { CONTAINER_WIDTH, MobileStyledChatContainerContent, StyledChatContainerContent, StyledIndicatorContainer };
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { SimpleTruncatedTooltipText } from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const ChatContainerHeader = (props) => {
|
|
11
|
-
const { title, floating, children } = props;
|
|
12
|
-
return /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeader, {
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';
|
|
4
|
+
import { StyledChatContainerContentHeader, StyledChatContainerContentHeaderLabel, StyledChatContainerContentHeaderActions } from './styled.js';
|
|
5
|
+
import { validHeaderChilds } from './helpers.js';
|
|
6
|
+
|
|
7
|
+
const ChatContainerHeader = props => {
|
|
8
|
+
const {
|
|
9
|
+
title,
|
|
15
10
|
floating,
|
|
11
|
+
children
|
|
12
|
+
} = props;
|
|
13
|
+
return /*#__PURE__*/_jsx(StyledChatContainerContentHeader, {
|
|
14
|
+
alignItems: "center",
|
|
15
|
+
cols: ['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px'],
|
|
16
|
+
floating: floating,
|
|
16
17
|
role: "heading"
|
|
17
|
-
},
|
|
18
|
+
}, void 0, /*#__PURE__*/_jsx(StyledChatContainerContentHeaderLabel, {
|
|
18
19
|
"data-testid": "chat-container-header-title",
|
|
19
20
|
pl: "xxs",
|
|
20
21
|
pr: "xxs"
|
|
21
|
-
},
|
|
22
|
+
}, void 0, /*#__PURE__*/_jsx(SimpleTruncatedTooltipText, {
|
|
22
23
|
value: title
|
|
23
|
-
})),
|
|
24
|
+
})), /*#__PURE__*/_jsx(StyledChatContainerContentHeaderActions, {
|
|
24
25
|
cols: validHeaderChilds(children),
|
|
25
26
|
justifyContent: "flex-end",
|
|
26
27
|
"data-testid": "chat-container-header-children"
|
|
27
|
-
}, children));
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
ChatContainerHeader
|
|
28
|
+
}, void 0, children));
|
|
31
29
|
};
|
|
32
|
-
|
|
30
|
+
|
|
31
|
+
export { ChatContainerHeader };
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import 'core-js/modules/esnext.async-iterator.map.js';
|
|
2
|
+
import 'core-js/modules/esnext.iterator.map.js';
|
|
3
|
+
import 'core-js/modules/esnext.async-iterator.filter.js';
|
|
4
|
+
import 'core-js/modules/esnext.iterator.constructor.js';
|
|
5
|
+
import 'core-js/modules/esnext.iterator.filter.js';
|
|
6
|
+
import 'core-js/modules/esnext.async-iterator.constructor.js';
|
|
7
|
+
import 'core-js/modules/esnext.async-iterator.to-array.js';
|
|
8
|
+
import 'core-js/modules/esnext.iterator.to-array.js';
|
|
9
|
+
import React from 'react';
|
|
10
|
+
|
|
11
|
+
const validHeaderChilds = children => React.Children.toArray(children).filter(e => {
|
|
4
12
|
if (Array.isArray(e.props.children)) {
|
|
5
13
|
return false;
|
|
6
14
|
}
|
|
7
|
-
|
|
15
|
+
|
|
16
|
+
if (e.props.children === undefined && e.$$typeof.toString() === 'Symbol(react.element)') {
|
|
8
17
|
return true;
|
|
9
18
|
}
|
|
19
|
+
|
|
10
20
|
return !!e.props.children;
|
|
11
|
-
}).map(() =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=helpers.js.map
|
|
21
|
+
}).map(() => '32px');
|
|
22
|
+
|
|
23
|
+
export { validHeaderChilds };
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
const StyledChatContainerContentHeaderActions = styled(Grid)
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const StyledChatContainerContentHeader = styled(Grid)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
`;
|
|
18
|
-
const StyledChatContainerContentHeaderLabel = styled(Grid)`
|
|
19
|
-
justify-content: center;
|
|
20
|
-
align-items: center;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
font-size: 18px;
|
|
23
|
-
color: ${(props) => props.theme.colors.neutral["700"]};
|
|
24
|
-
`;
|
|
25
|
-
export {
|
|
26
|
-
StyledChatContainerContentHeader,
|
|
27
|
-
StyledChatContainerContentHeaderActions,
|
|
28
|
-
StyledChatContainerContentHeaderLabel
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=styled.js.map
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { Grid } from '@elliemae/ds-grid';
|
|
3
|
+
|
|
4
|
+
const StyledChatContainerContentHeaderActions = /*#__PURE__*/styled(Grid).withConfig({
|
|
5
|
+
componentId: "sc-jmynvr-0"
|
|
6
|
+
})(["max-width:80px;"]);
|
|
7
|
+
const StyledChatContainerContentHeader = /*#__PURE__*/styled(Grid).withConfig({
|
|
8
|
+
componentId: "sc-jmynvr-1"
|
|
9
|
+
})(["width:100%;min-height:48px;border-bottom:1px solid ", ";background:", ";", "{& button{background:transparent;}}"], props => props.theme.colors.neutral['200'], props => props.theme.colors.neutral['050'], StyledChatContainerContentHeaderActions);
|
|
10
|
+
const StyledChatContainerContentHeaderLabel = /*#__PURE__*/styled(Grid).withConfig({
|
|
11
|
+
componentId: "sc-jmynvr-2"
|
|
12
|
+
})(["justify-content:center;align-items:center;font-weight:bold;font-size:18px;color:", ";"], props => props.theme.colors.neutral['700']);
|
|
13
|
+
|
|
14
|
+
export { StyledChatContainerContentHeader, StyledChatContainerContentHeaderActions, StyledChatContainerContentHeaderLabel };
|