@elliemae/ds-chat 2.3.0-alpha.8 → 2.3.0-next.2
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 +28 -0
- package/cjs/index.d.js +2 -0
- package/cjs/index.js +44 -0
- package/cjs/parts/bubble/ChatBubble.js +74 -0
- package/cjs/parts/bubble/ChatBubbleArrow.js +80 -0
- package/cjs/parts/bubble/config/useValidateProps.js +31 -0
- package/cjs/parts/bubble/index.js +12 -0
- package/cjs/parts/bubble/props.js +57 -0
- package/cjs/parts/bubble/styled.js +53 -0
- package/cjs/parts/chat-card/ChatCard.js +46 -0
- package/cjs/parts/chat-card/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-card/index.js +10 -0
- package/cjs/parts/chat-card/props.js +14 -0
- package/cjs/parts/chat-card/styled.js +36 -0
- package/cjs/parts/chat-composer/ChatContainerComposer.js +164 -0
- package/cjs/parts/chat-composer/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-composer/index.js +10 -0
- package/cjs/parts/chat-composer/props.js +44 -0
- package/cjs/parts/chat-composer/styled.js +34 -0
- package/cjs/parts/chat-container/ChatContainer.js +175 -0
- package/cjs/parts/chat-container/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-container/index.js +10 -0
- package/cjs/parts/chat-container/props.js +49 -0
- package/cjs/parts/chat-container/styled.js +29 -0
- package/cjs/parts/chat-container-header/ChatContainerHeader.js +39 -0
- package/cjs/parts/chat-container-header/helpers.js +31 -0
- package/cjs/parts/chat-container-header/styled.js +24 -0
- package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +369 -0
- package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-container-messages-list/index.js +10 -0
- package/cjs/parts/chat-container-messages-list/props.js +30 -0
- package/cjs/parts/chat-container-messages-list/styled.js +38 -0
- package/cjs/parts/chat-empty-state/ChatEmptyState.js +54 -0
- package/cjs/parts/chat-empty-state/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-empty-state/props.js +17 -0
- package/cjs/parts/chat-empty-state/styled.js +22 -0
- package/cjs/parts/chat-sidebar/SideBarChat.js +99 -0
- package/cjs/parts/chat-sidebar/config/useValidateProps.js +11 -0
- package/cjs/parts/chat-sidebar/index.js +10 -0
- package/cjs/parts/chat-sidebar/props.js +42 -0
- package/cjs/parts/chat-sidebar/styled.js +21 -0
- package/cjs/parts/floating-button/FloatingButton.js +35 -0
- package/cjs/parts/floating-button/index.js +9 -0
- package/cjs/parts/floating-button/props.js +20 -0
- package/cjs/parts/floating-button/styled.js +18 -0
- package/cjs/parts/floating-container/styled.js +17 -0
- package/cjs/parts/grid-influencer/InfluencerContainer.js +23 -0
- package/cjs/parts/grid-influencer/styled.js +21 -0
- package/cjs/parts/message-delimiter/MessageDelimiter.js +41 -0
- package/cjs/parts/message-delimiter/config/useValidateProps.js +11 -0
- package/cjs/parts/message-delimiter/index.js +10 -0
- package/cjs/parts/message-delimiter/props.js +23 -0
- package/cjs/parts/message-delimiter/styled.js +24 -0
- package/cjs/parts/sidebar-button/SidebarButton.js +56 -0
- package/cjs/parts/sidebar-button/index.js +2 -0
- package/cjs/parts/sidebar-button/props.js +30 -0
- package/cjs/parts/sidebar-button/styled.js +25 -0
- package/cjs/parts/system-message/SystemMessage.js +44 -0
- package/cjs/parts/system-message/config/useValidateProps.js +11 -0
- package/cjs/parts/system-message/index.js +10 -0
- package/cjs/parts/system-message/props.js +19 -0
- package/cjs/parts/system-message/style.js +32 -0
- package/cjs/parts/tile-button/TileButton.js +107 -0
- package/cjs/parts/tile-button/config/useValidateProps.js +11 -0
- package/cjs/parts/tile-button/index.js +10 -0
- package/cjs/parts/tile-button/props.js +55 -0
- package/cjs/parts/tile-button/styled.js +95 -0
- package/cjs/prop-types.js +33 -0
- package/cjs/styled.js +17 -0
- package/esm/ChatDataTestids.js +24 -0
- package/esm/index.d.js +1 -0
- package/esm/index.js +14 -0
- package/esm/parts/bubble/ChatBubble.js +64 -0
- package/esm/parts/bubble/ChatBubbleArrow.js +72 -0
- package/esm/parts/bubble/config/useValidateProps.js +27 -0
- package/esm/parts/bubble/index.js +2 -0
- package/esm/parts/bubble/props.js +46 -0
- package/esm/parts/bubble/styled.js +37 -0
- package/esm/parts/chat-card/ChatCard.js +37 -0
- package/esm/parts/chat-card/config/useValidateProps.js +7 -0
- package/esm/parts/chat-card/index.js +1 -0
- package/esm/parts/chat-card/props.js +10 -0
- package/esm/parts/chat-card/styled.js +23 -0
- package/esm/parts/chat-composer/ChatContainerComposer.js +153 -0
- package/esm/parts/chat-composer/config/useValidateProps.js +7 -0
- package/esm/parts/chat-composer/index.js +1 -0
- package/esm/parts/chat-composer/props.js +39 -0
- package/esm/parts/chat-composer/styled.js +22 -0
- package/esm/parts/chat-container/ChatContainer.js +162 -0
- package/esm/parts/chat-container/config/useValidateProps.js +7 -0
- package/esm/parts/chat-container/index.js +1 -0
- package/esm/parts/chat-container/props.js +44 -0
- package/esm/parts/chat-container/styled.js +18 -0
- package/esm/parts/chat-container-header/ChatContainerHeader.js +31 -0
- package/esm/parts/chat-container-header/helpers.js +23 -0
- package/esm/parts/chat-container-header/styled.js +14 -0
- package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +357 -0
- package/esm/parts/chat-container-messages-list/config/useValidateProps.js +7 -0
- package/esm/parts/chat-container-messages-list/index.js +1 -0
- package/esm/parts/chat-container-messages-list/props.js +25 -0
- package/esm/parts/chat-container-messages-list/styled.js +25 -0
- package/esm/parts/chat-empty-state/ChatEmptyState.js +45 -0
- package/esm/parts/chat-empty-state/config/useValidateProps.js +7 -0
- package/esm/parts/chat-empty-state/props.js +12 -0
- package/esm/parts/chat-empty-state/styled.js +12 -0
- package/esm/parts/chat-sidebar/SideBarChat.js +88 -0
- package/esm/parts/chat-sidebar/config/useValidateProps.js +7 -0
- package/esm/parts/chat-sidebar/index.js +1 -0
- package/esm/parts/chat-sidebar/props.js +37 -0
- package/esm/parts/chat-sidebar/styled.js +12 -0
- package/esm/parts/floating-button/FloatingButton.js +27 -0
- package/esm/parts/floating-button/index.js +1 -0
- package/esm/parts/floating-button/props.js +15 -0
- package/esm/parts/floating-button/styled.js +10 -0
- package/esm/parts/floating-container/styled.js +9 -0
- package/esm/parts/grid-influencer/InfluencerContainer.js +14 -0
- package/esm/parts/grid-influencer/styled.js +12 -0
- package/esm/parts/message-delimiter/MessageDelimiter.js +32 -0
- package/esm/parts/message-delimiter/config/useValidateProps.js +7 -0
- package/esm/parts/message-delimiter/index.js +1 -0
- package/esm/parts/message-delimiter/props.js +18 -0
- package/esm/parts/message-delimiter/styled.js +14 -0
- package/esm/parts/sidebar-button/SidebarButton.js +45 -0
- package/esm/parts/sidebar-button/index.js +1 -0
- package/esm/parts/sidebar-button/props.js +21 -0
- package/esm/parts/sidebar-button/styled.js +15 -0
- package/esm/parts/system-message/SystemMessage.js +35 -0
- package/esm/parts/system-message/config/useValidateProps.js +7 -0
- package/esm/parts/system-message/index.js +1 -0
- package/esm/parts/system-message/props.js +14 -0
- package/esm/parts/system-message/style.js +20 -0
- package/esm/parts/tile-button/TileButton.js +97 -0
- package/esm/parts/tile-button/config/useValidateProps.js +7 -0
- package/esm/parts/tile-button/index.js +1 -0
- package/esm/parts/tile-button/props.js +50 -0
- package/esm/parts/tile-button/styled.js +78 -0
- package/esm/prop-types.js +28 -0
- package/esm/styled.js +8 -0
- package/package.json +163 -165
- package/types/ChatDataTestids.d.ts +22 -0
- package/types/index.d.d.ts +37 -0
- package/types/index.d.ts +13 -0
- package/types/parts/bubble/ChatBubble.d.ts +30 -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 +52 -0
- package/types/parts/bubble/styled.d.ts +10 -0
- package/types/parts/bubble/tests/ChatBubble.test.d.ts +1 -0
- package/types/parts/chat-card/ChatCard.d.ts +33 -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 +29 -0
- package/types/parts/chat-card/styled.d.ts +7 -0
- package/types/parts/chat-composer/ChatContainerComposer.d.ts +60 -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/styled.d.ts +5 -0
- package/types/parts/chat-composer/tests/ChatContainerComposer.test.d.ts +1 -0
- package/types/parts/chat-container/ChatContainer.d.ts +63 -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/styled.d.ts +8 -0
- package/types/parts/chat-container/tests/ChatContainer.test.d.ts +1 -0
- package/types/parts/chat-container-header/ChatContainerHeader.d.ts +2 -0
- package/types/parts/chat-container-header/helpers.d.ts +6 -0
- package/types/parts/chat-container-header/styled.d.ts +4 -0
- package/types/parts/chat-container-messages-list/ChatContainerMessagesList.d.ts +48 -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/styled.d.ts +11 -0
- package/types/parts/chat-empty-state/ChatEmptyState.d.ts +21 -0
- package/types/parts/chat-empty-state/config/useValidateProps.d.ts +2 -0
- package/types/parts/chat-empty-state/props.d.ts +15 -0
- package/types/parts/chat-empty-state/styled.d.ts +4 -0
- package/types/parts/chat-sidebar/SideBarChat.d.ts +48 -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 +52 -0
- package/types/parts/chat-sidebar/styled.d.ts +3 -0
- package/types/parts/floating-button/FloatingButton.d.ts +18 -0
- package/types/parts/floating-button/index.d.ts +1 -0
- package/types/parts/floating-button/props.d.ts +19 -0
- package/types/parts/floating-button/styled.d.ts +1 -0
- package/types/parts/floating-container/styled.d.ts +1 -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 +31 -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 +26 -0
- package/types/parts/message-delimiter/styled.d.ts +6 -0
- package/types/parts/sidebar-button/SidebarButton.d.ts +24 -0
- package/types/parts/sidebar-button/index.d.ts +0 -0
- package/types/parts/sidebar-button/props.d.ts +29 -0
- package/types/parts/sidebar-button/styled.d.ts +4 -0
- package/types/parts/system-message/SystemMessage.d.ts +23 -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 +17 -0
- package/types/parts/system-message/style.d.ts +7 -0
- package/types/parts/tile-button/TileButton.d.ts +75 -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 +88 -0
- package/types/parts/tile-button/styled.d.ts +11 -0
- package/types/prop-types.d.ts +33 -0
- package/types/styled.d.ts +6 -0
- package/types/tests/utils.d.ts +1 -0
- package/dist/cjs/ChatDataTestids.js +0 -56
- package/dist/cjs/ChatDataTestids.js.map +0 -7
- package/dist/cjs/index.d.js +0 -27
- package/dist/cjs/index.d.js.map +0 -7
- package/dist/cjs/index.js +0 -69
- package/dist/cjs/index.js.map +0 -7
- package/dist/cjs/parts/bubble/ChatBubble.js +0 -84
- package/dist/cjs/parts/bubble/ChatBubble.js.map +0 -7
- package/dist/cjs/parts/bubble/ChatBubbleArrow.js +0 -97
- package/dist/cjs/parts/bubble/ChatBubbleArrow.js.map +0 -7
- package/dist/cjs/parts/bubble/config/useValidateProps.js +0 -54
- package/dist/cjs/parts/bubble/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/bubble/index.js +0 -38
- package/dist/cjs/parts/bubble/index.js.map +0 -7
- package/dist/cjs/parts/bubble/props.js +0 -69
- package/dist/cjs/parts/bubble/props.js.map +0 -7
- package/dist/cjs/parts/bubble/styled.js +0 -146
- package/dist/cjs/parts/bubble/styled.js.map +0 -7
- package/dist/cjs/parts/chat-card/ChatCard.js +0 -62
- package/dist/cjs/parts/chat-card/ChatCard.js.map +0 -7
- package/dist/cjs/parts/chat-card/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-card/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-card/index.js +0 -36
- package/dist/cjs/parts/chat-card/index.js.map +0 -7
- package/dist/cjs/parts/chat-card/props.js +0 -41
- package/dist/cjs/parts/chat-card/props.js.map +0 -7
- package/dist/cjs/parts/chat-card/styled.js +0 -71
- package/dist/cjs/parts/chat-card/styled.js.map +0 -7
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js +0 -157
- package/dist/cjs/parts/chat-composer/ChatContainerComposer.js.map +0 -7
- package/dist/cjs/parts/chat-composer/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-composer/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-composer/index.js +0 -36
- package/dist/cjs/parts/chat-composer/index.js.map +0 -7
- package/dist/cjs/parts/chat-composer/props.js +0 -79
- package/dist/cjs/parts/chat-composer/props.js.map +0 -7
- package/dist/cjs/parts/chat-composer/styled.js +0 -102
- package/dist/cjs/parts/chat-composer/styled.js.map +0 -7
- package/dist/cjs/parts/chat-container/ChatContainer.js +0 -157
- package/dist/cjs/parts/chat-container/ChatContainer.js.map +0 -7
- package/dist/cjs/parts/chat-container/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-container/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-container/index.js +0 -36
- package/dist/cjs/parts/chat-container/index.js.map +0 -7
- package/dist/cjs/parts/chat-container/props.js +0 -92
- package/dist/cjs/parts/chat-container/props.js.map +0 -7
- package/dist/cjs/parts/chat-container/styled.js +0 -110
- package/dist/cjs/parts/chat-container/styled.js.map +0 -7
- package/dist/cjs/parts/chat-container-header/ChatContainerHeader.js +0 -57
- package/dist/cjs/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
- package/dist/cjs/parts/chat-container-header/helpers.js +0 -44
- package/dist/cjs/parts/chat-container-header/helpers.js.map +0 -7
- package/dist/cjs/parts/chat-container-header/styled.js +0 -59
- package/dist/cjs/parts/chat-container-header/styled.js.map +0 -7
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +0 -307
- package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
- package/dist/cjs/parts/chat-container-messages-list/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-container-messages-list/index.js +0 -36
- package/dist/cjs/parts/chat-container-messages-list/index.js.map +0 -7
- package/dist/cjs/parts/chat-container-messages-list/props.js +0 -68
- package/dist/cjs/parts/chat-container-messages-list/props.js.map +0 -7
- package/dist/cjs/parts/chat-container-messages-list/styled.js +0 -100
- package/dist/cjs/parts/chat-container-messages-list/styled.js.map +0 -7
- package/dist/cjs/parts/chat-empty-state/ChatEmptyState.js +0 -70
- package/dist/cjs/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
- package/dist/cjs/parts/chat-empty-state/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-empty-state/props.js +0 -44
- package/dist/cjs/parts/chat-empty-state/props.js.map +0 -7
- package/dist/cjs/parts/chat-empty-state/styled.js +0 -48
- package/dist/cjs/parts/chat-empty-state/styled.js.map +0 -7
- package/dist/cjs/parts/chat-sidebar/SideBarChat.js +0 -100
- package/dist/cjs/parts/chat-sidebar/SideBarChat.js.map +0 -7
- package/dist/cjs/parts/chat-sidebar/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/chat-sidebar/index.js +0 -36
- package/dist/cjs/parts/chat-sidebar/index.js.map +0 -7
- package/dist/cjs/parts/chat-sidebar/props.js +0 -84
- package/dist/cjs/parts/chat-sidebar/props.js.map +0 -7
- package/dist/cjs/parts/chat-sidebar/styled.js +0 -57
- package/dist/cjs/parts/chat-sidebar/styled.js.map +0 -7
- package/dist/cjs/parts/floating-button/FloatingButton.js +0 -48
- package/dist/cjs/parts/floating-button/FloatingButton.js.map +0 -7
- package/dist/cjs/parts/floating-button/index.js +0 -28
- package/dist/cjs/parts/floating-button/index.js.map +0 -7
- package/dist/cjs/parts/floating-button/props.js +0 -47
- package/dist/cjs/parts/floating-button/props.js.map +0 -7
- package/dist/cjs/parts/floating-button/styled.js +0 -64
- package/dist/cjs/parts/floating-button/styled.js.map +0 -7
- package/dist/cjs/parts/floating-container/styled.js +0 -47
- package/dist/cjs/parts/floating-container/styled.js.map +0 -7
- package/dist/cjs/parts/grid-influencer/InfluencerContainer.js +0 -43
- package/dist/cjs/parts/grid-influencer/InfluencerContainer.js.map +0 -7
- package/dist/cjs/parts/grid-influencer/styled.js +0 -56
- package/dist/cjs/parts/grid-influencer/styled.js.map +0 -7
- package/dist/cjs/parts/message-delimiter/MessageDelimiter.js +0 -55
- package/dist/cjs/parts/message-delimiter/MessageDelimiter.js.map +0 -7
- package/dist/cjs/parts/message-delimiter/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/message-delimiter/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/message-delimiter/index.js +0 -36
- package/dist/cjs/parts/message-delimiter/index.js.map +0 -7
- package/dist/cjs/parts/message-delimiter/props.js +0 -48
- package/dist/cjs/parts/message-delimiter/props.js.map +0 -7
- package/dist/cjs/parts/message-delimiter/styled.js +0 -53
- package/dist/cjs/parts/message-delimiter/styled.js.map +0 -7
- package/dist/cjs/parts/sidebar-button/SidebarButton.js +0 -55
- package/dist/cjs/parts/sidebar-button/SidebarButton.js.map +0 -7
- package/dist/cjs/parts/sidebar-button/index.js +0 -20
- package/dist/cjs/parts/sidebar-button/index.js.map +0 -7
- package/dist/cjs/parts/sidebar-button/props.js +0 -53
- package/dist/cjs/parts/sidebar-button/props.js.map +0 -7
- package/dist/cjs/parts/sidebar-button/styled.js +0 -69
- package/dist/cjs/parts/sidebar-button/styled.js.map +0 -7
- package/dist/cjs/parts/system-message/SystemMessage.js +0 -59
- package/dist/cjs/parts/system-message/SystemMessage.js.map +0 -7
- package/dist/cjs/parts/system-message/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/system-message/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/system-message/index.js +0 -36
- package/dist/cjs/parts/system-message/index.js.map +0 -7
- package/dist/cjs/parts/system-message/props.js +0 -46
- package/dist/cjs/parts/system-message/props.js.map +0 -7
- package/dist/cjs/parts/system-message/style.js +0 -75
- package/dist/cjs/parts/system-message/style.js.map +0 -7
- package/dist/cjs/parts/tile-button/TileButton.js +0 -137
- package/dist/cjs/parts/tile-button/TileButton.js.map +0 -7
- package/dist/cjs/parts/tile-button/config/useValidateProps.js +0 -38
- package/dist/cjs/parts/tile-button/config/useValidateProps.js.map +0 -7
- package/dist/cjs/parts/tile-button/index.js +0 -36
- package/dist/cjs/parts/tile-button/index.js.map +0 -7
- package/dist/cjs/parts/tile-button/props.js +0 -93
- package/dist/cjs/parts/tile-button/props.js.map +0 -7
- package/dist/cjs/parts/tile-button/styled.js +0 -247
- package/dist/cjs/parts/tile-button/styled.js.map +0 -7
- package/dist/cjs/prop-types.js +0 -60
- package/dist/cjs/prop-types.js.map +0 -7
- package/dist/cjs/styled.js +0 -45
- package/dist/cjs/styled.js.map +0 -7
- package/dist/cjs/tests/utils.js +0 -66
- package/dist/cjs/tests/utils.js.map +0 -7
- package/dist/esm/ChatDataTestids.js +0 -27
- package/dist/esm/ChatDataTestids.js.map +0 -7
- package/dist/esm/index.d.js +0 -2
- package/dist/esm/index.d.js.map +0 -7
- package/dist/esm/index.js +0 -40
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/parts/bubble/ChatBubble.js +0 -64
- package/dist/esm/parts/bubble/ChatBubble.js.map +0 -7
- package/dist/esm/parts/bubble/ChatBubbleArrow.js +0 -68
- package/dist/esm/parts/bubble/ChatBubbleArrow.js.map +0 -7
- package/dist/esm/parts/bubble/config/useValidateProps.js +0 -25
- package/dist/esm/parts/bubble/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/bubble/index.js +0 -9
- package/dist/esm/parts/bubble/index.js.map +0 -7
- package/dist/esm/parts/bubble/props.js +0 -40
- package/dist/esm/parts/bubble/props.js.map +0 -7
- package/dist/esm/parts/bubble/styled.js +0 -117
- package/dist/esm/parts/bubble/styled.js.map +0 -7
- package/dist/esm/parts/chat-card/ChatCard.js +0 -33
- package/dist/esm/parts/chat-card/ChatCard.js.map +0 -7
- package/dist/esm/parts/chat-card/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-card/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-card/index.js +0 -7
- package/dist/esm/parts/chat-card/index.js.map +0 -7
- package/dist/esm/parts/chat-card/props.js +0 -12
- package/dist/esm/parts/chat-card/props.js.map +0 -7
- package/dist/esm/parts/chat-card/styled.js +0 -42
- package/dist/esm/parts/chat-card/styled.js.map +0 -7
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js +0 -134
- package/dist/esm/parts/chat-composer/ChatContainerComposer.js.map +0 -7
- package/dist/esm/parts/chat-composer/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-composer/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-composer/index.js +0 -7
- package/dist/esm/parts/chat-composer/index.js.map +0 -7
- package/dist/esm/parts/chat-composer/props.js +0 -50
- package/dist/esm/parts/chat-composer/props.js.map +0 -7
- package/dist/esm/parts/chat-composer/styled.js +0 -73
- package/dist/esm/parts/chat-composer/styled.js.map +0 -7
- package/dist/esm/parts/chat-container/ChatContainer.js +0 -128
- package/dist/esm/parts/chat-container/ChatContainer.js.map +0 -7
- package/dist/esm/parts/chat-container/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-container/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-container/index.js +0 -7
- package/dist/esm/parts/chat-container/index.js.map +0 -7
- package/dist/esm/parts/chat-container/props.js +0 -65
- package/dist/esm/parts/chat-container/props.js.map +0 -7
- package/dist/esm/parts/chat-container/styled.js +0 -81
- package/dist/esm/parts/chat-container/styled.js.map +0 -7
- package/dist/esm/parts/chat-container-header/ChatContainerHeader.js +0 -32
- package/dist/esm/parts/chat-container-header/ChatContainerHeader.js.map +0 -7
- package/dist/esm/parts/chat-container-header/helpers.js +0 -15
- package/dist/esm/parts/chat-container-header/helpers.js.map +0 -7
- package/dist/esm/parts/chat-container-header/styled.js +0 -30
- package/dist/esm/parts/chat-container-header/styled.js.map +0 -7
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +0 -285
- package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +0 -7
- package/dist/esm/parts/chat-container-messages-list/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-container-messages-list/index.js +0 -10
- package/dist/esm/parts/chat-container-messages-list/index.js.map +0 -7
- package/dist/esm/parts/chat-container-messages-list/props.js +0 -39
- package/dist/esm/parts/chat-container-messages-list/props.js.map +0 -7
- package/dist/esm/parts/chat-container-messages-list/styled.js +0 -71
- package/dist/esm/parts/chat-container-messages-list/styled.js.map +0 -7
- package/dist/esm/parts/chat-empty-state/ChatEmptyState.js +0 -41
- package/dist/esm/parts/chat-empty-state/ChatEmptyState.js.map +0 -7
- package/dist/esm/parts/chat-empty-state/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-empty-state/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-empty-state/props.js +0 -15
- package/dist/esm/parts/chat-empty-state/props.js.map +0 -7
- package/dist/esm/parts/chat-empty-state/styled.js +0 -19
- package/dist/esm/parts/chat-empty-state/styled.js.map +0 -7
- package/dist/esm/parts/chat-sidebar/SideBarChat.js +0 -71
- package/dist/esm/parts/chat-sidebar/SideBarChat.js.map +0 -7
- package/dist/esm/parts/chat-sidebar/config/useValidateProps.js +0 -9
- package/dist/esm/parts/chat-sidebar/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/chat-sidebar/index.js +0 -7
- package/dist/esm/parts/chat-sidebar/index.js.map +0 -7
- package/dist/esm/parts/chat-sidebar/props.js +0 -55
- package/dist/esm/parts/chat-sidebar/props.js.map +0 -7
- package/dist/esm/parts/chat-sidebar/styled.js +0 -28
- package/dist/esm/parts/chat-sidebar/styled.js.map +0 -7
- package/dist/esm/parts/floating-button/FloatingButton.js +0 -19
- package/dist/esm/parts/floating-button/FloatingButton.js.map +0 -7
- package/dist/esm/parts/floating-button/index.js +0 -3
- package/dist/esm/parts/floating-button/index.js.map +0 -7
- package/dist/esm/parts/floating-button/props.js +0 -18
- package/dist/esm/parts/floating-button/props.js.map +0 -7
- package/dist/esm/parts/floating-button/styled.js +0 -35
- package/dist/esm/parts/floating-button/styled.js.map +0 -7
- package/dist/esm/parts/floating-container/styled.js +0 -18
- package/dist/esm/parts/floating-container/styled.js.map +0 -7
- package/dist/esm/parts/grid-influencer/InfluencerContainer.js +0 -14
- package/dist/esm/parts/grid-influencer/InfluencerContainer.js.map +0 -7
- package/dist/esm/parts/grid-influencer/styled.js +0 -27
- package/dist/esm/parts/grid-influencer/styled.js.map +0 -7
- package/dist/esm/parts/message-delimiter/MessageDelimiter.js +0 -26
- package/dist/esm/parts/message-delimiter/MessageDelimiter.js.map +0 -7
- package/dist/esm/parts/message-delimiter/config/useValidateProps.js +0 -9
- package/dist/esm/parts/message-delimiter/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/message-delimiter/index.js +0 -10
- package/dist/esm/parts/message-delimiter/index.js.map +0 -7
- package/dist/esm/parts/message-delimiter/props.js +0 -19
- package/dist/esm/parts/message-delimiter/props.js.map +0 -7
- package/dist/esm/parts/message-delimiter/styled.js +0 -24
- package/dist/esm/parts/message-delimiter/styled.js.map +0 -7
- package/dist/esm/parts/sidebar-button/SidebarButton.js +0 -26
- package/dist/esm/parts/sidebar-button/SidebarButton.js.map +0 -7
- package/dist/esm/parts/sidebar-button/index.js +0 -2
- package/dist/esm/parts/sidebar-button/index.js.map +0 -7
- package/dist/esm/parts/sidebar-button/props.js +0 -24
- package/dist/esm/parts/sidebar-button/props.js.map +0 -7
- package/dist/esm/parts/sidebar-button/styled.js +0 -40
- package/dist/esm/parts/sidebar-button/styled.js.map +0 -7
- package/dist/esm/parts/system-message/SystemMessage.js +0 -30
- package/dist/esm/parts/system-message/SystemMessage.js.map +0 -7
- package/dist/esm/parts/system-message/config/useValidateProps.js +0 -9
- package/dist/esm/parts/system-message/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/system-message/index.js +0 -7
- package/dist/esm/parts/system-message/index.js.map +0 -7
- package/dist/esm/parts/system-message/props.js +0 -17
- package/dist/esm/parts/system-message/props.js.map +0 -7
- package/dist/esm/parts/system-message/style.js +0 -46
- package/dist/esm/parts/system-message/style.js.map +0 -7
- package/dist/esm/parts/tile-button/TileButton.js +0 -118
- package/dist/esm/parts/tile-button/TileButton.js.map +0 -7
- package/dist/esm/parts/tile-button/config/useValidateProps.js +0 -9
- package/dist/esm/parts/tile-button/config/useValidateProps.js.map +0 -7
- package/dist/esm/parts/tile-button/index.js +0 -7
- package/dist/esm/parts/tile-button/index.js.map +0 -7
- package/dist/esm/parts/tile-button/props.js +0 -64
- package/dist/esm/parts/tile-button/props.js.map +0 -7
- package/dist/esm/parts/tile-button/styled.js +0 -218
- package/dist/esm/parts/tile-button/styled.js.map +0 -7
- package/dist/esm/prop-types.js +0 -31
- package/dist/esm/prop-types.js.map +0 -7
- package/dist/esm/styled.js +0 -16
- package/dist/esm/styled.js.map +0 -7
- package/dist/esm/tests/utils.js +0 -37
- package/dist/esm/tests/utils.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/ChatContainerComposer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { describe } from 'react-desc';\nimport { PaperAirplane } from '@elliemae/ds-icons';\nimport {\n StyledChatContainerContentComposer,\n StyledComposerInput,\n StyledComposerButton,\n StyledCounterArea,\n StyledCounterErrorA11y,\n} from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nimport { defaultComposerPros, composerProps, ChatComposerProps } from './props';\n\n// eslint-disable-next-line complexity\nconst ChatComposer = (props: ChatComposerProps): JSX.Element => {\n useValidateProps(props, ChatComposerWithSchema.toJSON());\n\n const {\n inputValue,\n onChange,\n onResize,\n onSend,\n onFocus,\n onBlur,\n onKeyDown,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = props;\n\n const COMPOSER_MIN_HEIGHT = 32;\n const input = React.useRef<HTMLTextAreaElement>();\n const inputSize = React.useRef<HTMLTextAreaElement>();\n const inputSend = React.useRef<HTMLButtonElement>();\n const [height, setHeight] = React.useState(32);\n const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);\n const [showScroll, setShowScroll] = React.useState(true);\n\n React.useEffect(() => {\n const newHeight =\n inputSize.current?.scrollHeight > internalMaxHeight ? internalMaxHeight : inputSize.current?.scrollHeight;\n if (newHeight !== height && newHeight > COMPOSER_MIN_HEIGHT) onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, height, onResize]);\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToComposer = () => {\n input.current.focus();\n };\n actionRef.current.focusToSend = () => {\n inputSend.current.focus();\n };\n }\n }, [actionRef]);\n\n const handleChange = React.useCallback(\n (e) => {\n onChange(e.target.value);\n },\n [onChange],\n );\n const heightProps = { height, overflow: showScroll ? 'auto' : 'hidden' };\n\n const inputLength = String(inputValue || '').length;\n const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);\n return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid\n cols={['1fr', '24px']}\n style={{ height: heightProps.height }}\n justifyContent=\"center\"\n alignItems=\"flex-end\"\n gutter=\"xxs\"\n >\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n name=\"chat-composer-textarea\"\n id=\"chat-composer-textarea\"\n />\n\n <Grid height=\"32px\" alignItems=\"center\">\n <StyledComposerButton\n buttonType=\"text\"\n icon={<PaperAirplane width={18} height={18} />}\n onClick={onSend}\n size=\"s\"\n disabled={!inputValue || buttonDisabled || hasError}\n data-testid=\"chat-composer-send-button\"\n aria-label=\"Send\"\n innerRef={inputSend}\n />\n </Grid>\n </Grid>\n <StyledComposerInput\n ref={inputSize}\n style={{\n height: 32,\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n width: input.current?.clientWidth,\n }}\n onChange={handleChange}\n value={inputValue}\n />\n <Grid cols={['1fr', '24px']} justifyContent=\"flex-end\" alignItems=\"center\" gutter=\"xxs\" pb=\"xxs\">\n <StyledCounterArea hasError={hasError} data-testid=\"composer-counter-area\">\n {inputMaxLength && hasError ? (\n <>\n <StyledCounterErrorA11y role=\"alert\">\n {maxLengthMessage ||\n `You have entered ${inputLength} characters and have exceeded the limit by ${\n inputLength - inputMaxLength\n }. Please limit to less than ${inputMaxLength} characters. `}\n </StyledCounterErrorA11y>\n {maxLengthMessage || `Please limit to less than ${inputMaxLength} characters. `}\n </>\n ) : (\n ''\n )}\n {inputMaxLength && !maxLengthMessage ? ` ${inputLength} / ${inputMaxLength}` : ''}\n </StyledCounterArea>\n <Grid />\n </Grid>\n </StyledChatContainerContentComposer>\n );\n};\n\nChatComposer.propTypes = composerProps;\nChatComposer.defaultProps = defaultComposerPros;\nconst ChatComposerWithSchema = describe(ChatComposer);\nChatComposerWithSchema.propTypes = composerProps;\n\nexport { ChatComposer, ChatComposerWithSchema };\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAEA;AAGA,MAAM,eAAe,CAAC,UAA0C;AAC9D,mBAAiB,OAAO,uBAAuB;AAE/C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,sBAAsB;AAC5B,QAAM,QAAQ,OAAM;AACpB,QAAM,YAAY,OAAM;AACxB,QAAM,YAAY,OAAM;AACxB,QAAM,CAAC,QAAQ,aAAa,OAAM,SAAS;AAC3C,QAAM,oBAAoB,OAAM,QAAQ,MAAM,YAAY,IAAI,CAAC;AAC/D,QAAM,CAAC,YAAY,iBAAiB,OAAM,SAAS;AAEnD,SAAM,UAAU,MAAM;AACpB,UAAM,YACJ,UAAU,SAAS,eAAe,oBAAoB,oBAAoB,UAAU,SAAS;AAC/F,QAAI,cAAc,UAAU,YAAY;AAAqB,eAAS;AACtE,cAAU;AACV,kBAAc,UAAU,SAAS,eAAe,UAAU,SAAS,eAAe;AAAA,KACjF,CAAC,YAAY,mBAAmB,QAAQ;AAE3C,SAAM,UAAU,MAAM;AACpB,QAAI,aAAa,UAAU,SAAS;AAClC,gBAAU,QAAQ,kBAAkB,MAAM;AACxC,cAAM,QAAQ;AAAA;AAEhB,gBAAU,QAAQ,cAAc,MAAM;AACpC,kBAAU,QAAQ;AAAA;AAAA;AAAA,KAGrB,CAAC;AAEJ,QAAM,eAAe,OAAM,YACzB,CAAC,MAAM;AACL,aAAS,EAAE,OAAO;AAAA,KAEpB,CAAC;AAEH,QAAM,cAAc,EAAE,QAAQ,UAAU,aAAa,SAAS;AAE9D,QAAM,cAAc,OAAO,cAAc,IAAI;AAC7C,QAAM,WAAW,OAAM,QAAQ,MAAM,cAAc,gBAAgB,CAAC,aAAa;AACjF,SACE,qCAAC,oCAAD;AAAA,IAAoC,MAAM,CAAC,QAAQ;AAAA,IAAS,WAAW,GAAG;AAAA,IAAe,eAAa;AAAA,KACpG,qCAAC,MAAD;AAAA,IACE,MAAM,CAAC,OAAO;AAAA,IACd,OAAO,EAAE,QAAQ,YAAY;AAAA,IAC7B,gBAAe;AAAA,IACf,YAAW;AAAA,IACX,QAAO;AAAA,KAEP,qCAAC,qBAAD;AAAA,IACE,KAAK;AAAA,IACL,UAAU;AAAA,IACV,OAAO,KAAK;AAAA,IACZ,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,cAAW;AAAA,IACX,eAAY;AAAA,IACZ,MAAK;AAAA,IACL,IAAG;AAAA,MAGL,qCAAC,MAAD;AAAA,IAAM,QAAO;AAAA,IAAO,YAAW;AAAA,KAC7B,qCAAC,sBAAD;AAAA,IACE,YAAW;AAAA,IACX,MAAM,qCAAC,eAAD;AAAA,MAAe,OAAO;AAAA,MAAI,QAAQ;AAAA;AAAA,IACxC,SAAS;AAAA,IACT,MAAK;AAAA,IACL,UAAU,CAAC,cAAc,kBAAkB;AAAA,IAC3C,eAAY;AAAA,IACZ,cAAW;AAAA,IACX,UAAU;AAAA,QAIhB,qCAAC,qBAAD;AAAA,IACE,KAAK;AAAA,IACL,OAAO;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,UAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAO,MAAM,SAAS;AAAA;AAAA,IAExB,UAAU;AAAA,IACV,OAAO;AAAA,MAET,qCAAC,MAAD;AAAA,IAAM,MAAM,CAAC,OAAO;AAAA,IAAS,gBAAe;AAAA,IAAW,YAAW;AAAA,IAAS,QAAO;AAAA,IAAM,IAAG;AAAA,KACzF,qCAAC,mBAAD;AAAA,IAAmB;AAAA,IAAoB,eAAY;AAAA,KAChD,kBAAkB,WACjB,4DACE,qCAAC,wBAAD;AAAA,IAAwB,MAAK;AAAA,KAC1B,oBACC,oBAAoB,yDAClB,cAAc,6CACe,gCAElC,oBAAoB,6BAA6B,iCAGpD,IAED,kBAAkB,CAAC,mBAAmB,IAAI,iBAAiB,mBAAmB,KAEjF,qCAAC,MAAD;AAAA;AAMR,aAAa,YAAY;AACzB,aAAa,eAAe;AAC5B,MAAM,yBAAyB,SAAS;AACxC,uBAAuB,YAAY;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useValidatePropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
-
const useValidateProps = (props, schema) => {
|
|
4
|
-
useValidatePropTypes(props, schema);
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
useValidateProps
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/chat-composer/config/useValidateProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatComposerProps } from '../props';\n\nexport const useValidateProps = (props: ChatComposerProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAA0B,WAA0B;AACnF,uBAAqB,OAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatComposer, ChatComposerWithSchema } from './ChatContainerComposer';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "react-desc";
|
|
3
|
-
import { noop } from "lodash";
|
|
4
|
-
const defaultComposerPros = {
|
|
5
|
-
placeholder: "Type your message",
|
|
6
|
-
inputValue: "",
|
|
7
|
-
onChange: noop,
|
|
8
|
-
onResize: noop,
|
|
9
|
-
onSend: noop,
|
|
10
|
-
onFocus: noop,
|
|
11
|
-
onBlur: noop,
|
|
12
|
-
onKeyDown: noop,
|
|
13
|
-
maxHeight: 0,
|
|
14
|
-
inputMaxLength: void 0,
|
|
15
|
-
maxLengthMessage: void 0,
|
|
16
|
-
buttonDisabled: false,
|
|
17
|
-
dataTestid: "ds-chat-composer",
|
|
18
|
-
actionRef: noop
|
|
19
|
-
};
|
|
20
|
-
const composerProps = {
|
|
21
|
-
placeholder: PropTypes.string.description("Input Placeholder").defaultValue(defaultComposerPros.placeholder),
|
|
22
|
-
inputValue: PropTypes.string.description("Input value").defaultValue(defaultComposerPros.inputValue),
|
|
23
|
-
maxLengthMessage: PropTypes.string.description("Max length message").defaultValue(defaultComposerPros.maxLengthMessage),
|
|
24
|
-
onChange: PropTypes.func.description("Called when the user types").defaultValue(defaultComposerPros.onChange),
|
|
25
|
-
onResize: PropTypes.func.description("Called the input changes his height").defaultValue(defaultComposerPros.onResize),
|
|
26
|
-
onSend: PropTypes.func.description("Called when the click send").defaultValue(defaultComposerPros.onSend),
|
|
27
|
-
onFocus: PropTypes.func.description("Input focus").defaultValue(defaultComposerPros.onFocus),
|
|
28
|
-
onBlur: PropTypes.func.description("Input blur").defaultValue(defaultComposerPros.onBlur),
|
|
29
|
-
onKeyDown: PropTypes.func.description("Input on key down").defaultValue(defaultComposerPros.onKeyDown),
|
|
30
|
-
maxHeight: PropTypes.number.description("Max height of the composer. Use 0 for no limit").defaultValue(defaultComposerPros.onBlur),
|
|
31
|
-
inputMaxLength: PropTypes.number.description("Max length of the composer. `undefined` for no limit").defaultValue(defaultComposerPros.inputMaxLength),
|
|
32
|
-
buttonDisabled: PropTypes.bool.description("Control the disabled for the send button").defaultValue(defaultComposerPros.buttonDisabled),
|
|
33
|
-
dataTestid: PropTypes.string.description("Data testid").defaultValue(defaultComposerPros.placeholder),
|
|
34
|
-
actionRef: PropTypes.object.description(`Reference:
|
|
35
|
-
{
|
|
36
|
-
scrollToIndex: (n: number) => void,
|
|
37
|
-
getMessagesInView: () => number[],
|
|
38
|
-
focusToIndex: (n: number) => void,
|
|
39
|
-
focusToList: () => void,
|
|
40
|
-
focusToComposer: () => void,
|
|
41
|
-
focusToSend: () => void,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
`).defaultValue(defaultComposerPros.actionRef)
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
composerProps,
|
|
48
|
-
defaultComposerPros
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/props.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\n\nexport interface TextAreaProps {\n height: string | number;\n style: React.CSSProperties;\n}\n\nexport const defaultComposerPros: ChatComposerProps = {\n placeholder: 'Type your message',\n inputValue: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n onKeyDown: noop,\n maxHeight: 0,\n inputMaxLength: undefined,\n maxLengthMessage: undefined,\n buttonDisabled: false,\n dataTestid: 'ds-chat-composer',\n actionRef: noop,\n};\n\nexport interface ChatComposerProps {\n placeholder?: string;\n inputValue?: string;\n maxLengthMessage?: string;\n onChange: (value: string) => void;\n onResize?: (value: number) => void;\n onSend: (value: string) => void;\n onFocus?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n maxHeight?: number;\n inputMaxLength: number | undefined;\n buttonDisabled: boolean;\n dataTestid?: string;\n actionRef: PropTypes.func;\n}\n\nexport const composerProps = {\n placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultComposerPros.placeholder),\n inputValue: PropTypes.string.description('Input value').defaultValue(defaultComposerPros.inputValue),\n maxLengthMessage: PropTypes.string\n .description('Max length message')\n .defaultValue(defaultComposerPros.maxLengthMessage),\n onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultComposerPros.onChange),\n onResize: PropTypes.func\n .description('Called the input changes his height')\n .defaultValue(defaultComposerPros.onResize),\n onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultComposerPros.onSend),\n onFocus: PropTypes.func.description('Input focus').defaultValue(defaultComposerPros.onFocus),\n onBlur: PropTypes.func.description('Input blur').defaultValue(defaultComposerPros.onBlur),\n onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultComposerPros.onKeyDown),\n maxHeight: PropTypes.number\n .description('Max height of the composer. Use 0 for no limit')\n .defaultValue(defaultComposerPros.onBlur),\n inputMaxLength: PropTypes.number\n .description('Max length of the composer. `undefined` for no limit')\n .defaultValue(defaultComposerPros.inputMaxLength),\n buttonDisabled: PropTypes.bool\n .description('Control the disabled for the send button')\n .defaultValue(defaultComposerPros.buttonDisabled),\n dataTestid: PropTypes.string.description('Data testid').defaultValue(defaultComposerPros.placeholder),\n actionRef: PropTypes.object\n .description(\n `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 `,\n )\n .defaultValue(defaultComposerPros.actionRef),\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACCA;AACA;AAOO,MAAM,sBAAyC;AAAA,EACpD,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AAAA;AAoBN,MAAM,gBAAgB;AAAA,EAC3B,aAAa,UAAU,OAAO,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAChG,YAAY,UAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,kBAAkB,UAAU,OACzB,YAAY,sBACZ,aAAa,oBAAoB;AAAA,EACpC,UAAU,UAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EACpG,UAAU,UAAU,KACjB,YAAY,uCACZ,aAAa,oBAAoB;AAAA,EACpC,QAAQ,UAAU,KAAK,YAAY,8BAA8B,aAAa,oBAAoB;AAAA,EAClG,SAAS,UAAU,KAAK,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACpF,QAAQ,UAAU,KAAK,YAAY,cAAc,aAAa,oBAAoB;AAAA,EAClF,WAAW,UAAU,KAAK,YAAY,qBAAqB,aAAa,oBAAoB;AAAA,EAC5F,WAAW,UAAU,OAClB,YAAY,kDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,UAAU,OACvB,YAAY,wDACZ,aAAa,oBAAoB;AAAA,EACpC,gBAAgB,UAAU,KACvB,YAAY,4CACZ,aAAa,oBAAoB;AAAA,EACpC,YAAY,UAAU,OAAO,YAAY,eAAe,aAAa,oBAAoB;AAAA,EACzF,WAAW,UAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAYD,aAAa,oBAAoB;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { DSButton } from "@elliemae/ds-button";
|
|
5
|
-
const StyledChatContainerContentComposer = styled(Grid)`
|
|
6
|
-
width: 100%;
|
|
7
|
-
min-height: 56px;
|
|
8
|
-
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
9
|
-
padding: ${(props) => props.theme.space.xxs};
|
|
10
|
-
padding-bottom: 3px;
|
|
11
|
-
padding-top: 6px;
|
|
12
|
-
padding-left: ${(props) => props.theme.space.xs};
|
|
13
|
-
max-height: ${(props) => props.maxHeight};
|
|
14
|
-
border-top: 1px solid #cbcfd7;
|
|
15
|
-
`;
|
|
16
|
-
const StyledComposerInput = styled.textarea`
|
|
17
|
-
padding: ${(props) => props.theme.space.xxs};
|
|
18
|
-
resize: none;
|
|
19
|
-
min-height: 32px;
|
|
20
|
-
border-radius: 2px;
|
|
21
|
-
border: solid 1px #cbcfd7;
|
|
22
|
-
color: #25292f;
|
|
23
|
-
height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height};
|
|
24
|
-
min-width: 244px;
|
|
25
|
-
overflow-y: auto;
|
|
26
|
-
font-size: 13px;
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
line-height: 1;
|
|
29
|
-
transition: height 0.05s;
|
|
30
|
-
&:focus {
|
|
31
|
-
outline: none;
|
|
32
|
-
border: 1px solid ${(props) => props.theme.colors.brand[600]};
|
|
33
|
-
box-shadow: inset 0 0 0 1px #8cc2ed;
|
|
34
|
-
border-radius: 2px;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
const StyledComposerButton = styled(DSButton)`
|
|
38
|
-
&:disabled {
|
|
39
|
-
background: none;
|
|
40
|
-
svg {
|
|
41
|
-
fill: #5d6775;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
svg {
|
|
45
|
-
fill: ${(props) => props.theme.colors.brand[600]};
|
|
46
|
-
}
|
|
47
|
-
&:focus {
|
|
48
|
-
background: ${(props) => props.theme.colors.brand[200]};
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
const StyledCounterArea = styled(Grid)`
|
|
52
|
-
text-align: right;
|
|
53
|
-
font-size: 11px;
|
|
54
|
-
height: 15px;
|
|
55
|
-
align-items: center;
|
|
56
|
-
font-style: italic;
|
|
57
|
-
${(props) => props.hasError ? `color:${props.theme.colors.danger[900]};` : ""}
|
|
58
|
-
position:relative;
|
|
59
|
-
`;
|
|
60
|
-
const StyledCounterErrorA11y = styled.span`
|
|
61
|
-
width: 1px;
|
|
62
|
-
height: 1px;
|
|
63
|
-
position: absolute;
|
|
64
|
-
clip: rect(1px, 1px, 1px, 1px);
|
|
65
|
-
`;
|
|
66
|
-
export {
|
|
67
|
-
StyledChatContainerContentComposer,
|
|
68
|
-
StyledComposerButton,
|
|
69
|
-
StyledComposerInput,
|
|
70
|
-
StyledCounterArea,
|
|
71
|
-
StyledCounterErrorA11y
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/styled.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSButton } from '@elliemae/ds-button';\nimport { TextAreaProps } from './props';\n\n// Composer\nexport const StyledChatContainerContentComposer = styled(Grid)`\n width: 100%;\n min-height: 56px;\n background: ${(props) => props.theme.colors.neutral['050']};\n padding: ${(props) => props.theme.space.xxs};\n padding-bottom: 3px;\n padding-top: 6px;\n padding-left: ${(props) => props.theme.space.xs};\n max-height: ${(props) => props.maxHeight};\n border-top: 1px solid #cbcfd7;\n`;\n\nexport const StyledComposerInput = styled.textarea<any>`\n padding: ${(props) => props.theme.space.xxs};\n resize: none;\n min-height: 32px;\n border-radius: 2px;\n border: solid 1px #cbcfd7;\n color: #25292f;\n height: ${(props: TextAreaProps) => (typeof props.height === 'number' ? `${props.height}px` : props.height)};\n min-width: 244px;\n overflow-y: auto;\n font-size: 13px;\n font-weight: 400;\n line-height: 1;\n transition: height 0.05s;\n &:focus {\n outline: none;\n border: 1px solid ${(props) => props.theme.colors.brand[600]};\n box-shadow: inset 0 0 0 1px #8cc2ed;\n border-radius: 2px;\n }\n`;\nexport const StyledComposerButton = styled(DSButton)`\n &:disabled {\n background: none;\n svg {\n fill: #5d6775;\n }\n }\n svg {\n fill: ${(props) => props.theme.colors.brand[600]};\n }\n &:focus {\n background: ${(props) => props.theme.colors.brand[200]};\n }\n`;\n\nexport const StyledCounterArea = styled(Grid)`\n text-align: right;\n font-size: 11px;\n height: 15px;\n align-items: center;\n font-style: italic;\n ${(props) => (props.hasError ? `color:${props.theme.colors.danger[900]};` : '')}\n position:relative;\n`;\n\nexport const StyledCounterErrorA11y = styled.span`\n width: 1px;\n height: 1px;\n position: absolute;\n clip: rect(1px, 1px, 1px, 1px);\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAIO,MAAM,qCAAqC,OAAO;AAAA;AAAA;AAAA,gBAGzC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,aACzC,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,kBAGxB,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA,gBAC/B,CAAC,UAAU,MAAM;AAAA;AAAA;AAI1B,MAAM,sBAAsB,OAAO;AAAA,aAC7B,CAAC,UAAU,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAM9B,CAAC,UAA0B,OAAO,MAAM,WAAW,WAAW,GAAG,MAAM,aAAa,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAS9E,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKrD,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAQ/B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA,kBAG9B,CAAC,UAAU,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAI/C,MAAM,oBAAoB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMpC,CAAC,UAAW,MAAM,WAAW,SAAS,MAAM,MAAM,OAAO,OAAO,UAAU;AAAA;AAAA;AAIvE,MAAM,yBAAyB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { noop } from "lodash";
|
|
4
|
-
import { describe } from "react-desc";
|
|
5
|
-
import DSIndeterminateProgressIndicator from "@elliemae/ds-indeterminate-progress-indicator";
|
|
6
|
-
import DSBanner, { BANNER_TYPES } from "@elliemae/ds-banner";
|
|
7
|
-
import { ChatComposer } from "../chat-composer";
|
|
8
|
-
import { ChatContainerMessagesList } from "../chat-container-messages-list";
|
|
9
|
-
import { defaultProps, containerProps } from "./props";
|
|
10
|
-
import { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from "./styled";
|
|
11
|
-
import { useValidateProps } from "./config/useValidateProps";
|
|
12
|
-
const ChatContainer = (props) => {
|
|
13
|
-
useValidateProps(props, containerProps);
|
|
14
|
-
const {
|
|
15
|
-
sendingText,
|
|
16
|
-
sendingMessages,
|
|
17
|
-
bannerPosition,
|
|
18
|
-
bannerProps,
|
|
19
|
-
messagesListProps,
|
|
20
|
-
composerProps,
|
|
21
|
-
composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },
|
|
22
|
-
actionRef,
|
|
23
|
-
device,
|
|
24
|
-
isLoading,
|
|
25
|
-
hasMoreItems,
|
|
26
|
-
getMoreMessages,
|
|
27
|
-
ariaLabel
|
|
28
|
-
} = props;
|
|
29
|
-
const bannerRef = React2.useRef({ focusOnWrapper: noop, focusOnLink: noop });
|
|
30
|
-
const containerRef = React2.useRef();
|
|
31
|
-
const listRef = React2.useRef({ scrollToIndex: noop });
|
|
32
|
-
const onResize = React2.useCallback((height) => {
|
|
33
|
-
if (onComposerResize)
|
|
34
|
-
onComposerResize(height);
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {
|
|
37
|
-
align: "start"
|
|
38
|
-
});
|
|
39
|
-
}, 50);
|
|
40
|
-
}, [onComposerResize, messagesListProps.messages, actionRef]);
|
|
41
|
-
const Container = device === "desktop" ? StyledChatContainerContent : MobileStyledChatContainerContent;
|
|
42
|
-
const handleTabs = React2.useCallback((e) => {
|
|
43
|
-
if (onComposerKeyDown)
|
|
44
|
-
onComposerKeyDown(e);
|
|
45
|
-
else {
|
|
46
|
-
const ref = actionRef || listRef;
|
|
47
|
-
if (e.shiftKey && e.key === "Tab") {
|
|
48
|
-
if (messagesListProps.messages?.length > 0) {
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
if (["top", "bottom"].includes(bannerPosition)) {
|
|
51
|
-
bannerRef.current.focusOnWrapper();
|
|
52
|
-
} else {
|
|
53
|
-
const last = ref.current.getMessagesInView().pop();
|
|
54
|
-
ref.current?.focusToIndexWithoutScroll(last);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}, [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length]);
|
|
60
|
-
React2.useEffect(() => {
|
|
61
|
-
if (actionRef && actionRef.current) {
|
|
62
|
-
actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;
|
|
63
|
-
actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;
|
|
64
|
-
}
|
|
65
|
-
}, [actionRef]);
|
|
66
|
-
return /* @__PURE__ */ React2.createElement(Container, {
|
|
67
|
-
rows: ["minmax(0, 1fr)", "auto"],
|
|
68
|
-
ref: containerRef,
|
|
69
|
-
role: "region",
|
|
70
|
-
"aria-label": ariaLabel
|
|
71
|
-
}, /* @__PURE__ */ React2.createElement("div", {
|
|
72
|
-
style: { position: "relative", overflow: "hidden" }
|
|
73
|
-
}, /* @__PURE__ */ React2.createElement(ChatContainerMessagesList, {
|
|
74
|
-
...messagesListProps,
|
|
75
|
-
actionRef: actionRef || listRef,
|
|
76
|
-
isLoading,
|
|
77
|
-
hasMoreItems,
|
|
78
|
-
getMoreMessages,
|
|
79
|
-
sendingMessages,
|
|
80
|
-
sendingText,
|
|
81
|
-
bannerPosition,
|
|
82
|
-
bannerRef
|
|
83
|
-
}), ["top", "bottom"].includes(isLoading) ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
|
|
84
|
-
isLoading,
|
|
85
|
-
"data-testid": "ds-chat-loading-indicator"
|
|
86
|
-
}, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
|
|
87
|
-
processing: true,
|
|
88
|
-
title: "Loading"
|
|
89
|
-
})) : null, /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
|
|
90
|
-
linear: true,
|
|
91
|
-
isLoading: bannerPosition
|
|
92
|
-
}, /* @__PURE__ */ React2.createElement(DSBanner, {
|
|
93
|
-
showCloseButton: true,
|
|
94
|
-
label: bannerProps.label || "Unread messages",
|
|
95
|
-
containerProps: { id: "ds-chat-banner" },
|
|
96
|
-
actionLink: {
|
|
97
|
-
label: bannerProps.viewLabel || "View",
|
|
98
|
-
onClick: bannerProps.onView
|
|
99
|
-
},
|
|
100
|
-
onClose: bannerProps.onClose,
|
|
101
|
-
isOpen: true,
|
|
102
|
-
type: bannerProps.type || BANNER_TYPES.INFO,
|
|
103
|
-
actionRef: bannerRef
|
|
104
|
-
})), sendingMessages && sendingMessages.length > 0 ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
|
|
105
|
-
isLoading: "bottom",
|
|
106
|
-
linear: true,
|
|
107
|
-
"data-testid": "ds-chat-loading-indicator"
|
|
108
|
-
}, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
|
|
109
|
-
processing: true,
|
|
110
|
-
title: sendingText,
|
|
111
|
-
lineOnly: true
|
|
112
|
-
})) : null), /* @__PURE__ */ React2.createElement(ChatComposer, {
|
|
113
|
-
...composerProps,
|
|
114
|
-
onKeyDown: handleTabs,
|
|
115
|
-
onResize,
|
|
116
|
-
maxHeight: (containerRef.current?.clientHeight || 0) / 2,
|
|
117
|
-
actionRef: actionRef || listRef
|
|
118
|
-
}));
|
|
119
|
-
};
|
|
120
|
-
ChatContainer.propTypes = containerProps;
|
|
121
|
-
ChatContainer.defaultProps = defaultProps;
|
|
122
|
-
const ChatContainerWithSchema = describe(ChatContainer);
|
|
123
|
-
ChatContainerWithSchema.propTypes = containerProps;
|
|
124
|
-
export {
|
|
125
|
-
ChatContainer,
|
|
126
|
-
ChatContainerWithSchema
|
|
127
|
-
};
|
|
128
|
-
//# sourceMappingURL=ChatContainer.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/ChatContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React from 'react';\nimport { noop } from 'lodash';\nimport { describe } from 'react-desc';\nimport DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';\nimport DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';\nimport { ChatComposer } from '../chat-composer';\nimport { ChatContainerMessagesList } from '../chat-container-messages-list';\nimport { ChatContainerProps, defaultProps, containerProps } from './props';\nimport { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst ChatContainer = (props: ChatContainerProps): JSX.Element => {\n useValidateProps(props, containerProps);\n\n const {\n sendingText,\n sendingMessages,\n bannerPosition,\n bannerProps,\n messagesListProps,\n composerProps,\n composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },\n actionRef,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n ariaLabel,\n } = props;\n const bannerRef = React.useRef({ focusOnWrapper: noop, focusOnLink: noop });\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n /*\n setTimeout is used to equal the animation duration from the \n composer text area when increase its size\n */\n setTimeout(() => {\n actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'start',\n });\n }, 50);\n },\n [onComposerResize, messagesListProps.messages, actionRef],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n const handleTabs = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (onComposerKeyDown) onComposerKeyDown(e);\n else {\n const ref = actionRef || listRef;\n if (e.shiftKey && e.key === 'Tab') {\n if (messagesListProps.messages?.length > 0) {\n e.preventDefault();\n if (['top', 'bottom'].includes(bannerPosition)) {\n bannerRef.current.focusOnWrapper();\n } else {\n const last = ref.current.getMessagesInView().pop();\n ref.current?.focusToIndexWithoutScroll(last);\n }\n }\n }\n }\n },\n [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length],\n );\n\n // Map actions\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;\n actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;\n }\n }, [actionRef]);\n\n return (\n <Container rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\" aria-label={ariaLabel}>\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <ChatContainerMessagesList\n {...messagesListProps}\n actionRef={actionRef || listRef}\n isLoading={isLoading}\n hasMoreItems={hasMoreItems}\n getMoreMessages={getMoreMessages}\n sendingMessages={sendingMessages}\n sendingText={sendingText}\n bannerPosition={bannerPosition}\n bannerRef={bannerRef}\n />\n {['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading} data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer linear isLoading={bannerPosition}>\n <DSBanner\n showCloseButton\n label={bannerProps.label || 'Unread messages'}\n containerProps={{ id: 'ds-chat-banner' }}\n actionLink={{\n label: bannerProps.viewLabel || 'View',\n onClick: bannerProps.onView,\n }}\n onClose={bannerProps.onClose}\n isOpen\n type={bannerProps.type || BANNER_TYPES.INFO}\n actionRef={bannerRef}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title={sendingText} lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onKeyDown={handleTabs}\n onResize={onResize}\n maxHeight={(containerRef.current?.clientHeight || 0) / 2}\n actionRef={actionRef || listRef}\n />\n </Container>\n );\n};\n\nChatContainer.propTypes = containerProps;\nChatContainer.defaultProps = defaultProps;\nconst ChatContainerWithSchema = describe(ChatContainer);\nChatContainerWithSchema.propTypes = containerProps;\n\nexport { ChatContainer, ChatContainerWithSchema };\n"],
|
|
5
|
-
"mappings": "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",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { useValidateTypescriptPropTypes } from "@elliemae/ds-props-helpers";
|
|
3
|
-
const useValidateProps = (props, propTypes) => {
|
|
4
|
-
useValidateTypescriptPropTypes(props, propTypes);
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
useValidateProps
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=useValidateProps.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/parts/chat-container/config/useValidateProps.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerProps, propTypes: unknown): void => {\n useValidateTypescriptPropTypes(props, propTypes);\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AAGO,MAAM,mBAAmB,CAAC,OAA2B,cAA6B;AACvF,iCAA+B,OAAO;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/index.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ChatContainer, ChatContainerWithSchema } from './ChatContainer';\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { PropTypes } from "react-desc";
|
|
3
|
-
import { noop } from "lodash";
|
|
4
|
-
import { BANNER_TYPES } from "@elliemae/ds-banner";
|
|
5
|
-
import {
|
|
6
|
-
defaultProps as defaultListProps
|
|
7
|
-
} from "../chat-container-messages-list/props";
|
|
8
|
-
import { defaultComposerPros } from "../chat-composer/props";
|
|
9
|
-
const defaultProps = {
|
|
10
|
-
messagesListProps: defaultListProps,
|
|
11
|
-
composerProps: defaultComposerPros,
|
|
12
|
-
actionRef: void 0,
|
|
13
|
-
autoScroll: false,
|
|
14
|
-
device: "desktop",
|
|
15
|
-
isLoading: void 0,
|
|
16
|
-
hasMoreItems: void 0,
|
|
17
|
-
getMoreMessages: noop,
|
|
18
|
-
bannerPosition: void 0,
|
|
19
|
-
bannerProps: {
|
|
20
|
-
type: BANNER_TYPES.INFO,
|
|
21
|
-
label: "Unread Messages",
|
|
22
|
-
viewLabel: "View",
|
|
23
|
-
onView: noop,
|
|
24
|
-
onClose: noop
|
|
25
|
-
},
|
|
26
|
-
sendingMessages: void 0,
|
|
27
|
-
sendingText: "Sending",
|
|
28
|
-
ariaLabel: "Chat window"
|
|
29
|
-
};
|
|
30
|
-
const containerProps = {
|
|
31
|
-
messagesListProps: PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
|
|
32
|
-
composerProps: PropTypes.object.description("Composer configuration").defaultValue(defaultProps.composerProps),
|
|
33
|
-
autoScroll: PropTypes.bool.description("Auto scroll to bottom on resize").defaultValue(defaultProps.autoScroll),
|
|
34
|
-
device: PropTypes.string.description("Option to render mobile or desktop style composer").defaultValue(defaultProps.device),
|
|
35
|
-
isLoading: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Loading messages indicator at the `top` or `bottom` of the container"),
|
|
36
|
-
hasMoreItems: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Load More button at the `top` or `bottom` of the container"),
|
|
37
|
-
getMoreMessages: PropTypes.func.description("Called when the user clicks on load more").defaultValue(defaultProps.getMoreMessages),
|
|
38
|
-
bannerPosition: PropTypes.oneOf(["top", "bottom", void 0]).description("Show Loading messages indicator at the `top` or `bottom` of the container"),
|
|
39
|
-
bannerProps: PropTypes.object.description(`Banner configuration:
|
|
40
|
-
label: string;
|
|
41
|
-
viewLabel: string;
|
|
42
|
-
type: BANNER_TYPES;
|
|
43
|
-
onView: () => void;
|
|
44
|
-
onClose: () => void;
|
|
45
|
-
`).defaultValue(defaultProps.bannerProps),
|
|
46
|
-
sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)]).description("Array of ids of sending messages").defaultValue(defaultProps.sendingMessages),
|
|
47
|
-
sendingText: PropTypes.string.description("Label description for messages in sending status").defaultValue(defaultProps.sendingText),
|
|
48
|
-
actionRef: PropTypes.object.description(`Reference:
|
|
49
|
-
{
|
|
50
|
-
scrollToIndex: (n: number) => void,
|
|
51
|
-
getMessagesInView: () => number[],
|
|
52
|
-
focusToIndex: (n: number) => void,
|
|
53
|
-
focusToList: () => void,
|
|
54
|
-
focusToComposer: () => void,
|
|
55
|
-
focusToSend: () => void,
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
`).defaultValue(defaultProps.actionRef),
|
|
59
|
-
ariaLabel: PropTypes.string.description("Aria Label description for chat container").defaultValue(defaultProps.ariaLabel)
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
containerProps,
|
|
63
|
-
defaultProps
|
|
64
|
-
};
|
|
65
|
-
//# sourceMappingURL=props.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/props.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BANNER_TYPES } from '@elliemae/ds-banner';\nimport {\n ChatContainerMessagesListProps,\n defaultProps as defaultListProps,\n} from '../chat-container-messages-list/props';\nimport { defaultComposerPros, ChatComposerProps } from '../chat-composer/props';\n\ninterface ChatBannerProps {\n label: string;\n viewLabel: string;\n type?: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n}\nexport interface ChatContainerProps {\n messagesListProps: Pick<ChatContainerMessagesListProps, 'messages' | 'onScrollEnds'>;\n composerProps: ChatComposerProps;\n actionRef: PropTypes.func;\n autoScroll: boolean;\n device: 'desktop' | 'mobile';\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n bannerPosition?: 'top' | 'bottom';\n bannerProps?: ChatBannerProps;\n sendingMessages?: string[] | number[];\n sendingText: string;\n ariaLabel: string;\n}\n\nexport const defaultProps: ChatContainerProps = {\n messagesListProps: defaultListProps,\n composerProps: defaultComposerPros,\n actionRef: undefined,\n autoScroll: false,\n device: 'desktop',\n isLoading: undefined,\n hasMoreItems: undefined,\n getMoreMessages: noop,\n bannerPosition: undefined,\n bannerProps: {\n type: BANNER_TYPES.INFO,\n label: 'Unread Messages',\n viewLabel: 'View',\n onView: noop,\n onClose: noop,\n },\n sendingMessages: undefined,\n sendingText: 'Sending',\n ariaLabel: 'Chat window',\n};\n\nexport const containerProps = {\n messagesListProps: PropTypes.object\n .description('ChatMessageList props \"messages\" / \"onScrollEnds\"')\n .defaultValue(defaultProps.messagesListProps),\n composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),\n autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),\n device: PropTypes.string\n .description('Option to render mobile or desktop style composer')\n .defaultValue(defaultProps.device),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n bannerProps: PropTypes.object\n .description(\n `Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n `,\n )\n .defaultValue(defaultProps.bannerProps),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\n actionRef: PropTypes.object\n .description(\n `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 `,\n )\n .defaultValue(defaultProps.actionRef),\n ariaLabel: PropTypes.string\n .description('Aria Label description for chat container')\n .defaultValue(defaultProps.ariaLabel),\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AAyBO,MAAM,eAAmC;AAAA,EAC9C,mBAAmB;AAAA,EACnB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,aAAa;AAAA,IACX,MAAM,aAAa;AAAA,IACnB,OAAO;AAAA,IACP,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,SAAS;AAAA;AAAA,EAEX,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,WAAW;AAAA;AAGN,MAAM,iBAAiB;AAAA,EAC5B,mBAAmB,UAAU,OAC1B,YAAY,qDACZ,aAAa,aAAa;AAAA,EAC7B,eAAe,UAAU,OAAO,YAAY,0BAA0B,aAAa,aAAa;AAAA,EAChG,YAAY,UAAU,KAAK,YAAY,mCAAmC,aAAa,aAAa;AAAA,EACpG,QAAQ,UAAU,OACf,YAAY,qDACZ,aAAa,aAAa;AAAA,EAC7B,WAAW,UAAU,MAAM,CAAC,OAAO,UAAU,SAAY,YACvD;AAAA,EAEF,cAAc,UAAU,MAAM,CAAC,OAAO,UAAU,SAAY,YAC1D;AAAA,EAEF,iBAAiB,UAAU,KACxB,YAAY,4CACZ,aAAa,aAAa;AAAA,EAC7B,gBAAgB,UAAU,MAAM,CAAC,OAAO,UAAU,SAAY,YAC5D;AAAA,EAEF,aAAa,UAAU,OACpB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQD,aAAa,aAAa;AAAA,EAC7B,iBAAiB,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,SAAS,UAAU,QAAQ,UAAU,UACpG,YAAY,oCACZ,aAAa,aAAa;AAAA,EAC7B,aAAa,UAAU,OACpB,YAAY,oDACZ,aAAa,aAAa;AAAA,EAC7B,WAAW,UAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAYD,aAAa,aAAa;AAAA,EAC7B,WAAW,UAAU,OAClB,YAAY,6CACZ,aAAa,aAAa;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
-
import { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from "../bubble/styled";
|
|
5
|
-
import { StyledComposerInput } from "../chat-composer/styled";
|
|
6
|
-
import { Wrapper, Title, Time, Message } from "../system-message/style";
|
|
7
|
-
const CONTAINER_WIDTH = 300;
|
|
8
|
-
const StyledChatContainerContent = styled(Grid)`
|
|
9
|
-
height: 100%;
|
|
10
|
-
min-width: ${CONTAINER_WIDTH}px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
background: ${(props) => props.theme.colors.neutral["050"]};
|
|
13
|
-
position: relative;
|
|
14
|
-
`;
|
|
15
|
-
const StyledIndicatorContainer = styled.div`
|
|
16
|
-
transition: 0.4s ease-in-out;
|
|
17
|
-
position: absolute;
|
|
18
|
-
visibility: hidden;
|
|
19
|
-
pointer-events: none;
|
|
20
|
-
width: 100%;
|
|
21
|
-
padding: 0 ${(props) => !props.linear ? props.theme.space.xxs : 0};
|
|
22
|
-
left: 0;
|
|
23
|
-
right: 0;
|
|
24
|
-
background: ${(props) => props.theme.colors.neutral["000"]};
|
|
25
|
-
${(props) => props.isLoading === "top" ? `
|
|
26
|
-
top: -41px;
|
|
27
|
-
transform: translate(0, 41px);
|
|
28
|
-
visibility: visible;
|
|
29
|
-
pointer-events: auto;
|
|
30
|
-
` : ""}
|
|
31
|
-
${(props) => props.isLoading === "bottom" ? `
|
|
32
|
-
bottom: -41px;
|
|
33
|
-
transform: translate(0, -41px);
|
|
34
|
-
visibility: visible;
|
|
35
|
-
pointer-events: auto;
|
|
36
|
-
` : ""}
|
|
37
|
-
|
|
38
|
-
& div,a {
|
|
39
|
-
font-size: 13px;
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
|
-
const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`
|
|
43
|
-
${StyledTitleLeftBubble},
|
|
44
|
-
${StyleBodyWrapper} {
|
|
45
|
-
font-size: 16px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
${StyledTitleRightBubble} {
|
|
49
|
-
font-size: 13px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${Wrapper} {
|
|
53
|
-
background-color: #fff;
|
|
54
|
-
box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
${Title},
|
|
58
|
-
${Message} {
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
text-align: left;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
${Time} {
|
|
64
|
-
font-size: 13px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
${StyledComposerInput} {
|
|
68
|
-
font-size: 16px;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
${StyledIndicatorContainer} {
|
|
72
|
-
font-size: 16px;
|
|
73
|
-
}
|
|
74
|
-
`;
|
|
75
|
-
export {
|
|
76
|
-
CONTAINER_WIDTH,
|
|
77
|
-
MobileStyledChatContainerContent,
|
|
78
|
-
StyledChatContainerContent,
|
|
79
|
-
StyledIndicatorContainer
|
|
80
|
-
};
|
|
81
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/styled.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { StyledTitleRightBubble, StyledTitleLeftBubble, StyleBodyWrapper } from '../bubble/styled';\nimport { StyledComposerInput } from '../chat-composer/styled';\nimport { Wrapper, Title, Time, Message } from '../system-message/style';\nexport const CONTAINER_WIDTH = 300;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n position: relative;\n`;\nexport const StyledIndicatorContainer = styled.div<{\n isLoading?: 'top' | 'bottom';\n linear?: boolean;\n}>`\n transition: 0.4s ease-in-out;\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: 100%;\n padding: 0 ${(props) => (!props.linear ? props.theme.space.xxs : 0)};\n left: 0;\n right: 0;\n background: ${(props) => props.theme.colors.neutral['000']};\n ${(props) =>\n props.isLoading === 'top'\n ? `\n top: -41px;\n transform: translate(0, 41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n ${(props) =>\n props.isLoading === 'bottom'\n ? `\n bottom: -41px;\n transform: translate(0, -41px);\n visibility: visible;\n pointer-events: auto;\n `\n : ''}\n\n & div,a {\n font-size: 13px;\n }\n`;\n\nexport const MobileStyledChatContainerContent = styled(StyledChatContainerContent)`\n ${StyledTitleLeftBubble},\n ${StyleBodyWrapper} {\n font-size: 16px;\n }\n\n ${StyledTitleRightBubble} {\n font-size: 13px;\n }\n\n ${Wrapper} {\n background-color: #fff;\n box-shadow: -0 1px 3px rgba(53, 60, 70, 0.8);\n }\n\n ${Title},\n ${Message} {\n font-size: 16px;\n text-align: left;\n }\n\n ${Time} {\n font-size: 13px;\n }\n\n ${StyledComposerInput} {\n font-size: 16px;\n }\n\n ${StyledIndicatorContainer} {\n font-size: 16px;\n }\n`;\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AACO,MAAM,kBAAkB;AAExB,MAAM,6BAA6B,OAAO;AAAA;AAAA,eAElC;AAAA;AAAA,gBAEC,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAG/C,MAAM,2BAA2B,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAShC,CAAC,UAAW,CAAC,MAAM,SAAS,MAAM,MAAM,MAAM,MAAM;AAAA;AAAA;AAAA,gBAGnD,CAAC,UAAU,MAAM,MAAM,OAAO,QAAQ;AAAA,IAClD,CAAC,UACD,MAAM,cAAc,QAChB;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA;AAAA,IACJ,CAAC,UACD,MAAM,cAAc,WAChB;AAAA;AAAA;AAAA;AAAA;AAAA,MAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOD,MAAM,mCAAmC,OAAO;AAAA,IACnD;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;AAAA,IAIA;AAAA;AAAA;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import { SimpleTruncatedTooltipText } from "@elliemae/ds-truncated-tooltip-text";
|
|
4
|
-
import {
|
|
5
|
-
StyledChatContainerContentHeader,
|
|
6
|
-
StyledChatContainerContentHeaderLabel,
|
|
7
|
-
StyledChatContainerContentHeaderActions
|
|
8
|
-
} from "./styled";
|
|
9
|
-
import { validHeaderChilds } from "./helpers";
|
|
10
|
-
const ChatContainerHeader = (props) => {
|
|
11
|
-
const { title, floating, children } = props;
|
|
12
|
-
return /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeader, {
|
|
13
|
-
alignItems: "center",
|
|
14
|
-
cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
|
|
15
|
-
floating,
|
|
16
|
-
role: "heading"
|
|
17
|
-
}, /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderLabel, {
|
|
18
|
-
"data-testid": "chat-container-header-title",
|
|
19
|
-
pl: "xxs",
|
|
20
|
-
pr: "xxs"
|
|
21
|
-
}, /* @__PURE__ */ React2.createElement(SimpleTruncatedTooltipText, {
|
|
22
|
-
value: title
|
|
23
|
-
})), /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderActions, {
|
|
24
|
-
cols: validHeaderChilds(children),
|
|
25
|
-
justifyContent: "flex-end",
|
|
26
|
-
"data-testid": "chat-container-header-children"
|
|
27
|
-
}, children));
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
ChatContainerHeader
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=ChatContainerHeader.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container-header/ChatContainerHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\nimport { validHeaderChilds } from './helpers';\n\nexport const ChatContainerHeader: React.ComponentType = (props: any) => {\n const { title, floating, children } = props;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n floating={floating}\n role=\"heading\"\n >\n <StyledChatContainerContentHeaderLabel data-testid=\"chat-container-header-title\" pl=\"xxs\" pr=\"xxs\">\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={validHeaderChilds(children)}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA;ACAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AAEO,MAAM,sBAA2C,CAAC,UAAe;AACtE,QAAM,EAAE,OAAO,UAAU,aAAa;AAEtC,SACE,qCAAC,kCAAD;AAAA,IACE,YAAW;AAAA,IACX,MAAM,CAAC,kCAAkC,WAAW,SAAS;AAAA,IAC7D;AAAA,IACA,MAAK;AAAA,KAEL,qCAAC,uCAAD;AAAA,IAAuC,eAAY;AAAA,IAA8B,IAAG;AAAA,IAAM,IAAG;AAAA,KAC3F,qCAAC,4BAAD;AAAA,IAA4B,OAAO;AAAA,OAErC,qCAAC,yCAAD;AAAA,IACE,MAAM,kBAAkB;AAAA,IACxB,gBAAe;AAAA,IACf,eAAY;AAAA,KAEX;AAAA;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|