@elliemae/ds-chat 2.2.0 → 2.3.0-alpha.3
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 +54 -26
- package/cjs/ChatDataTestids.js.map +7 -0
- package/cjs/index.d.js +27 -2
- package/cjs/index.d.js.map +7 -0
- package/cjs/index.js +69 -44
- package/cjs/index.js.map +7 -0
- package/cjs/parts/bubble/ChatBubble.js +74 -64
- package/cjs/parts/bubble/ChatBubble.js.map +7 -0
- package/cjs/parts/bubble/ChatBubbleArrow.js +96 -79
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +7 -0
- package/cjs/parts/bubble/config/useValidateProps.js +47 -24
- package/cjs/parts/bubble/config/useValidateProps.js.map +7 -0
- package/cjs/parts/bubble/index.js +38 -12
- package/cjs/parts/bubble/index.js.map +7 -0
- package/cjs/parts/bubble/props.js +60 -48
- package/cjs/parts/bubble/props.js.map +7 -0
- package/cjs/parts/bubble/styled.js +141 -48
- package/cjs/parts/bubble/styled.js.map +7 -0
- package/cjs/parts/chat-card/ChatCard.js +55 -39
- package/cjs/parts/chat-card/ChatCard.js.map +7 -0
- package/cjs/parts/chat-card/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-card/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-card/index.js +36 -10
- package/cjs/parts/chat-card/index.js.map +7 -0
- package/cjs/parts/chat-card/props.js +39 -12
- package/cjs/parts/chat-card/props.js.map +7 -0
- package/cjs/parts/chat-card/styled.js +71 -36
- package/cjs/parts/chat-card/styled.js.map +7 -0
- package/cjs/parts/chat-composer/ChatContainerComposer.js +92 -99
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +7 -0
- package/cjs/parts/chat-composer/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-composer/index.js +36 -10
- package/cjs/parts/chat-composer/index.js.map +7 -0
- package/cjs/parts/chat-composer/props.js +73 -38
- package/cjs/parts/chat-composer/props.js.map +7 -0
- package/cjs/parts/chat-composer/styled.js +102 -34
- package/cjs/parts/chat-composer/styled.js.map +7 -0
- package/cjs/parts/chat-container/ChatContainer.js +122 -140
- package/cjs/parts/chat-container/ChatContainer.js.map +7 -0
- package/cjs/parts/chat-container/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-container/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-container/index.js +36 -10
- package/cjs/parts/chat-container/index.js.map +7 -0
- package/cjs/parts/chat-container/props.js +85 -42
- package/cjs/parts/chat-container/props.js.map +7 -0
- package/cjs/parts/chat-container/styled.js +104 -23
- package/cjs/parts/chat-container/styled.js.map +7 -0
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +48 -30
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
- package/cjs/parts/chat-container-header/helpers.js +38 -25
- package/cjs/parts/chat-container-header/helpers.js.map +7 -0
- package/cjs/parts/chat-container-header/styled.js +59 -24
- package/cjs/parts/chat-container-header/styled.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +163 -225
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/index.js +36 -10
- package/cjs/parts/chat-container-messages-list/index.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/props.js +62 -24
- package/cjs/parts/chat-container-messages-list/props.js.map +7 -0
- package/cjs/parts/chat-container-messages-list/styled.js +100 -38
- package/cjs/parts/chat-container-messages-list/styled.js.map +7 -0
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +58 -42
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-empty-state/props.js +39 -12
- package/cjs/parts/chat-empty-state/props.js.map +7 -0
- package/cjs/parts/chat-empty-state/styled.js +47 -21
- package/cjs/parts/chat-empty-state/styled.js.map +7 -0
- package/cjs/parts/chat-sidebar/SideBarChat.js +82 -81
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +7 -0
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +36 -9
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
- package/cjs/parts/chat-sidebar/index.js +36 -10
- package/cjs/parts/chat-sidebar/index.js.map +7 -0
- package/cjs/parts/chat-sidebar/props.js +72 -30
- package/cjs/parts/chat-sidebar/props.js.map +7 -0
- package/cjs/parts/chat-sidebar/styled.js +56 -20
- package/cjs/parts/chat-sidebar/styled.js.map +7 -0
- package/cjs/parts/floating-button/FloatingButton.js +47 -34
- package/cjs/parts/floating-button/FloatingButton.js.map +7 -0
- package/cjs/parts/floating-button/index.js +28 -9
- package/cjs/parts/floating-button/index.js.map +7 -0
- package/cjs/parts/floating-button/props.js +42 -15
- package/cjs/parts/floating-button/props.js.map +7 -0
- package/cjs/parts/floating-button/styled.js +63 -17
- package/cjs/parts/floating-button/styled.js.map +7 -0
- package/cjs/parts/floating-container/styled.js +47 -17
- package/cjs/parts/floating-container/styled.js.map +7 -0
- package/cjs/parts/grid-influencer/InfluencerContainer.js +41 -21
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +7 -0
- package/cjs/parts/grid-influencer/styled.js +56 -21
- package/cjs/parts/grid-influencer/styled.js.map +7 -0
- package/cjs/parts/message-delimiter/MessageDelimiter.js +53 -39
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +7 -0
- package/cjs/parts/message-delimiter/config/useValidateProps.js +36 -9
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +7 -0
- package/cjs/parts/message-delimiter/index.js +36 -10
- package/cjs/parts/message-delimiter/index.js.map +7 -0
- package/cjs/parts/message-delimiter/props.js +44 -19
- package/cjs/parts/message-delimiter/props.js.map +7 -0
- package/cjs/parts/message-delimiter/styled.js +53 -24
- package/cjs/parts/message-delimiter/styled.js.map +7 -0
- package/cjs/parts/sidebar-button/SidebarButton.js +52 -53
- package/cjs/parts/sidebar-button/SidebarButton.js.map +7 -0
- package/cjs/parts/sidebar-button/index.js +20 -2
- package/cjs/parts/sidebar-button/index.js.map +7 -0
- package/cjs/parts/sidebar-button/props.js +49 -26
- package/cjs/parts/sidebar-button/props.js.map +7 -0
- package/cjs/parts/sidebar-button/styled.js +68 -24
- package/cjs/parts/sidebar-button/styled.js.map +7 -0
- package/cjs/parts/system-message/SystemMessage.js +55 -40
- package/cjs/parts/system-message/SystemMessage.js.map +7 -0
- package/cjs/parts/system-message/config/useValidateProps.js +36 -9
- package/cjs/parts/system-message/config/useValidateProps.js.map +7 -0
- package/cjs/parts/system-message/index.js +36 -10
- package/cjs/parts/system-message/index.js.map +7 -0
- package/cjs/parts/system-message/props.js +42 -15
- package/cjs/parts/system-message/props.js.map +7 -0
- package/cjs/parts/system-message/style.js +75 -32
- package/cjs/parts/system-message/style.js.map +7 -0
- package/cjs/parts/tile-button/TileButton.js +98 -68
- package/cjs/parts/tile-button/TileButton.js.map +7 -0
- package/cjs/parts/tile-button/config/useValidateProps.js +36 -9
- package/cjs/parts/tile-button/config/useValidateProps.js.map +7 -0
- package/cjs/parts/tile-button/index.js +36 -10
- package/cjs/parts/tile-button/index.js.map +7 -0
- package/cjs/parts/tile-button/props.js +83 -45
- package/cjs/parts/tile-button/props.js.map +7 -0
- package/cjs/parts/tile-button/styled.js +229 -77
- package/cjs/parts/tile-button/styled.js.map +7 -0
- package/cjs/prop-types.js +53 -26
- package/cjs/prop-types.js.map +7 -0
- package/cjs/styled.js +42 -14
- package/cjs/styled.js.map +7 -0
- package/cjs/tests/utils.js +66 -0
- package/cjs/tests/utils.js.map +7 -0
- package/esm/ChatDataTestids.js +25 -22
- package/esm/ChatDataTestids.js.map +7 -0
- package/esm/index.d.js +2 -1
- package/esm/index.d.js.map +7 -0
- package/esm/index.js +40 -14
- package/esm/index.js.map +7 -0
- package/esm/parts/bubble/ChatBubble.js +51 -51
- package/esm/parts/bubble/ChatBubble.js.map +7 -0
- package/esm/parts/bubble/ChatBubbleArrow.js +67 -71
- package/esm/parts/bubble/ChatBubbleArrow.js.map +7 -0
- package/esm/parts/bubble/config/useValidateProps.js +17 -19
- package/esm/parts/bubble/config/useValidateProps.js.map +7 -0
- package/esm/parts/bubble/index.js +9 -2
- package/esm/parts/bubble/index.js.map +7 -0
- package/esm/parts/bubble/props.js +30 -36
- package/esm/parts/bubble/props.js.map +7 -0
- package/esm/parts/bubble/styled.js +112 -32
- package/esm/parts/bubble/styled.js.map +7 -0
- package/esm/parts/chat-card/ChatCard.js +23 -27
- package/esm/parts/chat-card/ChatCard.js.map +7 -0
- package/esm/parts/chat-card/config/useValidateProps.js +6 -4
- package/esm/parts/chat-card/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-card/index.js +7 -1
- package/esm/parts/chat-card/index.js.map +7 -0
- package/esm/parts/chat-card/props.js +10 -8
- package/esm/parts/chat-card/props.js.map +7 -0
- package/esm/parts/chat-card/styled.js +42 -23
- package/esm/parts/chat-card/styled.js.map +7 -0
- package/esm/parts/chat-composer/ChatContainerComposer.js +65 -84
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +7 -0
- package/esm/parts/chat-composer/config/useValidateProps.js +6 -4
- package/esm/parts/chat-composer/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-composer/index.js +7 -1
- package/esm/parts/chat-composer/index.js.map +7 -0
- package/esm/parts/chat-composer/props.js +37 -26
- package/esm/parts/chat-composer/props.js.map +7 -0
- package/esm/parts/chat-composer/styled.js +73 -22
- package/esm/parts/chat-composer/styled.js.map +7 -0
- package/esm/parts/chat-container/ChatContainer.js +88 -122
- package/esm/parts/chat-container/ChatContainer.js.map +7 -0
- package/esm/parts/chat-container/config/useValidateProps.js +6 -4
- package/esm/parts/chat-container/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-container/index.js +7 -1
- package/esm/parts/chat-container/index.js.map +7 -0
- package/esm/parts/chat-container/props.js +52 -31
- package/esm/parts/chat-container/props.js.map +7 -0
- package/esm/parts/chat-container/styled.js +79 -16
- package/esm/parts/chat-container/styled.js.map +7 -0
- package/esm/parts/chat-container-header/ChatContainerHeader.js +22 -21
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +7 -0
- package/esm/parts/chat-container-header/helpers.js +9 -17
- package/esm/parts/chat-container-header/helpers.js.map +7 -0
- package/esm/parts/chat-container-header/styled.js +30 -14
- package/esm/parts/chat-container-header/styled.js.map +7 -0
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +138 -210
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +7 -0
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +6 -4
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-container-messages-list/index.js +10 -1
- package/esm/parts/chat-container-messages-list/index.js.map +7 -0
- package/esm/parts/chat-container-messages-list/props.js +31 -17
- package/esm/parts/chat-container-messages-list/props.js.map +7 -0
- package/esm/parts/chat-container-messages-list/styled.js +71 -25
- package/esm/parts/chat-container-messages-list/styled.js.map +7 -0
- package/esm/parts/chat-empty-state/ChatEmptyState.js +25 -29
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +7 -0
- package/esm/parts/chat-empty-state/config/useValidateProps.js +6 -4
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-empty-state/props.js +10 -7
- package/esm/parts/chat-empty-state/props.js.map +7 -0
- package/esm/parts/chat-empty-state/styled.js +18 -11
- package/esm/parts/chat-empty-state/styled.js.map +7 -0
- package/esm/parts/chat-sidebar/SideBarChat.js +50 -67
- package/esm/parts/chat-sidebar/SideBarChat.js.map +7 -0
- package/esm/parts/chat-sidebar/config/useValidateProps.js +6 -4
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +7 -0
- package/esm/parts/chat-sidebar/index.js +7 -1
- package/esm/parts/chat-sidebar/index.js.map +7 -0
- package/esm/parts/chat-sidebar/props.js +39 -21
- package/esm/parts/chat-sidebar/props.js.map +7 -0
- package/esm/parts/chat-sidebar/styled.js +27 -11
- package/esm/parts/chat-sidebar/styled.js.map +7 -0
- package/esm/parts/floating-button/FloatingButton.js +18 -26
- package/esm/parts/floating-button/FloatingButton.js.map +7 -0
- package/esm/parts/floating-button/index.js +3 -1
- package/esm/parts/floating-button/index.js.map +7 -0
- package/esm/parts/floating-button/props.js +11 -8
- package/esm/parts/floating-button/props.js.map +7 -0
- package/esm/parts/floating-button/styled.js +34 -9
- package/esm/parts/floating-button/styled.js.map +7 -0
- package/esm/parts/floating-container/styled.js +18 -9
- package/esm/parts/floating-container/styled.js.map +7 -0
- package/esm/parts/grid-influencer/InfluencerContainer.js +12 -12
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +7 -0
- package/esm/parts/grid-influencer/styled.js +27 -12
- package/esm/parts/grid-influencer/styled.js.map +7 -0
- package/esm/parts/message-delimiter/MessageDelimiter.js +20 -26
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +7 -0
- package/esm/parts/message-delimiter/config/useValidateProps.js +6 -4
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +7 -0
- package/esm/parts/message-delimiter/index.js +10 -1
- package/esm/parts/message-delimiter/index.js.map +7 -0
- package/esm/parts/message-delimiter/props.js +15 -14
- package/esm/parts/message-delimiter/props.js.map +7 -0
- package/esm/parts/message-delimiter/styled.js +24 -14
- package/esm/parts/message-delimiter/styled.js.map +7 -0
- package/esm/parts/sidebar-button/SidebarButton.js +22 -41
- package/esm/parts/sidebar-button/SidebarButton.js.map +7 -0
- package/esm/parts/sidebar-button/index.js +2 -1
- package/esm/parts/sidebar-button/index.js.map +7 -0
- package/esm/parts/sidebar-button/props.js +18 -15
- package/esm/parts/sidebar-button/props.js.map +7 -0
- package/esm/parts/sidebar-button/styled.js +39 -14
- package/esm/parts/sidebar-button/styled.js.map +7 -0
- package/esm/parts/system-message/SystemMessage.js +22 -27
- package/esm/parts/system-message/SystemMessage.js.map +7 -0
- package/esm/parts/system-message/config/useValidateProps.js +6 -4
- package/esm/parts/system-message/config/useValidateProps.js.map +7 -0
- package/esm/parts/system-message/index.js +7 -1
- package/esm/parts/system-message/index.js.map +7 -0
- package/esm/parts/system-message/props.js +13 -10
- package/esm/parts/system-message/props.js.map +7 -0
- package/esm/parts/system-message/style.js +46 -20
- package/esm/parts/system-message/style.js.map +7 -0
- package/esm/parts/tile-button/TileButton.js +75 -54
- package/esm/parts/tile-button/TileButton.js.map +7 -0
- package/esm/parts/tile-button/config/useValidateProps.js +6 -4
- package/esm/parts/tile-button/config/useValidateProps.js.map +7 -0
- package/esm/parts/tile-button/index.js +7 -1
- package/esm/parts/tile-button/index.js.map +7 -0
- package/esm/parts/tile-button/props.js +47 -33
- package/esm/parts/tile-button/props.js.map +7 -0
- package/esm/parts/tile-button/styled.js +200 -60
- package/esm/parts/tile-button/styled.js.map +7 -0
- package/esm/prop-types.js +19 -16
- package/esm/prop-types.js.map +7 -0
- package/esm/styled.js +13 -5
- package/esm/styled.js.map +7 -0
- package/esm/tests/utils.js +37 -0
- package/esm/tests/utils.js.map +7 -0
- package/package.json +10 -10
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +0 -3
|
@@ -1,48 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
import { BUBBLE_TYPES } from '../bubble/props.js';
|
|
21
|
-
import { MessageDelimiter } from '../message-delimiter/MessageDelimiter.js';
|
|
22
|
-
import { SystemMessage } from '../system-message/SystemMessage.js';
|
|
23
|
-
import { ListItem, StyledWrapperListItem, StyledWrapper, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer } from './styled.js';
|
|
24
|
-
import { listProps, defaultProps } from './props.js';
|
|
25
|
-
import { jsx } from 'react/jsx-runtime';
|
|
26
|
-
|
|
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
|
-
|
|
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(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
|
-
const getPadding = _ref => {
|
|
32
|
-
let {
|
|
33
|
-
hasMoreItems,
|
|
34
|
-
bannerPosition,
|
|
35
|
-
isLoading
|
|
36
|
-
} = _ref;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { describe } from "react-desc";
|
|
4
|
+
import { useVirtual } from "react-virtual";
|
|
5
|
+
import DSButton from "@elliemae/ds-button";
|
|
6
|
+
import { debounce } from "lodash";
|
|
7
|
+
import { ChatBubble, BUBBLE_TYPES } from "../bubble";
|
|
8
|
+
import { MessageDelimiter } from "../message-delimiter";
|
|
9
|
+
import { SystemMessage } from "../system-message";
|
|
10
|
+
import {
|
|
11
|
+
StyledWrapperListItem,
|
|
12
|
+
StyledChatContainerContentList,
|
|
13
|
+
StyledChatContainerContentListScroll,
|
|
14
|
+
StyledWrapper,
|
|
15
|
+
StyledLoadMoreContainer,
|
|
16
|
+
ListItem
|
|
17
|
+
} from "./styled";
|
|
18
|
+
import { defaultProps, listProps } from "./props";
|
|
19
|
+
const getPadding = ({ hasMoreItems, bannerPosition, isLoading }) => {
|
|
37
20
|
const padding = {
|
|
38
21
|
paddingStart: 0,
|
|
39
22
|
paddingEnd: -5
|
|
40
23
|
};
|
|
41
|
-
if ([hasMoreItems, bannerPosition, isLoading].some(item => item ===
|
|
24
|
+
if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === "top"))
|
|
25
|
+
padding.paddingStart = 42;
|
|
26
|
+
else if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === "bottom"))
|
|
27
|
+
padding.paddingEnd = 42;
|
|
42
28
|
return padding;
|
|
43
29
|
};
|
|
44
|
-
|
|
45
|
-
const ChatContainerMessagesList = props => {
|
|
30
|
+
const ChatContainerMessagesList = (props) => {
|
|
46
31
|
const {
|
|
47
32
|
sendingText,
|
|
48
33
|
bannerPosition,
|
|
@@ -55,206 +40,149 @@ const ChatContainerMessagesList = props => {
|
|
|
55
40
|
isLoading,
|
|
56
41
|
bannerRef
|
|
57
42
|
} = props;
|
|
58
|
-
const pendingOnScroll =
|
|
59
|
-
const loadMoreRef =
|
|
60
|
-
const virtualListRef =
|
|
61
|
-
// https://github.com/tannerlinsley/react-virtual/issues/23
|
|
62
|
-
|
|
43
|
+
const pendingOnScroll = React2.useRef(false);
|
|
44
|
+
const loadMoreRef = React2.useRef(null);
|
|
45
|
+
const virtualListRef = React2.useRef();
|
|
63
46
|
const {
|
|
64
47
|
scrollToIndex: vScroll,
|
|
65
48
|
totalSize,
|
|
66
49
|
virtualItems
|
|
67
|
-
} = useVirtual(
|
|
50
|
+
} = useVirtual({
|
|
68
51
|
size: messages.length,
|
|
69
52
|
parentRef: virtualListRef,
|
|
70
|
-
overscan: 15
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}));
|
|
78
|
-
const debouncedScroll = React.useMemo(() => debounce(() => {
|
|
79
|
-
var _virtualListRef$curre;
|
|
80
|
-
|
|
81
|
-
if (document.visibilityState === 'hidden') {
|
|
53
|
+
overscan: 15,
|
|
54
|
+
...getPadding({ hasMoreItems, bannerPosition, isLoading }),
|
|
55
|
+
estimateSize: React2.useCallback(() => 80, [])
|
|
56
|
+
});
|
|
57
|
+
const debouncedScroll = React2.useMemo(() => debounce(() => {
|
|
58
|
+
console.log("debound");
|
|
59
|
+
if (document.visibilityState === "hidden") {
|
|
82
60
|
pendingOnScroll.current = true;
|
|
83
61
|
return [];
|
|
84
62
|
}
|
|
85
|
-
|
|
86
|
-
|
|
63
|
+
if (!virtualListRef.current)
|
|
64
|
+
return [];
|
|
87
65
|
pendingOnScroll.current = false;
|
|
88
|
-
const {
|
|
89
|
-
bottom,
|
|
90
|
-
top
|
|
91
|
-
} = (_virtualListRef$curre = virtualListRef.current) === null || _virtualListRef$curre === void 0 ? void 0 : _virtualListRef$curre.getBoundingClientRect();
|
|
66
|
+
const { bottom, top } = virtualListRef.current?.getBoundingClientRect();
|
|
92
67
|
const list = virtualListRef.current.querySelectorAll('[data-element="chat-element-list-item"]');
|
|
93
68
|
const indexList = [];
|
|
94
|
-
list.forEach(item => {
|
|
95
|
-
const {
|
|
96
|
-
top: itemTop
|
|
97
|
-
} = item.getBoundingClientRect();
|
|
69
|
+
list.forEach((item) => {
|
|
70
|
+
const { top: itemTop } = item.getBoundingClientRect();
|
|
98
71
|
const itemPadding = 10;
|
|
99
|
-
if (itemTop + itemPadding < bottom && itemTop + itemPadding > top)
|
|
72
|
+
if (itemTop + itemPadding < bottom && itemTop + itemPadding > top)
|
|
73
|
+
indexList.push(item.dataset.index);
|
|
100
74
|
});
|
|
101
|
-
if (onScrollEnds)
|
|
75
|
+
if (onScrollEnds)
|
|
76
|
+
onScrollEnds(indexList);
|
|
102
77
|
return indexList;
|
|
103
78
|
}, 500), [onScrollEnds]);
|
|
104
|
-
const onScrollStop =
|
|
105
|
-
const onlyFocus =
|
|
79
|
+
const onScrollStop = React2.useCallback(debouncedScroll, [debouncedScroll]);
|
|
80
|
+
const onlyFocus = React2.useCallback((index) => {
|
|
106
81
|
setTimeout(() => {
|
|
107
|
-
virtualListRef.current.querySelector(
|
|
82
|
+
virtualListRef.current.querySelector(`[data-index="${index}"]`).focus();
|
|
108
83
|
}, 300);
|
|
109
84
|
}, []);
|
|
110
|
-
const scrollAndFocus =
|
|
111
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
112
|
-
align: 'center'
|
|
113
|
-
};
|
|
85
|
+
const scrollAndFocus = React2.useCallback((index, b = { align: "center" }) => {
|
|
114
86
|
vScroll(index, b);
|
|
115
87
|
onlyFocus(index);
|
|
116
88
|
onScrollStop();
|
|
117
89
|
}, [onScrollStop, onlyFocus, vScroll]);
|
|
118
|
-
|
|
90
|
+
React2.useEffect(() => {
|
|
119
91
|
if (actionRef && actionRef.current) {
|
|
120
|
-
actionRef.current.scrollToIndex =
|
|
121
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
122
|
-
align: 'center'
|
|
123
|
-
};
|
|
92
|
+
actionRef.current.scrollToIndex = (a, b = { align: "center" }) => {
|
|
124
93
|
vScroll(a, b);
|
|
125
94
|
onScrollStop();
|
|
126
95
|
};
|
|
127
|
-
|
|
128
96
|
actionRef.current.getMessagesInView = onScrollStop;
|
|
129
|
-
onScrollStop();
|
|
130
|
-
|
|
131
|
-
actionRef.current.focusToIndex = function (a) {
|
|
132
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
133
|
-
align: 'center'
|
|
134
|
-
};
|
|
97
|
+
onScrollStop();
|
|
98
|
+
actionRef.current.focusToIndex = (a, b = { align: "center" }) => {
|
|
135
99
|
scrollAndFocus(a, b);
|
|
136
100
|
};
|
|
137
|
-
|
|
138
101
|
actionRef.current.focusToIndexWithoutScroll = onlyFocus;
|
|
139
|
-
|
|
140
102
|
actionRef.current.focusToList = () => {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
(_virtualListRef$curre2 = virtualListRef.current) === null || _virtualListRef$curre2 === void 0 ? void 0 : _virtualListRef$curre2.focus();
|
|
103
|
+
virtualListRef.current?.focus();
|
|
144
104
|
};
|
|
145
105
|
}
|
|
146
106
|
}, [actionRef, onScrollStop, onlyFocus, scrollAndFocus, vScroll]);
|
|
147
|
-
const handleKey =
|
|
148
|
-
const {
|
|
149
|
-
key
|
|
150
|
-
} = e;
|
|
107
|
+
const handleKey = React2.useCallback((e) => {
|
|
108
|
+
const { key } = e;
|
|
151
109
|
const index = Number(e.currentTarget.dataset.index);
|
|
152
110
|
e.stopPropagation();
|
|
153
|
-
|
|
154
111
|
switch (key) {
|
|
155
|
-
case
|
|
112
|
+
case "ArrowUp":
|
|
156
113
|
e.preventDefault();
|
|
157
|
-
|
|
158
114
|
if (index > 0) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
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();
|
|
115
|
+
(virtualListRef.current?.querySelector(`[data-index="${index - 1}"]`)).focus();
|
|
116
|
+
} else if (hasMoreItems === "top") {
|
|
117
|
+
loadMoreRef.current?.focus();
|
|
166
118
|
}
|
|
167
|
-
|
|
168
119
|
break;
|
|
169
|
-
|
|
170
|
-
case 'ArrowDown':
|
|
120
|
+
case "ArrowDown":
|
|
171
121
|
e.preventDefault();
|
|
172
|
-
|
|
173
122
|
if (index < messages.length - 1) {
|
|
174
|
-
virtualListRef.current.querySelector(
|
|
123
|
+
virtualListRef.current.querySelector(`[data-index="${index + 1}"]`).focus();
|
|
175
124
|
}
|
|
176
|
-
|
|
177
125
|
break;
|
|
178
|
-
|
|
179
|
-
case 'Home':
|
|
126
|
+
case "Home":
|
|
180
127
|
e.preventDefault();
|
|
181
128
|
scrollAndFocus(0);
|
|
182
129
|
break;
|
|
183
|
-
|
|
184
|
-
case 'End':
|
|
130
|
+
case "End":
|
|
185
131
|
e.preventDefault();
|
|
186
132
|
scrollAndFocus(messages.length - 1);
|
|
187
133
|
break;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if (hasMoreItems === 'bottom' && !e.shiftKey) {
|
|
191
|
-
var _loadMoreRef$current2;
|
|
192
|
-
|
|
134
|
+
case "Tab":
|
|
135
|
+
if (hasMoreItems === "bottom" && !e.shiftKey) {
|
|
193
136
|
e.preventDefault();
|
|
194
|
-
|
|
195
|
-
} else if (hasMoreItems ===
|
|
137
|
+
loadMoreRef.current?.focus();
|
|
138
|
+
} else if (hasMoreItems === "top" && e.shiftKey) {
|
|
139
|
+
} else if (!e.shiftKey) {
|
|
196
140
|
if (bannerPosition) {
|
|
197
141
|
e.preventDefault();
|
|
198
142
|
bannerRef.current.focusOnWrapper();
|
|
199
143
|
}
|
|
200
144
|
} else {
|
|
201
|
-
var _virtualListRef$curre4;
|
|
202
|
-
|
|
203
145
|
e.preventDefault();
|
|
204
|
-
|
|
146
|
+
virtualListRef.current?.focus();
|
|
205
147
|
}
|
|
206
|
-
|
|
148
|
+
break;
|
|
149
|
+
default:
|
|
207
150
|
break;
|
|
208
151
|
}
|
|
209
152
|
}, [bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus]);
|
|
210
|
-
const handleListKey =
|
|
211
|
-
const {
|
|
212
|
-
key
|
|
213
|
-
} = e;
|
|
214
|
-
|
|
153
|
+
const handleListKey = React2.useCallback((e) => {
|
|
154
|
+
const { key } = e;
|
|
215
155
|
switch (key) {
|
|
216
|
-
case
|
|
156
|
+
case "ArrowUp":
|
|
217
157
|
e.preventDefault();
|
|
218
|
-
|
|
219
158
|
if (document.activeElement !== loadMoreRef.current) {
|
|
220
159
|
onlyFocus(onScrollStop().shift());
|
|
221
160
|
}
|
|
222
|
-
|
|
223
161
|
break;
|
|
224
|
-
|
|
225
|
-
case 'ArrowDown':
|
|
162
|
+
case "ArrowDown":
|
|
226
163
|
e.preventDefault();
|
|
227
|
-
|
|
228
164
|
if (document.activeElement === loadMoreRef.current) {
|
|
229
|
-
virtualListRef.current.querySelector(
|
|
165
|
+
virtualListRef.current.querySelector(`[data-index="0"]`).focus();
|
|
230
166
|
} else {
|
|
231
167
|
onlyFocus(onScrollStop().pop());
|
|
232
168
|
}
|
|
233
|
-
|
|
234
169
|
break;
|
|
235
|
-
|
|
236
|
-
case 'Home':
|
|
170
|
+
case "Home":
|
|
237
171
|
e.preventDefault();
|
|
238
172
|
scrollAndFocus(0);
|
|
239
173
|
break;
|
|
240
|
-
|
|
241
|
-
case 'End':
|
|
174
|
+
case "End":
|
|
242
175
|
e.preventDefault();
|
|
243
176
|
scrollAndFocus(messages.length - 1);
|
|
244
177
|
break;
|
|
245
|
-
|
|
246
|
-
case 'Tab':
|
|
178
|
+
case "Tab":
|
|
247
179
|
if (document.activeElement !== loadMoreRef.current) {
|
|
248
|
-
if (hasMoreItems ===
|
|
249
|
-
var _loadMoreRef$current3;
|
|
250
|
-
|
|
180
|
+
if (hasMoreItems === "bottom" && !e.shiftKey) {
|
|
251
181
|
e.preventDefault();
|
|
252
|
-
|
|
253
|
-
} else if (hasMoreItems ===
|
|
254
|
-
var _loadMoreRef$current4;
|
|
255
|
-
|
|
182
|
+
loadMoreRef.current?.focus();
|
|
183
|
+
} else if (hasMoreItems === "top" && e.shiftKey) {
|
|
256
184
|
e.preventDefault();
|
|
257
|
-
|
|
185
|
+
loadMoreRef.current?.focus();
|
|
258
186
|
} else if (!e.shiftKey) {
|
|
259
187
|
e.preventDefault();
|
|
260
188
|
actionRef.current.focusToComposer();
|
|
@@ -263,95 +191,95 @@ const ChatContainerMessagesList = props => {
|
|
|
263
191
|
e.preventDefault();
|
|
264
192
|
actionRef.current.focusToComposer();
|
|
265
193
|
} else {
|
|
266
|
-
var _virtualListRef$curre5;
|
|
267
|
-
|
|
268
194
|
e.preventDefault();
|
|
269
|
-
|
|
195
|
+
virtualListRef.current?.focus();
|
|
270
196
|
}
|
|
271
|
-
|
|
197
|
+
break;
|
|
198
|
+
default:
|
|
272
199
|
break;
|
|
273
200
|
}
|
|
274
201
|
}, [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus]);
|
|
275
|
-
const checkPendingOnScroll =
|
|
276
|
-
if (pendingOnScroll.current === true)
|
|
202
|
+
const checkPendingOnScroll = React2.useCallback(() => {
|
|
203
|
+
if (pendingOnScroll.current === true)
|
|
204
|
+
onScrollStop();
|
|
277
205
|
}, [onScrollStop]);
|
|
278
|
-
|
|
206
|
+
React2.useEffect(() => {
|
|
279
207
|
let handlerCallback = null;
|
|
280
208
|
const localVirtualRef = virtualListRef.current;
|
|
281
|
-
|
|
282
209
|
const onScroll = () => {
|
|
283
|
-
if (handlerCallback)
|
|
210
|
+
if (handlerCallback)
|
|
211
|
+
clearTimeout(handlerCallback);
|
|
284
212
|
handlerCallback = setTimeout(onScrollStop, 300);
|
|
285
213
|
};
|
|
286
|
-
|
|
287
214
|
if (onScrollEnds) {
|
|
288
|
-
virtualListRef.current.addEventListener(
|
|
215
|
+
virtualListRef.current.addEventListener("scroll", onScroll);
|
|
289
216
|
}
|
|
290
|
-
|
|
291
|
-
document.addEventListener('visibilitychange', checkPendingOnScroll);
|
|
217
|
+
document.addEventListener("visibilitychange", checkPendingOnScroll);
|
|
292
218
|
return () => {
|
|
293
|
-
if (handlerCallback)
|
|
294
|
-
|
|
295
|
-
|
|
219
|
+
if (handlerCallback)
|
|
220
|
+
clearTimeout(handlerCallback);
|
|
221
|
+
if (onScrollEnds)
|
|
222
|
+
localVirtualRef.removeEventListener("scroll", onScroll);
|
|
223
|
+
document.removeEventListener("visibilitychange", checkPendingOnScroll);
|
|
296
224
|
};
|
|
297
225
|
}, [onScrollStop, onScrollEnds, checkPendingOnScroll]);
|
|
298
|
-
const render =
|
|
299
|
-
const {
|
|
300
|
-
index,
|
|
301
|
-
measureRef,
|
|
302
|
-
start
|
|
303
|
-
} = virtualItem;
|
|
226
|
+
const render = React2.useMemo(() => virtualItems.map((virtualItem) => {
|
|
227
|
+
const { index, measureRef, start } = virtualItem;
|
|
304
228
|
const row = messages[index];
|
|
305
|
-
const isSending = sendingMessages && sendingMessages.find(m => m === row.dsId);
|
|
229
|
+
const isSending = sendingMessages && sendingMessages.find((m) => m === row.dsId);
|
|
306
230
|
const style = {
|
|
307
|
-
position:
|
|
231
|
+
position: "absolute",
|
|
308
232
|
top: 0,
|
|
309
233
|
left: 0,
|
|
310
|
-
transform:
|
|
311
|
-
width:
|
|
234
|
+
transform: `translateY(${start}px)`,
|
|
235
|
+
width: "100%"
|
|
312
236
|
};
|
|
313
|
-
return
|
|
237
|
+
return /* @__PURE__ */ React2.createElement(ListItem, {
|
|
314
238
|
"data-element": "chat-element-list-item",
|
|
315
239
|
"data-index": index,
|
|
316
|
-
|
|
240
|
+
key: `ds-chat-bubble-${index}-${row.dsId}-${row.type}`,
|
|
241
|
+
style,
|
|
317
242
|
ref: measureRef,
|
|
318
243
|
tabIndex: -1,
|
|
319
244
|
onKeyDown: handleKey,
|
|
320
|
-
role: "listitem"
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
245
|
+
role: "listitem"
|
|
246
|
+
}, /* @__PURE__ */ React2.createElement(StyledWrapperListItem, {
|
|
247
|
+
type: row.type
|
|
248
|
+
}, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ React2.createElement(ChatBubble, {
|
|
249
|
+
...row,
|
|
250
|
+
helpMessage: isSending ? sendingText : row.helpMessage
|
|
251
|
+
}) : null, row.type === BUBBLE_TYPES.DELIMITER ? /* @__PURE__ */ React2.createElement(MessageDelimiter, {
|
|
252
|
+
...row
|
|
253
|
+
}) : null, row.type === BUBBLE_TYPES.SYSTEM ? /* @__PURE__ */ React2.createElement(SystemMessage, {
|
|
254
|
+
...row
|
|
255
|
+
}) : null));
|
|
330
256
|
}), [virtualItems, messages, sendingMessages, handleKey, sendingText]);
|
|
331
|
-
return
|
|
257
|
+
return /* @__PURE__ */ React2.createElement(StyledWrapper, null, /* @__PURE__ */ React2.createElement(StyledChatContainerContentList, {
|
|
332
258
|
"data-testid": "chat-thread-container",
|
|
333
259
|
tabIndex: 0,
|
|
334
260
|
"aria-live": "polite",
|
|
335
261
|
"aria-relevant": "additions",
|
|
336
262
|
ref: virtualListRef,
|
|
337
263
|
role: "list",
|
|
338
|
-
onKeyDown: handleListKey
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}));
|
|
264
|
+
onKeyDown: handleListKey
|
|
265
|
+
}, /* @__PURE__ */ React2.createElement(StyledChatContainerContentListScroll, {
|
|
266
|
+
height: `${totalSize}px`
|
|
267
|
+
}, !isLoading && hasMoreItems ? /* @__PURE__ */ React2.createElement(StyledLoadMoreContainer, {
|
|
268
|
+
hasMoreItems
|
|
269
|
+
}, /* @__PURE__ */ React2.createElement(DSButton, {
|
|
270
|
+
labelText: "Load More",
|
|
271
|
+
buttonType: "secondary",
|
|
272
|
+
onClick: getMoreMessages,
|
|
273
|
+
"data-testid": "ds-chat-load-more-btn",
|
|
274
|
+
innerRef: loadMoreRef
|
|
275
|
+
})) : null, render)));
|
|
351
276
|
};
|
|
352
|
-
|
|
277
|
+
ChatContainerMessagesList.propTypes = listProps;
|
|
353
278
|
ChatContainerMessagesList.defaultProps = defaultProps;
|
|
354
279
|
const ChatContainerMessagesListWithSchema = describe(ChatContainerMessagesList);
|
|
355
280
|
ChatContainerMessagesListWithSchema.propTypes = listProps;
|
|
356
|
-
|
|
357
|
-
|
|
281
|
+
export {
|
|
282
|
+
ChatContainerMessagesList,
|
|
283
|
+
ChatContainerMessagesListWithSchema
|
|
284
|
+
};
|
|
285
|
+
//# sourceMappingURL=ChatContainerMessagesList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container-messages-list/ChatContainerMessagesList.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n/* eslint-disable max-lines */\nimport React, { CSSProperties } from 'react';\nimport { describe } from 'react-desc';\nimport { useVirtual } from 'react-virtual';\nimport DSButton from '@elliemae/ds-button';\nimport { debounce } from 'lodash';\nimport { ChatBubble, BUBBLE_TYPES } from '../bubble';\nimport { MessageDelimiter } from '../message-delimiter';\nimport { SystemMessage } from '../system-message';\nimport {\n StyledWrapperListItem,\n StyledChatContainerContentList,\n StyledChatContainerContentListScroll,\n StyledWrapper,\n StyledLoadMoreContainer,\n ListItem,\n} from './styled';\nimport { defaultProps, listProps, ChatContainerMessagesListProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\ntype getPaddingT = {\n hasMoreItems: string | undefined;\n bannerPosition: string | undefined;\n isLoading: string | undefined;\n};\nconst getPadding = ({ hasMoreItems, bannerPosition, isLoading }: getPaddingT) => {\n const padding = {\n paddingStart: 0,\n paddingEnd: -5,\n };\n if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'top')) padding.paddingStart = 42;\n else if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'bottom')) padding.paddingEnd = 42;\n return padding;\n};\n\nconst ChatContainerMessagesList = (props: ChatContainerMessagesListProps): JSX.Element => {\n const {\n sendingText,\n bannerPosition,\n sendingMessages,\n messages,\n actionRef,\n onScrollEnds,\n getMoreMessages,\n hasMoreItems,\n isLoading,\n bannerRef,\n } = props;\n const pendingOnScroll = React.useRef(false);\n const loadMoreRef = React.useRef(null);\n const virtualListRef = React.useRef<HTMLDivElement>();\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n const {\n scrollToIndex: vScroll,\n totalSize,\n virtualItems,\n } = useVirtual({\n size: messages.length,\n parentRef: virtualListRef,\n overscan: 15,\n ...getPadding({ hasMoreItems, bannerPosition, isLoading }),\n estimateSize: React.useCallback(() => 80, []),\n });\n\n const debouncedScroll = React.useMemo(\n () =>\n debounce((): number[] => {\n console.log('debound');\n if (document.visibilityState === 'hidden') {\n pendingOnScroll.current = true;\n return [];\n }\n if (!virtualListRef.current) return [];\n pendingOnScroll.current = false;\n const { bottom, top } = virtualListRef.current?.getBoundingClientRect();\n\n const list = virtualListRef.current.querySelectorAll(\n '[data-element=\"chat-element-list-item\"]',\n ) as NodeListOf<HTMLDivElement>;\n const indexList = [];\n list.forEach((item: HTMLElement) => {\n const { top: itemTop } = item.getBoundingClientRect();\n\n const itemPadding = 10;\n if (itemTop + itemPadding < bottom && itemTop + itemPadding > top) indexList.push(item.dataset.index);\n });\n if (onScrollEnds) onScrollEnds(indexList);\n return indexList;\n }, 500),\n [onScrollEnds],\n );\n\n const onScrollStop = React.useCallback(debouncedScroll, [debouncedScroll]);\n\n const onlyFocus = React.useCallback((index: number) => {\n setTimeout(() => {\n (virtualListRef.current.querySelector(`[data-index=\"${index}\"]`) as HTMLDivElement).focus();\n }, 300);\n }, []);\n\n const scrollAndFocus = React.useCallback(\n (index: number, b = { align: 'center' }) => {\n vScroll(index, b);\n onlyFocus(index);\n onScrollStop();\n },\n [onScrollStop, onlyFocus, vScroll],\n );\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.scrollToIndex = (a, b = { align: 'center' }) => {\n vScroll(a, b as any);\n onScrollStop();\n };\n actionRef.current.getMessagesInView = onScrollStop;\n onScrollStop(); // init useMemo due to debounce use.\n actionRef.current.focusToIndex = (a, b = { align: 'center' } as ScrollToOptions) => {\n scrollAndFocus(a, b);\n };\n actionRef.current.focusToIndexWithoutScroll = onlyFocus;\n actionRef.current.focusToList = () => {\n virtualListRef.current?.focus();\n };\n }\n }, [actionRef, onScrollStop, onlyFocus, scrollAndFocus, vScroll]);\n\n const handleKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n const index = Number(e.currentTarget.dataset.index);\n e.stopPropagation();\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (index > 0) {\n (virtualListRef.current?.querySelector(`[data-index=\"${index - 1}\"]`) as HTMLDivElement).focus();\n } else if (hasMoreItems === 'top') {\n loadMoreRef.current?.focus();\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (index < messages.length - 1) {\n (virtualListRef.current.querySelector(`[data-index=\"${index + 1}\"]`) as HTMLDivElement).focus();\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n // e.preventDefault();\n // loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n if (bannerPosition) {\n e.preventDefault();\n bannerRef.current.focusOnWrapper();\n }\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus],\n );\n const handleListKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (document.activeElement !== loadMoreRef.current) {\n onlyFocus(onScrollStop().shift());\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (document.activeElement === loadMoreRef.current) {\n (virtualListRef.current.querySelector(`[data-index=\"0\"]`) as HTMLDivElement).focus();\n } else {\n onlyFocus(onScrollStop().pop());\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (document.activeElement !== loadMoreRef.current) {\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n }\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus],\n );\n\n const checkPendingOnScroll = React.useCallback(() => {\n if (pendingOnScroll.current === true) onScrollStop();\n }, [onScrollStop]);\n\n React.useEffect(() => {\n let handlerCallback = null;\n const localVirtualRef = virtualListRef.current;\n const onScroll = () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n handlerCallback = setTimeout(onScrollStop, 300);\n };\n if (onScrollEnds) {\n virtualListRef.current.addEventListener('scroll', onScroll);\n }\n document.addEventListener('visibilitychange', checkPendingOnScroll);\n return () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);\n document.removeEventListener('visibilitychange', checkPendingOnScroll);\n };\n }, [onScrollStop, onScrollEnds, checkPendingOnScroll]);\n\n const render = React.useMemo(\n () =>\n virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const row = messages[index];\n const isSending = sendingMessages && sendingMessages.find((m) => m === row.dsId);\n const style: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `translateY(${start}px)`,\n width: '100%',\n };\n\n return (\n <ListItem\n data-element=\"chat-element-list-item\"\n data-index={index}\n key={`ds-chat-bubble-${index}-${row.dsId}-${row.type}`}\n style={style}\n ref={measureRef}\n tabIndex={-1}\n onKeyDown={handleKey}\n role=\"listitem\"\n >\n <StyledWrapperListItem type={row.type}>\n {row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? (\n // eslint-disable-next-line eslint-comments/no-unlimited-disable\n <ChatBubble {...(row as any)} helpMessage={isSending ? sendingText : row.helpMessage} />\n ) : null}\n {row.type === BUBBLE_TYPES.DELIMITER ? <MessageDelimiter {...(row as any)} /> : null}\n {row.type === BUBBLE_TYPES.SYSTEM ? <SystemMessage {...(row as any)} /> : null}\n </StyledWrapperListItem>\n </ListItem>\n );\n }),\n [virtualItems, messages, sendingMessages, handleKey, sendingText],\n );\n\n return (\n <StyledWrapper>\n <StyledChatContainerContentList\n data-testid=\"chat-thread-container\"\n tabIndex={0}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n ref={virtualListRef}\n role=\"list\"\n onKeyDown={handleListKey}\n >\n <StyledChatContainerContentListScroll height={`${totalSize}px`}>\n {!isLoading && hasMoreItems ? (\n <StyledLoadMoreContainer hasMoreItems={hasMoreItems}>\n <DSButton\n labelText=\"Load More\"\n buttonType=\"secondary\"\n onClick={getMoreMessages}\n data-testid=\"ds-chat-load-more-btn\"\n innerRef={loadMoreRef}\n />\n </StyledLoadMoreContainer>\n ) : null}\n {render}\n </StyledChatContainerContentListScroll>\n </StyledChatContainerContentList>\n </StyledWrapper>\n );\n};\n\nChatContainerMessagesList.propTypes = listProps;\nChatContainerMessagesList.defaultProps = defaultProps;\nconst ChatContainerMessagesListWithSchema = describe(ChatContainerMessagesList);\nChatContainerMessagesListWithSchema.propTypes = listProps;\n\nexport { ChatContainerMessagesList, ChatContainerMessagesListWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA;ACGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAQ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,aAAa,YAAY,qCAAC,kBAAD;AAAA,SAAuB;AAAA,SAAkB,MAC/E,IAAI,SAAS,aAAa,SAAS,qCAAC,eAAD;AAAA,SAAoB;AAAA,SAAkB;AAAA,MAKpF,CAAC,cAAc,UAAU,iBAAiB,WAAW;AAGvD,SACE,qCAAC,eAAD,MACE,qCAAC,gCAAD;AAAA,IACE,eAAY;AAAA,IACZ,UAAU;AAAA,IACV,aAAU;AAAA,IACV,iBAAc;AAAA,IACd,KAAK;AAAA,IACL,MAAK;AAAA,IACL,WAAW;AAAA,KAEX,qCAAC,sCAAD;AAAA,IAAsC,QAAQ,GAAG;AAAA,KAC9C,CAAC,aAAa,eACb,qCAAC,yBAAD;AAAA,IAAyB;AAAA,KACvB,qCAAC,UAAD;AAAA,IACE,WAAU;AAAA,IACV,YAAW;AAAA,IACX,SAAS;AAAA,IACT,eAAY;AAAA,IACZ,UAAU;AAAA,QAGZ,MACH;AAAA;AAOX,0BAA0B,YAAY;AACtC,0BAA0B,eAAe;AACzC,MAAM,sCAAsC,SAAS;AACrD,oCAAoC,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
3
|
const useValidateProps = (props, propTypes) => {
|
|
4
4
|
useValidateTypescriptPropTypes(props, propTypes);
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export {
|
|
7
|
+
useValidateProps
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/chat-container-messages-list/config/useValidateProps.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerMessagesListProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerMessagesListProps, propTypes: unknown): void => {\n useValidateTypescriptPropTypes(props, propTypes);\n};\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAAuC,cAA6B;AACnG,iCAA+B,OAAO;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
ChatContainerMessagesList,
|
|
4
|
+
ChatContainerMessagesListWithSchema
|
|
5
|
+
} from "./ChatContainerMessagesList";
|
|
6
|
+
export {
|
|
7
|
+
ChatContainerMessagesList,
|
|
8
|
+
ChatContainerMessagesListWithSchema
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container-messages-list/index.ts"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export {\n ChatContainerMessagesList,\n ChatContainerMessagesListWithSchema,\n} from './ChatContainerMessagesList';\n"],
|
|
5
|
+
"mappings": "AAAA;ACAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PropTypes } from "react-desc";
|
|
3
|
+
import { noop } from "lodash";
|
|
4
4
|
const defaultProps = {
|
|
5
5
|
messages: [],
|
|
6
6
|
actionRef: noop,
|
|
7
7
|
onScrollEnds: () => [],
|
|
8
8
|
getMoreMessages: noop,
|
|
9
|
-
sendingMessages:
|
|
10
|
-
sendingText:
|
|
11
|
-
bannerPosition:
|
|
12
|
-
bannerRef:
|
|
9
|
+
sendingMessages: void 0,
|
|
10
|
+
sendingText: "Sending",
|
|
11
|
+
bannerPosition: void 0,
|
|
12
|
+
bannerRef: void 0
|
|
13
13
|
};
|
|
14
14
|
const listProps = {
|
|
15
|
-
messages: PropTypes.arrayOf(PropTypes.object).description(
|
|
16
|
-
actionRef: PropTypes.object.description(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
messages: PropTypes.arrayOf(PropTypes.object).description("The array of out-of-the-box items you want to render inside the ChatMessageList").defaultValue(defaultProps.messages),
|
|
16
|
+
actionRef: PropTypes.object.description(`Reference:
|
|
17
|
+
{
|
|
18
|
+
scrollToIndex: (n: number) => void,
|
|
19
|
+
getMessagesInView: () => number[],
|
|
20
|
+
focusToIndex: (n: number) => void,
|
|
21
|
+
focusToIndexWithoutScroll: (n: number) => void,
|
|
22
|
+
focusToList: () => void,
|
|
23
|
+
focusToComposer: () => void,
|
|
24
|
+
focusToSend: () => void,
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
`).defaultValue(defaultProps.actionRef),
|
|
28
|
+
onScrollEnds: PropTypes.func.description(`Called when the scroll stops.`),
|
|
29
|
+
isLoading: PropTypes.oneOf(["top", "bottom", void 0]).description("Keeps the load more space while the loading is in progress"),
|
|
30
|
+
hasMoreItems: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Load More button at the `top` or `bottom` of the container"),
|
|
31
|
+
getMoreMessages: PropTypes.func.description("Called when the user clicks on load more").defaultValue(defaultProps.getMoreMessages),
|
|
32
|
+
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description("Array of ids of sending messages").defaultValue(defaultProps.sendingMessages),
|
|
33
|
+
sendingText: PropTypes.string.description("Label description for messages in sending status").defaultValue(defaultProps.sendingText)
|
|
23
34
|
};
|
|
24
|
-
|
|
25
|
-
|
|
35
|
+
export {
|
|
36
|
+
defaultProps,
|
|
37
|
+
listProps
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=props.js.map
|