Skip to content

Commit bc9cae0

Browse files
authored
Merge pull request #1318 from lowcoder-org/dev
Dev > Main for v2.5 Release
2 parents a6c28bb + b151ff5 commit bc9cae0

File tree

182 files changed

+50352
-1828
lines changed

Some content is hidden

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

182 files changed

+50352
-1828
lines changed

Diff for: client/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.12
1+
2.5.0

Diff for: client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-frontend",
3-
"version": "2.4.12",
3+
"version": "2.5.0",
44
"type": "module",
55
"private": true,
66
"workspaces": [

Diff for: client/packages/lowcoder-cli-template-typescript/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-cli-template-typescript",
3-
"version": "0.0.20",
3+
"version": "0.0.22",
44
"type": "module",
55
"scripts": {
66
"start": "NODE_OPTIONS=--max_old_space_size=6144 vite",
@@ -22,7 +22,9 @@
2222
}
2323
},
2424
"dependencies": {
25+
"@observablehq/inspector": "^5.0.1",
2526
"@observablehq/runtime": "^4.8.2",
27+
"@observablehq/stdlib": "^5.8.8",
2628
"@types/react": "^18.2.45",
2729
"@types/react-dom": "^18.2.18",
2830
"lowcoder-cli": "^0.0.30",

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

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import React from 'react';
22
import PropTypes from 'prop-types'
3-
import { Runtime, Inspector } from '@observablehq/runtime';
3+
import { Runtime } from '@observablehq/runtime';
4+
import { Inspector } from "@observablehq/inspector";
5+
import { Library } from "@observablehq/stdlib";
6+
7+
const library = new Library();
48

59
function Chart(props) {
610
const [chartRef, setChartRef] = React.useState();
@@ -16,21 +20,20 @@ function Chart(props) {
1620
main.variable().define('translateXtoY', function() {
1721
return x => 50 * Math.sin((Math.PI / 50) * x - (1 / 2) * Math.PI) + 50;
1822
});
19-
main.variable().define('d3', ['require'], function(require) {
20-
return require('https://d3js.org/d3.v5.min.js');
23+
main.variable().define('d3', [], function() {
24+
return Library.require('https://d3js.org/d3.v5.min.js');
2125
});
2226

2327
// Define the HillChart class
24-
main.variable().define('HillChart', ['d3', 'DOM', 'translateXtoY'], function(d3, DOM, translateXtoY) {
28+
main.variable().define('HillChart', ['d3', 'translateXtoY'], function(d3, translateXtoY) {
2529
return class HillChart {
2630
constructor(chart_height, chart_width, items) {
2731
this.chart_height = chart_height;
2832
this.chart_width = chart_width;
2933
this.items = items;
30-
31-
this.svg = d3.select(DOM.svg(this.chart_width, this.chart_height)).attr('viewBox', `-20 -20 ${this.chart_width + 80} ${this.chart_height + 20}`);
34+
35+
this.svg = d3.select(library.DOM.svg(this.chart_width, this.chart_height)).attr('viewBox', `-20 -20 ${this.chart_width + 80} ${this.chart_height + 20}`);
3236
}
33-
3437

3538
render() {
3639
const xScale = d3

Diff for: client/packages/lowcoder-cli/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"vite-plugin-svgr": "^2.2.2"
3939
},
4040
"devDependencies": {
41-
"@types/axios": "^0.14.0",
4241
"typescript": "^4.8.4"
4342
},
4443
"peerDependencies": {

Diff for: client/packages/lowcoder-design/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"dependencies": {
1010
"colord": "^2.9.3",
1111
"react-fontawesome": "^0.2.0",
12-
"react-markdown": "^8.0.0",
12+
"react-markdown": "^9.0.1",
1313
"react-virtualized": "^9.22.3",
14-
"rehype-raw": "^6.1.1",
15-
"rehype-sanitize": "^5.0.1",
14+
"rehype-raw": "^7.0.0",
15+
"rehype-sanitize": "^6.0.0",
1616
"remark-gfm": "^4.0.0",
1717
"simplebar": "^6.2.5",
1818
"simplebar-react": "^3.2.4"

Diff for: client/packages/lowcoder-design/src/components/markdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { lazy } from "react";
44
import rehypeRaw from "rehype-raw";
55
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
66
import remarkGfm from "remark-gfm";
7-
import type { ReactMarkdownOptions } from "react-markdown/lib/react-markdown";
7+
import type { Options as ReactMarkdownOptions } from "react-markdown/lib";
88

99
const ReactMarkdown = lazy(() => import('react-markdown'));
1010

Diff for: client/packages/lowcoder-design/src/components/tacoInput.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,14 @@ const FormInput = (props: {
331331
check: (value: string) => boolean;
332332
};
333333
formName?: string;
334+
onBlur?: () => void;
334335
onChange?: (value: string, valid: boolean) => void;
335336
className?: string;
336337
inputRef?: Ref<InputRef>;
337338
msg?: string;
339+
defaultValue?: string;
338340
}) => {
339-
const { mustFill, checkRule, label, placeholder, onChange, formName, className, inputRef } =
341+
const { mustFill, checkRule, label, placeholder, onBlur, onChange, formName, className, inputRef, defaultValue } =
340342
props;
341343
const [valueValid, setValueValid] = useState(true);
342344
return (
@@ -350,6 +352,7 @@ const FormInput = (props: {
350352
ref={inputRef}
351353
name={formName}
352354
placeholder={placeholder}
355+
defaultValue={defaultValue}
353356
onChange={(e) => {
354357
let valid = true;
355358
if (checkRule) {
@@ -358,6 +361,7 @@ const FormInput = (props: {
358361
}
359362
onChange && onChange(e.target.value, valid);
360363
}}
364+
onBlur={() => onBlur?.()}
361365
/>
362366
</FormInputFiled>
363367
);

Diff for: client/packages/lowcoder-sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.4.14",
3+
"version": "2.4.16",
44
"type": "module",
55
"files": [
66
"src",

Diff for: client/packages/lowcoder/index.html

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@
5151
<script>
5252
window.global = window;
5353
</script>
54+
<script
55+
src="https://tag.clearbitscripts.com/v1/pk_dfbc0aeefb28dc63475b67134facf127/tags.js"
56+
referrerPolicy="no-referrer"
57+
></script>
5458
</head>
5559
<body>
5660
<div id="not-supported-browser"></div>

Diff for: client/packages/lowcoder/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/react-virtualized": "^9.21.21",
3939
"animate.css": "^4.1.1",
4040
"antd": "^5.20.0",
41-
"axios": "^1.7.4",
41+
"axios": "^1.7.7",
4242
"buffer": "^6.0.3",
4343
"clsx": "^2.0.0",
4444
"cnchar": "^3.2.4",
@@ -86,6 +86,7 @@
8686
"react-sortable-hoc": "^2.0.0",
8787
"react-test-renderer": "^18.1.0",
8888
"react-use": "^17.3.2",
89+
"react-webcam": "^7.2.0",
8990
"really-relaxed-json": "^0.3.2",
9091
"redux-devtools-extension": "^2.13.9",
9192
"redux-saga": "^1.1.3",

Diff for: client/packages/lowcoder/src/api/apiResponses.ts

+7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ export interface GenericApiResponse<T> {
1212
data: T;
1313
}
1414

15+
export interface FetchGroupApiResponse<T> extends GenericApiResponse<T> {
16+
totalAdmins: number,
17+
totalAdminsAndDevelopers: number,
18+
totalDevelopersOnly: number,
19+
totalOtherMembers: number,
20+
}
21+
1522
// NO_DATASOURCES_FOUND, 1000, "Unable to find {0} with id {1}"
1623
// INVALID_PARAMTER, 4000, "Invalid parameter {0} provided in the input"
1724
// PLUGIN_NOT_INSTALLED, 4001, "Plugin {0} not installed"

Diff for: client/packages/lowcoder/src/api/applicationApi.ts

+5
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class ApplicationApi extends Api {
9898
static publicToMarketplaceURL = (applicationId: string) => `/applications/${applicationId}/public-to-marketplace`;
9999
static getMarketplaceAppURL = (applicationId: string) => `/applications/${applicationId}/view_marketplace`;
100100
static setAppEditingStateURL = (applicationId: string) => `/applications/editState/${applicationId}`;
101+
static serverSettingsURL = () => `/serverSettings`;
101102

102103
static fetchHomeData(request: HomeDataPayload): AxiosPromise<HomeDataResponse> {
103104
return Api.get(ApplicationApi.fetchHomeDataURL, request);
@@ -240,6 +241,10 @@ class ApplicationApi extends Api {
240241
editingFinished,
241242
});
242243
}
244+
245+
static fetchServerSettings(): AxiosPromise<any> {
246+
return Api.get(ApplicationApi.serverSettingsURL());
247+
}
243248
}
244249

245250
export default ApplicationApi;

Diff for: client/packages/lowcoder/src/api/configApi.ts

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class ConfigApi extends Api {
1717
}
1818
return Api.get(authConfigURL);
1919
}
20+
21+
static fetchDeploymentId(): AxiosPromise<ConfigResponse> {
22+
return Api.get(`${ConfigApi.configURL}/deploymentId`);
23+
}
2024
}
2125

2226
export default ConfigApi;

Diff for: client/packages/lowcoder/src/api/idSourceApi.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class IdSourceApi extends Api {
4444
return Api.post(IdSourceApi.saveConfigURL, request);
4545
}
4646

47-
static deleteConfig(id: string): AxiosPromise<ApiResponse> {
48-
return Api.delete(IdSourceApi.deleteConfigURL(id));
47+
static deleteConfig(id: string, deleteConfig?: boolean): AxiosPromise<ApiResponse> {
48+
return Api.delete(IdSourceApi.deleteConfigURL(id), {delete: deleteConfig});
4949
}
5050

5151
static syncManual(authType: string): AxiosPromise<ApiResponse> {

Diff for: client/packages/lowcoder/src/api/orgApi.ts

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class OrgApi extends Api {
5252
static deleteOrgURL = (orgId: string) => `/organizations/${orgId}`;
5353
static updateOrgURL = (orgId: string) => `/organizations/${orgId}/update`;
5454
static fetchUsage = (orgId: string) => `/organizations/${orgId}/api-usage`;
55+
static fetchOrgsByEmailURL = (email: string) => `organizations/byuser/${email}`;
5556

5657
static createGroup(request: { name: string }): AxiosPromise<GenericApiResponse<OrgGroup>> {
5758
return Api.post(OrgApi.createGroupURL, request);
@@ -141,6 +142,9 @@ export class OrgApi extends Api {
141142
return Api.get(OrgApi.fetchUsage(orgId), { lastMonthOnly: true });
142143
}
143144

145+
static fetchOrgsByEmail(email: string): AxiosPromise<ApiResponse> {
146+
return Api.get(OrgApi.fetchOrgsByEmailURL(email));
147+
}
144148
}
145149

146150
export default OrgApi;

0 commit comments

Comments
 (0)