Skip to main content

v0.14.0

0.14.0 - 2020-10-01

Added

  • @botonic/cli

    • New bot template dynamo using Botonic dynamoDB plugin from a JS bot.
  • @botonic/react

    • Improved behavior when end user messages are lost due to connection issues. Missed inputs will be resent when connection is regained.
    • End user messages will be displayed with less opacity until they are correctly delivered to the server.
    • Added classNames to blob messages by default, under the following format: {type}-{from} {customTypeName} e.g.: Text messages from user -> text-user e.g.: Custom messages from bot -> custom-bot my-custom-message-name
    • Passing mobileStyle in webchat/index.jsis now allowed.
    • Added arrow buttons for better interaction with Webchat Carousels. They can be customized.
    • Disabling timestamps in the custom Messages using the enableTimestamps prop is now allowed.
    • Defined where to store the botonicState using the variable storage.
    • The methods openCoverComponent, closeCoverComponent and toggleCoverComponent are available in the browser, through the Botonic object, so that the coverComponent can be shown/hidden manually.
  • @botonic/plugin-contentful

    • Decorator for Contentful that can distribute the delivery requests amongst different spaces/environments.
    • Added a new tool to modify the locales of Contentful spaces exported as json file with "contentful space export". The tool is able to change the name of a locale without altering the contents and to remove unwanted locales.
    • Added a tool to duplicate the value of reference fields into a new locale. Reference fields (assets or links to other contents) will typically be the same for all locales, but not always. So we initially link them all to the same target for all locales. The tool is useful to migrate a space where fallback locales are used to another where locales have no fallback.
    • The NLP package now supports locales whose name include the country (eg. es_ES).
    • Added an option for Contentful plugin to be able to change the name of the locale when sent to Contentful.
    • Added logCall flag to contentfulOptions in order to log creation configuration, as well as all calls performed to the CMS.
    • Added class ContentsValidator, which validates that all contents of a locale can be correctly delivered.
    • Added NLP support for Turkish.
    • Added NLP support for Italian.
    • Added NLP support for French.

Changed

  • Project

    • Upgraded typescript to 4.0.2.
    • Upgraded eslint plugins and fixed new warnings.
    • Improved documentation and reestructure.
  • @botonic/cli

    • Improved index.d.ts definitions.
    • Breaking change: Added /webpack-entries to every template to ensure that Webpack's tree-shaking is done and modified webpack.config.js as a consequence. This reduces the bundle sizes of every bot. From developers upgrading their projects from version 0.13.0 or below the following changes will be necessary:
      1. Create a new directory called webpack-entries under bot project's root folder. Copy dev-entry.js, node-entry.js, webchat-entry.js and webviews-entry.js inside. You can find them here.
      2. Modify the following lines in webpack.config.js:
      • In botonicDevConfig modify the line for entry to be: path.resolve('webpack-entries', 'dev-entry.js'),
      • In botonicWebchatConfig modify the line for entry to be: path.resolve('webpack-entries', 'webchat-entry.js'),
      • In botonicWebviewsConfig modify the line for entry to be: path.resolve('webpack-entries', 'webviews-entry.js'),
      • In botonicServerConfig modify the line for entry to be: path.resolve('webpack-entries', 'node-entry.js'),
  • @botonic/react

    • Refactored timestamps. They can be enabled by setting theme.message.timestamps.enable to true. (Default format will be as follows: 29 Jun, 12:40:07). The content can be formatted by defining a function under theme.message.timestamps.format which returns a string with the formatted date and their styles under theme.message.timestamps.style.
    • Improved index.d.ts definitions.

Fixed

  • @botonic/core

    • Added the export of getAvailableAgentsByQueue, which was not accessible.
  • @botonic/react

    • Removed moment dependency to reduce bundle size.
    • Closed PersistentMenu automatically when the end user clicks outside.
    • Fixed webchat properties not being properly read by deep merging properties.
    • Disabled text input when CoverComponentis shown.
    • Added missing animationsEnabled prop.
    • Now Custom Message Types can be used together with the Reply component.
    • Deactivated markdown in webchat when viewing messages using WhatsApp provider.
    • Sending messages with only spaces is now avoided.
    • Renamed theme property hoverText to hoverTextColor in button.jsx so that changing the text color of a button on hover can work.
  • @botonic/plugin-contentful

    • Fixed bug in Contentful Schedule, where schedule was miscalculating around midnight. It was not taking the timezone offset into account to calculate the weekday.