@eccenca/gui-elements 22.0.0-rc.7 → 22.0.1

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +21 -7
  3. package/dist/cjs/extensions/react-flow/index.js +5 -1
  4. package/dist/cjs/extensions/react-flow/index.js.map +1 -1
  5. package/dist/cjs/extensions/react-flow/minimap/utils.js +2 -2
  6. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +138 -0
  7. package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -0
  8. package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +40 -0
  9. package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -0
  10. package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +3 -130
  11. package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
  12. package/dist/es5/extensions/react-flow/index.js +2 -0
  13. package/dist/es5/extensions/react-flow/index.js.map +1 -1
  14. package/dist/es5/extensions/react-flow/minimap/utils.js +1 -1
  15. package/dist/es5/extensions/react-flow/nodes/NodeContent.js +143 -0
  16. package/dist/es5/extensions/react-flow/nodes/NodeContent.js.map +1 -0
  17. package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js +44 -0
  18. package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -0
  19. package/dist/es5/extensions/react-flow/nodes/NodeDefault.js +2 -129
  20. package/dist/es5/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
  21. package/dist/types/extensions/react-flow/index.d.ts +4 -0
  22. package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +121 -0
  23. package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +30 -0
  24. package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -119
  25. package/package.json +14 -4
  26. package/src/extensions/react-flow/index.ts +4 -0
  27. package/src/extensions/react-flow/minimap/utils.ts +1 -1
  28. package/src/extensions/react-flow/nodes/NodeContent.stories.tsx +1 -1
  29. package/src/extensions/react-flow/nodes/NodeContent.tsx +329 -0
  30. package/src/extensions/react-flow/nodes/NodeDefault.stories.tsx +2 -1
  31. package/src/extensions/react-flow/nodes/NodeDefault.tsx +2 -324
  32. package/src/components/Icon/canonicalIconNames.json +0 -120
@@ -1,116 +1,6 @@
1
1
  import React from "react";
2
- import { NodeProps as ReactFlowNodeProps, Position } from "react-flow-renderer";
3
- import { HandleProps } from "./../handles/HandleDefault";
4
- import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
5
- declare type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
6
- export interface IHandleProps extends HandleProps {
7
- category?: "configuration";
8
- }
9
- interface NodeContentData {
10
- /**
11
- * Name of icon that should be displayed before the node label.
12
- * Must be a name from our list of canonical icon names.
13
- */
14
- iconName?: ValidIconName;
15
- /**
16
- * Valid and accessible URL or `data-uri` for an image that should be displayed before the node label.
17
- */
18
- depiction?: string;
19
- /**
20
- * Label that is displayed in the node header.
21
- */
22
- label: string;
23
- /**
24
- * Content element, displayed in the node body.
25
- */
26
- content?: React.ReactNode;
27
- /**
28
- * Content extension, displayed at the bottom side of a node.
29
- */
30
- contentExtension?: React.ReactNode;
31
- }
32
- export interface NodeContentProps<T> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
33
- /**
34
- * Size of the node.
35
- * If `minimalShape` is not set to `none`then the configured size definition is only used for the selected node state.
36
- */
37
- size?: "tiny" | "small" | "medium" | "large";
38
- /**
39
- * Defines if the node is initially displayed within a very small shape.
40
- * If not set to `none` then the node is only displayed in normal size when it is selected.
41
- */
42
- minimalShape?: "none" | "circular" | "rectangular";
43
- /**
44
- * Set the type of used highlights to mark the node.
45
- */
46
- highlightedState?: HighlightingState | HighlightingState[];
47
- /**
48
- * Text used for tooltip used on icon and depiction.
49
- */
50
- typeLabel?: string;
51
- /**
52
- * If `executionButtons` content is included or not.
53
- * It is displayed in the node header between label and menu.
54
- */
55
- showExecutionButtons?: boolean;
56
- /**
57
- * Set of defined buttons and icons that can be displayed.
58
- */
59
- executionButtons?: () => React.ReactNode;
60
- /**
61
- * Can be used for permanent action button or context menu.
62
- * It is displayed at the node header right to the label.
63
- */
64
- menuButtons?: React.ReactNode;
65
- /**
66
- * Array of property definition objects for `Handle` components that need to be created for the node.
67
- * @see https://reactflow.dev/docs/api/handle/
68
- */
69
- handles?: IHandleProps[];
70
- /**
71
- * 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.
72
- */
73
- adaptHeightForHandleMinCount?: number;
74
- /**
75
- * Height per handle in px (without the unit) used for minimal height calculation of the node.
76
- */
77
- adaptSizeIncrement?: number;
78
- /**
79
- * Callback function to provide content for the tooltip on a node with a defined `minimalShape`.
80
- * If you do not want a tooltip in this state you need to provide a callback that returns an empty value.
81
- */
82
- getMinimalTooltipData?: (node: NodeProps<T>) => NodeContentData;
83
- /**
84
- * Set if a handle is displayed even if it does not allow a connection to an edge.
85
- */
86
- showUnconnectableHandles?: boolean;
87
- /**
88
- * The node is displayed with some animated shadow for highlighting purposes.
89
- */
90
- animated?: boolean;
91
- /** Additional data stored in the node. */
92
- businessData?: T;
93
- /**
94
- * This property is only forwarded from the `NodeDefault` element.
95
- * If set then it will be always overwritten internally.
96
- */
97
- targetPosition?: typeof Position[keyof typeof Position];
98
- /**
99
- * This property is only forwarded from the `NodeDefault` element.
100
- * If set then it will be always overwritten internally.
101
- */
102
- sourcePosition?: typeof Position[keyof typeof Position];
103
- /**
104
- * This property is only forwarded from the `NodeDefault` element.
105
- * If set then it will be always overwritten internally.
106
- */
107
- isConnectable?: boolean;
108
- /**
109
- * This property is only forwarded from the `NodeDefault` element.
110
- * If set then it will be always overwritten internally.
111
- */
112
- selected?: boolean;
113
- }
2
+ import { NodeProps as ReactFlowNodeProps } from "react-flow-renderer";
3
+ import { NodeContentProps } from "./NodeContent";
114
4
  export interface NodeProps<T> extends ReactFlowNodeProps {
115
5
  /**
116
6
  * Contains all properties for our implementation of the React-Flow node.
@@ -118,16 +8,9 @@ export interface NodeProps<T> extends ReactFlowNodeProps {
118
8
  */
119
9
  data: NodeContentProps<T>;
120
10
  }
121
- export declare const gethighlightedStateClasses: (state: any, baseClassName: any) => any;
122
11
  /**
123
12
  * The `NodeDefault` element manages the display of React-Flow nodes.
124
13
  * This element cannot be used directly, it must be connected via a `nodeTypes` definition and all properties need to be routed through the `elements` property items inside the `ReactFlow` container.
125
14
  * @see https://reactflow.dev/docs/api/nodes/
126
15
  */
127
16
  export declare const NodeDefault: React.MemoExoticComponent<(node: NodeProps<any>) => JSX.Element>;
128
- /**
129
- * The `NodeContent` element manages the main view of how a node is displaying which content.
130
- * This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
131
- */
132
- export declare const NodeContent: ({ iconName, depiction, typeLabel, label, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, size, minimalShape, highlightedState, handles, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, targetPosition, sourcePosition, isConnectable, selected, businessData, ...otherProps }: NodeContentProps<any>) => JSX.Element;
133
- export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eccenca/gui-elements",
3
3
  "description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
4
- "version": "22.0.0-rc.7",
4
+ "version": "22.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/eccenca/gui-elements",
7
7
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  "web": "https://eccence.com/"
19
19
  }
20
20
  ],
21
- "repositories": [
21
+ "repository": [
22
22
  {
23
23
  "type": "git",
24
24
  "url": "git://github.com/eccenca/gui-elements.git"
@@ -57,13 +57,13 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@blueprintjs/core": "3.49.1",
60
- "@blueprintjs/select": "^3.18.1",
60
+ "@blueprintjs/select": "3.18.1",
61
61
  "@carbon/icons": "10.44.0",
62
62
  "@carbon/icons-react": "10.44.0",
63
63
  "@mavrin/remark-typograf": "^2.2.0",
64
64
  "carbon-components": "10.44.0",
65
65
  "carbon-components-react": "7.44.1",
66
- "carbon-icons": "^7.0.7",
66
+ "carbon-icons": "7.0.7",
67
67
  "codemirror": "^5.52.2",
68
68
  "color": "3.2.1",
69
69
  "micromark": "^3.0.10",
@@ -119,6 +119,16 @@
119
119
  "typescript": "4.4.4",
120
120
  "webpack": "^4.46.0"
121
121
  },
122
+ "resolutions": {
123
+ "**/@blueprintjs/core": "3.49.1",
124
+ "**/@blueprintjs/select": "3.18.1",
125
+ "**/@carbon/icons": "10.44.0",
126
+ "**/@carbon/icons-react": "10.44.0",
127
+ "**/carbon-components": "10.44.0",
128
+ "**/carbon-components-react": "7.44.1",
129
+ "**/carbon-icons": "7.0.7",
130
+ "**/@types/react": "^17.0.0"
131
+ },
122
132
  "eslintConfig": {
123
133
  "extends": [
124
134
  "react-app"
@@ -1,4 +1,6 @@
1
1
  export { NodeDefault } from "./nodes/NodeDefault";
2
+ export { NodeContent } from "./nodes/NodeContent";
3
+ export { NodeContentExtension } from "./nodes/NodeContentExtension";
2
4
  export { NodeTools } from "./nodes/NodeTools";
3
5
  export { nodeTypes } from "./nodes/nodeTypes";
4
6
  export { EdgeDefault } from "./edges/EdgeDefault";
@@ -9,6 +11,8 @@ export { MiniMap } from "./minimap/MiniMap";
9
11
  export { minimapNodeClassName, minimapNodeColor } from "./minimap/utils";
10
12
 
11
13
  export type { NodeProps } from "./nodes/NodeDefault";
14
+ export type { NodeContentProps } from "./nodes/NodeContent";
15
+ export type { NodeContentExtensionProps } from "./nodes/NodeContentExtension";
12
16
  export type { NodeToolsProps } from "./nodes/NodeTools";
13
17
  export type { EdgeDefaultProps } from "./edges/EdgeDefault";
14
18
  export type { EdgeStepProps } from "./edges/EdgeStep";
@@ -1,5 +1,5 @@
1
1
  import { CLASSPREFIX as eccgui } from "./../../../configuration/constants";
2
- import { gethighlightedStateClasses } from "./../nodes/NodeDefault";
2
+ import { gethighlightedStateClasses } from "./../nodes/NodeContent";
3
3
 
4
4
  export const minimapNodeClassName = (node: any) => {
5
5
  const typeClass = `${eccgui}-graphviz__minimap__node--` + node.type;
@@ -4,7 +4,7 @@ import { LoremIpsum } from 'react-lorem-ipsum';
4
4
  import ReactFlow, { Elements } from 'react-flow-renderer';
5
5
  import HtmlContentBlock from "../../../components/Typography/HtmlContentBlock";
6
6
 
7
- import { NodeContent } from "./NodeDefault";
7
+ import { NodeContent } from "./NodeContent";
8
8
  import { nodeTypes } from "./nodeTypes";
9
9
  import { NodeContentExtension } from "./NodeContentExtension";
10
10
  import { Default as ContentExtensionExample } from "./NodeContentExtension.stories";
@@ -0,0 +1,329 @@
1
+ import React from "react";
2
+ import {
3
+ Position
4
+ } from "react-flow-renderer";
5
+ import { Icon, Tooltip } from "../../../index";
6
+ import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
7
+ import {ValidIconName} from "../../../components/Icon/canonicalIconNames";
8
+ import { HandleDefault, HandleProps } from "./../handles/HandleDefault";
9
+ import { NodeProps } from "./NodeDefault";
10
+
11
+ type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
12
+
13
+ export interface IHandleProps extends HandleProps {
14
+ category?: "configuration";
15
+ }
16
+
17
+ interface NodeContentData {
18
+ /**
19
+ * Name of icon that should be displayed before the node label.
20
+ * Must be a name from our list of canonical icon names.
21
+ */
22
+ iconName?: ValidIconName;
23
+ /**
24
+ * Valid and accessible URL or `data-uri` for an image that should be displayed before the node label.
25
+ */
26
+ depiction?: string;
27
+ /**
28
+ * Label that is displayed in the node header.
29
+ */
30
+ label: string;
31
+ /**
32
+ * Content element, displayed in the node body.
33
+ */
34
+ content?: React.ReactNode;
35
+ /**
36
+ * Content extension, displayed at the bottom side of a node.
37
+ */
38
+ contentExtension?: React.ReactNode;
39
+ }
40
+
41
+ export interface NodeContentProps<T> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
42
+ /**
43
+ * Size of the node.
44
+ * If `minimalShape` is not set to `none`then the configured size definition is only used for the selected node state.
45
+ */
46
+ size?: "tiny" | "small" | "medium" | "large";
47
+ /**
48
+ * Defines if the node is initially displayed within a very small shape.
49
+ * If not set to `none` then the node is only displayed in normal size when it is selected.
50
+ */
51
+ minimalShape?: "none" | "circular" | "rectangular";
52
+ /**
53
+ * Set the type of used highlights to mark the node.
54
+ */
55
+ highlightedState?: HighlightingState | HighlightingState[];
56
+ /**
57
+ * Text used for tooltip used on icon and depiction.
58
+ */
59
+ typeLabel?: string;
60
+ /**
61
+ * If `executionButtons` content is included or not.
62
+ * It is displayed in the node header between label and menu.
63
+ */
64
+ showExecutionButtons?: boolean;
65
+ // For some still unknown reason this has to be a function instead of just a ReactNode. Else sometimes the nodes "froze".
66
+ /**
67
+ * Set of defined buttons and icons that can be displayed.
68
+ */
69
+ executionButtons?: () => React.ReactNode;
70
+ /**
71
+ * Can be used for permanent action button or context menu.
72
+ * It is displayed at the node header right to the label.
73
+ */
74
+ menuButtons?: React.ReactNode;
75
+ /**
76
+ * Array of property definition objects for `Handle` components that need to be created for the node.
77
+ * @see https://reactflow.dev/docs/api/handle/
78
+ */
79
+ handles?: IHandleProps[];
80
+ /**
81
+ * 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.
82
+ */
83
+ adaptHeightForHandleMinCount?: number;
84
+ /**
85
+ * Height per handle in px (without the unit) used for minimal height calculation of the node.
86
+ */
87
+ adaptSizeIncrement?: number;
88
+ /**
89
+ * Callback function to provide content for the tooltip on a node with a defined `minimalShape`.
90
+ * If you do not want a tooltip in this state you need to provide a callback that returns an empty value.
91
+ */
92
+ getMinimalTooltipData?: (node: NodeProps<T>) => NodeContentData;
93
+ /**
94
+ * Set if a handle is displayed even if it does not allow a connection to an edge.
95
+ */
96
+ showUnconnectableHandles?: boolean;
97
+ /**
98
+ * The node is displayed with some animated shadow for highlighting purposes.
99
+ */
100
+ animated?:boolean;
101
+
102
+ /** Additional data stored in the node. */
103
+ businessData?: T;
104
+
105
+ // we need to forward some ReactFlowNodeProps here
106
+
107
+ /**
108
+ * This property is only forwarded from the `NodeDefault` element.
109
+ * If set then it will be always overwritten internally.
110
+ */
111
+ targetPosition?: typeof Position[keyof typeof Position];
112
+ /**
113
+ * This property is only forwarded from the `NodeDefault` element.
114
+ * If set then it will be always overwritten internally.
115
+ */
116
+ sourcePosition?: typeof Position[keyof typeof Position];
117
+ /**
118
+ * This property is only forwarded from the `NodeDefault` element.
119
+ * If set then it will be always overwritten internally.
120
+ */
121
+ isConnectable?: boolean;
122
+ /**
123
+ * This property is only forwarded from the `NodeDefault` element.
124
+ * If set then it will be always overwritten internally.
125
+ */
126
+ selected?: boolean;
127
+ }
128
+
129
+ interface MemoHandlerProps extends HandleProps {
130
+ posdirection: string;
131
+ style: {
132
+ [key:string]: string | undefined
133
+ }
134
+ }
135
+
136
+ const defaultHandles = [
137
+ { type: "target" },
138
+ { type: "source" },
139
+ ] as IHandleProps[];
140
+
141
+ const getDefaultMinimalTooltipData = (node: any) => {
142
+ return {
143
+ label: node.data?.label,
144
+ content: node.data?.content,
145
+ iconName: node.data?.iconName,
146
+ depiction: node.data?.depiction,
147
+ }
148
+ }
149
+
150
+ const addHandles = (handles: any, position: any, posDirection: any, isConnectable: any, nodeStyle: any) => {
151
+ return handles[position].map((handle: any, idx: any) => {
152
+ const {
153
+ className,
154
+ style = {},
155
+ category,
156
+ } = handle;
157
+ const styleAdditions : {[key: string]: string}= {
158
+ color: nodeStyle.borderColor ?? undefined
159
+ }
160
+ styleAdditions[posDirection] = (100 / (handles[position].length + 1) * (idx + 1)) + "%";
161
+ const handleProperties = {
162
+ ...handle,
163
+ ...{
164
+ position: handle.position ?? position,
165
+ style: { ...style, ...styleAdditions},
166
+ posdirection: posDirection,
167
+ isConnectable: typeof handle.isConnectable !== "undefined" ? handle.isConnectable : isConnectable,
168
+ className: !!category ? (className?className+" ":"") + gethighlightedStateClasses(category, `${eccgui}-graphviz__handle`) : className,
169
+ }
170
+ };
171
+ return (
172
+ <MemoHandler {...handleProperties} key={"handle" + idx} />
173
+ );
174
+ });
175
+ }
176
+
177
+ const imgWithTooltip = (imgEl: any, tooltipText: any) => {
178
+ if (!!tooltipText) {
179
+ return <Tooltip content={tooltipText}><span>{imgEl}</span></Tooltip>;
180
+ }
181
+
182
+ return imgEl;
183
+ }
184
+
185
+ export const gethighlightedStateClasses = (state: any, baseClassName: any) => {
186
+ let hightlights = typeof state === "string" ? [state] : state;
187
+ //@ts-ignore
188
+ return hightlights.map(item => `${baseClassName}--highlight-${item}`).join(' ');
189
+ }
190
+
191
+ const MemoHandler = React.memo(
192
+ (props: MemoHandlerProps) => <HandleDefault {...props} />,
193
+ (prev, next) => {
194
+ const styleHasChanged =
195
+ prev.style[prev.posdirection] === next.style[next.posdirection];
196
+ return styleHasChanged;
197
+ }
198
+ );
199
+
200
+ /**
201
+ * The `NodeContent` element manages the main view of how a node is displaying which content.
202
+ * This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
203
+ */
204
+ export const NodeContent = ({
205
+ iconName,
206
+ depiction,
207
+ typeLabel,
208
+ label,
209
+ showExecutionButtons = true,
210
+ executionButtons,
211
+ menuButtons,
212
+ content,
213
+ contentExtension,
214
+ size = "small",
215
+ minimalShape = "circular",
216
+ highlightedState,
217
+ handles = defaultHandles,
218
+ adaptHeightForHandleMinCount,
219
+ adaptSizeIncrement = 15,
220
+ getMinimalTooltipData = getDefaultMinimalTooltipData,
221
+ style = {},
222
+ showUnconnectableHandles = false,
223
+ animated = false,
224
+ // forwarded props
225
+ targetPosition = Position.Left,
226
+ sourcePosition = Position.Right,
227
+ isConnectable = true,
228
+ selected,
229
+ // businessData is just being ignored
230
+ businessData,
231
+ // other props for DOM element
232
+ ...otherProps
233
+ }: NodeContentProps<any>) => {
234
+ const handleStack: { [key: string]: IHandleProps[] } = {};
235
+ handleStack[Position.Top] = [] as IHandleProps[];
236
+ handleStack[Position.Right] = [] as IHandleProps[];
237
+ handleStack[Position.Bottom] = [] as IHandleProps[];
238
+ handleStack[Position.Left] = [] as IHandleProps[];
239
+ if (handles.length > 0) {
240
+ handles.forEach(handle => {
241
+ if (!!handle.position) {
242
+ handleStack[handle.position].push(handle);
243
+ }
244
+ else if (handle.category === "configuration") {
245
+ handleStack[Position.Top].push(handle);
246
+ }
247
+ else {
248
+ if (handle.type === "target") {
249
+ handleStack[targetPosition].push(handle);
250
+ }
251
+ if (handle.type === "source") {
252
+ handleStack[sourcePosition].push(handle);
253
+ }
254
+ }
255
+ });
256
+ }
257
+ const styleExpandDimensions: { [key: string]: string | number } = {};
258
+ if (
259
+ typeof adaptHeightForHandleMinCount !== "undefined" &&
260
+ (minimalShape === "none" || !!selected) &&
261
+ adaptSizeIncrement && (
262
+ handleStack[Position.Left].length >= adaptHeightForHandleMinCount ||
263
+ handleStack[Position.Right].length >= adaptHeightForHandleMinCount
264
+ )
265
+ ) {
266
+ const minHeightLeft = handleStack[Position.Left].length * adaptSizeIncrement;
267
+ const minHeightRight = handleStack[Position.Right].length * adaptSizeIncrement;
268
+ styleExpandDimensions["minHeight"] = Math.max(minHeightLeft, minHeightRight);
269
+ }
270
+ return (
271
+ <>
272
+ <section
273
+ {...otherProps}
274
+ style={{...style, ...styleExpandDimensions}}
275
+ className={
276
+ `${eccgui}-graphviz__node` +
277
+ ` ${eccgui}-graphviz__node--${size}` +
278
+ ` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
279
+ (!!highlightedState ? " " + gethighlightedStateClasses(highlightedState, `${eccgui}-graphviz__node`) : "") +
280
+ (animated ? ` ${eccgui}-graphviz__node--animated` : "") +
281
+ (showUnconnectableHandles === false ? ` ${eccgui}-graphviz__node--hidehandles` : "")
282
+ }
283
+ >
284
+ <header className={`${eccgui}-graphviz__node__header`}>
285
+ {(!!iconName || !!depiction) && (
286
+ <span
287
+ className={`${eccgui}-graphviz__node__header-depiction`}
288
+ >
289
+ {!!depiction && imgWithTooltip(<img src={depiction} alt="" />, (minimalShape === "none" || selected) ? typeLabel : undefined)}
290
+ {(!!iconName && !depiction) && <Icon name={iconName} tooltipText={(minimalShape === "none" || selected) ? typeLabel : undefined} />}
291
+ </span>
292
+ )}
293
+ <span
294
+ className={`${eccgui}-graphviz__node__header-label`}
295
+ title={label}
296
+ >
297
+ {label}
298
+ </span>
299
+ {(menuButtons || (showExecutionButtons && executionButtons)) && (
300
+ <span
301
+ className={`${eccgui}-graphviz__node__header-menu`}
302
+ >
303
+ {(showExecutionButtons && typeof executionButtons === "function") ? executionButtons() : null}
304
+ {menuButtons??null}
305
+ </span>
306
+ )}
307
+ </header>
308
+ {content && (
309
+ <div className={`${eccgui}-graphviz__node__content`}>
310
+ {content}
311
+ </div>
312
+ )}
313
+ {contentExtension && (
314
+ <div className={`${eccgui}-graphviz__node__footer`}>
315
+ {contentExtension}
316
+ </div>
317
+ )}
318
+ </section>
319
+ {!!handles && (
320
+ <>
321
+ { addHandles(handleStack, Position.Top, "left", isConnectable, style) }
322
+ { addHandles(handleStack, Position.Right, "top", isConnectable, style) }
323
+ { addHandles(handleStack, Position.Bottom, "left", isConnectable, style) }
324
+ { addHandles(handleStack, Position.Left, "top", isConnectable, style) }
325
+ </>
326
+ )}
327
+ </>
328
+ );
329
+ }
@@ -2,7 +2,8 @@ import React, { useState, useEffect, useCallback } from "react";
2
2
  import { ComponentStory, ComponentMeta } from "@storybook/react";
3
3
  import ReactFlow, { Elements } from 'react-flow-renderer';
4
4
 
5
- import { NodeDefault, NodeContent } from "./NodeDefault";
5
+ import { NodeDefault } from "./NodeDefault";
6
+ import { NodeContent } from "./NodeContent";
6
7
  import { nodeTypes } from "./nodeTypes";
7
8
  import { Default as NodeContentExample } from "./NodeContent.stories";
8
9