@eccenca/gui-elements 23.1.0-rc.2 → 23.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -10
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +6 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +33 -8
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ConfidenceValue/ConfidenceValue.js +52 -0
- package/dist/cjs/cmem/ConfidenceValue/ConfidenceValue.js.map +1 -0
- package/dist/cjs/cmem/ConfidenceValue/index.js +14 -0
- package/dist/cjs/cmem/ConfidenceValue/index.js.map +1 -0
- package/dist/cjs/cmem/index.js +11 -0
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/markdown/Markdown.js +8 -4
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/common/Intent/index.js +1 -0
- package/dist/cjs/common/Intent/index.js.map +1 -1
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +10 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +8 -10
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/cjs/components/Card/Card.js +7 -6
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/Card/CardContent.js +4 -2
- package/dist/cjs/components/Card/CardContent.js.map +1 -1
- package/dist/cjs/components/Card/CardHeader.js.map +1 -1
- package/dist/cjs/components/Depiction/Depiction.js +13 -13
- package/dist/cjs/components/Depiction/Depiction.js.map +1 -1
- package/dist/cjs/components/Icon/BaseIcon.js +4 -2
- package/dist/cjs/components/Icon/BaseIcon.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +7 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js +24 -9
- package/dist/cjs/components/Pagination/Pagination.js.map +1 -1
- package/dist/cjs/components/ProgressBar/index.js +14 -0
- package/dist/cjs/components/ProgressBar/index.js.map +1 -0
- package/dist/cjs/components/Separation/Divider.js +20 -2
- package/dist/cjs/components/Separation/Divider.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js +2 -2
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/Table/Table.js +46 -0
- package/dist/cjs/components/Table/Table.js.map +1 -0
- package/dist/cjs/components/Table/TableCell.js +29 -0
- package/dist/cjs/components/Table/TableCell.js.map +1 -0
- package/dist/cjs/components/Table/TableContainer.js +32 -0
- package/dist/cjs/components/Table/TableContainer.js.map +1 -0
- package/dist/cjs/components/Table/TableExpandHeader.js +36 -0
- package/dist/cjs/components/Table/TableExpandHeader.js.map +1 -0
- package/dist/cjs/components/Table/TableExpandRow.js +45 -0
- package/dist/cjs/components/Table/TableExpandRow.js.map +1 -0
- package/dist/cjs/components/{SimpleTable/TableContainer.js → Table/TableRow.js} +9 -11
- package/dist/cjs/components/Table/TableRow.js.map +1 -0
- package/dist/cjs/components/Table/index.js +26 -0
- package/dist/cjs/components/Table/index.js.map +1 -0
- package/dist/cjs/components/Tag/TagList.js.map +1 -1
- package/dist/cjs/components/Tag/index.js +11 -0
- package/dist/cjs/components/Tag/index.js.map +1 -0
- package/dist/cjs/components/TextField/TextField.js +25 -9
- package/dist/cjs/components/TextField/TextField.js.map +1 -1
- package/dist/cjs/components/index.js +4 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +20 -5
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +82 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +14 -3
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +14 -3
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +118 -35
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +5 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/versionsupport.js +20 -0
- package/dist/cjs/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/cjs/index.js +3 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +6 -4
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +35 -10
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/esm/cmem/ConfidenceValue/ConfidenceValue.js +56 -0
- package/dist/esm/cmem/ConfidenceValue/ConfidenceValue.js.map +1 -0
- package/dist/esm/cmem/ConfidenceValue/index.js +2 -0
- package/dist/esm/cmem/ConfidenceValue/index.js.map +1 -0
- package/dist/esm/cmem/index.js +1 -0
- package/dist/esm/cmem/index.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +8 -4
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/common/Intent/index.js +1 -0
- package/dist/esm/common/Intent/index.js.map +1 -1
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +10 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js +8 -10
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/esm/components/Card/Card.js +7 -6
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardContent.js +4 -2
- package/dist/esm/components/Card/CardContent.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Depiction/Depiction.js +15 -14
- package/dist/esm/components/Depiction/Depiction.js.map +1 -1
- package/dist/esm/components/Icon/BaseIcon.js +4 -2
- package/dist/esm/components/Icon/BaseIcon.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +7 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +25 -10
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/ProgressBar/index.js +2 -0
- package/dist/esm/components/ProgressBar/index.js.map +1 -0
- package/dist/esm/components/Separation/Divider.js +29 -3
- package/dist/esm/components/Separation/Divider.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +2 -2
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Table/Table.js +50 -0
- package/dist/esm/components/Table/Table.js.map +1 -0
- package/dist/esm/components/{SimpleTable/TableContainer.js → Table/TableCell.js} +8 -12
- package/dist/esm/components/Table/TableCell.js.map +1 -0
- package/dist/esm/components/Table/TableContainer.js +36 -0
- package/dist/esm/components/Table/TableContainer.js.map +1 -0
- package/dist/esm/components/Table/TableExpandHeader.js +40 -0
- package/dist/esm/components/Table/TableExpandHeader.js.map +1 -0
- package/dist/esm/components/Table/TableExpandRow.js +49 -0
- package/dist/esm/components/Table/TableExpandRow.js.map +1 -0
- package/dist/esm/components/Table/TableRow.js +33 -0
- package/dist/esm/components/Table/TableRow.js.map +1 -0
- package/dist/esm/components/Table/index.js +9 -0
- package/dist/esm/components/Table/index.js.map +1 -0
- package/dist/esm/components/Tag/TagList.js.map +1 -1
- package/dist/esm/components/Tag/index.js +4 -0
- package/dist/esm/components/Tag/index.js.map +1 -0
- package/dist/esm/components/TextField/TextField.js +26 -10
- package/dist/esm/components/TextField/TextField.js.map +1 -1
- package/dist/esm/components/index.js +4 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +20 -4
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +71 -0
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +15 -4
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/index.js +3 -1
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +126 -40
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +5 -2
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/versionsupport.js +32 -0
- package/dist/esm/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/esm/index.js +3 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +1 -1
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +6 -2
- package/dist/types/cmem/ConfidenceValue/ConfidenceValue.d.ts +46 -0
- package/dist/types/cmem/ConfidenceValue/index.d.ts +1 -0
- package/dist/types/cmem/index.d.ts +1 -0
- package/dist/types/cmem/markdown/Markdown.d.ts +6 -1
- package/dist/types/common/Intent/index.d.ts +1 -1
- package/dist/types/common/utils/CssCustomProperties.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +5 -1
- package/dist/types/components/Card/CardContent.d.ts +7 -1
- package/dist/types/components/Card/CardHeader.d.ts +9 -1
- package/dist/types/components/Grid/Grid.d.ts +1 -1
- package/dist/types/components/Grid/GridColumn.d.ts +1 -1
- package/dist/types/components/Grid/GridRow.d.ts +1 -1
- package/dist/types/components/Icon/BaseIcon.d.ts +1 -1
- package/dist/types/components/Icon/IconButton.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +5 -1
- package/dist/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/types/components/Separation/Divider.d.ts +18 -2
- package/dist/types/components/Separation/Spacing.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +5 -1
- package/dist/types/components/Table/Table.d.ts +32 -0
- package/dist/types/components/Table/TableCell.d.ts +11 -0
- package/dist/types/components/Table/TableContainer.d.ts +13 -0
- package/dist/types/components/Table/TableExpandHeader.d.ts +13 -0
- package/dist/types/components/Table/TableExpandRow.d.ts +17 -0
- package/dist/types/components/Table/TableRow.d.ts +10 -0
- package/dist/types/components/Table/index.d.ts +7 -0
- package/dist/types/components/Tag/Tag.d.ts +1 -1
- package/dist/types/components/Tag/TagList.d.ts +5 -2
- package/dist/types/components/Tag/index.d.ts +4 -0
- package/dist/types/components/TextField/TextField.d.ts +9 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +16 -1
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +49 -0
- package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +10 -9
- package/dist/types/extensions/react-flow/handles/HandleContent.d.ts +3 -0
- package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +17 -3
- package/dist/types/extensions/react-flow/index.d.ts +3 -2
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +55 -8
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -1
- package/dist/types/extensions/react-flow/versionsupport.d.ts +7 -0
- package/dist/types/index.d.ts +1 -6
- package/package.json +2 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +5 -5
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +44 -17
- package/src/cmem/ConfidenceValue/ConfidenceValue.stories.tsx +22 -0
- package/src/cmem/ConfidenceValue/ConfidenceValue.tsx +116 -0
- package/src/cmem/ConfidenceValue/confidencevalue.scss +49 -0
- package/src/cmem/ConfidenceValue/index.ts +1 -0
- package/src/cmem/_index.scss +1 -0
- package/src/cmem/index.ts +2 -0
- package/src/cmem/markdown/Markdown.stories.tsx +3 -1
- package/src/cmem/markdown/Markdown.tsx +22 -10
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +2 -2
- package/src/cmem/react-flow/_edges.scss +3 -2
- package/src/cmem/react-flow/configuration/_colors-workflow.scss +3 -0
- package/src/common/Intent/index.ts +2 -1
- package/src/common/utils/CssCustomProperties.ts +1 -1
- package/src/components/AutoSuggestion/AutoSuggestion.scss +1 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +10 -1
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +8 -10
- package/src/components/AutoSuggestion/tests/SingleLineCodeEditor.test.tsx +5 -0
- package/src/components/Badge/badge.scss +2 -5
- package/src/components/Card/Card.tsx +11 -5
- package/src/components/Card/CardContent.tsx +12 -1
- package/src/components/Card/CardHeader.tsx +9 -1
- package/src/components/Card/card.scss +108 -3
- package/src/components/Checkbox/checkbox.scss +6 -2
- package/src/components/Depiction/Depiction.tsx +11 -10
- package/src/components/Grid/Grid.tsx +1 -1
- package/src/components/Grid/GridColumn.tsx +1 -1
- package/src/components/Grid/GridRow.tsx +1 -1
- package/src/components/Icon/BaseIcon.tsx +3 -0
- package/src/components/Icon/IconButton.tsx +1 -1
- package/src/components/Icon/canonicalIconNames.tsx +15 -0
- package/src/components/Menu/menu.scss +4 -0
- package/src/components/OverviewItem/overviewitem.scss +2 -2
- package/src/components/Pagination/Pagination.tsx +29 -9
- package/src/components/Pagination/pagination.scss +16 -0
- package/src/components/ProgressBar/index.ts +1 -0
- package/src/components/PropertyValuePair/propertyvalue.scss +4 -0
- package/src/components/Separation/Divider.tsx +36 -2
- package/src/components/Separation/Spacing.tsx +1 -1
- package/src/components/Separation/Stories/Divider.stories.tsx +22 -0
- package/src/components/Separation/separation.scss +31 -5
- package/src/components/Switch/Switch.tsx +6 -2
- package/src/components/Table/Table.tsx +88 -0
- package/src/components/Table/TableCell.tsx +37 -0
- package/src/components/Table/TableContainer.tsx +49 -0
- package/src/components/Table/TableExpandHeader.tsx +51 -0
- package/src/components/Table/TableExpandRow.tsx +70 -0
- package/src/components/Table/TableRow.tsx +36 -0
- package/src/components/Table/index.tsx +14 -0
- package/src/components/Table/table.scss +324 -0
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tag/TagList.tsx +5 -3
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Tag/{Tag.stories.tsx → stories/Tag.stories.tsx} +3 -2
- package/src/components/Tag/stories/TagList.stories.tsx +28 -0
- package/src/components/Tag/tag.scss +1 -0
- package/src/components/TextField/TextField.tsx +43 -12
- package/src/components/TextField/stories/TextField.stories.tsx +3 -0
- package/src/components/TextField/textfield.scss +23 -1
- package/src/components/Tree/tree.scss +4 -0
- package/src/components/Typography/typography.scss +2 -2
- package/src/components/index.scss +1 -0
- package/src/components/index.ts +5 -0
- package/src/extensions/react-flow/_config.scss +8 -4
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +60 -5
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +139 -0
- package/src/extensions/react-flow/edges/_edges.scss +214 -38
- package/src/extensions/react-flow/edges/edgeTypes.ts +13 -9
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +34 -13
- package/src/extensions/react-flow/edges/stories/EdgeLabel.stories.tsx +40 -0
- package/src/extensions/react-flow/handles/HandleContent.tsx +3 -0
- package/src/extensions/react-flow/handles/HandleDefault.tsx +47 -10
- package/src/extensions/react-flow/handles/stories/HandleDefault.stories.tsx +71 -0
- package/src/extensions/react-flow/index.ts +4 -2
- package/src/extensions/react-flow/nodes/NodeContent.tsx +239 -62
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +7 -2
- package/src/extensions/react-flow/nodes/_nodes.scss +232 -67
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +67 -1
- package/src/extensions/react-flow/versionsupport.ts +22 -0
- package/src/index.scss +0 -1
- package/src/index.ts +5 -38
- package/dist/cjs/components/SimpleTable/TableContainer.js.map +0 -1
- package/dist/cjs/components/SimpleTable/index.js +0 -16
- package/dist/cjs/components/SimpleTable/index.js.map +0 -1
- package/dist/esm/components/SimpleTable/TableContainer.js.map +0 -1
- package/dist/esm/components/SimpleTable/index.js +0 -4
- package/dist/esm/components/SimpleTable/index.js.map +0 -1
- package/dist/types/components/SimpleTable/TableContainer.d.ts +0 -3
- package/dist/types/components/SimpleTable/index.d.ts +0 -3
- package/src/components/SimpleTable/TableContainer.tsx +0 -20
- package/src/components/SimpleTable/index.tsx +0 -4
- package/src/components/SimpleTable/simpletable.scss +0 -180
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import Color from "color";
|
|
3
|
+
import { Position, useStoreState as getStoreStateFlowLegacy } from "react-flow-renderer";
|
|
4
|
+
import { useStore as getStoreStateFlowNext } from "react-flow-renderer-lts";
|
|
5
|
+
import { Icon, Depiction, OverflowText } from "../../../index";
|
|
4
6
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
5
7
|
import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
|
|
6
|
-
import {
|
|
8
|
+
import { DepictionProps } from "../../../components/Depiction/Depiction";
|
|
9
|
+
import { IntentTypes, intentClassName } from "../../../common/Intent";
|
|
10
|
+
import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
|
|
11
|
+
import { HandleDefault, HandleProps, HandleNextProps } from "./../handles/HandleDefault";
|
|
7
12
|
import { NodeProps } from "./NodeDefault";
|
|
8
13
|
import { NodeContentExtensionProps } from "./NodeContentExtension";
|
|
9
14
|
import { Resizable } from "re-resizable";
|
|
10
15
|
|
|
11
16
|
export type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
|
|
17
|
+
export type NodeHighlightColor = "default" | "alternate" | Color | string;
|
|
12
18
|
|
|
13
19
|
export interface IHandleProps extends HandleProps {
|
|
14
20
|
category?: "configuration";
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
interface NodeContentHandleNextProps extends HandleNextProps {
|
|
24
|
+
category?: "configuration";
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
export type NodeDimensions = {
|
|
18
28
|
width: number;
|
|
19
29
|
height: number;
|
|
@@ -26,13 +36,22 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
26
36
|
*/
|
|
27
37
|
iconName?: ValidIconName;
|
|
28
38
|
/**
|
|
29
|
-
*
|
|
39
|
+
* Depiction element that should be displayed before the node label.
|
|
40
|
+
* As alternative a valid and accessible URL or `data-uri` for an image can be set, then the Depiction element is created automatically.
|
|
30
41
|
*/
|
|
31
|
-
depiction?: string
|
|
42
|
+
depiction?: string | React.ReactElement<DepictionProps>;
|
|
43
|
+
/**
|
|
44
|
+
* Any element that should be displayed as depiction before the node label.
|
|
45
|
+
*/
|
|
46
|
+
leftElement?: JSX.Element;
|
|
32
47
|
/**
|
|
33
48
|
* Label that is displayed in the node header.
|
|
34
49
|
*/
|
|
35
|
-
label: string;
|
|
50
|
+
label: string | JSX.Element;
|
|
51
|
+
/**
|
|
52
|
+
* Element that is displayed as subline under the label in the header.
|
|
53
|
+
*/
|
|
54
|
+
labelSubline?: JSX.Element;
|
|
36
55
|
/**
|
|
37
56
|
* Content element, displayed in the node body.
|
|
38
57
|
*/
|
|
@@ -48,7 +67,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
48
67
|
}
|
|
49
68
|
|
|
50
69
|
export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
51
|
-
extends NodeContentData,
|
|
70
|
+
extends NodeContentData, ReacFlowVersionSupportProps,
|
|
52
71
|
React.HTMLAttributes<HTMLDivElement> {
|
|
53
72
|
/**
|
|
54
73
|
* Size of the node.
|
|
@@ -61,9 +80,35 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
61
80
|
*/
|
|
62
81
|
minimalShape?: "none" | "circular" | "rectangular";
|
|
63
82
|
/**
|
|
83
|
+
* Stretches the node to the full available width.
|
|
84
|
+
*/
|
|
85
|
+
fullWidth?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Increase the hight of the node header.
|
|
88
|
+
* Use this for example if you need more space for a label subline.
|
|
89
|
+
* Also the depiction is displayed larger.
|
|
90
|
+
*/
|
|
91
|
+
enlargeHeader?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @deprecated
|
|
64
94
|
* Set the type of used highlights to mark the node.
|
|
95
|
+
* Replaced by `intent` and `highlightColor` properties.
|
|
65
96
|
*/
|
|
66
97
|
highlightedState?: HighlightingState | HighlightingState[];
|
|
98
|
+
/**
|
|
99
|
+
* Defines how the borders of a node are displayed.
|
|
100
|
+
* Use this property to overwrite default styles.
|
|
101
|
+
* You can use this to visuaize different states or type without depending only on color.
|
|
102
|
+
*/
|
|
103
|
+
border?: "solid" | "double" | "dashed" | "dotted";
|
|
104
|
+
/**
|
|
105
|
+
* Feedback state of the node.
|
|
106
|
+
*/
|
|
107
|
+
intent?: IntentTypes;
|
|
108
|
+
/**
|
|
109
|
+
* Set the type of used highlights to mark the node.
|
|
110
|
+
*/
|
|
111
|
+
highlightColor?: NodeHighlightColor | [NodeHighlightColor, NodeHighlightColor];
|
|
67
112
|
/**
|
|
68
113
|
* Text used for tooltip used on icon and depiction.
|
|
69
114
|
*/
|
|
@@ -90,7 +135,7 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
90
135
|
* Array of property definition objects for `Handle` components that need to be created for the node.
|
|
91
136
|
* @see https://reactflow.dev/docs/api/handle/
|
|
92
137
|
*/
|
|
93
|
-
handles?: IHandleProps[];
|
|
138
|
+
handles?: IHandleProps[] | NodeContentHandleNextProps[];
|
|
94
139
|
/**
|
|
95
140
|
* Set the minimal number of handles on left or right side of the node to activate the recalculation of the minimal height of the node.
|
|
96
141
|
*/
|
|
@@ -153,14 +198,32 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any>
|
|
|
153
198
|
nodeDimensions?: NodeDimensions;
|
|
154
199
|
}
|
|
155
200
|
|
|
156
|
-
interface
|
|
201
|
+
interface MemoHandlerLegacyProps extends HandleProps {
|
|
202
|
+
posdirection: string;
|
|
203
|
+
style: {
|
|
204
|
+
[key: string]: string | undefined;
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
interface MemoHandlerNextProps extends HandleNextProps {
|
|
157
209
|
posdirection: string;
|
|
158
210
|
style: {
|
|
159
211
|
[key: string]: string | undefined;
|
|
160
212
|
};
|
|
161
213
|
}
|
|
162
214
|
|
|
163
|
-
|
|
215
|
+
type MemoHandlerProps = MemoHandlerLegacyProps | MemoHandlerNextProps;
|
|
216
|
+
|
|
217
|
+
const defaultHandles = (flowVersion: ReacFlowVersionSupportProps["flowVersion"]) => {
|
|
218
|
+
switch (flowVersion) {
|
|
219
|
+
case "legacy":
|
|
220
|
+
return [{ type: "target" }, { type: "source" }] as IHandleProps[];
|
|
221
|
+
case "next":
|
|
222
|
+
return [{ type: "target" }, { type: "source" }] as NodeContentHandleNextProps[];
|
|
223
|
+
default:
|
|
224
|
+
return [];
|
|
225
|
+
}
|
|
226
|
+
}
|
|
164
227
|
|
|
165
228
|
const getDefaultMinimalTooltipData = (node: any) => {
|
|
166
229
|
return {
|
|
@@ -171,7 +234,7 @@ const getDefaultMinimalTooltipData = (node: any) => {
|
|
|
171
234
|
};
|
|
172
235
|
};
|
|
173
236
|
|
|
174
|
-
const addHandles = (handles: any, position: any, posDirection: any, isConnectable: any, nodeStyle: any) => {
|
|
237
|
+
const addHandles = (handles: any, position: any, posDirection: any, isConnectable: any, nodeStyle: any, flowVersion: any = "legacy") => {
|
|
175
238
|
return handles[position].map((handle: any, idx: any) => {
|
|
176
239
|
const { className, style = {}, category } = handle;
|
|
177
240
|
const styleAdditions: { [key: string]: string } = {
|
|
@@ -191,33 +254,29 @@ const addHandles = (handles: any, position: any, posDirection: any, isConnectabl
|
|
|
191
254
|
: className,
|
|
192
255
|
},
|
|
193
256
|
};
|
|
194
|
-
return <MemoHandler {...handleProperties} key={"handle" + idx} />;
|
|
257
|
+
return <MemoHandler flowVersion={flowVersion} {...handleProperties} key={"handle" + idx} />;
|
|
195
258
|
});
|
|
196
259
|
};
|
|
197
260
|
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
<span>{imgEl}</span>
|
|
203
|
-
</Tooltip>
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return imgEl;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
export const gethighlightedStateClasses = (state: any, baseClassName: any) => {
|
|
261
|
+
export const gethighlightedStateClasses = (
|
|
262
|
+
state: HighlightingState | HighlightingState[],
|
|
263
|
+
baseClassName: string
|
|
264
|
+
) => {
|
|
211
265
|
let hightlights = typeof state === "string" ? [state] : state;
|
|
212
|
-
|
|
213
|
-
|
|
266
|
+
return hightlights.map(
|
|
267
|
+
(item : HighlightingState) => `${baseClassName}--highlight-${item}`
|
|
268
|
+
).join(" ");
|
|
214
269
|
};
|
|
215
270
|
|
|
216
271
|
const MemoHandler = React.memo(
|
|
217
272
|
(props: MemoHandlerProps) => <HandleDefault {...props} />,
|
|
218
273
|
(prev, next) => {
|
|
219
|
-
|
|
220
|
-
|
|
274
|
+
return (
|
|
275
|
+
// we only test a few properties to control re-rendering
|
|
276
|
+
// need to be extended if also other properties need to be changed late
|
|
277
|
+
prev.style[prev.posdirection] === next.style[next.posdirection]
|
|
278
|
+
&& prev.isConnectable === next.isConnectable
|
|
279
|
+
)
|
|
221
280
|
}
|
|
222
281
|
);
|
|
223
282
|
|
|
@@ -226,20 +285,28 @@ const MemoHandler = React.memo(
|
|
|
226
285
|
* This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
|
|
227
286
|
*/
|
|
228
287
|
export function NodeContent<CONTENT_PROPS = any>({
|
|
288
|
+
flowVersion,
|
|
229
289
|
iconName,
|
|
230
290
|
depiction,
|
|
291
|
+
leftElement,
|
|
231
292
|
typeLabel,
|
|
232
293
|
label,
|
|
294
|
+
labelSubline,
|
|
295
|
+
enlargeHeader,
|
|
296
|
+
fullWidth,
|
|
233
297
|
showExecutionButtons = true,
|
|
234
298
|
executionButtons,
|
|
235
299
|
menuButtons,
|
|
236
300
|
content,
|
|
237
301
|
contentExtension,
|
|
238
|
-
|
|
302
|
+
footerContent,
|
|
239
303
|
size = "small",
|
|
240
304
|
minimalShape = "circular",
|
|
241
305
|
highlightedState,
|
|
242
|
-
|
|
306
|
+
intent,
|
|
307
|
+
border,
|
|
308
|
+
highlightColor,
|
|
309
|
+
//handles = defaultHandles(),
|
|
243
310
|
adaptHeightForHandleMinCount,
|
|
244
311
|
adaptSizeIncrement = 15,
|
|
245
312
|
getMinimalTooltipData = getDefaultMinimalTooltipData,
|
|
@@ -257,18 +324,32 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
257
324
|
// businessData is just being ignored
|
|
258
325
|
businessData,
|
|
259
326
|
// other props for DOM element
|
|
260
|
-
...
|
|
327
|
+
...otherDomProps
|
|
261
328
|
}: NodeContentProps<any>) {
|
|
329
|
+
const evaluateFlowVersion = useReactFlowVersion();
|
|
330
|
+
const flowVersionCheck = flowVersion || evaluateFlowVersion;
|
|
331
|
+
|
|
332
|
+
const {
|
|
333
|
+
handles = defaultHandles(flowVersionCheck),
|
|
334
|
+
...otherProps
|
|
335
|
+
} = otherDomProps;
|
|
336
|
+
|
|
337
|
+
const isResizeable = (!!onNodeResize && minimalShape === "none");
|
|
262
338
|
const [width, setWidth] = React.useState<number>(nodeDimensions?.width ?? 0);
|
|
263
339
|
const [height, setHeight] = React.useState<number>(nodeDimensions?.height ?? 0);
|
|
264
|
-
|
|
340
|
+
let zoom = 1;
|
|
341
|
+
if (isResizeable) try {
|
|
342
|
+
[, , zoom] = flowVersionCheck === "legacy"
|
|
343
|
+
? getStoreStateFlowLegacy((state) => state.transform)
|
|
344
|
+
: getStoreStateFlowNext((state) => state.transform);
|
|
345
|
+
} catch {}
|
|
265
346
|
const [adjustedContentProps, setAdjustedContentProps] = React.useState<Partial<CONTENT_PROPS>>({});
|
|
266
347
|
const nodeContentRef = React.useRef<any>();
|
|
267
|
-
const handleStack
|
|
268
|
-
handleStack[Position.Top] = [] as IHandleProps[];
|
|
269
|
-
handleStack[Position.Right] = [] as IHandleProps[];
|
|
270
|
-
handleStack[Position.Bottom] = [] as IHandleProps[];
|
|
271
|
-
handleStack[Position.Left] = [] as IHandleProps[];
|
|
348
|
+
const handleStack = flowVersionCheck==="legacy" ? {} as { [key: string]: IHandleProps[] } : {} as { [key: string]: NodeContentHandleNextProps[] };
|
|
349
|
+
handleStack[Position.Top] = flowVersionCheck==="legacy" ? [] as IHandleProps[] : [] as NodeContentHandleNextProps[];
|
|
350
|
+
handleStack[Position.Right] = flowVersionCheck==="legacy" ? [] as IHandleProps[] : [] as NodeContentHandleNextProps[];
|
|
351
|
+
handleStack[Position.Bottom] = flowVersionCheck==="legacy" ? [] as IHandleProps[] : [] as NodeContentHandleNextProps[];
|
|
352
|
+
handleStack[Position.Left] = flowVersionCheck==="legacy" ? [] as IHandleProps[] : [] as NodeContentHandleNextProps[];
|
|
272
353
|
|
|
273
354
|
// initial dimension before resize
|
|
274
355
|
React.useEffect(() => {
|
|
@@ -322,17 +403,29 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
322
403
|
styleExpandDimensions["minHeight"] = Math.max(minHeightLeft, minHeightRight);
|
|
323
404
|
}
|
|
324
405
|
|
|
406
|
+
const {
|
|
407
|
+
highlightClassNameSuffix,
|
|
408
|
+
highlightCustomPropertySettings
|
|
409
|
+
} = evaluateHighlightColors("--node-highlight", highlightColor);
|
|
410
|
+
|
|
325
411
|
const resizableStyles = (!!onNodeResize === true && minimalShape === "none" && (width + height > 0)) ? { width, height } : {};
|
|
326
412
|
const nodeContent = (
|
|
327
413
|
<>
|
|
328
414
|
<section
|
|
329
415
|
ref={nodeContentRef}
|
|
330
416
|
{...otherProps}
|
|
331
|
-
style={{ ...style, ...styleExpandDimensions, ...resizableStyles }}
|
|
417
|
+
style={{ ...style, ...highlightCustomPropertySettings, ...styleExpandDimensions, ...resizableStyles }}
|
|
332
418
|
className={
|
|
333
419
|
`${eccgui}-graphviz__node` +
|
|
334
420
|
` ${eccgui}-graphviz__node--${size}` +
|
|
335
421
|
` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
|
|
422
|
+
(fullWidth ? ` ${eccgui}-graphviz__node--fullwidth` : "") +
|
|
423
|
+
(border ? ` ${eccgui}-graphviz__node--border-${border}` : "") +
|
|
424
|
+
(intent ? ` ${intentClassName(intent)}` : "") +
|
|
425
|
+
(highlightClassNameSuffix.length > 0
|
|
426
|
+
? highlightClassNameSuffix.map(highlight => ` ${eccgui}-graphviz__node--highlight-${highlight}`).join("")
|
|
427
|
+
: ""
|
|
428
|
+
) +
|
|
336
429
|
(!!highlightedState
|
|
337
430
|
? " " + gethighlightedStateClasses(highlightedState, `${eccgui}-graphviz__node`)
|
|
338
431
|
: "") +
|
|
@@ -341,32 +434,66 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
341
434
|
(letPassWheelEvents === false ? ` nowheel` : "")
|
|
342
435
|
}
|
|
343
436
|
>
|
|
344
|
-
<header className={
|
|
345
|
-
{
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
437
|
+
<header className={
|
|
438
|
+
`${eccgui}-graphviz__node__header` +
|
|
439
|
+
((enlargeHeader && minimalShape==="none") ? ` ${eccgui}-graphviz__node__header--large` : "")
|
|
440
|
+
}>
|
|
441
|
+
{(!!iconName || !!depiction || !!leftElement) && (
|
|
442
|
+
<div className={`${eccgui}-graphviz__node__header-depiction`}>
|
|
443
|
+
{ leftElement }
|
|
444
|
+
{!!depiction && !leftElement && typeof depiction === "string" && (
|
|
445
|
+
<Depiction
|
|
446
|
+
image={<img src={depiction} alt="" />}
|
|
447
|
+
caption={minimalShape === "none" || selected ? typeLabel : undefined}
|
|
448
|
+
captionPosition="tooltip"
|
|
449
|
+
padding="tiny"
|
|
450
|
+
ratio="1:1"
|
|
451
|
+
resizing="contain"
|
|
452
|
+
forceInlineSvg
|
|
356
453
|
/>
|
|
357
454
|
)}
|
|
358
|
-
|
|
455
|
+
{!!depiction && !leftElement && typeof depiction !== "string" && (
|
|
456
|
+
React.cloneElement(depiction, {
|
|
457
|
+
caption: minimalShape === "none" || selected ? typeLabel : undefined,
|
|
458
|
+
captionPosition: "tooltip",
|
|
459
|
+
padding: "tiny",
|
|
460
|
+
ratio: "1:1",
|
|
461
|
+
resizing: "contain",
|
|
462
|
+
forceInlineSvg: true,
|
|
463
|
+
})
|
|
464
|
+
)}
|
|
465
|
+
{!!iconName && !leftElement && !depiction && (
|
|
466
|
+
<Depiction
|
|
467
|
+
image={<Icon name={iconName} />}
|
|
468
|
+
caption={minimalShape === "none" || selected ? typeLabel : undefined}
|
|
469
|
+
captionPosition="tooltip"
|
|
470
|
+
padding="tiny"
|
|
471
|
+
ratio="1:1"
|
|
472
|
+
resizing="contain"
|
|
473
|
+
forceInlineSvg
|
|
474
|
+
/>
|
|
475
|
+
)}
|
|
476
|
+
</div>
|
|
359
477
|
)}
|
|
360
|
-
<
|
|
361
|
-
{
|
|
362
|
-
|
|
478
|
+
<div className={`${eccgui}-graphviz__node__header-label`} title={typeof label==="string" ? label : undefined}>
|
|
479
|
+
{
|
|
480
|
+
typeof label === "string"
|
|
481
|
+
? <OverflowText className={`${eccgui}-graphviz__node__header-label__mainline`}>{label}</OverflowText>
|
|
482
|
+
: <div className={`${eccgui}-graphviz__node__header-label__mainline`}>{label}</div>
|
|
483
|
+
}
|
|
484
|
+
{!!labelSubline && (
|
|
485
|
+
<div className={`${eccgui}-graphviz__node__header-label__subline`}>
|
|
486
|
+
{ labelSubline }
|
|
487
|
+
</div>
|
|
488
|
+
)}
|
|
489
|
+
</div>
|
|
363
490
|
{(menuButtons || (showExecutionButtons && executionButtons)) && (
|
|
364
|
-
<
|
|
491
|
+
<div className={`${eccgui}-graphviz__node__header-menu`}>
|
|
365
492
|
{showExecutionButtons && typeof executionButtons === "function"
|
|
366
493
|
? executionButtons(adjustedContentProps, setAdjustedContentProps)
|
|
367
494
|
: null}
|
|
368
495
|
{menuButtons ?? null}
|
|
369
|
-
</
|
|
496
|
+
</div>
|
|
370
497
|
)}
|
|
371
498
|
</header>
|
|
372
499
|
{content && (
|
|
@@ -383,10 +510,10 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
383
510
|
</section>
|
|
384
511
|
{!!handles && (
|
|
385
512
|
<>
|
|
386
|
-
{addHandles(handleStack, Position.Top, "left", isConnectable, style)}
|
|
387
|
-
{addHandles(handleStack, Position.Right, "top", isConnectable, style)}
|
|
388
|
-
{addHandles(handleStack, Position.Bottom, "left", isConnectable, style)}
|
|
389
|
-
{addHandles(handleStack, Position.Left, "top", isConnectable, style)}
|
|
513
|
+
{addHandles(handleStack, Position.Top, "left", isConnectable, style, flowVersionCheck)}
|
|
514
|
+
{addHandles(handleStack, Position.Right, "top", isConnectable, style, flowVersionCheck)}
|
|
515
|
+
{addHandles(handleStack, Position.Bottom, "left", isConnectable, style, flowVersionCheck)}
|
|
516
|
+
{addHandles(handleStack, Position.Left, "top", isConnectable, style, flowVersionCheck)}
|
|
390
517
|
</>
|
|
391
518
|
)}
|
|
392
519
|
</>
|
|
@@ -419,5 +546,55 @@ export function NodeContent<CONTENT_PROPS = any>({
|
|
|
419
546
|
</Resizable>
|
|
420
547
|
);
|
|
421
548
|
|
|
422
|
-
return (
|
|
549
|
+
return (isResizeable) ? resizableNode() : nodeContent;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
export const evaluateHighlightColors = (
|
|
553
|
+
baseCustomProperty: string,
|
|
554
|
+
highlightColor?: NodeHighlightColor | NodeHighlightColor[]
|
|
555
|
+
) => {
|
|
556
|
+
let styleHighlightColors = {
|
|
557
|
+
[`${baseCustomProperty}-default-color`]: undefined,
|
|
558
|
+
[`${baseCustomProperty}-alternate-color`]: undefined,
|
|
559
|
+
} as React.CSSProperties;
|
|
560
|
+
const classesHightlightColors = [] as string[];
|
|
561
|
+
if (!!highlightColor) {
|
|
562
|
+
const highlightingColors = (typeof highlightColor === "string") ? [highlightColor] : highlightColor;
|
|
563
|
+
(highlightingColors as Array<string>).map((color, idx) => {
|
|
564
|
+
switch (color) {
|
|
565
|
+
case "default":
|
|
566
|
+
classesHightlightColors.push("default");
|
|
567
|
+
break;
|
|
568
|
+
case "alternate":
|
|
569
|
+
classesHightlightColors.push("alternate");
|
|
570
|
+
break;
|
|
571
|
+
default:
|
|
572
|
+
classesHightlightColors.push("custom");
|
|
573
|
+
let customColor = Color("#ffffff")
|
|
574
|
+
try {
|
|
575
|
+
customColor = Color(color);
|
|
576
|
+
} catch(ex) {
|
|
577
|
+
console.warn("Received invalid color for highlight: " + color)
|
|
578
|
+
}
|
|
579
|
+
if (idx === 0) {
|
|
580
|
+
styleHighlightColors = {
|
|
581
|
+
...styleHighlightColors,
|
|
582
|
+
[`${baseCustomProperty}-default-color`]: customColor.rgb().toString(),
|
|
583
|
+
} as React.CSSProperties
|
|
584
|
+
} else {
|
|
585
|
+
styleHighlightColors = {
|
|
586
|
+
...styleHighlightColors,
|
|
587
|
+
[`${baseCustomProperty}-alternate-color`]: customColor.rgb().toString(),
|
|
588
|
+
} as React.CSSProperties
|
|
589
|
+
}
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
return color;
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
return {
|
|
597
|
+
highlightClassNameSuffix: classesHightlightColors,
|
|
598
|
+
highlightCustomPropertySettings: styleHighlightColors,
|
|
599
|
+
}
|
|
423
600
|
}
|
|
@@ -5,8 +5,9 @@ import {
|
|
|
5
5
|
} from "react-flow-renderer";
|
|
6
6
|
import { Tooltip } from "../../../index";
|
|
7
7
|
import { NodeContent, NodeContentProps } from "./NodeContent";
|
|
8
|
+
import { ReacFlowVersionSupportProps, useReactFlowVersion } from "../versionsupport";
|
|
8
9
|
|
|
9
|
-
export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReactFlowNodeProps {
|
|
10
|
+
export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReacFlowVersionSupportProps, ReactFlowNodeProps {
|
|
10
11
|
/**
|
|
11
12
|
* Contains all properties for our implementation of the React-Flow node.
|
|
12
13
|
* For details pls see the `NodeContent` element documentation.
|
|
@@ -22,14 +23,18 @@ export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReactFlo
|
|
|
22
23
|
export const NodeDefault = memo(
|
|
23
24
|
(node: NodeProps<any>) => {
|
|
24
25
|
const {
|
|
26
|
+
flowVersion,
|
|
25
27
|
data,
|
|
26
28
|
targetPosition = Position.Left,
|
|
27
29
|
sourcePosition = Position.Right,
|
|
28
30
|
isConnectable = true,
|
|
29
31
|
selected
|
|
30
32
|
} = node;
|
|
33
|
+
|
|
34
|
+
const evaluateFlowVersion = useReactFlowVersion();
|
|
35
|
+
const flowVersionCheck = flowVersion || evaluateFlowVersion;
|
|
31
36
|
|
|
32
|
-
const nodeEl = <NodeContent {...{...data, targetPosition, sourcePosition, isConnectable, selected}} />
|
|
37
|
+
const nodeEl = <NodeContent {...{flowVersion: flowVersionCheck, ...data, targetPosition, sourcePosition, isConnectable, selected}} />
|
|
33
38
|
|
|
34
39
|
if (!selected && data?.minimalShape !== "none" && !!data?.getMinimalTooltipData) {
|
|
35
40
|
const tooltipData = data?.getMinimalTooltipData(node);
|