beem-component 1.7.8 → 1.8.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 (103) hide show
  1. package/dist/components/Accordion/Accordion.js +15 -54
  2. package/dist/components/Accordion/Accordion.stories.js +0 -8
  3. package/dist/components/Avatars/avatars.js +3 -23
  4. package/dist/components/Avatars/avatars.stories.js +0 -7
  5. package/dist/components/BannerCard/bannerCard.stories.js +0 -14
  6. package/dist/components/BannerCard/bannerCards.js +7 -37
  7. package/dist/components/Buttons/Stories/basicbutton.stories.js +0 -7
  8. package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +0 -7
  9. package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +0 -7
  10. package/dist/components/Buttons/buttonAlertIcons.js +4 -29
  11. package/dist/components/Buttons/buttonDropdown copy.js +9 -40
  12. package/dist/components/Buttons/buttonDropdown.js +0 -7
  13. package/dist/components/Buttons/buttonIconsOnly.js +10 -32
  14. package/dist/components/Buttons/buttons.js +29 -67
  15. package/dist/components/Cards/cards.js +0 -7
  16. package/dist/components/Cards/cards.stories.js +0 -12
  17. package/dist/components/ChatComponents/ChatBody/FeedPostComments.js +4 -30
  18. package/dist/components/ChatComponents/ChatBody/chatBody.js +47 -106
  19. package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +11 -14
  20. package/dist/components/ChatComponents/ChatBody/sessionDetails.js +2 -16
  21. package/dist/components/ChatComponents/ChatBody/sessionTimeline.js +2 -18
  22. package/dist/components/ChatComponents/ChatHeader/chatHeader.js +1 -8
  23. package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +0 -7
  24. package/dist/components/ChatComponents/ColorPicker/colorPicker.js +0 -6
  25. package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +0 -6
  26. package/dist/components/ChatComponents/ContactCards/contactCards.js +3 -14
  27. package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +0 -9
  28. package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +0 -6
  29. package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +0 -6
  30. package/dist/components/ChatComponents/InfoTab/infoTab.js +1 -8
  31. package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +0 -9
  32. package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +0 -6
  33. package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +0 -6
  34. package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +0 -7
  35. package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +0 -8
  36. package/dist/components/Chats/chat.js +17 -65
  37. package/dist/components/Chats/chatInput.js +5 -21
  38. package/dist/components/Chats/chatwrapper.js +7 -27
  39. package/dist/components/Checkbox/checkboxToggler.js +5 -18
  40. package/dist/components/Checkbox/checkboxToggler.stories.js +9 -30
  41. package/dist/components/Lists/listBox.js +3 -25
  42. package/dist/components/Lists/listBox.stories.js +3 -23
  43. package/dist/components/Lists/listHeader.stories.js +0 -8
  44. package/dist/components/Lists/listheader.js +4 -21
  45. package/dist/components/Lists/rowLabels.js +6 -29
  46. package/dist/components/Lists/rowLabels.stories.js +3 -12
  47. package/dist/components/Loader/loader.js +1 -20
  48. package/dist/components/Loader/loader.stories.js +0 -6
  49. package/dist/components/MainWrapper/index.js +0 -7
  50. package/dist/components/MessageCounter/MessageCounter.stories.js +0 -7
  51. package/dist/components/MessageCounter/messageCounter.js +0 -9
  52. package/dist/components/Modals/modal.js +28 -65
  53. package/dist/components/Modals/modals.stories.js +9 -32
  54. package/dist/components/NoteBar/noteBar.js +9 -39
  55. package/dist/components/NoteBar/noteBar.stories.js +0 -6
  56. package/dist/components/PaymentBox/paymentBox.js +1 -15
  57. package/dist/components/PaymentBox/paymentBox.stories.js +0 -6
  58. package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +0 -6
  59. package/dist/components/PerformanceIndicator/performanceIndicator.js +4 -23
  60. package/dist/components/Pills/pills.js +13 -45
  61. package/dist/components/Pills/pills.stories.js +0 -7
  62. package/dist/components/ProfileIcon/ProfileIcon.js +4 -29
  63. package/dist/components/ProfileIcon/profileIcon.stories.js +0 -7
  64. package/dist/components/ProgressBar/progressbar.js +1 -13
  65. package/dist/components/ProgressBar/progressbar.stories.js +0 -6
  66. package/dist/components/ProgressRing/progressRing.js +6 -39
  67. package/dist/components/ProgressRing/progressRing.stories.js +0 -6
  68. package/dist/components/RouteLink/link.js +0 -9
  69. package/dist/components/RouteLink/link.stories.js +0 -7
  70. package/dist/components/ScrollBar/scrollBar.js +0 -11
  71. package/dist/components/SuperFluid/Content/index.js +0 -7
  72. package/dist/components/SuperFluid/ContentTitle.js/index.js +0 -13
  73. package/dist/components/SuperFluid/SegmentCard/index.js +0 -25
  74. package/dist/components/Tabs/tabs.js +11 -31
  75. package/dist/components/Tabs/tabs.stories.js +0 -7
  76. package/dist/components/Tags/tags.js +18 -53
  77. package/dist/components/Tags/tags.stories.js +0 -9
  78. package/dist/components/chatHeader.js +1 -18
  79. package/dist/components/checkbox.js +7 -25
  80. package/dist/components/colors.js +12 -6
  81. package/dist/components/contacts.js +17 -50
  82. package/dist/components/dropdown.js +12 -43
  83. package/dist/components/dropdownButton.js +7 -31
  84. package/dist/components/dropdownItems.js +7 -34
  85. package/dist/components/examples/App.js +6 -16
  86. package/dist/components/examples/InfoAccordion.js +0 -6
  87. package/dist/components/examples/chatBodyExample.js +0 -9
  88. package/dist/components/examples/selectExample.js +3 -20
  89. package/dist/components/globalStyles.js +0 -5
  90. package/dist/components/iconStyles.js +17 -37
  91. package/dist/components/index-copy.js +0 -49
  92. package/dist/components/index.js +0 -45
  93. package/dist/components/input.js +21 -44
  94. package/dist/components/logo.js +2 -18
  95. package/dist/components/navbar.js +10 -19
  96. package/dist/components/search.js +2 -24
  97. package/dist/components/text.js +12 -8
  98. package/dist/components/wrapper.js +2 -14
  99. package/package.json +98 -94
  100. package/src/App.js +242 -217
  101. package/src/lib/components/ChatComponents/ChatBody/chatBody.js +13 -3
  102. package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +13 -0
  103. package/src/lib/components/input.js +31 -21
package/src/App.js CHANGED
@@ -1,234 +1,259 @@
1
1
  import React from 'react';
2
2
 
3
- import AttachFileIcon from '@mui/icons-material/AttachFile';
4
- import EmojiEmotionsIcon from '@mui/icons-material/EmojiEmotions';
5
- import SendIcon from '@mui/icons-material/Send';
6
- import QuickreplyIcon from '@mui/icons-material/Quickreply';
7
3
  import {
8
- BmChat,
9
4
  BmInput,
10
- BmIcons,
11
5
  GlobalStyle,
12
- BmProfileIcon,
13
- BmContactCard,
14
- BmTag,
15
- BmCounter,
16
- BmAvatar,
17
6
 
18
7
  // BmCheckboxToggle,
19
8
  } from './lib/components';
20
9
 
21
- const Chat = () => {
22
- // const [test, setTest] = useState(false);
23
- // const [test1, setTest1] = useState(false);
10
+ // const Chat = () => {
11
+ // // const [test, setTest] = useState(false);
12
+ // // const [test1, setTest1] = useState(false);
24
13
 
25
- const image =
26
- 'https://scontent.fnbo1-1.fna.fbcdn.net/v/t39.30808-6/298879098_10161724947807542_5252175668064009159_n.jpg?stp=dst-jpg_p720x720&_nc_cat=100&ccb=1-7&_nc_sid=9e2e56&_nc_ohc=9uDHII_ETpUAX_KNS3Y&_nc_ht=scontent.fnbo1-1.fna&edm=APCh5TUEAAAA&oh=00_AT8sOJmRGYwgXF48_GPOCWx1soil0yK8V3AiEPkce9WJIw&oe=6304120B';
27
- return (
28
- <>
29
- <GlobalStyle />
30
- <BmProfileIcon channel="google_business_messaging" />
31
- <BmChat>
32
- <BmChat.Body>
33
- <BmChat.Details
34
- state="inbound"
35
- session="sms"
36
- displayTime={<p>12:00pm</p>}
37
- status="sent"
38
- sessionTimeline={{ message: <p>12:00pm</p> }}
39
- // sessionDetails={{
40
- // message: <h3>Session Message</h3>,
41
- // time: <p>12:00pm</p>,
42
- // }}
43
- feedPostComments={{
44
- header: <p>Comment Reply</p>,
45
- body: {
46
- link: <p>This is an outbound link</p>,
47
- image,
48
- },
49
- footer: <p>This is a Footer</p>,
50
- state: 'inbound',
51
- status: 'comment',
52
- }}
53
- />
54
- <BmChat.Details
55
- state="inbound"
56
- session="live"
57
- displayTime={<p>10:00am</p>}
58
- sessionTimeline={{ message: <p>12:00pm</p> }}
59
- status="failed"
60
- fileName={<p>file.csv</p>}
61
- file={image}
62
- />
63
- {/* <BmChat.Details
64
- state="inbound"
65
- session="sms"
66
- displayTime={<p>12:00pm</p>}
67
- status="sent"
68
- sessionTimeline={{ message: <p>12:00pm</p> }}
69
- sessionDetails={{
70
- message: <h3>Session Message</h3>,
71
- time: <p>12:00pm</p>,
72
- }}
73
- feedPostComments={{
74
- header: <p>Comment Reply</p>,
75
- body: {
76
- link: <p>This is an inbound link</p>,
77
- image,
78
- },
79
- footer: <p>This is a Footer</p>,
80
- state: 'inbound',
81
- status: 'comment',
82
- }}
83
- />
84
- <BmChat.Details
85
- state="outbound"
86
- session="sms"
87
- displayTime={<p>12:00pm</p>}
88
- status="sent"
89
- sessionTimeline={{ message: <p>12:00pm</p> }}
90
- sessionDetails={{
91
- message: <h3>Session Message</h3>,
92
- time: <p>12:00pm</p>,
93
- }}
94
- feedPostComments={{
95
- header: <p>Story Reply</p>,
96
- body: {
97
- link: <p>This is an outbound link</p>,
98
- image,
99
- },
100
- footer: <p>This is a Footer</p>,
101
- state: 'outbound',
102
- status: 'story',
103
- }}
104
- />
105
- <BmChat.Details
106
- state="inbound"
107
- session="sms"
108
- displayTime={<p>12:00pm</p>}
109
- status="sent"
110
- sessionTimeline={{ message: <p>12:00pm</p> }}
111
- sessionDetails={{
112
- message: <h3>Session Message</h3>,
113
- time: <p>12:00pm</p>,
114
- }}
115
- feedPostComments={{
116
- header: <p>Story Reply</p>,
117
- body: {
118
- link: <p>This is an inbound link</p>,
119
- image,
120
- },
121
- footer: <p>This is a Footer</p>,
122
- state: 'inbound',
123
- status: 'story',
124
- }}
125
- />
126
- <BmChat.Details
127
- state="inbound"
128
- session="live"
129
- displayTime={<p>12:00pm</p>}
130
- status="sent"
131
- sessionTimeline={{ message: <p>12:00pm</p> }}
132
- fileName={<p>chat.png</p>}
133
- src={image}
134
- sessionDetails={{
135
- message: <h3>Session Message</h3>,
136
- time: <p>12:00pm</p>,
137
- }}
138
- />
139
- <BmChat.Details
140
- state="inbound"
141
- session="live"
142
- displayTime={<p>10:00am</p>}
143
- sessionTimeline={{ message: <p>12:00pm</p> }}
144
- status="failed"
145
- fileName={<p>file.csv</p>}
146
- file={image}
147
- />
148
- <BmChat.Details
149
- state="outbound"
150
- session="bot"
151
- sessionTimeline={{ message: <p>12:00pm</p> }}
152
- displayTime={<p>12:00pm</p>}
153
- status="sent"
154
- >
155
- <p>Outbound Text Message</p>
156
- </BmChat.Details>
157
- <BmChat.Details
158
- state="outbound"
159
- session="live"
160
- sessionTimeline={{ message: <p>12:00pm</p> }}
161
- displayTime={<p>12:00pm</p>}
162
- status="sent"
163
- fileName={<p>chat.png</p>}
164
- src={image}
165
- />
166
- <BmChat.Details
167
- state="outbound"
168
- session="live"
169
- displayTime={<p>10:00am</p>}
170
- status="failed"
171
- fileName={<p>file.csv</p>}
172
- sessionTimeline={{ message: <p>12:00pm</p> }}
173
- file={image}
174
- link={image}
175
- onDownload={() => {
176
- alert('hello');
177
- }}
178
- /> */}
179
- </BmChat.Body>
180
- <BmChat.Footer>
181
- <div className="chat-footer">
182
- <BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
183
- <BmIcons icon={<AttachFileIcon />} size="xlarge" />
184
- <BmIcons icon={<QuickreplyIcon />} size="xlarge" />
185
- <BmInput placeholder="Enter Message" style={{ flex: '1' }} />
186
- <BmIcons icon={<SendIcon />} size="xlarge" />
187
- </div>
188
- </BmChat.Footer>
189
- </BmChat>
14
+ // const image =
15
+ // 'https://scontent.fnbo1-1.fna.fbcdn.net/v/t39.30808-6/298879098_10161724947807542_5252175668064009159_n.jpg?stp=dst-jpg_p720x720&_nc_cat=100&ccb=1-7&_nc_sid=9e2e56&_nc_ohc=9uDHII_ETpUAX_KNS3Y&_nc_ht=scontent.fnbo1-1.fna&edm=APCh5TUEAAAA&oh=00_AT8sOJmRGYwgXF48_GPOCWx1soil0yK8V3AiEPkce9WJIw&oe=6304120B';
16
+ // return (
17
+ // <>
18
+ // <GlobalStyle />
19
+ // <BmProfileIcon channel="google_business_messaging" />
20
+ // <BmChat>
21
+ // <BmChat.Body>
22
+ // <BmChat.Details
23
+ // state="inbound"
24
+ // session="sms"
25
+ // displayTime={<p>12:00pm</p>}
26
+ // status="sent"
27
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
28
+ // // sessionDetails={{
29
+ // // message: <h3>Session Message</h3>,
30
+ // // time: <p>12:00pm</p>,
31
+ // // }}
32
+ // feedPostComments={{
33
+ // header: <p>Comment Reply</p>,
34
+ // body: {
35
+ // link: <p>This is an outbound link</p>,
36
+ // image,
37
+ // },
38
+ // footer: <p>This is a Footer</p>,
39
+ // state: 'inbound',
40
+ // status: 'comment',
41
+ // }}
42
+ // />
43
+ // <BmChat.Details
44
+ // state="inbound"
45
+ // session="live"
46
+ // displayTime={<p>10:00am</p>}
47
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
48
+ // status="failed"
49
+ // fileName={<p>file.csv</p>}
50
+ // file={image}
51
+ // />
52
+ // {/* <BmChat.Details
53
+ // state="inbound"
54
+ // session="sms"
55
+ // displayTime={<p>12:00pm</p>}
56
+ // status="sent"
57
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
58
+ // sessionDetails={{
59
+ // message: <h3>Session Message</h3>,
60
+ // time: <p>12:00pm</p>,
61
+ // }}
62
+ // feedPostComments={{
63
+ // header: <p>Comment Reply</p>,
64
+ // body: {
65
+ // link: <p>This is an inbound link</p>,
66
+ // image,
67
+ // },
68
+ // footer: <p>This is a Footer</p>,
69
+ // state: 'inbound',
70
+ // status: 'comment',
71
+ // }}
72
+ // />
73
+ // <BmChat.Details
74
+ // state="outbound"
75
+ // session="sms"
76
+ // displayTime={<p>12:00pm</p>}
77
+ // status="sent"
78
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
79
+ // sessionDetails={{
80
+ // message: <h3>Session Message</h3>,
81
+ // time: <p>12:00pm</p>,
82
+ // }}
83
+ // feedPostComments={{
84
+ // header: <p>Story Reply</p>,
85
+ // body: {
86
+ // link: <p>This is an outbound link</p>,
87
+ // image,
88
+ // },
89
+ // footer: <p>This is a Footer</p>,
90
+ // state: 'outbound',
91
+ // status: 'story',
92
+ // }}
93
+ // />
94
+ // <BmChat.Details
95
+ // agentName="Agent Name"
96
+ // state="outbound"
97
+ // session="live"
98
+ // displayTime={<p>12:00pm</p>}
99
+ // status="sent"
100
+ // sessionDetails={{
101
+ // message: <h3>Session Message</h3>,
102
+ // time: <p>12:00pm</p>,
103
+ // }}
104
+ // >
105
+ // <p>Outbound Text Message2</p>
106
+ // </BmChat.Details>
107
+
108
+ // <BmChat.Details
109
+ // agentName="Test Agent"
110
+ // state="outbound"
111
+ // session="live"
112
+ // displayTime={<p>12:00pm</p>}
113
+ // status="sent"
114
+ // sessionDetails={{
115
+ // message: <h3>Session Message</h3>,
116
+ // time: <p>12:00pm</p>,
117
+ // }}
118
+ // >
119
+ // <p>Outbound Text Message2</p>
120
+ // </BmChat.Details>
121
+
122
+ // <BmChat.Details
123
+ // state="inbound"
124
+ // session="sms"
125
+ // displayTime={<p>12:00pm</p>}
126
+ // status="sent"
127
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
128
+ // sessionDetails={{
129
+ // message: <h3>Session Message</h3>,
130
+ // time: <p>12:00pm</p>,
131
+ // }}
132
+ // feedPostComments={{
133
+ // header: <p>Story Reply</p>,
134
+ // body: {
135
+ // link: <p>This is an inbound link</p>,
136
+ // image,
137
+ // },
138
+ // footer: <p>This is a Footer</p>,
139
+ // state: 'inbound',
140
+ // status: 'story',
141
+ // }}
142
+ // />
143
+ // <BmChat.Details
144
+ // state="inbound"
145
+ // session="live"
146
+ // displayTime={<p>12:00pm</p>}
147
+ // status="sent"
148
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
149
+ // fileName={<p>chat.png</p>}
150
+ // src={image}
151
+ // sessionDetails={{
152
+ // message: <h3>Session Message</h3>,
153
+ // time: <p>12:00pm</p>,
154
+ // }}
155
+ // />
156
+ // <BmChat.Details
157
+ // state="inbound"
158
+ // session="live"
159
+ // displayTime={<p>10:00am</p>}
160
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
161
+ // status="failed"
162
+ // fileName={<p>file.csv</p>}
163
+ // file={image}
164
+ // />
165
+ // <BmChat.Details
166
+ // state="outbound"
167
+ // session="bot"
168
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
169
+ // displayTime={<p>12:00pm</p>}
170
+ // status="sent"
171
+ // >
172
+ // <p>Outbound Text Message</p>
173
+ // </BmChat.Details>
174
+ // <BmChat.Details
175
+ // state="outbound"
176
+ // session="live"
177
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
178
+ // displayTime={<p>12:00pm</p>}
179
+ // status="sent"
180
+ // fileName={<p>chat.png</p>}
181
+ // src={image}
182
+ // />
183
+ // <BmChat.Details
184
+ // state="outbound"
185
+ // session="live"
186
+ // displayTime={<p>10:00am</p>}
187
+ // status="failed"
188
+ // fileName={<p>file.csv</p>}
189
+ // sessionTimeline={{ message: <p>12:00pm</p> }}
190
+ // file={image}
191
+ // link={image}
192
+ // onDownload={() => {
193
+ // alert('hello');
194
+ // }}
195
+ // /> */}
196
+ // </BmChat.Body>
197
+ // <BmChat.Footer>
198
+ // <div className="chat-footer">
199
+ // <BmIcons icon={<EmojiEmotionsIcon />} size="xlarge" />
200
+ // <BmIcons icon={<AttachFileIcon />} size="xlarge" />
201
+ // <BmIcons icon={<QuickreplyIcon />} size="xlarge" />
202
+ // <BmInput placeholder="Enter Message" style={{ flex: '1' }} />
203
+ // <BmIcons icon={<SendIcon />} size="xlarge" />
204
+ // </div>
205
+ // </BmChat.Footer>
206
+ // </BmChat>
190
207
 
191
- {/* <BmCheckboxToggle
192
- key="test"
193
- checked={test}
194
- onChange={(check) => {
195
- console.log(check);
196
- setTest(check);
197
- }}
198
- />
208
+ // {/* <BmCheckboxToggle
209
+ // key="test"
210
+ // checked={test}
211
+ // onChange={(check) => {
212
+ // console.log(check);
213
+ // setTest(check);
214
+ // }}
215
+ // />
199
216
 
200
- <BmCheckboxToggle
201
- key="test1"
202
- checked={test1}
203
- onChange={(check) => {
204
- console.log(check);
205
- setTest(check);
206
- }}
217
+ // <BmCheckboxToggle
218
+ // key="test1"
219
+ // checked={test1}
220
+ // onChange={(check) => {
221
+ // console.log(check);
222
+ // setTest(check);
223
+ // }}
207
224
 
208
-
209
- /> */}
225
+ // /> */}
210
226
 
211
- <BmContactCard>
212
- <BmContactCard.Profile>
213
- <BmAvatar user="chatbot" size="medium" />
214
- </BmContactCard.Profile>
215
- <BmContactCard.Details>
216
- <BmContactCard.SubDetails>
217
- <h3>Contact Names</h3>
218
- </BmContactCard.SubDetails>
219
- <BmContactCard.SubDetails>
220
- <p>
221
- Message ijofdsg fogijfdogi odfigj ofdigj fdoigj odfigj ofdigj
222
- odfigj ofdigj ofdijg dofigj dfoig jodfigj text
223
- </p>
224
- <BmCounter>10</BmCounter>
225
- </BmContactCard.SubDetails>
226
- <BmContactCard.SubDetails>
227
- <BmTag variant="success">label</BmTag>
228
- <p>10:00 am</p>
229
- </BmContactCard.SubDetails>
230
- </BmContactCard.Details>
231
- </BmContactCard>
227
+ // <BmContactCard>
228
+ // <BmContactCard.Profile>
229
+ // <BmAvatar user="chatbot" size="medium" />
230
+ // </BmContactCard.Profile>
231
+ // <BmContactCard.Details>
232
+ // <BmContactCard.SubDetails>
233
+ // <h3>Contact Names</h3>
234
+ // </BmContactCard.SubDetails>
235
+ // <BmContactCard.SubDetails>
236
+ // <p>
237
+ // Message ijofdsg fogijfdogi odfigj ofdigj fdoigj odfigj ofdigj
238
+ // odfigj ofdigj ofdijg dofigj dfoig jodfigj text
239
+ // </p>
240
+ // <BmCounter>10</BmCounter>
241
+ // </BmContactCard.SubDetails>
242
+ // <BmContactCard.SubDetails>
243
+ // <BmTag variant="success">label</BmTag>
244
+ // <p>10:00 am</p>
245
+ // </BmContactCard.SubDetails>
246
+ // </BmContactCard.Details>
247
+ // </BmContactCard>
248
+ // </>
249
+ // );
250
+ // };
251
+
252
+ const Chat = () => {
253
+ return (
254
+ <>
255
+ <GlobalStyle />
256
+ <BmInput placeholder="tejal" state="complete" action="pending" />
232
257
  </>
233
258
  );
234
259
  };
@@ -4,10 +4,12 @@ import { Done, DoneAll } from '@material-ui/icons';
4
4
  import FilePresentIcon from '@mui/icons-material/FilePresent';
5
5
  import DownloadIcon from '@mui/icons-material/Download';
6
6
  import styled from 'styled-components';
7
+ import Avatar from 'react-avatar';
7
8
  import BmAvatar from '../../Avatars/avatars';
8
9
  import { BmIcons } from '../../iconStyles';
9
10
  import { SessionDetails } from './sessionDetails';
10
11
  import { SessionTimeline } from './sessionTimeline';
12
+
11
13
  import {
12
14
  BmPrimaryWhite,
13
15
  BmPrimaryBlue,
@@ -113,11 +115,14 @@ const MessagesSubDetails = styled.div`
113
115
  margin-top: 0.5rem;
114
116
  `;
115
117
 
116
- const handleState = ({ session }) => {
118
+ const handleState = ({ session, agentName }) => {
117
119
  if (session === 'bot') {
118
120
  return <BmAvatar size="small" user="chatbot" />;
119
121
  }
120
122
  if (session === 'live') {
123
+ if (agentName) {
124
+ return <Avatar name={agentName} size="25px" round />;
125
+ }
121
126
  return <BmAvatar size="small" user="employee" />;
122
127
  }
123
128
  if (session === 'sms') {
@@ -261,6 +266,7 @@ BmChat.Details = ({
261
266
  sessionDetails,
262
267
  sessionTimeline,
263
268
  feedPostComments,
269
+ agentName,
264
270
  ...rest
265
271
  }) => {
266
272
  return (
@@ -268,7 +274,9 @@ BmChat.Details = ({
268
274
  <Details state={state} {...rest}>
269
275
  {/* Adding for mobile */}
270
276
  <MessageState>
271
- {state === 'inbound' && session && handleState({ state, session })}
277
+ {state === 'inbound' &&
278
+ session &&
279
+ handleState({ state, session, agentName })}
272
280
  </MessageState>
273
281
  <MessageDetails feedPostComments={feedPostComments}>
274
282
  {/* For Images */}
@@ -317,7 +325,9 @@ BmChat.Details = ({
317
325
  </MessagesSubDetails>
318
326
  </MessageDetails>
319
327
  <MessageState>
320
- {state === 'outbound' && session && handleState({ state, session })}
328
+ {state === 'outbound' &&
329
+ session &&
330
+ handleState({ state, session, agentName })}
321
331
  </MessageState>
322
332
  </Details>
323
333
 
@@ -147,6 +147,19 @@ export const ChatBody = () => {
147
147
  alert('hello');
148
148
  }}
149
149
  />
150
+ <BmChat.Details
151
+ agentName="Agent Name"
152
+ state="outbound"
153
+ session="live"
154
+ displayTime={<p>12:00pm</p>}
155
+ status="sent"
156
+ sessionDetails={{
157
+ message: <h3>Session Message</h3>,
158
+ time: <p>12:00pm</p>,
159
+ }}
160
+ >
161
+ <p>Outbound Text Message</p>
162
+ </BmChat.Details>
150
163
  </BmChat.Body>
151
164
  <BmChat.Footer>
152
165
  <div className="chat-footer">