bi-sdk-react 0.0.1

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.
Files changed (146) hide show
  1. package/dist/es/css/bi-sdk.css +1 -0
  2. package/dist/es/js/bi-sdk.es.js +795 -0
  3. package/dist/es/js/bi-sdk.es.js.LICENSE.txt +9 -0
  4. package/dist/types/components/PageDesigner.d.ts +10 -0
  5. package/dist/types/components/context/DesignerContext.d.ts +15 -0
  6. package/dist/types/components/context/EnvContext.d.ts +15 -0
  7. package/dist/types/components/dnd/DropContainer.d.ts +21 -0
  8. package/dist/types/components/example.d.ts +225 -0
  9. package/dist/types/components/hooks/datasource.d.ts +1 -0
  10. package/dist/types/components/hooks/useDeepCompareEffect.d.ts +1 -0
  11. package/dist/types/components/icon/IconFont.d.ts +6 -0
  12. package/dist/types/components/index.d.ts +10 -0
  13. package/dist/types/components/layout/PageCanvas.d.ts +6 -0
  14. package/dist/types/components/layout/PageItem.d.ts +27 -0
  15. package/dist/types/components/panel/AiPanel.d.ts +8 -0
  16. package/dist/types/components/panel/CascadePanel.d.ts +2 -0
  17. package/dist/types/components/panel/ChatInput.d.ts +28 -0
  18. package/dist/types/components/panel/CodePanel.d.ts +2 -0
  19. package/dist/types/components/panel/ComponentPanel.d.ts +2 -0
  20. package/dist/types/components/panel/DatasourcePanel.d.ts +2 -0
  21. package/dist/types/components/panel/LayerPanel.d.ts +2 -0
  22. package/dist/types/components/panel/PaneHeader.d.ts +6 -0
  23. package/dist/types/components/panel/PropertiesPanel.d.ts +2 -0
  24. package/dist/types/components/panel/ScriptPanel.d.ts +2 -0
  25. package/dist/types/components/panel/VariablesPanel.d.ts +2 -0
  26. package/dist/types/components/panel/index.d.ts +9 -0
  27. package/dist/types/components/plugins/@antd/index.d.ts +22 -0
  28. package/dist/types/components/plugins/@antd/item-props/ButtonProps.d.ts +8 -0
  29. package/dist/types/components/plugins/@antd/item-props/CapsuleProps.d.ts +13 -0
  30. package/dist/types/components/plugins/@antd/item-props/CardProps.d.ts +8 -0
  31. package/dist/types/components/plugins/@antd/item-props/CheckboxProps.d.ts +13 -0
  32. package/dist/types/components/plugins/@antd/item-props/ColProps.d.ts +12 -0
  33. package/dist/types/components/plugins/@antd/item-props/DatePickerProps.d.ts +8 -0
  34. package/dist/types/components/plugins/@antd/item-props/EchartsProps.d.ts +6 -0
  35. package/dist/types/components/plugins/@antd/item-props/HtmlProps.d.ts +6 -0
  36. package/dist/types/components/plugins/@antd/item-props/ImageProps.d.ts +10 -0
  37. package/dist/types/components/plugins/@antd/item-props/InputNumberProps.d.ts +9 -0
  38. package/dist/types/components/plugins/@antd/item-props/InputProps.d.ts +10 -0
  39. package/dist/types/components/plugins/@antd/item-props/ListProps.d.ts +10 -0
  40. package/dist/types/components/plugins/@antd/item-props/PageHeaderProps.d.ts +7 -0
  41. package/dist/types/components/plugins/@antd/item-props/RowProps.d.ts +6 -0
  42. package/dist/types/components/plugins/@antd/item-props/SelectProps.d.ts +16 -0
  43. package/dist/types/components/plugins/@antd/item-props/SpaceProps.d.ts +7 -0
  44. package/dist/types/components/plugins/@antd/item-props/SwitchProps.d.ts +6 -0
  45. package/dist/types/components/plugins/@antd/item-props/TableProps.d.ts +15 -0
  46. package/dist/types/components/plugins/@antd/item-props/TextProps.d.ts +6 -0
  47. package/dist/types/components/plugins/@antd/item-props/index.d.ts +19 -0
  48. package/dist/types/components/plugins/@antd/item-props/types.d.ts +5 -0
  49. package/dist/types/components/plugins/@antd/items/ButtonRender.d.ts +14 -0
  50. package/dist/types/components/plugins/@antd/items/CapsuleRender.d.ts +14 -0
  51. package/dist/types/components/plugins/@antd/items/CardRender.d.ts +12 -0
  52. package/dist/types/components/plugins/@antd/items/CheckboxRender.d.ts +14 -0
  53. package/dist/types/components/plugins/@antd/items/ColRender.d.ts +13 -0
  54. package/dist/types/components/plugins/@antd/items/DatePickerRender.d.ts +14 -0
  55. package/dist/types/components/plugins/@antd/items/EchartsRender.d.ts +10 -0
  56. package/dist/types/components/plugins/@antd/items/HtmlRender.d.ts +20 -0
  57. package/dist/types/components/plugins/@antd/items/ImageRender.d.ts +10 -0
  58. package/dist/types/components/plugins/@antd/items/InputNumberRender.d.ts +17 -0
  59. package/dist/types/components/plugins/@antd/items/InputRender.d.ts +17 -0
  60. package/dist/types/components/plugins/@antd/items/ListRender.d.ts +11 -0
  61. package/dist/types/components/plugins/@antd/items/PageHeaderRender.d.ts +8 -0
  62. package/dist/types/components/plugins/@antd/items/RowRender.d.ts +13 -0
  63. package/dist/types/components/plugins/@antd/items/SelectRender.d.ts +18 -0
  64. package/dist/types/components/plugins/@antd/items/SpaceRender.d.ts +10 -0
  65. package/dist/types/components/plugins/@antd/items/SwitchRender.d.ts +14 -0
  66. package/dist/types/components/plugins/@antd/items/TableRender.d.ts +12 -0
  67. package/dist/types/components/plugins/@antd/items/TextRender.d.ts +9 -0
  68. package/dist/types/components/plugins/@antd/items/index.d.ts +19 -0
  69. package/dist/types/components/typing.d.ts +80 -0
  70. package/dist/types/components/utils.d.ts +9 -0
  71. package/dist/types/example.d.ts +2 -0
  72. package/dist/types/index.d.ts +1 -0
  73. package/dist/umd/css/bi-sdk.css +1 -0
  74. package/dist/umd/js/bi-sdk.umd.min.js +795 -0
  75. package/dist/umd/js/bi-sdk.umd.min.js.LICENSE.txt +9 -0
  76. package/package.json +52 -0
  77. package/src/components/PageDesigner.tsx +509 -0
  78. package/src/components/context/DesignerContext.tsx +71 -0
  79. package/src/components/context/EnvContext.tsx +42 -0
  80. package/src/components/dnd/DropContainer.tsx +474 -0
  81. package/src/components/example.ts +577 -0
  82. package/src/components/hooks/datasource.ts +23 -0
  83. package/src/components/hooks/useDeepCompareEffect.ts +12 -0
  84. package/src/components/icon/IconFont.tsx +16 -0
  85. package/src/components/index.ts +29 -0
  86. package/src/components/layout/PageCanvas.tsx +145 -0
  87. package/src/components/layout/PageItem.tsx +182 -0
  88. package/src/components/panel/AiPanel.tsx +116 -0
  89. package/src/components/panel/CascadePanel.tsx +163 -0
  90. package/src/components/panel/ChatInput.tsx +550 -0
  91. package/src/components/panel/CodePanel.tsx +48 -0
  92. package/src/components/panel/ComponentPanel.tsx +119 -0
  93. package/src/components/panel/DatasourcePanel.tsx +419 -0
  94. package/src/components/panel/LayerPanel.tsx +238 -0
  95. package/src/components/panel/PaneHeader.tsx +34 -0
  96. package/src/components/panel/PropertiesPanel.tsx +394 -0
  97. package/src/components/panel/ScriptPanel.tsx +175 -0
  98. package/src/components/panel/VariablesPanel.tsx +153 -0
  99. package/src/components/panel/index.ts +9 -0
  100. package/src/components/plugins/@antd/index.ts +445 -0
  101. package/src/components/plugins/@antd/item-props/ButtonProps.tsx +91 -0
  102. package/src/components/plugins/@antd/item-props/CapsuleProps.tsx +102 -0
  103. package/src/components/plugins/@antd/item-props/CardProps.tsx +58 -0
  104. package/src/components/plugins/@antd/item-props/CheckboxProps.tsx +75 -0
  105. package/src/components/plugins/@antd/item-props/ColProps.tsx +43 -0
  106. package/src/components/plugins/@antd/item-props/DatePickerProps.tsx +72 -0
  107. package/src/components/plugins/@antd/item-props/EchartsProps.tsx +35 -0
  108. package/src/components/plugins/@antd/item-props/HtmlProps.tsx +61 -0
  109. package/src/components/plugins/@antd/item-props/ImageProps.tsx +43 -0
  110. package/src/components/plugins/@antd/item-props/InputNumberProps.tsx +18 -0
  111. package/src/components/plugins/@antd/item-props/InputProps.tsx +89 -0
  112. package/src/components/plugins/@antd/item-props/ListProps.tsx +69 -0
  113. package/src/components/plugins/@antd/item-props/PageHeaderProps.tsx +20 -0
  114. package/src/components/plugins/@antd/item-props/RowProps.tsx +21 -0
  115. package/src/components/plugins/@antd/item-props/SelectProps.tsx +136 -0
  116. package/src/components/plugins/@antd/item-props/SpaceProps.tsx +52 -0
  117. package/src/components/plugins/@antd/item-props/SwitchProps.tsx +17 -0
  118. package/src/components/plugins/@antd/item-props/TableProps.tsx +200 -0
  119. package/src/components/plugins/@antd/item-props/TextProps.tsx +41 -0
  120. package/src/components/plugins/@antd/item-props/index.ts +20 -0
  121. package/src/components/plugins/@antd/item-props/types.ts +6 -0
  122. package/src/components/plugins/@antd/items/ButtonRender.tsx +63 -0
  123. package/src/components/plugins/@antd/items/CapsuleRender.tsx +49 -0
  124. package/src/components/plugins/@antd/items/CardRender.tsx +119 -0
  125. package/src/components/plugins/@antd/items/CheckboxRender.tsx +56 -0
  126. package/src/components/plugins/@antd/items/ColRender.tsx +78 -0
  127. package/src/components/plugins/@antd/items/DatePickerRender.tsx +117 -0
  128. package/src/components/plugins/@antd/items/EchartsRender.tsx +98 -0
  129. package/src/components/plugins/@antd/items/HtmlRender.tsx +74 -0
  130. package/src/components/plugins/@antd/items/ImageRender.tsx +37 -0
  131. package/src/components/plugins/@antd/items/InputNumberRender.tsx +57 -0
  132. package/src/components/plugins/@antd/items/InputRender.tsx +75 -0
  133. package/src/components/plugins/@antd/items/ListRender.tsx +227 -0
  134. package/src/components/plugins/@antd/items/PageHeaderRender.tsx +74 -0
  135. package/src/components/plugins/@antd/items/RowRender.tsx +47 -0
  136. package/src/components/plugins/@antd/items/SelectRender.tsx +53 -0
  137. package/src/components/plugins/@antd/items/SpaceRender.tsx +54 -0
  138. package/src/components/plugins/@antd/items/SwitchRender.tsx +52 -0
  139. package/src/components/plugins/@antd/items/TableRender.tsx +99 -0
  140. package/src/components/plugins/@antd/items/TextRender.tsx +25 -0
  141. package/src/components/plugins/@antd/items/index.ts +20 -0
  142. package/src/components/styles.css +12 -0
  143. package/src/components/typing.ts +80 -0
  144. package/src/components/utils.ts +37 -0
  145. package/src/example.tsx +136 -0
  146. package/src/index.tsx +17 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { PluginType } from "./typing";
3
+ import "./styles.css";
4
+ export type PageDesignerProps = {
5
+ agentList?: any[];
6
+ plugins?: PluginType[];
7
+ headerExtra?: React.ReactNode;
8
+ };
9
+ export declare const PageDesigner: React.ForwardRefExoticComponent<PageDesignerProps & React.RefAttributes<any>>;
10
+ export default PageDesigner;
@@ -0,0 +1,15 @@
1
+ import { PageSchema, PluginType, SchemaItemType } from "../typing";
2
+ type DesignerContextType = {
3
+ designable: boolean;
4
+ plugins: PluginType[];
5
+ schema: PageSchema;
6
+ selectedItem?: SchemaItemType | null;
7
+ setSchema: React.Dispatch<React.SetStateAction<PageSchema>>;
8
+ setSelectedItem: React.Dispatch<React.SetStateAction<SchemaItemType | null>>;
9
+ updateSelectedItem: (selectedItem?: Partial<SchemaItemType> | null) => void;
10
+ forceUpdate: () => void;
11
+ };
12
+ export declare const DesignerContext: import("react").Context<DesignerContextType>;
13
+ type DesignerProviderProps = React.PropsWithChildren<Omit<Partial<DesignerContextType>, "updateSelectedItem" | "schema" | "forceUpdate"> & Pick<DesignerContextType, "schema">>;
14
+ export declare const DesignerProvider: React.FC<DesignerProviderProps>;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ import { CallbacksType, EnvType } from "../typing";
3
+ type InitCallbackParams = {
4
+ id: string;
5
+ callback: (v: any) => void;
6
+ };
7
+ type EnvContextType = {
8
+ deviceWidth: number;
9
+ env: EnvType;
10
+ callbacks: CallbacksType;
11
+ initCallback: ({ id, callback }: InitCallbackParams) => void;
12
+ };
13
+ export declare const EnvContext: import("react").Context<EnvContextType>;
14
+ export declare const EnvProvider: FC<PropsWithChildren<EnvContextType>>;
15
+ export {};
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps, SchemaItemType } from "../typing";
3
+ type DropContainerProps = {
4
+ rootComponent?: React.ComponentType<any>;
5
+ rootData?: Record<string, any>;
6
+ list?: SchemaItemType[];
7
+ item?: any;
8
+ onListChange?: (list: any[]) => void;
9
+ } & HtmlBaseProps;
10
+ /**
11
+ * DropContainer 组件
12
+ * 用途:容器级拖拽放置,合并父级 forwardedRef 与 react-dnd 的 drop 连接器
13
+ * 参数:
14
+ * - enabled:是否启用拖拽放置
15
+ * - rootComponent:容器根组件类型
16
+ * - rootData:根组件属性
17
+ * - list:容器内子项列表
18
+ * - 其余同 HtmlBaseProps
19
+ */
20
+ export declare const DropContainer: React.FC<DropContainerProps>;
21
+ export default DropContainer;
@@ -0,0 +1,225 @@
1
+ export declare const exampleHtml = "<div>{{title}}</div>\n<div>{{displayValue}}</div>\n<div>\n {{desc || \"\"}}\n</div>";
2
+ export declare const schema: {
3
+ info: {
4
+ name: string;
5
+ description: string;
6
+ };
7
+ datasources: never[];
8
+ scripts: never[];
9
+ variables: never[];
10
+ items: ({
11
+ type: string;
12
+ name: string;
13
+ props: {
14
+ title: string;
15
+ subTitle: string;
16
+ bordered?: undefined;
17
+ hoverable?: undefined;
18
+ shadow?: undefined;
19
+ size?: undefined;
20
+ gutter?: undefined;
21
+ };
22
+ children: {
23
+ extra: never[];
24
+ title?: undefined;
25
+ body?: undefined;
26
+ actions?: undefined;
27
+ };
28
+ style?: undefined;
29
+ } | {
30
+ type: string;
31
+ name: string;
32
+ props: {
33
+ bordered: boolean;
34
+ hoverable: boolean;
35
+ shadow: boolean;
36
+ size: string;
37
+ title?: undefined;
38
+ subTitle?: undefined;
39
+ gutter?: undefined;
40
+ };
41
+ children: {
42
+ title: {
43
+ type: string;
44
+ name: string;
45
+ props: {
46
+ text: string;
47
+ };
48
+ style: {
49
+ fontSize: number;
50
+ color: string;
51
+ fontFamily: string;
52
+ fontWeight: string;
53
+ fontStyle: string;
54
+ textDecoration: string;
55
+ };
56
+ }[];
57
+ extra: never[];
58
+ body: {
59
+ type: string;
60
+ name: string;
61
+ datasource: {
62
+ source: string;
63
+ custom: string;
64
+ };
65
+ props: {
66
+ size: string;
67
+ itemLayout: string;
68
+ bordered: boolean;
69
+ split: boolean;
70
+ pageSize: number;
71
+ };
72
+ }[];
73
+ actions: never[];
74
+ };
75
+ style?: undefined;
76
+ } | {
77
+ type: string;
78
+ name: string;
79
+ props: {
80
+ gutter: number[];
81
+ title?: undefined;
82
+ subTitle?: undefined;
83
+ bordered?: undefined;
84
+ hoverable?: undefined;
85
+ shadow?: undefined;
86
+ size?: undefined;
87
+ };
88
+ children: {
89
+ type: string;
90
+ name: string;
91
+ props: {
92
+ xs: number;
93
+ sm: number;
94
+ md: number;
95
+ lg: number;
96
+ xl: number;
97
+ };
98
+ children: {
99
+ type: string;
100
+ name: string;
101
+ props: {
102
+ bordered: boolean;
103
+ hoverable: boolean;
104
+ shadow: boolean;
105
+ size: string;
106
+ };
107
+ children: {
108
+ type: string;
109
+ name: string;
110
+ datasource: {
111
+ source: string;
112
+ custom: string;
113
+ };
114
+ props: {
115
+ template: string;
116
+ };
117
+ }[];
118
+ }[];
119
+ }[];
120
+ style?: undefined;
121
+ } | {
122
+ type: string;
123
+ name: string;
124
+ props: {
125
+ gutter: number[];
126
+ title?: undefined;
127
+ subTitle?: undefined;
128
+ bordered?: undefined;
129
+ hoverable?: undefined;
130
+ shadow?: undefined;
131
+ size?: undefined;
132
+ };
133
+ style: {
134
+ marginLeft: number;
135
+ marginRight: number;
136
+ };
137
+ children: {
138
+ type: string;
139
+ name: string;
140
+ props: {
141
+ xs: number;
142
+ sm: number;
143
+ md: number;
144
+ lg: number;
145
+ xl: number;
146
+ };
147
+ children: {
148
+ type: string;
149
+ name: string;
150
+ props: {
151
+ title: string;
152
+ bordered: boolean;
153
+ hoverable: boolean;
154
+ shadow: boolean;
155
+ size: string;
156
+ };
157
+ children: {
158
+ type: string;
159
+ name: string;
160
+ datasource: {
161
+ source: string;
162
+ custom: string;
163
+ };
164
+ props: {
165
+ title: string;
166
+ script: string;
167
+ };
168
+ }[];
169
+ }[];
170
+ }[];
171
+ } | {
172
+ type: string;
173
+ name: string;
174
+ props: {
175
+ gutter: number[];
176
+ title?: undefined;
177
+ subTitle?: undefined;
178
+ bordered?: undefined;
179
+ hoverable?: undefined;
180
+ shadow?: undefined;
181
+ size?: undefined;
182
+ };
183
+ style: {
184
+ marginLeft: number;
185
+ marginRight: number;
186
+ };
187
+ children: {
188
+ type: string;
189
+ name: string;
190
+ props: {
191
+ span: number;
192
+ };
193
+ children: {
194
+ type: string;
195
+ name: string;
196
+ props: {
197
+ title: string;
198
+ size: string;
199
+ bordered: boolean;
200
+ hoverable: boolean;
201
+ shadow: boolean;
202
+ };
203
+ children: {
204
+ type: string;
205
+ name: string;
206
+ props: {
207
+ title: string;
208
+ size: string;
209
+ bordered: boolean;
210
+ showHeader: boolean;
211
+ pageSize: number;
212
+ dataSource: {
213
+ name: string;
214
+ count: number;
215
+ }[];
216
+ columns: {
217
+ title: string;
218
+ dataIndex: string;
219
+ }[];
220
+ };
221
+ }[];
222
+ }[];
223
+ }[];
224
+ })[];
225
+ };
@@ -0,0 +1 @@
1
+ export declare const useDatasource: (id?: string, datasource?: Record<string, any>) => any;
@@ -0,0 +1 @@
1
+ export declare function useDeepCompareEffect(effect: () => void, dependencies: any[]): void;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type IconFontProps = {
3
+ type: string;
4
+ className?: string;
5
+ };
6
+ export declare const IconFont: React.FC<IconFontProps>;
@@ -0,0 +1,10 @@
1
+ import PageCanvas from "./layout/PageCanvas";
2
+ import PageDesigner from "./PageDesigner";
3
+ import { PageSchema } from "./typing";
4
+ import { plugins, PropEditorProps } from "./plugins/@antd";
5
+ import DropContainer from "./dnd/DropContainer";
6
+ import { DesignerContext } from "./context/DesignerContext";
7
+ import { EnvContext } from "./context/EnvContext";
8
+ import { handleCallback } from "./utils";
9
+ import { PluginType } from "./typing";
10
+ export { PageCanvas, PageDesigner, PageSchema, DropContainer, DesignerContext, EnvContext, plugins, PropEditorProps, PluginType, handleCallback, };
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export type PageCanvasProps = {
3
+ device?: "desktop" | "mobile" | "tablet";
4
+ };
5
+ export declare const PageCanvas: React.ForwardRefExoticComponent<PageCanvasProps & React.RefAttributes<any>>;
6
+ export default PageCanvas;
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import { SchemaItemType } from "../typing";
3
+ export type PageItemProps = {
4
+ id?: string;
5
+ item: SchemaItemType;
6
+ onDelete?: () => void;
7
+ parentList?: any[];
8
+ onListChange?: (list: any[]) => void;
9
+ index?: number;
10
+ };
11
+ /**
12
+ * PageItem 组件
13
+ * 用途:渲染单个页面元素,并在设计模式下支持拖拽
14
+ * 参数:
15
+ * - deviceWidth:设备宽度
16
+ * - item:元素数据
17
+ * - selectedItem:选中元素
18
+ * - env:环境对象
19
+ * - designable:是否开启设计模式
20
+ * - initCallback:初始化回调注册
21
+ * - callbacks:回调字典
22
+ * - onSelect:选择回调
23
+ * - onDelete:删除回调
24
+ * - parentList:所属列表引用,用于拖拽跨容器移动
25
+ * - index:当前元素索引
26
+ */
27
+ export declare const PageItem: React.FC<PageItemProps>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export type AiPanelProps = {
3
+ agentList?: {
4
+ id: string;
5
+ name: string;
6
+ }[];
7
+ };
8
+ export declare const AiPanel: React.FC<AiPanelProps>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const CascadePanel: React.FC;
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ export type ChatInputProps = {
3
+ value?: string;
4
+ placeholder?: string;
5
+ disabled?: boolean;
6
+ sending?: boolean;
7
+ rows?: number;
8
+ agentList?: {
9
+ id: string | number;
10
+ name: string;
11
+ }[];
12
+ title?: string;
13
+ agentId?: string | number | null;
14
+ attachments?: any[];
15
+ onInput?: (text: string) => void;
16
+ onSubmit?: (data: {
17
+ demand: string;
18
+ title: string;
19
+ agentId?: string | number;
20
+ csvData: Record<string, string>;
21
+ }) => void;
22
+ onUpdateTitle?: (title: string) => void;
23
+ onUpdateAgentId?: (id: string | number | null) => void;
24
+ onUpdateAttachments?: (list: any[]) => void;
25
+ };
26
+ export declare const ChatInput: React.ForwardRefExoticComponent<ChatInputProps & React.RefAttributes<{
27
+ focus: () => void;
28
+ }>>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const CodePanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const ComponentPanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const DatasourcePanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const LayerPanel: React.FC;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type PaneHeaderProps = {
3
+ title?: string;
4
+ extra?: React.ReactNode;
5
+ };
6
+ export declare const PaneHeader: React.FC<PaneHeaderProps>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const PropertiesPanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const ScriptPanel: React.FC;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const VariablesPanel: React.FC;
@@ -0,0 +1,9 @@
1
+ export { ComponentPanel } from './ComponentPanel';
2
+ export { LayerPanel } from './LayerPanel';
3
+ export { ScriptPanel } from './ScriptPanel';
4
+ export { DatasourcePanel } from './DatasourcePanel';
5
+ export { VariablesPanel } from './VariablesPanel';
6
+ export { CodePanel } from './CodePanel';
7
+ export { PropertiesPanel } from './PropertiesPanel';
8
+ export { AiPanel } from './AiPanel';
9
+ export { CascadePanel } from './CascadePanel';
@@ -0,0 +1,22 @@
1
+ import { PluginType } from "../../typing";
2
+ export { PropEditorProps } from "./item-props/types";
3
+ export declare const TextPlugin: PluginType;
4
+ export declare const ImagePlugin: PluginType;
5
+ export declare const ButtonPlugin: PluginType;
6
+ export declare const PageHeaderPlugin: PluginType;
7
+ export declare const TablePlugin: PluginType;
8
+ export declare const ListPlugin: PluginType;
9
+ export declare const HtmlPlugin: PluginType;
10
+ export declare const EchartsPlugin: PluginType;
11
+ export declare const InputPlugin: PluginType;
12
+ export declare const InputNumberPlugin: PluginType;
13
+ export declare const SelectPlugin: PluginType;
14
+ export declare const CapsulePlugin: PluginType;
15
+ export declare const CheckboxPlugin: PluginType;
16
+ export declare const DatePickerPlugin: PluginType;
17
+ export declare const SwitchPlugin: PluginType;
18
+ export declare const SpacePlugin: PluginType;
19
+ export declare const CardPlugin: PluginType;
20
+ export declare const RowPlugin: PluginType;
21
+ export declare const ColPlugin: PluginType;
22
+ export declare const plugins: PluginType[];
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { ButtonProps as AntButtonProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type ButtonModel = {
5
+ text?: string;
6
+ icon?: string;
7
+ } & Pick<AntButtonProps, "type" | "size" | "shape" | "block" | "ghost">;
8
+ export declare const ButtonProps: React.FC<PropEditorProps<ButtonModel>>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { RadioGroupProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type CapsuleOption = {
5
+ label: string;
6
+ value: any;
7
+ };
8
+ export type CapsuleModel = {
9
+ var?: string;
10
+ size?: RadioGroupProps['size'];
11
+ options: CapsuleOption[];
12
+ };
13
+ export declare const CapsuleProps: React.FC<PropEditorProps<CapsuleModel>>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { type CardProps as AntCardProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type CardModel = {
5
+ title?: string;
6
+ shadow?: boolean;
7
+ } & Pick<AntCardProps, "bordered" | "hoverable" | "size">;
8
+ export declare const CardProps: React.FC<PropEditorProps<CardModel>>;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type CheckboxOption = {
4
+ label: string;
5
+ value: any;
6
+ };
7
+ export type CheckboxModel = {
8
+ var?: string;
9
+ layout?: 'horizontal' | 'vertical' | 'grid';
10
+ lineNumber?: number;
11
+ options: CheckboxOption[];
12
+ };
13
+ export declare const CheckboxProps: React.FC<PropEditorProps<CheckboxModel>>;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type ColModel = {
4
+ span?: number;
5
+ xs?: number;
6
+ sm?: number;
7
+ md?: number;
8
+ lg?: number;
9
+ xl?: number;
10
+ xxl?: number;
11
+ };
12
+ export declare const ColProps: React.FC<PropEditorProps<ColModel>>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { type DatePickerProps as AntDatePickerProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type DatePickerModel = {
5
+ var?: string;
6
+ type?: "date" | "time" | "month" | "year" | "range";
7
+ } & Pick<AntDatePickerProps, "size" | "allowClear" | "showTime">;
8
+ export declare const DatePickerProps: React.FC<PropEditorProps<DatePickerModel>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type EchartsModel = {
4
+ script: string;
5
+ };
6
+ export declare const EchartsProps: React.FC<PropEditorProps<EchartsModel>>;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { PropEditorProps } from "./types";
3
+ export type HtmlModel = {
4
+ template: string;
5
+ };
6
+ export declare const HtmlProps: React.FC<PropEditorProps<HtmlModel>>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type ImageModel = {
4
+ src?: string;
5
+ alt?: string;
6
+ href?: string;
7
+ width?: string;
8
+ height?: string;
9
+ };
10
+ export declare const ImageProps: React.FC<PropEditorProps<ImageModel>>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type InputNumberModel = {
4
+ var?: string;
5
+ min?: number;
6
+ max?: number;
7
+ step?: number;
8
+ };
9
+ export declare const InputNumberProps: React.FC<PropEditorProps<InputNumberModel>>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { type InputProps as AntInputProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type InputModel = {
5
+ search?: boolean;
6
+ var?: string;
7
+ prefix?: string;
8
+ suffix?: string;
9
+ } & Pick<AntInputProps, "placeholder" | "size" | "allowClear">;
10
+ export declare const InputProps: React.FC<PropEditorProps<InputModel>>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type ListModel = {
4
+ size?: 'default' | 'small' | 'large';
5
+ itemLayout?: 'horizontal' | 'vertical';
6
+ bordered?: boolean;
7
+ split?: boolean;
8
+ pageSize?: number;
9
+ };
10
+ export declare const ListProps: React.FC<PropEditorProps<ListModel>>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type PageHeaderModel = {
4
+ title?: string;
5
+ subTitle?: string;
6
+ };
7
+ export declare const PageHeaderProps: React.FC<PropEditorProps<PageHeaderModel>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type RowModel = {
4
+ gutter?: [number, number];
5
+ };
6
+ export declare const RowProps: React.FC<PropEditorProps<RowModel>>;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { type SelectProps as AntSelectProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type SelectOption = {
5
+ label: string;
6
+ value: any;
7
+ };
8
+ export type SelectModel = {
9
+ var?: string;
10
+ placeholder?: string;
11
+ size?: AntSelectProps["size"];
12
+ allowClear?: boolean;
13
+ multiple?: boolean;
14
+ options: SelectOption[];
15
+ };
16
+ export declare const SelectProps: React.FC<PropEditorProps<SelectModel>>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { type SpaceProps as AntSpaceProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type SpaceModel = {
5
+ direction?: AntSpaceProps["orientation"];
6
+ } & Pick<AntSpaceProps, "size" | "align">;
7
+ export declare const SpaceProps: React.FC<PropEditorProps<SpaceModel>>;