@zohoim/chat-components 0.0.11 → 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 +56 -34
- 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/{MessageWrapper → ActionIconWrapper}/props/defaultProps.js +3 -3
- package/es/ActionIconWrapper/props/propTypes.js +11 -0
- package/es/AttachmentBubble/AttachmentBubble.js +36 -34
- 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 -20
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +20 -15
- 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/{MediaControls → AttachmentIcon}/props/defaultProps.js +3 -3
- package/es/AttachmentIcon/props/propTypes.js +11 -0
- package/es/AttachmentIcon/utils/getAttachmentIconComponent.js +55 -0
- package/es/Audio/Audio.js +12 -34
- 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 -43
- 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 +26 -25
- 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 -9
- package/es/InfoBubble/props/defaultProps.js +1 -1
- package/es/LazyLoadImage/LazyLoadImage.js +8 -19
- 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 +25 -44
- package/es/LocationBubble/css/LocationBubble.module.css +11 -9
- 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 +91 -104
- package/es/Message/props/defaultProps.js +3 -35
- package/es/Message/props/propTypes.js +26 -85
- package/es/MessageAction/MessageAction.js +32 -19
- package/es/MessageAction/props/defaultProps.js +4 -4
- package/es/MessageAction/props/propTypes.js +11 -8
- package/es/MessageActions/MessageActions.js +86 -53
- package/es/MessageActions/css/MessageActions.module.css +23 -2
- package/es/MessageActions/props/defaultProps.js +5 -5
- package/es/MessageActions/props/propTypes.js +15 -3
- package/es/MessageActionsMore/MessageActionsMore.js +45 -37
- 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 +67 -0
- package/es/MessageActionsWrapper/css/MessageActionsWrapper.module.css +3 -0
- package/es/MessageActionsWrapper/index.js +1 -0
- package/es/MessageActionsWrapper/props/defaultProps.js +9 -0
- package/es/MessageActionsWrapper/props/propTypes.js +15 -0
- package/es/MessageAvatar/MessageAvatar.js +15 -22
- 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 +2 -2
- package/es/MessageBubble/props/propTypes.js +9 -9
- package/es/MessageStatus/MessageStatus.js +72 -0
- package/es/{im/IMMessageStatus/css/IMMessageStatus.module.css → MessageStatus/css/MessageStatus.module.css} +1 -1
- package/es/MessageStatus/css/cssJSLogic.js +26 -0
- package/es/MessageStatus/index.js +1 -0
- package/es/{im/IMAttachmentIcon → MessageStatus}/props/defaultProps.js +3 -3
- package/es/MessageStatus/props/propTypes.js +12 -0
- package/es/MoreActionItem/MoreActionItem.js +25 -37
- 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 +62 -30
- 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 +21 -28
- package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +44 -34
- package/es/ReplyBubbleContent/props/defaultProps.js +1 -1
- package/es/ReplyBubbleContent/props/propTypes.js +4 -4
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +25 -29
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +12 -4
- package/es/ReplyBubbleHeader/props/defaultProps.js +2 -5
- package/es/ReplyBubbleHeader/props/propTypes.js +2 -2
- package/es/TextBubble/TextBubble.js +15 -34
- package/es/TextBubble/css/TextBubble.module.css +16 -3
- 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 +62 -62
- 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/themeVariables/commonThemeColorVariable.js +13 -0
- package/es/Theme/themeVariables/dark/blueTheme.js +68 -0
- package/es/Theme/themeVariables/dark/commonColorVariable.js +10 -0
- package/es/Theme/themeVariables/dark/greenTheme.js +67 -0
- package/es/Theme/themeVariables/dark/orangeTheme.js +67 -0
- package/es/Theme/themeVariables/dark/redTheme.js +76 -0
- package/es/Theme/themeVariables/dark/yellowTheme.js +67 -0
- package/es/Theme/themeVariables/light/blueTheme.js +63 -0
- package/es/Theme/themeVariables/light/commonColorVariable.js +12 -0
- package/es/Theme/themeVariables/light/greenTheme.js +63 -0
- package/es/Theme/themeVariables/light/orangeTheme.js +61 -0
- package/es/Theme/themeVariables/light/redTheme.js +61 -0
- package/es/Theme/themeVariables/light/yellowTheme.js +63 -0
- package/es/Theme/themeVariables/pureDark/blueTheme.js +68 -0
- package/es/Theme/themeVariables/pureDark/commonColorVariable.js +12 -0
- package/es/Theme/themeVariables/pureDark/greenTheme.js +67 -0
- package/es/Theme/themeVariables/pureDark/orangeTheme.js +67 -0
- package/es/Theme/themeVariables/pureDark/redTheme.js +67 -0
- package/es/Theme/themeVariables/pureDark/yellowTheme.js +67 -0
- 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 +14 -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 -36
- 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 +31 -0
- package/es/icons/icon.template.js +10 -9
- package/es/icons/iconSrc/attachments/Audio.js +1 -0
- package/es/icons/iconSrc/attachments/Code.js +1 -0
- package/es/icons/iconSrc/attachments/Image.js +1 -0
- package/es/icons/iconSrc/attachments/Pdf.js +1 -0
- package/es/icons/iconSrc/attachments/Txt.js +1 -0
- package/es/icons/iconSrc/attachments/Unknown.js +1 -0
- package/es/icons/iconSrc/attachments/Video.js +1 -0
- package/es/icons/iconSrc/attachments/Zip.js +1 -0
- package/es/icons/iconSrc/attachments/index.js +8 -8
- package/es/icons/iconSrc/common/Article.js +1 -0
- package/es/icons/iconSrc/common/index.js +1 -2
- package/es/icons/iconSrc/integrations/ChInstagram.js +1 -0
- package/es/icons/iconSrc/integrations/ChWhatsApp.js +1 -0
- package/es/icons/iconSrc/integrations/TtASAP.js +1 -0
- package/es/icons/iconSrc/integrations/TtTelegram.js +1 -0
- package/es/icons/iconSrc/integrations/TtTwillio.js +1 -0
- package/es/icons/iconSrc/integrations/TtTwitter.js +1 -0
- package/es/icons/iconSrc/integrations/TtWechat.js +1 -0
- package/es/icons/iconSrc/integrations/index.js +7 -7
- package/es/icons/iconSrc/messageStatus/Clock.js +1 -0
- package/es/icons/iconSrc/messageStatus/DoubleTick.js +1 -0
- package/es/icons/iconSrc/messageStatus/Failed.js +1 -0
- package/es/icons/iconSrc/messageStatus/Tick.js +1 -0
- package/es/icons/iconSrc/messageStatus/index.js +4 -4
- package/es/im/ArticleBubble/ArticleBubble.js +66 -0
- package/es/im/ArticleBubble/css/ArticleBubble.module.css +47 -0
- 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 -21
- 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 -9
- 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 +95 -156
- package/es/im/IMMessage/props/defaultProps.js +2 -29
- package/es/im/IMMessage/props/propTypes.js +57 -117
- package/es/im/IMMessageContent/IMMessageContent.js +80 -55
- package/es/im/IMMessageContent/css/IMMessageContent.module.css +3 -0
- package/es/im/IMMessageContent/props/defaultProps.js +2 -3
- package/es/im/IMMessageContent/props/propTypes.js +28 -23
- package/es/im/IMMessageMeta/IMMessageMeta.js +28 -24
- 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 +21 -61
- package/es/im/IMReplyBubble/props/defaultProps.js +2 -4
- package/es/im/IMReplyBubble/props/propTypes.js +16 -14
- package/es/im/IMTextBubble/IMTextBubble.js +16 -33
- 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 -13
- 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 -11
- package/es/index.js +30 -34
- package/package.json +32 -14
- package/es/ActionIcon/css/cssJSLogic.js +0 -10
- package/es/ArticleBubble/ArticleBubble.js +0 -68
- package/es/ArticleBubble/css/ArticleBubble.module.css +0 -40
- 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 -60
- 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 -10
- package/es/MessageActions/props/propConstants.js +0 -7
- package/es/MessageActionsMore/css/cssJSLogic.js +0 -28
- package/es/MessageAvatar/css/cssJSLogic.js +0 -18
- package/es/MessageBoxFooter/MessageBoxFooter.js +0 -39
- package/es/MessageBoxFooter/css/MessageBoxFooter.module.css +0 -3
- package/es/MessageBoxFooter/css/cssJSLogic.js +0 -10
- package/es/MessageBoxFooter/index.js +0 -1
- package/es/MessageBoxFooter/props/defaultProps.js +0 -5
- package/es/MessageBoxFooter/props/propTypes.js +0 -6
- package/es/MessageBoxHeader/MessageBoxHeader.js +0 -7
- package/es/MessageBoxHeader/css/MessageBoxHeader.module.css +0 -0
- package/es/MessageBoxHeader/css/cssJsLogic.js +0 -0
- package/es/MessageBoxHeader/index.js +0 -2
- package/es/MessageBoxHeader/props/defaultProps.js +0 -0
- package/es/MessageBoxHeader/props/propTypes.js +0 -0
- package/es/MessageBubble/props/propConstants.js +0 -6
- package/es/MessageWrapper/MessageWrapper.js +0 -37
- package/es/MessageWrapper/css/MessageWrapper.module.css +0 -0
- package/es/MessageWrapper/css/cssJSLogic.js +0 -10
- package/es/MessageWrapper/index.js +0 -1
- package/es/MessageWrapper/props/propTypes.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 -10
- package/es/TextBubble/css/cssJSLogic.js +0 -18
- package/es/TextMessage/DefaultActions.js +0 -60
- package/es/TextMessage/TextMessage.js +0 -67
- package/es/TextMessage/TextMessage1.js +0 -69
- package/es/TextMessage/css/TextMessage.module.css +0 -5
- package/es/TextMessage/css/cssJSLogic.js +0 -0
- package/es/TextMessage/index.js +0 -1
- package/es/TextMessage/props/defaultProps.js +0 -4
- package/es/TextMessage/props/propConstants.js +0 -3
- package/es/TextMessage/props/propTypes.js +0 -17
- package/es/Theme/css/cssJSLogic.js +0 -14
- package/es/Theme/darkTheme.js +0 -9
- package/es/Theme/defaultTheme.js +0 -33
- package/es/Theme/desk/commonDeskColorVariable.js +0 -14
- package/es/Theme/desk/dark/blueTheme.js +0 -42
- package/es/Theme/desk/dark/commonColorVariable.js +0 -5
- package/es/Theme/desk/dark/greenTheme.js +0 -41
- package/es/Theme/desk/dark/orangeTheme.js +0 -41
- package/es/Theme/desk/dark/redTheme.js +0 -41
- package/es/Theme/desk/dark/yellowTheme.js +0 -41
- package/es/Theme/desk/light/blueTheme.js +0 -46
- package/es/Theme/desk/light/commonColorVariable.js +0 -6
- package/es/Theme/desk/light/greenTheme.js +0 -37
- package/es/Theme/desk/light/orangeTheme.js +0 -36
- package/es/Theme/desk/light/redTheme.js +0 -36
- package/es/Theme/desk/light/yellowTheme.js +0 -37
- package/es/Theme/desk/pureDark/blueTheme.js +0 -41
- package/es/Theme/desk/pureDark/commonColorVariable.js +0 -7
- package/es/Theme/desk/pureDark/greenTheme.js +0 -41
- package/es/Theme/desk/pureDark/orangeTheme.js +0 -41
- package/es/Theme/desk/pureDark/redTheme.js +0 -41
- package/es/Theme/desk/pureDark/yellowTheme.js +0 -41
- 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 -24
- package/es/icons/iconSrc/actions/index.js +0 -1
- package/es/icons/iconSrc/common/Quote.js +0 -16
- package/es/im/IMArticleBubble/IMArticleBubble.js +0 -55
- 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 -63
- 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/IMAttachmentIcon.js +0 -86
- 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 -63
- 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 -41
- package/es/im/IMDateTime/css/IMDateTime.module.css +0 -5
- 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 -49
- 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 -49
- 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/IMMessage/renderChild/renderMessage.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageActions.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageBox.js +0 -15
- package/es/im/IMMessage/renderChild/renderMessageBoxFooter.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageFooter.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageHeader.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageOwner.js +0 -8
- package/es/im/IMMessage/renderChild/renderMessageStatus.js +0 -8
- package/es/im/IMMessageActions/IMMessageActions.js +0 -150
- package/es/im/IMMessageActions/css/IMMessageActions.module.css +0 -31
- package/es/im/IMMessageActions/css/cssJSLogic.js +0 -20
- package/es/im/IMMessageActions/index.js +0 -1
- package/es/im/IMMessageActions/props/defaultProps.js +0 -12
- package/es/im/IMMessageActions/props/propTypes.js +0 -30
- 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 -28
- package/es/im/IMMessageContent/css/cssJSLogic.js +0 -10
- package/es/im/IMMessageStatus/IMMessageStatus.js +0 -69
- package/es/im/IMMessageStatus/css/cssJSLogic.js +0 -22
- package/es/im/IMMessageStatus/index.js +0 -1
- package/es/im/IMMessageStatus/props/defaultProps.js +0 -6
- package/es/im/IMMessageStatus/props/propTypes.js +0 -21
- package/es/im/IMReplyBubble/css/IMReplyBubble.module.css +0 -24
- 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 -62
- 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/{ArticleBubble → im/ArticleBubble}/index.js +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** ** Icons *** */
|
|
2
|
+
import AudioIcon from '../../icons/iconSrc/attachments/Audio';
|
|
3
|
+
import CodeIcon from '../../icons/iconSrc/attachments/Code';
|
|
4
|
+
import ImageIcon from '../../icons/iconSrc/attachments/Image';
|
|
5
|
+
import PdfIcon from '../../icons/iconSrc/attachments/Pdf';
|
|
6
|
+
import TextIcon from '../../icons/iconSrc/attachments/Txt';
|
|
7
|
+
import UnknownIcon from '../../icons/iconSrc/attachments/Unknown';
|
|
8
|
+
import VideoIcon from '../../icons/iconSrc/attachments/Video';
|
|
9
|
+
import ZipIcon from '../../icons/iconSrc/attachments/Zip';
|
|
10
|
+
/** ** Constants *** */
|
|
11
|
+
|
|
12
|
+
import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
|
|
13
|
+
const {
|
|
14
|
+
SVG,
|
|
15
|
+
IMAGE,
|
|
16
|
+
PDF,
|
|
17
|
+
AUDIO,
|
|
18
|
+
VIDEO,
|
|
19
|
+
MP3,
|
|
20
|
+
M4A,
|
|
21
|
+
MP4,
|
|
22
|
+
HTML,
|
|
23
|
+
PSD,
|
|
24
|
+
CSS,
|
|
25
|
+
TEXT,
|
|
26
|
+
PLAIN,
|
|
27
|
+
ZIP,
|
|
28
|
+
UNDEFINED
|
|
29
|
+
} = attachmentFileTypes;
|
|
30
|
+
export default function getAttachmentIconComponent(_ref) {
|
|
31
|
+
let {
|
|
32
|
+
fileFormat
|
|
33
|
+
} = _ref;
|
|
34
|
+
const iconMapping = {
|
|
35
|
+
[SVG]: UnknownIcon,
|
|
36
|
+
[IMAGE]: ImageIcon,
|
|
37
|
+
[PDF]: PdfIcon,
|
|
38
|
+
[AUDIO]: AudioIcon,
|
|
39
|
+
[VIDEO]: VideoIcon,
|
|
40
|
+
[MP3]: AudioIcon,
|
|
41
|
+
[M4A]: AudioIcon,
|
|
42
|
+
[MP4]: VideoIcon,
|
|
43
|
+
[HTML]: CodeIcon,
|
|
44
|
+
[PSD]: UnknownIcon,
|
|
45
|
+
[CSS]: CodeIcon,
|
|
46
|
+
[TEXT]: TextIcon,
|
|
47
|
+
[PLAIN]: UnknownIcon,
|
|
48
|
+
[ZIP]: ZipIcon,
|
|
49
|
+
[UNDEFINED]: UnknownIcon
|
|
50
|
+
};
|
|
51
|
+
const IconComponent = iconMapping[fileFormat];
|
|
52
|
+
return {
|
|
53
|
+
IconComponent
|
|
54
|
+
};
|
|
55
|
+
}
|
package/es/Audio/Audio.js
CHANGED
|
@@ -1,59 +1,37 @@
|
|
|
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 *** */
|
|
4
|
+
|
|
8
5
|
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
6
|
import useMedia from '@zohoim/chat-components-hooks/es/Media/useMedia';
|
|
10
|
-
|
|
11
7
|
/** ** Constants *** */
|
|
8
|
+
|
|
12
9
|
import audioDefaultProps from './props/defaultProps';
|
|
13
10
|
import audioPropTypes from './props/propTypes';
|
|
14
|
-
|
|
15
|
-
/** ** Methods *** */
|
|
16
|
-
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
17
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
18
|
-
|
|
19
11
|
/** ** Styles *** */
|
|
20
|
-
import style from './css/Audio.module.css';
|
|
21
|
-
// import MediaControls from '../MediaControls/MediaControls';
|
|
22
12
|
|
|
13
|
+
import style from './css/Audio.module.css';
|
|
23
14
|
export default function Audio(props) {
|
|
24
15
|
const {
|
|
25
16
|
customStyle,
|
|
26
|
-
controlsCustomStyle,
|
|
27
17
|
fileType,
|
|
28
18
|
fileURL
|
|
29
19
|
} = props;
|
|
30
20
|
const {
|
|
31
|
-
mediaElementRef
|
|
32
|
-
durationTime,
|
|
33
|
-
onTogglePlay,
|
|
34
|
-
currentTime,
|
|
35
|
-
progressPercentage,
|
|
36
|
-
isMediaPlayed
|
|
21
|
+
mediaElementRef
|
|
37
22
|
} = useMedia(props);
|
|
23
|
+
/* External CSS Customization */
|
|
38
24
|
|
|
39
|
-
/* External customization */
|
|
40
25
|
const newStyle = useMergeStyle(style, customStyle);
|
|
41
|
-
|
|
42
|
-
const {
|
|
43
|
-
audioClass,
|
|
44
|
-
audioWrapperClass
|
|
45
|
-
} = cssJSLogic(props, newStyle);
|
|
46
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
className: audioWrapperClass
|
|
48
|
-
}, /*#__PURE__*/React.createElement("audio", {
|
|
49
|
-
preload: "metadata",
|
|
50
|
-
controls: true,
|
|
26
|
+
return /*#__PURE__*/React.createElement("audio", {
|
|
51
27
|
ref: mediaElementRef,
|
|
52
|
-
className:
|
|
28
|
+
className: newStyle.audio,
|
|
29
|
+
controls: true,
|
|
30
|
+
preload: "metadata"
|
|
53
31
|
}, /*#__PURE__*/React.createElement("source", {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}))
|
|
32
|
+
"data-src": fileURL,
|
|
33
|
+
type: fileType
|
|
34
|
+
}));
|
|
57
35
|
}
|
|
58
36
|
Audio.propTypes = audioPropTypes;
|
|
59
37
|
Audio.defaultProps = audioDefaultProps;
|
|
@@ -1,7 +1,6 @@
|
|
|
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 audioDefaultProps = {
|
|
4
|
-
customStyle: dummyObject
|
|
5
|
-
controlsCustomStyle: dummyObject
|
|
4
|
+
customStyle: dummyObject
|
|
6
5
|
};
|
|
7
6
|
export default audioDefaultProps;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const audioPropTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
fileURL: PropTypes.string
|
|
4
|
+
fileType: PropTypes.string.isRequired,
|
|
5
|
+
fileURL: PropTypes.string.isRequired,
|
|
6
|
+
customStyle: PropTypes.object
|
|
8
7
|
};
|
|
9
8
|
export default audioPropTypes;
|
|
@@ -1,57 +1,39 @@
|
|
|
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';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
4
|
+
import React, { useCallback } from 'react';
|
|
10
5
|
/** ** Constants *** */
|
|
6
|
+
|
|
11
7
|
import audioBubbleDefaultProps from './props/defaultProps';
|
|
12
8
|
import audioBubblePropTypes 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
|
-
/** ** Styles *** */
|
|
19
|
-
import style from './css/AudioBubble.module.css';
|
|
20
|
-
|
|
9
|
+
import { dummyObject } from '@zohoim/chat-components-utils/es/constants/emptyConstants';
|
|
21
10
|
/** ** Components *** */
|
|
22
|
-
|
|
11
|
+
|
|
12
|
+
import MediaBubbleWrapper from '../MediaBubbleWrapper/MediaBubbleWrapper';
|
|
23
13
|
import Audio from '../Audio/Audio';
|
|
24
14
|
export default function AudioBubble(props) {
|
|
25
15
|
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
audioCustomStyle,
|
|
29
|
-
controlsCustomStyle,
|
|
30
|
-
fileName,
|
|
31
|
-
fileSize,
|
|
32
|
-
fileURL,
|
|
33
|
-
fileType
|
|
16
|
+
audioDetails,
|
|
17
|
+
customProps
|
|
34
18
|
} = props;
|
|
35
|
-
|
|
36
|
-
/* External customization */
|
|
37
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
38
|
-
/* CSS classnames added based on logic */
|
|
39
19
|
const {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
20
|
+
audioProps = dummyObject,
|
|
21
|
+
mediaBubbleWrapperProps = dummyObject
|
|
22
|
+
} = customProps;
|
|
23
|
+
const renderMedia = useCallback(_ref => {
|
|
24
|
+
let {
|
|
25
|
+
fileURL,
|
|
26
|
+
fileType
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/React.createElement(Audio, _extends({
|
|
29
|
+
fileType: fileType,
|
|
30
|
+
fileURL: fileURL
|
|
31
|
+
}, audioProps));
|
|
32
|
+
}, [audioProps]);
|
|
33
|
+
return /*#__PURE__*/React.createElement(MediaBubbleWrapper, _extends({
|
|
34
|
+
mediaDetails: audioDetails,
|
|
35
|
+
renderMedia: renderMedia
|
|
36
|
+
}, mediaBubbleWrapperProps));
|
|
55
37
|
}
|
|
56
38
|
AudioBubble.propTypes = audioBubblePropTypes;
|
|
57
39
|
AudioBubble.defaultProps = audioBubbleDefaultProps;
|
|
@@ -1,8 +1,6 @@
|
|
|
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 audioBubbleDefaultProps = {
|
|
4
|
-
|
|
5
|
-
headerCustomStyle: dummyObject,
|
|
6
|
-
audioCustomStyle: dummyObject
|
|
4
|
+
customProps: dummyObject
|
|
7
5
|
};
|
|
8
6
|
export default audioBubbleDefaultProps;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const audioBubblePropTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
audioDetails: PropTypes.shape({
|
|
5
|
+
name: PropTypes.string.isRequired,
|
|
6
|
+
size: PropTypes.string.isRequired,
|
|
7
|
+
type: PropTypes.string.isRequired,
|
|
8
|
+
url: PropTypes.string.isRequired
|
|
9
|
+
}).isRequired,
|
|
10
|
+
customProps: PropTypes.shape({
|
|
11
|
+
audioProps: PropTypes.object,
|
|
12
|
+
mediaBubbleWrapperProps: PropTypes.object
|
|
13
|
+
})
|
|
11
14
|
};
|
|
12
15
|
export default audioBubblePropTypes;
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
/* $Id$ */
|
|
2
|
+
|
|
2
3
|
@font-face {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
font-family: 'ZohoPuviLight';
|
|
5
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Light.woff2')
|
|
6
|
+
format('woff2');
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-weight: normal;
|
|
9
|
+
text-rendering: optimizeLegibility;
|
|
10
|
+
font-display: swap;
|
|
11
|
+
}
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
@font-face {
|
|
14
|
+
font-family: 'ZohoPuviRegular';
|
|
15
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2')
|
|
16
|
+
format('woff2');
|
|
17
|
+
font-style: normal;
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
text-rendering: optimizeLegibility;
|
|
20
|
+
font-display: swap;
|
|
21
|
+
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
@font-face {
|
|
24
|
+
font-family: 'ZohoPuviSemiBold';
|
|
25
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Semibold.woff2')
|
|
26
|
+
format('woff2');
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-weight: normal;
|
|
29
|
+
text-rendering: optimizeLegibility;
|
|
30
|
+
font-display: swap;
|
|
31
|
+
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
@font-face {
|
|
34
|
+
font-family: 'ZohoPuviBold';
|
|
35
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Bold.woff2')
|
|
36
|
+
format('woff2');
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
text-rendering: optimizeLegibility;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
}
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: 'ZohoPuviExtBd';
|
|
45
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Extrabold.woff2')
|
|
46
|
+
format('woff2');
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-weight: normal;
|
|
49
|
+
text-rendering: optimizeLegibility;
|
|
50
|
+
font-display: swap;
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: 'ZohoPuviMedium';
|
|
55
|
+
src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Medium.woff2')
|
|
56
|
+
format('woff2');
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-weight: normal;
|
|
59
|
+
text-rendering: optimizeLegibility;
|
|
60
|
+
font-display: swap;
|
|
61
|
+
}
|
|
61
62
|
|
|
@@ -1,50 +1,51 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
1
|
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
7
3
|
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
10
4
|
|
|
5
|
+
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
6
|
+
import useAttachmentBubble from '@zohoim/chat-components-hooks/es/AttachmentBubble/useAttachmentBubble';
|
|
11
7
|
/** ** Constants *** */
|
|
8
|
+
|
|
12
9
|
import imageBubbleDefaultProps from './props/defaultProps';
|
|
13
10
|
import imageBubblePropTypes from './props/propTypes';
|
|
14
|
-
|
|
15
|
-
/** ** Methods *** */
|
|
16
|
-
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
17
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
18
|
-
|
|
19
11
|
/** ** Styles *** */
|
|
12
|
+
|
|
20
13
|
import style from './css/ImageBubble.module.css';
|
|
14
|
+
/** ** Components *** */
|
|
15
|
+
|
|
16
|
+
import { Container } from '@zohodesk/components/es/Layout';
|
|
21
17
|
import LazyLoadImage from '../LazyLoadImage/LazyLoadImage';
|
|
22
18
|
export default function ImageBubble(props) {
|
|
23
19
|
const {
|
|
24
20
|
customStyle,
|
|
25
|
-
|
|
26
|
-
alternate
|
|
21
|
+
imageDetails
|
|
27
22
|
} = props;
|
|
23
|
+
/* External CSS Customization */
|
|
28
24
|
|
|
29
|
-
/* External customization */
|
|
30
25
|
const newStyle = useMergeStyle(style, customStyle);
|
|
31
|
-
|
|
26
|
+
const imageStyle = useMemo(() => ({
|
|
27
|
+
lazyLoadImage: newStyle.image
|
|
28
|
+
}), [newStyle.image]);
|
|
29
|
+
const blurImageStyle = useMemo(() => ({
|
|
30
|
+
lazyLoadImage: newStyle.blurImage
|
|
31
|
+
}), [newStyle.blurImage]);
|
|
32
32
|
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
attachmentURL: src,
|
|
34
|
+
fileName: alternate
|
|
35
|
+
} = useAttachmentBubble({
|
|
36
|
+
attachmentDetails: imageDetails
|
|
37
|
+
});
|
|
37
38
|
return /*#__PURE__*/React.createElement(Container, {
|
|
38
39
|
align: "both",
|
|
39
|
-
className:
|
|
40
|
+
className: newStyle.imageBubbleWrapper
|
|
40
41
|
}, /*#__PURE__*/React.createElement(LazyLoadImage, {
|
|
41
|
-
|
|
42
|
+
alternate: alternate,
|
|
42
43
|
customStyle: blurImageStyle,
|
|
43
|
-
|
|
44
|
+
src: src
|
|
44
45
|
}), /*#__PURE__*/React.createElement(LazyLoadImage, {
|
|
45
|
-
|
|
46
|
+
alternate: alternate,
|
|
46
47
|
customStyle: imageStyle,
|
|
47
|
-
|
|
48
|
+
src: src
|
|
48
49
|
}));
|
|
49
50
|
}
|
|
50
51
|
ImageBubble.propTypes = imageBubblePropTypes;
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
.varClass {
|
|
2
|
-
--imageBubble-wrapper_height: var(--
|
|
2
|
+
--imageBubble-wrapper_height: var(--zd_size200);
|
|
3
3
|
--imageBubble-wrapper_width: 23.75rem;
|
|
4
4
|
--imageBubble-wrapper_max_width: 100%;
|
|
5
|
-
|
|
6
5
|
--imageBubble-blur_img_width: 100%;
|
|
7
6
|
--imageBubble-blur_img_height: 100%;
|
|
8
7
|
/* --imageBubble-blur_img_blurpx: 90px; */
|
|
9
|
-
|
|
10
8
|
--imageBubble-img_max_width: 100%;
|
|
11
9
|
--imageBubble-img_max_height: 100%;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
.imageBubbleWrapper {
|
|
15
13
|
composes: varClass;
|
|
16
|
-
|
|
17
14
|
width: var(--imageBubble-wrapper_width);
|
|
18
15
|
max-width: var(--imageBubble-wrapper_max_width);
|
|
19
16
|
height: var(--imageBubble-wrapper_height);
|
|
@@ -21,7 +18,7 @@
|
|
|
21
18
|
position: relative;
|
|
22
19
|
cursor: pointer;
|
|
23
20
|
background-color: var(--imlib_chat_components_imageBubble_bg_color);
|
|
24
|
-
border-radius:
|
|
21
|
+
border-radius: 3px;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
.blurImage {
|
|
@@ -29,20 +26,20 @@
|
|
|
29
26
|
-webkit-filter: blur(90px);
|
|
30
27
|
filter: blur(90px);
|
|
31
28
|
position: absolute;
|
|
32
|
-
top: 0;
|
|
33
|
-
bottom: 0;
|
|
29
|
+
top: 0 ;
|
|
30
|
+
bottom: 0 ;
|
|
34
31
|
width: var(--imageBubble-blur_img_width);
|
|
35
32
|
height: var(--imageBubble-blur_img_height);
|
|
36
33
|
}
|
|
37
34
|
|
|
38
35
|
[dir=ltr] .blurImage {
|
|
39
|
-
right: 0;
|
|
40
|
-
left: 0;
|
|
36
|
+
right: 0 ;
|
|
37
|
+
left: 0 ;
|
|
41
38
|
}
|
|
42
39
|
|
|
43
40
|
[dir=rtl] .blurImage {
|
|
44
|
-
left: 0;
|
|
45
|
-
right: 0;
|
|
41
|
+
left: 0 ;
|
|
42
|
+
right: 0 ;
|
|
46
43
|
}
|
|
47
44
|
|
|
48
45
|
.image {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/** ** Libraries *** */
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
const imageBubblePropTypes = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
imageDetails: PropTypes.shape({
|
|
5
|
+
url: PropTypes.string.isRequired,
|
|
6
|
+
name: PropTypes.string
|
|
7
|
+
}).isRequired,
|
|
8
|
+
customStyle: PropTypes.object
|
|
7
9
|
};
|
|
8
10
|
export default imageBubblePropTypes;
|
|
@@ -1,30 +1,27 @@
|
|
|
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 infoBubbleDefaultProps from './props/defaultProps';
|
|
12
9
|
import infoBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
10
|
/** ** Methods *** */
|
|
15
|
-
import renderHandler from '@zohoim/chat-components-utils/es/common/renderHandler';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
11
|
|
|
12
|
+
import cssJSLogic from './css/cssJSLogic';
|
|
18
13
|
/** ** Styles *** */
|
|
14
|
+
|
|
19
15
|
import style from './css/InfoBubble.module.css';
|
|
20
16
|
export default function InfoBubble(props) {
|
|
21
17
|
const {
|
|
22
18
|
customStyle
|
|
23
19
|
} = props;
|
|
20
|
+
/* External CSS Customization */
|
|
24
21
|
|
|
25
|
-
/* External customization */
|
|
26
22
|
const newStyle = useMergeStyle(style, customStyle);
|
|
27
23
|
/* CSS classnames added based on logic */
|
|
24
|
+
|
|
28
25
|
const {
|
|
29
26
|
infoBubbleClass
|
|
30
27
|
} = cssJSLogic(props, newStyle);
|
|
@@ -1,23 +1,16 @@
|
|
|
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';
|
|
6
|
+
import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
|
|
10
7
|
/** ** Constants *** */
|
|
8
|
+
|
|
11
9
|
import lazyLoadImageDefaultProps from './props/defaultProps';
|
|
12
10
|
import lazyLoadImagePropTypes 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
11
|
/** ** Styles *** */
|
|
12
|
+
|
|
19
13
|
import style from './css/LazyLoadImage.module.css';
|
|
20
|
-
import useLazyLoadImage from '@zohoim/chat-components-hooks/es/ImageBubble/useLazyLoadImage';
|
|
21
14
|
export default function LazyLoadImage(props) {
|
|
22
15
|
const {
|
|
23
16
|
customStyle,
|
|
@@ -27,20 +20,16 @@ export default function LazyLoadImage(props) {
|
|
|
27
20
|
const {
|
|
28
21
|
imageElementRef
|
|
29
22
|
} = useLazyLoadImage();
|
|
23
|
+
/* External CSS Customization */
|
|
30
24
|
|
|
31
|
-
/* External customization */
|
|
32
25
|
const newStyle = useMergeStyle(style, customStyle);
|
|
33
|
-
/* CSS classnames added based on logic */
|
|
34
|
-
const {
|
|
35
|
-
lazyLoadImageClass
|
|
36
|
-
} = cssJSLogic(props, newStyle);
|
|
37
26
|
return /*#__PURE__*/React.createElement("img", {
|
|
38
27
|
ref: imageElementRef,
|
|
39
|
-
|
|
28
|
+
alt: alternate,
|
|
29
|
+
className: `lazy ${newStyle.lazyLoadImage || ''}`,
|
|
40
30
|
"data-src": src,
|
|
41
31
|
"data-srcset": src,
|
|
42
|
-
|
|
43
|
-
alt: alternate
|
|
32
|
+
src: ""
|
|
44
33
|
});
|
|
45
34
|
}
|
|
46
35
|
LazyLoadImage.propTypes = lazyLoadImagePropTypes;
|