@gant-lowcode/plugin-code-generator 3.0.5 → 3.0.6
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/LICENSE +21 -21
- package/README.md +23 -23
- package/es/components/code-gen-action/index.less +20 -20
- package/es/components/code-gen-preview/index.less +16 -16
- package/es/components/code-gen-result/index.less +19 -19
- package/es/components/codesandbox-preview/index.less +18 -18
- package/es/components/file-tree/index.less +54 -54
- package/es/components/file-type-icon/index.less +77 -77
- package/es/components/sources-view/index.less +12 -12
- package/lib/components/code-gen-action/index.less +20 -20
- package/lib/components/code-gen-preview/index.less +16 -16
- package/lib/components/code-gen-result/index.less +19 -19
- package/lib/components/codesandbox-preview/index.less +18 -18
- package/lib/components/file-tree/index.less +54 -54
- package/lib/components/file-type-icon/index.less +77 -77
- package/lib/components/sources-view/index.less +12 -12
- package/package.json +4 -4
- package/es/components/code-gen-action/index.d.ts +0 -7
- package/es/components/code-gen-preview/fixPreviewCode.d.ts +0 -2
- package/es/components/code-gen-preview/index.d.ts +0 -9
- package/es/components/code-gen-result/index.d.ts +0 -14
- package/es/components/codesandbox-preview/index.d.ts +0 -3
- package/es/components/file-tree/index.d.ts +0 -20
- package/es/components/file-type-icon/index.d.ts +0 -6
- package/es/components/sources-view/index.d.ts +0 -7
- package/es/index.d.ts +0 -27
- package/es/types/index.d.ts +0 -17
- package/lib/components/code-gen-action/index.d.ts +0 -7
- package/lib/components/code-gen-preview/fixPreviewCode.d.ts +0 -2
- package/lib/components/code-gen-preview/index.d.ts +0 -9
- package/lib/components/code-gen-result/index.d.ts +0 -14
- package/lib/components/codesandbox-preview/index.d.ts +0 -3
- package/lib/components/file-tree/index.d.ts +0 -20
- package/lib/components/file-type-icon/index.d.ts +0 -6
- package/lib/components/sources-view/index.d.ts +0 -7
- package/lib/index.d.ts +0 -27
- package/lib/types/index.d.ts +0 -17
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Alibaba
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Alibaba
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
# Rslib Project
|
|
2
|
-
|
|
3
|
-
## Setup
|
|
4
|
-
|
|
5
|
-
Install the dependencies:
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
pnpm install
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Get Started
|
|
12
|
-
|
|
13
|
-
Build the library:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
pnpm build
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Build the library in watch mode:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
pnpm dev
|
|
23
|
-
```
|
|
1
|
+
# Rslib Project
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
Install the dependencies:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Get Started
|
|
12
|
+
|
|
13
|
+
Build the library:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm build
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build the library in watch mode:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm dev
|
|
23
|
+
```
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.code-gen-plugin-loading {
|
|
2
|
-
width: 100%;
|
|
3
|
-
margin: 2em auto;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.code-gen-drawer {
|
|
7
|
-
.ant-drawer-body {
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.code-gen-plugin-result {
|
|
14
|
-
width: 100%;
|
|
15
|
-
.next-message-error {
|
|
16
|
-
.next-message-content {
|
|
17
|
-
white-space: pre-wrap;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
.code-gen-plugin-loading {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin: 2em auto;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.code-gen-drawer {
|
|
7
|
+
.ant-drawer-body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.code-gen-plugin-result {
|
|
14
|
+
width: 100%;
|
|
15
|
+
.next-message-error {
|
|
16
|
+
.next-message-content {
|
|
17
|
+
white-space: pre-wrap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.code-gen-preview-tabs {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
height: 100%;
|
|
5
|
-
|
|
6
|
-
.next-tabs-bar {
|
|
7
|
-
flex-shrink: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.next-tabs-content {
|
|
11
|
-
flex: 1;
|
|
12
|
-
.next-tabs-tabpane {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
.code-gen-preview-tabs {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.next-tabs-bar {
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.next-tabs-content {
|
|
11
|
+
flex: 1;
|
|
12
|
+
.next-tabs-tabpane {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.code-gen-tabs {
|
|
2
|
-
height: 100%;
|
|
3
|
-
|
|
4
|
-
.ant-tabs-nav {
|
|
5
|
-
margin: 0;
|
|
6
|
-
}
|
|
7
|
-
.ant-tabs-content, .ant-tabs-tabpane {
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.code-gen-source-view {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.source-view-header {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 18px;
|
|
19
|
-
right: 20px;
|
|
1
|
+
.code-gen-tabs {
|
|
2
|
+
height: 100%;
|
|
3
|
+
|
|
4
|
+
.ant-tabs-nav {
|
|
5
|
+
margin: 0;
|
|
6
|
+
}
|
|
7
|
+
.ant-tabs-content, .ant-tabs-tabpane {
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.code-gen-source-view {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.source-view-header {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 18px;
|
|
19
|
+
right: 20px;
|
|
20
20
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.code-gen-plugin-code-sandbox-preview {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
align-items: center;
|
|
5
|
-
align-content: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
justify-items: center;
|
|
8
|
-
height: 100%;
|
|
9
|
-
|
|
10
|
-
iframe {
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
min-height: 300px;
|
|
14
|
-
border: 0;
|
|
15
|
-
border-radius: 0;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
.code-gen-plugin-code-sandbox-preview {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
align-content: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
justify-items: center;
|
|
8
|
+
height: 100%;
|
|
9
|
+
|
|
10
|
+
iframe {
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
min-height: 300px;
|
|
14
|
+
border: 0;
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
.code-file-tree {
|
|
2
|
-
white-space: nowrap;
|
|
3
|
-
|
|
4
|
-
.tree-node {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
user-select: none;
|
|
9
|
-
|
|
10
|
-
&:hover,
|
|
11
|
-
&.tree-node-selected {
|
|
12
|
-
background-color: rgba(207, 208, 209, 1);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.tree-item {
|
|
18
|
-
position: absolute;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: left;
|
|
22
|
-
|
|
23
|
-
& > i {
|
|
24
|
-
margin-right: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.label-name {
|
|
28
|
-
flex: 1;
|
|
29
|
-
min-width: 0;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
text-overflow: ellipsis;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tree-folder::after {
|
|
36
|
-
content: "";
|
|
37
|
-
display: block;
|
|
38
|
-
width: 0;
|
|
39
|
-
height: 0;
|
|
40
|
-
margin-left: 20px;
|
|
41
|
-
border-top: 6px solid rgba(0, 0, 0, 0.7);
|
|
42
|
-
border-right: 6px solid transparent;
|
|
43
|
-
border-left: 6px solid transparent;
|
|
44
|
-
opacity: 0.7;
|
|
45
|
-
position: absolute;
|
|
46
|
-
left: -36px;
|
|
47
|
-
transition: transform 0.3s;
|
|
48
|
-
transform: translate(0, 0);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.tree-item-expanded::after {
|
|
52
|
-
transform: rotate(-90deg);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
.code-file-tree {
|
|
2
|
+
white-space: nowrap;
|
|
3
|
+
|
|
4
|
+
.tree-node {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
user-select: none;
|
|
9
|
+
|
|
10
|
+
&:hover,
|
|
11
|
+
&.tree-node-selected {
|
|
12
|
+
background-color: rgba(207, 208, 209, 1);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tree-item {
|
|
18
|
+
position: absolute;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: left;
|
|
22
|
+
|
|
23
|
+
& > i {
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.label-name {
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tree-folder::after {
|
|
36
|
+
content: "";
|
|
37
|
+
display: block;
|
|
38
|
+
width: 0;
|
|
39
|
+
height: 0;
|
|
40
|
+
margin-left: 20px;
|
|
41
|
+
border-top: 6px solid rgba(0, 0, 0, 0.7);
|
|
42
|
+
border-right: 6px solid transparent;
|
|
43
|
+
border-left: 6px solid transparent;
|
|
44
|
+
opacity: 0.7;
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: -36px;
|
|
47
|
+
transition: transform 0.3s;
|
|
48
|
+
transform: translate(0, 0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tree-item-expanded::after {
|
|
52
|
+
transform: rotate(-90deg);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: "file-types-iconfont"; /* Project id 4778352 */
|
|
3
|
-
/* Color fonts */
|
|
4
|
-
src:
|
|
5
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff2?t=1734587113843') format('woff2'),
|
|
6
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff?t=1734587113843') format('woff'),
|
|
7
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.ttf?t=1734587113843') format('truetype');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.file-types-iconfont {
|
|
11
|
-
font-family: "file-types-iconfont" !important;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
-webkit-font-smoothing: antialiased;
|
|
15
|
-
-moz-osx-font-smoothing: grayscale;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.file-types-icon-css:before {
|
|
19
|
-
content: "\e61e";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.file-types-icon-editorconfig:before {
|
|
23
|
-
content: "\e628";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.file-types-icon-eslintignore:before {
|
|
27
|
-
content: "\e62a";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.file-types-icon-gitignore:before {
|
|
31
|
-
content: "\e62d";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.file-types-icon-git:before {
|
|
35
|
-
content: "\e897";
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.file-types-icon-html:before {
|
|
39
|
-
content: "\e68c";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.file-types-icon-tsconfig:before {
|
|
43
|
-
content: "\e622";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.file-types-icon-less:before {
|
|
47
|
-
content: "\e63d";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.file-types-icon-scss:before {
|
|
51
|
-
content: "\e657";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.file-types-icon-json:before {
|
|
55
|
-
content: "\e7bd";
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.file-types-icon-text:before {
|
|
59
|
-
content: "\e734";
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.file-types-icon-js:before {
|
|
63
|
-
content: "\e63b";
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.file-types-icon-jsx:before {
|
|
67
|
-
content: "\e63c";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.file-types-icon-ts:before {
|
|
71
|
-
content: "\e664";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.file-types-icon-tsx:before {
|
|
75
|
-
content: "\e665";
|
|
76
|
-
}
|
|
77
|
-
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "file-types-iconfont"; /* Project id 4778352 */
|
|
3
|
+
/* Color fonts */
|
|
4
|
+
src:
|
|
5
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff2?t=1734587113843') format('woff2'),
|
|
6
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff?t=1734587113843') format('woff'),
|
|
7
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.ttf?t=1734587113843') format('truetype');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.file-types-iconfont {
|
|
11
|
+
font-family: "file-types-iconfont" !important;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.file-types-icon-css:before {
|
|
19
|
+
content: "\e61e";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.file-types-icon-editorconfig:before {
|
|
23
|
+
content: "\e628";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.file-types-icon-eslintignore:before {
|
|
27
|
+
content: "\e62a";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.file-types-icon-gitignore:before {
|
|
31
|
+
content: "\e62d";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.file-types-icon-git:before {
|
|
35
|
+
content: "\e897";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.file-types-icon-html:before {
|
|
39
|
+
content: "\e68c";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.file-types-icon-tsconfig:before {
|
|
43
|
+
content: "\e622";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.file-types-icon-less:before {
|
|
47
|
+
content: "\e63d";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.file-types-icon-scss:before {
|
|
51
|
+
content: "\e657";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.file-types-icon-json:before {
|
|
55
|
+
content: "\e7bd";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.file-types-icon-text:before {
|
|
59
|
+
content: "\e734";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.file-types-icon-js:before {
|
|
63
|
+
content: "\e63b";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.file-types-icon-jsx:before {
|
|
67
|
+
content: "\e63c";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.file-types-icon-ts:before {
|
|
71
|
+
content: "\e664";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.file-types-icon-tsx:before {
|
|
75
|
+
content: "\e665";
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.sources-panes {
|
|
2
|
-
.file-tree-pane {
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
border-right: 1px solid #e0e0e0;
|
|
5
|
-
}
|
|
6
|
-
.source-code-pane {
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow-y: auto;
|
|
9
|
-
height: 100%;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
.sources-panes {
|
|
2
|
+
.file-tree-pane {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
border-right: 1px solid #e0e0e0;
|
|
5
|
+
}
|
|
6
|
+
.source-code-pane {
|
|
7
|
+
flex: 1;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.code-gen-plugin-loading {
|
|
2
|
-
width: 100%;
|
|
3
|
-
margin: 2em auto;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.code-gen-drawer {
|
|
7
|
-
.ant-drawer-body {
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.code-gen-plugin-result {
|
|
14
|
-
width: 100%;
|
|
15
|
-
.next-message-error {
|
|
16
|
-
.next-message-content {
|
|
17
|
-
white-space: pre-wrap;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
.code-gen-plugin-loading {
|
|
2
|
+
width: 100%;
|
|
3
|
+
margin: 2em auto;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.code-gen-drawer {
|
|
7
|
+
.ant-drawer-body {
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.code-gen-plugin-result {
|
|
14
|
+
width: 100%;
|
|
15
|
+
.next-message-error {
|
|
16
|
+
.next-message-content {
|
|
17
|
+
white-space: pre-wrap;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
.code-gen-preview-tabs {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
height: 100%;
|
|
5
|
-
|
|
6
|
-
.next-tabs-bar {
|
|
7
|
-
flex-shrink: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.next-tabs-content {
|
|
11
|
-
flex: 1;
|
|
12
|
-
.next-tabs-tabpane {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
.code-gen-preview-tabs {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
.next-tabs-bar {
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.next-tabs-content {
|
|
11
|
+
flex: 1;
|
|
12
|
+
.next-tabs-tabpane {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.code-gen-tabs {
|
|
2
|
-
height: 100%;
|
|
3
|
-
|
|
4
|
-
.ant-tabs-nav {
|
|
5
|
-
margin: 0;
|
|
6
|
-
}
|
|
7
|
-
.ant-tabs-content, .ant-tabs-tabpane {
|
|
8
|
-
height: 100%;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.code-gen-source-view {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.source-view-header {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 18px;
|
|
19
|
-
right: 20px;
|
|
1
|
+
.code-gen-tabs {
|
|
2
|
+
height: 100%;
|
|
3
|
+
|
|
4
|
+
.ant-tabs-nav {
|
|
5
|
+
margin: 0;
|
|
6
|
+
}
|
|
7
|
+
.ant-tabs-content, .ant-tabs-tabpane {
|
|
8
|
+
height: 100%;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.code-gen-source-view {
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.source-view-header {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 18px;
|
|
19
|
+
right: 20px;
|
|
20
20
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
.code-gen-plugin-code-sandbox-preview {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
align-items: center;
|
|
5
|
-
align-content: center;
|
|
6
|
-
justify-content: center;
|
|
7
|
-
justify-items: center;
|
|
8
|
-
height: 100%;
|
|
9
|
-
|
|
10
|
-
iframe {
|
|
11
|
-
width: 100%;
|
|
12
|
-
height: 100%;
|
|
13
|
-
min-height: 300px;
|
|
14
|
-
border: 0;
|
|
15
|
-
border-radius: 0;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
.code-gen-plugin-code-sandbox-preview {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
align-content: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
justify-items: center;
|
|
8
|
+
height: 100%;
|
|
9
|
+
|
|
10
|
+
iframe {
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
min-height: 300px;
|
|
14
|
+
border: 0;
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
.code-file-tree {
|
|
2
|
-
white-space: nowrap;
|
|
3
|
-
|
|
4
|
-
.tree-node {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
user-select: none;
|
|
9
|
-
|
|
10
|
-
&:hover,
|
|
11
|
-
&.tree-node-selected {
|
|
12
|
-
background-color: rgba(207, 208, 209, 1);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.tree-item {
|
|
18
|
-
position: absolute;
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
justify-content: left;
|
|
22
|
-
|
|
23
|
-
& > i {
|
|
24
|
-
margin-right: 8px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.label-name {
|
|
28
|
-
flex: 1;
|
|
29
|
-
min-width: 0;
|
|
30
|
-
overflow: hidden;
|
|
31
|
-
text-overflow: ellipsis;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.tree-folder::after {
|
|
36
|
-
content: "";
|
|
37
|
-
display: block;
|
|
38
|
-
width: 0;
|
|
39
|
-
height: 0;
|
|
40
|
-
margin-left: 20px;
|
|
41
|
-
border-top: 6px solid rgba(0, 0, 0, 0.7);
|
|
42
|
-
border-right: 6px solid transparent;
|
|
43
|
-
border-left: 6px solid transparent;
|
|
44
|
-
opacity: 0.7;
|
|
45
|
-
position: absolute;
|
|
46
|
-
left: -36px;
|
|
47
|
-
transition: transform 0.3s;
|
|
48
|
-
transform: translate(0, 0);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.tree-item-expanded::after {
|
|
52
|
-
transform: rotate(-90deg);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
.code-file-tree {
|
|
2
|
+
white-space: nowrap;
|
|
3
|
+
|
|
4
|
+
.tree-node {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
user-select: none;
|
|
9
|
+
|
|
10
|
+
&:hover,
|
|
11
|
+
&.tree-node-selected {
|
|
12
|
+
background-color: rgba(207, 208, 209, 1);
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tree-item {
|
|
18
|
+
position: absolute;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: left;
|
|
22
|
+
|
|
23
|
+
& > i {
|
|
24
|
+
margin-right: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.label-name {
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-width: 0;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
text-overflow: ellipsis;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.tree-folder::after {
|
|
36
|
+
content: "";
|
|
37
|
+
display: block;
|
|
38
|
+
width: 0;
|
|
39
|
+
height: 0;
|
|
40
|
+
margin-left: 20px;
|
|
41
|
+
border-top: 6px solid rgba(0, 0, 0, 0.7);
|
|
42
|
+
border-right: 6px solid transparent;
|
|
43
|
+
border-left: 6px solid transparent;
|
|
44
|
+
opacity: 0.7;
|
|
45
|
+
position: absolute;
|
|
46
|
+
left: -36px;
|
|
47
|
+
transition: transform 0.3s;
|
|
48
|
+
transform: translate(0, 0);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tree-item-expanded::after {
|
|
52
|
+
transform: rotate(-90deg);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
@font-face {
|
|
2
|
-
font-family: "file-types-iconfont"; /* Project id 4778352 */
|
|
3
|
-
/* Color fonts */
|
|
4
|
-
src:
|
|
5
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff2?t=1734587113843') format('woff2'),
|
|
6
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff?t=1734587113843') format('woff'),
|
|
7
|
-
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.ttf?t=1734587113843') format('truetype');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.file-types-iconfont {
|
|
11
|
-
font-family: "file-types-iconfont" !important;
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
font-style: normal;
|
|
14
|
-
-webkit-font-smoothing: antialiased;
|
|
15
|
-
-moz-osx-font-smoothing: grayscale;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.file-types-icon-css:before {
|
|
19
|
-
content: "\e61e";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.file-types-icon-editorconfig:before {
|
|
23
|
-
content: "\e628";
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.file-types-icon-eslintignore:before {
|
|
27
|
-
content: "\e62a";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.file-types-icon-gitignore:before {
|
|
31
|
-
content: "\e62d";
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.file-types-icon-git:before {
|
|
35
|
-
content: "\e897";
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.file-types-icon-html:before {
|
|
39
|
-
content: "\e68c";
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.file-types-icon-tsconfig:before {
|
|
43
|
-
content: "\e622";
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.file-types-icon-less:before {
|
|
47
|
-
content: "\e63d";
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.file-types-icon-scss:before {
|
|
51
|
-
content: "\e657";
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.file-types-icon-json:before {
|
|
55
|
-
content: "\e7bd";
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.file-types-icon-text:before {
|
|
59
|
-
content: "\e734";
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.file-types-icon-js:before {
|
|
63
|
-
content: "\e63b";
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.file-types-icon-jsx:before {
|
|
67
|
-
content: "\e63c";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.file-types-icon-ts:before {
|
|
71
|
-
content: "\e664";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.file-types-icon-tsx:before {
|
|
75
|
-
content: "\e665";
|
|
76
|
-
}
|
|
77
|
-
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "file-types-iconfont"; /* Project id 4778352 */
|
|
3
|
+
/* Color fonts */
|
|
4
|
+
src:
|
|
5
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff2?t=1734587113843') format('woff2'),
|
|
6
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.woff?t=1734587113843') format('woff'),
|
|
7
|
+
url('//at.alicdn.com/t/c/font_4778352_c4wg236tblh.ttf?t=1734587113843') format('truetype');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.file-types-iconfont {
|
|
11
|
+
font-family: "file-types-iconfont" !important;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.file-types-icon-css:before {
|
|
19
|
+
content: "\e61e";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.file-types-icon-editorconfig:before {
|
|
23
|
+
content: "\e628";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.file-types-icon-eslintignore:before {
|
|
27
|
+
content: "\e62a";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.file-types-icon-gitignore:before {
|
|
31
|
+
content: "\e62d";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.file-types-icon-git:before {
|
|
35
|
+
content: "\e897";
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.file-types-icon-html:before {
|
|
39
|
+
content: "\e68c";
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.file-types-icon-tsconfig:before {
|
|
43
|
+
content: "\e622";
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.file-types-icon-less:before {
|
|
47
|
+
content: "\e63d";
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.file-types-icon-scss:before {
|
|
51
|
+
content: "\e657";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.file-types-icon-json:before {
|
|
55
|
+
content: "\e7bd";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.file-types-icon-text:before {
|
|
59
|
+
content: "\e734";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.file-types-icon-js:before {
|
|
63
|
+
content: "\e63b";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.file-types-icon-jsx:before {
|
|
67
|
+
content: "\e63c";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.file-types-icon-ts:before {
|
|
71
|
+
content: "\e664";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.file-types-icon-tsx:before {
|
|
75
|
+
content: "\e665";
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
.sources-panes {
|
|
2
|
-
.file-tree-pane {
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
border-right: 1px solid #e0e0e0;
|
|
5
|
-
}
|
|
6
|
-
.source-code-pane {
|
|
7
|
-
flex: 1;
|
|
8
|
-
overflow-y: auto;
|
|
9
|
-
height: 100%;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
1
|
+
.sources-panes {
|
|
2
|
+
.file-tree-pane {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
border-right: 1px solid #e0e0e0;
|
|
5
|
+
}
|
|
6
|
+
.source-code-pane {
|
|
7
|
+
flex: 1;
|
|
8
|
+
overflow-y: auto;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gant-lowcode/plugin-code-generator",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.6",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"types": "es/index.d.ts",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"react-window": "^1.8.10",
|
|
45
45
|
"semver": "^7.6.3",
|
|
46
46
|
"string-natural-compare": "^3.0.1",
|
|
47
|
-
"@gant-lowcode/code-generator": "2.0.4",
|
|
48
|
-
"@gant-lowcode/lowcode-types": "3.0.4",
|
|
49
|
-
"@gant-lowcode/eslint-config": "2.0.4",
|
|
50
47
|
"@gant-lowcode/lowcode-plugin-base-monaco-editor": "3.0.4",
|
|
48
|
+
"@gant-lowcode/eslint-config": "2.0.4",
|
|
49
|
+
"@gant-lowcode/code-generator": "3.0.0",
|
|
50
|
+
"@gant-lowcode/lowcode-types": "3.0.4",
|
|
51
51
|
"@gant-lowcode/typescript-config": "2.0.4"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IPublicTypeProjectSchema, IPublicModelPluginContext } from "@gant-lowcode/lowcode-types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare function CodeGenActionBtn({ ctx }: {
|
|
5
|
-
ctx: IPublicModelPluginContext;
|
|
6
|
-
}): import("react").JSX.Element;
|
|
7
|
-
export declare function fixSchema(schema: IPublicTypeProjectSchema): Promise<IPublicTypeProjectSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GravityCode } from "../../types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare type CodeGenPreviewProps = {
|
|
5
|
-
code: GravityCode | null;
|
|
6
|
-
height: string | number;
|
|
7
|
-
refresh: string | number;
|
|
8
|
-
};
|
|
9
|
-
export declare function CodeGenPreview(props: CodeGenPreviewProps): import("react").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IPublicTypeProjectSchema } from "@gant-lowcode/lowcode-types";
|
|
3
|
-
import { Result } from "@gant-lowcode/code-generator/standalone-loader";
|
|
4
|
-
import "./index.less";
|
|
5
|
-
interface CodeGenResultProps {
|
|
6
|
-
result: Result | null | undefined;
|
|
7
|
-
schema: IPublicTypeProjectSchema | null;
|
|
8
|
-
originalSchema: IPublicTypeProjectSchema | null;
|
|
9
|
-
}
|
|
10
|
-
export interface CodeGenResultRef {
|
|
11
|
-
codeZip: () => Promise<Blob>;
|
|
12
|
-
}
|
|
13
|
-
export declare const CodeGenResult: import("react").ForwardRefExoticComponent<CodeGenResultProps & import("react").RefAttributes<CodeGenResultRef>>;
|
|
14
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CodeModules } from "../../types";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
interface FileTreeProps {
|
|
4
|
-
modules: CodeModules;
|
|
5
|
-
onSelect?(key: string): void;
|
|
6
|
-
selectedKeys?: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare const FileTree: (props: FileTreeProps) => JSX.Element;
|
|
9
|
-
declare type TreeNode = {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
folder: boolean;
|
|
13
|
-
depth: number;
|
|
14
|
-
expanded: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare function createFlattenTree(data: Record<string, {
|
|
17
|
-
fpath: string;
|
|
18
|
-
code: string;
|
|
19
|
-
}>, expandedKeys: string[]): TreeNode[];
|
|
20
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "@gant-lowcode/lowcode-plugin-base-monaco-editor/lib/style.js";
|
|
2
|
-
import { GravityCode } from "../../types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare function SourcesView({ code, onCodeChange, }: {
|
|
5
|
-
code: GravityCode;
|
|
6
|
-
onCodeChange: (code: GravityCode) => void;
|
|
7
|
-
}): JSX.Element;
|
package/es/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { IPublicModelPluginContext } from "@gant-lowcode/lowcode-types";
|
|
2
|
-
export declare type CodeGenPluginOptions = {
|
|
3
|
-
/** 是否要禁用出码的动作按钮(默认: 否) */
|
|
4
|
-
disableCodeGenActionBtn?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const plugin: {
|
|
7
|
-
(ctx: IPublicModelPluginContext, options?: CodeGenPluginOptions): {
|
|
8
|
-
exports(): {
|
|
9
|
-
generateCode: any;
|
|
10
|
-
};
|
|
11
|
-
init(): Promise<void>;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
};
|
|
14
|
-
pluginName: string;
|
|
15
|
-
meta: {
|
|
16
|
-
dependencies: any[];
|
|
17
|
-
preferenceDeclaration: {
|
|
18
|
-
title: string;
|
|
19
|
-
properties: {
|
|
20
|
-
key: string;
|
|
21
|
-
type: string;
|
|
22
|
-
description: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default plugin;
|
package/es/types/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare type SyncCodeGenResult = {
|
|
2
|
-
type: "SYNC_RESULT";
|
|
3
|
-
sourceFiles: Array<{
|
|
4
|
-
pathName: string;
|
|
5
|
-
content: string;
|
|
6
|
-
}>;
|
|
7
|
-
};
|
|
8
|
-
export declare type CodeModules = Record<string, {
|
|
9
|
-
entry?: 1;
|
|
10
|
-
packagejson?: 1;
|
|
11
|
-
code: string;
|
|
12
|
-
fpath: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare type GravityCode = {
|
|
15
|
-
type: string;
|
|
16
|
-
modules: CodeModules;
|
|
17
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IPublicTypeProjectSchema, IPublicModelPluginContext } from "@gant-lowcode/lowcode-types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare function CodeGenActionBtn({ ctx }: {
|
|
5
|
-
ctx: IPublicModelPluginContext;
|
|
6
|
-
}): import("react").JSX.Element;
|
|
7
|
-
export declare function fixSchema(schema: IPublicTypeProjectSchema): Promise<IPublicTypeProjectSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { GravityCode } from "../../types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare type CodeGenPreviewProps = {
|
|
5
|
-
code: GravityCode | null;
|
|
6
|
-
height: string | number;
|
|
7
|
-
refresh: string | number;
|
|
8
|
-
};
|
|
9
|
-
export declare function CodeGenPreview(props: CodeGenPreviewProps): import("react").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { IPublicTypeProjectSchema } from "@gant-lowcode/lowcode-types";
|
|
3
|
-
import { Result } from "@gant-lowcode/code-generator/standalone-loader";
|
|
4
|
-
import "./index.less";
|
|
5
|
-
interface CodeGenResultProps {
|
|
6
|
-
result: Result | null | undefined;
|
|
7
|
-
schema: IPublicTypeProjectSchema | null;
|
|
8
|
-
originalSchema: IPublicTypeProjectSchema | null;
|
|
9
|
-
}
|
|
10
|
-
export interface CodeGenResultRef {
|
|
11
|
-
codeZip: () => Promise<Blob>;
|
|
12
|
-
}
|
|
13
|
-
export declare const CodeGenResult: import("react").ForwardRefExoticComponent<CodeGenResultProps & import("react").RefAttributes<CodeGenResultRef>>;
|
|
14
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CodeModules } from "../../types";
|
|
2
|
-
import "./index.less";
|
|
3
|
-
interface FileTreeProps {
|
|
4
|
-
modules: CodeModules;
|
|
5
|
-
onSelect?(key: string): void;
|
|
6
|
-
selectedKeys?: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare const FileTree: (props: FileTreeProps) => JSX.Element;
|
|
9
|
-
declare type TreeNode = {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
folder: boolean;
|
|
13
|
-
depth: number;
|
|
14
|
-
expanded: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare function createFlattenTree(data: Record<string, {
|
|
17
|
-
fpath: string;
|
|
18
|
-
code: string;
|
|
19
|
-
}>, expandedKeys: string[]): TreeNode[];
|
|
20
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "@gant-lowcode/lowcode-plugin-base-monaco-editor/lib/style.js";
|
|
2
|
-
import { GravityCode } from "../../types";
|
|
3
|
-
import "./index.less";
|
|
4
|
-
export declare function SourcesView({ code, onCodeChange, }: {
|
|
5
|
-
code: GravityCode;
|
|
6
|
-
onCodeChange: (code: GravityCode) => void;
|
|
7
|
-
}): JSX.Element;
|
package/lib/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { IPublicModelPluginContext } from "@gant-lowcode/lowcode-types";
|
|
2
|
-
export declare type CodeGenPluginOptions = {
|
|
3
|
-
/** 是否要禁用出码的动作按钮(默认: 否) */
|
|
4
|
-
disableCodeGenActionBtn?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare const plugin: {
|
|
7
|
-
(ctx: IPublicModelPluginContext, options?: CodeGenPluginOptions): {
|
|
8
|
-
exports(): {
|
|
9
|
-
generateCode: any;
|
|
10
|
-
};
|
|
11
|
-
init(): Promise<void>;
|
|
12
|
-
destroy(): void;
|
|
13
|
-
};
|
|
14
|
-
pluginName: string;
|
|
15
|
-
meta: {
|
|
16
|
-
dependencies: any[];
|
|
17
|
-
preferenceDeclaration: {
|
|
18
|
-
title: string;
|
|
19
|
-
properties: {
|
|
20
|
-
key: string;
|
|
21
|
-
type: string;
|
|
22
|
-
description: string;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default plugin;
|
package/lib/types/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare type SyncCodeGenResult = {
|
|
2
|
-
type: "SYNC_RESULT";
|
|
3
|
-
sourceFiles: Array<{
|
|
4
|
-
pathName: string;
|
|
5
|
-
content: string;
|
|
6
|
-
}>;
|
|
7
|
-
};
|
|
8
|
-
export declare type CodeModules = Record<string, {
|
|
9
|
-
entry?: 1;
|
|
10
|
-
packagejson?: 1;
|
|
11
|
-
code: string;
|
|
12
|
-
fpath: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare type GravityCode = {
|
|
15
|
-
type: string;
|
|
16
|
-
modules: CodeModules;
|
|
17
|
-
};
|