Skip to content

Commit 3a0d36c

Browse files
authored
Merge branch 'lowcoder-org:main' into patch-2
2 parents 0f631c4 + d8fd3d4 commit 3a0d36c

File tree

273 files changed

+13377
-1269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+13377
-1269
lines changed

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ stacks/
44
client/.yarn/cache/*.zip
55
server/node-service/.yarn/cache/*.zip
66
.metadata/
7+
.DS_Store

client/README.md

Lines changed: 82 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
#### Use prebuilt docker image
88

9-
Simply run below command to start a backend server.
9+
Simply run the below command to start a backend server.
1010

1111
```bash
1212
docker run -d --name lowcoder -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
1313
```
1414

15-
For more information, view our [docs](../docs/self-hosting)
15+
For more information, view our [docs](https://docs.lowcoder.cloud/lowcoder-documentation/setup-and-run/self-hosting)
1616

1717
#### Build Docker image from source
1818

19-
1. Check out source code and change to source dir.
20-
2. Use the command below to build Docker image :
19+
1. Check out the source code and change to source dir.
20+
2. Use the command below to build a Docker image :
2121

2222
```bash
2323
docker build -f ./deploy/docker/Dockerfile -t lowcoder-dev .
@@ -31,16 +31,89 @@ docker run -d --name lowcoder-dev -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks"
3131

3232
### Start develop
3333

34+
3435
1. Check out source code.
35-
2. Change to client dir in the repository root via cd client.
36-
3. Run yarn to install dependencies: .
37-
4. Start dev server: `LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start`.
36+
2. Change to **/client** dir in the source dir.
37+
38+
```bash
39+
cd client
40+
```
41+
3. Run yarn to install dependencies.
42+
43+
```bash
44+
yarn install
45+
```
46+
47+
4. Start dev server:
48+
49+
```bash
50+
LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start
51+
```
52+
3853
5. After dev server starts successfully, it will be automatically opened in the default browser.
3954

4055
### Before submitting a pull request
4156

4257
In addition, before submitting a pull request, please make sure the following is done:
4358

4459
1. If you’ve fixed a bug or added code that should be tested and add unit test suite.
45-
2. Run `yarn test` and ensure all test suites pass.
46-
3. If you add new dependency, use yarn workspace lowcoder some-package to make sure yarn.lock is also updated.
60+
2. Run test and ensure all test suites pass.
61+
62+
```bash
63+
yarn test
64+
```
65+
66+
3. If you add new dependency, use the yarn worspace tool to make sure yarn.lock is also updated.
67+
68+
```bash
69+
yarn workspace lowcoder <package name>
70+
```
71+
72+
### Developing and publishung UI components for Lowcoder
73+
74+
1. Initialization
75+
76+
Project initiation
77+
78+
```bash
79+
yarn create Lowcoder-plugin <your plugin name>
80+
```
81+
82+
Go to the project root
83+
84+
```bash
85+
cd my-plugin
86+
```
87+
88+
Start the development environment
89+
90+
```bash
91+
yarn start
92+
```
93+
94+
After executing yarn start, the browser is automatically opened and you enter the component development environment.
95+
Please find more information in our [docs](https://docs.lowcoder.cloud/lowcoder-documentation/lowcoder-extension/develop-ui-components-for-apps)
96+
97+
2. Export components
98+
99+
To export all the components, use src/index.ts, for example:
100+
101+
```bash
102+
import HelloWorldComp from "./HelloWorldComp";
103+
104+
export default {
105+
hello_world: HelloWorldComp,
106+
};
107+
```
108+
109+
import HelloWorldComp from "./HelloWorldComp";
110+
111+
3. Publish plugins
112+
113+
When you finish developing and testing the plugin, you can publish it into the npm registry. Login in to the npm registry locally, and then execute the following command:
114+
115+
```bash
116+
yarn build --publish
117+
```
118+
119+
You can check a code demo here: [Code Demo on Github](https://github.com/lowcoder-org/lowcoder/tree/main/client/packages/lowcoder-plugin-demo)

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.8
1+
2.1.5

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@types/qrcode.react": "^1.0.2",
3434
"@types/react-grid-layout": "^1.3.0",
3535
"@types/react-helmet": "^6.1.5",
36-
"@types/react-resizable": "^1.7.4",
36+
"@types/react-resizable": "^3.0.5",
3737
"@types/react-router-dom": "^5.3.2",
3838
"@types/shelljs": "^0.8.11",
3939
"@types/styled-components": "^5.1.19",

client/packages/lowcoder-cli/client.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ declare module "*.svg" {
88
React.SVGProps<SVGSVGElement> & { title?: string }
99
>;
1010

11-
const src: string;
12-
export default src;
11+
// const src: string;
12+
// export default src;
1313
}
1414

1515
declare module "*.md" {
@@ -31,9 +31,6 @@ declare var REACT_APP_LANGUAGES: string;
3131
declare var REACT_APP_COMMIT_ID: string;
3232
declare var REACT_APP_API_HOST: string;
3333
declare var LOWCODER_NODE_SERVICE_URL: string;
34-
declare var LOWCODER_SHOW_BRAND: string;
35-
declare var LOWCODER_CUSTOM_LOGO: string;
36-
declare var LOWCODER_CUSTOM_LOGO_SQUARE: string;
3734
declare var REACT_APP_ENV: string;
3835
declare var REACT_APP_BUILD_ID: string;
3936
declare var REACT_APP_LOG_LEVEL: string;
Lines changed: 18 additions & 0 deletions
Loading

client/packages/lowcoder-comps/jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ import config from "../../config/test/jest.config.js";
22

33
export default {
44
...config,
5+
setupFiles: [...config.setupFiles, 'jest-canvas-mock'],
56
};

client/packages/lowcoder-comps/package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "0.0.13",
3+
"version": "0.0.18",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {
77
"@fullcalendar/core": "^6.1.6",
88
"@fullcalendar/daygrid": "^6.1.6",
99
"@fullcalendar/interaction": "^6.1.6",
10-
"@fullcalendar/list": "^6.1.6",
10+
"@fullcalendar/list": "^6.1.9",
1111
"@fullcalendar/moment": "^6.1.6",
1212
"@fullcalendar/react": "^6.1.6",
1313
"@fullcalendar/timegrid": "^6.1.6",
1414
"@types/react": "17",
1515
"@types/react-dom": "17",
1616
"big.js": "^6.2.1",
1717
"echarts-extension-gmap": "^1.6.0",
18+
"echarts-wordcloud": "^2.1.0",
1819
"lowcoder-cli": "workspace:^",
1920
"lowcoder-sdk": "workspace:^",
2021
"mermaid": "^10.2.4",
@@ -29,16 +30,16 @@
2930
"name": "Chart",
3031
"icon": "./icons/icon-chart.svg",
3132
"layoutInfo": {
32-
"w": 11,
33-
"h": 35
33+
"w": 15,
34+
"h": 40
3435
}
3536
},
3637
"imageEditor": {
3738
"name": "Image Editor",
3839
"icon": "./icons/icon-chart.svg",
3940
"layoutInfo": {
4041
"w": 15,
41-
"h": 60
42+
"h": 40
4243
}
4344
},
4445
"calendar": {
@@ -48,6 +49,14 @@
4849
"w": 15,
4950
"h": 60
5051
}
52+
},
53+
"mermaid": {
54+
"name": "Mermaid",
55+
"icon": "./icons/mermaidchart.svg",
56+
"layoutInfo": {
57+
"w": 15,
58+
"h": 40
59+
}
5160
}
5261
}
5362
},
@@ -60,6 +69,7 @@
6069
},
6170
"devDependencies": {
6271
"jest": "29.3.0",
72+
"jest-canvas-mock": "^2.5.2",
6373
"vite": "^4.3.9",
6474
"vite-tsconfig-paths": "^3.6.0"
6575
}

0 commit comments

Comments
 (0)