beem-component 2.0.27 → 2.1.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/Dockerfile +4 -2
- package/Jenkinsfile +20 -5
- package/dist/components/Accordion/Accordion.js +55 -66
- package/dist/components/Accordion/Accordion.stories.js +5 -6
- package/dist/components/Avatars/avatars.js +33 -23
- package/dist/components/Avatars/avatars.stories.js +5 -10
- package/dist/components/BannerCard/bannerCard.stories.js +6 -7
- package/dist/components/BannerCard/bannerCards.js +38 -40
- package/dist/components/BmSelector/BmSelector.js +120 -0
- package/dist/components/BmSelector/BmSelector.stories.js +138 -0
- package/dist/components/ButtonGroup/buttonGroup.js +14 -15
- package/dist/components/ButtonGroup/buttonGroup.stories.js +11 -26
- package/dist/components/Buttons/Stories/basicbutton.stories.js +5 -10
- package/dist/components/Buttons/Stories/buttonAlertIcons.stories.js +4 -8
- package/dist/components/Buttons/Stories/buttonIconsOnly.stories.js +4 -8
- package/dist/components/Buttons/buttonAlertIcons.js +40 -58
- package/dist/components/Buttons/buttonDropdown copy.js +52 -35
- package/dist/components/Buttons/buttonDropdown.js +5 -3
- package/dist/components/Buttons/buttonIconsOnly.js +32 -25
- package/dist/components/Buttons/buttons.js +105 -72
- package/dist/components/Card_v2/Card.js +78 -0
- package/dist/components/Card_v2/Card.stories.js +60 -0
- package/dist/components/Cards/cards.js +3 -4
- package/dist/components/Cards/cards.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/FeedPostComments.js +65 -39
- package/dist/components/ChatComponents/ChatBody/chatBody.js +224 -189
- package/dist/components/ChatComponents/ChatBody/chatBody.stories.js +4 -5
- package/dist/components/ChatComponents/ChatBody/sessionDetails.js +11 -9
- package/dist/components/ChatComponents/ChatBody/sessionTimeline.js +12 -10
- package/dist/components/ChatComponents/ChatHeader/chatHeader.js +3 -4
- package/dist/components/ChatComponents/ChatHeader/chatHeader.stories.js +3 -4
- package/dist/components/ChatComponents/ColorPicker/colorPicker.js +3 -6
- package/dist/components/ChatComponents/ColorPicker/colorPicker.stories.js +7 -10
- package/dist/components/ChatComponents/ContactCards/contactCards.js +40 -31
- package/dist/components/ChatComponents/ContactCards/contactCards.stories.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.js +3 -4
- package/dist/components/ChatComponents/FormAccordion/FormAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/InfoTab/infoTab.js +3 -5
- package/dist/components/ChatComponents/InfoTab/infoTab.stories.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.js +3 -4
- package/dist/components/ChatComponents/LabelAccordion/LabelAccordion.stories.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.js +3 -4
- package/dist/components/ChatComponents/NoteAccordion/NoteAccordion.stories.js +3 -4
- package/dist/components/Chats/chat.js +56 -50
- package/dist/components/Chats/chatInput.js +9 -14
- package/dist/components/Chats/chatwrapper.js +8 -14
- package/dist/components/Checkbox/checkboxToggler.js +20 -20
- package/dist/components/Checkbox/checkboxToggler.stories.js +12 -35
- package/dist/components/InfoPanel/InfoPanel.js +141 -0
- package/dist/components/InfoPanel/InfoPanel.stories.js +200 -0
- package/dist/components/InputCounter/inputCounter.js +17 -18
- package/dist/components/Jumbotron/Jumbotron.js +8 -11
- package/dist/components/Jumbotron/Jumbotron.stories.js +3 -4
- package/dist/components/LabelWithIcon/LabelWithIcon.js +63 -0
- package/dist/components/LabelWithIcon/LabelWithIcon.stories.js +59 -0
- package/dist/components/Lists/listBox.js +21 -25
- package/dist/components/Lists/listBox.stories.js +7 -20
- package/dist/components/Lists/listHeader.stories.js +4 -8
- package/dist/components/Lists/listheader.js +17 -14
- package/dist/components/Lists/rowLabels.js +26 -24
- package/dist/components/Lists/rowLabels.stories.js +11 -18
- package/dist/components/Loader/loader.js +16 -14
- package/dist/components/Loader/loader.stories.js +4 -8
- package/dist/components/MainWrapper/index.js +3 -4
- package/dist/components/MessageCounter/MessageCounter.stories.js +4 -5
- package/dist/components/MessageCounter/messageCounter.js +15 -10
- package/dist/components/Modals/modal.js +57 -72
- package/dist/components/Modals/modals.stories.js +16 -45
- package/dist/components/MojaAccordion/MojaAccordion.js +49 -55
- package/dist/components/MultipleDateSelector/multipleDateSelector.js +14 -18
- package/dist/components/NoteBar/noteBar.js +22 -32
- package/dist/components/NoteBar/noteBar.stories.js +5 -10
- package/dist/components/PaymentBox/paymentBox.js +14 -11
- package/dist/components/PaymentBox/paymentBox.stories.js +3 -4
- package/dist/components/PerformanceIndicator/performaceIndicator.stories.js +4 -8
- package/dist/components/PerformanceIndicator/performanceIndicator.js +17 -14
- package/dist/components/Pills/pills.js +30 -38
- package/dist/components/Pills/pills.stories.js +5 -10
- package/dist/components/ProfileIcon/ProfileIcon.js +26 -36
- package/dist/components/ProfileIcon/profileIcon.stories.js +6 -12
- package/dist/components/ProgressBar/progressbar.js +14 -12
- package/dist/components/ProgressBar/progressbar.stories.js +4 -8
- package/dist/components/ProgressIndicator/ProgressIndicator.js +121 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +99 -0
- package/dist/components/ProgressRing/progressRing.js +48 -50
- package/dist/components/ProgressRing/progressRing.stories.js +5 -10
- package/dist/components/RouteLink/link.js +3 -8
- package/dist/components/RouteLink/link.stories.js +3 -4
- package/dist/components/ScrollBar/scrollBar.js +18 -26
- package/dist/components/SelectionNotice/SelectionNotice.js +57 -0
- package/dist/components/SelectionNotice/SelectionNotice.stories.js +35 -0
- package/dist/components/Stepper/stepper.js +4 -11
- package/dist/components/SuperFluid/Content/index.js +3 -4
- package/dist/components/SuperFluid/ContentTitle.js/index.js +6 -10
- package/dist/components/SuperFluid/SegmentCard/index.js +11 -21
- package/dist/components/Tabs/tabs.js +32 -24
- package/dist/components/Tabs/tabs.stories.js +6 -12
- package/dist/components/Tags/tags.js +65 -63
- package/dist/components/Tags/tags.stories.js +6 -12
- package/dist/components/breakpoints.js +3 -5
- package/dist/components/chatHeader.js +7 -12
- package/dist/components/checkbox.js +30 -25
- package/dist/components/colors.js +31 -62
- package/dist/components/contacts.js +32 -35
- package/dist/components/dropdown.js +18 -39
- package/dist/components/dropdownButton.js +38 -28
- package/dist/components/dropdownItems.js +23 -26
- package/dist/components/examples/App.js +3 -4
- package/dist/components/examples/InfoAccordion.js +3 -4
- package/dist/components/examples/chatBodyExample.js +4 -7
- package/dist/components/examples/selectExample.js +12 -30
- package/dist/components/globalStyles.js +1 -2
- package/dist/components/iconStyles.js +69 -103
- package/dist/components/index-copy.js +197 -197
- package/dist/components/index.js +106 -66
- package/dist/components/input.js +36 -25
- package/dist/components/logo.js +10 -9
- package/dist/components/navbar.js +9 -16
- package/dist/components/search.js +18 -16
- package/dist/components/shadow.js +1 -2
- package/dist/components/text.js +9 -18
- package/dist/components/typography.js +14 -28
- package/dist/components/wrapper.js +4 -6
- package/nginx.conf +26 -12
- package/package.json +3 -1
- package/src/App.js +246 -3
- package/src/lib/components/BmSelector/BmSelector.js +154 -0
- package/src/lib/components/BmSelector/BmSelector.stories.jsx +125 -0
- package/src/lib/components/Buttons/buttons.js +12 -8
- package/src/lib/components/Card_v2/Card.js +127 -0
- package/src/lib/components/Card_v2/Card.stories.jsx +94 -0
- package/src/lib/components/InfoPanel/InfoPanel.js +221 -0
- package/src/lib/components/InfoPanel/InfoPanel.stories.jsx +169 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.js +61 -0
- package/src/lib/components/LabelWithIcon/LabelWithIcon.stories.jsx +59 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.js +208 -0
- package/src/lib/components/ProgressIndicator/ProgressIndicator.stories.jsx +91 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.js +65 -0
- package/src/lib/components/SelectionNotice/SelectionNotice.stories.jsx +40 -0
- package/src/lib/components/index.js +14 -0
- package/src/util/convertToRGBA.js +21 -0
- package/storybook-static/140.d6695a165d8dcc810b2e.manager.bundle.js +1 -0
- package/storybook-static/140.f87feb0b.iframe.bundle.js +1 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js +2 -0
- package/storybook-static/149.7cc11ef8.iframe.bundle.js.LICENSE.txt +14 -0
- package/storybook-static/192.08b67b8c.iframe.bundle.js +1 -0
- package/storybook-static/246.9ad91c22.iframe.bundle.js +2 -0
- package/storybook-static/{vendors~main.7fe78cc2.iframe.bundle.js.LICENSE.txt → 246.9ad91c22.iframe.bundle.js.LICENSE.txt} +48 -16
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js +2 -0
- package/storybook-static/448.0ad0b2a9.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js +2 -0
- package/storybook-static/448.502f738789de31a83e1c.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js +2 -0
- package/storybook-static/463.694cb3b0a2f8b0deba70.manager.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js +2 -0
- package/storybook-static/463.7b3b5742.iframe.bundle.js.LICENSE.txt +31 -0
- package/storybook-static/58.56a2198b.iframe.bundle.js +1 -0
- package/storybook-static/58.cd3f8ad06a1200571eab.manager.bundle.js +1 -0
- package/storybook-static/676.d74803c6ab12eac1cdb2.manager.bundle.js +2 -0
- package/storybook-static/{vendors~main.1750028c2d68e574fb1d.manager.bundle.js.LICENSE.txt → 676.d74803c6ab12eac1cdb2.manager.bundle.js.LICENSE.txt} +20 -30
- package/storybook-static/720.d729a720931e1312e597.manager.bundle.js +2 -0
- package/storybook-static/720.e12f6aa2.iframe.bundle.js +2 -0
- package/storybook-static/794.0543a68a8b5aa273273a.manager.bundle.js +1 -0
- package/storybook-static/929.5353bbe2.iframe.bundle.js +1 -0
- package/storybook-static/929.ed1807a8ea3e2353d440.manager.bundle.js +1 -0
- package/storybook-static/9b058fcb1416fea75e6c.png +0 -0
- package/storybook-static/f29af3502f15acc765a8.png +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +22 -6
- package/storybook-static/index.html +66 -109
- package/storybook-static/main.1a29aa69.iframe.bundle.js +1 -0
- package/storybook-static/main.69bad789e0a3d801264b.manager.bundle.js +1 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.87eecef7.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.dd5308492057ff00c469.manager.bundle.js +1 -0
- package/storybook-static/static/css/main.08a2eb27.css +6 -0
- package/storybook-static/static/css/main.08a2eb27.css.map +1 -0
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js +0 -2
- package/storybook-static/0.00c62ec79c260aedbb98.manager.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/0.96c45dd8.iframe.bundle.js +0 -1
- package/storybook-static/1.dc6acfa9.iframe.bundle.js +0 -3
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.LICENSE.txt +0 -8
- package/storybook-static/1.dc6acfa9.iframe.bundle.js.map +0 -1
- package/storybook-static/1.dc7dcdaec2def2f224fd.manager.bundle.js +0 -1
- package/storybook-static/2.24353ddc.iframe.bundle.js +0 -1
- package/storybook-static/3.8bb2173c.iframe.bundle.js +0 -1
- package/storybook-static/5.0779e3847d325dece216.manager.bundle.js +0 -1
- package/storybook-static/6.8bd405c2576206749a16.manager.bundle.js +0 -2
- package/storybook-static/7.9d4ba19cf58425e7ff0d.manager.bundle.js +0 -1
- package/storybook-static/7.f0cfc757.iframe.bundle.js +0 -1
- package/storybook-static/8.91de97de.iframe.bundle.js +0 -3
- package/storybook-static/8.91de97de.iframe.bundle.js.map +0 -1
- package/storybook-static/8.b4e9ec0ec7648e02a923.manager.bundle.js +0 -1
- package/storybook-static/9.40ec65d6.iframe.bundle.js +0 -1
- package/storybook-static/asset-manifest.json +0 -30
- package/storybook-static/main.3c8d8027.iframe.bundle.js +0 -1
- package/storybook-static/main.3e5804fe56d1f580b088.manager.bundle.js +0 -1
- package/storybook-static/runtime~main.d3a18d6a.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.ff106120648356c6069d.manager.bundle.js +0 -1
- package/storybook-static/static/css/main.b44a190d.chunk.css +0 -4
- package/storybook-static/static/css/main.b44a190d.chunk.css.map +0 -1
- package/storybook-static/vendors~main.1750028c2d68e574fb1d.manager.bundle.js +0 -2
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js +0 -3
- package/storybook-static/vendors~main.7fe78cc2.iframe.bundle.js.map +0 -1
- /package/storybook-static/{static/media/PoppinsMedium.0ba26f6c.woff → 0ba26f6cfe2f94ec2b43.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.13b9af9c.eot → 13b9af9c8b2b4d656251.eot} +0 -0
- /package/storybook-static/{static/media/OpenSans-Regular.1b0809d5.ttf → 1b0809d519837cb7aad3.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.1eae2d48.woff2 → 1eae2d48398534b6e1fe.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.43e9b50d.svg → 43e9b50d6f4141c6275f.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.49b46ace.eot → 49b46acec5a811ce1edd.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.4a4d5420.woff → 4a4d54208e3b43dcdd6e.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff6749.eot → 53ff67494885a390867f.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.53ff971f.ttf → 53ff971f3c691d03daf6.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.5692c77f.ttf → 5692c77f2768f53db4fb.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.57a99fa8.woff2 → 57a99fa8569430db3aa1.woff2} +0 -0
- /package/storybook-static/{6.8bd405c2576206749a16.manager.bundle.js.LICENSE.txt → 720.d729a720931e1312e597.manager.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{8.91de97de.iframe.bundle.js.LICENSE.txt → 720.e12f6aa2.iframe.bundle.js.LICENSE.txt} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.80138c67.woff → 80138c67abf7843ea7e5.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.850fc4f3.svg → 850fc4f3768c0af34ea8.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.9a7cc7ec.woff2 → 9a7cc7ec4e1eda4f7e6d.woff2} +0 -0
- /package/storybook-static/{static/media/PoppinsBold.b33c148b.woff → b33c148b95e9b282af64.woff} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.b7e43707.svg → b7e43707906d1445e127.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.c442695a.eot → c442695a5fcf958609b8.eot} +0 -0
- /package/storybook-static/{static/media/PoppinsMedium.c98dddbd.ttf → c98dddbdc5b1e18988b9.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.e1948d56.svg → e1948d56fc87f569ef8d.svg} +0 -0
- /package/storybook-static/{static/media/PoppinsRegular.e1bc9021.ttf → e1bc9021c9d8ba86968b.ttf} +0 -0
- /package/storybook-static/{static/media/PoppinsSemiBold.f27050e2.woff2 → f27050e2684287d42c91.woff2} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -21,33 +20,29 @@ var _sessionDetails = require("./sessionDetails");
|
|
|
21
20
|
var _sessionTimeline = require("./sessionTimeline");
|
|
22
21
|
var _colors = require("../../colors");
|
|
23
22
|
var _FeedPostComments = require("./FeedPostComments");
|
|
24
|
-
|
|
23
|
+
const _excluded = ["state", "file", "src", "fileName", "onDownload", "extension", "link"],
|
|
25
24
|
_excluded2 = ["state", "src", "extensions", "fileName"],
|
|
26
25
|
_excluded3 = ["children", "state", "displayTime", "status", "session", "src", "file", "fileName", "sessionDetails", "sessionTimeline", "feedPostComments", "agentName", "metadata", "isInteractive", "type", "extension"];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
35
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
38
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
26
|
+
/* eslint-disable no-nested-ternary */
|
|
27
|
+
/* eslint-disable react/display-name */
|
|
28
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
30
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
39
33
|
_reactPdf.pdfjs.GlobalWorkerOptions.workerSrc = "//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(_reactPdf.pdfjs.version, "/pdf.worker.js");
|
|
40
|
-
|
|
34
|
+
const BmChat = _styledComponents.default.div.withConfig({
|
|
41
35
|
displayName: "chatBody__BmChat"
|
|
42
36
|
})(["display:flex;flex-direction:column;height:100%;", ""], '' /* border: 0.071rem solid ${BmGrey400}; */);
|
|
43
|
-
|
|
44
37
|
BmChat.Body = _styledComponents.default.div.withConfig({
|
|
45
38
|
displayName: "chatBody__Body"
|
|
46
39
|
})(["display:flex;flex-direction:column-reverse;padding:0rem 1rem;flex-grow:1;overflow:auto;height:100%;"]);
|
|
47
|
-
|
|
40
|
+
const Details = _styledComponents.default.div.withConfig({
|
|
48
41
|
displayName: "chatBody__Details"
|
|
49
|
-
})(["display:flex;justify-content:", ";> *:not(:last-child){margin-right:1rem;margin-bottom:0.5rem;}overflow-wrap:break-word !important;word-wrap:break-word !important;margin:0rem;import{extension}from 'mime-types';flex-grow:1;", ""],
|
|
50
|
-
|
|
42
|
+
})(["display:flex;justify-content:", ";> *:not(:last-child){margin-right:1rem;margin-bottom:0.5rem;}overflow-wrap:break-word !important;word-wrap:break-word !important;margin:0rem;import{extension}from 'mime-types';flex-grow:1;", ""], _ref => {
|
|
43
|
+
let {
|
|
44
|
+
state
|
|
45
|
+
} = _ref;
|
|
51
46
|
if (state === 'inbound') {
|
|
52
47
|
return 'flex-start';
|
|
53
48
|
}
|
|
@@ -56,29 +51,34 @@ var Details = _styledComponents.default.div.withConfig({
|
|
|
56
51
|
}
|
|
57
52
|
return 'row';
|
|
58
53
|
}, '' /* border: 1px solid red; */);
|
|
59
|
-
|
|
60
|
-
var MessageDetails = _styledComponents.default.div.withConfig({
|
|
54
|
+
const MessageDetails = _styledComponents.default.div.withConfig({
|
|
61
55
|
displayName: "chatBody__MessageDetails"
|
|
62
56
|
})(["display:flex;flex-direction:column;max-width:45%;> *{margin-top:0.5rem;margin-bottom:0.5rem;}"]);
|
|
63
|
-
|
|
57
|
+
const Messages = _styledComponents.default.div.withConfig({
|
|
64
58
|
displayName: "chatBody__Messages"
|
|
65
|
-
})(["display:flex;flex-direction:", ";align-items:", ";padding:1rem 0.5rem;background:", ";color:", ";border-radius:", ";border-left:", ";border:", ";word-break:break-word;margin:0rem;"],
|
|
66
|
-
|
|
67
|
-
|
|
59
|
+
})(["display:flex;flex-direction:", ";align-items:", ";padding:1rem 0.5rem;background:", ";color:", ";border-radius:", ";border-left:", ";border:", ";word-break:break-word;margin:0rem;"], _ref2 => {
|
|
60
|
+
let {
|
|
61
|
+
type,
|
|
62
|
+
isInteractive
|
|
63
|
+
} = _ref2;
|
|
68
64
|
if (type === 'interactive' || type === 'order' || isInteractive) {
|
|
69
65
|
return 'column';
|
|
70
66
|
}
|
|
71
67
|
return 'row';
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
}, _ref3 => {
|
|
69
|
+
let {
|
|
70
|
+
type,
|
|
71
|
+
isInteractive
|
|
72
|
+
} = _ref3;
|
|
75
73
|
if (type === 'interactive' || type === 'order' || isInteractive) {
|
|
76
74
|
return ' start';
|
|
77
75
|
}
|
|
78
76
|
return 'center';
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
}, _ref4 => {
|
|
78
|
+
let {
|
|
79
|
+
state,
|
|
80
|
+
metadata
|
|
81
|
+
} = _ref4;
|
|
82
82
|
if (metadata) {
|
|
83
83
|
if (state) {
|
|
84
84
|
if (state === 'inbound') return "".concat(_colors.BmTransparentBg30);
|
|
@@ -91,16 +91,20 @@ var Messages = _styledComponents.default.div.withConfig({
|
|
|
91
91
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryBlue);
|
|
92
92
|
}
|
|
93
93
|
return "".concat(_colors.BmPrimaryWhite);
|
|
94
|
-
},
|
|
95
|
-
|
|
94
|
+
}, _ref5 => {
|
|
95
|
+
let {
|
|
96
|
+
state
|
|
97
|
+
} = _ref5;
|
|
96
98
|
if (state) {
|
|
97
99
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
98
100
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
99
101
|
}
|
|
100
102
|
return "".concat(_colors.BmPrimaryWhite);
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
}, _ref6 => {
|
|
104
|
+
let {
|
|
105
|
+
state,
|
|
106
|
+
metadata
|
|
107
|
+
} = _ref6;
|
|
104
108
|
if (metadata) {
|
|
105
109
|
return '0rem';
|
|
106
110
|
}
|
|
@@ -109,9 +113,11 @@ var Messages = _styledComponents.default.div.withConfig({
|
|
|
109
113
|
if (state === 'outbound') return '.5714rem .5714rem 0rem .5714rem';
|
|
110
114
|
}
|
|
111
115
|
return "".concat(_colors.BmPrimaryWhite);
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
}, _ref7 => {
|
|
117
|
+
let {
|
|
118
|
+
state,
|
|
119
|
+
metadata
|
|
120
|
+
} = _ref7;
|
|
115
121
|
if (metadata) {
|
|
116
122
|
if (state) {
|
|
117
123
|
if (state === 'inbound') return "2px solid ".concat(_colors.BmPrimaryBlue);
|
|
@@ -120,9 +126,11 @@ var Messages = _styledComponents.default.div.withConfig({
|
|
|
120
126
|
return "".concat(_colors.BmPrimaryWhite);
|
|
121
127
|
}
|
|
122
128
|
return '';
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
|
|
129
|
+
}, _ref8 => {
|
|
130
|
+
let {
|
|
131
|
+
metadata,
|
|
132
|
+
state
|
|
133
|
+
} = _ref8;
|
|
126
134
|
if (metadata) {
|
|
127
135
|
return '';
|
|
128
136
|
}
|
|
@@ -131,59 +139,71 @@ var Messages = _styledComponents.default.div.withConfig({
|
|
|
131
139
|
}
|
|
132
140
|
return '';
|
|
133
141
|
});
|
|
134
|
-
|
|
142
|
+
const IntButton = _styledComponents.default.button.withConfig({
|
|
135
143
|
displayName: "chatBody__IntButton"
|
|
136
|
-
})(["padding:0.3rem;margin:0.1rem;display:flex;align-items:center;justify-content:center;width:100%;background-color:rgba(217,217,217,0.3);border:none;color:", ";border-radius:0.3rem;"],
|
|
137
|
-
|
|
144
|
+
})(["padding:0.3rem;margin:0.1rem;display:flex;align-items:center;justify-content:center;width:100%;background-color:rgba(217,217,217,0.3);border:none;color:", ";border-radius:0.3rem;"], _ref9 => {
|
|
145
|
+
let {
|
|
146
|
+
state
|
|
147
|
+
} = _ref9;
|
|
138
148
|
if (state) {
|
|
139
149
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
140
150
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
141
151
|
}
|
|
142
152
|
return "".concat(_colors.BmPrimaryWhite);
|
|
143
153
|
});
|
|
144
|
-
|
|
154
|
+
const OrderBody = _styledComponents.default.button.withConfig({
|
|
145
155
|
displayName: "chatBody__OrderBody"
|
|
146
|
-
})(["padding:1rem;margin:0.1rem;display:flex;flex-direction:column;align-items:start;justify-content:center;width:100%;background-color:rgba(217,217,217,0.3);border:none;color:", ";border-radius:0.3rem;> *{color:", ";}"],
|
|
147
|
-
|
|
156
|
+
})(["padding:1rem;margin:0.1rem;display:flex;flex-direction:column;align-items:start;justify-content:center;width:100%;background-color:rgba(217,217,217,0.3);border:none;color:", ";border-radius:0.3rem;> *{color:", ";}"], _ref0 => {
|
|
157
|
+
let {
|
|
158
|
+
state
|
|
159
|
+
} = _ref0;
|
|
148
160
|
if (state) {
|
|
149
161
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
150
162
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
151
163
|
}
|
|
152
164
|
return "".concat(_colors.BmPrimaryWhite);
|
|
153
|
-
},
|
|
154
|
-
|
|
165
|
+
}, _ref1 => {
|
|
166
|
+
let {
|
|
167
|
+
state
|
|
168
|
+
} = _ref1;
|
|
155
169
|
if (state) {
|
|
156
170
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
157
171
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
158
172
|
}
|
|
159
173
|
return "".concat(_colors.BmPrimaryWhite);
|
|
160
174
|
});
|
|
161
|
-
|
|
175
|
+
const ProductImage = _styledComponents.default.img.withConfig({
|
|
162
176
|
displayName: "chatBody__ProductImage"
|
|
163
177
|
})(["width:50px;height:50px;border-radius:50%;padding:5px;"]);
|
|
164
|
-
|
|
178
|
+
const CartContent = _styledComponents.default.div.withConfig({
|
|
165
179
|
displayName: "chatBody__CartContent"
|
|
166
|
-
})(["margin-bottom:0.5rem;display:flex;flex-direction:row;align-items:center;justify-content:center;color:", ";"],
|
|
167
|
-
|
|
180
|
+
})(["margin-bottom:0.5rem;display:flex;flex-direction:row;align-items:center;justify-content:center;color:", ";"], _ref10 => {
|
|
181
|
+
let {
|
|
182
|
+
state
|
|
183
|
+
} = _ref10;
|
|
168
184
|
if (state) {
|
|
169
185
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
170
186
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
171
187
|
}
|
|
172
188
|
return "".concat(_colors.BmPrimaryWhite);
|
|
173
189
|
});
|
|
174
|
-
|
|
190
|
+
const MessagesSubDetails = _styledComponents.default.div.withConfig({
|
|
175
191
|
displayName: "chatBody__MessagesSubDetails"
|
|
176
|
-
})(["display:flex;flex-direction:row;align-items:center;> *:not(:last-child){margin-right:0.5rem;}margin-left:", ";margin-top:0.5rem;"],
|
|
177
|
-
|
|
192
|
+
})(["display:flex;flex-direction:row;align-items:center;> *:not(:last-child){margin-right:0.5rem;}margin-left:", ";margin-top:0.5rem;"], _ref11 => {
|
|
193
|
+
let {
|
|
194
|
+
state
|
|
195
|
+
} = _ref11;
|
|
178
196
|
if (state) {
|
|
179
197
|
if (state === 'inbound') return '0px';
|
|
180
198
|
if (state === 'outbound') return 'auto';
|
|
181
199
|
}
|
|
182
200
|
return "".concat(_colors.BmPrimaryWhite);
|
|
183
201
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
202
|
+
const handleState = _ref12 => {
|
|
203
|
+
let {
|
|
204
|
+
session,
|
|
205
|
+
agentName
|
|
206
|
+
} = _ref12;
|
|
187
207
|
if (session === 'bot') {
|
|
188
208
|
return /*#__PURE__*/_react.default.createElement(_avatars.default, {
|
|
189
209
|
size: "small",
|
|
@@ -210,30 +230,36 @@ var handleState = function handleState(_ref14) {
|
|
|
210
230
|
});
|
|
211
231
|
}
|
|
212
232
|
};
|
|
213
|
-
|
|
233
|
+
const FileNameContainer = _styledComponents.default.div.withConfig({
|
|
214
234
|
displayName: "chatBody__FileNameContainer"
|
|
215
235
|
})(["display:flex;flex-direction:row;"]);
|
|
216
236
|
|
|
217
237
|
// Start of File Attachment
|
|
218
|
-
|
|
238
|
+
const FileAttachmentWrapper = _styledComponents.default.div.withConfig({
|
|
219
239
|
displayName: "chatBody__FileAttachmentWrapper"
|
|
220
|
-
})(["display:flex;cursor:pointer;flex-direction:row;align-items:center;padding:1rem;background:", ";color:", ";border-radius:", ";border:", ";> *{&:last-child{margin-left:auto;}:not(:last-child){margin-right:0.5rem;}}&&& > *{align-items:center;color:", ";}", " ", ""],
|
|
221
|
-
|
|
240
|
+
})(["display:flex;cursor:pointer;flex-direction:row;align-items:center;padding:1rem;background:", ";color:", ";border-radius:", ";border:", ";> *{&:last-child{margin-left:auto;}:not(:last-child){margin-right:0.5rem;}}&&& > *{align-items:center;color:", ";}", " ", ""], _ref13 => {
|
|
241
|
+
let {
|
|
242
|
+
state
|
|
243
|
+
} = _ref13;
|
|
222
244
|
if (state) {
|
|
223
245
|
if (state === 'inbound') return "#F9FAFB";
|
|
224
246
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryBlue);
|
|
225
247
|
}
|
|
226
248
|
return "".concat(_colors.BmPrimaryWhite);
|
|
227
|
-
},
|
|
228
|
-
|
|
249
|
+
}, _ref14 => {
|
|
250
|
+
let {
|
|
251
|
+
state
|
|
252
|
+
} = _ref14;
|
|
229
253
|
if (state) {
|
|
230
254
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
231
255
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
232
256
|
}
|
|
233
257
|
return "".concat(_colors.BmPrimaryWhite);
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
|
|
258
|
+
}, _ref15 => {
|
|
259
|
+
let {
|
|
260
|
+
state,
|
|
261
|
+
src
|
|
262
|
+
} = _ref15;
|
|
237
263
|
if (state) {
|
|
238
264
|
if (state === 'inbound') {
|
|
239
265
|
if (src) {
|
|
@@ -249,30 +275,35 @@ var FileAttachmentWrapper = _styledComponents.default.div.withConfig({
|
|
|
249
275
|
}
|
|
250
276
|
}
|
|
251
277
|
return "".concat(_colors.BmPrimaryWhite);
|
|
252
|
-
},
|
|
253
|
-
|
|
278
|
+
}, _ref16 => {
|
|
279
|
+
let {
|
|
280
|
+
state
|
|
281
|
+
} = _ref16;
|
|
254
282
|
if (state) {
|
|
255
283
|
if (state === 'inbound') return "0.071rem solid ".concat(_colors.BmGrey200, ";");
|
|
256
284
|
}
|
|
257
285
|
return '';
|
|
258
|
-
},
|
|
259
|
-
|
|
286
|
+
}, _ref17 => {
|
|
287
|
+
let {
|
|
288
|
+
state
|
|
289
|
+
} = _ref17;
|
|
260
290
|
if (state) {
|
|
261
291
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlue);
|
|
262
292
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
263
293
|
}
|
|
264
294
|
return "".concat(_colors.BmPrimaryWhite);
|
|
265
295
|
}, '' /* max-width: 100%; */, '' /* max-height: 100%; */);
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
296
|
+
const BmFileAttachment = _ref18 => {
|
|
297
|
+
let {
|
|
298
|
+
state,
|
|
299
|
+
file,
|
|
300
|
+
src,
|
|
301
|
+
fileName,
|
|
302
|
+
onDownload,
|
|
303
|
+
extension,
|
|
304
|
+
link
|
|
305
|
+
} = _ref18,
|
|
306
|
+
rest = _objectWithoutProperties(_ref18, _excluded);
|
|
276
307
|
return /*#__PURE__*/_react.default.createElement(FileAttachmentWrapper, _extends({
|
|
277
308
|
state: state,
|
|
278
309
|
src: src
|
|
@@ -289,34 +320,38 @@ var BmFileAttachment = function BmFileAttachment(_ref20) {
|
|
|
289
320
|
})));
|
|
290
321
|
};
|
|
291
322
|
// Start of Component for Images
|
|
292
|
-
|
|
323
|
+
const BmImageWrapper = exports.BmImageWrapper = _styledComponents.default.div.withConfig({
|
|
293
324
|
displayName: "chatBody__BmImageWrapper"
|
|
294
|
-
})(["display:flex;flex-direction:column;color:", ";"],
|
|
295
|
-
|
|
325
|
+
})(["display:flex;flex-direction:column;color:", ";"], _ref19 => {
|
|
326
|
+
let {
|
|
327
|
+
state
|
|
328
|
+
} = _ref19;
|
|
296
329
|
if (state) {
|
|
297
330
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
298
331
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
299
332
|
}
|
|
300
333
|
return "".concat(_colors.BmPrimaryWhite);
|
|
301
334
|
});
|
|
302
|
-
exports.
|
|
303
|
-
var BmImage = _styledComponents.default.img.withConfig({
|
|
335
|
+
const BmImage = exports.BmImage = _styledComponents.default.img.withConfig({
|
|
304
336
|
displayName: "chatBody__BmImage"
|
|
305
|
-
})(["", " width:100%;object-fit:cover;flex-grow:1;border-radius:", ";"], '' /* Fix width */,
|
|
306
|
-
|
|
337
|
+
})(["", " width:100%;object-fit:cover;flex-grow:1;border-radius:", ";"], '' /* Fix width */, _ref20 => {
|
|
338
|
+
let {
|
|
339
|
+
state
|
|
340
|
+
} = _ref20;
|
|
307
341
|
if (state) {
|
|
308
342
|
if (state === 'inbound') return '.5714rem .5714rem 0rem 0rem';
|
|
309
343
|
if (state === 'outbound') return '.5714rem .5714rem 0rem 0rem';
|
|
310
344
|
}
|
|
311
345
|
return "".concat(_colors.BmPrimaryWhite);
|
|
312
346
|
});
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
347
|
+
const BmImageChat = _ref21 => {
|
|
348
|
+
let {
|
|
349
|
+
state,
|
|
350
|
+
src,
|
|
351
|
+
extensions,
|
|
352
|
+
fileName
|
|
353
|
+
} = _ref21,
|
|
354
|
+
rest = _objectWithoutProperties(_ref21, _excluded2);
|
|
320
355
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(BmImageWrapper, _extends({
|
|
321
356
|
state: state
|
|
322
357
|
}, rest), /*#__PURE__*/_react.default.createElement(BmImage, {
|
|
@@ -331,38 +366,43 @@ var BmImageChat = function BmImageChat(_ref23) {
|
|
|
331
366
|
}, rest))));
|
|
332
367
|
};
|
|
333
368
|
exports.BmImageChat = BmImageChat;
|
|
334
|
-
|
|
369
|
+
const MessageState = exports.MessageState = _styledComponents.default.div.withConfig({
|
|
335
370
|
displayName: "chatBody__MessageState"
|
|
336
371
|
})(["@media all and (max-width:960px){display:none;}"]);
|
|
337
372
|
|
|
338
373
|
// End of Component for Images
|
|
339
|
-
|
|
340
|
-
|
|
374
|
+
|
|
375
|
+
const RepliedTextWrapper = exports.RepliedTextWrapper = _styledComponents.default.div.withConfig({
|
|
341
376
|
displayName: "chatBody__RepliedTextWrapper"
|
|
342
|
-
})(["display:flex;flex-direction:column;justify-content:center;padding:1.14286rem 1.14286rem 1.14286rem 0.35714rem;gap:1rem;border-radius:0.25rem 0.25rem 0.25rem 0.25rem;border:1px solid ", ";background:", ";color:", ";"], _colors.BmGrey200,
|
|
343
|
-
|
|
377
|
+
})(["display:flex;flex-direction:column;justify-content:center;padding:1.14286rem 1.14286rem 1.14286rem 0.35714rem;gap:1rem;border-radius:0.25rem 0.25rem 0.25rem 0.25rem;border:1px solid ", ";background:", ";color:", ";"], _colors.BmGrey200, _ref22 => {
|
|
378
|
+
let {
|
|
379
|
+
state
|
|
380
|
+
} = _ref22;
|
|
344
381
|
if (state) {
|
|
345
382
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryWhite);
|
|
346
383
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryBlue);
|
|
347
384
|
}
|
|
348
385
|
return "".concat(_colors.BmPrimaryWhite);
|
|
349
|
-
},
|
|
350
|
-
|
|
386
|
+
}, _ref23 => {
|
|
387
|
+
let {
|
|
388
|
+
state
|
|
389
|
+
} = _ref23;
|
|
351
390
|
if (state) {
|
|
352
391
|
if (state === 'inbound') return "".concat(_colors.BmPrimaryBlack);
|
|
353
392
|
if (state === 'outbound') return "".concat(_colors.BmPrimaryWhite);
|
|
354
393
|
}
|
|
355
394
|
return "".concat(_colors.BmPrimaryWhite);
|
|
356
395
|
});
|
|
357
|
-
|
|
358
|
-
var QuickReplyRender = function QuickReplyRender(_ref26) {
|
|
396
|
+
const QuickReplyRender = _ref24 => {
|
|
359
397
|
var _content$text;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
398
|
+
let {
|
|
399
|
+
content,
|
|
400
|
+
options,
|
|
401
|
+
type,
|
|
402
|
+
state,
|
|
403
|
+
rest,
|
|
404
|
+
isInteractive
|
|
405
|
+
} = _ref24;
|
|
366
406
|
return /*#__PURE__*/_react.default.createElement(Messages, {
|
|
367
407
|
type: type,
|
|
368
408
|
state: state,
|
|
@@ -371,24 +411,21 @@ var QuickReplyRender = function QuickReplyRender(_ref26) {
|
|
|
371
411
|
}, (content === null || content === void 0 ? void 0 : content.url) && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
|
|
372
412
|
state: state,
|
|
373
413
|
src: content === null || content === void 0 ? void 0 : content.url
|
|
374
|
-
}, rest)), /*#__PURE__*/_react.default.createElement("strong", null, content === null || content === void 0 ? void 0 : content.header), content === null || content === void 0
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
_react.default.createElement(IntButton, {
|
|
381
|
-
state: state
|
|
382
|
-
}, button === null || button === void 0 ? void 0 : button.title)
|
|
383
|
-
);
|
|
384
|
-
}));
|
|
414
|
+
}, rest)), /*#__PURE__*/_react.default.createElement("strong", null, content === null || content === void 0 ? void 0 : content.header), content === null || content === void 0 || (_content$text = content.text) === null || _content$text === void 0 ? void 0 : _content$text.split('\n').map(line => /*#__PURE__*/_react.default.createElement("p", null, line, /*#__PURE__*/_react.default.createElement("br", null))), /*#__PURE__*/_react.default.createElement("small", null, content === null || content === void 0 ? void 0 : content.caption), options === null || options === void 0 ? void 0 : options.map(button =>
|
|
415
|
+
/*#__PURE__*/
|
|
416
|
+
// eslint-disable-next-line react/jsx-key
|
|
417
|
+
_react.default.createElement(IntButton, {
|
|
418
|
+
state: state
|
|
419
|
+
}, button === null || button === void 0 ? void 0 : button.title)));
|
|
385
420
|
};
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
421
|
+
const ProductDetailRender = _ref25 => {
|
|
422
|
+
let {
|
|
423
|
+
type,
|
|
424
|
+
state,
|
|
425
|
+
header,
|
|
426
|
+
body,
|
|
427
|
+
isInteractive
|
|
428
|
+
} = _ref25;
|
|
392
429
|
console.log(type, state, header, body);
|
|
393
430
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Messages, {
|
|
394
431
|
type: type,
|
|
@@ -398,35 +435,34 @@ var ProductDetailRender = function ProductDetailRender(_ref27) {
|
|
|
398
435
|
state: state
|
|
399
436
|
}, /*#__PURE__*/_react.default.createElement(_ShoppingCartOutlined.default, null), "Catalog")));
|
|
400
437
|
};
|
|
401
|
-
|
|
438
|
+
const ListReplyRender = _ref26 => {
|
|
402
439
|
var _globalButtons$;
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
440
|
+
let {
|
|
441
|
+
title,
|
|
442
|
+
body,
|
|
443
|
+
globalButtons,
|
|
444
|
+
isInteractive,
|
|
445
|
+
type,
|
|
446
|
+
state
|
|
447
|
+
} = _ref26;
|
|
409
448
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Messages, {
|
|
410
449
|
type: type,
|
|
411
450
|
state: state,
|
|
412
451
|
isInteractive: isInteractive
|
|
413
|
-
}, /*#__PURE__*/_react.default.createElement("strong", null, title), body.split('\n').map(
|
|
414
|
-
return /*#__PURE__*/_react.default.createElement("p", null, line, /*#__PURE__*/_react.default.createElement("br", null));
|
|
415
|
-
}), /*#__PURE__*/_react.default.createElement(IntButton, {
|
|
452
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, title), body.split('\n').map(line => /*#__PURE__*/_react.default.createElement("p", null, line, /*#__PURE__*/_react.default.createElement("br", null))), /*#__PURE__*/_react.default.createElement(IntButton, {
|
|
416
453
|
state: state
|
|
417
454
|
}, /*#__PURE__*/_react.default.createElement(_List.default, null), (_globalButtons$ = globalButtons[0]) === null || _globalButtons$ === void 0 ? void 0 : _globalButtons$.title)));
|
|
418
455
|
};
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
return items === null || items === void 0 ? void 0 : items.reduce(function (total, item) {
|
|
456
|
+
const OrderRender = _ref27 => {
|
|
457
|
+
let {
|
|
458
|
+
amount,
|
|
459
|
+
type,
|
|
460
|
+
state,
|
|
461
|
+
items
|
|
462
|
+
} = _ref27;
|
|
463
|
+
const [displayItems, setDisplayItems] = (0, _react.useState)(false);
|
|
464
|
+
const sumQuantities = () => {
|
|
465
|
+
return items === null || items === void 0 ? void 0 : items.reduce((total, item) => {
|
|
430
466
|
return total + parseInt(item.quantity, 10);
|
|
431
467
|
}, 0);
|
|
432
468
|
};
|
|
@@ -441,52 +477,52 @@ var OrderRender = function OrderRender(_ref29) {
|
|
|
441
477
|
fontSize: "small"
|
|
442
478
|
}), /*#__PURE__*/_react.default.createElement("h5", null, /*#__PURE__*/_react.default.createElement("strong", null, sumQuantities(), " ", sumQuantities() > 1 ? 'items' : 'item')))), displayItems ? /*#__PURE__*/_react.default.createElement(OrderBody, {
|
|
443
479
|
state: state
|
|
444
|
-
}, items.map(
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
}));
|
|
455
|
-
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(OrderBody, {
|
|
480
|
+
}, items.map((data, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(CartContent, {
|
|
481
|
+
state: state
|
|
482
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, index + 1, ". "), /*#__PURE__*/_react.default.createElement(ProductImage, {
|
|
483
|
+
src: data.imgURL,
|
|
484
|
+
alt: "product"
|
|
485
|
+
}), /*#__PURE__*/_react.default.createElement("p", null, data.quantity, " X ", data.description, " @ ", data.currency, ' ', data.amount)), /*#__PURE__*/_react.default.createElement("hr", {
|
|
486
|
+
style: {
|
|
487
|
+
width: '100%'
|
|
488
|
+
}
|
|
489
|
+
})))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), /*#__PURE__*/_react.default.createElement(OrderBody, {
|
|
456
490
|
state: state
|
|
457
491
|
}, /*#__PURE__*/_react.default.createElement(CartContent, {
|
|
458
492
|
state: state
|
|
459
493
|
}, /*#__PURE__*/_react.default.createElement("p", null, ' ', "Estimated Total: ", /*#__PURE__*/_react.default.createElement("strong", null, amount)))), /*#__PURE__*/_react.default.createElement(IntButton, {
|
|
460
494
|
state: state,
|
|
461
|
-
onClick:
|
|
495
|
+
onClick: () => {
|
|
462
496
|
setDisplayItems(!displayItems);
|
|
463
497
|
}
|
|
464
498
|
}, /*#__PURE__*/_react.default.createElement("p", null, displayItems ? 'HIDE' : 'SHOW', " CART ITEMS"))));
|
|
465
499
|
};
|
|
466
|
-
BmChat.Details =
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
500
|
+
BmChat.Details = _ref28 => {
|
|
501
|
+
let {
|
|
502
|
+
children,
|
|
503
|
+
state,
|
|
504
|
+
displayTime,
|
|
505
|
+
status,
|
|
506
|
+
session,
|
|
507
|
+
src,
|
|
508
|
+
file,
|
|
509
|
+
fileName,
|
|
510
|
+
sessionDetails,
|
|
511
|
+
sessionTimeline,
|
|
512
|
+
feedPostComments,
|
|
513
|
+
agentName,
|
|
514
|
+
metadata,
|
|
515
|
+
isInteractive,
|
|
516
|
+
type,
|
|
517
|
+
extension
|
|
518
|
+
} = _ref28,
|
|
519
|
+
rest = _objectWithoutProperties(_ref28, _excluded3);
|
|
484
520
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Details, _extends({
|
|
485
521
|
state: state
|
|
486
522
|
}, rest), /*#__PURE__*/_react.default.createElement(MessageState, null, state === 'inbound' && session && handleState({
|
|
487
|
-
state
|
|
488
|
-
session
|
|
489
|
-
agentName
|
|
523
|
+
state,
|
|
524
|
+
session,
|
|
525
|
+
agentName
|
|
490
526
|
})), /*#__PURE__*/_react.default.createElement(MessageDetails, {
|
|
491
527
|
feedPostComments: feedPostComments
|
|
492
528
|
}, src && !(0, _lodash.isUndefined)(src) && /*#__PURE__*/_react.default.createElement(BmImageChat, _extends({
|
|
@@ -560,9 +596,9 @@ BmChat.Details = function (_ref30) {
|
|
|
560
596
|
color: "".concat(_colors.BmPrimaryBlack),
|
|
561
597
|
size: "small"
|
|
562
598
|
}))), /*#__PURE__*/_react.default.createElement(MessageState, null, state === 'outbound' && session && handleState({
|
|
563
|
-
state
|
|
564
|
-
session
|
|
565
|
-
agentName
|
|
599
|
+
state,
|
|
600
|
+
session,
|
|
601
|
+
agentName
|
|
566
602
|
}))), sessionTimeline && /*#__PURE__*/_react.default.createElement(_sessionTimeline.SessionTimeline, _extends({
|
|
567
603
|
message: sessionTimeline.message
|
|
568
604
|
}, rest)), sessionDetails && /*#__PURE__*/_react.default.createElement(_sessionDetails.SessionDetails, _extends({
|
|
@@ -573,5 +609,4 @@ BmChat.Details = function (_ref30) {
|
|
|
573
609
|
BmChat.Footer = _styledComponents.default.div.withConfig({
|
|
574
610
|
displayName: "chatBody__Footer"
|
|
575
611
|
})(["display:flex;flex-direction:column;padding:0.5rem 0.5rem;> *:not(:last-child){margin-bottom:0.5rem;}"]);
|
|
576
|
-
var _default = BmChat;
|
|
577
|
-
exports.default = _default;
|
|
612
|
+
var _default = exports.default = BmChat;
|