@cognigy/webchat 3.30.1 → 3.32.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/OSS_LICENSES.txt +2 -2
- package/dist/webchat.esm.js +398 -46
- package/dist/webchat.js +27 -27
- package/package.json +7 -5
package/dist/webchat.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* webchat.esm.js v3.
|
|
3
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
4
|
-
* https://github.com/Cognigy/Webchat/tree/v3.
|
|
2
|
+
* webchat.esm.js v3.32.0
|
|
3
|
+
* https://github.com/Cognigy/Webchat/tree/v3.32.0
|
|
4
|
+
* https://github.com/Cognigy/Webchat/tree/v3.32.0/OSS_LICENSES.txt
|
|
5
5
|
*/
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_react_dom_7dac9eee__ from "react-dom";
|
|
7
7
|
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
@@ -12425,6 +12425,48 @@ function position(node) {
|
|
|
12425
12425
|
|
|
12426
12426
|
/***/ }),
|
|
12427
12427
|
|
|
12428
|
+
/***/ 8308:
|
|
12429
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
12430
|
+
|
|
12431
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12432
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12433
|
+
/* harmony export */ });
|
|
12434
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
12435
|
+
var _path, _path2;
|
|
12436
|
+
var _excluded = ["title", "titleId"];
|
|
12437
|
+
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); }
|
|
12438
|
+
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; }
|
|
12439
|
+
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; }
|
|
12440
|
+
|
|
12441
|
+
var SvgChatBubbleOutline2 = function SvgChatBubbleOutline2(_ref) {
|
|
12442
|
+
var title = _ref.title,
|
|
12443
|
+
titleId = _ref.titleId,
|
|
12444
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12445
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
12446
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12447
|
+
width: 30,
|
|
12448
|
+
height: 30,
|
|
12449
|
+
fill: "none",
|
|
12450
|
+
viewBox: "0 0 44 44",
|
|
12451
|
+
"aria-labelledby": titleId
|
|
12452
|
+
}, props), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("title", {
|
|
12453
|
+
id: titleId
|
|
12454
|
+
}, title) : null, _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
12455
|
+
stroke: "inherit",
|
|
12456
|
+
strokeLinecap: "round",
|
|
12457
|
+
strokeWidth: 2,
|
|
12458
|
+
d: "M19.071 12.714H3.5a2 2 0 0 0-2 2v17.151a2 2 0 0 0 2 2h5.517v6.67l8.59-6.67h14.107a2 2 0 0 0 2-2v-4.508"
|
|
12459
|
+
})), _path2 || (_path2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
12460
|
+
stroke: "inherit",
|
|
12461
|
+
strokeLinejoin: "round",
|
|
12462
|
+
strokeWidth: 2,
|
|
12463
|
+
d: "M36.155 15.826c1.903-1.904 5.023-2.76 6.345-2.76-1.85-.529-4.818-.508-6.853-2.792-2.034-2.284-2.02-4.759-2.284-6.345 0 1.057-.666 4.188-2.284 6.345-1.523 2.03-6.028 2.792-7.615 2.792 1.322 0 4.95.856 6.853 2.76 2.19 2.19 2.782 5.552 3.046 7.138.264-1.586.888-5.234 2.792-7.138ZM23.952 5.576c.732-.732 1.932-1.062 2.44-1.062-.71-.203-1.852-.195-2.635-1.073-.782-.879-.777-1.83-.878-2.44 0 .406-.257 1.61-.879 2.44-.586.78-2.318 1.073-2.929 1.073.509 0 1.904.33 2.636 1.062.842.842 1.07 2.135 1.172 2.745.101-.61.341-2.013 1.073-2.745Z"
|
|
12464
|
+
})));
|
|
12465
|
+
};
|
|
12466
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgChatBubbleOutline2);
|
|
12467
|
+
|
|
12468
|
+
/***/ }),
|
|
12469
|
+
|
|
12428
12470
|
/***/ 8311:
|
|
12429
12471
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
12430
12472
|
|
|
@@ -17412,6 +17454,109 @@ const RatingConfirmation = () => {
|
|
|
17412
17454
|
|
|
17413
17455
|
/***/ }),
|
|
17414
17456
|
|
|
17457
|
+
/***/ 13640:
|
|
17458
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17459
|
+
|
|
17460
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17461
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17462
|
+
/* harmony export */ });
|
|
17463
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
17464
|
+
/* harmony import */ var _emotion_styled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(84937);
|
|
17465
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14176);
|
|
17466
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
|
|
17467
|
+
/* harmony import */ var _assets_baseline_chat_24px_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(28116);
|
|
17468
|
+
/* harmony import */ var _assets_chat_bubble_outline_1_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(79815);
|
|
17469
|
+
/* harmony import */ var _assets_chat_bubble_outline_2_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8308);
|
|
17470
|
+
/* harmony import */ var _assets_chat_bubble_outline_3_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33941);
|
|
17471
|
+
|
|
17472
|
+
|
|
17473
|
+
|
|
17474
|
+
|
|
17475
|
+
|
|
17476
|
+
|
|
17477
|
+
|
|
17478
|
+
const ChatIconMask = _emotion_styled__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.span(({
|
|
17479
|
+
theme,
|
|
17480
|
+
src
|
|
17481
|
+
}) => {
|
|
17482
|
+
const urlValue = `url("${String(src).replace(/\"/g, '\\"')}")`;
|
|
17483
|
+
return {
|
|
17484
|
+
display: "inline-block",
|
|
17485
|
+
width: 20,
|
|
17486
|
+
height: 20,
|
|
17487
|
+
backgroundColor: theme.primaryContrastColor,
|
|
17488
|
+
WebkitMaskImage: urlValue,
|
|
17489
|
+
maskImage: urlValue,
|
|
17490
|
+
WebkitMaskRepeat: "no-repeat",
|
|
17491
|
+
maskRepeat: "no-repeat",
|
|
17492
|
+
WebkitMaskPosition: "center",
|
|
17493
|
+
maskPosition: "center",
|
|
17494
|
+
WebkitMaskSize: "contain",
|
|
17495
|
+
maskSize: "contain"
|
|
17496
|
+
};
|
|
17497
|
+
});
|
|
17498
|
+
const ChatIcon = ({
|
|
17499
|
+
config
|
|
17500
|
+
}) => {
|
|
17501
|
+
const iconRef = config.settings?.layout?.iconUrl ?? "default-1";
|
|
17502
|
+
const animationClass = config.settings?.layout?.iconAnimation || "";
|
|
17503
|
+
const burstDuration = `${Math.max(0.2, 1 / Math.max(0.1, config.settings?.layout?.iconAnimationSpeed || 1))}s`;
|
|
17504
|
+
const burstDurationStyle = {
|
|
17505
|
+
"--icon-burst-duration": burstDuration
|
|
17506
|
+
};
|
|
17507
|
+
// Use built-in defaults if string is like "default-1"
|
|
17508
|
+
if (typeof iconRef === "string" && iconRef.startsWith("default-")) {
|
|
17509
|
+
const index = Math.max(0, Number(iconRef.replace("default-", "")) - 1);
|
|
17510
|
+
const defaultIcons = [_assets_chat_bubble_outline_1_svg__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, _assets_chat_bubble_outline_2_svg__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A, _assets_chat_bubble_outline_3_svg__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A];
|
|
17511
|
+
const DefaultIcon = defaultIcons[index] ?? _assets_baseline_chat_24px_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A;
|
|
17512
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(DefaultIcon, {
|
|
17513
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("iconAnimationContainer", animationClass),
|
|
17514
|
+
"aria-hidden": true,
|
|
17515
|
+
style: burstDurationStyle
|
|
17516
|
+
});
|
|
17517
|
+
}
|
|
17518
|
+
|
|
17519
|
+
// SVG by data URI or file extension -> mask to current color
|
|
17520
|
+
const isSvgDataUri = /^data:image\/(svg\+xml|svg)/i.test(String(iconRef));
|
|
17521
|
+
const isSvgFile = String(iconRef).trim().toLowerCase().endsWith(".svg");
|
|
17522
|
+
if (isSvgDataUri || isSvgFile) {
|
|
17523
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(ChatIconMask, {
|
|
17524
|
+
src: String(iconRef),
|
|
17525
|
+
"aria-hidden": true,
|
|
17526
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("iconAnimationContainer", animationClass),
|
|
17527
|
+
style: burstDurationStyle
|
|
17528
|
+
});
|
|
17529
|
+
}
|
|
17530
|
+
|
|
17531
|
+
// PNG data URI or file -> render as <img>
|
|
17532
|
+
const isPngDataUri = /^data:image\/(png|x-png)/i.test(String(iconRef));
|
|
17533
|
+
const isPngFile = String(iconRef).trim().toLowerCase().endsWith(".png");
|
|
17534
|
+
if (isPngDataUri || isPngFile) {
|
|
17535
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("img", {
|
|
17536
|
+
src: String(iconRef),
|
|
17537
|
+
alt: "",
|
|
17538
|
+
"aria-hidden": true,
|
|
17539
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("iconAnimationContainer", animationClass),
|
|
17540
|
+
style: {
|
|
17541
|
+
width: 20,
|
|
17542
|
+
height: 20,
|
|
17543
|
+
display: "inline-block",
|
|
17544
|
+
...burstDurationStyle
|
|
17545
|
+
}
|
|
17546
|
+
});
|
|
17547
|
+
}
|
|
17548
|
+
|
|
17549
|
+
// Fallback
|
|
17550
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_assets_baseline_chat_24px_svg__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A, {
|
|
17551
|
+
"aria-hidden": true,
|
|
17552
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_2___default()("iconAnimationContainer", animationClass),
|
|
17553
|
+
style: burstDurationStyle
|
|
17554
|
+
});
|
|
17555
|
+
};
|
|
17556
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChatIcon);
|
|
17557
|
+
|
|
17558
|
+
/***/ }),
|
|
17559
|
+
|
|
17415
17560
|
/***/ 13826:
|
|
17416
17561
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
17417
17562
|
|
|
@@ -27428,7 +27573,12 @@ const getFinishReason = (message, messageId) => {
|
|
|
27428
27573
|
return messageId ? message.data?._cognigy?._finishReason : "stop";
|
|
27429
27574
|
};
|
|
27430
27575
|
|
|
27431
|
-
//
|
|
27576
|
+
// Helper to determine if a message should be set as the currently animating message
|
|
27577
|
+
const shouldSetAsAnimating = (nextAnimatingId, newMessage, isEngagementMessageHidden) => {
|
|
27578
|
+
return !nextAnimatingId && !(newMessage.source === "engagement" && isEngagementMessageHidden);
|
|
27579
|
+
};
|
|
27580
|
+
|
|
27581
|
+
// slice of the store state that contains the info about streaming mode and teaserMessage, to avoid circular dependency
|
|
27432
27582
|
|
|
27433
27583
|
const createMessageReducer = getState => {
|
|
27434
27584
|
return (state = initialState, action) => {
|
|
@@ -27445,6 +27595,7 @@ const createMessageReducer = getState => {
|
|
|
27445
27595
|
const newMessage = action.message;
|
|
27446
27596
|
const isOutputCollationEnabled = getState().config?.settings?.behavior?.collateStreamedOutputs;
|
|
27447
27597
|
const isprogressiveMessageRenderingEnabled = getState().config?.settings?.behavior?.progressiveMessageRendering;
|
|
27598
|
+
const isEngagementMessageHidden = getState().config?.settings?.teaserMessage?.showInChat === false;
|
|
27448
27599
|
if (!isOutputCollationEnabled && !isprogressiveMessageRenderingEnabled || newMessage.source !== "bot" && newMessage.source !== "engagement") {
|
|
27449
27600
|
return {
|
|
27450
27601
|
...state,
|
|
@@ -27464,7 +27615,8 @@ const createMessageReducer = getState => {
|
|
|
27464
27615
|
if (!state.currentlyAnimatingId) {
|
|
27465
27616
|
visibleOutputMessages.push(newMessageId);
|
|
27466
27617
|
}
|
|
27467
|
-
|
|
27618
|
+
const shouldAnimate = shouldSetAsAnimating(nextAnimatingId, newMessage, isEngagementMessageHidden);
|
|
27619
|
+
if (shouldAnimate) {
|
|
27468
27620
|
nextAnimatingId = isAnimated ? newMessageId : null;
|
|
27469
27621
|
}
|
|
27470
27622
|
return {
|
|
@@ -27499,7 +27651,8 @@ const createMessageReducer = getState => {
|
|
|
27499
27651
|
if (!newMessageId || !isOutputCollationEnabled) {
|
|
27500
27652
|
newMessageId = (0,_helper__WEBPACK_IMPORTED_MODULE_0__/* .generateRandomId */ .M)();
|
|
27501
27653
|
}
|
|
27502
|
-
|
|
27654
|
+
const shouldAnimate = shouldSetAsAnimating(nextAnimatingId, newMessage, isEngagementMessageHidden);
|
|
27655
|
+
if (shouldAnimate) {
|
|
27503
27656
|
nextAnimatingId = newMessageId;
|
|
27504
27657
|
}
|
|
27505
27658
|
|
|
@@ -36845,7 +36998,7 @@ module.exports = arrayLikeKeys;
|
|
|
36845
36998
|
/* harmony export */ });
|
|
36846
36999
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
36847
37000
|
/* harmony import */ var _presentational_Header__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55922);
|
|
36848
|
-
/* harmony import */ var
|
|
37001
|
+
/* harmony import */ var _emotion_react__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(21180);
|
|
36849
37002
|
/* harmony import */ var _emotion_styled__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84937);
|
|
36850
37003
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58637);
|
|
36851
37004
|
/* harmony import */ var _presentational_WebchatRoot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31961);
|
|
@@ -36859,20 +37012,20 @@ module.exports = arrayLikeKeys;
|
|
|
36859
37012
|
/* harmony import */ var _utils_normalize_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(80167);
|
|
36860
37013
|
/* harmony import */ var _presentational_FAB__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(59990);
|
|
36861
37014
|
/* harmony import */ var _presentational_WebchatWrapper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(28784);
|
|
36862
|
-
/* harmony import */ var
|
|
37015
|
+
/* harmony import */ var _presentational_ChatIcon__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(13640);
|
|
36863
37016
|
/* harmony import */ var _assets_collapse_20px_svg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(97273);
|
|
36864
37017
|
/* harmony import */ var _presentational_DisconnectOverlay__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(11571);
|
|
36865
37018
|
/* harmony import */ var _presentational_Badge__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(28068);
|
|
36866
|
-
/* harmony import */ var
|
|
36867
|
-
/* harmony import */ var
|
|
37019
|
+
/* harmony import */ var _webchat_helper_message__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(31963);
|
|
37020
|
+
/* harmony import */ var _utils_find_focusable__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(41098);
|
|
36868
37021
|
/* harmony import */ var _utils_notification_sound__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31493);
|
|
36869
|
-
/* harmony import */ var
|
|
37022
|
+
/* harmony import */ var _utils_find_reverse__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(5128);
|
|
36870
37023
|
/* harmony import */ var _assets_style_css__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(58979);
|
|
36871
37024
|
/* harmony import */ var _history_TypingIndicator__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(20310);
|
|
36872
|
-
/* harmony import */ var
|
|
36873
|
-
/* harmony import */ var
|
|
37025
|
+
/* harmony import */ var _webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(44557);
|
|
37026
|
+
/* harmony import */ var _webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(31067);
|
|
36874
37027
|
/* harmony import */ var _presentational_FABDisabled__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(99526);
|
|
36875
|
-
/* harmony import */ var
|
|
37028
|
+
/* harmony import */ var _webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(69401);
|
|
36876
37029
|
/* harmony import */ var _presentational_HomeScreen__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(42740);
|
|
36877
37030
|
/* harmony import */ var _presentational_previous_conversations_ConversationsList__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(14704);
|
|
36878
37031
|
/* harmony import */ var _cognigy_chat_components__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(2854);
|
|
@@ -36882,15 +37035,17 @@ module.exports = arrayLikeKeys;
|
|
|
36882
37035
|
/* harmony import */ var _presentational_chat_options_ChatOptions__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(49687);
|
|
36883
37036
|
/* harmony import */ var _history_QueueUpdates__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(59021);
|
|
36884
37037
|
/* harmony import */ var _plugins_input_file_DropZone__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(1339);
|
|
36885
|
-
/* harmony import */ var
|
|
37038
|
+
/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(66492);
|
|
36886
37039
|
/* harmony import */ var _presentational_TeaserMessage__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(49888);
|
|
36887
37040
|
/* harmony import */ var _functional_xapp_overlay_XAppOverlay__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(12381);
|
|
36888
|
-
/* harmony import */ var
|
|
37041
|
+
/* harmony import */ var _utils_sourceMapping__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(25091);
|
|
36889
37042
|
/* harmony import */ var _plugins_speech_output__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(83679);
|
|
36890
|
-
/* harmony import */ var
|
|
37043
|
+
/* harmony import */ var _utils_filter_out_control_commands__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(70562);
|
|
36891
37044
|
/* harmony import */ var _webchat_helper_handleMarkdown__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(71621);
|
|
36892
37045
|
/* harmony import */ var _presentational_previous_conversations_DeleteAllConversations__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(5196);
|
|
36893
37046
|
/* harmony import */ var _presentational_ScreenReaderLiveRegion__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(41426);
|
|
37047
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(14176);
|
|
37048
|
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_38__);
|
|
36894
37049
|
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); }
|
|
36895
37050
|
|
|
36896
37051
|
|
|
@@ -36938,6 +37093,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
36938
37093
|
|
|
36939
37094
|
|
|
36940
37095
|
|
|
37096
|
+
|
|
36941
37097
|
|
|
36942
37098
|
|
|
36943
37099
|
const stylisPlugins = [(0,_utils_css__WEBPACK_IMPORTED_MODULE_7__/* .isolate */ .az)("[data-cognigy-webchat-root]")];
|
|
@@ -37053,9 +37209,9 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37053
37209
|
const secondaryColor = props?.config?.settings?.colors?.secondaryColor;
|
|
37054
37210
|
const chatInterfaceColor = props?.config?.settings?.colors?.chatInterfaceColor;
|
|
37055
37211
|
const sourceColorMapping = props?.config?.settings?.widgetSettings?.sourceColorMapping;
|
|
37056
|
-
const overrideBotMessageColor = (0,
|
|
37057
|
-
const overrideUserMessageColor = (0,
|
|
37058
|
-
const overrideAgentMessageColor = (0,
|
|
37212
|
+
const overrideBotMessageColor = (0,_utils_sourceMapping__WEBPACK_IMPORTED_MODULE_39__/* .getSourceBackgroundColor */ .N)(sourceColorMapping?.bot, props?.config?.settings?.colors);
|
|
37213
|
+
const overrideUserMessageColor = (0,_utils_sourceMapping__WEBPACK_IMPORTED_MODULE_39__/* .getSourceBackgroundColor */ .N)(sourceColorMapping?.user, props?.config?.settings?.colors);
|
|
37214
|
+
const overrideAgentMessageColor = (0,_utils_sourceMapping__WEBPACK_IMPORTED_MODULE_39__/* .getSourceBackgroundColor */ .N)(sourceColorMapping?.agent, props?.config?.settings?.colors);
|
|
37059
37215
|
const overrideBotMessageBorderColor = sourceColorMapping?.bot === "user" ? "transparent" : null;
|
|
37060
37216
|
const overrideUserMessageBorderColor = sourceColorMapping?.user === "bot" ? state.theme.black80 : null;
|
|
37061
37217
|
const overrideAgentMessageBorderColor = sourceColorMapping?.agent === "user" ? "transparent" : null;
|
|
@@ -37149,7 +37305,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37149
37305
|
}
|
|
37150
37306
|
}
|
|
37151
37307
|
}
|
|
37152
|
-
this.hideNotifications = (0,
|
|
37308
|
+
this.hideNotifications = (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isDisabledDueToConnectivity */ .l9)(this.props.config.settings, timeoutReached) || (0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isDisabledDueToMaintenance */ .$6)(this.props.config.settings) || (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isDisabledOutOfBusinessHours */ .dt)(this.props.config.settings.businessHours) || (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isInformingDueToConnectivity */ .u0)(this.props.config.settings, timeoutReached) || (0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isInformingDueToMaintenance */ .iF)(this.props.config.settings) || (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isInformingOutOfBusinessHours */ .Gr)(this.props.config.settings.businessHours) || (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isHiddenDueToConnectivity */ .VD)(this.props.config.settings, timeoutReached) || (0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isHiddenDueToMaintenance */ .Hs)(this.props.config.settings) || (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isHiddenOutOfBusinessHours */ .hN)(this.props.config.settings.businessHours) || false;
|
|
37153
37309
|
};
|
|
37154
37310
|
componentDidMount() {
|
|
37155
37311
|
const defaultMessagePlugins = [];
|
|
@@ -37160,6 +37316,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37160
37316
|
inputPlugins: [...(this.props.inputPlugins || []), _plugins_input_base__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .A],
|
|
37161
37317
|
messagePlugins: [...(this.props.messagePlugins || []), ...defaultMessagePlugins]
|
|
37162
37318
|
});
|
|
37319
|
+
this.setupIconAnimationInterval();
|
|
37163
37320
|
}
|
|
37164
37321
|
async componentDidUpdate(prevProps, prevState) {
|
|
37165
37322
|
// When the webchat is opened, focus is moved to the first focusable element inside the webchat window.
|
|
@@ -37170,7 +37327,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37170
37327
|
const webchatToggleButton = this.chatToggleButtonRef?.current;
|
|
37171
37328
|
const {
|
|
37172
37329
|
firstFocusable
|
|
37173
|
-
} = (0,
|
|
37330
|
+
} = (0,_utils_find_focusable__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .A)(webchatWindowEl);
|
|
37174
37331
|
if (document.activeElement === webchatToggleButton && firstFocusable) {
|
|
37175
37332
|
firstFocusable.focus();
|
|
37176
37333
|
}
|
|
@@ -37220,9 +37377,9 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37220
37377
|
let lastUnseenMessageText = "";
|
|
37221
37378
|
|
|
37222
37379
|
// find the last readable message and remember its text
|
|
37223
|
-
const lastReadableUnseenMessage = (0,
|
|
37380
|
+
const lastReadableUnseenMessage = (0,_utils_find_reverse__WEBPACK_IMPORTED_MODULE_44__/* .findReverse */ .u)(this.props.unseenMessages, message => !!(0,_webchat_helper_message__WEBPACK_IMPORTED_MODULE_45__/* ["default"] */ .Ay)(message));
|
|
37224
37381
|
if (lastReadableUnseenMessage) {
|
|
37225
|
-
lastUnseenMessageText = (0,
|
|
37382
|
+
lastUnseenMessageText = (0,_webchat_helper_message__WEBPACK_IMPORTED_MODULE_45__/* ["default"] */ .Ay)(lastReadableUnseenMessage);
|
|
37226
37383
|
}
|
|
37227
37384
|
|
|
37228
37385
|
// TODO: Add markdown rendering if there is valid markdown and renderMarkdown is enabled
|
|
@@ -37245,6 +37402,11 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37245
37402
|
lastUnseenMessageText: ""
|
|
37246
37403
|
});
|
|
37247
37404
|
}
|
|
37405
|
+
|
|
37406
|
+
// Re-evaluate icon animation interval when related settings change
|
|
37407
|
+
if (prevProps?.config?.settings?.layout?.iconAnimationInterval !== this.props?.config?.settings?.layout?.iconAnimationInterval || prevProps?.config?.settings?.layout?.iconAnimationSpeed !== this.props?.config?.settings?.layout?.iconAnimationSpeed || prevProps?.config?.settings?.layout?.iconAnimation !== this.props?.config?.settings?.layout?.iconAnimation) {
|
|
37408
|
+
this.setupIconAnimationInterval();
|
|
37409
|
+
}
|
|
37248
37410
|
if (!this.hideNotifications) {
|
|
37249
37411
|
// initialize the title indicator if configured
|
|
37250
37412
|
if (this.props.config.settings.unreadMessages.enableIndicator) {
|
|
@@ -37276,6 +37438,37 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37276
37438
|
clearTimeout(this.engagementMessageTimeout);
|
|
37277
37439
|
this.engagementMessageTimeout = null;
|
|
37278
37440
|
}
|
|
37441
|
+
|
|
37442
|
+
// Teardown icon animation interval
|
|
37443
|
+
if (this.iconAnimationIntervalHandle) {
|
|
37444
|
+
clearInterval(this.iconAnimationIntervalHandle);
|
|
37445
|
+
this.iconAnimationIntervalHandle = null;
|
|
37446
|
+
}
|
|
37447
|
+
}
|
|
37448
|
+
iconAnimationIntervalHandle = null;
|
|
37449
|
+
setupIconAnimationInterval() {
|
|
37450
|
+
if (this.iconAnimationIntervalHandle) {
|
|
37451
|
+
clearInterval(this.iconAnimationIntervalHandle);
|
|
37452
|
+
this.iconAnimationIntervalHandle = null;
|
|
37453
|
+
}
|
|
37454
|
+
const animation = this.props?.config?.settings?.layout?.iconAnimation;
|
|
37455
|
+
// If there is no animation configured, do not start the timer
|
|
37456
|
+
if (!animation || typeof animation === "string" && animation.trim().length === 0) {
|
|
37457
|
+
return;
|
|
37458
|
+
}
|
|
37459
|
+
const intervalSec = this.props.config?.settings?.layout?.iconAnimationInterval ?? 5;
|
|
37460
|
+
const intervalMs = Math.max(0, intervalSec) * 1000;
|
|
37461
|
+
if (intervalMs === 0) return;
|
|
37462
|
+
this.iconAnimationIntervalHandle = setInterval(() => {
|
|
37463
|
+
const buttonEl = this.chatToggleButtonRef?.current;
|
|
37464
|
+
if (!buttonEl) return;
|
|
37465
|
+
const container = buttonEl.querySelector(".iconAnimationContainer");
|
|
37466
|
+
if (!container) return;
|
|
37467
|
+
container.classList.remove("optionActive");
|
|
37468
|
+
// Force reflow to restart animation
|
|
37469
|
+
void container.getBoundingClientRect();
|
|
37470
|
+
container.classList.add("optionActive");
|
|
37471
|
+
}, intervalMs);
|
|
37279
37472
|
}
|
|
37280
37473
|
|
|
37281
37474
|
/**
|
|
@@ -37374,7 +37567,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37374
37567
|
const {
|
|
37375
37568
|
firstFocusable,
|
|
37376
37569
|
lastFocusable
|
|
37377
|
-
} = (0,
|
|
37570
|
+
} = (0,_utils_find_focusable__WEBPACK_IMPORTED_MODULE_43__/* ["default"] */ .A)(webchatWindowEl);
|
|
37378
37571
|
const chatToggleButton = this.chatToggleButtonRef?.current;
|
|
37379
37572
|
|
|
37380
37573
|
/**
|
|
@@ -37569,9 +37762,9 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37569
37762
|
enableConnectionStatusIndicator
|
|
37570
37763
|
}
|
|
37571
37764
|
} = config.settings;
|
|
37572
|
-
if (!config.active && !config.settings.embeddingConfiguration.connectivity.enabled || !config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig || config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,
|
|
37573
|
-
const isDisabled = config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,
|
|
37574
|
-
const isInforming = config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,
|
|
37765
|
+
if (!config.active && !config.settings.embeddingConfiguration.connectivity.enabled || !config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig || config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isHiddenOutOfBusinessHours */ .hN)(config.settings.businessHours) || (0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isHiddenDueToMaintenance */ .Hs)(config.settings) || (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isHiddenDueToConnectivity */ .VD)(config.settings, state.timedOut))) return null;
|
|
37766
|
+
const isDisabled = config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isDisabledDueToMaintenance */ .$6)(config.settings) || (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isDisabledOutOfBusinessHours */ .dt)(config.settings.businessHours) || (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isDisabledDueToConnectivity */ .l9)(config.settings, state.timedOut));
|
|
37767
|
+
const isInforming = config.isConfigLoaded && config.settings.embeddingConfiguration.awaitEndpointConfig && ((0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isInformingDueToMaintenance */ .iF)(config.settings) || (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isInformingOutOfBusinessHours */ .Gr)(config.settings.businessHours) || (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isInformingDueToConnectivity */ .u0)(config.settings, state.timedOut));
|
|
37575
37768
|
const showDisconnectOverlay = enableConnectionStatusIndicator && !connected && hadConnection;
|
|
37576
37769
|
const openChatAriaLabel = () => {
|
|
37577
37770
|
if (open) return config.settings.customTranslations?.ariaLabels?.closeChat ?? "Close chat";
|
|
@@ -37588,11 +37781,11 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37588
37781
|
}
|
|
37589
37782
|
};
|
|
37590
37783
|
const getDisabledMessage = () => {
|
|
37591
|
-
if (isDisabled && (0,
|
|
37784
|
+
if (isDisabled && (0,_webchat_helper_maintenance__WEBPACK_IMPORTED_MODULE_41__/* .isDisabledDueToMaintenance */ .$6)(this.props.config.settings)) {
|
|
37592
37785
|
return this.props.config.settings.maintenance.text || "This chat is currently disabled due to maintenance";
|
|
37593
|
-
} else if (isDisabled && (0,
|
|
37786
|
+
} else if (isDisabled && (0,_webchat_helper_businessHours__WEBPACK_IMPORTED_MODULE_42__/* .isDisabledOutOfBusinessHours */ .dt)(this.props.config.settings.businessHours)) {
|
|
37594
37787
|
return this.props.config.settings.maintenance.text || "This chat is disabled out of our business hours";
|
|
37595
|
-
} else if (isDisabled && (0,
|
|
37788
|
+
} else if (isDisabled && (0,_webchat_helper_connectivity__WEBPACK_IMPORTED_MODULE_40__/* .isDisabledDueToConnectivity */ .l9)(this.props.config.settings, this.state.timedOut)) {
|
|
37596
37789
|
return this.props.config.settings.embeddingConfiguration.connectivity.text || "This chat is disabled due to connectivity issues";
|
|
37597
37790
|
}
|
|
37598
37791
|
};
|
|
@@ -37608,7 +37801,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37608
37801
|
onClose();
|
|
37609
37802
|
this.chatToggleButtonRef.current?.focus();
|
|
37610
37803
|
};
|
|
37611
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
37804
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_emotion_react__WEBPACK_IMPORTED_MODULE_46__.a, {
|
|
37612
37805
|
theme: theme
|
|
37613
37806
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_WebchatWrapper__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .A, _extends({
|
|
37614
37807
|
"data-cognigy-webchat-root": true
|
|
@@ -37617,7 +37810,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37617
37810
|
"aria-label": chatRegionAriaLabel,
|
|
37618
37811
|
role: "region",
|
|
37619
37812
|
onKeyDown: this.handleKeydown
|
|
37620
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
37813
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_emotion_react__WEBPACK_IMPORTED_MODULE_46__.C, {
|
|
37621
37814
|
value: styleCache
|
|
37622
37815
|
}, open && (!this.props.config.settings.embeddingConfiguration.awaitEndpointConfig || this.props.config.settings.embeddingConfiguration.awaitEndpointConfig && this.props.config.isConfigLoaded) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_WebchatRoot__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, _extends({
|
|
37623
37816
|
"data-cognigy-webchat": true
|
|
@@ -37655,16 +37848,23 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37655
37848
|
ref: this.chatToggleButtonRef,
|
|
37656
37849
|
id: "webchatWindowToggleButton",
|
|
37657
37850
|
disabled: true
|
|
37658
|
-
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
37851
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_ChatIcon__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A, {
|
|
37852
|
+
config: config
|
|
37853
|
+
}))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_FAB__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .A, _extends({
|
|
37659
37854
|
"data-cognigy-webchat-toggle": true,
|
|
37660
37855
|
onClick: this.handleFabClick
|
|
37661
37856
|
}, webchatToggleProps, {
|
|
37662
37857
|
type: "button",
|
|
37663
|
-
className: "webchat-toggle-button",
|
|
37858
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_38___default()("webchat-toggle-button burst", config.settings?.layout?.iconAnimation),
|
|
37664
37859
|
id: "webchatWindowToggleButton",
|
|
37665
37860
|
"aria-label": openChatAriaLabel(),
|
|
37666
|
-
ref: this.chatToggleButtonRef
|
|
37667
|
-
|
|
37861
|
+
ref: this.chatToggleButtonRef,
|
|
37862
|
+
style: {
|
|
37863
|
+
"--icon-burst-duration": `${Math.max(0.2, 1 / Math.max(0.1, config.settings?.layout?.iconAnimationSpeed || 1))}s`
|
|
37864
|
+
}
|
|
37865
|
+
}), open ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_assets_collapse_20px_svg__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .A, null) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_ChatIcon__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .A, {
|
|
37866
|
+
config: config
|
|
37867
|
+
}), config.settings.unreadMessages.enableBadge ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(_presentational_Badge__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .A, {
|
|
37668
37868
|
_content: unseenMessages.length,
|
|
37669
37869
|
className: "webchat-unread-message-badge",
|
|
37670
37870
|
"aria-label": `${unseenMessages.length} ${config.settings.customTranslations?.ariaLabels?.unreadMessages ?? "unread messages"}`
|
|
@@ -37851,7 +38051,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37851
38051
|
const isChatOptionsButtonVisible = config.settings.chatOptions.enabled && showChatScreen;
|
|
37852
38052
|
const hideBackButton = showChatScreen && !isHomeScreenEnabled;
|
|
37853
38053
|
const showDeleteAllConversationButton = !!((config.settings.privacyNotice.enabled && this.props.hasAcceptedTerms || !config.settings.privacyNotice.enabled) && config.settings.homeScreen.previousConversations.enableDeleteAllConversations && showPrevConversations && Object.keys(this.props.prevConversations).length);
|
|
37854
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(RegularLayoutRoot, null, !isXAppOverlayOpen && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
38054
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(RegularLayoutRoot, null, !isXAppOverlayOpen && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_47__/* ["default"] */ .A, {
|
|
37855
38055
|
in: !!(!showEnabledHomeScreen || showInformationMessage),
|
|
37856
38056
|
timeout: 500,
|
|
37857
38057
|
classNames: "slide-in",
|
|
@@ -37880,7 +38080,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37880
38080
|
hideBackButton: hideBackButton,
|
|
37881
38081
|
showChatScreen: showChatScreen,
|
|
37882
38082
|
deleteIconColor: config.settings.customColors?.deleteAllConversationIconColor
|
|
37883
|
-
})), !isSecondaryView && isHomeScreenEnabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
38083
|
+
})), !isSecondaryView && isHomeScreenEnabled && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_47__/* ["default"] */ .A, {
|
|
37884
38084
|
in: !showHomeScreen,
|
|
37885
38085
|
timeout: 500,
|
|
37886
38086
|
classNames: "hidebackground"
|
|
@@ -37894,7 +38094,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37894
38094
|
config: config,
|
|
37895
38095
|
onEmitAnalytics: onEmitAnalytics,
|
|
37896
38096
|
onSendActionButtonMessage: this.handleSendActionButtonMessage
|
|
37897
|
-
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(
|
|
38097
|
+
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_47__/* ["default"] */ .A, {
|
|
37898
38098
|
in: !!(!showEnabledHomeScreen || showInformationMessage),
|
|
37899
38099
|
timeout: 500,
|
|
37900
38100
|
classNames: "slide-in",
|
|
@@ -37963,7 +38163,7 @@ class WebchatUI extends react__WEBPACK_IMPORTED_MODULE_0__["default"].PureCompon
|
|
|
37963
38163
|
|
|
37964
38164
|
// Find privacy message and remove it from the messages list (these message types are not displayed in the chat log).
|
|
37965
38165
|
// If we do not remove, it will cause the collatation of the first user message.
|
|
37966
|
-
const messagesExcludingPrivacyMessage = (0,
|
|
38166
|
+
const messagesExcludingPrivacyMessage = (0,_utils_filter_out_control_commands__WEBPACK_IMPORTED_MODULE_48__/* ["default"] */ .A)(messages, ["acceptPrivacyPolicy"]);
|
|
37967
38167
|
|
|
37968
38168
|
// Filter messages based on progressive rendering settings
|
|
37969
38169
|
const visibleMessages = progressiveMessageRendering ? messagesExcludingPrivacyMessage.filter(message => {
|
|
@@ -38516,6 +38716,41 @@ exports["default"] = _default;
|
|
|
38516
38716
|
|
|
38517
38717
|
/***/ }),
|
|
38518
38718
|
|
|
38719
|
+
/***/ 33941:
|
|
38720
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
38721
|
+
|
|
38722
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38723
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
38724
|
+
/* harmony export */ });
|
|
38725
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
38726
|
+
var _path;
|
|
38727
|
+
var _excluded = ["title", "titleId"];
|
|
38728
|
+
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); }
|
|
38729
|
+
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; }
|
|
38730
|
+
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; }
|
|
38731
|
+
|
|
38732
|
+
var SvgChatBubbleOutline3 = function SvgChatBubbleOutline3(_ref) {
|
|
38733
|
+
var title = _ref.title,
|
|
38734
|
+
titleId = _ref.titleId,
|
|
38735
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
38736
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
38737
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38738
|
+
width: 23,
|
|
38739
|
+
height: 23,
|
|
38740
|
+
viewBox: "0 0 23 23",
|
|
38741
|
+
"aria-labelledby": titleId
|
|
38742
|
+
}, props), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("title", {
|
|
38743
|
+
id: titleId
|
|
38744
|
+
}, title) : null, _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
38745
|
+
fill: "inherit",
|
|
38746
|
+
stroke: "transparent",
|
|
38747
|
+
d: "M21 11.375a9.625 9.625 0 1 0-18.08 4.603l.16.293-.076.324-.953 4.085 3.983-.99.336-.085.303.17A9.6 9.6 0 0 0 11.375 21 9.625 9.625 0 0 0 21 11.375Zm-8.458 1.458a.875.875 0 0 1 0 1.75H7.875a.875.875 0 1 1 0-1.75zm2.333-4.666a.875.875 0 0 1 0 1.75h-7a.875.875 0 1 1 0-1.75zm7.875 3.208c0 6.282-5.093 11.375-11.375 11.375-1.891 0-3.677-.463-5.248-1.282l-5.041 1.256a.875.875 0 0 1-1.063-1.047l1.203-5.161A11.3 11.3 0 0 1 0 11.375C0 5.093 5.093 0 11.375 0S22.75 5.093 22.75 11.375Z"
|
|
38748
|
+
})));
|
|
38749
|
+
};
|
|
38750
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgChatBubbleOutline3);
|
|
38751
|
+
|
|
38752
|
+
/***/ }),
|
|
38753
|
+
|
|
38519
38754
|
/***/ 34043:
|
|
38520
38755
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
38521
38756
|
|
|
@@ -43133,8 +43368,8 @@ const prevConversations = (state = getInitialState(), action) => {
|
|
|
43133
43368
|
},
|
|
43134
43369
|
transition: (0,_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .createTransition */ .eV)("background-color", "color", "fill"),
|
|
43135
43370
|
svg: {
|
|
43136
|
-
width:
|
|
43137
|
-
height:
|
|
43371
|
+
width: 25,
|
|
43372
|
+
height: 25
|
|
43138
43373
|
}
|
|
43139
43374
|
};
|
|
43140
43375
|
}));
|
|
@@ -132582,18 +132817,95 @@ const FAB = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)
|
|
|
132582
132817
|
backgroundImage: theme.primaryGradient,
|
|
132583
132818
|
color: theme.primaryContrastColor,
|
|
132584
132819
|
fill: theme.primaryContrastColor,
|
|
132820
|
+
stroke: theme.primaryContrastColor,
|
|
132585
132821
|
overflow: "visible",
|
|
132586
132822
|
boxShadow: theme.shadow,
|
|
132587
132823
|
borderRadius: "50%",
|
|
132588
132824
|
marginTop: theme.unitSize * 2,
|
|
132589
132825
|
"&.active, &:hover": {
|
|
132590
132826
|
backgroundImage: theme.primaryStrongGradient,
|
|
132591
|
-
fill: `${theme.primaryContrastColor} !important
|
|
132827
|
+
fill: `${theme.primaryContrastColor} !important`,
|
|
132828
|
+
stroke: `${theme.primaryContrastColor}`,
|
|
132829
|
+
color: `${theme.primaryContrastColor} !important`
|
|
132592
132830
|
},
|
|
132593
132831
|
"&:focus-visible": {
|
|
132594
132832
|
outline: `2px solid ${theme.primaryColorFocus}`,
|
|
132595
132833
|
outlineOffset: 2,
|
|
132596
132834
|
boxShadow: `0 0 0 4px ${theme.white}`
|
|
132835
|
+
},
|
|
132836
|
+
// Animation container defaults and keyframes
|
|
132837
|
+
"&.burst, &.pulse, &.swing": {
|
|
132838
|
+
["--icon-burst-duration"]: "0.8s",
|
|
132839
|
+
["--icon-bounce-amp"]: "10px",
|
|
132840
|
+
["--icon-swing-deg"]: "12deg",
|
|
132841
|
+
["--icon-pulse-scale"]: "1.08"
|
|
132842
|
+
},
|
|
132843
|
+
"&.burst.bounce .iconAnimationContainer.optionActive": {
|
|
132844
|
+
animationName: "bounceBurst",
|
|
132845
|
+
animationDuration: "var(--icon-burst-duration)",
|
|
132846
|
+
animationTimingFunction: "ease-in-out",
|
|
132847
|
+
animationIterationCount: 1,
|
|
132848
|
+
animationFillMode: "both"
|
|
132849
|
+
},
|
|
132850
|
+
"&.burst.swing .iconAnimationContainer.optionActive": {
|
|
132851
|
+
animationName: "swingBurst",
|
|
132852
|
+
animationDuration: "var(--icon-burst-duration)",
|
|
132853
|
+
animationTimingFunction: "ease-in-out",
|
|
132854
|
+
animationIterationCount: 1,
|
|
132855
|
+
animationFillMode: "both",
|
|
132856
|
+
transformOrigin: "left bottom"
|
|
132857
|
+
},
|
|
132858
|
+
"&.burst.pulse .iconAnimationContainer.optionActive": {
|
|
132859
|
+
animationName: "pulseBurst",
|
|
132860
|
+
animationDuration: "var(--icon-burst-duration)",
|
|
132861
|
+
animationTimingFunction: "ease-in-out",
|
|
132862
|
+
animationIterationCount: 1,
|
|
132863
|
+
animationFillMode: "both"
|
|
132864
|
+
},
|
|
132865
|
+
"@keyframes bounceBurst": {
|
|
132866
|
+
"0%": {
|
|
132867
|
+
transform: "translateY(0)"
|
|
132868
|
+
},
|
|
132869
|
+
"30%": {
|
|
132870
|
+
transform: "translateY(calc(-1 * var(--icon-bounce-amp)))"
|
|
132871
|
+
},
|
|
132872
|
+
"50%": {
|
|
132873
|
+
transform: "translateY(calc(-0.2 * var(--icon-bounce-amp)))"
|
|
132874
|
+
},
|
|
132875
|
+
"70%": {
|
|
132876
|
+
transform: "translateY(calc(-0.6 * var(--icon-bounce-amp)))"
|
|
132877
|
+
},
|
|
132878
|
+
"100%": {
|
|
132879
|
+
transform: "translateY(0)"
|
|
132880
|
+
}
|
|
132881
|
+
},
|
|
132882
|
+
"@keyframes swingBurst": {
|
|
132883
|
+
"0%": {
|
|
132884
|
+
transform: "rotate(0deg)"
|
|
132885
|
+
},
|
|
132886
|
+
"40%": {
|
|
132887
|
+
transform: "rotate(var(--icon-swing-deg))"
|
|
132888
|
+
},
|
|
132889
|
+
"70%": {
|
|
132890
|
+
transform: "rotate(calc(-1 * var(--icon-swing-deg))"
|
|
132891
|
+
},
|
|
132892
|
+
"100%": {
|
|
132893
|
+
transform: "rotate(0deg)"
|
|
132894
|
+
}
|
|
132895
|
+
},
|
|
132896
|
+
"@keyframes pulseBurst": {
|
|
132897
|
+
"0%": {
|
|
132898
|
+
transform: "scale(1)",
|
|
132899
|
+
opacity: 1
|
|
132900
|
+
},
|
|
132901
|
+
"50%": {
|
|
132902
|
+
transform: "scale(var(--icon-pulse-scale))",
|
|
132903
|
+
opacity: 0.9
|
|
132904
|
+
},
|
|
132905
|
+
"100%": {
|
|
132906
|
+
transform: "scale(1)",
|
|
132907
|
+
opacity: 1
|
|
132908
|
+
}
|
|
132597
132909
|
}
|
|
132598
132910
|
}));
|
|
132599
132911
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FAB);
|
|
@@ -148710,6 +149022,41 @@ function remarkParse(options) {
|
|
|
148710
149022
|
|
|
148711
149023
|
/***/ }),
|
|
148712
149024
|
|
|
149025
|
+
/***/ 79815:
|
|
149026
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
149027
|
+
|
|
149028
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
149029
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
149030
|
+
/* harmony export */ });
|
|
149031
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
149032
|
+
var _path;
|
|
149033
|
+
var _excluded = ["title", "titleId"];
|
|
149034
|
+
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); }
|
|
149035
|
+
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; }
|
|
149036
|
+
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; }
|
|
149037
|
+
|
|
149038
|
+
var SvgChatBubbleOutline1 = function SvgChatBubbleOutline1(_ref) {
|
|
149039
|
+
var title = _ref.title,
|
|
149040
|
+
titleId = _ref.titleId,
|
|
149041
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
149042
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", _extends({
|
|
149043
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
149044
|
+
width: 24,
|
|
149045
|
+
height: 24,
|
|
149046
|
+
"aria-hidden": "true",
|
|
149047
|
+
viewBox: "0 -960 960 960",
|
|
149048
|
+
"aria-labelledby": titleId
|
|
149049
|
+
}, props), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("title", {
|
|
149050
|
+
id: titleId
|
|
149051
|
+
}, title) : null, _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
149052
|
+
fill: "inherit",
|
|
149053
|
+
d: "M80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240zm126-240h594v-480H160v525zm-46 0v-480z"
|
|
149054
|
+
})));
|
|
149055
|
+
};
|
|
149056
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SvgChatBubbleOutline1);
|
|
149057
|
+
|
|
149058
|
+
/***/ }),
|
|
149059
|
+
|
|
148713
149060
|
/***/ 79976:
|
|
148714
149061
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
148715
149062
|
|
|
@@ -164224,7 +164571,8 @@ var SvgCollapse20Px = function SvgCollapse20Px(_ref) {
|
|
|
164224
164571
|
id: titleId
|
|
164225
164572
|
}, title) : null, _path || (_path = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("path", {
|
|
164226
164573
|
fillRule: "evenodd",
|
|
164227
|
-
|
|
164574
|
+
stroke: "transparent",
|
|
164575
|
+
d: "M1.687 5.302a1.25 1.25 0 0 1 1.762.135L10 13.08l6.551-7.643a1.25 1.25 0 1 1 1.898 1.627l-6.55 7.643a2.5 2.5 0 0 1-3.797 0L1.55 7.064a1.25 1.25 0 0 1 .136-1.762Z",
|
|
164228
164576
|
clipRule: "evenodd"
|
|
164229
164577
|
})));
|
|
164230
164578
|
};
|
|
@@ -167869,7 +168217,11 @@ const FABDisabled = (0,_emotion_styled__WEBPACK_IMPORTED_MODULE_0__/* ["default"
|
|
|
167869
168217
|
overflow: "visible",
|
|
167870
168218
|
boxShadow: theme.shadow,
|
|
167871
168219
|
borderRadius: "50%",
|
|
167872
|
-
marginTop: theme.unitSize * 2
|
|
168220
|
+
marginTop: theme.unitSize * 2,
|
|
168221
|
+
"&.active, &:hover": {
|
|
168222
|
+
color: `${theme.greyContrastColor} !important`,
|
|
168223
|
+
fill: `${theme.greyContrastColor} !important`
|
|
168224
|
+
}
|
|
167873
168225
|
}));
|
|
167874
168226
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FABDisabled);
|
|
167875
168227
|
|