Skip to content

Commit 3819c30

Browse files
author
GoldenAnt
authored
Merge branch 'dev' into feature/spec_version
2 parents 13212ef + 6e98446 commit 3819c30

File tree

335 files changed

+9157
-729
lines changed

Some content is hidden

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

335 files changed

+9157
-729
lines changed

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/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)`

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { trans } from "i18n/design";
22
import React, { ReactNode, useContext } from "react";
33
import styled from "styled-components";
4-
import { ReactComponent as Packup } from "icons/icon-Pack-up.svg";
4+
import { ReactComponent as Packup } from "icons/v1/icon-Pack-up.svg";
55
import { labelCss } from "./Label";
66
import { controlItem, ControlNode } from "./control";
77
import { Tooltip } from "./toolTip";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from "styled-components";
2-
import { ReactComponent as close } from "icons/icon-flokclose.svg";
2+
import { ReactComponent as close } from "icons/v1/icon-flokclose.svg";
33
import { ScrollBar } from "../components/ScrollBar";
44

55
const Container = styled.div<{ $width: number }>`

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from "react";
22
import { ReactNode } from "react";
33
import styled, { css } from "styled-components";
4-
import { ReactComponent as jsIcon } from "icons/icon-Js-colors.svg";
5-
import { ReactComponent as jsIconGray } from "icons/icon-Js-Gray.svg";
4+
import { ReactComponent as jsIcon } from "icons/v1/icon-Js-colors.svg";
5+
import { ReactComponent as jsIconGray } from "icons/v1/icon-Js-Gray.svg";
66
import { ToolTipLabel } from "components/toolTip";
77

88
type ControlPlacement = "bottom" | "right" | "modal";

0 commit comments

Comments
 (0)