bi-sdk-react 0.0.72 → 0.0.74
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/es/js/bi-sdk.es.js +46 -46
- package/dist/types/components/panel/PaneHeader.d.ts +2 -2
- package/dist/types/components/plugins/@antd/items/CapsuleRender.d.ts +1 -1
- package/dist/types/components/typing.d.ts +22 -1
- package/dist/umd/js/bi-sdk.umd.min.js +34 -34
- package/package.json +1 -1
- package/src/components/icon/IconFont.tsx +1 -1
- package/src/components/panel/ComponentPanel.tsx +564 -13
- package/src/components/panel/PaneHeader.tsx +14 -10
- package/src/components/plugins/@antd/index.ts +7 -0
- package/src/components/plugins/@antd/items/CapsuleRender.tsx +4 -2
- package/src/components/plugins/@antd/items/CheckboxRender.tsx +3 -1
- package/src/components/plugins/@antd/items/DatePickerRender.tsx +6 -2
- package/src/components/plugins/@antd/items/InputNumberRender.tsx +3 -0
- package/src/components/plugins/@antd/items/InputRender.tsx +3 -0
- package/src/components/plugins/@antd/items/SelectRender.tsx +3 -0
- package/src/components/plugins/@antd/items/SwitchRender.tsx +3 -0
- package/src/components/typing.ts +35 -5
- package/src/example.tsx +33 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { MouseEventHandler } from "react";
|
|
1
|
+
import React, { Key, MouseEventHandler } from "react";
|
|
2
2
|
export type ChatRequestType = {
|
|
3
3
|
message: string;
|
|
4
4
|
files?: {
|
|
@@ -69,11 +69,32 @@ export type ChatMessageType = {
|
|
|
69
69
|
createdAt: string;
|
|
70
70
|
sending?: boolean;
|
|
71
71
|
};
|
|
72
|
+
export type ExampleItemType = {
|
|
73
|
+
id: Key;
|
|
74
|
+
name: string;
|
|
75
|
+
description?: string | null;
|
|
76
|
+
cover?: string;
|
|
77
|
+
item: SchemaItemType;
|
|
78
|
+
};
|
|
79
|
+
export type TemplateItemType = {
|
|
80
|
+
id: Key;
|
|
81
|
+
name: string;
|
|
82
|
+
description?: string | null;
|
|
83
|
+
cover?: string;
|
|
84
|
+
schema: PageSchema;
|
|
85
|
+
};
|
|
86
|
+
export type PaginationType<T> = {
|
|
87
|
+
total: number;
|
|
88
|
+
list: T[];
|
|
89
|
+
};
|
|
72
90
|
export type FetchType = {
|
|
73
91
|
upload?: (file: File) => Promise<{
|
|
74
92
|
id: string;
|
|
75
93
|
name: string;
|
|
76
94
|
}>;
|
|
95
|
+
exampleList?: (current?: number, size?: number, keyword?: string) => Promise<ExampleItemType[] | PaginationType<ExampleItemType>>;
|
|
96
|
+
templateList?: (current?: number, size?: number, keyword?: string) => Promise<Omit<TemplateItemType, "schema">[] | PaginationType<Omit<TemplateItemType, "schema">>>;
|
|
97
|
+
templateDetail?: (id: Key) => Promise<TemplateItemType>;
|
|
77
98
|
ai?: {
|
|
78
99
|
chat: (bizType: string, bizId: string, conversationId: string | null, request: ChatRequestType) => Promise<ChatResponseType>;
|
|
79
100
|
conversationList: (bizType: string, bizId: string) => Promise<ChatConversationType[]>;
|