From 86e8ba2a39e27ed9a4094994c659dcae9fd268a0 Mon Sep 17 00:00:00 2001 From: Peter Kottas Date: Wed, 27 Oct 2021 10:19:22 +0200 Subject: [PATCH] Deploy commit --- ...5f94.css => main.d895715f87dc4d42f533.css} | 0 ...c25f94.js => main.d895715f87dc4d42f533.js} | 2 +- docs/index.html | 2 +- lib/index.js | 2 +- lib/index.js.map | 2 +- lib/index.min.js | 2 +- lib/index.min.js.map | 2 +- src/demo/wwwroot/3fb4b1c-index-wps-hmr.js | 136 ++++++++ src/demo/wwwroot/bf1374f-index-wps-hmr.js | 303 ------------------ ...ps-hmr.json => index-3fb4b1c-wps-hmr.json} | 0 src/demo/wwwroot/index.html | 2 +- src/lib/ChatScrollArea/index.tsx | 6 +- 12 files changed, 147 insertions(+), 312 deletions(-) rename docs/dist/{main.87158a800cfbf8c25f94.css => main.d895715f87dc4d42f533.css} (100%) rename docs/dist/{main.87158a800cfbf8c25f94.js => main.d895715f87dc4d42f533.js} (82%) create mode 100644 src/demo/wwwroot/3fb4b1c-index-wps-hmr.js delete mode 100644 src/demo/wwwroot/bf1374f-index-wps-hmr.js rename src/demo/wwwroot/{index-bf1374f-wps-hmr.json => index-3fb4b1c-wps-hmr.json} (100%) diff --git a/docs/dist/main.87158a800cfbf8c25f94.css b/docs/dist/main.d895715f87dc4d42f533.css similarity index 100% rename from docs/dist/main.87158a800cfbf8c25f94.css rename to docs/dist/main.d895715f87dc4d42f533.css diff --git a/docs/dist/main.87158a800cfbf8c25f94.js b/docs/dist/main.d895715f87dc4d42f533.js similarity index 82% rename from docs/dist/main.87158a800cfbf8c25f94.js rename to docs/dist/main.d895715f87dc4d42f533.js index e677e20..557cb28 100644 --- a/docs/dist/main.87158a800cfbf8c25f94.js +++ b/docs/dist/main.d895715f87dc4d42f533.js @@ -1,4 +1,4 @@ -(()=>{var n={710:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ae});var j=n(294),r=n(184),N=n.n(r),A={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},L="react-bell-chat__chat-bubble__wrapper",B="react-bell-chat__chat-bubble__is-send",D="react-bell-chat__chat-bubble",U="react-bell-chat__chat-bubble--user",z="react-bell-chat__chat-bubble--recipient",F="react-bell-chat__chat-bubble__text",W="react-bell-chat__chat-bubble__text--user",H="react-bell-chat__chat-bubble__text--recipient",V="react-bell-chat__chat-bubble__created-on",G="react-bell-chat__chat-bubble__created-on--user",$="react-bell-chat__chat-bubble__created-on--recipient",Q="react-bell-chat__chat-bubble__last-seen-by__container",K={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;nl[0]&&t[1]{var n; +(()=>{var n={710:(e,t,n)=>{"use strict";n.d(t,{Z:()=>Ae});var j=n(294),r=n(184),N=n.n(r),A={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},L="react-bell-chat__chat-bubble__wrapper",B="react-bell-chat__chat-bubble__is-send",D="react-bell-chat__chat-bubble",U="react-bell-chat__chat-bubble--user",z="react-bell-chat__chat-bubble--recipient",F="react-bell-chat__chat-bubble__text",W="react-bell-chat__chat-bubble__text--user",H="react-bell-chat__chat-bubble__text--recipient",V="react-bell-chat__chat-bubble__created-on",G="react-bell-chat__chat-bubble__created-on--user",$="react-bell-chat__chat-bubble__created-on--recipient",Q="react-bell-chat__chat-bubble__last-seen-by__container",K={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},q=function(){return(q=Object.assign||function(e){for(var t,n=1,r=arguments.length;nl[0]&&t[1]{var n; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see diff --git a/docs/index.html b/docs/index.html index 479fd3f..60c9fd7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -GuestBell chat
\ No newline at end of file +GuestBell chat
\ No newline at end of file diff --git a/lib/index.js b/lib/index.js index d47204d..e004df1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,5 +4,5 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t{"use strict";e.exports=t}},s={};function ne(e){var t=s[e];if(void 0!==t)return t.exports;t=s[e]={exports:{}};return r[e](t,t.exports,ne),t.exports}ne.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ne.d(t,{a:t}),t},ne.d=(e,t)=>{for(var r in t)ne.o(t,r)&&!ne.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},ne.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ne.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ae={};return(()=>{"use strict";ne.r(ae),ne.d(ae,{Avatar:()=>s,BubbleGroup:()=>O,ChatBubble:()=>t,ChatFeed:()=>re,ChatMessagesContainer:()=>R,ChatScrollArea:()=>f,DateRow:()=>H,IsTyping:()=>h,LastSeenAvatar:()=>S,LoadingMessages:()=>U,SystemChatBubble:()=>J,defaultAvatarClasses:()=>o,defaultAvatarStyles:()=>a,defaultBubbleGroupClasses:()=>B,defaultBubbleGroupStyles:()=>w,defaultChatBubbleClasses:()=>N,defaultChatBubbleConfig:()=>P,defaultChatBubbleStyles:()=>j,defaultChatFeedClasses:()=>Q,defaultChatFeedStyles:()=>K,defaultChatMessagesContainerClasses:()=>A,defaultChatMessagesContainerStyles:()=>x,defaultChatScrollAreaClasses:()=>b,defaultChatScrollAreaStyles:()=>d,defaultDateRowClasses:()=>M,defaultDateRowStyles:()=>L,defaultIsTypingClasses:()=>n,defaultIsTypingStyles:()=>i,defaultLastSeenAvatarClasses:()=>v,defaultLastSeenAvatarStyles:()=>y,defaultLoadingMessagesClasses:()=>F,defaultLoadingMessagesStyle:()=>W,defaultSystemChatBubbleClasses:()=>z,defaultSystemChatBubbleStyles:()=>V});var G=ne(297),e=ne(184),E=ne.n(e),j={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},N={chatBubbleWrapper:"react-bell-chat__chat-bubble__wrapper",isSend:"react-bell-chat__chat-bubble__is-send",chatBubble:"react-bell-chat__chat-bubble",userChatBubble:"react-bell-chat__chat-bubble--user",recipientChatBubble:"react-bell-chat__chat-bubble--recipient",text:"react-bell-chat__chat-bubble__text",userText:"react-bell-chat__chat-bubble__text--user",recipientText:"react-bell-chat__chat-bubble__text--recipient",createdOn:"react-bell-chat__chat-bubble__created-on",userCreatedOn:"react-bell-chat__chat-bubble__created-on--user",recipientCreatedOn:"react-bell-chat__chat-bubble__created-on--recipient",lastSeenByContainer:"react-bell-chat__chat-bubble__last-seen-by__container"},P={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},k=function(){return(k=Object.assign||function(e){for(var t,r=1,s=arguments.length;ro[0]&&t[1]{"use strict";e.exports=t}},s={};function ne(e){var t=s[e];if(void 0!==t)return t.exports;t=s[e]={exports:{}};return r[e](t,t.exports,ne),t.exports}ne.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ne.d(t,{a:t}),t},ne.d=(e,t)=>{for(var r in t)ne.o(t,r)&&!ne.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},ne.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ne.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ae={};return(()=>{"use strict";ne.r(ae),ne.d(ae,{Avatar:()=>s,BubbleGroup:()=>O,ChatBubble:()=>t,ChatFeed:()=>re,ChatMessagesContainer:()=>R,ChatScrollArea:()=>f,DateRow:()=>H,IsTyping:()=>h,LastSeenAvatar:()=>S,LoadingMessages:()=>U,SystemChatBubble:()=>J,defaultAvatarClasses:()=>o,defaultAvatarStyles:()=>a,defaultBubbleGroupClasses:()=>B,defaultBubbleGroupStyles:()=>w,defaultChatBubbleClasses:()=>N,defaultChatBubbleConfig:()=>P,defaultChatBubbleStyles:()=>j,defaultChatFeedClasses:()=>Q,defaultChatFeedStyles:()=>K,defaultChatMessagesContainerClasses:()=>A,defaultChatMessagesContainerStyles:()=>x,defaultChatScrollAreaClasses:()=>b,defaultChatScrollAreaStyles:()=>d,defaultDateRowClasses:()=>M,defaultDateRowStyles:()=>L,defaultIsTypingClasses:()=>n,defaultIsTypingStyles:()=>i,defaultLastSeenAvatarClasses:()=>v,defaultLastSeenAvatarStyles:()=>y,defaultLoadingMessagesClasses:()=>F,defaultLoadingMessagesStyle:()=>W,defaultSystemChatBubbleClasses:()=>z,defaultSystemChatBubbleStyles:()=>V});var G=ne(297),e=ne(184),E=ne.n(e),j={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},N={chatBubbleWrapper:"react-bell-chat__chat-bubble__wrapper",isSend:"react-bell-chat__chat-bubble__is-send",chatBubble:"react-bell-chat__chat-bubble",userChatBubble:"react-bell-chat__chat-bubble--user",recipientChatBubble:"react-bell-chat__chat-bubble--recipient",text:"react-bell-chat__chat-bubble__text",userText:"react-bell-chat__chat-bubble__text--user",recipientText:"react-bell-chat__chat-bubble__text--recipient",createdOn:"react-bell-chat__chat-bubble__created-on",userCreatedOn:"react-bell-chat__chat-bubble__created-on--user",recipientCreatedOn:"react-bell-chat__chat-bubble__created-on--recipient",lastSeenByContainer:"react-bell-chat__chat-bubble__last-seen-by__container"},P={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},k=function(){return(k=Object.assign||function(e){for(var t,r=1,s=arguments.length;ro[0]&&t[1] {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as React from 'react';\n\nexport interface ChatBubbleStyles {\n chatBubbleWrapper?: React.CSSProperties;\n chatBubble?: React.CSSProperties;\n systemChatBubbleContainer?: React.CSSProperties;\n systemChatBubbleText?: React.CSSProperties;\n userChatBubbleOrientationNormal?: React.CSSProperties;\n recipientChatBubbleOrientationNormal?: React.CSSProperties;\n text?: React.CSSProperties;\n userText?: React.CSSProperties;\n recipientText?: React.CSSProperties;\n userChatBubble?: React.CSSProperties;\n recipientChatBubble?: React.CSSProperties;\n firstChatBubbleInGroup?: React.CSSProperties;\n userFirstChatBubbleInGroup?: React.CSSProperties;\n recipientFirstChatBubbleInGroup?: React.CSSProperties;\n lastChatBubbleInGroup?: React.CSSProperties;\n userLastChatBubbleInGroup?: React.CSSProperties;\n recipientLastChatBubbleInGroup?: React.CSSProperties;\n centerChatBubbleInGroup?: React.CSSProperties;\n userCenterChatBubbleInGroup?: React.CSSProperties;\n recipientCenterChatBubbleInGroup?: React.CSSProperties;\n createdOn?: React.CSSProperties;\n recipientCreatedOn?: React.CSSProperties;\n userCreatedOn?: React.CSSProperties;\n isSend?: React.CSSProperties;\n\n lastSeenByContainer?: React.CSSProperties;\n loadingSpinnerColor?: string;\n isSendIconColor?: string;\n}\n\nconst styles: ChatBubbleStyles = {\n chatBubbleWrapper: {\n position: 'relative',\n marginBottom: 2,\n display: 'flex',\n } as React.CSSProperties,\n chatBubble: {\n position: 'relative',\n borderTopRightRadius: 7,\n borderTopLeftRadius: 7,\n borderBottomRightRadius: 7,\n borderBottomLeftRadius: 7,\n marginRight: 'auto',\n marginLeft: 'auto',\n maxWidth: '80%',\n paddingTop: 8,\n paddingBottom: 14,\n paddingLeft: 14,\n paddingRight: 14,\n } as React.CSSProperties,\n userChatBubbleOrientationNormal: {\n marginRight: 0,\n } as React.CSSProperties,\n recipientChatBubbleOrientationNormal: {\n marginLeft: 0,\n } as React.CSSProperties,\n recipientChatBubble: {} as React.CSSProperties,\n text: {\n fontSize: 16,\n fontWeight: 300,\n margin: 0,\n marginRight: 30,\n overflowWrap: 'break-word',\n wordWrap: 'break-word',\n hyphens: 'auto',\n } as React.CSSProperties,\n userFirstChatBubbleInGroup: {\n borderTopRightRadius: 0,\n } as React.CSSProperties,\n recipientFirstChatBubbleInGroup: {\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n userLastChatBubbleInGroup: {\n borderTopRightRadius: 0,\n } as React.CSSProperties,\n recipientLastChatBubbleInGroup: {\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n userCenterChatBubbleInGroup: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n } as React.CSSProperties,\n recipientCenterChatBubbleInGroup: {\n borderBottomLeftRadius: 0,\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n createdOn: {\n position: 'absolute',\n right: 14,\n bottom: 2,\n fontSize: 9,\n opacity: 0.5,\n } as React.CSSProperties,\n isSend: {\n position: 'absolute',\n right: 2,\n bottom: 1,\n fontSize: 9,\n opacity: 0.5,\n } as React.CSSProperties,\n lastSeenByContainer: {\n position: 'absolute',\n right: -30,\n top: 0,\n width: 20,\n height: '100%',\n } as React.CSSProperties,\n loadingSpinnerColor: 'currentColor',\n isSendIconColor: 'currentColor',\n};\n\nexport { styles as defaultChatBubbleStyles };\n","export interface ChatBubbleClasses {\r\n chatBubbleWrapper?: string;\r\n chatBubble?: string;\r\n systemChatBubbleContainer?: string;\r\n systemChatBubbleText?: string;\r\n userChatBubbleOrientationNormal?: string;\r\n recipientChatBubbleOrientationNormal?: string;\r\n text?: string;\r\n userText?: string;\r\n recipientText?: string;\r\n userChatBubble?: string;\r\n recipientChatBubble?: string;\r\n firstChatBubbleInGroup?: string;\r\n userFirstChatBubbleInGroup?: string;\r\n recipientFirstChatBubbleInGroup?: string;\r\n lastChatBubbleInGroup?: string;\r\n userLastChatBubbleInGroup?: string;\r\n recipientLastChatBubbleInGroup?: string;\r\n centerChatBubbleInGroup?: string;\r\n userCenterChatBubbleInGroup?: string;\r\n recipientCenterChatBubbleInGroup?: string;\r\n createdOn?: string;\r\n recipientCreatedOn?: string;\r\n userCreatedOn?: string;\r\n isSend?: string;\r\n\r\n lastSeenByContainer?: string;\r\n}\r\n\r\nconst classes: ChatBubbleClasses = {\r\n chatBubbleWrapper: 'react-bell-chat__chat-bubble__wrapper',\r\n\r\n isSend: 'react-bell-chat__chat-bubble__is-send',\r\n\r\n chatBubble: 'react-bell-chat__chat-bubble',\r\n userChatBubble: 'react-bell-chat__chat-bubble--user',\r\n recipientChatBubble: 'react-bell-chat__chat-bubble--recipient',\r\n\r\n text: 'react-bell-chat__chat-bubble__text',\r\n userText: 'react-bell-chat__chat-bubble__text--user',\r\n recipientText: 'react-bell-chat__chat-bubble__text--recipient',\r\n\r\n createdOn: 'react-bell-chat__chat-bubble__created-on',\r\n userCreatedOn: 'react-bell-chat__chat-bubble__created-on--user',\r\n recipientCreatedOn: 'react-bell-chat__chat-bubble__created-on--recipient',\r\n\r\n lastSeenByContainer: 'react-bell-chat__chat-bubble__last-seen-by__container',\r\n};\r\n\r\nexport { classes as defaultChatBubbleClasses };\r\n","export interface ChatBubbleConfig {\r\n formatTime?: (date: Date) => string;\r\n}\r\n\r\nconst config: ChatBubbleConfig = {\r\n formatTime: (date) =>\r\n date?.toLocaleTimeString([], {\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n hour12: true,\r\n }),\r\n};\r\n\r\nexport { config as defaultChatBubbleConfig };\r\n","import * as React from 'react';\nimport { Message } from '../Message';\nimport { Author } from '../Author';\nimport {\n LastSeenAvatarProps,\n LastSeenAvatarStyles,\n LastSeenAvatarClasses,\n} from './../LastSeenAvatar';\nimport classnames from 'classnames';\nimport { ChatBubbleStyles, defaultChatBubbleStyles } from './styles';\nimport { ChatBubbleClasses, defaultChatBubbleClasses } from './classes';\nimport { ComponentType } from '../utils/componentType';\nimport { ChatBubbleConfig, defaultChatBubbleConfig } from './config';\n\nexport * from './styles';\nexport * from './classes';\nexport * from './config';\n\nexport interface MessageRenderProps<\n TMessageData = string,\n TMessage extends Message = Message\n> {\n message: TMessage;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport interface ChatBubbleProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> {\n message: TMessage;\n author?: TAuthor;\n\n config?: ChatBubbleConfig;\n\n styles?: ChatBubbleStyles;\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\n\n classes?: ChatBubbleClasses;\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\n\n bubblesCentered?: boolean;\n yourAuthorId: number;\n isFirstInGroup?: boolean;\n isLastInGroup?: boolean;\n isCenterInGroup?: boolean;\n lastSeenByAuthors?: TAuthor[];\n showRecipientLastSeenMessage?: boolean;\n CustomLastSeenAvatar?: ComponentType>;\n CustomMessageRender?: ComponentType>;\n}\n\nexport function ChatBubble<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n>(props: ChatBubbleProps) {\n if (!props.message) {\n return null;\n }\n\n const {\n lastSeenAvatarStyles,\n yourAuthorId,\n lastSeenAvatarClasses,\n styles,\n classes,\n config,\n } = props;\n\n const finalConfig = {\n ...defaultChatBubbleConfig,\n ...config,\n };\n\n const {\n userChatBubble,\n chatBubble,\n text,\n userText,\n recipientText,\n recipientChatBubble,\n firstChatBubbleInGroup,\n userFirstChatBubbleInGroup,\n recipientFirstChatBubbleInGroup,\n centerChatBubbleInGroup,\n userCenterChatBubbleInGroup,\n recipientCenterChatBubbleInGroup,\n lastChatBubbleInGroup,\n userLastChatBubbleInGroup,\n recipientLastChatBubbleInGroup,\n userChatBubbleOrientationNormal,\n recipientChatBubbleOrientationNormal,\n chatBubbleWrapper,\n createdOn,\n userCreatedOn,\n recipientCreatedOn,\n isSendIconColor,\n isSend,\n loadingSpinnerColor,\n lastSeenByContainer,\n } = styles ?? {};\n const youAreAuthor = props.message.authorId === yourAuthorId;\n\n // message.id 0 is reserved for blue\n const finalChatBubbleStyles: React.CSSProperties = {\n ...defaultChatBubbleStyles.chatBubble,\n ...chatBubble,\n ...(youAreAuthor\n ? defaultChatBubbleStyles.userChatBubble\n : defaultChatBubbleStyles.recipientChatBubble),\n ...(youAreAuthor ? userChatBubble : recipientChatBubble),\n ...(youAreAuthor\n ? defaultChatBubbleStyles.userChatBubbleOrientationNormal\n : defaultChatBubbleStyles.recipientChatBubbleOrientationNormal),\n ...(youAreAuthor\n ? userChatBubbleOrientationNormal\n : recipientChatBubbleOrientationNormal),\n ...(props.isFirstInGroup && defaultChatBubbleStyles.firstChatBubbleInGroup),\n ...(props.isFirstInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userFirstChatBubbleInGroup\n : defaultChatBubbleStyles.recipientFirstChatBubbleInGroup)),\n ...(props.isCenterInGroup &&\n defaultChatBubbleStyles.centerChatBubbleInGroup),\n ...(props.isCenterInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userCenterChatBubbleInGroup\n : defaultChatBubbleStyles.recipientCenterChatBubbleInGroup)),\n ...(props.isLastInGroup && defaultChatBubbleStyles.lastChatBubbleInGroup),\n ...(props.isLastInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userLastChatBubbleInGroup\n : defaultChatBubbleStyles.recipientLastChatBubbleInGroup)),\n ...(props.isFirstInGroup && firstChatBubbleInGroup),\n ...(props.isFirstInGroup &&\n (youAreAuthor\n ? userFirstChatBubbleInGroup\n : recipientFirstChatBubbleInGroup)),\n ...(props.isCenterInGroup && centerChatBubbleInGroup),\n ...(props.isCenterInGroup &&\n (youAreAuthor\n ? userCenterChatBubbleInGroup\n : recipientCenterChatBubbleInGroup)),\n ...(props.isLastInGroup && lastChatBubbleInGroup),\n ...(props.isLastInGroup &&\n (youAreAuthor\n ? userLastChatBubbleInGroup\n : recipientLastChatBubbleInGroup)),\n };\n\n const messageStyle = {\n ...defaultChatBubbleStyles.text,\n ...text,\n ...(youAreAuthor ? userText : recipientText),\n };\n const messageClassName = classnames(\n defaultChatBubbleClasses.text,\n classes?.text,\n youAreAuthor\n ? defaultChatBubbleClasses.userText\n : defaultChatBubbleClasses.recipientText,\n youAreAuthor ? classes?.userText : classes?.recipientText\n );\n\n const [\n isMouseOverLastSeenContainer,\n setIsMouseOverLastSeenContainer,\n ] = React.useState(false);\n\n const onMouseEnterLastSeenContainer = React.useCallback(\n () => setIsMouseOverLastSeenContainer(true),\n []\n );\n const onMouseLeaveLastSeenContainer = React.useCallback(\n () => setIsMouseOverLastSeenContainer(false),\n []\n );\n\n return (\n \n \n {props.CustomMessageRender ? (\n \n ) : (\n \n {props.message.message}\n \n )}\n {props.message.createdOn && (\n \n {finalConfig.formatTime(props.message.createdOn)}\n \n )}\n {props.message.isSend !== undefined && youAreAuthor && (\n \n {props.message.isSend ? (\n \n \n \n ) : (\n \n \n \n \n \n )}\n \n )}\n \n {props.showRecipientLastSeenMessage &&\n props.lastSeenByAuthors &&\n props.lastSeenByAuthors.length > 0 &&\n props.CustomLastSeenAvatar && (\n a.name)\n .join(', ')\n .replace(/,(?!.*,)/gim, ' and')\n }*/\n >\n {props.lastSeenByAuthors.map((a, i) => (\n \n ))}\n \n )}\n \n );\n}\n","export interface AvatarStyles {\r\n container?: React.CSSProperties;\r\n text?: React.CSSProperties;\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n position: 'absolute',\r\n left: -50,\r\n top: 0,\r\n width: 40,\r\n height: 40,\r\n lineHeight: '40px',\r\n fontWeight: 400,\r\n borderTopLeftRadius: 20,\r\n borderBottomLeftRadius: 20,\r\n borderBottomRightRadius: 20,\r\n textAlign: 'center',\r\n borderTopRightRadius: 5,\r\n } as React.CSSProperties,\r\n text: {\r\n pointerEvents: 'none',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultAvatarStyles };\r\n","export interface AvatarClasses {\r\n container?: string;\r\n text?: string;\r\n}\r\n\r\nconst classes: AvatarClasses = {\r\n container: 'react-bell-chat__avatar',\r\n text: 'react-bell-chat__avatar__text',\r\n};\r\n\r\nexport { classes as defaultAvatarClasses };\r\n","import * as React from 'react';\r\n\r\nexport const typedMemo: (c: T) => T = React.memo;\r\n","import * as React from 'react';\r\nimport { Author } from '../Author';\r\nimport classnames from 'classnames';\r\nimport { AvatarStyles, defaultAvatarStyles } from './styles';\r\nimport { AvatarClasses, defaultAvatarClasses } from './classes';\r\nimport { typedMemo } from '../utils/typedMemo';\r\n\r\nexport * from './classes';\r\nexport * from './styles';\r\n\r\nexport interface AvatarProps<\r\n TMessage = string,\r\n TAuthor extends Author = Author\r\n> {\r\n author: TAuthor;\r\n styles?: AvatarStyles;\r\n classes?: AvatarClasses;\r\n}\r\n\r\nfunction Avatar<\r\n TMessage = string,\r\n TAuthor extends Author = Author\r\n>(props: AvatarProps) {\r\n const { author, classes, styles } = props;\r\n const style = {\r\n ...defaultAvatarStyles.container,\r\n ...styles?.container,\r\n ...(author?.bgImageUrl\r\n ? ({\r\n backgroundImage: `url(${author?.bgImageUrl})`,\r\n backgroundSize: 'cover',\r\n } as React.CSSProperties)\r\n : {}),\r\n };\r\n return (\r\n author && (\r\n \r\n \r\n {author.bgImageUrl\r\n ? null\r\n : author.avatarName\r\n ? author.avatarName\r\n : author.name\r\n .split(' ')\r\n .map(part => part[0])\r\n .join('')\r\n .toUpperCase()\r\n .substr(0, 3)}\r\n \r\n \r\n )\r\n );\r\n}\r\nconst Memoized = typedMemo(Avatar);\r\nexport { Memoized as Avatar };\r\n","export interface IsTypingClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: IsTypingClasses = {\r\n container: 'react-bell-chat__is-typing__container',\r\n};\r\n\r\nexport { classes as defaultIsTypingClasses };\r\n","export interface IsTypingStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: IsTypingStyles = {\r\n container: {\r\n position: 'absolute',\r\n bottom: 2,\r\n left: 0,\r\n right: 0,\r\n color: 'rgb(204, 204, 204)',\r\n textAlign: 'center',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultIsTypingStyles };\r\n","import * as React from 'react';\nimport { Author } from '../Author';\nimport classnames from 'classnames';\nimport { IsTypingClasses, defaultIsTypingClasses } from './classes';\nimport { IsTypingStyles, defaultIsTypingStyles } from './styles';\nimport { typedMemo } from '../utils/typedMemo';\nexport * from './classes';\nexport * from './styles';\n\nexport interface IsTypingProps<\n TMessage = string,\n TAuthor extends Author = Author\n> {\n typingAuthors: TAuthor[];\n styles?: IsTypingStyles;\n classes?: IsTypingClasses;\n}\n\nfunction IsTyping<\n TMessage = string,\n TAuthor extends Author = Author\n>(props: IsTypingProps) {\n const { styles, classes } = props;\n\n const style = React.useMemo(\n () => ({ ...defaultIsTypingStyles.container, ...styles?.container }),\n [styles?.container]\n );\n\n return (\n props.typingAuthors &&\n props.typingAuthors.length > 0 && (\n \n {props.typingAuthors\n .map(a => a.name)\n .join(', ')\n .replace(/,(?!.*,)/gim, ' and') +\n (props.typingAuthors.length === 1 ? ' is ' : ' are ') +\n 'typing'}\n \n )\n );\n}\n\nconst Memoized = typedMemo(IsTyping);\n\nexport { Memoized as IsTyping };\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { ChatScrollAreaStyles, defaultChatScrollAreaStyles } from './styles';\nimport { ChatScrollAreaClasses, defaultChatScrollAreaClasses } from './classes';\nexport * from './classes';\nexport * from './styles';\n\nexport interface ChatScrollAreaProps {\n maxHeight?: string | number;\n minHeight?: string | number;\n children?: JSX.Element | JSX.Element[];\n styles?: ChatScrollAreaStyles;\n apiRef?: (api: ChatScrollAreaApi) => void;\n loadOldMessagesThreshold: number;\n onLoadOldMessages: () => Promise;\n\n classes?: ChatScrollAreaClasses;\n}\n\nexport interface ChatScrollAreaApi {\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n scrollTo: (top: number) => void;\n scrollTop: () => number;\n scrollHeight: () => number;\n clientHeight: () => number;\n scrolledToBottom: () => boolean;\n scrolledToLoadThreshold: () => boolean; // Check if we are scrolled to threshold where we need to load messages\n}\n\nexport class ChatScrollArea extends React.PureComponent {\n scrollContainer: HTMLDivElement;\n constructor(props: ChatScrollAreaProps) {\n super(props);\n this.containerRef = this.containerRef.bind(this);\n this.onScroll = this.onScroll.bind(this);\n }\n\n public render() {\n const { styles, classes } = this.props;\n return (\n \n {this.props.children}\n \n );\n }\n\n private onScroll() {\n if (\n this.scrollContainer &&\n this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold\n ) {\n this.props.onLoadOldMessages();\n }\n }\n\n private containerRef(scrollContainer: HTMLDivElement) {\n this.scrollContainer = scrollContainer;\n this.props.apiRef &&\n this.props.apiRef({\n scrollToBottom: (behavior = 'auto') =>\n scrollContainer &&\n (scrollContainer.scrollTo\n ? scrollContainer.scrollTo({\n top: scrollContainer.scrollHeight,\n behavior,\n })\n : (scrollContainer.scrollTop = scrollContainer.scrollHeight)),\n scrollTo: top =>\n scrollContainer &&\n (scrollContainer.scrollTo\n ? scrollContainer.scrollTo({\n top: top,\n })\n : (scrollContainer.scrollTop = top)),\n scrolledToBottom: () =>\n this.scrollContainer.clientHeight + this.scrollContainer.scrollTop ===\n this.scrollContainer.scrollHeight,\n scrolledToLoadThreshold: () =>\n this.scrollContainer &&\n this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold,\n scrollTop: () => this.scrollContainer && this.scrollContainer.scrollTop,\n scrollHeight: () =>\n this.scrollContainer && this.scrollContainer.scrollHeight,\n clientHeight: () =>\n this.scrollContainer && this.scrollContainer.clientHeight,\n });\n }\n}\n","export interface ChatScrollAreaStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: ChatScrollAreaStyles = {\r\n container: {\r\n overflow: 'auto',\r\n padding: '0 10px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n // flexDirection: 'column-reverse'\r\n },\r\n};\r\n\r\nexport { styles as defaultChatScrollAreaStyles };\r\n","export interface ChatScrollAreaClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: ChatScrollAreaClasses = {\r\n container: 'react-bell-chat__chat-scroll-area',\r\n};\r\n\r\nexport { classes as defaultChatScrollAreaClasses };\r\n","export interface LastSeenAvatarClasses {\r\n container?: string;\r\n text?: string;\r\n}\r\n\r\nconst classes: LastSeenAvatarClasses = {\r\n container: 'react-bell-chat__last-seen-avatar',\r\n text: 'react-bell-chat__last-seen-avatar__text',\r\n};\r\n\r\nexport { classes as defaultLastSeenAvatarClasses };\r\n","export interface LastSeenAvatarStyles {\r\n container?: React.CSSProperties;\r\n containerMouseOver?: React.CSSProperties;\r\n text?: React.CSSProperties;\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n width: 24,\r\n height: 24,\r\n lineHeight: '24px',\r\n fontWeight: 400,\r\n fontSize: 10,\r\n borderTopLeftRadius: 12,\r\n borderTopRightRadius: 12,\r\n borderBottomLeftRadius: 12,\r\n borderBottomRightRadius: 12,\r\n textAlign: 'center',\r\n transition: '0.3s all ease-in-out',\r\n display: 'block',\r\n position: 'relative',\r\n } as React.CSSProperties,\r\n text: {\r\n pointerEvents: 'none',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultLastSeenAvatarStyles };\r\n","import * as React from 'react';\nimport { Author } from '../Author';\nimport classnames from 'classnames';\nimport { LastSeenAvatarClasses, defaultLastSeenAvatarClasses } from './classes';\nimport { LastSeenAvatarStyles, defaultLastSeenAvatarStyles } from './styles';\nimport { typedMemo } from '../utils/typedMemo';\nexport * from './classes';\nexport * from './styles';\n\nexport interface LastSeenAvatarProps<\n TMessageData = string,\n TAuthor extends Author = Author\n> {\n author: TAuthor;\n index?: number;\n mouseOver?: boolean;\n styles?: LastSeenAvatarStyles;\n classes?: LastSeenAvatarClasses;\n}\n\nfunction LastSeenAvatar<\n TMessageData = string,\n TAuthor extends Author = Author\n>(props: LastSeenAvatarProps) {\n const { styles, classes, index, mouseOver, author } = props;\n\n const style = React.useMemo(\n () => ({\n ...defaultLastSeenAvatarStyles.container,\n ...styles?.container,\n ...(author?.bgImageUrl\n ? ({\n backgroundImage: `url(${author?.bgImageUrl})`,\n backgroundSize: 'cover',\n } as React.CSSProperties)\n : {}),\n ...(index > 0 && !mouseOver ? { marginTop: -12 } : { marginTop: -4 }),\n }),\n [styles?.container, index, mouseOver, author?.bgImageUrl]\n );\n\n const textStyle = React.useMemo(\n () => ({\n ...defaultLastSeenAvatarStyles.text,\n ...styles?.text,\n }),\n [styles?.text]\n );\n\n return (\n author && (\n \n \n {author.bgImageUrl\n ? null\n : author.lastSeenAvatarName\n ? author.lastSeenAvatarName\n : author.name[0].toUpperCase()}\n \n \n )\n );\n}\n\nconst Memoized = typedMemo(LastSeenAvatar);\n\nexport { Memoized as LastSeenAvatar };\n","export interface BubbleGroupClasses {\r\n chatBubbleWrapper?: string;\r\n}\r\n\r\nconst classes: BubbleGroupClasses = {\r\n chatBubbleWrapper: 'react-bell-chat__bubble-group',\r\n};\r\n\r\nexport { classes as defaultBubbleGroupClasses };\r\n","import * as React from 'react';\n\nexport interface BubbleGroupStyles {\n bubbleGroupWrapper?: React.CSSProperties;\n}\n\nconst styles: BubbleGroupStyles = {\n bubbleGroupWrapper: {\n marginTop: 10,\n marginBottom: 10,\n position: 'relative',\n },\n};\n\nexport { styles as defaultBubbleGroupStyles };\n","import * as React from 'react';\r\nimport {\r\n ChatBubbleProps,\r\n ChatBubbleStyles,\r\n MessageRenderProps,\r\n} from '../ChatBubble';\r\nimport { Message } from '../';\r\nimport { Author } from '../Author';\r\nimport { AvatarProps, AvatarClasses } from '../Avatar';\r\nimport {\r\n LastSeenAvatarProps,\r\n LastSeenAvatarStyles,\r\n LastSeenAvatarClasses,\r\n} from '../LastSeenAvatar';\r\nimport { AvatarStyles } from './../Avatar';\r\nimport classnames from 'classnames';\r\nimport { ChatBubbleClasses } from './../ChatBubble';\r\nimport { BubbleGroupClasses, defaultBubbleGroupClasses } from './classes';\r\nimport { BubbleGroupStyles, defaultBubbleGroupStyles } from './styles';\r\nimport { ComponentType } from '../utils/componentType';\r\nimport { typedMemo } from '../utils/typedMemo';\r\n\r\nexport * from './styles';\r\nexport * from './classes';\r\n\r\nexport interface BubbleGroupProps<\r\n TMessageData = string,\r\n TMessage extends Message = Message,\r\n TAuthor extends Author = Author\r\n> {\r\n yourAuthorId?: number;\r\n messages: TMessage[];\r\n author: TAuthor;\r\n authors?: TAuthor[];\r\n showRecipientAvatar?: boolean;\r\n bubblesCentered?: boolean;\r\n\r\n classes?: BubbleGroupClasses;\r\n chatBubbleClasses?: ChatBubbleClasses;\r\n avatarClasses?: AvatarClasses;\r\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\r\n\r\n styles?: BubbleGroupStyles;\r\n chatBubbleStyles?: ChatBubbleStyles;\r\n avatarStyles?: AvatarStyles;\r\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\r\n\r\n CustomAvatar?: ComponentType>;\r\n CustomMessageRender?: ComponentType<\r\n MessageRenderProps\r\n >;\r\n CustomLastSeenAvatar?: ComponentType<\r\n LastSeenAvatarProps\r\n >;\r\n CustomChatBubble?: ComponentType<\r\n ChatBubbleProps\r\n >;\r\n CustomSystemChatBubble?: ComponentType<\r\n ChatBubbleProps\r\n >;\r\n\r\n showRecipientLastSeenMessage?: boolean;\r\n}\r\n\r\nfunction BubbleGroup<\r\n TMessageData = string,\r\n TMessage extends Message = Message,\r\n TAuthor extends Author = Author\r\n>(props: BubbleGroupProps) {\r\n const {\r\n messages,\r\n author,\r\n\r\n CustomAvatar,\r\n\r\n styles,\r\n\r\n bubblesCentered,\r\n\r\n chatBubbleStyles,\r\n lastSeenAvatarStyles,\r\n avatarStyles,\r\n\r\n classes,\r\n chatBubbleClasses,\r\n lastSeenAvatarClasses,\r\n avatarClasses,\r\n\r\n showRecipientAvatar,\r\n CustomChatBubble,\r\n CustomSystemChatBubble,\r\n showRecipientLastSeenMessage,\r\n CustomLastSeenAvatar,\r\n CustomMessageRender,\r\n } = props;\r\n\r\n const messageNodes = messages.map((message, i) => {\r\n const _props: ChatBubbleProps = {\r\n yourAuthorId: props.yourAuthorId,\r\n author,\r\n message,\r\n bubblesCentered,\r\n\r\n styles: chatBubbleStyles,\r\n lastSeenAvatarStyles,\r\n\r\n classes: chatBubbleClasses,\r\n lastSeenAvatarClasses,\r\n\r\n isFirstInGroup: i === 0,\r\n isLastInGroup: i === messages.length - 1 && messages.length > 1,\r\n isCenterInGroup: i < messages.length - 1 && messages.length > 1,\r\n lastSeenByAuthors:\r\n props.authors &&\r\n props.authors.filter(\r\n a =>\r\n a.lastSeenMessageId !== undefined &&\r\n a.lastSeenMessageId === message.id\r\n ),\r\n showRecipientLastSeenMessage,\r\n CustomLastSeenAvatar,\r\n CustomMessageRender,\r\n };\r\n return message.authorId !== undefined ? (\r\n \r\n ) : (\r\n \r\n );\r\n });\r\n\r\n const youAreAuthor = author && props.yourAuthorId === author.id;\r\n return (\r\n \r\n {!youAreAuthor && showRecipientAvatar && author && CustomAvatar && (\r\n \r\n )}\r\n {messageNodes}\r\n \r\n );\r\n}\r\n\r\nconst Memoized = typedMemo(BubbleGroup);\r\nexport { Memoized as BubbleGroup };\r\n","export interface ChatMessagesContainerClasses {\r\n root?: string;\r\n showRecipientAvatar?: string;\r\n showRecipientLastSeenMessage?: string;\r\n showIsTyping?: string;\r\n}\r\n\r\nconst classes: ChatMessagesContainerClasses = {\r\n root: 'react-bell-chat__chat-messages',\r\n showRecipientAvatar: 'react-bell-chat__chat-messages--showRecipientAvatar',\r\n showRecipientLastSeenMessage:\r\n 'react-bell-chat__chat-messages--showRecipientLastSeenMessage',\r\n showIsTyping: 'react-bell-chat__chat-messages--showIsTyping',\r\n};\r\n\r\nexport { classes as defaultChatMessagesContainerClasses };\r\n","export interface ChatMessagesContainerStyles {\r\n root?: React.CSSProperties;\r\n showRecipientAvatar?: React.CSSProperties;\r\n showRecipientLastSeenMessage?: React.CSSProperties;\r\n showIsTyping?: React.CSSProperties;\r\n}\r\n\r\nconst styles: ChatMessagesContainerStyles = {\r\n root: {\r\n paddingBottom: 10,\r\n paddingTop: 10,\r\n flex: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'flex-end',\r\n },\r\n showRecipientAvatar: {\r\n paddingLeft: 50,\r\n },\r\n showIsTyping: {\r\n paddingBottom: 24,\r\n position: 'relative',\r\n },\r\n showRecipientLastSeenMessage: {\r\n paddingRight: 30,\r\n },\r\n};\r\n\r\nexport { styles as defaultChatMessagesContainerStyles };\r\n","import * as React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n ChatMessagesContainerClasses,\r\n defaultChatMessagesContainerClasses,\r\n} from './classes';\r\nimport {\r\n ChatMessagesContainerStyles,\r\n defaultChatMessagesContainerStyles,\r\n} from './styles';\r\nexport * from './classes';\r\nexport * from './styles';\r\n\r\nexport interface ChatMessagesContainerProps\r\n extends React.PropsWithChildren<{\r\n showRecipientLastSeenMessage: boolean;\r\n showRecipientAvatar: boolean;\r\n showIsTyping: boolean;\r\n classes?: ChatMessagesContainerClasses;\r\n styles?: ChatMessagesContainerStyles;\r\n }> {}\r\n\r\nexport const ChatMessagesContainer: React.FC = props => {\r\n const {\r\n children,\r\n classes,\r\n styles,\r\n showIsTyping,\r\n showRecipientAvatar,\r\n showRecipientLastSeenMessage,\r\n } = props;\r\n const style = React.useMemo(\r\n () => ({\r\n ...defaultChatMessagesContainerStyles?.root,\r\n ...styles?.root,\r\n ...(showRecipientAvatar &&\r\n defaultChatMessagesContainerStyles?.showRecipientAvatar),\r\n ...(showRecipientAvatar && styles?.showRecipientAvatar),\r\n ...(showIsTyping && defaultChatMessagesContainerStyles?.showIsTyping),\r\n ...(showIsTyping && styles?.showIsTyping),\r\n ...(showRecipientLastSeenMessage &&\r\n defaultChatMessagesContainerStyles?.showRecipientLastSeenMessage),\r\n ...(showRecipientLastSeenMessage && styles?.showRecipientLastSeenMessage),\r\n }),\r\n [\r\n showIsTyping,\r\n showRecipientAvatar,\r\n showRecipientLastSeenMessage,\r\n styles?.root,\r\n styles?.showRecipientAvatar,\r\n styles?.showIsTyping,\r\n styles?.showRecipientLastSeenMessage,\r\n ]\r\n );\r\n const className = classNames(\r\n defaultChatMessagesContainerClasses.root,\r\n classes?.root,\r\n {\r\n [defaultChatMessagesContainerClasses?.showRecipientAvatar]: showRecipientAvatar,\r\n [classes?.showRecipientAvatar]: showRecipientAvatar,\r\n [defaultChatMessagesContainerClasses?.showIsTyping]: showIsTyping,\r\n [classes?.showIsTyping]: showIsTyping,\r\n [defaultChatMessagesContainerClasses?.showRecipientLastSeenMessage]: showRecipientLastSeenMessage,\r\n [classes?.showRecipientLastSeenMessage]: showRecipientLastSeenMessage,\r\n }\r\n );\r\n\r\n return (\r\n
\r\n {children}\r\n
\r\n );\r\n};\r\n","export interface DateRowClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: DateRowClasses = {\r\n container: 'react-bell-chat__date-row',\r\n};\r\n\r\nexport { classes as defaultDateRowClasses };\r\n","export interface DateRowStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: DateRowStyles = {\r\n container: {\r\n textAlign: 'center',\r\n fontSize: 12,\r\n color: 'rgba(0, 0, 0, 0.55)',\r\n },\r\n};\r\n\r\nexport { styles as defaultDateRowStyles };\r\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { DateRowClasses, defaultDateRowClasses } from './classes';\nimport { DateRowStyles, defaultDateRowStyles } from './styles';\nexport * from './classes';\nexport * from './styles';\n\nexport interface DateRowProps {\n date: Date;\n styles?: DateRowStyles;\n classes?: DateRowClasses;\n}\n\nconst DateRow: React.FC = props => {\n const { styles, classes } = props;\n const style = React.useMemo(\n () => ({\n ...defaultDateRowStyles.container,\n ...styles?.container,\n }),\n [styles?.container]\n );\n return (\n props.date && (\n \n {props.date.toLocaleDateString()}\n \n )\n );\n};\n\nconst Memoized = React.memo(DateRow);\n\nexport { Memoized as DateRow };\n","export interface LoadingMessagesStyle {\r\n container?: React.CSSProperties;\r\n spinnerColor?: string;\r\n}\r\n\r\nconst styles: LoadingMessagesStyle = {\r\n container: {\r\n display: 'flex',\r\n marginBottom: 10,\r\n },\r\n spinnerColor: 'currentColor',\r\n};\r\n\r\nexport { styles as defaultLoadingMessagesStyle };\r\n","export interface LoadingMessagesClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: LoadingMessagesClasses = {\r\n container: 'react-bell-chat__loading-messages',\r\n};\r\n\r\nexport { classes as defaultLoadingMessagesClasses };\r\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { LoadingMessagesStyle, defaultLoadingMessagesStyle } from './styles';\nimport {\n LoadingMessagesClasses,\n defaultLoadingMessagesClasses,\n} from './classes';\nexport * from './classes';\nexport * from './styles';\n\nexport interface LoadingMessagesProps {\n styles?: LoadingMessagesStyle;\n classes?: LoadingMessagesClasses;\n className?: string;\n isVisible: boolean;\n}\n\nconst LoadingMessages: React.FC = props => {\n const { styles, classes } = props;\n\n const style = React.useMemo(\n () => ({\n ...defaultLoadingMessagesStyle.container,\n ...styles?.container,\n }),\n [styles?.container]\n );\n\n const svgStyle = React.useMemo(\n () => ({\n background: 'none',\n margin: 'auto',\n fill: styles?.spinnerColor ?? defaultLoadingMessagesStyle.spinnerColor,\n opacity: props.isVisible ? 1 : 0,\n transition: '0.3s all ease-in-out',\n }),\n [styles?.spinnerColor, props.isVisible]\n );\n return (\n \n \n \n {props.isVisible ? (\n \n ) : null}\n \n \n \n );\n};\n\nconst Memoized = React.memo(LoadingMessages);\n\nexport { Memoized as LoadingMessages };\n","import classNames from 'classnames';\r\nimport {\r\n ChatBubbleClasses,\r\n defaultChatBubbleClasses,\r\n} from '../ChatBubble/classes';\r\n\r\nconst classes: ChatBubbleClasses = {\r\n chatBubbleWrapper: classNames(\r\n defaultChatBubbleClasses.chatBubbleWrapper,\r\n 'react-bell-chat__chat-bubble--system'\r\n ),\r\n createdOn: 'react-bell-chat__chat-bubble--system__created-on',\r\n};\r\n\r\nexport { classes as defaultSystemChatBubbleClasses };\r\n","import { ChatBubbleStyles } from '../ChatBubble/styles';\r\n\r\nconst styles: ChatBubbleStyles = {\r\n systemChatBubbleContainer: {\r\n textAlign: 'center',\r\n fontSize: 12,\r\n color: 'rgba(0, 0, 0, 0.55)',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultSystemChatBubbleStyles };\r\n","import * as React from 'react';\nimport { ChatBubbleProps, defaultChatBubbleConfig } from '../ChatBubble';\nimport classnames from 'classnames';\nimport { defaultSystemChatBubbleClasses } from './classes';\nimport { defaultSystemChatBubbleStyles } from './styles';\nimport { Author } from '../Author';\nimport { Message } from '../Message';\nexport * from './classes';\nexport * from './styles';\n\nexport interface SystemChatBubbleProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> extends ChatBubbleProps {}\n\nfunction SystemChatBubble<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n>(props: SystemChatBubbleProps) {\n const { styles, classes, message, config } = props;\n\n const finalConfig = {\n ...defaultChatBubbleConfig,\n ...config,\n };\n\n const time = finalConfig.formatTime(message.createdOn);\n\n const style = React.useMemo(\n () => ({\n ...defaultSystemChatBubbleStyles.systemChatBubbleContainer,\n ...styles?.systemChatBubbleContainer,\n }),\n [styles?.systemChatBubbleContainer]\n );\n const textStyle = React.useMemo(\n () => ({\n ...defaultSystemChatBubbleStyles.systemChatBubbleText,\n ...styles?.systemChatBubbleText,\n }),\n [styles?.systemChatBubbleText]\n );\n return (\n message && (\n \n {time && (\n \n {time}:{' '}\n \n )}\n {props.message.message}\n \n )\n );\n}\n\nconst Memoized = React.memo(SystemChatBubble);\n\nexport { Memoized as SystemChatBubble };\n","import * as React from 'react';\n\nexport interface ChatFeedStyles {\n chatPanel?: React.CSSProperties;\n showRecipientAvatarChatMessages?: React.CSSProperties;\n showRecipientLastSeenMessageChatMessages?: React.CSSProperties;\n showIsTypingChatMessages?: React.CSSProperties;\n}\n\nconst styles: ChatFeedStyles = {\n chatPanel: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n overflow: 'hidden',\n position: 'relative',\n },\n};\n\nexport { styles as defaultChatFeedStyles };\n","export interface ChatFeedClasses {\r\n chatPanel?: string;\r\n}\r\n\r\nconst classes: ChatFeedClasses = {\r\n chatPanel: 'react-bell-chat__chat-panel',\r\n};\r\n\r\nexport { classes as defaultChatFeedClasses };\r\n","// Copyright 2017 Brandon Mowat\n// Written, developed, and designed by Brandon Mowat for the purpose of helping\n// other developers make chat interfaces.\n\nimport * as React from 'react';\nimport {\n BubbleGroup as DefaultBubbleGroup,\n BubbleGroupClasses,\n BubbleGroupProps,\n BubbleGroupStyles,\n} from '../BubbleGroup';\nimport {\n ChatBubble as DefaultChatBubble,\n ChatBubbleProps,\n MessageRenderProps,\n} from '../ChatBubble';\nimport { Message } from '../Message';\nimport { Author } from '../Author';\nimport { ChatBubbleStyles, ChatBubbleClasses } from '../ChatBubble';\nimport {\n Avatar as DefaultAvatar,\n AvatarProps,\n AvatarStyles,\n AvatarClasses,\n} from '../Avatar';\nimport {\n IsTyping as DefaultIsTyping,\n IsTypingStyles,\n IsTypingClasses,\n IsTypingProps,\n} from '../IsTyping';\nimport {\n ChatScrollArea as DefaultChatScrollArea,\n ChatScrollAreaProps,\n ChatScrollAreaApi,\n ChatScrollAreaStyles,\n ChatScrollAreaClasses,\n} from '../ChatScrollArea';\nimport {\n ChatMessagesContainer as DefaultChatMessagesContainer,\n ChatMessagesContainerProps,\n ChatMessagesContainerClasses,\n ChatMessagesContainerStyles,\n} from '../ChatMessagesContainer';\nimport {\n LastSeenAvatar as DefaultLastSeenAvatar,\n LastSeenAvatarProps,\n LastSeenAvatarStyles,\n LastSeenAvatarClasses,\n} from '../LastSeenAvatar';\nimport { groupBy } from '../utils/utils';\nimport {\n DateRow as DefaultDateRow,\n DateRowProps,\n DateRowStyles,\n DateRowClasses,\n} from '../DateRow';\nimport {\n LoadingMessages as DefaultLoadingMessages,\n LoadingMessagesProps,\n LoadingMessagesStyle,\n LoadingMessagesClasses,\n} from '../LoadingMessages';\nimport { SystemChatBubble as DefaultSystemChatBubble } from '../SystemChatBubble';\nimport classnames from 'classnames';\nimport { ChatFeedStyles, defaultChatFeedStyles } from './styles';\nimport { ChatFeedClasses, defaultChatFeedClasses } from './classes';\nimport { ComponentType } from '../utils/componentType';\n\nexport * from './classes';\nexport * from './styles';\n\n// Model for ChatFeed props.\n\nexport interface ChatFeedProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> {\n // Structural props\n className?: string;\n\n // Functional props\n messages: TMessage[];\n authors: TAuthor[];\n yourAuthorId: number;\n hasOldMessages?: boolean;\n loadOldMessagesThreshold?: number;\n\n // Visual props\n bubblesCentered?: boolean;\n maxHeight?: string | number;\n minHeight?: string | number;\n\n // Switches\n showDateRow?: boolean;\n showRecipientAvatar?: boolean;\n showRecipientLastSeenMessage?: boolean;\n showIsTyping?: boolean;\n showLoadingMessages?: boolean;\n\n // Custom components\n CustomLoadingMessages?: ComponentType;\n CustomChatBubble?: ComponentType<\n ChatBubbleProps\n >;\n CustomBubbleGroup?: ComponentType<\n BubbleGroupProps\n >;\n CustomSystemChatBubble?: ComponentType<\n ChatBubbleProps\n >;\n CustomAvatar?: ComponentType>;\n CustomScrollArea?: ComponentType;\n CustomChatMessagesContainer?: ComponentType;\n CustomIsTyping?: ComponentType>;\n CustomLastSeenAvatar?: ComponentType<\n LastSeenAvatarProps\n >;\n CustomMessageRender?: ComponentType<\n MessageRenderProps\n >;\n CustomDateRow?: ComponentType;\n\n // Callbacks\n onLoadOldMessages?: () => Promise;\n\n // Styles\n style?: React.CSSProperties;\n styles?: ChatFeedStyles;\n bubbleGroupStyles?: BubbleGroupStyles;\n chatBubbleStyles?: ChatBubbleStyles;\n chatScrollAreaStyles?: ChatScrollAreaStyles;\n chatMessagesContainerStyles?: ChatMessagesContainerStyles;\n avatarStyles?: AvatarStyles;\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\n dateRowStyles?: DateRowStyles;\n loadingMessagesStyle?: LoadingMessagesStyle;\n isTypingStyles?: IsTypingStyles;\n chatFeedStyles?: ChatFeedStyles;\n\n // Classes\n classes?: ChatFeedClasses;\n chatBubbleClasses?: ChatBubbleClasses;\n bubbleGroupClasses?: BubbleGroupClasses;\n chatScrollAreaClasses?: ChatScrollAreaClasses;\n chatMessagesContainerClasses?: ChatMessagesContainerClasses;\n avatarClasses?: AvatarClasses;\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\n dateRowClasses?: DateRowClasses;\n loadingMessagesClasses?: LoadingMessagesClasses;\n isTypingClasses?: IsTypingClasses;\n chatFeedClasses?: ChatFeedStyles;\n}\n\nexport interface ChatFeedState {\n isLoadingMessages: boolean;\n}\n\nexport interface ChatFeedApi {\n onMessageSend: () => void;\n scrollApi: ChatScrollAreaApi;\n}\nfunction DefaultMessageRenderFunc(props: MessageRenderProps) {\n return (\n props.message && (\n \n {props.message.message}\n \n )\n );\n}\n\nexport interface ChatFeedSnapshot {\n wasScrolledToBottom: boolean;\n scrollHeight: number;\n clientHeight: number;\n}\n\n// React component to render a complete chat feed\nexport class ChatFeed<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n >\n extends React.PureComponent<\n ChatFeedProps,\n ChatFeedState\n >\n implements ChatFeedApi {\n public static defaultProps: ChatFeedProps = {\n messages: [],\n authors: [],\n CustomChatBubble: DefaultChatBubble,\n CustomBubbleGroup: DefaultBubbleGroup,\n CustomMessageRender: DefaultMessageRenderFunc,\n CustomAvatar: DefaultAvatar,\n CustomScrollArea: DefaultChatScrollArea,\n CustomIsTyping: DefaultIsTyping,\n CustomChatMessagesContainer: DefaultChatMessagesContainer,\n CustomLastSeenAvatar: DefaultLastSeenAvatar,\n CustomDateRow: DefaultDateRow,\n CustomLoadingMessages: DefaultLoadingMessages,\n yourAuthorId: 0,\n loadOldMessagesThreshold: 50,\n CustomSystemChatBubble: DefaultSystemChatBubble,\n };\n\n public scrollApi: ChatScrollAreaApi;\n\n constructor(props: ChatFeedProps) {\n super(props);\n this.renderMessages = this.renderMessages.bind(this);\n this.onLoadOldMessages = this.onLoadOldMessages.bind(this);\n this.apiRef = this.apiRef.bind(this);\n this.state = {\n isLoadingMessages: false,\n };\n }\n\n public onMessageSend() {\n this.scrollApi && this.scrollApi.scrollToBottom();\n }\n\n componentDidMount() {\n this.scrollApi && this.scrollApi.scrollToBottom();\n }\n\n getSnapshotBeforeUpdate(\n prevProps: ChatFeedProps,\n prevState: ChatFeedState\n ) {\n const wasScrolledToBottom =\n this.scrollApi && this.scrollApi.scrolledToBottom();\n const scrollHeight = this.scrollApi && this.scrollApi.scrollHeight();\n const clientHeight = this.scrollApi && this.scrollApi.clientHeight();\n\n return {\n wasScrolledToBottom,\n scrollHeight,\n clientHeight,\n };\n }\n\n componentDidUpdate(\n prevProps: ChatFeedProps,\n prevState: ChatFeedState,\n snapshot: ChatFeedSnapshot\n ) {\n if (\n (this.props.messages.length !== prevProps.messages.length ||\n this.props.authors?.some?.(\n a =>\n a.isTyping !==\n prevProps.authors?.find?.(_a => a.id === _a.id)?.isTyping\n )) &&\n snapshot &&\n snapshot.wasScrolledToBottom\n ) {\n this.scrollApi.scrollToBottom();\n } else if (\n this.props.messages.length !== prevProps.messages.length &&\n snapshot &&\n prevState.isLoadingMessages\n ) {\n const scrollHeight = this.scrollApi && this.scrollApi.scrollHeight();\n this.scrollApi.scrollTo(scrollHeight - snapshot.scrollHeight);\n }\n }\n\n /**\n * Determines what type of message/messages to render.\n */\n renderMessages(messages: Message[]) {\n let { styles } = this.props;\n if (!styles) {\n styles = {};\n }\n const {\n chatBubbleStyles,\n chatBubbleClasses,\n dateRowStyles,\n dateRowClasses,\n avatarStyles,\n avatarClasses,\n lastSeenAvatarStyles,\n lastSeenAvatarClasses,\n bubbleGroupStyles,\n bubbleGroupClasses,\n CustomChatBubble,\n showRecipientAvatar,\n CustomBubbleGroup,\n } = this.props;\n\n // First group by days\n const groups = groupBy(\n messages,\n item => item.createdOn && item.createdOn.toDateString()\n );\n let messageNodes: React.ReactNode[] = [];\n let jsxKey = 0;\n Object.keys(groups).forEach(key => {\n let group = [];\n const messagesGroup = groups[key];\n if (\n messagesGroup[0] &&\n messagesGroup[0].createdOn &&\n this.props.showDateRow\n ) {\n messageNodes.push(\n \n );\n }\n messageNodes = messageNodes.concat(\n messagesGroup.map((message, index) => {\n group.push(message);\n // Find diff in message type or no more messages\n if (\n !messagesGroup[index + 1] ||\n messagesGroup[index + 1].authorId !== message.authorId\n ) {\n const messageGroup = group;\n const author =\n this.props.authors &&\n this.props.authors.filter(a => a.id === message.authorId)[0];\n group = [];\n jsxKey++;\n return (\n \n );\n }\n return null;\n })\n );\n });\n return messageNodes;\n }\n\n apiRef(e: ChatScrollAreaApi) {\n if (!this.scrollApi) {\n e.scrollToBottom();\n }\n this.scrollApi = e;\n }\n\n render() {\n let { styles, classes } = this.props;\n const { isTypingStyles, isTypingClasses } = this.props;\n if (!styles) {\n styles = {};\n }\n if (!classes) {\n classes = {};\n }\n const {\n loadingMessagesStyle,\n chatFeedStyles,\n chatScrollAreaStyles,\n loadingMessagesClasses,\n chatScrollAreaClasses,\n } = this.props;\n\n const typingAuthors =\n this.props.authors &&\n this.props.authors.filter(\n a => a.isTyping && a.id !== this.props.yourAuthorId\n );\n\n return (\n \n \n \n \n {this.renderMessages(this.props.messages)}\n {this.props.showIsTyping && (\n \n )}\n \n \n \n );\n }\n\n private async onLoadOldMessages() {\n if (!this.state.isLoadingMessages && this.props.hasOldMessages) {\n await new Promise(resolve => {\n this.setState(\n {\n isLoadingMessages: true,\n },\n () => resolve()\n );\n });\n if (this.props.onLoadOldMessages) {\n await this.props.onLoadOldMessages();\n }\n await new Promise(resolve => {\n this.setState(\n {\n isLoadingMessages: false,\n },\n () => {\n if (this.scrollApi.scrolledToLoadThreshold()) {\n this.scrollApi.scrollTo(this.props.loadOldMessagesThreshold + 1);\n }\n resolve();\n }\n );\n });\n }\n }\n}\n","const groupBy = (\n array: Array,\n groupingKeyFn: (item: T) => string\n): { [key: string]: Array } => {\n if (typeof groupingKeyFn !== 'function') {\n throw new Error('groupBy take a function as only parameter');\n }\n return array.reduce((result, item) => {\n const key = groupingKeyFn(item);\n if (!result[key]) {\n result[key] = [];\n }\n result[key].push(item);\n return result;\n }, {});\n};\nexport { groupBy };\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["..\\react-bell-chat\\webpack/universalModuleDefinition","..\\react-bell-chat\\./node_modules/classnames/index.js","..\\react-bell-chat\\external \"react\"","..\\react-bell-chat\\webpack/bootstrap","..\\react-bell-chat\\webpack/runtime/compat get default export","..\\react-bell-chat\\webpack/runtime/define property getters","..\\react-bell-chat\\webpack/runtime/hasOwnProperty shorthand","..\\react-bell-chat\\webpack/runtime/make namespace object","..\\react-bell-chat\\./src/lib/ChatBubble/styles.ts","..\\react-bell-chat\\./src/lib/ChatBubble/classes.ts","..\\react-bell-chat\\./src/lib/ChatBubble/config.ts","..\\react-bell-chat\\./src/lib/ChatBubble/index.tsx","..\\react-bell-chat\\./src/lib/Avatar/styles.ts","..\\react-bell-chat\\./src/lib/Avatar/classes.ts","..\\react-bell-chat\\./src/lib/utils/typedMemo.ts","..\\react-bell-chat\\./src/lib/Avatar/index.tsx","..\\react-bell-chat\\./src/lib/IsTyping/classes.ts","..\\react-bell-chat\\./src/lib/IsTyping/styles.ts","..\\react-bell-chat\\./src/lib/IsTyping/index.tsx","..\\react-bell-chat\\./src/lib/ChatScrollArea/index.tsx","..\\react-bell-chat\\./src/lib/ChatScrollArea/styles.ts","..\\react-bell-chat\\./src/lib/ChatScrollArea/classes.ts","..\\react-bell-chat\\./src/lib/LastSeenAvatar/classes.ts","..\\react-bell-chat\\./src/lib/LastSeenAvatar/styles.ts","..\\react-bell-chat\\./src/lib/LastSeenAvatar/index.tsx","..\\react-bell-chat\\./src/lib/BubbleGroup/classes.ts","..\\react-bell-chat\\./src/lib/BubbleGroup/styles.ts","..\\react-bell-chat\\./src/lib/BubbleGroup/index.tsx","..\\react-bell-chat\\./src/lib/ChatMessagesContainer/classes.ts","..\\react-bell-chat\\./src/lib/ChatMessagesContainer/styles.ts","..\\react-bell-chat\\./src/lib/ChatMessagesContainer/index.tsx","..\\react-bell-chat\\./src/lib/DateRow/classes.ts","..\\react-bell-chat\\./src/lib/DateRow/styles.ts","..\\react-bell-chat\\./src/lib/DateRow/index.tsx","..\\react-bell-chat\\./src/lib/LoadingMessages/styles.ts","..\\react-bell-chat\\./src/lib/LoadingMessages/classes.ts","..\\react-bell-chat\\./src/lib/LoadingMessages/index.tsx","..\\react-bell-chat\\./src/lib/SystemChatBubble/classes.ts","..\\react-bell-chat\\./src/lib/SystemChatBubble/styles.ts","..\\react-bell-chat\\./src/lib/SystemChatBubble/index.tsx","..\\react-bell-chat\\./src/lib/ChatFeed/styles.ts","..\\react-bell-chat\\./src/lib/ChatFeed/classes.ts","..\\react-bell-chat\\./src/lib/ChatFeed/index.tsx","..\\react-bell-chat\\./src/lib/utils/utils.ts"],"names":["root","factory","exports","module","require","define","amd","i","a","self","__WEBPACK_EXTERNAL_MODULE__297__","hasOwn","hasOwnProperty","classNames","classes","arguments","length","arg","inner","argType","push","Array","isArray","apply","toString","Object","prototype","key","call","join","default","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","definition","o","defineProperty","enumerable","get","obj","prop","r","Symbol","toStringTag","value","chatBubbleWrapper","position","marginBottom","display","chatBubble","borderTopRightRadius","borderTopLeftRadius","borderBottomRightRadius","borderBottomLeftRadius","marginRight","marginLeft","maxWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","userChatBubbleOrientationNormal","recipientChatBubbleOrientationNormal","recipientChatBubble","text","fontSize","fontWeight","margin","overflowWrap","wordWrap","hyphens","userFirstChatBubbleInGroup","recipientFirstChatBubbleInGroup","userLastChatBubbleInGroup","recipientLastChatBubbleInGroup","userCenterChatBubbleInGroup","recipientCenterChatBubbleInGroup","createdOn","right","bottom","opacity","isSend","lastSeenByContainer","top","width","height","loadingSpinnerColor","isSendIconColor","userChatBubble","userText","recipientText","userCreatedOn","recipientCreatedOn","formatTime","date","toLocaleTimeString","hour","minute","hour12","ChatBubble","props","message","lastSeenAvatarStyles","yourAuthorId","lastSeenAvatarClasses","styles","config","finalConfig","firstChatBubbleInGroup","centerChatBubbleInGroup","lastChatBubbleInGroup","youAreAuthor","authorId","finalChatBubbleStyles","isFirstInGroup","isCenterInGroup","isLastInGroup","messageStyle","messageClassName","isMouseOverLastSeenContainer","setIsMouseOverLastSeenContainer","onMouseEnterLastSeenContainer","onMouseLeaveLastSeenContainer","style","className","CustomMessageRender","title","toLocaleString","xmlns","viewBox","preserveAspectRatio","background","fill","stroke","transform","attributeName","type","calcMode","values","keyTimes","dur","begin","repeatCount","showRecipientLastSeenMessage","lastSeenByAuthors","CustomLastSeenAvatar","onMouseEnter","onMouseLeave","map","author","index","mouseOver","container","left","lineHeight","textAlign","pointerEvents","typedMemo","Memoized","bgImageUrl","backgroundImage","backgroundSize","name","avatarName","split","part","toUpperCase","substr","color","typingAuthors","replace","overflow","padding","flexDirection","render","this","ref","containerRef","maxHeight","minHeight","onScroll","children","scrollContainer","scrollTop","loadOldMessagesThreshold","onLoadOldMessages","apiRef","scrollToBottom","behavior","scrollTo","scrollHeight","scrolledToBottom","clientHeight","scrolledToLoadThreshold","bind","transition","marginTop","textStyle","lastSeenAvatarName","bubbleGroupWrapper","messages","CustomAvatar","bubblesCentered","chatBubbleStyles","avatarStyles","chatBubbleClasses","avatarClasses","showRecipientAvatar","CustomChatBubble","CustomSystemChatBubble","messageNodes","_props","authors","filter","lastSeenMessageId","id","showIsTyping","flex","justifyContent","ChatMessagesContainer","toLocaleDateString","weekday","year","month","day","spinnerColor","svgStyle","isVisible","systemChatBubbleContainer","time","systemChatBubbleText","chatPanel","flexGrow","DefaultMessageRenderFunc","onMessageSend","scrollApi","componentDidMount","getSnapshotBeforeUpdate","prevProps","prevState","wasScrolledToBottom","componentDidUpdate","snapshot","some","isTyping","find","_a","isLoadingMessages","renderMessages","dateRowStyles","dateRowClasses","bubbleGroupStyles","bubbleGroupClasses","CustomBubbleGroup","groups","array","groupingKeyFn","Error","reduce","result","item","groupBy","toDateString","jsxKey","keys","forEach","group","messagesGroup","showDateRow","CustomDateRow","concat","messageGroup","e","isTypingStyles","isTypingClasses","loadingMessagesStyle","chatFeedStyles","chatScrollAreaStyles","loadingMessagesClasses","chatScrollAreaClasses","CustomScrollArea","CustomChatMessagesContainer","chatMessagesContainerClasses","chatMessagesContainerStyles","CustomLoadingMessages","showLoadingMessages","state","CustomIsTyping","hasOldMessages","Promise","resolve","setState","defaultProps"],"mappings":"CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eAC7B,GAAqB,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,SAAUJ,OACd,CACJ,I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C,SACH,CACE5C,mBAAmB,GAErB,WAAM,OAAA2C,S,cALV,SAQInH,KAAK3E,MAAMqF,kBACb,GAAMV,KAAK3E,MAAMqF,qBADf,M,OACF,S,iBAEF,SAAM,IAAIwG,QAAc,SAAAC,GACtB,EAAKC,SACH,CACE5C,mBAAmB,GAErB,WACM,EAAKZ,UAAU1C,2BACjB,EAAK0C,UAAU9C,SAAS,EAAKzF,MAAMoF,yBAA2B,GAEhE0G,S,OATN,S,iCAjRU,GAAAE,aAA8B,CAC1C5F,SAAU,GACVY,QAAS,GACTJ,iBAAkB,EAClB6C,kBAAmB,EACnBhI,oBAAqB4G,GACrBhC,aAAc,EACd+E,iBAAkB,EAClBO,eAAgB,EAChBN,4BAA6B,EAC7BxI,qBAAsB,EACtB4H,cAAe,EACfe,sBAAuB,EACvBrL,aAAc,EACdiF,yBAA0B,GAC1ByB,uBAAwB,GAiR5B,IA5QE,YAAY7G,GAAZ,EACE,aAAMA,IAAM,K,OACZ,EAAKoJ,eAAiB,EAAKA,eAAetD,KAAK,GAC/C,EAAKT,kBAAoB,EAAKA,kBAAkBS,KAAK,GACrD,EAAKR,OAAS,EAAKA,OAAOQ,KAAK,GAC/B,EAAK4F,MAAQ,CACXvC,mBAAmB,G","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"react\")) : factory(root[\"react\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function(__WEBPACK_EXTERNAL_MODULE__297__) {\nreturn ","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","module.exports = __WEBPACK_EXTERNAL_MODULE__297__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as React from 'react';\n\nexport interface ChatBubbleStyles {\n chatBubbleWrapper?: React.CSSProperties;\n chatBubble?: React.CSSProperties;\n systemChatBubbleContainer?: React.CSSProperties;\n systemChatBubbleText?: React.CSSProperties;\n userChatBubbleOrientationNormal?: React.CSSProperties;\n recipientChatBubbleOrientationNormal?: React.CSSProperties;\n text?: React.CSSProperties;\n userText?: React.CSSProperties;\n recipientText?: React.CSSProperties;\n userChatBubble?: React.CSSProperties;\n recipientChatBubble?: React.CSSProperties;\n firstChatBubbleInGroup?: React.CSSProperties;\n userFirstChatBubbleInGroup?: React.CSSProperties;\n recipientFirstChatBubbleInGroup?: React.CSSProperties;\n lastChatBubbleInGroup?: React.CSSProperties;\n userLastChatBubbleInGroup?: React.CSSProperties;\n recipientLastChatBubbleInGroup?: React.CSSProperties;\n centerChatBubbleInGroup?: React.CSSProperties;\n userCenterChatBubbleInGroup?: React.CSSProperties;\n recipientCenterChatBubbleInGroup?: React.CSSProperties;\n createdOn?: React.CSSProperties;\n recipientCreatedOn?: React.CSSProperties;\n userCreatedOn?: React.CSSProperties;\n isSend?: React.CSSProperties;\n\n lastSeenByContainer?: React.CSSProperties;\n loadingSpinnerColor?: string;\n isSendIconColor?: string;\n}\n\nconst styles: ChatBubbleStyles = {\n chatBubbleWrapper: {\n position: 'relative',\n marginBottom: 2,\n display: 'flex',\n } as React.CSSProperties,\n chatBubble: {\n position: 'relative',\n borderTopRightRadius: 7,\n borderTopLeftRadius: 7,\n borderBottomRightRadius: 7,\n borderBottomLeftRadius: 7,\n marginRight: 'auto',\n marginLeft: 'auto',\n maxWidth: '80%',\n paddingTop: 8,\n paddingBottom: 14,\n paddingLeft: 14,\n paddingRight: 14,\n } as React.CSSProperties,\n userChatBubbleOrientationNormal: {\n marginRight: 0,\n } as React.CSSProperties,\n recipientChatBubbleOrientationNormal: {\n marginLeft: 0,\n } as React.CSSProperties,\n recipientChatBubble: {} as React.CSSProperties,\n text: {\n fontSize: 16,\n fontWeight: 300,\n margin: 0,\n marginRight: 30,\n overflowWrap: 'break-word',\n wordWrap: 'break-word',\n hyphens: 'auto',\n } as React.CSSProperties,\n userFirstChatBubbleInGroup: {\n borderTopRightRadius: 0,\n } as React.CSSProperties,\n recipientFirstChatBubbleInGroup: {\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n userLastChatBubbleInGroup: {\n borderTopRightRadius: 0,\n } as React.CSSProperties,\n recipientLastChatBubbleInGroup: {\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n userCenterChatBubbleInGroup: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n } as React.CSSProperties,\n recipientCenterChatBubbleInGroup: {\n borderBottomLeftRadius: 0,\n borderTopLeftRadius: 0,\n } as React.CSSProperties,\n createdOn: {\n position: 'absolute',\n right: 14,\n bottom: 2,\n fontSize: 9,\n opacity: 0.5,\n } as React.CSSProperties,\n isSend: {\n position: 'absolute',\n right: 2,\n bottom: 1,\n fontSize: 9,\n opacity: 0.5,\n } as React.CSSProperties,\n lastSeenByContainer: {\n position: 'absolute',\n right: -30,\n top: 0,\n width: 20,\n height: '100%',\n } as React.CSSProperties,\n loadingSpinnerColor: 'currentColor',\n isSendIconColor: 'currentColor',\n};\n\nexport { styles as defaultChatBubbleStyles };\n","export interface ChatBubbleClasses {\r\n chatBubbleWrapper?: string;\r\n chatBubble?: string;\r\n systemChatBubbleContainer?: string;\r\n systemChatBubbleText?: string;\r\n userChatBubbleOrientationNormal?: string;\r\n recipientChatBubbleOrientationNormal?: string;\r\n text?: string;\r\n userText?: string;\r\n recipientText?: string;\r\n userChatBubble?: string;\r\n recipientChatBubble?: string;\r\n firstChatBubbleInGroup?: string;\r\n userFirstChatBubbleInGroup?: string;\r\n recipientFirstChatBubbleInGroup?: string;\r\n lastChatBubbleInGroup?: string;\r\n userLastChatBubbleInGroup?: string;\r\n recipientLastChatBubbleInGroup?: string;\r\n centerChatBubbleInGroup?: string;\r\n userCenterChatBubbleInGroup?: string;\r\n recipientCenterChatBubbleInGroup?: string;\r\n createdOn?: string;\r\n recipientCreatedOn?: string;\r\n userCreatedOn?: string;\r\n isSend?: string;\r\n\r\n lastSeenByContainer?: string;\r\n}\r\n\r\nconst classes: ChatBubbleClasses = {\r\n chatBubbleWrapper: 'react-bell-chat__chat-bubble__wrapper',\r\n\r\n isSend: 'react-bell-chat__chat-bubble__is-send',\r\n\r\n chatBubble: 'react-bell-chat__chat-bubble',\r\n userChatBubble: 'react-bell-chat__chat-bubble--user',\r\n recipientChatBubble: 'react-bell-chat__chat-bubble--recipient',\r\n\r\n text: 'react-bell-chat__chat-bubble__text',\r\n userText: 'react-bell-chat__chat-bubble__text--user',\r\n recipientText: 'react-bell-chat__chat-bubble__text--recipient',\r\n\r\n createdOn: 'react-bell-chat__chat-bubble__created-on',\r\n userCreatedOn: 'react-bell-chat__chat-bubble__created-on--user',\r\n recipientCreatedOn: 'react-bell-chat__chat-bubble__created-on--recipient',\r\n\r\n lastSeenByContainer: 'react-bell-chat__chat-bubble__last-seen-by__container',\r\n};\r\n\r\nexport { classes as defaultChatBubbleClasses };\r\n","export interface ChatBubbleConfig {\r\n formatTime?: (date: Date) => string;\r\n}\r\n\r\nconst config: ChatBubbleConfig = {\r\n formatTime: (date) =>\r\n date?.toLocaleTimeString([], {\r\n hour: 'numeric',\r\n minute: 'numeric',\r\n hour12: true,\r\n }),\r\n};\r\n\r\nexport { config as defaultChatBubbleConfig };\r\n","import * as React from 'react';\nimport { Message } from '../Message';\nimport { Author } from '../Author';\nimport {\n LastSeenAvatarProps,\n LastSeenAvatarStyles,\n LastSeenAvatarClasses,\n} from './../LastSeenAvatar';\nimport classnames from 'classnames';\nimport { ChatBubbleStyles, defaultChatBubbleStyles } from './styles';\nimport { ChatBubbleClasses, defaultChatBubbleClasses } from './classes';\nimport { ComponentType } from '../utils/componentType';\nimport { ChatBubbleConfig, defaultChatBubbleConfig } from './config';\n\nexport * from './styles';\nexport * from './classes';\nexport * from './config';\n\nexport interface MessageRenderProps<\n TMessageData = string,\n TMessage extends Message = Message\n> {\n message: TMessage;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport interface ChatBubbleProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> {\n message: TMessage;\n author?: TAuthor;\n\n config?: ChatBubbleConfig;\n\n styles?: ChatBubbleStyles;\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\n\n classes?: ChatBubbleClasses;\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\n\n bubblesCentered?: boolean;\n yourAuthorId: number;\n isFirstInGroup?: boolean;\n isLastInGroup?: boolean;\n isCenterInGroup?: boolean;\n lastSeenByAuthors?: TAuthor[];\n showRecipientLastSeenMessage?: boolean;\n CustomLastSeenAvatar?: ComponentType>;\n CustomMessageRender?: ComponentType>;\n}\n\nexport function ChatBubble<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n>(props: ChatBubbleProps) {\n if (!props.message) {\n return null;\n }\n\n const {\n lastSeenAvatarStyles,\n yourAuthorId,\n lastSeenAvatarClasses,\n styles,\n classes,\n config,\n } = props;\n\n const finalConfig = {\n ...defaultChatBubbleConfig,\n ...config,\n };\n\n const {\n userChatBubble,\n chatBubble,\n text,\n userText,\n recipientText,\n recipientChatBubble,\n firstChatBubbleInGroup,\n userFirstChatBubbleInGroup,\n recipientFirstChatBubbleInGroup,\n centerChatBubbleInGroup,\n userCenterChatBubbleInGroup,\n recipientCenterChatBubbleInGroup,\n lastChatBubbleInGroup,\n userLastChatBubbleInGroup,\n recipientLastChatBubbleInGroup,\n userChatBubbleOrientationNormal,\n recipientChatBubbleOrientationNormal,\n chatBubbleWrapper,\n createdOn,\n userCreatedOn,\n recipientCreatedOn,\n isSendIconColor,\n isSend,\n loadingSpinnerColor,\n lastSeenByContainer,\n } = styles ?? {};\n const youAreAuthor = props.message.authorId === yourAuthorId;\n\n // message.id 0 is reserved for blue\n const finalChatBubbleStyles: React.CSSProperties = {\n ...defaultChatBubbleStyles.chatBubble,\n ...chatBubble,\n ...(youAreAuthor\n ? defaultChatBubbleStyles.userChatBubble\n : defaultChatBubbleStyles.recipientChatBubble),\n ...(youAreAuthor ? userChatBubble : recipientChatBubble),\n ...(youAreAuthor\n ? defaultChatBubbleStyles.userChatBubbleOrientationNormal\n : defaultChatBubbleStyles.recipientChatBubbleOrientationNormal),\n ...(youAreAuthor\n ? userChatBubbleOrientationNormal\n : recipientChatBubbleOrientationNormal),\n ...(props.isFirstInGroup && defaultChatBubbleStyles.firstChatBubbleInGroup),\n ...(props.isFirstInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userFirstChatBubbleInGroup\n : defaultChatBubbleStyles.recipientFirstChatBubbleInGroup)),\n ...(props.isCenterInGroup &&\n defaultChatBubbleStyles.centerChatBubbleInGroup),\n ...(props.isCenterInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userCenterChatBubbleInGroup\n : defaultChatBubbleStyles.recipientCenterChatBubbleInGroup)),\n ...(props.isLastInGroup && defaultChatBubbleStyles.lastChatBubbleInGroup),\n ...(props.isLastInGroup &&\n (youAreAuthor\n ? defaultChatBubbleStyles.userLastChatBubbleInGroup\n : defaultChatBubbleStyles.recipientLastChatBubbleInGroup)),\n ...(props.isFirstInGroup && firstChatBubbleInGroup),\n ...(props.isFirstInGroup &&\n (youAreAuthor\n ? userFirstChatBubbleInGroup\n : recipientFirstChatBubbleInGroup)),\n ...(props.isCenterInGroup && centerChatBubbleInGroup),\n ...(props.isCenterInGroup &&\n (youAreAuthor\n ? userCenterChatBubbleInGroup\n : recipientCenterChatBubbleInGroup)),\n ...(props.isLastInGroup && lastChatBubbleInGroup),\n ...(props.isLastInGroup &&\n (youAreAuthor\n ? userLastChatBubbleInGroup\n : recipientLastChatBubbleInGroup)),\n };\n\n const messageStyle = {\n ...defaultChatBubbleStyles.text,\n ...text,\n ...(youAreAuthor ? userText : recipientText),\n };\n const messageClassName = classnames(\n defaultChatBubbleClasses.text,\n classes?.text,\n youAreAuthor\n ? defaultChatBubbleClasses.userText\n : defaultChatBubbleClasses.recipientText,\n youAreAuthor ? classes?.userText : classes?.recipientText\n );\n\n const [\n isMouseOverLastSeenContainer,\n setIsMouseOverLastSeenContainer,\n ] = React.useState(false);\n\n const onMouseEnterLastSeenContainer = React.useCallback(\n () => setIsMouseOverLastSeenContainer(true),\n []\n );\n const onMouseLeaveLastSeenContainer = React.useCallback(\n () => setIsMouseOverLastSeenContainer(false),\n []\n );\n\n return (\n \n \n {props.CustomMessageRender ? (\n \n ) : (\n \n {props.message.message}\n \n )}\n {props.message.createdOn && (\n \n {finalConfig.formatTime(props.message.createdOn)}\n \n )}\n {props.message.isSend !== undefined && youAreAuthor && (\n \n {props.message.isSend ? (\n \n \n \n ) : (\n \n \n \n \n \n )}\n \n )}\n \n {props.showRecipientLastSeenMessage &&\n props.lastSeenByAuthors &&\n props.lastSeenByAuthors.length > 0 &&\n props.CustomLastSeenAvatar && (\n a.name)\n .join(', ')\n .replace(/,(?!.*,)/gim, ' and')\n }*/\n >\n {props.lastSeenByAuthors.map((a, i) => (\n \n ))}\n \n )}\n \n );\n}\n","export interface AvatarStyles {\r\n container?: React.CSSProperties;\r\n text?: React.CSSProperties;\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n position: 'absolute',\r\n left: -50,\r\n top: 0,\r\n width: 40,\r\n height: 40,\r\n lineHeight: '40px',\r\n fontWeight: 400,\r\n borderTopLeftRadius: 20,\r\n borderBottomLeftRadius: 20,\r\n borderBottomRightRadius: 20,\r\n textAlign: 'center',\r\n borderTopRightRadius: 5,\r\n } as React.CSSProperties,\r\n text: {\r\n pointerEvents: 'none',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultAvatarStyles };\r\n","export interface AvatarClasses {\r\n container?: string;\r\n text?: string;\r\n}\r\n\r\nconst classes: AvatarClasses = {\r\n container: 'react-bell-chat__avatar',\r\n text: 'react-bell-chat__avatar__text',\r\n};\r\n\r\nexport { classes as defaultAvatarClasses };\r\n","import * as React from 'react';\r\n\r\nexport const typedMemo: (c: T) => T = React.memo;\r\n","import * as React from 'react';\r\nimport { Author } from '../Author';\r\nimport classnames from 'classnames';\r\nimport { AvatarStyles, defaultAvatarStyles } from './styles';\r\nimport { AvatarClasses, defaultAvatarClasses } from './classes';\r\nimport { typedMemo } from '../utils/typedMemo';\r\n\r\nexport * from './classes';\r\nexport * from './styles';\r\n\r\nexport interface AvatarProps<\r\n TMessage = string,\r\n TAuthor extends Author = Author\r\n> {\r\n author: TAuthor;\r\n styles?: AvatarStyles;\r\n classes?: AvatarClasses;\r\n}\r\n\r\nfunction Avatar<\r\n TMessage = string,\r\n TAuthor extends Author = Author\r\n>(props: AvatarProps) {\r\n const { author, classes, styles } = props;\r\n const style = {\r\n ...defaultAvatarStyles.container,\r\n ...styles?.container,\r\n ...(author?.bgImageUrl\r\n ? ({\r\n backgroundImage: `url(${author?.bgImageUrl})`,\r\n backgroundSize: 'cover',\r\n } as React.CSSProperties)\r\n : {}),\r\n };\r\n return (\r\n author && (\r\n \r\n \r\n {author.bgImageUrl\r\n ? null\r\n : author.avatarName\r\n ? author.avatarName\r\n : author.name\r\n .split(' ')\r\n .map(part => part[0])\r\n .join('')\r\n .toUpperCase()\r\n .substr(0, 3)}\r\n \r\n \r\n )\r\n );\r\n}\r\nconst Memoized = typedMemo(Avatar);\r\nexport { Memoized as Avatar };\r\n","export interface IsTypingClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: IsTypingClasses = {\r\n container: 'react-bell-chat__is-typing__container',\r\n};\r\n\r\nexport { classes as defaultIsTypingClasses };\r\n","export interface IsTypingStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: IsTypingStyles = {\r\n container: {\r\n position: 'absolute',\r\n bottom: 2,\r\n left: 0,\r\n right: 0,\r\n color: 'rgb(204, 204, 204)',\r\n textAlign: 'center',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultIsTypingStyles };\r\n","import * as React from 'react';\nimport { Author } from '../Author';\nimport classnames from 'classnames';\nimport { IsTypingClasses, defaultIsTypingClasses } from './classes';\nimport { IsTypingStyles, defaultIsTypingStyles } from './styles';\nimport { typedMemo } from '../utils/typedMemo';\nexport * from './classes';\nexport * from './styles';\n\nexport interface IsTypingProps<\n TMessage = string,\n TAuthor extends Author = Author\n> {\n typingAuthors: TAuthor[];\n styles?: IsTypingStyles;\n classes?: IsTypingClasses;\n}\n\nfunction IsTyping<\n TMessage = string,\n TAuthor extends Author = Author\n>(props: IsTypingProps) {\n const { styles, classes } = props;\n\n const style = React.useMemo(\n () => ({ ...defaultIsTypingStyles.container, ...styles?.container }),\n [styles?.container]\n );\n\n return (\n props.typingAuthors &&\n props.typingAuthors.length > 0 && (\n \n {props.typingAuthors\n .map(a => a.name)\n .join(', ')\n .replace(/,(?!.*,)/gim, ' and') +\n (props.typingAuthors.length === 1 ? ' is ' : ' are ') +\n 'typing'}\n \n )\n );\n}\n\nconst Memoized = typedMemo(IsTyping);\n\nexport { Memoized as IsTyping };\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { ChatScrollAreaStyles, defaultChatScrollAreaStyles } from './styles';\nimport { ChatScrollAreaClasses, defaultChatScrollAreaClasses } from './classes';\nexport * from './classes';\nexport * from './styles';\n\nexport interface ChatScrollAreaProps {\n maxHeight?: string | number;\n minHeight?: string | number;\n children?: JSX.Element | JSX.Element[];\n styles?: ChatScrollAreaStyles;\n apiRef?: (api: ChatScrollAreaApi) => void;\n loadOldMessagesThreshold: number;\n onLoadOldMessages: () => Promise;\n\n classes?: ChatScrollAreaClasses;\n}\n\nexport interface ChatScrollAreaApi {\n scrollToBottom: (behavior?: ScrollBehavior) => void;\n scrollTo: (top: number) => void;\n scrollTop: () => number;\n scrollHeight: () => number;\n clientHeight: () => number;\n scrolledToBottom: () => boolean;\n scrolledToLoadThreshold: () => boolean; // Check if we are scrolled to threshold where we need to load messages\n}\n\nexport class ChatScrollArea extends React.PureComponent {\n scrollContainer: HTMLDivElement;\n constructor(props: ChatScrollAreaProps) {\n super(props);\n this.containerRef = this.containerRef.bind(this);\n this.onScroll = this.onScroll.bind(this);\n }\n\n public render() {\n const { styles, classes } = this.props;\n return (\n \n {this.props.children}\n \n );\n }\n\n private onScroll() {\n if (\n this.scrollContainer &&\n this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold\n ) {\n this.props.onLoadOldMessages();\n }\n }\n\n private containerRef(scrollContainer: HTMLDivElement) {\n this.scrollContainer = scrollContainer;\n this.props.apiRef &&\n this.props.apiRef({\n scrollToBottom: (behavior = 'auto') =>\n scrollContainer &&\n (scrollContainer.scrollTo\n ? scrollContainer.scrollTo({\n top: scrollContainer.scrollHeight,\n behavior,\n })\n : (scrollContainer.scrollTop = scrollContainer.scrollHeight)),\n scrollTo: top =>\n scrollContainer &&\n (scrollContainer.scrollTo\n ? scrollContainer.scrollTo({\n top: top,\n })\n : (scrollContainer.scrollTop = top)),\n scrolledToBottom: () =>\n this.scrollContainer.scrollHeight -\n this.scrollContainer.scrollTop -\n this.scrollContainer.clientHeight <\n 10,\n scrolledToLoadThreshold: () =>\n this.scrollContainer &&\n this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold,\n scrollTop: () => this.scrollContainer && this.scrollContainer.scrollTop,\n scrollHeight: () =>\n this.scrollContainer && this.scrollContainer.scrollHeight,\n clientHeight: () =>\n this.scrollContainer && this.scrollContainer.clientHeight,\n });\n }\n}\n","export interface ChatScrollAreaStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: ChatScrollAreaStyles = {\r\n container: {\r\n overflow: 'auto',\r\n padding: '0 10px',\r\n display: 'flex',\r\n flexDirection: 'column',\r\n height: '100%',\r\n // flexDirection: 'column-reverse'\r\n },\r\n};\r\n\r\nexport { styles as defaultChatScrollAreaStyles };\r\n","export interface ChatScrollAreaClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: ChatScrollAreaClasses = {\r\n container: 'react-bell-chat__chat-scroll-area',\r\n};\r\n\r\nexport { classes as defaultChatScrollAreaClasses };\r\n","export interface LastSeenAvatarClasses {\r\n container?: string;\r\n text?: string;\r\n}\r\n\r\nconst classes: LastSeenAvatarClasses = {\r\n container: 'react-bell-chat__last-seen-avatar',\r\n text: 'react-bell-chat__last-seen-avatar__text',\r\n};\r\n\r\nexport { classes as defaultLastSeenAvatarClasses };\r\n","export interface LastSeenAvatarStyles {\r\n container?: React.CSSProperties;\r\n containerMouseOver?: React.CSSProperties;\r\n text?: React.CSSProperties;\r\n}\r\n\r\nconst styles = {\r\n container: {\r\n width: 24,\r\n height: 24,\r\n lineHeight: '24px',\r\n fontWeight: 400,\r\n fontSize: 10,\r\n borderTopLeftRadius: 12,\r\n borderTopRightRadius: 12,\r\n borderBottomLeftRadius: 12,\r\n borderBottomRightRadius: 12,\r\n textAlign: 'center',\r\n transition: '0.3s all ease-in-out',\r\n display: 'block',\r\n position: 'relative',\r\n } as React.CSSProperties,\r\n text: {\r\n pointerEvents: 'none',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultLastSeenAvatarStyles };\r\n","import * as React from 'react';\nimport { Author } from '../Author';\nimport classnames from 'classnames';\nimport { LastSeenAvatarClasses, defaultLastSeenAvatarClasses } from './classes';\nimport { LastSeenAvatarStyles, defaultLastSeenAvatarStyles } from './styles';\nimport { typedMemo } from '../utils/typedMemo';\nexport * from './classes';\nexport * from './styles';\n\nexport interface LastSeenAvatarProps<\n TMessageData = string,\n TAuthor extends Author = Author\n> {\n author: TAuthor;\n index?: number;\n mouseOver?: boolean;\n styles?: LastSeenAvatarStyles;\n classes?: LastSeenAvatarClasses;\n}\n\nfunction LastSeenAvatar<\n TMessageData = string,\n TAuthor extends Author = Author\n>(props: LastSeenAvatarProps) {\n const { styles, classes, index, mouseOver, author } = props;\n\n const style = React.useMemo(\n () => ({\n ...defaultLastSeenAvatarStyles.container,\n ...styles?.container,\n ...(author?.bgImageUrl\n ? ({\n backgroundImage: `url(${author?.bgImageUrl})`,\n backgroundSize: 'cover',\n } as React.CSSProperties)\n : {}),\n ...(index > 0 && !mouseOver ? { marginTop: -12 } : { marginTop: -4 }),\n }),\n [styles?.container, index, mouseOver, author?.bgImageUrl]\n );\n\n const textStyle = React.useMemo(\n () => ({\n ...defaultLastSeenAvatarStyles.text,\n ...styles?.text,\n }),\n [styles?.text]\n );\n\n return (\n author && (\n \n \n {author.bgImageUrl\n ? null\n : author.lastSeenAvatarName\n ? author.lastSeenAvatarName\n : author.name[0].toUpperCase()}\n \n \n )\n );\n}\n\nconst Memoized = typedMemo(LastSeenAvatar);\n\nexport { Memoized as LastSeenAvatar };\n","export interface BubbleGroupClasses {\r\n chatBubbleWrapper?: string;\r\n}\r\n\r\nconst classes: BubbleGroupClasses = {\r\n chatBubbleWrapper: 'react-bell-chat__bubble-group',\r\n};\r\n\r\nexport { classes as defaultBubbleGroupClasses };\r\n","import * as React from 'react';\n\nexport interface BubbleGroupStyles {\n bubbleGroupWrapper?: React.CSSProperties;\n}\n\nconst styles: BubbleGroupStyles = {\n bubbleGroupWrapper: {\n marginTop: 10,\n marginBottom: 10,\n position: 'relative',\n },\n};\n\nexport { styles as defaultBubbleGroupStyles };\n","import * as React from 'react';\r\nimport {\r\n ChatBubbleProps,\r\n ChatBubbleStyles,\r\n MessageRenderProps,\r\n} from '../ChatBubble';\r\nimport { Message } from '../';\r\nimport { Author } from '../Author';\r\nimport { AvatarProps, AvatarClasses } from '../Avatar';\r\nimport {\r\n LastSeenAvatarProps,\r\n LastSeenAvatarStyles,\r\n LastSeenAvatarClasses,\r\n} from '../LastSeenAvatar';\r\nimport { AvatarStyles } from './../Avatar';\r\nimport classnames from 'classnames';\r\nimport { ChatBubbleClasses } from './../ChatBubble';\r\nimport { BubbleGroupClasses, defaultBubbleGroupClasses } from './classes';\r\nimport { BubbleGroupStyles, defaultBubbleGroupStyles } from './styles';\r\nimport { ComponentType } from '../utils/componentType';\r\nimport { typedMemo } from '../utils/typedMemo';\r\n\r\nexport * from './styles';\r\nexport * from './classes';\r\n\r\nexport interface BubbleGroupProps<\r\n TMessageData = string,\r\n TMessage extends Message = Message,\r\n TAuthor extends Author = Author\r\n> {\r\n yourAuthorId?: number;\r\n messages: TMessage[];\r\n author: TAuthor;\r\n authors?: TAuthor[];\r\n showRecipientAvatar?: boolean;\r\n bubblesCentered?: boolean;\r\n\r\n classes?: BubbleGroupClasses;\r\n chatBubbleClasses?: ChatBubbleClasses;\r\n avatarClasses?: AvatarClasses;\r\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\r\n\r\n styles?: BubbleGroupStyles;\r\n chatBubbleStyles?: ChatBubbleStyles;\r\n avatarStyles?: AvatarStyles;\r\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\r\n\r\n CustomAvatar?: ComponentType>;\r\n CustomMessageRender?: ComponentType<\r\n MessageRenderProps\r\n >;\r\n CustomLastSeenAvatar?: ComponentType<\r\n LastSeenAvatarProps\r\n >;\r\n CustomChatBubble?: ComponentType<\r\n ChatBubbleProps\r\n >;\r\n CustomSystemChatBubble?: ComponentType<\r\n ChatBubbleProps\r\n >;\r\n\r\n showRecipientLastSeenMessage?: boolean;\r\n}\r\n\r\nfunction BubbleGroup<\r\n TMessageData = string,\r\n TMessage extends Message = Message,\r\n TAuthor extends Author = Author\r\n>(props: BubbleGroupProps) {\r\n const {\r\n messages,\r\n author,\r\n\r\n CustomAvatar,\r\n\r\n styles,\r\n\r\n bubblesCentered,\r\n\r\n chatBubbleStyles,\r\n lastSeenAvatarStyles,\r\n avatarStyles,\r\n\r\n classes,\r\n chatBubbleClasses,\r\n lastSeenAvatarClasses,\r\n avatarClasses,\r\n\r\n showRecipientAvatar,\r\n CustomChatBubble,\r\n CustomSystemChatBubble,\r\n showRecipientLastSeenMessage,\r\n CustomLastSeenAvatar,\r\n CustomMessageRender,\r\n } = props;\r\n\r\n const messageNodes = messages.map((message, i) => {\r\n const _props: ChatBubbleProps = {\r\n yourAuthorId: props.yourAuthorId,\r\n author,\r\n message,\r\n bubblesCentered,\r\n\r\n styles: chatBubbleStyles,\r\n lastSeenAvatarStyles,\r\n\r\n classes: chatBubbleClasses,\r\n lastSeenAvatarClasses,\r\n\r\n isFirstInGroup: i === 0,\r\n isLastInGroup: i === messages.length - 1 && messages.length > 1,\r\n isCenterInGroup: i < messages.length - 1 && messages.length > 1,\r\n lastSeenByAuthors:\r\n props.authors &&\r\n props.authors.filter(\r\n a =>\r\n a.lastSeenMessageId !== undefined &&\r\n a.lastSeenMessageId === message.id\r\n ),\r\n showRecipientLastSeenMessage,\r\n CustomLastSeenAvatar,\r\n CustomMessageRender,\r\n };\r\n return message.authorId !== undefined ? (\r\n \r\n ) : (\r\n \r\n );\r\n });\r\n\r\n const youAreAuthor = author && props.yourAuthorId === author.id;\r\n return (\r\n \r\n {!youAreAuthor && showRecipientAvatar && author && CustomAvatar && (\r\n \r\n )}\r\n {messageNodes}\r\n \r\n );\r\n}\r\n\r\nconst Memoized = typedMemo(BubbleGroup);\r\nexport { Memoized as BubbleGroup };\r\n","export interface ChatMessagesContainerClasses {\r\n root?: string;\r\n showRecipientAvatar?: string;\r\n showRecipientLastSeenMessage?: string;\r\n showIsTyping?: string;\r\n}\r\n\r\nconst classes: ChatMessagesContainerClasses = {\r\n root: 'react-bell-chat__chat-messages',\r\n showRecipientAvatar: 'react-bell-chat__chat-messages--showRecipientAvatar',\r\n showRecipientLastSeenMessage:\r\n 'react-bell-chat__chat-messages--showRecipientLastSeenMessage',\r\n showIsTyping: 'react-bell-chat__chat-messages--showIsTyping',\r\n};\r\n\r\nexport { classes as defaultChatMessagesContainerClasses };\r\n","export interface ChatMessagesContainerStyles {\r\n root?: React.CSSProperties;\r\n showRecipientAvatar?: React.CSSProperties;\r\n showRecipientLastSeenMessage?: React.CSSProperties;\r\n showIsTyping?: React.CSSProperties;\r\n}\r\n\r\nconst styles: ChatMessagesContainerStyles = {\r\n root: {\r\n paddingBottom: 10,\r\n paddingTop: 10,\r\n flex: 1,\r\n display: 'flex',\r\n flexDirection: 'column',\r\n justifyContent: 'flex-end',\r\n },\r\n showRecipientAvatar: {\r\n paddingLeft: 50,\r\n },\r\n showIsTyping: {\r\n paddingBottom: 24,\r\n position: 'relative',\r\n },\r\n showRecipientLastSeenMessage: {\r\n paddingRight: 30,\r\n },\r\n};\r\n\r\nexport { styles as defaultChatMessagesContainerStyles };\r\n","import * as React from 'react';\r\nimport classNames from 'classnames';\r\nimport {\r\n ChatMessagesContainerClasses,\r\n defaultChatMessagesContainerClasses,\r\n} from './classes';\r\nimport {\r\n ChatMessagesContainerStyles,\r\n defaultChatMessagesContainerStyles,\r\n} from './styles';\r\nexport * from './classes';\r\nexport * from './styles';\r\n\r\nexport interface ChatMessagesContainerProps\r\n extends React.PropsWithChildren<{\r\n showRecipientLastSeenMessage: boolean;\r\n showRecipientAvatar: boolean;\r\n showIsTyping: boolean;\r\n classes?: ChatMessagesContainerClasses;\r\n styles?: ChatMessagesContainerStyles;\r\n }> {}\r\n\r\nexport const ChatMessagesContainer: React.FC = props => {\r\n const {\r\n children,\r\n classes,\r\n styles,\r\n showIsTyping,\r\n showRecipientAvatar,\r\n showRecipientLastSeenMessage,\r\n } = props;\r\n const style = React.useMemo(\r\n () => ({\r\n ...defaultChatMessagesContainerStyles?.root,\r\n ...styles?.root,\r\n ...(showRecipientAvatar &&\r\n defaultChatMessagesContainerStyles?.showRecipientAvatar),\r\n ...(showRecipientAvatar && styles?.showRecipientAvatar),\r\n ...(showIsTyping && defaultChatMessagesContainerStyles?.showIsTyping),\r\n ...(showIsTyping && styles?.showIsTyping),\r\n ...(showRecipientLastSeenMessage &&\r\n defaultChatMessagesContainerStyles?.showRecipientLastSeenMessage),\r\n ...(showRecipientLastSeenMessage && styles?.showRecipientLastSeenMessage),\r\n }),\r\n [\r\n showIsTyping,\r\n showRecipientAvatar,\r\n showRecipientLastSeenMessage,\r\n styles?.root,\r\n styles?.showRecipientAvatar,\r\n styles?.showIsTyping,\r\n styles?.showRecipientLastSeenMessage,\r\n ]\r\n );\r\n const className = classNames(\r\n defaultChatMessagesContainerClasses.root,\r\n classes?.root,\r\n {\r\n [defaultChatMessagesContainerClasses?.showRecipientAvatar]: showRecipientAvatar,\r\n [classes?.showRecipientAvatar]: showRecipientAvatar,\r\n [defaultChatMessagesContainerClasses?.showIsTyping]: showIsTyping,\r\n [classes?.showIsTyping]: showIsTyping,\r\n [defaultChatMessagesContainerClasses?.showRecipientLastSeenMessage]: showRecipientLastSeenMessage,\r\n [classes?.showRecipientLastSeenMessage]: showRecipientLastSeenMessage,\r\n }\r\n );\r\n\r\n return (\r\n
\r\n {children}\r\n
\r\n );\r\n};\r\n","export interface DateRowClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: DateRowClasses = {\r\n container: 'react-bell-chat__date-row',\r\n};\r\n\r\nexport { classes as defaultDateRowClasses };\r\n","export interface DateRowStyles {\r\n container?: React.CSSProperties;\r\n}\r\n\r\nconst styles: DateRowStyles = {\r\n container: {\r\n textAlign: 'center',\r\n fontSize: 12,\r\n color: 'rgba(0, 0, 0, 0.55)',\r\n },\r\n};\r\n\r\nexport { styles as defaultDateRowStyles };\r\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { DateRowClasses, defaultDateRowClasses } from './classes';\nimport { DateRowStyles, defaultDateRowStyles } from './styles';\nexport * from './classes';\nexport * from './styles';\n\nexport interface DateRowProps {\n date: Date;\n styles?: DateRowStyles;\n classes?: DateRowClasses;\n}\n\nconst DateRow: React.FC = props => {\n const { styles, classes } = props;\n const style = React.useMemo(\n () => ({\n ...defaultDateRowStyles.container,\n ...styles?.container,\n }),\n [styles?.container]\n );\n return (\n props.date && (\n \n {props.date.toLocaleDateString()}\n \n )\n );\n};\n\nconst Memoized = React.memo(DateRow);\n\nexport { Memoized as DateRow };\n","export interface LoadingMessagesStyle {\r\n container?: React.CSSProperties;\r\n spinnerColor?: string;\r\n}\r\n\r\nconst styles: LoadingMessagesStyle = {\r\n container: {\r\n display: 'flex',\r\n marginBottom: 10,\r\n },\r\n spinnerColor: 'currentColor',\r\n};\r\n\r\nexport { styles as defaultLoadingMessagesStyle };\r\n","export interface LoadingMessagesClasses {\r\n container?: string;\r\n}\r\n\r\nconst classes: LoadingMessagesClasses = {\r\n container: 'react-bell-chat__loading-messages',\r\n};\r\n\r\nexport { classes as defaultLoadingMessagesClasses };\r\n","import * as React from 'react';\nimport classnames from 'classnames';\nimport { LoadingMessagesStyle, defaultLoadingMessagesStyle } from './styles';\nimport {\n LoadingMessagesClasses,\n defaultLoadingMessagesClasses,\n} from './classes';\nexport * from './classes';\nexport * from './styles';\n\nexport interface LoadingMessagesProps {\n styles?: LoadingMessagesStyle;\n classes?: LoadingMessagesClasses;\n className?: string;\n isVisible: boolean;\n}\n\nconst LoadingMessages: React.FC = props => {\n const { styles, classes } = props;\n\n const style = React.useMemo(\n () => ({\n ...defaultLoadingMessagesStyle.container,\n ...styles?.container,\n }),\n [styles?.container]\n );\n\n const svgStyle = React.useMemo(\n () => ({\n background: 'none',\n margin: 'auto',\n fill: styles?.spinnerColor ?? defaultLoadingMessagesStyle.spinnerColor,\n opacity: props.isVisible ? 1 : 0,\n transition: '0.3s all ease-in-out',\n }),\n [styles?.spinnerColor, props.isVisible]\n );\n return (\n \n \n \n {props.isVisible ? (\n \n ) : null}\n \n \n \n );\n};\n\nconst Memoized = React.memo(LoadingMessages);\n\nexport { Memoized as LoadingMessages };\n","import classNames from 'classnames';\r\nimport {\r\n ChatBubbleClasses,\r\n defaultChatBubbleClasses,\r\n} from '../ChatBubble/classes';\r\n\r\nconst classes: ChatBubbleClasses = {\r\n chatBubbleWrapper: classNames(\r\n defaultChatBubbleClasses.chatBubbleWrapper,\r\n 'react-bell-chat__chat-bubble--system'\r\n ),\r\n createdOn: 'react-bell-chat__chat-bubble--system__created-on',\r\n};\r\n\r\nexport { classes as defaultSystemChatBubbleClasses };\r\n","import { ChatBubbleStyles } from '../ChatBubble/styles';\r\n\r\nconst styles: ChatBubbleStyles = {\r\n systemChatBubbleContainer: {\r\n textAlign: 'center',\r\n fontSize: 12,\r\n color: 'rgba(0, 0, 0, 0.55)',\r\n } as React.CSSProperties,\r\n};\r\n\r\nexport { styles as defaultSystemChatBubbleStyles };\r\n","import * as React from 'react';\nimport { ChatBubbleProps, defaultChatBubbleConfig } from '../ChatBubble';\nimport classnames from 'classnames';\nimport { defaultSystemChatBubbleClasses } from './classes';\nimport { defaultSystemChatBubbleStyles } from './styles';\nimport { Author } from '../Author';\nimport { Message } from '../Message';\nexport * from './classes';\nexport * from './styles';\n\nexport interface SystemChatBubbleProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> extends ChatBubbleProps {}\n\nfunction SystemChatBubble<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n>(props: SystemChatBubbleProps) {\n const { styles, classes, message, config } = props;\n\n const finalConfig = {\n ...defaultChatBubbleConfig,\n ...config,\n };\n\n const time = finalConfig.formatTime(message.createdOn);\n\n const style = React.useMemo(\n () => ({\n ...defaultSystemChatBubbleStyles.systemChatBubbleContainer,\n ...styles?.systemChatBubbleContainer,\n }),\n [styles?.systemChatBubbleContainer]\n );\n const textStyle = React.useMemo(\n () => ({\n ...defaultSystemChatBubbleStyles.systemChatBubbleText,\n ...styles?.systemChatBubbleText,\n }),\n [styles?.systemChatBubbleText]\n );\n return (\n message && (\n \n {time && (\n \n {time}:{' '}\n \n )}\n {props.message.message}\n \n )\n );\n}\n\nconst Memoized = React.memo(SystemChatBubble);\n\nexport { Memoized as SystemChatBubble };\n","import * as React from 'react';\n\nexport interface ChatFeedStyles {\n chatPanel?: React.CSSProperties;\n showRecipientAvatarChatMessages?: React.CSSProperties;\n showRecipientLastSeenMessageChatMessages?: React.CSSProperties;\n showIsTypingChatMessages?: React.CSSProperties;\n}\n\nconst styles: ChatFeedStyles = {\n chatPanel: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n overflow: 'hidden',\n position: 'relative',\n },\n};\n\nexport { styles as defaultChatFeedStyles };\n","export interface ChatFeedClasses {\r\n chatPanel?: string;\r\n}\r\n\r\nconst classes: ChatFeedClasses = {\r\n chatPanel: 'react-bell-chat__chat-panel',\r\n};\r\n\r\nexport { classes as defaultChatFeedClasses };\r\n","// Copyright 2017 Brandon Mowat\n// Written, developed, and designed by Brandon Mowat for the purpose of helping\n// other developers make chat interfaces.\n\nimport * as React from 'react';\nimport {\n BubbleGroup as DefaultBubbleGroup,\n BubbleGroupClasses,\n BubbleGroupProps,\n BubbleGroupStyles,\n} from '../BubbleGroup';\nimport {\n ChatBubble as DefaultChatBubble,\n ChatBubbleProps,\n MessageRenderProps,\n} from '../ChatBubble';\nimport { Message } from '../Message';\nimport { Author } from '../Author';\nimport { ChatBubbleStyles, ChatBubbleClasses } from '../ChatBubble';\nimport {\n Avatar as DefaultAvatar,\n AvatarProps,\n AvatarStyles,\n AvatarClasses,\n} from '../Avatar';\nimport {\n IsTyping as DefaultIsTyping,\n IsTypingStyles,\n IsTypingClasses,\n IsTypingProps,\n} from '../IsTyping';\nimport {\n ChatScrollArea as DefaultChatScrollArea,\n ChatScrollAreaProps,\n ChatScrollAreaApi,\n ChatScrollAreaStyles,\n ChatScrollAreaClasses,\n} from '../ChatScrollArea';\nimport {\n ChatMessagesContainer as DefaultChatMessagesContainer,\n ChatMessagesContainerProps,\n ChatMessagesContainerClasses,\n ChatMessagesContainerStyles,\n} from '../ChatMessagesContainer';\nimport {\n LastSeenAvatar as DefaultLastSeenAvatar,\n LastSeenAvatarProps,\n LastSeenAvatarStyles,\n LastSeenAvatarClasses,\n} from '../LastSeenAvatar';\nimport { groupBy } from '../utils/utils';\nimport {\n DateRow as DefaultDateRow,\n DateRowProps,\n DateRowStyles,\n DateRowClasses,\n} from '../DateRow';\nimport {\n LoadingMessages as DefaultLoadingMessages,\n LoadingMessagesProps,\n LoadingMessagesStyle,\n LoadingMessagesClasses,\n} from '../LoadingMessages';\nimport { SystemChatBubble as DefaultSystemChatBubble } from '../SystemChatBubble';\nimport classnames from 'classnames';\nimport { ChatFeedStyles, defaultChatFeedStyles } from './styles';\nimport { ChatFeedClasses, defaultChatFeedClasses } from './classes';\nimport { ComponentType } from '../utils/componentType';\n\nexport * from './classes';\nexport * from './styles';\n\n// Model for ChatFeed props.\n\nexport interface ChatFeedProps<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n> {\n // Structural props\n className?: string;\n\n // Functional props\n messages: TMessage[];\n authors: TAuthor[];\n yourAuthorId: number;\n hasOldMessages?: boolean;\n loadOldMessagesThreshold?: number;\n\n // Visual props\n bubblesCentered?: boolean;\n maxHeight?: string | number;\n minHeight?: string | number;\n\n // Switches\n showDateRow?: boolean;\n showRecipientAvatar?: boolean;\n showRecipientLastSeenMessage?: boolean;\n showIsTyping?: boolean;\n showLoadingMessages?: boolean;\n\n // Custom components\n CustomLoadingMessages?: ComponentType;\n CustomChatBubble?: ComponentType<\n ChatBubbleProps\n >;\n CustomBubbleGroup?: ComponentType<\n BubbleGroupProps\n >;\n CustomSystemChatBubble?: ComponentType<\n ChatBubbleProps\n >;\n CustomAvatar?: ComponentType>;\n CustomScrollArea?: ComponentType;\n CustomChatMessagesContainer?: ComponentType;\n CustomIsTyping?: ComponentType>;\n CustomLastSeenAvatar?: ComponentType<\n LastSeenAvatarProps\n >;\n CustomMessageRender?: ComponentType<\n MessageRenderProps\n >;\n CustomDateRow?: ComponentType;\n\n // Callbacks\n onLoadOldMessages?: () => Promise;\n\n // Styles\n style?: React.CSSProperties;\n styles?: ChatFeedStyles;\n bubbleGroupStyles?: BubbleGroupStyles;\n chatBubbleStyles?: ChatBubbleStyles;\n chatScrollAreaStyles?: ChatScrollAreaStyles;\n chatMessagesContainerStyles?: ChatMessagesContainerStyles;\n avatarStyles?: AvatarStyles;\n lastSeenAvatarStyles?: LastSeenAvatarStyles;\n dateRowStyles?: DateRowStyles;\n loadingMessagesStyle?: LoadingMessagesStyle;\n isTypingStyles?: IsTypingStyles;\n chatFeedStyles?: ChatFeedStyles;\n\n // Classes\n classes?: ChatFeedClasses;\n chatBubbleClasses?: ChatBubbleClasses;\n bubbleGroupClasses?: BubbleGroupClasses;\n chatScrollAreaClasses?: ChatScrollAreaClasses;\n chatMessagesContainerClasses?: ChatMessagesContainerClasses;\n avatarClasses?: AvatarClasses;\n lastSeenAvatarClasses?: LastSeenAvatarClasses;\n dateRowClasses?: DateRowClasses;\n loadingMessagesClasses?: LoadingMessagesClasses;\n isTypingClasses?: IsTypingClasses;\n chatFeedClasses?: ChatFeedStyles;\n}\n\nexport interface ChatFeedState {\n isLoadingMessages: boolean;\n}\n\nexport interface ChatFeedApi {\n onMessageSend: () => void;\n scrollApi: ChatScrollAreaApi;\n}\nfunction DefaultMessageRenderFunc(props: MessageRenderProps) {\n return (\n props.message && (\n \n {props.message.message}\n \n )\n );\n}\n\nexport interface ChatFeedSnapshot {\n wasScrolledToBottom: boolean;\n scrollHeight: number;\n clientHeight: number;\n}\n\n// React component to render a complete chat feed\nexport class ChatFeed<\n TMessageData = string,\n TMessage extends Message = Message,\n TAuthor extends Author = Author\n >\n extends React.PureComponent<\n ChatFeedProps,\n ChatFeedState\n >\n implements ChatFeedApi {\n public static defaultProps: ChatFeedProps = {\n messages: [],\n authors: [],\n CustomChatBubble: DefaultChatBubble,\n CustomBubbleGroup: DefaultBubbleGroup,\n CustomMessageRender: DefaultMessageRenderFunc,\n CustomAvatar: DefaultAvatar,\n CustomScrollArea: DefaultChatScrollArea,\n CustomIsTyping: DefaultIsTyping,\n CustomChatMessagesContainer: DefaultChatMessagesContainer,\n CustomLastSeenAvatar: DefaultLastSeenAvatar,\n CustomDateRow: DefaultDateRow,\n CustomLoadingMessages: DefaultLoadingMessages,\n yourAuthorId: 0,\n loadOldMessagesThreshold: 50,\n CustomSystemChatBubble: DefaultSystemChatBubble,\n };\n\n public scrollApi: ChatScrollAreaApi;\n\n constructor(props: ChatFeedProps) {\n super(props);\n this.renderMessages = this.renderMessages.bind(this);\n this.onLoadOldMessages = this.onLoadOldMessages.bind(this);\n this.apiRef = this.apiRef.bind(this);\n this.state = {\n isLoadingMessages: false,\n };\n }\n\n public onMessageSend() {\n this.scrollApi && this.scrollApi.scrollToBottom();\n }\n\n componentDidMount() {\n this.scrollApi && this.scrollApi.scrollToBottom();\n }\n\n getSnapshotBeforeUpdate(\n prevProps: ChatFeedProps,\n prevState: ChatFeedState\n ) {\n const wasScrolledToBottom =\n this.scrollApi && this.scrollApi.scrolledToBottom();\n const scrollHeight = this.scrollApi && this.scrollApi.scrollHeight();\n const clientHeight = this.scrollApi && this.scrollApi.clientHeight();\n\n return {\n wasScrolledToBottom,\n scrollHeight,\n clientHeight,\n };\n }\n\n componentDidUpdate(\n prevProps: ChatFeedProps,\n prevState: ChatFeedState,\n snapshot: ChatFeedSnapshot\n ) {\n if (\n (this.props.messages.length !== prevProps.messages.length ||\n this.props.authors?.some?.(\n a =>\n a.isTyping !==\n prevProps.authors?.find?.(_a => a.id === _a.id)?.isTyping\n )) &&\n snapshot &&\n snapshot.wasScrolledToBottom\n ) {\n this.scrollApi.scrollToBottom();\n } else if (\n this.props.messages.length !== prevProps.messages.length &&\n snapshot &&\n prevState.isLoadingMessages\n ) {\n const scrollHeight = this.scrollApi && this.scrollApi.scrollHeight();\n this.scrollApi.scrollTo(scrollHeight - snapshot.scrollHeight);\n }\n }\n\n /**\n * Determines what type of message/messages to render.\n */\n renderMessages(messages: Message[]) {\n let { styles } = this.props;\n if (!styles) {\n styles = {};\n }\n const {\n chatBubbleStyles,\n chatBubbleClasses,\n dateRowStyles,\n dateRowClasses,\n avatarStyles,\n avatarClasses,\n lastSeenAvatarStyles,\n lastSeenAvatarClasses,\n bubbleGroupStyles,\n bubbleGroupClasses,\n CustomChatBubble,\n showRecipientAvatar,\n CustomBubbleGroup,\n } = this.props;\n\n // First group by days\n const groups = groupBy(\n messages,\n item => item.createdOn && item.createdOn.toDateString()\n );\n let messageNodes: React.ReactNode[] = [];\n let jsxKey = 0;\n Object.keys(groups).forEach(key => {\n let group = [];\n const messagesGroup = groups[key];\n if (\n messagesGroup[0] &&\n messagesGroup[0].createdOn &&\n this.props.showDateRow\n ) {\n messageNodes.push(\n \n );\n }\n messageNodes = messageNodes.concat(\n messagesGroup.map((message, index) => {\n group.push(message);\n // Find diff in message type or no more messages\n if (\n !messagesGroup[index + 1] ||\n messagesGroup[index + 1].authorId !== message.authorId\n ) {\n const messageGroup = group;\n const author =\n this.props.authors &&\n this.props.authors.filter(a => a.id === message.authorId)[0];\n group = [];\n jsxKey++;\n return (\n \n );\n }\n return null;\n })\n );\n });\n return messageNodes;\n }\n\n apiRef(e: ChatScrollAreaApi) {\n if (!this.scrollApi) {\n e.scrollToBottom();\n }\n this.scrollApi = e;\n }\n\n render() {\n let { styles, classes } = this.props;\n const { isTypingStyles, isTypingClasses } = this.props;\n if (!styles) {\n styles = {};\n }\n if (!classes) {\n classes = {};\n }\n const {\n loadingMessagesStyle,\n chatFeedStyles,\n chatScrollAreaStyles,\n loadingMessagesClasses,\n chatScrollAreaClasses,\n } = this.props;\n\n const typingAuthors =\n this.props.authors &&\n this.props.authors.filter(\n a => a.isTyping && a.id !== this.props.yourAuthorId\n );\n\n return (\n \n \n \n \n {this.renderMessages(this.props.messages)}\n {this.props.showIsTyping && (\n \n )}\n \n \n \n );\n }\n\n private async onLoadOldMessages() {\n if (!this.state.isLoadingMessages && this.props.hasOldMessages) {\n await new Promise(resolve => {\n this.setState(\n {\n isLoadingMessages: true,\n },\n () => resolve()\n );\n });\n if (this.props.onLoadOldMessages) {\n await this.props.onLoadOldMessages();\n }\n await new Promise(resolve => {\n this.setState(\n {\n isLoadingMessages: false,\n },\n () => {\n if (this.scrollApi.scrolledToLoadThreshold()) {\n this.scrollApi.scrollTo(this.props.loadOldMessagesThreshold + 1);\n }\n resolve();\n }\n );\n });\n }\n }\n}\n","const groupBy = (\n array: Array,\n groupingKeyFn: (item: T) => string\n): { [key: string]: Array } => {\n if (typeof groupingKeyFn !== 'function') {\n throw new Error('groupBy take a function as only parameter');\n }\n return array.reduce((result, item) => {\n const key = groupingKeyFn(item);\n if (!result[key]) {\n result[key] = [];\n }\n result[key].push(item);\n return result;\n }, {});\n};\nexport { groupBy };\n"],"sourceRoot":""} \ No newline at end of file diff --git a/lib/index.min.js b/lib/index.min.js index 4cb8452..df98092 100644 --- a/lib/index.min.js +++ b/lib/index.min.js @@ -4,5 +4,5 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e=[],t=0;t{"use strict";e.exports=t}},s={};function ne(e){var t=s[e];if(void 0!==t)return t.exports;t=s[e]={exports:{}};return r[e](t,t.exports,ne),t.exports}ne.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ne.d(t,{a:t}),t},ne.d=(e,t)=>{for(var r in t)ne.o(t,r)&&!ne.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},ne.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ne.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ae={};return(()=>{"use strict";ne.r(ae),ne.d(ae,{Avatar:()=>s,BubbleGroup:()=>O,ChatBubble:()=>t,ChatFeed:()=>re,ChatMessagesContainer:()=>R,ChatScrollArea:()=>f,DateRow:()=>H,IsTyping:()=>h,LastSeenAvatar:()=>S,LoadingMessages:()=>U,SystemChatBubble:()=>J,defaultAvatarClasses:()=>o,defaultAvatarStyles:()=>a,defaultBubbleGroupClasses:()=>B,defaultBubbleGroupStyles:()=>w,defaultChatBubbleClasses:()=>N,defaultChatBubbleConfig:()=>P,defaultChatBubbleStyles:()=>j,defaultChatFeedClasses:()=>Q,defaultChatFeedStyles:()=>K,defaultChatMessagesContainerClasses:()=>A,defaultChatMessagesContainerStyles:()=>x,defaultChatScrollAreaClasses:()=>b,defaultChatScrollAreaStyles:()=>d,defaultDateRowClasses:()=>M,defaultDateRowStyles:()=>L,defaultIsTypingClasses:()=>n,defaultIsTypingStyles:()=>i,defaultLastSeenAvatarClasses:()=>v,defaultLastSeenAvatarStyles:()=>y,defaultLoadingMessagesClasses:()=>F,defaultLoadingMessagesStyle:()=>W,defaultSystemChatBubbleClasses:()=>z,defaultSystemChatBubbleStyles:()=>V});var G=ne(297),e=ne(184),E=ne.n(e),j={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},N={chatBubbleWrapper:"react-bell-chat__chat-bubble__wrapper",isSend:"react-bell-chat__chat-bubble__is-send",chatBubble:"react-bell-chat__chat-bubble",userChatBubble:"react-bell-chat__chat-bubble--user",recipientChatBubble:"react-bell-chat__chat-bubble--recipient",text:"react-bell-chat__chat-bubble__text",userText:"react-bell-chat__chat-bubble__text--user",recipientText:"react-bell-chat__chat-bubble__text--recipient",createdOn:"react-bell-chat__chat-bubble__created-on",userCreatedOn:"react-bell-chat__chat-bubble__created-on--user",recipientCreatedOn:"react-bell-chat__chat-bubble__created-on--recipient",lastSeenByContainer:"react-bell-chat__chat-bubble__last-seen-by__container"},P={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},k=function(){return(k=Object.assign||function(e){for(var t,r=1,s=arguments.length;ro[0]&&t[1]{"use strict";e.exports=t}},s={};function ne(e){var t=s[e];if(void 0!==t)return t.exports;t=s[e]={exports:{}};return r[e](t,t.exports,ne),t.exports}ne.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return ne.d(t,{a:t}),t},ne.d=(e,t)=>{for(var r in t)ne.o(t,r)&&!ne.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},ne.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ne.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ae={};return(()=>{"use strict";ne.r(ae),ne.d(ae,{Avatar:()=>s,BubbleGroup:()=>O,ChatBubble:()=>t,ChatFeed:()=>re,ChatMessagesContainer:()=>R,ChatScrollArea:()=>f,DateRow:()=>H,IsTyping:()=>h,LastSeenAvatar:()=>S,LoadingMessages:()=>U,SystemChatBubble:()=>J,defaultAvatarClasses:()=>o,defaultAvatarStyles:()=>a,defaultBubbleGroupClasses:()=>B,defaultBubbleGroupStyles:()=>w,defaultChatBubbleClasses:()=>N,defaultChatBubbleConfig:()=>P,defaultChatBubbleStyles:()=>j,defaultChatFeedClasses:()=>Q,defaultChatFeedStyles:()=>K,defaultChatMessagesContainerClasses:()=>A,defaultChatMessagesContainerStyles:()=>x,defaultChatScrollAreaClasses:()=>b,defaultChatScrollAreaStyles:()=>d,defaultDateRowClasses:()=>M,defaultDateRowStyles:()=>L,defaultIsTypingClasses:()=>n,defaultIsTypingStyles:()=>i,defaultLastSeenAvatarClasses:()=>v,defaultLastSeenAvatarStyles:()=>y,defaultLoadingMessagesClasses:()=>F,defaultLoadingMessagesStyle:()=>W,defaultSystemChatBubbleClasses:()=>z,defaultSystemChatBubbleStyles:()=>V});var G=ne(297),e=ne(184),E=ne.n(e),j={chatBubbleWrapper:{position:"relative",marginBottom:2,display:"flex"},chatBubble:{position:"relative",borderTopRightRadius:7,borderTopLeftRadius:7,borderBottomRightRadius:7,borderBottomLeftRadius:7,marginRight:"auto",marginLeft:"auto",maxWidth:"80%",paddingTop:8,paddingBottom:14,paddingLeft:14,paddingRight:14},userChatBubbleOrientationNormal:{marginRight:0},recipientChatBubbleOrientationNormal:{marginLeft:0},recipientChatBubble:{},text:{fontSize:16,fontWeight:300,margin:0,marginRight:30,overflowWrap:"break-word",wordWrap:"break-word",hyphens:"auto"},userFirstChatBubbleInGroup:{borderTopRightRadius:0},recipientFirstChatBubbleInGroup:{borderTopLeftRadius:0},userLastChatBubbleInGroup:{borderTopRightRadius:0},recipientLastChatBubbleInGroup:{borderTopLeftRadius:0},userCenterChatBubbleInGroup:{borderTopRightRadius:0,borderBottomRightRadius:0},recipientCenterChatBubbleInGroup:{borderBottomLeftRadius:0,borderTopLeftRadius:0},createdOn:{position:"absolute",right:14,bottom:2,fontSize:9,opacity:.5},isSend:{position:"absolute",right:2,bottom:1,fontSize:9,opacity:.5},lastSeenByContainer:{position:"absolute",right:-30,top:0,width:20,height:"100%"},loadingSpinnerColor:"currentColor",isSendIconColor:"currentColor"},N={chatBubbleWrapper:"react-bell-chat__chat-bubble__wrapper",isSend:"react-bell-chat__chat-bubble__is-send",chatBubble:"react-bell-chat__chat-bubble",userChatBubble:"react-bell-chat__chat-bubble--user",recipientChatBubble:"react-bell-chat__chat-bubble--recipient",text:"react-bell-chat__chat-bubble__text",userText:"react-bell-chat__chat-bubble__text--user",recipientText:"react-bell-chat__chat-bubble__text--recipient",createdOn:"react-bell-chat__chat-bubble__created-on",userCreatedOn:"react-bell-chat__chat-bubble__created-on--user",recipientCreatedOn:"react-bell-chat__chat-bubble__created-on--recipient",lastSeenByContainer:"react-bell-chat__chat-bubble__last-seen-by__container"},P={formatTime:function(e){return null==e?void 0:e.toLocaleTimeString([],{hour:"numeric",minute:"numeric",hour12:!0})}},k=function(){return(k=Object.assign||function(e){for(var t,r=1,s=arguments.length;ro[0]&&t[1] { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "defaultChatScrollAreaClasses": () => (/* reexport safe */ _classes__WEBPACK_IMPORTED_MODULE_3__.defaultChatScrollAreaClasses), +/* harmony export */ "defaultChatScrollAreaStyles": () => (/* reexport safe */ _styles__WEBPACK_IMPORTED_MODULE_2__.defaultChatScrollAreaStyles), +/* harmony export */ "ChatScrollArea": () => (/* binding */ ChatScrollArea) +/* harmony export */ }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); +/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./styles */ "./src/lib/ChatScrollArea/styles.ts"); +/* harmony import */ var _classes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./classes */ "./src/lib/ChatScrollArea/classes.ts"); +var __extends = (undefined && undefined.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __assign = (undefined && undefined.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + + + + + + +var ChatScrollArea = /** @class */ (function (_super) { + __extends(ChatScrollArea, _super); + function ChatScrollArea(props) { + var _this = _super.call(this, props) || this; + _this.containerRef = _this.containerRef.bind(_this); + _this.onScroll = _this.onScroll.bind(_this); + return _this; + } + ChatScrollArea.prototype.render = function () { + var _a = this.props, styles = _a.styles, classes = _a.classes; + return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { ref: this.containerRef, className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(_classes__WEBPACK_IMPORTED_MODULE_3__.defaultChatScrollAreaClasses.container, classes === null || classes === void 0 ? void 0 : classes.container), style: __assign(__assign(__assign(__assign({}, _styles__WEBPACK_IMPORTED_MODULE_2__.defaultChatScrollAreaStyles.container), (this.props.maxHeight !== undefined + ? { maxHeight: this.props.maxHeight } + : {})), (this.props.minHeight !== undefined + ? { minHeight: this.props.minHeight } + : {})), styles === null || styles === void 0 ? void 0 : styles.container), onScroll: this.onScroll }, this.props.children)); + }; + ChatScrollArea.prototype.onScroll = function () { + if (this.scrollContainer && + this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold) { + this.props.onLoadOldMessages(); + } + }; + ChatScrollArea.prototype.containerRef = function (scrollContainer) { + var _this = this; + this.scrollContainer = scrollContainer; + this.props.apiRef && + this.props.apiRef({ + scrollToBottom: function (behavior) { + if (behavior === void 0) { behavior = 'auto'; } + return scrollContainer && + (scrollContainer.scrollTo + ? scrollContainer.scrollTo({ + top: scrollContainer.scrollHeight, + behavior: behavior, + }) + : (scrollContainer.scrollTop = scrollContainer.scrollHeight)); + }, + scrollTo: function (top) { + return scrollContainer && + (scrollContainer.scrollTo + ? scrollContainer.scrollTo({ + top: top, + }) + : (scrollContainer.scrollTop = top)); + }, + scrolledToBottom: function () { + return _this.scrollContainer.scrollHeight - + _this.scrollContainer.scrollTop - + _this.scrollContainer.clientHeight < + 10; + }, + scrolledToLoadThreshold: function () { + return _this.scrollContainer && + _this.scrollContainer.scrollTop <= _this.props.loadOldMessagesThreshold; + }, + scrollTop: function () { return _this.scrollContainer && _this.scrollContainer.scrollTop; }, + scrollHeight: function () { + return _this.scrollContainer && _this.scrollContainer.scrollHeight; + }, + clientHeight: function () { + return _this.scrollContainer && _this.scrollContainer.clientHeight; + }, + }); + }; + return ChatScrollArea; +}(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent)); + + + +/***/ }) + +}, +/******/ function(__webpack_require__) { // webpackRuntimeModules +/******/ "use strict"; +/******/ +/******/ /* webpack/runtime/getFullHash */ +/******/ (() => { +/******/ __webpack_require__.h = () => ("31bcee3b62023ae41ef3") +/******/ })(); +/******/ +/******/ } +); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1iZWxsLWNoYXQvLi9zcmMvbGliL0NoYXRTY3JvbGxBcmVhL2luZGV4LnRzeCIsIndlYnBhY2s6Ly9yZWFjdC1iZWxsLWNoYXQvd2VicGFjay9ydW50aW1lL2dldEZ1bGxIYXNoIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQStCO0FBQ0s7QUFDeUM7QUFDRztBQUN0RDtBQUNEO0FBd0J6QjtJQUFvQyxrQ0FBd0M7SUFFMUUsd0JBQVksS0FBMEI7UUFBdEMsWUFDRSxrQkFBTSxLQUFLLENBQUMsU0FHYjtRQUZDLEtBQUksQ0FBQyxZQUFZLEdBQUcsS0FBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsS0FBSSxDQUFDLENBQUM7UUFDakQsS0FBSSxDQUFDLFFBQVEsR0FBRyxLQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxLQUFJLENBQUMsQ0FBQzs7SUFDM0MsQ0FBQztJQUVNLCtCQUFNLEdBQWI7UUFDUSxTQUFzQixJQUFJLENBQUMsS0FBSyxFQUE5QixNQUFNLGNBQUUsT0FBTyxhQUFlLENBQUM7UUFDdkMsT0FBTyxDQUNMLDBEQUNFLEdBQUcsRUFBRSxJQUFJLENBQUMsWUFBWSxFQUN0QixTQUFTLEVBQUUsaURBQVUsQ0FDbkIsNEVBQXNDLEVBQ3RDLE9BQU8sYUFBUCxPQUFPLHVCQUFQLE9BQU8sQ0FBRSxTQUFTLENBQ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Wdlc1RocmVzaG9sZFxuICAgICkge1xuICAgICAgdGhpcy5wcm9wcy5vbkxvYWRPbGRNZXNzYWdlcygpO1xuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgY29udGFpbmVyUmVmKHNjcm9sbENvbnRhaW5lcjogSFRNTERpdkVsZW1lbnQpIHtcbiAgICB0aGlzLnNjcm9sbENvbnRhaW5lciA9IHNjcm9sbENvbnRhaW5lcjtcbiAgICB0aGlzLnByb3BzLmFwaVJlZiAmJlxuICAgICAgdGhpcy5wcm9wcy5hcGlSZWYoe1xuICAgICAgICBzY3JvbGxUb0JvdHRvbTogKGJlaGF2aW9yID0gJ2F1dG8nKSA9PlxuICAgICAgICAgIHNjcm9sbENvbnRhaW5lciAmJlxuICAgICAgICAgIChzY3JvbGxDb250YWluZXIuc2Nyb2xsVG9cbiAgICAgICAgICAgID8gc2Nyb2xsQ29udGFpbmVyLnNjcm9sbFRvKHtcbiAgICAgICAgICAgICAgICB0b3A6IHNjcm9sbENvbnRhaW5lci5zY3JvbGxIZWlnaHQsXG4gICAgICAgICAgICAgICAgYmVoYXZpb3IsXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICA6IChzY3JvbGxDb250YWluZXIuc2Nyb2xsVG9wID0gc2Nyb2xsQ29udGFpbmVyLnNjcm9sbEhlaWdodCkpLFxuICAgICAgICBzY3JvbGxUbzogdG9wID0+XG4gICAgICAgICAgc2Nyb2xsQ29udGFpbmVyICYmXG4gICAgICAgICAgKHNjcm9sbENvbnRhaW5lci5zY3JvbGxUb1xuICAgICAgICAgICAgPyBzY3JvbGxDb250YWluZXIuc2Nyb2xsVG8oe1xuICAgICAgICAgICAgICAgIHRvcDogdG9wLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgOiAoc2Nyb2xsQ29udGFpbmVyLnNjcm9sbFRvcCA9IHRvcCkpLFxuICAgICAgICBzY3JvbGxlZFRvQm90dG9tOiAoKSA9PlxuICAgICAgICAgIHRoaXMuc2Nyb2xsQ29udGFpbmVyLnNjcm9sbEhlaWdodCAtXG4gICAgICAgICAgICB0aGlzLnNjcm9sbENvbnRhaW5lci5zY3JvbGxUb3AgLVxuICAgICAgICAgICAgdGhpcy5zY3JvbGxDb250YWluZXIuY2xpZW50SGVpZ2h0IDxcbiAgICAgICAgICAxMCxcbiAgICAgICAgc2Nyb2xsZWRUb0xvYWRUaHJlc2hvbGQ6ICgpID0+XG4gICAgICAgICAgdGhpcy5zY3JvbGxDb250YWluZXIgJiZcbiAgICAgICAgICB0aGlzLnNjcm9sbENvbnRhaW5lci5zY3JvbGxUb3AgPD0gdGhpcy5wcm9wcy5sb2FkT2xkTWVzc2FnZXNUaHJlc2hvbGQsXG4gICAgICAgIHNjcm9sbFRvcDogKCkgPT4gdGhpcy5zY3JvbGxDb250YWluZXIgJiYgdGhpcy5zY3JvbGxDb250YWluZXIuc2Nyb2xsVG9wLFxuICAgICAgICBzY3JvbGxIZWlnaHQ6ICgpID0+XG4gICAgICAgICAgdGhpcy5zY3JvbGxDb250YWluZXIgJiYgdGhpcy5zY3JvbGxDb250YWluZXIuc2Nyb2xsSGVpZ2h0LFxuICAgICAgICBjbGllbnRIZWlnaHQ6ICgpID0+XG4gICAgICAgICAgdGhpcy5zY3JvbGxDb250YWluZXIgJiYgdGhpcy5zY3JvbGxDb250YWluZXIuY2xpZW50SGVpZ2h0LFxuICAgICAgfSk7XG4gIH1cbn1cbiIsIl9fd2VicGFja19yZXF1aXJlX18uaCA9ICgpID0+IChcIjMxYmNlZTNiNjIwMjNhZTQxZWYzXCIpIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/src/demo/wwwroot/bf1374f-index-wps-hmr.js b/src/demo/wwwroot/bf1374f-index-wps-hmr.js deleted file mode 100644 index 627b56a..0000000 --- a/src/demo/wwwroot/bf1374f-index-wps-hmr.js +++ /dev/null @@ -1,303 +0,0 @@ -self["webpackHotUpdatereact_bell_chat"]("index",{ - -/***/ "./src/lib/ChatFeed/index.tsx": -/*!************************************!*\ - !*** ./src/lib/ChatFeed/index.tsx ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "defaultChatFeedClasses": () => (/* reexport safe */ _classes__WEBPACK_IMPORTED_MODULE_14__.defaultChatFeedClasses), -/* harmony export */ "defaultChatFeedStyles": () => (/* reexport safe */ _styles__WEBPACK_IMPORTED_MODULE_13__.defaultChatFeedStyles), -/* harmony export */ "ChatFeed": () => (/* binding */ ChatFeed) -/* harmony export */ }); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "./node_modules/react/index.js"); -/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _BubbleGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BubbleGroup */ "./src/lib/BubbleGroup/index.tsx"); -/* harmony import */ var _ChatBubble__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ChatBubble */ "./src/lib/ChatBubble/index.tsx"); -/* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Avatar */ "./src/lib/Avatar/index.tsx"); -/* harmony import */ var _IsTyping__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../IsTyping */ "./src/lib/IsTyping/index.tsx"); -/* harmony import */ var _ChatScrollArea__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ChatScrollArea */ "./src/lib/ChatScrollArea/index.tsx"); -/* harmony import */ var _ChatMessagesContainer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ChatMessagesContainer */ "./src/lib/ChatMessagesContainer/index.tsx"); -/* harmony import */ var _LastSeenAvatar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../LastSeenAvatar */ "./src/lib/LastSeenAvatar/index.tsx"); -/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/utils */ "./src/lib/utils/utils.ts"); -/* harmony import */ var _DateRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../DateRow */ "./src/lib/DateRow/index.tsx"); -/* harmony import */ var _LoadingMessages__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LoadingMessages */ "./src/lib/LoadingMessages/index.tsx"); -/* harmony import */ var _SystemChatBubble__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SystemChatBubble */ "./src/lib/SystemChatBubble/index.tsx"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); -/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_12__); -/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./styles */ "./src/lib/ChatFeed/styles.ts"); -/* harmony import */ var _classes__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./classes */ "./src/lib/ChatFeed/classes.ts"); -// Copyright 2017 Brandon Mowat -// Written, developed, and designed by Brandon Mowat for the purpose of helping -// other developers make chat interfaces. -var __extends = (undefined && undefined.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (undefined && undefined.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __generator = (undefined && undefined.__generator) || function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -}; - - - - - - - - - - - - - - - - - -function DefaultMessageRenderFunc(props) { - return (props.message && (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: props.className, style: props.style }, props.message.message))); -} -// React component to render a complete chat feed -var ChatFeed = /** @class */ (function (_super) { - __extends(ChatFeed, _super); - function ChatFeed(props) { - var _this = _super.call(this, props) || this; - _this.renderMessages = _this.renderMessages.bind(_this); - _this.onLoadOldMessages = _this.onLoadOldMessages.bind(_this); - _this.apiRef = _this.apiRef.bind(_this); - _this.state = { - isLoadingMessages: false, - }; - return _this; - } - ChatFeed.prototype.onMessageSend = function () { - this.scrollApi && this.scrollApi.scrollToBottom(); - }; - ChatFeed.prototype.componentDidMount = function () { - this.scrollApi && this.scrollApi.scrollToBottom(); - }; - ChatFeed.prototype.getSnapshotBeforeUpdate = function (prevProps, prevState) { - var wasScrolledToBottom = this.scrollApi && this.scrollApi.scrolledToBottom(); - var scrollHeight = this.scrollApi && this.scrollApi.scrollHeight(); - var clientHeight = this.scrollApi && this.scrollApi.clientHeight(); - return { - wasScrolledToBottom: wasScrolledToBottom, - scrollHeight: scrollHeight, - clientHeight: clientHeight, - }; - }; - ChatFeed.prototype.componentDidUpdate = function (prevProps, prevState, snapshot) { - var _b, _c; - if ((this.props.messages.length !== prevProps.messages.length || - ((_c = (_b = this.props.authors) === null || _b === void 0 ? void 0 : _b.some) === null || _c === void 0 ? void 0 : _c.call(_b, function (a) { - var _b, _c, _d; - return a.isTyping !== - ((_d = (_c = (_b = prevProps.authors) === null || _b === void 0 ? void 0 : _b.find) === null || _c === void 0 ? void 0 : _c.call(_b, function (_a) { return a.id === _a.id; })) === null || _d === void 0 ? void 0 : _d.isTyping); - }))) && - snapshot && - snapshot.wasScrolledToBottom) { - this.scrollApi.scrollToBottom(); - } - else if (this.props.messages.length !== prevProps.messages.length && - snapshot && - prevState.isLoadingMessages) { - var scrollHeight = this.scrollApi && this.scrollApi.scrollHeight(); - this.scrollApi.scrollTo(scrollHeight - snapshot.scrollHeight); - } - }; - /** - * Determines what type of message/messages to render. - */ - ChatFeed.prototype.renderMessages = function (messages) { - var _this = this; - var styles = this.props.styles; - if (!styles) { - styles = {}; - } - var _b = this.props, chatBubbleStyles = _b.chatBubbleStyles, chatBubbleClasses = _b.chatBubbleClasses, dateRowStyles = _b.dateRowStyles, dateRowClasses = _b.dateRowClasses, avatarStyles = _b.avatarStyles, avatarClasses = _b.avatarClasses, lastSeenAvatarStyles = _b.lastSeenAvatarStyles, lastSeenAvatarClasses = _b.lastSeenAvatarClasses, bubbleGroupStyles = _b.bubbleGroupStyles, bubbleGroupClasses = _b.bubbleGroupClasses, CustomChatBubble = _b.CustomChatBubble, showRecipientAvatar = _b.showRecipientAvatar, CustomBubbleGroup = _b.CustomBubbleGroup; - // First group by days - var groups = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_8__.groupBy)(messages, function (item) { return item.createdOn && item.createdOn.toDateString(); }); - var messageNodes = []; - var jsxKey = 0; - Object.keys(groups).forEach(function (key) { - var group = []; - var messagesGroup = groups[key]; - if (messagesGroup[0] && - messagesGroup[0].createdOn && - _this.props.showDateRow) { - messageNodes.push(react__WEBPACK_IMPORTED_MODULE_0__.createElement(_this.props.CustomDateRow, { key: key, date: messagesGroup[0].createdOn, styles: dateRowStyles, classes: dateRowClasses })); - } - messageNodes = messageNodes.concat(messagesGroup.map(function (message, index) { - group.push(message); - // Find diff in message type or no more messages - if (!messagesGroup[index + 1] || - messagesGroup[index + 1].authorId !== message.authorId) { - var messageGroup = group; - var author = _this.props.authors && - _this.props.authors.filter(function (a) { return a.id === message.authorId; })[0]; - group = []; - jsxKey++; - return (react__WEBPACK_IMPORTED_MODULE_0__.createElement(CustomBubbleGroup, { key: jsxKey, yourAuthorId: _this.props.yourAuthorId, messages: messageGroup, author: author, authors: _this.props.authors, showRecipientAvatar: showRecipientAvatar, CustomChatBubble: CustomChatBubble, chatBubbleStyles: chatBubbleStyles, chatBubbleClasses: chatBubbleClasses, avatarStyles: avatarStyles, avatarClasses: avatarClasses, lastSeenAvatarStyles: lastSeenAvatarStyles, lastSeenAvatarClasses: lastSeenAvatarClasses, showRecipientLastSeenMessage: _this.props.showRecipientLastSeenMessage, CustomAvatar: _this.props.CustomAvatar, CustomLastSeenAvatar: _this.props.CustomLastSeenAvatar, CustomMessageRender: _this.props.CustomMessageRender, CustomSystemChatBubble: _this.props.CustomSystemChatBubble, classes: bubbleGroupClasses, styles: bubbleGroupStyles })); - } - return null; - })); - }); - return messageNodes; - }; - ChatFeed.prototype.apiRef = function (e) { - if (!this.scrollApi) { - e.scrollToBottom(); - } - this.scrollApi = e; - }; - ChatFeed.prototype.render = function () { - var _this = this; - var _b = this.props, styles = _b.styles, classes = _b.classes; - var _c = this.props, isTypingStyles = _c.isTypingStyles, isTypingClasses = _c.isTypingClasses; - if (!styles) { - styles = {}; - } - if (!classes) { - classes = {}; - } - var _d = this.props, loadingMessagesStyle = _d.loadingMessagesStyle, chatFeedStyles = _d.chatFeedStyles, chatScrollAreaStyles = _d.chatScrollAreaStyles, loadingMessagesClasses = _d.loadingMessagesClasses, chatScrollAreaClasses = _d.chatScrollAreaClasses; - var typingAuthors = this.props.authors && - this.props.authors.filter(function (a) { return a.isTyping && a.id !== _this.props.yourAuthorId; }); - return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: classnames__WEBPACK_IMPORTED_MODULE_12___default()(_classes__WEBPACK_IMPORTED_MODULE_14__.defaultChatFeedClasses.chatPanel, this.props.className, classes === null || classes === void 0 ? void 0 : classes.chatPanel), style: __assign(__assign(__assign({}, _styles__WEBPACK_IMPORTED_MODULE_13__.defaultChatFeedStyles.chatPanel), (chatFeedStyles && chatFeedStyles.chatPanel)), this.props.style) }, - react__WEBPACK_IMPORTED_MODULE_0__.createElement(this.props.CustomScrollArea, { minHeight: this.props.minHeight, maxHeight: this.props.maxHeight, apiRef: this.apiRef, loadOldMessagesThreshold: this.props.loadOldMessagesThreshold, onLoadOldMessages: this.onLoadOldMessages, styles: chatScrollAreaStyles, classes: chatScrollAreaClasses }, - react__WEBPACK_IMPORTED_MODULE_0__.createElement(this.props.CustomChatMessagesContainer, { classes: this.props.chatMessagesContainerClasses, styles: this.props.chatMessagesContainerStyles, showIsTyping: this.props.showIsTyping, showRecipientAvatar: this.props.showRecipientAvatar, showRecipientLastSeenMessage: this.props.showRecipientLastSeenMessage }, - react__WEBPACK_IMPORTED_MODULE_0__.createElement(this.props.CustomLoadingMessages, { key: -1, isVisible: this.props.showLoadingMessages && this.state.isLoadingMessages, styles: loadingMessagesStyle, classes: loadingMessagesClasses }), - this.renderMessages(this.props.messages), - this.props.showIsTyping && (react__WEBPACK_IMPORTED_MODULE_0__.createElement(this.props.CustomIsTyping, { key: -2, typingAuthors: typingAuthors, styles: isTypingStyles, classes: isTypingClasses })))))); - }; - ChatFeed.prototype.onLoadOldMessages = function () { - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (!(!this.state.isLoadingMessages && this.props.hasOldMessages)) return [3 /*break*/, 5]; - return [4 /*yield*/, new Promise(function (resolve) { - _this.setState({ - isLoadingMessages: true, - }, function () { return resolve(); }); - })]; - case 1: - _b.sent(); - if (!this.props.onLoadOldMessages) return [3 /*break*/, 3]; - return [4 /*yield*/, this.props.onLoadOldMessages()]; - case 2: - _b.sent(); - _b.label = 3; - case 3: return [4 /*yield*/, new Promise(function (resolve) { - _this.setState({ - isLoadingMessages: false, - }, function () { - if (_this.scrollApi.scrolledToLoadThreshold()) { - _this.scrollApi.scrollTo(_this.props.loadOldMessagesThreshold + 1); - } - resolve(); - }); - })]; - case 4: - _b.sent(); - _b.label = 5; - case 5: return [2 /*return*/]; - } - }); - }); - }; - ChatFeed.defaultProps = { - messages: [], - authors: [], - CustomChatBubble: _ChatBubble__WEBPACK_IMPORTED_MODULE_2__.ChatBubble, - CustomBubbleGroup: _BubbleGroup__WEBPACK_IMPORTED_MODULE_1__.BubbleGroup, - CustomMessageRender: DefaultMessageRenderFunc, - CustomAvatar: _Avatar__WEBPACK_IMPORTED_MODULE_3__.Avatar, - CustomScrollArea: _ChatScrollArea__WEBPACK_IMPORTED_MODULE_5__.ChatScrollArea, - CustomIsTyping: _IsTyping__WEBPACK_IMPORTED_MODULE_4__.IsTyping, - CustomChatMessagesContainer: _ChatMessagesContainer__WEBPACK_IMPORTED_MODULE_6__.ChatMessagesContainer, - CustomLastSeenAvatar: _LastSeenAvatar__WEBPACK_IMPORTED_MODULE_7__.LastSeenAvatar, - CustomDateRow: _DateRow__WEBPACK_IMPORTED_MODULE_9__.DateRow, - CustomLoadingMessages: _LoadingMessages__WEBPACK_IMPORTED_MODULE_10__.LoadingMessages, - yourAuthorId: 0, - loadOldMessagesThreshold: 50, - CustomSystemChatBubble: _SystemChatBubble__WEBPACK_IMPORTED_MODULE_11__.SystemChatBubble, - }; - return ChatFeed; -}(react__WEBPACK_IMPORTED_MODULE_0__.PureComponent)); - - - -/***/ }) - -}, -/******/ function(__webpack_require__) { // webpackRuntimeModules -/******/ "use strict"; -/******/ -/******/ /* webpack/runtime/getFullHash */ -/******/ (() => { -/******/ __webpack_require__.h = () => ("cd5523b47876668a1fae") -/******/ })(); -/******/ -/******/ } -); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9yZWFjdC1iZWxsLWNoYXQvLi9zcmMvbGliL0NoYXRGZWVkL2luZGV4LnRzeCIsIndlYnBhY2s6Ly9yZWFjdC1iZWxsLWNoYXQvd2VicGFjay9ydW50aW1lL2dldEZ1bGxIYXNoIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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4gICAgICAgICAgICBjbGFzc2VzPXtkYXRlUm93Q2xhc3Nlc31cbiAgICAgICAgICAvPlxuICAgICAgICApO1xuICAgICAgfVxuICAgICAgbWVzc2FnZU5vZGVzID0gbWVzc2FnZU5vZGVzLmNvbmNhdChcbiAgICAgICAgbWVzc2FnZXNHcm91cC5tYXAoKG1lc3NhZ2UsIGluZGV4KSA9PiB7XG4gICAgICAgICAgZ3JvdXAucHVzaChtZXNzYWdlKTtcbiAgICAgICAgICAvLyBGaW5kIGRpZmYgaW4gbWVzc2FnZSB0eXBlIG9yIG5vIG1vcmUgbWVzc2FnZXNcbiAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAhbWVzc2FnZXNHcm91cFtpbmRleCArIDFdIHx8XG4gICAgICAgICAgICBtZXNzYWdlc0dyb3VwW2luZGV4ICsgMV0uYXV0aG9ySWQgIT09IG1lc3NhZ2UuYXV0aG9ySWRcbiAgICAgICAgICApIHtcbiAgICAgICAgICAgIGNvbnN0IG1lc3NhZ2VHcm91cCA9IGdyb3VwO1xuICAgICAgICAgICAgY29uc3QgYXV0aG9yID1cbiAgICAgICAgICAgICAgdGhpcy5wcm9wcy5hdXRob3JzICYmXG4gICAgICAgICAgICAgIHRoaXMucHJvcHMuYXV0aG9ycy5maWx0ZXIoYSA9PiBhLmlkID09PSBtZXNzYWdlLmF1dGhvcklkKVswXTtcbiAgICAgICAgICAgIGdyb3VwID0gW107XG4gICAgICAgICAgICBqc3hLZXkrKztcbiAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgIDxDdXN0b21CdWJibGVHcm91cFxuICAgICAgICAgICAgICAgIGtleT17anN4S2V5fVxuICAgICAgICAgICAgICAgIHlvdXJBdXRob3JJZD17dGhpcy5wcm9wcy55b3VyQXV0aG9ySWR9XG4gICAgICAgICAgICAgICAgbWVzc2FnZXM9e21lc3NhZ2VHcm91cH1cbiAgICAgICAgICAgICAgICBhdXRob3I9e2F1dGhvcn1cbiAgICAgICAgICAgICAgICBh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gICAgICAgICAgICBpc0xvYWRpbmdNZXNzYWdlczogZmFsc2UsXG4gICAgICAgICAgfSxcbiAgICAgICAgICAoKSA9PiB7XG4gICAgICAgICAgICBpZiAodGhpcy5zY3JvbGxBcGkuc2Nyb2xsZWRUb0xvYWRUaHJlc2hvbGQoKSkge1xuICAgICAgICAgICAgICB0aGlzLnNjcm9sbEFwaS5zY3JvbGxUbyh0aGlzLnByb3BzLmxvYWRPbGRNZXNzYWdlc1RocmVzaG9sZCArIDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVzb2x2ZSgpO1xuICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICAgIH0pO1xuICAgIH1cbiAgfVxufVxuIiwiX193ZWJwYWNrX3JlcXVpcmVfXy5oID0gKCkgPT4gKFwiY2Q1NTIzYjQ3ODc2NjY4YTFmYWVcIikiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/src/demo/wwwroot/index-bf1374f-wps-hmr.json b/src/demo/wwwroot/index-3fb4b1c-wps-hmr.json similarity index 100% rename from src/demo/wwwroot/index-bf1374f-wps-hmr.json rename to src/demo/wwwroot/index-3fb4b1c-wps-hmr.json diff --git a/src/demo/wwwroot/index.html b/src/demo/wwwroot/index.html index 6271aed..497cd2e 100644 --- a/src/demo/wwwroot/index.html +++ b/src/demo/wwwroot/index.html @@ -43,7 +43,7 @@ href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" /> - + diff --git a/src/lib/ChatScrollArea/index.tsx b/src/lib/ChatScrollArea/index.tsx index 8b02164..081ca5e 100644 --- a/src/lib/ChatScrollArea/index.tsx +++ b/src/lib/ChatScrollArea/index.tsx @@ -90,8 +90,10 @@ export class ChatScrollArea extends React.PureComponent { }) : (scrollContainer.scrollTop = top)), scrolledToBottom: () => - this.scrollContainer.clientHeight + this.scrollContainer.scrollTop === - this.scrollContainer.scrollHeight, + this.scrollContainer.scrollHeight - + this.scrollContainer.scrollTop - + this.scrollContainer.clientHeight < + 10, scrolledToLoadThreshold: () => this.scrollContainer && this.scrollContainer.scrollTop <= this.props.loadOldMessagesThreshold,