Skip to content

Commit 82e21ec

Browse files
authored
Merge pull request #643 from lowcoder-org/dev
Dev -> Main Release 2.3.0 preparation
2 parents b7a9b43 + 850642e commit 82e21ec

File tree

2,796 files changed

+4371
-378
lines changed

Some content is hidden

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

2,796 files changed

+4371
-378
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ client/packages/lowcoder-plugin-demo/.yarn/install-state.gz
1010
client/packages/lowcoder-plugin-demo/yarn.lock
1111
client/packages/lowcoder-plugin-demo/.yarn/cache/@types-node-npm-16.18.68-56f72825c0-094ae9ed80.zip
1212
.DS_Store
13+
.DS_Store

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
44
<div align="center">
55
<h1 style="border-bottom: none; margin-bottom: 0">Lowcoder</h1>
6-
<h3 style="margin-top: 0">Lowcoder is the best Retool, Appsmith or Tooljet Alternative.</h3>
6+
<h3 style="margin-top: 0">This is the only Platform, which closes the gap between App Development, Website Development and Slide-Presentations.</h3>
77
<p>
8-
Create internal and external software applications for your Company and your Customers with minimal coding experience.
8+
Create software applications (internal and customer-facing!) and Meeting/Collaboration tools for your Company and your Customers with minimal coding experience.
99
</p>
10+
<h3 style="margin-top: 0">Lowcoder is the best Retool, Appsmith or Tooljet Alternative.</h3>
1011
</div>
1112

1213
<img src="https://1167272343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjNgeI0mUzgw6Re92iTOw%2Fuploads%2FnwXJC1XBqP2MvTQitPyo%2FApp%20Editor%20%7C%20Main%20Screeen%20clean.png?alt=media&token=e5fba81b-82a7-4c0e-a15d-baa781d5b13a"/>
1314

1415
## 📢 Use Lowcoder in 3 steps
1516
1. Connect to any data sources or APIs.
16-
2. Build UI with 50+ components.
17+
2. Build UI with 60+ components.
1718
3. Share with colleagues and customers.
1819

1920
## 💡 Why Lowcoder
@@ -52,7 +53,7 @@ Lowcoder wants to take a step forward. More specifically, Lowcoder is:
5253
- build a Meeting tool with peace in mind. Blue buttons - ok. Red corners or circle Videostream - ok too.
5354
- embedd applications in your Video-Meetings, so attendees can enjoy collaborative "anything". From shopping to working and gaming...
5455
### Lowcoder vs Powerapps
55-
- build a apps way faster than in Power Apps. Save up to 50& of the time at least.
56+
- build a apps way faster than in Power Apps. Save up to 50& of the time and costs at least.
5657
- Use self-hosting to keep all apps and data under your control for example at the own baremetals.
5758
### Lowcoder vs Retool
5859
- Lowcoder is open-source. You don't need to worry about vendor lock-in or being stuck with an outdated version of the software.
@@ -84,7 +85,7 @@ And we mean it... Day by day!
8485
🔎 Submit an issue here on [GitHub](https://github.com/lowcoder-org/lowcoder/issues)
8586

8687
## 💻 Deployment Options
87-
You can access Lowcoder from [cloud-hosted version](https://app.lowcoder.cloud/) at any time, or use the following resources for deploying Lowcoder on different platforms:
88+
You can access Lowcoder from [cloud-hosted version](https://app.lowcoder.cloud/) at any time, or use the following resources for self-host Lowcoder on different platforms:
8889
- [Docker](https://docs.lowcoder.cloud/lowcoder-documentation/setup-and-run/self-hosting)
8990

9091
## 💪 Contributing

app.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@
2020
}
2121
},
2222
"env": {
23-
"ENCRYPTION_PASSWORD": {
23+
"LOWCODER_DB_ENCRYPTION_PASSWORD": {
2424
"description": "The encryption password used to encrypt all sensitive credentials in the database. You can use any random string (eg abcd).",
2525
"required": false
2626
},
27-
"ENCRYPTION_SALT": {
27+
"LOWCODER_DB_ENCRYPTION_SALT": {
2828
"description": "The encryption salt used to encrypt all sensitive credentials in the database. You can use any random string (eg abcd).",
2929
"required": false
3030
},
31-
"CORS_ALLOWED_DOMAINS": {
31+
"LOWCODER_CORS_DOMAINS": {
3232
"description": "The domains supported for CORS requests. All domains are allowed by default. If there are multiple domains, please separate them with commas.",
3333
"required": false
3434
},
35-
"MONGODB_URL": {
35+
"LOWCODER_MONGODB_URL": {
3636
"description": "Your Mongo Database URL.",
3737
"required": false
3838
},
39-
"REDIS_URL": {
39+
"LOWCODER_REDIS_URL": {
4040
"description": "Your Redis Database URL.",
4141
"required": false
4242
}

client/VERSION

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

client/packages/lowcoder-cli-template-typescript/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "lowcoder-cli-template-typescript",
3-
"version": "0.0.16",
3+
"version": "0.0.20",
44
"type": "module",
55
"scripts": {
6-
"start": "vite",
6+
"start": "NODE_OPTIONS=--max_old_space_size=6144 vite",
77
"build": "lowcoder-cli build",
88
"build_publish": "lowcoder-cli build --publish"
99
},
@@ -13,11 +13,15 @@
1313
"hillcharts": {
1414
"name": "Hillcharts Demo",
1515
"icon": "./icons/hills.svg",
16-
"description": "Hillchart Plugin Demo Component"
16+
"description": "Hillchart Plugin Demo Component",
17+
"layoutInfo": {
18+
"w": 10,
19+
"h": 40
20+
}
1721
}
1822
}
1923
},
20-
"devDependencies": {
24+
"dependencies": {
2125
"@observablehq/runtime": "^4.8.2",
2226
"@types/react": "^18.2.45",
2327
"@types/react-dom": "^18.2.18",

client/packages/lowcoder-cli-template-typescript/src/HillchartsComp.tsx

Lines changed: 82 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@ import {
55
Section,
66
withDefault,
77
withExposingConfigs,
8+
withMethodExposing,
89
eventHandlerControl,
910
styleControl,
1011
toJSONObjectArray,
1112
jsonControl,
1213
AutoHeightControl,
1314
EditorContext,
1415
} from "lowcoder-sdk";
16+
import { useResizeDetector } from "react-resize-detector";
1517

1618
import styles from "./styles.module.css";
1719

1820
import { i18nObjs, trans } from "./i18n/comps";
1921

2022
import { Chart } from './vendors'
21-
import { useContext, useEffect, useRef, useState } from "react";
23+
import { useState } from "react";
2224

2325

2426
export const CompStyles = [
@@ -59,7 +61,13 @@ export const CompStyles = [
5961
}
6062
] as const;
6163

62-
64+
interface Point {
65+
id: number,
66+
color?: string,
67+
description?: string,
68+
x: number,
69+
size?: number,
70+
}
6371

6472
// const HillchartsCompBase = new UICompBuilder(childrenMap, (props: any) => {
6573
let HillchartsCompBase = (function () {
@@ -74,42 +82,57 @@ let HillchartsCompBase = (function () {
7482
value: "change",
7583
description: "Triggers when Chart data changes",
7684
},
77-
]),
85+
] as const),
7886
};
7987

80-
return new UICompBuilder(childrenMap, (props: { onEvent: (arg0: string) => void; styles: { backgroundColor: any; border: any; radius: any; borderWidth: any; margin: any; padding: any; textSize: any; }; data: any[] | null | undefined; }) => {
88+
return new UICompBuilder(childrenMap, (props: {
89+
onEvent: any;
90+
styles: { backgroundColor: any; border: any; radius: any; borderWidth: any; margin: any; padding: any; textSize: any; };
91+
data: any[] | null | undefined;
92+
autoHeight: boolean;
93+
}) => {
8194
const handleDataChange = () => {
8295
props.onEvent("change");
8396
};
8497

85-
const conRef = useRef<HTMLDivElement>(null);
86-
const [dimensions, setDimensions] = useState({ width: 400, height: 250 });
98+
const [dimensions, setDimensions] = useState({ width: 480, height: 280 });
99+
const { width, height, ref: conRef } = useResizeDetector({onResize: () =>{
100+
const container = conRef.current;
101+
if(!container || !width || !height) return;
87102

88-
useEffect(() => {
89-
if (conRef.current) {
103+
if(props.autoHeight) {
90104
setDimensions({
91-
width: conRef.current.clientWidth,
92-
height: conRef.current.clientHeight
93-
});
105+
width,
106+
height: dimensions.height,
107+
})
108+
return;
94109
}
95-
}, []);
110+
111+
setDimensions({
112+
width,
113+
height,
114+
})
115+
}});
96116

97117
return (
98-
<div ref={conRef} className={styles.wrapper} style={{
99-
display: "flex",
100-
justifyContent: "center",
101-
height: `100%`,
102-
width: `100%`,
103-
backgroundColor: `${props.styles.backgroundColor}`,
104-
borderColor: `${props.styles.border}`,
105-
borderRadius: `${props.styles.radius}`,
106-
borderWidth: `${props.styles.borderWidth}`,
107-
margin: `${props.styles.margin}`,
108-
padding: `${props.styles.padding}`,
109-
fontSize: `${props.styles.textSize}`,
110-
}}>
111-
<Chart data={props.data} height={dimensions.height} width={dimensions.width} onDataChange={handleDataChange}/>
112-
</div>
118+
<div ref={conRef} className={styles.wrapper} style={{
119+
height: `100%`,
120+
width: `100%`,
121+
backgroundColor: `${props.styles.backgroundColor}`,
122+
borderColor: `${props.styles.border}`,
123+
borderRadius: `${props.styles.radius}`,
124+
borderWidth: `${props.styles.borderWidth}`,
125+
margin: `${props.styles.margin}`,
126+
padding: `${props.styles.padding}`,
127+
fontSize: `${props.styles.textSize}`,
128+
}}>
129+
<Chart
130+
data={props.data}
131+
height={dimensions.height}
132+
width={dimensions.width}
133+
onDataChange={handleDataChange}
134+
/>
135+
</div>
113136
);
114137
})
115138
.setPropertyViewFn((children: any) => {
@@ -137,6 +160,38 @@ HillchartsCompBase = class extends HillchartsCompBase {
137160
}
138161
};
139162

163+
HillchartsCompBase = withMethodExposing(HillchartsCompBase, [
164+
{
165+
method: {
166+
name: "setPoint",
167+
description: trans("methods.setPoint"),
168+
params: [{
169+
name: "data",
170+
type: "JSON",
171+
description: "JSON value"
172+
}],
173+
},
174+
execute: (comp: any, values: any[]) => {
175+
const point = values[0] as Point;
176+
if(typeof point !== 'object') {
177+
return Promise.reject(trans("methods.invalidInput"))
178+
}
179+
if(!point.id) {
180+
return Promise.reject(trans("methods.requiredField", { field: 'ID' }));
181+
}
182+
if(!point.x) {
183+
return Promise.reject(trans("methods.requiredField", { field: 'X position' }));
184+
}
185+
const data = comp.children.data.getView();
186+
const newData = [
187+
...data,
188+
point,
189+
];
190+
comp.children.data.dispatchChangeValueAction(JSON.stringify(newData, null, 2));
191+
}
192+
},
193+
]);
194+
140195
export default withExposingConfigs(HillchartsCompBase, [
141196
new NameConfig("data", trans("component.data")),
142197
]);

client/packages/lowcoder-cli-template-typescript/src/i18n/comps/locales/en.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ export const en = {
2727
"component": {
2828
"data": "Hillchart Data",
2929
},
30+
"methods": {
31+
"setPoint": "Set Point",
32+
"invalidInput": "Invalid Input",
33+
"requiredField": "{field} is required",
34+
}
3035
};

client/packages/lowcoder-cli-template-typescript/src/styles.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
display: flex;
44
justify-content: center;
55
align-items: center;
6-
height: 100%;
6+
/* height: 100%; */
77
border: 1px solid #dddddd;
88
background-color: white;
99
}

client/packages/lowcoder-cli-template-typescript/src/vendors/Chart.jsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,14 @@ function Chart(props) {
194194
// Render an updated chart
195195
runtime.module(define, Inspector.into(chartRef), 'chart');
196196
}
197-
}, [chartRef, props.data]);
198-
199-
return <div ref={useChartRef} style={{ height: "100%" }} />;
197+
}, [chartRef, props.data, props.width, props.height]);
198+
199+
return (
200+
<div
201+
ref={useChartRef}
202+
style={{ height: "100%" }}
203+
/>
204+
);
200205
}
201206

202207

client/packages/lowcoder-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "0.0.23",
3+
"version": "0.0.24",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const Container = styled.div<{ $optColor?: boolean; $simple?: boolean }>`
2626
line-height: 23px;
2727
user-select: none;
2828
cursor: pointer;
29+
30+
.ant-collapse-header-text {
31+
min-width: 0;
32+
}
2933
}
3034
3135
.ant-collapse-ghost > .ant-collapse-item > .ant-collapse-content > .ant-collapse-content-box {

client/packages/lowcoder-design/src/components/colorSelect/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export const ColorSelect = (props: ColorSelectProps) => {
3131
}, 200),
3232
[dispatch]
3333
);
34-
3534
return (
3635
<Popover
3736
trigger={trigger}
@@ -170,12 +169,12 @@ const BackDiv = styled.div.attrs<{ $color: string }>((props: { $color: string })
170169
`;
171170
// main block
172171
const ColorBlock = styled.div<{ $color: string }>`
173-
background-color: ${(props) => (isValidColor(props.$color) ? props.color : "#FFFFFF")};
172+
background-color: ${(props) => (isValidColor(props.$color) ? props.$color : "#FFFFFF")};
174173
border: 1px solid rgba(0, 0, 0, 0.1);
175174
border-radius: 4px;
176175
height: 24px;
177176
width: 24px;
178177
cursor: pointer;
179178
background-clip: content-box;
180179
overflow: hidden;
181-
`;
180+
`;

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

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const TextWrapper = styled.div`
5353
white-space: nowrap;
5454
`;
5555
const EditIcon = styled(Edit)`
56-
visibility: hidden;
56+
// visibility: hidden;
5757
margin-left: 8px;
5858
flex-shrink: 0;
5959
`;
@@ -130,13 +130,15 @@ export const EditText = (props: EditTextProps) => {
130130
<TextWrapper className={"taco-edit-text-body"} title={props.text}>
131131
{props.text}
132132
</TextWrapper>
133-
<EditIcon
134-
onClick={(e) => {
135-
e.stopPropagation();
136-
!props.disabled && setEditing(true);
137-
}}
138-
className={"taco-edit-text-icon"}
139-
/>
133+
{props.forceClickIcon && !props.disabled && (
134+
<EditIcon
135+
onClick={(e) => {
136+
e.stopPropagation();
137+
!props.disabled && setEditing(true);
138+
}}
139+
className={"taco-edit-text-icon"}
140+
/>
141+
)}
140142
</EditTextWrapper>
141143
)}
142144
{props.prefixIcon && <Prefix>{props.prefixIcon}</Prefix>}

0 commit comments

Comments
 (0)