@elliemae/ds-chat 2.0.0 → 2.1.0-rc.1
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/chat-composer/ChatContainerComposer.js +3 -3
- package/cjs/parts/chat-container/ChatContainer.js +17 -13
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +71 -34
- package/cjs/parts/chat-sidebar/SideBarChat.js +2 -2
- package/cjs/parts/sidebar-button/SidebarButton.js +2 -2
- package/esm/parts/chat-composer/ChatContainerComposer.js +3 -3
- package/esm/parts/chat-container/ChatContainer.js +17 -13
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +71 -34
- package/esm/parts/chat-sidebar/SideBarChat.js +2 -2
- package/esm/parts/sidebar-button/SidebarButton.js +2 -2
- package/package.json +11 -11
- package/types/parts/chat-card/ChatCard.d.ts +6 -6
- package/types/parts/chat-card/props.d.ts +6 -6
- package/types/parts/chat-composer/styled.d.ts +3 -155
- package/types/parts/chat-container/ChatContainer.d.ts +6 -6
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +6 -6
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +4 -4
- package/types/parts/message-delimiter/props.d.ts +4 -4
- package/types/parts/system-message/SystemMessage.d.ts +2 -2
- package/types/parts/system-message/props.d.ts +2 -2
- package/types/parts/tile-button/TileButton.d.ts +2 -2
- package/types/parts/tile-button/props.d.ts +2 -2
|
@@ -28,9 +28,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
28
28
|
|
|
29
29
|
var _PaperAirplane, _Grid;
|
|
30
30
|
|
|
31
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
31
|
+
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; }
|
|
32
32
|
|
|
33
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
33
|
+
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__default["default"](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; }
|
|
34
34
|
|
|
35
35
|
const ChatComposer = props => {
|
|
36
36
|
var _input$current;
|
|
@@ -146,7 +146,7 @@ const ChatComposer = props => {
|
|
|
146
146
|
}, void 0, inputMaxLength && hasError ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
147
147
|
children: [/*#__PURE__*/_jsx__default["default"](styled.StyledCounterErrorA11y, {
|
|
148
148
|
role: "alert"
|
|
149
|
-
}, void 0, maxLengthMessage || "You have exceeded the
|
|
149
|
+
}, void 0, maxLengthMessage || "You have entered ".concat(inputLength, " characters and have exceeded the limit by ").concat(inputLength - inputMaxLength, ". Please limit to less than ").concat(inputMaxLength, " characters. ")), maxLengthMessage || "Please limit to less than ".concat(inputMaxLength, " characters. ")]
|
|
150
150
|
}) : '', inputMaxLength ? " ".concat(inputLength, " / ").concat(inputMaxLength) : ''), _Grid || (_Grid = /*#__PURE__*/_jsx__default["default"](dsGrid.Grid, {}))));
|
|
151
151
|
};
|
|
152
152
|
|
|
@@ -29,11 +29,11 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
29
29
|
var DSIndeterminateProgressIndicator__default = /*#__PURE__*/_interopDefaultLegacy(DSIndeterminateProgressIndicator);
|
|
30
30
|
var DSBanner__default = /*#__PURE__*/_interopDefaultLegacy(DSBanner);
|
|
31
31
|
|
|
32
|
-
var _DSIndeterminateProgr
|
|
32
|
+
var _DSIndeterminateProgr;
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
34
|
+
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; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
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__default["default"](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; }
|
|
37
37
|
|
|
38
38
|
const ChatContainer = props$1 => {
|
|
39
39
|
var _containerRef$current;
|
|
@@ -86,17 +86,21 @@ const ChatContainer = props$1 => {
|
|
|
86
86
|
const ref = actionRef || listRef;
|
|
87
87
|
|
|
88
88
|
if (e.shiftKey && e.key === 'Tab') {
|
|
89
|
-
|
|
89
|
+
if (messagesListProps.messages.length > 0) {
|
|
90
|
+
e.preventDefault();
|
|
90
91
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
if (['top', 'bottom'].includes(bannerPosition)) {
|
|
93
|
+
bannerRef.current.focusOnWrapper();
|
|
94
|
+
} else {
|
|
95
|
+
var _ref$current;
|
|
96
|
+
|
|
97
|
+
const last = ref.current.getMessagesInView().pop();
|
|
98
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focusToIndexWithoutScroll(last);
|
|
99
|
+
}
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
|
-
}, [actionRef, onComposerKeyDown, bannerPosition]); // Map actions
|
|
103
|
+
}, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages.length]); // Map actions
|
|
100
104
|
|
|
101
105
|
React__default["default"].useEffect(() => {
|
|
102
106
|
if (actionRef && actionRef.current) {
|
|
@@ -146,15 +150,15 @@ const ChatContainer = props$1 => {
|
|
|
146
150
|
isOpen: true,
|
|
147
151
|
type: bannerProps.type || DSBanner.BANNER_TYPES.INFO,
|
|
148
152
|
actionRef: bannerRef
|
|
149
|
-
})), sendingMessages && sendingMessages.length > 0 ?
|
|
153
|
+
})), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/_jsx__default["default"](styled.StyledIndicatorContainer, {
|
|
150
154
|
isLoading: "bottom",
|
|
151
155
|
linear: true,
|
|
152
156
|
"data-testid": "ds-chat-loading-indicator"
|
|
153
157
|
}, void 0, /*#__PURE__*/_jsx__default["default"](DSIndeterminateProgressIndicator__default["default"], {
|
|
154
158
|
processing: true,
|
|
155
|
-
title:
|
|
159
|
+
title: sendingText,
|
|
156
160
|
lineOnly: true
|
|
157
|
-
}))
|
|
161
|
+
})) : null), /*#__PURE__*/jsxRuntime.jsx(ChatContainerComposer.ChatComposer, _objectSpread(_objectSpread({}, composerProps), {}, {
|
|
158
162
|
onKeyDown: handleTabs,
|
|
159
163
|
onResize: onResize,
|
|
160
164
|
maxHeight: (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight) || 0) / 2,
|
|
@@ -19,6 +19,7 @@ var React = require('react');
|
|
|
19
19
|
var reactDesc = require('react-desc');
|
|
20
20
|
var reactVirtual = require('react-virtual');
|
|
21
21
|
var DSButton = require('@elliemae/ds-button');
|
|
22
|
+
var lodash = require('lodash');
|
|
22
23
|
var ChatBubble = require('../bubble/ChatBubble.js');
|
|
23
24
|
var props$1 = require('../bubble/props.js');
|
|
24
25
|
var MessageDelimiter = require('../message-delimiter/MessageDelimiter.js');
|
|
@@ -35,9 +36,9 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
35
36
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
36
37
|
var DSButton__default = /*#__PURE__*/_interopDefaultLegacy(DSButton);
|
|
37
38
|
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
39
|
+
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; }
|
|
39
40
|
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
41
|
+
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__default["default"](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; }
|
|
41
42
|
|
|
42
43
|
const getPadding = _ref => {
|
|
43
44
|
let {
|
|
@@ -67,6 +68,7 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
67
68
|
isLoading,
|
|
68
69
|
bannerRef
|
|
69
70
|
} = props$2;
|
|
71
|
+
const pendingOnScroll = React__default["default"].useRef(false);
|
|
70
72
|
const loadMoreRef = React__default["default"].useRef(null);
|
|
71
73
|
const virtualListRef = React__default["default"].useRef(); // estimateSize should not be really required given what was stated on
|
|
72
74
|
// https://github.com/tannerlinsley/react-virtual/issues/23
|
|
@@ -86,9 +88,15 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
86
88
|
})), {}, {
|
|
87
89
|
estimateSize: React__default["default"].useCallback(() => 80, [])
|
|
88
90
|
}));
|
|
89
|
-
const
|
|
91
|
+
const debouncedScroll = React__default["default"].useMemo(() => lodash.debounce(() => {
|
|
90
92
|
var _virtualListRef$curre;
|
|
91
93
|
|
|
94
|
+
if (document.visibilityState === 'hidden') {
|
|
95
|
+
pendingOnScroll.current = true;
|
|
96
|
+
return [];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
pendingOnScroll.current = false;
|
|
92
100
|
const {
|
|
93
101
|
bottom,
|
|
94
102
|
top
|
|
@@ -97,15 +105,15 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
97
105
|
const indexList = [];
|
|
98
106
|
list.forEach(item => {
|
|
99
107
|
const {
|
|
100
|
-
top: itemTop
|
|
101
|
-
bottom: itemBottom
|
|
108
|
+
top: itemTop
|
|
102
109
|
} = item.getBoundingClientRect();
|
|
103
110
|
const itemPadding = 10;
|
|
104
|
-
if (itemTop + itemPadding < bottom &&
|
|
111
|
+
if (itemTop + itemPadding < bottom && itemTop + itemPadding > top) indexList.push(item.dataset.index);
|
|
105
112
|
});
|
|
106
113
|
if (onScrollEnds) onScrollEnds(indexList);
|
|
107
114
|
return indexList;
|
|
108
|
-
}, [onScrollEnds]);
|
|
115
|
+
}, 500), [onScrollEnds]);
|
|
116
|
+
const onScrollStop = React__default["default"].useCallback(debouncedScroll, [debouncedScroll]);
|
|
109
117
|
const onlyFocus = React__default["default"].useCallback(index => {
|
|
110
118
|
setTimeout(() => {
|
|
111
119
|
virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
|
|
@@ -117,7 +125,8 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
117
125
|
};
|
|
118
126
|
vScroll(index, b);
|
|
119
127
|
onlyFocus(index);
|
|
120
|
-
|
|
128
|
+
onScrollStop();
|
|
129
|
+
}, [onScrollStop, onlyFocus, vScroll]);
|
|
121
130
|
React__default["default"].useEffect(() => {
|
|
122
131
|
if (actionRef && actionRef.current) {
|
|
123
132
|
actionRef.current.scrollToIndex = function (a) {
|
|
@@ -125,6 +134,7 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
125
134
|
align: 'center'
|
|
126
135
|
};
|
|
127
136
|
vScroll(a, b);
|
|
137
|
+
onScrollStop();
|
|
128
138
|
};
|
|
129
139
|
|
|
130
140
|
actionRef.current.getMessagesInView = onScrollStop;
|
|
@@ -138,7 +148,7 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
138
148
|
|
|
139
149
|
actionRef.current.focusToIndexWithoutScroll = onlyFocus;
|
|
140
150
|
|
|
141
|
-
actionRef.current.focusToList =
|
|
151
|
+
actionRef.current.focusToList = () => {
|
|
142
152
|
var _virtualListRef$curre2;
|
|
143
153
|
|
|
144
154
|
(_virtualListRef$curre2 = virtualListRef.current) === null || _virtualListRef$curre2 === void 0 ? void 0 : _virtualListRef$curre2.focus();
|
|
@@ -155,7 +165,17 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
155
165
|
switch (key) {
|
|
156
166
|
case 'ArrowUp':
|
|
157
167
|
e.preventDefault();
|
|
158
|
-
|
|
168
|
+
|
|
169
|
+
if (index > 0) {
|
|
170
|
+
var _virtualListRef$curre3;
|
|
171
|
+
|
|
172
|
+
((_virtualListRef$curre3 = virtualListRef.current) === null || _virtualListRef$curre3 === void 0 ? void 0 : _virtualListRef$curre3.querySelector("[data-index=\"".concat(index - 1, "\"]"))).focus();
|
|
173
|
+
} else if (hasMoreItems === 'top') {
|
|
174
|
+
var _loadMoreRef$current;
|
|
175
|
+
|
|
176
|
+
(_loadMoreRef$current = loadMoreRef.current) === null || _loadMoreRef$current === void 0 ? void 0 : _loadMoreRef$current.focus();
|
|
177
|
+
}
|
|
178
|
+
|
|
159
179
|
break;
|
|
160
180
|
|
|
161
181
|
case 'ArrowDown':
|
|
@@ -178,31 +198,31 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
178
198
|
break;
|
|
179
199
|
|
|
180
200
|
case 'Tab':
|
|
181
|
-
e.preventDefault();
|
|
182
|
-
|
|
183
201
|
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
184
|
-
var _loadMoreRef$current;
|
|
185
|
-
|
|
186
|
-
(_loadMoreRef$current = loadMoreRef.current) === null || _loadMoreRef$current === void 0 ? void 0 : _loadMoreRef$current.focus();
|
|
187
|
-
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
188
202
|
var _loadMoreRef$current2;
|
|
189
203
|
|
|
204
|
+
e.preventDefault();
|
|
190
205
|
(_loadMoreRef$current2 = loadMoreRef.current) === null || _loadMoreRef$current2 === void 0 ? void 0 : _loadMoreRef$current2.focus();
|
|
206
|
+
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
207
|
+
var _loadMoreRef$current3;
|
|
208
|
+
|
|
209
|
+
e.preventDefault();
|
|
210
|
+
(_loadMoreRef$current3 = loadMoreRef.current) === null || _loadMoreRef$current3 === void 0 ? void 0 : _loadMoreRef$current3.focus();
|
|
191
211
|
} else if (!e.shiftKey) {
|
|
192
212
|
if (bannerPosition) {
|
|
213
|
+
e.preventDefault();
|
|
193
214
|
bannerRef.current.focusOnWrapper();
|
|
194
|
-
} else {
|
|
195
|
-
actionRef.current.focusToComposer();
|
|
196
215
|
}
|
|
197
216
|
} else {
|
|
198
|
-
var _virtualListRef$
|
|
217
|
+
var _virtualListRef$curre4;
|
|
199
218
|
|
|
200
|
-
|
|
219
|
+
e.preventDefault();
|
|
220
|
+
(_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.focus();
|
|
201
221
|
}
|
|
202
222
|
|
|
203
223
|
break;
|
|
204
224
|
}
|
|
205
|
-
}, [actionRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
225
|
+
}, [actionRef, bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
206
226
|
const handleListKey = React__default["default"].useCallback(e => {
|
|
207
227
|
const {
|
|
208
228
|
key
|
|
@@ -211,12 +231,24 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
211
231
|
switch (key) {
|
|
212
232
|
case 'ArrowUp':
|
|
213
233
|
e.preventDefault();
|
|
214
|
-
|
|
234
|
+
|
|
235
|
+
if (document.activeElement === loadMoreRef.current) {
|
|
236
|
+
scrollAndFocus(messages.length - 1);
|
|
237
|
+
} else {
|
|
238
|
+
onlyFocus(onScrollStop().shift());
|
|
239
|
+
}
|
|
240
|
+
|
|
215
241
|
break;
|
|
216
242
|
|
|
217
243
|
case 'ArrowDown':
|
|
218
244
|
e.preventDefault();
|
|
219
|
-
|
|
245
|
+
|
|
246
|
+
if (document.activeElement === loadMoreRef.current) {
|
|
247
|
+
virtualListRef.current.querySelector("[data-index=\"0\"]").focus();
|
|
248
|
+
} else {
|
|
249
|
+
onlyFocus(onScrollStop().pop());
|
|
250
|
+
}
|
|
251
|
+
|
|
220
252
|
break;
|
|
221
253
|
|
|
222
254
|
case 'Home':
|
|
@@ -232,15 +264,15 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
232
264
|
case 'Tab':
|
|
233
265
|
if (document.activeElement !== loadMoreRef.current) {
|
|
234
266
|
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
235
|
-
var _loadMoreRef$
|
|
267
|
+
var _loadMoreRef$current4;
|
|
236
268
|
|
|
237
269
|
e.preventDefault();
|
|
238
|
-
(_loadMoreRef$
|
|
270
|
+
(_loadMoreRef$current4 = loadMoreRef.current) === null || _loadMoreRef$current4 === void 0 ? void 0 : _loadMoreRef$current4.focus();
|
|
239
271
|
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
240
|
-
var _loadMoreRef$
|
|
272
|
+
var _loadMoreRef$current5;
|
|
241
273
|
|
|
242
274
|
e.preventDefault();
|
|
243
|
-
(_loadMoreRef$
|
|
275
|
+
(_loadMoreRef$current5 = loadMoreRef.current) === null || _loadMoreRef$current5 === void 0 ? void 0 : _loadMoreRef$current5.focus();
|
|
244
276
|
} else if (!e.shiftKey) {
|
|
245
277
|
e.preventDefault();
|
|
246
278
|
actionRef.current.focusToComposer();
|
|
@@ -249,15 +281,18 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
249
281
|
e.preventDefault();
|
|
250
282
|
actionRef.current.focusToComposer();
|
|
251
283
|
} else {
|
|
252
|
-
var _virtualListRef$
|
|
284
|
+
var _virtualListRef$curre5;
|
|
253
285
|
|
|
254
286
|
e.preventDefault();
|
|
255
|
-
(_virtualListRef$
|
|
287
|
+
(_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
|
|
256
288
|
}
|
|
257
289
|
|
|
258
290
|
break;
|
|
259
291
|
}
|
|
260
292
|
}, [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus]);
|
|
293
|
+
const checkPendingOnScroll = React__default["default"].useCallback(() => {
|
|
294
|
+
if (pendingOnScroll.current === true) onScrollStop();
|
|
295
|
+
}, [onScrollStop]);
|
|
261
296
|
React__default["default"].useEffect(() => {
|
|
262
297
|
let handlerCallback = null;
|
|
263
298
|
const localVirtualRef = virtualListRef.current;
|
|
@@ -271,11 +306,13 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
271
306
|
virtualListRef.current.addEventListener('scroll', onScroll);
|
|
272
307
|
}
|
|
273
308
|
|
|
309
|
+
document.addEventListener('visibilitychange', checkPendingOnScroll);
|
|
274
310
|
return () => {
|
|
275
311
|
if (handlerCallback) clearTimeout(handlerCallback);
|
|
276
312
|
if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);
|
|
313
|
+
document.removeEventListener('visibilitychange', checkPendingOnScroll);
|
|
277
314
|
};
|
|
278
|
-
}, [onScrollStop, onScrollEnds]);
|
|
315
|
+
}, [onScrollStop, onScrollEnds, checkPendingOnScroll]);
|
|
279
316
|
const render = React__default["default"].useMemo(() => virtualItems.map(virtualItem => {
|
|
280
317
|
const {
|
|
281
318
|
index,
|
|
@@ -296,14 +333,14 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
296
333
|
"data-index": index,
|
|
297
334
|
style: style,
|
|
298
335
|
ref: measureRef,
|
|
299
|
-
tabIndex:
|
|
336
|
+
tabIndex: -1,
|
|
300
337
|
onKeyDown: handleKey,
|
|
301
338
|
role: "listitem",
|
|
302
339
|
children: /*#__PURE__*/_jsx__default["default"](styled.StyledWrapperListItem, {
|
|
303
340
|
type: row.type
|
|
304
341
|
}, void 0, row.type === props$1.BUBBLE_TYPES.SENDER || row.type === props$1.BUBBLE_TYPES.RECIPIENT ?
|
|
305
342
|
/*#__PURE__*/
|
|
306
|
-
// eslint-disable-next-line
|
|
343
|
+
// eslint-disable-next-line eslint-comments/no-unlimited-disable
|
|
307
344
|
jsxRuntime.jsx(ChatBubble.ChatBubble, _objectSpread(_objectSpread({}, row), {}, {
|
|
308
345
|
helpMessage: isSending ? sendingText : row.helpMessage
|
|
309
346
|
})) : 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)
|
|
@@ -319,7 +356,7 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
319
356
|
onKeyDown: handleListKey,
|
|
320
357
|
children: /*#__PURE__*/_jsx__default["default"](styled.StyledChatContainerContentListScroll, {
|
|
321
358
|
height: "".concat(totalSize, "px")
|
|
322
|
-
}, void 0,
|
|
359
|
+
}, void 0, !isLoading && hasMoreItems ? /*#__PURE__*/_jsx__default["default"](styled.StyledLoadMoreContainer, {
|
|
323
360
|
hasMoreItems: hasMoreItems
|
|
324
361
|
}, void 0, /*#__PURE__*/_jsx__default["default"](DSButton__default["default"], {
|
|
325
362
|
labelText: "Load More",
|
|
@@ -327,7 +364,7 @@ const ChatContainerMessagesList = props$2 => {
|
|
|
327
364
|
onClick: getMoreMessages,
|
|
328
365
|
"data-testid": "ds-chat-load-more-btn",
|
|
329
366
|
innerRef: loadMoreRef
|
|
330
|
-
})) : null)
|
|
367
|
+
})) : null, render)
|
|
331
368
|
}));
|
|
332
369
|
};
|
|
333
370
|
|
|
@@ -28,9 +28,9 @@ var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_definePropert
|
|
|
28
28
|
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
29
29
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
30
30
|
|
|
31
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
31
|
+
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; }
|
|
32
32
|
|
|
33
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
33
|
+
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__default["default"](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; }
|
|
34
34
|
|
|
35
35
|
const FooterChat = _ref => {
|
|
36
36
|
let {
|
|
@@ -24,9 +24,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
24
24
|
|
|
25
25
|
const _excluded = ["label", "dsId", "onClick", "Icon"];
|
|
26
26
|
|
|
27
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
27
|
+
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; }
|
|
28
28
|
|
|
29
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
29
|
+
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__default["default"](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; }
|
|
30
30
|
const SidebarButton = _ref => {
|
|
31
31
|
let {
|
|
32
32
|
label,
|
|
@@ -18,9 +18,9 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
|
18
18
|
|
|
19
19
|
var _PaperAirplane, _Grid;
|
|
20
20
|
|
|
21
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
21
|
+
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; }
|
|
22
22
|
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
23
|
+
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; }
|
|
24
24
|
|
|
25
25
|
const ChatComposer = props => {
|
|
26
26
|
var _input$current;
|
|
@@ -136,7 +136,7 @@ const ChatComposer = props => {
|
|
|
136
136
|
}, void 0, inputMaxLength && hasError ? /*#__PURE__*/jsxs(Fragment, {
|
|
137
137
|
children: [/*#__PURE__*/_jsx(StyledCounterErrorA11y, {
|
|
138
138
|
role: "alert"
|
|
139
|
-
}, void 0, maxLengthMessage || "You have exceeded the
|
|
139
|
+
}, void 0, maxLengthMessage || "You have entered ".concat(inputLength, " characters and have exceeded the limit by ").concat(inputLength - inputMaxLength, ". Please limit to less than ").concat(inputMaxLength, " characters. ")), maxLengthMessage || "Please limit to less than ".concat(inputMaxLength, " characters. ")]
|
|
140
140
|
}) : '', inputMaxLength ? " ".concat(inputLength, " / ").concat(inputMaxLength) : ''), _Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {}))));
|
|
141
141
|
};
|
|
142
142
|
|
|
@@ -17,11 +17,11 @@ import { StyledIndicatorContainer, StyledChatContainerContent, MobileStyledChatC
|
|
|
17
17
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
18
18
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
|
-
var _DSIndeterminateProgr
|
|
20
|
+
var _DSIndeterminateProgr;
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
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
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
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
25
|
|
|
26
26
|
const ChatContainer = props => {
|
|
27
27
|
var _containerRef$current;
|
|
@@ -74,17 +74,21 @@ const ChatContainer = props => {
|
|
|
74
74
|
const ref = actionRef || listRef;
|
|
75
75
|
|
|
76
76
|
if (e.shiftKey && e.key === 'Tab') {
|
|
77
|
-
|
|
77
|
+
if (messagesListProps.messages.length > 0) {
|
|
78
|
+
e.preventDefault();
|
|
78
79
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
if (['top', 'bottom'].includes(bannerPosition)) {
|
|
81
|
+
bannerRef.current.focusOnWrapper();
|
|
82
|
+
} else {
|
|
83
|
+
var _ref$current;
|
|
84
|
+
|
|
85
|
+
const last = ref.current.getMessagesInView().pop();
|
|
86
|
+
(_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.focusToIndexWithoutScroll(last);
|
|
87
|
+
}
|
|
84
88
|
}
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
|
-
}, [actionRef, onComposerKeyDown, bannerPosition]); // Map actions
|
|
91
|
+
}, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages.length]); // Map actions
|
|
88
92
|
|
|
89
93
|
React.useEffect(() => {
|
|
90
94
|
if (actionRef && actionRef.current) {
|
|
@@ -134,15 +138,15 @@ const ChatContainer = props => {
|
|
|
134
138
|
isOpen: true,
|
|
135
139
|
type: bannerProps.type || BANNER_TYPES.INFO,
|
|
136
140
|
actionRef: bannerRef
|
|
137
|
-
})), sendingMessages && sendingMessages.length > 0 ?
|
|
141
|
+
})), sendingMessages && sendingMessages.length > 0 ? /*#__PURE__*/_jsx(StyledIndicatorContainer, {
|
|
138
142
|
isLoading: "bottom",
|
|
139
143
|
linear: true,
|
|
140
144
|
"data-testid": "ds-chat-loading-indicator"
|
|
141
145
|
}, void 0, /*#__PURE__*/_jsx(DSIndeterminateProgressIndicator, {
|
|
142
146
|
processing: true,
|
|
143
|
-
title:
|
|
147
|
+
title: sendingText,
|
|
144
148
|
lineOnly: true
|
|
145
|
-
}))
|
|
149
|
+
})) : null), /*#__PURE__*/jsx(ChatComposer, _objectSpread(_objectSpread({}, composerProps), {}, {
|
|
146
150
|
onKeyDown: handleTabs,
|
|
147
151
|
onResize: onResize,
|
|
148
152
|
maxHeight: (((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.clientHeight) || 0) / 2,
|
|
@@ -15,6 +15,7 @@ import React from 'react';
|
|
|
15
15
|
import { describe } from 'react-desc';
|
|
16
16
|
import { useVirtual } from 'react-virtual';
|
|
17
17
|
import DSButton from '@elliemae/ds-button';
|
|
18
|
+
import { debounce } from 'lodash';
|
|
18
19
|
import { ChatBubble } from '../bubble/ChatBubble.js';
|
|
19
20
|
import { BUBBLE_TYPES } from '../bubble/props.js';
|
|
20
21
|
import { MessageDelimiter } from '../message-delimiter/MessageDelimiter.js';
|
|
@@ -24,9 +25,9 @@ import { listProps, defaultProps } from './props.js';
|
|
|
24
25
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
25
26
|
import { jsx } from 'react/jsx-runtime';
|
|
26
27
|
|
|
27
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
28
|
+
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; }
|
|
28
29
|
|
|
29
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
30
|
+
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; }
|
|
30
31
|
|
|
31
32
|
const getPadding = _ref => {
|
|
32
33
|
let {
|
|
@@ -56,6 +57,7 @@ const ChatContainerMessagesList = props => {
|
|
|
56
57
|
isLoading,
|
|
57
58
|
bannerRef
|
|
58
59
|
} = props;
|
|
60
|
+
const pendingOnScroll = React.useRef(false);
|
|
59
61
|
const loadMoreRef = React.useRef(null);
|
|
60
62
|
const virtualListRef = React.useRef(); // estimateSize should not be really required given what was stated on
|
|
61
63
|
// https://github.com/tannerlinsley/react-virtual/issues/23
|
|
@@ -75,9 +77,15 @@ const ChatContainerMessagesList = props => {
|
|
|
75
77
|
})), {}, {
|
|
76
78
|
estimateSize: React.useCallback(() => 80, [])
|
|
77
79
|
}));
|
|
78
|
-
const
|
|
80
|
+
const debouncedScroll = React.useMemo(() => debounce(() => {
|
|
79
81
|
var _virtualListRef$curre;
|
|
80
82
|
|
|
83
|
+
if (document.visibilityState === 'hidden') {
|
|
84
|
+
pendingOnScroll.current = true;
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
pendingOnScroll.current = false;
|
|
81
89
|
const {
|
|
82
90
|
bottom,
|
|
83
91
|
top
|
|
@@ -86,15 +94,15 @@ const ChatContainerMessagesList = props => {
|
|
|
86
94
|
const indexList = [];
|
|
87
95
|
list.forEach(item => {
|
|
88
96
|
const {
|
|
89
|
-
top: itemTop
|
|
90
|
-
bottom: itemBottom
|
|
97
|
+
top: itemTop
|
|
91
98
|
} = item.getBoundingClientRect();
|
|
92
99
|
const itemPadding = 10;
|
|
93
|
-
if (itemTop + itemPadding < bottom &&
|
|
100
|
+
if (itemTop + itemPadding < bottom && itemTop + itemPadding > top) indexList.push(item.dataset.index);
|
|
94
101
|
});
|
|
95
102
|
if (onScrollEnds) onScrollEnds(indexList);
|
|
96
103
|
return indexList;
|
|
97
|
-
}, [onScrollEnds]);
|
|
104
|
+
}, 500), [onScrollEnds]);
|
|
105
|
+
const onScrollStop = React.useCallback(debouncedScroll, [debouncedScroll]);
|
|
98
106
|
const onlyFocus = React.useCallback(index => {
|
|
99
107
|
setTimeout(() => {
|
|
100
108
|
virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
|
|
@@ -106,7 +114,8 @@ const ChatContainerMessagesList = props => {
|
|
|
106
114
|
};
|
|
107
115
|
vScroll(index, b);
|
|
108
116
|
onlyFocus(index);
|
|
109
|
-
|
|
117
|
+
onScrollStop();
|
|
118
|
+
}, [onScrollStop, onlyFocus, vScroll]);
|
|
110
119
|
React.useEffect(() => {
|
|
111
120
|
if (actionRef && actionRef.current) {
|
|
112
121
|
actionRef.current.scrollToIndex = function (a) {
|
|
@@ -114,6 +123,7 @@ const ChatContainerMessagesList = props => {
|
|
|
114
123
|
align: 'center'
|
|
115
124
|
};
|
|
116
125
|
vScroll(a, b);
|
|
126
|
+
onScrollStop();
|
|
117
127
|
};
|
|
118
128
|
|
|
119
129
|
actionRef.current.getMessagesInView = onScrollStop;
|
|
@@ -127,7 +137,7 @@ const ChatContainerMessagesList = props => {
|
|
|
127
137
|
|
|
128
138
|
actionRef.current.focusToIndexWithoutScroll = onlyFocus;
|
|
129
139
|
|
|
130
|
-
actionRef.current.focusToList =
|
|
140
|
+
actionRef.current.focusToList = () => {
|
|
131
141
|
var _virtualListRef$curre2;
|
|
132
142
|
|
|
133
143
|
(_virtualListRef$curre2 = virtualListRef.current) === null || _virtualListRef$curre2 === void 0 ? void 0 : _virtualListRef$curre2.focus();
|
|
@@ -144,7 +154,17 @@ const ChatContainerMessagesList = props => {
|
|
|
144
154
|
switch (key) {
|
|
145
155
|
case 'ArrowUp':
|
|
146
156
|
e.preventDefault();
|
|
147
|
-
|
|
157
|
+
|
|
158
|
+
if (index > 0) {
|
|
159
|
+
var _virtualListRef$curre3;
|
|
160
|
+
|
|
161
|
+
((_virtualListRef$curre3 = virtualListRef.current) === null || _virtualListRef$curre3 === void 0 ? void 0 : _virtualListRef$curre3.querySelector("[data-index=\"".concat(index - 1, "\"]"))).focus();
|
|
162
|
+
} else if (hasMoreItems === 'top') {
|
|
163
|
+
var _loadMoreRef$current;
|
|
164
|
+
|
|
165
|
+
(_loadMoreRef$current = loadMoreRef.current) === null || _loadMoreRef$current === void 0 ? void 0 : _loadMoreRef$current.focus();
|
|
166
|
+
}
|
|
167
|
+
|
|
148
168
|
break;
|
|
149
169
|
|
|
150
170
|
case 'ArrowDown':
|
|
@@ -167,31 +187,31 @@ const ChatContainerMessagesList = props => {
|
|
|
167
187
|
break;
|
|
168
188
|
|
|
169
189
|
case 'Tab':
|
|
170
|
-
e.preventDefault();
|
|
171
|
-
|
|
172
190
|
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
191
|
var _loadMoreRef$current2;
|
|
178
192
|
|
|
193
|
+
e.preventDefault();
|
|
179
194
|
(_loadMoreRef$current2 = loadMoreRef.current) === null || _loadMoreRef$current2 === void 0 ? void 0 : _loadMoreRef$current2.focus();
|
|
195
|
+
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
196
|
+
var _loadMoreRef$current3;
|
|
197
|
+
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
(_loadMoreRef$current3 = loadMoreRef.current) === null || _loadMoreRef$current3 === void 0 ? void 0 : _loadMoreRef$current3.focus();
|
|
180
200
|
} else if (!e.shiftKey) {
|
|
181
201
|
if (bannerPosition) {
|
|
202
|
+
e.preventDefault();
|
|
182
203
|
bannerRef.current.focusOnWrapper();
|
|
183
|
-
} else {
|
|
184
|
-
actionRef.current.focusToComposer();
|
|
185
204
|
}
|
|
186
205
|
} else {
|
|
187
|
-
var _virtualListRef$
|
|
206
|
+
var _virtualListRef$curre4;
|
|
188
207
|
|
|
189
|
-
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
(_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.focus();
|
|
190
210
|
}
|
|
191
211
|
|
|
192
212
|
break;
|
|
193
213
|
}
|
|
194
|
-
}, [actionRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
214
|
+
}, [actionRef, bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
195
215
|
const handleListKey = React.useCallback(e => {
|
|
196
216
|
const {
|
|
197
217
|
key
|
|
@@ -200,12 +220,24 @@ const ChatContainerMessagesList = props => {
|
|
|
200
220
|
switch (key) {
|
|
201
221
|
case 'ArrowUp':
|
|
202
222
|
e.preventDefault();
|
|
203
|
-
|
|
223
|
+
|
|
224
|
+
if (document.activeElement === loadMoreRef.current) {
|
|
225
|
+
scrollAndFocus(messages.length - 1);
|
|
226
|
+
} else {
|
|
227
|
+
onlyFocus(onScrollStop().shift());
|
|
228
|
+
}
|
|
229
|
+
|
|
204
230
|
break;
|
|
205
231
|
|
|
206
232
|
case 'ArrowDown':
|
|
207
233
|
e.preventDefault();
|
|
208
|
-
|
|
234
|
+
|
|
235
|
+
if (document.activeElement === loadMoreRef.current) {
|
|
236
|
+
virtualListRef.current.querySelector("[data-index=\"0\"]").focus();
|
|
237
|
+
} else {
|
|
238
|
+
onlyFocus(onScrollStop().pop());
|
|
239
|
+
}
|
|
240
|
+
|
|
209
241
|
break;
|
|
210
242
|
|
|
211
243
|
case 'Home':
|
|
@@ -221,15 +253,15 @@ const ChatContainerMessagesList = props => {
|
|
|
221
253
|
case 'Tab':
|
|
222
254
|
if (document.activeElement !== loadMoreRef.current) {
|
|
223
255
|
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
224
|
-
var _loadMoreRef$
|
|
256
|
+
var _loadMoreRef$current4;
|
|
225
257
|
|
|
226
258
|
e.preventDefault();
|
|
227
|
-
(_loadMoreRef$
|
|
259
|
+
(_loadMoreRef$current4 = loadMoreRef.current) === null || _loadMoreRef$current4 === void 0 ? void 0 : _loadMoreRef$current4.focus();
|
|
228
260
|
} else if (hasMoreItems === 'top' && e.shiftKey) {
|
|
229
|
-
var _loadMoreRef$
|
|
261
|
+
var _loadMoreRef$current5;
|
|
230
262
|
|
|
231
263
|
e.preventDefault();
|
|
232
|
-
(_loadMoreRef$
|
|
264
|
+
(_loadMoreRef$current5 = loadMoreRef.current) === null || _loadMoreRef$current5 === void 0 ? void 0 : _loadMoreRef$current5.focus();
|
|
233
265
|
} else if (!e.shiftKey) {
|
|
234
266
|
e.preventDefault();
|
|
235
267
|
actionRef.current.focusToComposer();
|
|
@@ -238,15 +270,18 @@ const ChatContainerMessagesList = props => {
|
|
|
238
270
|
e.preventDefault();
|
|
239
271
|
actionRef.current.focusToComposer();
|
|
240
272
|
} else {
|
|
241
|
-
var _virtualListRef$
|
|
273
|
+
var _virtualListRef$curre5;
|
|
242
274
|
|
|
243
275
|
e.preventDefault();
|
|
244
|
-
(_virtualListRef$
|
|
276
|
+
(_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
|
|
245
277
|
}
|
|
246
278
|
|
|
247
279
|
break;
|
|
248
280
|
}
|
|
249
281
|
}, [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus]);
|
|
282
|
+
const checkPendingOnScroll = React.useCallback(() => {
|
|
283
|
+
if (pendingOnScroll.current === true) onScrollStop();
|
|
284
|
+
}, [onScrollStop]);
|
|
250
285
|
React.useEffect(() => {
|
|
251
286
|
let handlerCallback = null;
|
|
252
287
|
const localVirtualRef = virtualListRef.current;
|
|
@@ -260,11 +295,13 @@ const ChatContainerMessagesList = props => {
|
|
|
260
295
|
virtualListRef.current.addEventListener('scroll', onScroll);
|
|
261
296
|
}
|
|
262
297
|
|
|
298
|
+
document.addEventListener('visibilitychange', checkPendingOnScroll);
|
|
263
299
|
return () => {
|
|
264
300
|
if (handlerCallback) clearTimeout(handlerCallback);
|
|
265
301
|
if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);
|
|
302
|
+
document.removeEventListener('visibilitychange', checkPendingOnScroll);
|
|
266
303
|
};
|
|
267
|
-
}, [onScrollStop, onScrollEnds]);
|
|
304
|
+
}, [onScrollStop, onScrollEnds, checkPendingOnScroll]);
|
|
268
305
|
const render = React.useMemo(() => virtualItems.map(virtualItem => {
|
|
269
306
|
const {
|
|
270
307
|
index,
|
|
@@ -285,14 +322,14 @@ const ChatContainerMessagesList = props => {
|
|
|
285
322
|
"data-index": index,
|
|
286
323
|
style: style,
|
|
287
324
|
ref: measureRef,
|
|
288
|
-
tabIndex:
|
|
325
|
+
tabIndex: -1,
|
|
289
326
|
onKeyDown: handleKey,
|
|
290
327
|
role: "listitem",
|
|
291
328
|
children: /*#__PURE__*/_jsx(StyledWrapperListItem, {
|
|
292
329
|
type: row.type
|
|
293
330
|
}, void 0, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ?
|
|
294
331
|
/*#__PURE__*/
|
|
295
|
-
// eslint-disable-next-line
|
|
332
|
+
// eslint-disable-next-line eslint-comments/no-unlimited-disable
|
|
296
333
|
jsx(ChatBubble, _objectSpread(_objectSpread({}, row), {}, {
|
|
297
334
|
helpMessage: isSending ? sendingText : row.helpMessage
|
|
298
335
|
})) : null, row.type === BUBBLE_TYPES.DELIMITER ? /*#__PURE__*/jsx(MessageDelimiter, _objectSpread({}, row)) : null, row.type === BUBBLE_TYPES.SYSTEM ? /*#__PURE__*/jsx(SystemMessage, _objectSpread({}, row)) : null)
|
|
@@ -308,7 +345,7 @@ const ChatContainerMessagesList = props => {
|
|
|
308
345
|
onKeyDown: handleListKey,
|
|
309
346
|
children: /*#__PURE__*/_jsx(StyledChatContainerContentListScroll, {
|
|
310
347
|
height: "".concat(totalSize, "px")
|
|
311
|
-
}, void 0,
|
|
348
|
+
}, void 0, !isLoading && hasMoreItems ? /*#__PURE__*/_jsx(StyledLoadMoreContainer, {
|
|
312
349
|
hasMoreItems: hasMoreItems
|
|
313
350
|
}, void 0, /*#__PURE__*/_jsx(DSButton, {
|
|
314
351
|
labelText: "Load More",
|
|
@@ -316,7 +353,7 @@ const ChatContainerMessagesList = props => {
|
|
|
316
353
|
onClick: getMoreMessages,
|
|
317
354
|
"data-testid": "ds-chat-load-more-btn",
|
|
318
355
|
innerRef: loadMoreRef
|
|
319
|
-
})) : null)
|
|
356
|
+
})) : null, render)
|
|
320
357
|
}));
|
|
321
358
|
};
|
|
322
359
|
|
|
@@ -18,9 +18,9 @@ import { chatSidebarProps, defaultProps } from './props.js';
|
|
|
18
18
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
19
19
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
20
20
|
|
|
21
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
21
|
+
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; }
|
|
22
22
|
|
|
23
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
23
|
+
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; }
|
|
24
24
|
|
|
25
25
|
const FooterChat = _ref => {
|
|
26
26
|
let {
|
|
@@ -13,9 +13,9 @@ import { jsxs } from 'react/jsx-runtime';
|
|
|
13
13
|
|
|
14
14
|
const _excluded = ["label", "dsId", "onClick", "Icon"];
|
|
15
15
|
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
16
|
+
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; }
|
|
17
17
|
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
18
|
+
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; }
|
|
19
19
|
const SidebarButton = _ref => {
|
|
20
20
|
let {
|
|
21
21
|
label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -305,22 +305,22 @@
|
|
|
305
305
|
"generateSubmodules": true
|
|
306
306
|
},
|
|
307
307
|
"dependencies": {
|
|
308
|
-
"@elliemae/ds-banner": "2.0.
|
|
309
|
-
"@elliemae/ds-button": "2.0.
|
|
310
|
-
"@elliemae/ds-grid": "2.0.
|
|
311
|
-
"@elliemae/ds-icons": "2.0.
|
|
312
|
-
"@elliemae/ds-indeterminate-progress-indicator": "2.0.
|
|
313
|
-
"@elliemae/ds-props-helpers": "2.0.
|
|
314
|
-
"@elliemae/ds-system": "2.0.
|
|
315
|
-
"@elliemae/ds-tooltip": "2.0.
|
|
316
|
-
"@elliemae/ds-truncated-tooltip-text": "2.0.
|
|
308
|
+
"@elliemae/ds-banner": "2.1.0-rc.1",
|
|
309
|
+
"@elliemae/ds-button": "2.1.0-rc.1",
|
|
310
|
+
"@elliemae/ds-grid": "2.1.0-rc.1",
|
|
311
|
+
"@elliemae/ds-icons": "2.1.0-rc.1",
|
|
312
|
+
"@elliemae/ds-indeterminate-progress-indicator": "2.1.0-rc.1",
|
|
313
|
+
"@elliemae/ds-props-helpers": "2.1.0-rc.1",
|
|
314
|
+
"@elliemae/ds-system": "2.1.0-rc.1",
|
|
315
|
+
"@elliemae/ds-tooltip": "2.1.0-rc.1",
|
|
316
|
+
"@elliemae/ds-truncated-tooltip-text": "2.1.0-rc.1",
|
|
317
317
|
"prop-types": "~15.7.2",
|
|
318
318
|
"react-desc": "~4.1.2",
|
|
319
319
|
"react-virtual": "~2.3.2"
|
|
320
320
|
},
|
|
321
321
|
"devDependencies": {
|
|
322
322
|
"@testing-library/dom": "~8.11.1",
|
|
323
|
-
"@testing-library/jest-dom": "~5.15.
|
|
323
|
+
"@testing-library/jest-dom": "~5.15.0",
|
|
324
324
|
"@testing-library/react": "~12.1.2",
|
|
325
325
|
"@testing-library/user-event": "~13.5.0",
|
|
326
326
|
"styled-components": "~5.3.3"
|
|
@@ -6,22 +6,22 @@ declare const ChatCard: {
|
|
|
6
6
|
propTypes: {
|
|
7
7
|
title: any;
|
|
8
8
|
content: {
|
|
9
|
-
defaultValue
|
|
9
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
10
10
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
11
|
};
|
|
12
|
-
isRequired: import("react-desc").
|
|
12
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
13
13
|
};
|
|
14
14
|
time: {
|
|
15
|
-
defaultValue
|
|
15
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
16
16
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
17
|
};
|
|
18
|
-
isRequired: import("react-desc").
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
19
19
|
};
|
|
20
20
|
rightAddon: {
|
|
21
|
-
defaultValue
|
|
21
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
22
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
23
|
};
|
|
24
|
-
isRequired: import("react-desc").
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
};
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
export declare const propTypes: {
|
|
4
4
|
title: any;
|
|
5
5
|
content: {
|
|
6
|
-
defaultValue
|
|
6
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
7
7
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
8
8
|
};
|
|
9
|
-
isRequired: import("react-desc").
|
|
9
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
10
10
|
};
|
|
11
11
|
time: {
|
|
12
|
-
defaultValue
|
|
12
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
13
13
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
14
14
|
};
|
|
15
|
-
isRequired: import("react-desc").
|
|
15
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
16
16
|
};
|
|
17
17
|
rightAddon: {
|
|
18
|
-
defaultValue
|
|
18
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
19
19
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
20
20
|
};
|
|
21
|
-
isRequired: import("react-desc").
|
|
21
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
export interface CardPropTypes {
|
|
@@ -1,157 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="react" />
|
|
3
|
-
export declare const StyledChatContainerContentComposer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
1
|
+
export declare const StyledChatContainerContentComposer: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
|
|
4
2
|
export declare const StyledComposerInput: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, any, never>;
|
|
5
|
-
export declare const StyledComposerButton: import("styled-components").StyledComponent<
|
|
6
|
-
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
innerRef: any;
|
|
9
|
-
disabled: any;
|
|
10
|
-
buttonType: any;
|
|
11
|
-
fluidWidth: any;
|
|
12
|
-
size: any;
|
|
13
|
-
labelText: any;
|
|
14
|
-
icon: any;
|
|
15
|
-
onBlur: any;
|
|
16
|
-
onClick: any;
|
|
17
|
-
onKeyPress: any;
|
|
18
|
-
leftIcon: any;
|
|
19
|
-
tabIndex: any;
|
|
20
|
-
variant: any;
|
|
21
|
-
intent: any;
|
|
22
|
-
containerProps: any;
|
|
23
|
-
className: any;
|
|
24
|
-
as: any;
|
|
25
|
-
type: any;
|
|
26
|
-
}): JSX.Element;
|
|
27
|
-
defaultProps: {
|
|
28
|
-
disabled: boolean;
|
|
29
|
-
fluidWidth: boolean;
|
|
30
|
-
labelText: string;
|
|
31
|
-
icon: null;
|
|
32
|
-
onBlur: () => null;
|
|
33
|
-
onClick: () => null;
|
|
34
|
-
onKeyPress: () => null;
|
|
35
|
-
leftIcon: null;
|
|
36
|
-
tabIndex: number;
|
|
37
|
-
variant: string;
|
|
38
|
-
containerProps: {};
|
|
39
|
-
as: string;
|
|
40
|
-
type: string;
|
|
41
|
-
};
|
|
42
|
-
propTypes: {
|
|
43
|
-
tabIndex: {
|
|
44
|
-
defaultValue<T = unknown>(arg: T): {
|
|
45
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
46
|
-
};
|
|
47
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
48
|
-
};
|
|
49
|
-
className: {
|
|
50
|
-
defaultValue<T_1 = unknown>(arg: T_1): {
|
|
51
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
52
|
-
};
|
|
53
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
54
|
-
};
|
|
55
|
-
'aria-disabled': {
|
|
56
|
-
defaultValue<T_2 = unknown>(arg: T_2): {
|
|
57
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
58
|
-
};
|
|
59
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
60
|
-
};
|
|
61
|
-
as: {
|
|
62
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
63
|
-
};
|
|
64
|
-
disabled: {
|
|
65
|
-
defaultValue<T_3 = unknown>(arg: T_3): {
|
|
66
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
67
|
-
};
|
|
68
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
69
|
-
};
|
|
70
|
-
fluidWidth: {
|
|
71
|
-
defaultValue<T_4 = unknown>(arg: T_4): {
|
|
72
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
73
|
-
};
|
|
74
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
75
|
-
};
|
|
76
|
-
labelText: {
|
|
77
|
-
defaultValue<T_5 = unknown>(arg: T_5): {
|
|
78
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
79
|
-
};
|
|
80
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
81
|
-
};
|
|
82
|
-
icon: {
|
|
83
|
-
defaultValue<T_6 = unknown>(arg: T_6): {
|
|
84
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
85
|
-
};
|
|
86
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
87
|
-
};
|
|
88
|
-
leftIcon: {
|
|
89
|
-
defaultValue<T_7 = unknown>(arg: T_7): {
|
|
90
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
91
|
-
};
|
|
92
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
93
|
-
};
|
|
94
|
-
buttonType: {
|
|
95
|
-
defaultValue<T_8 = unknown>(arg: T_8): {
|
|
96
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
97
|
-
};
|
|
98
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
99
|
-
};
|
|
100
|
-
size: {
|
|
101
|
-
defaultValue<T_9 = unknown>(arg: T_9): {
|
|
102
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
103
|
-
};
|
|
104
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
105
|
-
};
|
|
106
|
-
type: {
|
|
107
|
-
defaultValue<T_10 = unknown>(arg: T_10): {
|
|
108
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
109
|
-
};
|
|
110
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
111
|
-
};
|
|
112
|
-
variant: {
|
|
113
|
-
defaultValue<T_11 = unknown>(arg: T_11): {
|
|
114
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
115
|
-
};
|
|
116
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
117
|
-
};
|
|
118
|
-
innerRef: {
|
|
119
|
-
defaultValue<T_12 = unknown>(arg: T_12): {
|
|
120
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
121
|
-
};
|
|
122
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
123
|
-
};
|
|
124
|
-
onBlur: {
|
|
125
|
-
defaultValue<T_13 = unknown>(arg: T_13): {
|
|
126
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
127
|
-
};
|
|
128
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
129
|
-
};
|
|
130
|
-
intent: {
|
|
131
|
-
defaultValue<T_14 = unknown>(arg: T_14): {
|
|
132
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
133
|
-
};
|
|
134
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
135
|
-
};
|
|
136
|
-
containerProps: {
|
|
137
|
-
defaultValue<T_15 = unknown>(arg: T_15): {
|
|
138
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
139
|
-
};
|
|
140
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
141
|
-
};
|
|
142
|
-
onClick: {
|
|
143
|
-
defaultValue<T_16 = unknown>(arg: T_16): {
|
|
144
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
145
|
-
};
|
|
146
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
147
|
-
};
|
|
148
|
-
onKeyPress: {
|
|
149
|
-
defaultValue<T_17 = unknown>(arg: T_17): {
|
|
150
|
-
deprecated: import("react-desc").PropTypesDescValidator;
|
|
151
|
-
};
|
|
152
|
-
isRequired: import("react-desc").PropTypesDescValidator;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
}, import("styled-components").DefaultTheme, {}, never>;
|
|
156
|
-
export declare const StyledCounterArea: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid/types/types").GridPropsT & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const StyledComposerButton: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
|
|
4
|
+
export declare const StyledCounterArea: import("styled-components").StyledComponent<any, import("styled-components").DefaultTheme, object, string | number | symbol>;
|
|
157
5
|
export declare const StyledCounterErrorA11y: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -17,25 +17,25 @@ declare const ChatContainer: {
|
|
|
17
17
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
18
18
|
};
|
|
19
19
|
isLoading: {
|
|
20
|
-
defaultValue
|
|
20
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
21
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
22
|
};
|
|
23
|
-
isRequired: import("react-desc").
|
|
23
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
24
|
};
|
|
25
25
|
hasMoreItems: {
|
|
26
|
-
defaultValue
|
|
26
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
27
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
28
|
};
|
|
29
|
-
isRequired: import("react-desc").
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
30
|
};
|
|
31
31
|
getMoreMessages: {
|
|
32
32
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
33
33
|
};
|
|
34
34
|
bannerPosition: {
|
|
35
|
-
defaultValue
|
|
35
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
36
36
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
37
37
|
};
|
|
38
|
-
isRequired: import("react-desc").
|
|
38
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
39
39
|
};
|
|
40
40
|
bannerProps: {
|
|
41
41
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
@@ -11,22 +11,22 @@ declare const ChatContainerMessagesList: {
|
|
|
11
11
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
12
12
|
};
|
|
13
13
|
onScrollEnds: {
|
|
14
|
-
defaultValue
|
|
14
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
15
15
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
16
16
|
};
|
|
17
|
-
isRequired: import("react-desc").
|
|
17
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
18
18
|
};
|
|
19
19
|
isLoading: {
|
|
20
|
-
defaultValue
|
|
20
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
21
21
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
22
22
|
};
|
|
23
|
-
isRequired: import("react-desc").
|
|
23
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
24
24
|
};
|
|
25
25
|
hasMoreItems: {
|
|
26
|
-
defaultValue
|
|
26
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
27
27
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
28
28
|
};
|
|
29
|
-
isRequired: import("react-desc").
|
|
29
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
30
30
|
};
|
|
31
31
|
getMoreMessages: {
|
|
32
32
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
@@ -10,16 +10,16 @@ declare const MessageDelimiter: {
|
|
|
10
10
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
11
11
|
};
|
|
12
12
|
extraProps: {
|
|
13
|
-
defaultValue
|
|
13
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
14
14
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
15
15
|
};
|
|
16
|
-
isRequired: import("react-desc").
|
|
16
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
17
17
|
};
|
|
18
18
|
verticalMargin: {
|
|
19
|
-
defaultValue
|
|
19
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
20
20
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
21
21
|
};
|
|
22
|
-
isRequired: import("react-desc").
|
|
22
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -12,15 +12,15 @@ export declare const messageDelimiterProps: {
|
|
|
12
12
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
13
13
|
};
|
|
14
14
|
extraProps: {
|
|
15
|
-
defaultValue
|
|
15
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
16
16
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
17
17
|
};
|
|
18
|
-
isRequired: import("react-desc").
|
|
18
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
19
19
|
};
|
|
20
20
|
verticalMargin: {
|
|
21
|
-
defaultValue
|
|
21
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
22
22
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
23
23
|
};
|
|
24
|
-
isRequired: import("react-desc").
|
|
24
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -7,10 +7,10 @@ declare const SystemMessage: {
|
|
|
7
7
|
propTypes: {
|
|
8
8
|
title: any;
|
|
9
9
|
time: {
|
|
10
|
-
defaultValue
|
|
10
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
11
11
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
12
12
|
};
|
|
13
|
-
isRequired: import("react-desc").
|
|
13
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
14
14
|
};
|
|
15
15
|
body: any;
|
|
16
16
|
};
|
|
@@ -8,10 +8,10 @@ export declare const defaultProps: SystemMessageProps;
|
|
|
8
8
|
export declare const systemMessageProps: {
|
|
9
9
|
title: any;
|
|
10
10
|
time: {
|
|
11
|
-
defaultValue
|
|
11
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
12
12
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
13
13
|
};
|
|
14
|
-
isRequired: import("react-desc").
|
|
14
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
15
15
|
};
|
|
16
16
|
body: any;
|
|
17
17
|
};
|
|
@@ -59,10 +59,10 @@ declare const TileButton: {
|
|
|
59
59
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
60
60
|
};
|
|
61
61
|
innerRef: {
|
|
62
|
-
defaultValue
|
|
62
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
63
63
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
64
64
|
};
|
|
65
|
-
isRequired: import("react-desc").
|
|
65
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
defaultProps: TileButtonProps;
|
|
@@ -80,9 +80,9 @@ export declare const propsTileButton: {
|
|
|
80
80
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
81
81
|
};
|
|
82
82
|
innerRef: {
|
|
83
|
-
defaultValue
|
|
83
|
+
defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
|
|
84
84
|
deprecated: import("react-desc").PropTypesDescValidator;
|
|
85
85
|
};
|
|
86
|
-
isRequired: import("react-desc").
|
|
86
|
+
isRequired: import("react-desc").PropTypesDescValue;
|
|
87
87
|
};
|
|
88
88
|
};
|