# seatable-ai-ui-component

> > The seatable AI UI component.

Latest version **0.0.28** (published 2024-03-21) · 0 weekly downloads

## Install

```sh
npm install seatable-ai-ui-component
pnpm add seatable-ai-ui-component
yarn add seatable-ai-ui-component
bun add seatable-ai-ui-component
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.28 |
| Published | 2024-03-21 |
| First published | 2024-03-14 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 17 |
| Unpacked size | 695.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | seafile |

## Links

- npm: https://www.npmjs.com/package/seatable-ai-ui-component
- npm.io page: https://npm.io/package/seatable-ai-ui-component

## Dependencies (17)

- [dayjs](https://npm.io/package/dayjs.md) 1.10.7
- [cookie](https://npm.io/package/cookie.md) ^0.3.1
- [invariant](https://npm.io/package/invariant.md) ^2.2.2
- [is-hotkey](https://npm.io/package/is-hotkey.md) 0.2.0
- [classnames](https://npm.io/package/classnames.md) ^2.3.2
- [reactstrap](https://npm.io/package/reactstrap.md) 8.9.0
- [escape-html](https://npm.io/package/escape-html.md) ^1.0.3
- [object-keys](https://npm.io/package/object-keys.md) ^1.0.11
- [svgo-loader](https://npm.io/package/svgo-loader.md) ^3.0.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [react-select](https://npm.io/package/react-select.md) 5.7.0
- [shallowequal](https://npm.io/package/shallowequal.md) ^1.1.0
- [react-cookies](https://npm.io/package/react-cookies.md) 0.1.1
- [path-browserify](https://npm.io/package/path-browserify.md) ^1.0.1
- [svg-sprite-loader](https://npm.io/package/svg-sprite-loader.md) ^6.0.11
- [intl-messageformat](https://npm.io/package/intl-messageformat.md) ^7.8.4
- [react-sweet-progress](https://npm.io/package/react-sweet-progress.md) ^1.1.2

## Recent versions

- 0.0.28 (latest) — 2024-03-21
- 0.0.27 — 2024-03-20
- 0.0.26 — 2024-03-20
- 0.0.25 — 2024-03-19
- 0.0.24 — 2024-03-19
- 0.0.23 — 2024-03-19
- 0.0.22 — 2024-03-19
- 0.0.21 — 2024-03-19
- 0.0.20 — 2024-03-19
- 0.0.19 — 2024-03-19
- 0.0.18 — 2024-03-19
- 0.0.17 — 2024-03-19
- 0.0.16 — 2024-03-19
- 0.0.15 — 2024-03-19
- 0.0.14 — 2024-03-18
- … 13 more at https://npm.io/package/seatable-ai-ui-component/versions

## README

# Seatable AI UI component
> The seatable AI UI component.

## 查看demo
  1. 下载源码并进入文件夹
  ```
  git clone git@gitlab.seafile.top:seatable-extends/seatable-ai-ui-component.git
  cd sea-chart
  ```

  2. 安装依赖
  ```
  npm install
  ```
  
  3. 添加配置项
  * 切换目录：`cd example`
  * 复制一份：'setting.local.dist.js', 并重命名为 'setting.local.js'
  * 修改 pluginConfig, 该配置想同插件开发的配置项一样，请参照插件开发文档即可
  * 修改 appConfig, 该配置项同其他应用的配置项一样，请参照其他应用的配置项进行配置即可 

  4. 启动
  ```
  npm start
  ```

  5. 在浏览器地址栏中输入：127.0.0.1:9000，即可访问该组件库的 demo 内容

  **注意**：自定义API 的demo,目前不支持修改参数同步更新视图

## 使用
  1. 安装 seatable-ai-ui-component
  ```
    npm install seatable-ai-ui-component
  ```

  2. 使用
  ```
    <!-- app.jsx -->
    import React from 'react';
    import SeatableAI from 'seatable-ai-ui-component';
    import Layout from 'xxx';

    const APP = () => {
        return (
            <SeatableAI isDevelopment={isDevelopment}> // 加载 assistants
                <Layout />
            </SeatableAI>
        );
    }

    export default APP;
  ```

  ```
    <!-- layout.jsx -->
    import React from 'react';
    import { Chat, Assistants, useAssistants } from 'seatable-ai-ui-component';

    const Layout = () => {
      const { usingAssistant } = useAssistants();

      if (usingAssistant) {
        return (<Chat usingAssistant={usingAssistant} />);
      }

      return (
        <Assistants readonly /> // readonly: 只读下不展示添加按钮
      );
    };
  ```

  3. 具体应用请参照相关 demo

## 开发
  依据业务逻辑新编写组件

---
_Source: https://npm.io/package/seatable-ai-ui-component · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
