Skip to content

Commit 8e672cb

Browse files
committed
pull from dev
2 parents 661d088 + 4db4036 commit 8e672cb

File tree

65 files changed

+3451
-5254
lines changed

Some content is hidden

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

65 files changed

+3451
-5254
lines changed

client/VERSION

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

client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"start": "yarn workspace lowcoder start",
1414
"start-win": "LOWCODER_API_SERVICE_URL=http://localhost:3000 yarn start",
1515
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
16+
"translate": "node --loader ts-node/esm ./scripts/translate.js",
1617
"build": "yarn node ./scripts/build.js",
1718
"test": "jest && yarn workspace lowcoder-comps test",
1819
"prepare": "yarn workspace lowcoder prepare",
@@ -53,6 +54,7 @@
5354
"rimraf": "^3.0.2",
5455
"shelljs": "^0.8.5",
5556
"svgo": "^3.0.0",
57+
"ts-node": "^10.4.0",
5658
"typescript": "^4.8.4",
5759
"whatwg-fetch": "^3.6.2"
5860
},

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": "2.4.4",
3+
"version": "2.4.5",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

client/packages/lowcoder-comps/src/comps/chartsGeoMapComp/chartsGeoMapComp.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import {
55
CompActionTypes,
66
wrapChildAction,
77
} from "lowcoder-core";
8-
import { AxisFormatterComp, EchartsAxisType } from "../chartComp/chartConfigs/cartesianAxisConfig";
9-
import { chartChildrenMap, ChartSize, getDataKeys } from "../chartComp/chartConstants";
10-
import { chartPropertyView } from "../chartComp/chartPropertyView";
8+
import { AxisFormatterComp, EchartsAxisType } from "../basicChartComp/chartConfigs/cartesianAxisConfig";
9+
import { chartChildrenMap, ChartSize, getDataKeys } from "../basicChartComp/chartConstants";
10+
import { chartPropertyView } from "../basicChartComp/chartPropertyView";
1111
import _ from "lodash";
1212
import { useContext, useEffect, useMemo, useRef, useState } from "react";
1313
import ReactResizeDetector from "react-resize-detector";
14-
import ReactECharts from "../chartComp/reactEcharts";
14+
import ReactECharts from "../basicChartComp/reactEcharts";
1515
import {
1616
childrenToProps,
1717
depsConfig,
@@ -28,13 +28,13 @@ import {
2828
dropdownControl
2929
} from "lowcoder-sdk";
3030
import { getEchartsLocale, trans } from "i18n/comps";
31-
import { ItemColorComp } from "comps/chartComp/chartConfigs/lineChartConfig";
31+
import { ItemColorComp } from "comps/basicChartComp/chartConfigs/lineChartConfig";
3232
import {
3333
echartsConfigOmitChildren,
3434
getEchartsConfig,
3535
getSelectedPoints,
3636
loadGoogleMapsScript,
37-
} from "comps/chartComp/chartUtils";
37+
} from "comps/basicChartComp/chartUtils";
3838
import 'echarts-extension-gmap';
3939
import log from "loglevel";
4040

client/packages/lowcoder/src/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class AppIndex extends React.Component<AppIndexProps, any> {
131131
<link key="preconnect-gstatic" rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />,
132132
<link key="font-ubuntu" href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet" />,
133133
// adding Clearbit Support for Analytics
134-
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
134+
<script key="clearbit-script" src="https://tag.clearbitscripts.com/v1/pk_dfbc0aeefb28dc63475b67134facf127/tags.js" referrerPolicy="strict-origin-when-cross-origin" type="text/javascript"></script>
135135
]}
136136
</Helmet>
137137
<SystemWarning />

client/packages/lowcoder/src/components/CompName.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ export const CompName = (props: Iprops) => {
115115

116116

117117
if (compInfo.isRemote) {
118+
// Falk: Displaying the current version of the component
119+
items.push({
120+
text: trans("history.currentVersion") + ": " + compInfo.packageVersion,
121+
onClick: () => {
122+
},
123+
});
118124
items.push({
119125
text: trans("history.currentVersion") + ": " + compInfo.packageVersion,
120126
onClick: () => {
@@ -127,6 +133,7 @@ export const CompName = (props: Iprops) => {
127133
onClick: () => {
128134
handleUpgrade();
129135
},
136+
130137
});
131138
}
132139

client/packages/lowcoder/src/components/table/EditableCell.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export function EditableCell<T extends JSONValue>(props: EditableCellProps<T>) {
128128
>
129129
{status === "toSave" && !isEditing && <EditableChip />}
130130
<div
131+
style={{minHeight: '24px'}}
131132
onDoubleClick={enterEditFn}
132133
>
133134
{normalView}

client/packages/lowcoder/src/comps/comps/dateComp/dateComp.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ import { DateRangeUIView } from "comps/comps/dateComp/dateRangeUIView";
5050

5151
import { EditorContext } from "comps/editorState";
5252

53+
const defaultStyle = {
54+
borderStyle: 'solid',
55+
borderWidth: '1px',
56+
}
57+
5358
const EventOptions = [changeEvent, focusEvent, blurEvent] as const;
5459

5560
const validationChildren = {
@@ -76,7 +81,7 @@ const commonChildren = {
7681
suffixIcon: withDefault(IconControl, "/icon:regular/calendar"),
7782
...validationChildren,
7883
viewRef: RefControl<CommonPickerMethods>,
79-
inputFieldStyle:styleControl(DateTimeStyle)
84+
inputFieldStyle: withDefault(styleControl(DateTimeStyle), defaultStyle),
8085
};
8186
type CommonChildrenType = RecordConstructorToComp<typeof commonChildren>;
8287

client/packages/lowcoder/src/comps/comps/lazyLoadComp/lazyLoadComp.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ function ViewLoading(props: { padding?: number }) {
3838
);
3939
}
4040

41-
interface RemoteCompReadyAction {
42-
type: "RemoteCompReady";
41+
export interface LazyCompReadyAction {
42+
type: "LazyCompReady";
4343
comp: Comp;
4444
}
4545

46-
interface RemoteCompViewProps {
46+
interface LazyCompViewProps {
4747
loadComp: () => Promise<void>;
4848
loadingElement?: () => React.ReactNode;
4949
errorElement?: (error: any) => React.ReactNode;
5050
}
5151

52-
function RemoteCompView(props: React.PropsWithChildren<RemoteCompViewProps>) {
52+
function LazyCompView(props: React.PropsWithChildren<LazyCompViewProps>) {
5353
const { loadComp, loadingElement, errorElement } = props;
5454
const [error, setError] = useState<any>("");
5555

@@ -103,14 +103,14 @@ export function lazyLoadComp(
103103
if (!compPath) {
104104
return;
105105
}
106-
let RemoteExportedComp;
106+
let LazyExportedComp;
107107
if (!loader) {
108108
const module = await import(`../../${compPath}.tsx`);
109-
RemoteExportedComp = module[compName!];
109+
LazyExportedComp = module[compName!];
110110
} else {
111-
RemoteExportedComp = await loader();
111+
LazyExportedComp = await loader();
112112
}
113-
if (!RemoteExportedComp) {
113+
if (!LazyExportedComp) {
114114
log.error("loader not found, lazy load info:", compPath);
115115
return;
116116
}
@@ -122,12 +122,12 @@ export function lazyLoadComp(
122122
if (this.compValue) {
123123
params.value = this.compValue;
124124
}
125-
const RemoteCompWithErrorBound = withErrorBoundary(RemoteExportedComp);
125+
const LazyCompWithErrorBound = withErrorBoundary(LazyExportedComp);
126126
this.dispatch(
127-
customAction<RemoteCompReadyAction>(
127+
customAction<LazyCompReadyAction>(
128128
{
129-
type: "RemoteCompReady",
130-
comp: new RemoteCompWithErrorBound(params),
129+
type: "LazyCompReady",
130+
comp: new LazyCompWithErrorBound(params),
131131
},
132132
false
133133
)
@@ -138,7 +138,7 @@ export function lazyLoadComp(
138138
// const key = `${remoteInfo?.packageName}-${remoteInfo?.packageVersion}-${remoteInfo?.compName}`;
139139
const key = `${compName}`;
140140
return (
141-
<RemoteCompView key={key} loadComp={() => this.load()} loadingElement={loadingElement} />
141+
<LazyCompView key={key} loadComp={() => this.load()} loadingElement={loadingElement} />
142142
);
143143
}
144144

@@ -147,7 +147,7 @@ export function lazyLoadComp(
147147
}
148148

149149
reduce(action: CompAction<any>): this {
150-
if (isCustomAction<RemoteCompReadyAction>(action, "RemoteCompReady")) {
150+
if (isCustomAction<LazyCompReadyAction>(action, "LazyCompReady")) {
151151
// use real remote comp instance to replace RemoteCompLoader
152152
return action.value.comp as this;
153153
}

client/packages/lowcoder/src/comps/comps/moduleComp/moduleComp.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type UpdateDslAction = {
6868
moduleDsl: Record<string, DSLType>;
6969
};
7070

71-
type ModuleReadyAction = {
71+
export type ModuleReadyAction = {
7272
type: "moduleReady";
7373
comp: RootComp;
7474
};
@@ -263,7 +263,6 @@ class ModuleTmpComp extends ModuleCompBase {
263263

264264
override reduce(action: CompAction<JSONValue>): this {
265265
const appId = this.children.appId.getView();
266-
267266
// init
268267
if (isMyCustomAction<InitAction>(action, "init")) {
269268
if (getReduceContext().disableUpdateState) return this;

0 commit comments

Comments
 (0)