@elliemae/ds-chat 1.61.10 → 1.61.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/cjs/ChatDataTestids.js.map +1 -1
  2. package/cjs/index.js +2 -1
  3. package/cjs/index.js.map +1 -1
  4. package/cjs/parts/bubble/ChatBubble.js.map +1 -1
  5. package/cjs/parts/bubble/ChatBubbleArrow.js.map +1 -1
  6. package/cjs/parts/bubble/config/useValidateProps.js.map +1 -1
  7. package/cjs/parts/bubble/props.js.map +1 -1
  8. package/cjs/parts/bubble/styled.js.map +1 -1
  9. package/cjs/parts/chat-card/ChatCard.js.map +1 -1
  10. package/cjs/parts/chat-card/config/useValidateProps.js.map +1 -1
  11. package/cjs/parts/chat-card/props.js.map +1 -1
  12. package/cjs/parts/chat-card/styled.js.map +1 -1
  13. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  14. package/cjs/parts/chat-composer/config/useValidateProps.js.map +1 -1
  15. package/cjs/parts/chat-composer/props.js.map +1 -1
  16. package/cjs/parts/chat-composer/styled.js.map +1 -1
  17. package/cjs/parts/chat-container/ChatContainer.js +1 -0
  18. package/cjs/parts/chat-container/ChatContainer.js.map +1 -1
  19. package/cjs/parts/chat-container/config/useValidateProps.js.map +1 -1
  20. package/cjs/parts/chat-container/index.js +1 -0
  21. package/cjs/parts/chat-container/index.js.map +1 -1
  22. package/cjs/parts/chat-container/props.js.map +1 -1
  23. package/cjs/parts/chat-container/styled.js.map +1 -1
  24. package/cjs/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
  25. package/cjs/parts/chat-container-header/helpers.js.map +1 -1
  26. package/cjs/parts/chat-container-header/styled.js.map +1 -1
  27. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +9 -3
  28. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  29. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -1
  30. package/cjs/parts/chat-container-messages-list/index.js +2 -0
  31. package/cjs/parts/chat-container-messages-list/index.js.map +1 -1
  32. package/cjs/parts/chat-container-messages-list/props.js.map +1 -1
  33. package/cjs/parts/chat-container-messages-list/styled.js +7 -3
  34. package/cjs/parts/chat-container-messages-list/styled.js.map +1 -1
  35. package/cjs/parts/chat-container-messages-list/useGetNewMessages.js +34 -0
  36. package/cjs/parts/chat-container-messages-list/useGetNewMessages.js.map +1 -0
  37. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
  38. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +1 -1
  39. package/cjs/parts/chat-empty-state/props.js.map +1 -1
  40. package/cjs/parts/chat-empty-state/styled.js.map +1 -1
  41. package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
  42. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +1 -1
  43. package/cjs/parts/chat-sidebar/props.js.map +1 -1
  44. package/cjs/parts/chat-sidebar/styled.js.map +1 -1
  45. package/cjs/parts/floating-button/FloatingButton.js.map +1 -1
  46. package/cjs/parts/floating-button/props.js.map +1 -1
  47. package/cjs/parts/floating-button/styled.js.map +1 -1
  48. package/cjs/parts/floating-container/styled.js.map +1 -1
  49. package/cjs/parts/grid-influencer/InfluencerContainer.js +1 -0
  50. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +1 -1
  51. package/cjs/parts/grid-influencer/styled.js.map +1 -1
  52. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +1 -1
  53. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +1 -1
  54. package/cjs/parts/message-delimiter/props.js.map +1 -1
  55. package/cjs/parts/message-delimiter/styled.js.map +1 -1
  56. package/cjs/parts/sidebar-button/SidebarButton.js.map +1 -1
  57. package/cjs/parts/sidebar-button/props.js.map +1 -1
  58. package/cjs/parts/sidebar-button/styled.js.map +1 -1
  59. package/cjs/parts/system-message/SystemMessage.js.map +1 -1
  60. package/cjs/parts/system-message/config/useValidateProps.js.map +1 -1
  61. package/cjs/parts/system-message/props.js.map +1 -1
  62. package/cjs/parts/system-message/style.js.map +1 -1
  63. package/cjs/parts/tile-button/TileButton.js.map +1 -1
  64. package/cjs/parts/tile-button/config/useValidateProps.js.map +1 -1
  65. package/cjs/parts/tile-button/props.js.map +1 -1
  66. package/cjs/parts/tile-button/styled.js.map +1 -1
  67. package/cjs/prop-types.js.map +1 -1
  68. package/cjs/tests/utils.js.map +1 -1
  69. package/esm/ChatDataTestids.js.map +1 -1
  70. package/esm/index.js +2 -1
  71. package/esm/index.js.map +1 -1
  72. package/esm/parts/bubble/ChatBubble.js.map +1 -1
  73. package/esm/parts/bubble/ChatBubbleArrow.js.map +1 -1
  74. package/esm/parts/bubble/config/useValidateProps.js.map +1 -1
  75. package/esm/parts/bubble/props.js.map +1 -1
  76. package/esm/parts/bubble/styled.js.map +1 -1
  77. package/esm/parts/chat-card/ChatCard.js.map +1 -1
  78. package/esm/parts/chat-card/config/useValidateProps.js.map +1 -1
  79. package/esm/parts/chat-card/props.js.map +1 -1
  80. package/esm/parts/chat-card/styled.js.map +1 -1
  81. package/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  82. package/esm/parts/chat-composer/config/useValidateProps.js.map +1 -1
  83. package/esm/parts/chat-composer/props.js.map +1 -1
  84. package/esm/parts/chat-composer/styled.js.map +1 -1
  85. package/esm/parts/chat-container/ChatContainer.js +1 -0
  86. package/esm/parts/chat-container/ChatContainer.js.map +1 -1
  87. package/esm/parts/chat-container/config/useValidateProps.js.map +1 -1
  88. package/esm/parts/chat-container/index.js +1 -0
  89. package/esm/parts/chat-container/index.js.map +1 -1
  90. package/esm/parts/chat-container/props.js.map +1 -1
  91. package/esm/parts/chat-container/styled.js.map +1 -1
  92. package/esm/parts/chat-container-header/ChatContainerHeader.js.map +1 -1
  93. package/esm/parts/chat-container-header/helpers.js.map +1 -1
  94. package/esm/parts/chat-container-header/styled.js.map +1 -1
  95. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +10 -4
  96. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  97. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -1
  98. package/esm/parts/chat-container-messages-list/index.js +2 -0
  99. package/esm/parts/chat-container-messages-list/index.js.map +1 -1
  100. package/esm/parts/chat-container-messages-list/props.js.map +1 -1
  101. package/esm/parts/chat-container-messages-list/styled.js +7 -4
  102. package/esm/parts/chat-container-messages-list/styled.js.map +1 -1
  103. package/esm/parts/chat-container-messages-list/useGetNewMessages.js +26 -0
  104. package/esm/parts/chat-container-messages-list/useGetNewMessages.js.map +1 -0
  105. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
  106. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +1 -1
  107. package/esm/parts/chat-empty-state/props.js.map +1 -1
  108. package/esm/parts/chat-empty-state/styled.js.map +1 -1
  109. package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
  110. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +1 -1
  111. package/esm/parts/chat-sidebar/props.js.map +1 -1
  112. package/esm/parts/chat-sidebar/styled.js.map +1 -1
  113. package/esm/parts/floating-button/FloatingButton.js.map +1 -1
  114. package/esm/parts/floating-button/props.js.map +1 -1
  115. package/esm/parts/floating-button/styled.js.map +1 -1
  116. package/esm/parts/floating-container/styled.js.map +1 -1
  117. package/esm/parts/grid-influencer/InfluencerContainer.js +1 -0
  118. package/esm/parts/grid-influencer/InfluencerContainer.js.map +1 -1
  119. package/esm/parts/grid-influencer/styled.js.map +1 -1
  120. package/esm/parts/message-delimiter/MessageDelimiter.js.map +1 -1
  121. package/esm/parts/message-delimiter/config/useValidateProps.js.map +1 -1
  122. package/esm/parts/message-delimiter/props.js.map +1 -1
  123. package/esm/parts/message-delimiter/styled.js.map +1 -1
  124. package/esm/parts/sidebar-button/SidebarButton.js.map +1 -1
  125. package/esm/parts/sidebar-button/props.js.map +1 -1
  126. package/esm/parts/sidebar-button/styled.js.map +1 -1
  127. package/esm/parts/system-message/SystemMessage.js.map +1 -1
  128. package/esm/parts/system-message/config/useValidateProps.js.map +1 -1
  129. package/esm/parts/system-message/props.js.map +1 -1
  130. package/esm/parts/system-message/style.js.map +1 -1
  131. package/esm/parts/tile-button/TileButton.js.map +1 -1
  132. package/esm/parts/tile-button/config/useValidateProps.js.map +1 -1
  133. package/esm/parts/tile-button/props.js.map +1 -1
  134. package/esm/parts/tile-button/styled.js.map +1 -1
  135. package/esm/prop-types.js.map +1 -1
  136. package/esm/tests/utils.js.map +1 -1
  137. package/package.json +9 -9
  138. package/parts/chat-container-messages-list/useGetNewMessages/package.json +10 -0
@@ -16,6 +16,7 @@ var parts_systemMessage_SystemMessage = require('../system-message/SystemMessage
16
16
  var parts_chatContainerMessagesList_styled = require('./styled.js');
17
17
  var parts_chatContainerMessagesList_props = require('./props.js');
18
18
  var parts_chatContainerMessagesList_config_useValidateProps = require('./config/useValidateProps.js');
19
+ var parts_chatContainerMessagesList_useGetNewMessages = require('./useGetNewMessages.js');
19
20
  require('@elliemae/ds-icons');
20
21
  require('../bubble/styled.js');
21
22
  require('styled-components');
@@ -30,6 +31,7 @@ require('../message-delimiter/config/useValidateProps.js');
30
31
  require('../system-message/style.js');
31
32
  require('../system-message/props.js');
32
33
  require('../system-message/config/useValidateProps.js');
34
+ require('@babel/runtime/helpers/slicedToArray');
33
35
 
34
36
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
35
37
 
@@ -92,6 +94,7 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
92
94
  totalSize = _useVirtual.totalSize,
93
95
  virtualItems = _useVirtual.virtualItems;
94
96
 
97
+ var newMessages = parts_chatContainerMessagesList_useGetNewMessages.useGetNewMessages(messages);
95
98
  var debouncedScroll = React__default['default'].useMemo(function () {
96
99
  return lodash.debounce(function () {
97
100
  var _virtualListRef$curre2;
@@ -349,8 +352,6 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
349
352
  return /*#__PURE__*/React__default['default'].createElement(parts_chatContainerMessagesList_styled.StyledWrapper, null, /*#__PURE__*/React__default['default'].createElement(parts_chatContainerMessagesList_styled.StyledChatContainerContentList, {
350
353
  "data-testid": "chat-thread-container",
351
354
  tabIndex: 0,
352
- "aria-live": "polite",
353
- "aria-relevant": "additions",
354
355
  ref: virtualListRef,
355
356
  role: "list",
356
357
  onKeyDown: handleListKey
@@ -364,7 +365,12 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
364
365
  onClick: getMoreMessages,
365
366
  "data-testid": "ds-chat-load-more-btn",
366
367
  innerRef: loadMoreRef
367
- })) : null, render)));
368
+ })) : null, render)), /*#__PURE__*/React__default['default'].createElement(parts_chatContainerMessagesList_styled.StyledNewMessagesHiddenContainer, {
369
+ "aria-live": "polite",
370
+ "aria-hidden": "false"
371
+ }, newMessages.map(function (newMessage) {
372
+ return /*#__PURE__*/React__default['default'].createElement("p", null, newMessage.title, " ", newMessage.time, " ", newMessage.body, " ", newMessage.errorMessage, " ", newMessage.helpMessage);
373
+ })));
368
374
  };
369
375
 
370
376
  ChatContainerMessagesList.propTypes = parts_chatContainerMessagesList_props.listProps;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatContainerMessagesList.js","sources":["../../../../src/parts/chat-container-messages-list/ChatContainerMessagesList.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n/* eslint-disable max-lines */\nimport React, { CSSProperties } from 'react';\nimport { describe } from 'react-desc';\nimport { useVirtual } from 'react-virtual';\nimport DSButton from '@elliemae/ds-button';\nimport { debounce } from 'lodash';\nimport { ChatBubble, BUBBLE_TYPES } from '../bubble';\nimport { MessageDelimiter } from '../message-delimiter';\nimport { SystemMessage } from '../system-message';\nimport {\n StyledWrapperListItem,\n StyledChatContainerContentList,\n StyledChatContainerContentListScroll,\n StyledWrapper,\n StyledLoadMoreContainer,\n ListItem,\n} from './styled';\nimport { defaultProps, listProps, ChatContainerMessagesListProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\ntype getPaddingT = {\n hasMoreItems: string | undefined;\n bannerPosition: string | undefined;\n isLoading: string | undefined;\n};\nconst getPadding = ({ hasMoreItems, bannerPosition, isLoading }: getPaddingT) => {\n const padding = {\n paddingStart: 0,\n paddingEnd: -5,\n };\n if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'top')) padding.paddingStart = 42;\n else if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'bottom')) padding.paddingEnd = 42;\n return padding;\n};\n\nconst ChatContainerMessagesList = (props: ChatContainerMessagesListProps): JSX.Element => {\n useValidateProps(props, ChatContainerMessagesListWithSchema.toTypescript());\n\n const {\n sendingText,\n bannerPosition,\n sendingMessages,\n messages,\n actionRef,\n onScrollEnds,\n getMoreMessages,\n hasMoreItems,\n isLoading,\n bannerRef,\n } = props;\n const pendingOnScroll = React.useRef(false);\n const loadMoreRef = React.useRef(null);\n const virtualListRef = React.useRef<HTMLDivElement>();\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n const {\n scrollToIndex: vScroll,\n totalSize,\n virtualItems,\n } = useVirtual({\n size: messages.length,\n parentRef: virtualListRef,\n overscan: 15,\n ...getPadding({ hasMoreItems, bannerPosition, isLoading }),\n estimateSize: React.useCallback(() => 80, []),\n });\n\n const debouncedScroll = React.useMemo(\n () =>\n debounce((): number[] => {\n console.log('debound');\n if (document.visibilityState === 'hidden') {\n pendingOnScroll.current = true;\n return [];\n }\n if (!virtualListRef.current) return [];\n pendingOnScroll.current = false;\n const { bottom, top } = virtualListRef.current?.getBoundingClientRect();\n\n const list = virtualListRef.current.querySelectorAll(\n '[data-element=\"chat-element-list-item\"]',\n ) as NodeListOf<HTMLDivElement>;\n const indexList = [];\n list.forEach((item: HTMLElement) => {\n const { top: itemTop } = item.getBoundingClientRect();\n\n const itemPadding = 10;\n if (itemTop + itemPadding < bottom && itemTop + itemPadding > top) indexList.push(item.dataset.index);\n });\n if (onScrollEnds) onScrollEnds(indexList);\n return indexList;\n }, 500),\n [onScrollEnds],\n );\n\n const onScrollStop = React.useCallback(debouncedScroll, [debouncedScroll]);\n\n const onlyFocus = React.useCallback((index: number) => {\n setTimeout(() => {\n (virtualListRef.current.querySelector(`[data-index=\"${index}\"]`) as HTMLDivElement).focus();\n }, 300);\n }, []);\n\n const scrollAndFocus = React.useCallback(\n (index: number, b = { align: 'center' }) => {\n vScroll(index, b);\n onlyFocus(index);\n onScrollStop();\n },\n [onScrollStop, onlyFocus, vScroll],\n );\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.scrollToIndex = (a, b = { align: 'center' }) => {\n vScroll(a, b as any);\n onScrollStop();\n };\n actionRef.current.getMessagesInView = onScrollStop;\n onScrollStop(); // init useMemo due to debounce use.\n actionRef.current.focusToIndex = (a, b = { align: 'center' } as ScrollToOptions) => {\n scrollAndFocus(a, b);\n };\n actionRef.current.focusToIndexWithoutScroll = onlyFocus;\n actionRef.current.focusToList = () => {\n virtualListRef.current?.focus();\n };\n }\n }, [actionRef, onScrollStop, onlyFocus, scrollAndFocus, vScroll]);\n\n const handleKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n const index = Number(e.currentTarget.dataset.index);\n e.stopPropagation();\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (index > 0) {\n (virtualListRef.current?.querySelector(`[data-index=\"${index - 1}\"]`) as HTMLDivElement).focus();\n } else if (hasMoreItems === 'top') {\n loadMoreRef.current?.focus();\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (index < messages.length - 1) {\n (virtualListRef.current.querySelector(`[data-index=\"${index + 1}\"]`) as HTMLDivElement).focus();\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n if (bannerPosition) {\n e.preventDefault();\n bannerRef.current.focusOnWrapper();\n }\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus],\n );\n const handleListKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (document.activeElement !== loadMoreRef.current) {\n onlyFocus(onScrollStop().shift());\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (document.activeElement === loadMoreRef.current) {\n (virtualListRef.current.querySelector(`[data-index=\"0\"]`) as HTMLDivElement).focus();\n } else {\n onlyFocus(onScrollStop().pop());\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (document.activeElement !== loadMoreRef.current) {\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n // e.preventDefault();\n // loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n }\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus],\n );\n\n const checkPendingOnScroll = React.useCallback(() => {\n if (pendingOnScroll.current === true) onScrollStop();\n }, [onScrollStop]);\n\n React.useEffect(() => {\n let handlerCallback = null;\n const localVirtualRef = virtualListRef.current;\n const onScroll = () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n handlerCallback = setTimeout(onScrollStop, 300);\n };\n if (onScrollEnds) {\n virtualListRef.current.addEventListener('scroll', onScroll);\n }\n document.addEventListener('visibilitychange', checkPendingOnScroll);\n return () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);\n document.removeEventListener('visibilitychange', checkPendingOnScroll);\n };\n }, [onScrollStop, onScrollEnds, checkPendingOnScroll]);\n\n const render = React.useMemo(\n () =>\n virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const row = messages[index];\n const isSending = sendingMessages && sendingMessages.find((m) => m === row.dsId);\n const style: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `translateY(${start}px)`,\n width: '100%',\n };\n\n return (\n <ListItem\n data-element=\"chat-element-list-item\"\n data-index={index}\n key={`ds-chat-bubble-${index}-${row.dsId}-${row.type}`}\n style={style}\n ref={measureRef}\n tabIndex={-1}\n onKeyDown={handleKey}\n role=\"listitem\"\n >\n <StyledWrapperListItem type={row.type}>\n {row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? (\n // eslint-disable-next-line\n <ChatBubble {...(row as any)} helpMessage={isSending ? sendingText : row.helpMessage} />\n ) : null}\n {row.type === BUBBLE_TYPES.DELIMITER ? <MessageDelimiter {...(row as any)} /> : null}\n {row.type === BUBBLE_TYPES.SYSTEM ? <SystemMessage {...(row as any)} /> : null}\n </StyledWrapperListItem>\n </ListItem>\n );\n }),\n [virtualItems, messages, sendingMessages, handleKey, sendingText],\n );\n\n return (\n <StyledWrapper>\n <StyledChatContainerContentList\n data-testid=\"chat-thread-container\"\n tabIndex={0}\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n ref={virtualListRef}\n role=\"list\"\n onKeyDown={handleListKey}\n >\n <StyledChatContainerContentListScroll height={`${totalSize}px`}>\n {!isLoading && hasMoreItems ? (\n <StyledLoadMoreContainer hasMoreItems={hasMoreItems}>\n <DSButton\n labelText=\"Load More\"\n buttonType=\"secondary\"\n onClick={getMoreMessages}\n data-testid=\"ds-chat-load-more-btn\"\n innerRef={loadMoreRef}\n />\n </StyledLoadMoreContainer>\n ) : null}\n {render}\n </StyledChatContainerContentListScroll>\n </StyledChatContainerContentList>\n </StyledWrapper>\n );\n};\n\nChatContainerMessagesList.propTypes = listProps;\nChatContainerMessagesList.defaultProps = defaultProps;\nconst ChatContainerMessagesListWithSchema = describe(ChatContainerMessagesList);\nChatContainerMessagesListWithSchema.propTypes = listProps;\n\nexport { ChatContainerMessagesList, ChatContainerMessagesListWithSchema };\n"],"names":["getPadding","hasMoreItems","bannerPosition","isLoading","padding","paddingStart","paddingEnd","some","item","ChatContainerMessagesList","props","useValidateProps","ChatContainerMessagesListWithSchema","toTypescript","sendingText","sendingMessages","messages","actionRef","onScrollEnds","getMoreMessages","bannerRef","pendingOnScroll","React","useRef","loadMoreRef","virtualListRef","useVirtual","size","length","parentRef","overscan","estimateSize","useCallback","vScroll","scrollToIndex","totalSize","virtualItems","debouncedScroll","useMemo","debounce","document","visibilityState","current","getBoundingClientRect","bottom","top","list","querySelectorAll","indexList","forEach","itemTop","itemPadding","push","dataset","index","onScrollStop","onlyFocus","setTimeout","querySelector","focus","scrollAndFocus","b","align","useEffect","a","getMessagesInView","focusToIndex","focusToIndexWithoutScroll","focusToList","handleKey","e","key","Number","currentTarget","stopPropagation","preventDefault","shiftKey","focusOnWrapper","handleListKey","activeElement","shift","pop","focusToComposer","checkPendingOnScroll","handlerCallback","localVirtualRef","onScroll","clearTimeout","addEventListener","removeEventListener","render","map","virtualItem","measureRef","start","row","isSending","find","m","dsId","style","position","left","transform","width","ListItem","type","StyledWrapperListItem","BUBBLE_TYPES","SENDER","RECIPIENT","ChatBubble","helpMessage","DELIMITER","MessageDelimiter","SYSTEM","SystemMessage","StyledWrapper","StyledChatContainerContentList","StyledChatContainerContentListScroll","StyledLoadMoreContainer","DSButton","propTypes","listProps","defaultProps","describe"],"mappings":";;;;;;;;;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AME,IAAA,IAAI,EAAC,MANP;AAOE,IAAA,SAAS,EAAEqD;AAPb,kBASExD,wCAACiG,2EAAD;AAAsC,IAAA,MAAM,YAAKpF,SAAL;AAA5C,KACG,CAAChC,SAAD,IAAcF,YAAd,gBACCqB,wCAACkG,8DAAD;AAAyB,IAAA,YAAY,EAAEvH;AAAvC,kBACEqB,wCAACmG,4BAAD;AACE,IAAA,SAAS,EAAC,WADZ;AAEE,IAAA,UAAU,EAAC,WAFb;AAGE,IAAA,OAAO,EAAEtG,eAHX;AAIE,mBAAY,uBAJd;AAKE,IAAA,QAAQ,EAAEK;AALZ,IADF,CADD,GAUG,IAXN,EAYGkE,MAZH,CATF,CADF,CADF;AA4BD;;AAEDjF,yBAAyB,CAACiH,SAA1B,GAAsCC,+CAAtC;AACAlH,yBAAyB,CAACmH,YAA1B,GAAyCA,kDAAzC;IACMhH,mCAAmC,GAAGiH,kBAAQ,CAACpH,yBAAD;AACpDG,mCAAmC,CAAC8G,SAApC,GAAgDC,+CAAhD;;;;;"}
1
+ {"version":3,"file":"ChatContainerMessagesList.js","sources":["../../../../src/parts/chat-container-messages-list/ChatContainerMessagesList.tsx"],"sourcesContent":["/* eslint-disable complexity */\n/* eslint-disable jsx-a11y/no-noninteractive-tabindex */\n/* eslint-disable max-lines */\nimport React, { CSSProperties } from 'react';\nimport { describe } from 'react-desc';\nimport { useVirtual } from 'react-virtual';\nimport DSButton from '@elliemae/ds-button';\nimport { debounce } from 'lodash';\nimport { ChatBubble, BUBBLE_TYPES } from '../bubble';\nimport { MessageDelimiter } from '../message-delimiter';\nimport { SystemMessage } from '../system-message';\nimport {\n StyledWrapperListItem,\n StyledChatContainerContentList,\n StyledChatContainerContentListScroll,\n StyledWrapper,\n StyledLoadMoreContainer,\n ListItem,\n StyledNewMessagesHiddenContainer,\n} from './styled';\nimport { defaultProps, listProps, ChatContainerMessagesListProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\nimport { useGetNewMessages } from './useGetNewMessages';\n\ntype getPaddingT = {\n hasMoreItems: string | undefined;\n bannerPosition: string | undefined;\n isLoading: string | undefined;\n};\nconst getPadding = ({ hasMoreItems, bannerPosition, isLoading }: getPaddingT) => {\n const padding = {\n paddingStart: 0,\n paddingEnd: -5,\n };\n if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'top')) padding.paddingStart = 42;\n else if ([hasMoreItems, bannerPosition, isLoading].some((item) => item === 'bottom')) padding.paddingEnd = 42;\n return padding;\n};\n\nconst ChatContainerMessagesList = (props: ChatContainerMessagesListProps): JSX.Element => {\n useValidateProps(props, ChatContainerMessagesListWithSchema.toTypescript());\n\n const {\n sendingText,\n bannerPosition,\n sendingMessages,\n messages,\n actionRef,\n onScrollEnds,\n getMoreMessages,\n hasMoreItems,\n isLoading,\n bannerRef,\n } = props;\n const pendingOnScroll = React.useRef(false);\n const loadMoreRef = React.useRef(null);\n const virtualListRef = React.useRef<HTMLDivElement>();\n // estimateSize should not be really required given what was stated on\n // https://github.com/tannerlinsley/react-virtual/issues/23\n const {\n scrollToIndex: vScroll,\n totalSize,\n virtualItems,\n } = useVirtual({\n size: messages.length,\n parentRef: virtualListRef,\n overscan: 15,\n ...getPadding({ hasMoreItems, bannerPosition, isLoading }),\n estimateSize: React.useCallback(() => 80, []),\n });\n\n const newMessages = useGetNewMessages(messages);\n\n const debouncedScroll = React.useMemo(\n () =>\n debounce((): number[] => {\n console.log('debound');\n if (document.visibilityState === 'hidden') {\n pendingOnScroll.current = true;\n return [];\n }\n if (!virtualListRef.current) return [];\n pendingOnScroll.current = false;\n const { bottom, top } = virtualListRef.current?.getBoundingClientRect();\n\n const list = virtualListRef.current.querySelectorAll(\n '[data-element=\"chat-element-list-item\"]',\n ) as NodeListOf<HTMLDivElement>;\n const indexList = [];\n list.forEach((item: HTMLElement) => {\n const { top: itemTop } = item.getBoundingClientRect();\n\n const itemPadding = 10;\n if (itemTop + itemPadding < bottom && itemTop + itemPadding > top) indexList.push(item.dataset.index);\n });\n if (onScrollEnds) onScrollEnds(indexList);\n return indexList;\n }, 500),\n [onScrollEnds],\n );\n\n const onScrollStop = React.useCallback(debouncedScroll, [debouncedScroll]);\n\n const onlyFocus = React.useCallback((index: number) => {\n setTimeout(() => {\n (virtualListRef.current.querySelector(`[data-index=\"${index}\"]`) as HTMLDivElement).focus();\n }, 300);\n }, []);\n\n const scrollAndFocus = React.useCallback(\n (index: number, b = { align: 'center' }) => {\n vScroll(index, b);\n onlyFocus(index);\n onScrollStop();\n },\n [onScrollStop, onlyFocus, vScroll],\n );\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.scrollToIndex = (a, b = { align: 'center' }) => {\n vScroll(a, b as any);\n onScrollStop();\n };\n actionRef.current.getMessagesInView = onScrollStop;\n onScrollStop(); // init useMemo due to debounce use.\n actionRef.current.focusToIndex = (a, b = { align: 'center' } as ScrollToOptions) => {\n scrollAndFocus(a, b);\n };\n actionRef.current.focusToIndexWithoutScroll = onlyFocus;\n actionRef.current.focusToList = () => {\n virtualListRef.current?.focus();\n };\n }\n }, [actionRef, onScrollStop, onlyFocus, scrollAndFocus, vScroll]);\n\n const handleKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n const index = Number(e.currentTarget.dataset.index);\n e.stopPropagation();\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (index > 0) {\n (virtualListRef.current?.querySelector(`[data-index=\"${index - 1}\"]`) as HTMLDivElement).focus();\n } else if (hasMoreItems === 'top') {\n loadMoreRef.current?.focus();\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (index < messages.length - 1) {\n (virtualListRef.current.querySelector(`[data-index=\"${index + 1}\"]`) as HTMLDivElement).focus();\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n if (bannerPosition) {\n e.preventDefault();\n bannerRef.current.focusOnWrapper();\n }\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [bannerRef, hasMoreItems, messages.length, bannerPosition, scrollAndFocus],\n );\n const handleListKey = React.useCallback(\n (e: React.KeyboardEvent) => {\n const { key } = e;\n switch (key) {\n case 'ArrowUp':\n e.preventDefault();\n if (document.activeElement !== loadMoreRef.current) {\n onlyFocus(onScrollStop().shift());\n }\n break;\n case 'ArrowDown':\n e.preventDefault();\n if (document.activeElement === loadMoreRef.current) {\n (virtualListRef.current.querySelector(`[data-index=\"0\"]`) as HTMLDivElement).focus();\n } else {\n onlyFocus(onScrollStop().pop());\n }\n break;\n case 'Home':\n e.preventDefault();\n scrollAndFocus(0);\n break;\n case 'End':\n e.preventDefault();\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n if (document.activeElement !== loadMoreRef.current) {\n if (hasMoreItems === 'bottom' && !e.shiftKey) {\n e.preventDefault();\n loadMoreRef.current?.focus();\n } else if (hasMoreItems === 'top' && e.shiftKey) {\n // e.preventDefault();\n // loadMoreRef.current?.focus();\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n }\n } else if (!e.shiftKey) {\n e.preventDefault();\n actionRef.current.focusToComposer();\n } else {\n e.preventDefault();\n virtualListRef.current?.focus();\n }\n break;\n default:\n break;\n }\n },\n [actionRef, hasMoreItems, messages.length, onScrollStop, onlyFocus, scrollAndFocus],\n );\n\n const checkPendingOnScroll = React.useCallback(() => {\n if (pendingOnScroll.current === true) onScrollStop();\n }, [onScrollStop]);\n\n React.useEffect(() => {\n let handlerCallback = null;\n const localVirtualRef = virtualListRef.current;\n const onScroll = () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n handlerCallback = setTimeout(onScrollStop, 300);\n };\n if (onScrollEnds) {\n virtualListRef.current.addEventListener('scroll', onScroll);\n }\n document.addEventListener('visibilitychange', checkPendingOnScroll);\n return () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);\n document.removeEventListener('visibilitychange', checkPendingOnScroll);\n };\n }, [onScrollStop, onScrollEnds, checkPendingOnScroll]);\n\n const render = React.useMemo(\n () =>\n virtualItems.map((virtualItem) => {\n const { index, measureRef, start } = virtualItem;\n const row = messages[index];\n const isSending = sendingMessages && sendingMessages.find((m) => m === row.dsId);\n const style: CSSProperties = {\n position: 'absolute',\n top: 0,\n left: 0,\n transform: `translateY(${start}px)`,\n width: '100%',\n };\n\n return (\n <ListItem\n data-element=\"chat-element-list-item\"\n data-index={index}\n key={`ds-chat-bubble-${index}-${row.dsId}-${row.type}`}\n style={style}\n ref={measureRef}\n tabIndex={-1}\n onKeyDown={handleKey}\n role=\"listitem\"\n >\n <StyledWrapperListItem type={row.type}>\n {row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? (\n // eslint-disable-next-line\n <ChatBubble {...(row as any)} helpMessage={isSending ? sendingText : row.helpMessage} />\n ) : null}\n {row.type === BUBBLE_TYPES.DELIMITER ? <MessageDelimiter {...(row as any)} /> : null}\n {row.type === BUBBLE_TYPES.SYSTEM ? <SystemMessage {...(row as any)} /> : null}\n </StyledWrapperListItem>\n </ListItem>\n );\n }),\n [virtualItems, messages, sendingMessages, handleKey, sendingText],\n );\n\n return (\n <StyledWrapper>\n <StyledChatContainerContentList\n data-testid=\"chat-thread-container\"\n tabIndex={0}\n ref={virtualListRef}\n role=\"list\"\n onKeyDown={handleListKey}\n >\n <StyledChatContainerContentListScroll height={`${totalSize}px`}>\n {!isLoading && hasMoreItems ? (\n <StyledLoadMoreContainer hasMoreItems={hasMoreItems}>\n <DSButton\n labelText=\"Load More\"\n buttonType=\"secondary\"\n onClick={getMoreMessages}\n data-testid=\"ds-chat-load-more-btn\"\n innerRef={loadMoreRef}\n />\n </StyledLoadMoreContainer>\n ) : null}\n {render}\n </StyledChatContainerContentListScroll>\n </StyledChatContainerContentList>\n {/* We repeat the render with the new available messages */}\n <StyledNewMessagesHiddenContainer aria-live=\"polite\" aria-hidden=\"false\">\n {newMessages.map((newMessage) => (\n <p>\n {newMessage.title} {newMessage.time} {newMessage.body} {newMessage.errorMessage} {newMessage.helpMessage}\n </p>\n ))}\n </StyledNewMessagesHiddenContainer>\n </StyledWrapper>\n );\n};\n\nChatContainerMessagesList.propTypes = listProps;\nChatContainerMessagesList.defaultProps = defaultProps;\nconst ChatContainerMessagesListWithSchema = describe(ChatContainerMessagesList);\nChatContainerMessagesListWithSchema.propTypes = listProps;\n\nexport { ChatContainerMessagesList, ChatContainerMessagesListWithSchema };\n"],"names":["getPadding","hasMoreItems","bannerPosition","isLoading","padding","paddingStart","paddingEnd","some","item","ChatContainerMessagesList","props","useValidateProps","ChatContainerMessagesListWithSchema","toTypescript","sendingText","sendingMessages","messages","actionRef","onScrollEnds","getMoreMessages","bannerRef","pendingOnScroll","React","useRef","loadMoreRef","virtualListRef","useVirtual","size","length","parentRef","overscan","estimateSize","useCallback","vScroll","scrollToIndex","totalSize","virtualItems","newMessages","useGetNewMessages","debouncedScroll","useMemo","debounce","document","visibilityState","current","getBoundingClientRect","bottom","top","list","querySelectorAll","indexList","forEach","itemTop","itemPadding","push","dataset","index","onScrollStop","onlyFocus","setTimeout","querySelector","focus","scrollAndFocus","b","align","useEffect","a","getMessagesInView","focusToIndex","focusToIndexWithoutScroll","focusToList","handleKey","e","key","Number","currentTarget","stopPropagation","preventDefault","shiftKey","focusOnWrapper","handleListKey","activeElement","shift","pop","focusToComposer","checkPendingOnScroll","handlerCallback","localVirtualRef","onScroll","clearTimeout","addEventListener","removeEventListener","render","map","virtualItem","measureRef","start","row","isSending","find","m","dsId","style","position","left","transform","width","ListItem","type","StyledWrapperListItem","BUBBLE_TYPES","SENDER","RECIPIENT","ChatBubble","helpMessage","DELIMITER","MessageDelimiter","SYSTEM","SystemMessage","StyledWrapper","StyledChatContainerContentList","StyledChatContainerContentListScroll","StyledLoadMoreContainer","DSButton","StyledNewMessagesHiddenContainer","newMessage","title","time","body","errorMessage","propTypes","listProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,IAAMA,UAAU,GAAG,SAAbA,UAAa,OAA8D;EAAA,IAA3DC,YAA2D,QAA3DA,YAA2D;MAA7CC,cAA6C,QAA7CA,cAA6C;MAA7BC,SAA6B,QAA7BA,SAA6B;EAC/E,IAAMC,OAAO,GAAG;IACdC,YAAY,EAAE,CADA;IAEdC,UAAU,EAAE,CAAC;GAFf;EAIA,IAAI,CAACL,YAAD,EAAeC,cAAf,EAA+BC,SAA/B,EAA0CI,IAA1C,CAA+C,UAACC,IAAD;IAAA,OAAUA,IAAI,KAAK,KAAnB;GAA/C,CAAJ,EAA8EJ,OAAO,CAACC,YAAR,GAAuB,EAAvB,CAA9E,KACK,IAAI,CAACJ,YAAD,EAAeC,cAAf,EAA+BC,SAA/B,EAA0CI,IAA1C,CAA+C,UAACC,IAAD;IAAA,OAAUA,IAAI,KAAK,QAAnB;GAA/C,CAAJ,EAAiFJ,OAAO,CAACE,UAAR,GAAqB,EAArB;EACtF,OAAOF,OAAP;AACD,CARD;;IAUMK,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAwD;EACxFC,wEAAgB,CAACD,KAAD,EAAQE,mCAAmC,CAACC,YAApC,EAAR,CAAhB;EAEA,IACEC,WADF,GAWIJ,KAXJ,CACEI,WADF;MAEEZ,cAFF,GAWIQ,KAXJ,CAEER,cAFF;MAGEa,eAHF,GAWIL,KAXJ,CAGEK,eAHF;MAIEC,QAJF,GAWIN,KAXJ,CAIEM,QAJF;MAKEC,SALF,GAWIP,KAXJ,CAKEO,SALF;MAMEC,YANF,GAWIR,KAXJ,CAMEQ,YANF;MAOEC,eAPF,GA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GyH,kBAAQ,CAAC5H,yBAAD;AACpDG,mCAAmC,CAACsH,SAApC,GAAgDC,+CAAhD;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-container-messages-list/config/useValidateProps.tsx"],"sourcesContent":["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerMessagesListProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerMessagesListProps, schema: unknown): void => {\n useValidateTypescriptPropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidateTypescriptPropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAwCC,MAAxC,EAAkE;AAChGC,EAAAA,6CAA8B,CAACF,KAAD,EAAQC,MAAR,CAA9B;AACD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-container-messages-list/config/useValidateProps.tsx"],"sourcesContent":["import { useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerMessagesListProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerMessagesListProps, schema: unknown): void => {\n useValidateTypescriptPropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidateTypescriptPropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAwCC,MAAxC,EAAkE;EAChGC,6CAA8B,CAACF,KAAD,EAAQC,MAAR,CAA9B;AACD;;;;"}
@@ -31,6 +31,8 @@ require('../system-message/config/useValidateProps.js');
31
31
  require('./styled.js');
32
32
  require('./props.js');
33
33
  require('./config/useValidateProps.js');
34
+ require('./useGetNewMessages.js');
35
+ require('@babel/runtime/helpers/slicedToArray');
34
36
 
35
37
 
36
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-container-messages-list/props.ts"],"sourcesContent":["import { Ref } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BubbleProps } from '../bubble/props';\n\ninterface ActionRef {\n scrollToIndex: (n: number, b: { align: 'end' | 'center' | 'start' }) => void;\n getMessagesInView: () => number[];\n}\nexport interface ChatContainerMessagesListProps {\n messages: BubbleProps[];\n actionRef: any;\n onScrollEnds: (indexList: number[]) => number[];\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n sendingMessages?: Array<string | number>;\n sendingText: string;\n bannerPosition?: 'top' | 'bottom';\n bannerRef: React.MutableRefObject<{\n focusOnWrapper: (...args: any[]) => void;\n focusOnLink: (...args: any[]) => void;\n }>;\n}\n\nexport const defaultProps: ChatContainerMessagesListProps = {\n messages: [],\n actionRef: noop,\n onScrollEnds: () => [],\n getMoreMessages: noop,\n sendingMessages: undefined,\n sendingText: 'Sending',\n bannerPosition: undefined,\n bannerRef: undefined,\n};\n\nexport const listProps = {\n messages: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the ChatMessageList')\n .defaultValue(defaultProps.messages),\n actionRef: PropTypes.object\n .description(\n `Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToIndexWithoutScroll: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n `,\n )\n .defaultValue(defaultProps.actionRef),\n onScrollEnds: PropTypes.func.description(`Called when the scroll stops.`),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Keeps the load more space while the loading is in progress',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\n};\n"],"names":["defaultProps","messages","actionRef","noop","onScrollEnds","getMoreMessages","sendingMessages","undefined","sendingText","bannerPosition","bannerRef","listProps","PropTypes","arrayOf","object","description","defaultValue","func","isLoading","oneOf","hasMoreItems","oneOfType","string","number"],"mappings":";;;;;;;IAyBaA,YAA4C,GAAG;AAC1DC,EAAAA,QAAQ,EAAE,EADgD;AAE1DC,EAAAA,SAAS,EAAEC,WAF+C;AAG1DC,EAAAA,YAAY,EAAE;AAAA,WAAM,EAAN;AAAA,GAH4C;AAI1DC,EAAAA,eAAe,EAAEF,WAJyC;AAK1DG,EAAAA,eAAe,EAAEC,SALyC;AAM1DC,EAAAA,WAAW,EAAE,SAN6C;AAO1DC,EAAAA,cAAc,EAAEF,SAP0C;AAQ1DG,EAAAA,SAAS,EAAEH;AAR+C;IAW/CI,SAAS,GAAG;AACvBV,EAAAA,QAAQ,EAAEW,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EACPC,WADO,CACK,iFADL,EAEPC,YAFO,CAEMhB,YAAY,CAACC,QAFnB,CADa;AAIvBC,EAAAA,SAAS,EAAEU,mBAAS,CAACE,MAAV,CACRC,WADQ,+WAeRC,YAfQ,CAeKhB,YAAY,CAACE,SAflB,CAJY;AAoBvBE,EAAAA,YAAY,EAAEQ,mBAAS,CAACK,IAAV,CAAeF,WAAf,iCApBS;AAqBvBG,EAAAA,SAAS,EAAEN,mBAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBZ,SAAlB,CAAhB,EAA8CQ,WAA9C,CACT,4DADS,CArBY;AAwBvBK,EAAAA,YAAY,EAAER,mBAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBZ,SAAlB,CAAhB,EAA8CQ,WAA9C,CACZ,iEADY,CAxBS;AA2BvBV,EAAAA,eAAe,EAAEO,mBAAS,CAACK,IAAV,CACdF,WADc,CACF,0CADE,EAEdC,YAFc,CAEDhB,YAAY,CAACK,eAFZ,CA3BM;AA8BvBC,EAAAA,eAAe,EAAEM,mBAAS,CAACS,SAAV,CAAoB,CAACT,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACU,MAA5B,CAAD,EAAsCV,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACW,MAA5B,CAAtC,CAApB,EACdR,WADc,CACF,kCADE,EAEdC,YAFc,CAEDhB,YAAY,CAACM,eAFZ,CA9BM;AAiCvBE,EAAAA,WAAW,EAAEI,mBAAS,CAACU,MAAV,CACVP,WADU,CACE,kDADF,EAEVC,YAFU,CAEGhB,YAAY,CAACQ,WAFhB;AAjCU;;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-container-messages-list/props.ts"],"sourcesContent":["import { Ref } from 'react';\nimport { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { BubbleProps } from '../bubble/props';\n\ninterface ActionRef {\n scrollToIndex: (n: number, b: { align: 'end' | 'center' | 'start' }) => void;\n getMessagesInView: () => number[];\n}\nexport interface ChatContainerMessagesListProps {\n messages: BubbleProps[];\n actionRef: any;\n onScrollEnds: (indexList: number[]) => number[];\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: PropTypes.func;\n sendingMessages?: Array<string | number>;\n sendingText: string;\n bannerPosition?: 'top' | 'bottom';\n bannerRef: React.MutableRefObject<{\n focusOnWrapper: (...args: any[]) => void;\n focusOnLink: (...args: any[]) => void;\n }>;\n}\n\nexport const defaultProps: ChatContainerMessagesListProps = {\n messages: [],\n actionRef: noop,\n onScrollEnds: () => [],\n getMoreMessages: noop,\n sendingMessages: undefined,\n sendingText: 'Sending',\n bannerPosition: undefined,\n bannerRef: undefined,\n};\n\nexport const listProps = {\n messages: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the ChatMessageList')\n .defaultValue(defaultProps.messages),\n actionRef: PropTypes.object\n .description(\n `Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToIndexWithoutScroll: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n `,\n )\n .defaultValue(defaultProps.actionRef),\n onScrollEnds: PropTypes.func.description(`Called when the scroll stops.`),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Keeps the load more space while the loading is in progress',\n ),\n hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Load More button at the `top` or `bottom` of the container',\n ),\n getMoreMessages: PropTypes.func\n .description('Called when the user clicks on load more')\n .defaultValue(defaultProps.getMoreMessages),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultProps.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultProps.sendingText),\n};\n"],"names":["defaultProps","messages","actionRef","noop","onScrollEnds","getMoreMessages","sendingMessages","undefined","sendingText","bannerPosition","bannerRef","listProps","PropTypes","arrayOf","object","description","defaultValue","func","isLoading","oneOf","hasMoreItems","oneOfType","string","number"],"mappings":";;;;;;;IAyBaA,YAA4C,GAAG;EAC1DC,QAAQ,EAAE,EADgD;EAE1DC,SAAS,EAAEC,WAF+C;EAG1DC,YAAY,EAAE;IAAA,OAAM,EAAN;GAH4C;EAI1DC,eAAe,EAAEF,WAJyC;EAK1DG,eA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
38
38
  })(["width:100%;height:100%;padding:", ";padding-bottom:0;overflow-y:auto;overflow-x:hidden;"], function (props) {
39
39
  return props.theme.space.xs;
40
40
  });
41
- var StyledChatContainerContentListScroll = /*#__PURE__*/styled__default['default'].div.withConfig({
41
+ var StyledNewMessagesHiddenContainer = /*#__PURE__*/styled__default['default'].div.withConfig({
42
42
  componentId: "sc-1jhprzr-3"
43
+ })(["position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(100%);white-space:nowrap;"]);
44
+ var StyledChatContainerContentListScroll = /*#__PURE__*/styled__default['default'].div.withConfig({
45
+ componentId: "sc-1jhprzr-4"
43
46
  })(["width:100%;height:", ";position:relative;"], function (props) {
44
47
  return props.height;
45
48
  });
46
49
  var StyledLoadMoreContainer = /*#__PURE__*/styled__default['default'].div.withConfig({
47
- componentId: "sc-1jhprzr-4"
50
+ componentId: "sc-1jhprzr-5"
48
51
  })(["position:absolute;width:calc(100% + ", ");padding:", ";left:-", ";right:-", ";display:grid;justify-content:center;align-items:center;", " ", ""], function (props) {
49
52
  return props.theme.space.xxs;
50
53
  }, function (props) {
@@ -59,7 +62,7 @@ var StyledLoadMoreContainer = /*#__PURE__*/styled__default['default'].div.withCo
59
62
  return props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '';
60
63
  });
61
64
  var ListItem = /*#__PURE__*/styled__default['default'].div.withConfig({
62
- componentId: "sc-1jhprzr-5"
65
+ componentId: "sc-1jhprzr-6"
63
66
  })(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;top:0;left:-", ";pointer-events:none;border-radius:2px;background-color:#ebedf0;width:calc(100% + 24px);border:2px solid #1e79c2;height:100%;z-index:-1;}}"], function (props) {
64
67
  return props.theme.space.xxs;
65
68
  });
@@ -68,6 +71,7 @@ exports.ListItem = ListItem;
68
71
  exports.StyledChatContainerContentList = StyledChatContainerContentList;
69
72
  exports.StyledChatContainerContentListScroll = StyledChatContainerContentListScroll;
70
73
  exports.StyledLoadMoreContainer = StyledLoadMoreContainer;
74
+ exports.StyledNewMessagesHiddenContainer = StyledNewMessagesHiddenContainer;
71
75
  exports.StyledWrapper = StyledWrapper;
72
76
  exports.StyledWrapperListItem = StyledWrapperListItem;
73
77
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container-messages-list/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { BUBBLE_TYPES } from '../bubble/index';\nimport { BubbleProps } from '../bubble/props';\n\nexport const StyledWrapper = styled.div`\n width: 100%;\n height: 100%;\n`;\n\n// list\nexport const StyledWrapperListItem = styled.div<Partial<BubbleProps>>`\n min-width: 100%;\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER &&\n `padding: ${props.theme.space.xxs} ${props.theme.space.xxs} ${props.theme.space.xxs} 13%\n `};\n ${(props) =>\n props.type === BUBBLE_TYPES.RECIPIENT &&\n `padding: ${props.theme.space.xxs} 13% ${props.theme.space.xxs}\n ${props.theme.space.xxs}\n `};\n ${(props) =>\n props.type === BUBBLE_TYPES.SYSTEM &&\n `padding: ${props.theme.space.xxs} 0px\n `};\n`;\n\nexport const StyledChatContainerContentList = styled.div`\n width: 100%;\n height: 100%;\n padding: ${(props) => props.theme.space.xs};\n padding-bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\nexport const StyledChatContainerContentListScroll = styled.div<{ height: string }>`\n width: 100%;\n height: ${(props) => props.height};\n position: relative;\n`;\n\nexport const StyledLoadMoreContainer = styled.div<{ hasMoreItems?: 'top' | 'bottom' }>`\n position: absolute;\n width: calc(100% + ${(props) => props.theme.space.xxs});\n padding: ${(props) => props.theme.space.xxs};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n display: grid;\n justify-content: center;\n align-items: center;\n ${(props) => (props.hasMoreItems === 'top' ? 'top: 0;' : '')}\n ${(props) => (props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '')}\n`;\nexport const ListItem = styled.div`\n &:focus,\n &:focus-visible {\n outline: none;\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: -${(props) => props.theme.space.xxs};\n pointer-events: none;\n border-radius: 2px;\n background-color: #ebedf0;\n width: calc(100% + 24px);\n border: 2px solid #1e79c2;\n height: 100%;\n z-index: -1;\n }\n }\n`;\n"],"names":["StyledWrapper","styled","div","StyledWrapperListItem","props","type","BUBBLE_TYPES","SENDER","theme","space","xxs","RECIPIENT","SYSTEM","StyledChatContainerContentList","xs","StyledChatContainerContentListScroll","height","StyledLoadMoreContainer","hasMoreItems","ListItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,aAAa,gBAAGC,0BAAM,CAACC,GAAV;AAAA;AAAA;;IAMbC,qBAAqB,gBAAGF,0BAAM,CAACC,GAAV;AAAA;AAAA,uCAE9B,UAACE,KAAD;AAAA,SACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACC,MAA5B,uBACYH,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,cACqCN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GADvD,cAC8DN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GADhF,aADA;AAAA,CAF8B,EAM9B,UAACN,KAAD;AAAA,SACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACK,SAA5B,uBACYP,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,kBACyCN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD3D,mBAEEN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAFpB,SADA;AAAA,CAN8B,EAW9B,UAACN,KAAD;AAAA,SACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACM,MAA5B,uBACYR,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,aADA;AAAA,CAX8B;IAiBrBG,8BAA8B,gBAAGZ,0BAAM,CAACC,GAAV;AAAA;AAAA,gGAG9B,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBK,EAA7B;AAAA,CAH8B;IAQ9BC,oCAAoC,gBAAGd,0BAAM,CAACC,GAAV;AAAA;AAAA,kDAErC,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACY,MAAjB;AAAA,CAFqC;IAMpCC,uBAAuB,gBAAGhB,0BAAM,CAACC,GAAV;AAAA;AAAA,uJAEb,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAFa,EAGvB,UAACN,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAHuB,EAIzB,UAACN,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAJyB,EAKxB,UAACN,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CALwB,EAShC,UAACN,KAAD;AAAA,SAAYA,KAAK,CAACc,YAAN,KAAuB,KAAvB,GAA+B,SAA/B,GAA2C,EAAvD;AAAA,CATgC,EAUhC,UAACd,KAAD;AAAA,SAAYA,KAAK,CAACc,YAAN,KAAuB,QAAvB,GAAkC,YAAlC,GAAiD,EAA7D;AAAA,CAVgC;IAYvBC,QAAQ,gBAAGlB,0BAAM,CAACC,GAAV;AAAA;AAAA,2PASN,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CATM;;;;;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-container-messages-list/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { BUBBLE_TYPES } from '../bubble/index';\nimport { BubbleProps } from '../bubble/props';\n\nexport const StyledWrapper = styled.div`\n width: 100%;\n height: 100%;\n`;\n\n// list\nexport const StyledWrapperListItem = styled.div<Partial<BubbleProps>>`\n min-width: 100%;\n ${(props) =>\n props.type === BUBBLE_TYPES.SENDER &&\n `padding: ${props.theme.space.xxs} ${props.theme.space.xxs} ${props.theme.space.xxs} 13%\n `};\n ${(props) =>\n props.type === BUBBLE_TYPES.RECIPIENT &&\n `padding: ${props.theme.space.xxs} 13% ${props.theme.space.xxs}\n ${props.theme.space.xxs}\n `};\n ${(props) =>\n props.type === BUBBLE_TYPES.SYSTEM &&\n `padding: ${props.theme.space.xxs} 0px\n `};\n`;\n\nexport const StyledChatContainerContentList = styled.div`\n width: 100%;\n height: 100%;\n padding: ${(props) => props.theme.space.xs};\n padding-bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nexport const StyledNewMessagesHiddenContainer = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n\nexport const StyledChatContainerContentListScroll = styled.div<{ height: string }>`\n width: 100%;\n height: ${(props) => props.height};\n position: relative;\n`;\n\nexport const StyledLoadMoreContainer = styled.div<{ hasMoreItems?: 'top' | 'bottom' }>`\n position: absolute;\n width: calc(100% + ${(props) => props.theme.space.xxs});\n padding: ${(props) => props.theme.space.xxs};\n left: -${(props) => props.theme.space.xxs};\n right: -${(props) => props.theme.space.xxs};\n display: grid;\n justify-content: center;\n align-items: center;\n ${(props) => (props.hasMoreItems === 'top' ? 'top: 0;' : '')}\n ${(props) => (props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '')}\n`;\nexport const ListItem = styled.div`\n &:focus,\n &:focus-visible {\n outline: none;\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: -${(props) => props.theme.space.xxs};\n pointer-events: none;\n border-radius: 2px;\n background-color: #ebedf0;\n width: calc(100% + 24px);\n border: 2px solid #1e79c2;\n height: 100%;\n z-index: -1;\n }\n }\n`;\n"],"names":["StyledWrapper","styled","div","StyledWrapperListItem","props","type","BUBBLE_TYPES","SENDER","theme","space","xxs","RECIPIENT","SYSTEM","StyledChatContainerContentList","xs","StyledNewMessagesHiddenContainer","StyledChatContainerContentListScroll","height","StyledLoadMoreContainer","hasMoreItems","ListItem"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAIaA,aAAa,gBAAGC,0BAAM,CAACC,GAAV;EAAA;AAAA;;IAMbC,qBAAqB,gBAAGF,0BAAM,CAACC,GAAV;EAAA;AAAA,uCAE9B,UAACE,KAAD;EAAA,OACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACC,MAA5B,uBACYH,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,cACqCN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GADvD,cAC8DN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GADhF,aADA;AAAA,CAF8B,EAM9B,UAACN,KAAD;EAAA,OACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACK,SAA5B,uBACYP,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,kBACyCN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD3D,mBAEEN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAFpB,SADA;AAAA,CAN8B,EAW9B,UAACN,KAAD;EAAA,OACAA,KAAK,CAACC,IAAN,KAAeC,+BAAY,CAACM,MAA5B,uBACYR,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,aADA;AAAA,CAX8B;IAiBrBG,8BAA8B,gBAAGZ,0BAAM,CAACC,GAAV;EAAA;AAAA,gGAG9B,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBK,EAA7B;AAAA,CAH8B;IAS9BC,gCAAgC,gBAAGd,0BAAM,CAACC,GAAV;EAAA;AAAA;IAahCc,oCAAoC,gBAAGf,0BAAM,CAACC,GAAV;EAAA;AAAA,kDAErC,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACa,MAAjB;AAAA,CAFqC;IAMpCC,uBAAuB,gBAAGjB,0BAAM,CAACC,GAAV;EAAA;AAAA,uJAEb,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAFa,EAGvB,UAACN,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAHuB,EAIzB,UAACN,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAJyB,EAKxB,UAACN,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CALwB,EAShC,UAACN,KAAD;EAAA,OAAYA,KAAK,CAACe,YAAN,KAAuB,KAAvB,GAA+B,SAA/B,GAA2C,EAAvD;AAAA,CATgC,EAUhC,UAACf,KAAD;EAAA,OAAYA,KAAK,CAACe,YAAN,KAAuB,QAAvB,GAAkC,YAAlC,GAAiD,EAA7D;AAAA,CAVgC;IAYvBC,QAAQ,gBAAGnB,0BAAM,CAACC,GAAV;EAAA;AAAA,2PASN,UAACE,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CATM;;;;;;;;;;"}
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
6
+ var React = require('react');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var _slicedToArray__default = /*#__PURE__*/_interopDefaultLegacy(_slicedToArray);
11
+
12
+ var useGetNewMessages = function useGetNewMessages(messages) {
13
+ var _useState = React.useState({}),
14
+ _useState2 = _slicedToArray__default['default'](_useState, 2),
15
+ seenMessages = _useState2[0],
16
+ setSeenMessages = _useState2[1];
17
+
18
+ var newMessages = React.useMemo(function () {
19
+ var list = [];
20
+ messages.forEach(function (message) {
21
+ if (!(message.dsId in seenMessages)) {
22
+ list.push(message);
23
+ }
24
+ });
25
+ setSeenMessages(Object.fromEntries(messages.map(function (m) {
26
+ return [m.dsId, true];
27
+ })));
28
+ return list; // eslint-disable-next-line react-hooks/exhaustive-deps
29
+ }, [messages]);
30
+ return newMessages;
31
+ };
32
+
33
+ exports.useGetNewMessages = useGetNewMessages;
34
+ //# sourceMappingURL=useGetNewMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGetNewMessages.js","sources":["../../../../src/parts/chat-container-messages-list/useGetNewMessages.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport { BubbleProps } from '../bubble/props';\n\nexport const useGetNewMessages = (messages: BubbleProps[]) => {\n const [seenMessages, setSeenMessages] = useState<Record<BubbleProps['dsId'], true>>({});\n\n const newMessages = useMemo(() => {\n const list: BubbleProps[] = [];\n messages.forEach((message) => {\n if (!(message.dsId in seenMessages)) {\n list.push(message);\n }\n });\n setSeenMessages(Object.fromEntries(messages.map((m) => [m.dsId, true])));\n return list;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messages]);\n\n return newMessages;\n};\n"],"names":["useGetNewMessages","messages","useState","seenMessages","setSeenMessages","newMessages","useMemo","list","forEach","message","dsId","push","Object","fromEntries","map","m"],"mappings":";;;;;;;;;;;IAGaA,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,QAAD,EAA6B;EAC5D,gBAAwCC,cAAQ,CAAoC,EAApC,CAAhD;;MAAOC,YAAP;MAAqBC,eAArB;;EAEA,IAAMC,WAAW,GAAGC,aAAO,CAAC,YAAM;IAChC,IAAMC,IAAmB,GAAG,EAA5B;IACAN,QAAQ,CAACO,OAAT,CAAiB,UAACC,OAAD,EAAa;MAC5B,IAAI,EAAEA,OAAO,CAACC,IAAR,IAAgBP,YAAlB,CAAJ,EAAqC;QACnCI,IAAI,CAACI,IAAL,CAAUF,OAAV;;KAFJ;IAKAL,eAAe,CAACQ,MAAM,CAACC,WAAP,CAAmBZ,QAAQ,CAACa,GAAT,CAAa,UAACC,CAAD;MAAA,OAAO,CAACA,CAAC,CAACL,IAAH,EAAS,IAAT,CAAP;KAAb,CAAnB,CAAD,CAAf;IACA,OAAOH,IAAP,CARgC;GAAP,EAUxB,CAACN,QAAD,CAVwB,CAA3B;EAYA,OAAOI,WAAP;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatEmptyState.js","sources":["../../../../src/parts/chat-empty-state/ChatEmptyState.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport { ChatEmptyStateProps, emptyStateProps, defaultProps } from './props';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst ChatEmptyState = (props: ChatEmptyStateProps): JSX.Element => {\n useValidateProps(props, ChatEmptyStateListWithSchema.toJSON());\n const { label, action } = props;\n const MainContent = useMemo(\n () => (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Communications size=\"xxl\" color={['neutral', 400]} />\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <MessageWrapper>{label}</MessageWrapper>\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {action}\n </Grid>\n </Grid>\n ),\n [label, action],\n );\n return (\n <ChatEmptyStateWrapper alignItems=\"center\" justifyContent=\"center\">\n {MainContent}\n </ChatEmptyStateWrapper>\n );\n};\n\nChatEmptyState.propTypes = emptyStateProps;\nChatEmptyState.defaultProps = defaultProps;\nconst ChatEmptyStateListWithSchema = describe(ChatEmptyState);\nChatEmptyStateListWithSchema.propTypes = emptyStateProps;\n\nexport { ChatEmptyState, ChatEmptyStateListWithSchema };\n"],"names":["ChatEmptyState","props","useValidateProps","ChatEmptyStateListWithSchema","toJSON","label","action","MainContent","useMemo","React","Grid","Communications","MessageWrapper","ChatEmptyStateWrapper","propTypes","emptyStateProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;IAQMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAA6C;AAClEC,EAAAA,6DAAgB,CAACD,KAAD,EAAQE,4BAA4B,CAACC,MAA7B,EAAR,CAAhB;AACA,MAAQC,KAAR,GAA0BJ,KAA1B,CAAQI,KAAR;AAAA,MAAeC,MAAf,GAA0BL,KAA1B,CAAeK,MAAf;AACA,MAAMC,WAAW,GAAGC,aAAO,CACzB;AAAA,wBACEC,wCAACC,WAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACED,wCAACC,WAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACED,wCAACE,sBAAD;AAAgB,MAAA,IAAI,EAAC,KAArB;AAA2B,MAAA,KAAK,EAAE,CAAC,SAAD,EAAY,GAAZ;AAAlC,MADF,CADF,eAIEF,wCAACC,WAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACED,wCAACG,0CAAD,QAAiBP,KAAjB,CADF,CAJF,eAOEI,wCAACC,WAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,OACGJ,MADH,CAPF,CADF;AAAA,GADyB,EAczB,CAACD,KAAD,EAAQC,MAAR,CAdyB,CAA3B;AAgBA,sBACEG,wCAACI,iDAAD;AAAuB,IAAA,UAAU,EAAC,QAAlC;AAA2C,IAAA,cAAc,EAAC;AAA1D,KACGN,WADH,CADF;AAKD;;AAEDP,cAAc,CAACc,SAAf,GAA2BC,0CAA3B;AACAf,cAAc,CAACgB,YAAf,GAA8BA,uCAA9B;IACMb,4BAA4B,GAAGc,kBAAQ,CAACjB,cAAD;AAC7CG,4BAA4B,CAACW,SAA7B,GAAyCC,0CAAzC;;;;;"}
1
+ {"version":3,"file":"ChatEmptyState.js","sources":["../../../../src/parts/chat-empty-state/ChatEmptyState.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { describe } from 'react-desc';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport { ChatEmptyStateProps, emptyStateProps, defaultProps } from './props';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst ChatEmptyState = (props: ChatEmptyStateProps): JSX.Element => {\n useValidateProps(props, ChatEmptyStateListWithSchema.toJSON());\n const { label, action } = props;\n const MainContent = useMemo(\n () => (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Communications size=\"xxl\" color={['neutral', 400]} />\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <MessageWrapper>{label}</MessageWrapper>\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {action}\n </Grid>\n </Grid>\n ),\n [label, action],\n );\n return (\n <ChatEmptyStateWrapper alignItems=\"center\" justifyContent=\"center\">\n {MainContent}\n </ChatEmptyStateWrapper>\n );\n};\n\nChatEmptyState.propTypes = emptyStateProps;\nChatEmptyState.defaultProps = defaultProps;\nconst ChatEmptyStateListWithSchema = describe(ChatEmptyState);\nChatEmptyStateListWithSchema.propTypes = emptyStateProps;\n\nexport { ChatEmptyState, ChatEmptyStateListWithSchema };\n"],"names":["ChatEmptyState","props","useValidateProps","ChatEmptyStateListWithSchema","toJSON","label","action","MainContent","useMemo","React","Grid","Communications","MessageWrapper","ChatEmptyStateWrapper","propTypes","emptyStateProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;IAQMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAA6C;EAClEC,6DAAgB,CAACD,KAAD,EAAQE,4BAA4B,CAACC,MAA7B,EAAR,CAAhB;EACA,IAAQC,KAAR,GAA0BJ,KAA1B,CAAQI,KAAR;MAAeC,MAAf,GAA0BL,KAA1B,CAAeK,MAAf;EACA,IAAMC,WAAW,GAAGC,aAAO,CACzB;IAAA,oBACEC,wCAACC,WAAD;MAAM,UAAU,EAAC,QAAjB;MAA0B,cAAc,EAAC;oBACvCD,wCAACC,WAAD;MAAM,UAAU,EAAC,QAAjB;MAA0B,cAAc,EAAC;oBACvCD,wCAACE,sBAAD;MAAgB,IAAI,EAAC,KAArB;MAA2B,KAAK,EAAE,CAAC,SAAD,EAAY,GAAZ;MADpC,CADF,eAIEF,wCAACC,WAAD;MAAM,UAAU,EAAC,QAAjB;MAA0B,cAAc,EAAC;oBACvCD,wCAACG,0CAAD,QAAiBP,KAAjB,CADF,CAJF,eAOEI,wCAACC,WAAD;MAAM,UAAU,EAAC,QAAjB;MAA0B,cAAc,EAAC;OACtCJ,MADH,CAPF,CADF;GADyB,EAczB,CAACD,KAAD,EAAQC,MAAR,CAdyB,CAA3B;EAgBA,oBACEG,wCAACI,iDAAD;IAAuB,UAAU,EAAC,QAAlC;IAA2C,cAAc,EAAC;KACvDN,WADH,CADF;AAKD;;AAEDP,cAAc,CAACc,SAAf,GAA2BC,0CAA3B;AACAf,cAAc,CAACgB,YAAf,GAA8BA,uCAA9B;IACMb,4BAA4B,GAAGc,kBAAQ,CAACjB,cAAD;AAC7CG,4BAA4B,CAACW,SAA7B,GAAyCC,0CAAzC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-empty-state/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatEmptyStateProps } from '../props';\n\nexport const useValidateProps = (props: ChatEmptyStateProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6BC,MAA7B,EAAuD;AACrFC,EAAAA,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-empty-state/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatEmptyStateProps } from '../props';\n\nexport const useValidateProps = (props: ChatEmptyStateProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6BC,MAA7B,EAAuD;EACrFC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-empty-state/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport interface ChatEmptyStateProps {\n label: string;\n action: React.FC;\n}\n\nexport const defaultProps: ChatEmptyStateProps = {\n label: 'No Messages Yet',\n action: null,\n};\n\nexport const emptyStateProps = {\n label: PropTypes.arrayOf(PropTypes.string)\n .description('No Message to show text helper')\n .defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element').defaultValue(defaultProps.action),\n};\n"],"names":["defaultProps","label","action","emptyStateProps","PropTypes","arrayOf","string","description","defaultValue","node"],"mappings":";;;;;;IAOaA,YAAiC,GAAG;AAC/CC,EAAAA,KAAK,EAAE,iBADwC;AAE/CC,EAAAA,MAAM,EAAE;AAFuC;IAKpCC,eAAe,GAAG;AAC7BF,EAAAA,KAAK,EAAEG,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EACJC,WADI,CACQ,gCADR,EAEJC,YAFI,CAESR,YAAY,CAACC,KAFtB,CADsB;AAI7BC,EAAAA,MAAM,EAAEE,mBAAS,CAACK,IAAV,CAAeF,WAAf,CAA2B,gBAA3B,EAA6CC,YAA7C,CAA0DR,YAAY,CAACE,MAAvE;AAJqB;;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-empty-state/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport interface ChatEmptyStateProps {\n label: string;\n action: React.FC;\n}\n\nexport const defaultProps: ChatEmptyStateProps = {\n label: 'No Messages Yet',\n action: null,\n};\n\nexport const emptyStateProps = {\n label: PropTypes.arrayOf(PropTypes.string)\n .description('No Message to show text helper')\n .defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element').defaultValue(defaultProps.action),\n};\n"],"names":["defaultProps","label","action","emptyStateProps","PropTypes","arrayOf","string","description","defaultValue","node"],"mappings":";;;;;;IAOaA,YAAiC,GAAG;EAC/CC,KAAK,EAAE,iBADwC;EAE/CC,MAAM,EAAE;AAFuC;IAKpCC,eAAe,GAAG;EAC7BF,KAAK,EAAEG,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EACJC,WADI,CACQ,gCADR,EAEJC,YAFI,CAESR,YAAY,CAACC,KAFtB,CADsB;EAI7BC,MAAM,EAAEE,mBAAS,CAACK,IAAV,CAAeF,WAAf,CAA2B,gBAA3B,EAA6CC,YAA7C,CAA0DR,YAAY,CAACE,MAAvE;AAJqB;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-empty-state/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const CONTAINER_WIDTH = 300;\n\nexport const ChatEmptyStateWrapper = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n`;\n\nexport const MessageWrapper = styled.p`\n font-size: 18px;\n`;\n"],"names":["CONTAINER_WIDTH","ChatEmptyStateWrapper","styled","Grid","props","theme","colors","neutral","MessageWrapper","p"],"mappings":";;;;;;;;;;;IAGaA,eAAe,GAAG;IAElBC,qBAAqB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,sEAEnBH,eAFmB,EAIlB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJkB;IAOrBC,cAAc,gBAAGN,0BAAM,CAACO,CAAV;AAAA;AAAA;;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-empty-state/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\n\nexport const CONTAINER_WIDTH = 300;\n\nexport const ChatEmptyStateWrapper = styled(Grid)`\n height: 100%;\n min-width: ${CONTAINER_WIDTH}px;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n`;\n\nexport const MessageWrapper = styled.p`\n font-size: 18px;\n`;\n"],"names":["CONTAINER_WIDTH","ChatEmptyStateWrapper","styled","Grid","props","theme","colors","neutral","MessageWrapper","p"],"mappings":";;;;;;;;;;;IAGaA,eAAe,GAAG;IAElBC,qBAAqB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,sEAEnBH,eAFmB,EAIlB,UAACI,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJkB;IAOrBC,cAAc,gBAAGN,0BAAM,CAACO,CAAV;EAAA;AAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = props;\n const { current: listRef } = React.useRef({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref) listRef[ref.dataset.key] = ref;\n },\n [listRef],\n );\n React.useEffect(() => {\n if (actionRef.current.listRef) {\n actionRef.current.listRef = listRef;\n }\n }, [sidebarItems, expanded, actionRef, listRef]);\n\n return (\n <StyledSideBarContainer rows={[1, 'auto']} ref={listRef}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\n {...p}\n selected={selectedItem === p.dsId}\n tooltipPlacement={tooltipPlacement}\n disableTooltip={enableTooltipWhenIsClosed ? false : !expanded}\n />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.propTypes = chatSidebarProps;\nSideBarChat.defaultProps = defaultProps;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],"names":["FooterChat","expanded","onFooterClose","onFooterExpand","footerButtonExtraProps","React","SidebarButton","MenuCollapse","MenuExpand","SideBarChat","props","useValidateProps","SideBarChatWithSchema","toJSON","sidebarItems","selectedItem","tooltipPlacement","enableTooltipWhenIsClosed","actionRef","useRef","listRef","current","registerReference","useCallback","ref","dataset","key","useEffect","StyledSideBarContainer","StyledSideBarButtonsContainer","map","p","TileButton","dsId","propTypes","chatSidebarProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,UAAU,GAAG,SAAbA,UAAa;AAAA,MACjBC,QADiB,QACjBA,QADiB;AAAA,MAEjBC,aAFiB,QAEjBA,aAFiB;AAAA,MAGjBC,cAHiB,QAGjBA,cAHiB;AAAA,MAIjBC,sBAJiB,QAIjBA,sBAJiB;AAAA,sBAMjBC,wCAACC,+CAAD;AACE,IAAA,IAAI,EAAC,gBADP;AAEE,IAAA,KAAK,EAAE,IAFT;AAGE,IAAA,IAAI,EAAE,CAACL,QAAD,GAAYM,oBAAZ,GAA2BC,kBAHnC;AAIE,IAAA,OAAO,EAAEP,QAAQ,GAAGC,aAAH,GAAmBC,cAJtC;AAKE,oBAAcF,QALhB;AAME,kBAAYG,sBAAsB,CAAC,YAAD;AANpC,IANiB;AAAA,CAAnB;;IAgBMK,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAA0C;AAC5DC,EAAAA,0DAAgB,CAACD,KAAD,EAAQE,qBAAqB,CAACC,MAAtB,EAAR,CAAhB;AACA,MACEC,YADF,GAUIJ,KAVJ,CACEI,YADF;AAAA,MAEEb,QAFF,GAUIS,KAVJ,CAEET,QAFF;AAAA,MAGEC,aAHF,GAUIQ,KAVJ,CAGER,aAHF;AAAA,MAIEC,cAJF,GAUIO,KAVJ,CAIEP,cAJF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AG,KAAH,GAAW,CAAChB;AANvD,OADgB;AAAA,GAAjB,CADH,CADF,eAaEI,wCAAC,UAAD;AACE,IAAA,QAAQ,EAAEJ,QADZ;AAEE,IAAA,aAAa,EAAEC,aAFjB;AAGE,IAAA,cAAc,EAAEC,cAHlB;AAIE,IAAA,sBAAsB,EAAEC;AAJ1B,IAbF,CADF;AAsBD;;AAEDK,WAAW,CAACyB,SAAZ,GAAwBC,wCAAxB;AACA1B,WAAW,CAAC2B,YAAZ,GAA2BA,oCAA3B;IACMxB,qBAAqB,GAAGyB,kBAAQ,CAAC5B,WAAD;AACtCG,qBAAqB,CAACsB,SAAtB,GAAkCC,wCAAlC;;;;;"}
1
+ {"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<CharSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\n label={null}\n Icon={!expanded ? MenuCollapse : MenuExpand}\n onClick={expanded ? onFooterClose : onFooterExpand}\n aria-pressed={expanded}\n aria-label={footerButtonExtraProps['aria-label']}\n />\n);\n\nconst SideBarChat = (props: CharSidebarProps): JSX.Element => {\n useValidateProps(props, SideBarChatWithSchema.toJSON());\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = props;\n const { current: listRef } = React.useRef({});\n const registerReference = React.useCallback(\n (ref: HTMLElement) => {\n if (ref) listRef[ref.dataset.key] = ref;\n },\n [listRef],\n );\n React.useEffect(() => {\n if (actionRef.current.listRef) {\n actionRef.current.listRef = listRef;\n }\n }, [sidebarItems, expanded, actionRef, listRef]);\n\n return (\n <StyledSideBarContainer rows={[1, 'auto']} ref={listRef}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton\n key={p.dsId}\n innerRef={registerReference}\n {...p}\n selected={selectedItem === p.dsId}\n tooltipPlacement={tooltipPlacement}\n disableTooltip={enableTooltipWhenIsClosed ? false : !expanded}\n />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\n );\n};\n\nSideBarChat.propTypes = chatSidebarProps;\nSideBarChat.defaultProps = defaultProps;\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],"names":["FooterChat","expanded","onFooterClose","onFooterExpand","footerButtonExtraProps","React","SidebarButton","MenuCollapse","MenuExpand","SideBarChat","props","useValidateProps","SideBarChatWithSchema","toJSON","sidebarItems","selectedItem","tooltipPlacement","enableTooltipWhenIsClosed","actionRef","useRef","listRef","current","registerReference","useCallback","ref","dataset","key","useEffect","StyledSideBarContainer","StyledSideBarButtonsContainer","map","p","TileButton","dsId","propTypes","chatSidebarProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,UAAU,GAAG,SAAbA,UAAa;EAAA,IACjBC,QADiB,QACjBA,QADiB;MAEjBC,aAFiB,QAEjBA,aAFiB;MAGjBC,cAHiB,QAGjBA,cAHiB;MAIjBC,sBAJiB,QAIjBA,sBAJiB;EAAA,oBAMjBC,wCAACC,+CAAD;IACE,I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oCE,OAApC,CAJH;EAMA,oBACEf,wCAACuB,+CAAD;IAAwB,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ,CAA9B;IAA2C,GAAG,EAAER;kBAC9Cf,wCAACwB,sDAAD,QACGf,YAAY,CAACgB,GAAb,CAAiB,UAACC,CAAD;IAAA,oBAChB1B,wCAAC2B,sCAAD;MACE,GAAG,EAAED,CAAC,CAACE,IADT;MAEE,QAAQ,EAAEX;OACNS,CAHN;MAIE,QAAQ,EAAEhB,YAAY,KAAKgB,CAAC,CAACE,IAJ/B;MAKE,gBAAgB,EAAEjB,gBALpB;MAME,cAAc,EAAEC,yBAAyB,GAAG,KAAH,GAAW,CAAChB;OAPvC;GAAjB,CADH,CADF,eAaEI,wCAAC,UAAD;IACE,QAAQ,EAAEJ,QADZ;IAEE,aAAa,EAAEC,aAFjB;IAGE,cAAc,EAAEC,cAHlB;IAIE,sBAAsB,EAAEC;IAjB5B,CADF;AAsBD;;AAEDK,WAAW,CAACyB,SAAZ,GAAwBC,wCAAxB;AACA1B,WAAW,CAAC2B,YAAZ,GAA2BA,oCAA3B;IACMxB,qBAAqB,GAAGyB,kBAAQ,CAAC5B,WAAD;AACtCG,qBAAqB,CAACsB,SAAtB,GAAkCC,wCAAlC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-sidebar/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { CharSidebarProps } from '../props';\n\nexport const useValidateProps = (props: CharSidebarProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA0BC,MAA1B,EAAoD;AAClFC,EAAAA,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-sidebar/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { CharSidebarProps } from '../props';\n\nexport const useValidateProps = (props: CharSidebarProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA0BC,MAA1B,EAAoD;EAClFC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, any>;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n enableTooltipWhenIsClosed: boolean;\n actionRef: React.MutableRefObject<any>;\n}\n\nexport const defaultProps: CharSidebarProps = {\n expanded: false,\n selectedItem: undefined,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n actionRef: {\n current: {\n listRef: [],\n },\n },\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string\n .description('The id of the chat item you want to be opened')\n .defaultValue(defaultProps.selectedItem),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object\n .description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n )\n .defaultValue(defaultProps.actionRef),\n};\n"],"names":["defaultProps","expanded","selectedItem","undefined","sidebarItems","onFooterExpand","noop","onFooterClose","onHeaderExpand","onHeaderClose","footerButtonExtraProps","tooltipPlacement","enableTooltipWhenIsClosed","actionRef","current","listRef","chatSidebarProps","PropTypes","arrayOf","object","description","defaultValue","bool","string","oneOf","func"],"mappings":";;;;;;;IA8BaA,YAA8B,GAAG;AAC5CC,EAAAA,QAAQ,EAAE,KADkC;AAE5CC,EAAAA,YAAY,EAAEC,SAF8B;AAG5CC,EAAAA,YAAY,EAAE,EAH8B;AAI5CC,EAAAA,cAAc,EAAEC,WAJ4B;AAK5CC,E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YAAY,CAACK,cAFb,CA7Bc;AAgC9BE,EAAAA,aAAa,EAAEU,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAECrB,YAAY,CAACO,aAFd,CAhCe;AAmC9BC,EAAAA,cAAc,EAAES,mBAAS,CAACQ,IAAV,CACbL,WADa,CACD,6DADC,EAEbC,YAFa,CAEArB,YAAY,CAACQ,cAFb,CAnCc;AAsC9BC,EAAAA,aAAa,EAAEQ,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAECrB,YAAY,CAACS,aAFd,CAtCe;AAyC9BC,EAAAA,sBAAsB,EAAEO,mBAAS,CAACE,MAAV,CACrBC,WADqB,CACT,2CADS,EAErBC,YAFqB,CAERrB,YAAY,CAACU,sBAFL,CAzCM;AA4C9BG,EAAAA,SAAS,EAAEI,mBAAS,CAACE,MAAV,CACRC,WADQ,2EAQRC,YARQ,CAQKrB,YAAY,CAACa,SARlB;AA5CmB;;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../../src/parts/chat-sidebar/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport { TileButtonProps } from '../tile-button/props';\n\nexport interface CharSidebarProps {\n sidebarItems: TileButtonProps[];\n expanded: boolean;\n selectedItem: undefined;\n onFooterClose: () => void;\n onFooterExpand: () => void;\n onHeaderExpand: () => void;\n onHeaderClose: () => void;\n footerButtonExtraProps: Record<string, any>;\n tooltipPlacement:\n | 'top-start'\n | 'top'\n | 'top-end'\n | 'right-start'\n | 'right'\n | 'right-end'\n | 'bottom-end'\n | 'bottom'\n | 'bottom-start'\n | 'left-end'\n | 'left'\n | 'left-start';\n enableTooltipWhenIsClosed: boolean;\n actionRef: React.MutableRefObject<any>;\n}\n\nexport const defaultProps: CharSidebarProps = {\n expanded: false,\n selectedItem: undefined,\n sidebarItems: [],\n onFooterExpand: noop,\n onFooterClose: noop,\n onHeaderExpand: noop,\n onHeaderClose: noop,\n footerButtonExtraProps: { 'aria-label': 'expand or collapse button' },\n tooltipPlacement: 'right',\n enableTooltipWhenIsClosed: false,\n actionRef: {\n current: {\n listRef: [],\n },\n },\n};\n\nexport const chatSidebarProps = {\n sidebarItems: PropTypes.arrayOf(PropTypes.object)\n .description('The array of out-of-the-box items you want to render inside the sidebar nav of the chat')\n .defaultValue(defaultProps.sidebarItems),\n expanded: PropTypes.bool\n .description('Whether to show the chat expanded or collapsed')\n .defaultValue(defaultProps.expanded),\n selectedItem: PropTypes.string\n .description('The id of the chat item you want to be opened')\n .defaultValue(defaultProps.selectedItem),\n tooltipPlacement: PropTypes.oneOf([\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n ])\n .description('start placement preferences, as per popperjs placement option')\n .defaultValue(\"'right'\"),\n enableTooltipWhenIsClosed: PropTypes.bool\n .description('Enable tooltip when is closed')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterExpand: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultProps.onFooterExpand),\n onFooterClose: PropTypes.func\n .description('The function to call when the chat is closed via the footer')\n .defaultValue(defaultProps.onFooterClose),\n onHeaderExpand: PropTypes.func\n .description('The function to call when the chat is opened via the header')\n .defaultValue(defaultProps.onHeaderExpand),\n onHeaderClose: PropTypes.func\n .description('The function to call when the chat is closed via the header')\n .defaultValue(defaultProps.onHeaderClose),\n footerButtonExtraProps: PropTypes.object\n .description('Expand/collapse footer button extra props')\n .defaultValue(defaultProps.footerButtonExtraProps),\n actionRef: PropTypes.object\n .description(\n `Action ref for sidebar\n {\n listRef: references to Tiles\n }\n `,\n )\n .defaultValue(defaultProps.actionRef),\n};\n"],"names":["defaultProps","expanded","selectedItem","undefined","sidebarItems","onFooterExpand","noop","onFooterClose","onHeaderExpand","onHeaderClose","footerButtonExtraProps","tooltipPlacement","enableTooltipWhenIsClosed","actionRef","current","listRef","chatSidebarProps","PropTypes","arrayOf","object","description","defaultValue","bool","string","oneOf","func"],"mappings":";;;;;;;IA8BaA,YAA8B,GAAG;EAC5CC,QAAQ,EAAE,KADkC;EAE5CC,YAAY,EAAEC,SAF8B;EAG5CC,YAAY,EAAE,EAH8B;EAI5CC,cAAc,EAAEC,WAJ4B;EAK5CC,aAAa,EAAED,WAL6B;EAM5CE,cAAc,EAAEF,WAN4B;EAO5CG,aAAa,EAAEH,WAP6B;EAQ5CI,sBAAsB,EAAE;IAAE,cAAc;GARI;EAS5CC,gBAAgB,EAAE,OAT0B;EAU5CC,yBAAyB,EAAE,KAViB;EAW5CC,SAAS,EAAE;IACTC,OAAO,EAAE;MACPC,OAAO,EAAE;;;AAb+B;IAkBjCC,gBAAgB,GAAG;EAC9BZ,YAAY,EAAEa,mBAAS,CAACC,OAAV,CAAkBD,mBAAS,CAACE,MAA5B,EACXC,WADW,CACC,yFADD,EAEXC,YAFW,CAEErB,YAAY,CAACI,YAFf,CADgB;EAI9BH,QAAQ,EAAEgB,mBAAS,CAACK,IAAV,CACPF,WADO,CACK,gDADL,EAEPC,YAFO,CAEMrB,YAAY,CAACC,QAFnB,CAJoB;EAO9BC,YAAY,EAAEe,mBAAS,CAACM,MAAV,CACXH,WADW,CACC,+CADD,EAEXC,YAFW,CAEErB,YAAY,CAACE,YAFf,CAPgB;EAU9BS,gBAAgB,EAAEM,mBAAS,CAACO,KAAV,CAAgB,CAChC,WADgC,EAEhC,KAFgC,EAGhC,SAHgC,EAIhC,aAJgC,EAKhC,OALgC,EAMhC,WANgC,EAOhC,YAPgC,EAQhC,QARgC,EAShC,cATgC,EAUhC,UAVgC,EAWhC,MAXgC,EAYhC,YAZgC,CAAhB,EAcfJ,WAde,CAcH,+DAdG,EAefC,YAfe,CAeF,SAfE,CAVY;EA0B9BT,yBAAyB,EAAEK,mBAAS,CAACK,IAAV,CACxBF,WADwB,CACZ,+BADY,EAExBC,YAFwB,CAEXrB,YAAY,CAACK,cAFF,CA1BG;EA6B9BA,cAAc,EAAEY,mBAAS,CAACQ,IAAV,CACbL,WADa,CACD,6DADC,EAEbC,YAFa,CAEArB,YAAY,CAACK,cAFb,CA7Bc;EAgC9BE,aAAa,EAAEU,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAECrB,YAAY,CAACO,aAFd,CAhCe;EAmC9BC,cAAc,EAAES,mBAAS,CAACQ,IAAV,CACbL,WADa,CACD,6DADC,EAEbC,YAFa,CAEArB,YAAY,CAACQ,cAFb,CAnCc;EAsC9BC,aAAa,EAAEQ,mBAAS,CAACQ,IAAV,CACZL,WADY,CACA,6DADA,EAEZC,YAFY,CAECrB,YAAY,CAACS,aAFd,CAtCe;EAyC9BC,sBAAsB,EAAEO,mBAAS,CAACE,MAAV,CACrBC,WADqB,CACT,2CADS,EAErBC,YAFqB,CAERrB,YAAY,CAACU,sBAFL,CAzCM;EA4C9BG,SAAS,EAAEI,mBAAS,CAACE,MAAV,CACRC,WADQ,2EAQRC,YARQ,CAQKrB,YAAY,CAACa,SARlB;AA5CmB;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-sidebar/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MIN_WIDTH_SIDEBAR, BUTTON_SIDEBAR_HEIGHT } from '../../styled';\n\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n"],"names":["StyledSideBarContainer","styled","Grid","MIN_WIDTH_SIDEBAR","props","theme","colors","neutral","StyledSideBarButtonsContainer","BUTTON_SIDEBAR_HEIGHT"],"mappings":";;;;;;;;;;;;IAKaA,sBAAsB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,8FAExBC,0BAFwB,EAGnB,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHmB,EAIP,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJO;IAQtBC,6BAA6B,gBAAGP,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,8LAIAO,8BAJA;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/chat-sidebar/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MIN_WIDTH_SIDEBAR, BUTTON_SIDEBAR_HEIGHT } from '../../styled';\n\n// Sidebar\nexport const StyledSideBarContainer = styled(Grid)`\n height: 100%;\n width: ${MIN_WIDTH_SIDEBAR}px;\n background: ${(props) => props.theme.colors.neutral['050']};\n border-right: 1px solid ${(props) => props.theme.colors.neutral['100']};\n overflow: hidden;\n`;\n\nexport const StyledSideBarButtonsContainer = styled(Grid)`\n overflow-y: auto;\n align-items: flex-start;\n justify-content: flex-start;\n grid-template-rows: repeat(auto-fill, ${BUTTON_SIDEBAR_HEIGHT}px);\n overflow-x: hidden;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n`;\n"],"names":["StyledSideBarContainer","styled","Grid","MIN_WIDTH_SIDEBAR","props","theme","colors","neutral","StyledSideBarButtonsContainer","BUTTON_SIDEBAR_HEIGHT"],"mappings":";;;;;;;;;;;;IAKaA,sBAAsB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,8FAExBC,0BAFwB,EAGnB,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHmB,EAIP,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJO;IAQtBC,6BAA6B,gBAAGP,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,8LAIAO,8BAJA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingButton.js","sources":["../../../../src/parts/floating-button/FloatingButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Comments } from '@elliemae/ds-icons';\nimport { StyledFloatingButton } from './styled';\nimport { defaultFloatingButton, propsFloatingButton, FloatingButtonProps } from './props';\n\nexport const FloatingButton = ({ onClick, onFocus, innerRef }: FloatingButtonProps): JSX.Element => (\n <StyledFloatingButton onFocus={onFocus} ref={innerRef} data-testid=\"chat-floating-button\" onClick={onClick}>\n <Comments size=\"l\" />\n </StyledFloatingButton>\n);\n\nFloatingButton.propTypes = propsFloatingButton;\nFloatingButton.defaultProps = defaultFloatingButton;\n"],"names":["FloatingButton","onClick","onFocus","innerRef","React","StyledFloatingButton","Comments","propTypes","propsFloatingButton","defaultProps","defaultFloatingButton"],"mappings":";;;;;;;;;;;;;;;;IAKaA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,OAAZ,QAAYA,OAAZ;AAAA,MAAqBC,QAArB,QAAqBA,QAArB;AAAA,sBAC5BC,wCAACC,gDAAD;AAAsB,IAAA,OAAO,EAAEH,OAA/B;AAAwC,IAAA,GAAG,EAAEC,QAA7C;AAAuD,mBAAY,sBAAnE;AAA0F,IAAA,OAAO,EAAEF;AAAnG,kBACEG,wCAACE,gBAAD;AAAU,IAAA,IAAI,EAAC;AAAf,IADF,CAD4B;AAAA;AAM9BN,cAAc,CAACO,SAAf,GAA2BC,8CAA3B;AACAR,cAAc,CAACS,YAAf,GAA8BC,gDAA9B;;;;"}
1
+ {"version":3,"file":"FloatingButton.js","sources":["../../../../src/parts/floating-button/FloatingButton.tsx"],"sourcesContent":["import React from 'react';\nimport { Comments } from '@elliemae/ds-icons';\nimport { StyledFloatingButton } from './styled';\nimport { defaultFloatingButton, propsFloatingButton, FloatingButtonProps } from './props';\n\nexport const FloatingButton = ({ onClick, onFocus, innerRef }: FloatingButtonProps): JSX.Element => (\n <StyledFloatingButton onFocus={onFocus} ref={innerRef} data-testid=\"chat-floating-button\" onClick={onClick}>\n <Comments size=\"l\" />\n </StyledFloatingButton>\n);\n\nFloatingButton.propTypes = propsFloatingButton;\nFloatingButton.defaultProps = defaultFloatingButton;\n"],"names":["FloatingButton","onClick","onFocus","innerRef","React","StyledFloatingButton","Comments","propTypes","propsFloatingButton","defaultProps","defaultFloatingButton"],"mappings":";;;;;;;;;;;;;;;;IAKaA,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IAAGC,OAAH,QAAGA,OAAH;MAAYC,OAAZ,QAAYA,OAAZ;MAAqBC,QAArB,QAAqBA,QAArB;EAAA,oBAC5BC,wCAACC,gDAAD;IAAsB,OAAO,EAAEH,OAA/B;IAAwC,GAAG,EAAEC,QAA7C;IAAuD,eAAY,sBAAnE;IAA0F,OAAO,EAAEF;kBACjGG,wCAACE,gBAAD;IAAU,IAAI,EAAC;IADjB,CAD4B;AAAA;AAM9BN,cAAc,CAACO,SAAf,GAA2BC,8CAA3B;AACAR,cAAc,CAACS,YAAf,GAA8BC,gDAA9B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../../src/parts/floating-button/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\nexport interface FloatingButtonProps {\n onClick: () => void;\n onFocus: () => void;\n innerRef: React.RefObject<HTMLButtonElement>;\n}\n\nexport const defaultFloatingButton: FloatingButtonProps = {\n onClick: noop,\n onFocus: noop,\n innerRef: null,\n};\n\nexport const propsFloatingButton = {\n onClick: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultFloatingButton.onClick),\n onFocus: PropTypes.func\n .description('The function to call when button is being focused')\n .defaultValue(defaultFloatingButton.onFocus),\n innerRef: PropTypes.object.description('Ref to the component container').defaultValue(null),\n};\n"],"names":["defaultFloatingButton","onClick","noop","onFocus","innerRef","propsFloatingButton","PropTypes","func","description","defaultValue","object"],"mappings":";;;;;;;IAUaA,qBAA0C,GAAG;AACxDC,EAAAA,OAAO,EAAEC,WAD+C;AAExDC,EAAAA,OAAO,EAAED,WAF+C;AAGxDE,EAAAA,QAAQ,EAAE;AAH8C;IAM7CC,mBAAmB,GAAG;AACjCJ,EAAAA,OAAO,EAAEK,mBAAS,CAACC,IAAV,CACNC,WADM,CACM,6DADN,EAENC,YAFM,CAEOT,qBAAqB,CAACC,OAF7B,CADwB;AAIjCE,EAAAA,OAAO,EAAEG,mBAAS,CAACC,IAAV,CACNC,WADM,CACM,mDADN,EAENC,YAFM,CAEOT,qBAAqB,CAACG,OAF7B,CAJwB;AAOjCC,EAAAA,QAAQ,EAAEE,mBAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,gCAA7B,EAA+DC,YAA/D,CAA4E,IAA5E;AAPuB;;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../../src/parts/floating-button/props.ts"],"sourcesContent":["import { PropTypes } from 'react-desc';\nimport { noop } from 'lodash';\nimport React from 'react';\n\nexport interface FloatingButtonProps {\n onClick: () => void;\n onFocus: () => void;\n innerRef: React.RefObject<HTMLButtonElement>;\n}\n\nexport const defaultFloatingButton: FloatingButtonProps = {\n onClick: noop,\n onFocus: noop,\n innerRef: null,\n};\n\nexport const propsFloatingButton = {\n onClick: PropTypes.func\n .description('The function to call when the chat is opened via the footer')\n .defaultValue(defaultFloatingButton.onClick),\n onFocus: PropTypes.func\n .description('The function to call when button is being focused')\n .defaultValue(defaultFloatingButton.onFocus),\n innerRef: PropTypes.object.description('Ref to the component container').defaultValue(null),\n};\n"],"names":["defaultFloatingButton","onClick","noop","onFocus","innerRef","propsFloatingButton","PropTypes","func","description","defaultValue","object"],"mappings":";;;;;;;IAUaA,qBAA0C,GAAG;EACxDC,OAAO,EAAEC,WAD+C;EAExDC,OAAO,EAAED,WAF+C;EAGxDE,QAAQ,EAAE;AAH8C;IAM7CC,mBAAmB,GAAG;EACjCJ,OAAO,EAAEK,mBAAS,CAACC,IAAV,CACNC,WADM,CACM,6DADN,EAENC,YAFM,CAEOT,qBAAqB,CAACC,OAF7B,CADwB;EAIjCE,OAAO,EAAEG,mBAAS,CAACC,IAAV,CACNC,WADM,CACM,mDADN,EAENC,YAFM,CAEOT,qBAAqB,CAACG,OAF7B,CAJwB;EAOjCC,QAAQ,EAAEE,mBAAS,CAACI,MAAV,CAAiBF,WAAjB,CAA6B,gCAA7B,EAA+DC,YAA/D,CAA4E,IAA5E;AAPuB;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/floating-button/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nconst BUTTON_FLOATING = 56;\nconst BOX_SHADOW = '0 5px 8px 0 rgba(53,60,70,0.55)';\nconst BOX_SHADOW_FLOATING = '0 5px 8px 0 rgba(53,60,70,0.35)';\nconst BOX_SHADOW_INSET = `inset 100px 3px 4px 0 rgba(53,60,70,0.50)`;\n\nexport const StyledFloatingButton = styled.button`\n outline: none;\n cursor: pointer;\n height: ${BUTTON_FLOATING}px;\n width: ${BUTTON_FLOATING}px;\n border: none;\n background: ${(props) => props.theme.colors.brand[600]};\n border-radius: 50%;\n box-shadow: ${BOX_SHADOW_FLOATING};\n &:hover {\n background: ${(props) => props.theme.colors.brand[700]};\n }\n &:focus {\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n box-shadow: inset 0 0 0 2px ${(props) => props.theme.colors.neutral['000']},\n ${BOX_SHADOW};\n }\n &:active {\n background: ${(props) => props.theme.colors.brand[800]};\n box-shadow: inset 0 0 0 0, ${BOX_SHADOW_FLOATING};\n }\n svg {\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n"],"names":["BUTTON_FLOATING","BOX_SHADOW","BOX_SHADOW_FLOATING","StyledFloatingButton","styled","button","props","theme","colors","brand","neutral"],"mappings":";;;;;;;;;;AAEA,IAAMA,eAAe,GAAG,EAAxB;AACA,IAAMC,UAAU,GAAG,iCAAnB;AACA,IAAMC,mBAAmB,GAAG,iCAA5B;IAGaC,oBAAoB,gBAAGC,0BAAM,CAACC,MAAV;AAAA;AAAA,kSAGrBL,eAHqB,EAItBA,eAJsB,EAMjB,UAACM,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CANiB,EAQjBP,mBARiB,EAUf,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAVe,EAaT,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAbS,EAcC,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAdD,EAezBT,UAfyB,EAkBf,UAACK,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAlBe,EAmBAP,mBAnBA,EAsBrB,UAACI,KAAD;AAAA,SAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAtBqB;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/floating-button/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nconst BUTTON_FLOATING = 56;\nconst BOX_SHADOW = '0 5px 8px 0 rgba(53,60,70,0.55)';\nconst BOX_SHADOW_FLOATING = '0 5px 8px 0 rgba(53,60,70,0.35)';\nconst BOX_SHADOW_INSET = `inset 100px 3px 4px 0 rgba(53,60,70,0.50)`;\n\nexport const StyledFloatingButton = styled.button`\n outline: none;\n cursor: pointer;\n height: ${BUTTON_FLOATING}px;\n width: ${BUTTON_FLOATING}px;\n border: none;\n background: ${(props) => props.theme.colors.brand[600]};\n border-radius: 50%;\n box-shadow: ${BOX_SHADOW_FLOATING};\n &:hover {\n background: ${(props) => props.theme.colors.brand[700]};\n }\n &:focus {\n border: 2px solid ${(props) => props.theme.colors.brand[700]};\n box-shadow: inset 0 0 0 2px ${(props) => props.theme.colors.neutral['000']},\n ${BOX_SHADOW};\n }\n &:active {\n background: ${(props) => props.theme.colors.brand[800]};\n box-shadow: inset 0 0 0 0, ${BOX_SHADOW_FLOATING};\n }\n svg {\n fill: ${(props) => props.theme.colors.neutral['000']};\n }\n`;\n"],"names":["BUTTON_FLOATING","BOX_SHADOW","BOX_SHADOW_FLOATING","StyledFloatingButton","styled","button","props","theme","colors","brand","neutral"],"mappings":";;;;;;;;;;AAEA,IAAMA,eAAe,GAAG,EAAxB;AACA,IAAMC,UAAU,GAAG,iCAAnB;AACA,IAAMC,mBAAmB,GAAG,iCAA5B;IAGaC,oBAAoB,gBAAGC,0BAAM,CAACC,MAAV;EAAA;AAAA,kSAGrBL,eAHqB,EAItBA,eAJsB,EAMjB,UAACM,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CANiB,EAQjBP,mBARiB,EAUf,UAACI,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAVe,EAaT,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAbS,EAcC,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAdD,EAezBT,UAfyB,EAkBf,UAACK,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBC,KAAnB,CAAyB,GAAzB,CAAX;AAAA,CAlBe,EAmBAP,mBAnBA,EAsBrB,UAACI,KAAD;EAAA,OAAWA,KAAK,CAACC,KAAN,CAAYC,MAAZ,CAAmBE,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAtBqB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/floating-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BOX_SHADOW } from '../../styled';\n\n// Floating\nexport const StyledFloatingContainer = styled(Grid)`\n position: fixed;\n bottom: 24px;\n right: 24px;\n border-radius: 4px;\n z-index: 1;\n box-shadow: ${BOX_SHADOW};\n background: ${(nestedProps) => nestedProps.theme.colors.neutral['050']};\n width: 348px;\n`;\n"],"names":["StyledFloatingContainer","styled","Grid","BOX_SHADOW","nestedProps","theme","colors","neutral"],"mappings":";;;;;;;;;;;;IAKaA,uBAAuB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,uHAMpBC,mBANoB,EAOpB,UAACC,WAAD;AAAA,SAAiBA,WAAW,CAACC,KAAZ,CAAkBC,MAAlB,CAAyBC,OAAzB,CAAiC,KAAjC,CAAjB;AAAA,CAPoB;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/floating-container/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { BOX_SHADOW } from '../../styled';\n\n// Floating\nexport const StyledFloatingContainer = styled(Grid)`\n position: fixed;\n bottom: 24px;\n right: 24px;\n border-radius: 4px;\n z-index: 1;\n box-shadow: ${BOX_SHADOW};\n background: ${(nestedProps) => nestedProps.theme.colors.neutral['050']};\n width: 348px;\n`;\n"],"names":["StyledFloatingContainer","styled","Grid","BOX_SHADOW","nestedProps","theme","colors","neutral"],"mappings":";;;;;;;;;;;;IAKaA,uBAAuB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,uHAMpBC,mBANoB,EAOpB,UAACC,WAAD;EAAA,OAAiBA,WAAW,CAACC,KAAZ,CAAkBC,MAAlB,CAAyBC,OAAzB,CAAiC,KAAjC,CAAjB;AAAA,CAPoB;;;;"}
@@ -42,6 +42,7 @@ require('../system-message/config/useValidateProps.js');
42
42
  require('../chat-container-messages-list/styled.js');
43
43
  require('../chat-container-messages-list/props.js');
44
44
  require('../chat-container-messages-list/config/useValidateProps.js');
45
+ require('../chat-container-messages-list/useGetNewMessages.js');
45
46
  require('../chat-container/props.js');
46
47
  require('../chat-container/styled.js');
47
48
  require('../chat-container/config/useValidateProps.js');
@@ -1 +1 @@
1
- {"version":3,"file":"InfluencerContainer.js","sources":["../../../../src/parts/grid-influencer/InfluencerContainer.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { StyledChatContainer } from './styled';\nimport { ChatContainer } from '../chat-container/ChatContainer';\nimport { SideBarChat } from '../chat-sidebar/SideBarChat';\n\nexport const InfluencerContainer: React.ComponentType<any> = (props) =>\n React.useMemo(\n () =>\n props.floating ? null : (\n <StyledChatContainer\n cols={['auto', props.expanded ? 1 : '0px']}\n expanded={props.expanded}\n expandedWidth={props.expandedWidth}\n >\n <SideBarChat />\n {props.expanded ? <ChatContainer /> : <div />}\n </StyledChatContainer>\n ),\n [props.floating, props.expanded, props.expandedWidth],\n );\n"],"names":["InfluencerContainer","props","React","useMemo","floating","StyledChatContainer","expanded","expandedWidth","SideBarChat","ChatContainer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAMaA,mBAA6C,GAAG,SAAhDA,mBAAgD,CAACC,KAAD;AAAA,SAC3DC,yBAAK,CAACC,OAAN,CACE;AAAA,WACEF,KAAK,CAACG,QAAN,GAAiB,IAAjB,gBACEF,wCAACG,+CAAD;AACE,MAAA,IAAI,EAAE,CAAC,MAAD,EAASJ,KAAK,CAACK,QAAN,GAAiB,CAAjB,GAAqB,KAA9B,CADR;AAEE,MAAA,QAAQ,EAAEL,KAAK,CAACK,QAFlB;AAGE,MAAA,aAAa,EAAEL,KAAK,CAACM;AAHvB,oBAKEL,wCAACM,yCAAD,OALF,EAMGP,KAAK,CAACK,QAAN,gBAAiBJ,wCAACO,+CAAD,OAAjB,gBAAqCP,oDANxC,CAFJ;AAAA,GADF,EAYE,CAACD,KAAK,CAACG,QAAP,EAAiBH,KAAK,CAACK,QAAvB,EAAiCL,KAAK,CAACM,aAAvC,CAZF,CAD2D;AAAA;;;;"}
1
+ {"version":3,"file":"InfluencerContainer.js","sources":["../../../../src/parts/grid-influencer/InfluencerContainer.tsx"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { StyledChatContainer } from './styled';\nimport { ChatContainer } from '../chat-container/ChatContainer';\nimport { SideBarChat } from '../chat-sidebar/SideBarChat';\n\nexport const InfluencerContainer: React.ComponentType<any> = (props) =>\n React.useMemo(\n () =>\n props.floating ? null : (\n <StyledChatContainer\n cols={['auto', props.expanded ? 1 : '0px']}\n expanded={props.expanded}\n expandedWidth={props.expandedWidth}\n >\n <SideBarChat />\n {props.expanded ? <ChatContainer /> : <div />}\n </StyledChatContainer>\n ),\n [props.floating, props.expanded, props.expandedWidth],\n );\n"],"names":["InfluencerContainer","props","React","useMemo","floating","StyledChatContainer","expanded","expandedWidth","SideBarChat","ChatContainer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAMaA,mBAA6C,GAAG,SAAhDA,mBAAgD,CAACC,KAAD;EAAA,OAC3DC,yBAAK,CAACC,OAAN,CACE;IAAA,OACEF,KAAK,CAACG,QAAN,GAAiB,IAAjB,gBACEF,wCAACG,+CAAD;MACE,IAAI,EAAE,CAAC,MAAD,EAASJ,KAAK,CAACK,QAAN,GAAiB,CAAjB,GAAqB,KAA9B,CADR;MAEE,QAAQ,EAAEL,KAAK,CAACK,QAFlB;MAGE,aAAa,EAAEL,KAAK,CAACM;oBAErBL,wCAACM,yCAAD,OALF,EAMGP,KAAK,CAACK,QAAN,gBAAiBJ,wCAACO,+CAAD,OAAjB,gBAAqCP,oDANxC,CAFJ;GADF,EAYE,CAACD,KAAK,CAACG,QAAP,EAAiBH,KAAK,CAACK,QAAvB,EAAiCL,KAAK,CAACM,aAAvC,CAZF,CAD2D;AAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../src/parts/grid-influencer/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MIN_WIDTH_SIDEBAR } from '../../styled';\n\nexport const StyledChatContainer = styled(Grid)`\n height: 100%;\n width: ${(props) =>\n props.expanded ? `${props.expandedWidth}px` : `${MIN_WIDTH_SIDEBAR}px`};\n background: ${(props) => props.theme.colors.neutral['050']};\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')}\n 350ms;\n`;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n ${(props) =>\n props.floating\n ? `\n width: ${props.expandedWidth}px;\n`\n : `\n width: ${props.expandedWidth - MIN_WIDTH_SIDEBAR}px;\n`}\n`;\n"],"names":["StyledChatContainer","styled","Grid","props","expanded","expandedWidth","MIN_WIDTH_SIDEBAR","theme","colors","neutral","StyledChatContainerContent","floating"],"mappings":";;;;;;;;;;;;IAIaA,mBAAmB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,uGAErB,UAACC,KAAD;AAAA,SACPA,KAAK,CAACC,QAAN,aAAoBD,KAAK,CAACE,aAA1B,oBAAiDC,0BAAjD,OADO;AAAA,CAFqB,EAIhB,UAACH,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJgB,EAKL,UAACN,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CALK,EAMV,UAACN,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,GAAiB,UAAjB,GAA8B,SAA1C;AAAA,CANU;IAUnBM,0BAA0B,gBAAGT,0BAAM,CAACC,WAAD,CAAT;AAAA;AAAA,yDAGvB,UAACC,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHuB,EAInC,UAACN,KAAD;AAAA,SACAA,KAAK,CAACQ,QAAN,wBAEOR,KAAK,CAACE,aAFb,kCAKOF,KAAK,CAACE,aAAN,GAAsBC,0BAL7B,UADA;AAAA,CAJmC;;;;;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/parts/grid-influencer/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Grid } from '@elliemae/ds-grid';\nimport { MIN_WIDTH_SIDEBAR } from '../../styled';\n\nexport const StyledChatContainer = styled(Grid)`\n height: 100%;\n width: ${(props) =>\n props.expanded ? `${props.expandedWidth}px` : `${MIN_WIDTH_SIDEBAR}px`};\n background: ${(props) => props.theme.colors.neutral['050']};\n box-shadow: -1px 0 0 0 ${(props) => props.theme.colors.neutral[100]};\n transition: width ${(props) => (props.expanded ? 'ease-out' : 'ease-in')}\n 350ms;\n`;\n\nexport const StyledChatContainerContent = styled(Grid)`\n height: 100%;\n overflow: hidden;\n background: ${(props) => props.theme.colors.neutral['050']};\n ${(props) =>\n props.floating\n ? `\n width: ${props.expandedWidth}px;\n`\n : `\n width: ${props.expandedWidth - MIN_WIDTH_SIDEBAR}px;\n`}\n`;\n"],"names":["StyledChatContainer","styled","Grid","props","expanded","expandedWidth","MIN_WIDTH_SIDEBAR","theme","colors","neutral","StyledChatContainerContent","floating"],"mappings":";;;;;;;;;;;;IAIaA,mBAAmB,gBAAGC,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,uGAErB,UAACC,KAAD;EAAA,OACPA,KAAK,CAACC,QAAN,aAAoBD,KAAK,CAACE,aAA1B,oBAAiDC,0BAAjD,OADO;AAAA,CAFqB,EAIhB,UAACH,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAJgB,EAKL,UAACN,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,GAA3B,CAAX;AAAA,CALK,EAMV,UAACN,KAAD;EAAA,OAAYA,KAAK,CAACC,QAAN,GAAiB,UAAjB,GAA8B,SAA1C;AAAA,CANU;IAUnBM,0BAA0B,gBAAGT,0BAAM,CAACC,WAAD,CAAT;EAAA;AAAA,yDAGvB,UAACC,KAAD;EAAA,OAAWA,KAAK,CAACI,KAAN,CAAYC,MAAZ,CAAmBC,OAAnB,CAA2B,KAA3B,CAAX;AAAA,CAHuB,EAInC,UAACN,KAAD;EAAA,OACAA,KAAK,CAACQ,QAAN,wBAEOR,KAAK,CAACE,aAFb,kCAKOF,KAAK,CAACE,aAAN,GAAsBC,0BAL7B,UADA;AAAA,CAJmC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageDelimiter.js","sources":["../../../../src/parts/message-delimiter/MessageDelimiter.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { Wrapper, Line, Text } from './styled';\nimport { defaultProps, messageDelimiterProps, MessageDelimiterProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst MessageDelimiter = (props: MessageDelimiterProps): JSX.Element => {\n useValidateProps(props, MessageDelimiterWithSchema.toJSON());\n const { title, size, extraProps, verticalMargin } = props;\n return (\n <Wrapper cols={['1fr', 'auto', '1fr']}>\n <Line />\n <Text size={size} verticalMargin={verticalMargin} data-testid={extraProps['data-testid']}>\n {title}\n </Text>\n <Line />\n </Wrapper>\n );\n};\n\nMessageDelimiter.defaultProps = defaultProps;\nMessageDelimiter.propTypes = messageDelimiterProps;\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = messageDelimiterProps;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n"],"names":["MessageDelimiter","props","useValidateProps","MessageDelimiterWithSchema","toJSON","title","size","extraProps","verticalMargin","React","Wrapper","Line","Text","defaultProps","propTypes","messageDelimiterProps","describe"],"mappings":";;;;;;;;;;;;;;;;;IAMMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA+C;AACtEC,EAAAA,+DAAgB,CAACD,KAAD,EAAQE,0BAA0B,CAACC,MAA3B,EAAR,CAAhB;AACA,MAAQC,KAAR,GAAoDJ,KAApD,CAAQI,KAAR;AAAA,MAAeC,IAAf,GAAoDL,KAApD,CAAeK,IAAf;AAAA,MAAqBC,UAArB,GAAoDN,KAApD,CAAqBM,UAArB;AAAA,MAAiCC,cAAjC,GAAoDP,KAApD,CAAiCO,cAAjC;AACA,sBACEC,wCAACC,qCAAD;AAAS,IAAA,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,EAAgB,KAAhB;AAAf,kBACED,wCAACE,kCAAD,OADF,eAEEF,wCAACG,kCAAD;AAAM,IAAA,IAAI,EAAEN,IAAZ;AAAkB,IAAA,cAAc,EAAEE,cAAlC;AAAkD,mBAAaD,UAAU,CAAC,aAAD;AAAzE,KACGF,KADH,CAFF,eAKEI,wCAACE,kCAAD,OALF,CADF;AASD;;AAEDX,gBAAgB,CAACa,YAAjB,GAAgCA,yCAAhC;AACAb,gBAAgB,CAACc,SAAjB,GAA6BC,kDAA7B;IACMZ,0BAA0B,GAAGa,kBAAQ,CAAChB,gBAAD;AAC3CG,0BAA0B,CAACW,SAA3B,GAAuCC,kDAAvC;;;;;"}
1
+ {"version":3,"file":"MessageDelimiter.js","sources":["../../../../src/parts/message-delimiter/MessageDelimiter.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport { Wrapper, Line, Text } from './styled';\nimport { defaultProps, messageDelimiterProps, MessageDelimiterProps } from './props';\nimport { useValidateProps } from './config/useValidateProps';\n\nconst MessageDelimiter = (props: MessageDelimiterProps): JSX.Element => {\n useValidateProps(props, MessageDelimiterWithSchema.toJSON());\n const { title, size, extraProps, verticalMargin } = props;\n return (\n <Wrapper cols={['1fr', 'auto', '1fr']}>\n <Line />\n <Text size={size} verticalMargin={verticalMargin} data-testid={extraProps['data-testid']}>\n {title}\n </Text>\n <Line />\n </Wrapper>\n );\n};\n\nMessageDelimiter.defaultProps = defaultProps;\nMessageDelimiter.propTypes = messageDelimiterProps;\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = messageDelimiterProps;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n"],"names":["MessageDelimiter","props","useValidateProps","MessageDelimiterWithSchema","toJSON","title","size","extraProps","verticalMargin","React","Wrapper","Line","Text","defaultProps","propTypes","messageDelimiterProps","describe"],"mappings":";;;;;;;;;;;;;;;;;IAMMA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA+C;EACtEC,+DAAgB,CAACD,KAAD,EAAQE,0BAA0B,CAACC,MAA3B,EAAR,CAAhB;EACA,IAAQC,KAAR,GAAoDJ,KAApD,CAAQI,KAAR;MAAeC,IAAf,GAAoDL,KAApD,CAAeK,IAAf;MAAqBC,UAArB,GAAoDN,KAApD,CAAqBM,UAArB;MAAiCC,cAAjC,GAAoDP,KAApD,CAAiCO,cAAjC;EACA,oBACEC,wCAACC,qCAAD;IAAS,IAAI,EAAE,CAAC,KAAD,EAAQ,MAAR,EAAgB,KAAhB;kBACbD,wCAACE,kCAAD,OADF,eAEEF,wCAACG,kCAAD;IAAM,IAAI,EAAEN,IAAZ;IAAkB,cAAc,EAAEE,cAAlC;IAAkD,eAAaD,UAAU,CAAC,aAAD;KACtEF,KADH,CAFF,eAKEI,wCAACE,kCAAD,OALF,CADF;AASD;;AAEDX,gBAAgB,CAACa,YAAjB,GAAgCA,yCAAhC;AACAb,gBAAgB,CAACc,SAAjB,GAA6BC,kDAA7B;IACMZ,0BAA0B,GAAGa,kBAAQ,CAAChB,gBAAD;AAC3CG,0BAA0B,CAACW,SAA3B,GAAuCC,kDAAvC;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/message-delimiter/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { MessageDelimiterProps } from '../props';\n\nexport const useValidateProps = (props: MessageDelimiterProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA+BC,MAA/B,EAAyD;AACvFC,EAAAA,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/message-delimiter/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { MessageDelimiterProps } from '../props';\n\nexport const useValidateProps = (props: MessageDelimiterProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;;;;;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA+BC,MAA/B,EAAyD;EACvFC,mCAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"props.js","sources":["../../../../src/parts/message-delimiter/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport interface MessageDelimiterProps {\n title: string;\n size?: 's' | 'l';\n verticalMargin?: number | string;\n extraProps?: {};\n}\n\nexport const defaultProps: MessageDelimiterProps = {\n title: '',\n size: 's',\n verticalMargin: '0px',\n extraProps: { 'data-testid': 'chat-message-delimiter-title' },\n};\n\nexport const messageDelimiterProps = {\n title: PropTypes.string.isRequired.description('Text to display in the delimiter'),\n size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),\n extraProps: PropTypes.object.description('extra props for delimiter'),\n verticalMargin: PropTypes.oneOf(['string', 'number']).description(\n 'Configurable css vertical margin property for flexibilty',\n ),\n};\n"],"names":["defaultProps","title","size","verticalMargin","extraProps","messageDelimiterProps","PropTypes","string","isRequired","description","oneOf","defaultValue","object"],"mappings":";;;;;;IASaA,YAAmC,GAAG;AACjDC,EAAAA,KAAK,EAAE,EAD0C;AAEjDC,EAAAA,IAAI,EAAE,GAF2C;AAGjDC,EAAAA,cAAc,EAAE,KAHiC;AAIjDC,EAAAA,UAAU,EAAE;AAAE,mBAAe;AAAjB;AAJqC;IAOtCC,qBAAqB,GAAG;AACnCJ,EAAAA,KAAK,EAAEK,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,kCAAxC,CAD4B;AAEnCP,EAAAA,IAAI,EAAEI,mBAAS,CAACI,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,CAAhB,EAA4BD,WAA5B,CAAwC,uBAAxC,EAAiEE,YAAjE,CAA8E,GAA9E,CAF6B;AAGnCP,EAAAA,UAAU,EAAEE,mBAAS,CAACM,MAAV,CAAiBH,WAAjB,CAA6B,2BAA7B,CAHuB;AAInCN,EAAAA,cAAc,EAAEG,mBAAS,CAACI,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,EAAsCD,WAAtC,CACd,0DADc;AAJmB;;;;;"}
1
+ {"version":3,"file":"props.js","sources":["../../../../src/parts/message-delimiter/props.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport interface MessageDelimiterProps {\n title: string;\n size?: 's' | 'l';\n verticalMargin?: number | string;\n extraProps?: {};\n}\n\nexport const defaultProps: MessageDelimiterProps = {\n title: '',\n size: 's',\n verticalMargin: '0px',\n extraProps: { 'data-testid': 'chat-message-delimiter-title' },\n};\n\nexport const messageDelimiterProps = {\n title: PropTypes.string.isRequired.description('Text to display in the delimiter'),\n size: PropTypes.oneOf(['s', 'l']).description('size of the delimiter').defaultValue('s'),\n extraProps: PropTypes.object.description('extra props for delimiter'),\n verticalMargin: PropTypes.oneOf(['string', 'number']).description(\n 'Configurable css vertical margin property for flexibilty',\n ),\n};\n"],"names":["defaultProps","title","size","verticalMargin","extraProps","messageDelimiterProps","PropTypes","string","isRequired","description","oneOf","defaultValue","object"],"mappings":";;;;;;IASaA,YAAmC,GAAG;EACjDC,KAAK,EAAE,EAD0C;EAEjDC,IAAI,EAAE,GAF2C;EAGjDC,cAAc,EAAE,KAHiC;EAIjDC,UAAU,EAAE;IAAE,eAAe;;AAJoB;IAOtCC,qBAAqB,GAAG;EACnCJ,KAAK,EAAEK,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,kCAAxC,CAD4B;EAEnCP,IAAI,EAAEI,mBAAS,CAACI,KAAV,CAAgB,CAAC,GAAD,EAAM,GAAN,CAAhB,EAA4BD,WAA5B,CAAwC,uBAAxC,EAAiEE,YAAjE,CAA8E,GAA9E,CAF6B;EAGnCP,UAAU,EAAEE,mBAAS,CAACM,MAAV,CAAiBH,WAAjB,CAA6B,2BAA7B,CAHuB;EAInCN,cAAc,EAAEG,mBAAS,CAACI,KAAV,CAAgB,CAAC,QAAD,EAAW,QAAX,CAAhB,EAAsCD,WAAtC,CACd,0DADc;AAJmB;;;;;"}