@zohoim/chat-components 0.0.13 → 0.0.15
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 +57 -0
- package/es/ActionIconWrapper/css/ActionIconWrapper.module.css +32 -0
- package/es/ActionIconWrapper/css/cssJSLogic.js +14 -0
- package/es/ActionIconWrapper/index.js +1 -0
- package/es/{im/IMDateTime → ActionIconWrapper}/props/defaultProps.js +3 -3
- package/es/ActionIconWrapper/props/propTypes.js +11 -0
- package/es/AttachmentBubble/AttachmentBubble.js +30 -29
- package/es/AttachmentBubble/css/AttachmentBubble.module.css +17 -15
- package/es/AttachmentBubble/props/defaultProps.js +2 -2
- package/es/AttachmentBubble/props/propTypes.js +10 -5
- package/es/AttachmentBubbleInfo/AttachmentBubbleInfo.js +13 -21
- package/es/AttachmentBubbleInfo/css/AttachmentBubbleInfo.module.css +19 -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/{MediaControls → AttachmentIcon}/props/defaultProps.js +3 -3
- package/es/AttachmentIcon/props/propTypes.js +11 -0
- package/es/AttachmentIcon/utils/getAttachmentIconComponent.js +61 -0
- 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 +32 -36
- package/es/AudioBubble/css/AudioBubble.module.css +3 -2
- package/es/AudioBubble/props/defaultProps.js +2 -3
- 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 +17 -34
- package/es/LocationBubble/css/LocationBubble.module.css +13 -14
- 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 +7 -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 +56 -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 +33 -30
- package/es/MessageBox/css/MessageBox.module.css +9 -16
- 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 +64 -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 +6 -14
- package/es/MoreActionItem/props/defaultProps.js +1 -5
- package/es/MoreActionItem/props/propTypes.js +6 -5
- package/es/ReplyBubble/ReplyBubble.js +58 -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 +15 -25
- package/es/ReplyBubbleContent/css/ReplyBubbleContent.module.css +35 -38
- package/es/ReplyBubbleContent/props/defaultProps.js +1 -1
- package/es/ReplyBubbleContent/props/propTypes.js +4 -4
- package/es/ReplyBubbleHeader/ReplyBubbleHeader.js +27 -33
- package/es/ReplyBubbleHeader/css/ReplyBubbleHeader.module.css +25 -9
- package/es/ReplyBubbleHeader/props/defaultProps.js +2 -4
- package/es/ReplyBubbleHeader/props/propTypes.js +3 -2
- package/es/TextBubble/TextBubble.js +12 -30
- package/es/TextBubble/css/TextBubble.module.css +15 -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 +8 -8
- package/es/Theme/{desk → themeVariables}/dark/orangeTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/dark/redTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/dark/yellowTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/light/blueTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/light/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/light/greenTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/light/orangeTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/redTheme.js +7 -7
- package/es/Theme/{desk → themeVariables}/light/yellowTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/pureDark/blueTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/pureDark/commonColorVariable.js +1 -1
- package/es/Theme/{desk → themeVariables}/pureDark/greenTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/pureDark/orangeTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/pureDark/redTheme.js +8 -8
- package/es/Theme/{desk → themeVariables}/pureDark/yellowTheme.js +8 -8
- 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 +32 -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/css/common.module.css +6 -0
- package/es/icons/create-icon-components.js +30 -0
- package/es/icons/factory/common/article.svg +4 -4
- package/es/icons/factory/integrations/chInstagram.svg +2 -2
- package/es/icons/factory/integrations/chWhatsApp.svg +2 -2
- package/es/icons/factory/integrations/ttASAP.svg +6 -1
- package/es/icons/factory/integrations/ttLine.svg +8 -0
- package/es/icons/factory/integrations/ttTelegram.svg +4 -1
- package/es/icons/factory/integrations/ttTwillio.svg +8 -1
- package/es/icons/factory/integrations/ttWechat.svg +9 -1
- package/es/icons/icon.template.js +9 -8
- package/es/icons/iconSrc/common/Article.js +2 -3
- package/es/icons/iconSrc/common/index.js +1 -2
- package/es/icons/iconSrc/integrations/ChInstagram.js +2 -3
- package/es/icons/iconSrc/integrations/ChWhatsApp.js +2 -3
- package/es/icons/iconSrc/integrations/TtASAP.js +11 -15
- package/es/icons/iconSrc/integrations/{TtTwitter.js → TtLine.js} +14 -18
- package/es/icons/iconSrc/integrations/TtTelegram.js +8 -12
- package/es/icons/iconSrc/integrations/TtTwillio.js +15 -19
- package/es/icons/iconSrc/integrations/TtWechat.js +19 -20
- package/es/icons/iconSrc/integrations/index.js +1 -1
- package/es/im/ArticleBubble/ArticleBubble.js +67 -0
- package/es/im/ArticleBubble/css/ArticleBubble.module.css +57 -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 -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 +97 -90
- package/es/im/IMMessage/css/IMMessage.module.css +36 -0
- package/es/im/IMMessage/css/cssJSLogic.js +16 -3
- package/es/im/IMMessage/props/defaultProps.js +3 -11
- package/es/im/IMMessage/props/propTypes.js +52 -97
- package/es/im/IMMessageContent/IMMessageContent.js +76 -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 +29 -23
- package/es/im/IMMessageMeta/IMMessageMeta.js +26 -21
- package/es/im/IMMessageMeta/css/IMMessageMeta.module.css +13 -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/IMPermaLink/IMPermaLink.js +48 -0
- package/es/im/IMPermaLink/css/IMPermaLink.module.css +14 -0
- package/es/im/{IMTicketLink → IMPermaLink}/css/cssJSLogic.js +3 -3
- package/es/im/IMPermaLink/index.js +1 -0
- package/es/im/{IMAttachmentIcon → IMPermaLink}/props/defaultProps.js +3 -3
- package/es/im/IMPermaLink/props/propTypes.js +11 -0
- 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/css/common.module.css +6 -0
- package/es/im/index.js +2 -10
- 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/ArticleBubble.module.css +0 -48
- 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/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/factory/integrations/ttTwitter.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/IMAttachmentIcon.js +0 -85
- 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/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/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/IMTicketLink/IMTicketLink.js +0 -46
- package/es/im/IMTicketLink/css/IMTicketLink.module.css +0 -27
- package/es/im/IMTicketLink/index.js +0 -1
- package/es/im/IMTicketLink/props/defaultProps.js +0 -6
- package/es/im/IMTicketLink/props/propTypes.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,62 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
10
|
-
/** ** Constants *** */
|
|
11
|
-
import imAttachmentBubbleDefaultProps from './props/defaultProps';
|
|
12
|
-
import imAttachmentBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import getAttachmentDetails from '@zohoim/chat-components-utils/es/imUtils/getAttachmentDetails';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
|
-
/** ** Styles *** */
|
|
19
|
-
import style from './css/IMAttachmentBubble.module.css';
|
|
20
|
-
import AttachmentBubble from '../../AttachmentBubble/AttachmentBubble';
|
|
21
|
-
import IMAttachmentIcon from '../IMAttachmentIcon/IMAttachmentIcon';
|
|
22
|
-
export default function IMAttachmentBubble(props) {
|
|
23
|
-
const {
|
|
24
|
-
customStyle,
|
|
25
|
-
iconCustomStyle,
|
|
26
|
-
bubbleCustomStyle,
|
|
27
|
-
bubbleInfoCustomStyle,
|
|
28
|
-
attachmentDetails
|
|
29
|
-
} = props;
|
|
30
|
-
|
|
31
|
-
/* External customization */
|
|
32
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
33
|
-
/* CSS classnames added based on logic */
|
|
34
|
-
const {
|
|
35
|
-
imAttachmentBubbleClass
|
|
36
|
-
} = cssJSLogic(props, newStyle);
|
|
37
|
-
const {
|
|
38
|
-
formattedFileSize: fileSize,
|
|
39
|
-
fileName,
|
|
40
|
-
fileFormat
|
|
41
|
-
} = getAttachmentDetails({
|
|
42
|
-
attachmentDetails
|
|
43
|
-
});
|
|
44
|
-
function renderFileTypeIcon() {
|
|
45
|
-
return /*#__PURE__*/React.createElement(IMAttachmentIcon, {
|
|
46
|
-
customStyle: iconCustomStyle,
|
|
47
|
-
fileFormat: fileFormat
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className: imAttachmentBubbleClass
|
|
52
|
-
}, /*#__PURE__*/React.createElement(AttachmentBubble, {
|
|
53
|
-
bubbleInfoCustomStyle: bubbleInfoCustomStyle,
|
|
54
|
-
customStyle: bubbleCustomStyle,
|
|
55
|
-
fileName: fileName,
|
|
56
|
-
fileSize: fileSize,
|
|
57
|
-
renderFileTypeIcon: renderFileTypeIcon
|
|
58
|
-
}));
|
|
59
|
-
}
|
|
60
|
-
IMAttachmentBubble.propTypes = imAttachmentBubblePropTypes;
|
|
61
|
-
IMAttachmentBubble.defaultProps = imAttachmentBubbleDefaultProps;
|
|
62
|
-
IMAttachmentBubble.displayName = 'IMAttachmentBubble';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
export default function cssJSLogic(props, style) {
|
|
4
|
-
const imAttachmentBubbleClass = compileClassNames({
|
|
5
|
-
[style.imAttachmentBubble]: true
|
|
6
|
-
});
|
|
7
|
-
return {
|
|
8
|
-
imAttachmentBubbleClass
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMAttachmentBubble } from './IMAttachmentBubble';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
-
const imAttachmentBubbleDefaultProps = {
|
|
4
|
-
customStyle: dummyObject,
|
|
5
|
-
bubbleCustomStyle: dummyObject,
|
|
6
|
-
bubbleInfoCustomStyle: dummyObject,
|
|
7
|
-
iconCustomStyle: dummyObject,
|
|
8
|
-
attachmentDetails: dummyObject
|
|
9
|
-
};
|
|
10
|
-
export default imAttachmentBubbleDefaultProps;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
const imAttachmentBubblePropTypes = {
|
|
4
|
-
customStyle: PropTypes.object,
|
|
5
|
-
iconCustomStyle: PropTypes.object,
|
|
6
|
-
bubbleCustomStyle: PropTypes.object,
|
|
7
|
-
bubbleInfoCustomStyle: PropTypes.object,
|
|
8
|
-
attachmentDetails: PropTypes.shape({
|
|
9
|
-
name: PropTypes.string,
|
|
10
|
-
size: PropTypes.string,
|
|
11
|
-
type: PropTypes.string,
|
|
12
|
-
url: PropTypes.string,
|
|
13
|
-
id: PropTypes.string
|
|
14
|
-
})
|
|
15
|
-
};
|
|
16
|
-
export default imAttachmentBubblePropTypes;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
10
|
-
/** ** Constants *** */
|
|
11
|
-
import imAttachmentIconDefaultProps from './props/defaultProps';
|
|
12
|
-
import imAttachmentIconPropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
|
-
|
|
17
|
-
/** ** Styles *** */
|
|
18
|
-
import style from './css/IMAttachmentIcon.module.css';
|
|
19
|
-
import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
|
|
20
|
-
|
|
21
|
-
/** ** Icons *** */
|
|
22
|
-
import AudioIcon from '../../icons/iconSrc/attachments/Audio';
|
|
23
|
-
import CodeIcon from '../../icons/iconSrc/attachments/Code';
|
|
24
|
-
import ImageIcon from '../../icons/iconSrc/attachments/Image';
|
|
25
|
-
import PdfIcon from '../../icons/iconSrc/attachments/Pdf';
|
|
26
|
-
import TextIcon from '../../icons/iconSrc/attachments/Txt';
|
|
27
|
-
import UnknownIcon from '../../icons/iconSrc/attachments/Unknown';
|
|
28
|
-
import VideoIcon from '../../icons/iconSrc/attachments/Video';
|
|
29
|
-
import ZipIcon from '../../icons/iconSrc/attachments/Zip';
|
|
30
|
-
const {
|
|
31
|
-
SVG,
|
|
32
|
-
IMAGE,
|
|
33
|
-
PDF,
|
|
34
|
-
AUDIO,
|
|
35
|
-
VIDEO,
|
|
36
|
-
MP3,
|
|
37
|
-
M4A,
|
|
38
|
-
MP4,
|
|
39
|
-
// LOCATION,
|
|
40
|
-
HTML,
|
|
41
|
-
PSD,
|
|
42
|
-
CSS,
|
|
43
|
-
TEXT,
|
|
44
|
-
PLAIN,
|
|
45
|
-
ZIP,
|
|
46
|
-
UNDEFINED
|
|
47
|
-
} = attachmentFileTypes;
|
|
48
|
-
export default function IMAttachmentIcon(props) {
|
|
49
|
-
const {
|
|
50
|
-
customStyle,
|
|
51
|
-
fileFormat
|
|
52
|
-
} = props;
|
|
53
|
-
|
|
54
|
-
/* External customization */
|
|
55
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
56
|
-
/* CSS classnames added based on logic */
|
|
57
|
-
const {
|
|
58
|
-
iconStyle
|
|
59
|
-
} = cssJSLogic(props, newStyle);
|
|
60
|
-
const iconMapping = {
|
|
61
|
-
[SVG]: UnknownIcon,
|
|
62
|
-
[IMAGE]: ImageIcon,
|
|
63
|
-
[PDF]: PdfIcon,
|
|
64
|
-
[AUDIO]: AudioIcon,
|
|
65
|
-
[VIDEO]: VideoIcon,
|
|
66
|
-
[MP3]: AudioIcon,
|
|
67
|
-
[M4A]: AudioIcon,
|
|
68
|
-
[MP4]: VideoIcon,
|
|
69
|
-
// [LOCATION]: ReplyIcon,
|
|
70
|
-
[HTML]: CodeIcon,
|
|
71
|
-
[PSD]: UnknownIcon,
|
|
72
|
-
[CSS]: CodeIcon,
|
|
73
|
-
[TEXT]: TextIcon,
|
|
74
|
-
[PLAIN]: UnknownIcon,
|
|
75
|
-
[ZIP]: ZipIcon,
|
|
76
|
-
[UNDEFINED]: UnknownIcon
|
|
77
|
-
};
|
|
78
|
-
const IconComponent = iconMapping[fileFormat];
|
|
79
|
-
return IconComponent ? /*#__PURE__*/React.createElement(IconComponent, {
|
|
80
|
-
customStyle: iconStyle
|
|
81
|
-
}) : null;
|
|
82
|
-
}
|
|
83
|
-
IMAttachmentIcon.propTypes = imAttachmentIconPropTypes;
|
|
84
|
-
IMAttachmentIcon.defaultProps = imAttachmentIconDefaultProps;
|
|
85
|
-
IMAttachmentIcon.displayName = 'IMAttachmentIcon';
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
export default function cssJSLogic(props, style) {
|
|
4
|
-
const imAttachmentIconClass = compileClassNames({
|
|
5
|
-
[style.imAttachmentIcon]: true
|
|
6
|
-
});
|
|
7
|
-
const iconClass = compileClassNames({
|
|
8
|
-
[style.icon]: true
|
|
9
|
-
});
|
|
10
|
-
return {
|
|
11
|
-
imAttachmentIconClass,
|
|
12
|
-
iconStyle: {
|
|
13
|
-
base: iconClass
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMAttachmentIcon } from './IMAttachmentIcon';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import attachmentFileTypes from '@zohoim/chat-components-utils/es/constants/attachmentFileTypes';
|
|
4
|
-
const {
|
|
5
|
-
SVG,
|
|
6
|
-
IMAGE,
|
|
7
|
-
PDF,
|
|
8
|
-
AUDIO,
|
|
9
|
-
VIDEO,
|
|
10
|
-
MP3,
|
|
11
|
-
M4A,
|
|
12
|
-
MP4,
|
|
13
|
-
LOCATION,
|
|
14
|
-
HTML,
|
|
15
|
-
PSD,
|
|
16
|
-
CSS,
|
|
17
|
-
TEXT,
|
|
18
|
-
PLAIN,
|
|
19
|
-
ZIP,
|
|
20
|
-
UNDEFINED
|
|
21
|
-
} = attachmentFileTypes;
|
|
22
|
-
const imAttachmentIconPropTypes = {
|
|
23
|
-
customStyle: PropTypes.object,
|
|
24
|
-
fileFormat: PropTypes.oneOf([SVG, IMAGE, PDF, AUDIO, VIDEO, MP3, M4A, MP4, LOCATION, HTML, PSD, CSS, TEXT, PLAIN, ZIP, UNDEFINED])
|
|
25
|
-
};
|
|
26
|
-
export default imAttachmentIconPropTypes;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
10
|
-
/** ** Constants *** */
|
|
11
|
-
import imAudioBubbleDefaultProps from './props/defaultProps';
|
|
12
|
-
import imAudioBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
16
|
-
|
|
17
|
-
/** ** Styles *** */
|
|
18
|
-
import style from './css/IMAudioBubble.module.css';
|
|
19
|
-
import AudioBubble from '../../AudioBubble/AudioBubble';
|
|
20
|
-
import useIMAudioBubble from '@zohoim/chat-components-hooks/es/im/IMAudioBubble/useIMAudioBubble';
|
|
21
|
-
export default function IMAudioBubble(props) {
|
|
22
|
-
const {
|
|
23
|
-
attachmentDetails,
|
|
24
|
-
customStyle,
|
|
25
|
-
audioBubbleCustomStyle,
|
|
26
|
-
// headerCustomStyle,
|
|
27
|
-
audioCustomStyle,
|
|
28
|
-
controlsCustomStyle
|
|
29
|
-
} = props;
|
|
30
|
-
const {
|
|
31
|
-
isShow,
|
|
32
|
-
fileName,
|
|
33
|
-
formattedFileSize: fileSize,
|
|
34
|
-
attachmentURL: fileURL,
|
|
35
|
-
attachmentType: fileType
|
|
36
|
-
} = useIMAudioBubble({
|
|
37
|
-
attachmentDetails
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/* External customization */
|
|
41
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
42
|
-
/* CSS classnames added based on logic */
|
|
43
|
-
const {
|
|
44
|
-
imAudioBubbleClass,
|
|
45
|
-
headerCustomStyle
|
|
46
|
-
} = cssJSLogic(props, newStyle);
|
|
47
|
-
return isShow ? /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className: imAudioBubbleClass
|
|
49
|
-
}, /*#__PURE__*/React.createElement(AudioBubble, {
|
|
50
|
-
audioCustomStyle: audioCustomStyle,
|
|
51
|
-
controlsCustomStyle: controlsCustomStyle,
|
|
52
|
-
customStyle: audioBubbleCustomStyle,
|
|
53
|
-
fileName: fileName,
|
|
54
|
-
fileSize: fileSize,
|
|
55
|
-
fileType: fileType,
|
|
56
|
-
fileURL: fileURL,
|
|
57
|
-
headerCustomStyle: headerCustomStyle
|
|
58
|
-
})) : null;
|
|
59
|
-
}
|
|
60
|
-
IMAudioBubble.propTypes = imAudioBubblePropTypes;
|
|
61
|
-
IMAudioBubble.defaultProps = imAudioBubbleDefaultProps;
|
|
62
|
-
IMAudioBubble.displayName = 'IMAudioBubble';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
export default function cssJSLogic(props, style) {
|
|
4
|
-
const {
|
|
5
|
-
headerCustomStyle: propHeaderCustomStyle
|
|
6
|
-
} = props;
|
|
7
|
-
const imAudioBubbleClass = compileClassNames({
|
|
8
|
-
[style.imAudioBubble]: true
|
|
9
|
-
});
|
|
10
|
-
const headerCustomStyle = compileClassNames({
|
|
11
|
-
[style.box]: true
|
|
12
|
-
});
|
|
13
|
-
return {
|
|
14
|
-
imAudioBubbleClass,
|
|
15
|
-
headerCustomStyle: {
|
|
16
|
-
attachmentBubbleInfo: headerCustomStyle,
|
|
17
|
-
...propHeaderCustomStyle
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMAudioBubble } from './IMAudioBubble';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
-
const imAudioBubbleDefaultProps = {
|
|
4
|
-
customStyle: dummyObject,
|
|
5
|
-
audioBubbleCustomStyle: dummyObject,
|
|
6
|
-
headerCustomStyle: dummyObject,
|
|
7
|
-
audioCustomStyle: dummyObject,
|
|
8
|
-
controlsCustomStyle: dummyObject,
|
|
9
|
-
attachmentDetails: dummyObject
|
|
10
|
-
};
|
|
11
|
-
export default imAudioBubbleDefaultProps;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
const imAudioBubblePropTypes = {
|
|
4
|
-
attachmentDetails: PropTypes.shape({
|
|
5
|
-
name: PropTypes.string,
|
|
6
|
-
size: PropTypes.string,
|
|
7
|
-
type: PropTypes.string,
|
|
8
|
-
url: PropTypes.string,
|
|
9
|
-
id: PropTypes.string
|
|
10
|
-
}),
|
|
11
|
-
customStyle: PropTypes.object,
|
|
12
|
-
audioBubbleCustomStyle: PropTypes.object,
|
|
13
|
-
headerCustomStyle: PropTypes.object,
|
|
14
|
-
audioCustomStyle: PropTypes.object,
|
|
15
|
-
controlsCustomStyle: PropTypes.object
|
|
16
|
-
};
|
|
17
|
-
export default imAudioBubblePropTypes;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
export default function cssJSLogic(props, style) {
|
|
4
|
-
const imAutoMessageInfoClass = compileClassNames({
|
|
5
|
-
[style.imAutoMessageInfo]: true
|
|
6
|
-
});
|
|
7
|
-
return {
|
|
8
|
-
imAutoMessageInfoClass
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
import useIMDateTime from '@zohoim/chat-components-hooks/es/im/IMDateTime/useIMDateTime';
|
|
10
|
-
|
|
11
|
-
/** ** Constants *** */
|
|
12
|
-
import imDateTimeDefaultProps from './props/defaultProps';
|
|
13
|
-
import imDateTimePropTypes from './props/propTypes';
|
|
14
|
-
|
|
15
|
-
/** ** Methods *** */
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
|
-
/** ** Styles *** */
|
|
19
|
-
import style from './css/IMDateTime.module.css';
|
|
20
|
-
export default function IMDateTime(props) {
|
|
21
|
-
const {
|
|
22
|
-
customStyle
|
|
23
|
-
} = props;
|
|
24
|
-
const {
|
|
25
|
-
time
|
|
26
|
-
} = useIMDateTime(props);
|
|
27
|
-
|
|
28
|
-
/* External customization */
|
|
29
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
30
|
-
/* CSS classnames added based on logic */
|
|
31
|
-
const {
|
|
32
|
-
imDateTimeClass
|
|
33
|
-
} = cssJSLogic(props, newStyle);
|
|
34
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: imDateTimeClass
|
|
36
|
-
}, time);
|
|
37
|
-
}
|
|
38
|
-
IMDateTime.propTypes = imDateTimePropTypes;
|
|
39
|
-
IMDateTime.defaultProps = imDateTimeDefaultProps;
|
|
40
|
-
IMDateTime.displayName = 'IMDateTime';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
.imDateTime {
|
|
2
|
-
font-size: var(--imlib_size_11);
|
|
3
|
-
/* max-width: var(--zd_size100); */
|
|
4
|
-
/* display: flex; */
|
|
5
|
-
max-width: var(--zd_size100);
|
|
6
|
-
white-space: nowrap;
|
|
7
|
-
overflow: hidden;
|
|
8
|
-
text-overflow: ellipsis;
|
|
9
|
-
color: var(--imlib_chat_components_iMDateTime_color);
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMDateTime } from './IMDateTime';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
10
|
-
/** ** Constants *** */
|
|
11
|
-
import imImageBubbleDefaultProps from './props/defaultProps';
|
|
12
|
-
import imImageBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import getAttachmentDetails from '@zohoim/chat-components-utils/es/imUtils/getAttachmentDetails';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
|
-
/** ** Styles *** */
|
|
19
|
-
import style from './css/IMImageBubble.module.css';
|
|
20
|
-
|
|
21
|
-
/** ** Components *** */
|
|
22
|
-
import ImageBubble from '../../ImageBubble/ImageBubble';
|
|
23
|
-
export default function IMImageBubble(props) {
|
|
24
|
-
const {
|
|
25
|
-
customStyle,
|
|
26
|
-
attachmentDetails
|
|
27
|
-
} = props;
|
|
28
|
-
|
|
29
|
-
/* External customization */
|
|
30
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
31
|
-
/* CSS classnames added based on logic */
|
|
32
|
-
const {
|
|
33
|
-
imImageBubbleClass
|
|
34
|
-
} = cssJSLogic(props, newStyle);
|
|
35
|
-
const {
|
|
36
|
-
attachmentURL,
|
|
37
|
-
fileName
|
|
38
|
-
} = getAttachmentDetails({
|
|
39
|
-
attachmentDetails
|
|
40
|
-
});
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: imImageBubbleClass
|
|
43
|
-
}, /*#__PURE__*/React.createElement(ImageBubble, {
|
|
44
|
-
alternate: fileName,
|
|
45
|
-
src: attachmentURL
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
IMImageBubble.propTypes = imImageBubblePropTypes;
|
|
49
|
-
IMImageBubble.defaultProps = imImageBubbleDefaultProps;
|
|
50
|
-
IMImageBubble.displayName = 'IMImageBubble';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMImageBubble } from './IMImageBubble';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
const imImageBubblePropTypes = {
|
|
4
|
-
customStyle: PropTypes.object,
|
|
5
|
-
attachmentDetails: PropTypes.shape({
|
|
6
|
-
name: PropTypes.string,
|
|
7
|
-
size: PropTypes.string,
|
|
8
|
-
type: PropTypes.string,
|
|
9
|
-
url: PropTypes.string,
|
|
10
|
-
id: PropTypes.string
|
|
11
|
-
})
|
|
12
|
-
};
|
|
13
|
-
export default imImageBubblePropTypes;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-no-bind */
|
|
2
|
-
/* eslint-disable max-len */
|
|
3
|
-
|
|
4
|
-
/** ** Libraries *** */
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
/** ** Hooks *** */
|
|
8
|
-
import useMergeStyle from '@zohodesk/hooks/es/utils/useMergeStyle';
|
|
9
|
-
|
|
10
|
-
/** ** Constants *** */
|
|
11
|
-
import imLocationBubbleDefaultProps from './props/defaultProps';
|
|
12
|
-
import imLocationBubblePropTypes from './props/propTypes';
|
|
13
|
-
|
|
14
|
-
/** ** Methods *** */
|
|
15
|
-
import getDerivedLocationDetails from '@zohoim/chat-components-utils/es/imUtils/getDerivedLocationDetails';
|
|
16
|
-
import cssJSLogic from './css/cssJSLogic';
|
|
17
|
-
|
|
18
|
-
/** ** Styles *** */
|
|
19
|
-
import style from './css/IMLocationBubble.module.css';
|
|
20
|
-
|
|
21
|
-
/** ** Components *** */
|
|
22
|
-
import LocationBubble from '../../LocationBubble/LocationBubble';
|
|
23
|
-
export default function IMLocationBubble(props) {
|
|
24
|
-
const {
|
|
25
|
-
customStyle,
|
|
26
|
-
locationDetails,
|
|
27
|
-
locationCustomStyle
|
|
28
|
-
} = props;
|
|
29
|
-
|
|
30
|
-
/* External customization */
|
|
31
|
-
const newStyle = useMergeStyle(style, customStyle);
|
|
32
|
-
/* CSS classnames added based on logic */
|
|
33
|
-
const {
|
|
34
|
-
imLocationBubbleClass
|
|
35
|
-
} = cssJSLogic(props, newStyle);
|
|
36
|
-
const {
|
|
37
|
-
locationURL
|
|
38
|
-
} = getDerivedLocationDetails({
|
|
39
|
-
locationDetails
|
|
40
|
-
});
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: imLocationBubbleClass
|
|
43
|
-
}, /*#__PURE__*/React.createElement(LocationBubble, {
|
|
44
|
-
customStyle: locationCustomStyle,
|
|
45
|
-
locationURL: locationURL
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
IMLocationBubble.propTypes = imLocationBubblePropTypes;
|
|
49
|
-
IMLocationBubble.defaultProps = imLocationBubbleDefaultProps;
|
|
50
|
-
IMLocationBubble.displayName = 'IMLocationBubble';
|
|
File without changes
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** ** Methods *** */
|
|
2
|
-
import { compileClassNames } from '@zohodesk/utils';
|
|
3
|
-
export default function cssJSLogic(props, style) {
|
|
4
|
-
const imLocationBubbleClass = compileClassNames({
|
|
5
|
-
[style.imLocationBubble]: true
|
|
6
|
-
});
|
|
7
|
-
return {
|
|
8
|
-
imLocationBubbleClass
|
|
9
|
-
};
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as IMLocationBubble } from './IMLocationBubble';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** ** Constants *** */
|
|
2
|
-
import { dummyObject } from '@zohoim/chat-components-utils/es/constants';
|
|
3
|
-
const imLocationBubbleDefaultProps = {
|
|
4
|
-
customStyle: dummyObject,
|
|
5
|
-
locationCustomStyle: dummyObject,
|
|
6
|
-
locationDetails: dummyObject
|
|
7
|
-
};
|
|
8
|
-
export default imLocationBubbleDefaultProps;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** ** Libraries *** */
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
const imLocationBubblePropTypes = {
|
|
4
|
-
customStyle: PropTypes.object,
|
|
5
|
-
locationCustomStyle: PropTypes.object,
|
|
6
|
-
locationDetails: PropTypes.shape({
|
|
7
|
-
latitude: PropTypes.string,
|
|
8
|
-
longitude: PropTypes.string
|
|
9
|
-
})
|
|
10
|
-
};
|
|
11
|
-
export default imLocationBubblePropTypes;
|