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.
- package/dist/components/Accordion/Accordion.js +15 -54
- package/dist/components/Accordion/Accordion.stories.js +0 -8
- package/dist/components/Avatars/avatars.js +3 -23
- package/dist/components/Avatars/avatars.stories.js +0 -7
- package/dist/components/BannerCard/bannerCard.stories.js +0 -14
- package/dist/components/BannerCard/bannerCards.js +7 -37
- package/dist/components/Buttons/Stories/basicbutton.stories.js +0 -7
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +0 -7
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +0 -7
- package/dist/components/Buttons/buttonAlertIcons.js +4 -29
- package/dist/components/Buttons/buttonDropdown copy.js +9 -40
- package/dist/components/Buttons/buttonDropdown.js +0 -7
- package/dist/components/Buttons/buttonIconsOnly.js +10 -32
- package/dist/components/Buttons/buttons.js +29 -67
- package/dist/components/Cards/cards.js +0 -7
- package/dist/components/Cards/cards.stories.js +0 -12
- package/dist/components/ChatComponents/ChatBody/FeedPostComments.js +4 -30
- package/dist/components/ChatComponents/ChatBody/chatBody.js +47 -106
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +11 -14
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +2 -16
- package/dist/components/ChatComponents/ChatBody/sessionTimeline.js +2 -18
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +1 -8
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +0 -7
- package/dist/components/ChatComponents/ColorPicker/colorPicker.js +0 -6
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +0 -6
- package/dist/components/ChatComponents/ContactCards/contactCards.js +3 -14
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +0 -9
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +0 -6
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +0 -6
- package/dist/components/ChatComponents/InfoTab/infoTab.js +1 -8
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +0 -9
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +0 -6
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +0 -6
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +0 -7
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +0 -8
- package/dist/components/Chats/chat.js +17 -65
- package/dist/components/Chats/chatInput.js +5 -21
- package/dist/components/Chats/chatwrapper.js +7 -27
- package/dist/components/Checkbox/checkboxToggler.js +5 -18
- package/dist/components/Checkbox/checkboxToggler.stories.js +9 -30
- package/dist/components/Lists/listBox.js +3 -25
- package/dist/components/Lists/listBox.stories.js +3 -23
- package/dist/components/Lists/listHeader.stories.js +0 -8
- package/dist/components/Lists/listheader.js +4 -21
- package/dist/components/Lists/rowLabels.js +6 -29
- package/dist/components/Lists/rowLabels.stories.js +3 -12
- package/dist/components/Loader/loader.js +1 -20
- package/dist/components/Loader/loader.stories.js +0 -6
- package/dist/components/MainWrapper/index.js +0 -7
- package/dist/components/MessageCounter/MessageCounter.stories.js +0 -7
- package/dist/components/MessageCounter/messageCounter.js +0 -9
- package/dist/components/Modals/modal.js +28 -65
- package/dist/components/Modals/modals.stories.js +9 -32
- package/dist/components/NoteBar/noteBar.js +9 -39
- package/dist/components/NoteBar/noteBar.stories.js +0 -6
- package/dist/components/PaymentBox/paymentBox.js +1 -15
- package/dist/components/PaymentBox/paymentBox.stories.js +0 -6
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +0 -6
- package/dist/components/PerformanceIndicator/performanceIndicator.js +4 -23
- package/dist/components/Pills/pills.js +13 -45
- package/dist/components/Pills/pills.stories.js +0 -7
- package/dist/components/ProfileIcon/ProfileIcon.js +4 -29
- package/dist/components/ProfileIcon/profileIcon.stories.js +0 -7
- package/dist/components/ProgressBar/progressbar.js +1 -13
- package/dist/components/ProgressBar/progressbar.stories.js +0 -6
- package/dist/components/ProgressRing/progressRing.js +6 -39
- package/dist/components/ProgressRing/progressRing.stories.js +0 -6
- package/dist/components/RouteLink/link.js +0 -9
- package/dist/components/RouteLink/link.stories.js +0 -7
- package/dist/components/ScrollBar/scrollBar.js +0 -11
- package/dist/components/SuperFluid/Content/index.js +0 -7
- package/dist/components/SuperFluid/ContentTitle.js/index.js +0 -13
- package/dist/components/SuperFluid/SegmentCard/index.js +0 -25
- package/dist/components/Tabs/tabs.js +11 -31
- package/dist/components/Tabs/tabs.stories.js +0 -7
- package/dist/components/Tags/tags.js +18 -53
- package/dist/components/Tags/tags.stories.js +0 -9
- package/dist/components/chatHeader.js +1 -18
- package/dist/components/checkbox.js +7 -25
- package/dist/components/colors.js +12 -6
- package/dist/components/contacts.js +17 -50
- package/dist/components/dropdown.js +12 -43
- package/dist/components/dropdownButton.js +7 -31
- package/dist/components/dropdownItems.js +7 -34
- package/dist/components/examples/App.js +6 -16
- package/dist/components/examples/InfoAccordion.js +0 -6
- package/dist/components/examples/chatBodyExample.js +0 -9
- package/dist/components/examples/selectExample.js +3 -20
- package/dist/components/globalStyles.js +0 -5
- package/dist/components/iconStyles.js +17 -37
- package/dist/components/index-copy.js +0 -49
- package/dist/components/index.js +0 -45
- package/dist/components/input.js +21 -44
- package/dist/components/logo.js +2 -18
- package/dist/components/navbar.js +10 -19
- package/dist/components/search.js +2 -24
- package/dist/components/text.js +12 -8
- package/dist/components/wrapper.js +2 -14
- package/package.json +98 -94
- package/src/App.js +242 -217
- package/src/lib/components/ChatComponents/ChatBody/chatBody.js +13 -3
- package/src/lib/components/ChatComponents/ChatBody/chatBody.stories.js +13 -0
- 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
|
-
|
|
23
|
-
|
|
10
|
+
// const Chat = () => {
|
|
11
|
+
// // const [test, setTest] = useState(false);
|
|
12
|
+
// // const [test1, setTest1] = useState(false);
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
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' &&
|
|
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' &&
|
|
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">
|