Skip to content

Commit

Permalink
Merge pull request #1094 from lowcoder-org/dev
Browse files Browse the repository at this point in the history
Dev -> Main v2.4.5
  • Loading branch information
FalkWolsky authored Aug 6, 2024
2 parents 90e4e81 + c000da1 commit 6173081
Show file tree
Hide file tree
Showing 348 changed files with 195,934 additions and 41,871 deletions.
2 changes: 1 addition & 1 deletion client/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.4
2.4.5
2 changes: 1 addition & 1 deletion client/packages/lowcoder-comps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-comps",
"version": "2.4.9",
"version": "2.4.11",
"type": "module",
"license": "MIT",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
hiddenPropertyView,
ChangeEventHandlerControl,
DragEventHandlerControl,
CalendarEventHandlerControl,
Section,
sectionNames,
dropdownControl,
Expand All @@ -45,7 +46,9 @@ import {
CalendarDeleteIcon,
Tooltip,
useMergeCompStyles,
} from "lowcoder-sdk";
EditorContext,
CompNameContext,
} from 'lowcoder-sdk';

import {
DefaultWithFreeViewOptions,
Expand Down Expand Up @@ -76,7 +79,7 @@ let childrenMap: any = {
resourcesEvents: jsonValueExposingStateControl("resourcesEvents", resourcesEventsDefaultData),
resources: jsonValueExposingStateControl("resources", resourcesDefaultData),
resourceName: withDefault(StringControl, trans("calendar.resourcesDefault")),
onEvent: ChangeEventHandlerControl,
onEvent: CalendarEventHandlerControl,
// onDropEvent: safeDragEventHandlerControl,
editable: withDefault(BoolControl, true),
showEventTime: withDefault(BoolControl, true),
Expand Down Expand Up @@ -120,6 +123,12 @@ let CalendarBasicComp = (function () {
currentFreeView?: string;
currentPremiumView?: string;
}, dispatch: any) => {

const comp = useContext(EditorContext).getUICompByName(
useContext(CompNameContext)
);
const onEventVal = comp?.toJsonValue().comp.onEvent;


const theme = useContext(ThemeContext);
const ref = createRef<HTMLDivElement>();
Expand Down Expand Up @@ -303,7 +312,12 @@ let CalendarBasicComp = (function () {
};
showModal(eventInfo, true);
} else {
showModal(editEvent.current, false);
if (onEventVal && onEventVal.some((e: any) => e.name === 'doubleClick')) {
// Check if 'doubleClick' is included in the array
props.onEvent('doubleClick');
} else {
showModal(editEvent.current as EventType, false);
}
}
};

Expand Down Expand Up @@ -433,7 +447,6 @@ let CalendarBasicComp = (function () {
props.onDropEvent("dropEvent");
}
};

return (
<Wrapper
ref={ref}
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-core/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ var CodeNode = /** @class */ (function (_super) {
return;
}
// wait for lazy loaded comps to load before executing query on page load
if (!Object.keys(value).length) {
if (!Object.keys(value).length && paths.size) {
isFetching_1 = true;
ready_1 = false;
}
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-core/src/eval/codeNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class CodeNode extends AbstractNode<ValueAndMsg<unknown>> {
return;
}
// wait for lazy loaded comps to load before executing query on page load
if (!Object.keys(value).length) {
if (!Object.keys(value).length && paths.size) {
isFetching = true;
ready = false;
}
Expand Down
6 changes: 3 additions & 3 deletions client/packages/lowcoder-design/src/components/Collapase.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as AntdCollapse, CollapseProps } from "antd/es/collapse";
import { ReactComponent as UnFold } from "icons/icon-unfold.svg";
import { ReactComponent as Folded } from "icons/icon-folded.svg";
import { ReactComponent as Omit } from "icons/icon-omit.svg";
import { ReactComponent as UnFold } from "icons/v1/icon-unfold.svg";
import { ReactComponent as Folded } from "icons/v1/icon-folded.svg";
import { ReactComponent as Omit } from "icons/v1/icon-omit.svg";
import styled, { css } from "styled-components";
import React, { ReactNode } from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ButtonProps } from "antd/es/button";
import { default as AntdModal, ModalFuncProps, ModalProps as AntdModalProps } from "antd/es/modal";
import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg";
import { ReactComponent as PackUpIcon } from "icons/v1/icon-Pack-up.svg";
import React, { ReactNode, useState } from "react";
import styled from "styled-components";
import { TacoButtonType, TacoButton } from "components/button";
Expand Down
4 changes: 2 additions & 2 deletions client/packages/lowcoder-design/src/components/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as AntdMenu, MenuProps, SubMenuProps } from "antd/es/menu";
import { NormalMenuIconColor, TabActiveColor } from "constants/style";
import { ReactComponent as AddIcon } from "icons/icon-add.svg";
import { ReactComponent as RecycleBinIcon } from "icons/icon-recycle-bin.svg";
import { ReactComponent as AddIcon } from "icons/v1/icon-add.svg";
import { ReactComponent as RecycleBinIcon } from "icons/v1/icon-recycle-bin.svg";
import styled from "styled-components";

const MenuItemWrapper = styled.div`
Expand Down
18 changes: 17 additions & 1 deletion client/packages/lowcoder-design/src/components/ScrollBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ interface IProps {
};
$hideplaceholder?: boolean;
hideScrollbar?: boolean;
prefixNode?: React.ReactNode;
suffixNode?: React.ReactNode;
}

export const ScrollBar = ({
Expand All @@ -65,6 +67,8 @@ export const ScrollBar = ({
scrollableNodeProps,
hideScrollbar = false,
$hideplaceholder = false,
prefixNode,
suffixNode,
...otherProps
}: IProps) => {
const height = style?.height ?? '100%';
Expand All @@ -73,12 +77,24 @@ export const ScrollBar = ({

return hideScrollbar ? (
<ScrollBarWrapper className={className}>
{prefixNode}
{children}
{suffixNode}
</ScrollBarWrapper>
) : (
<ScrollBarWrapper className={className}>
<SimpleBar style={combinedStyle} scrollableNodeProps={scrollableNodeProps} {...otherProps}>
{children}
{({ scrollableNodeProps, contentNodeProps }) => {
return (
<div {...scrollableNodeProps as any}>
{prefixNode}
<div {...contentNodeProps as any}>
{children}
</div>
{suffixNode}
</div>
);
}}
</SimpleBar>
</ScrollBarWrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";
import { default as Input, InputProps } from "antd/es/input";
import { ReactComponent as Icon } from "icons/icon-Search.svg";
import { ReactComponent as Icon } from "icons/v1/icon-Search.svg";
import React, { CSSProperties } from "react";

const SearchInput = styled(Input)`
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/Section.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { trans } from "i18n/design";
import React, { ReactNode, useContext } from "react";
import styled from "styled-components";
import { ReactComponent as Packup } from "icons/icon-Pack-up.svg";
import { ReactComponent as Packup } from "icons/v1/icon-Pack-up.svg";
import { labelCss } from "./Label";
import { controlItem, ControlNode } from "./control";
import { Tooltip } from "./toolTip";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import { ReactComponent as close } from "icons/icon-flokclose.svg";
import { ReactComponent as close } from "icons/v1/icon-flokclose.svg";
import { ScrollBar } from "../components/ScrollBar";

const Container = styled.div<{ $width: number }>`
Expand Down
4 changes: 2 additions & 2 deletions client/packages/lowcoder-design/src/components/Switch.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from "react";
import { ReactNode } from "react";
import styled, { css } from "styled-components";
import { ReactComponent as jsIcon } from "icons/icon-Js-colors.svg";
import { ReactComponent as jsIconGray } from "icons/icon-Js-Gray.svg";
import { ReactComponent as jsIcon } from "icons/v1/icon-Js-colors.svg";
import { ReactComponent as jsIconGray } from "icons/v1/icon-Js-Gray.svg";
import { ToolTipLabel } from "components/toolTip";

type ControlPlacement = "bottom" | "right" | "modal";
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/Trees.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled, { css } from "styled-components";
import { ReactComponent as Folded } from "icons/icon-folded.svg";
import { ReactComponent as Folded } from "icons/v1/icon-folded.svg";
import { DataNode, TreeProps } from "antd/es/tree";
import DirectoryTree from "antd/es/tree/DirectoryTree";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { trans } from "i18n/design";
import { ReactNode } from "react";
import styled from "styled-components";
import { ReactComponent as ContainerDrag } from "icons/icon-container-drag.svg";
import { ReactComponent as ContainerDrag } from "icons/v1/icon-container-drag.svg";

type ContainerPlaceholderProps = {
children?: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy from "copy-to-clipboard";
import styled from "styled-components";
import { ReactComponent as Dcopy } from "icons/icon-copy.svg";
import { ReactComponent as Dcopy } from "icons/v1/icon-copy.svg";
import { trans } from "i18n/design";
import { CSSProperties } from "react";
import { messageInstance } from "./GlobalInstances";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { default as AntdSelect, SelectProps as AntdSelectProps } from "antd/es/select";
import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg";
import { ReactComponent as PackUpIcon } from "icons/v1/icon-Pack-up.svg";
import styled from "styled-components";
import React from "react";

Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import { ReactComponent as Edit } from "icons/icon-text-edit.svg";
import { ReactComponent as Edit } from "icons/v1/icon-text-edit.svg";
import { CSSProperties, ReactNode, useEffect, useRef, useState } from "react";
import { Input } from "../components/Input";
import { InputProps, InputRef } from "antd/es/input";
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CustomSelect } from "./customSelect";
import { EllipsisTextCss, labelCss } from "./Label";
import { ToolTipLabel } from "./toolTip";
import styled from "styled-components";
import { ReactComponent as Star } from "icons/icon-star.svg";
import { ReactComponent as Star } from "icons/v1/icon-star.svg";
import _ from "lodash";
import { KeyValueList } from "./keyValueList";
import { OptionsType, ValueFromOption } from "./Dropdown";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import { ReactComponent as Bin } from "icons/icon-recycle-bin.svg";
import { ReactComponent as Bin } from "icons/v1/icon-recycle-bin.svg";
import { TacoButton } from "./button";
import { ReactNode } from "react";
import { BluePlusIcon } from "icons";
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, { useState } from "react";
import { CSS } from "@dnd-kit/utilities";
import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
import { ConstructorToComp, MultiCompConstructor } from "lowcoder-core";
import { ReactComponent as WarnIcon } from "icons/icon-warning-white.svg";
import { ReactComponent as WarnIcon } from "icons/v1/icon-warning-white.svg";
import { DndContext } from "@dnd-kit/core";
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
import { ActiveTextColor, GreyTextColor } from "constants/style";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { default as AntdInput, InputRef } from "antd/es/input";
import { ReactComponent as MustFillStar } from "icons/icon-must-fill-star.svg";
import { ReactComponent as MustFillStar } from "icons/v1/icon-must-fill-star.svg";
import { trans } from "i18n/design";
import { CSSProperties, Ref, useEffect, useRef, useState } from "react";
import styled, { css } from "styled-components";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { default as Pagination, PaginationProps } from "antd/es/pagination";
import styled, { css } from "styled-components";
import { ReactComponent as PackUpIcon } from "icons/icon-Pack-up.svg";
import { ReactComponent as PackUpIcon } from "icons/v1/icon-Pack-up.svg";

const packUpIconCss = css`
height: 24px;
Expand Down
2 changes: 1 addition & 1 deletion client/packages/lowcoder-design/src/components/toolTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { default as AntdTooltip, TooltipProps } from "antd/es/tooltip";
import { CSSProperties, ReactNode } from "react";
import styled, { css } from "styled-components";
import { labelCss } from "components/Label";
import { ReactComponent as CloseIcon } from "icons/icon-close.svg";
import { ReactComponent as CloseIcon } from "icons/v1/icon-close.svg";
import { TooltipRenderProps } from "react-joyride";
import { trans } from "i18n/design";

Expand Down
Loading

0 comments on commit 6173081

Please sign in to comment.