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,6 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type SwitchModel = {
4
+ var?: string;
5
+ };
6
+ export declare const SwitchProps: React.FC<PropEditorProps<SwitchModel>>;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { type TableProps as AntTableProps } from "antd";
3
+ import type { PropEditorProps } from "./types";
4
+ export type TableColumnModel = {
5
+ title: string;
6
+ dataIndex: string;
7
+ width?: string;
8
+ align?: "left" | "center" | "right";
9
+ ellipsis?: boolean;
10
+ };
11
+ export type TableModel = {
12
+ pageSize?: number;
13
+ columns: TableColumnModel[];
14
+ } & Pick<AntTableProps, "bordered" | "showHeader" | "size">;
15
+ export declare const TableProps: React.FC<PropEditorProps<TableModel>>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { PropEditorProps } from './types';
3
+ export type TextModel = {
4
+ text?: string;
5
+ };
6
+ export declare const TextProps: React.FC<PropEditorProps<TextModel>>;
@@ -0,0 +1,19 @@
1
+ export { ButtonProps } from './ButtonProps';
2
+ export { InputProps } from './InputProps';
3
+ export { InputNumberProps } from './InputNumberProps';
4
+ export { SelectProps } from './SelectProps';
5
+ export { CheckboxProps } from './CheckboxProps';
6
+ export { CapsuleProps } from './CapsuleProps';
7
+ export { DatePickerProps } from './DatePickerProps';
8
+ export { SwitchProps } from './SwitchProps';
9
+ export { TextProps } from './TextProps';
10
+ export { HtmlProps } from './HtmlProps';
11
+ export { EchartsProps } from './EchartsProps';
12
+ export { ImageProps } from './ImageProps';
13
+ export { CardProps } from './CardProps';
14
+ export { ListProps } from './ListProps';
15
+ export { TableProps } from './TableProps';
16
+ export { PageHeaderProps } from './PageHeaderProps';
17
+ export { RowProps } from './RowProps';
18
+ export { ColProps } from './ColProps';
19
+ export { SpaceProps } from './SpaceProps';
@@ -0,0 +1,5 @@
1
+ export type PropEditorProps<T = any> = {
2
+ model: T;
3
+ customStyle?: Record<string, any>;
4
+ onChange?: (model: T) => void;
5
+ };
@@ -0,0 +1,14 @@
1
+ import { type ButtonProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type ButtonRenderProps = {
5
+ text?: string;
6
+ type?: ButtonProps["type"];
7
+ icon?: ButtonProps["icon"];
8
+ size?: ButtonProps["size"];
9
+ block?: ButtonProps["block"];
10
+ shape?: ButtonProps["shape"];
11
+ ghost?: ButtonProps["ghost"];
12
+ item?: SchemaItemType;
13
+ } & HtmlBaseProps;
14
+ export declare const ButtonRender: React.FC<ButtonRenderProps>;
@@ -0,0 +1,14 @@
1
+ import { type RadioGroupProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type CapsuleRenderProps = {
5
+ var?: string;
6
+ size?: RadioGroupProps['size'];
7
+ options?: {
8
+ label: string;
9
+ value: any;
10
+ }[];
11
+ item?: SchemaItemType;
12
+ onChange?: (v: any) => void;
13
+ } & HtmlBaseProps;
14
+ export declare const CapsuleRender: React.FC<CapsuleRenderProps>;
@@ -0,0 +1,12 @@
1
+ import { CardProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps } from "../../../typing";
4
+ export type CardRenderProps = {
5
+ bordered?: boolean;
6
+ size?: CardProps["size"];
7
+ title?: string;
8
+ hoverable?: boolean;
9
+ shadow?: boolean;
10
+ item: any;
11
+ } & HtmlBaseProps;
12
+ export declare const CardRender: React.FC<CardRenderProps>;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
3
+ export type CheckboxRenderProps = {
4
+ var?: string;
5
+ layout?: "horizontal" | "vertical" | "grid";
6
+ lineNumber?: number;
7
+ options?: {
8
+ label: string;
9
+ value: any;
10
+ }[];
11
+ item?: SchemaItemType;
12
+ onChange?: (value: any[]) => void;
13
+ } & HtmlBaseProps;
14
+ export declare const CheckboxRender: React.FC<CheckboxRenderProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type ColRenderProps = {
4
+ span?: number;
5
+ xs?: number;
6
+ sm?: number;
7
+ md?: number;
8
+ lg?: number;
9
+ xl?: number;
10
+ xxl?: number;
11
+ item: any;
12
+ } & HtmlBaseProps;
13
+ export declare const ColRender: React.FC<ColRenderProps>;
@@ -0,0 +1,14 @@
1
+ import { type DatePickerProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps } from "../../../typing";
4
+ export type DatePickerRenderProps = {
5
+ var?: string;
6
+ size?: DatePickerProps['size'];
7
+ allowClear?: boolean;
8
+ type?: "date" | "time" | "month" | "year" | "range";
9
+ showTime?: boolean;
10
+ value?: string | [string, string];
11
+ item?: any;
12
+ onChange?: (value?: string | [string, string]) => void;
13
+ } & HtmlBaseProps;
14
+ export declare const DatePickerRender: React.FC<DatePickerRenderProps>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type EchartsRenderProps = {
4
+ item: any;
5
+ title?: string;
6
+ script?: string;
7
+ height?: number;
8
+ style?: React.CSSProperties;
9
+ } & HtmlBaseProps;
10
+ export declare const EchartsRender: React.FC<EchartsRenderProps>;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type HtmlRenderProps = {
4
+ dataSource?: Record<string, any>;
5
+ template?: string;
6
+ style?: React.CSSProperties;
7
+ item: any;
8
+ } & HtmlBaseProps;
9
+ /**
10
+ * HtmlRender 组件
11
+ * 用途:渲染自定义 HTML 模板,支持数据源变量插值
12
+ * 参数:
13
+ * - id:组件唯一标识
14
+ * - template:HTML 模板字符串,支持 {{ expr }} 插值
15
+ * - item:当前元素数据(含 datasource)
16
+ * - style:样式
17
+ * - className:类名
18
+ * - ref:转发到 div 的引用(HTMLDivElement)
19
+ */
20
+ export declare const HtmlRender: React.FC<HtmlRenderProps>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type ImageRenderProps = {
4
+ src: string;
5
+ alt?: string;
6
+ width?: number | string;
7
+ height?: number | string;
8
+ href?: string;
9
+ } & HtmlBaseProps;
10
+ export declare const ImageRender: React.FC<ImageRenderProps>;
@@ -0,0 +1,17 @@
1
+ import { type InputNumberProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type InputNumberRenderProps = {
5
+ var?: string;
6
+ value?: number;
7
+ size?: InputNumberProps["size"];
8
+ placeholder?: string;
9
+ allowClear?: boolean;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ precision?: number;
14
+ item?: SchemaItemType;
15
+ onChange?: (v?: number) => void;
16
+ } & HtmlBaseProps;
17
+ export declare const InputNumberRender: React.FC<InputNumberRenderProps>;
@@ -0,0 +1,17 @@
1
+ import { type InputProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type InputRenderProps = {
5
+ var?: string;
6
+ placeholder?: string;
7
+ prefix?: React.ReactNode | string;
8
+ suffix?: React.ReactNode | string;
9
+ size?: InputProps['size'];
10
+ allowClear?: boolean;
11
+ search?: boolean;
12
+ item?: SchemaItemType;
13
+ value?: string;
14
+ onChange?: (v: string) => void;
15
+ onSearch?: (v: string) => void;
16
+ } & HtmlBaseProps;
17
+ export declare const InputRender: React.FC<InputRenderProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type ListRenderProps = {
4
+ pageSize?: number;
5
+ bordered?: boolean;
6
+ size?: "small" | "default";
7
+ item: any;
8
+ itemLayout?: "horizontal" | "vertical";
9
+ split?: boolean;
10
+ } & HtmlBaseProps;
11
+ export declare const ListRender: React.FC<ListRenderProps>;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type PageHeaderRenderProps = {
4
+ title?: string;
5
+ subTitle?: string;
6
+ item: any;
7
+ } & HtmlBaseProps;
8
+ export declare const PageHeaderRender: React.FC<PageHeaderRenderProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type RowRenderProps = {
4
+ gutter?: number | [number, number];
5
+ item: any;
6
+ } & HtmlBaseProps;
7
+ /**
8
+ * RowRender 组件
9
+ * 翻译自 RowRender.vue
10
+ * 功能:渲染行布局,支持拖拽排序(designable模式下)
11
+ * 不使用 DragContainer 组件
12
+ */
13
+ export declare const RowRender: React.FC<RowRenderProps>;
@@ -0,0 +1,18 @@
1
+ import { type SelectProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type SelectRenderProps = {
5
+ var?: string;
6
+ size?: SelectProps['size'];
7
+ placeholder?: string;
8
+ allowClear?: boolean;
9
+ multiple?: boolean;
10
+ options?: {
11
+ label: string;
12
+ value: any;
13
+ }[];
14
+ item?: SchemaItemType;
15
+ value?: any;
16
+ onChange?: (v: any) => void;
17
+ } & HtmlBaseProps;
18
+ export declare const SelectRender: React.FC<SelectRenderProps>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ import { type SizeType } from "antd/es/config-provider/SizeContext";
4
+ export type SpaceRenderProps = {
5
+ align?: "start" | "end" | "center" | "baseline";
6
+ size?: SizeType;
7
+ direction?: "horizontal" | "vertical";
8
+ item: any;
9
+ } & HtmlBaseProps;
10
+ export declare const SpaceRender: React.FC<SpaceRenderProps>;
@@ -0,0 +1,14 @@
1
+ import { type SwitchProps } from "antd";
2
+ import React from "react";
3
+ import { HtmlBaseProps, SchemaItemType } from "../../../typing";
4
+ export type SwitchRenderProps = {
5
+ var?: string;
6
+ checked?: boolean;
7
+ disabled?: boolean;
8
+ size?: SwitchProps["size"];
9
+ checkedChildren?: string;
10
+ unCheckedChildren?: string;
11
+ item?: SchemaItemType;
12
+ onChange?: (checked: boolean) => void;
13
+ } & HtmlBaseProps;
14
+ export declare const SwitchRender: React.FC<SwitchRenderProps>;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { type TableProps } from "antd";
3
+ import { HtmlBaseProps } from "../../../typing";
4
+ export type TableRenderProps = {
5
+ dataSource?: any[];
6
+ columns?: any[];
7
+ pageSize?: number;
8
+ bordered?: boolean;
9
+ size?: TableProps["size"];
10
+ showHeader?: boolean;
11
+ } & HtmlBaseProps;
12
+ export declare const TableRender: React.FC<TableRenderProps>;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { HtmlBaseProps } from "../../../typing";
3
+ export type TextRenderProps = {
4
+ text?: string;
5
+ item?: {
6
+ style?: React.CSSProperties;
7
+ };
8
+ } & HtmlBaseProps;
9
+ export declare const TextRender: React.FC<TextRenderProps>;
@@ -0,0 +1,19 @@
1
+ export { CardRender } from './CardRender';
2
+ export { RowRender } from './RowRender';
3
+ export { ColRender } from './ColRender';
4
+ export { PageHeaderRender } from './PageHeaderRender';
5
+ export { TableRender } from './TableRender';
6
+ export { ListRender } from './ListRender';
7
+ export { HtmlRender } from './HtmlRender';
8
+ export { EchartsRender } from './EchartsRender';
9
+ export { TextRender } from './TextRender';
10
+ export { ImageRender } from './ImageRender';
11
+ export { ButtonRender } from './ButtonRender';
12
+ export { SpaceRender } from './SpaceRender';
13
+ export { InputRender } from './InputRender';
14
+ export { InputNumberRender } from './InputNumberRender';
15
+ export { SelectRender } from './SelectRender';
16
+ export { CapsuleRender } from './CapsuleRender';
17
+ export { CheckboxRender } from './CheckboxRender';
18
+ export { DatePickerRender } from './DatePickerRender';
19
+ export { SwitchRender } from './SwitchRender';
@@ -0,0 +1,80 @@
1
+ import { MouseEventHandler } from "react";
2
+ export type HtmlBaseProps = {
3
+ id?: string;
4
+ style?: React.CSSProperties;
5
+ className?: string;
6
+ onClick?: MouseEventHandler;
7
+ };
8
+ export type SchemaItemType = {
9
+ id?: string;
10
+ type: string;
11
+ name?: string;
12
+ description?: string;
13
+ style?: React.CSSProperties;
14
+ props?: Record<string, any>;
15
+ cascadeIds?: string[];
16
+ children?: SchemaItemType[] | Record<string, SchemaItemType[]>;
17
+ datasource?: {
18
+ source?: "custom" | "define";
19
+ datasourceId?: string | null;
20
+ scriptId?: string | null;
21
+ custom?: string | null;
22
+ };
23
+ };
24
+ export type PluginType = {
25
+ group: string;
26
+ key: string;
27
+ label: string;
28
+ icon: string;
29
+ component: React.FC<any>;
30
+ formComponent?: React.FC<any>;
31
+ defaultOptions?: Pick<SchemaItemType, "props" | "children" | "cascadeIds" | "datasource" | "style">;
32
+ };
33
+ type NameValue = {
34
+ name?: string;
35
+ value?: string;
36
+ };
37
+ export type ScriptItem = {
38
+ id?: string;
39
+ name: string;
40
+ script: string;
41
+ };
42
+ export type VariableItem = {
43
+ name: string;
44
+ value: string;
45
+ id?: string;
46
+ };
47
+ export type ApiType = {
48
+ id: string;
49
+ type: "api";
50
+ name: string;
51
+ url: string;
52
+ method: "GET" | "POST" | "PUT" | "DELETE";
53
+ headers: NameValue[];
54
+ formData: NameValue[];
55
+ body: string;
56
+ };
57
+ export type SqlType = {
58
+ id: string;
59
+ type: "sql";
60
+ name: string;
61
+ query: string;
62
+ };
63
+ export type PageInfo = {
64
+ name?: string;
65
+ description?: string;
66
+ cover?: string;
67
+ };
68
+ export type PageSchema = {
69
+ info: PageInfo;
70
+ datasources: (ApiType | SqlType)[];
71
+ scripts: ScriptItem[];
72
+ variables: VariableItem[];
73
+ items: SchemaItemType[];
74
+ };
75
+ export type EnvType = {
76
+ global: Record<string, any>;
77
+ local: Record<string, Record<string, any>>;
78
+ };
79
+ export type CallbacksType = Record<string, (v: any) => void>;
80
+ export {};
@@ -0,0 +1,9 @@
1
+ import { CallbacksType, EnvType, SchemaItemType } from "./typing";
2
+ type Env = EnvType;
3
+ export declare const getVars: (env: Env, item: SchemaItemType) => {
4
+ [x: string]: any;
5
+ };
6
+ export declare const setVar: (env: Env, item: SchemaItemType, key: string, value: any) => void;
7
+ export declare const handleCallback: (env: Env, item: SchemaItemType, callbacks: CallbacksType) => void;
8
+ export declare const uuid: () => string;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const Example: React.FC;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ .ant-dropdown-menu-vertical{max-height:70vh;overflow:auto}a.toolbar{color:var(--ant-color-text-secondary)}a.toolbar.active{color:var(--ant-color-primary)}