Skip to content

Commit 0de683e

Browse files
Merge branch 'dev' of https://github.com/lowcoder-org/lowcoder into dev
2 parents 8e415b7 + 42efedb commit 0de683e

File tree

373 files changed

+29085
-4015
lines changed

Some content is hidden

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

373 files changed

+29085
-4015
lines changed

client/config/test/jest.config.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ export function currentDirName(importMetaUrl) {
66
return dirname(fileURLToPath(importMetaUrl));
77
}
88

9-
109
const globals = {};
1110
buildVars.forEach(({ name, defaultValue }) => {
1211
globals[name] = process.env[name] || defaultValue;
1312
});
14-
const edition = process.env.REACT_APP_EDITION;
15-
const isEEGlobal = edition === "enterprise-global";
16-
const isEE = edition === "enterprise" || isEEGlobal;
1713
const currentDir = currentDirName(import.meta.url);
1814

1915
export default {
@@ -22,8 +18,7 @@ export default {
2218
"react-markdown": path.resolve(currentDir, "./mocks/react-markdown.js"),
2319
"\\.md\\?url$": path.resolve(currentDir, "./mocks/markdown-url-module.js"),
2420
"^@lowcoder-ee(.*)$": path.resolve(
25-
currentDir,
26-
isEE ? "../../packages/lowcoder/src/ee/$1" : "../../packages/lowcoder/src/$1"
21+
currentDir, "../../packages/lowcoder/src/$1"
2722
),
2823
"lowcoder-sdk": path.resolve(currentDir, "../../packages/lowcoder/src/index.sdk"),
2924
},

client/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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-
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace lowcoder start",
1716
"build": "yarn node ./scripts/build.js",
1817
"test": "jest && yarn workspace lowcoder-comps test",
1918
"prepare": "yarn workspace lowcoder prepare",
@@ -52,7 +51,6 @@
5251
"mq-polyfill": "^1.1.8",
5352
"prettier": "^3.1.0",
5453
"rimraf": "^3.0.2",
55-
"rollup": "^2.79.0",
5654
"shelljs": "^0.8.5",
5755
"svgo": "^3.0.0",
5856
"typescript": "^4.8.4",
@@ -76,11 +74,12 @@
7674
"@testing-library/react": "^14.1.2",
7775
"@testing-library/user-event": "^14.5.1",
7876
"@types/styled-components": "^5.1.34",
79-
"antd-mobile": "^5.28.0",
77+
"antd-mobile": "^5.34.0",
8078
"chalk": "4",
8179
"number-precision": "^1.6.0",
8280
"react-player": "^2.11.0",
8381
"resize-observer-polyfill": "^1.5.1",
82+
"rollup": "^4.13.0",
8483
"simplebar": "^6.2.5",
8584
"tui-image-editor": "^3.15.3"
8685
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/lib
22
/node_modules
3+
/package
34
*.tgz

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

client/packages/lowcoder-comps/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "ESNext",
44
"experimentalDecorators": true,
55
"lib": ["dom", "dom.iterable", "esnext"],
66
"allowJs": true,

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { App } from 'antd';
2-
import type { MessageInstance } from 'antd/es/message/interface';
3-
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
4-
import type { NotificationInstance } from 'antd/es/notification/interface';
1+
import { default as App } from "antd/es/app";
2+
import type { MessageInstance } from "antd/es/message/interface";
3+
import type { ModalStaticFunctions } from "antd/es/modal/confirm";
4+
import type { NotificationInstance } from "antd/es/notification/interface";
55

66
let messageInstance: MessageInstance;
77
let notificationInstance: NotificationInstance;

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

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

6+
// import 'simplebar-react/dist/simplebar.min.css';
77

8-
const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
8+
const ScrollBarWrapper = styled.div<{ $hideplaceholder?: boolean }>`
99
min-height: 0;
1010
height: 100%;
1111
width: 100%;
@@ -37,7 +37,7 @@ const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
3737
bottom: 10px;
3838
}
3939
40-
${props => props.hidePlaceholder && `
40+
${props => Boolean(props.$hideplaceholder) && `
4141
.simplebar-placeholder {
4242
display: none !important;
4343
}
@@ -54,24 +54,32 @@ interface IProps {
5454
scrollableNodeProps?: {
5555
onScroll: DebouncedFunc<(e: any) => void>;
5656
};
57-
hidePlaceholder?: boolean;
57+
$hideplaceholder?: boolean;
5858
hideScrollbar?: boolean;
5959
}
6060

61-
export const ScrollBar = ({ height = "100%", className, children, style, scrollableNodeProps, hideScrollbar, ...otherProps }: IProps) => {
61+
export const ScrollBar = ({
62+
className,
63+
children,
64+
style,
65+
scrollableNodeProps,
66+
hideScrollbar = false,
67+
$hideplaceholder = false,
68+
...otherProps
69+
}: IProps) => {
70+
const height = style?.height ?? '100%';
6271
// You can now use the style prop directly or pass it to SimpleBar
6372
const combinedStyle = { ...style, height }; // Example of combining height with passed style
6473

65-
return (hideScrollbar ?? false) ? (
74+
return hideScrollbar ? (
75+
<ScrollBarWrapper className={className}>
76+
{children}
77+
</ScrollBarWrapper>
78+
) : (
6679
<ScrollBarWrapper className={className}>
6780
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
6881
{children}
6982
</SimpleBar>
7083
</ScrollBarWrapper>
71-
)
72-
: (
73-
<ScrollBarWrapper className={className}>
74-
{children}
75-
</ScrollBarWrapper>
7684
);
7785
};

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ const ShowChildren = styled.div<{ $show?: string; $noMargin?: boolean }>`
7575

7676
interface ISectionConfig<T> {
7777
name?: string;
78+
open?: boolean;
7879
width?: number;
7980
noMargin?: boolean;
8081
style?: React.CSSProperties;
@@ -103,7 +104,9 @@ export const PropertySectionContext = React.createContext<PropertySectionContext
103104
export const BaseSection = (props: ISectionConfig<ReactNode>) => {
104105
const { name } = props;
105106
const { compName, state, toggle } = useContext(PropertySectionContext);
106-
const open = name ? state[compName]?.[name] !== false : true;
107+
const open = props.open !== undefined ? props.open : name ? state[compName]?.[name] !== false : true;
108+
109+
// console.log("open", open, props.open);
107110

108111
const handleToggle = () => {
109112
if (!name) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import styled, { css } from "styled-components";
22
import { ReactComponent as Folded } from "icons/icon-folded.svg";
3-
import { DataNode, TreeProps } from "antd/lib/tree";
4-
import DirectoryTree from "antd/lib/tree/DirectoryTree";
3+
import { DataNode, TreeProps } from "antd/es/tree";
4+
import DirectoryTree from "antd/es/tree/DirectoryTree";
55

66
export const Treediv = styled.div<{ $height?: number }>`
77
padding-left: 24px;

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import { CSSProperties } from "react";
2-
import { Ref } from "react";
3-
import ReactPlayer from "react-player";
2+
import { lazy, Ref } from "react";
3+
import type {default as ReactPlayerType} from "react-player";
44
import styled from "styled-components";
55

6+
const ReactPlayer = lazy(() => import("react-player"));
7+
68
const Audio = styled(ReactPlayer)`
79
height: 32px !important;
810
`;
@@ -14,7 +16,7 @@ export function TacoAudio(props: {
1416
onEnded?: () => void;
1517
className?: string;
1618
style?: CSSProperties;
17-
audioRef?: Ref<ReactPlayer>;
19+
audioRef?: Ref<ReactPlayerType>;
1820
autoPlay?: boolean;
1921
loop?: boolean;
2022
}) {

0 commit comments

Comments
 (0)