Skip to content

Commit 3dddbea

Browse files
author
Zabilsya
committed
[DOP-22355] add transform node
1 parent ab4fdb0 commit 3dddbea

File tree

22 files changed

+235
-35
lines changed

22 files changed

+235
-35
lines changed

1

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
pick ab16fdd [DOP-22354] add Transfer canvas
2+
s b5e2614 [DOP-22354] fix after review
3+
s 16b91c5 [DOP-22355] add transform node
4+
5+
# Rebase ab4fdb0..16b91c5 onto ab4fdb0 (3 commands)
6+
#
7+
# Commands:
8+
# p, pick <commit> = use commit
9+
# r, reword <commit> = use commit, but edit the commit message
10+
# e, edit <commit> = use commit, but stop for amending
11+
# s, squash <commit> = use commit, but meld into previous commit
12+
# f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
13+
# commit's log message, unless -C is used, in which case
14+
# keep only this commit's message; -c is same as -C but
15+
# opens the editor
16+
# x, exec <command> = run command (the rest of the line) using shell
17+
# b, break = stop here (continue rebase later with 'git rebase --continue')
18+
# d, drop <commit> = remove commit
19+
# l, label <label> = label current HEAD with a name
20+
# t, reset <label> = reset HEAD to a label
21+
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
22+
# . create a merge commit using the original merge commit's
23+
# . message (or the oneline, if no original merge commit was
24+
# . specified); use -c <commit> to reword the commit message
25+
#
26+
# These lines can be re-ordered; they are executed from top to bottom.
27+
#
28+
# If you remove a line here THAT COMMIT WILL BE LOST.
29+
#
30+
# However, if you remove everything, the rebase will be aborted.
31+
#
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import React, { memo } from 'react';
2+
3+
export const FilterRows = memo(() => {
4+
return <div>FilterRowsNode</div>;
5+
});
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React, { useMemo } from 'react';
2+
import { CanvasNode } from '@shared/ui';
3+
import { Handle, Position } from '@xyflow/react';
4+
import { FilterOutlined } from '@ant-design/icons';
5+
6+
import { FilterRows } from '../FilterRows';
7+
import { TransferCanvasEdge } from '../TransferConnectionsCanvas';
8+
9+
import { FilterRowsNodeProps } from './types';
10+
11+
export const FilterRowsNode = ({}: FilterRowsNodeProps) => {
12+
const icon = useMemo(() => {
13+
return <FilterOutlined />;
14+
}, []);
15+
16+
const children = useMemo(() => {
17+
return (
18+
<>
19+
<Handle type="target" position={Position.Left} id={TransferCanvasEdge.FILTER_ROWS_TARGET} />
20+
<FilterRows />
21+
<Handle type="source" position={Position.Right} id={TransferCanvasEdge.FILTER_ROWS_SOURCE} />
22+
</>
23+
);
24+
}, []);
25+
26+
return (
27+
<CanvasNode title="Filter rows" icon={icon}>
28+
{children}
29+
</CanvasNode>
30+
);
31+
};
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './FilterRowsNode';
2+
export * from './types';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Node, NodeProps } from '@xyflow/react';
2+
3+
import { TransferCanvasTransformNodeType } from '../TransferConnectionsCanvas';
4+
5+
export interface FilterRowsNodeData
6+
extends Node<Record<string, unknown>, TransferCanvasTransformNodeType.FILTER_ROWS> {}
7+
8+
export interface FilterRowsNodeProps extends NodeProps<FilterRowsNodeData> {}

src/features/transfer/MutateTransferForm/components/SourceParamsNode/SourceParamsNode.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { SourceParams } from '../SourceParams';
99
import { TransferCanvasEdge } from '../TransferConnectionsCanvas';
1010

1111
import { SourceParamsNodeProps } from './types';
12-
import classes from './styles.module.less';
1312

1413
export const SourceParamsNode = ({ data }: SourceParamsNodeProps) => {
1514
const connectionType = Form.useWatch<ConnectionType>(['source_params', 'type']);
@@ -28,7 +27,7 @@ export const SourceParamsNode = ({ data }: SourceParamsNodeProps) => {
2827
}, [data.groupId, data.initialSourceConnectionType]);
2928

3029
return (
31-
<CanvasNode className={classes.root} title="Source" icon={icon}>
30+
<CanvasNode title="Source" icon={icon}>
3231
{children}
3332
</CanvasNode>
3433
);

src/features/transfer/MutateTransferForm/components/SourceParamsNode/styles.module.less

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Node, NodeProps } from '@xyflow/react';
22

33
import { SourceParamsProps } from '../SourceParams';
4-
import { TransferCanvasNode } from '../TransferConnectionsCanvas';
4+
import { TransferCanvasDefaultNodeType } from '../TransferConnectionsCanvas';
55

6-
export interface SourceParamsNodeData extends Node<SourceParamsProps, TransferCanvasNode.SOURCE> {}
6+
export interface SourceParamsNodeData extends Node<SourceParamsProps, TransferCanvasDefaultNodeType.SOURCE> {}
77

88
export interface SourceParamsNodeProps extends NodeProps<SourceParamsNodeData> {}

src/features/transfer/MutateTransferForm/components/TargetParamsNode/TargetParamsNode.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { TargetParams } from '../TargetParams';
99
import { TransferCanvasEdge } from '../TransferConnectionsCanvas';
1010

1111
import { TargetParamsNodeProps } from './types';
12-
import classes from './styles.module.less';
1312

1413
export const TargetParamsNode = ({ data }: TargetParamsNodeProps) => {
1514
const connectionType = Form.useWatch<ConnectionType>(['target_params', 'type']);
@@ -28,7 +27,7 @@ export const TargetParamsNode = ({ data }: TargetParamsNodeProps) => {
2827
}, [data.groupId, data.initialTargetConnectionType]);
2928

3029
return (
31-
<CanvasNode className={classes.root} title="Target" icon={icon}>
30+
<CanvasNode title="Target" icon={icon}>
3231
{children}
3332
</CanvasNode>
3433
);

src/features/transfer/MutateTransferForm/components/TargetParamsNode/styles.module.less

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)