@glodon-aiot/agent-cli-ui 3.3.5-alpha.26 → 3.3.5-alpha.28

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.
@@ -3,7 +3,7 @@ import { AgentClientProps } from './types';
3
3
  import { Session } from '@glodon-aiot/bot-client-sdk';
4
4
  import { IKnowledge, ISessionParams } from '@glodon-aiot/apis';
5
5
  export interface AgentClientRefProps {
6
- sessionCreate: (params: ISessionParams & {
6
+ createSession: (params: ISessionParams & {
7
7
  knowledges?: IKnowledge[];
8
8
  }) => Promise<Session> | undefined;
9
9
  getSessionList: () => Promise<Session[]> | undefined;
@@ -1,8 +1,10 @@
1
1
  import { default as React } from 'react';
2
2
  import { IHistory } from '@glodon-aiot/apis';
3
+ import { MarkdownProps } from '@glodon-aiot/react-components/dist/src/components/Markdown';
3
4
  interface SessionReferProps {
4
5
  history?: IHistory;
5
6
  docViewerUrl?: string;
7
+ markdown?: Partial<MarkdownProps>;
6
8
  }
7
9
  declare const SessionRefer: React.FC<SessionReferProps>;
8
10
  export default SessionRefer;
@@ -8,7 +8,7 @@ interface DialogProps {
8
8
  sessionId?: string;
9
9
  }
10
10
  export interface DialogRefProps {
11
- sessionCreate: (params: ISessionParams & {
11
+ createSession: (params: ISessionParams & {
12
12
  knowledges?: IKnowledge[];
13
13
  }) => Promise<Session> | undefined;
14
14
  getSessionList: () => Promise<Session[]> | undefined;
@@ -1,7 +1,8 @@
1
- import { FC } from 'react';
1
+ import { default as React, FC } from 'react';
2
2
  interface FooterProp {
3
3
  className?: string;
4
4
  tips?: HTMLDivElement | string | boolean;
5
+ children?: React.ReactNode;
5
6
  }
6
7
  declare const Footer: FC<FooterProp>;
7
8
  export default Footer;
@@ -1,7 +1,8 @@
1
- import { FC } from 'react';
1
+ import { default as React, FC } from 'react';
2
2
  interface GreetingProps {
3
3
  icon: string;
4
4
  text: string;
5
+ children?: React.ReactNode;
5
6
  }
6
7
  declare const Greeting: FC<GreetingProps>;
7
8
  export default Greeting;
@@ -1,6 +1,7 @@
1
- import { FC, ReactNode } from 'react';
1
+ import { default as React, FC, ReactNode } from 'react';
2
2
  interface HeaderProps {
3
3
  logo?: string | ReactNode;
4
+ children?: React.ReactNode;
4
5
  }
5
6
  declare const Header: FC<HeaderProps>;
6
7
  export default Header;
@@ -38,7 +38,7 @@ export default class AgentClientUI {
38
38
  disable(): void;
39
39
  enable(): void;
40
40
  getSessionList(): Promise<Session[]>;
41
- sessionCreate(params?: ISessionParams & {
41
+ createSession(params?: ISessionParams & {
42
42
  knowledges?: IKnowledge[];
43
43
  }): Promise<Session>;
44
44
  createBotClientSDK(): Promise<BotClient>;
@@ -147,7 +147,7 @@ export interface AgentClientDefaultProps {
147
147
  greeting?: string;
148
148
  history?: boolean;
149
149
  service?: BotClientApi;
150
- popupContainer?: React.RefObject<HTMLDivElement>;
150
+ popupContainer?: React.RefObject<HTMLDivElement | null>;
151
151
  token?: string;
152
152
  debug?: boolean;
153
153
  plugins?: AgentPluginMap;
@@ -216,7 +216,7 @@ export interface InitalData extends AgentClientUIConfig {
216
216
  };
217
217
  bodyStyle?: CSSProperties;
218
218
  getSessionList?: any;
219
- sessionCreate?: any;
219
+ createSession?: any;
220
220
  }
221
221
  export interface AgentClientProps extends AgentClientDefaultProps {
222
222
  service: BotClientApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glodon-aiot/agent-cli-ui",
3
- "version": "3.3.5-alpha.26",
3
+ "version": "3.3.5-alpha.28",
4
4
  "module": "./dist/es/index.mjs",
5
5
  "main": "./dist/lib/index.js",
6
6
  "typings": "./dist/src/index.d.ts",
@@ -30,28 +30,27 @@
30
30
  "commit": "cz"
31
31
  },
32
32
  "peerDependencies": {
33
+ "antd": ">=4.0.0",
34
+ "react": ">=16.9.0",
35
+ "react-dom": ">=16.9.0",
33
36
  "webpack": "*"
34
37
  },
35
38
  "dependencies": {
36
39
  "@ant-design/icons": "^5.3.4",
37
- "@glodon-aiot/apis": "^3.3.5-alpha.26",
38
- "@glodon-aiot/bot-client-sdk": "^3.3.5-alpha.26",
40
+ "@glodon-aiot/apis": "^3.3.5-alpha.28",
41
+ "@glodon-aiot/bot-client-sdk": "^3.3.5-alpha.28",
39
42
  "@matejmazur/react-mathjax": "^0.1.10",
40
43
  "@react-pdf-viewer/core": "^3.12.0",
41
44
  "@react-pdf-viewer/default-layout": "^3.12.0",
42
45
  "@react-pdf-viewer/locales": "^1.0.0",
43
46
  "@react-pdf-viewer/toolbar": "^3.12.0",
44
47
  "ahooks": "^3.8.5",
45
- "antd": "4.x",
46
48
  "axios": "0.24.0",
47
49
  "classnames": "^2.5.1",
48
50
  "copy-to-clipboard": "^3.3.3",
49
51
  "dayjs": "^1.11.13",
50
52
  "lodash": "^4.17.21",
51
- "react": "^17.0.2",
52
- "react-dom": "^17.0.2",
53
53
  "react-infinite-scroll-component": "^6.1.0",
54
- "react-mathjax": "^1.0.1",
55
54
  "react-quill": "^2.0.0",
56
55
  "react-resizable": "^3.0.5",
57
56
  "uuid": "^11.1.0"
@@ -73,12 +72,12 @@
73
72
  "@storybook/react": "6.4.9",
74
73
  "@storybook/testing-library": "^0.0.13",
75
74
  "@types/lodash": "^4",
76
- "@types/react": "^17.0.44",
77
- "@types/react-dom": "^17.0.17",
78
- "@types/react-mathjax": "^1",
75
+ "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0",
76
+ "@types/react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0",
79
77
  "@typescript-eslint/eslint-plugin": "^5.35.1",
80
78
  "@typescript-eslint/parser": "^5.35.1",
81
79
  "@vitejs/plugin-react": "^3.1.0",
80
+ "antd": "^4.24.0",
82
81
  "babel-loader": "^8.3.0",
83
82
  "babel-plugin-import": "^1.13.8",
84
83
  "commitizen": "^4.3.0",
@@ -99,6 +98,8 @@
99
98
  "lint-staged": ">=10",
100
99
  "postcss-loader": "^7.2.4",
101
100
  "prettier": "2.7.1",
101
+ "react": "^17.0.2",
102
+ "react-dom": "^17.0.2",
102
103
  "require-from-string": "^2.0.2",
103
104
  "rollup-plugin-visualizer": "^6.0.1",
104
105
  "storybook-less-loader": "^0.1.0",