@eccenca/gui-elements 22.1.0-rc.0 → 22.1.0-rc.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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +13 -9
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +23 -6
- package/dist/cjs/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/_colors-linking.module.scss +1 -1
- package/dist/cjs/common/utils/stringUtils.js +7 -0
- package/dist/cjs/common/utils/stringUtils.js.map +1 -0
- package/dist/cjs/components/Application/ApplicationContent.js +1 -7
- package/dist/cjs/components/Application/ApplicationContent.js.map +1 -1
- package/dist/cjs/components/Application/ApplicationTitle.js +1 -7
- package/dist/cjs/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +0 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +5 -4
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/cjs/components/Button/Button.js +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Card/Card.js +18 -3
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/Form/FieldItemRow.js +2 -3
- package/dist/cjs/components/Form/FieldItemRow.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +34 -41
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Notification/Notification.js +8 -2
- package/dist/cjs/components/Notification/Notification.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +1 -1
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Tabs/Tab.js +1 -2
- package/dist/cjs/components/Tabs/Tab.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.js +1 -4
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/Typography/HtmlContentBlock.js +6 -6
- package/dist/cjs/components/Typography/HtmlContentBlock.js.map +1 -1
- package/dist/cjs/components/Typography/classnames.js +2 -1
- package/dist/cjs/components/Typography/classnames.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/getSmoothStepPath.js +98 -0
- package/dist/cjs/extensions/react-flow/edges/getSmoothStepPath.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/utils.js +21 -20
- package/dist/cjs/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +6 -4
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +3 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js +11 -9
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js +14 -10
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/es5/cmem/ActivityControl/ActivityExecutionErrorReportModal.js +21 -4
- package/dist/es5/cmem/ActivityControl/ActivityExecutionErrorReportModal.js.map +1 -1
- package/dist/es5/cmem/ActivityControl/SilkActivityControl.js +1 -1
- package/dist/es5/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/es5/cmem/react-flow/configuration/_colors-linking.module.scss +1 -1
- package/dist/es5/common/utils/stringUtils.js +3 -0
- package/dist/es5/common/utils/stringUtils.js.map +1 -0
- package/dist/es5/components/Application/ApplicationContent.js +1 -7
- package/dist/es5/components/Application/ApplicationContent.js.map +1 -1
- package/dist/es5/components/Application/ApplicationTitle.js +1 -7
- package/dist/es5/components/Application/ApplicationTitle.js.map +1 -1
- package/dist/es5/components/AutoSuggestion/AutoSuggestion.js +0 -1
- package/dist/es5/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js +5 -4
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/es5/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/es5/components/Button/Button.js +1 -1
- package/dist/es5/components/Button/Button.js.map +1 -1
- package/dist/es5/components/Card/Card.js +18 -3
- package/dist/es5/components/Card/Card.js.map +1 -1
- package/dist/es5/components/Form/FieldItemRow.js +2 -3
- package/dist/es5/components/Form/FieldItemRow.js.map +1 -1
- package/dist/es5/components/MultiSelect/MultiSelect.js +40 -51
- package/dist/es5/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/es5/components/Notification/Notification.js +10 -3
- package/dist/es5/components/Notification/Notification.js.map +1 -1
- package/dist/es5/components/OverviewItem/OverviewItemList.js +1 -1
- package/dist/es5/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/es5/components/Spinner/Spinner.js +2 -2
- package/dist/es5/components/Spinner/Spinner.js.map +1 -1
- package/dist/es5/components/Tabs/Tab.js +1 -2
- package/dist/es5/components/Tabs/Tab.js.map +1 -1
- package/dist/es5/components/Tabs/Tabs.js +1 -4
- package/dist/es5/components/Tabs/Tabs.js.map +1 -1
- package/dist/es5/components/Typography/HtmlContentBlock.js +17 -8
- package/dist/es5/components/Typography/HtmlContentBlock.js.map +1 -1
- package/dist/es5/components/Typography/classnames.js +1 -0
- package/dist/es5/components/Typography/classnames.js.map +1 -1
- package/dist/es5/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/es5/extensions/react-flow/edges/getSmoothStepPath.js +119 -0
- package/dist/es5/extensions/react-flow/edges/getSmoothStepPath.js.map +1 -0
- package/dist/es5/extensions/react-flow/edges/utils.js +21 -20
- package/dist/es5/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeContent.js +7 -5
- package/dist/es5/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js +3 -2
- package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeTools.js +12 -10
- package/dist/es5/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/es5/index.js +1 -3
- package/dist/es5/index.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +9 -0
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +2 -0
- package/dist/types/common/utils/stringUtils.d.ts +2 -0
- package/dist/types/components/Card/Card.d.ts +9 -4
- package/dist/types/components/Form/FieldItemRow.d.ts +1 -0
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +16 -9
- package/dist/types/components/Notification/Notification.d.ts +55 -2
- package/dist/types/components/OverviewItem/OverviewItemList.d.ts +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +1 -1
- package/dist/types/components/Typography/HtmlContentBlock.d.ts +15 -5
- package/dist/types/components/Typography/classnames.d.ts +1 -0
- package/dist/types/extensions/react-flow/edges/getSmoothStepPath.d.ts +18 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +8 -2
- package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +5 -1
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +7 -1
- package/dist/types/index.d.ts +1 -3
- package/package.json +22 -13
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +6 -6
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +27 -14
- package/src/cmem/ActivityControl/ActivityExecutionErrorReportModal.tsx +11 -3
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +5 -1
- package/src/cmem/react-flow/_nodes.scss +12 -6
- package/src/cmem/react-flow/configuration/_colors-linking.module.scss +1 -1
- package/src/common/utils/stringUtils.ts +2 -0
- package/src/components/Application/ApplicationContent.tsx +0 -5
- package/src/components/Application/ApplicationTitle.tsx +0 -5
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +0 -1
- package/src/components/AutocompleteField/AutoCompleteField.tsx +5 -4
- package/src/components/Breadcrumb/BreadcrumbItem.tsx +5 -5
- package/src/components/Breadcrumb/BreadcrumbList.tsx +1 -1
- package/src/components/Button/Button.stories.tsx +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Card/Card.tsx +23 -4
- package/src/components/Card/card.scss +4 -0
- package/src/components/Checkbox/checkbox.scss +4 -0
- package/src/components/Form/FieldItem.tsx +3 -3
- package/src/components/Form/FieldItemRow.tsx +2 -4
- package/src/components/Icon/IconButton.tsx +2 -2
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/MultiSelect/MultiSelect.stories.tsx +15 -7
- package/src/components/MultiSelect/MultiSelect.tsx +63 -60
- package/src/components/Notification/Notification.stories.tsx +82 -0
- package/src/components/Notification/Notification.tsx +62 -4
- package/src/components/Notification/notification.scss +2 -1
- package/src/components/OverviewItem/OverviewItemList.tsx +2 -2
- package/src/components/RadioButton/radiobutton.scss +4 -0
- package/src/components/Spinner/Spinner.tsx +1 -1
- package/src/components/Switch/switch.scss +1 -0
- package/src/components/Tabs/Tab.tsx +1 -2
- package/src/components/Tabs/Tabs.tsx +1 -5
- package/src/components/Tabs/stories/Tabs.stories.tsx +3 -3
- package/src/components/Tag/tag.scss +1 -1
- package/src/components/Toolbar/toolbar.scss +1 -1
- package/src/components/Typography/HtmlContentBlock.tsx +27 -4
- package/src/components/Typography/classnames.ts +1 -0
- package/src/components/Typography/typography.scss +8 -0
- package/src/extensions/react-flow/_react-flow.scss +4 -0
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +0 -1
- package/src/extensions/react-flow/edges/getSmoothStepPath.ts +118 -0
- package/src/extensions/react-flow/edges/utils.ts +21 -29
- package/src/extensions/react-flow/nodes/NodeContent.tsx +13 -7
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +6 -0
- package/src/extensions/react-flow/nodes/NodeTools.tsx +25 -9
- package/src/extensions/react-flow/nodes/_nodes.scss +31 -12
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +10 -1
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +23 -0
- package/src/index.ts +3 -3
|
@@ -7,6 +7,7 @@ import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
|
7
7
|
import {ValidIconName} from "../../../components/Icon/canonicalIconNames";
|
|
8
8
|
import { HandleDefault, HandleProps } from "./../handles/HandleDefault";
|
|
9
9
|
import { NodeProps } from "./NodeDefault";
|
|
10
|
+
import { NodeContentExtensionProps } from "./NodeContentExtension";
|
|
10
11
|
|
|
11
12
|
export type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
|
|
12
13
|
|
|
@@ -35,7 +36,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
35
36
|
/**
|
|
36
37
|
* Content extension, displayed at the bottom side of a node.
|
|
37
38
|
*/
|
|
38
|
-
contentExtension?: React.
|
|
39
|
+
contentExtension?: React.ReactElement<NodeContentExtensionProps>;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -124,6 +125,11 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
124
125
|
* If set then it will be always overwritten internally.
|
|
125
126
|
*/
|
|
126
127
|
selected?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Allow react flow wheel events, e.g. for zooming using the mouse wheel over a node.
|
|
130
|
+
* If this is allowed scrolling inside a node is not possible.
|
|
131
|
+
*/
|
|
132
|
+
letPassWheelEvents?: boolean;
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
interface MemoHandlerProps extends HandleProps {
|
|
@@ -226,6 +232,7 @@ const MemoHandler = React.memo(
|
|
|
226
232
|
sourcePosition = Position.Right,
|
|
227
233
|
isConnectable = true,
|
|
228
234
|
selected,
|
|
235
|
+
letPassWheelEvents = false,
|
|
229
236
|
// businessData is just being ignored
|
|
230
237
|
businessData,
|
|
231
238
|
// other props for DOM element
|
|
@@ -279,7 +286,8 @@ const MemoHandler = React.memo(
|
|
|
279
286
|
` ${eccgui}-graphviz__node--minimal-${minimalShape}` +
|
|
280
287
|
(!!highlightedState ? " " + gethighlightedStateClasses(highlightedState, `${eccgui}-graphviz__node`) : "") +
|
|
281
288
|
(animated ? ` ${eccgui}-graphviz__node--animated` : "") +
|
|
282
|
-
(showUnconnectableHandles === false ? ` ${eccgui}-graphviz__node--hidehandles` : "")
|
|
289
|
+
(showUnconnectableHandles === false ? ` ${eccgui}-graphviz__node--hidehandles` : "") +
|
|
290
|
+
(letPassWheelEvents === false ? ` nowheel` : "")
|
|
283
291
|
}
|
|
284
292
|
>
|
|
285
293
|
<header className={`${eccgui}-graphviz__node__header`}>
|
|
@@ -311,11 +319,9 @@ const MemoHandler = React.memo(
|
|
|
311
319
|
{typeof content === "function" ? content(adjustedContentProps) : content}
|
|
312
320
|
</div>
|
|
313
321
|
)}
|
|
314
|
-
{
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
</div>
|
|
318
|
-
)}
|
|
322
|
+
<div className={`${eccgui}-graphviz__node__footer`}>
|
|
323
|
+
</div>
|
|
324
|
+
{contentExtension}
|
|
319
325
|
</section>
|
|
320
326
|
{!!handles && (
|
|
321
327
|
<>
|
|
@@ -3,6 +3,10 @@ import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
|
3
3
|
import IconButton from "../../../components/Icon/IconButton";
|
|
4
4
|
|
|
5
5
|
export interface NodeContentExtensionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* When enabled the element is displayed in a way that it does not count into the node size calculation.
|
|
8
|
+
*/
|
|
9
|
+
slideOutOfNode?: boolean;
|
|
6
10
|
/**
|
|
7
11
|
* Element is displayed in expanded state.
|
|
8
12
|
* If it has no `onToggle` handler property set then it is always expanded.
|
|
@@ -33,6 +37,7 @@ export interface NodeContentExtensionProps extends React.HTMLAttributes<HTMLDivE
|
|
|
33
37
|
*/
|
|
34
38
|
export const NodeContentExtension = ({
|
|
35
39
|
children,
|
|
40
|
+
slideOutOfNode = false,
|
|
36
41
|
isExpanded = false,
|
|
37
42
|
onToggle = undefined,
|
|
38
43
|
actionButtons,
|
|
@@ -50,6 +55,7 @@ export const NodeContentExtension = ({
|
|
|
50
55
|
{...otherProps}
|
|
51
56
|
className={
|
|
52
57
|
`${eccgui}-graphviz__node__extension` +
|
|
58
|
+
(slideOutOfNode ? ` ${eccgui}-graphviz__node__extension--slideout` : "") +
|
|
53
59
|
(expanded ? ` ${eccgui}-graphviz__node__extension--expanded` : "")
|
|
54
60
|
}
|
|
55
61
|
>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {memo, useState} from "react";import {
|
|
1
|
+
import React, {memo, useEffect, useState} from "react";import {
|
|
2
2
|
IPopoverProps as IBlueprintPopoverProps,
|
|
3
3
|
PopoverInteractionKind as BlueprintPopoverInteractionKind,
|
|
4
4
|
} from "@blueprintjs/core";
|
|
@@ -11,6 +11,14 @@ export interface NodeToolsProps extends IBlueprintPopoverProps {
|
|
|
11
11
|
togglerElement?: ValidIconName | JSX.Element;
|
|
12
12
|
togglerText?: string;
|
|
13
13
|
menuButtonDataTestId?: string
|
|
14
|
+
/** If defined this function will be called with the menu API object to be used externally. */
|
|
15
|
+
menuFunctionsCallback?: (menuFunctions: NodeToolsMenuFunctions) => any
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Functions regarding the menu that can be called from the outside
|
|
19
|
+
export interface NodeToolsMenuFunctions {
|
|
20
|
+
/** Closes the menu if its open. */
|
|
21
|
+
closeMenu: () => void
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
export const NodeTools = memo(({
|
|
@@ -18,16 +26,25 @@ export const NodeTools = memo(({
|
|
|
18
26
|
togglerElement = "item-moremenu",
|
|
19
27
|
togglerText = "Show more options",
|
|
20
28
|
menuButtonDataTestId,
|
|
29
|
+
menuFunctionsCallback,
|
|
21
30
|
...otherOverlayProps
|
|
22
31
|
}: NodeToolsProps) => {
|
|
23
|
-
const [
|
|
32
|
+
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
menuFunctionsCallback && menuFunctionsCallback({
|
|
36
|
+
closeMenu(): void {
|
|
37
|
+
setIsOpen(false)
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
}, [menuFunctionsCallback])
|
|
24
41
|
|
|
25
42
|
return (
|
|
26
43
|
<ContextOverlay
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
isOpen={isOpen}
|
|
45
|
+
onClose={() => setIsOpen(false)}
|
|
46
|
+
hoverCloseDelay={500}
|
|
47
|
+
interactionKind={isOpen ? BlueprintPopoverInteractionKind.HOVER : BlueprintPopoverInteractionKind.CLICK}
|
|
31
48
|
{...otherOverlayProps}
|
|
32
49
|
>
|
|
33
50
|
{typeof togglerElement === "string" ? (
|
|
@@ -35,9 +52,8 @@ export const NodeTools = memo(({
|
|
|
35
52
|
data-test-id={menuButtonDataTestId}
|
|
36
53
|
name={togglerElement}
|
|
37
54
|
text={togglerText}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}}/>
|
|
55
|
+
onClick={() => setIsOpen(previous => !previous)}
|
|
56
|
+
/>
|
|
41
57
|
) : (
|
|
42
58
|
{ togglerElement }
|
|
43
59
|
)}
|
|
@@ -178,15 +178,15 @@
|
|
|
178
178
|
// Node sizes
|
|
179
179
|
|
|
180
180
|
.#{$eccgui}-graphviz__node--tiny {
|
|
181
|
-
width: $reactflow-node-basesize *
|
|
181
|
+
width: $reactflow-node-basesize * 4;
|
|
182
182
|
min-height: $reactflow-node-basesize;
|
|
183
|
-
max-height: $reactflow-node-basesize *
|
|
183
|
+
max-height: $reactflow-node-basesize * 4;
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
.#{$eccgui}-graphviz__node--small {
|
|
187
187
|
width: $reactflow-node-basesize * 5;
|
|
188
188
|
min-height: $reactflow-node-basesize;
|
|
189
|
-
max-height: $reactflow-node-basesize *
|
|
189
|
+
max-height: $reactflow-node-basesize * 8;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.#{$eccgui}-graphviz__node--medium {
|
|
@@ -268,12 +268,18 @@
|
|
|
268
268
|
// Node tools
|
|
269
269
|
|
|
270
270
|
.#{$eccgui}-graphviz__nodetools__content {
|
|
271
|
+
flex-grow: 1;
|
|
272
|
+
flex-shrink: 1;
|
|
273
|
+
min-height: 0;
|
|
271
274
|
}
|
|
272
275
|
|
|
273
276
|
// Node content extension
|
|
274
277
|
|
|
275
278
|
.#{$eccgui}-graphviz__node__extension {
|
|
276
279
|
background-color: $reactflow-node-background-color;
|
|
280
|
+
min-height: $eccgui-size-block-whitespace / 2;
|
|
281
|
+
flex-grow: 1;
|
|
282
|
+
flex-shrink: 1;
|
|
277
283
|
|
|
278
284
|
.#{$eccgui}-graphviz__node--tiny & {
|
|
279
285
|
max-height: $reactflow-node-basesize * 3;
|
|
@@ -295,11 +301,6 @@
|
|
|
295
301
|
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
296
302
|
display: flex;
|
|
297
303
|
flex-direction: column;
|
|
298
|
-
border-width: $reactflow-node-border-width;
|
|
299
|
-
border-color: $reactflow-node-border-color;
|
|
300
|
-
border-radius: $reactflow-node-border-radius;
|
|
301
|
-
border-style: solid;
|
|
302
|
-
|
|
303
304
|
// separation between node content and extension
|
|
304
305
|
// do not inherit styles here
|
|
305
306
|
border-top-color: $eccgui-color-separation-divider !important;
|
|
@@ -308,10 +309,16 @@
|
|
|
308
309
|
border-top-left-radius: 0 !important;
|
|
309
310
|
border-top-right-radius: 0 !important;
|
|
310
311
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
312
|
+
&.#{$eccgui}-graphviz__node__extension--slideout {
|
|
313
|
+
position: absolute;
|
|
314
|
+
top: 100%;
|
|
315
|
+
left: -1 * $reactflow-node-border-width;
|
|
316
|
+
right: -1 * $reactflow-node-border-width;
|
|
317
|
+
border-width: $reactflow-node-border-width;
|
|
318
|
+
border-color: $reactflow-node-border-color;
|
|
319
|
+
border-radius: $reactflow-node-border-radius;
|
|
320
|
+
border-style: solid;
|
|
321
|
+
}
|
|
315
322
|
}
|
|
316
323
|
|
|
317
324
|
.#{$eccgui}-graphviz__node__extension-expandbutton {
|
|
@@ -327,6 +334,18 @@
|
|
|
327
334
|
flex-shrink: 1;
|
|
328
335
|
overflow: auto;
|
|
329
336
|
overflow: auto;
|
|
337
|
+
|
|
338
|
+
.#{$eccgui}-tag__item {
|
|
339
|
+
max-width: 20%;
|
|
340
|
+
|
|
341
|
+
&:first-child {
|
|
342
|
+
max-width: 75%;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&:last-child {
|
|
346
|
+
max-width: 100%
|
|
347
|
+
}
|
|
348
|
+
}
|
|
330
349
|
}
|
|
331
350
|
|
|
332
351
|
.#{$eccgui}-graphviz__node__extension-actions {
|
|
@@ -7,7 +7,10 @@ import HtmlContentBlock from "../../../../components/Typography/HtmlContentBlock
|
|
|
7
7
|
import { NodeContent } from "./../NodeContent";
|
|
8
8
|
import { nodeTypes } from "./../nodeTypes";
|
|
9
9
|
import { NodeContentExtension } from "./../NodeContentExtension";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Default as ContentExtensionExample,
|
|
12
|
+
SlideOutOfNode as ContentExtensionExampleSlideOut,
|
|
13
|
+
} from "./NodeContentExtension.stories";
|
|
11
14
|
|
|
12
15
|
export default {
|
|
13
16
|
title: "Extensions/React Flow/Node Content",
|
|
@@ -81,3 +84,9 @@ Default.args = {
|
|
|
81
84
|
contentExtension: <ContentExtensionExample />,
|
|
82
85
|
minimalShape: "none",
|
|
83
86
|
};
|
|
87
|
+
|
|
88
|
+
export const SlideOut = Template.bind({});
|
|
89
|
+
SlideOut.args = {
|
|
90
|
+
...Default.args,
|
|
91
|
+
contentExtension: <ContentExtensionExampleSlideOut />
|
|
92
|
+
};
|
|
@@ -34,3 +34,26 @@ export const Default = () => {
|
|
|
34
34
|
</HtmlContentBlock>
|
|
35
35
|
</NodeContentExtension>);
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
export const SlideOutOfNode = () => {
|
|
39
|
+
const [isExpanded, setExpanded] = useState<boolean>(false);
|
|
40
|
+
|
|
41
|
+
const toggleExpansion = (event: React.MouseEvent<HTMLElement>, expanded: boolean) => {
|
|
42
|
+
setExpanded(!expanded);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<NodeContentExtension
|
|
47
|
+
slideOutOfNode
|
|
48
|
+
isExpanded={isExpanded}
|
|
49
|
+
onToggle={toggleExpansion}
|
|
50
|
+
actionButtons={
|
|
51
|
+
<IconButton name="item-question" onClick={(e) => { alert("this is a action button"); }} />
|
|
52
|
+
}
|
|
53
|
+
>
|
|
54
|
+
<HtmlContentBlock>
|
|
55
|
+
<h4>Extension example.</h4>
|
|
56
|
+
<LoremIpsum p={2} avgSentencesPerParagraph={4} random={false} />
|
|
57
|
+
</HtmlContentBlock>
|
|
58
|
+
</NodeContentExtension>);
|
|
59
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -198,8 +198,8 @@ export {
|
|
|
198
198
|
TextField,
|
|
199
199
|
TextArea,
|
|
200
200
|
SearchField,
|
|
201
|
-
Switch,
|
|
202
|
-
NumericInput,
|
|
201
|
+
Switch,
|
|
202
|
+
NumericInput,
|
|
203
203
|
FieldItem,
|
|
204
204
|
FieldItemRow,
|
|
205
205
|
FieldSet,
|
|
@@ -239,7 +239,7 @@ export {
|
|
|
239
239
|
PropertyValueList,
|
|
240
240
|
Toast,
|
|
241
241
|
HelperClasses,
|
|
242
|
-
Select, //
|
|
242
|
+
Select, // FIXME: CMEM-3742: include as own element
|
|
243
243
|
MultiSelect,
|
|
244
244
|
AutoCompleteField,
|
|
245
245
|
ProgressBar,
|