beem-component 1.1.8 → 1.2.2

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.
@@ -1,3 +1,9 @@
1
+ .main-chat-container {
2
+ display: flex;
3
+ flex-direction: row;
4
+ width: 100%;
5
+ }
6
+
1
7
  .sidebar {
2
8
  display: flex;
3
9
  flex-direction: column;
@@ -5,7 +11,7 @@
5
11
  height: 100%;
6
12
  overflow: auto;
7
13
  max-width: 20%;
8
- width: 20%;
14
+ width: 100%;
9
15
  border: 1px solid #E2E2E2;
10
16
  }
11
17
 
@@ -33,7 +39,7 @@
33
39
  overflow: auto;
34
40
  }
35
41
 
36
- .main-chat-container {
42
+ .chat-container {
37
43
  display: flex;
38
44
  flex-direction: row;
39
45
  align-items: center;
@@ -47,10 +53,9 @@
47
53
  display: flex;
48
54
  flex-direction: column;
49
55
  max-height: 100%;
50
- height: 100%;
51
56
  flex-grow: 1;
52
- max-height: 100%;
53
57
  height: 100%;
58
+ width: fit-content;
54
59
  }
55
60
 
56
61
  .chat-menu {
@@ -59,6 +64,7 @@
59
64
  height: 0%;
60
65
  flex-grow: 1;
61
66
  width: 100%;
67
+ max-width: 100%;
62
68
  }
63
69
 
64
70
  .chat-messages {
@@ -66,7 +72,8 @@
66
72
  flex-direction: column;
67
73
  height: 100%;
68
74
  overflow: auto;
69
- width: 80%;
75
+ width: 75%;
76
+ max-width: 75%;
70
77
  border: 1px solid #E2E2E2;
71
78
  }
72
79
 
@@ -76,6 +83,7 @@
76
83
  height: 100%;
77
84
  overflow: auto;
78
85
  width: 25%;
86
+ max-width: 25%;
79
87
  border: 1px solid #E2E2E2;
80
88
  }
81
89
 
@@ -97,4 +105,23 @@
97
105
 
98
106
  .chat-footer>*:not(:last-child) {
99
107
  margin-right: 0.5rem;
108
+ }
109
+
110
+ .quick-reply {
111
+ display: flex;
112
+ justify-content: center;
113
+ }
114
+
115
+ .label-color-picker {
116
+ display: flex;
117
+ flex-direction: row;
118
+ justify-content: flex-start !important;
119
+ }
120
+
121
+ .label-color-picker>* {
122
+ margin-right: 0.5rem;
123
+ }
124
+
125
+ .label-select {
126
+ width: 100%;
100
127
  }
@@ -52,9 +52,8 @@ var BmAvatarWrapper = _styledComponents.default.div(_templateObject || (_templat
52
52
  }, function (_ref3) {
53
53
  var user = _ref3.user;
54
54
  if (user === "chatbot") return "".concat(_colors.BmPrimaryBlue);
55
- if (user === "employee") return "".concat(_colors.BmGrey100);
56
- if (user === "default") return "".concat(_colors.BmPrimaryBlue);
57
- return "".concat(_colors.BmPrimaryBlue);
55
+ if (user === "employee") return "".concat(_colors.BmPrimaryBlue);
56
+ return "".concat(_colors.BmGrey100);
58
57
  }, function (_ref4) {
59
58
  var type = _ref4.type;
60
59
  if (type === "circle") return "7.143rem";
@@ -63,9 +62,8 @@ var BmAvatarWrapper = _styledComponents.default.div(_templateObject || (_templat
63
62
  }, function (_ref5) {
64
63
  var user = _ref5.user;
65
64
  if (user === "chatbot") return "".concat(_colors.BmPrimaryBlue);
66
- if (user === "employee") return "".concat(_colors.BmGrey400);
67
- if (user === "default") return "".concat(_colors.BmPrimaryBlue);
68
- return "".concat(_colors.BmPrimaryBlue);
65
+ if (user === "employee") return "".concat(_colors.BmPrimaryBlue);
66
+ return "".concat(_colors.BmGrey100);
69
67
  });
70
68
 
71
69
  exports.BmAvatarWrapper = BmAvatarWrapper;
@@ -39,7 +39,7 @@ var _default = {
39
39
  }
40
40
  },
41
41
  user: {
42
- description: "Type of the Avatar ('chatbot', 'employee' or Material-UI icon)",
42
+ description: "Type of the Avatar ('chatbot', 'employee' or Material-UI icon), If not chatbot or employee, background color will be grey",
43
43
  defaultValue: {
44
44
  summary: undefined
45
45
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
6
+ exports.default = exports.MessageState = exports.BmImageWrapper = exports.BmImageChat = exports.BmImage = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
@@ -25,7 +25,7 @@ var _excluded = ["state", "file", "src", "fileName"],
25
25
  _excluded2 = ["state", "src", "fileName"],
26
26
  _excluded3 = ["children", "state", "displayTime", "status", "session", "src", "file", "fileName"];
27
27
 
28
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
28
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
29
29
 
30
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
31
 
@@ -59,9 +59,9 @@ var Details = _styledComponents.default.div(_templateObject3 || (_templateObject
59
59
  return "row";
60
60
  });
61
61
 
62
- var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 50%;\n > * {\n margin-top: 0.5rem;\n }\n"])));
62
+ var MessageDetails = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n max-width: 50%;\n > * {\n margin-top: 0.5rem;\n margin-bottom: 0.5rem;\n }\n"])));
63
63
 
64
- var Messages = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 1.143rem;\n background: ", ";\n color: ", ";\n border-radius: ", ";\n border: 0.071rem solid ", ";\n word-break: break-all;\n margin: 0rem;\n"])), function (_ref2) {
64
+ var Messages = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0.5rem;\n background: ", ";\n color: ", ";\n border-radius: ", ";\n border: 0.071rem solid ", ";\n word-break: break-all;\n margin: 0rem;\n"])), function (_ref2) {
65
65
  var state = _ref2.state;
66
66
 
67
67
  if (state) {
@@ -192,7 +192,7 @@ var BmImageWrapper = _styledComponents.default.div(_templateObject8 || (_templat
192
192
 
193
193
  exports.BmImageWrapper = BmImageWrapper;
194
194
 
195
- var BmImage = _styledComponents.default.img(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n width: 21.429rem;\n object-fit: cover;\n flex-grow: 1;\n"])), ""
195
+ var BmImage = _styledComponents.default.img(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ", "\n width: 100%;\n object-fit: cover;\n flex-grow: 1;\n"])), ""
196
196
  /* Fix width */
197
197
  );
198
198
 
@@ -214,11 +214,15 @@ var BmImageChat = function BmImageChat(_ref13) {
214
214
  file: src,
215
215
  fileName: fileName
216
216
  }, rest))));
217
- }; //End of Component for Images
218
-
217
+ };
219
218
 
220
219
  exports.BmImageChat = BmImageChat;
221
220
 
221
+ var MessageState = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n @media all and (max-width: 960px) {\n display: none;\n }\n"]))); //End of Component for Images
222
+
223
+
224
+ exports.MessageState = MessageState;
225
+
222
226
  BmChat.Details = function (_ref14) {
223
227
  var children = _ref14.children,
224
228
  state = _ref14.state,
@@ -230,13 +234,12 @@ BmChat.Details = function (_ref14) {
230
234
  fileName = _ref14.fileName,
231
235
  rest = _objectWithoutProperties(_ref14, _excluded3);
232
236
 
233
- console.log("bbbb", fileName);
234
237
  return /*#__PURE__*/_react.default.createElement(Details, _extends({
235
238
  state: state
236
- }, rest), state === "inbound" && session && handleState({
239
+ }, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "inbound" && session && handleState({
237
240
  state: state,
238
241
  session: session
239
- }), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
242
+ })), /*#__PURE__*/_react.default.createElement(MessageDetails, null, src && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
240
243
  state: state,
241
244
  src: src,
242
245
  fileName: fileName
@@ -254,12 +257,12 @@ BmChat.Details = function (_ref14) {
254
257
  icon: /*#__PURE__*/_react.default.createElement(_icons.Done, null),
255
258
  color: "".concat(_colors.BmPrimaryBlack),
256
259
  size: "small"
257
- }))), state === "outbound" && session && handleState({
260
+ }))), /*#__PURE__*/_react.default.createElement(MessageState, null, state === "outbound" && session && handleState({
258
261
  state: state,
259
262
  session: session
260
- }));
263
+ })));
261
264
  };
262
265
 
263
- BmChat.Footer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
266
+ BmChat.Footer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n padding: 0.5rem 0.5rem;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
264
267
  var _default = BmChat;
265
268
  exports.default = _default;
@@ -15,9 +15,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
15
15
 
16
16
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
17
 
18
- var BmContactCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n &:hover {\n background: ", ";\n }\n\n ", "\n cursor: pointer;\n padding: 1rem 1.5rem;\n"])), _colors.BmGrey100, function (_ref) {
18
+ var BmContactCard = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-right: 1rem;\n }\n &:hover {\n background: ", ";\n }\n\n ", "\n cursor: pointer;\n padding: 1rem 1.5rem;\n"])), _colors.BmSecondaryBlue12, function (_ref) {
19
19
  var active = _ref.active;
20
- return active && " \n background: ".concat(_colors.BmGrey100, ";\n ");
20
+ return active && " \n background: ".concat(_colors.BmSecondaryBlue12, ";\n ");
21
21
  });
22
22
 
23
23
  exports.BmContactCard = BmContactCard;
@@ -58,7 +58,7 @@ var Overlay = _styledComponents.default.div(_templateObject || (_templateObject
58
58
 
59
59
  exports.Overlay = Overlay;
60
60
 
61
- var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
61
+ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n border-radius: 0.25rem;\n padding: 1rem;\n margin: auto;\n background: ", ";\n width: ", ";\n max-width: ", ";\n > *:not(:last-child) {\n margin-bottom: 1rem;\n }\n"])), _colors.BmPrimaryWhite, function (_ref) {
62
62
  var size = _ref.size;
63
63
 
64
64
  if (size) {
@@ -69,30 +69,42 @@ var ModalContent = _styledComponents.default.div(_templateObject2 || (_templateO
69
69
  return size;
70
70
  }
71
71
 
72
+ return "35.714rem";
73
+ }, function (_ref2) {
74
+ var size = _ref2.size;
75
+
76
+ if (size) {
77
+ if (size === "small") return "21.429rem";
78
+ if (size === "default") return "35.714rem";
79
+ if (size === "large") return "57.143rem";
80
+ if (size === "xlarge") return "81.429rem";
81
+ return size;
82
+ }
83
+
72
84
  return "35.714rem";
73
85
  });
74
86
 
75
87
  exports.ModalContent = ModalContent;
76
88
 
77
- var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 9999;\n overflow-x: auto;\n overflow-y: auto;\n outline: 0;\n position: fixed;\n height: auto;\n top: ", ";\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (_ref2) {
78
- var centered = _ref2.centered;
89
+ var ModalWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n z-index: 9999;\n overflow-x: auto;\n overflow-y: auto;\n outline: 0;\n position: fixed;\n height: auto;\n top: ", ";\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (_ref3) {
90
+ var centered = _ref3.centered;
79
91
 
80
92
  if (centered) {
81
93
  return "50%";
82
94
  }
83
95
 
84
- return "10%";
96
+ return "15%";
85
97
  });
86
98
 
87
99
  exports.ModalWrapper = ModalWrapper;
88
100
 
89
- var BmModal = function BmModal(_ref3) {
90
- var children = _ref3.children,
91
- show = _ref3.show,
92
- size = _ref3.size,
93
- onHide = _ref3.onHide,
94
- centered = _ref3.centered,
95
- rest = _objectWithoutProperties(_ref3, _excluded);
101
+ var BmModal = function BmModal(_ref4) {
102
+ var children = _ref4.children,
103
+ show = _ref4.show,
104
+ size = _ref4.size,
105
+ onHide = _ref4.onHide,
106
+ centered = _ref4.centered,
107
+ rest = _objectWithoutProperties(_ref4, _excluded);
96
108
 
97
109
  var _useState = (0, _react.useState)(show),
98
110
  _useState2 = _slicedToArray(_useState, 2),
@@ -134,13 +146,13 @@ exports.BmModal = BmModal;
134
146
 
135
147
  var ModalHeader = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
136
148
 
137
- BmModal.Header = function (_ref4) {
138
- var children = _ref4.children,
139
- size = _ref4.size,
140
- onHide = _ref4.onHide,
141
- closeButton = _ref4.closeButton,
142
- show = _ref4.show,
143
- rest = _objectWithoutProperties(_ref4, _excluded2);
149
+ BmModal.Header = function (_ref5) {
150
+ var children = _ref5.children,
151
+ size = _ref5.size,
152
+ onHide = _ref5.onHide,
153
+ closeButton = _ref5.closeButton,
154
+ show = _ref5.show,
155
+ rest = _objectWithoutProperties(_ref5, _excluded2);
144
156
 
145
157
  return /*#__PURE__*/_react.default.createElement(Consumer, null, function (value) {
146
158
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ModalHeader, rest, children, closeButton && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, _extends({
@@ -153,7 +165,19 @@ BmModal.Header = function (_ref4) {
153
165
  });
154
166
  };
155
167
 
156
- BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n > * {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n }\n"])));
168
+ BmModal.Body = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n max-height: ", ";\n overflow: auto;\n"])), function (_ref6) {
169
+ var size = _ref6.size;
170
+
171
+ if (size) {
172
+ if (size === "small") return "21.429rem";
173
+ if (size === "default") return "35.714rem";
174
+ if (size === "large") return "57.143rem";
175
+ if (size === "xlarge") return "81.429rem";
176
+ return size;
177
+ }
178
+
179
+ return "35.714rem";
180
+ });
157
181
  BmModal.Footer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
158
182
  BmModal.propTypes = {
159
183
  size: _propTypes.default.string,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.BmSecondaryYellow = exports.BmSecondaryRed8 = exports.BmSecondaryRed15 = exports.BmSecondaryRed = exports.BmSecondaryPurple = exports.BmSecondaryGrey = exports.BmSecondaryGreen8 = exports.BmSecondaryGreen15 = exports.BmSecondaryGreen = exports.BmSecondaryGold15 = exports.BmSecondaryDarkGreen = exports.BmSecondaryCyan = exports.BmPrimaryWhite = exports.BmPrimaryGold = exports.BmPrimaryBlue = exports.BmPrimaryBlack = exports.BmPictogramGold = exports.BmPictogramBlue = exports.BmGrey600 = exports.BmGrey500 = exports.BmGrey50 = exports.BmGrey400 = exports.BmGrey200 = exports.BmGrey100 = exports.BmBgLightBlue = exports.BmBgGreyBlue = exports.BmBgGrey45 = void 0;
6
+ exports.BmSecondaryYellow = exports.BmSecondaryRed8 = exports.BmSecondaryRed15 = exports.BmSecondaryRed = exports.BmSecondaryPurple = exports.BmSecondaryGrey = exports.BmSecondaryGreen8 = exports.BmSecondaryGreen15 = exports.BmSecondaryGreen = exports.BmSecondaryGold15 = exports.BmSecondaryDarkGreen = exports.BmSecondaryCyan = exports.BmSecondaryBlue12 = exports.BmPrimaryWhite = exports.BmPrimaryGold = exports.BmPrimaryBlue = exports.BmPrimaryBlack = exports.BmPictogramGold = exports.BmPictogramBlue = exports.BmGrey600 = exports.BmGrey500 = exports.BmGrey50 = exports.BmGrey400 = exports.BmGrey200 = exports.BmGrey100 = exports.BmBgLightBlue = exports.BmBgGreyBlue = exports.BmBgGrey45 = void 0;
7
7
  // Primary Colors
8
8
  var BmPrimaryBlue = "#33B1BA";
9
9
  exports.BmPrimaryBlue = BmPrimaryBlue;
@@ -36,9 +36,12 @@ var BmSecondaryRed15 = "rgba(246, 46, 72, 0.15)";
36
36
  exports.BmSecondaryRed15 = BmSecondaryRed15;
37
37
  var BmSecondaryGreen15 = "rgba(4, 132, 75, 0.15)";
38
38
  exports.BmSecondaryGreen15 = BmSecondaryGreen15;
39
- var BmSecondaryGold15 = "rgba(243, 169, 41, 0.15)"; // Background Colors
39
+ var BmSecondaryGold15 = "rgba(243, 169, 41, 0.15)"; // #33B1BA 12%
40
40
 
41
41
  exports.BmSecondaryGold15 = BmSecondaryGold15;
42
+ var BmSecondaryBlue12 = "rgba(51, 177, 186, 0.12)"; // Background Colors
43
+
44
+ exports.BmSecondaryBlue12 = BmSecondaryBlue12;
42
45
  var BmBgLightBlue = "#E1EAFC";
43
46
  exports.BmBgLightBlue = BmBgLightBlue;
44
47
  var BmBgGreyBlue = "#F5F6FA";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "1.1.8",
3
+ "version": "1.2.2",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -1,6 +1,6 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import "../src/main.scss";
3
- import { MainWrapper } from "./lib/components";
3
+ import { BmButton, MainWrapper, BmModal } from "./lib/components";
4
4
  import { GlobalStyle } from "./lib/components/globalStyles";
5
5
  import "./lib/assets/css/sidebar.scss";
6
6
  import SideBar from "./SideBar";
@@ -10,23 +10,42 @@ import CustomerInfo from "./CustomerInfo";
10
10
  import InfoAccordion from "./InfoAccordion";
11
11
 
12
12
  export const App = () => {
13
+ const [showModal, setShowModal] = useState(false);
13
14
  return (
14
15
  <>
15
16
  <GlobalStyle />
16
17
  <MainWrapper>
18
+ <div>
19
+ <BmButton onClick={() => setShowModal(!showModal)}>
20
+ Click Me!
21
+ </BmButton>
22
+ </div>
23
+ <BmModal show={showModal} onHide={() => setShowModal(false)}>
24
+ <BmModal.Header closeButton>
25
+ <h2>Header</h2>
26
+ </BmModal.Header>
27
+ <BmModal.Body>
28
+ <p>This is a bodymdlkdmvlfdmvlkmvlkvmflkvmd;lkvmv;lkdmv;lmv;lfvm;lmre;mv;lkremvc;lkremvclfdmvlkfdmv;lkfdmv;lkfdmv;lfdmv;lfdmv;lfdmv;lfdmvlfd;mvlfd;vmfd;lvfdmlv</p>
29
+ </BmModal.Body>
30
+ <BmModal.Footer>
31
+ <p>This is a footer</p>
32
+ </BmModal.Footer>
33
+ </BmModal>
17
34
  <div className="main-chat-container">
18
- <div className="sidebar">
19
- <SideBar />
20
- </div>
21
- <div className="chat">
22
- <ChatHeader />
23
- <div className="chat-menu">
24
- <div className="chat-messages">
25
- <Chat />
26
- </div>
27
- <div className="chat-contact-info">
28
- <CustomerInfo />
29
- <InfoAccordion />
35
+ <div className="chat-container">
36
+ <div className="sidebar">
37
+ <SideBar />
38
+ </div>
39
+ <div className="chat">
40
+ <ChatHeader />
41
+ <div className="chat-menu">
42
+ <div className="chat-messages">
43
+ <Chat />
44
+ </div>
45
+ <div className="chat-contact-info">
46
+ <CustomerInfo />
47
+ <InfoAccordion />
48
+ </div>
30
49
  </div>
31
50
  </div>
32
51
  </div>
package/src/Chat.js CHANGED
@@ -6,7 +6,7 @@ import SendIcon from "@mui/icons-material/Send";
6
6
  import { BmChat, BmIcons, BmInput } from "./lib/components";
7
7
  import "../src/lib/assets/css/sidebar.scss";
8
8
  import image from "../src/lib/assets/chart-img.png";
9
- import azam from '../src/lib/images/azam1.png';
9
+ import azam from "../src/lib/images/azam1.png";
10
10
 
11
11
  const Chat = () => {
12
12
  return (
@@ -20,7 +20,50 @@ const Chat = () => {
20
20
  src={image}
21
21
  fileName={<p>attachment.jpg</p>}
22
22
  />
23
-
23
+ <BmChat.Details
24
+ state="outbound"
25
+ session="bot"
26
+ displayTime={<p>12:00pm</p>}
27
+ status="sent"
28
+ // src={image}
29
+ // fileName={<p>attachment.jpg</p>}
30
+ >
31
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
32
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
33
+ Angalia asilimia ya QUALITY pale chini.
34
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
35
+ Au kama una aina nyingine ya kisimbuzi;
36
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
37
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
38
+ Au
39
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
40
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
41
+ Angalia asilimia ya QUALITY pale chini.
42
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
43
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
44
+ </BmChat.Details>
45
+ <BmChat.Details
46
+ state="inbound"
47
+ session="bot"
48
+ displayTime={<p>12:00pm</p>}
49
+ status="sent"
50
+ // src={image}
51
+ // fileName={<p>attachment.jpg</p>}
52
+ >
53
+ <p>Technical No Signal - Ili kupata chaneli au chaneli zifunguke kwa wakati ukilipia kifurushi, hakikisha kwanza kama unapata signal vizuri kutoka kwenye dish kwa kutumia remote control.
54
+ Bonyeza MENU, Bonyeza OK kwenye SEARCH, Bonyeza OK kwenye TP LIST.
55
+ Angalia asilimia ya QUALITY pale chini.
56
+ Angalia Transponder zote, 001, 002, 003 na 004 zinatakiwa ziwe na QUALITY si pungufu ya asilimia 60%.
57
+ Au kama una aina nyingine ya kisimbuzi;
58
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, Bonyeza OK kwenye AUTOMATIC SEARCH.
59
+ Shuka kwenye frequency na uangalie frequency zote kuanzia 11044, 10981, 11106 na 10971.
60
+ Au
61
+ Bonyeza MENU, Bonyeza OK kwenye SETTINGS, Bonyeza OK kwenye INSTALLATION, kwenye EUTELSAT 7C bonyeza kitufe cha KIJANI.
62
+ Angalia QUALITY kwenye frequency zote kuanzia 11044, 10981, 11106 na 10971.
63
+ Angalia asilimia ya QUALITY pale chini.
64
+ QUALITY inatakiwa isiwe pungufu ya asilimia 60%.
65
+ Je, kwako inasoma ngapi? Kama ipo chini ya 60%, wasiliana na aliyekufungia dish arekebishe.</p>
66
+ </BmChat.Details>
24
67
  <BmChat.Details
25
68
  state="outbound"
26
69
  session="live"
@@ -61,7 +104,15 @@ const Chat = () => {
61
104
  displayTime={<p>10:00am</p>}
62
105
  status="failed"
63
106
  >
64
- <p>Outbound</p>
107
+ <p>
108
+ Habari! Mimi ni msaidizi wako binafsi Azam TV. Ningependa
109
+ nikusaidie, lakini tafadhali anza kwa kuchagua kati ya haya
110
+ nikuhudumie (Mfano chagua namba 2 kubadili kifurushi au 5 kwa msaada
111
+ zaidi). 1. Angalia Salio 2. Badilisha Kifurishi 3. Tuma Ujumbe
112
+ Kuwasha Kisimbuzi 4. Huduma za mteja mpya 5. Nahitaji msaada (Huduma
113
+ kwa mteja) 6. Change language 0. Au ungependa kutuuliza swali
114
+ lingine?
115
+ </p>
65
116
  </BmChat.Details>{" "}
66
117
  <BmChat.Details
67
118
  state="outbound"
@@ -1,3 +1,9 @@
1
+ .main-chat-container {
2
+ display: flex;
3
+ flex-direction: row;
4
+ width: 100%;
5
+ }
6
+
1
7
  .sidebar {
2
8
  display: flex;
3
9
  flex-direction: column;
@@ -5,7 +11,7 @@
5
11
  height: 100%;
6
12
  overflow: auto;
7
13
  max-width: 20%;
8
- width: 20%;
14
+ width: 100%;
9
15
  border: 1px solid #E2E2E2;
10
16
  }
11
17
 
@@ -33,7 +39,7 @@
33
39
  overflow: auto;
34
40
  }
35
41
 
36
- .main-chat-container {
42
+ .chat-container {
37
43
  display: flex;
38
44
  flex-direction: row;
39
45
  align-items: center;
@@ -47,10 +53,9 @@
47
53
  display: flex;
48
54
  flex-direction: column;
49
55
  max-height: 100%;
50
- height: 100%;
51
56
  flex-grow: 1;
52
- max-height: 100%;
53
57
  height: 100%;
58
+ width: fit-content;
54
59
  }
55
60
 
56
61
  .chat-menu {
@@ -59,6 +64,7 @@
59
64
  height: 0%;
60
65
  flex-grow: 1;
61
66
  width: 100%;
67
+ max-width: 100%;
62
68
  }
63
69
 
64
70
  .chat-messages {
@@ -66,7 +72,8 @@
66
72
  flex-direction: column;
67
73
  height: 100%;
68
74
  overflow: auto;
69
- width: 80%;
75
+ width: 75%;
76
+ max-width: 75%;
70
77
  border: 1px solid #E2E2E2;
71
78
  }
72
79
 
@@ -76,6 +83,7 @@
76
83
  height: 100%;
77
84
  overflow: auto;
78
85
  width: 25%;
86
+ max-width: 25%;
79
87
  border: 1px solid #E2E2E2;
80
88
  }
81
89
 
@@ -97,4 +105,23 @@
97
105
 
98
106
  .chat-footer>*:not(:last-child) {
99
107
  margin-right: 0.5rem;
108
+ }
109
+
110
+ .quick-reply {
111
+ display: flex;
112
+ justify-content: center;
113
+ }
114
+
115
+ .label-color-picker {
116
+ display: flex;
117
+ flex-direction: row;
118
+ justify-content: flex-start !important;
119
+ }
120
+
121
+ .label-color-picker>* {
122
+ margin-right: 0.5rem;
123
+ }
124
+
125
+ .label-select {
126
+ width: 100%;
100
127
  }
@@ -2,7 +2,7 @@ import { Person } from "@material-ui/icons";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import styled from "styled-components";
5
- import { BmGrey100, BmPrimaryBlue, BmGrey400 } from "../colors";
5
+ import { BmGrey100, BmPrimaryBlue } from "../colors";
6
6
  import { BmAvatarIcon } from "../iconStyles";
7
7
  import SmartToyIcon from '@mui/icons-material/SmartToy';
8
8
 
@@ -28,9 +28,8 @@ export const BmAvatarWrapper = styled.div`
28
28
  }};
29
29
  background: ${({ user }) => {
30
30
  if (user === "chatbot") return `${BmPrimaryBlue}`;
31
- if (user === "employee") return `${BmGrey100}`;
32
- if (user === "default") return `${BmPrimaryBlue}`;
33
- return `${BmPrimaryBlue}`;
31
+ if (user === "employee") return `${BmPrimaryBlue}`;
32
+ return `${BmGrey100}`;
34
33
  }};
35
34
  border-radius: ${({ type }) => {
36
35
  if (type === "circle") return "7.143rem";
@@ -40,9 +39,8 @@ export const BmAvatarWrapper = styled.div`
40
39
  border: 0.071rem solid
41
40
  ${({ user }) => {
42
41
  if (user === "chatbot") return `${BmPrimaryBlue}`;
43
- if (user === "employee") return `${BmGrey400}`;
44
- if (user === "default") return `${BmPrimaryBlue}`;
45
- return `${BmPrimaryBlue}`;
42
+ if (user === "employee") return `${BmPrimaryBlue}`;
43
+ return `${BmGrey100}`;
46
44
  }};
47
45
  `;
48
46
 
@@ -21,7 +21,7 @@ export default {
21
21
  },
22
22
  user: {
23
23
  description:
24
- "Type of the Avatar ('chatbot', 'employee' or Material-UI icon)",
24
+ "Type of the Avatar ('chatbot', 'employee' or Material-UI icon), If not chatbot or employee, background color will be grey",
25
25
  defaultValue: { summary: undefined },
26
26
  },
27
27
  },
@@ -57,6 +57,7 @@ const MessageDetails = styled.div`
57
57
  max-width: 50%;
58
58
  > * {
59
59
  margin-top: 0.5rem;
60
+ margin-bottom: 0.5rem;
60
61
  }
61
62
  `;
62
63
 
@@ -64,7 +65,7 @@ const Messages = styled.div`
64
65
  display: flex;
65
66
  flex-direction: row;
66
67
  align-items: center;
67
- padding: 1.143rem;
68
+ padding: 0.5rem;
68
69
  background: ${({ state }) => {
69
70
  if (state) {
70
71
  if (state === "inbound") return `${BmPrimaryWhite}`;
@@ -192,7 +193,7 @@ export const BmImageWrapper = styled.div`
192
193
 
193
194
  export const BmImage = styled.img`
194
195
  ${"" /* Fix width */}
195
- width: 21.429rem;
196
+ width: 100%;
196
197
  object-fit: cover;
197
198
  flex-grow: 1;
198
199
  `;
@@ -215,6 +216,12 @@ export const BmImageChat = ({ state, src, fileName, ...rest }) => {
215
216
  );
216
217
  };
217
218
 
219
+ export const MessageState = styled.div`
220
+ @media all and (max-width: 960px) {
221
+ display: none;
222
+ }
223
+ `;
224
+
218
225
  //End of Component for Images
219
226
 
220
227
  BmChat.Details = ({
@@ -228,10 +235,12 @@ BmChat.Details = ({
228
235
  fileName,
229
236
  ...rest
230
237
  }) => {
231
- console.log("bbbb", fileName);
232
238
  return (
233
239
  <Details state={state} {...rest}>
234
- {state === "inbound" && session && handleState({ state, session })}
240
+ {/* Adding for mobile */}
241
+ <MessageState>
242
+ {state === "inbound" && session && handleState({ state, session })}
243
+ </MessageState>
235
244
  <MessageDetails>
236
245
  {/* For Images */}
237
246
  {src && (
@@ -262,7 +271,9 @@ BmChat.Details = ({
262
271
  )}
263
272
  </MessagesSubDetails>
264
273
  </MessageDetails>
265
- {state === "outbound" && session && handleState({ state, session })}
274
+ <MessageState>
275
+ {state === "outbound" && session && handleState({ state, session })}
276
+ </MessageState>
266
277
  </Details>
267
278
  );
268
279
  };
@@ -1,5 +1,5 @@
1
1
  import styled from "styled-components";
2
- import { BmGrey100 } from "../../colors";
2
+ import { BmSecondaryBlue12 } from "../../colors";
3
3
 
4
4
  export const BmContactCard = styled.div`
5
5
  display: flex;
@@ -9,13 +9,13 @@ export const BmContactCard = styled.div`
9
9
  margin-right: 1rem;
10
10
  }
11
11
  &:hover {
12
- background: ${BmGrey100};
12
+ background: ${BmSecondaryBlue12};
13
13
  }
14
14
 
15
15
  ${({ active }) =>
16
16
  active &&
17
17
  `
18
- background: ${BmGrey100};
18
+ background: ${BmSecondaryBlue12};
19
19
  `}
20
20
  cursor: pointer;
21
21
  padding: 1rem 1.5rem;
@@ -34,6 +34,16 @@ export const ModalContent = styled.div`
34
34
  }
35
35
  return "35.714rem";
36
36
  }};
37
+ max-width: ${({ size }) => {
38
+ if (size) {
39
+ if (size === "small") return "21.429rem";
40
+ if (size === "default") return "35.714rem";
41
+ if (size === "large") return "57.143rem";
42
+ if (size === "xlarge") return "81.429rem";
43
+ return size;
44
+ }
45
+ return "35.714rem";
46
+ }};
37
47
  > *:not(:last-child) {
38
48
  margin-bottom: 1rem;
39
49
  }
@@ -50,7 +60,7 @@ export const ModalWrapper = styled.div`
50
60
  if (centered) {
51
61
  return "50%";
52
62
  }
53
- return "10%";
63
+ return "15%";
54
64
  }};
55
65
  left: 50%;
56
66
  transform: translate(-50%, -50%);
@@ -138,12 +148,17 @@ BmModal.Body = styled.div`
138
148
  > *:not(:last-child) {
139
149
  margin-bottom: 0.5rem;
140
150
  }
141
- > * {
142
- display: flex;
143
- flex-direction: row;
144
- justify-content: space-between;
145
- width: 100%;
146
- }
151
+ max-height: ${({ size }) => {
152
+ if (size) {
153
+ if (size === "small") return "21.429rem";
154
+ if (size === "default") return "35.714rem";
155
+ if (size === "large") return "57.143rem";
156
+ if (size === "xlarge") return "81.429rem";
157
+ return size;
158
+ }
159
+ return "35.714rem";
160
+ }};
161
+ overflow: auto;
147
162
  `;
148
163
 
149
164
  BmModal.Footer = styled.div`
@@ -32,6 +32,9 @@ export const BmSecondaryGreen15 = "rgba(4, 132, 75, 0.15)";
32
32
 
33
33
  export const BmSecondaryGold15 = "rgba(243, 169, 41, 0.15)";
34
34
 
35
+ // #33B1BA 12%
36
+ export const BmSecondaryBlue12="rgba(51, 177, 186, 0.12)";
37
+
35
38
  // Background Colors
36
39
  export const BmBgLightBlue = "#E1EAFC";
37
40