@xapp/chat-widget 1.41.1 → 1.41.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3021,6 +3021,10 @@ function getPermissionResponse(botResponse, now) {
3021
3021
  };
3022
3022
  }
3023
3023
 
3024
+ /**
3025
+ * Default configuration messages
3026
+ * @returns
3027
+ */
3024
3028
  function getConfigurableMessages() {
3025
3029
  return {
3026
3030
  items: [
@@ -3433,7 +3437,7 @@ var StentorDirectChat = /** @class */ (function () {
3433
3437
  responseMessage.msg = {
3434
3438
  //eslint-disable-next-line
3435
3439
  //@ts-ignore
3436
- text: (botResponse === null || botResponse === void 0 ? void 0 : botResponse.hasOwnProperty("errorText")) ? botResponse.errorText : "Oops. The bot doesn't respond... Try later!"
3440
+ text: (botResponse === null || botResponse === void 0 ? void 0 : botResponse.hasOwnProperty("errorText")) ? botResponse.errorText : "The assistant is not responding right now. Please close the widget and open it again."
3437
3441
  };
3438
3442
  }
3439
3443
  this.stopTyping();
@@ -30842,7 +30846,10 @@ var ChatWidgetWrapper = function (props) {
30842
30846
  }, [connection, rawConfig]);
30843
30847
  var token = reactRedux.useSelector(function (state) { return state.connection.token; });
30844
30848
  var options = React$1.useMemo(function () {
30845
- var _a;
30849
+ var configurableMessages = getConfigurableMessages();
30850
+ if (rawConfig.configurableMessages && Array.isArray(rawConfig.configurableMessages.items) && rawConfig.configurableMessages.items.length > 0) {
30851
+ configurableMessages = rawConfig.configurableMessages;
30852
+ }
30846
30853
  return {
30847
30854
  token: token,
30848
30855
  bot: {
@@ -30850,7 +30857,7 @@ var ChatWidgetWrapper = function (props) {
30850
30857
  displayName: rawConfig.botName,
30851
30858
  avatarPath: rawConfig.avatarUrl
30852
30859
  },
30853
- configurableMessages: (_a = rawConfig.configurableMessages) !== null && _a !== void 0 ? _a : getConfigurableMessages()
30860
+ configurableMessages: configurableMessages
30854
30861
  };
30855
30862
  }, [token, rawConfig]);
30856
30863
  var chatServer = useChatServer(connection, options);