@elliemae/ds-chat 3.2.1-rc.3 → 3.2.1-rc.6

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 (37) hide show
  1. package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js +4 -17
  2. package/dist/cjs/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
  3. package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js +4 -21
  4. package/dist/cjs/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
  5. package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +5 -31
  6. package/dist/cjs/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
  7. package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js +4 -17
  8. package/dist/cjs/exported-related/message-delimiter/MessageDelimiter.js.map +1 -1
  9. package/dist/cjs/exported-related/message-delimiter/props.js +3 -19
  10. package/dist/cjs/exported-related/message-delimiter/props.js.map +1 -1
  11. package/dist/cjs/parts/chat-composer/ChatContainerComposer.js +1 -15
  12. package/dist/cjs/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  13. package/dist/cjs/parts/chat-container/ChatContainer.js +9 -23
  14. package/dist/cjs/parts/chat-container/ChatContainer.js.map +1 -1
  15. package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js +14 -24
  16. package/dist/cjs/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  17. package/dist/cjs/react-desc-prop-types.js +6 -21
  18. package/dist/cjs/react-desc-prop-types.js.map +1 -1
  19. package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js +4 -19
  20. package/dist/esm/exported-related/chat-container-header/ChatContainerHeader.js.map +1 -1
  21. package/dist/esm/exported-related/chat-sidebar/SideBarChat.js +4 -23
  22. package/dist/esm/exported-related/chat-sidebar/SideBarChat.js.map +1 -1
  23. package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js +5 -33
  24. package/dist/esm/exported-related/chat-sidebar/sidebar-button/SidebarButton.js.map +1 -1
  25. package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js +4 -19
  26. package/dist/esm/exported-related/message-delimiter/MessageDelimiter.js.map +1 -1
  27. package/dist/esm/exported-related/message-delimiter/props.js +3 -21
  28. package/dist/esm/exported-related/message-delimiter/props.js.map +1 -1
  29. package/dist/esm/parts/chat-composer/ChatContainerComposer.js +1 -17
  30. package/dist/esm/parts/chat-composer/ChatContainerComposer.js.map +1 -1
  31. package/dist/esm/parts/chat-container/ChatContainer.js +9 -25
  32. package/dist/esm/parts/chat-container/ChatContainer.js.map +1 -1
  33. package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js +14 -26
  34. package/dist/esm/parts/chat-container-messages-list/ChatContainerMessagesList.js.map +1 -1
  35. package/dist/esm/react-desc-prop-types.js +6 -23
  36. package/dist/esm/react-desc-prop-types.js.map +1 -1
  37. package/package.json +10 -10
@@ -1,27 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
8
  var __export = (target, all) => {
26
9
  for (var name in all)
27
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -104,7 +87,8 @@ const defaultPropsMessagesList = {
104
87
  bannerPosition: void 0,
105
88
  bannerRef: void 0
106
89
  };
107
- const ChatContainerMessagesListPropTypes = __spreadProps(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), {
90
+ const ChatContainerMessagesListPropTypes = {
91
+ ...import_ds_utilities.globalAttributesPropTypes,
108
92
  messages: import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.object).description("The array of out-of-the-box items you want to render inside the ChatMessageList").defaultValue(defaultPropsMessagesList.messages),
109
93
  actionRef: import_ds_utilities.PropTypes.object.description(`Reference:
110
94
  {
@@ -124,7 +108,7 @@ const ChatContainerMessagesListPropTypes = __spreadProps(__spreadValues({}, impo
124
108
  getMoreMessages: import_ds_utilities.PropTypes.func.description("Called when the user clicks on load more").defaultValue(defaultPropsMessagesList.getMoreMessages),
125
109
  sendingMessages: import_ds_utilities.PropTypes.oneOfType([import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.string), import_ds_utilities.PropTypes.arrayOf(import_ds_utilities.PropTypes.number)]).description("Array of ids of sending messages").defaultValue(defaultPropsMessagesList.sendingMessages),
126
110
  sendingText: import_ds_utilities.PropTypes.string.description("Label description for messages in sending status").defaultValue(defaultPropsMessagesList.sendingText)
127
- });
111
+ };
128
112
  const defaultProps = {
129
113
  messagesListProps: defaultPropsMessagesList,
130
114
  composerProps: defaultPropsComposer,
@@ -145,7 +129,8 @@ const defaultProps = {
145
129
  sendingMessages: void 0,
146
130
  sendingText: "Sending"
147
131
  };
148
- const ChatContainerPropTypes = __spreadProps(__spreadValues({}, import_ds_utilities.globalAttributesPropTypes), {
132
+ const ChatContainerPropTypes = {
133
+ ...import_ds_utilities.globalAttributesPropTypes,
149
134
  messagesListProps: import_ds_utilities.PropTypes.object.description('ChatMessageList props "messages" / "onScrollEnds"').defaultValue(defaultProps.messagesListProps),
150
135
  composerProps: import_ds_utilities.PropTypes.object.description("Composer configuration").defaultValue(defaultProps.composerProps),
151
136
  autoScroll: import_ds_utilities.PropTypes.bool.description("Auto scroll to bottom on resize").defaultValue(defaultProps.autoScroll),
@@ -174,5 +159,5 @@ const ChatContainerPropTypes = __spreadProps(__spreadValues({}, import_ds_utilit
174
159
  }
175
160
 
176
161
  `).defaultValue(defaultProps.actionRef)
177
- });
162
+ };
178
163
  //# sourceMappingURL=react-desc-prop-types.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/react-desc-prop-types.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["/* eslint-disable max-lines */\nimport { noop } from 'lodash';\nimport { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-utilities';\nimport { BANNER_TYPES } from '@elliemae/ds-banner';\nimport { BubblePropsT } from './exported-related/bubble/props';\n\nexport declare namespace DSChatT {\n export interface ContainerProps {\n messagesListProps: Pick<MessagesListProps, 'messages' | 'onScrollEnds'>;\n composerProps: ComposerProps;\n actionRef?: ActionRef;\n autoScroll: boolean;\n device: 'desktop' | 'mobile';\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: () => void;\n bannerPosition?: 'top' | 'bottom';\n bannerProps?: ChatBannerProps;\n sendingMessages?: string[] | number[];\n sendingText: string;\n }\n\n export interface ComposerProps {\n placeholder?: string;\n inputValue?: string;\n ariaMaxLengthMessage?: string;\n maxLengthMessage?: string;\n onChange: (value: string) => void;\n onResize?: (value: number) => void;\n onSend: (value: string) => void;\n onFocus?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onBlur?: (e: React.ChangeEvent<HTMLTextAreaElement>, value: string) => void;\n onKeyDown?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;\n maxHeight?: number;\n inputMaxLength: number | undefined;\n buttonDisabled: boolean;\n dataTestid?: string;\n actionRef?: ActionRef;\n }\n\n export interface MessagesListProps {\n messages: BubblePropsT[];\n actionRef: () => void;\n onScrollEnds: (indexList: number[]) => number[];\n isLoading?: 'top' | 'bottom';\n hasMoreItems?: 'top' | 'bottom';\n getMoreMessages: () => void;\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\n interface ChatBannerProps {\n label: string;\n viewLabel: string;\n type?: string;\n onView: () => void;\n onClose: () => void;\n }\n\n interface ActionRef {\n scrollToIndex: (n: number, b: { align: 'end' | 'center' | 'start' }) => void;\n getMessagesInView: () => number[];\n }\n\n export interface GetPaddingT {\n hasMoreItems: string | undefined;\n bannerPosition: string | undefined;\n isLoading: string | undefined;\n }\n}\n\nexport interface TextAreaProps {\n height: string | number;\n style: React.CSSProperties;\n}\n\nexport const defaultPropsComposer: DSChatT.ComposerProps = {\n placeholder: 'Type your message',\n inputValue: '',\n ariaMaxLengthMessage: '',\n onChange: noop,\n onResize: noop,\n onSend: noop,\n onFocus: noop,\n onBlur: noop,\n onKeyDown: noop,\n maxHeight: 0,\n inputMaxLength: undefined,\n maxLengthMessage: undefined,\n buttonDisabled: false,\n dataTestid: 'ds-chat-composer',\n actionRef: undefined,\n};\n\nexport const ChatComposerPropTypes = {\n placeholder: PropTypes.string.description('Input Placeholder').defaultValue(defaultPropsComposer.placeholder),\n inputValue: PropTypes.string.description('Input value').defaultValue(defaultPropsComposer.inputValue),\n ariaMaxLengthMessage: PropTypes.string\n .description('Aria message for Max length message when exceeded')\n .defaultValue(defaultPropsComposer.maxLengthMessage),\n maxLengthMessage: PropTypes.string\n .description('Max length message')\n .defaultValue(defaultPropsComposer.maxLengthMessage),\n onChange: PropTypes.func.description('Called when the user types').defaultValue(defaultPropsComposer.onChange),\n onResize: PropTypes.func\n .description('Called the input changes his height')\n .defaultValue(defaultPropsComposer.onResize),\n onSend: PropTypes.func.description('Called when the click send').defaultValue(defaultPropsComposer.onSend),\n onFocus: PropTypes.func.description('Input focus').defaultValue(defaultPropsComposer.onFocus),\n onBlur: PropTypes.func.description('Input blur').defaultValue(defaultPropsComposer.onBlur),\n onKeyDown: PropTypes.func.description('Input on key down').defaultValue(defaultPropsComposer.onKeyDown),\n maxHeight: PropTypes.number\n .description('Max height of the composer. Use 0 for no limit')\n .defaultValue(defaultPropsComposer.onBlur),\n inputMaxLength: PropTypes.number\n .description('Max length of the composer. `undefined` for no limit')\n .defaultValue(defaultPropsComposer.inputMaxLength),\n buttonDisabled: PropTypes.bool\n .description('Control the disabled for the send button')\n .defaultValue(defaultPropsComposer.buttonDisabled),\n dataTestid: PropTypes.string.description('Data testid').defaultValue(defaultPropsComposer.placeholder),\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(defaultPropsComposer.actionRef),\n};\n\nexport const defaultPropsMessagesList: DSChatT.MessagesListProps = {\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 ChatContainerMessagesListPropTypes = {\n ...globalAttributesPropTypes,\n\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(defaultPropsMessagesList.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(defaultPropsMessagesList.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(defaultPropsMessagesList.getMoreMessages),\n sendingMessages: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.arrayOf(PropTypes.number)])\n .description('Array of ids of sending messages')\n .defaultValue(defaultPropsMessagesList.sendingMessages),\n sendingText: PropTypes.string\n .description('Label description for messages in sending status')\n .defaultValue(defaultPropsMessagesList.sendingText),\n};\n\nexport const defaultProps: DSChatT.ContainerProps = {\n messagesListProps: defaultPropsMessagesList,\n composerProps: defaultPropsComposer,\n actionRef: undefined,\n autoScroll: false,\n device: 'desktop',\n isLoading: undefined,\n hasMoreItems: undefined,\n getMoreMessages: noop,\n bannerPosition: undefined,\n bannerProps: {\n type: BANNER_TYPES.INFO,\n label: 'Unread Messages',\n viewLabel: 'View',\n onView: noop,\n onClose: noop,\n },\n sendingMessages: undefined,\n sendingText: 'Sending',\n};\n\nexport const ChatContainerPropTypes = {\n ...globalAttributesPropTypes,\n messagesListProps: PropTypes.object\n .description('ChatMessageList props \"messages\" / \"onScrollEnds\"')\n .defaultValue(defaultProps.messagesListProps),\n composerProps: PropTypes.object.description('Composer configuration').defaultValue(defaultProps.composerProps),\n autoScroll: PropTypes.bool.description('Auto scroll to bottom on resize').defaultValue(defaultProps.autoScroll),\n device: PropTypes.string\n .description('Option to render mobile or desktop style composer')\n .defaultValue(defaultProps.device),\n isLoading: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\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 bannerPosition: PropTypes.oneOf(['top', 'bottom', undefined]).description(\n 'Show Loading messages indicator at the `top` or `bottom` of the container',\n ),\n bannerProps: PropTypes.object\n .description(\n `Banner configuration:\n label: string;\n viewLabel: string;\n type: BANNER_TYPES;\n onView: () => void;\n onClose: () => void;\n `,\n )\n .defaultValue(defaultProps.bannerProps),\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 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};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,oBAAqB;AACrB,0BAAqD;AACrD,uBAA6B;AA8EtB,MAAM,uBAA8C;AAAA,EACzD,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,sBAAsB;AAAA,EACtB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,WAAW;AACb;AAEO,MAAM,wBAAwB;AAAA,EACnC,aAAa,8BAAU,OAAO,YAAY,mBAA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CAAkC,EAC9C,aAAa,aAAa,eAAe;AAAA,EAC5C,aAAa,8BAAU,OACpB,YAAY,kDAAkD,EAC9D,aAAa,aAAa,WAAW;AAAA,EACxC,WAAW,8BAAU,OAClB,YACC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAWF,EACC,aAAa,aAAa,SAAS;AACxC;",
6
6
  "names": []
7
7
  }
@@ -1,20 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
2
  import * as React from "react";
19
3
  import React2 from "react";
20
4
  import {
@@ -35,11 +19,12 @@ const ChatContainerHeader = (props) => {
35
19
  useValidateTypescriptPropTypes(propsWithDefault, propTypes);
36
20
  const globalsAttr = useGetGlobalAttributes(propsWithDefault);
37
21
  const { title, children } = propsWithDefault;
38
- return /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeader, __spreadValues({
22
+ return /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeader, {
39
23
  alignItems: "center",
40
24
  cols: ["minmax(calc(100% - 64px), 1fr)", children ? "auto" : "0px"],
41
- role: "heading"
42
- }, globalsAttr), /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderLabel, {
25
+ role: "heading",
26
+ ...globalsAttr
27
+ }, /* @__PURE__ */ React2.createElement(StyledChatContainerContentHeaderLabel, {
43
28
  "data-testid": "chat-container-header-title",
44
29
  pl: "xxs",
45
30
  pr: "xxs"
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-container-header/ChatContainerHeader.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n describe,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n} from '@elliemae/ds-utilities';\n\nimport { SimpleTruncatedTooltipText } from '@elliemae/ds-truncated-tooltip-text';\nimport {\n StyledChatContainerContentHeader,\n StyledChatContainerContentHeaderLabel,\n StyledChatContainerContentHeaderActions,\n} from './styled';\nimport { defaultProps, propTypes, HeaderProps } from './props';\n\nconst ChatContainerHeader: React.ComponentType<HeaderProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n const globalsAttr = useGetGlobalAttributes(propsWithDefault);\n\n const { title, children } = propsWithDefault;\n\n return (\n <StyledChatContainerContentHeader\n alignItems=\"center\"\n cols={['minmax(calc(100% - 64px), 1fr)', children ? 'auto' : '0px']}\n role=\"heading\"\n {...globalsAttr}\n >\n <StyledChatContainerContentHeaderLabel data-testid=\"chat-container-header-title\" pl=\"xxs\" pr=\"xxs\">\n <SimpleTruncatedTooltipText value={title} />\n </StyledChatContainerContentHeaderLabel>\n <StyledChatContainerContentHeaderActions\n cols={React.Children.toArray(children)\n .filter(Boolean)\n .map(() => '32px')}\n justifyContent=\"flex-end\"\n data-testid=\"chat-container-header-children\"\n >\n {children}\n </StyledChatContainerContentHeaderActions>\n </StyledChatContainerContentHeader>\n );\n};\n\nChatContainerHeader.propTypes = propTypes as WeakValidationMap<unknown>;\nChatContainerHeader.displayName = 'ChatContainerHeader';\nconst ChatContainerHeaderWithSchema = describe(ChatContainerHeader);\nChatContainerHeaderWithSchema.propTypes = propTypes as WeakValidationMap<unknown>;\n\nexport { ChatContainerHeader, ChatContainerHeaderWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AAEA,MAAM,sBAAwD,CAAC,UAAU;AACvE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,SAAS;AAE1D,QAAM,cAAc,uBAAuB,gBAAgB;AAE3D,QAAM,EAAE,OAAO,aAAa;AAE5B,SACE,qCAAC;AAAA,IACC,YAAW;AAAA,IACX,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,MAAK;AAAA,KACD,cAEJ,qCAAC;AAAA,IAAsC,eAAY;AAAA,IAA8B,IAAG;AAAA,IAAM,IAAG;AAAA,KAC3F,qCAAC;AAAA,IAA2B,OAAO;AAAA,GAAO,CAC5C,GACA,qCAAC;AAAA,IACC,MAAM,OAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,IACnB,gBAAe;AAAA,IACf,eAAY;AAAA,KAEX,QACH,CACF;AAEJ;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
5
+ "mappings": ";AAAA;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AAAA;AAAA;AAAA;AAAA;AAKA;AAEA,MAAM,sBAAwD,CAAC,UAAU;AACvE,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,SAAS;AAE1D,QAAM,cAAc,uBAAuB,gBAAgB;AAE3D,QAAM,EAAE,OAAO,aAAa;AAE5B,SACE,qCAAC;AAAA,IACC,YAAW;AAAA,IACX,MAAM,CAAC,kCAAkC,WAAW,SAAS,KAAK;AAAA,IAClE,MAAK;AAAA,IACJ,GAAG;AAAA,KAEJ,qCAAC;AAAA,IAAsC,eAAY;AAAA,IAA8B,IAAG;AAAA,IAAM,IAAG;AAAA,KAC3F,qCAAC;AAAA,IAA2B,OAAO;AAAA,GAAO,CAC5C,GACA,qCAAC;AAAA,IACC,MAAM,OAAM,SAAS,QAAQ,QAAQ,EAClC,OAAO,OAAO,EACd,IAAI,MAAM,MAAM;AAAA,IACnB,gBAAe;AAAA,IACf,eAAY;AAAA,KAEX,QACH,CACF;AAEJ;AAEA,oBAAoB,YAAY;AAChC,oBAAoB,cAAc;AAClC,MAAM,gCAAgC,SAAS,mBAAmB;AAClE,8BAA8B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import React2 from "react";
23
4
  import { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from "@elliemae/ds-utilities";
@@ -65,14 +46,14 @@ const SideBarChat = (props) => {
65
46
  return /* @__PURE__ */ React2.createElement(StyledSideBarContainer, {
66
47
  rows: [1, "auto"],
67
48
  ref: listRef
68
- }, /* @__PURE__ */ React2.createElement(StyledSideBarButtonsContainer, null, sidebarItems.map((p) => /* @__PURE__ */ React2.createElement(TileButton, __spreadProps(__spreadValues({
49
+ }, /* @__PURE__ */ React2.createElement(StyledSideBarButtonsContainer, null, sidebarItems.map((p) => /* @__PURE__ */ React2.createElement(TileButton, {
69
50
  key: p.dsId,
70
- innerRef: registerReference
71
- }, p), {
51
+ innerRef: registerReference,
52
+ ...p,
72
53
  selected: selectedItem === p.dsId,
73
54
  tooltipPlacement,
74
55
  disableTooltip: enableTooltipWhenIsClosed ? false : !expanded
75
- })))), /* @__PURE__ */ React2.createElement(FooterChat, {
56
+ }))), /* @__PURE__ */ React2.createElement(FooterChat, {
76
57
  expanded,
77
58
  onFooterClose,
78
59
  onFooterExpand,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/chat-sidebar/SideBarChat.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-utilities';\nimport { MenuCollapse, MenuExpand } from '@elliemae/ds-icons';\nimport { StyledSideBarContainer, StyledSideBarButtonsContainer } from './styled';\nimport { TileButton } from '../tile-button';\nimport { SidebarButton } from './sidebar-button/SidebarButton';\nimport { ChatSidebarProps, defaultProps, chatSidebarProps } from './props';\n\nconst FooterChat = ({\n expanded,\n onFooterClose,\n onFooterExpand,\n footerButtonExtraProps,\n}: Pick<ChatSidebarProps, 'expanded' | 'onFooterClose' | 'onFooterExpand' | 'footerButtonExtraProps'>) => (\n <SidebarButton\n dsId=\"sidebar_footer\"\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: React.ComponentType<ChatSidebarProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, chatSidebarProps);\n\n const {\n sidebarItems,\n expanded,\n onFooterClose,\n onFooterExpand,\n selectedItem,\n footerButtonExtraProps,\n tooltipPlacement,\n enableTooltipWhenIsClosed,\n actionRef,\n } = propsWithDefault;\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 as WeakValidationMap<unknown>;\nSideBarChat.displayName = 'SideBarChat';\nconst SideBarChatWithSchema = describe(SideBarChat);\nSideBarChatWithSchema.propTypes = chatSidebarProps as WeakValidationMap<unknown>;\n\nexport { SideBarChat, SideBarChatWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAM,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,MAEA,qCAAC;AAAA,EACC,MAAK;AAAA,EACL,MAAM,CAAC,WAAW,eAAe;AAAA,EACjC,SAAS,WAAW,gBA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
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
- var __objRest = (source, exclude) => {
19
- var target = {};
20
- for (var prop in source)
21
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
22
- target[prop] = source[prop];
23
- if (source != null && __getOwnPropSymbols)
24
- for (var prop of __getOwnPropSymbols(source)) {
25
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
26
- target[prop] = source[prop];
27
- }
28
- return target;
29
- };
30
2
  import * as React from "react";
31
3
  import React2 from "react";
32
4
  import { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from "./styled";
33
5
  import { propsSidebarButton, defaultSidebarButton } from "./props";
34
- const SidebarButton = (_a) => {
35
- var _b = _a, { label, dsId, onClick, Icon } = _b, rest = __objRest(_b, ["label", "dsId", "onClick", "Icon"]);
6
+ const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }) => {
36
7
  const handleClick = React2.useCallback(() => {
37
8
  if (dsId)
38
9
  onClick(dsId);
39
10
  }, [onClick, dsId]);
40
- return /* @__PURE__ */ React2.createElement(StyledSidebarButton, __spreadValues({
11
+ return /* @__PURE__ */ React2.createElement(StyledSidebarButton, {
41
12
  key: dsId,
42
13
  "data-testid": `sidebar-button-${dsId}`,
43
- onClick: handleClick
44
- }, rest), /* @__PURE__ */ React2.createElement(StyledSidebarButtonIcon, {
14
+ onClick: handleClick,
15
+ ...rest
16
+ }, /* @__PURE__ */ React2.createElement(StyledSidebarButtonIcon, {
45
17
  alignItems: "center",
46
18
  justifyContent: "center"
47
19
  }, /* @__PURE__ */ React2.createElement(Icon, {
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../../src/exported-related/chat-sidebar/sidebar-button/SidebarButton.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { StyledSidebarButton, StyledSidebarButtonLabel, StyledSidebarButtonIcon } from './styled';\nimport { propsSidebarButton, defaultSidebarButton, SidebarButtonProps } from './props';\n\nexport const SidebarButton = ({ label, dsId, onClick, Icon, ...rest }: SidebarButtonProps): JSX.Element => {\n const handleClick = React.useCallback(() => {\n if (dsId) onClick(dsId);\n }, [onClick, dsId]);\n\n return (\n <StyledSidebarButton key={dsId} data-testid={`sidebar-button-${dsId}`} onClick={handleClick} {...rest}>\n <StyledSidebarButtonIcon alignItems=\"center\" justifyContent=\"center\">\n <Icon size=\"m\" />\n </StyledSidebarButtonIcon>\n {label && <StyledSidebarButtonLabel>{label}</StyledSidebarButtonLabel>}\n </StyledSidebarButton>\n );\n};\n\nSidebarButton.propTypes = propsSidebarButton;\nSidebarButton.defaultProps = defaultSidebarButton;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AACA;AAEO,MAAM,gBAAgB,CAAC,OAA6E;AAA7E,eAAE,SAAO,MAAM,SAAS,SAAxB,IAAiC,iBAAjC,IAAiC,CAA/B,SAAO,QAAM,WAAS;AACpD,QAAM,cAAc,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qCAAC;AAAA,IAAoB,KAAK;AAAA,IAAM,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,KAAiB,OAC/F,qCAAC;AAAA,IAAwB,YAAW;AAAA,IAAS,gBAAe;AAAA,KAC1D,qCAAC;AAAA,IAAK,MAAK;AAAA,GAAI,CACjB,GACC,SAAS,qCAAC,gCAA0B,KAAM,CAC7C;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
5
+ "mappings": ";AAAA;ACAA;AACA;AACA;AAEO,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAAM,SAAS,SAAS,WAA4C;AACzG,QAAM,cAAc,OAAM,YAAY,MAAM;AAC1C,QAAI;AAAM,cAAQ,IAAI;AAAA,EACxB,GAAG,CAAC,SAAS,IAAI,CAAC;AAElB,SACE,qCAAC;AAAA,IAAoB,KAAK;AAAA,IAAM,eAAa,kBAAkB;AAAA,IAAQ,SAAS;AAAA,IAAc,GAAG;AAAA,KAC/F,qCAAC;AAAA,IAAwB,YAAW;AAAA,IAAS,gBAAe;AAAA,KAC1D,qCAAC;AAAA,IAAK,MAAK;AAAA,GAAI,CACjB,GACC,SAAS,qCAAC,gCAA0B,KAAM,CAC7C;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;",
6
6
  "names": []
7
7
  }
@@ -1,20 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
2
  import * as React from "react";
19
3
  import React2 from "react";
20
4
  import {
@@ -30,9 +14,10 @@ const MessageDelimiter = (props) => {
30
14
  useValidateTypescriptPropTypes(propsWithDefault, messageDelimiterProps);
31
15
  const globalAttrs = useGetGlobalAttributes(propsWithDefault);
32
16
  const { title, size, verticalMargin } = propsWithDefault;
33
- return /* @__PURE__ */ React2.createElement(Wrapper, __spreadValues({
34
- cols: ["1fr", "auto", "1fr"]
35
- }, globalAttrs), /* @__PURE__ */ React2.createElement(Line, null), /* @__PURE__ */ React2.createElement(Text, {
17
+ return /* @__PURE__ */ React2.createElement(Wrapper, {
18
+ cols: ["1fr", "auto", "1fr"],
19
+ ...globalAttrs
20
+ }, /* @__PURE__ */ React2.createElement(Line, null), /* @__PURE__ */ React2.createElement(Text, {
36
21
  size,
37
22
  verticalMargin,
38
23
  "data-testid": "chat-message-delimiter-title"
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/message-delimiter/MessageDelimiter.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { WeakValidationMap } from 'react';\nimport {\n describe,\n useGetGlobalAttributes,\n useValidateTypescriptPropTypes,\n useMemoMergePropsWithDefault,\n} from '@elliemae/ds-utilities';\nimport { Wrapper, Line, Text } from './styled';\nimport { defaultProps, messageDelimiterProps, MessageDelimiterProps } from './props';\n\nconst MessageDelimiter: React.ComponentType<MessageDelimiterProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, messageDelimiterProps);\n const globalAttrs = useGetGlobalAttributes(propsWithDefault);\n const { title, size, verticalMargin } = propsWithDefault;\n return (\n <Wrapper cols={['1fr', 'auto', '1fr']} {...globalAttrs}>\n <Line />\n <Text size={size} verticalMargin={verticalMargin} data-testid=\"chat-message-delimiter-title\">\n {title}\n </Text>\n <Line />\n </Wrapper>\n );\n};\n\nMessageDelimiter.propTypes = messageDelimiterProps as WeakValidationMap<unknown>;\nMessageDelimiter.displayName = 'MessageDelimiter';\nconst MessageDelimiterWithSchema = describe(MessageDelimiter);\nMessageDelimiterWithSchema.propTypes = messageDelimiterProps as WeakValidationMap<unknown>;\n\nexport { MessageDelimiter, MessageDelimiterWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AAEA,MAAM,mBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,qBAAqB;AACtE,QAAM,cAAc,uBAAuB,gBAAgB;AAC3D,QAAM,EAAE,OAAO,MAAM,mBAAmB;AACxC,SACE,qCAAC;AAAA,IAAQ,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,KAAO,cACzC,qCAAC,UAAK,GACN,qCAAC;AAAA,IAAK;AAAA,IAAY;AAAA,IAAgC,eAAY;AAAA,KAC3D,KACH,GACA,qCAAC,UAAK,CACR;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
5
+ "mappings": ";AAAA;ACAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AAEA,MAAM,mBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,6BAA6B,OAAO,YAAY;AACzE,iCAA+B,kBAAkB,qBAAqB;AACtE,QAAM,cAAc,uBAAuB,gBAAgB;AAC3D,QAAM,EAAE,OAAO,MAAM,mBAAmB;AACxC,SACE,qCAAC;AAAA,IAAQ,MAAM,CAAC,OAAO,QAAQ,KAAK;AAAA,IAAI,GAAG;AAAA,KACzC,qCAAC,UAAK,GACN,qCAAC;AAAA,IAAK;AAAA,IAAY;AAAA,IAAgC,eAAY;AAAA,KAC3D,KACH,GACA,qCAAC,UAAK,CACR;AAEJ;AAEA,iBAAiB,YAAY;AAC7B,iBAAiB,cAAc;AAC/B,MAAM,6BAA6B,SAAS,gBAAgB;AAC5D,2BAA2B,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import { PropTypes, globalAttributesPropTypes } from "@elliemae/ds-utilities";
23
4
  const defaultProps = {
@@ -25,12 +6,13 @@ const defaultProps = {
25
6
  size: "s",
26
7
  verticalMargin: "0px"
27
8
  };
28
- const messageDelimiterProps = __spreadProps(__spreadValues({}, globalAttributesPropTypes), {
9
+ const messageDelimiterProps = {
10
+ ...globalAttributesPropTypes,
29
11
  title: PropTypes.string.isRequired.description("Text to display in the delimiter"),
30
12
  size: PropTypes.oneOf(["s", "l"]).description("size of the delimiter").defaultValue("s"),
31
13
  extraProps: PropTypes.object.description("extra props for delimiter"),
32
14
  verticalMargin: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description("Configurable css vertical margin property for flexibilty")
33
- });
15
+ };
34
16
  export {
35
17
  defaultProps,
36
18
  messageDelimiterProps
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/exported-related/message-delimiter/props.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes, globalAttributesPropTypes } from '@elliemae/ds-utilities';\n\nexport interface MessageDelimiterProps {\n title: string;\n size?: 's' | 'l';\n verticalMargin?: number | string;\n}\n\nexport const defaultProps: MessageDelimiterProps = {\n title: '',\n size: 's',\n verticalMargin: '0px',\n};\n\nexport const messageDelimiterProps = {\n ...globalAttributesPropTypes,\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.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Configurable css vertical margin property for flexibilty',\n ),\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;ACAA;AAQO,MAAM,eAAsC;AAAA,EACjD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAClB;AAEO,MAAM,wBAAwB,iCAChC,4BADgC;AAAA,EAEnC,OAAO,UAAU,OAAO,WAAW,YAAY,kCAAkC;AAAA,EACjF,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EACvF,YAAY,UAAU,OAAO,YAAY,2BAA2B;AAAA,EACpE,gBAAgB,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YACxE,0DACF;AACF;",
5
+ "mappings": ";AAAA;ACAA;AAQO,MAAM,eAAsC;AAAA,EACjD,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAClB;AAEO,MAAM,wBAAwB;AAAA,EACnC,GAAG;AAAA,EACH,OAAO,UAAU,OAAO,WAAW,YAAY,kCAAkC;AAAA,EACjF,MAAM,UAAU,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,YAAY,uBAAuB,EAAE,aAAa,GAAG;AAAA,EACvF,YAAY,UAAU,OAAO,YAAY,2BAA2B;AAAA,EACpE,gBAAgB,UAAU,UAAU,CAAC,UAAU,QAAQ,UAAU,MAAM,CAAC,EAAE,YACxE,0DACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,20 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
- var __spreadValues = (a, b) => {
8
- for (var prop in b || (b = {}))
9
- if (__hasOwnProp.call(b, prop))
10
- __defNormalProp(a, prop, b[prop]);
11
- if (__getOwnPropSymbols)
12
- for (var prop of __getOwnPropSymbols(b)) {
13
- if (__propIsEnum.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- }
16
- return a;
17
- };
18
2
  import * as React from "react";
19
3
  import React2 from "react";
20
4
  import { Grid } from "@elliemae/ds-grid";
@@ -91,7 +75,7 @@ const ChatComposer = (props) => {
91
75
  }, /* @__PURE__ */ React2.createElement(StyledComposerInput, {
92
76
  ref: input,
93
77
  onChange: handleChange,
94
- style: __spreadValues({}, heightProps),
78
+ style: { ...heightProps },
95
79
  value: inputValue,
96
80
  onFocus,
97
81
  onBlur,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-composer/ChatContainerComposer.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\nimport React, { WeakValidationMap } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { PaperAirplane } from '@elliemae/ds-icons';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, describe } from '@elliemae/ds-utilities';\nimport {\n StyledChatContainerContentComposer,\n StyledComposerInput,\n StyledComposerButton,\n StyledCounterArea,\n StyledCounterErrorA11y,\n} from './styled';\n\nimport { DSChatT, ChatComposerPropTypes, defaultPropsComposer } from '../../react-desc-prop-types';\n// eslint-disable-next-line complexity\nconst ChatComposer: React.ComponentType<DSChatT.ComposerProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatT.ComposerProps>(props, defaultPropsComposer);\n useValidateTypescriptPropTypes<DSChatT.ComposerProps>(propsWithDefault, ChatComposerPropTypes);\n const {\n inputValue,\n onChange,\n onResize,\n onSend,\n onFocus,\n onBlur,\n onKeyDown,\n maxHeight = 300,\n placeholder,\n inputMaxLength,\n maxLengthMessage,\n ariaMaxLengthMessage,\n buttonDisabled,\n dataTestid,\n actionRef,\n } = propsWithDefault;\n\n const COMPOSER_MIN_HEIGHT = 32;\n const input = React.useRef<HTMLTextAreaElement>();\n const inputSize = React.useRef<HTMLTextAreaElement>();\n const inputSend = React.useRef<HTMLButtonElement>();\n const [height, setHeight] = React.useState(32);\n const internalMaxHeight = React.useMemo(() => maxHeight - 24, [maxHeight]);\n const [showScroll, setShowScroll] = React.useState(true);\n\n React.useEffect(() => {\n const newHeight =\n inputSize.current?.scrollHeight > internalMaxHeight ? internalMaxHeight : inputSize.current?.scrollHeight;\n if (newHeight !== height && newHeight > COMPOSER_MIN_HEIGHT) onResize(newHeight);\n setHeight(newHeight);\n setShowScroll(inputSize.current?.scrollHeight - inputSize.current?.clientHeight > 5);\n }, [inputValue, internalMaxHeight, height, onResize]);\n\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusToComposer = () => {\n input.current.focus();\n };\n actionRef.current.focusToSend = () => {\n inputSend.current.focus();\n };\n }\n }, [actionRef]);\n\n const handleChange = React.useCallback(\n (e) => {\n onChange(e.target.value);\n },\n [onChange],\n );\n const heightProps = { height, overflow: showScroll ? 'auto' : 'hidden' };\n\n const inputLength = String(inputValue || '').length;\n const hasError = React.useMemo(() => inputLength > inputMaxLength, [inputLength, inputMaxLength]);\n return (\n <StyledChatContainerContentComposer rows={['auto', '15px']} maxHeight={`${maxHeight}px`} data-testid={dataTestid}>\n <Grid\n cols={['1fr', '24px']}\n style={{ height: heightProps.height }}\n justifyContent=\"center\"\n alignItems=\"flex-end\"\n gutter=\"xxs\"\n >\n <StyledComposerInput\n ref={input}\n onChange={handleChange}\n style={{ ...heightProps }}\n value={inputValue}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n placeholder={placeholder}\n aria-label=\"Message to send\"\n data-testid=\"chat-composer-textarea\"\n name=\"chat-composer-textarea\"\n id=\"chat-composer-textarea\"\n />\n\n <Grid height=\"32px\" alignItems=\"center\">\n <StyledComposerButton\n buttonType=\"text\"\n icon={<PaperAirplane width={18} height={18} />}\n onClick={onSend}\n size=\"s\"\n disabled={!inputValue || buttonDisabled || hasError}\n data-testid=\"chat-composer-send-button\"\n aria-label=\"Send\"\n innerRef={inputSend}\n />\n </Grid>\n </Grid>\n <StyledComposerInput\n ref={inputSize}\n style={{\n height: 32,\n visibility: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n width: input.current?.clientWidth,\n }}\n onChange={handleChange}\n value={inputValue}\n />\n <Grid cols={['1fr', '24px']} justifyContent=\"flex-end\" alignItems=\"center\" gutter=\"xxs\" pb=\"xxs\">\n <StyledCounterArea hasError={hasError} data-testid=\"composer-counter-area\">\n {inputMaxLength && hasError ? (\n <>\n <StyledCounterErrorA11y role=\"alert\">\n {ariaMaxLengthMessage ||\n `You have entered ${inputLength} characters and have exceeded the limit by ${\n inputLength - inputMaxLength\n }. Please limit to less than ${inputMaxLength} characters. `}\n </StyledCounterErrorA11y>\n {maxLengthMessage || `Please limit to less than ${inputMaxLength} characters. `}\n </>\n ) : (\n ''\n )}\n {inputMaxLength ? ` ${inputLength} / ${inputMaxLength}` : ''}\n </StyledCounterArea>\n <Grid />\n </Grid>\n </StyledChatContainerContentComposer>\n );\n};\n\nChatComposer.propTypes = ChatComposerPropTypes as WeakValidationMap<unknown>;\nChatComposer.displayName = 'ChatComposer';\nconst ChatComposerWithSchema = describe(ChatComposer);\nChatComposerWithSchema.propTypes = ChatComposerPropTypes as WeakValidationMap<unknown>;\n\nexport { ChatComposer, ChatComposerWithSchema };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;ACCA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAEA,MAAM,eAA2D,CAAC,UAAU;AAC1E,QAAM,mBAAmB,6BAAoD,OAAO,oBAAoB;AACxG,iCAAsD,kBAAkB,qBAAqB;AAC7F,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAEJ,QAAM,sBAAsB;AAC5B,QAAM,QAAQ,OAAM,OAA4B;AAChD,QAAM,YAAY,OAAM,OAA4B;AACpD,QAAM,YAAY,OAAM,OAA0B;AAClD,QAAM,CAAC,QAAQ,aAAa,OAAM,SAAS,EAAE;AAC7C,QAAM,oBAAoB,OAAM,QAAQ,MAAM,YAAY,IAAI,CAAC,SAAS,CAAC;AACzE,QAAM,CAAC,YAAY,iBAAiB,OAAM,SAAS,IAAI;AAEvD,SAAM,UAAU,MAAM;AACpB,UAAM,YACJ,UAAU,SAAS,eAAe,oBAAoB,oBAAoB,UAAU,SAAS;AAC/F,QAAI,cAAc,UAAU,YAAY;AAAqB,eAAS,SAAS;AAC/E,cAAU,SAAS;AACnB,kBAAc,UAAU,SAAS,eAAe,UAAU,SAAS,eAAe,CAAC;AAAA,EACrF,GAAG,CAAC,YAAY,mBAAmB,QAAQ,QAAQ,CAAC;AAEpD,SAAM,UAAU,MAAM;AAC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AAY;AACpD,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import React2 from "react";
23
4
  import { noop } from "lodash";
@@ -88,13 +69,15 @@ const ChatContainer = (props) => {
88
69
  actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;
89
70
  }
90
71
  }, [actionRef]);
91
- return /* @__PURE__ */ React2.createElement(Container, __spreadProps(__spreadValues({}, globalAttributes), {
72
+ return /* @__PURE__ */ React2.createElement(Container, {
73
+ ...globalAttributes,
92
74
  rows: ["minmax(0, 1fr)", "auto"],
93
75
  ref: containerRef,
94
76
  role: "region"
95
- }), /* @__PURE__ */ React2.createElement("div", {
77
+ }, /* @__PURE__ */ React2.createElement("div", {
96
78
  style: { position: "relative", overflow: "hidden" }
97
- }, /* @__PURE__ */ React2.createElement(ChatContainerMessagesList, __spreadProps(__spreadValues({}, messagesListProps), {
79
+ }, /* @__PURE__ */ React2.createElement(ChatContainerMessagesList, {
80
+ ...messagesListProps,
98
81
  actionRef: actionRef || listRef,
99
82
  isLoading,
100
83
  hasMoreItems,
@@ -103,7 +86,7 @@ const ChatContainer = (props) => {
103
86
  sendingText,
104
87
  bannerPosition,
105
88
  bannerRef
106
- })), isLoading && ["top", "bottom"].includes(isLoading) ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
89
+ }), isLoading && ["top", "bottom"].includes(isLoading) ? /* @__PURE__ */ React2.createElement(StyledIndicatorContainer, {
107
90
  isLoading,
108
91
  "data-testid": "ds-chat-loading-indicator"
109
92
  }, /* @__PURE__ */ React2.createElement(DSIndeterminateProgressIndicator, {
@@ -132,12 +115,13 @@ const ChatContainer = (props) => {
132
115
  processing: true,
133
116
  title: sendingText,
134
117
  lineOnly: true
135
- })) : null), /* @__PURE__ */ React2.createElement(ChatComposer, __spreadProps(__spreadValues({}, composerProps), {
118
+ })) : null), /* @__PURE__ */ React2.createElement(ChatComposer, {
119
+ ...composerProps,
136
120
  onKeyDown: handleTabs,
137
121
  onResize,
138
122
  maxHeight: (containerRef.current?.clientHeight || 0) / 2,
139
123
  actionRef: actionRef || listRef
140
- })));
124
+ }));
141
125
  };
142
126
  ChatContainer.propTypes = ChatContainerPropTypes;
143
127
  ChatContainer.displayName = "ChatContainer";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/chat-container/ChatContainer.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-lines */\n/* eslint-disable complexity */\nimport React, { WeakValidationMap } from 'react';\nimport { noop } from 'lodash';\nimport {\n useMemoMergePropsWithDefault,\n useGetGlobalAttributes,\n useValidateTypescriptPropTypes,\n describe,\n} from '@elliemae/ds-utilities';\n\nimport DSIndeterminateProgressIndicator from '@elliemae/ds-indeterminate-progress-indicator';\nimport DSBanner, { BANNER_TYPES } from '@elliemae/ds-banner';\nimport { ChatComposer } from '../chat-composer';\nimport { ChatContainerMessagesList } from '../chat-container-messages-list';\nimport { DSChatT, defaultProps, ChatContainerPropTypes } from '../../react-desc-prop-types';\n\nimport { StyledChatContainerContent, StyledIndicatorContainer, MobileStyledChatContainerContent } from './styled';\n\nconst ChatContainer: React.ComponentType<DSChatT.ContainerProps> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatT.ContainerProps>(props, defaultProps);\n useValidateTypescriptPropTypes<DSChatT.ContainerProps>(propsWithDefault, ChatContainerPropTypes);\n const globalAttributes = useGetGlobalAttributes(propsWithDefault);\n\n const {\n sendingText,\n sendingMessages,\n bannerPosition,\n bannerProps,\n messagesListProps,\n composerProps,\n composerProps: { onResize: onComposerResize, onKeyDown: onComposerKeyDown },\n actionRef,\n device,\n isLoading,\n hasMoreItems,\n getMoreMessages,\n } = propsWithDefault;\n const bannerRef = React.useRef({ focusOnWrapper: noop, focusOnLink: noop });\n const containerRef = React.useRef<HTMLElement>();\n const listRef = React.useRef({ scrollToIndex: noop });\n\n const onResize = React.useCallback(\n (height: number) => {\n if (onComposerResize) onComposerResize(height);\n /*\n setTimeout is used to equal the animation duration from the \n composer text area when increase its size\n */\n setTimeout(() => {\n actionRef.current.scrollToIndex(messagesListProps.messages.length - 1, {\n align: 'start',\n });\n }, 50);\n },\n [onComposerResize, messagesListProps.messages, actionRef],\n );\n const Container = device === 'desktop' ? StyledChatContainerContent : MobileStyledChatContainerContent;\n const handleTabs = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (onComposerKeyDown) onComposerKeyDown(e);\n else {\n const ref = actionRef || listRef;\n if (e.shiftKey && e.key === 'Tab') {\n if (messagesListProps.messages?.length > 0) {\n e.preventDefault();\n if (['top', 'bottom'].includes(bannerPosition)) {\n bannerRef.current.focusOnWrapper();\n } else {\n const last = ref.current.getMessagesInView().pop();\n ref.current?.focusToIndexWithoutScroll(last);\n }\n }\n }\n }\n },\n [actionRef, onComposerKeyDown, bannerPosition, messagesListProps.messages?.length],\n );\n\n // Map actions\n React.useEffect(() => {\n if (actionRef && actionRef.current) {\n actionRef.current.focusOnBanner = bannerRef.current.focusOnWrapper;\n actionRef.current.focusOnBannerLink = bannerRef.current.focusOnLink;\n }\n }, [actionRef]);\n return (\n <Container {...globalAttributes} rows={['minmax(0, 1fr)', 'auto']} ref={containerRef} role=\"region\">\n <div style={{ position: 'relative', overflow: 'hidden' }}>\n <ChatContainerMessagesList\n {...messagesListProps}\n actionRef={actionRef || listRef}\n isLoading={isLoading}\n hasMoreItems={hasMoreItems}\n getMoreMessages={getMoreMessages}\n sendingMessages={sendingMessages}\n sendingText={sendingText}\n bannerPosition={bannerPosition}\n bannerRef={bannerRef}\n />\n {isLoading && ['top', 'bottom'].includes(isLoading) ? (\n <StyledIndicatorContainer isLoading={isLoading} data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title=\"Loading\" />\n </StyledIndicatorContainer>\n ) : null}\n <StyledIndicatorContainer linear isLoading={bannerPosition}>\n <DSBanner\n showCloseButton\n label={bannerProps?.label || 'Unread messages'}\n containerProps={{ id: 'ds-chat-banner' }}\n actionLink={{\n label: bannerProps?.viewLabel || 'View',\n onClick: bannerProps?.onView,\n }}\n onClose={bannerProps?.onClose}\n isOpen\n type={bannerProps?.type || BANNER_TYPES.INFO}\n actionRef={bannerRef}\n />\n </StyledIndicatorContainer>\n {sendingMessages && sendingMessages.length > 0 ? (\n <StyledIndicatorContainer isLoading=\"bottom\" linear data-testid=\"ds-chat-loading-indicator\">\n <DSIndeterminateProgressIndicator processing title={sendingText} lineOnly />\n </StyledIndicatorContainer>\n ) : null}\n </div>\n <ChatComposer\n {...composerProps}\n onKeyDown={handleTabs}\n onResize={onResize}\n maxHeight={(containerRef.current?.clientHeight || 0) / 2}\n actionRef={actionRef || listRef}\n />\n </Container>\n );\n};\n\nChatContainer.propTypes = ChatContainerPropTypes as WeakValidationMap<unknown>;\nChatContainer.displayName = 'ChatContainer';\nconst ChatContainerWithSchema = describe(ChatContainer);\nChatContainerWithSchema.propTypes = ChatContainerPropTypes as WeakValidationMap<unknown>;\n\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;AAAA,IAAsB,eAAY;AAAA,KAC1D,qCAAC;AAAA,IAAiC,YAAU;AAAA,IAAC,OAAM;AAAA,GAAU,CAC/D,IACE,MACJ,qCAAC;AAAA,IAAyB,QAAM;AAAA,IAAC,WAAW;AAAA,KAC1C,qCAAC;AAAA,IACC,iBAAe;AAAA,IACf,OAAO,aAAa,SAAS;AAAA,IAC7B,gBAAgB,EAAE,IAAI,iBAAiB;AAAA,IACvC,YAAY;AAAA,MACV,OAAO,aAAa,aAAa;AAAA,MACjC,SAAS,aAAa;AAAA,IACxB;AAAA,IACA,SAAS,aAAa;AAAA,IACtB,QAAM;AAAA,IACN,MAAM,aAAa,QAAQ,aAAa;AAAA,IACxC,WAAW;AAAA,GACb,CACF,GACC,mBAAmB,gBAAgB,SAAS,IAC3C,qCAAC;AAAA,IAAyB,WAAU;AAAA,IAAS,QAAM;AAAA,IAAC,eAAY;AAAA,KAC9D,qCAAC;AAAA,IAAiC,YAAU;AAAA,IAAC,OAAO;AAAA,IAAa,UAAQ;AAAA,GAAC,CAC5E,IACE,IACN,GACA,qCAAC;AAAA,IACE,GAAG;AAAA,IACJ,WAAW;AAAA,IACX;AAAA,IACA,WAAY,cAAa,SAAS,gBAAgB,KAAK;AAAA,IACvD,WAAW,aAAa;AAAA,GAC1B,CACF;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __spreadValues = (a, b) => {
10
- for (var prop in b || (b = {}))
11
- if (__hasOwnProp.call(b, prop))
12
- __defNormalProp(a, prop, b[prop]);
13
- if (__getOwnPropSymbols)
14
- for (var prop of __getOwnPropSymbols(b)) {
15
- if (__propIsEnum.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- }
18
- return a;
19
- };
20
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
2
  import * as React from "react";
22
3
  import React2 from "react";
23
4
  import {
@@ -77,13 +58,13 @@ const ChatContainerMessagesList = (props) => {
77
58
  scrollToIndex: vScroll,
78
59
  totalSize,
79
60
  virtualItems
80
- } = useVirtual(__spreadProps(__spreadValues({
61
+ } = useVirtual({
81
62
  size: messages?.length,
82
63
  parentRef: virtualListRef,
83
- overscan: 15
84
- }, getPadding({ hasMoreItems, bannerPosition, isLoading })), {
64
+ overscan: 15,
65
+ ...getPadding({ hasMoreItems, bannerPosition, isLoading }),
85
66
  estimateSize: React2.useCallback(() => 80, [])
86
- }));
67
+ });
87
68
  const newMessages = useGetNewMessages(messages);
88
69
  const debouncedScroll = React2.useMemo(() => debounce(() => {
89
70
  if (document.visibilityState === "hidden") {
@@ -274,11 +255,18 @@ const ChatContainerMessagesList = (props) => {
274
255
  role: "listitem"
275
256
  }, /* @__PURE__ */ React2.createElement(StyledWrapperListItem, {
276
257
  type: row.type
277
- }, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ React2.createElement(ChatBubble, __spreadProps(__spreadValues({}, row), {
258
+ }, row.type === BUBBLE_TYPES.SENDER || row.type === BUBBLE_TYPES.RECIPIENT ? /* @__PURE__ */ React2.createElement(ChatBubble, {
259
+ ...row,
278
260
  helpMessage: isSending ? sendingText : row.helpMessage
279
- })) : null, row.type === BUBBLE_TYPES.DELIMITER ? /* @__PURE__ */ React2.createElement(MessageDelimiter, __spreadValues({}, row)) : null, row.type === BUBBLE_TYPES.SYSTEM ? /* @__PURE__ */ React2.createElement(SystemMessage, __spreadValues({}, row)) : null));
261
+ }) : null, row.type === BUBBLE_TYPES.DELIMITER ? /* @__PURE__ */ React2.createElement(MessageDelimiter, {
262
+ ...row
263
+ }) : null, row.type === BUBBLE_TYPES.SYSTEM ? /* @__PURE__ */ React2.createElement(SystemMessage, {
264
+ ...row
265
+ }) : null));
280
266
  }), [virtualItems, messages, sendingMessages, handleKey, sendingText]);
281
- return /* @__PURE__ */ React2.createElement(StyledWrapper, __spreadValues({}, globalAttributes), /* @__PURE__ */ React2.createElement(StyledChatContainerContentList, {
267
+ return /* @__PURE__ */ React2.createElement(StyledWrapper, {
268
+ ...globalAttributes
269
+ }, /* @__PURE__ */ React2.createElement(StyledChatContainerContentList, {
282
270
  "data-testid": "chat-thread-container",
283
271
  tabIndex: 0,
284
272
  ref: virtualListRef,