@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,56 +1,78 @@
|
|
|
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
|
-
import React from 'react';
|
|
4
|
+
import React, { useCallback, useMemo } from 'react';
|
|
5
|
+
/** ** Components *** */
|
|
6
6
|
|
|
7
|
+
import ActionIconWrapper from '../ActionIconWrapper/ActionIconWrapper';
|
|
8
|
+
/** ** Icons *** */
|
|
9
|
+
|
|
10
|
+
import ReplyIcon from '@zohodesk/icon/es/general/Reply';
|
|
11
|
+
import ReloadIcon from '@zohodesk/icon/es/general/Reload';
|
|
12
|
+
import CopyIcon from '@zohodesk/icon/es/general/Copy';
|
|
13
|
+
import DownloadIcon from '@zohodesk/icon/es/general/Cloud';
|
|
14
|
+
import DeleteIcon from '@zohodesk/icon/es/general/Delete';
|
|
15
|
+
import ForwardIcon from '@zohodesk/icon/es/channels/EmailForward';
|
|
7
16
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
import useActionIcon from '@zohoim/chat-components-hooks/es/ActionIcon/useActionIcon';
|
|
10
17
|
|
|
18
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
11
19
|
/** ** Constants *** */
|
|
20
|
+
|
|
12
21
|
import actionIconDefaultProps from './props/defaultProps';
|
|
13
22
|
import actionIconPropTypes from './props/propTypes';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
23
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
24
|
+
import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
|
|
18
25
|
/** ** Styles *** */
|
|
26
|
+
|
|
19
27
|
import style from './css/ActionIcon.module.css';
|
|
28
|
+
const {
|
|
29
|
+
REPLY,
|
|
30
|
+
COPY,
|
|
31
|
+
DOWNLOAD,
|
|
32
|
+
RESEND,
|
|
33
|
+
DELETE,
|
|
34
|
+
FORWARD
|
|
35
|
+
} = defaultMessageActions;
|
|
20
36
|
export default function ActionIcon(props) {
|
|
21
37
|
const {
|
|
22
|
-
renderIcon: propRenderIcon,
|
|
23
38
|
customStyle,
|
|
24
|
-
|
|
39
|
+
customProps,
|
|
40
|
+
onClick,
|
|
25
41
|
id,
|
|
26
|
-
title
|
|
42
|
+
title,
|
|
43
|
+
isDisabled,
|
|
44
|
+
needIconOnly
|
|
27
45
|
} = props;
|
|
28
46
|
const {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = useActionIcon({
|
|
32
|
-
renderIcon: propRenderIcon,
|
|
33
|
-
onClick: propOnClick,
|
|
34
|
-
id
|
|
35
|
-
});
|
|
36
|
-
|
|
47
|
+
actionIconWrapperProps = dummyObject
|
|
48
|
+
} = customProps;
|
|
37
49
|
/* External customization */
|
|
38
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
39
50
|
|
|
40
|
-
|
|
41
|
-
const {
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
52
|
+
const iconStyle = useMemo(() => ({
|
|
53
|
+
base: newStyle.icon
|
|
54
|
+
}), [newStyle.icon]);
|
|
55
|
+
const renderIcon = useCallback(() => {
|
|
56
|
+
const iconMapping = {
|
|
57
|
+
[REPLY]: ReplyIcon,
|
|
58
|
+
[COPY]: CopyIcon,
|
|
59
|
+
[DOWNLOAD]: DownloadIcon,
|
|
60
|
+
[RESEND]: ReloadIcon,
|
|
61
|
+
[DELETE]: DeleteIcon,
|
|
62
|
+
[FORWARD]: ForwardIcon
|
|
63
|
+
};
|
|
64
|
+
const IconComponent = iconMapping[id];
|
|
65
|
+
return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
|
|
66
|
+
customStyle: iconStyle
|
|
67
|
+
}) : null;
|
|
68
|
+
}, [iconStyle, id]);
|
|
69
|
+
return needIconOnly ? renderIcon() : /*#__PURE__*/React.createElement(ActionIconWrapper, _extends({
|
|
70
|
+
id: id,
|
|
71
|
+
isDisabled: isDisabled,
|
|
72
|
+
onClick: onClick,
|
|
73
|
+
renderIcon: renderIcon,
|
|
74
|
+
title: title
|
|
75
|
+
}, actionIconWrapperProps));
|
|
54
76
|
}
|
|
55
77
|
ActionIcon.propTypes = actionIconPropTypes;
|
|
56
78
|
ActionIcon.defaultProps = actionIconDefaultProps;
|
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
.varClass {
|
|
2
|
-
--
|
|
3
|
-
--actionIcon-width: var(--imlib_size_26);
|
|
4
|
-
--actionIcon-border: var(--imlib_size_1);
|
|
5
|
-
--actionIcon-border_radius: var(--imlib_size_4);
|
|
2
|
+
--actionIcon_icon_size: var(--zd_size15);
|
|
6
3
|
}
|
|
7
4
|
|
|
8
|
-
.
|
|
5
|
+
.icon {
|
|
9
6
|
composes: varClass;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
display: -webkit-inline-flex;
|
|
13
|
-
display: -ms-inline-flexbox;
|
|
14
|
-
color: var(--imlib_chat_components_actionIcon_color);
|
|
15
|
-
position: relative;
|
|
16
|
-
width: var(--actionIcon-width);
|
|
17
|
-
height: var(--actionIcon-height);
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: center;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
border: var(--actionIcon-border) solid transparent;
|
|
22
|
-
border-radius: var(--actionIcon-border_radius);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.actionIcon:hover {
|
|
26
|
-
background-color: var(--imlib_chat_components_actionIcon_bg_color);
|
|
27
|
-
border-color: var(--imlib_chat_components_actionIcon_border_color);
|
|
7
|
+
width: var(--actionIcon_icon_size);
|
|
8
|
+
height: var(--actionIcon_icon_size);
|
|
28
9
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
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 actionIconDefaultProps = {
|
|
4
|
-
customStyle: dummyObject
|
|
4
|
+
customStyle: dummyObject,
|
|
5
|
+
customProps: dummyObject,
|
|
6
|
+
needIconOnly: false
|
|
5
7
|
};
|
|
6
8
|
export default actionIconDefaultProps;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
/** ** Constants *** */
|
|
4
|
+
|
|
5
|
+
import { defaultMessageActions } from '@zohoim/chat-components-utils/es/constants/messageActionConstants';
|
|
3
6
|
const actionIconPropTypes = {
|
|
7
|
+
id: PropTypes.oneOf(Object.values(defaultMessageActions)).isRequired,
|
|
8
|
+
onClick: PropTypes.func.isRequired,
|
|
9
|
+
customProps: PropTypes.shape({
|
|
10
|
+
actionIconWrapperProps: PropTypes.object
|
|
11
|
+
}),
|
|
4
12
|
customStyle: PropTypes.object,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
id: PropTypes.string,
|
|
13
|
+
isDisabled: PropTypes.bool,
|
|
14
|
+
needIconOnly: PropTypes.bool,
|
|
8
15
|
title: PropTypes.string
|
|
9
16
|
};
|
|
10
17
|
export default actionIconPropTypes;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/** ** Hooks *** */
|
|
4
|
+
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
|
+
import useActionIconWrapper from '@zohoim/chat-components-hooks/es/ActionIconWrapper/useActionIconWrapper';
|
|
7
|
+
/** ** Constants *** */
|
|
8
|
+
|
|
9
|
+
import actionIconWrapperDefaultProps from './props/defaultProps';
|
|
10
|
+
import actionIconWrapperPropTypes from './props/propTypes';
|
|
11
|
+
/** ** Methods *** */
|
|
12
|
+
|
|
13
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
14
|
+
/** ** Styles *** */
|
|
15
|
+
|
|
16
|
+
import style from './css/ActionIconWrapper.module.css';
|
|
17
|
+
export default function ActionIconWrapper(props) {
|
|
18
|
+
const {
|
|
19
|
+
renderIcon,
|
|
20
|
+
customStyle,
|
|
21
|
+
onClick: propOnClick,
|
|
22
|
+
id,
|
|
23
|
+
title,
|
|
24
|
+
isDisabled
|
|
25
|
+
} = props;
|
|
26
|
+
const {
|
|
27
|
+
onClick
|
|
28
|
+
} = useActionIconWrapper({
|
|
29
|
+
onClick: propOnClick,
|
|
30
|
+
id,
|
|
31
|
+
isDisabled
|
|
32
|
+
});
|
|
33
|
+
/* External CSS Customization */
|
|
34
|
+
|
|
35
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
36
|
+
/* Render Icon */
|
|
37
|
+
|
|
38
|
+
const icon = renderHandler(renderIcon)({
|
|
39
|
+
id
|
|
40
|
+
});
|
|
41
|
+
return icon ? /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: newStyle.actionIconWrapper,
|
|
43
|
+
"data-title": title,
|
|
44
|
+
onClick: onClick
|
|
45
|
+
}, icon) : null;
|
|
46
|
+
}
|
|
47
|
+
ActionIconWrapper.propTypes = actionIconWrapperPropTypes;
|
|
48
|
+
ActionIconWrapper.defaultProps = actionIconWrapperDefaultProps;
|
|
49
|
+
ActionIconWrapper.displayName = 'ActionIconWrapper';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.varClass {
|
|
2
|
+
--actionIconWrapper-height: var(--zd_size26);
|
|
3
|
+
--actionIconWrapper-width: var(--zd_size26);
|
|
4
|
+
--actionIconWrapper-border: 1px;
|
|
5
|
+
--actionIconWrapper-border_radius: 4px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.actionIconWrapper {
|
|
9
|
+
composes: varClass;
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
display: -webkit-inline-flex;
|
|
12
|
+
display: -ms-inline-flexbox;
|
|
13
|
+
color: var(--imlib_chat_components_actionIconWrapper_color);
|
|
14
|
+
position: relative;
|
|
15
|
+
width: var(--actionIconWrapper-width);
|
|
16
|
+
height: var(--actionIconWrapper-height);
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border: var(--actionIconWrapper-border) solid transparent;
|
|
21
|
+
border-radius: var(--actionIconWrapper-border_radius);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.actionIconWrapper:hover {
|
|
25
|
+
background-color: var(--imlib_chat_components_actionIconWrapper_bg_color);
|
|
26
|
+
border-color: var(--imlib_chat_components_actionIconWrapper_border_color);
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ActionIconWrapper } from './ActionIconWrapper';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
-
const
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
|
+
const actionIconWrapperDefaultProps = {
|
|
4
4
|
customStyle: dummyObject
|
|
5
5
|
};
|
|
6
|
-
export default
|
|
6
|
+
export default actionIconWrapperDefaultProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
const actionIconWrapperPropTypes = {
|
|
4
|
+
id: PropTypes.string.isRequired,
|
|
5
|
+
onClick: PropTypes.func.isRequired,
|
|
6
|
+
renderIcon: PropTypes.func.isRequired,
|
|
7
|
+
customStyle: PropTypes.object,
|
|
8
|
+
isDisabled: PropTypes.bool,
|
|
9
|
+
title: PropTypes.string
|
|
10
|
+
};
|
|
11
|
+
export default actionIconWrapperPropTypes;
|
|
@@ -1,57 +1,57 @@
|
|
|
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';
|
|
8
|
+
import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
|
|
10
9
|
/** ** Constants *** */
|
|
10
|
+
|
|
11
11
|
import attachmentBubbleDefaultProps from './props/defaultProps';
|
|
12
12
|
import attachmentBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
13
|
/** ** Styles *** */
|
|
19
|
-
import style from './css/AttachmentBubble.module.css';
|
|
20
14
|
|
|
15
|
+
import style from './css/AttachmentBubble.module.css';
|
|
21
16
|
/** ** Components *** */
|
|
17
|
+
|
|
22
18
|
import AttachmentBubbleInfo from '../AttachmentBubbleInfo/AttachmentBubbleInfo';
|
|
19
|
+
import AttachmentIcon from '../AttachmentIcon/AttachmentIcon';
|
|
23
20
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
24
21
|
export default function AttachmentBubble(props) {
|
|
25
22
|
const {
|
|
26
23
|
customStyle,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fileSize,
|
|
30
|
-
bubbleInfoCustomStyle
|
|
24
|
+
customProps,
|
|
25
|
+
attachmentDetails
|
|
31
26
|
} = props;
|
|
27
|
+
const {
|
|
28
|
+
attachmentBubbleInfoProps,
|
|
29
|
+
attachmentIconProps
|
|
30
|
+
} = customProps;
|
|
31
|
+
/* External CSS Customization */
|
|
32
32
|
|
|
33
|
-
/* External customization */
|
|
34
33
|
const newStyle = useMergeStyle(style, customStyle);
|
|
35
|
-
/* CSS classnames added based on logic */
|
|
36
34
|
const {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} =
|
|
41
|
-
|
|
35
|
+
formattedFileSize: fileSize,
|
|
36
|
+
fileName,
|
|
37
|
+
fileFormat
|
|
38
|
+
} = useAttachmentBubble({
|
|
39
|
+
attachmentDetails
|
|
40
|
+
});
|
|
42
41
|
return /*#__PURE__*/React.createElement(Container, {
|
|
43
42
|
alignBox: "row",
|
|
44
|
-
className:
|
|
43
|
+
className: newStyle.attachmentBubble
|
|
45
44
|
}, /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className:
|
|
47
|
-
},
|
|
48
|
-
|
|
45
|
+
className: newStyle.attachmentBubbleIcon
|
|
46
|
+
}, /*#__PURE__*/React.createElement(AttachmentIcon, _extends({
|
|
47
|
+
fileFormat: fileFormat
|
|
48
|
+
}, attachmentIconProps))), /*#__PURE__*/React.createElement(Box, {
|
|
49
|
+
className: newStyle.attachmentBubbleContent,
|
|
49
50
|
flexible: true
|
|
50
|
-
}, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, {
|
|
51
|
-
customStyle: bubbleInfoCustomStyle,
|
|
51
|
+
}, /*#__PURE__*/React.createElement(AttachmentBubbleInfo, _extends({
|
|
52
52
|
fileName: fileName,
|
|
53
53
|
fileSize: fileSize
|
|
54
|
-
})));
|
|
54
|
+
}, attachmentBubbleInfoProps))));
|
|
55
55
|
}
|
|
56
56
|
AttachmentBubble.propTypes = attachmentBubblePropTypes;
|
|
57
57
|
AttachmentBubble.defaultProps = attachmentBubbleDefaultProps;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
.attachmentBubble {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
background-color: var(--imlib_chat_components_attachmentBubble_bg_color);
|
|
3
|
+
border-radius: 3px;
|
|
4
|
+
border: 1px solid var(--imlib_chat_components_attachmentBubble_border_color);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.attachmentBubbleIcon{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
.attachmentBubbleIcon {
|
|
8
|
+
width: var(--zd_size60) ;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
[dir=ltr] .attachmentBubbleIcon{
|
|
15
|
-
|
|
14
|
+
[dir=ltr] .attachmentBubbleIcon {
|
|
15
|
+
border-right: 1px solid
|
|
16
|
+
var(--imlib_chat_components_attachmentBubble_border_color);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
[dir=rtl] .attachmentBubbleIcon{
|
|
19
|
-
|
|
19
|
+
[dir=rtl] .attachmentBubbleIcon {
|
|
20
|
+
border-left: 1px solid var(--imlib_chat_components_attachmentBubble_border_color);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
.attachmentBubbleIcon, .attachmentBubbleContent{
|
|
23
|
-
|
|
24
|
-
}
|
|
23
|
+
.attachmentBubbleIcon, .attachmentBubbleContent {
|
|
24
|
+
padding: var(--zd_size10) ;
|
|
25
|
+
}
|
|
@@ -1,7 +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 attachmentBubbleDefaultProps = {
|
|
4
4
|
customStyle: dummyObject,
|
|
5
|
-
|
|
5
|
+
customProps: dummyObject
|
|
6
6
|
};
|
|
7
7
|
export default attachmentBubbleDefaultProps;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const attachmentBubblePropTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
attachmentDetails: PropTypes.shape({
|
|
5
|
+
name: PropTypes.string.isRequired,
|
|
6
|
+
size: PropTypes.string.isRequired,
|
|
7
|
+
type: PropTypes.string.isRequired
|
|
8
|
+
}).isRequired,
|
|
9
|
+
customProps: PropTypes.shape({
|
|
10
|
+
attachmentBubbleInfoProps: PropTypes.object,
|
|
11
|
+
attachmentIconProps: PropTypes.object
|
|
12
|
+
}),
|
|
13
|
+
customStyle: PropTypes.object
|
|
9
14
|
};
|
|
10
15
|
export default attachmentBubblePropTypes;
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
1
|
/** ** Libraries *** */
|
|
5
2
|
import React from 'react';
|
|
6
|
-
|
|
7
3
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
4
|
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
10
6
|
/** ** Constants *** */
|
|
7
|
+
|
|
11
8
|
import attachmentBubbleInfoDefaultProps from './props/defaultProps';
|
|
12
9
|
import attachmentBubbleInfoPropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
|
-
|
|
17
10
|
/** ** Styles *** */
|
|
11
|
+
|
|
18
12
|
import style from './css/AttachmentBubbleInfo.module.css';
|
|
19
13
|
export default function AttachmentBubbleInfo(props) {
|
|
20
14
|
const {
|
|
@@ -22,21 +16,15 @@ export default function AttachmentBubbleInfo(props) {
|
|
|
22
16
|
fileName,
|
|
23
17
|
fileSize
|
|
24
18
|
} = props;
|
|
19
|
+
/* External css customization */
|
|
25
20
|
|
|
26
|
-
/* External customization */
|
|
27
21
|
const newStyle = useMergeStyle(style, customStyle);
|
|
28
|
-
/* CSS classnames added based on logic */
|
|
29
|
-
const {
|
|
30
|
-
attachmentBubbleInfoClass,
|
|
31
|
-
fileNameClass,
|
|
32
|
-
fileSizeClass
|
|
33
|
-
} = cssJSLogic(props, newStyle);
|
|
34
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className:
|
|
23
|
+
className: newStyle.attachmentBubbleInfo
|
|
36
24
|
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
className:
|
|
25
|
+
className: newStyle.fileName
|
|
38
26
|
}, fileName), /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className:
|
|
27
|
+
className: newStyle.fileSize
|
|
40
28
|
}, fileSize));
|
|
41
29
|
}
|
|
42
30
|
AttachmentBubbleInfo.propTypes = attachmentBubbleInfoPropTypes;
|
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
.varClass{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
.varClass {
|
|
2
|
+
--attachmentBubbleInfo-fileName_font_size: var(--zd_font_size15);
|
|
3
|
+
--attachmentBubbleInfo-fileName_font_family: var(--zd_semibold);
|
|
4
|
+
--attachmentBubbleInfo-fileSize_font_size: var(--zd_font_size13);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.fileName {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
composes: varClass;
|
|
9
|
+
font-size: var(--attachmentBubbleInfo-fileName_font_size);
|
|
10
|
+
font-family: var(--attachmentBubbleInfo-fileName_font_family);
|
|
11
|
+
color: var(--imlib_chat_components_attachmentBubbleInfo_fileName_color);
|
|
12
|
+
margin-bottom: var(--zd_size5) ;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.fileSize {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
composes: varClass;
|
|
17
|
+
font-size: var(--attachmentBubbleInfo-fileSize_font_size);
|
|
18
|
+
color: var(--imlib_chat_components_attachmentBubbleInfo_fileSize_color);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.fileName,
|
|
22
|
-
.fileSize{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
.fileSize {
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
text-overflow: ellipsis;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.attachmentBubbleInfo {
|
|
29
|
+
/* Use this class name for css customization */
|
|
26
30
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const attachmentBubbleInfoPropTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
fileName: PropTypes.string.isRequired,
|
|
5
|
+
fileSize: PropTypes.string.isRequired,
|
|
6
|
+
customStyle: PropTypes.object
|
|
7
7
|
};
|
|
8
8
|
export default attachmentBubbleInfoPropTypes;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
/** ** Hooks *** */
|
|
4
|
+
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
|
+
/** ** Constants *** */
|
|
7
|
+
|
|
8
|
+
import attachmentIconDefaultProps from './props/defaultProps';
|
|
9
|
+
import attachmentIconPropTypes from './props/propTypes';
|
|
10
|
+
/** ** Methods *** */
|
|
11
|
+
|
|
12
|
+
import getAttachmentIconComponent from './utils/getAttachmentIconComponent';
|
|
13
|
+
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
14
|
+
/** ** Styles *** */
|
|
15
|
+
|
|
16
|
+
import style from './css/AttachmentIcon.module.css';
|
|
17
|
+
export default function AttachmentIcon(props) {
|
|
18
|
+
const {
|
|
19
|
+
customStyle,
|
|
20
|
+
fileFormat,
|
|
21
|
+
renderCustomIcon
|
|
22
|
+
} = props;
|
|
23
|
+
/* External CSS Customization */
|
|
24
|
+
|
|
25
|
+
const newStyle = useMergeStyle(style, customStyle);
|
|
26
|
+
const iconCustomStyle = useMemo(() => ({
|
|
27
|
+
base: newStyle.icon
|
|
28
|
+
}), [newStyle.icon]);
|
|
29
|
+
/* Custom Icon Renderer */
|
|
30
|
+
|
|
31
|
+
if (renderCustomIcon) {
|
|
32
|
+
const fileIcon = renderHandler(renderCustomIcon)();
|
|
33
|
+
return fileIcon;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const {
|
|
37
|
+
IconComponent
|
|
38
|
+
} = getAttachmentIconComponent({
|
|
39
|
+
fileFormat
|
|
40
|
+
});
|
|
41
|
+
return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
|
|
42
|
+
customStyle: iconCustomStyle
|
|
43
|
+
}) : null;
|
|
44
|
+
}
|
|
45
|
+
AttachmentIcon.propTypes = attachmentIconPropTypes;
|
|
46
|
+
AttachmentIcon.defaultProps = attachmentIconDefaultProps;
|
|
47
|
+
AttachmentIcon.displayName = 'AttachmentIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AttachmentIcon } from './AttachmentIcon';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
-
const
|
|
2
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
3
|
+
const attachmentIconDefaultProps = {
|
|
4
4
|
customStyle: dummyObject
|
|
5
5
|
};
|
|
6
|
-
export default
|
|
6
|
+
export default attachmentIconDefaultProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** ** Libraries *** */
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
/** ** Constants *** */
|
|
4
|
+
|
|
5
|
+
import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
|
|
6
|
+
const attachmentIconPropTypes = {
|
|
7
|
+
fileFormat: PropTypes.oneOf(Object.values(attachmentFileTypes)).isRequired,
|
|
8
|
+
customStyle: PropTypes.object,
|
|
9
|
+
renderCustomIcon: PropTypes.func
|
|
10
|
+
};
|
|
11
|
+
export default attachmentIconPropTypes;
|