# @openline-ai/openline-web-chat

> Openline Web Chat

Latest version **1.3.9** (published 2023-02-15) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @openline-ai/openline-web-chat
pnpm add @openline-ai/openline-web-chat
yarn add @openline-ai/openline-web-chat
bun add @openline-ai/openline-web-chat
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.9 |
| Published | 2023-02-15 |
| First published | 2022-12-09 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 5.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | openline-ai |
| Maintainers | mattbr0wn, edi-openline |

## Links

- npm: https://www.npmjs.com/package/@openline-ai/openline-web-chat
- Repository: https://github.com/openline-ai/openline-web-chat
- Homepage: https://github.com/openline-ai/openline-web-chat#readme
- Issues: https://github.com/openline-ai/openline-web-chat/issues
- npm.io page: https://npm.io/package/@openline-ai/openline-web-chat

## Dependencies (4)

- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) ^0.2.0
- [@fortawesome/fontawesome-svg-core](https://npm.io/package/@fortawesome/fontawesome-svg-core.md) ^6.2.1
- [@fortawesome/free-solid-svg-icons](https://npm.io/package/@fortawesome/free-solid-svg-icons.md) ^6.2.1

## Recent versions

- 1.3.9 (latest) — 2023-02-15
- 1.3.8 — 2023-02-15
- 1.3.7 — 2023-01-09
- 1.3.6 — 2023-01-09
- 1.3.5 — 2023-01-09
- 1.3.4 — 2023-01-09
- 1.3.3 — 2023-01-06
- 1.3.1 — 2023-01-05
- 1.3.0 — 2023-01-04
- 1.2.0 — 2022-12-15
- 1.1.0 — 2022-12-09

## README

# openline-web-chat

## Select (and install) backend
There are 2 options to run the backend of the webchat:

### 1. Use Openline's Oasis servers (recommended).

We recommend using Openline Cloud as it is overall easier to setup and use.

To do this 

### 2. Install your own Oasis using the Openline CLI

1. Install the package to your project:
```
yarn add @openline-ai/openline-web-chat
```
2. Install and run [Openline Oasis](https://github.com/openline-ai/openline-oasis) via the [Openline CLI](https://www.openline.ai/docs/guides/installing-customer-os)

## Install Webchat to your application

### Imports

```javascript
// CSS
import '@openline-ai/openline-web-chat/dist/esm/index.css'
```

### Webchat Component

```javascript
<WebChat apikey="get-this-from-openline-or-run-oasis" 
         httpServerPath="get-this-from-openline-or-run-oasis" 
         wsServerPath="get-this-from-openline-or-run-oasis" 
         trackerEnabled={true} 
         trackerAppId="get-this-from-openline-or-run-oasis" 
         trackerId="get-this-from-openline-or-run-oasis" 
         trackerCollectorUrl="get-this-from-openline-or-run-oasis" 
         trackerBufferSize="1" 
         trackerMinimumVisitLength="10" 
         trackerHeartbeatDelay="10"
         userEmail="populate this if you know the user and want to skip the provide email step"
    ></WebChat>
```

### Docusaurus and polyfills
webpack >= 5 does not include polyfills. 
If using docusaurus for building, polyfills must be added as a plugin:

Install docusaurus-node-polyfills:
```bash
npm install docusaurus-node-polyfills --save-dev
or
yarn add docusaurus-node-polyfills --dev
```

Include the pluging in the docusaurus.config.js
```javascript
plugins: ['docusaurus-node-polyfills']
```

## Storybook

To test the component outside of your application you can see it in Storybook, use Node.js version 16.16 and run the following command:

```yarn storybook```

---
_Source: https://npm.io/package/@openline-ai/openline-web-chat · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
