@eccenca/gui-elements 22.0.1 → 22.1.0-rc.0
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 +20 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +18 -14
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +58 -30
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/index.js +11 -0
- package/dist/cjs/cmem/ActivityControl/index.js.map +1 -0
- package/dist/cjs/cmem/ContentBlobToggler/index.js +8 -0
- package/dist/cjs/cmem/ContentBlobToggler/index.js.map +1 -0
- package/dist/cjs/cmem/index.js +14 -13
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +57 -0
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/dist/cjs/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js +31 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js +29 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js +15 -0
- package/dist/cjs/cmem/react-flow/configuration/unspecified.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +27 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +285 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +81 -0
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -0
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +46 -0
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -0
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +8 -12
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/ContextOverlay/ContextMenu.js +1 -1
- package/dist/cjs/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/cjs/components/Dialog/Modal.js +2 -2
- package/dist/cjs/components/Dialog/Modal.js.map +1 -1
- package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +30 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +219 -0
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/cjs/components/Tabs/Tab.js +95 -0
- package/dist/cjs/components/Tabs/Tab.js.map +1 -0
- package/dist/cjs/components/Tabs/TabTitle.js +20 -0
- package/dist/cjs/components/Tabs/TabTitle.js.map +1 -0
- package/dist/cjs/components/Tabs/Tabs.js +29 -19
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/Tag/Tag.js +7 -1
- package/dist/cjs/components/Tag/Tag.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/utils.js +96 -4
- package/dist/cjs/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +5 -4
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +2 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/cjs/index.js +17 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/AffirmativeButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/Button.js +61 -0
- package/dist/cjs/legacy-replacements/Button/Button.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/DismissiveButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js +25 -0
- package/dist/cjs/legacy-replacements/Button/DisruptiveButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js +55 -0
- package/dist/cjs/legacy-replacements/Checkbox/Checkbox.js.map +1 -0
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js +48 -0
- package/dist/cjs/legacy-replacements/Radio/RadioButton.js.map +1 -0
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js +36 -0
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js.map +1 -0
- package/dist/cjs/legacy-replacements/TextField/TextField.js +75 -0
- package/dist/cjs/legacy-replacements/TextField/TextField.js.map +1 -0
- package/dist/cjs/legacy-replacements/index.js +22 -0
- package/dist/cjs/legacy-replacements/index.js.map +1 -0
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js +19 -15
- package/dist/es5/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/es5/cmem/ActivityControl/SilkActivityControl.js +56 -30
- package/dist/es5/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/es5/cmem/ActivityControl/index.js +4 -0
- package/dist/es5/cmem/ActivityControl/index.js.map +1 -0
- package/dist/es5/cmem/ContentBlobToggler/index.js +3 -0
- package/dist/es5/cmem/ContentBlobToggler/index.js.map +1 -0
- package/dist/es5/cmem/index.js +6 -8
- package/dist/es5/cmem/index.js.map +1 -1
- package/dist/es5/cmem/react-flow/ReactFlow/ReactFlow.js +43 -0
- package/dist/es5/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -0
- package/dist/es5/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/dist/es5/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/dist/es5/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/dist/es5/cmem/react-flow/configuration/graph.js +23 -0
- package/dist/es5/cmem/react-flow/configuration/graph.js.map +1 -0
- package/dist/es5/cmem/react-flow/configuration/linking.js +21 -0
- package/dist/es5/cmem/react-flow/configuration/linking.js.map +1 -0
- package/dist/es5/cmem/react-flow/configuration/unspecified.js +12 -0
- package/dist/es5/cmem/react-flow/configuration/unspecified.js.map +1 -0
- package/dist/es5/cmem/react-flow/configuration/workflow.js +19 -0
- package/dist/es5/cmem/react-flow/configuration/workflow.js.map +1 -0
- package/dist/es5/components/AutoSuggestion/AutoSuggestion.js +347 -0
- package/dist/es5/components/AutoSuggestion/AutoSuggestion.js.map +1 -0
- package/dist/es5/components/AutoSuggestion/AutoSuggestionList.js +93 -0
- package/dist/es5/components/AutoSuggestion/AutoSuggestionList.js.map +1 -0
- package/dist/es5/components/AutoSuggestion/SingleLineCodeEditor.js +42 -0
- package/dist/es5/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -0
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js +8 -12
- package/dist/es5/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/es5/components/Button/Button.js.map +1 -1
- package/dist/es5/components/ContextOverlay/ContextMenu.js +1 -1
- package/dist/es5/components/ContextOverlay/ContextMenu.js.map +1 -1
- package/dist/es5/components/Dialog/Modal.js +2 -2
- package/dist/es5/components/Dialog/Modal.js.map +1 -1
- package/dist/es5/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/es5/components/Icon/Icon.js.map +1 -1
- package/dist/es5/components/Icon/canonicalIconNames.js +30 -0
- package/dist/es5/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/es5/components/MultiSelect/MultiSelect.js +301 -0
- package/dist/es5/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/es5/components/Tabs/Tab.js +98 -0
- package/dist/es5/components/Tabs/Tab.js.map +1 -0
- package/dist/es5/components/Tabs/TabTitle.js +16 -0
- package/dist/es5/components/Tabs/TabTitle.js.map +1 -0
- package/dist/es5/components/Tabs/Tabs.js +11 -21
- package/dist/es5/components/Tabs/Tabs.js.map +1 -1
- package/dist/es5/components/Tag/Tag.js +7 -1
- package/dist/es5/components/Tag/Tag.js.map +1 -1
- package/dist/es5/extensions/react-flow/edges/utils.js +99 -5
- package/dist/es5/extensions/react-flow/edges/utils.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeContent.js +21 -4
- package/dist/es5/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js +2 -2
- package/dist/es5/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/es5/extensions/react-flow/nodes/NodeTools.js.map +1 -1
- package/dist/es5/index.js +9 -2
- package/dist/es5/index.js.map +1 -1
- package/dist/es5/legacy-replacements/Button/AffirmativeButton.js +29 -0
- package/dist/es5/legacy-replacements/Button/AffirmativeButton.js.map +1 -0
- package/dist/es5/legacy-replacements/Button/Button.js +65 -0
- package/dist/es5/legacy-replacements/Button/Button.js.map +1 -0
- package/dist/es5/legacy-replacements/Button/DismissiveButton.js +29 -0
- package/dist/es5/legacy-replacements/Button/DismissiveButton.js.map +1 -0
- package/dist/es5/legacy-replacements/Button/DisruptiveButton.js +29 -0
- package/dist/es5/legacy-replacements/Button/DisruptiveButton.js.map +1 -0
- package/dist/es5/legacy-replacements/Checkbox/Checkbox.js +59 -0
- package/dist/es5/legacy-replacements/Checkbox/Checkbox.js.map +1 -0
- package/dist/es5/legacy-replacements/Radio/RadioButton.js +52 -0
- package/dist/es5/legacy-replacements/Radio/RadioButton.js.map +1 -0
- package/dist/es5/legacy-replacements/Tabs/Tabs.js +40 -0
- package/dist/es5/legacy-replacements/Tabs/Tabs.js.map +1 -0
- package/dist/es5/legacy-replacements/TextField/TextField.js +81 -0
- package/dist/es5/legacy-replacements/TextField/TextField.js.map +1 -0
- package/dist/es5/legacy-replacements/index.js +10 -0
- package/dist/es5/legacy-replacements/index.js.map +1 -0
- package/dist/types/cmem/ActivityControl/ActivityControlTypes.d.ts +2 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +39 -2
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +16 -3
- package/dist/types/cmem/ActivityControl/index.d.ts +3 -0
- package/dist/types/cmem/ContentBlobToggler/index.d.ts +2 -0
- package/dist/types/cmem/index.d.ts +8 -8
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +14 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +21 -0
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +19 -0
- package/dist/types/cmem/react-flow/configuration/unspecified.d.ts +9 -0
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +17 -0
- package/dist/types/components/AutoSuggestion/AutoSuggestion.d.ts +67 -0
- package/dist/types/components/AutoSuggestion/AutoSuggestionList.d.ts +13 -0
- package/dist/types/components/AutoSuggestion/SingleLineCodeEditor.d.ts +25 -0
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +8 -7
- package/dist/types/components/Button/Button.d.ts +3 -2
- package/dist/types/components/ContextOverlay/ContextMenu.d.ts +6 -1
- package/dist/types/components/Dialog/Modal.d.ts +4 -3
- package/dist/types/components/Dialog/SimpleDialog.d.ts +2 -0
- package/dist/types/components/Icon/Icon.d.ts +2 -2
- package/dist/types/components/Icon/IconButton.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +79 -0
- package/dist/types/components/Tabs/Tab.d.ts +549 -0
- package/dist/types/components/Tabs/TabTitle.d.ts +38 -0
- package/dist/types/components/Tabs/Tabs.d.ts +14 -20
- package/dist/types/components/Tag/Tag.d.ts +1 -1
- package/dist/types/extensions/react-flow/edges/utils.d.ts +1 -1
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +8 -8
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/NodeTools.d.ts +2 -1
- package/dist/types/extensions/react-flow/nodes/nodeTypes.d.ts +10 -10
- package/dist/types/index.d.ts +9 -2
- package/dist/types/legacy-replacements/Button/AffirmativeButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Button/Button.d.ts +5 -0
- package/dist/types/legacy-replacements/Button/DismissiveButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Button/DisruptiveButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Checkbox/Checkbox.d.ts +2 -0
- package/dist/types/legacy-replacements/Radio/RadioButton.d.ts +2 -0
- package/dist/types/legacy-replacements/Tabs/Tabs.d.ts +22 -0
- package/dist/types/legacy-replacements/TextField/TextField.d.ts +2 -0
- package/dist/types/legacy-replacements/index.d.ts +10 -0
- package/package.json +16 -7
- package/src/cmem/ActivityControl/ActivityControlTypes.ts +3 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.stories.tsx +98 -0
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +131 -89
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +178 -120
- package/src/cmem/ActivityControl/index.ts +3 -0
- package/src/cmem/ContentBlobToggler/index.ts +2 -0
- package/src/cmem/_index.scss +6 -0
- package/src/cmem/index.ts +10 -23
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +222 -0
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +40 -0
- package/src/cmem/react-flow/_edges.scss +23 -0
- package/src/cmem/react-flow/_handles.scss +34 -0
- package/src/cmem/react-flow/_index.scss +5 -0
- package/src/cmem/react-flow/_minimap.scss +33 -0
- package/src/cmem/react-flow/_nodes.scss +60 -0
- package/src/cmem/react-flow/configuration/_colors-graph.module.scss +35 -0
- package/src/cmem/react-flow/configuration/_colors-linking.module.scss +29 -0
- package/src/cmem/react-flow/configuration/_colors-workflow.module.scss +22 -0
- package/src/cmem/react-flow/configuration/_colors.scss +3 -0
- package/src/cmem/react-flow/configuration/graph.ts +29 -0
- package/src/cmem/react-flow/configuration/linking.ts +28 -0
- package/src/cmem/react-flow/configuration/unspecified.ts +13 -0
- package/src/cmem/react-flow/configuration/workflow.ts +25 -0
- package/src/components/AutoSuggestion/AutoSuggestion.scss +100 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +447 -0
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +170 -0
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +97 -0
- package/src/components/AutoSuggestion/tests/AutoSuggestion.test.tsx +37 -0
- package/src/components/AutoSuggestion/tests/AutoSuggestionList.test.tsx +124 -0
- package/src/components/AutoSuggestion/tests/SingleLineCodeEditor.test.tsx +55 -0
- package/src/components/AutocompleteField/AutoCompleteField.tsx +19 -19
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +2 -1
- package/src/components/Button/Button.tsx +3 -2
- package/src/components/ContextOverlay/ContextMenu.tsx +8 -2
- package/src/components/Dialog/Modal.tsx +9 -2
- package/src/components/Dialog/SimpleDialog.tsx +2 -0
- package/src/components/Icon/Icon.tsx +4 -4
- package/src/components/Icon/IconButton.tsx +1 -1
- package/src/components/Icon/canonicalIconNames.tsx +39 -2
- package/src/components/MultiSelect/MultiSelect.stories.tsx +63 -0
- package/src/components/MultiSelect/MultiSelect.tsx +370 -0
- package/src/components/Tabs/Tab.tsx +112 -0
- package/src/components/Tabs/TabTitle.tsx +71 -0
- package/src/components/Tabs/Tabs.tsx +26 -90
- package/src/components/Tabs/stories/Tab.stories.tsx +65 -0
- package/src/components/Tabs/stories/TabTitle.stories.tsx +35 -0
- package/src/components/Tabs/stories/Tabs.stories.tsx +98 -0
- package/src/components/Tabs/tabs.scss +11 -4
- package/src/components/Tag/Tag.tsx +10 -3
- package/src/components/Tag/tag.scss +1 -1
- package/src/components/TextField/TextField.tsx +1 -1
- package/src/configuration/_variables.scss +3 -3
- package/src/extensions/react-flow/_config.scss +2 -2
- package/src/extensions/react-flow/edges/_edges.scss +3 -28
- package/src/extensions/react-flow/edges/utils.ts +139 -4
- package/src/extensions/react-flow/handles/_handles.scss +4 -58
- package/src/extensions/react-flow/minimap/_minimap.scss +0 -45
- package/src/extensions/react-flow/nodes/NodeContent.tsx +134 -133
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +11 -10
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +2 -2
- package/src/extensions/react-flow/nodes/NodeTools.tsx +2 -1
- package/src/extensions/react-flow/nodes/_nodes.scss +31 -185
- package/src/extensions/react-flow/nodes/{NodeContent.stories.tsx → stories/NodeContent.stories.tsx} +4 -4
- package/src/extensions/react-flow/nodes/{NodeContentExtension.stories.tsx → stories/NodeContentExtension.stories.tsx} +4 -4
- package/src/extensions/react-flow/nodes/{NodeDefault.stories.tsx → stories/NodeDefault.stories.tsx} +5 -4
- package/src/index.scss +1 -0
- package/src/index.ts +16 -1
- package/src/legacy-replacements/Tabs/Tabs.stories.tsx +46 -0
- package/src/legacy-replacements/Tabs/Tabs.tsx +84 -0
- package/src/legacy-replacements/index.ts +11 -0
- package/src/test/setupTests.js +19 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants";
|
|
3
3
|
import IconButton from "../../../components/Icon/IconButton";
|
|
4
|
-
import Button from "../../../components/Button/Button";
|
|
5
4
|
|
|
6
5
|
export interface NodeContentExtensionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
6
|
/**
|
|
@@ -70,15 +69,17 @@ export const NodeContentExtension = ({
|
|
|
70
69
|
<div className={`${eccgui}-graphviz__node__extension-body`}>
|
|
71
70
|
{children}
|
|
72
71
|
</div>
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
{(!!actionButtons || !!onToggle) && (
|
|
73
|
+
<div className={`${eccgui}-graphviz__node__extension-actions`}>
|
|
74
|
+
<IconButton
|
|
75
|
+
className={`${eccgui}-graphviz__node__extension-reducebutton`}
|
|
76
|
+
name="toggler-showless"
|
|
77
|
+
text={tooltipReduce}
|
|
78
|
+
onClick={onToggle ? (e) => { onToggle(e, expanded); } : undefined}
|
|
79
|
+
/>
|
|
80
|
+
{actionButtons}
|
|
81
|
+
</div>
|
|
82
|
+
)}
|
|
82
83
|
</>
|
|
83
84
|
)
|
|
84
85
|
}
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
import { Tooltip } from "../../../index";
|
|
7
7
|
import { NodeContent, NodeContentProps } from "./NodeContent";
|
|
8
8
|
|
|
9
|
-
export interface NodeProps<
|
|
9
|
+
export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReactFlowNodeProps {
|
|
10
10
|
/**
|
|
11
11
|
* Contains all properties for our implementation of the React-Flow node.
|
|
12
12
|
* For details pls see the `NodeContent` element documentation.
|
|
13
13
|
*/
|
|
14
|
-
data: NodeContentProps<
|
|
14
|
+
data: NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS>
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -4,10 +4,11 @@ import React, {memo, useState} from "react";import {
|
|
|
4
4
|
} from "@blueprintjs/core";
|
|
5
5
|
import {ContextOverlay, IconButton} from "../../../index";
|
|
6
6
|
import {CLASSPREFIX as eccgui} from "../../../configuration/constants";
|
|
7
|
+
import {ValidIconName} from "../../../components/Icon/canonicalIconNames";
|
|
7
8
|
|
|
8
9
|
export interface NodeToolsProps extends IBlueprintPopoverProps {
|
|
9
10
|
children: string | JSX.Element;
|
|
10
|
-
togglerElement?:
|
|
11
|
+
togglerElement?: ValidIconName | JSX.Element;
|
|
11
12
|
togglerText?: string;
|
|
12
13
|
menuButtonDataTestId?: string
|
|
13
14
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
&.selected:before {
|
|
3
3
|
content: " ";
|
|
4
4
|
position: absolute;
|
|
5
|
-
top: -
|
|
6
|
-
right: -
|
|
7
|
-
bottom: -
|
|
8
|
-
left: -
|
|
9
|
-
border-width:
|
|
5
|
+
top: -6 * $reactflow-node-border-width;
|
|
6
|
+
right: -6 * $reactflow-node-border-width;
|
|
7
|
+
bottom: -6 * $reactflow-node-border-width;
|
|
8
|
+
left: -6 * $reactflow-node-border-width;
|
|
9
|
+
border-width: 1px;
|
|
10
10
|
border-color: $reactflow-edge-stroke-color-selected;
|
|
11
11
|
border-radius: $reactflow-node-border-radius;
|
|
12
12
|
border-style: dotted;
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
width: unset !important;
|
|
24
24
|
text-align: unset !important;
|
|
25
25
|
padding: unset !important;
|
|
26
|
+
|
|
27
|
+
&.selected, &.selected:hover {
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -43,7 +47,7 @@
|
|
|
43
47
|
border-style: solid;
|
|
44
48
|
|
|
45
49
|
&:hover {
|
|
46
|
-
box-shadow: 0 0 0
|
|
50
|
+
box-shadow: 0 0 0 6 * $reactflow-node-border-width rgba($reactflow-edge-stroke-color-selected, 0.05);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
|
|
@@ -53,13 +57,13 @@
|
|
|
53
57
|
|
|
54
58
|
@keyframes pumpingshadow {
|
|
55
59
|
0% {
|
|
56
|
-
box-shadow: 0 0
|
|
60
|
+
box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
|
|
57
61
|
}
|
|
58
62
|
50% {
|
|
59
|
-
box-shadow: 0 0
|
|
63
|
+
box-shadow: 0 0 2 * $reactflow-node-border-width 6 * $reactflow-node-border-width rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 6 * $reactflow-node-border-width $reactflow-edge-stroke-color-selected;
|
|
60
64
|
}
|
|
61
65
|
100% {
|
|
62
|
-
box-shadow: 0 0
|
|
66
|
+
box-shadow: 0 0 2 * $reactflow-node-border-width 0 rgba(#fff, 0.9), 0 0 1 * $reactflow-node-border-width 0 rgba($reactflow-edge-stroke-color-selected, 0);
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
|
|
@@ -197,113 +201,6 @@
|
|
|
197
201
|
max-height: $reactflow-node-basesize * 13;
|
|
198
202
|
}
|
|
199
203
|
|
|
200
|
-
// Node types
|
|
201
|
-
|
|
202
|
-
.react-flow__node-graphNode {
|
|
203
|
-
.#{$eccgui}-graphviz__node {
|
|
204
|
-
background-color: #fff;
|
|
205
|
-
border-color: #8e24aa;
|
|
206
|
-
border-style: double;
|
|
207
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
208
|
-
}
|
|
209
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
210
|
-
border-color: #8e24aa;
|
|
211
|
-
border-style: double;
|
|
212
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.react-flow__node-classNode {
|
|
217
|
-
.#{$eccgui}-graphviz__node {
|
|
218
|
-
border-width: 2 * $reactflow-node-border-width;
|
|
219
|
-
border-radius: 0;
|
|
220
|
-
border-color: darken($button-background-color, 60%);
|
|
221
|
-
}
|
|
222
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
223
|
-
border-color: darken($button-background-color, 60%);
|
|
224
|
-
border-width: 2 * $reactflow-node-border-width;
|
|
225
|
-
border-radius: 0;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.react-flow__node-instanceNode {
|
|
230
|
-
.#{$eccgui}-graphviz__node {
|
|
231
|
-
border-color: darken($button-background-color, 50%);
|
|
232
|
-
}
|
|
233
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
234
|
-
border-color: darken($button-background-color, 50%);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.react-flow__node-propertyNode {
|
|
239
|
-
.#{$eccgui}-graphviz__node {
|
|
240
|
-
background-color: complement($button-background-color);
|
|
241
|
-
border-color: darken(complement($button-background-color), 40%);
|
|
242
|
-
border-radius: 2 * $reactflow-node-border-radius;
|
|
243
|
-
border-style: dashed;
|
|
244
|
-
}
|
|
245
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
246
|
-
border-color: darken(complement($button-background-color), 40%);
|
|
247
|
-
border-radius: 2 * $reactflow-node-border-radius;
|
|
248
|
-
border-style: dashed;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.react-flow__node-datasetNode {
|
|
253
|
-
.#{$eccgui}-graphviz__node {
|
|
254
|
-
background-color: #e1f5fe;
|
|
255
|
-
border-color: #039be5;
|
|
256
|
-
}
|
|
257
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
258
|
-
border-color: #039be5;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.react-flow__node-linkingNode {
|
|
263
|
-
.#{$eccgui}-graphviz__node {
|
|
264
|
-
background-color: #e0f7fa;
|
|
265
|
-
border-color: #00acc1;
|
|
266
|
-
}
|
|
267
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
268
|
-
border-color: #00acc1;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.react-flow__node-transformNode {
|
|
273
|
-
.#{$eccgui}-graphviz__node {
|
|
274
|
-
border-color: #00897b;
|
|
275
|
-
}
|
|
276
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
277
|
-
border-color: #00897b;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.react-flow__node-taskNode {
|
|
282
|
-
.#{$eccgui}-graphviz__node {
|
|
283
|
-
background-color: #eceff1;
|
|
284
|
-
border-color: #546e7a;
|
|
285
|
-
}
|
|
286
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
287
|
-
border-color: #546e7a;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.react-flow__node-workflowNode {
|
|
292
|
-
.#{$eccgui}-graphviz__node {
|
|
293
|
-
background-color: #fff;
|
|
294
|
-
border-color: #4527a0;
|
|
295
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
296
|
-
border-style: double;
|
|
297
|
-
border-radius: 0;
|
|
298
|
-
}
|
|
299
|
-
.#{$eccgui}-graphviz__node__extension--expanded {
|
|
300
|
-
border-color: #4527a0;
|
|
301
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
302
|
-
border-style: double;
|
|
303
|
-
border-radius: 0;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
204
|
// Node highlights
|
|
308
205
|
|
|
309
206
|
.#{$eccgui}-graphviz__node--highlight-success,
|
|
@@ -313,12 +210,12 @@
|
|
|
313
210
|
content: " ";
|
|
314
211
|
display: block;
|
|
315
212
|
position: absolute;
|
|
316
|
-
top: -
|
|
317
|
-
left: -
|
|
318
|
-
bottom: -
|
|
319
|
-
right: -
|
|
213
|
+
top: -2 * $reactflow-node-border-width;
|
|
214
|
+
left: -2 * $reactflow-node-border-width;
|
|
215
|
+
bottom: -2 * $reactflow-node-border-width;
|
|
216
|
+
right: -2 * $reactflow-node-border-width;
|
|
320
217
|
border-radius: inherit;
|
|
321
|
-
box-shadow: 0 0 0
|
|
218
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-danger-text;
|
|
322
219
|
z-index: -1;
|
|
323
220
|
}
|
|
324
221
|
}
|
|
@@ -329,12 +226,12 @@
|
|
|
329
226
|
content: " ";
|
|
330
227
|
display: block;
|
|
331
228
|
position: absolute;
|
|
332
|
-
top: -
|
|
333
|
-
left: -
|
|
334
|
-
bottom: -
|
|
335
|
-
right: -
|
|
229
|
+
top: -2 * $reactflow-node-border-width;
|
|
230
|
+
left: -2 * $reactflow-node-border-width;
|
|
231
|
+
bottom: -2 * $reactflow-node-border-width;
|
|
232
|
+
right: -2 * $reactflow-node-border-width;
|
|
336
233
|
border-radius: inherit;
|
|
337
|
-
box-shadow: 0 0 0
|
|
234
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-accent;
|
|
338
235
|
z-index: -1;
|
|
339
236
|
}
|
|
340
237
|
|
|
@@ -342,29 +239,29 @@
|
|
|
342
239
|
&.#{$eccgui}-graphviz__node--highlight-warning,
|
|
343
240
|
&.#{$eccgui}-graphviz__node--highlight-danger {
|
|
344
241
|
&:after {
|
|
345
|
-
top: -
|
|
346
|
-
left: -
|
|
347
|
-
bottom: -
|
|
348
|
-
right: -
|
|
242
|
+
top: -4 * $reactflow-node-border-width;
|
|
243
|
+
left: -4 * $reactflow-node-border-width;
|
|
244
|
+
bottom: -4 * $reactflow-node-border-width;
|
|
245
|
+
right: -4 * $reactflow-node-border-width;
|
|
349
246
|
}
|
|
350
247
|
}
|
|
351
248
|
}
|
|
352
249
|
|
|
353
250
|
.#{$eccgui}-graphviz__node--highlight-success {
|
|
354
251
|
&:before {
|
|
355
|
-
box-shadow: 0 0 0
|
|
252
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-success-text;
|
|
356
253
|
}
|
|
357
254
|
}
|
|
358
255
|
|
|
359
256
|
.#{$eccgui}-graphviz__node--highlight-warning {
|
|
360
257
|
&:before {
|
|
361
|
-
box-shadow: 0 0 0
|
|
258
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width $eccgui-color-warning-text;
|
|
362
259
|
}
|
|
363
260
|
}
|
|
364
261
|
|
|
365
262
|
.#{$eccgui}-graphviz__node--highlight-altmatch {
|
|
366
263
|
&:after {
|
|
367
|
-
box-shadow: 0 0 0
|
|
264
|
+
box-shadow: 0 0 0 2 * $reactflow-node-border-width complement($eccgui-color-primary);
|
|
368
265
|
}
|
|
369
266
|
}
|
|
370
267
|
|
|
@@ -406,7 +303,7 @@
|
|
|
406
303
|
// separation between node content and extension
|
|
407
304
|
// do not inherit styles here
|
|
408
305
|
border-top-color: $eccgui-color-separation-divider !important;
|
|
409
|
-
border-top-width:
|
|
306
|
+
border-top-width: 1px !important;
|
|
410
307
|
border-top-style: solid !important;
|
|
411
308
|
border-top-left-radius: 0 !important;
|
|
412
309
|
border-top-right-radius: 0 !important;
|
|
@@ -415,57 +312,6 @@
|
|
|
415
312
|
top: 100%;
|
|
416
313
|
left: -1 * $reactflow-node-border-width;
|
|
417
314
|
right: -1 * $reactflow-node-border-width;
|
|
418
|
-
|
|
419
|
-
.react-flow__node-graphNode & {
|
|
420
|
-
border-color: #8e24aa;
|
|
421
|
-
border-style: double;
|
|
422
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
423
|
-
left: -3 * $reactflow-node-border-width;
|
|
424
|
-
right: -3 * $reactflow-node-border-width;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.react-flow__node-classNode & {
|
|
428
|
-
border-color: darken($button-background-color, 60%);
|
|
429
|
-
border-width: 2 * $reactflow-node-border-width;
|
|
430
|
-
border-radius: 0;
|
|
431
|
-
left: -2 * $reactflow-node-border-width;
|
|
432
|
-
right: -2 * $reactflow-node-border-width;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.react-flow__node-instanceNode & {
|
|
436
|
-
border-color: darken($button-background-color, 50%);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.react-flow__node-propertyNode & {
|
|
440
|
-
border-color: darken(complement($button-background-color), 40%);
|
|
441
|
-
border-radius: 2 * $reactflow-node-border-radius;
|
|
442
|
-
border-style: dashed;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.react-flow__node-datasetNode & {
|
|
446
|
-
border-color: #039be5;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.react-flow__node-linkingNode & {
|
|
450
|
-
border-color: #00acc1;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.react-flow__node-transformNode & {
|
|
454
|
-
border-color: #00897b;
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
.react-flow__node-taskNode & {
|
|
458
|
-
border-color: #546e7a;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.react-flow__node-workflowNode & {
|
|
462
|
-
border-color: #4527a0;
|
|
463
|
-
border-width: 3 * $reactflow-node-border-width;
|
|
464
|
-
border-style: double;
|
|
465
|
-
border-radius: 0;
|
|
466
|
-
left: -3 * $reactflow-node-border-width;
|
|
467
|
-
right: -3 * $reactflow-node-border-width;
|
|
468
|
-
}
|
|
469
315
|
}
|
|
470
316
|
|
|
471
317
|
.#{$eccgui}-graphviz__node__extension-expandbutton {
|
package/src/extensions/react-flow/nodes/{NodeContent.stories.tsx → stories/NodeContent.stories.tsx}
RENAMED
|
@@ -2,11 +2,11 @@ import React, { useState, useEffect, useCallback } from "react";
|
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
3
|
import { LoremIpsum } from 'react-lorem-ipsum';
|
|
4
4
|
import ReactFlow, { Elements } from 'react-flow-renderer';
|
|
5
|
-
import HtmlContentBlock from "
|
|
5
|
+
import HtmlContentBlock from "../../../../components/Typography/HtmlContentBlock";
|
|
6
6
|
|
|
7
|
-
import { NodeContent } from "
|
|
8
|
-
import { nodeTypes } from "
|
|
9
|
-
import { NodeContentExtension } from "
|
|
7
|
+
import { NodeContent } from "./../NodeContent";
|
|
8
|
+
import { nodeTypes } from "./../nodeTypes";
|
|
9
|
+
import { NodeContentExtension } from "./../NodeContentExtension";
|
|
10
10
|
import { Default as ContentExtensionExample } from "./NodeContentExtension.stories";
|
|
11
11
|
|
|
12
12
|
export default {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentMeta } from "@storybook/react";
|
|
3
3
|
import { LoremIpsum } from 'react-lorem-ipsum';
|
|
4
4
|
|
|
5
|
-
import { NodeContentExtension } from "
|
|
6
|
-
import IconButton from "
|
|
7
|
-
import HtmlContentBlock from "
|
|
5
|
+
import { NodeContentExtension } from "./../NodeContentExtension";
|
|
6
|
+
import IconButton from "../../../../components/Icon/IconButton";
|
|
7
|
+
import HtmlContentBlock from "../../../../components/Typography/HtmlContentBlock";
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
10
|
title: "Extensions/React Flow/Node Content Extension",
|
package/src/extensions/react-flow/nodes/{NodeDefault.stories.tsx → stories/NodeDefault.stories.tsx}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback } from "react";
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
import
|
|
3
|
+
import { ReactFlow } from "./../../../../cmem";
|
|
4
|
+
import { Elements } from 'react-flow-renderer';
|
|
4
5
|
|
|
5
|
-
import { NodeDefault } from "
|
|
6
|
-
import { NodeContent } from "
|
|
7
|
-
import { nodeTypes } from "
|
|
6
|
+
import { NodeDefault } from "./../NodeDefault";
|
|
7
|
+
import { NodeContent } from "./../NodeContent";
|
|
8
|
+
import { nodeTypes } from "./../nodeTypes";
|
|
8
9
|
import { Default as NodeContentExample } from "./NodeContent.stories";
|
|
9
10
|
|
|
10
11
|
export default {
|
package/src/index.scss
CHANGED
|
@@ -169,6 +169,7 @@
|
|
|
169
169
|
@import "./components/Tabs/tabs";
|
|
170
170
|
@import "./components/PropertyValuePair/propertyvalue";
|
|
171
171
|
@import "./components/Iframe/iframe";
|
|
172
|
+
@import "./components/AutoSuggestion/AutoSuggestion";
|
|
172
173
|
|
|
173
174
|
// == load tweaks ==============================================================
|
|
174
175
|
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,9 @@ import ApplicationToolbar from "./components/Application/ApplicationToolbar";
|
|
|
8
8
|
import ApplicationToolbarSection from "./components/Application/ApplicationToolbarSection";
|
|
9
9
|
import ApplicationToolbarAction from "./components/Application/ApplicationToolbarAction";
|
|
10
10
|
import ApplicationToolbarPanel from "./components/Application/ApplicationToolbarPanel";
|
|
11
|
+
import AutoSuggestion from "./components/AutoSuggestion/AutoSuggestion";
|
|
12
|
+
import { AutoSuggestionList } from "./components/AutoSuggestion/AutoSuggestionList";
|
|
13
|
+
import SingleLineCodeEditor from "./components/AutoSuggestion/SingleLineCodeEditor";
|
|
11
14
|
|
|
12
15
|
import HtmlContentBlock from "./components/Typography/HtmlContentBlock";
|
|
13
16
|
import OverflowText from "./components/Typography/OverflowText";
|
|
@@ -31,6 +34,8 @@ import Button from "./components/Button/Button";
|
|
|
31
34
|
import Checkbox from "./components/Checkbox/Checkbox";
|
|
32
35
|
import RadioButton from "./components/RadioButton/RadioButton";
|
|
33
36
|
import Tabs from "./components/Tabs/Tabs";
|
|
37
|
+
import Tab from "./components/Tabs/Tab";
|
|
38
|
+
import TabTitle from "./components/Tabs/TabTitle";
|
|
34
39
|
import TextField from "./components/TextField/TextField";
|
|
35
40
|
import TextArea from "./components/TextField/TextArea";
|
|
36
41
|
import SearchField from "./components/TextField/SearchField";
|
|
@@ -56,6 +61,7 @@ import TagList from "./components/Tag/TagList";
|
|
|
56
61
|
import Notification from "./components/Notification/Notification";
|
|
57
62
|
import Toast from "./components/Notification/Toast";
|
|
58
63
|
import { Select } from "@blueprintjs/select";
|
|
64
|
+
import MultiSelect from "./components/MultiSelect/MultiSelect";
|
|
59
65
|
|
|
60
66
|
import { Iframe } from "./components/Iframe/Iframe";
|
|
61
67
|
import { IframeModal } from "./components/Iframe/IframeModal";
|
|
@@ -125,6 +131,8 @@ import { openInNewTab } from "./common/utils/openInNewTab";
|
|
|
125
131
|
import { ProgressBar } from "./components/ProgressBar/ProgressBar";
|
|
126
132
|
import List from "./components/List/List";
|
|
127
133
|
|
|
134
|
+
import * as LegacyReplacements from "./legacy-replacements";
|
|
135
|
+
|
|
128
136
|
const HelperClasses = {
|
|
129
137
|
Typography: TypographyClassNames,
|
|
130
138
|
Intent: IntentClassNames,
|
|
@@ -145,6 +153,9 @@ export {
|
|
|
145
153
|
ApplicationToolbarSection,
|
|
146
154
|
ApplicationToolbarAction,
|
|
147
155
|
ApplicationToolbarPanel,
|
|
156
|
+
AutoSuggestion,
|
|
157
|
+
AutoSuggestionList,
|
|
158
|
+
SingleLineCodeEditor,
|
|
148
159
|
HtmlContentBlock,
|
|
149
160
|
OverflowText,
|
|
150
161
|
WhiteSpaceContainer,
|
|
@@ -182,6 +193,8 @@ export {
|
|
|
182
193
|
Checkbox,
|
|
183
194
|
RadioButton,
|
|
184
195
|
Tabs,
|
|
196
|
+
Tab,
|
|
197
|
+
TabTitle,
|
|
185
198
|
TextField,
|
|
186
199
|
TextArea,
|
|
187
200
|
SearchField,
|
|
@@ -227,11 +240,13 @@ export {
|
|
|
227
240
|
Toast,
|
|
228
241
|
HelperClasses,
|
|
229
242
|
Select, // TODO: include as own element
|
|
243
|
+
MultiSelect,
|
|
230
244
|
AutoCompleteField,
|
|
231
245
|
ProgressBar,
|
|
232
246
|
Iframe,
|
|
233
247
|
IframeModal,
|
|
234
|
-
Utilities
|
|
248
|
+
Utilities,
|
|
249
|
+
LegacyReplacements,
|
|
235
250
|
};
|
|
236
251
|
|
|
237
252
|
export * from "./cmem";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import { Tabs } from "./../../legacy-replacements";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Legacy/Tabs",
|
|
8
|
+
component: Tabs,
|
|
9
|
+
argTypes: {
|
|
10
|
+
className: {
|
|
11
|
+
description: "A space-delimited list of class names.",
|
|
12
|
+
control: "string",
|
|
13
|
+
table: {
|
|
14
|
+
defaultValue: { summary: undefined },
|
|
15
|
+
type: { summary: "string" },
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
} as ComponentMeta<typeof Tabs>;
|
|
20
|
+
|
|
21
|
+
const TemplateDeprecated: ComponentStory<typeof Tabs> = (args) => (
|
|
22
|
+
<Tabs {...args} />
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
export const DeprecatedUsage = TemplateDeprecated.bind({});
|
|
26
|
+
DeprecatedUsage.args = {
|
|
27
|
+
prefixTabNames: "deprecatedtabs",
|
|
28
|
+
activeTab: "deprecatedtab1",
|
|
29
|
+
tabs: [
|
|
30
|
+
{
|
|
31
|
+
tabId: "deprecatedtab1",
|
|
32
|
+
tabTitle: "Tab title 1",
|
|
33
|
+
tabContent: "Tab content 1",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
tabId: "deprecatedtab2",
|
|
37
|
+
tabTitle: "Tab title 2",
|
|
38
|
+
tabContent: "Tab content 2",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
tabId: "deprecatedtab3",
|
|
42
|
+
tabTitle: "Tab title 3",
|
|
43
|
+
tabContent: "Tab content 3",
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Tabs as BlueprintTabs,
|
|
4
|
+
TabsProps as BlueprintTabsProps,
|
|
5
|
+
Tab,
|
|
6
|
+
} from "@blueprintjs/core";
|
|
7
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
8
|
+
|
|
9
|
+
// deprecated interface
|
|
10
|
+
interface TabsProps extends Omit<
|
|
11
|
+
BlueprintTabsProps,
|
|
12
|
+
"vertical" | "onChange" | "large" | "id" | "renderActiveTabPanelOnly"
|
|
13
|
+
> {
|
|
14
|
+
activeTab: string;
|
|
15
|
+
tabs: DeprecatedTabProps[];
|
|
16
|
+
onTabClick?: ({props}: any) => void;
|
|
17
|
+
prefixTabNames: string;
|
|
18
|
+
allowScrollbars?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If controlled usage is enable then a `onTabClick` handler is ncessary to control tab panel content and `activeTab` updates.
|
|
21
|
+
*/
|
|
22
|
+
controlled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// deprecated interface
|
|
26
|
+
export interface DeprecatedTabProps {
|
|
27
|
+
tabId: string;
|
|
28
|
+
tabTitle: React.ReactNode;
|
|
29
|
+
tabContent?: JSX.Element;
|
|
30
|
+
dontShrink?: boolean;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const createDeprecatedTab = ({
|
|
35
|
+
tabId,
|
|
36
|
+
tabTitle,
|
|
37
|
+
tabContent,
|
|
38
|
+
dontShrink=false,
|
|
39
|
+
...otherTabProps
|
|
40
|
+
}: DeprecatedTabProps) => {
|
|
41
|
+
const extraStyles = dontShrink ? { style: {flexShrink: 0} } : {};
|
|
42
|
+
return <Tab
|
|
43
|
+
key={tabId}
|
|
44
|
+
id={tabId}
|
|
45
|
+
title={tabTitle}
|
|
46
|
+
panel={tabContent}
|
|
47
|
+
{...otherTabProps}
|
|
48
|
+
{...extraStyles}
|
|
49
|
+
/>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function TabsReplacement({
|
|
53
|
+
activeTab,
|
|
54
|
+
tabs=[],
|
|
55
|
+
onTabClick,
|
|
56
|
+
controlled = false,
|
|
57
|
+
prefixTabNames,
|
|
58
|
+
className = "",
|
|
59
|
+
allowScrollbars,
|
|
60
|
+
...restProps
|
|
61
|
+
}: TabsProps) {
|
|
62
|
+
const usagetype = controlled ? { selectedTabId: activeTab } : { defaultSelectedTabId: activeTab }
|
|
63
|
+
return (
|
|
64
|
+
<BlueprintTabs
|
|
65
|
+
id={prefixTabNames}
|
|
66
|
+
onChange={onTabClick}
|
|
67
|
+
className={
|
|
68
|
+
className +
|
|
69
|
+
(allowScrollbars ? ` ${eccgui}-tabs--scrollablelist` : "")
|
|
70
|
+
}
|
|
71
|
+
{...usagetype}
|
|
72
|
+
{...restProps}
|
|
73
|
+
>
|
|
74
|
+
{
|
|
75
|
+
tabs.map(tab => {
|
|
76
|
+
return createDeprecatedTab({
|
|
77
|
+
className: `${prefixTabNames}-header-${tab.tabId}`,
|
|
78
|
+
...tab
|
|
79
|
+
});
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
</BlueprintTabs>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ButtonReplacement as Button } from "./Button/Button";
|
|
2
|
+
export { AffirmativeButtonReplacement as AffirmativeButton } from "./Button/AffirmativeButton";
|
|
3
|
+
export { DismissiveButtonReplacement as DismissiveButton } from "./Button/DismissiveButton";
|
|
4
|
+
export { DisruptiveButtonReplacement as DisruptiveButton } from "./Button/DisruptiveButton";
|
|
5
|
+
export { ButtonReplacement as ProgressButton } from "./Button/Button";
|
|
6
|
+
export { CheckboxReplacement as Checkbox } from "./Checkbox/Checkbox";
|
|
7
|
+
export { RadioButtonReplacement as Radio } from "./Radio/RadioButton";
|
|
8
|
+
export { TabsReplacement as Tabs } from "./Tabs/Tabs";
|
|
9
|
+
export { TextFieldReplacement as TextField } from "./TextField/TextField";
|
|
10
|
+
|
|
11
|
+
export type { DeprecatedTabProps } from "./Tabs/Tabs";
|
package/src/test/setupTests.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
import "regenerator-runtime/runtime";
|
|
2
2
|
|
|
3
|
+
if (window.document) {
|
|
4
|
+
window.document.body.createTextRange = function() {
|
|
5
|
+
return {
|
|
6
|
+
setEnd: function(){},
|
|
7
|
+
setStart: function(){},
|
|
8
|
+
getBoundingClientRect: function(){
|
|
9
|
+
return {right: 0};
|
|
10
|
+
},
|
|
11
|
+
getClientRects: function(){
|
|
12
|
+
return {
|
|
13
|
+
length: 0,
|
|
14
|
+
left: 0,
|
|
15
|
+
right: 0
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|