Skip to content

Commit

Permalink
Merge pull request #1334 from lowcoder-org/feature-extension
Browse files Browse the repository at this point in the history
Feature extension
  • Loading branch information
FalkWolsky authored Nov 22, 2024
2 parents d6d7a88 + 4e4e906 commit ab549e4
Show file tree
Hide file tree
Showing 8 changed files with 798 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Wrapper = styled.div<{
$itemHeight?: number;
}>`
position: relative;
width: 100%;
width: auto;
height: ${(props) => props.$itemHeight ?? 30}px;
/* border: 1px solid #d7d9e0; */
border-radius: 4px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { DraggableTreeContext } from "./DraggableTreeContext";
import DroppablePlaceholder from "./DroppablePlaceHolder";
import { DraggableTreeNode, DraggableTreeNodeItemRenderProps, IDragData, IDropData } from "./types";
import { checkDroppableFlag } from "./util";
import { Flex } from "antd";

const DraggableMenuItemWrapper = styled.div`
position: relative;
Expand Down Expand Up @@ -88,29 +89,34 @@ export default function DraggableMenuItem(props: IDraggableMenuItemProps) {
disabled={isDragging || disabled}
/>
)}
<DraggableItem
path={path}
id={id}
dropInAsSub={dropInAsSub && canDropIn !== false}
isOver={isOver}
ref={(node) => {
setDragNodeRef(node);
setDropNodeRef(node);
}}
{...dragListeners}
>
{renderContent?.({
node: item,
isOver,
path,
isOverlay,
hasChildren: items.length > 0,
dragging: !!(isDragging || parentDragging),
isFolded: isFold,
onDelete: () => onDelete?.(path),
onToggleFold: () => context.toggleFold(id),
}) || null}
</DraggableItem>
<Flex style={{paddingLeft: '15px'}} align="center">
<DraggableItem
path={path}
id={id}
dropInAsSub={dropInAsSub && canDropIn !== false}
isOver={isOver}
ref={(node) => {
setDragNodeRef(node);
setDropNodeRef(node);
}}
{...dragListeners}
>
<span style={{cursor: "default"}}></span>
</DraggableItem>
<div style={{flex: 1}}>
{renderContent?.({
node: item,
isOver,
path,
isOverlay,
hasChildren: items.length > 0,
dragging: !!(isDragging || parentDragging),
isFolded: isFold,
onDelete: () => onDelete?.(path),
onToggleFold: () => context.toggleFold(id),
}) || null}
</div>
</Flex>
</DraggableMenuItemWrapper>
{items.length > 0 && !isFold && (
<div className="sub-menu-list">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const ReduxActionTypes = {
FETCH_RAW_CURRENT_USER_SUCCESS: "FETCH_RAW_CURRENT_USER_SUCCESS",
FETCH_API_KEYS: "FETCH_API_KEYS",
FETCH_API_KEYS_SUCCESS: "FETCH_API_KEYS_SUCCESS",

MOVE_TO_FOLDER2_SUCCESS: "MOVE_TO_FOLDER2_SUCCESS",

/* plugin RELATED */
FETCH_DATA_SOURCE_TYPES: "FETCH_DATA_SOURCE_TYPES",
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,7 @@ export const en = {
"switch": "Switch Component: "
},
"module": {
"folderNotEmpty": "Folder is not empty",
"emptyText": "No Data",
"docLink": "Read More About Modules...",
"documentationText" : "Modules are complete Applications, that can get included and repeated in other Applications and it functions just like a single component. As modules can get embedded, they need to be able to interact with your outside apps or websites. This four settings help to support communication with a Module.",
Expand Down
Loading

0 comments on commit ab549e4

Please sign in to comment.