@elliemae/ds-chat 2.3.1 → 2.3.2-rc.0

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.
@@ -119,9 +119,7 @@ const ChatContainerMessagesList = props$1 => {
119
119
  }, 500), [onScrollEnds]);
120
120
  const onScrollStop = React__default["default"].useCallback(debouncedScroll, [debouncedScroll]);
121
121
  const onlyFocus = React__default["default"].useCallback(index => {
122
- setTimeout(() => {
123
- virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
124
- }, 300);
122
+ virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
125
123
  }, []);
126
124
  const scrollAndFocus = React__default["default"].useCallback(function (index) {
127
125
  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
@@ -210,7 +208,9 @@ const ChatContainerMessagesList = props$1 => {
210
208
  e.preventDefault();
211
209
 
212
210
  if (index < (messages === null || messages === void 0 ? void 0 : messages.length) - 1) {
213
- virtualListRef.current.querySelector("[data-index=\"".concat(index + 1, "\"]")).focus();
211
+ var _virtualListRef$curre4;
212
+
213
+ ((_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.querySelector("[data-index=\"".concat(index + 1, "\"]"))).focus();
214
214
  }
215
215
 
216
216
  break;
@@ -244,10 +244,10 @@ const ChatContainerMessagesList = props$1 => {
244
244
  bannerRef === null || bannerRef === void 0 ? void 0 : (_bannerRef$current = bannerRef.current) === null || _bannerRef$current === void 0 ? void 0 : _bannerRef$current.focusOnWrapper();
245
245
  }
246
246
  } else {
247
- var _virtualListRef$curre4;
247
+ var _virtualListRef$curre5;
248
248
 
249
249
  e.preventDefault();
250
- (_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.focus();
250
+ (_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
251
251
  }
252
252
 
253
253
  break;
@@ -308,10 +308,10 @@ const ChatContainerMessagesList = props$1 => {
308
308
  e.preventDefault();
309
309
  actionRef.current.focusToComposer();
310
310
  } else {
311
- var _virtualListRef$curre5;
311
+ var _virtualListRef$curre6;
312
312
 
313
313
  e.preventDefault();
314
- (_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
314
+ (_virtualListRef$curre6 = virtualListRef.current) === null || _virtualListRef$curre6 === void 0 ? void 0 : _virtualListRef$curre6.focus();
315
315
  }
316
316
 
317
317
  break;
@@ -108,9 +108,7 @@ const ChatContainerMessagesList = props => {
108
108
  }, 500), [onScrollEnds]);
109
109
  const onScrollStop = React.useCallback(debouncedScroll, [debouncedScroll]);
110
110
  const onlyFocus = React.useCallback(index => {
111
- setTimeout(() => {
112
- virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
113
- }, 300);
111
+ virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
114
112
  }, []);
115
113
  const scrollAndFocus = React.useCallback(function (index) {
116
114
  let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
@@ -199,7 +197,9 @@ const ChatContainerMessagesList = props => {
199
197
  e.preventDefault();
200
198
 
201
199
  if (index < (messages === null || messages === void 0 ? void 0 : messages.length) - 1) {
202
- virtualListRef.current.querySelector("[data-index=\"".concat(index + 1, "\"]")).focus();
200
+ var _virtualListRef$curre4;
201
+
202
+ ((_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.querySelector("[data-index=\"".concat(index + 1, "\"]"))).focus();
203
203
  }
204
204
 
205
205
  break;
@@ -233,10 +233,10 @@ const ChatContainerMessagesList = props => {
233
233
  bannerRef === null || bannerRef === void 0 ? void 0 : (_bannerRef$current = bannerRef.current) === null || _bannerRef$current === void 0 ? void 0 : _bannerRef$current.focusOnWrapper();
234
234
  }
235
235
  } else {
236
- var _virtualListRef$curre4;
236
+ var _virtualListRef$curre5;
237
237
 
238
238
  e.preventDefault();
239
- (_virtualListRef$curre4 = virtualListRef.current) === null || _virtualListRef$curre4 === void 0 ? void 0 : _virtualListRef$curre4.focus();
239
+ (_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
240
240
  }
241
241
 
242
242
  break;
@@ -297,10 +297,10 @@ const ChatContainerMessagesList = props => {
297
297
  e.preventDefault();
298
298
  actionRef.current.focusToComposer();
299
299
  } else {
300
- var _virtualListRef$curre5;
300
+ var _virtualListRef$curre6;
301
301
 
302
302
  e.preventDefault();
303
- (_virtualListRef$curre5 = virtualListRef.current) === null || _virtualListRef$curre5 === void 0 ? void 0 : _virtualListRef$curre5.focus();
303
+ (_virtualListRef$curre6 = virtualListRef.current) === null || _virtualListRef$curre6 === void 0 ? void 0 : _virtualListRef$curre6.focus();
304
304
  }
305
305
 
306
306
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-chat",
3
- "version": "2.3.1",
3
+ "version": "2.3.2-rc.0",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Chat",
6
6
  "module": "./esm/index.js",
@@ -261,15 +261,15 @@
261
261
  "generateSubmodules": true
262
262
  },
263
263
  "dependencies": {
264
- "@elliemae/ds-banner": "2.3.1",
265
- "@elliemae/ds-button": "2.3.1",
266
- "@elliemae/ds-grid": "2.3.1",
267
- "@elliemae/ds-icons": "2.3.1",
268
- "@elliemae/ds-indeterminate-progress-indicator": "2.3.1",
269
- "@elliemae/ds-props-helpers": "2.3.1",
270
- "@elliemae/ds-system": "2.3.1",
271
- "@elliemae/ds-tooltip": "2.3.1",
272
- "@elliemae/ds-truncated-tooltip-text": "2.3.1",
264
+ "@elliemae/ds-banner": "2.3.2-rc.0",
265
+ "@elliemae/ds-button": "2.3.2-rc.0",
266
+ "@elliemae/ds-grid": "2.3.2-rc.0",
267
+ "@elliemae/ds-icons": "2.3.2-rc.0",
268
+ "@elliemae/ds-indeterminate-progress-indicator": "2.3.2-rc.0",
269
+ "@elliemae/ds-props-helpers": "2.3.2-rc.0",
270
+ "@elliemae/ds-system": "2.3.2-rc.0",
271
+ "@elliemae/ds-tooltip": "2.3.2-rc.0",
272
+ "@elliemae/ds-truncated-tooltip-text": "2.3.2-rc.0",
273
273
  "prop-types": "~15.7.2",
274
274
  "react-desc": "~4.1.2",
275
275
  "react-virtual": "~2.8.2"