@elliemae/ds-chat 2.0.0-alpha.4 → 2.0.0-alpha.8
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/parts/bubble/ChatBubble.js +10 -10
- package/cjs/parts/bubble/ChatBubbleArrow.js +13 -13
- package/cjs/parts/bubble/props.js +1 -1
- package/cjs/parts/bubble/styled.js +10 -10
- package/cjs/parts/chat-card/ChatCard.js +6 -6
- package/cjs/parts/chat-card/styled.js +6 -6
- package/cjs/parts/chat-composer/ChatContainerComposer.js +20 -20
- package/cjs/parts/chat-composer/styled.js +5 -5
- package/cjs/parts/chat-container/ChatContainer.js +12 -13
- package/cjs/parts/chat-container/config/useValidateProps.js +1 -1
- package/cjs/parts/chat-container/props.js +4 -4
- package/cjs/parts/chat-container/styled.js +3 -3
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +5 -5
- package/cjs/parts/chat-container-header/styled.js +3 -3
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +15 -16
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +1 -1
- package/cjs/parts/chat-container-messages-list/props.js +1 -1
- package/cjs/parts/chat-container-messages-list/styled.js +6 -6
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +6 -6
- package/cjs/parts/chat-empty-state/styled.js +2 -2
- package/cjs/parts/chat-sidebar/SideBarChat.js +6 -6
- package/cjs/parts/chat-sidebar/styled.js +2 -2
- package/cjs/parts/floating-button/FloatingButton.js +2 -2
- package/cjs/parts/floating-button/styled.js +1 -1
- package/cjs/parts/floating-container/styled.js +1 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js +2 -2
- package/cjs/parts/grid-influencer/styled.js +2 -2
- package/cjs/parts/message-delimiter/MessageDelimiter.js +3 -3
- package/cjs/parts/message-delimiter/styled.js +3 -3
- package/cjs/parts/sidebar-button/SidebarButton.js +6 -6
- package/cjs/parts/sidebar-button/props.js +2 -2
- package/cjs/parts/sidebar-button/styled.js +3 -3
- package/cjs/parts/system-message/SystemMessage.js +5 -5
- package/cjs/parts/system-message/style.js +5 -5
- package/cjs/parts/tile-button/TileButton.js +14 -14
- package/cjs/parts/tile-button/props.js +1 -1
- package/cjs/parts/tile-button/styled.js +8 -8
- package/esm/parts/bubble/styled.js +1 -1
- package/esm/parts/chat-container/ChatContainer.js +1 -2
- package/esm/parts/chat-container/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container/props.js +4 -4
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +1 -2
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container-messages-list/props.js +1 -1
- package/package.json +4 -4
|
@@ -13,10 +13,10 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
13
13
|
const MIN_WIDTH_SIDEBAR = 48;
|
|
14
14
|
const BUTTON_SIDEBAR_HEIGHT = 48; // Buttons
|
|
15
15
|
|
|
16
|
-
const StyledWrapperLeftBorder = /*#__PURE__*/styled__default[
|
|
16
|
+
const StyledWrapperLeftBorder = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
17
17
|
componentId: "sc-1ebp1zs-0"
|
|
18
18
|
})(["height:100%;width:4px;position:absolute;top:0;left:0;"]);
|
|
19
|
-
const StyledStatusBadge = /*#__PURE__*/styled__default[
|
|
19
|
+
const StyledStatusBadge = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
20
20
|
componentId: "sc-1ebp1zs-1"
|
|
21
21
|
})(["height:8px;width:8px;position:absolute;top:0;background:", ";", ";border-radius:50%;box-sizing:content-box;"], props => {
|
|
22
22
|
switch (props.badgeColor) {
|
|
@@ -41,20 +41,20 @@ const StyledStatusBadge = /*#__PURE__*/styled__default['default'].div.withConfig
|
|
|
41
41
|
return 'left: -4px;';
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
const StyledWrapperCentralContent = /*#__PURE__*/styled__default[
|
|
44
|
+
const StyledWrapperCentralContent = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
45
45
|
componentId: "sc-1ebp1zs-2"
|
|
46
46
|
})(["width:24px;height:40px;"]);
|
|
47
|
-
const StyledTileButtonIcon = /*#__PURE__*/styled__default[
|
|
47
|
+
const StyledTileButtonIcon = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
48
48
|
componentId: "sc-1ebp1zs-3"
|
|
49
49
|
})(["position:relative;height:24px;width:24px;svg{fill:", ";}&:focus{svg{fill:", ";}}"], props => props.theme.colors.neutral[500], props => props.theme.colors.brand[800]);
|
|
50
|
-
const StyledTileButtonLabel = /*#__PURE__*/styled__default[
|
|
50
|
+
const StyledTileButtonLabel = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
51
51
|
componentId: "sc-1ebp1zs-4"
|
|
52
52
|
})(["width:24px;height:", ";text-transform:uppercase;overflow:hidden;text-align:center;font-size:13px;color:", ";line-height:17px;"], props => props.theme.space.xs, props => props.theme.colors.neutral[600]);
|
|
53
|
-
const CloseButton = /*#__PURE__*/styled__default[
|
|
53
|
+
const CloseButton = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
54
54
|
componentId: "sc-1ebp1zs-5"
|
|
55
55
|
})(["outline:none;background:none;height:9px;width:9px;position:absolute;top:1px;right:1px;overflow:hidden;padding:0;border:none;span{position:absolute;left:-3px;top:-4px;}&:focus,&:hover{svg{fill:", ";}&:after{display:block;content:'';position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px ", ";border-radius:2px;}}cursor:pointer;"], props => props.theme.colors.brand[600], props => props.theme.colors.brand[600]); // MAIN WRAPPER
|
|
56
56
|
|
|
57
|
-
const StyledTileButton = /*#__PURE__*/styled__default[
|
|
57
|
+
const StyledTileButton = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
58
58
|
componentId: "sc-1ebp1zs-6"
|
|
59
59
|
})(["outline:none;background:transparent;height:", "px;width:", "px;position:relative;padding:0;border:none;cursor:pointer;border-bottom:", ";&:focus,&:hover,&:active,&:disabled{background:", ";& ", "{border:2px solid ", ";margin-top:-2px;", ";}}&:focus,&:hover{& ", "{background:", ";}& ", "{color:", ";}& svg{fill:", ";}}&:active:not(:disabled){background:", ";& ", "{background:", ";}& ", "{color:", ";font-weight:600;}& svg{fill:", ";}& ", "{border:2px solid ", ";}}&:disabled{background:", ";", "{background:", ";}& ", "{background:", ";border:2px solid ", ";}", "{svg{fill:", ";}}", "{color:", ";}}", ""], BUTTON_SIDEBAR_HEIGHT, MIN_WIDTH_SIDEBAR, props => props.isHeader ? `1px solid ${props.theme.colors.neutral['200']}` : 'none', props => props.theme.colors.neutral['080'], StyledStatusBadge, props => props.theme.colors.neutral['080'], props => {
|
|
60
60
|
switch (props.badgePosition) {
|
|
@@ -74,7 +74,7 @@ const StyledTileButton = /*#__PURE__*/styled__default['default'].button.withConf
|
|
|
74
74
|
|
|
75
75
|
return '';
|
|
76
76
|
});
|
|
77
|
-
const StyledWrapper = /*#__PURE__*/styled__default[
|
|
77
|
+
const StyledWrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
78
78
|
componentId: "sc-1ebp1zs-7"
|
|
79
79
|
})(["height:100%;width:100%;position:relative;"]);
|
|
80
80
|
|
|
@@ -19,7 +19,7 @@ const StyledTitleRightBubble = /*#__PURE__*/styled(Grid).withConfig({
|
|
|
19
19
|
})(["font-size:13px;font-weight:400;color:", ";"], props => props.type === BUBBLE_TYPES.SENDER ? '#FFF' : '#657489');
|
|
20
20
|
const StyleBodyWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
21
21
|
componentId: "sc-fe8e9o-4"
|
|
22
|
-
})(["font-size:13px;font-weight:400;line-height:15px;min-height:
|
|
22
|
+
})(["font-size:13px;font-weight:400;line-height:15px;min-height:18px;padding:0px 10px 8px 10px;"]);
|
|
23
23
|
const StyleErrorMessage = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
componentId: "sc-fe8e9o-5"
|
|
25
25
|
})(["font-size:12px;font-weight:400;padding-top:", ";padding-bottom:", ";color:", ";align-items:flex-end;justify-content:center;text-align:right;line-height:15px;svg{fill:", ";}a{font-size:12px;color:", ";}.em-ds-icon{margin-left:8px;}"], props => props.theme.space.xxxs, props => props.theme.space.xxxs, props => props.theme.colors.danger[900], props => props.theme.colors.danger[900], props => props.theme.colors.danger[900]);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'core-js/modules/web.url.to-json.js';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { noop } from 'lodash';
|
|
6
5
|
import { describe } from 'react-desc';
|
|
@@ -22,7 +21,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
22
21
|
const ChatContainer = props => {
|
|
23
22
|
var _containerRef$current;
|
|
24
23
|
|
|
25
|
-
useValidateProps(props, ChatContainerWithSchema.
|
|
24
|
+
useValidateProps(props, ChatContainerWithSchema.toTypescript());
|
|
26
25
|
const {
|
|
27
26
|
sendingText,
|
|
28
27
|
sendingMessages,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
3
|
const useValidateProps = (props, schema) => {
|
|
4
|
-
|
|
4
|
+
useValidateTypescriptPropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
@@ -23,16 +23,16 @@ const defaultProps = {
|
|
|
23
23
|
sendingText: 'Sending'
|
|
24
24
|
};
|
|
25
25
|
const containerProps = {
|
|
26
|
-
messagesListProps: PropTypes.
|
|
27
|
-
composerProps: PropTypes.
|
|
26
|
+
messagesListProps: PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
|
|
27
|
+
composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),
|
|
28
28
|
autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),
|
|
29
29
|
device: PropTypes.string.description('Option to render mobile or desktop style composer').defaultValue(defaultProps.device),
|
|
30
30
|
isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
|
|
31
31
|
hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
32
32
|
getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
|
|
33
33
|
bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Loading messages indicator at the `top` or `bottom` of the container'),
|
|
34
|
-
bannerProps: PropTypes.
|
|
35
|
-
sendingMessages: PropTypes.
|
|
34
|
+
bannerProps: PropTypes.object.description('Banner configuration').defaultValue(defaultProps.bannerProps),
|
|
35
|
+
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description('Array of ids of sending messages').defaultValue(defaultProps.sendingMessages),
|
|
36
36
|
sendingText: PropTypes.string.description('Label description for messages in sending status').defaultValue(defaultProps.sendingText),
|
|
37
37
|
actionRef: PropTypes.object.description(`Reference:
|
|
38
38
|
{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
|
-
import 'core-js/modules/web.url.to-json.js';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { describe } from 'react-desc';
|
|
6
5
|
import { useVirtual } from 'react-virtual';
|
|
@@ -28,7 +27,7 @@ const getPadding = hasMoreItems => {
|
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
const ChatContainerMessagesList = props => {
|
|
31
|
-
useValidateProps(props, ChatContainerMessagesListWithSchema.
|
|
30
|
+
useValidateProps(props, ChatContainerMessagesListWithSchema.toTypescript());
|
|
32
31
|
const {
|
|
33
32
|
sendingText,
|
|
34
33
|
sendingMessages,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
3
|
const useValidateProps = (props, schema) => {
|
|
4
|
-
|
|
4
|
+
useValidateTypescriptPropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
@@ -26,7 +26,7 @@ const listProps = {
|
|
|
26
26
|
isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
|
|
27
27
|
hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
28
28
|
getMoreMessages: PropTypes.func.description('Called when the user clicks on load more').defaultValue(defaultProps.getMoreMessages),
|
|
29
|
-
sendingMessages: PropTypes.
|
|
29
|
+
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description('Array of ids of sending messages').defaultValue(defaultProps.sendingMessages),
|
|
30
30
|
sendingText: PropTypes.string.description('Label description for messages in sending status').defaultValue(defaultProps.sendingText)
|
|
31
31
|
};
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
"generateSubmodules": true
|
|
294
294
|
},
|
|
295
295
|
"dependencies": {
|
|
296
|
-
"@elliemae/ds-basic": "2.0.0-alpha.
|
|
297
|
-
"@elliemae/ds-icons": "2.0.0-alpha.
|
|
298
|
-
"@elliemae/ds-system": "2.0.0-alpha.
|
|
296
|
+
"@elliemae/ds-basic": "2.0.0-alpha.8",
|
|
297
|
+
"@elliemae/ds-icons": "2.0.0-alpha.8",
|
|
298
|
+
"@elliemae/ds-system": "2.0.0-alpha.8",
|
|
299
299
|
"prop-types": "~15.7.2",
|
|
300
300
|
"react-virtual": "~2.3.2"
|
|
301
301
|
},
|