@zohoim/chat-components 0.0.13 → 0.0.14
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/es/ActionIcon/ActionIcon.js +57 -35
- package/es/ActionIcon/css/ActionIcon.module.css +4 -23
- package/es/ActionIcon/props/defaultProps.js +4 -2
- package/es/ActionIcon/props/propTypes.js +10 -3
- package/es/ActionIconWrapper/ActionIconWrapper.js +49 -0
- package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +27 -0
- package/es/ActionIconWrapper/index.js +1 -0
- package/es/{MediaControls → ActionIconWrapper}/props/defaultProps.js +3 -3
- package/es/ActionIconWrapper/props/propTypes.js +11 -0
- package/es/AttachmentBubble/AttachmentBubble.js +28 -28
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +16 -15
- package/es/AttachmentBubble/props/defaultProps.js +2 -2
- package/es/AttachmentBubble/props/propTypes.js +10 -5
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +7 -19
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +20 -16
- package/es/AttachmentBubbleInfo/props/defaultProps.js +1 -1
- package/es/AttachmentBubbleInfo/props/propTypes.js +3 -3
- package/es/AttachmentIcon/AttachmentIcon.js +47 -0
- package/es/AttachmentIcon/css/AttachmentIcon.module.css +4 -0
- package/es/AttachmentIcon/index.js +1 -0
- package/es/{im/IMAttachmentIcon → AttachmentIcon}/props/defaultProps.js +3 -3
- package/es/AttachmentIcon/props/propTypes.js +11 -0
- package/es/{im/IMAttachmentIcon/IMAttachmentIcon.js → AttachmentIcon/utils/getAttachmentIconComponent.js} +10 -40
- package/es/Audio/Audio.js +14 -36
- package/es/Audio/css/Audio.module.css +3 -3
- package/es/Audio/props/defaultProps.js +2 -3
- package/es/Audio/props/propTypes.js +3 -4
- package/es/AudioBubble/AudioBubble.js +25 -42
- package/es/AudioBubble/props/defaultProps.js +2 -4
- package/es/AudioBubble/props/propTypes.js +10 -7
- package/es/Fonts/puviFont.module.css +55 -54
- package/es/ImageBubble/ImageBubble.js +20 -20
- package/es/ImageBubble/css/ImageBubble.module.css +8 -11
- package/es/ImageBubble/props/defaultProps.js +1 -1
- package/es/ImageBubble/props/propTypes.js +5 -3
- package/es/InfoBubble/InfoBubble.js +6 -8
- package/es/InfoBubble/props/defaultProps.js +1 -1
- package/es/LazyLoadImage/LazyLoadImage.js +6 -16
- package/es/LazyLoadImage/css/LazyLoadImage.module.css +1 -0
- package/es/LazyLoadImage/props/defaultProps.js +1 -1
- package/es/LazyLoadImage/props/propTypes.js +3 -3
- package/es/LocationBubble/LocationBubble.js +15 -33
- package/es/LocationBubble/css/LocationBubble.module.css +11 -11
- package/es/LocationBubble/props/defaultProps.js +1 -1
- package/es/LocationBubble/props/propTypes.js +2 -2
- package/es/MediaBubbleWrapper/MediaBubbleWrapper.js +59 -0
- package/es/MediaBubbleWrapper/css/MediaBubbleWrapper.module.css +3 -0
- package/es/MediaBubbleWrapper/index.js +1 -0
- package/es/MediaBubbleWrapper/props/defaultProps.js +7 -0
- package/es/MediaBubbleWrapper/props/propTypes.js +16 -0
- package/es/Message/Message.js +59 -37
- package/es/Message/props/defaultProps.js +3 -3
- package/es/Message/props/propTypes.js +17 -38
- package/es/MessageAction/MessageAction.js +31 -18
- package/es/MessageAction/props/defaultProps.js +4 -4
- package/es/MessageAction/props/propTypes.js +11 -8
- package/es/MessageActions/MessageActions.js +54 -96
- package/es/MessageActions/css/MessageActions.module.css +2 -9
- package/es/MessageActions/props/defaultProps.js +2 -4
- package/es/MessageActions/props/propTypes.js +13 -19
- package/es/MessageActionsMore/MessageActionsMore.js +43 -35
- package/es/MessageActionsMore/css/MessageActionsMore.module.css +8 -5
- package/es/MessageActionsMore/props/defaultProps.js +3 -2
- package/es/MessageActionsMore/props/propTypes.js +3 -2
- package/es/MessageActionsWrapper/MessageActionsWrapper.js +36 -44
- package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +1 -1
- package/es/MessageActionsWrapper/props/defaultProps.js +4 -5
- package/es/MessageActionsWrapper/props/propTypes.js +7 -4
- package/es/MessageAvatar/MessageAvatar.js +11 -19
- package/es/MessageAvatar/css/MessageAvatar.module.css +3 -3
- package/es/MessageAvatar/props/defaultProps.js +2 -6
- package/es/MessageAvatar/props/propTypes.js +5 -5
- package/es/MessageBox/MessageBox.js +24 -25
- package/es/MessageBox/css/MessageBox.module.css +12 -14
- package/es/MessageBox/css/cssJSLogic.js +1 -21
- package/es/MessageBox/props/defaultProps.js +1 -3
- package/es/MessageBox/props/propTypes.js +8 -7
- package/es/MessageBubble/MessageBubble.js +61 -38
- package/es/MessageBubble/css/MessageBubble.module.css +11 -8
- package/es/MessageBubble/css/cssJSLogic.js +10 -26
- package/es/MessageBubble/props/defaultProps.js +1 -1
- package/es/MessageBubble/props/propTypes.js +7 -7
- package/es/MessageStatus/MessageStatus.js +11 -11
- package/es/MessageStatus/css/MessageStatus.module.css +1 -1
- package/es/MessageStatus/css/cssJSLogic.js +13 -9
- package/es/MessageStatus/props/defaultProps.js +1 -1
- package/es/MessageStatus/props/propTypes.js +4 -14
- package/es/MoreActionItem/MoreActionItem.js +21 -33
- package/es/MoreActionItem/css/MoreActionItem.module.css +5 -11
- package/es/MoreActionItem/props/defaultProps.js +1 -5
- package/es/MoreActionItem/props/propTypes.js +6 -5
- package/es/ReplyBubble/ReplyBubble.js +59 -28
- package/es/ReplyBubble/css/ReplyBubble.module.css +17 -0
- package/es/ReplyBubble/props/defaultProps.js +3 -4
- package/es/ReplyBubble/props/propTypes.js +15 -8
- package/es/ReplyBubbleContent/ReplyBubbleContent.js +11 -22
- package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +38 -38
- package/es/ReplyBubbleContent/props/defaultProps.js +1 -1
- package/es/ReplyBubbleContent/props/propTypes.js +4 -4
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +25 -31
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +4 -7
- package/es/ReplyBubbleHeader/props/defaultProps.js +2 -4
- package/es/ReplyBubbleHeader/props/propTypes.js +3 -2
- package/es/TextBubble/TextBubble.js +11 -29
- package/es/TextBubble/css/TextBubble.module.css +13 -9
- package/es/TextBubble/props/defaultProps.js +2 -5
- package/es/TextBubble/props/propTypes.js +3 -4
- package/es/Theme/{DeskAssets.js → ThemeAssets.js} +10 -6
- package/es/Theme/ThemeWrapper.js +54 -57
- package/es/Theme/{ToolttipWrapper.js → TooltipWrapper.js} +29 -25
- package/es/Theme/constants/index.js +1 -4
- package/es/Theme/crm/dark/blueFanTheme.js +5 -5
- package/es/Theme/crm/dark/blueTheme.js +5 -5
- package/es/Theme/crm/dark/commonColorVariable.js +5 -5
- package/es/Theme/crm/dark/darkBlueTheme.js +5 -5
- package/es/Theme/crm/dark/darkGreyTheme.js +5 -5
- package/es/Theme/crm/dark/greenTheme.js +5 -5
- package/es/Theme/crm/dark/orangeTheme.js +5 -5
- package/es/Theme/crm/dark/pinkTheme.js +5 -5
- package/es/Theme/crm/dark/tealTheme.js +5 -5
- package/es/Theme/crm/dark/whiteTheme.js +5 -5
- package/es/Theme/crm/light/blueFanTheme.js +5 -5
- package/es/Theme/crm/light/blueTheme.js +3 -3
- package/es/Theme/crm/light/commonColorVariable.js +3 -3
- package/es/Theme/crm/light/darkBlueTheme.js +5 -5
- package/es/Theme/crm/light/darkGreyTheme.js +5 -5
- package/es/Theme/crm/light/greenTheme.js +3 -3
- package/es/Theme/crm/light/orangeTheme.js +3 -3
- package/es/Theme/crm/light/pinkTheme.js +3 -3
- package/es/Theme/crm/light/tealTheme.js +3 -3
- package/es/Theme/crm/light/whiteTheme.js +5 -5
- package/es/Theme/crm/pureDark/blueFanTheme.js +5 -5
- package/es/Theme/crm/pureDark/blueTheme.js +5 -5
- package/es/Theme/crm/pureDark/commonColorVariable.js +3 -3
- package/es/Theme/crm/pureDark/darkBlueTheme.js +5 -5
- package/es/Theme/crm/pureDark/darkGreyTheme.js +5 -5
- package/es/Theme/crm/pureDark/greenTheme.js +5 -5
- package/es/Theme/crm/pureDark/orangeTheme.js +5 -5
- package/es/Theme/crm/pureDark/pinkTheme.js +5 -5
- package/es/Theme/crm/pureDark/tealTheme.js +5 -5
- package/es/Theme/crm/pureDark/whiteTheme.js +5 -5
- package/es/Theme/css/TooltipWrapper.module.css +2 -2
- package/es/Theme/props/defaultProps.js +2 -3
- package/es/Theme/props/propTypes.js +5 -6
- package/es/Theme/{desk/commonDeskColorVariable.js → themeVariables/commonThemeColorVariable.js} +2 -3
- package/es/Theme/{desk → themeVariables}/dark/blueTheme.js +11 -11
- package/es/Theme/{desk → themeVariables}/dark/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/dark/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/orangeTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/redTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/dark/yellowTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/blueTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/light/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/orangeTheme.js +6 -6
- package/es/Theme/{desk → themeVariables}/light/redTheme.js +6 -6
- package/es/Theme/{desk → themeVariables}/light/yellowTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/blueTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/pureDark/greenTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/orangeTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/redTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/pureDark/yellowTheme.js +7 -7
- package/es/Theme/utils/combineConfigurations.js +17 -0
- package/es/Theme/utils/flatVariables.js +12 -0
- package/es/Theme/utils/getCustomizedCssVariables.js +19 -0
- package/es/Theme/utils/getThemeConfigurations.js +47 -175
- package/es/Theme/utils/getWrapperDivProps.js +12 -0
- package/es/Video/Video.js +13 -45
- package/es/Video/css/Video.module.css +2 -7
- package/es/Video/props/defaultProps.js +2 -3
- package/es/Video/props/propTypes.js +3 -4
- package/es/VideoBubble/VideoBubble.js +31 -35
- package/es/VideoBubble/css/VideoBubble.module.css +4 -4
- package/es/VideoBubble/props/defaultProps.js +2 -3
- package/es/VideoBubble/props/propTypes.js +11 -7
- package/es/icons/create-icon-components.js +30 -0
- package/es/icons/icon.template.js +9 -8
- package/es/icons/iconSrc/common/index.js +1 -2
- package/es/im/ArticleBubble/ArticleBubble.js +66 -0
- package/es/{ArticleBubble → im/ArticleBubble}/css/ArticleBubble.module.css +9 -10
- package/es/{ArticleBubble → im/ArticleBubble}/props/defaultProps.js +1 -1
- package/es/im/ArticleBubble/props/propTypes.js +13 -0
- package/es/im/IMAutoMessageInfo/IMAutoMessageInfo.js +10 -20
- package/es/im/IMAutoMessageInfo/css/IMAutoMessageInfo.module.css +2 -3
- package/es/im/IMAutoMessageInfo/props/defaultProps.js +1 -1
- package/es/im/IMAutoMessageInfo/props/propTypes.js +11 -9
- package/es/im/IMInfoBubble/IMInfoBubble.js +6 -8
- package/es/im/IMInfoBubble/props/defaultProps.js +1 -1
- package/es/im/IMIntegrationIcon/IMIntegrationIcon.js +31 -38
- package/es/im/IMIntegrationIcon/css/IMIntegrationIcon.module.css +5 -8
- package/es/im/IMIntegrationIcon/css/cssJSLogic.js +9 -13
- package/es/im/IMIntegrationIcon/index.js +1 -2
- package/es/im/IMIntegrationIcon/props/defaultProps.js +6 -4
- package/es/im/IMIntegrationIcon/props/propTypes.js +6 -17
- package/es/im/IMMessage/IMMessage.js +76 -91
- package/es/im/IMMessage/props/defaultProps.js +1 -10
- package/es/im/IMMessage/props/propTypes.js +49 -96
- package/es/im/IMMessageContent/IMMessageContent.js +74 -65
- package/es/im/IMMessageContent/css/IMMessageContent.module.css +1 -1
- package/es/im/IMMessageContent/props/defaultProps.js +2 -3
- package/es/im/IMMessageContent/props/propTypes.js +28 -23
- package/es/im/IMMessageMeta/IMMessageMeta.js +26 -21
- package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +15 -4
- package/es/im/IMMessageMeta/css/cssJSLogic.js +11 -3
- package/es/im/IMMessageMeta/props/defaultProps.js +1 -1
- package/es/im/IMMessageMeta/props/propTypes.js +17 -12
- package/es/im/IMReplyBubble/IMReplyBubble.js +20 -59
- package/es/im/IMReplyBubble/props/defaultProps.js +2 -4
- package/es/im/IMReplyBubble/props/propTypes.js +16 -14
- package/es/im/IMTextBubble/IMTextBubble.js +15 -31
- package/es/im/IMTextBubble/props/defaultProps.js +3 -9
- package/es/im/IMTextBubble/props/propTypes.js +22 -8
- package/es/im/IMTicketLink/IMTicketLink.js +13 -11
- package/es/im/IMTicketLink/css/IMTicketLink.module.css +3 -4
- package/es/im/IMTicketLink/props/defaultProps.js +1 -1
- package/es/im/IMTicketLink/props/propTypes.js +4 -3
- package/es/im/index.js +1 -9
- package/es/index.js +4 -6
- package/package.json +32 -14
- package/es/ActionIcon/css/cssJSLogic.js +0 -10
- package/es/ArticleBubble/ArticleBubble.js +0 -70
- package/es/ArticleBubble/css/cssJSLogic.js +0 -34
- package/es/ArticleBubble/props/propTypes.js +0 -10
- package/es/AttachmentBubble/css/cssJSLogic.js +0 -18
- package/es/AttachmentBubbleInfo/css/cssJSLogic.js +0 -18
- package/es/Audio/css/cssJSLogic.js +0 -14
- package/es/AudioBubble/css/AudioBubble.module.css +0 -3
- package/es/AudioBubble/css/cssJSLogic.js +0 -20
- package/es/ImageBubble/css/cssJSLogic.js +0 -22
- package/es/LazyLoadImage/css/cssJSLogic.js +0 -10
- package/es/LocationBubble/css/cssJSLogic.js +0 -30
- package/es/MediaControls/MediaControls.js +0 -59
- package/es/MediaControls/css/MediaControls.module.css +0 -1
- package/es/MediaControls/css/cssJSLogic.js +0 -22
- package/es/MediaControls/index.js +0 -1
- package/es/MediaControls/props/propTypes.js +0 -11
- package/es/Message/css/Message.module.css +0 -0
- package/es/Message/css/cssJSLogic.js +0 -10
- package/es/MessageAction/css/MessageAction.module.css +0 -0
- package/es/MessageAction/css/cssJSLogic.js +0 -0
- package/es/MessageActions/css/cssJSLogic.js +0 -20
- package/es/MessageActionsMore/css/cssJSLogic.js +0 -28
- package/es/MessageActionsWrapper/css/cssJSLogic.js +0 -10
- package/es/MessageActionsWrapper/props/propConstants.js +0 -7
- package/es/MessageAvatar/css/cssJSLogic.js +0 -18
- package/es/MessageBubble/props/propConstants.js +0 -6
- package/es/MoreActionItem/css/cssJSLogic.js +0 -27
- package/es/ReplyBubble/css/cssJSLogic.js +0 -10
- package/es/ReplyBubbleContent/css/cssJSLogic.js +0 -22
- package/es/ReplyBubbleHeader/css/cssJSLogic.js +0 -18
- package/es/TextBubble/css/cssJSLogic.js +0 -18
- package/es/Theme/css/cssJSLogic.js +0 -14
- package/es/Video/css/cssJSLogic.js +0 -14
- package/es/VideoBubble/css/cssJSLogic.js +0 -10
- package/es/icons/factory/actions/convertTicket.svg +0 -21
- package/es/icons/factory/common/quote.svg +0 -1
- package/es/icons/iconSrc/actions/ConvertTicket.js +0 -25
- package/es/icons/iconSrc/actions/index.js +0 -1
- package/es/icons/iconSrc/common/Quote.js +0 -17
- package/es/im/IMArticleBubble/IMArticleBubble.js +0 -54
- package/es/im/IMArticleBubble/css/IMArticleBubble.module.css +0 -0
- package/es/im/IMArticleBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMArticleBubble/index.js +0 -1
- package/es/im/IMArticleBubble/props/defaultProps.js +0 -8
- package/es/im/IMArticleBubble/props/propTypes.js +0 -14
- package/es/im/IMAttachmentBubble/IMAttachmentBubble.js +0 -62
- package/es/im/IMAttachmentBubble/css/IMAttachmentBubble.module.css +0 -1
- package/es/im/IMAttachmentBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMAttachmentBubble/index.js +0 -1
- package/es/im/IMAttachmentBubble/props/defaultProps.js +0 -10
- package/es/im/IMAttachmentBubble/props/propTypes.js +0 -16
- package/es/im/IMAttachmentIcon/css/IMAttachmentIcon.module.css +0 -4
- package/es/im/IMAttachmentIcon/css/cssJSLogic.js +0 -16
- package/es/im/IMAttachmentIcon/index.js +0 -1
- package/es/im/IMAttachmentIcon/props/propTypes.js +0 -26
- package/es/im/IMAudioBubble/IMAudioBubble.js +0 -62
- package/es/im/IMAudioBubble/css/IMAudioBubble.module.css +0 -8
- package/es/im/IMAudioBubble/css/cssJSLogic.js +0 -20
- package/es/im/IMAudioBubble/index.js +0 -1
- package/es/im/IMAudioBubble/props/defaultProps.js +0 -11
- package/es/im/IMAudioBubble/props/propTypes.js +0 -17
- package/es/im/IMAutoMessageInfo/css/cssJSLogic.js +0 -10
- package/es/im/IMDateTime/IMDateTime.js +0 -40
- package/es/im/IMDateTime/css/IMDateTime.module.css +0 -10
- package/es/im/IMDateTime/css/cssJSLogic.js +0 -10
- package/es/im/IMDateTime/index.js +0 -1
- package/es/im/IMDateTime/props/defaultProps.js +0 -6
- package/es/im/IMDateTime/props/propTypes.js +0 -6
- package/es/im/IMImageBubble/IMImageBubble.js +0 -50
- package/es/im/IMImageBubble/css/IMImageBubble.module.css +0 -0
- package/es/im/IMImageBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMImageBubble/index.js +0 -1
- package/es/im/IMImageBubble/props/defaultProps.js +0 -7
- package/es/im/IMImageBubble/props/propTypes.js +0 -13
- package/es/im/IMIntegrationIcon/props/propConstants.js +0 -8
- package/es/im/IMLocationBubble/IMLocationBubble.js +0 -50
- package/es/im/IMLocationBubble/css/IMLocationBubble.module.css +0 -0
- package/es/im/IMLocationBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMLocationBubble/index.js +0 -1
- package/es/im/IMLocationBubble/props/defaultProps.js +0 -8
- package/es/im/IMLocationBubble/props/propTypes.js +0 -11
- package/es/im/IMMessage/css/IMMessage.module.css +0 -0
- package/es/im/IMMessage/css/cssJSLogic.js +0 -10
- package/es/im/IMMessageAvatar/IMMessageAvatar.js +0 -45
- package/es/im/IMMessageAvatar/css/IMMessageAvatar.module.css +0 -0
- package/es/im/IMMessageAvatar/css/cssJSLogic.js +0 -0
- package/es/im/IMMessageAvatar/index.js +0 -1
- package/es/im/IMMessageAvatar/props/defaultProps.js +0 -12
- package/es/im/IMMessageAvatar/props/propTypes.js +0 -53
- package/es/im/IMMessageContent/css/cssJSLogic.js +0 -10
- package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +0 -18
- package/es/im/IMReplyBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMTextBubble/css/IMTextBubble.module.css +0 -1
- package/es/im/IMTextBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMVideoBubble/IMVideoBubble.js +0 -61
- package/es/im/IMVideoBubble/css/IMVideoBubble.module.css +0 -1
- package/es/im/IMVideoBubble/css/cssJSLogic.js +0 -10
- package/es/im/IMVideoBubble/index.js +0 -1
- package/es/im/IMVideoBubble/props/defaultProps.js +0 -11
- package/es/im/IMVideoBubble/props/propTypes.js +0 -17
- package/es/unused/AvatarSpace/AvatarSpace.js +0 -40
- package/es/unused/AvatarSpace/css/AvatarSpace.module.css +0 -1
- package/es/unused/AvatarSpace/css/cssJSLogic.js +0 -15
- package/es/unused/AvatarSpace/index.js +0 -1
- package/es/unused/AvatarSpace/props/defaultProps.js +0 -10
- package/es/unused/AvatarSpace/props/propConstants.js +0 -7
- package/es/unused/AvatarSpace/props/propTypes.js +0 -8
- package/es/unused/MessageBoxFooter/MessageBoxFooter.js +0 -39
- package/es/unused/MessageBoxFooter/css/MessageBoxFooter.module.css +0 -3
- package/es/unused/MessageBoxFooter/css/cssJSLogic.js +0 -10
- package/es/unused/MessageBoxFooter/index.js +0 -1
- package/es/unused/MessageBoxFooter/props/defaultProps.js +0 -5
- package/es/unused/MessageBoxFooter/props/propTypes.js +0 -6
- package/es/unused/MessageBoxHeader/MessageBoxHeader.js +0 -7
- package/es/unused/MessageBoxHeader/css/MessageBoxHeader.module.css +0 -0
- package/es/unused/MessageBoxHeader/css/cssJsLogic.js +0 -0
- package/es/unused/MessageBoxHeader/index.js +0 -2
- package/es/unused/MessageBoxHeader/props/defaultProps.js +0 -0
- package/es/unused/MessageBoxHeader/props/propTypes.js +0 -0
- package/es/unused/MessageWrapper/MessageWrapper.js +0 -36
- package/es/unused/MessageWrapper/css/MessageWrapper.module.css +0 -0
- package/es/unused/MessageWrapper/css/cssJSLogic.js +0 -10
- package/es/unused/MessageWrapper/index.js +0 -1
- package/es/unused/MessageWrapper/props/defaultProps.js +0 -6
- package/es/unused/MessageWrapper/props/propTypes.js +0 -6
- package/es/unused/TextMessage/DefaultActions.js +0 -60
- package/es/unused/TextMessage/TextMessage.js +0 -67
- package/es/unused/TextMessage/TextMessage1.js +0 -66
- package/es/unused/TextMessage/css/TextMessage.module.css +0 -5
- package/es/unused/TextMessage/css/cssJSLogic.js +0 -0
- package/es/unused/TextMessage/index.js +0 -1
- package/es/unused/TextMessage/props/defaultProps.js +0 -4
- package/es/unused/TextMessage/props/propConstants.js +0 -3
- package/es/unused/TextMessage/props/propTypes.js +0 -17
- package/es/unused/darkTheme.js +0 -9
- package/es/unused/defaultTheme.js +0 -33
- /package/es/{ArticleBubble → im/ArticleBubble}/index.js +0 -0
|
@@ -1,40 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable max-len */
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
3
|
+
/* eslint-disable react/jsx-indent */
|
|
6
4
|
|
|
5
|
+
/** ** Libraries *** */
|
|
6
|
+
import React, { useMemo } from 'react';
|
|
7
7
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
8
|
|
|
9
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
10
|
/** ** Constants *** */
|
|
11
|
+
|
|
11
12
|
import imMessageContentDefaultProps from './props/defaultProps';
|
|
12
13
|
import imMessageContentPropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
14
15
|
/** ** Methods *** */
|
|
15
|
-
import getIsShowBubble from '@zohoim/chat-components-utils/es/imUtils/getIsShowBubble';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
16
|
|
|
17
|
+
import getIsShowBubble from '@zohoim/chat-components-utils/es/imUtils/getIsShowBubble';
|
|
18
|
+
import getMessageBubbleDetails from '@zohoim/chat-components-utils/es/imUtils/getMessageBubbleDetails';
|
|
18
19
|
/** ** Styles *** */
|
|
19
|
-
import style from './css/IMMessageContent.module.css';
|
|
20
20
|
|
|
21
|
+
import style from './css/IMMessageContent.module.css';
|
|
21
22
|
/** ** Components *** */
|
|
23
|
+
|
|
22
24
|
import IMReplyBubble from '../IMReplyBubble/IMReplyBubble';
|
|
23
|
-
import IMLocationBubble from '../IMLocationBubble/IMLocationBubble';
|
|
24
25
|
import IMTextBubble from '../IMTextBubble/IMTextBubble';
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
26
|
+
import LocationBubble from '../../LocationBubble/LocationBubble';
|
|
27
|
+
import ImageBubble from '../../ImageBubble/ImageBubble';
|
|
28
|
+
import VideoBubble from '../../VideoBubble/VideoBubble';
|
|
29
|
+
import AudioBubble from '../../AudioBubble/AudioBubble';
|
|
30
|
+
import AttachmentBubble from '../../AttachmentBubble/AttachmentBubble';
|
|
30
31
|
export default function IMMessageContent(props) {
|
|
31
32
|
const {
|
|
32
|
-
customStyle,
|
|
33
33
|
messageDetails,
|
|
34
|
+
sessionDetails,
|
|
35
|
+
onLoadFullMessage,
|
|
36
|
+
onClickReply,
|
|
34
37
|
seeMoreText,
|
|
35
38
|
replyText,
|
|
36
|
-
|
|
39
|
+
customStyle,
|
|
40
|
+
customProps,
|
|
41
|
+
renderCustomMessage
|
|
37
42
|
} = props;
|
|
43
|
+
const {
|
|
44
|
+
imReplyBubbleProps = dummyObject,
|
|
45
|
+
imTextBubbleProps = dummyObject,
|
|
46
|
+
locationBubbleProps = dummyObject,
|
|
47
|
+
imageBubbleProps = dummyObject,
|
|
48
|
+
videoBubbleProps = dummyObject,
|
|
49
|
+
audioBubbleProps = dummyObject,
|
|
50
|
+
attachmentBubbleProps = dummyObject
|
|
51
|
+
} = customProps;
|
|
38
52
|
const {
|
|
39
53
|
isShowLayoutBubble,
|
|
40
54
|
isShowReplyBubble,
|
|
@@ -43,62 +57,57 @@ export default function IMMessageContent(props) {
|
|
|
43
57
|
isShowAudioBubble,
|
|
44
58
|
isShowAttachmentBubble,
|
|
45
59
|
isShowLocationBubble,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = getIsShowBubble({
|
|
60
|
+
isShowTextBubble,
|
|
61
|
+
isShowCustomBubble
|
|
62
|
+
} = useMemo(() => getIsShowBubble({
|
|
49
63
|
messageDetails
|
|
50
|
-
});
|
|
64
|
+
}), [messageDetails]);
|
|
65
|
+
/* External CSS Customization */
|
|
51
66
|
|
|
52
|
-
/* External customization */
|
|
53
67
|
const newStyle = useMergeStyle(style, customStyle);
|
|
54
|
-
/* CSS classnames added based on logic */
|
|
55
|
-
const {
|
|
56
|
-
imMessageContentClass
|
|
57
|
-
} = cssJSLogic(props, newStyle);
|
|
58
68
|
const {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, /*#__PURE__*/React.createElement(IMReplyBubble, {
|
|
69
|
+
replyToMessageDetails: replyToMessage,
|
|
70
|
+
attachmentDetails,
|
|
71
|
+
locationUrl
|
|
72
|
+
} = useMemo(() => getMessageBubbleDetails({
|
|
73
|
+
messageDetails
|
|
74
|
+
}), [messageDetails]);
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", null, isShowLayoutBubble ? null : null, isShowReplyBubble ? /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: newStyle.messageContentRow
|
|
77
|
+
}, /*#__PURE__*/React.createElement(IMReplyBubble, _extends({
|
|
69
78
|
messageDetails: replyToMessage,
|
|
79
|
+
onClick: onClickReply,
|
|
70
80
|
replyText: replyText
|
|
71
|
-
})) : null,
|
|
72
|
-
|
|
73
|
-
}, /*#__PURE__*/React.createElement(
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
}, /*#__PURE__*/React.createElement(
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}, /*#__PURE__*/React.createElement(
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
}, /*#__PURE__*/React.createElement(
|
|
81
|
+
}, imReplyBubbleProps))) : null, isShowCustomBubble ? renderCustomMessage({
|
|
82
|
+
messageDetails
|
|
83
|
+
}) : null, isShowImageBubble ? /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: newStyle.messageContentRow
|
|
85
|
+
}, /*#__PURE__*/React.createElement(ImageBubble, _extends({
|
|
86
|
+
imageDetails: attachmentDetails
|
|
87
|
+
}, imageBubbleProps))) : null, isShowVideoBubble ? /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: newStyle.messageContentRow
|
|
89
|
+
}, /*#__PURE__*/React.createElement(VideoBubble, _extends({
|
|
90
|
+
videoDetails: attachmentDetails
|
|
91
|
+
}, videoBubbleProps))) : null, isShowAudioBubble ? /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: newStyle.messageContentRow
|
|
93
|
+
}, /*#__PURE__*/React.createElement(AudioBubble, _extends({
|
|
94
|
+
audioDetails: attachmentDetails
|
|
95
|
+
}, audioBubbleProps))) : null, isShowAttachmentBubble ? /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: newStyle.messageContentRow
|
|
97
|
+
}, /*#__PURE__*/React.createElement(AttachmentBubble, _extends({
|
|
86
98
|
attachmentDetails: attachmentDetails
|
|
87
|
-
})) : null, isShowLocationBubble ? /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className:
|
|
89
|
-
}, /*#__PURE__*/React.createElement(
|
|
90
|
-
|
|
91
|
-
})) : null,
|
|
92
|
-
className:
|
|
93
|
-
}, /*#__PURE__*/React.createElement(
|
|
94
|
-
articleDetails: articleDetails,
|
|
95
|
-
articleShareI18N: articleShareText
|
|
96
|
-
})) : null, isShowTextBubble ? /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
className: style.messageContentRow
|
|
98
|
-
}, /*#__PURE__*/React.createElement(IMTextBubble, {
|
|
99
|
+
}, attachmentBubbleProps))) : null, isShowLocationBubble ? /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: newStyle.messageContentRow
|
|
101
|
+
}, /*#__PURE__*/React.createElement(LocationBubble, _extends({
|
|
102
|
+
locationUrl: locationUrl
|
|
103
|
+
}, locationBubbleProps))) : null, isShowTextBubble ? /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: newStyle.messageContentRow
|
|
105
|
+
}, /*#__PURE__*/React.createElement(IMTextBubble, _extends({
|
|
99
106
|
messageDetails: messageDetails,
|
|
100
|
-
moreText: seeMoreText
|
|
101
|
-
|
|
107
|
+
moreText: seeMoreText,
|
|
108
|
+
onLoadFullMessage: onLoadFullMessage,
|
|
109
|
+
sessionDetails: sessionDetails
|
|
110
|
+
}, imTextBubbleProps))) : null);
|
|
102
111
|
}
|
|
103
112
|
IMMessageContent.propTypes = imMessageContentPropTypes;
|
|
104
113
|
IMMessageContent.defaultProps = imMessageContentDefaultProps;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
const imMessageContentDefaultProps = {
|
|
4
4
|
customStyle: dummyObject,
|
|
5
|
-
|
|
6
|
-
messageDetails: dummyObject
|
|
5
|
+
customProps: dummyObject
|
|
7
6
|
};
|
|
8
7
|
export default imMessageContentDefaultProps;
|
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const imMessageContentPropTypes = {
|
|
4
|
-
customStyle: PropTypes.object,
|
|
5
4
|
messageDetails: PropTypes.shape({
|
|
5
|
+
displayMessage: PropTypes.string.isRequired,
|
|
6
|
+
attachment: PropTypes.string,
|
|
7
|
+
contentType: PropTypes.string,
|
|
8
|
+
createdTime: PropTypes.string,
|
|
6
9
|
direction: PropTypes.string,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
contactName: PropTypes.string,
|
|
12
|
-
externalId: PropTypes.string
|
|
13
|
-
}),
|
|
14
|
-
status: PropTypes.string,
|
|
10
|
+
fullMessage: PropTypes.string,
|
|
11
|
+
id: PropTypes.string,
|
|
12
|
+
layout: PropTypes.string,
|
|
13
|
+
location: PropTypes.string,
|
|
15
14
|
meta: PropTypes.shape({
|
|
16
|
-
|
|
17
|
-
DESK_KB_ARTICLE_TRANSLATION_ID: PropTypes.string,
|
|
15
|
+
DESK_TICKET_ID: PropTypes.string,
|
|
18
16
|
DESK_TICKET_NUMBER: PropTypes.string,
|
|
19
|
-
|
|
17
|
+
SYSTEM_MESSAGE_TYPE: PropTypes.string
|
|
20
18
|
}),
|
|
21
|
-
attachment: PropTypes.string,
|
|
22
|
-
location: PropTypes.string,
|
|
23
|
-
layout: PropTypes.string,
|
|
24
|
-
contentType: PropTypes.string,
|
|
25
19
|
replyToMessage: PropTypes.object,
|
|
26
|
-
|
|
27
|
-
type: PropTypes.string
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
createdTime: PropTypes.string,
|
|
20
|
+
status: PropTypes.string,
|
|
21
|
+
type: PropTypes.string
|
|
22
|
+
}).isRequired,
|
|
23
|
+
sessionDetails: PropTypes.shape({
|
|
31
24
|
id: PropTypes.string
|
|
32
25
|
}),
|
|
33
|
-
|
|
26
|
+
onLoadFullMessage: PropTypes.func,
|
|
27
|
+
onClickReply: PropTypes.func,
|
|
28
|
+
seeMoreText: PropTypes.string,
|
|
34
29
|
replyText: PropTypes.string,
|
|
35
|
-
|
|
30
|
+
renderCustomMessage: PropTypes.func,
|
|
31
|
+
customStyle: PropTypes.object,
|
|
32
|
+
customProps: PropTypes.shape({
|
|
33
|
+
attachmentBubbleProps: PropTypes.object,
|
|
34
|
+
audioBubbleProps: PropTypes.object,
|
|
35
|
+
imReplyBubbleProps: PropTypes.object,
|
|
36
|
+
imTextBubbleProps: PropTypes.object,
|
|
37
|
+
imageBubbleProps: PropTypes.object,
|
|
38
|
+
locationBubbleProps: PropTypes.object,
|
|
39
|
+
videoBubbleProps: PropTypes.object
|
|
40
|
+
})
|
|
36
41
|
};
|
|
37
42
|
export default imMessageContentPropTypes;
|
|
@@ -1,58 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable max-len */
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
|
|
4
3
|
/** ** Libraries *** */
|
|
5
4
|
import React from 'react';
|
|
6
|
-
|
|
7
5
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
6
|
|
|
7
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
8
|
/** ** Constants *** */
|
|
9
|
+
|
|
11
10
|
import imMessageMetaDefaultProps from './props/defaultProps';
|
|
12
11
|
import imMessageMetaPropTypes from './props/propTypes';
|
|
13
|
-
|
|
12
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
14
13
|
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
14
|
|
|
15
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
17
16
|
/** ** Styles *** */
|
|
18
|
-
import style from './css/IMMessageMeta.module.css';
|
|
19
17
|
|
|
18
|
+
import style from './css/IMMessageMeta.module.css';
|
|
20
19
|
/** ** Components *** */
|
|
20
|
+
|
|
21
21
|
import { Container } from '@zohodesk/components/es/Layout';
|
|
22
|
-
import IMDateTime from '../IMDateTime/IMDateTime';
|
|
23
22
|
import IMAutoMessageInfo from '../IMAutoMessageInfo/IMAutoMessageInfo';
|
|
24
23
|
export default function IMMessageMeta(props) {
|
|
25
24
|
const {
|
|
25
|
+
direction,
|
|
26
26
|
customStyle,
|
|
27
|
-
autoMessageCustomStyle,
|
|
28
|
-
timeCustomStyle,
|
|
29
27
|
time,
|
|
28
|
+
timeTooltip,
|
|
30
29
|
autoMessageType,
|
|
31
30
|
autoMessagesI18N,
|
|
32
|
-
autoMessagesTitleI18N
|
|
31
|
+
autoMessagesTitleI18N,
|
|
32
|
+
customProps
|
|
33
33
|
} = props;
|
|
34
|
+
const {
|
|
35
|
+
imAutoMessageInfoProps = dummyObject
|
|
36
|
+
} = customProps;
|
|
37
|
+
/* External CSS Customization */
|
|
34
38
|
|
|
35
|
-
/* External customization */
|
|
36
39
|
const newStyle = useMergeStyle(style, customStyle);
|
|
37
40
|
/* CSS classnames added based on logic */
|
|
41
|
+
|
|
38
42
|
const {
|
|
39
43
|
imMessageMetaClass,
|
|
40
44
|
dotClass
|
|
41
|
-
} = cssJSLogic(
|
|
45
|
+
} = cssJSLogic({
|
|
46
|
+
direction
|
|
47
|
+
}, newStyle);
|
|
42
48
|
return /*#__PURE__*/React.createElement(Container, {
|
|
43
49
|
alignBox: "row",
|
|
44
50
|
className: imMessageMetaClass
|
|
45
|
-
}, /*#__PURE__*/React.createElement(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: newStyle.dateTime,
|
|
53
|
+
"data-title": timeTooltip
|
|
54
|
+
}, time), autoMessageType ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
49
55
|
className: dotClass
|
|
50
|
-
}, "\u22C5"), /*#__PURE__*/React.createElement(IMAutoMessageInfo, {
|
|
51
|
-
autoMessageType: autoMessageType,
|
|
56
|
+
}, "\u22C5"), /*#__PURE__*/React.createElement(IMAutoMessageInfo, _extends({
|
|
52
57
|
autoMessagesI18N: autoMessagesI18N,
|
|
53
58
|
autoMessagesTitleI18N: autoMessagesTitleI18N,
|
|
54
|
-
|
|
55
|
-
}));
|
|
59
|
+
autoMessageType: autoMessageType
|
|
60
|
+
}, imAutoMessageInfoProps))) : null);
|
|
56
61
|
}
|
|
57
62
|
IMMessageMeta.propTypes = imMessageMetaPropTypes;
|
|
58
63
|
IMMessageMeta.defaultProps = imMessageMetaDefaultProps;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
.varClass {
|
|
2
|
-
--imMessageMeta-gap: var(--
|
|
3
|
-
--imMessageMeta-separator_gap: var(--
|
|
4
|
-
--imMessageMeta-time_padding: var(--
|
|
2
|
+
--imMessageMeta-gap: var(--zd_size5);
|
|
3
|
+
--imMessageMeta-separator_gap: var(--zd_size5);
|
|
4
|
+
--imMessageMeta-time_padding: var(--zd_size45);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.imMessageMeta {
|
|
8
|
-
max-width: 100
|
|
8
|
+
max-width: 100% ;
|
|
9
9
|
align-items: center;
|
|
10
10
|
margin-top: var(--imMessageMeta-gap);
|
|
11
11
|
}
|
|
@@ -30,3 +30,14 @@
|
|
|
30
30
|
[dir=rtl] .rightTime {
|
|
31
31
|
padding-left: var(--imMessageMeta-time_padding);
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
.dateTime {
|
|
35
|
+
font-size: var(--zd_font_size11) ;
|
|
36
|
+
/* max-width: 100px; */
|
|
37
|
+
/* display: flex; */
|
|
38
|
+
max-width: var(--zd_size100) ;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
color: var(--imlib_chat_components_imMessageMeta_timeColor);
|
|
43
|
+
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
/** ** Methods *** */
|
|
2
2
|
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
import
|
|
3
|
+
import getMessageDirectionType from '@zohoim/chat-components-utils/es/getMessageDirectionType';
|
|
4
4
|
export default function cssJSLogic(props, style) {
|
|
5
5
|
const {
|
|
6
6
|
direction
|
|
7
7
|
} = props;
|
|
8
|
+
const {
|
|
9
|
+
isIncoming,
|
|
10
|
+
isOutgoing
|
|
11
|
+
} = getMessageDirectionType({
|
|
12
|
+
messageDetails: {
|
|
13
|
+
direction
|
|
14
|
+
}
|
|
15
|
+
});
|
|
8
16
|
const imMessageMetaClass = compileClassNames({
|
|
9
17
|
[style.imMessageMeta]: true,
|
|
10
|
-
[style.leftTime]:
|
|
11
|
-
[style.rightTime]:
|
|
18
|
+
[style.leftTime]: isIncoming,
|
|
19
|
+
[style.rightTime]: isOutgoing
|
|
12
20
|
});
|
|
13
21
|
const dotClass = compileClassNames({
|
|
14
22
|
[style.dot]: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
import { direction as directionConstants } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
4
4
|
const imMessageMetaDefaultProps = {
|
|
5
5
|
customStyle: dummyObject,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
3
|
+
/** ** Constants *** */
|
|
4
|
+
|
|
5
|
+
import { direction } from '@zohoim/chat-components-utils/es/constants/messageConstants';
|
|
6
|
+
import autoMessageTypes from '@zohoim/chat-components-utils/es/imUtils/constants/autoMessageTypes';
|
|
4
7
|
const {
|
|
5
8
|
WELCOMEMSG,
|
|
6
9
|
WORKFLOW_MESSAGE,
|
|
@@ -8,23 +11,25 @@ const {
|
|
|
8
11
|
UN_SUPPORTED_FILE
|
|
9
12
|
} = autoMessageTypes;
|
|
10
13
|
const imMessageMetaPropTypes = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
direction: PropTypes.oneOf([direction.IN, direction.OUT]),
|
|
15
|
-
time: PropTypes.string,
|
|
16
|
-
autoMessageType: PropTypes.oneOf([WELCOMEMSG, WORKFLOW_MESSAGE, WORKFLOW_NOTIFICATION, UN_SUPPORTED_FILE]),
|
|
14
|
+
direction: PropTypes.oneOf(Object.values(direction)).isRequired,
|
|
15
|
+
time: PropTypes.string.isRequired,
|
|
16
|
+
autoMessageType: PropTypes.oneOf(Object.values(autoMessageTypes)),
|
|
17
17
|
autoMessagesI18N: PropTypes.shape({
|
|
18
|
+
[UN_SUPPORTED_FILE]: PropTypes.string,
|
|
18
19
|
[WELCOMEMSG]: PropTypes.string,
|
|
19
20
|
[WORKFLOW_MESSAGE]: PropTypes.string,
|
|
20
|
-
[WORKFLOW_NOTIFICATION]: PropTypes.string
|
|
21
|
-
[UN_SUPPORTED_FILE]: PropTypes.string
|
|
21
|
+
[WORKFLOW_NOTIFICATION]: PropTypes.string
|
|
22
22
|
}),
|
|
23
23
|
autoMessagesTitleI18N: PropTypes.shape({
|
|
24
|
+
[UN_SUPPORTED_FILE]: PropTypes.string,
|
|
24
25
|
[WELCOMEMSG]: PropTypes.string,
|
|
25
26
|
[WORKFLOW_MESSAGE]: PropTypes.string,
|
|
26
|
-
[WORKFLOW_NOTIFICATION]: PropTypes.string
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
[WORKFLOW_NOTIFICATION]: PropTypes.string
|
|
28
|
+
}),
|
|
29
|
+
customProps: PropTypes.shape({
|
|
30
|
+
imAutoMessageInfoProps: PropTypes.object
|
|
31
|
+
}),
|
|
32
|
+
customStyle: PropTypes.object,
|
|
33
|
+
timeTooltip: PropTypes.string
|
|
29
34
|
};
|
|
30
35
|
export default imMessageMetaPropTypes;
|
|
@@ -1,85 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable max-len */
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
2
|
|
|
4
3
|
/** ** Libraries *** */
|
|
5
4
|
import React from 'react';
|
|
6
|
-
|
|
7
5
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
6
|
|
|
7
|
+
import useIMReplyBubble from '@zohoim/chat-components-hooks/es/im/IMReplyBubble/useIMReplyBubble';
|
|
10
8
|
/** ** Constants *** */
|
|
9
|
+
|
|
11
10
|
import imReplyBubbleDefaultProps from './props/defaultProps';
|
|
12
11
|
import imReplyBubblePropTypes from './props/propTypes';
|
|
12
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
13
|
+
/** ** Components *** */
|
|
13
14
|
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
|
-
|
|
17
|
-
/** ** Styles *** */
|
|
18
|
-
import style from './css/IMReplyBubble.module.css';
|
|
19
15
|
import ReplyBubble from '../../ReplyBubble/ReplyBubble';
|
|
20
|
-
import useIMReplyBubble from '@zohoim/chat-components-hooks/es/im/IMReplyBubble/useIMReplyBubble';
|
|
21
|
-
import IMAttachmentIcon from '../IMAttachmentIcon/IMAttachmentIcon';
|
|
22
16
|
export default function IMReplyBubble(props) {
|
|
23
17
|
const {
|
|
24
|
-
customStyle,
|
|
25
|
-
headerCustomStyle,
|
|
26
|
-
timeCustomStyle,
|
|
27
|
-
contentCustomStyle,
|
|
28
18
|
replyText,
|
|
29
|
-
messageDetails
|
|
19
|
+
messageDetails,
|
|
20
|
+
customProps,
|
|
21
|
+
onClick: propOnClick
|
|
30
22
|
} = props;
|
|
31
|
-
|
|
32
|
-
/* External customization */
|
|
33
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
34
|
-
/* CSS classnames added based on logic */
|
|
35
23
|
const {
|
|
36
|
-
|
|
37
|
-
} =
|
|
24
|
+
replyBubbleProps = dummyObject
|
|
25
|
+
} = customProps;
|
|
38
26
|
const {
|
|
39
|
-
fileFormat,
|
|
40
27
|
message,
|
|
41
28
|
senderName,
|
|
42
29
|
time,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
attachmentURL
|
|
30
|
+
attachmentDetails,
|
|
31
|
+
onClick
|
|
46
32
|
} = useIMReplyBubble({
|
|
47
|
-
messageDetails
|
|
33
|
+
messageDetails,
|
|
34
|
+
onClick: propOnClick
|
|
48
35
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function renderIcon() {
|
|
57
|
-
// eslint-disable-next-line no-nested-ternary
|
|
58
|
-
return isShowImage ? /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: newStyle.imageWrapper
|
|
60
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
61
|
-
alt: fileName,
|
|
62
|
-
className: newStyle.image,
|
|
63
|
-
src: attachmentURL
|
|
64
|
-
})) : fileFormat ? /*#__PURE__*/React.createElement(IMAttachmentIcon, {
|
|
65
|
-
customStyle: {
|
|
66
|
-
$icon: newStyle.attachmentIcon
|
|
67
|
-
},
|
|
68
|
-
fileFormat: fileFormat
|
|
69
|
-
}) : null;
|
|
70
|
-
}
|
|
71
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
-
className: imReplyBubbleClass
|
|
73
|
-
}, /*#__PURE__*/React.createElement(ReplyBubble, {
|
|
74
|
-
contentCustomStyle: contentCustomStyle,
|
|
75
|
-
headerCustomStyle: headerCustomStyle,
|
|
76
|
-
renderIcon: renderIcon,
|
|
77
|
-
renderMessage: renderMessage,
|
|
36
|
+
return /*#__PURE__*/React.createElement(ReplyBubble, _extends({
|
|
37
|
+
attachmentDetails: attachmentDetails,
|
|
38
|
+
message: message,
|
|
39
|
+
onClick: onClick,
|
|
78
40
|
replyText: replyText,
|
|
79
41
|
senderName: senderName,
|
|
80
|
-
time: time
|
|
81
|
-
|
|
82
|
-
}));
|
|
42
|
+
time: time
|
|
43
|
+
}, replyBubbleProps));
|
|
83
44
|
}
|
|
84
45
|
IMReplyBubble.propTypes = imReplyBubblePropTypes;
|
|
85
46
|
IMReplyBubble.defaultProps = imReplyBubbleDefaultProps;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
3
|
const imReplyBubbleDefaultProps = {
|
|
4
4
|
customStyle: dummyObject,
|
|
5
|
-
|
|
6
|
-
timeCustomStyle: dummyObject,
|
|
7
|
-
contentCustomStyle: dummyObject
|
|
5
|
+
customProps: dummyObject
|
|
8
6
|
};
|
|
9
7
|
export default imReplyBubbleDefaultProps;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const imReplyBubblePropTypes = {
|
|
4
|
-
customStyle: PropTypes.object,
|
|
5
|
-
headerCustomStyle: PropTypes.object,
|
|
6
|
-
timeCustomStyle: PropTypes.object,
|
|
7
|
-
contentCustomStyle: PropTypes.object,
|
|
8
4
|
messageDetails: PropTypes.shape({
|
|
9
|
-
displayMessage: PropTypes.string,
|
|
10
|
-
attachment: PropTypes.shape({
|
|
11
|
-
type: PropTypes.string
|
|
12
|
-
}),
|
|
13
|
-
createdTime: PropTypes.string,
|
|
14
5
|
actor: PropTypes.shape({
|
|
15
|
-
name: PropTypes.string,
|
|
16
6
|
contactName: PropTypes.string,
|
|
17
|
-
externalId: PropTypes.string
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
externalId: PropTypes.string,
|
|
8
|
+
name: PropTypes.string
|
|
9
|
+
}).isRequired,
|
|
10
|
+
displayMessage: PropTypes.string.isRequired,
|
|
11
|
+
attachment: PropTypes.shape({
|
|
12
|
+
name: PropTypes.string,
|
|
13
|
+
type: PropTypes.string,
|
|
14
|
+
url: PropTypes.string
|
|
15
|
+
}),
|
|
16
|
+
createdTime: PropTypes.string
|
|
17
|
+
}).isRequired,
|
|
18
|
+
onClick: PropTypes.func.isRequired,
|
|
19
|
+
replyText: PropTypes.string.isRequired,
|
|
20
|
+
customProps: PropTypes.shape({
|
|
21
|
+
replyBubbleProps: PropTypes.object
|
|
22
|
+
})
|
|
21
23
|
};
|
|
22
24
|
export default imReplyBubblePropTypes;
|