@elliemae/ds-chat 1.57.1 → 2.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.js +0 -1
- package/cjs/index.js +37 -94
- package/cjs/parts/bubble/ChatBubble.js +35 -42
- package/cjs/parts/bubble/ChatBubbleArrow.js +67 -73
- package/cjs/parts/bubble/config/useValidateProps.js +2 -3
- package/cjs/parts/bubble/index.js +5 -17
- package/cjs/parts/bubble/props.js +5 -6
- package/cjs/parts/bubble/styled.js +14 -38
- package/cjs/parts/chat-card/ChatCard.js +24 -25
- package/cjs/parts/chat-card/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-card/index.js +3 -13
- package/cjs/parts/chat-card/props.js +1 -2
- package/cjs/parts/chat-card/styled.js +7 -12
- package/cjs/parts/chat-composer/ChatContainerComposer.js +65 -77
- package/cjs/parts/chat-composer/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-composer/index.js +3 -17
- package/cjs/parts/chat-composer/props.js +2 -5
- package/cjs/parts/chat-composer/styled.js +10 -31
- package/cjs/parts/chat-container/ChatContainer.js +89 -106
- package/cjs/parts/chat-container/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-container/index.js +3 -43
- package/cjs/parts/chat-container/props.js +6 -7
- package/cjs/parts/chat-container/styled.js +10 -32
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +15 -15
- package/cjs/parts/chat-container-header/styled.js +6 -13
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +114 -125
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-container-messages-list/index.js +3 -32
- package/cjs/parts/chat-container-messages-list/props.js +3 -6
- package/cjs/parts/chat-container-messages-list/styled.js +12 -47
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +38 -37
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-empty-state/props.js +2 -3
- package/cjs/parts/chat-empty-state/styled.js +4 -7
- package/cjs/parts/chat-sidebar/SideBarChat.js +50 -60
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +1 -2
- package/cjs/parts/chat-sidebar/index.js +3 -26
- package/cjs/parts/chat-sidebar/props.js +3 -8
- package/cjs/parts/chat-sidebar/styled.js +4 -9
- package/cjs/parts/floating-button/FloatingButton.js +17 -20
- package/cjs/parts/floating-button/index.js +2 -10
- package/cjs/parts/floating-button/props.js +2 -3
- package/cjs/parts/floating-button/styled.js +5 -18
- package/cjs/parts/floating-container/styled.js +2 -5
- package/cjs/parts/grid-influencer/InfluencerContainer.js +11 -65
- package/cjs/parts/grid-influencer/styled.js +4 -17
- package/cjs/parts/message-delimiter/MessageDelimiter.js +23 -22
- package/cjs/parts/message-delimiter/config/useValidateProps.js +1 -2
- package/cjs/parts/message-delimiter/index.js +3 -12
- package/cjs/parts/message-delimiter/props.js +2 -3
- package/cjs/parts/message-delimiter/styled.js +5 -16
- package/cjs/parts/sidebar-button/SidebarButton.js +31 -30
- package/cjs/parts/sidebar-button/index.js +0 -1
- package/cjs/parts/sidebar-button/props.js +6 -6
- package/cjs/parts/sidebar-button/styled.js +4 -11
- package/cjs/parts/system-message/SystemMessage.js +25 -24
- package/cjs/parts/system-message/config/useValidateProps.js +1 -2
- package/cjs/parts/system-message/index.js +3 -12
- package/cjs/parts/system-message/props.js +2 -3
- package/cjs/parts/system-message/style.js +9 -26
- package/cjs/parts/tile-button/TileButton.js +85 -82
- package/cjs/parts/tile-button/config/useValidateProps.js +1 -2
- package/cjs/parts/tile-button/index.js +3 -15
- package/cjs/parts/tile-button/props.js +10 -11
- package/cjs/parts/tile-button/styled.js +18 -67
- package/cjs/prop-types.js +2 -3
- package/cjs/styled.js +6 -7
- package/esm/index.d.js +0 -1
- package/esm/index.js +0 -57
- package/esm/parts/bubble/ChatBubble.js +27 -35
- package/esm/parts/bubble/ChatBubbleArrow.js +65 -71
- package/esm/parts/bubble/config/useValidateProps.js +2 -3
- package/esm/parts/bubble/index.js +0 -12
- package/esm/parts/bubble/props.js +4 -5
- package/esm/parts/bubble/styled.js +13 -37
- package/esm/parts/chat-card/ChatCard.js +18 -19
- package/esm/parts/chat-card/config/useValidateProps.js +1 -2
- package/esm/parts/chat-card/index.js +0 -10
- package/esm/parts/chat-card/props.js +1 -2
- package/esm/parts/chat-card/styled.js +7 -12
- package/esm/parts/chat-composer/ChatContainerComposer.js +56 -69
- package/esm/parts/chat-composer/config/useValidateProps.js +1 -2
- package/esm/parts/chat-composer/index.js +0 -14
- package/esm/parts/chat-composer/props.js +2 -5
- package/esm/parts/chat-composer/styled.js +9 -30
- package/esm/parts/chat-container/ChatContainer.js +79 -97
- package/esm/parts/chat-container/config/useValidateProps.js +1 -2
- package/esm/parts/chat-container/index.js +0 -40
- package/esm/parts/chat-container/props.js +2 -3
- package/esm/parts/chat-container/styled.js +6 -28
- package/esm/parts/chat-container-header/ChatContainerHeader.js +13 -14
- package/esm/parts/chat-container-header/styled.js +6 -13
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +102 -113
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +1 -2
- package/esm/parts/chat-container-messages-list/index.js +0 -29
- package/esm/parts/chat-container-messages-list/props.js +3 -6
- package/esm/parts/chat-container-messages-list/styled.js +11 -46
- package/esm/parts/chat-empty-state/ChatEmptyState.js +30 -30
- package/esm/parts/chat-empty-state/config/useValidateProps.js +1 -2
- package/esm/parts/chat-empty-state/props.js +2 -3
- package/esm/parts/chat-empty-state/styled.js +4 -7
- package/esm/parts/chat-sidebar/SideBarChat.js +38 -50
- package/esm/parts/chat-sidebar/config/useValidateProps.js +1 -2
- package/esm/parts/chat-sidebar/index.js +0 -23
- package/esm/parts/chat-sidebar/props.js +3 -8
- package/esm/parts/chat-sidebar/styled.js +4 -9
- package/esm/parts/floating-button/FloatingButton.js +13 -17
- package/esm/parts/floating-button/index.js +0 -8
- package/esm/parts/floating-button/props.js +2 -3
- package/esm/parts/floating-button/styled.js +5 -18
- package/esm/parts/floating-container/styled.js +2 -5
- package/esm/parts/grid-influencer/InfluencerContainer.js +7 -62
- package/esm/parts/grid-influencer/styled.js +4 -17
- package/esm/parts/message-delimiter/MessageDelimiter.js +16 -15
- package/esm/parts/message-delimiter/config/useValidateProps.js +1 -2
- package/esm/parts/message-delimiter/index.js +0 -9
- package/esm/parts/message-delimiter/props.js +2 -3
- package/esm/parts/message-delimiter/styled.js +5 -16
- package/esm/parts/sidebar-button/SidebarButton.js +26 -26
- package/esm/parts/sidebar-button/index.js +0 -1
- package/esm/parts/sidebar-button/props.js +3 -4
- package/esm/parts/sidebar-button/styled.js +4 -11
- package/esm/parts/system-message/SystemMessage.js +18 -17
- package/esm/parts/system-message/config/useValidateProps.js +1 -2
- package/esm/parts/system-message/index.js +0 -9
- package/esm/parts/system-message/props.js +2 -3
- package/esm/parts/system-message/style.js +9 -26
- package/esm/parts/tile-button/TileButton.js +76 -76
- package/esm/parts/tile-button/config/useValidateProps.js +1 -2
- package/esm/parts/tile-button/index.js +0 -12
- package/esm/parts/tile-button/props.js +5 -10
- package/esm/parts/tile-button/styled.js +18 -67
- package/esm/prop-types.js +2 -3
- package/esm/styled.js +6 -7
- package/package.json +289 -18
- package/types/index.d.d.ts +37 -0
- package/types/index.d.ts +13 -0
- package/types/parts/bubble/ChatBubble.d.ts +17 -0
- package/types/parts/bubble/ChatBubbleArrow.d.ts +8 -0
- package/types/parts/bubble/config/useValidateProps.d.ts +2 -0
- package/types/parts/bubble/index.d.ts +2 -0
- package/types/parts/bubble/props.d.ts +43 -0
- package/types/parts/bubble/styled.d.ts +10 -0
- package/types/parts/chat-card/ChatCard.d.ts +13 -0
- package/types/parts/chat-card/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-card/index.d.ts +1 -0
- package/types/parts/chat-card/props.d.ts +13 -0
- package/types/parts/chat-card/styled.d.ts +7 -0
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +22 -0
- package/types/parts/chat-composer/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-composer/index.d.ts +1 -0
- package/types/parts/chat-composer/props.d.ts +35 -0
- package/types/parts/chat-composer/styled.d.ts +64 -0
- package/types/parts/chat-container/ChatContainer.d.ts +22 -0
- package/types/parts/chat-container/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-container/index.d.ts +1 -0
- package/types/parts/chat-container/props.d.ts +39 -0
- package/types/parts/chat-container/styled.d.ts +8 -0
- package/types/parts/chat-container-header/ChatContainerHeader.d.ts +2 -0
- package/types/parts/chat-container-header/styled.d.ts +4 -0
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +18 -0
- package/types/parts/chat-container-messages-list/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-container-messages-list/index.d.ts +1 -0
- package/types/parts/chat-container-messages-list/props.d.ts +23 -0
- package/types/parts/chat-container-messages-list/styled.d.ts +11 -0
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +12 -0
- package/types/parts/chat-empty-state/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-empty-state/props.d.ts +10 -0
- package/types/parts/chat-empty-state/styled.d.ts +4 -0
- package/types/parts/chat-sidebar/SideBarChat.d.ts +18 -0
- package/types/parts/chat-sidebar/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-sidebar/index.d.ts +1 -0
- package/types/parts/chat-sidebar/props.d.ts +22 -0
- package/types/parts/chat-sidebar/styled.d.ts +3 -0
- package/types/parts/floating-button/FloatingButton.d.ts +9 -0
- package/types/parts/floating-button/index.d.ts +1 -0
- package/types/parts/floating-button/props.d.ts +7 -0
- package/types/parts/floating-button/styled.d.ts +1 -0
- package/types/parts/floating-container/styled.d.ts +2 -0
- package/types/parts/grid-influencer/InfluencerContainer.d.ts +2 -0
- package/types/parts/grid-influencer/styled.d.ts +3 -0
- package/types/parts/message-delimiter/MessageDelimiter.d.ts +14 -0
- package/types/parts/message-delimiter/config/useValidateProps.d.ts +2 -0
- package/types/parts/message-delimiter/index.d.ts +1 -0
- package/types/parts/message-delimiter/props.d.ts +13 -0
- package/types/parts/message-delimiter/styled.d.ts +6 -0
- package/types/parts/sidebar-button/SidebarButton.d.ts +13 -0
- package/types/parts/sidebar-button/index.d.ts +0 -0
- package/types/parts/sidebar-button/props.d.ts +18 -0
- package/types/parts/sidebar-button/styled.d.ts +4 -0
- package/types/parts/system-message/SystemMessage.d.ts +13 -0
- package/types/parts/system-message/config/useValidateProps.d.ts +2 -0
- package/types/parts/system-message/index.d.ts +1 -0
- package/types/parts/system-message/props.d.ts +11 -0
- package/types/parts/system-message/style.d.ts +7 -0
- package/types/parts/tile-button/TileButton.d.ts +26 -0
- package/types/parts/tile-button/config/useValidateProps.d.ts +2 -0
- package/types/parts/tile-button/index.d.ts +1 -0
- package/types/parts/tile-button/props.d.ts +40 -0
- package/types/parts/tile-button/styled.d.ts +10 -0
- package/types/prop-types.d.ts +14 -0
- package/types/styled.d.ts +6 -0
- package/cjs/index.d.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/parts/bubble/ChatBubble.js.map +0 -1
- package/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -1
- package/cjs/parts/bubble/config/useValidateProps.js.map +0 -1
- package/cjs/parts/bubble/index.js.map +0 -1
- package/cjs/parts/bubble/props.js.map +0 -1
- package/cjs/parts/bubble/styled.js.map +0 -1
- package/cjs/parts/chat-card/ChatCard.js.map +0 -1
- package/cjs/parts/chat-card/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-card/index.js.map +0 -1
- package/cjs/parts/chat-card/props.js.map +0 -1
- package/cjs/parts/chat-card/styled.js.map +0 -1
- package/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -1
- package/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-composer/index.js.map +0 -1
- package/cjs/parts/chat-composer/props.js.map +0 -1
- package/cjs/parts/chat-composer/styled.js.map +0 -1
- package/cjs/parts/chat-container/ChatContainer.js.map +0 -1
- package/cjs/parts/chat-container/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-container/index.js.map +0 -1
- package/cjs/parts/chat-container/props.js.map +0 -1
- package/cjs/parts/chat-container/styled.js.map +0 -1
- package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -1
- package/cjs/parts/chat-container-header/helpers.js +0 -28
- package/cjs/parts/chat-container-header/helpers.js.map +0 -1
- package/cjs/parts/chat-container-header/styled.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/index.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/props.js.map +0 -1
- package/cjs/parts/chat-container-messages-list/styled.js.map +0 -1
- package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -1
- package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-empty-state/props.js.map +0 -1
- package/cjs/parts/chat-empty-state/styled.js.map +0 -1
- package/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -1
- package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -1
- package/cjs/parts/chat-sidebar/index.js.map +0 -1
- package/cjs/parts/chat-sidebar/props.js.map +0 -1
- package/cjs/parts/chat-sidebar/styled.js.map +0 -1
- package/cjs/parts/floating-button/FloatingButton.js.map +0 -1
- package/cjs/parts/floating-button/index.js.map +0 -1
- package/cjs/parts/floating-button/props.js.map +0 -1
- package/cjs/parts/floating-button/styled.js.map +0 -1
- package/cjs/parts/floating-container/styled.js.map +0 -1
- package/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -1
- package/cjs/parts/grid-influencer/styled.js.map +0 -1
- package/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -1
- package/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -1
- package/cjs/parts/message-delimiter/index.js.map +0 -1
- package/cjs/parts/message-delimiter/props.js.map +0 -1
- package/cjs/parts/message-delimiter/styled.js.map +0 -1
- package/cjs/parts/sidebar-button/SidebarButton.js.map +0 -1
- package/cjs/parts/sidebar-button/index.js.map +0 -1
- package/cjs/parts/sidebar-button/props.js.map +0 -1
- package/cjs/parts/sidebar-button/styled.js.map +0 -1
- package/cjs/parts/system-message/SystemMessage.js.map +0 -1
- package/cjs/parts/system-message/config/useValidateProps.js.map +0 -1
- package/cjs/parts/system-message/index.js.map +0 -1
- package/cjs/parts/system-message/props.js.map +0 -1
- package/cjs/parts/system-message/style.js.map +0 -1
- package/cjs/parts/tile-button/TileButton.js.map +0 -1
- package/cjs/parts/tile-button/config/useValidateProps.js.map +0 -1
- package/cjs/parts/tile-button/index.js.map +0 -1
- package/cjs/parts/tile-button/props.js.map +0 -1
- package/cjs/parts/tile-button/styled.js.map +0 -1
- package/cjs/prop-types.js.map +0 -1
- package/cjs/styled.js.map +0 -1
- package/esm/index.d.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/parts/bubble/ChatBubble.js.map +0 -1
- package/esm/parts/bubble/ChatBubbleArrow.js.map +0 -1
- package/esm/parts/bubble/config/useValidateProps.js.map +0 -1
- package/esm/parts/bubble/index.js.map +0 -1
- package/esm/parts/bubble/props.js.map +0 -1
- package/esm/parts/bubble/styled.js.map +0 -1
- package/esm/parts/chat-card/ChatCard.js.map +0 -1
- package/esm/parts/chat-card/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-card/index.js.map +0 -1
- package/esm/parts/chat-card/props.js.map +0 -1
- package/esm/parts/chat-card/styled.js.map +0 -1
- package/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -1
- package/esm/parts/chat-composer/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-composer/index.js.map +0 -1
- package/esm/parts/chat-composer/props.js.map +0 -1
- package/esm/parts/chat-composer/styled.js.map +0 -1
- package/esm/parts/chat-container/ChatContainer.js.map +0 -1
- package/esm/parts/chat-container/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-container/index.js.map +0 -1
- package/esm/parts/chat-container/props.js.map +0 -1
- package/esm/parts/chat-container/styled.js.map +0 -1
- package/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -1
- package/esm/parts/chat-container-header/helpers.js +0 -20
- package/esm/parts/chat-container-header/helpers.js.map +0 -1
- package/esm/parts/chat-container-header/styled.js.map +0 -1
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -1
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-container-messages-list/index.js.map +0 -1
- package/esm/parts/chat-container-messages-list/props.js.map +0 -1
- package/esm/parts/chat-container-messages-list/styled.js.map +0 -1
- package/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -1
- package/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-empty-state/props.js.map +0 -1
- package/esm/parts/chat-empty-state/styled.js.map +0 -1
- package/esm/parts/chat-sidebar/SideBarChat.js.map +0 -1
- package/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -1
- package/esm/parts/chat-sidebar/index.js.map +0 -1
- package/esm/parts/chat-sidebar/props.js.map +0 -1
- package/esm/parts/chat-sidebar/styled.js.map +0 -1
- package/esm/parts/floating-button/FloatingButton.js.map +0 -1
- package/esm/parts/floating-button/index.js.map +0 -1
- package/esm/parts/floating-button/props.js.map +0 -1
- package/esm/parts/floating-button/styled.js.map +0 -1
- package/esm/parts/floating-container/styled.js.map +0 -1
- package/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -1
- package/esm/parts/grid-influencer/styled.js.map +0 -1
- package/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -1
- package/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -1
- package/esm/parts/message-delimiter/index.js.map +0 -1
- package/esm/parts/message-delimiter/props.js.map +0 -1
- package/esm/parts/message-delimiter/styled.js.map +0 -1
- package/esm/parts/sidebar-button/SidebarButton.js.map +0 -1
- package/esm/parts/sidebar-button/index.js.map +0 -1
- package/esm/parts/sidebar-button/props.js.map +0 -1
- package/esm/parts/sidebar-button/styled.js.map +0 -1
- package/esm/parts/system-message/SystemMessage.js.map +0 -1
- package/esm/parts/system-message/config/useValidateProps.js.map +0 -1
- package/esm/parts/system-message/index.js.map +0 -1
- package/esm/parts/system-message/props.js.map +0 -1
- package/esm/parts/system-message/style.js.map +0 -1
- package/esm/parts/tile-button/TileButton.js.map +0 -1
- package/esm/parts/tile-button/config/useValidateProps.js.map +0 -1
- package/esm/parts/tile-button/index.js.map +0 -1
- package/esm/parts/tile-button/props.js.map +0 -1
- package/esm/parts/tile-button/styled.js.map +0 -1
- package/esm/prop-types.js.map +0 -1
- package/esm/styled.js.map +0 -1
- package/parts/bubble/ChatBubble/package.json +0 -10
- package/parts/bubble/ChatBubbleArrow/package.json +0 -10
- package/parts/bubble/config/useValidateProps/package.json +0 -10
- package/parts/bubble/package.json +0 -10
- package/parts/bubble/props/package.json +0 -10
- package/parts/bubble/styled/package.json +0 -10
- package/parts/chat-card/ChatCard/package.json +0 -10
- package/parts/chat-card/config/useValidateProps/package.json +0 -10
- package/parts/chat-card/package.json +0 -10
- package/parts/chat-card/props/package.json +0 -10
- package/parts/chat-card/styled/package.json +0 -10
- package/parts/chat-composer/ChatContainerComposer/package.json +0 -10
- package/parts/chat-composer/config/useValidateProps/package.json +0 -10
- package/parts/chat-composer/package.json +0 -10
- package/parts/chat-composer/props/package.json +0 -10
- package/parts/chat-composer/styled/package.json +0 -10
- package/parts/chat-container/ChatContainer/package.json +0 -10
- package/parts/chat-container/config/useValidateProps/package.json +0 -10
- package/parts/chat-container/package.json +0 -10
- package/parts/chat-container/props/package.json +0 -10
- package/parts/chat-container/styled/package.json +0 -10
- package/parts/chat-container-header/ChatContainerHeader/package.json +0 -10
- package/parts/chat-container-header/helpers/package.json +0 -10
- package/parts/chat-container-header/styled/package.json +0 -10
- package/parts/chat-container-messages-list/ChatContainerMessagesList/package.json +0 -10
- package/parts/chat-container-messages-list/config/useValidateProps/package.json +0 -10
- package/parts/chat-container-messages-list/package.json +0 -10
- package/parts/chat-container-messages-list/props/package.json +0 -10
- package/parts/chat-container-messages-list/styled/package.json +0 -10
- package/parts/chat-empty-state/ChatEmptyState/package.json +0 -10
- package/parts/chat-empty-state/config/useValidateProps/package.json +0 -10
- package/parts/chat-empty-state/props/package.json +0 -10
- package/parts/chat-empty-state/styled/package.json +0 -10
- package/parts/chat-sidebar/SideBarChat/package.json +0 -10
- package/parts/chat-sidebar/config/useValidateProps/package.json +0 -10
- package/parts/chat-sidebar/package.json +0 -10
- package/parts/chat-sidebar/props/package.json +0 -10
- package/parts/chat-sidebar/styled/package.json +0 -10
- package/parts/floating-button/FloatingButton/package.json +0 -10
- package/parts/floating-button/package.json +0 -10
- package/parts/floating-button/props/package.json +0 -10
- package/parts/floating-button/styled/package.json +0 -10
- package/parts/floating-container/styled/package.json +0 -10
- package/parts/grid-influencer/InfluencerContainer/package.json +0 -10
- package/parts/grid-influencer/styled/package.json +0 -10
- package/parts/message-delimiter/MessageDelimiter/package.json +0 -10
- package/parts/message-delimiter/config/useValidateProps/package.json +0 -10
- package/parts/message-delimiter/package.json +0 -10
- package/parts/message-delimiter/props/package.json +0 -10
- package/parts/message-delimiter/styled/package.json +0 -10
- package/parts/sidebar-button/SidebarButton/package.json +0 -10
- package/parts/sidebar-button/package.json +0 -10
- package/parts/sidebar-button/props/package.json +0 -10
- package/parts/sidebar-button/styled/package.json +0 -10
- package/parts/system-message/SystemMessage/package.json +0 -10
- package/parts/system-message/config/useValidateProps/package.json +0 -10
- package/parts/system-message/package.json +0 -10
- package/parts/system-message/props/package.json +0 -10
- package/parts/system-message/style/package.json +0 -10
- package/parts/tile-button/TileButton/package.json +0 -10
- package/parts/tile-button/config/useValidateProps/package.json +0 -10
- package/parts/tile-button/package.json +0 -10
- package/parts/tile-button/props/package.json +0 -10
- package/parts/tile-button/styled/package.json +0 -10
- package/prop-types/package.json +0 -10
- package/styled/package.json +0 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { describe } from 'react-desc';
|
|
5
5
|
import { useVirtual } from 'react-virtual';
|
|
6
|
-
import DSButton from '@elliemae/ds-
|
|
6
|
+
import DSButton from '@elliemae/ds-basic/Button';
|
|
7
7
|
import { ChatBubble } from '../bubble/ChatBubble.js';
|
|
8
8
|
import { BUBBLE_TYPES } from '../bubble/props.js';
|
|
9
9
|
import { MessageDelimiter } from '../message-delimiter/MessageDelimiter.js';
|
|
@@ -11,28 +11,14 @@ import { SystemMessage } from '../system-message/SystemMessage.js';
|
|
|
11
11
|
import { ListItem, StyledWrapperListItem, StyledWrapper, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer } from './styled.js';
|
|
12
12
|
import { listProps, defaultProps } from './props.js';
|
|
13
13
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
14
|
-
import '
|
|
15
|
-
import '../bubble/styled.js';
|
|
16
|
-
import 'styled-components';
|
|
17
|
-
import '@elliemae/ds-grid';
|
|
18
|
-
import '../bubble/config/useValidateProps.js';
|
|
19
|
-
import '@elliemae/ds-props-helpers';
|
|
20
|
-
import '../bubble/ChatBubbleArrow.js';
|
|
21
|
-
import 'prop-types';
|
|
22
|
-
import 'lodash';
|
|
23
|
-
import '../message-delimiter/styled.js';
|
|
24
|
-
import '../message-delimiter/props.js';
|
|
25
|
-
import '../message-delimiter/config/useValidateProps.js';
|
|
26
|
-
import '../system-message/style.js';
|
|
27
|
-
import '../system-message/props.js';
|
|
28
|
-
import '../system-message/config/useValidateProps.js';
|
|
14
|
+
import { jsx } from 'react/jsx-runtime';
|
|
29
15
|
|
|
30
16
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
17
|
|
|
32
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
33
19
|
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
const getPadding = hasMoreItems => {
|
|
21
|
+
const padding = {
|
|
36
22
|
paddingStart: 0,
|
|
37
23
|
paddingEnd: -5
|
|
38
24
|
};
|
|
@@ -40,81 +26,87 @@ var getPadding = function getPadding(hasMoreItems) {
|
|
|
40
26
|
return padding;
|
|
41
27
|
};
|
|
42
28
|
|
|
43
|
-
|
|
29
|
+
const ChatContainerMessagesList = props => {
|
|
44
30
|
useValidateProps(props, ChatContainerMessagesListWithSchema.toTypescript());
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
const {
|
|
32
|
+
sendingText,
|
|
33
|
+
sendingMessages,
|
|
34
|
+
messages,
|
|
35
|
+
actionRef,
|
|
36
|
+
onScrollEnds,
|
|
37
|
+
getMoreMessages,
|
|
38
|
+
hasMoreItems,
|
|
39
|
+
isLoading
|
|
40
|
+
} = props;
|
|
41
|
+
const virtualListRef = React.useRef(); // estimateSize should not be really required given what was stated on
|
|
54
42
|
// https://github.com/tannerlinsley/react-virtual/issues/23
|
|
55
43
|
|
|
56
|
-
|
|
44
|
+
const {
|
|
45
|
+
scrollToIndex: vScroll,
|
|
46
|
+
totalSize,
|
|
47
|
+
virtualItems
|
|
48
|
+
} = useVirtual(_objectSpread(_objectSpread({
|
|
57
49
|
size: messages.length,
|
|
58
50
|
parentRef: virtualListRef,
|
|
59
51
|
overscan: 15
|
|
60
52
|
}, getPadding(hasMoreItems)), {}, {
|
|
61
|
-
estimateSize: React.useCallback(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
top
|
|
73
|
-
|
|
74
|
-
var list = virtualListRef.current.querySelectorAll('[data-element="chat-element-list-item"]');
|
|
75
|
-
var indexList = [];
|
|
76
|
-
list.forEach(function (item) {
|
|
77
|
-
var _item$getBoundingClie = item.getBoundingClientRect(),
|
|
78
|
-
itemTop = _item$getBoundingClie.top;
|
|
79
|
-
|
|
53
|
+
estimateSize: React.useCallback(() => 80, [])
|
|
54
|
+
}));
|
|
55
|
+
const onScrollStop = React.useCallback(() => {
|
|
56
|
+
const {
|
|
57
|
+
bottom,
|
|
58
|
+
top
|
|
59
|
+
} = virtualListRef.current.getBoundingClientRect();
|
|
60
|
+
const list = virtualListRef.current.querySelectorAll('[data-element="chat-element-list-item"]');
|
|
61
|
+
const indexList = [];
|
|
62
|
+
list.forEach(item => {
|
|
63
|
+
const {
|
|
64
|
+
top: itemTop
|
|
65
|
+
} = item.getBoundingClientRect();
|
|
80
66
|
if (itemTop < bottom && itemTop > top) indexList.push(item.dataset.index);
|
|
81
67
|
});
|
|
82
68
|
if (onScrollEnds) onScrollEnds(indexList);
|
|
83
69
|
return indexList;
|
|
84
70
|
}, [onScrollEnds]);
|
|
85
|
-
|
|
71
|
+
const scrollAndFocus = React.useCallback(index => {
|
|
86
72
|
vScroll(index, {
|
|
87
73
|
align: 'center'
|
|
88
74
|
});
|
|
89
|
-
setTimeout(
|
|
75
|
+
setTimeout(() => {
|
|
90
76
|
virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
|
|
91
77
|
}, 300);
|
|
92
78
|
}, [vScroll]);
|
|
93
|
-
React.useEffect(
|
|
79
|
+
React.useEffect(() => {
|
|
94
80
|
if (actionRef && actionRef.current) {
|
|
95
|
-
actionRef.current.scrollToIndex =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
81
|
+
actionRef.current.scrollToIndex = (a, b = {
|
|
82
|
+
align: 'center'
|
|
83
|
+
}) => {
|
|
99
84
|
vScroll(a, b);
|
|
100
85
|
};
|
|
101
86
|
|
|
102
87
|
actionRef.current.getMessagesInView = onScrollStop;
|
|
103
88
|
|
|
104
|
-
actionRef.current.focusToIndex =
|
|
89
|
+
actionRef.current.focusToIndex = (a, b = {
|
|
90
|
+
align: 'center'
|
|
91
|
+
}) => {
|
|
105
92
|
scrollAndFocus(a);
|
|
106
93
|
};
|
|
107
94
|
|
|
108
|
-
actionRef.current.focusToList =
|
|
109
|
-
|
|
110
|
-
|
|
95
|
+
actionRef.current.focusToList = (a, b = {
|
|
96
|
+
align: 'center'
|
|
97
|
+
}) => {
|
|
98
|
+
var _virtualListRef$curre;
|
|
99
|
+
|
|
100
|
+
(_virtualListRef$curre = virtualListRef.current) === null || _virtualListRef$curre === void 0 ? void 0 : _virtualListRef$curre.focus();
|
|
111
101
|
};
|
|
112
102
|
}
|
|
113
103
|
}, [actionRef, onScrollStop, scrollAndFocus, vScroll]);
|
|
114
|
-
|
|
104
|
+
const handleKey = React.useCallback(e => {
|
|
115
105
|
e.preventDefault();
|
|
116
|
-
|
|
117
|
-
|
|
106
|
+
const {
|
|
107
|
+
key
|
|
108
|
+
} = e;
|
|
109
|
+
const index = Number(e.currentTarget.dataset.index);
|
|
118
110
|
|
|
119
111
|
switch (key) {
|
|
120
112
|
case 'ArrowUp':
|
|
@@ -141,11 +133,11 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
|
|
|
141
133
|
break;
|
|
142
134
|
}
|
|
143
135
|
}, [actionRef, messages.length, scrollAndFocus]);
|
|
144
|
-
React.useEffect(
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
React.useEffect(() => {
|
|
137
|
+
let handlerCallback = null;
|
|
138
|
+
const localVirtualRef = virtualListRef.current;
|
|
147
139
|
|
|
148
|
-
|
|
140
|
+
const onScroll = () => {
|
|
149
141
|
if (handlerCallback) clearTimeout(handlerCallback);
|
|
150
142
|
handlerCallback = setTimeout(onScrollStop, 300);
|
|
151
143
|
};
|
|
@@ -154,68 +146,65 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
|
|
|
154
146
|
virtualListRef.current.addEventListener('scroll', onScroll);
|
|
155
147
|
}
|
|
156
148
|
|
|
157
|
-
return
|
|
149
|
+
return () => {
|
|
158
150
|
if (handlerCallback) clearTimeout(handlerCallback);
|
|
159
151
|
if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);
|
|
160
152
|
};
|
|
161
153
|
}, [onScrollStop, onScrollEnds]);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
role: "listitem"
|
|
187
|
-
}, /*#__PURE__*/React.createElement(StyledWrapperListItem, {
|
|
154
|
+
const render = React.useMemo(() => virtualItems.map(virtualItem => {
|
|
155
|
+
const {
|
|
156
|
+
index,
|
|
157
|
+
measureRef,
|
|
158
|
+
start
|
|
159
|
+
} = virtualItem;
|
|
160
|
+
const row = messages[index];
|
|
161
|
+
const isSending = sendingMessages && sendingMessages.find(m => m === row.dsId);
|
|
162
|
+
const style = {
|
|
163
|
+
position: 'absolute',
|
|
164
|
+
top: 0,
|
|
165
|
+
left: 0,
|
|
166
|
+
transform: "translateY(".concat(start, "px)"),
|
|
167
|
+
width: '100%'
|
|
168
|
+
};
|
|
169
|
+
return /*#__PURE__*/jsx(ListItem, {
|
|
170
|
+
"data-element": "chat-element-list-item",
|
|
171
|
+
"data-index": index,
|
|
172
|
+
style: style,
|
|
173
|
+
ref: measureRef,
|
|
174
|
+
tabIndex: 0,
|
|
175
|
+
onKeyDown: handleKey,
|
|
176
|
+
role: "listitem",
|
|
177
|
+
children: /*#__PURE__*/_jsx(StyledWrapperListItem, {
|
|
188
178
|
type: row.type
|
|
189
|
-
}, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ?
|
|
179
|
+
}, void 0, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ?
|
|
190
180
|
/*#__PURE__*/
|
|
191
181
|
// eslint-disable-next-line
|
|
192
|
-
|
|
182
|
+
jsx(ChatBubble, _objectSpread(_objectSpread({}, row), {}, {
|
|
193
183
|
helpMessage: isSending ? sendingText : row.helpMessage
|
|
194
|
-
})) : null, row.type === BUBBLE_TYPES.DELIMITER ? /*#__PURE__*/
|
|
195
|
-
});
|
|
196
|
-
}, [virtualItems, messages, sendingMessages, handleKey, sendingText]);
|
|
197
|
-
return /*#__PURE__*/
|
|
184
|
+
})) : null, row.type === BUBBLE_TYPES.DELIMITER ? /*#__PURE__*/jsx(MessageDelimiter, _objectSpread({}, row)) : null, row.type === BUBBLE_TYPES.SYSTEM ? /*#__PURE__*/jsx(SystemMessage, _objectSpread({}, row)) : null)
|
|
185
|
+
}, "ds-chat-bubble-".concat(index));
|
|
186
|
+
}), [virtualItems, messages, sendingMessages, handleKey, sendingText]);
|
|
187
|
+
return /*#__PURE__*/_jsx(StyledWrapper, {}, void 0, /*#__PURE__*/jsx(StyledChatContainerContentList, {
|
|
198
188
|
"data-testid": "chat-thread-container",
|
|
199
189
|
tabIndex: 0,
|
|
200
190
|
"aria-live": "polite",
|
|
201
191
|
ref: virtualListRef,
|
|
202
192
|
role: "list",
|
|
203
|
-
onKeyDown: handleKey
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
193
|
+
onKeyDown: handleKey,
|
|
194
|
+
children: /*#__PURE__*/_jsx(StyledChatContainerContentListScroll, {
|
|
195
|
+
height: "".concat(totalSize, "px")
|
|
196
|
+
}, void 0, render, !isLoading && hasMoreItems ? /*#__PURE__*/_jsx(StyledLoadMoreContainer, {
|
|
197
|
+
hasMoreItems: hasMoreItems
|
|
198
|
+
}, void 0, /*#__PURE__*/_jsx(DSButton, {
|
|
199
|
+
labelText: "Load More",
|
|
200
|
+
buttonType: "secondary",
|
|
201
|
+
onClick: getMoreMessages
|
|
202
|
+
})) : null)
|
|
203
|
+
}));
|
|
213
204
|
};
|
|
214
205
|
|
|
215
|
-
ChatContainerMessagesList.propTypes = listProps;
|
|
216
206
|
ChatContainerMessagesList.defaultProps = defaultProps;
|
|
217
|
-
|
|
207
|
+
const ChatContainerMessagesListWithSchema = describe(ChatContainerMessagesList);
|
|
218
208
|
ChatContainerMessagesListWithSchema.propTypes = listProps;
|
|
219
209
|
|
|
220
210
|
export { ChatContainerMessagesList, ChatContainerMessagesListWithSchema };
|
|
221
|
-
//# sourceMappingURL=ChatContainerMessagesList.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useValidateProps = (props, schema) => {
|
|
4
4
|
useValidateTypescriptPropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
8
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,30 +1 @@
|
|
|
1
1
|
export { ChatContainerMessagesList, ChatContainerMessagesListWithSchema } from './ChatContainerMessagesList.js';
|
|
2
|
-
import '@babel/runtime/helpers/esm/extends';
|
|
3
|
-
import '@babel/runtime/helpers/esm/defineProperty';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import 'react-virtual';
|
|
7
|
-
import '@elliemae/ds-button';
|
|
8
|
-
import '../bubble/ChatBubble.js';
|
|
9
|
-
import '@elliemae/ds-icons';
|
|
10
|
-
import '../bubble/styled.js';
|
|
11
|
-
import 'styled-components';
|
|
12
|
-
import '@elliemae/ds-grid';
|
|
13
|
-
import '../bubble/props.js';
|
|
14
|
-
import 'prop-types';
|
|
15
|
-
import 'lodash';
|
|
16
|
-
import '../bubble/config/useValidateProps.js';
|
|
17
|
-
import '@elliemae/ds-props-helpers';
|
|
18
|
-
import '../bubble/ChatBubbleArrow.js';
|
|
19
|
-
import '../message-delimiter/MessageDelimiter.js';
|
|
20
|
-
import '../message-delimiter/styled.js';
|
|
21
|
-
import '../message-delimiter/props.js';
|
|
22
|
-
import '../message-delimiter/config/useValidateProps.js';
|
|
23
|
-
import '../system-message/SystemMessage.js';
|
|
24
|
-
import '../system-message/style.js';
|
|
25
|
-
import '../system-message/props.js';
|
|
26
|
-
import '../system-message/config/useValidateProps.js';
|
|
27
|
-
import './styled.js';
|
|
28
|
-
import './props.js';
|
|
29
|
-
import './config/useValidateProps.js';
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
import { noop } from 'lodash';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const defaultProps = {
|
|
5
5
|
messages: [],
|
|
6
6
|
actionRef: noop,
|
|
7
|
-
onScrollEnds:
|
|
8
|
-
return [];
|
|
9
|
-
},
|
|
7
|
+
onScrollEnds: () => [],
|
|
10
8
|
getMoreMessages: noop,
|
|
11
9
|
sendingMessages: undefined,
|
|
12
10
|
sendingText: 'Sending'
|
|
13
11
|
};
|
|
14
|
-
|
|
12
|
+
const listProps = {
|
|
15
13
|
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
14
|
actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
|
|
17
15
|
onScrollEnds: PropTypes.func.description("Called when the scroll stops."),
|
|
@@ -23,4 +21,3 @@ var listProps = {
|
|
|
23
21
|
};
|
|
24
22
|
|
|
25
23
|
export { defaultProps, listProps };
|
|
26
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1,60 +1,25 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import '../bubble/ChatBubble.js';
|
|
3
3
|
import { BUBBLE_TYPES } from '../bubble/props.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-desc';
|
|
6
|
-
import '@elliemae/ds-icons';
|
|
7
|
-
import '../bubble/styled.js';
|
|
8
|
-
import '@elliemae/ds-grid';
|
|
9
|
-
import '../bubble/config/useValidateProps.js';
|
|
10
|
-
import '@elliemae/ds-props-helpers';
|
|
11
|
-
import '../bubble/ChatBubbleArrow.js';
|
|
12
|
-
import 'prop-types';
|
|
13
|
-
import 'lodash';
|
|
14
4
|
|
|
15
|
-
|
|
5
|
+
const StyledWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
16
6
|
componentId: "sc-1jhprzr-0"
|
|
17
7
|
})(["width:100%;height:100%;"]); // list
|
|
18
8
|
|
|
19
|
-
|
|
9
|
+
const StyledWrapperListItem = /*#__PURE__*/styled.div.withConfig({
|
|
20
10
|
componentId: "sc-1jhprzr-1"
|
|
21
|
-
})(["min-width:100%;", ";", ";", ";"],
|
|
22
|
-
|
|
23
|
-
}, function (props) {
|
|
24
|
-
return props.type === BUBBLE_TYPES.RECIPIENT && "padding: ".concat(props.theme.space.xxs, " 13% ").concat(props.theme.space.xxs, "\n ").concat(props.theme.space.xxs, "\n ");
|
|
25
|
-
}, function (props) {
|
|
26
|
-
return props.type === BUBBLE_TYPES.SYSTEM && "padding: ".concat(props.theme.space.xxs, " 0px\n ");
|
|
27
|
-
});
|
|
28
|
-
var StyledChatContainerContentList = /*#__PURE__*/styled.div.withConfig({
|
|
11
|
+
})(["min-width:100%;", ";", ";", ";"], props => props.type === BUBBLE_TYPES.SENDER && "padding: ".concat(props.theme.space.xxs, " ").concat(props.theme.space.xxs, " 0px 13%\n "), props => props.type === BUBBLE_TYPES.RECIPIENT && "padding: ".concat(props.theme.space.xxs, " 13% ").concat(props.theme.space.xxs, "\n ").concat(props.theme.space.xxs, "\n "), props => props.type === BUBBLE_TYPES.SYSTEM && "padding: ".concat(props.theme.space.xxs, " 0px\n "));
|
|
12
|
+
const StyledChatContainerContentList = /*#__PURE__*/styled.div.withConfig({
|
|
29
13
|
componentId: "sc-1jhprzr-2"
|
|
30
|
-
})(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"],
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
var StyledChatContainerContentListScroll = /*#__PURE__*/styled.div.withConfig({
|
|
14
|
+
})(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"], props => props.theme.space.xs);
|
|
15
|
+
const StyledChatContainerContentListScroll = /*#__PURE__*/styled.div.withConfig({
|
|
34
16
|
componentId: "sc-1jhprzr-3"
|
|
35
|
-
})(["width:100%;height:", ";position:relative;"],
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
var StyledLoadMoreContainer = /*#__PURE__*/styled.div.withConfig({
|
|
17
|
+
})(["width:100%;height:", ";position:relative;"], props => props.height);
|
|
18
|
+
const StyledLoadMoreContainer = /*#__PURE__*/styled.div.withConfig({
|
|
39
19
|
componentId: "sc-1jhprzr-4"
|
|
40
|
-
})(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";display:grid;justify-content:center;align-items:center;", " ", ""],
|
|
41
|
-
|
|
42
|
-
}, function (props) {
|
|
43
|
-
return props.theme.space.xxs;
|
|
44
|
-
}, function (props) {
|
|
45
|
-
return props.theme.space.xxs;
|
|
46
|
-
}, function (props) {
|
|
47
|
-
return props.theme.space.xxs;
|
|
48
|
-
}, function (props) {
|
|
49
|
-
return props.hasMoreItems === 'top' ? 'top: 0;' : '';
|
|
50
|
-
}, function (props) {
|
|
51
|
-
return props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '';
|
|
52
|
-
});
|
|
53
|
-
var ListItem = /*#__PURE__*/styled.div.withConfig({
|
|
20
|
+
})(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";display:grid;justify-content:center;align-items:center;", " ", ""], props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.theme.space.xxs, props => props.hasMoreItems === 'top' ? 'top: 0;' : '', props => props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '');
|
|
21
|
+
const ListItem = /*#__PURE__*/styled.div.withConfig({
|
|
54
22
|
componentId: "sc-1jhprzr-5"
|
|
55
|
-
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;background:rgba(255,255,255,0.5);width:calc(100% + ", ");height:100%;}}"],
|
|
56
|
-
return props.theme.space.xxs;
|
|
57
|
-
});
|
|
23
|
+
})(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;background:rgba(255,255,255,0.5);width:calc(100% + ", ");height:100%;}}"], props => props.theme.space.xxs);
|
|
58
24
|
|
|
59
25
|
export { ListItem, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer, StyledWrapper, StyledWrapperListItem };
|
|
60
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import 'core-js/modules/web.url.to-json.js';
|
|
3
|
+
import { useMemo } from 'react';
|
|
2
4
|
import { describe } from 'react-desc';
|
|
3
5
|
import { Grid } from '@elliemae/ds-grid';
|
|
4
|
-
import
|
|
6
|
+
import Communications from '@elliemae/ds-icons/Communications';
|
|
5
7
|
import { emptyStateProps, defaultProps } from './props.js';
|
|
6
8
|
import { MessageWrapper, ChatEmptyStateWrapper } from './styled.js';
|
|
7
9
|
import { useValidateProps } from './config/useValidateProps.js';
|
|
8
|
-
import 'styled-components';
|
|
9
|
-
import '@elliemae/ds-props-helpers';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const ChatEmptyState = props => {
|
|
12
|
+
var _Grid, _Grid2;
|
|
13
|
+
|
|
12
14
|
useValidateProps(props, ChatEmptyStateListWithSchema.toJSON());
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [label, action]);
|
|
33
|
-
return /*#__PURE__*/
|
|
15
|
+
const {
|
|
16
|
+
label,
|
|
17
|
+
action
|
|
18
|
+
} = props;
|
|
19
|
+
const MainContent = useMemo(() => /*#__PURE__*/_jsx(Grid, {
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
justifyContent: "center"
|
|
22
|
+
}, void 0, /*#__PURE__*/_jsx(Grid, {
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center"
|
|
25
|
+
}, void 0, /*#__PURE__*/_jsx(Communications, {
|
|
26
|
+
size: "xxl",
|
|
27
|
+
color: ['neutral', 400]
|
|
28
|
+
})), _Grid || (_Grid = /*#__PURE__*/_jsx(Grid, {
|
|
29
|
+
alignItems: "center",
|
|
30
|
+
justifyContent: "center"
|
|
31
|
+
}, void 0, /*#__PURE__*/_jsx(MessageWrapper, {}, void 0, label))), _Grid2 || (_Grid2 = /*#__PURE__*/_jsx(Grid, {
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
justifyContent: "center"
|
|
34
|
+
}, void 0, action))), [label, action]);
|
|
35
|
+
return /*#__PURE__*/_jsx(ChatEmptyStateWrapper, {
|
|
34
36
|
alignItems: "center",
|
|
35
37
|
justifyContent: "center"
|
|
36
|
-
}, MainContent);
|
|
38
|
+
}, void 0, MainContent);
|
|
37
39
|
};
|
|
38
40
|
|
|
39
|
-
ChatEmptyState.propTypes = emptyStateProps;
|
|
40
41
|
ChatEmptyState.defaultProps = defaultProps;
|
|
41
|
-
|
|
42
|
+
const ChatEmptyStateListWithSchema = describe(ChatEmptyState);
|
|
42
43
|
ChatEmptyStateListWithSchema.propTypes = emptyStateProps;
|
|
43
44
|
|
|
44
45
|
export { ChatEmptyState, ChatEmptyStateListWithSchema };
|
|
45
|
-
//# sourceMappingURL=ChatEmptyState.js.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const useValidateProps = (props, schema) => {
|
|
4
4
|
useValidatePropTypes(props, schema);
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
export { useValidateProps };
|
|
8
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const defaultProps = {
|
|
4
4
|
label: 'No Messages Yet',
|
|
5
5
|
action: null
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
const emptyStateProps = {
|
|
8
8
|
label: PropTypes.arrayOf(PropTypes.string).description('No Message to show text helper').defaultValue(defaultProps.label),
|
|
9
9
|
action: PropTypes.node.description('action element').defaultValue(defaultProps.action)
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export { defaultProps, emptyStateProps };
|
|
13
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Grid } from '@elliemae/ds-grid';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const CONTAINER_WIDTH = 300;
|
|
5
|
+
const ChatEmptyStateWrapper = /*#__PURE__*/styled(Grid).withConfig({
|
|
6
6
|
componentId: "sc-1tutmen-0"
|
|
7
|
-
})(["height:100%;min-width:", "px;overflow:hidden;background:", ";"], CONTAINER_WIDTH,
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
var MessageWrapper = /*#__PURE__*/styled.p.withConfig({
|
|
7
|
+
})(["height:100%;min-width:", "px;overflow:hidden;background:", ";"], CONTAINER_WIDTH, props => props.theme.colors.neutral['050']);
|
|
8
|
+
const MessageWrapper = /*#__PURE__*/styled.p.withConfig({
|
|
11
9
|
componentId: "sc-1tutmen-1"
|
|
12
10
|
})(["font-size:18px;"]);
|
|
13
11
|
|
|
14
12
|
export { CONTAINER_WIDTH, ChatEmptyStateWrapper, MessageWrapper };
|
|
15
|
-
//# sourceMappingURL=styled.js.map
|