Skip to content

Commit e7014bb

Browse files
Merge branch 'dev' of https://github.com/lowcoder-org/lowcoder into calendar-licenc-key
2 parents ebfbdfd + 5295375 commit e7014bb

Some content is hidden

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

58 files changed

+1354
-169
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.0
1+
2.3.1

client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@
7070
},
7171
"dependencies": {
7272
"@lottiefiles/react-lottie-player": "^3.5.3",
73+
"@remixicon/react": "^4.1.1",
7374
"@testing-library/react": "^14.1.2",
7475
"@testing-library/user-event": "^14.5.1",
7576
"@types/styled-components": "^5.1.34",
7677
"antd-mobile": "^5.28.0",
7778
"chalk": "4",
7879
"number-precision": "^1.6.0",
7980
"react-player": "^2.11.0",
81+
"remixicon-react": "^1.0.0",
8082
"tui-image-editor": "^3.15.3"
8183
}
8284
}
Lines changed: 99 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,100 @@
1-
# lowcoder comp lib
1+
# Lowcoder Extra Components
2+
3+
This is the workspace for Lowcoder Extra Components like Calendar, Image Editor, Mermaid Charts and eCharts.
4+
5+
## Local Development preparation
6+
7+
Navigate your terminal or bash to your /root folder (lowcoder repository) to install Lowcoder Extra Components dependencies and the Lowcoder SDK
8+
9+
To develop with the Lowcoder Extra Components after you clone the Lowcoder Repository, first make sure the Lowcoder SDK is local built.
10+
11+
```bash
12+
cd client/packages/lowcoder-sdk
13+
yarn build
14+
```
215

316
## Start
417

5-
Start dev server to develop your comp lib.
18+
Now you can start the local dev server for Lowcoder Extra Components to develop and add your Component Plugin
619

720
```bash
21+
cd client/packages/lowcoder-comps
822
yarn start
23+
```
924

10-
# or
25+
The local dev server will build for roughly a minute and open then a Browser Window on http://localhost:9000/ with the Lowcoder Component Builder.
26+
27+
## Local development
28+
29+
After the local dev server is started, the Lowcoder Component Builder is prepared. A new browser window should open at http://localhost:9000 This is the Components Preview, which allows you to see your new component in action, as it would work in the Lowcoder Editor.
30+
31+
Data, methods and properties are visible and interactive, so you can test your Component during development. The view will get automatically refreshed.
32+
33+
The Lowcoder Component Builder makes the development & publishing of multiple individual components as bundle possible. Find the /src/comps folder in /lowcoder-comps. Here are existing components to find. It is suggested for new components to create a new folder. In the left navigation of the Components Preview you can switch between your components.
34+
35+
to see your component and include it in the processing on the development server, you have to do the folloiwing steps:
36+
37+
### modify /lowcoder-comps/package.json
38+
39+
```JSON
40+
"yournewcomponent": {
41+
"name": "Your new Component name",
42+
"icon": "./icons/your-icon.svg",
43+
"description": "A Component Plugin to ...",
44+
"category": "itemHandling",
45+
"layoutInfo": {
46+
"w": 6,
47+
"h": 30
48+
}
49+
}
50+
```
1151

12-
npm start
52+
53+
Please choose one category out of:
54+
55+
- dashboards
56+
- layout
57+
- forms
58+
- collaboration
59+
- projectmanagement
60+
- scheduling
61+
- documents
62+
- itemHandling
63+
- multimedia
64+
- integration
65+
66+
layoutInfo helps you to define the size (in grid-cells) of your Component in the grid for the very first moment, when a user drags your Component out of the components display on the right side in the Lowcoder Editor.
67+
68+
### modify /lowcoder-comps/src/index.ts
69+
70+
```JavaScript
71+
Add your Component for the exported members of Lowcoder Extra Components
72+
73+
import { ChartCompWithDefault } from "./comps/chartComp/chartComp";
74+
import { ImageEditorComp } from "./comps/imageEditorComp/index";
75+
import { CalendarComp } from "./comps/calendarComp/calendarComp";
76+
import { MermaidComp } from "comps/mermaidComp";
77+
78+
import { YourComponent } from "comps/yourComponentFolder/yourComponent";
79+
80+
export default {
81+
chart: ChartCompWithDefault,
82+
imageEditor: ImageEditorComp,
83+
calendar: CalendarComp,
84+
mermaid: MermaidComp,
85+
86+
yourcomponent: YourComponent,
87+
};
1388
```
89+
Now your Plugin should be visibe and displayed in the Lowcoder Component Builder at http://localhost:9000/
1490

1591
## Build
1692

17-
Build current comp lib into a .tgz file that you can upload it to the Lowcoder Comp Market.
93+
When you finish development and all tests, you can build the Components to use it in runtime.
1894

19-
Before build you should change the version in package.json file.
95+
This will build the current Component Plugins into a .tgz file that you can upload.
96+
97+
**Before build you should change the version in package.json file.**
2098

2199
```bash
22100
yarn build
@@ -25,3 +103,18 @@ yarn build
25103

26104
npm run build
27105
```
106+
107+
## How to publish a Component Plugin
108+
109+
With the following command you can publish the script to the NPM repository:
110+
111+
```bash
112+
yarn build --publish
113+
```
114+
115+
This command will publis the whole Lowcoder Extra Components bundle to [NPMjs](https://www.npmjs.com/)
116+
Make sure, you updated the Version of Lowcoder Comps before in /lowcoder-comps/package.json
117+
118+
## Contribute your Plugin
119+
120+
If you wish to contribute your plugin and persist it as general Lowcoder Extra Component, please raise a PR to our /dev branch in the Lowcoder Community-Edition Repository https://github.com/lowcoder-org/lowcoder

client/packages/lowcoder-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
"devDependencies": {
7373
"jest": "29.3.0",
74-
"vite": "^4.5.2",
74+
"vite": "^5.0.12",
7575
"vite-tsconfig-paths": "^3.6.0"
7676
}
7777
}

client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ export const Wrapper = styled.div<{
205205
flex-direction: inherit;
206206
}
207207
.fc-day-today .fc-daygrid-day-number {
208-
background-color: ${(props) => props.$theme?.primary};
208+
background-color: ${(props) => props.$theme?.primary ? props.$theme.primary : props.$style.background};
209209
color: ${(props) =>
210-
contrastText(props.$theme?.primary || "", props.$theme?.textDark, props.$theme?.textLight)};
210+
contrastText(props.$theme?.primary || "", props.$theme?.textDark || "#000000", props.$theme?.textLight || "#ffffff")};
211211
}
212212
.fc-daygrid-day-events {
213213
padding: 1px 0 5px 0;

client/packages/lowcoder-design/src/components/edit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const TextInput = styled(Input)<InputProps & { $hasPrefix?: boolean }>`
6868
border: none;
6969
padding: 0 8px 0 4px;
7070
padding-left: ${(props) => (props.$hasPrefix ? "28px" : "4px")};
71-
color: #ffffff;
71+
color: #444444;
7272
line-height: 28px;
7373
font-size: 14px;
7474

0 commit comments

Comments
 (0)