Skip to content

Commit 33d8210

Browse files
authored
Merge pull request #766 from lowcoder-org/cherry-release
Hotfixes to main
2 parents ffa595a + d602bd4 commit 33d8210

File tree

162 files changed

+3421
-1243
lines changed

Some content is hidden

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

162 files changed

+3421
-1243
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ client/node_modules/
99
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
12+
application-dev.yml

client/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"@types/react-resizable": "^3.0.5",
3636
"@types/react-router-dom": "^5.3.2",
3737
"@types/shelljs": "^0.8.11",
38+
"@types/simplebar": "^5.3.3",
3839
"@types/stylis": "^4.0.2",
3940
"@types/tern": "0.23.4",
4041
"@types/ua-parser-js": "^0.7.36",
@@ -79,6 +80,8 @@
7980
"chalk": "4",
8081
"number-precision": "^1.6.0",
8182
"react-player": "^2.11.0",
83+
"resize-observer-polyfill": "^1.5.1",
84+
"simplebar": "^6.2.5",
8285
"tui-image-editor": "^3.15.3"
8386
}
8487
}

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

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ ChartTmpComp = withViewFn(ChartTmpComp, (comp) => {
120120

121121
const handleOnMapScriptLoad = () => {
122122
setMapScriptLoaded(true);
123-
loadGoogleMapData();
123+
setTimeout(() => {
124+
loadGoogleMapData();
125+
})
124126
}
125127

126128
useEffect(() => {

client/packages/lowcoder-design/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"react-virtualized": "^9.22.3",
1414
"rehype-raw": "^6.1.1",
1515
"rehype-sanitize": "^5.0.1",
16-
"remark-gfm": "^3.0.1"
16+
"remark-gfm": "^3.0.1",
17+
"simplebar": "^6.2.5",
18+
"simplebar-react": "^3.2.4"
1719
},
1820
"devDependencies": {
1921
"@rollup/plugin-commonjs": "^23.0.2",
@@ -23,6 +25,7 @@
2325
"@rollup/plugin-typescript": "^9.0.2",
2426
"@rollup/plugin-url": "^8.0.1",
2527
"@svgr/rollup": "^6.5.1",
28+
"@types/simplebar": "^5.3.3",
2629
"rollup": "^2",
2730
"rollup-plugin-cleaner": "^1.0.0",
2831
"rollup-plugin-polyfill-node": "^0.11.0",

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

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import React from "react";
22
import SimpleBar from "simplebar-react";
3+
import 'simplebar-react/dist/simplebar.min.css';
34
import styled from "styled-components";
5+
import { DebouncedFunc } from 'lodash'; // Assuming you're using lodash's DebouncedFunc type
46

5-
const ScrollBarWrapper = styled.div`
7+
8+
const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
69
min-height: 0;
710
height: 100%;
811
width: 100%;
@@ -33,19 +36,39 @@ const ScrollBarWrapper = styled.div`
3336
top: 10px;
3437
bottom: 10px;
3538
}
39+
40+
${props => props.hidePlaceholder && `
41+
.simplebar-placeholder {
42+
display: none !important;
43+
}
44+
`}
3645
`;
3746

38-
interface IProps extends SimpleBar.Props {
47+
// .simplebar-placeholder { added by Falk Wolsky to hide the placeholder - as it doubles the vertical space of a Module on a page
48+
49+
interface IProps {
3950
children: React.ReactNode;
4051
className?: string;
4152
height?: string;
53+
style?: React.CSSProperties; // Add this line to include a style prop
54+
scrollableNodeProps?: {
55+
onScroll: DebouncedFunc<(e: any) => void>;
56+
};
57+
hidePlaceholder?: boolean;
58+
hideScrollbar?: boolean;
4259
}
4360

44-
export const ScrollBar = (props: IProps) => {
45-
const { height = "100%", className, children, ...otherProps } = props;
46-
return (
61+
export const ScrollBar = ({ height = "100%", className, children, style, scrollableNodeProps, hideScrollbar = false, ...otherProps }: IProps) => {
62+
// You can now use the style prop directly or pass it to SimpleBar
63+
const combinedStyle = { ...style, height }; // Example of combining height with passed style
64+
65+
return hideScrollbar ? (
66+
<ScrollBarWrapper className={className}>
67+
{children}
68+
</ScrollBarWrapper>
69+
) : (
4770
<ScrollBarWrapper className={className}>
48-
<SimpleBar forceVisible="y" style={{ height: height }} {...otherProps}>
71+
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
4972
{children}
5073
</SimpleBar>
5174
</ScrollBarWrapper>

client/packages/lowcoder-design/src/icons/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export { ReactComponent as WidthIcon } from "./icon-width.svg";
290290
export { ReactComponent as ResponsiveLayoutCompIcon } from "./icon-responsive-layout-comp.svg";
291291
export { ReactComponent as TextSizeIcon } from "./remix/font-size-2.svg";
292292
export { ReactComponent as FontFamilyIcon } from "./remix/font-sans-serif.svg";
293-
export { ReactComponent as TextWeigthIcon } from "./remix/bold.svg";
293+
export { ReactComponent as TextWeightIcon } from "./remix/bold.svg";
294294
export { ReactComponent as BorderWidthIcon } from "./remix/expand-width-line.svg";
295295
export { ReactComponent as LeftInfoLine } from "./remix/information-line.svg";
296296
export { ReactComponent as LeftInfoFill } from "./remix/information-fill.svg";

client/packages/lowcoder-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.3.1",
3+
"version": "2.3.4",
44
"type": "module",
55
"files": [
66
"src",

client/packages/lowcoder/index.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no viewport-fit=cover"/>
66
<meta lang="en" name="description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
7-
<meta name="theme-color" content="#000000" />
8-
<meta property="iframely:title" content="Lowcoder" />
9-
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
10-
<!-- Added Montserrat google font link to test font family style property for components -->
11-
<link rel="preconnect" href="https://fonts.googleapis.com">
12-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13-
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
7+
<meta name="theme-color" content="#000000" />
148
<style>
159
html,
1610
body {

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"rehype-sanitize": "^5.0.1",
9494
"remark-gfm": "^3.0.1",
9595
"resize-observer-polyfill": "^1.5.1",
96-
"simplebar-react": "2.3.6",
96+
"simplebar-react": "^3.2.4",
9797
"sql-formatter": "^8.2.0",
9898
"styled-components": "^6.1.6",
9999
"stylis": "^4.1.1",

client/packages/lowcoder/src/app.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ class AppIndex extends React.Component<AppIndexProps, any> {
9696
render() {
9797
const isTemplate = hasQueryParam("template");
9898
const pathname = history.location.pathname;
99+
100+
// we check if we are on the public cloud
101+
const isLowCoderDomain = window.location.hostname === 'app.lowcoder.cloud';
102+
99103
// make sure all users in this app have checked login info
100104
if (!this.props.isFetchUserFinished) {
101105
const hideLoadingHeader = isTemplate || isAuthUnRequired(pathname);
@@ -107,6 +111,21 @@ class AppIndex extends React.Component<AppIndexProps, any> {
107111
{<title>{this.props.brandName}</title>}
108112
{<link rel="icon" href={this.props.favicon} />}
109113
<meta name="description" content={trans("productDesc")} />
114+
115+
{isLowCoderDomain && (
116+
<>
117+
{/* setting Meta Attributes to be able for embedding via iframely */}
118+
<meta property="iframely:title" content="Lowcoder" />
119+
<meta property="iframely:description" content="Lowcoder | rapid App & VideoMeeting builder for everyone." />
120+
121+
<link rel="preconnect" href="https://fonts.googleapis.com"/>
122+
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>
123+
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,700;1,400&display=swap" rel="stylesheet"/>
124+
{/* embedding analytics of Cleabits */}
125+
<script src="https://tag.clearbitscripts.com/v1/pk_931b51e405557300e6a7c470e8247d5f/tags.js" referrerPolicy="strict-origin-when-cross-origin"></script>
126+
</>
127+
)}
128+
110129
</Helmet>
111130
<SystemWarning />
112131
<Router history={history}>

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

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

113113

114114
if (compInfo.isRemote) {
115+
items.push({
116+
text: trans("history.currentVersion") + ": " + compInfo.packageVersion,
117+
onClick: () => {
118+
119+
},
120+
});
121+
115122
items.push({
116123
text: trans("comp.menuUpgradeToLatest"),
117124
onClick: () => {

client/packages/lowcoder/src/comps/comps/allComp.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Object.keys(QueryMap).forEach((key) => {
7272

7373
function logDiff(comp: any, newComp: any, prefix?: string) {
7474
if (_.isNil(comp.children)) {
75-
console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
75+
// console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
7676
return;
7777
}
7878
Object.keys(comp.children).forEach((key) => {

client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,11 @@ export function ListView(props: Props) {
215215
<BackgroundColorContext.Provider value={style.background}>
216216
<ListViewWrapper $style={style} $paddingWidth={paddingWidth}>
217217
<BodyWrapper ref={ref} $autoHeight={autoHeight}>
218-
{scrollbars ? (
219-
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }}>
220-
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
221-
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
222-
</ReactResizeDetector>}</>
223-
</ScrollBar>
224-
) : (
218+
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
225219
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
226220
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
227221
</ReactResizeDetector>}</>
228-
)}
222+
</ScrollBar>
229223
</BodyWrapper>
230224
<FooterWrapper>
231225
<Pagination size="small" itemRender={pageItemRender} {...pageInfo.pagination} />

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ class ModuleTmpComp extends ModuleCompBase {
505505
const ModuleCompWithView = withViewFn(ModuleTmpComp, (comp) => {
506506
const appId = comp.children.appId.getView();
507507
const error = comp.children.error.getView();
508+
const scrollbars = comp.children.scrollbars.getView();
508509

509510
const moduleExternalState: ExternalEditorContextState = useMemo(
510511
() => ({
@@ -530,7 +531,7 @@ const ModuleCompWithView = withViewFn(ModuleTmpComp, (comp) => {
530531
if (comp.moduleRootComp && comp.isReady) {
531532
content = (
532533
<Wrapper className="module-wrapper">
533-
<ScrollBar style={{ height: comp.children.scrollbars.getView() ? "100%" : "auto", margin: "0px", padding: "0px" }}>
534+
<ScrollBar style={{ height: comp.autoHeight() ? "100%" : "auto", margin: "0px", padding: "0px" }} hideScrollbar={!scrollbars}>
534535
<ExternalEditorContext.Provider value={moduleExternalState}>
535536
{comp.moduleRootComp.getView()}
536537
</ExternalEditorContext.Provider>

client/packages/lowcoder/src/comps/comps/moduleContainerComp/moduleLayoutComp.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ function ModuleLayoutView(props: IProps) {
9696
};
9797

9898
return (
99-
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }}>
100-
<CanvasView
99+
<CanvasView
101100
layout={layout}
102101
items={items}
103102
positionParams={{ ...positionParams, cols: parseInt(defaultGrid) }}
@@ -106,7 +105,6 @@ function ModuleLayoutView(props: IProps) {
106105
onLayoutChange={onLayoutChange}
107106
extraHeight="0px"
108107
/>
109-
</ScrollBar>
110108
);
111109
}
112110

@@ -118,26 +116,28 @@ export class ModuleLayoutComp extends ModuleLayoutCompBase implements IContainer
118116
const rowCount = this.children.containerRowCount.getView();
119117
return (
120118
<div>
121-
<ModuleLayoutView
122-
positionParams={this.children.positionParams.getView()}
123-
containerSize={this.children.containerSize.getView()}
124-
containerView={this.children.container.containerView({
125-
rowCount,
126-
isRowCountLocked,
127-
onRowCountChange: (rowCount) => {
128-
this.children.containerRowCount.dispatchChangeValueAction(rowCount);
129-
},
130-
})}
131-
onPositionParamsChange={(params) => {
132-
setTimeout(() => this.children.positionParams.dispatchChangeValueAction(params));
133-
}}
134-
onLayoutChange={(layout) => {
135-
this.children.containerSize.dispatchChangeValueAction({
136-
height: layout[moduleContainerId].h,
137-
width: layout[moduleContainerId].w,
138-
});
139-
}}
140-
/>
119+
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }} hidePlaceholder={false}>
120+
<ModuleLayoutView
121+
positionParams={this.children.positionParams.getView()}
122+
containerSize={this.children.containerSize.getView()}
123+
containerView={this.children.container.containerView({
124+
rowCount,
125+
isRowCountLocked,
126+
onRowCountChange: (rowCount) => {
127+
this.children.containerRowCount.dispatchChangeValueAction(rowCount);
128+
},
129+
})}
130+
onPositionParamsChange={(params) => {
131+
setTimeout(() => this.children.positionParams.dispatchChangeValueAction(params));
132+
}}
133+
onLayoutChange={(layout) => {
134+
this.children.containerSize.dispatchChangeValueAction({
135+
height: layout[moduleContainerId].h,
136+
width: layout[moduleContainerId].w,
137+
});
138+
}}
139+
/>
140+
</ScrollBar>
141141
</div>
142142
);
143143
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ import {
5252

5353
import { useContext } from "react";
5454
import { EditorContext } from "comps/editorState";
55+
import { migrateOldData } from "comps/generators/simpleGenerators";
56+
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
5557

5658
const getStyle = (style: InputLikeStyleType) => {
5759
return css`
@@ -372,7 +374,7 @@ const CustomInputNumber = (props: RecordConstructorToView<typeof childrenMap>) =
372374
);
373375
};
374376

375-
const NumberInputTmpComp = (function () {
377+
let NumberInputTmpComp = (function () {
376378
return new UICompBuilder(childrenMap, (props) => {
377379
return props.label({
378380
required: props.required,
@@ -434,6 +436,8 @@ const NumberInputTmpComp = (function () {
434436
.build();
435437
})();
436438

439+
NumberInputTmpComp = migrateOldData(NumberInputTmpComp, fixOldInputCompData);
440+
437441
const NumberInputTmp2Comp = withMethodExposing(
438442
NumberInputTmpComp,
439443
refMethods([

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const getStyle = (style: SliderStyleType) => {
3030
}
3131
.ant-slider-handle {
3232
background-color: ${style.thumb};
33-
border-color: ${style.thumbBoder};
33+
border-color: ${style.thumbBorder};
3434
}
3535
}
3636
&:hover {
@@ -39,7 +39,7 @@ const getStyle = (style: SliderStyleType) => {
3939
}
4040
}
4141
.ant-slider-handle:focus {
42-
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBoder, 0.08), 0.12)};
42+
box-shadow: 0 0 0 5px ${fadeColor(darkenColor(style.thumbBorder, 0.08), 0.12)};
4343
}
4444
}
4545
`;

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import { ValueFromOption } from "lowcoder-design";
2222
import { EllipsisTextCss } from "lowcoder-design";
2323
import { trans } from "i18n";
2424
import { RefControl } from "comps/controls/refControl";
25+
import { migrateOldData } from "comps/generators/simpleGenerators";
26+
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
2527

2628
export const getStyle = (style: CheckboxStyleType) => {
2729
return css`
@@ -126,7 +128,7 @@ const CheckboxGroup = styled(AntdCheckboxGroup) <{
126128
}}
127129
`;
128130

129-
const CheckboxBasicComp = (function () {
131+
let CheckboxBasicComp = (function () {
130132
const childrenMap = {
131133
defaultValue: arrayStringExposingStateControl("defaultValue"),
132134
value: arrayStringExposingStateControl("value"),
@@ -176,6 +178,8 @@ const CheckboxBasicComp = (function () {
176178
.build();
177179
})();
178180

181+
CheckboxBasicComp = migrateOldData(CheckboxBasicComp, fixOldInputCompData);
182+
179183
export const CheckboxComp = withExposingConfigs(CheckboxBasicComp, [
180184
new NameConfig("value", trans("selectInput.valueDesc")),
181185
SelectInputInvalidConfig,

0 commit comments

Comments
 (0)