@elliemae/ds-chat 1.53.4-rc.3 → 1.53.5-rc.0

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 (195) hide show
  1. package/cjs/index.js +14 -1
  2. package/cjs/index.js.map +1 -1
  3. package/cjs/parts/bubble/ChatBubble.js +8 -1
  4. package/cjs/parts/bubble/ChatBubble.js.map +1 -1
  5. package/cjs/parts/bubble/config/useValidateProps.js +32 -0
  6. package/cjs/parts/bubble/config/useValidateProps.js.map +1 -0
  7. package/cjs/parts/bubble/index.js +4 -1
  8. package/cjs/parts/bubble/index.js.map +1 -1
  9. package/cjs/parts/bubble/props.js +4 -4
  10. package/cjs/parts/bubble/props.js.map +1 -1
  11. package/cjs/parts/bubble/styled.js +1 -1
  12. package/cjs/parts/bubble/styled.js.map +1 -1
  13. package/cjs/parts/chat-card/ChatCard.js +9 -6
  14. package/cjs/parts/chat-card/ChatCard.js.map +1 -1
  15. package/cjs/parts/chat-card/config/useValidateProps.js +12 -0
  16. package/cjs/parts/chat-card/config/useValidateProps.js.map +1 -0
  17. package/cjs/parts/chat-card/index.js +3 -1
  18. package/cjs/parts/chat-card/index.js.map +1 -1
  19. package/cjs/parts/chat-card/props.js +1 -1
  20. package/cjs/parts/chat-card/props.js.map +1 -1
  21. package/cjs/parts/chat-composer/ChatContainerComposer.js +19 -2
  22. package/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  23. package/cjs/parts/chat-composer/config/useValidateProps.js +12 -0
  24. package/cjs/parts/chat-composer/config/useValidateProps.js.map +1 -0
  25. package/cjs/parts/chat-composer/index.js +2 -0
  26. package/cjs/parts/chat-composer/index.js.map +1 -1
  27. package/cjs/parts/chat-composer/props.js +6 -4
  28. package/cjs/parts/chat-composer/props.js.map +1 -1
  29. package/cjs/parts/chat-composer/styled.js +2 -2
  30. package/cjs/parts/chat-composer/styled.js.map +1 -1
  31. package/cjs/parts/chat-container/ChatContainer.js +10 -1
  32. package/cjs/parts/chat-container/ChatContainer.js.map +1 -1
  33. package/cjs/parts/chat-container/config/useValidateProps.js +12 -0
  34. package/cjs/parts/chat-container/config/useValidateProps.js.map +1 -0
  35. package/cjs/parts/chat-container/index.js +7 -0
  36. package/cjs/parts/chat-container/index.js.map +1 -1
  37. package/cjs/parts/chat-container/props.js +3 -2
  38. package/cjs/parts/chat-container/props.js.map +1 -1
  39. package/cjs/parts/chat-container/styled.js +3 -1
  40. package/cjs/parts/chat-container/styled.js.map +1 -1
  41. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +70 -11
  42. package/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  43. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js +12 -0
  44. package/cjs/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -0
  45. package/cjs/parts/chat-container-messages-list/index.js +5 -0
  46. package/cjs/parts/chat-container-messages-list/index.js.map +1 -1
  47. package/cjs/parts/chat-container-messages-list/props.js +1 -1
  48. package/cjs/parts/chat-container-messages-list/props.js.map +1 -1
  49. package/cjs/parts/chat-container-messages-list/styled.js +9 -1
  50. package/cjs/parts/chat-container-messages-list/styled.js.map +1 -1
  51. package/cjs/parts/chat-empty-state/ChatEmptyState.js +14 -3
  52. package/cjs/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
  53. package/cjs/parts/chat-empty-state/config/useValidateProps.js +12 -0
  54. package/cjs/parts/chat-empty-state/config/useValidateProps.js.map +1 -0
  55. package/cjs/parts/chat-empty-state/props.js +2 -1
  56. package/cjs/parts/chat-empty-state/props.js.map +1 -1
  57. package/cjs/parts/chat-sidebar/SideBarChat.js +12 -8
  58. package/cjs/parts/chat-sidebar/SideBarChat.js.map +1 -1
  59. package/cjs/parts/chat-sidebar/config/useValidateProps.js +12 -0
  60. package/cjs/parts/chat-sidebar/config/useValidateProps.js.map +1 -0
  61. package/cjs/parts/chat-sidebar/index.js +4 -1
  62. package/cjs/parts/chat-sidebar/index.js.map +1 -1
  63. package/cjs/parts/floating-button/FloatingButton.js.map +1 -1
  64. package/cjs/parts/grid-influencer/InfluencerContainer.js +9 -0
  65. package/cjs/parts/grid-influencer/InfluencerContainer.js.map +1 -1
  66. package/cjs/parts/message-delimiter/MessageDelimiter.js +8 -5
  67. package/cjs/parts/message-delimiter/MessageDelimiter.js.map +1 -1
  68. package/cjs/parts/message-delimiter/config/useValidateProps.js +12 -0
  69. package/cjs/parts/message-delimiter/config/useValidateProps.js.map +1 -0
  70. package/cjs/parts/message-delimiter/index.js +2 -0
  71. package/cjs/parts/message-delimiter/index.js.map +1 -1
  72. package/cjs/parts/message-delimiter/props.js +1 -1
  73. package/cjs/parts/message-delimiter/props.js.map +1 -1
  74. package/cjs/parts/sidebar-button/SidebarButton.js.map +1 -1
  75. package/cjs/parts/sidebar-button/styled.js +3 -1
  76. package/cjs/parts/sidebar-button/styled.js.map +1 -1
  77. package/cjs/parts/system-message/SystemMessage.js +7 -4
  78. package/cjs/parts/system-message/SystemMessage.js.map +1 -1
  79. package/cjs/parts/system-message/config/useValidateProps.js +12 -0
  80. package/cjs/parts/system-message/config/useValidateProps.js.map +1 -0
  81. package/cjs/parts/system-message/index.js +2 -0
  82. package/cjs/parts/system-message/index.js.map +1 -1
  83. package/cjs/parts/tile-button/TileButton.js +3 -1
  84. package/cjs/parts/tile-button/TileButton.js.map +1 -1
  85. package/cjs/parts/tile-button/config/useValidateProps.js +12 -0
  86. package/cjs/parts/tile-button/config/useValidateProps.js.map +1 -0
  87. package/cjs/parts/tile-button/index.js +2 -1
  88. package/cjs/parts/tile-button/index.js.map +1 -1
  89. package/cjs/parts/tile-button/props.js +3 -5
  90. package/cjs/parts/tile-button/props.js.map +1 -1
  91. package/cjs/parts/tile-button/styled.js +9 -5
  92. package/cjs/parts/tile-button/styled.js.map +1 -1
  93. package/esm/index.js +14 -2
  94. package/esm/index.js.map +1 -1
  95. package/esm/parts/bubble/ChatBubble.js +8 -2
  96. package/esm/parts/bubble/ChatBubble.js.map +1 -1
  97. package/esm/parts/bubble/config/useValidateProps.js +28 -0
  98. package/esm/parts/bubble/config/useValidateProps.js.map +1 -0
  99. package/esm/parts/bubble/index.js +4 -2
  100. package/esm/parts/bubble/index.js.map +1 -1
  101. package/esm/parts/bubble/props.js +4 -4
  102. package/esm/parts/bubble/props.js.map +1 -1
  103. package/esm/parts/bubble/styled.js +1 -1
  104. package/esm/parts/bubble/styled.js.map +1 -1
  105. package/esm/parts/chat-card/ChatCard.js +9 -6
  106. package/esm/parts/chat-card/ChatCard.js.map +1 -1
  107. package/esm/parts/chat-card/config/useValidateProps.js +8 -0
  108. package/esm/parts/chat-card/config/useValidateProps.js.map +1 -0
  109. package/esm/parts/chat-card/index.js +3 -1
  110. package/esm/parts/chat-card/index.js.map +1 -1
  111. package/esm/parts/chat-card/props.js +1 -1
  112. package/esm/parts/chat-card/props.js.map +1 -1
  113. package/esm/parts/chat-composer/ChatContainerComposer.js +19 -2
  114. package/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  115. package/esm/parts/chat-composer/config/useValidateProps.js +8 -0
  116. package/esm/parts/chat-composer/config/useValidateProps.js.map +1 -0
  117. package/esm/parts/chat-composer/index.js +2 -0
  118. package/esm/parts/chat-composer/index.js.map +1 -1
  119. package/esm/parts/chat-composer/props.js +6 -4
  120. package/esm/parts/chat-composer/props.js.map +1 -1
  121. package/esm/parts/chat-composer/styled.js +2 -2
  122. package/esm/parts/chat-composer/styled.js.map +1 -1
  123. package/esm/parts/chat-container/ChatContainer.js +10 -1
  124. package/esm/parts/chat-container/ChatContainer.js.map +1 -1
  125. package/esm/parts/chat-container/config/useValidateProps.js +8 -0
  126. package/esm/parts/chat-container/config/useValidateProps.js.map +1 -0
  127. package/esm/parts/chat-container/index.js +7 -0
  128. package/esm/parts/chat-container/index.js.map +1 -1
  129. package/esm/parts/chat-container/props.js +3 -2
  130. package/esm/parts/chat-container/props.js.map +1 -1
  131. package/esm/parts/chat-container/styled.js +3 -1
  132. package/esm/parts/chat-container/styled.js.map +1 -1
  133. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +71 -12
  134. package/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  135. package/esm/parts/chat-container-messages-list/config/useValidateProps.js +8 -0
  136. package/esm/parts/chat-container-messages-list/config/useValidateProps.js.map +1 -0
  137. package/esm/parts/chat-container-messages-list/index.js +5 -0
  138. package/esm/parts/chat-container-messages-list/index.js.map +1 -1
  139. package/esm/parts/chat-container-messages-list/props.js +1 -1
  140. package/esm/parts/chat-container-messages-list/props.js.map +1 -1
  141. package/esm/parts/chat-container-messages-list/styled.js +9 -2
  142. package/esm/parts/chat-container-messages-list/styled.js.map +1 -1
  143. package/esm/parts/chat-empty-state/ChatEmptyState.js +14 -4
  144. package/esm/parts/chat-empty-state/ChatEmptyState.js.map +1 -1
  145. package/esm/parts/chat-empty-state/config/useValidateProps.js +8 -0
  146. package/esm/parts/chat-empty-state/config/useValidateProps.js.map +1 -0
  147. package/esm/parts/chat-empty-state/props.js +2 -1
  148. package/esm/parts/chat-empty-state/props.js.map +1 -1
  149. package/esm/parts/chat-sidebar/SideBarChat.js +12 -8
  150. package/esm/parts/chat-sidebar/SideBarChat.js.map +1 -1
  151. package/esm/parts/chat-sidebar/config/useValidateProps.js +8 -0
  152. package/esm/parts/chat-sidebar/config/useValidateProps.js.map +1 -0
  153. package/esm/parts/chat-sidebar/index.js +4 -1
  154. package/esm/parts/chat-sidebar/index.js.map +1 -1
  155. package/esm/parts/floating-button/FloatingButton.js.map +1 -1
  156. package/esm/parts/grid-influencer/InfluencerContainer.js +9 -0
  157. package/esm/parts/grid-influencer/InfluencerContainer.js.map +1 -1
  158. package/esm/parts/message-delimiter/MessageDelimiter.js +8 -5
  159. package/esm/parts/message-delimiter/MessageDelimiter.js.map +1 -1
  160. package/esm/parts/message-delimiter/config/useValidateProps.js +8 -0
  161. package/esm/parts/message-delimiter/config/useValidateProps.js.map +1 -0
  162. package/esm/parts/message-delimiter/index.js +2 -0
  163. package/esm/parts/message-delimiter/index.js.map +1 -1
  164. package/esm/parts/message-delimiter/props.js +1 -1
  165. package/esm/parts/message-delimiter/props.js.map +1 -1
  166. package/esm/parts/sidebar-button/SidebarButton.js.map +1 -1
  167. package/esm/parts/sidebar-button/styled.js +3 -1
  168. package/esm/parts/sidebar-button/styled.js.map +1 -1
  169. package/esm/parts/system-message/SystemMessage.js +7 -4
  170. package/esm/parts/system-message/SystemMessage.js.map +1 -1
  171. package/esm/parts/system-message/config/useValidateProps.js +8 -0
  172. package/esm/parts/system-message/config/useValidateProps.js.map +1 -0
  173. package/esm/parts/system-message/index.js +2 -0
  174. package/esm/parts/system-message/index.js.map +1 -1
  175. package/esm/parts/tile-button/TileButton.js +3 -1
  176. package/esm/parts/tile-button/TileButton.js.map +1 -1
  177. package/esm/parts/tile-button/config/useValidateProps.js +8 -0
  178. package/esm/parts/tile-button/config/useValidateProps.js.map +1 -0
  179. package/esm/parts/tile-button/index.js +2 -1
  180. package/esm/parts/tile-button/index.js.map +1 -1
  181. package/esm/parts/tile-button/props.js +3 -4
  182. package/esm/parts/tile-button/props.js.map +1 -1
  183. package/esm/parts/tile-button/styled.js +9 -5
  184. package/esm/parts/tile-button/styled.js.map +1 -1
  185. package/package.json +5 -5
  186. package/parts/bubble/config/useValidateProps/package.json +10 -0
  187. package/parts/chat-card/config/useValidateProps/package.json +10 -0
  188. package/parts/chat-composer/config/useValidateProps/package.json +10 -0
  189. package/parts/chat-container/config/useValidateProps/package.json +10 -0
  190. package/parts/chat-container-messages-list/config/useValidateProps/package.json +10 -0
  191. package/parts/chat-empty-state/config/useValidateProps/package.json +10 -0
  192. package/parts/chat-sidebar/config/useValidateProps/package.json +10 -0
  193. package/parts/message-delimiter/config/useValidateProps/package.json +10 -0
  194. package/parts/system-message/config/useValidateProps/package.json +10 -0
  195. package/parts/tile-button/config/useValidateProps/package.json +10 -0
@@ -8,19 +8,24 @@ import { ChatBubble } from '../bubble/ChatBubble.js';
8
8
  import { BUBBLE_TYPES } from '../bubble/props.js';
9
9
  import { MessageDelimiter } from '../message-delimiter/MessageDelimiter.js';
10
10
  import { SystemMessage } from '../system-message/SystemMessage.js';
11
- import { StyledWrapperListItem, StyledWrapper, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer } from './styled.js';
11
+ import { ListItem, StyledWrapperListItem, StyledWrapper, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer } from './styled.js';
12
12
  import { listProps, defaultProps } from './props.js';
13
+ import { useValidateProps } from './config/useValidateProps.js';
13
14
  import '@elliemae/ds-icons/WarningCircleFill';
14
15
  import '../bubble/styled.js';
15
16
  import 'styled-components';
16
17
  import '@elliemae/ds-grid';
18
+ import '../bubble/config/useValidateProps.js';
19
+ import '@elliemae/ds-props-helpers';
17
20
  import '../bubble/ChatBubbleArrow.js';
18
21
  import 'prop-types';
19
22
  import 'lodash';
20
23
  import '../message-delimiter/styled.js';
21
24
  import '../message-delimiter/props.js';
25
+ import '../message-delimiter/config/useValidateProps.js';
22
26
  import '../system-message/style.js';
23
27
  import '../system-message/props.js';
28
+ import '../system-message/config/useValidateProps.js';
24
29
 
25
30
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
26
31
 
@@ -36,6 +41,7 @@ var getPadding = function getPadding(hasMoreItems) {
36
41
  };
37
42
 
38
43
  var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
44
+ useValidateProps(props, ChatContainerMessagesListWithSchema.toJSON());
39
45
  var sendingText = props.sendingText,
40
46
  sendingMessages = props.sendingMessages,
41
47
  messages = props.messages,
@@ -76,17 +82,65 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
76
82
  if (onScrollEnds) onScrollEnds(indexList);
77
83
  return indexList;
78
84
  }, [onScrollEnds]);
79
- React.useImperativeHandle(actionRef, function () {
80
- return {
81
- scrollToIndex: function scrollToIndex(a) {
85
+ var scrollAndFocus = React.useCallback(function (index) {
86
+ vScroll(index, {
87
+ align: 'center'
88
+ });
89
+ setTimeout(function () {
90
+ virtualListRef.current.querySelector("[data-index=\"".concat(index, "\"]")).focus();
91
+ }, 300);
92
+ }, [vScroll]);
93
+ React.useEffect(function () {
94
+ if (actionRef && actionRef.current) {
95
+ actionRef.current.scrollToIndex = function (a) {
82
96
  var b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
83
97
  align: 'center'
84
98
  };
85
99
  vScroll(a, b);
86
- },
87
- getMessagesInView: onScrollStop
88
- };
89
- });
100
+ };
101
+
102
+ actionRef.current.getMessagesInView = onScrollStop;
103
+
104
+ actionRef.current.focusToIndex = function (a) {
105
+ scrollAndFocus(a);
106
+ };
107
+
108
+ actionRef.current.focusToList = function (a) {
109
+ var _virtualListRef$curre2;
110
+ (_virtualListRef$curre2 = virtualListRef.current) === null || _virtualListRef$curre2 === void 0 ? void 0 : _virtualListRef$curre2.focus();
111
+ };
112
+ }
113
+ }, [actionRef, onScrollStop, scrollAndFocus, vScroll]);
114
+ var handleKey = React.useCallback(function (e) {
115
+ e.preventDefault();
116
+ var key = e.key;
117
+ var index = Number(e.currentTarget.dataset.index);
118
+
119
+ switch (key) {
120
+ case 'ArrowUp':
121
+ if (index > 0) virtualListRef.current.querySelector("[data-index=\"".concat(index - 1, "\"]")).focus();
122
+ break;
123
+
124
+ case 'ArrowDown':
125
+ if (index < messages.length - 1) {
126
+ virtualListRef.current.querySelector("[data-index=\"".concat(index + 1, "\"]")).focus();
127
+ }
128
+
129
+ break;
130
+
131
+ case 'Home':
132
+ scrollAndFocus(0);
133
+ break;
134
+
135
+ case 'End':
136
+ scrollAndFocus(messages.length - 1);
137
+ break;
138
+
139
+ case 'Tab':
140
+ actionRef.current.focusToComposer();
141
+ break;
142
+ }
143
+ }, [actionRef, messages.length, scrollAndFocus]);
90
144
  React.useEffect(function () {
91
145
  var handlerCallback = null;
92
146
  var localVirtualRef = virtualListRef.current;
@@ -121,12 +175,15 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
121
175
  transform: "translateY(".concat(start, "px)"),
122
176
  width: '100%'
123
177
  };
124
- return /*#__PURE__*/React.createElement("div", {
178
+ return /*#__PURE__*/React.createElement(ListItem, {
125
179
  "data-element": "chat-element-list-item",
126
180
  "data-index": index,
127
181
  key: "ds-chat-bubble-".concat(index),
128
182
  style: style,
129
- ref: measureRef
183
+ ref: measureRef,
184
+ tabIndex: 0,
185
+ onKeyDown: handleKey,
186
+ role: "listitem"
130
187
  }, /*#__PURE__*/React.createElement(StyledWrapperListItem, {
131
188
  type: row.type
132
189
  }, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ?
@@ -136,12 +193,14 @@ var ChatContainerMessagesList = function ChatContainerMessagesList(props) {
136
193
  helpMessage: isSending ? sendingText : row.helpMessage
137
194
  })) : null, row.type === BUBBLE_TYPES.DELIMITER ? /*#__PURE__*/React.createElement(MessageDelimiter, row) : null, row.type === BUBBLE_TYPES.SYSTEM ? /*#__PURE__*/React.createElement(SystemMessage, row) : null));
138
195
  });
139
- }, [virtualItems, messages, sendingMessages]);
196
+ }, [virtualItems, messages, sendingMessages, handleKey, sendingText]);
140
197
  return /*#__PURE__*/React.createElement(StyledWrapper, null, /*#__PURE__*/React.createElement(StyledChatContainerContentList, {
141
198
  "data-testid": "chat-thread-container",
142
199
  tabIndex: 0,
143
200
  "aria-live": "polite",
144
- ref: virtualListRef
201
+ ref: virtualListRef,
202
+ role: "list",
203
+ onKeyDown: handleKey
145
204
  }, /*#__PURE__*/React.createElement(StyledChatContainerContentListScroll, {
146
205
  height: "".concat(totalSize, "px")
147
206
  }, render, !isLoading && hasMoreItems ? /*#__PURE__*/React.createElement(StyledLoadMoreContainer, {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatContainerMessagesList.js","sources":["../../../../src/parts/chat-container-messages-list/ChatContainerMessagesList.tsx"],"sourcesContent":["/* eslint-disable max-lines */\nimport React, { CSSProperties } from 'react';\nimport { describe } from 'react-desc';\nimport { useVirtual } from 'react-virtual';\nimport DSButton from '@elliemae/ds-basic/Button';\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} from './styled';\nimport { defaultProps, listProps, ChatContainerMessagesListProps } from './props';\n\nconst getPadding = (hasMoreItems) => {\n const padding = {\n paddingStart: 0,\n paddingEnd: -5,\n };\n if (hasMoreItems === 'top') padding.paddingStart = 42;\n else if (hasMoreItems === 'bottom') padding.paddingEnd = 42;\n return padding;\n};\n\nconst ChatContainerMessagesList = (props: ChatContainerMessagesListProps): JSX.Element => {\n const { sendingText, sendingMessages, messages, actionRef, onScrollEnds, getMoreMessages, hasMoreItems, isLoading } =\n props;\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),\n estimateSize: React.useCallback(() => 80, []),\n });\n\n const onScrollStop = React.useCallback((): number[] => {\n const { bottom, top } = virtualListRef.current.getBoundingClientRect();\n const list = virtualListRef.current.querySelectorAll(\n '[data-element=\"chat-element-list-item\"]',\n ) as NodeListOf<HTMLDivElement>;\n const indexList = [];\n list.forEach((item: HTMLDivElement) => {\n const { top: itemTop } = item.getBoundingClientRect();\n if (itemTop < bottom && itemTop > top) indexList.push(item.dataset.index);\n });\n if (onScrollEnds) onScrollEnds(indexList);\n return indexList;\n }, [onScrollEnds]);\n\n React.useImperativeHandle(actionRef, () => ({\n scrollToIndex: (a, b = { align: 'center' }) => {\n vScroll(a, b);\n },\n getMessagesInView: onScrollStop,\n }));\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 return () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);\n };\n }, [onScrollStop, onScrollEnds]);\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 <div\n data-element=\"chat-element-list-item\"\n data-index={index}\n key={`ds-chat-bubble-${index}`}\n style={style}\n ref={measureRef}\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 </div>\n );\n }),\n [virtualItems, messages, sendingMessages],\n );\n\n return (\n <StyledWrapper>\n <StyledChatContainerContentList\n data-testid=\"chat-thread-container\"\n tabIndex={0}\n aria-live=\"polite\"\n ref={virtualListRef}\n >\n <StyledChatContainerContentListScroll height={`${totalSize}px`}>\n {render}\n {!isLoading && hasMoreItems ? (\n <StyledLoadMoreContainer hasMoreItems={hasMoreItems}>\n <DSButton labelText=\"Load More\" buttonType=\"secondary\" onClick={getMoreMessages} />\n </StyledLoadMoreContainer>\n ) : null}\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","padding","paddingStart","paddingEnd","ChatContainerMessagesList","props","sendingText","sendingMessages","messages","actionRef","onScrollEnds","getMoreMessages","isLoading","virtualListRef","React","useRef","useVirtual","size","length","parentRef","overscan","estimateSize","useCallback","vScroll","scrollToIndex","totalSize","virtualItems","onScrollStop","current","getBoundingClientRect","bottom","top","list","querySelectorAll","indexList","forEach","item","itemTop","push","dataset","index","useImperativeHandle","a","b","align","getMessagesInView","useEffect","handlerCallback","localVirtualRef","onScroll","clearTimeout","setTimeout","addEventListener","removeEventListener","render","useMemo","map","virtualItem","measureRef","start","row","isSending","find","m","dsId","style","position","left","transform","width","type","BUBBLE_TYPES","SENDER","RECIPIENT","helpMessage","DELIMITER","SYSTEM","propTypes","listProps","defaultProps","ChatContainerMessagesListWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,YAAD,EAAkB;AACnC,MAAMC,OAAO,GAAG;AACdC,IAAAA,YAAY,EAAE,CADA;AAEdC,IAAAA,UAAU,EAAE,CAAC;AAFC,GAAhB;AAIA,MAAIH,YAAY,KAAK,KAArB,EAA4BC,OAAO,CAACC,YAAR,GAAuB,EAAvB,CAA5B,KACK,IAAIF,YAAY,KAAK,QAArB,EAA+BC,OAAO,CAACE,UAAR,GAAqB,EAArB;AACpC,SAAOF,OAAP;AACD,CARD;;IAUMG,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,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,EAAuBf,GAAvB,CAAtC,GAA+E,IALlF,EAMGA,GAAG,CAACU,IAAJ,KAAaC,YAAY,CAACK,MAA1B,gBAAmC,oBAAC,aAAD,EAAoBhB,GAApB,CAAnC,GAAyE,IAN5E,CAPF,CADF;AAkBD,KA9BD,CADF;AAAA,GADa,EAiCb,CAAClC,YAAD,EAAelB,QAAf,EAAyBD,eAAzB,CAjCa,CAAf;AAoCA,sBACE,oBAAC,aAAD,qBACE,oBAAC,8BAAD;AACE,mBAAY,uBADd;AAEE,IAAA,QAAQ,EAAE,CAFZ;AAGE,iBAAU,QAHZ;AAIE,IAAA,GAAG,EAAEM;AAJP,kBAME,oBAAC,oCAAD;AAAsC,IAAA,MAAM,YAAKY,SAAL;AAA5C,KACG6B,MADH,EAEG,CAAC1C,SAAD,IAAcZ,YAAd,gBACC,oBAAC,uBAAD;AAAyB,IAAA,YAAY,EAAEA;AAAvC,kBACE,oBAAC,QAAD;AAAU,IAAA,SAAS,EAAC,WAApB;AAAgC,IAAA,UAAU,EAAC,WAA3C;AAAuD,IAAA,OAAO,EAAEW;AAAhE,IADF,CADD,GAIG,IANN,CANF,CADF,CADF;AAmBD;;AAEDP,yBAAyB,CAACyE,SAA1B,GAAsCC,SAAtC;AACA1E,yBAAyB,CAAC2E,YAA1B,GAAyCA,YAAzC;IACMC,mCAAmC,GAAGC,QAAQ,CAAC7E,yBAAD;AACpD4E,mCAAmC,CAACH,SAApC,GAAgDC,SAAhD;;;;"}
1
+ {"version":3,"file":"ChatContainerMessagesList.js","sources":["../../../../src/parts/chat-container-messages-list/ChatContainerMessagesList.tsx"],"sourcesContent":["/* 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-basic/Button';\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\nconst getPadding = (hasMoreItems) => {\n const padding = {\n paddingStart: 0,\n paddingEnd: -5,\n };\n if (hasMoreItems === 'top') padding.paddingStart = 42;\n else if (hasMoreItems === 'bottom') padding.paddingEnd = 42;\n return padding;\n};\n\nconst ChatContainerMessagesList = (props: ChatContainerMessagesListProps): JSX.Element => {\n useValidateProps(props, ChatContainerMessagesListWithSchema.toJSON());\n\n const { sendingText, sendingMessages, messages, actionRef, onScrollEnds, getMoreMessages, hasMoreItems, isLoading } =\n props;\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),\n estimateSize: React.useCallback(() => 80, []),\n });\n\n const onScrollStop = React.useCallback((): number[] => {\n const { bottom, top } = virtualListRef.current.getBoundingClientRect();\n const list = virtualListRef.current.querySelectorAll(\n '[data-element=\"chat-element-list-item\"]',\n ) as NodeListOf<HTMLDivElement>;\n const indexList = [];\n list.forEach((item: HTMLDivElement) => {\n const { top: itemTop } = item.getBoundingClientRect();\n if (itemTop < bottom && itemTop > top) indexList.push(item.dataset.index);\n });\n if (onScrollEnds) onScrollEnds(indexList);\n return indexList;\n }, [onScrollEnds]);\n\n const scrollAndFocus = React.useCallback(\n (index: number) => {\n vScroll(index, { align: 'center' });\n setTimeout(() => {\n (virtualListRef.current.querySelector(`[data-index=\"${index}\"]`) as HTMLDivElement).focus();\n }, 300);\n },\n [vScroll],\n );\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.scrollToIndex = (a, b = { align: 'center' }) => {\n vScroll(a, b);\n };\n actionRef.current.getMessagesInView = onScrollStop;\n actionRef.current.focusToIndex = (a, b = { align: 'center' }) => {\n scrollAndFocus(a);\n };\n actionRef.current.focusToList = (a, b = { align: 'center' }) => {\n virtualListRef.current?.focus();\n };\n }\n }, [actionRef, onScrollStop, scrollAndFocus, vScroll]);\n\n const handleKey = React.useCallback(\n (e) => {\n e.preventDefault();\n const { key } = e;\n const index = Number(e.currentTarget.dataset.index);\n switch (key) {\n case 'ArrowUp':\n if (index > 0)\n (virtualListRef.current.querySelector(`[data-index=\"${index - 1}\"]`) as HTMLDivElement).focus();\n break;\n case 'ArrowDown':\n if (index < messages.length - 1) {\n (virtualListRef.current.querySelector(`[data-index=\"${index + 1}\"]`) as HTMLDivElement).focus();\n }\n break;\n case 'Home':\n scrollAndFocus(0);\n break;\n case 'End':\n scrollAndFocus(messages.length - 1);\n break;\n case 'Tab':\n actionRef.current.focusToComposer();\n break;\n default:\n break;\n }\n },\n [actionRef, messages.length, scrollAndFocus],\n );\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 return () => {\n if (handlerCallback) clearTimeout(handlerCallback);\n if (onScrollEnds) localVirtualRef.removeEventListener('scroll', onScroll);\n };\n }, [onScrollStop, onScrollEnds]);\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}`}\n style={style}\n ref={measureRef}\n tabIndex={0}\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 ref={virtualListRef}\n role=\"list\"\n onKeyDown={handleKey}\n >\n <StyledChatContainerContentListScroll height={`${totalSize}px`}>\n {render}\n {!isLoading && hasMoreItems ? (\n <StyledLoadMoreContainer hasMoreItems={hasMoreItems}>\n <DSButton labelText=\"Load More\" buttonType=\"secondary\" onClick={getMoreMessages} />\n </StyledLoadMoreContainer>\n ) : null}\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","padding","paddingStart","paddingEnd","ChatContainerMessagesList","props","useValidateProps","ChatContainerMessagesListWithSchema","toJSON","sendingText","sendingMessages","messages","actionRef","onScrollEnds","getMoreMessages","isLoading","virtualListRef","React","useRef","useVirtual","size","length","parentRef","overscan","estimateSize","useCallback","vScroll","scrollToIndex","totalSize","virtualItems","onScrollStop","current","getBoundingClientRect","bottom","top","list","querySelectorAll","indexList","forEach","item","itemTop","push","dataset","index","scrollAndFocus","align","setTimeout","querySelector","focus","useEffect","a","b","getMessagesInView","focusToIndex","focusToList","handleKey","e","preventDefault","key","Number","currentTarget","focusToComposer","handlerCallback","localVirtualRef","onScroll","clearTimeout","addEventListener","removeEventListener","render","useMemo","map","virtualItem","measureRef","start","row","isSending","find","m","dsId","style","position","left","transform","width","type","BUBBLE_TYPES","SENDER","RECIPIENT","helpMessage","DELIMITER","SYSTEM","propTypes","listProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAMA,UAAU,GAAG,SAAbA,UAAa,CAACC,YAAD,EAAkB;AACnC,MAAMC,OAAO,GAAG;AACdC,IAAAA,YAAY,EAAE,CADA;AAEdC,IAAAA,UAAU,EAAE,CAAC;AAFC,GAAhB;AAIA,MAAIH,YAAY,KAAK,KAArB,EAA4BC,OAAO,CAACC,YAAR,GAAuB,EAAvB,CAA5B,KACK,IAAIF,YAAY,KAAK,QAArB,EAA+BC,OAAO,CAACE,UAAR,GAAqB,EAArB;AACpC,SAAOF,OAAP;AACD,CARD;;IAUMG,yBAAyB,GAAG,SAA5BA,yBAA4B,CAACC,KAAD,EAAwD;AACxFC,EAAAA,gBAAgB,CAACD,KAAD,EAAQE,mCAAmC,CAACC,MAApC,EAAR,CAAhB;AAEA,MAAQC,WAAR,GACEJ,KADF,CAAQI,WAAR;AAAA,MAAqBC,eAArB,GACEL,KADF,CAAqBK,eAArB;AAAA,MAAsCC,QAAtC,GACEN,KADF,CAAsCM,QAAtC;AAAA,MAAgDC,SAAhD,GACEP,KADF,CAAgDO,SAAhD;AAAA,MAA2DC,YAA3D,GACER,KADF,CAA2DQ,YAA3D;AAAA,MAAyEC,eAAzE,GACET,KADF,CAAyES,eAAzE;AAAA,MAA0Fd,YAA1F,GACEK,KADF,CAA0FL,YAA1F;AAAA,MAAwGe,SAAxG,GACEV,KADF,CAAwGU,SAAxG;AAEA,MAAMC,cAAc,GAAGC,KAA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'@elliemae/ds-props-helpers';
2
+
3
+ var useValidateProps = function useValidateProps(props, schema) {
4
+ useValidatePropTypes(props, schema);
5
+ };
6
+
7
+ export { useValidateProps };
8
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useValidateProps.js","sources":["../../../../../src/parts/chat-container-messages-list/config/useValidateProps.tsx"],"sourcesContent":["import { useValidatePropTypes } from '@elliemae/ds-props-helpers';\nimport { ChatContainerMessagesListProps } from '../props';\n\nexport const useValidateProps = (props: ChatContainerMessagesListProps, schema: unknown): void => {\n useValidatePropTypes(props, schema);\n};\n"],"names":["useValidateProps","props","schema","useValidatePropTypes"],"mappings":";;IAGaA,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAAwCC,MAAxC,EAAkE;AAChGC,EAAAA,oBAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -13,13 +13,18 @@ import '@elliemae/ds-grid';
13
13
  import '../bubble/props.js';
14
14
  import 'prop-types';
15
15
  import 'lodash';
16
+ import '../bubble/config/useValidateProps.js';
17
+ import '@elliemae/ds-props-helpers';
16
18
  import '../bubble/ChatBubbleArrow.js';
17
19
  import '../message-delimiter/MessageDelimiter.js';
18
20
  import '../message-delimiter/styled.js';
19
21
  import '../message-delimiter/props.js';
22
+ import '../message-delimiter/config/useValidateProps.js';
20
23
  import '../system-message/SystemMessage.js';
21
24
  import '../system-message/style.js';
22
25
  import '../system-message/props.js';
26
+ import '../system-message/config/useValidateProps.js';
23
27
  import './styled.js';
24
28
  import './props.js';
29
+ import './config/useValidateProps.js';
25
30
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -13,7 +13,7 @@ var defaultProps = {
13
13
  };
14
14
  var listProps = {
15
15
  messages: PropTypes.arrayOf(PropTypes.object).description('The array of out-of-the-box items you want to render inside the ChatMessageList').defaultValue(defaultProps.messages),
16
- actionRef: PropTypes.func.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n }\n \n ").defaultValue(defaultProps.messages),
16
+ actionRef: PropTypes.object.description("Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n focusToIndex: (n: number) => void,\n focusToList: () => void,\n focusToComposer: () => void,\n focusToSend: () => void,\n }\n \n ").defaultValue(defaultProps.actionRef),
17
17
  onScrollEnds: PropTypes.func.description("Called when the scroll stops."),
18
18
  isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description('Keeps the load more space while the loading is in progress'),
19
19
  hasMoreItems: PropTypes.oneOf(['top', 'bottom', undefined]).description('Show Load More button at the `top` or `bottom` of the container'),
@@ -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: Ref<ActionRef>;\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}\n\nexport const defaultProps: ChatContainerMessagesListProps = {\n messages: [],\n actionRef: noop,\n onScrollEnds: () => [],\n getMoreMessages: noop,\n sendingMessages: undefined,\n sendingText: 'Sending',\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.func\n .description(\n `Reference: \n { \n scrollToIndex: (n: number) => void,\n getMessagesInView: () => number[],\n }\n \n `,\n )\n .defaultValue(defaultProps.messages),\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.arrayOf(PropTypes.oneOfType([PropTypes.string, 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","listProps","PropTypes","arrayOf","object","description","defaultValue","func","isLoading","oneOf","hasMoreItems","oneOfType","string","number"],"mappings":";;;IAoBaA,YAA4C,GAAG;AAC1DC,EAAAA,QAAQ,EAAE,EADgD;AAE1DC,EAAAA,SAAS,EAAEC,IAF+C;AAG1DC,EAAAA,YAAY,EAAE;AAAA,WAAM,EAAN;AAAA,GAH4C;AAI1DC,EAAAA,eAAe,EAAEF,IAJyC;AAK1DG,EAAAA,eAAe,EAAEC,SALyC;AAM1DC,EAAAA,WAAW,EAAE;AAN6C;IAS/CC,SAAS,GAAG;AACvBR,EAAAA,QAAQ,EAAES,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACE,MAA5B,EACPC,WADO,CACK,iFADL,EAEPC,YAFO,CAEMd,YAAY,CAACC,QAFnB,CADa;AAIvBC,EAAAA,SAAS,EAAEQ,SAAS,CAACK,IAAV,CACRF,WADQ,sJAURC,YAVQ,CAUKd,YAAY,CAACC,QAVlB,CAJY;AAevBG,EAAAA,YAAY,EAAEM,SAAS,CAACK,IAAV,CAAeF,WAAf,iCAfS;AAgBvBG,EAAAA,SAAS,EAAEN,SAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBV,SAAlB,CAAhB,EAA8CM,WAA9C,CACT,4DADS,CAhBY;AAmBvBK,EAAAA,YAAY,EAAER,SAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBV,SAAlB,CAAhB,EAA8CM,WAA9C,CACZ,iEADY,CAnBS;AAsBvBR,EAAAA,eAAe,EAAEK,SAAS,CAACK,IAAV,CACdF,WADc,CACF,0CADE,EAEdC,YAFc,CAEDd,YAAY,CAACK,eAFZ,CAtBM;AAyBvBC,EAAAA,eAAe,EAAEI,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACS,SAAV,CAAoB,CAACT,SAAS,CAACU,MAAX,EAAmBV,SAAS,CAACW,MAA7B,CAApB,CAAlB,EACdR,WADc,CACF,kCADE,EAEdC,YAFc,CAEDd,YAAY,CAACM,eAFZ,CAzBM;AA4BvBE,EAAAA,WAAW,EAAEE,SAAS,CAACU,MAAV,CACVP,WADU,CACE,kDADF,EAEVC,YAFU,CAEGd,YAAY,CAACQ,WAFhB;AA5BU;;;;"}
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}\n\nexport const defaultProps: ChatContainerMessagesListProps = {\n messages: [],\n actionRef: noop,\n onScrollEnds: () => [],\n getMoreMessages: noop,\n sendingMessages: undefined,\n sendingText: 'Sending',\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 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.arrayOf(PropTypes.oneOfType([PropTypes.string, 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","listProps","PropTypes","arrayOf","object","description","defaultValue","func","isLoading","oneOf","hasMoreItems","oneOfType","string","number"],"mappings":";;;IAoBaA,YAA4C,GAAG;AAC1DC,EAAAA,QAAQ,EAAE,EADgD;AAE1DC,EAAAA,SAAS,EAAEC,IAF+C;AAG1DC,EAAAA,YAAY,EAAE;AAAA,WAAM,EAAN;AAAA,GAH4C;AAI1DC,EAAAA,eAAe,EAAEF,IAJyC;AAK1DG,EAAAA,eAAe,EAAEC,SALyC;AAM1DC,EAAAA,WAAW,EAAE;AAN6C;IAS/CC,SAAS,GAAG;AACvBR,EAAAA,QAAQ,EAAES,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACE,MAA5B,EACPC,WADO,CACK,iFADL,EAEPC,YAFO,CAEMd,YAAY,CAACC,QAFnB,CADa;AAIvBC,EAAAA,SAAS,EAAEQ,SAAS,CAACE,MAAV,CACRC,WADQ,oTAcRC,YAdQ,CAcKd,YAAY,CAACE,SAdlB,CAJY;AAmBvBE,EAAAA,YAAY,EAAEM,SAAS,CAACK,IAAV,CAAeF,WAAf,iCAnBS;AAoBvBG,EAAAA,SAAS,EAAEN,SAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBV,SAAlB,CAAhB,EAA8CM,WAA9C,CACT,4DADS,CApBY;AAuBvBK,EAAAA,YAAY,EAAER,SAAS,CAACO,KAAV,CAAgB,CAAC,KAAD,EAAQ,QAAR,EAAkBV,SAAlB,CAAhB,EAA8CM,WAA9C,CACZ,iEADY,CAvBS;AA0BvBR,EAAAA,eAAe,EAAEK,SAAS,CAACK,IAAV,CACdF,WADc,CACF,0CADE,EAEdC,YAFc,CAEDd,YAAY,CAACK,eAFZ,CA1BM;AA6BvBC,EAAAA,eAAe,EAAEI,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACS,SAAV,CAAoB,CAACT,SAAS,CAACU,MAAX,EAAmBV,SAAS,CAACW,MAA7B,CAApB,CAAlB,EACdR,WADc,CACF,kCADE,EAEdC,YAFc,CAEDd,YAAY,CAACM,eAFZ,CA7BM;AAgCvBE,EAAAA,WAAW,EAAEE,SAAS,CAACU,MAAV,CACVP,WADU,CACE,kDADF,EAEVC,YAFU,CAEGd,YAAY,CAACQ,WAFhB;AAhCU;;;;"}
@@ -2,12 +2,14 @@ import styled from 'styled-components';
2
2
  import '../bubble/ChatBubble.js';
3
3
  import { BUBBLE_TYPES } from '../bubble/props.js';
4
4
  import 'react';
5
+ import 'react-desc';
5
6
  import '@elliemae/ds-icons/WarningCircleFill';
6
7
  import '../bubble/styled.js';
7
8
  import '@elliemae/ds-grid';
9
+ import '../bubble/config/useValidateProps.js';
10
+ import '@elliemae/ds-props-helpers';
8
11
  import '../bubble/ChatBubbleArrow.js';
9
12
  import 'prop-types';
10
- import 'react-desc';
11
13
  import 'lodash';
12
14
 
13
15
  var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
@@ -48,6 +50,11 @@ var StyledLoadMoreContainer = /*#__PURE__*/styled.div.withConfig({
48
50
  }, function (props) {
49
51
  return props.hasMoreItems === 'bottom' ? 'bottom: 0;' : '';
50
52
  });
53
+ var ListItem = /*#__PURE__*/styled.div.withConfig({
54
+ componentId: "sc-1jhprzr-5"
55
+ })(["&:focus,&:focus-visible{outline:none;&:after{content:'';display:block;position:absolute;pointer-events:none;background:rgba(255,255,255,0.5);width:calc(100% + ", ");height:100%;}}"], function (props) {
56
+ return props.theme.space.xxs;
57
+ });
51
58
 
52
- export { StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer, StyledWrapper, StyledWrapperListItem };
59
+ export { ListItem, StyledChatContainerContentList, StyledChatContainerContentListScroll, StyledLoadMoreContainer, StyledWrapper, StyledWrapperListItem };
53
60
  //# 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} 0px 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`;\n"],"names":["StyledWrapper","styled","div","StyledWrapperListItem","props","type","BUBBLE_TYPES","SENDER","theme","space","xxs","RECIPIENT","SYSTEM","StyledChatContainerContentList","xs","StyledChatContainerContentListScroll","height","StyledLoadMoreContainer","hasMoreItems"],"mappings":";;;;;;;;;;;;IAIaA,aAAa,gBAAGC,MAAM,CAACC,GAAV;AAAA;AAAA;;IAMbC,qBAAqB,gBAAGF,MAAM,CAACC,GAAV;AAAA;AAAA,uCAE9B,UAACE,KAAD;AAAA,SACAA,KAAK,CAACC,IAAN,KAAeC,YAAY,CAACC,MAA5B,uBACYH,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,cACqCN,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GADvD,iBADA;AAAA,CAF8B,EAM9B,UAACN,KAAD;AAAA,SACAA,KAAK,CAACC,IAAN,KAAeC,YAAY,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,YAAY,CAACM,MAA5B,uBACYR,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAD9B,aADA;AAAA,CAX8B;IAiBrBG,8BAA8B,gBAAGZ,MAAM,CAACC,GAAV;AAAA;AAAA,gGAG9B,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBK,EAA7B;AAAA,CAH8B;IAQ9BC,oCAAoC,gBAAGd,MAAM,CAACC,GAAV;AAAA;AAAA,kDAErC,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACY,MAAjB;AAAA,CAFqC;IAMpCC,uBAAuB,gBAAGhB,MAAM,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;;;;"}
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} 0px 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 pointer-events: none;\n background: rgba(255, 255, 255, 0.5);\n width: calc(100% + ${(props) => props.theme.space.xxs});\n height: 100%;\n }\n }\n`;\n"],"names":["StyledWrapper","styled","div","StyledWrapperListItem","props","type","BUBBLE_TYPES","SENDER","theme","space","xxs","RECIPIENT","SYSTEM","StyledChatContainerContentList","xs","StyledChatContainerContentListScroll","height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AWA,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,MAAM,CAACC,GAAV;AAAA;AAAA,4LAUM,UAACE,KAAD;AAAA,SAAWA,KAAK,CAACI,KAAN,CAAYC,KAAZ,CAAkBC,GAA7B;AAAA,CAVN;;;;"}
@@ -1,12 +1,17 @@
1
1
  import React, { useMemo } from 'react';
2
+ import { describe } from 'react-desc';
2
3
  import { Grid } from '@elliemae/ds-grid';
3
4
  import Communications from '@elliemae/ds-icons/Communications';
5
+ import { emptyStateProps, defaultProps } from './props.js';
4
6
  import { MessageWrapper, ChatEmptyStateWrapper } from './styled.js';
7
+ import { useValidateProps } from './config/useValidateProps.js';
5
8
  import 'styled-components';
9
+ import '@elliemae/ds-props-helpers';
6
10
 
7
- var ChatEmptyState = function ChatEmptyState(_ref) {
8
- var label = _ref.label,
9
- action = _ref.action;
11
+ var ChatEmptyState = function ChatEmptyState(props) {
12
+ useValidateProps(props, ChatEmptyStateListWithSchema.toJSON());
13
+ var label = props.label,
14
+ action = props.action;
10
15
  var MainContent = useMemo(function () {
11
16
  return /*#__PURE__*/React.createElement(Grid, {
12
17
  alignItems: "center",
@@ -31,5 +36,10 @@ var ChatEmptyState = function ChatEmptyState(_ref) {
31
36
  }, MainContent);
32
37
  };
33
38
 
34
- export { ChatEmptyState };
39
+ ChatEmptyState.propTypes = emptyStateProps;
40
+ ChatEmptyState.defaultProps = defaultProps;
41
+ var ChatEmptyStateListWithSchema = describe(ChatEmptyState);
42
+ ChatEmptyStateListWithSchema.propTypes = emptyStateProps;
43
+
44
+ export { ChatEmptyState, ChatEmptyStateListWithSchema };
35
45
  //# sourceMappingURL=ChatEmptyState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatEmptyState.js","sources":["../../../../src/parts/chat-empty-state/ChatEmptyState.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport Communications from '@elliemae/ds-icons/Communications';\nimport { ChatEmptyStateProps } from './props';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled';\n\nexport const ChatEmptyState = ({ label, action }: ChatEmptyStateProps): JSX.Element => {\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"],"names":["ChatEmptyState","label","action","MainContent","useMemo"],"mappings":";;;;;;IAMaA,cAAc,GAAG,SAAjBA,cAAiB,OAAyD;AAAA,MAAtDC,KAAsD,QAAtDA,KAAsD;AAAA,MAA/CC,MAA+C,QAA/CA,MAA+C;AACrF,MAAMC,WAAW,GAAGC,OAAO,CACzB;AAAA,wBACE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,cAAD;AAAgB,MAAA,IAAI,EAAC,KAArB;AAA2B,MAAA,KAAK,EAAE,CAAC,SAAD,EAAY,GAAZ;AAAlC,MADF,CADF,eAIE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,cAAD,QAAiBH,KAAjB,CADF,CAJF,eAOE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,OACGC,MADH,CAPF,CADF;AAAA,GADyB,EAczB,CAACD,KAAD,EAAQC,MAAR,CAdyB,CAA3B;AAgBA,sBACE,oBAAC,qBAAD;AAAuB,IAAA,UAAU,EAAC,QAAlC;AAA2C,IAAA,cAAc,EAAC;AAA1D,KACGC,WADH,CADF;AAKD;;;;"}
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/Communications';\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","propTypes","emptyStateProps","defaultProps","describe"],"mappings":";;;;;;;;;;IAQMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAA6C;AAClEC,EAAAA,gBAAgB,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,OAAO,CACzB;AAAA,wBACE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,cAAD;AAAgB,MAAA,IAAI,EAAC,KAArB;AAA2B,MAAA,KAAK,EAAE,CAAC,SAAD,EAAY,GAAZ;AAAlC,MADF,CADF,eAIE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,oBACE,oBAAC,cAAD,QAAiBH,KAAjB,CADF,CAJF,eAOE,oBAAC,IAAD;AAAM,MAAA,UAAU,EAAC,QAAjB;AAA0B,MAAA,cAAc,EAAC;AAAzC,OACGC,MADH,CAPF,CADF;AAAA,GADyB,EAczB,CAACD,KAAD,EAAQC,MAAR,CAdyB,CAA3B;AAgBA,sBACE,oBAAC,qBAAD;AAAuB,IAAA,UAAU,EAAC,QAAlC;AAA2C,IAAA,cAAc,EAAC;AAA1D,KACGC,WADH,CADF;AAKD;;AAEDP,cAAc,CAACS,SAAf,GAA2BC,eAA3B;AACAV,cAAc,CAACW,YAAf,GAA8BA,YAA9B;IACMR,4BAA4B,GAAGS,QAAQ,CAACZ,cAAD;AAC7CG,4BAA4B,CAACM,SAA7B,GAAyCC,eAAzC;;;;"}
@@ -0,0 +1,8 @@
1
+ import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
+
3
+ var useValidateProps = function useValidateProps(props, schema) {
4
+ useValidatePropTypes(props, schema);
5
+ };
6
+
7
+ export { useValidateProps };
8
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +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,oBAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -5,7 +5,8 @@ var defaultProps = {
5
5
  action: null
6
6
  };
7
7
  var emptyStateProps = {
8
- label: PropTypes.arrayOf(PropTypes.string).description('No Message to show text helper').defaultValue(defaultProps.label)
8
+ label: PropTypes.arrayOf(PropTypes.string).description('No Message to show text helper').defaultValue(defaultProps.label),
9
+ action: PropTypes.node.description('action element').defaultValue(defaultProps.action)
9
10
  };
10
11
 
11
12
  export { defaultProps, emptyStateProps };
@@ -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};\n"],"names":["defaultProps","label","action","emptyStateProps","PropTypes","arrayOf","string","description","defaultValue"],"mappings":";;IAOaA,YAAiC,GAAG;AAC/CC,EAAAA,KAAK,EAAE,iBADwC;AAE/CC,EAAAA,MAAM,EAAE;AAFuC;IAKpCC,eAAe,GAAG;AAC7BF,EAAAA,KAAK,EAAEG,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACE,MAA5B,EACJC,WADI,CACQ,gCADR,EAEJC,YAFI,CAESR,YAAY,CAACC,KAFtB;AADsB;;;;"}
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,SAAS,CAACC,OAAV,CAAkBD,SAAS,CAACE,MAA5B,EACJC,WADI,CACQ,gCADR,EAEJC,YAFI,CAESR,YAAY,CAACC,KAFtB,CADsB;AAI7BC,EAAAA,MAAM,EAAEE,SAAS,CAACK,IAAV,CAAeF,WAAf,CAA2B,gBAA3B,EAA6CC,YAA7C,CAA0DR,YAAY,CAACE,MAAvE;AAJqB;;;;"}
@@ -7,6 +7,7 @@ import { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled.
7
7
  import { TileButton } from '../tile-button/TileButton.js';
8
8
  import { SidebarButton } from '../sidebar-button/SidebarButton.js';
9
9
  import { chatSidebarProps, defaultProps } from './props.js';
10
+ import { useValidateProps } from './config/useValidateProps.js';
10
11
  import 'styled-components';
11
12
  import '@elliemae/ds-grid';
12
13
  import '../../styled.js';
@@ -14,12 +15,14 @@ import '@elliemae/ds-tooltip';
14
15
  import '@elliemae/ds-icons/CloseXsmall';
15
16
  import '../tile-button/styled.js';
16
17
  import '../tile-button/props.js';
17
- import 'prop-types';
18
18
  import 'lodash';
19
19
  import '@elliemae/ds-icons/Comments';
20
+ import '../tile-button/config/useValidateProps.js';
21
+ import '@elliemae/ds-props-helpers';
20
22
  import '@babel/runtime/helpers/esm/objectWithoutProperties';
21
23
  import '../sidebar-button/styled.js';
22
24
  import '../sidebar-button/props.js';
25
+ import 'prop-types';
23
26
 
24
27
  var FooterChat = function FooterChat(_ref) {
25
28
  var expanded = _ref.expanded,
@@ -36,13 +39,14 @@ var FooterChat = function FooterChat(_ref) {
36
39
  });
37
40
  };
38
41
 
39
- var SideBarChat = function SideBarChat(_ref2) {
40
- var sidebarItems = _ref2.sidebarItems,
41
- expanded = _ref2.expanded,
42
- onFooterClose = _ref2.onFooterClose,
43
- onFooterExpand = _ref2.onFooterExpand,
44
- selectedItem = _ref2.selectedItem,
45
- footerButtonExtraProps = _ref2.footerButtonExtraProps;
42
+ var SideBarChat = function SideBarChat(props) {
43
+ useValidateProps(props, SideBarChatWithSchema.toJSON());
44
+ var sidebarItems = props.sidebarItems,
45
+ expanded = props.expanded,
46
+ onFooterClose = props.onFooterClose,
47
+ onFooterExpand = props.onFooterExpand,
48
+ selectedItem = props.selectedItem,
49
+ footerButtonExtraProps = props.footerButtonExtraProps;
46
50
  return /*#__PURE__*/React.createElement(StyledSideBarContainer, {
47
51
  rows: [1, 'auto']
48
52
  }, /*#__PURE__*/React.createElement(StyledSideBarButtonsContainer, null, sidebarItems.map(function (p) {
@@ -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 MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\nimport {\n StyledSideBarContainer,\n StyledSideBarButtonsContainer,\n} from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from '../sidebar-button/SidebarButton';\nimport { CharSidebarProps, defaultProps, chatSidebarProps } from './props';\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 = ({\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n}: CharSidebarProps): JSX.Element => (\n <StyledSideBarContainer rows={[1, 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton {...p} selected={selectedItem === p.dsId} />\n ))}\n </StyledSideBarButtonsContainer>\n <FooterChat\n expanded={expanded}\n onFooterClose={onFooterClose}\n onFooterExpand={onFooterExpand}\n footerButtonExtraProps={footerButtonExtraProps}\n />\n </StyledSideBarContainer>\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","MenuCollapse","MenuExpand","SideBarChat","sidebarItems","selectedItem","map","p","dsId","propTypes","chatSidebarProps","defaultProps","SideBarChatWithSchema","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,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,sBAMjB,oBAAC,aAAD;AACE,IAAA,IAAI,EAAC,gBADP;AAEE,IAAA,KAAK,EAAE,IAFT;AAGE,IAAA,IAAI,EAAE,CAACH,QAAD,GAAYI,YAAZ,GAA2BC,UAHnC;AAIE,IAAA,OAAO,EAAEL,QAAQ,GAAGC,aAAH,GAAmBC,cAJtC;AAKE,oBAAcF,QALhB;AAME,kBAAYG,sBAAsB,CAAC,YAAD;AANpC,IANiB;AAAA,CAAnB;;IAgBMG,WAAW,GAAG,SAAdA,WAAc;AAAA,MAClBC,YADkB,SAClBA,YADkB;AAAA,MAElBP,QAFkB,SAElBA,QAFkB;AAAA,MAGlBC,aAHkB,SAGlBA,aAHkB;AAAA,MAIlBC,cAJkB,SAIlBA,cAJkB;AAAA,MAKlBM,YALkB,SAKlBA,YALkB;AAAA,MAMlBL,sBANkB,SAMlBA,sBANkB;AAAA,sBAQlB,oBAAC,sBAAD;AAAwB,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAA9B,kBACE,oBAAC,6BAAD,QACGI,YAAY,CAACE,GAAb,CAAiB,UAACC,CAAD;AAAA,wBAChB,oBAAC,UAAD,eAAgBA,CAAhB;AAAmB,MAAA,QAAQ,EAAEF,YAAY,KAAKE,CAAC,CAACC;AAAhD,OADgB;AAAA,GAAjB,CADH,CADF,eAME,oBAAC,UAAD;AACE,IAAA,QAAQ,EAAEX,QADZ;AAEE,IAAA,aAAa,EAAEC,aAFjB;AAGE,IAAA,cAAc,EAAEC,cAHlB;AAIE,IAAA,sBAAsB,EAAEC;AAJ1B,IANF,CARkB;AAAA;;AAuBpBG,WAAW,CAACM,SAAZ,GAAwBC,gBAAxB;AACAP,WAAW,CAACQ,YAAZ,GAA2BA,YAA3B;IACMC,qBAAqB,GAAGC,QAAQ,CAACV,WAAD;AACtCS,qBAAqB,CAACH,SAAtB,GAAkCC,gBAAlC;;;;"}
1
+ {"version":3,"file":"SideBarChat.js","sources":["../../../../src/parts/chat-sidebar/SideBarChat.tsx"],"sourcesContent":["import React from 'react';\nimport { describe } from 'react-desc';\nimport MenuExpand from '@elliemae/ds-icons/MenuExpand';\nimport MenuCollapse from '@elliemae/ds-icons/MenuCollapse';\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 { sidebarItems, expanded, onFooterClose, onFooterExpand, selectedItem, footerButtonExtraProps } = props;\n return (\n <StyledSideBarContainer rows={[1, 'auto']}>\n <StyledSideBarButtonsContainer>\n {sidebarItems.map((p) => (\n <TileButton {...p} selected={selectedItem === p.dsId} />\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","MenuCollapse","MenuExpand","SideBarChat","props","useValidateProps","SideBarChatWithSchema","toJSON","sidebarItems","selectedItem","map","p","dsId","propTypes","chatSidebarProps","defaultProps","describe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,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,sBAMjB,oBAAC,aAAD;AACE,IAAA,IAAI,EAAC,gBADP;AAEE,IAAA,KAAK,EAAE,IAFT;AAGE,IAAA,IAAI,EAAE,CAACH,QAAD,GAAYI,YAAZ,GAA2BC,UAHnC;AAIE,IAAA,OAAO,EAAEL,QAAQ,GAAGC,aAAH,GAAmBC,cAJtC;AAKE,oBAAcF,QALhB;AAME,kBAAYG,sBAAsB,CAAC,YAAD;AANpC,IANiB;AAAA,CAAnB;;IAgBMG,WAAW,GAAG,SAAdA,WAAc,CAACC,KAAD,EAA0C;AAC5DC,EAAAA,gBAAgB,CAACD,KAAD,EAAQE,qBAAqB,CAACC,MAAtB,EAAR,CAAhB;AACA,MAAQC,YAAR,GAAwGJ,KAAxG,CAAQI,YAAR;AAAA,MAAsBX,QAAtB,GAAwGO,KAAxG,CAAsBP,QAAtB;AAAA,MAAgCC,aAAhC,GAAwGM,KAAxG,CAAgCN,aAAhC;AAAA,MAA+CC,cAA/C,GAAwGK,KAAxG,CAA+CL,cAA/C;AAAA,MAA+DU,YAA/D,GAAwGL,KAAxG,CAA+DK,YAA/D;AAAA,MAA6ET,sBAA7E,GAAwGI,KAAxG,CAA6EJ,sBAA7E;AACA,sBACE,oBAAC,sBAAD;AAAwB,IAAA,IAAI,EAAE,CAAC,CAAD,EAAI,MAAJ;AAA9B,kBACE,oBAAC,6BAAD,QACGQ,YAAY,CAACE,GAAb,CAAiB,UAACC,CAAD;AAAA,wBAChB,oBAAC,UAAD,eAAgBA,CAAhB;AAAmB,MAAA,QAAQ,EAAEF,YAAY,KAAKE,CAAC,CAACC;AAAhD,OADgB;AAAA,GAAjB,CADH,CADF,eAME,oBAAC,UAAD;AACE,IAAA,QAAQ,EAAEf,QADZ;AAEE,IAAA,aAAa,EAAEC,aAFjB;AAGE,IAAA,cAAc,EAAEC,cAHlB;AAIE,IAAA,sBAAsB,EAAEC;AAJ1B,IANF,CADF;AAeD;;AAEDG,WAAW,CAACU,SAAZ,GAAwBC,gBAAxB;AACAX,WAAW,CAACY,YAAZ,GAA2BA,YAA3B;IACMT,qBAAqB,GAAGU,QAAQ,CAACb,WAAD;AACtCG,qBAAqB,CAACO,SAAtB,GAAkCC,gBAAlC;;;;"}
@@ -0,0 +1,8 @@
1
+ import { useValidatePropTypes } from '@elliemae/ds-props-helpers';
2
+
3
+ var useValidateProps = function useValidateProps(props, schema) {
4
+ useValidatePropTypes(props, schema);
5
+ };
6
+
7
+ export { useValidateProps };
8
+ //# sourceMappingURL=useValidateProps.js.map
@@ -0,0 +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,oBAAoB,CAACF,KAAD,EAAQC,MAAR,CAApB;AACD;;;;"}
@@ -13,12 +13,15 @@ import '@elliemae/ds-tooltip';
13
13
  import '@elliemae/ds-icons/CloseXsmall';
14
14
  import '../tile-button/styled.js';
15
15
  import '../tile-button/props.js';
16
- import 'prop-types';
17
16
  import 'lodash';
18
17
  import '@elliemae/ds-icons/Comments';
18
+ import '../tile-button/config/useValidateProps.js';
19
+ import '@elliemae/ds-props-helpers';
19
20
  import '../sidebar-button/SidebarButton.js';
20
21
  import '@babel/runtime/helpers/esm/objectWithoutProperties';
21
22
  import '../sidebar-button/styled.js';
22
23
  import '../sidebar-button/props.js';
24
+ import 'prop-types';
23
25
  import './props.js';
26
+ import './config/useValidateProps.js';
24
27
  //# sourceMappingURL=index.js.map
@@ -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":"FloatingButton.js","sources":["../../../../src/parts/floating-button/FloatingButton.tsx"],"sourcesContent":["import React from 'react';\nimport Comments from '@elliemae/ds-icons/Comments';\nimport { StyledFloatingButton } from './styled';\nimport {\n defaultFloatingButton,\n propsFloatingButton,\n FloatingButtonProps,\n} from './props';\n\nexport const FloatingButton = ({\n onClick,\n}: FloatingButtonProps): JSX.Element => (\n <StyledFloatingButton 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","propTypes","propsFloatingButton","defaultProps","defaultFloatingButton"],"mappings":";;;;;;;;IASaA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,MAC5BC,OAD4B,QAC5BA,OAD4B;AAAA,sBAG5B,oBAAC,oBAAD;AAAsB,mBAAY,sBAAlC;AAAyD,IAAA,OAAO,EAAEA;AAAlE,kBACE,oBAAC,QAAD;AAAU,IAAA,IAAI,EAAC;AAAf,IADF,CAH4B;AAAA;AAQ9BD,cAAc,CAACE,SAAf,GAA2BC,mBAA3B;AACAH,cAAc,CAACI,YAAf,GAA8BC,qBAA9B;;;;"}
1
+ {"version":3,"file":"FloatingButton.js","sources":["../../../../src/parts/floating-button/FloatingButton.tsx"],"sourcesContent":["import React from 'react';\nimport Comments from '@elliemae/ds-icons/Comments';\nimport { StyledFloatingButton } from './styled';\nimport { defaultFloatingButton, propsFloatingButton, FloatingButtonProps } from './props';\n\nexport const FloatingButton = ({ onClick }: FloatingButtonProps): JSX.Element => (\n <StyledFloatingButton 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","propTypes","propsFloatingButton","defaultProps","defaultFloatingButton"],"mappings":";;;;;;;;IAKaA,cAAc,GAAG,SAAjBA,cAAiB;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,sBAC5B,oBAAC,oBAAD;AAAsB,mBAAY,sBAAlC;AAAyD,IAAA,OAAO,EAAEA;AAAlE,kBACE,oBAAC,QAAD;AAAU,IAAA,IAAI,EAAC;AAAf,IADF,CAD4B;AAAA;AAM9BD,cAAc,CAACE,SAAf,GAA2BC,mBAA3B;AACAH,cAAc,CAACI,YAAf,GAA8BC,qBAA9B;;;;"}
@@ -16,6 +16,8 @@ import '@babel/runtime/helpers/esm/slicedToArray';
16
16
  import '@elliemae/ds-icons/PaperAirplane';
17
17
  import '../chat-composer/styled.js';
18
18
  import '@elliemae/ds-button';
19
+ import '../chat-composer/config/useValidateProps.js';
20
+ import '@elliemae/ds-props-helpers';
19
21
  import '../chat-composer/props.js';
20
22
  import '../chat-container-messages-list/ChatContainerMessagesList.js';
21
23
  import 'react-virtual';
@@ -25,17 +27,22 @@ import '@elliemae/ds-icons/WarningCircleFill';
25
27
  import '../bubble/styled.js';
26
28
  import '../bubble/props.js';
27
29
  import 'prop-types';
30
+ import '../bubble/config/useValidateProps.js';
28
31
  import '../bubble/ChatBubbleArrow.js';
29
32
  import '../message-delimiter/MessageDelimiter.js';
30
33
  import '../message-delimiter/styled.js';
31
34
  import '../message-delimiter/props.js';
35
+ import '../message-delimiter/config/useValidateProps.js';
32
36
  import '../system-message/SystemMessage.js';
33
37
  import '../system-message/style.js';
34
38
  import '../system-message/props.js';
39
+ import '../system-message/config/useValidateProps.js';
35
40
  import '../chat-container-messages-list/styled.js';
36
41
  import '../chat-container-messages-list/props.js';
42
+ import '../chat-container-messages-list/config/useValidateProps.js';
37
43
  import '../chat-container/props.js';
38
44
  import '../chat-container/styled.js';
45
+ import '../chat-container/config/useValidateProps.js';
39
46
  import '@elliemae/ds-icons/MenuExpand';
40
47
  import '@elliemae/ds-icons/MenuCollapse';
41
48
  import '../chat-sidebar/styled.js';
@@ -45,11 +52,13 @@ import '@elliemae/ds-icons/CloseXsmall';
45
52
  import '../tile-button/styled.js';
46
53
  import '../tile-button/props.js';
47
54
  import '@elliemae/ds-icons/Comments';
55
+ import '../tile-button/config/useValidateProps.js';
48
56
  import '../sidebar-button/SidebarButton.js';
49
57
  import '@babel/runtime/helpers/esm/objectWithoutProperties';
50
58
  import '../sidebar-button/styled.js';
51
59
  import '../sidebar-button/props.js';
52
60
  import '../chat-sidebar/props.js';
61
+ import '../chat-sidebar/config/useValidateProps.js';
53
62
 
54
63
  /* eslint-disable react/prop-types */
55
64
  var InfluencerContainer = function InfluencerContainer(props) {
@@ -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","expanded","expandedWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAMaA,mBAA6C,GAAG,SAAhDA,mBAAgD,CAACC,KAAD;AAAA,SAC3DC,KAAK,CAACC,OAAN,CACE;AAAA,WACEF,KAAK,CAACG,QAAN,GAAiB,IAAjB,gBACE,oBAAC,mBAAD;AACE,MAAA,IAAI,EAAE,CAAC,MAAD,EAASH,KAAK,CAACI,QAAN,GAAiB,CAAjB,GAAqB,KAA9B,CADR;AAEE,MAAA,QAAQ,EAAEJ,KAAK,CAACI,QAFlB;AAGE,MAAA,aAAa,EAAEJ,KAAK,CAACK;AAHvB,oBAKE,oBAAC,WAAD,OALF,EAMGL,KAAK,CAACI,QAAN,gBAAiB,oBAAC,aAAD,OAAjB,gBAAqC,gCANxC,CAFJ;AAAA,GADF,EAYE,CAACJ,KAAK,CAACG,QAAP,EAAiBH,KAAK,CAACI,QAAvB,EAAiCJ,KAAK,CAACK,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","expanded","expandedWidth"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAMaA,mBAA6C,GAAG,SAAhDA,mBAAgD,CAACC,KAAD;AAAA,SAC3DC,KAAK,CAACC,OAAN,CACE;AAAA,WACEF,KAAK,CAACG,QAAN,GAAiB,IAAjB,gBACE,oBAAC,mBAAD;AACE,MAAA,IAAI,EAAE,CAAC,MAAD,EAASH,KAAK,CAACI,QAAN,GAAiB,CAAjB,GAAqB,KAA9B,CADR;AAEE,MAAA,QAAQ,EAAEJ,KAAK,CAACI,QAFlB;AAGE,MAAA,aAAa,EAAEJ,KAAK,CAACK;AAHvB,oBAKE,oBAAC,WAAD,OALF,EAMGL,KAAK,CAACI,QAAN,gBAAiB,oBAAC,aAAD,OAAjB,gBAAqC,gCANxC,CAFJ;AAAA,GADF,EAYE,CAACJ,KAAK,CAACG,QAAP,EAAiBH,KAAK,CAACI,QAAvB,EAAiCJ,KAAK,CAACK,aAAvC,CAZF,CAD2D;AAAA;;;;"}