@elliemae/ds-chat 2.0.0-next.8 → 2.0.0-rc.11
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 +27 -0
- package/cjs/parts/bubble/ChatBubble.js +9 -6
- package/cjs/parts/bubble/ChatBubbleArrow.js +64 -61
- package/cjs/parts/bubble/props.js +1 -1
- package/cjs/parts/bubble/styled.js +1 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js +14 -7
- package/cjs/parts/chat-composer/props.js +4 -0
- package/cjs/parts/chat-composer/styled.js +2 -2
- package/cjs/parts/chat-container/ChatContainer.js +56 -14
- package/cjs/parts/chat-container/config/useValidateProps.js +2 -2
- package/cjs/parts/chat-container/props.js +7 -3
- package/cjs/parts/chat-container/styled.js +1 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +3 -3
- package/cjs/parts/chat-container-header/helpers.js +31 -0
- package/cjs/parts/chat-container-header/styled.js +6 -6
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +137 -32
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- package/cjs/parts/chat-container-messages-list/props.js +4 -2
- package/cjs/parts/chat-container-messages-list/styled.js +2 -2
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +2 -3
- package/cjs/parts/chat-sidebar/SideBarChat.js +57 -29
- package/cjs/parts/chat-sidebar/props.js +11 -1
- package/cjs/parts/chat-sidebar/styled.js +2 -2
- package/cjs/parts/floating-button/FloatingButton.js +18 -10
- package/cjs/parts/floating-button/props.js +6 -2
- package/cjs/parts/sidebar-button/SidebarButton.js +5 -0
- package/cjs/parts/sidebar-button/props.js +2 -3
- package/cjs/parts/system-message/style.js +1 -1
- package/cjs/parts/tile-button/TileButton.js +30 -27
- package/cjs/parts/tile-button/props.js +12 -8
- package/cjs/parts/tile-button/styled.js +11 -4
- package/esm/ChatDataTestids.js +23 -0
- package/esm/parts/bubble/ChatBubble.js +8 -5
- package/esm/parts/bubble/ChatBubbleArrow.js +64 -61
- package/esm/parts/bubble/props.js +1 -1
- package/esm/parts/bubble/styled.js +1 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js +13 -5
- package/esm/parts/chat-composer/props.js +4 -0
- package/esm/parts/chat-container/ChatContainer.js +54 -12
- package/esm/parts/chat-container/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container/props.js +7 -3
- package/esm/parts/chat-container/styled.js +1 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js +3 -2
- package/esm/parts/chat-container-header/helpers.js +23 -0
- package/esm/parts/chat-container-header/styled.js +6 -6
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +135 -30
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +2 -2
- package/esm/parts/chat-container-messages-list/props.js +4 -2
- package/esm/parts/chat-container-messages-list/styled.js +2 -2
- package/esm/parts/chat-empty-state/ChatEmptyState.js +1 -1
- package/esm/parts/chat-sidebar/SideBarChat.js +57 -28
- package/esm/parts/chat-sidebar/props.js +11 -1
- package/esm/parts/chat-sidebar/styled.js +2 -2
- package/esm/parts/floating-button/FloatingButton.js +18 -9
- package/esm/parts/floating-button/props.js +6 -2
- package/esm/parts/sidebar-button/SidebarButton.js +5 -0
- package/esm/parts/sidebar-button/props.js +1 -1
- package/esm/parts/system-message/style.js +1 -1
- package/esm/parts/tile-button/TileButton.js +31 -26
- package/esm/parts/tile-button/props.js +11 -3
- package/esm/parts/tile-button/styled.js +11 -6
- package/package.json +28 -6
- package/types/ChatDataTestids.d.ts +21 -0
- package/types/parts/bubble/ChatBubble.d.ts +18 -5
- package/types/parts/bubble/props.d.ts +13 -4
- package/types/parts/bubble/styled.d.ts +9 -9
- package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
- package/types/parts/chat-card/ChatCard.d.ts +24 -4
- package/types/parts/chat-card/props.d.ts +19 -3
- package/types/parts/chat-card/styled.d.ts +6 -6
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +48 -13
- package/types/parts/chat-composer/styled.d.ts +117 -24
- package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
- package/types/parts/chat-container/ChatContainer.d.ts +54 -13
- package/types/parts/chat-container/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container/styled.d.ts +4 -4
- package/types/parts/chat-container/tests/ChatContainer.test.d.ts +1 -0
- package/types/parts/chat-container-header/helpers.d.ts +6 -0
- package/types/parts/chat-container-header/styled.d.ts +3 -3
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +39 -9
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +1 -1
- package/types/parts/chat-container-messages-list/styled.d.ts +7 -7
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -3
- package/types/parts/chat-empty-state/props.d.ts +7 -2
- package/types/parts/chat-empty-state/styled.d.ts +2 -2
- package/types/parts/chat-sidebar/SideBarChat.d.ts +39 -9
- package/types/parts/chat-sidebar/props.d.ts +39 -9
- package/types/parts/chat-sidebar/styled.d.ts +2 -2
- package/types/parts/floating-button/FloatingButton.d.ts +11 -2
- package/types/parts/floating-button/props.d.ts +13 -1
- package/types/parts/floating-button/styled.d.ts +1 -1
- package/types/parts/floating-container/styled.d.ts +1 -2
- package/types/parts/grid-influencer/styled.d.ts +2 -2
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +21 -4
- package/types/parts/message-delimiter/props.d.ts +16 -3
- package/types/parts/message-delimiter/styled.d.ts +3 -3
- package/types/parts/sidebar-button/SidebarButton.d.ts +16 -5
- package/types/parts/sidebar-button/props.d.ts +16 -5
- package/types/parts/sidebar-button/styled.d.ts +3 -3
- package/types/parts/system-message/SystemMessage.d.ts +12 -2
- package/types/parts/system-message/props.d.ts +7 -1
- package/types/parts/system-message/style.d.ts +5 -5
- package/types/parts/tile-button/TileButton.d.ts +66 -17
- package/types/parts/tile-button/props.d.ts +64 -16
- package/types/parts/tile-button/styled.d.ts +9 -8
- package/types/prop-types.d.ts +28 -9
- package/types/tests/utils.d.ts +27 -0
- package/types/parts/chat-composer/props.d.ts +0 -35
- package/types/parts/chat-container/props.d.ts +0 -39
- package/types/parts/chat-container-messages-list/props.d.ts +0 -23
|
@@ -9,15 +9,15 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const StyledChatContainerContentHeaderActions = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
13
13
|
componentId: "sc-jmynvr-0"
|
|
14
|
-
})(["width:
|
|
15
|
-
const
|
|
14
|
+
})(["max-width:80px;"]);
|
|
15
|
+
const StyledChatContainerContentHeader = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
16
16
|
componentId: "sc-jmynvr-1"
|
|
17
|
-
})(["
|
|
18
|
-
const
|
|
17
|
+
})(["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);
|
|
18
|
+
const StyledChatContainerContentHeaderLabel = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
19
19
|
componentId: "sc-jmynvr-2"
|
|
20
|
-
})(["
|
|
20
|
+
})(["justify-content:center;align-items:center;font-weight:bold;font-size:18px;color:", ";"], props => props.theme.colors.neutral['700']);
|
|
21
21
|
|
|
22
22
|
exports.StyledChatContainerContentHeader = StyledChatContainerContentHeader;
|
|
23
23
|
exports.StyledChatContainerContentHeaderActions = StyledChatContainerContentHeaderActions;
|
|
@@ -4,10 +4,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
8
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
12
|
+
require('core-js/modules/esnext.async-iterator.find.js');
|
|
13
|
+
require('core-js/modules/esnext.iterator.find.js');
|
|
14
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
15
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
7
16
|
var React = require('react');
|
|
8
17
|
var reactDesc = require('react-desc');
|
|
9
18
|
var reactVirtual = require('react-virtual');
|
|
10
|
-
var DSButton = require('@elliemae/ds-
|
|
19
|
+
var DSButton = require('@elliemae/ds-button');
|
|
11
20
|
var ChatBubble = require('../bubble/ChatBubble.js');
|
|
12
21
|
var props$1 = require('../bubble/props.js');
|
|
13
22
|
var MessageDelimiter = require('../message-delimiter/MessageDelimiter.js');
|
|
@@ -37,18 +46,21 @@ const getPadding = hasMoreItems => {
|
|
|
37
46
|
return padding;
|
|
38
47
|
};
|
|
39
48
|
|
|
40
|
-
const ChatContainerMessagesList = props => {
|
|
41
|
-
useValidateProps.useValidateProps(props,
|
|
49
|
+
const ChatContainerMessagesList = props$2 => {
|
|
50
|
+
useValidateProps.useValidateProps(props$2, props.listProps);
|
|
42
51
|
const {
|
|
43
52
|
sendingText,
|
|
53
|
+
bannerPosition,
|
|
44
54
|
sendingMessages,
|
|
45
55
|
messages,
|
|
46
56
|
actionRef,
|
|
47
57
|
onScrollEnds,
|
|
48
58
|
getMoreMessages,
|
|
49
59
|
hasMoreItems,
|
|
50
|
-
isLoading
|
|
51
|
-
|
|
60
|
+
isLoading,
|
|
61
|
+
bannerRef
|
|
62
|
+
} = props$2;
|
|
63
|
+
const loadMoreRef = React__default["default"].useRef(null);
|
|
52
64
|
const virtualListRef = React__default["default"].useRef(); // estimateSize should not be really required given what was stated on
|
|
53
65
|
// https://github.com/tannerlinsley/react-virtual/issues/23
|
|
54
66
|
|
|
@@ -64,67 +76,80 @@ const ChatContainerMessagesList = props => {
|
|
|
64
76
|
estimateSize: React__default["default"].useCallback(() => 80, [])
|
|
65
77
|
}));
|
|
66
78
|
const onScrollStop = React__default["default"].useCallback(() => {
|
|
79
|
+
var _virtualListRef$curre;
|
|
80
|
+
|
|
67
81
|
const {
|
|
68
82
|
bottom,
|
|
69
83
|
top
|
|
70
|
-
} = virtualListRef.current.getBoundingClientRect();
|
|
84
|
+
} = (_virtualListRef$curre = virtualListRef.current) === null || _virtualListRef$curre === void 0 ? void 0 : _virtualListRef$curre.getBoundingClientRect();
|
|
71
85
|
const list = virtualListRef.current.querySelectorAll('[data-element="chat-element-list-item"]');
|
|
72
86
|
const indexList = [];
|
|
73
87
|
list.forEach(item => {
|
|
74
88
|
const {
|
|
75
|
-
top: itemTop
|
|
89
|
+
top: itemTop,
|
|
90
|
+
bottom: itemBottom
|
|
76
91
|
} = item.getBoundingClientRect();
|
|
77
|
-
|
|
92
|
+
const itemPadding = 10;
|
|
93
|
+
if (itemTop + itemPadding < bottom && itemBottom - itemPadding > top) indexList.push(item.dataset.index);
|
|
78
94
|
});
|
|
79
95
|
if (onScrollEnds) onScrollEnds(indexList);
|
|
80
96
|
return indexList;
|
|
81
97
|
}, [onScrollEnds]);
|
|
82
|
-
const
|
|
83
|
-
vScroll(index, {
|
|
84
|
-
align: 'center'
|
|
85
|
-
});
|
|
98
|
+
const onlyFocus = React__default["default"].useCallback(index => {
|
|
86
99
|
setTimeout(() => {
|
|
87
100
|
virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
|
|
88
101
|
}, 300);
|
|
89
|
-
}, [
|
|
102
|
+
}, []);
|
|
103
|
+
const scrollAndFocus = React__default["default"].useCallback(function (index) {
|
|
104
|
+
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
105
|
+
align: 'center'
|
|
106
|
+
};
|
|
107
|
+
vScroll(index, b);
|
|
108
|
+
onlyFocus(index);
|
|
109
|
+
}, [onlyFocus, vScroll]);
|
|
90
110
|
React__default["default"].useEffect(() => {
|
|
91
111
|
if (actionRef && actionRef.current) {
|
|
92
|
-
actionRef.current.scrollToIndex = (a
|
|
93
|
-
|
|
94
|
-
|
|
112
|
+
actionRef.current.scrollToIndex = function (a) {
|
|
113
|
+
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
114
|
+
align: 'center'
|
|
115
|
+
};
|
|
95
116
|
vScroll(a, b);
|
|
96
117
|
};
|
|
97
118
|
|
|
98
119
|
actionRef.current.getMessagesInView = onScrollStop;
|
|
99
120
|
|
|
100
|
-
actionRef.current.focusToIndex = (a
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
actionRef.current.focusToIndex = function (a) {
|
|
122
|
+
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
123
|
+
align: 'center'
|
|
124
|
+
};
|
|
125
|
+
scrollAndFocus(a, b);
|
|
104
126
|
};
|
|
105
127
|
|
|
106
|
-
actionRef.current.
|
|
107
|
-
align: 'center'
|
|
108
|
-
}) => {
|
|
109
|
-
var _virtualListRef$curre;
|
|
128
|
+
actionRef.current.focusToIndexWithoutScroll = onlyFocus;
|
|
110
129
|
|
|
111
|
-
|
|
130
|
+
actionRef.current.focusToList = a => {
|
|
131
|
+
var _virtualListRef$curre2;
|
|
132
|
+
|
|
133
|
+
(_virtualListRef$curre2 = virtualListRef.current) === null || _virtualListRef$curre2 === void 0 ? void 0 : _virtualListRef$curre2.focus();
|
|
112
134
|
};
|
|
113
135
|
}
|
|
114
|
-
}, [actionRef, onScrollStop, scrollAndFocus, vScroll]);
|
|
136
|
+
}, [actionRef, onScrollStop, onlyFocus, scrollAndFocus, vScroll]);
|
|
115
137
|
const handleKey = React__default["default"].useCallback(e => {
|
|
116
|
-
e.preventDefault();
|
|
117
138
|
const {
|
|
118
139
|
key
|
|
119
140
|
} = e;
|
|
120
141
|
const index = Number(e.currentTarget.dataset.index);
|
|
142
|
+
e.stopPropagation();
|
|
121
143
|
|
|
122
144
|
switch (key) {
|
|
123
145
|
case 'ArrowUp':
|
|
146
|
+
e.preventDefault();
|
|
124
147
|
if (index > 0) virtualListRef.current.querySelector("[data-index=\"".concat(index - 1, "\"]")).focus();
|
|
125
148
|
break;
|
|
126
149
|
|
|
127
150
|
case 'ArrowDown':
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
|
|
128
153
|
if (index < messages.length - 1) {
|
|
129
154
|
virtualListRef.current.querySelector("[data-index=\"".concat(index + 1, "\"]")).focus();
|
|
130
155
|
}
|
|
@@ -132,18 +157,96 @@ const ChatContainerMessagesList = props => {
|
|
|
132
157
|
break;
|
|
133
158
|
|
|
134
159
|
case 'Home':
|
|
160
|
+
e.preventDefault();
|
|
161
|
+
scrollAndFocus(0);
|
|
162
|
+
break;
|
|
163
|
+
|
|
164
|
+
case 'End':
|
|
165
|
+
e.preventDefault();
|
|
166
|
+
scrollAndFocus(messages.length - 1);
|
|
167
|
+
break;
|
|
168
|
+
|
|
169
|
+
case 'Tab':
|
|
170
|
+
e.preventDefault();
|
|
171
|
+
|
|
172
|
+
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
173
|
+
var _loadMoreRef$current;
|
|
174
|
+
|
|
175
|
+
(_loadMoreRef$current = loadMoreRef.current) === null || _loadMoreRef$current === void 0 ? void 0 : _loadMoreRef$current.focus();
|
|
176
|
+
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
177
|
+
var _loadMoreRef$current2;
|
|
178
|
+
|
|
179
|
+
(_loadMoreRef$current2 = loadMoreRef.current) === null || _loadMoreRef$current2 === void 0 ? void 0 : _loadMoreRef$current2.focus();
|
|
180
|
+
} else if (!e.shiftKey) {
|
|
181
|
+
if (bannerPosition) {
|
|
182
|
+
bannerRef.current.focusOnWrapper();
|
|
183
|
+
} else {
|
|
184
|
+
actionRef.current.focusToComposer();
|
|
185
|
+
}
|
|
186
|
+
} else {
|
|
187
|
+
var _virtualListRef$curre3;
|
|
188
|
+
|
|
189
|
+
(_virtualListRef$curre3 = virtualListRef.current) === null || _virtualListRef$curre3 === void 0 ? void 0 : _virtualListRef$curre3.focus();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
}, [actionRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
195
|
+
const handleListKey = React__default["default"].useCallback(e => {
|
|
196
|
+
const {
|
|
197
|
+
key
|
|
198
|
+
} = e;
|
|
199
|
+
|
|
200
|
+
switch (key) {
|
|
201
|
+
case 'ArrowUp':
|
|
202
|
+
e.preventDefault();
|
|
203
|
+
onlyFocus(onScrollStop().shift());
|
|
204
|
+
break;
|
|
205
|
+
|
|
206
|
+
case 'ArrowDown':
|
|
207
|
+
e.preventDefault();
|
|
208
|
+
onlyFocus(onScrollStop().pop());
|
|
209
|
+
break;
|
|
210
|
+
|
|
211
|
+
case 'Home':
|
|
212
|
+
e.preventDefault();
|
|
135
213
|
scrollAndFocus(0);
|
|
136
214
|
break;
|
|
137
215
|
|
|
138
216
|
case 'End':
|
|
217
|
+
e.preventDefault();
|
|
139
218
|
scrollAndFocus(messages.length - 1);
|
|
140
219
|
break;
|
|
141
220
|
|
|
142
221
|
case 'Tab':
|
|
143
|
-
|
|
222
|
+
if (document.activeElement !== loadMoreRef.current) {
|
|
223
|
+
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
224
|
+
var _loadMoreRef$current3;
|
|
225
|
+
|
|
226
|
+
e.preventDefault();
|
|
227
|
+
(_loadMoreRef$current3 = loadMoreRef.current) === null || _loadMoreRef$current3 === void 0 ? void 0 : _loadMoreRef$current3.focus();
|
|
228
|
+
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
229
|
+
var _loadMoreRef$current4;
|
|
230
|
+
|
|
231
|
+
e.preventDefault();
|
|
232
|
+
(_loadMoreRef$current4 = loadMoreRef.current) === null || _loadMoreRef$current4 === void 0 ? void 0 : _loadMoreRef$current4.focus();
|
|
233
|
+
} else if (!e.shiftKey) {
|
|
234
|
+
e.preventDefault();
|
|
235
|
+
actionRef.current.focusToComposer();
|
|
236
|
+
}
|
|
237
|
+
} else if (!e.shiftKey) {
|
|
238
|
+
e.preventDefault();
|
|
239
|
+
actionRef.current.focusToComposer();
|
|
240
|
+
} else {
|
|
241
|
+
var _virtualListRef$curre4;
|
|
242
|
+
|
|
243
|
+
e.preventDefault();
|
|
244
|
+
(_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.focus();
|
|
245
|
+
}
|
|
246
|
+
|
|
144
247
|
break;
|
|
145
248
|
}
|
|
146
|
-
}, [actionRef, messages.length, scrollAndFocus]);
|
|
249
|
+
}, [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus]);
|
|
147
250
|
React__default["default"].useEffect(() => {
|
|
148
251
|
let handlerCallback = null;
|
|
149
252
|
const localVirtualRef = virtualListRef.current;
|
|
@@ -193,7 +296,7 @@ const ChatContainerMessagesList = props => {
|
|
|
193
296
|
jsxRuntime.jsx(ChatBubble.ChatBubble, _objectSpread(_objectSpread({}, row), {}, {
|
|
194
297
|
helpMessage: isSending ? sendingText : row.helpMessage
|
|
195
298
|
})) : null, row.type === props$1.BUBBLE_TYPES.DELIMITER ? /*#__PURE__*/jsxRuntime.jsx(MessageDelimiter.MessageDelimiter, _objectSpread({}, row)) : null, row.type === props$1.BUBBLE_TYPES.SYSTEM ? /*#__PURE__*/jsxRuntime.jsx(SystemMessage.SystemMessage, _objectSpread({}, row)) : null)
|
|
196
|
-
}, "ds-chat-bubble-".concat(index));
|
|
299
|
+
}, "ds-chat-bubble-".concat(index, "-").concat(row.dsId, "-").concat(row.type));
|
|
197
300
|
}), [virtualItems, messages, sendingMessages, handleKey, sendingText]);
|
|
198
301
|
return /*#__PURE__*/_jsx__default["default"](styled.StyledWrapper, {}, void 0, /*#__PURE__*/jsxRuntime.jsx(styled.StyledChatContainerContentList, {
|
|
199
302
|
"data-testid": "chat-thread-container",
|
|
@@ -201,7 +304,7 @@ const ChatContainerMessagesList = props => {
|
|
|
201
304
|
"aria-live": "polite",
|
|
202
305
|
ref: virtualListRef,
|
|
203
306
|
role: "list",
|
|
204
|
-
onKeyDown:
|
|
307
|
+
onKeyDown: handleListKey,
|
|
205
308
|
children: /*#__PURE__*/_jsx__default["default"](styled.StyledChatContainerContentListScroll, {
|
|
206
309
|
height: "".concat(totalSize, "px")
|
|
207
310
|
}, void 0, render, !isLoading && hasMoreItems ? /*#__PURE__*/_jsx__default["default"](styled.StyledLoadMoreContainer, {
|
|
@@ -209,7 +312,9 @@ const ChatContainerMessagesList = props => {
|
|
|
209
312
|
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
210
313
|
labelText: "Load More",
|
|
211
314
|
buttonType: "secondary",
|
|
212
|
-
onClick: getMoreMessages
|
|
315
|
+
onClick: getMoreMessages,
|
|
316
|
+
"data-testid": "ds-chat-load-more-btn",
|
|
317
|
+
innerRef: loadMoreRef
|
|
213
318
|
})) : null)
|
|
214
319
|
}));
|
|
215
320
|
};
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var dsPropsHelpers = require('@elliemae/ds-props-helpers');
|
|
6
6
|
|
|
7
|
-
const useValidateProps = (props,
|
|
8
|
-
dsPropsHelpers.useValidateTypescriptPropTypes(props,
|
|
7
|
+
const useValidateProps = (props, propTypes) => {
|
|
8
|
+
dsPropsHelpers.useValidateTypescriptPropTypes(props, propTypes);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
exports.useValidateProps = useValidateProps;
|
|
@@ -11,11 +11,13 @@ const defaultProps = {
|
|
|
11
11
|
onScrollEnds: () => [],
|
|
12
12
|
getMoreMessages: lodash.noop,
|
|
13
13
|
sendingMessages: undefined,
|
|
14
|
-
sendingText: 'Sending'
|
|
14
|
+
sendingText: 'Sending',
|
|
15
|
+
bannerPosition: undefined,
|
|
16
|
+
bannerRef: undefined
|
|
15
17
|
};
|
|
16
18
|
const listProps = {
|
|
17
19
|
messages: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of out-of-the-box items you want to render inside the ChatMessageList').defaultValue(defaultProps.messages),
|
|
18
|
-
actionRef: reactDesc.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),
|
|
20
|
+
actionRef: reactDesc.PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToIndexWithoutScroll: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
|
|
19
21
|
onScrollEnds: reactDesc.PropTypes.func.description("Called when the scroll stops."),
|
|
20
22
|
isLoading: reactDesc.PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
|
|
21
23
|
hasMoreItems: reactDesc.PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
|
|
@@ -16,7 +16,7 @@ const StyledWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
|
16
16
|
|
|
17
17
|
const StyledWrapperListItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
18
18
|
componentId: "sc-1jhprzr-1"
|
|
19
|
-
})(["min-width:100%;", ";", ";", ";"], props$1 => props$1.type === props.BUBBLE_TYPES.SENDER && "padding: ".concat(props$1.theme.space.xxs, " ").concat(props$1.theme.space.xxs, "
|
|
19
|
+
})(["min-width:100%;", ";", ";", ";"], props$1 => props$1.type === props.BUBBLE_TYPES.SENDER && "padding: ".concat(props$1.theme.space.xxs, " ").concat(props$1.theme.space.xxs, " ").concat(props$1.theme.space.xxs, " 13%\n "), props$1 => props$1.type === props.BUBBLE_TYPES.RECIPIENT && "padding: ".concat(props$1.theme.space.xxs, " 13% ").concat(props$1.theme.space.xxs, "\n ").concat(props$1.theme.space.xxs, "\n "), props$1 => props$1.type === props.BUBBLE_TYPES.SYSTEM && "padding: ".concat(props$1.theme.space.xxs, " 0px\n "));
|
|
20
20
|
const StyledChatContainerContentList = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
21
21
|
componentId: "sc-1jhprzr-2"
|
|
22
22
|
})(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"], props => props.theme.space.xs);
|
|
@@ -28,7 +28,7 @@ const StyledLoadMoreContainer = /*#__PURE__*/styled__default["default"].div.with
|
|
|
28
28
|
})(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";display:grid;justify-content:center;align-items:center;", " ", ""], props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.hasMoreItems === 'top' ? 'top: 0;' : '', props => props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '');
|
|
29
29
|
const ListItem = /*#__PURE__*/styled__default["default"].div.withConfig({
|
|
30
30
|
componentId: "sc-1jhprzr-5"
|
|
31
|
-
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;
|
|
31
|
+
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;top:0;left:-", ";pointer-events:none;border-radius:2px;background-color:#ebedf0;width:calc(100% + 24px);border:2px solid #1e79c2;height:100%;z-index:-1;}}"], props => props.theme.space.xxs);
|
|
32
32
|
|
|
33
33
|
exports.ListItem = ListItem;
|
|
34
34
|
exports.StyledChatContainerContentList = StyledChatContainerContentList;
|
|
@@ -7,7 +7,7 @@ require('core-js/modules/web.url.to-json.js');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactDesc = require('react-desc');
|
|
9
9
|
var dsGrid = require('@elliemae/ds-grid');
|
|
10
|
-
var
|
|
10
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
11
11
|
var props = require('./props.js');
|
|
12
12
|
var styled = require('./styled.js');
|
|
13
13
|
var useValidateProps = require('./config/useValidateProps.js');
|
|
@@ -15,7 +15,6 @@ var useValidateProps = require('./config/useValidateProps.js');
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
17
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
18
|
-
var Communications__default = /*#__PURE__*/_interopDefaultLegacy(Communications);
|
|
19
18
|
|
|
20
19
|
const ChatEmptyState = props => {
|
|
21
20
|
var _Grid, _Grid2;
|
|
@@ -31,7 +30,7 @@ const ChatEmptyState = props => {
|
|
|
31
30
|
}, void 0, /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
32
31
|
alignItems: "center",
|
|
33
32
|
justifyContent: "center"
|
|
34
|
-
}, void 0, /*#__PURE__*/_jsx__default["default"](
|
|
33
|
+
}, void 0, /*#__PURE__*/_jsx__default["default"](dsIcons.Communications, {
|
|
35
34
|
size: "xxl",
|
|
36
35
|
color: ['neutral', 400]
|
|
37
36
|
})), _Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {
|
|
@@ -5,10 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
6
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
7
|
require('core-js/modules/web.url.to-json.js');
|
|
8
|
-
require('
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.map.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.map.js');
|
|
10
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
11
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
12
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
13
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
14
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
15
|
+
var React = require('react');
|
|
9
16
|
var reactDesc = require('react-desc');
|
|
10
|
-
var
|
|
11
|
-
var MenuCollapse = require('@elliemae/ds-icons/MenuCollapse');
|
|
17
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
12
18
|
var styled = require('./styled.js');
|
|
13
19
|
var TileButton = require('../tile-button/TileButton.js');
|
|
14
20
|
var SidebarButton = require('../sidebar-button/SidebarButton.js');
|
|
@@ -20,26 +26,28 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
26
|
|
|
21
27
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
22
28
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
23
|
-
var
|
|
24
|
-
var MenuCollapse__default = /*#__PURE__*/_interopDefaultLegacy(MenuCollapse);
|
|
29
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
25
30
|
|
|
26
31
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
27
32
|
|
|
28
33
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
29
34
|
|
|
30
|
-
const FooterChat =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
const FooterChat = _ref => {
|
|
36
|
+
let {
|
|
37
|
+
expanded,
|
|
38
|
+
onFooterClose,
|
|
39
|
+
onFooterExpand,
|
|
40
|
+
footerButtonExtraProps
|
|
41
|
+
} = _ref;
|
|
42
|
+
return /*#__PURE__*/_jsx__default["default"](SidebarButton.SidebarButton, {
|
|
43
|
+
dsId: "sidebar_footer",
|
|
44
|
+
label: null,
|
|
45
|
+
Icon: !expanded ? dsIcons.MenuCollapse : dsIcons.MenuExpand,
|
|
46
|
+
onClick: expanded ? onFooterClose : onFooterExpand,
|
|
47
|
+
"aria-pressed": expanded,
|
|
48
|
+
"aria-label": footerButtonExtraProps['aria-label']
|
|
49
|
+
});
|
|
50
|
+
};
|
|
43
51
|
|
|
44
52
|
const SideBarChat = props => {
|
|
45
53
|
useValidateProps.useValidateProps(props, SideBarChatWithSchema.toJSON());
|
|
@@ -49,18 +57,38 @@ const SideBarChat = props => {
|
|
|
49
57
|
onFooterClose,
|
|
50
58
|
onFooterExpand,
|
|
51
59
|
selectedItem,
|
|
52
|
-
footerButtonExtraProps
|
|
60
|
+
footerButtonExtraProps,
|
|
61
|
+
tooltipPlacement,
|
|
62
|
+
enableTooltipWhenIsClosed,
|
|
63
|
+
actionRef
|
|
53
64
|
} = props;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
const {
|
|
66
|
+
current: listRef
|
|
67
|
+
} = React__default["default"].useRef({});
|
|
68
|
+
const registerReference = React__default["default"].useCallback(ref => {
|
|
69
|
+
if (ref) listRef[ref.dataset.key] = ref;
|
|
70
|
+
}, [listRef]);
|
|
71
|
+
React__default["default"].useEffect(() => {
|
|
72
|
+
if (actionRef.current.listRef) {
|
|
73
|
+
actionRef.current.listRef = listRef;
|
|
74
|
+
}
|
|
75
|
+
}, [sidebarItems, expanded, actionRef, listRef]);
|
|
76
|
+
return /*#__PURE__*/jsxRuntime.jsxs(styled.StyledSideBarContainer, {
|
|
77
|
+
rows: [1, 'auto'],
|
|
78
|
+
ref: listRef,
|
|
79
|
+
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledSideBarButtonsContainer, {}, void 0, sidebarItems.map(p => /*#__PURE__*/jsxRuntime.jsx(TileButton.TileButton, _objectSpread(_objectSpread({
|
|
80
|
+
innerRef: registerReference
|
|
81
|
+
}, p), {}, {
|
|
82
|
+
selected: selectedItem === p.dsId,
|
|
83
|
+
tooltipPlacement: tooltipPlacement,
|
|
84
|
+
disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
|
|
85
|
+
}), p.dsId))), /*#__PURE__*/_jsx__default["default"](FooterChat, {
|
|
86
|
+
expanded: expanded,
|
|
87
|
+
onFooterClose: onFooterClose,
|
|
88
|
+
onFooterExpand: onFooterExpand,
|
|
89
|
+
footerButtonExtraProps: footerButtonExtraProps
|
|
90
|
+
})]
|
|
91
|
+
});
|
|
64
92
|
};
|
|
65
93
|
|
|
66
94
|
SideBarChat.defaultProps = props.defaultProps;
|
|
@@ -15,17 +15,27 @@ const defaultProps = {
|
|
|
15
15
|
onHeaderClose: lodash.noop,
|
|
16
16
|
footerButtonExtraProps: {
|
|
17
17
|
'aria-label': 'expand or collapse button'
|
|
18
|
+
},
|
|
19
|
+
tooltipPlacement: 'right',
|
|
20
|
+
enableTooltipWhenIsClosed: false,
|
|
21
|
+
actionRef: {
|
|
22
|
+
current: {
|
|
23
|
+
listRef: []
|
|
24
|
+
}
|
|
18
25
|
}
|
|
19
26
|
};
|
|
20
27
|
const chatSidebarProps = {
|
|
21
28
|
sidebarItems: reactDesc.PropTypes.arrayOf(reactDesc.PropTypes.object).description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat').defaultValue(defaultProps.sidebarItems),
|
|
22
29
|
expanded: reactDesc.PropTypes.bool.description('Whether to show the chat expanded or collapsed').defaultValue(defaultProps.expanded),
|
|
23
30
|
selectedItem: reactDesc.PropTypes.string.description('The id of the chat item you want to be opened').defaultValue(defaultProps.selectedItem),
|
|
31
|
+
tooltipPlacement: reactDesc.PropTypes.oneOf(['top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']).description('start placement preferences, as per popperjs placement option').defaultValue("'right'"),
|
|
32
|
+
enableTooltipWhenIsClosed: reactDesc.PropTypes.bool.description('Enable tooltip when is closed').defaultValue(defaultProps.onFooterExpand),
|
|
24
33
|
onFooterExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultProps.onFooterExpand),
|
|
25
34
|
onFooterClose: reactDesc.PropTypes.func.description('The function to call when the chat is closed via the footer').defaultValue(defaultProps.onFooterClose),
|
|
26
35
|
onHeaderExpand: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the header').defaultValue(defaultProps.onHeaderExpand),
|
|
27
36
|
onHeaderClose: reactDesc.PropTypes.func.description('The function to call when the chat is closed via the header').defaultValue(defaultProps.onHeaderClose),
|
|
28
|
-
footerButtonExtraProps: reactDesc.PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps)
|
|
37
|
+
footerButtonExtraProps: reactDesc.PropTypes.object.description('Expand/collapse footer button extra props').defaultValue(defaultProps.footerButtonExtraProps),
|
|
38
|
+
actionRef: reactDesc.PropTypes.object.description("Action ref for sidebar\n {\n listRef: references to Tiles\n }\n ").defaultValue(defaultProps.actionRef)
|
|
29
39
|
};
|
|
30
40
|
|
|
31
41
|
exports.chatSidebarProps = chatSidebarProps;
|
|
@@ -12,10 +12,10 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
12
12
|
|
|
13
13
|
const StyledSideBarContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
14
14
|
componentId: "sc-16uijso-0"
|
|
15
|
-
})(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";"], styled$1.MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
|
|
15
|
+
})(["height:100%;width:", "px;background:", ";border-right:1px solid ", ";overflow:hidden;"], styled$1.MIN_WIDTH_SIDEBAR, props => props.theme.colors.neutral['050'], props => props.theme.colors.neutral['100']);
|
|
16
16
|
const StyledSideBarButtonsContainer = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
17
17
|
componentId: "sc-16uijso-1"
|
|
18
|
-
})(["overflow-y:auto;align-items:flex-start;justify-content:flex-start;grid-template-rows:repeat(auto-fill,", "px);"], styled$1.BUTTON_SIDEBAR_HEIGHT);
|
|
18
|
+
})(["overflow-y:auto;align-items:flex-start;justify-content:flex-start;grid-template-rows:repeat(auto-fill,", "px);overflow-x:hidden;scrollbar-width:thin;&::-webkit-scrollbar{width:6px;}"], styled$1.BUTTON_SIDEBAR_HEIGHT);
|
|
19
19
|
|
|
20
20
|
exports.StyledSideBarButtonsContainer = StyledSideBarButtonsContainer;
|
|
21
21
|
exports.StyledSideBarContainer = StyledSideBarContainer;
|
|
@@ -4,24 +4,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
6
|
require('react');
|
|
7
|
-
var
|
|
7
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
8
8
|
var styled = require('./styled.js');
|
|
9
9
|
var props = require('./props.js');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
10
11
|
|
|
11
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
13
|
|
|
13
14
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
|
-
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
15
15
|
|
|
16
16
|
var _Comments;
|
|
17
|
-
const FloatingButton =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
const FloatingButton = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
onClick,
|
|
20
|
+
onFocus,
|
|
21
|
+
innerRef
|
|
22
|
+
} = _ref;
|
|
23
|
+
return /*#__PURE__*/jsxRuntime.jsx(styled.StyledFloatingButton, {
|
|
24
|
+
onFocus: onFocus,
|
|
25
|
+
ref: innerRef,
|
|
26
|
+
"data-testid": "chat-floating-button",
|
|
27
|
+
onClick: onClick,
|
|
28
|
+
children: _Comments || (_Comments = /*#__PURE__*/_jsx__default["default"](dsIcons.Comments, {
|
|
29
|
+
size: "l"
|
|
30
|
+
}))
|
|
31
|
+
});
|
|
32
|
+
};
|
|
25
33
|
FloatingButton.defaultProps = props.defaultFloatingButton;
|
|
26
34
|
|
|
27
35
|
exports.FloatingButton = FloatingButton;
|
|
@@ -6,10 +6,14 @@ var reactDesc = require('react-desc');
|
|
|
6
6
|
var lodash = require('lodash');
|
|
7
7
|
|
|
8
8
|
const defaultFloatingButton = {
|
|
9
|
-
onClick: lodash.noop
|
|
9
|
+
onClick: lodash.noop,
|
|
10
|
+
onFocus: lodash.noop,
|
|
11
|
+
innerRef: null
|
|
10
12
|
};
|
|
11
13
|
const propsFloatingButton = {
|
|
12
|
-
onClick: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultFloatingButton.onClick)
|
|
14
|
+
onClick: reactDesc.PropTypes.func.description('The function to call when the chat is opened via the footer').defaultValue(defaultFloatingButton.onClick),
|
|
15
|
+
onFocus: reactDesc.PropTypes.func.description('The function to call when button is being focused').defaultValue(defaultFloatingButton.onFocus),
|
|
16
|
+
innerRef: reactDesc.PropTypes.object.description('Ref to the component container').defaultValue(null)
|
|
13
17
|
};
|
|
14
18
|
|
|
15
19
|
exports.defaultFloatingButton = defaultFloatingButton;
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
require('core-js/modules/esnext.async-iterator.filter.js');
|
|
6
|
+
require('core-js/modules/esnext.iterator.constructor.js');
|
|
7
|
+
require('core-js/modules/esnext.iterator.filter.js');
|
|
8
|
+
require('core-js/modules/esnext.async-iterator.for-each.js');
|
|
9
|
+
require('core-js/modules/esnext.iterator.for-each.js');
|
|
5
10
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
11
|
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
7
12
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
@@ -5,15 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var propsTypes = require('prop-types');
|
|
6
6
|
var reactDesc = require('react-desc');
|
|
7
7
|
var lodash = require('lodash');
|
|
8
|
-
var
|
|
8
|
+
var dsIcons = require('@elliemae/ds-icons');
|
|
9
9
|
|
|
10
10
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
11
|
|
|
12
12
|
var propsTypes__default = /*#__PURE__*/_interopDefaultLegacy(propsTypes);
|
|
13
|
-
var Comments__default = /*#__PURE__*/_interopDefaultLegacy(Comments);
|
|
14
13
|
|
|
15
14
|
const defaultSidebarButton = {
|
|
16
|
-
Icon:
|
|
15
|
+
Icon: dsIcons.Comments,
|
|
17
16
|
dsId: undefined,
|
|
18
17
|
label: '',
|
|
19
18
|
onClick: lodash.noop,
|
|
@@ -11,7 +11,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
11
11
|
|
|
12
12
|
const Wrapper = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
13
13
|
componentId: "sc-80w41d-0"
|
|
14
|
-
})(["align-items:center;justify-content:center;
|
|
14
|
+
})(["align-items:center;justify-content:center;max-width:100%;padding:0 8px 8px;border:1px solid ", ";border-radius:10px;background-color:", ";box-shadow:none;"], props => props.theme.colors.neutral['100'], props => props.theme.colors.neutral['080']);
|
|
15
15
|
const Header = /*#__PURE__*/styled__default["default"](dsGrid.Grid).withConfig({
|
|
16
16
|
componentId: "sc-80w41d-1"
|
|
17
17
|
})(["align-items:center;height:36px;"]);
|