@builder6/pages 0.8.3 → 0.9.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/pages/liquid.service.d.ts +5 -0
- package/dist/pages/liquid.service.js +32 -0
- package/dist/pages/liquid.service.js.map +1 -0
- package/dist/pages/pages.controller.d.ts +4 -4
- package/dist/pages/pages.controller.js +11 -15
- package/dist/pages/pages.controller.js.map +1 -1
- package/dist/pages/pages.module.js +2 -1
- package/dist/pages/pages.module.js.map +1 -1
- package/dist/pages/pages.service.d.ts +0 -3
- package/dist/pages/pages.service.js +1 -16
- package/dist/pages/pages.service.js.map +1 -1
- package/package.json +3 -3
- package/views/ag-grid.liquid +1029 -0
- package/views/layout/theme.liquid +82 -0
- package/views/rooms.liquid +19 -0
- package/views/amis.liquid +0 -55
- package/views/react.liquid +0 -22
|
@@ -4,6 +4,88 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Builder6</title>
|
|
7
|
+
|
|
8
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
9
|
+
|
|
10
|
+
<script src="{{config.unpkg.url}}/@builder6/react@3.2.17/dist/builder-react.browser.js"></script>
|
|
11
|
+
<script src="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/sdk/sdk.js"></script>
|
|
12
|
+
|
|
13
|
+
<script src="{{config.unpkg.url}}/lodash@4.17.21/lodash.js"></script>
|
|
14
|
+
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/lib/themes/antd.css" />
|
|
15
|
+
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/lib/helper.css" />
|
|
16
|
+
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/sdk/iconfont.css" />
|
|
17
|
+
<script async>
|
|
18
|
+
window['React'] = amisRequire('react');
|
|
19
|
+
window['ReactDOM'] = amisRequire('react-dom');
|
|
20
|
+
window['moment'] = amisRequire('moment');
|
|
21
|
+
window['Builder'] = Builder6React.Builder;
|
|
22
|
+
window['builder'] = Builder6React.builder;
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<script>
|
|
26
|
+
renderAmis = function (dom, schema, data, env) {
|
|
27
|
+
|
|
28
|
+
const assetUrls = env.assetUrls
|
|
29
|
+
const content = {
|
|
30
|
+
data: {
|
|
31
|
+
blocks: [
|
|
32
|
+
{
|
|
33
|
+
"@type": "@builder.io/sdk:Element",
|
|
34
|
+
"@version": 2,
|
|
35
|
+
layerName: "Page",
|
|
36
|
+
id: `builder-assets`,
|
|
37
|
+
component: {
|
|
38
|
+
name: "Core:AssetsLoader",
|
|
39
|
+
options: {
|
|
40
|
+
urls: assetUrls,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
children: [
|
|
44
|
+
{
|
|
45
|
+
id: `builder-amis`,
|
|
46
|
+
"@type": "@builder.io/sdk:Element",
|
|
47
|
+
"@version": 2,
|
|
48
|
+
component: {
|
|
49
|
+
name: "Core:Amis",
|
|
50
|
+
options: {
|
|
51
|
+
schema: schema,
|
|
52
|
+
data: data,
|
|
53
|
+
env,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
responsiveStyles: {
|
|
57
|
+
large: {
|
|
58
|
+
display: "flex",
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
position: "relative",
|
|
61
|
+
flexShrink: "0",
|
|
62
|
+
boxSizing: "border-box",
|
|
63
|
+
width: "100%",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
responsiveStyles: {
|
|
69
|
+
large: {
|
|
70
|
+
display: "flex" ,
|
|
71
|
+
flexDirection: "column",
|
|
72
|
+
position: "relative",
|
|
73
|
+
flexShrink: "0",
|
|
74
|
+
boxSizing: "border-box",
|
|
75
|
+
width: "100%",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// 挂载到 DOM 上
|
|
85
|
+
const root = ReactDOM.createRoot(dom);
|
|
86
|
+
root.render(React.createElement(Builder6React.BuilderComponent, {content}));
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
7
89
|
</head>
|
|
8
90
|
<body>
|
|
9
91
|
<main>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{% layout 'layout/theme.liquid' %}
|
|
2
|
+
|
|
3
|
+
{% block content %}
|
|
4
|
+
|
|
5
|
+
<div id="root" class="w-full h-full"></div>
|
|
6
|
+
<script type="text/javascript">
|
|
7
|
+
const schema = {
|
|
8
|
+
type: "rooms-comments",
|
|
9
|
+
className: "flex flex-col m-3 gap-3",
|
|
10
|
+
roomId: "test",
|
|
11
|
+
baseUrl: ""
|
|
12
|
+
}
|
|
13
|
+
const data = {}
|
|
14
|
+
const env = {
|
|
15
|
+
assetUrls: ['https://unpkg.com/@steedos-widgets/liveblocks@6.3.11-beta.20/dist/assets.json'],
|
|
16
|
+
}
|
|
17
|
+
renderAmis(document.getElementById('root'), schema, data, env)
|
|
18
|
+
</script>
|
|
19
|
+
{% endblock %}
|
package/views/amis.liquid
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
{% layout 'layout/theme.liquid' %}
|
|
2
|
-
|
|
3
|
-
{% block content %}
|
|
4
|
-
<head>
|
|
5
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
6
|
-
|
|
7
|
-
<script src="{{config.unpkg.url}}/@builder6/sdk@2.2.5/dist/index.umd.js"></script>
|
|
8
|
-
|
|
9
|
-
<script src="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/sdk/sdk.js"></script>
|
|
10
|
-
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/lib/themes/antd.css" />
|
|
11
|
-
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/lib/helper.css" />
|
|
12
|
-
<link rel="stylesheet" href="{{config.unpkg.url}}/@steedos-widgets/amis@6.3.0-patch.3/sdk/iconfont.css" />
|
|
13
|
-
<script async>
|
|
14
|
-
window['React'] = amisRequire('react');
|
|
15
|
-
window['ReactDOM'] = amisRequire('react-dom');
|
|
16
|
-
window['moment'] = amisRequire('moment');
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
|
|
20
|
-
<div id="root" class="w-full h-full"></div>
|
|
21
|
-
|
|
22
|
-
<script type="text/javascript">
|
|
23
|
-
(function () {
|
|
24
|
-
let amis = amisRequire('amis/embed');
|
|
25
|
-
// 通过替换下面这个配置来生成不同页面
|
|
26
|
-
let amisJSON = {
|
|
27
|
-
type: 'page',
|
|
28
|
-
title: '表单页面',
|
|
29
|
-
body: {
|
|
30
|
-
type: 'form',
|
|
31
|
-
mode: 'horizontal',
|
|
32
|
-
api: '/saveForm',
|
|
33
|
-
body: [
|
|
34
|
-
{
|
|
35
|
-
label: 'Name',
|
|
36
|
-
type: 'input-text',
|
|
37
|
-
name: 'name'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
label: 'Email',
|
|
41
|
-
type: 'input-email',
|
|
42
|
-
name: 'email'
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
const props = {};
|
|
48
|
-
const env = {
|
|
49
|
-
theme: 'antd'
|
|
50
|
-
};
|
|
51
|
-
let amisScoped = amis.embed('#root', amisJSON, props, env);
|
|
52
|
-
})();
|
|
53
|
-
</script>
|
|
54
|
-
Hello
|
|
55
|
-
{% endblock %}
|
package/views/react.liquid
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{% layout 'layout/theme.liquid' %}
|
|
2
|
-
|
|
3
|
-
{% block content %}
|
|
4
|
-
|
|
5
|
-
<!-- 引入 React 和 ReactDOM -->
|
|
6
|
-
<script src="{{config.unpkg.url}}/react@18/umd/react.development.js" crossorigin></script>
|
|
7
|
-
<script src="{{config.unpkg.url}}/react-dom@18/umd/react-dom.development.js" crossorigin></script>
|
|
8
|
-
<!-- Babel 编译器 -->
|
|
9
|
-
<script src="{{config.unpkg.url}}/@babel/standalone/babel.min.js"></script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<div id="root" class="w-full h-full"></div>
|
|
13
|
-
<script type="text/babel">
|
|
14
|
-
const App = () => {
|
|
15
|
-
return <h1>Hello, React in Browser!</h1>;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// 挂载到 DOM 上
|
|
19
|
-
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
20
|
-
root.render(<App />);
|
|
21
|
-
</script>
|
|
22
|
-
{% endblock %}
|