Skip to content

Commit d38320e

Browse files
committed
pull from dev
2 parents 96f83e6 + c3a249e commit d38320e

File tree

65 files changed

+3517
-5317
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

+3517
-5317
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;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,11 @@ const childrenMap = {
257257
allowNull: BoolControl,
258258
onEvent: InputEventHandlerControl,
259259
viewRef: RefControl<HTMLInputElement>,
260-
style: styleControl(InputFieldStyle),
260+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
261261
labelStyle:styleControl(LabelStyle),
262262
prefixText : stringExposingStateControl("defaultValue"),
263263
prefixIcon: IconControl,
264-
inputFieldStyle:styleControl(InputLikeStyle),
264+
inputFieldStyle: withDefault(styleControl(InputLikeStyle), {borderWidth: '1px'}) ,
265265
// validation
266266
required: BoolControl,
267267
min: UndefinedNumberControl,

client/packages/lowcoder/src/comps/comps/numberInputComp/sliderCompConstants.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,8 @@ export const SliderChildren = {
9191
label: LabelControl,
9292
disabled: BoolCodeControl,
9393
onEvent: ChangeEventHandlerControl,
94-
style: styleControl(InputFieldStyle),
95-
labelStyle: styleControl(
96-
LabelStyle.filter(
97-
(style) => ['accent', 'validate'].includes(style.name) === false
98-
)
99-
),
94+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
95+
labelStyle:styleControl(LabelStyle.filter((style)=> ['accent','validate'].includes(style.name) === false)),
10096
prefixIcon: IconControl,
10197
suffixIcon: IconControl,
10298
inputFieldStyle: styleControl(SliderStyle),

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const RatingBasicComp = (function () {
4343
allowHalf: BoolControl,
4444
disabled: BoolCodeControl,
4545
onEvent: eventHandlerControl(EventOptions),
46-
style: styleControl(InputFieldStyle),
46+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
4747
labelStyle: styleControl(LabelStyle.filter((style) => ['accent', 'validate'].includes(style.name) === false)),
4848
inputFieldStyle:migrateOldData(styleControl(RatingStyle), fixOldData),
4949
...formDataChildren,

client/packages/lowcoder/src/comps/comps/remoteComp/loaders.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ async function npmLoader(
1313

1414
// Falk: removed "packageVersion = "latest" as default value fir packageVersion - to ensure no automatic version jumping.
1515
const localPackageVersion = remoteInfo.packageVersion || "latest";
16-
1716
const { packageName, packageVersion, compName } = remoteInfo;
1817
const entry = `${NPM_PLUGIN_ASSETS_BASE_URL}/${packageName}@${localPackageVersion}/index.js`;
19-
// const entry = `../../../../../public/package/index.js`;
20-
// console.log("Entry", entry);
18+
2119
try {
2220
const module = await import(
2321
/* @vite-ignore */

client/packages/lowcoder/src/comps/comps/selectInputComp/segmentedControl.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ import { RefControl } from "comps/controls/refControl";
2525

2626
import { useContext } from "react";
2727
import { EditorContext } from "comps/editorState";
28-
import { migrateOldData } from "comps/generators/simpleGenerators";
28+
import { migrateOldData, withDefault } from "comps/generators/simpleGenerators";
2929
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
3030

3131

3232
const getStyle = (style: SegmentStyleType) => {
3333
return css`
3434
&.ant-segmented:not(.ant-segmented-disabled) {
35-
background-color: ${style.background};
36-
3735
&,
3836
.ant-segmented-item-selected,
3937
.ant-segmented-thumb,
@@ -79,7 +77,7 @@ const SegmentChildrenMap = {
7977
disabled: BoolCodeControl,
8078
onEvent: ChangeEventHandlerControl,
8179
options: SelectOptionControl,
82-
style: styleControl(SegmentStyle),
80+
style: withDefault(styleControl(SegmentStyle),{borderWidth:'1px'}),
8381
viewRef: RefControl<HTMLDivElement>,
8482

8583
...SelectInputValidationChildren,

client/packages/lowcoder/src/comps/comps/selectInputComp/stepControl.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { StepOptionControl } from "comps/controls/optionsControl";
77
import { styleControl } from "comps/controls/styleControl";
88
import { StepsStyle, StepsStyleType, heightCalculator, widthCalculator, marginCalculator } from "comps/controls/styleControlConstants";
99
import styled, { css } from "styled-components";
10-
import { UICompBuilder } from "../../generators";
10+
import { UICompBuilder, withDefault } from "../../generators";
1111
import { CommonNameConfig, NameConfig, withExposingConfigs } from "../../generators/withExposing";
1212
import { selectDivRefMethods, } from "./selectInputConstants";
1313
import { Section, sectionNames } from "lowcoder-design";
@@ -91,7 +91,7 @@ const StepsChildrenMap = {
9191
disabled: BoolCodeControl,
9292
onEvent: ChangeEventHandlerControl,
9393
options: StepOptionControl,
94-
style: styleControl(StepsStyle),
94+
style: withDefault( styleControl(StepsStyle), {text:'#D7D9E0'}),
9595
viewRef: RefControl<HTMLDivElement>
9696
};
9797

client/packages/lowcoder/src/comps/comps/tableComp/expansionControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ let ExpansionControlTmp = (function () {
5050
slot: ContextSlotControl,
5151
},
5252
() => ({ expandableConfig: {}, expandModalView: null })
53-
)
53+
)
5454
.setControlItemData({ filterText: label })
5555
.setPropertyViewFn((children, dispatch) => {
5656
return (

client/packages/lowcoder/src/comps/comps/tableComp/tableTypes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const tableChildrenMap = {
210210
toolbarStyle: styleControl(TableToolbarStyle),
211211
headerStyle:withDefault(styleControl(TableHeaderStyle), {borderWidth: '1px'}),
212212
searchText: StringControl,
213-
columnsStyle: styleControl(TableColumnStyle),
213+
columnsStyle: withDefault(styleControl(TableColumnStyle), {radius:'0px'}),
214214
viewModeResizable: BoolControl,
215215
visibleResizables: BoolControl,
216216
// sample data for regenerating columns

client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import { IconControl } from "comps/controls/iconControl";
3131
import { hasIcon } from "comps/utils";
3232
import { InputRef } from "antd/es/input";
3333
import { RefControl } from "comps/controls/refControl";
34-
import { migrateOldData } from "comps/generators/simpleGenerators";
34+
import { migrateOldData, withDefault } from "comps/generators/simpleGenerators";
3535

3636
import React, { useContext } from "react";
3737
import { EditorContext } from "comps/editorState";
@@ -49,7 +49,7 @@ const childrenMap = {
4949
viewRef: RefControl<InputRef>,
5050
showCount: BoolControl,
5151
allowClear: BoolControl,
52-
style: styleControl(InputFieldStyle),
52+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
5353
labelStyle: styleControl(LabelStyle),
5454
prefixIcon: IconControl,
5555
suffixIcon: IconControl,

client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ let PasswordTmpComp = (function () {
5757
validationType: dropdownControl(TextInputValidationOptions, "Regex"),
5858
visibilityToggle: BoolControl.DEFAULT_TRUE,
5959
prefixIcon: IconControl,
60-
style: styleControl(InputFieldStyle),
60+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
6161
labelStyle: styleControl(LabelStyle),
6262
inputFieldStyle: styleControl(InputLikeStyle)
6363
};

client/packages/lowcoder/src/comps/comps/textInputComp/textAreaComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ let TextAreaTmpComp = (function () {
7171
viewRef: RefControl<TextAreaRef>,
7272
allowClear: BoolControl,
7373
autoHeight: withDefault(AutoHeightControl, "fixed"),
74-
style: styleControl(InputFieldStyle),
74+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
7575
labelStyle: styleControl(LabelStyle),
7676
inputFieldStyle: styleControl(InputLikeStyle)
7777
};

client/packages/lowcoder/src/comps/comps/treeComp/treeSelectComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ const childrenMap = {
6565
allowClear: BoolControl,
6666
showSearch: BoolControl.DEFAULT_TRUE,
6767
inputValue: stateComp<string>(""), // search value
68-
style: styleControl(InputFieldStyle),
68+
style: withDefault(styleControl(InputFieldStyle), {borderWidth: '1px'}),
6969
labelStyle:styleControl(LabelStyle),
70-
inputFieldStyle:styleControl(TreeSelectStyle),
70+
inputFieldStyle: withDefault(styleControl(TreeSelectStyle), {borderWidth: '1px'}),
7171
viewRef: RefControl<BaseSelectRef>,
7272
};
7373

0 commit comments

Comments
 (0)