Skip to content

Commit 6173081

Browse files
authored
Merge pull request #1094 from lowcoder-org/dev
Dev -> Main v2.4.5
2 parents 90e4e81 + c000da1 commit 6173081

File tree

348 files changed

+195934
-41871
lines changed

Some content is hidden

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

348 files changed

+195934
-41871
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.4
1+
2.4.5

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

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
hiddenPropertyView,
3333
ChangeEventHandlerControl,
3434
DragEventHandlerControl,
35+
CalendarEventHandlerControl,
3536
Section,
3637
sectionNames,
3738
dropdownControl,
@@ -45,7 +46,9 @@ import {
4546
CalendarDeleteIcon,
4647
Tooltip,
4748
useMergeCompStyles,
48-
} from "lowcoder-sdk";
49+
EditorContext,
50+
CompNameContext,
51+
} from 'lowcoder-sdk';
4952

5053
import {
5154
DefaultWithFreeViewOptions,
@@ -76,7 +79,7 @@ let childrenMap: any = {
7679
resourcesEvents: jsonValueExposingStateControl("resourcesEvents", resourcesEventsDefaultData),
7780
resources: jsonValueExposingStateControl("resources", resourcesDefaultData),
7881
resourceName: withDefault(StringControl, trans("calendar.resourcesDefault")),
79-
onEvent: ChangeEventHandlerControl,
82+
onEvent: CalendarEventHandlerControl,
8083
// onDropEvent: safeDragEventHandlerControl,
8184
editable: withDefault(BoolControl, true),
8285
showEventTime: withDefault(BoolControl, true),
@@ -120,6 +123,12 @@ let CalendarBasicComp = (function () {
120123
currentFreeView?: string;
121124
currentPremiumView?: string;
122125
}, dispatch: any) => {
126+
127+
const comp = useContext(EditorContext).getUICompByName(
128+
useContext(CompNameContext)
129+
);
130+
const onEventVal = comp?.toJsonValue().comp.onEvent;
131+
123132

124133
const theme = useContext(ThemeContext);
125134
const ref = createRef<HTMLDivElement>();
@@ -303,7 +312,12 @@ let CalendarBasicComp = (function () {
303312
};
304313
showModal(eventInfo, true);
305314
} else {
306-
showModal(editEvent.current, false);
315+
if (onEventVal && onEventVal.some((e: any) => e.name === 'doubleClick')) {
316+
// Check if 'doubleClick' is included in the array
317+
props.onEvent('doubleClick');
318+
} else {
319+
showModal(editEvent.current as EventType, false);
320+
}
307321
}
308322
};
309323

@@ -433,7 +447,6 @@ let CalendarBasicComp = (function () {
433447
props.onDropEvent("dropEvent");
434448
}
435449
};
436-
437450
return (
438451
<Wrapper
439452
ref={ref}

client/packages/lowcoder-core/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ var CodeNode = /** @class */ (function (_super) {
17771777
return;
17781778
}
17791779
// wait for lazy loaded comps to load before executing query on page load
1780-
if (!Object.keys(value).length) {
1780+
if (!Object.keys(value).length && paths.size) {
17811781
isFetching_1 = true;
17821782
ready_1 = false;
17831783
}

client/packages/lowcoder-core/src/eval/codeNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class CodeNode extends AbstractNode<ValueAndMsg<unknown>> {
173173
return;
174174
}
175175
// wait for lazy loaded comps to load before executing query on page load
176-
if (!Object.keys(value).length) {
176+
if (!Object.keys(value).length && paths.size) {
177177
isFetching = true;
178178
ready = false;
179179
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { default as AntdCollapse, CollapseProps } from "antd/es/collapse";
2-
import { ReactComponent as UnFold } from "icons/icon-unfold.svg";
3-
import { ReactComponent as Folded } from "icons/icon-folded.svg";
4-
import { ReactComponent as Omit } from "icons/icon-omit.svg";
2+
import { ReactComponent as UnFold } from "icons/v1/icon-unfold.svg";
3+
import { ReactComponent as Folded } from "icons/v1/icon-folded.svg";
4+
import { ReactComponent as Omit } from "icons/v1/icon-omit.svg";
55
import styled, { css } from "styled-components";
66
import React, { ReactNode } from "react";
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ButtonProps } from "antd/es/button";
22
import { default as AntdModal, ModalFuncProps, ModalProps as AntdModalProps } from "antd/es/modal";
3-
import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg";
3+
import { ReactComponent as PackUpIcon } from "icons/v1/icon-Pack-up.svg";
44
import React, { ReactNode, useState } from "react";
55
import styled from "styled-components";
66
import { TacoButtonType, TacoButton } from "components/button";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { default as AntdMenu, MenuProps, SubMenuProps } from "antd/es/menu";
22
import { NormalMenuIconColor, TabActiveColor } from "constants/style";
3-
import { ReactComponent as AddIcon } from "icons/icon-add.svg";
4-
import { ReactComponent as RecycleBinIcon } from "icons/icon-recycle-bin.svg";
3+
import { ReactComponent as AddIcon } from "icons/v1/icon-add.svg";
4+
import { ReactComponent as RecycleBinIcon } from "icons/v1/icon-recycle-bin.svg";
55
import styled from "styled-components";
66

77
const MenuItemWrapper = styled.div`

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ interface IProps {
5656
};
5757
$hideplaceholder?: boolean;
5858
hideScrollbar?: boolean;
59+
prefixNode?: React.ReactNode;
60+
suffixNode?: React.ReactNode;
5961
}
6062

6163
export const ScrollBar = ({
@@ -65,6 +67,8 @@ export const ScrollBar = ({
6567
scrollableNodeProps,
6668
hideScrollbar = false,
6769
$hideplaceholder = false,
70+
prefixNode,
71+
suffixNode,
6872
...otherProps
6973
}: IProps) => {
7074
const height = style?.height ?? '100%';
@@ -73,12 +77,24 @@ export const ScrollBar = ({
7377

7478
return hideScrollbar ? (
7579
<ScrollBarWrapper className={className}>
80+
{prefixNode}
7681
{children}
82+
{suffixNode}
7783
</ScrollBarWrapper>
7884
) : (
7985
<ScrollBarWrapper className={className}>
8086
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
81-
{children}
87+
{({ scrollableNodeProps, contentNodeProps }) => {
88+
return (
89+
<div {...scrollableNodeProps as any}>
90+
{prefixNode}
91+
<div {...contentNodeProps as any}>
92+
{children}
93+
</div>
94+
{suffixNode}
95+
</div>
96+
);
97+
}}
8298
</SimpleBar>
8399
</ScrollBarWrapper>
84100
);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from "styled-components";
22
import { default as Input, InputProps } from "antd/es/input";
3-
import { ReactComponent as Icon } from "icons/icon-Search.svg";
3+
import { ReactComponent as Icon } from "icons/v1/icon-Search.svg";
44
import React, { CSSProperties } from "react";
55

66
const SearchInput = styled(Input)`

0 commit comments

Comments
 (0)