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.
- package/dist/es/css/bi-sdk.css +1 -0
- package/dist/es/js/bi-sdk.es.js +795 -0
- package/dist/es/js/bi-sdk.es.js.LICENSE.txt +9 -0
- package/dist/types/components/PageDesigner.d.ts +10 -0
- package/dist/types/components/context/DesignerContext.d.ts +15 -0
- package/dist/types/components/context/EnvContext.d.ts +15 -0
- package/dist/types/components/dnd/DropContainer.d.ts +21 -0
- package/dist/types/components/example.d.ts +225 -0
- package/dist/types/components/hooks/datasource.d.ts +1 -0
- package/dist/types/components/hooks/useDeepCompareEffect.d.ts +1 -0
- package/dist/types/components/icon/IconFont.d.ts +6 -0
- package/dist/types/components/index.d.ts +10 -0
- package/dist/types/components/layout/PageCanvas.d.ts +6 -0
- package/dist/types/components/layout/PageItem.d.ts +27 -0
- package/dist/types/components/panel/AiPanel.d.ts +8 -0
- package/dist/types/components/panel/CascadePanel.d.ts +2 -0
- package/dist/types/components/panel/ChatInput.d.ts +28 -0
- package/dist/types/components/panel/CodePanel.d.ts +2 -0
- package/dist/types/components/panel/ComponentPanel.d.ts +2 -0
- package/dist/types/components/panel/DatasourcePanel.d.ts +2 -0
- package/dist/types/components/panel/LayerPanel.d.ts +2 -0
- package/dist/types/components/panel/PaneHeader.d.ts +6 -0
- package/dist/types/components/panel/PropertiesPanel.d.ts +2 -0
- package/dist/types/components/panel/ScriptPanel.d.ts +2 -0
- package/dist/types/components/panel/VariablesPanel.d.ts +2 -0
- package/dist/types/components/panel/index.d.ts +9 -0
- package/dist/types/components/plugins/@antd/index.d.ts +22 -0
- package/dist/types/components/plugins/@antd/item-props/ButtonProps.d.ts +8 -0
- package/dist/types/components/plugins/@antd/item-props/CapsuleProps.d.ts +13 -0
- package/dist/types/components/plugins/@antd/item-props/CardProps.d.ts +8 -0
- package/dist/types/components/plugins/@antd/item-props/CheckboxProps.d.ts +13 -0
- package/dist/types/components/plugins/@antd/item-props/ColProps.d.ts +12 -0
- package/dist/types/components/plugins/@antd/item-props/DatePickerProps.d.ts +8 -0
- package/dist/types/components/plugins/@antd/item-props/EchartsProps.d.ts +6 -0
- package/dist/types/components/plugins/@antd/item-props/HtmlProps.d.ts +6 -0
- package/dist/types/components/plugins/@antd/item-props/ImageProps.d.ts +10 -0
- package/dist/types/components/plugins/@antd/item-props/InputNumberProps.d.ts +9 -0
- package/dist/types/components/plugins/@antd/item-props/InputProps.d.ts +10 -0
- package/dist/types/components/plugins/@antd/item-props/ListProps.d.ts +10 -0
- package/dist/types/components/plugins/@antd/item-props/PageHeaderProps.d.ts +7 -0
- package/dist/types/components/plugins/@antd/item-props/RowProps.d.ts +6 -0
- package/dist/types/components/plugins/@antd/item-props/SelectProps.d.ts +16 -0
- package/dist/types/components/plugins/@antd/item-props/SpaceProps.d.ts +7 -0
- package/dist/types/components/plugins/@antd/item-props/SwitchProps.d.ts +6 -0
- package/dist/types/components/plugins/@antd/item-props/TableProps.d.ts +15 -0
- package/dist/types/components/plugins/@antd/item-props/TextProps.d.ts +6 -0
- package/dist/types/components/plugins/@antd/item-props/index.d.ts +19 -0
- package/dist/types/components/plugins/@antd/item-props/types.d.ts +5 -0
- package/dist/types/components/plugins/@antd/items/ButtonRender.d.ts +14 -0
- package/dist/types/components/plugins/@antd/items/CapsuleRender.d.ts +14 -0
- package/dist/types/components/plugins/@antd/items/CardRender.d.ts +12 -0
- package/dist/types/components/plugins/@antd/items/CheckboxRender.d.ts +14 -0
- package/dist/types/components/plugins/@antd/items/ColRender.d.ts +13 -0
- package/dist/types/components/plugins/@antd/items/DatePickerRender.d.ts +14 -0
- package/dist/types/components/plugins/@antd/items/EchartsRender.d.ts +10 -0
- package/dist/types/components/plugins/@antd/items/HtmlRender.d.ts +20 -0
- package/dist/types/components/plugins/@antd/items/ImageRender.d.ts +10 -0
- package/dist/types/components/plugins/@antd/items/InputNumberRender.d.ts +17 -0
- package/dist/types/components/plugins/@antd/items/InputRender.d.ts +17 -0
- package/dist/types/components/plugins/@antd/items/ListRender.d.ts +11 -0
- package/dist/types/components/plugins/@antd/items/PageHeaderRender.d.ts +8 -0
- package/dist/types/components/plugins/@antd/items/RowRender.d.ts +13 -0
- package/dist/types/components/plugins/@antd/items/SelectRender.d.ts +18 -0
- package/dist/types/components/plugins/@antd/items/SpaceRender.d.ts +10 -0
- package/dist/types/components/plugins/@antd/items/SwitchRender.d.ts +14 -0
- package/dist/types/components/plugins/@antd/items/TableRender.d.ts +12 -0
- package/dist/types/components/plugins/@antd/items/TextRender.d.ts +9 -0
- package/dist/types/components/plugins/@antd/items/index.d.ts +19 -0
- package/dist/types/components/typing.d.ts +80 -0
- package/dist/types/components/utils.d.ts +9 -0
- package/dist/types/example.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/umd/css/bi-sdk.css +1 -0
- package/dist/umd/js/bi-sdk.umd.min.js +795 -0
- package/dist/umd/js/bi-sdk.umd.min.js.LICENSE.txt +9 -0
- package/package.json +52 -0
- package/src/components/PageDesigner.tsx +509 -0
- package/src/components/context/DesignerContext.tsx +71 -0
- package/src/components/context/EnvContext.tsx +42 -0
- package/src/components/dnd/DropContainer.tsx +474 -0
- package/src/components/example.ts +577 -0
- package/src/components/hooks/datasource.ts +23 -0
- package/src/components/hooks/useDeepCompareEffect.ts +12 -0
- package/src/components/icon/IconFont.tsx +16 -0
- package/src/components/index.ts +29 -0
- package/src/components/layout/PageCanvas.tsx +145 -0
- package/src/components/layout/PageItem.tsx +182 -0
- package/src/components/panel/AiPanel.tsx +116 -0
- package/src/components/panel/CascadePanel.tsx +163 -0
- package/src/components/panel/ChatInput.tsx +550 -0
- package/src/components/panel/CodePanel.tsx +48 -0
- package/src/components/panel/ComponentPanel.tsx +119 -0
- package/src/components/panel/DatasourcePanel.tsx +419 -0
- package/src/components/panel/LayerPanel.tsx +238 -0
- package/src/components/panel/PaneHeader.tsx +34 -0
- package/src/components/panel/PropertiesPanel.tsx +394 -0
- package/src/components/panel/ScriptPanel.tsx +175 -0
- package/src/components/panel/VariablesPanel.tsx +153 -0
- package/src/components/panel/index.ts +9 -0
- package/src/components/plugins/@antd/index.ts +445 -0
- package/src/components/plugins/@antd/item-props/ButtonProps.tsx +91 -0
- package/src/components/plugins/@antd/item-props/CapsuleProps.tsx +102 -0
- package/src/components/plugins/@antd/item-props/CardProps.tsx +58 -0
- package/src/components/plugins/@antd/item-props/CheckboxProps.tsx +75 -0
- package/src/components/plugins/@antd/item-props/ColProps.tsx +43 -0
- package/src/components/plugins/@antd/item-props/DatePickerProps.tsx +72 -0
- package/src/components/plugins/@antd/item-props/EchartsProps.tsx +35 -0
- package/src/components/plugins/@antd/item-props/HtmlProps.tsx +61 -0
- package/src/components/plugins/@antd/item-props/ImageProps.tsx +43 -0
- package/src/components/plugins/@antd/item-props/InputNumberProps.tsx +18 -0
- package/src/components/plugins/@antd/item-props/InputProps.tsx +89 -0
- package/src/components/plugins/@antd/item-props/ListProps.tsx +69 -0
- package/src/components/plugins/@antd/item-props/PageHeaderProps.tsx +20 -0
- package/src/components/plugins/@antd/item-props/RowProps.tsx +21 -0
- package/src/components/plugins/@antd/item-props/SelectProps.tsx +136 -0
- package/src/components/plugins/@antd/item-props/SpaceProps.tsx +52 -0
- package/src/components/plugins/@antd/item-props/SwitchProps.tsx +17 -0
- package/src/components/plugins/@antd/item-props/TableProps.tsx +200 -0
- package/src/components/plugins/@antd/item-props/TextProps.tsx +41 -0
- package/src/components/plugins/@antd/item-props/index.ts +20 -0
- package/src/components/plugins/@antd/item-props/types.ts +6 -0
- package/src/components/plugins/@antd/items/ButtonRender.tsx +63 -0
- package/src/components/plugins/@antd/items/CapsuleRender.tsx +49 -0
- package/src/components/plugins/@antd/items/CardRender.tsx +119 -0
- package/src/components/plugins/@antd/items/CheckboxRender.tsx +56 -0
- package/src/components/plugins/@antd/items/ColRender.tsx +78 -0
- package/src/components/plugins/@antd/items/DatePickerRender.tsx +117 -0
- package/src/components/plugins/@antd/items/EchartsRender.tsx +98 -0
- package/src/components/plugins/@antd/items/HtmlRender.tsx +74 -0
- package/src/components/plugins/@antd/items/ImageRender.tsx +37 -0
- package/src/components/plugins/@antd/items/InputNumberRender.tsx +57 -0
- package/src/components/plugins/@antd/items/InputRender.tsx +75 -0
- package/src/components/plugins/@antd/items/ListRender.tsx +227 -0
- package/src/components/plugins/@antd/items/PageHeaderRender.tsx +74 -0
- package/src/components/plugins/@antd/items/RowRender.tsx +47 -0
- package/src/components/plugins/@antd/items/SelectRender.tsx +53 -0
- package/src/components/plugins/@antd/items/SpaceRender.tsx +54 -0
- package/src/components/plugins/@antd/items/SwitchRender.tsx +52 -0
- package/src/components/plugins/@antd/items/TableRender.tsx +99 -0
- package/src/components/plugins/@antd/items/TextRender.tsx +25 -0
- package/src/components/plugins/@antd/items/index.ts +20 -0
- package/src/components/styles.css +12 -0
- package/src/components/typing.ts +80 -0
- package/src/components/utils.ts +37 -0
- package/src/example.tsx +136 -0
- package/src/index.tsx +17 -0
|
@@ -0,0 +1,20 @@
|
|
|
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'
|
|
20
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MouseEventHandler } from "react";
|
|
2
|
+
|
|
3
|
+
export type HtmlBaseProps = {
|
|
4
|
+
id?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: MouseEventHandler;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type SchemaItemType = {
|
|
11
|
+
id?: string;
|
|
12
|
+
type: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
props?: Record<string, any>;
|
|
17
|
+
cascadeIds?: string[];
|
|
18
|
+
children?: SchemaItemType[] | Record<string, SchemaItemType[]>;
|
|
19
|
+
datasource?: {
|
|
20
|
+
source?: "custom" | "define";
|
|
21
|
+
datasourceId?: string | null;
|
|
22
|
+
scriptId?: string | null;
|
|
23
|
+
custom?: string | null;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type PluginType = {
|
|
28
|
+
group: string;
|
|
29
|
+
key: string;
|
|
30
|
+
label: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
component: React.FC<any>;
|
|
33
|
+
formComponent?: React.FC<any>;
|
|
34
|
+
defaultOptions?: Pick<
|
|
35
|
+
SchemaItemType,
|
|
36
|
+
"props" | "children" | "cascadeIds" | "datasource" | "style"
|
|
37
|
+
>;
|
|
38
|
+
};
|
|
39
|
+
type NameValue = { name?: string; value?: string };
|
|
40
|
+
export type ScriptItem = { id?: string; name: string; script: string };
|
|
41
|
+
export type VariableItem = { name: string; value: string; id?: string };
|
|
42
|
+
|
|
43
|
+
export type ApiType = {
|
|
44
|
+
id: string;
|
|
45
|
+
type: "api";
|
|
46
|
+
name: string;
|
|
47
|
+
url: string;
|
|
48
|
+
method: "GET" | "POST" | "PUT" | "DELETE";
|
|
49
|
+
headers: NameValue[];
|
|
50
|
+
formData: NameValue[];
|
|
51
|
+
body: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export type SqlType = {
|
|
55
|
+
id: string;
|
|
56
|
+
type: "sql";
|
|
57
|
+
name: string;
|
|
58
|
+
query: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type PageInfo = {
|
|
62
|
+
name?: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
cover?: string;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type PageSchema = {
|
|
68
|
+
info: PageInfo;
|
|
69
|
+
datasources: (ApiType | SqlType)[];
|
|
70
|
+
scripts: ScriptItem[];
|
|
71
|
+
variables: VariableItem[];
|
|
72
|
+
items: SchemaItemType[];
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type EnvType = {
|
|
76
|
+
global: Record<string, any>;
|
|
77
|
+
local: Record<string, Record<string, any>>;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type CallbacksType = Record<string, (v: any) => void>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
import { CallbacksType, EnvType, SchemaItemType } from "./typing";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
|
|
5
|
+
type Env = EnvType;
|
|
6
|
+
|
|
7
|
+
export const getVars = (env: Env, item: SchemaItemType) => {
|
|
8
|
+
return { ...env.global, ...(env.local[item.id || ""] || {}) };
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const setVar = (
|
|
12
|
+
env: Env,
|
|
13
|
+
item: SchemaItemType,
|
|
14
|
+
key: string,
|
|
15
|
+
value: any
|
|
16
|
+
) => {
|
|
17
|
+
(item.cascadeIds || []).forEach((id) => {
|
|
18
|
+
env.local[id] = env.local[id] || {};
|
|
19
|
+
env.local[id][key] = value;
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const handleCallback = (
|
|
24
|
+
env: Env,
|
|
25
|
+
item: SchemaItemType,
|
|
26
|
+
callbacks: CallbacksType
|
|
27
|
+
) => {
|
|
28
|
+
const vars = getVars(env, item);
|
|
29
|
+
(item.cascadeIds || []).forEach((id) => {
|
|
30
|
+
const cb = callbacks[id];
|
|
31
|
+
if (typeof cb === "function") {
|
|
32
|
+
cb(vars);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const uuid = () => v4();
|
package/src/example.tsx
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { CloseOutlined, EditOutlined, PlusOutlined } from "@ant-design/icons";
|
|
2
|
+
import { Button, Col, Divider, Drawer, Form, Input, Row, Table } from "antd";
|
|
3
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { PageDesigner } from "./components";
|
|
6
|
+
import { schema } from "./components/example";
|
|
7
|
+
import { plugins } from "./components/plugins/@antd";
|
|
8
|
+
|
|
9
|
+
type Agent = { id: string | number; name: string };
|
|
10
|
+
|
|
11
|
+
const EditDrawer = styled(Drawer)`
|
|
12
|
+
width: 80%;
|
|
13
|
+
|
|
14
|
+
.ant-drawer-content-wrapper {
|
|
15
|
+
width: 100%;
|
|
16
|
+
|
|
17
|
+
.ant-drawer-section {
|
|
18
|
+
width: 100%;
|
|
19
|
+
|
|
20
|
+
.ant-drawer-header {
|
|
21
|
+
padding: 8px 24px;
|
|
22
|
+
}
|
|
23
|
+
.ant-drawer-body {
|
|
24
|
+
padding: 0;
|
|
25
|
+
height: "calc(100vh - 41px)";
|
|
26
|
+
overflow: "hidden";
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export const Example: React.FC = () => {
|
|
33
|
+
const editDrawerRef = useRef<any>(null);
|
|
34
|
+
const [editVisible, setEditVisible] = useState(false);
|
|
35
|
+
const [agentList, setAgentList] = useState<Agent[]>([]);
|
|
36
|
+
const [params, setParams] = useState<{ name: string }>({ name: "" });
|
|
37
|
+
const columns = [
|
|
38
|
+
{ title: "名称", dataIndex: "name", key: "name" },
|
|
39
|
+
{
|
|
40
|
+
title: "操作",
|
|
41
|
+
dataIndex: "operation",
|
|
42
|
+
key: "operation",
|
|
43
|
+
render: (_: any, record: any) => (
|
|
44
|
+
<a onClick={() => handleEditClick(record)}>
|
|
45
|
+
<EditOutlined />
|
|
46
|
+
</a>
|
|
47
|
+
),
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
const dataSource = [{ name: "数据报表1" }, { name: "数据报表2" }];
|
|
51
|
+
const handleEditClick = (record: any) => {
|
|
52
|
+
setEditVisible(true);
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
editDrawerRef.current?.handleOpen(JSON.parse(JSON.stringify(schema)));
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
const handleAdd = () => {
|
|
58
|
+
setEditVisible(true);
|
|
59
|
+
setTimeout(() => {
|
|
60
|
+
editDrawerRef.current?.handleOpen(JSON.parse(JSON.stringify(schema)));
|
|
61
|
+
}, 0);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
const initAgentList = async () => {
|
|
66
|
+
try {
|
|
67
|
+
setAgentList([]);
|
|
68
|
+
} catch {
|
|
69
|
+
setAgentList([]);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
initAgentList();
|
|
73
|
+
}, []);
|
|
74
|
+
return (
|
|
75
|
+
<div style={{ padding: 20 }}>
|
|
76
|
+
<Row justify="space-around">
|
|
77
|
+
<Col flex="auto">
|
|
78
|
+
<Form layout="inline">
|
|
79
|
+
<Form.Item label="名称">
|
|
80
|
+
<Input
|
|
81
|
+
value={params.name}
|
|
82
|
+
onChange={(e) => setParams({ name: e.target.value })}
|
|
83
|
+
placeholder="请输入数据报表名称"
|
|
84
|
+
/>
|
|
85
|
+
</Form.Item>
|
|
86
|
+
<Form.Item>
|
|
87
|
+
<Button>查询</Button>
|
|
88
|
+
</Form.Item>
|
|
89
|
+
</Form>
|
|
90
|
+
</Col>
|
|
91
|
+
<Col flex="100px">
|
|
92
|
+
<Button type="primary" onClick={handleAdd} icon={<PlusOutlined />}>
|
|
93
|
+
创建数据报表
|
|
94
|
+
</Button>
|
|
95
|
+
</Col>
|
|
96
|
+
</Row>
|
|
97
|
+
<Table
|
|
98
|
+
size="small"
|
|
99
|
+
columns={columns as any}
|
|
100
|
+
dataSource={dataSource}
|
|
101
|
+
bordered
|
|
102
|
+
style={{ marginTop: 20 }}
|
|
103
|
+
rowKey={(_, i) => String(i)}
|
|
104
|
+
/>
|
|
105
|
+
{editVisible && (
|
|
106
|
+
<EditDrawer
|
|
107
|
+
open={editVisible}
|
|
108
|
+
onClose={() => setEditVisible(false)}
|
|
109
|
+
styles={{
|
|
110
|
+
wrapper: { width: "100%" },
|
|
111
|
+
header: { display: "none" },
|
|
112
|
+
body: {
|
|
113
|
+
padding: 0,
|
|
114
|
+
height: "calc(100vh - 41px)",
|
|
115
|
+
overflow: "hidden",
|
|
116
|
+
},
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
<PageDesigner
|
|
120
|
+
ref={editDrawerRef}
|
|
121
|
+
agentList={agentList}
|
|
122
|
+
plugins={plugins}
|
|
123
|
+
headerExtra={
|
|
124
|
+
<>
|
|
125
|
+
<Divider type="vertical" />
|
|
126
|
+
<a className="toolbar" onClick={() => setEditVisible(false)}>
|
|
127
|
+
<CloseOutlined />
|
|
128
|
+
</a>
|
|
129
|
+
</>
|
|
130
|
+
}
|
|
131
|
+
/>
|
|
132
|
+
</EditDrawer>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
};
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import { Example } from './example';
|
|
4
|
+
|
|
5
|
+
// export * from './components'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const rootElement = document.getElementById('root');
|
|
9
|
+
|
|
10
|
+
if (rootElement) {
|
|
11
|
+
const root = ReactDOM.createRoot(rootElement);
|
|
12
|
+
root.render(
|
|
13
|
+
<React.StrictMode>
|
|
14
|
+
<Example />
|
|
15
|
+
</React.StrictMode>
|
|
16
|
+
);
|
|
17
|
+
}
|