beem-component 1.4.8 → 1.5.1
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/ChatComponents/ChatBody/chatBody.js +1 -1
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +4 -2
- package/dist/components/Modals/modal.js +14 -13
- package/package.json +1 -1
- package/src/App.js +46 -59
- package/src/lib/components/ChatComponents/ChatBody/chatBody.js +0 -1
- package/src/lib/components/ChatComponents/ChatBody/sessionDetails.js +1 -0
- package/src/lib/components/Modals/modal.js +3 -3
|
@@ -43,7 +43,7 @@ var BmChat = _styledComponents.default.div(_templateObject || (_templateObject =
|
|
|
43
43
|
/* border: 0.071rem solid ${BmGrey400}; */
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
-
BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n padding: 0rem 1rem;\n flex-grow: 1;\n overflow: auto;\n height: 100%;\n
|
|
46
|
+
BmChat.Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column-reverse;\n padding: 0rem 1rem;\n flex-grow: 1;\n overflow: auto;\n height: 100%;\n"])));
|
|
47
47
|
|
|
48
48
|
var Details = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: ", ";\n > *:not(:last-child) {\n margin-right: 1rem;\n margin-bottom: 0.5rem;\n }\n overflow-wrap: break-word !important;\n word-wrap: break-word !important;\n margin: 0rem;\n flex-grow: 1;\n ", "\n"])), function (_ref) {
|
|
49
49
|
var state = _ref.state;
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SessionDetails = void 0;
|
|
7
7
|
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
8
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
11
|
|
|
10
12
|
var _colors = require("../../colors");
|
|
@@ -30,10 +32,10 @@ var SessionDetails = function SessionDetails(_ref) {
|
|
|
30
32
|
time = _ref.time,
|
|
31
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
34
|
|
|
33
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(SessionDetailsWrapper, _extends({
|
|
34
36
|
time: time,
|
|
35
37
|
message: message
|
|
36
|
-
}, rest), /*#__PURE__*/
|
|
38
|
+
}, rest), /*#__PURE__*/_react.default.createElement("p", null, "\xA0"), message || /*#__PURE__*/_react.default.createElement("p", null, "\xA0"), time || /*#__PURE__*/_react.default.createElement("p", null, "\xA0"));
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
exports.SessionDetails = SessionDetails;
|
|
@@ -133,19 +133,20 @@ BmModal.Header = function (_ref2) {
|
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
|
|
136
|
-
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
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
136
|
+
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 ", "\n"])), ''
|
|
137
|
+
/* max-height: ${({ size }) => {
|
|
138
|
+
if (size) {
|
|
139
|
+
if (size === "small") return "21.429rem";
|
|
140
|
+
if (size === "default") return "35.714rem";
|
|
141
|
+
if (size === "large") return "57.143rem";
|
|
142
|
+
if (size === "xlarge") return "81.429rem";
|
|
143
|
+
return size;
|
|
144
|
+
}
|
|
145
|
+
return "35.714rem";
|
|
146
|
+
}}; */
|
|
147
|
+
, ''
|
|
148
|
+
/* overflow: auto; */
|
|
149
|
+
);
|
|
149
150
|
BmModal.Footer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
150
151
|
BmModal.propTypes = {
|
|
151
152
|
size: _propTypes.default.string,
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -1,67 +1,54 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import map from "lodash/map";
|
|
3
|
+
import { GlobalStyle, BmModal, BmButton } from "./lib/components";
|
|
4
|
+
import Select from 'react-select';
|
|
4
5
|
|
|
5
6
|
const App = () => {
|
|
7
|
+
const [showModal, setShowModal] = useState(false);
|
|
8
|
+
|
|
9
|
+
const VENDOR_ACCOUNT_STATUSES = {
|
|
10
|
+
0: "Inactive",
|
|
11
|
+
1: "Active",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const VENDOR_ACCOUNT_STATUS_OPTIONS = map(
|
|
15
|
+
VENDOR_ACCOUNT_STATUSES,
|
|
16
|
+
(type, key) => ({
|
|
17
|
+
value: key,
|
|
18
|
+
label: type,
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
6
21
|
return (
|
|
7
22
|
<>
|
|
8
23
|
<GlobalStyle />
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
state="outbound"
|
|
38
|
-
session="bot"
|
|
39
|
-
displayTime={<p>12:00pm</p>}
|
|
40
|
-
status="sent"
|
|
41
|
-
>
|
|
42
|
-
<p>Outbound Text Message</p>
|
|
43
|
-
</BmChat.Details>
|
|
44
|
-
<BmChat.Details
|
|
45
|
-
state="outbound"
|
|
46
|
-
session="live"
|
|
47
|
-
displayTime={<p>12:00pm</p>}
|
|
48
|
-
status="sent"
|
|
49
|
-
fileName={<p>chat.png</p>}
|
|
50
|
-
src={image}
|
|
51
|
-
/>
|
|
52
|
-
<BmChat.Details
|
|
53
|
-
state="outbound"
|
|
54
|
-
session="live"
|
|
55
|
-
displayTime={<p>10:00am</p>}
|
|
56
|
-
status="failed"
|
|
57
|
-
fileName={<p>file.csv</p>}
|
|
58
|
-
file={image}
|
|
59
|
-
onDownload={() => {
|
|
60
|
-
alert("hello");
|
|
61
|
-
}}
|
|
62
|
-
/>
|
|
63
|
-
</BmChat.Body>
|
|
64
|
-
</BmChat>
|
|
24
|
+
<BmButton onClick={() => setShowModal(!showModal)}>Click Me!</BmButton>
|
|
25
|
+
<BmModal
|
|
26
|
+
size="small"
|
|
27
|
+
show={showModal}
|
|
28
|
+
onHide={() => setShowModal(false)}
|
|
29
|
+
centered
|
|
30
|
+
>
|
|
31
|
+
<BmModal.Header closeButton>
|
|
32
|
+
<h2>Header</h2>
|
|
33
|
+
</BmModal.Header>
|
|
34
|
+
<BmModal.Body>
|
|
35
|
+
<Select
|
|
36
|
+
// value={{
|
|
37
|
+
// label: VENDOR_ACCOUNT_STATUSES[values.active],
|
|
38
|
+
// value: values.active,
|
|
39
|
+
// }}
|
|
40
|
+
options={VENDOR_ACCOUNT_STATUS_OPTIONS}
|
|
41
|
+
placeholder="Select"
|
|
42
|
+
// onChange={(option) => setFieldValue("active", option.value)}
|
|
43
|
+
/>{" "}
|
|
44
|
+
</BmModal.Body>
|
|
45
|
+
<BmModal.Footer>
|
|
46
|
+
<BmButton size="small">Send</BmButton>
|
|
47
|
+
<BmButton size="small" variant="secondary">
|
|
48
|
+
View
|
|
49
|
+
</BmButton>
|
|
50
|
+
</BmModal.Footer>
|
|
51
|
+
</BmModal>
|
|
65
52
|
</>
|
|
66
53
|
);
|
|
67
54
|
};
|
|
@@ -134,7 +134,7 @@ BmModal.Body = styled.div`
|
|
|
134
134
|
> *:not(:last-child) {
|
|
135
135
|
margin-bottom: 0.5rem;
|
|
136
136
|
}
|
|
137
|
-
max-height: ${({ size }) => {
|
|
137
|
+
${'' /* max-height: ${({ size }) => {
|
|
138
138
|
if (size) {
|
|
139
139
|
if (size === "small") return "21.429rem";
|
|
140
140
|
if (size === "default") return "35.714rem";
|
|
@@ -143,8 +143,8 @@ BmModal.Body = styled.div`
|
|
|
143
143
|
return size;
|
|
144
144
|
}
|
|
145
145
|
return "35.714rem";
|
|
146
|
-
}};
|
|
147
|
-
overflow: auto;
|
|
146
|
+
}}; */}
|
|
147
|
+
${'' /* overflow: auto; */}
|
|
148
148
|
`;
|
|
149
149
|
|
|
150
150
|
BmModal.Footer = styled.div`
|