Skip to content

Commit

Permalink
Merge pull request #1318 from lowcoder-org/dev
Browse files Browse the repository at this point in the history
Dev > Main for v2.5 Release
  • Loading branch information
FalkWolsky authored Nov 19, 2024
2 parents a6c28bb + b151ff5 commit bc9cae0
Show file tree
Hide file tree
Showing 182 changed files with 50,352 additions and 1,828 deletions.
2 changes: 1 addition & 1 deletion client/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.12
2.5.0
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-frontend",
"version": "2.4.12",
"version": "2.5.0",
"type": "module",
"private": true,
"workspaces": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-cli-template-typescript",
"version": "0.0.20",
"version": "0.0.22",
"type": "module",
"scripts": {
"start": "NODE_OPTIONS=--max_old_space_size=6144 vite",
Expand All @@ -22,7 +22,9 @@
}
},
"dependencies": {
"@observablehq/inspector": "^5.0.1",
"@observablehq/runtime": "^4.8.2",
"@observablehq/stdlib": "^5.8.8",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.2.18",
"lowcoder-cli": "^0.0.30",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types'
import { Runtime, Inspector } from '@observablehq/runtime';
import { Runtime } from '@observablehq/runtime';
import { Inspector } from "@observablehq/inspector";
import { Library } from "@observablehq/stdlib";

const library = new Library();

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

// Define the HillChart class
main.variable().define('HillChart', ['d3', 'DOM', 'translateXtoY'], function(d3, DOM, translateXtoY) {
main.variable().define('HillChart', ['d3', 'translateXtoY'], function(d3, translateXtoY) {
return class HillChart {
constructor(chart_height, chart_width, items) {
this.chart_height = chart_height;
this.chart_width = chart_width;
this.items = items;
this.svg = d3.select(DOM.svg(this.chart_width, this.chart_height)).attr('viewBox', `-20 -20 ${this.chart_width + 80} ${this.chart_height + 20}`);

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}`);
}


render() {
const xScale = d3
Expand Down
1 change: 0 additions & 1 deletion client/packages/lowcoder-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"vite-plugin-svgr": "^2.2.2"
},
"devDependencies": {
"@types/axios": "^0.14.0",
"typescript": "^4.8.4"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder-design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"dependencies": {
"colord": "^2.9.3",
"react-fontawesome": "^0.2.0",
"react-markdown": "^8.0.0",
"react-markdown": "^9.0.1",
"react-virtualized": "^9.22.3",
"rehype-raw": "^6.1.1",
"rehype-sanitize": "^5.0.1",
"rehype-raw": "^7.0.0",
"rehype-sanitize": "^6.0.0",
"remark-gfm": "^4.0.0",
"simplebar": "^6.2.5",
"simplebar-react": "^3.2.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { lazy } from "react";
import rehypeRaw from "rehype-raw";
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
import remarkGfm from "remark-gfm";
import type { ReactMarkdownOptions } from "react-markdown/lib/react-markdown";
import type { Options as ReactMarkdownOptions } from "react-markdown/lib";

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

Expand Down
6 changes: 5 additions & 1 deletion client/packages/lowcoder-design/src/components/tacoInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,14 @@ const FormInput = (props: {
check: (value: string) => boolean;
};
formName?: string;
onBlur?: () => void;
onChange?: (value: string, valid: boolean) => void;
className?: string;
inputRef?: Ref<InputRef>;
msg?: string;
defaultValue?: string;
}) => {
const { mustFill, checkRule, label, placeholder, onChange, formName, className, inputRef } =
const { mustFill, checkRule, label, placeholder, onBlur, onChange, formName, className, inputRef, defaultValue } =
props;
const [valueValid, setValueValid] = useState(true);
return (
Expand All @@ -350,6 +352,7 @@ const FormInput = (props: {
ref={inputRef}
name={formName}
placeholder={placeholder}
defaultValue={defaultValue}
onChange={(e) => {
let valid = true;
if (checkRule) {
Expand All @@ -358,6 +361,7 @@ const FormInput = (props: {
}
onChange && onChange(e.target.value, valid);
}}
onBlur={() => onBlur?.()}
/>
</FormInputFiled>
);
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-sdk",
"version": "2.4.14",
"version": "2.4.16",
"type": "module",
"files": [
"src",
Expand Down
4 changes: 4 additions & 0 deletions client/packages/lowcoder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<script>
window.global = window;
</script>
<script
src="https://tag.clearbitscripts.com/v1/pk_dfbc0aeefb28dc63475b67134facf127/tags.js"
referrerPolicy="no-referrer"
></script>
</head>
<body>
<div id="not-supported-browser"></div>
Expand Down
3 changes: 2 additions & 1 deletion client/packages/lowcoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@types/react-virtualized": "^9.21.21",
"animate.css": "^4.1.1",
"antd": "^5.20.0",
"axios": "^1.7.4",
"axios": "^1.7.7",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"cnchar": "^3.2.4",
Expand Down Expand Up @@ -86,6 +86,7 @@
"react-sortable-hoc": "^2.0.0",
"react-test-renderer": "^18.1.0",
"react-use": "^17.3.2",
"react-webcam": "^7.2.0",
"really-relaxed-json": "^0.3.2",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.1.3",
Expand Down
7 changes: 7 additions & 0 deletions client/packages/lowcoder/src/api/apiResponses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export interface GenericApiResponse<T> {
data: T;
}

export interface FetchGroupApiResponse<T> extends GenericApiResponse<T> {
totalAdmins: number,
totalAdminsAndDevelopers: number,
totalDevelopersOnly: number,
totalOtherMembers: number,
}

// NO_DATASOURCES_FOUND, 1000, "Unable to find {0} with id {1}"
// INVALID_PARAMTER, 4000, "Invalid parameter {0} provided in the input"
// PLUGIN_NOT_INSTALLED, 4001, "Plugin {0} not installed"
Expand Down
5 changes: 5 additions & 0 deletions client/packages/lowcoder/src/api/applicationApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class ApplicationApi extends Api {
static publicToMarketplaceURL = (applicationId: string) => `/applications/${applicationId}/public-to-marketplace`;
static getMarketplaceAppURL = (applicationId: string) => `/applications/${applicationId}/view_marketplace`;
static setAppEditingStateURL = (applicationId: string) => `/applications/editState/${applicationId}`;
static serverSettingsURL = () => `/serverSettings`;

static fetchHomeData(request: HomeDataPayload): AxiosPromise<HomeDataResponse> {
return Api.get(ApplicationApi.fetchHomeDataURL, request);
Expand Down Expand Up @@ -240,6 +241,10 @@ class ApplicationApi extends Api {
editingFinished,
});
}

static fetchServerSettings(): AxiosPromise<any> {
return Api.get(ApplicationApi.serverSettingsURL());
}
}

export default ApplicationApi;
4 changes: 4 additions & 0 deletions client/packages/lowcoder/src/api/configApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class ConfigApi extends Api {
}
return Api.get(authConfigURL);
}

static fetchDeploymentId(): AxiosPromise<ConfigResponse> {
return Api.get(`${ConfigApi.configURL}/deploymentId`);
}
}

export default ConfigApi;
4 changes: 2 additions & 2 deletions client/packages/lowcoder/src/api/idSourceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class IdSourceApi extends Api {
return Api.post(IdSourceApi.saveConfigURL, request);
}

static deleteConfig(id: string): AxiosPromise<ApiResponse> {
return Api.delete(IdSourceApi.deleteConfigURL(id));
static deleteConfig(id: string, deleteConfig?: boolean): AxiosPromise<ApiResponse> {
return Api.delete(IdSourceApi.deleteConfigURL(id), {delete: deleteConfig});
}

static syncManual(authType: string): AxiosPromise<ApiResponse> {
Expand Down
4 changes: 4 additions & 0 deletions client/packages/lowcoder/src/api/orgApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class OrgApi extends Api {
static deleteOrgURL = (orgId: string) => `/organizations/${orgId}`;
static updateOrgURL = (orgId: string) => `/organizations/${orgId}/update`;
static fetchUsage = (orgId: string) => `/organizations/${orgId}/api-usage`;
static fetchOrgsByEmailURL = (email: string) => `organizations/byuser/${email}`;

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

static fetchOrgsByEmail(email: string): AxiosPromise<ApiResponse> {
return Api.get(OrgApi.fetchOrgsByEmailURL(email));
}
}

export default OrgApi;
Loading

0 comments on commit bc9cae0

Please sign in to comment.