@eccenca/gui-elements 23.0.0-rc.2 → 23.0.0-rc.3-unofficial.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 +26 -1
- package/dist/cjs/cmem/index.js +3 -1
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +64 -0
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/linking.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/cjs/cmem/react-flow/configuration/typing.js +35 -0
- package/dist/cjs/cmem/react-flow/configuration/typing.js.map +1 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js +2 -0
- package/dist/cjs/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/cjs/cmem/react-flow/nodes/StickyNoteNode.js +42 -0
- package/dist/cjs/cmem/react-flow/nodes/StickyNoteNode.js.map +1 -0
- package/dist/cjs/common/utils/CssCustomProperties.js +114 -0
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -0
- package/dist/cjs/common/utils/getColorConfiguration.js +21 -0
- package/dist/cjs/common/utils/getColorConfiguration.js.map +1 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js +124 -114
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Tag/Tag.js +2 -1
- package/dist/cjs/components/Tag/Tag.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +3 -3
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +6 -1
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +3 -2
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/utils.js +12 -6
- package/dist/cjs/extensions/react-flow/minimap/utils.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +74 -25
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js +10 -6
- package/dist/cjs/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js +49 -0
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -0
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js +1 -1
- package/dist/cjs/legacy-replacements/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/legacy-replacements/TextField/TextField.js +5 -8
- package/dist/cjs/legacy-replacements/TextField/TextField.js.map +1 -1
- package/dist/esm/cmem/index.js +1 -0
- package/dist/esm/cmem/index.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +89 -0
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/graph.js +1 -1
- package/dist/esm/cmem/react-flow/configuration/graph.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js +3 -1
- package/dist/esm/cmem/react-flow/configuration/linking.js.map +1 -1
- package/dist/esm/cmem/react-flow/configuration/typing.js +32 -0
- package/dist/esm/cmem/react-flow/configuration/typing.js.map +1 -0
- package/dist/esm/cmem/react-flow/configuration/workflow.js +3 -1
- package/dist/esm/cmem/react-flow/configuration/workflow.js.map +1 -1
- package/dist/esm/cmem/react-flow/nodes/StickyNoteNode.js +31 -0
- package/dist/esm/cmem/react-flow/nodes/StickyNoteNode.js.map +1 -0
- package/dist/esm/common/utils/CssCustomProperties.js +154 -0
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -0
- package/dist/esm/common/utils/getColorConfiguration.js +16 -0
- package/dist/esm/common/utils/getColorConfiguration.js.map +1 -0
- package/dist/esm/components/Icon/canonicalIconNames.js +124 -114
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Tag/Tag.js +2 -1
- package/dist/esm/components/Tag/Tag.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +3 -3
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/react-flow/index.js +1 -0
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +3 -2
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/utils.js +10 -5
- package/dist/esm/extensions/react-flow/minimap/utils.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +76 -27
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContentExtension.js +26 -6
- package/dist/esm/extensions/react-flow/nodes/NodeContentExtension.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js +44 -0
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/legacy-replacements/Tabs/Tabs.js +1 -1
- package/dist/esm/legacy-replacements/Tabs/Tabs.js.map +1 -1
- package/dist/esm/legacy-replacements/TextField/TextField.js +2 -5
- package/dist/esm/legacy-replacements/TextField/TextField.js.map +1 -1
- package/dist/types/cmem/index.d.ts +1 -0
- package/dist/types/cmem/react-flow/StickyNoteModal/StickyNoteModal.d.ts +26 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +3 -8
- package/dist/types/cmem/react-flow/configuration/linking.d.ts +3 -9
- package/dist/types/cmem/react-flow/configuration/typing.d.ts +28 -0
- package/dist/types/cmem/react-flow/configuration/workflow.d.ts +3 -9
- package/dist/types/cmem/react-flow/nodes/StickyNoteNode.d.ts +3 -0
- package/dist/types/common/utils/CssCustomProperties.d.ts +28 -0
- package/dist/types/common/utils/getColorConfiguration.d.ts +8 -0
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Tag/Tag.d.ts +5 -1
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +5 -1
- package/dist/types/extensions/react-flow/index.d.ts +1 -0
- package/dist/types/extensions/react-flow/minimap/MiniMap.d.ts +1 -1
- package/dist/types/extensions/react-flow/minimap/utils.d.ts +1 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +17 -1
- package/dist/types/extensions/react-flow/nodes/NodeContentExtension.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/nodeUtils.d.ts +14 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/legacy-replacements/Tabs/Tabs.d.ts +1 -1
- package/package.json +14 -13
- package/scripts/compile-sass.ts +9 -0
- package/scripts/fix-cjs-dist +5 -0
- package/scripts/fix-esm-dist +6 -0
- package/scripts/sassConfig.js +13 -0
- package/src/_shame.scss +17 -0
- package/src/cmem/index.ts +1 -0
- package/src/cmem/markdown/markdown.scss +1 -1
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +134 -0
- package/src/cmem/react-flow/_index.scss +1 -1
- package/src/cmem/react-flow/_minimap.scss +6 -2
- package/src/cmem/react-flow/configuration/graph.ts +3 -5
- package/src/cmem/react-flow/configuration/linking.ts +5 -6
- package/src/cmem/react-flow/configuration/typing.ts +30 -0
- package/src/cmem/react-flow/configuration/workflow.ts +5 -5
- package/src/cmem/react-flow/nodes/StickyNoteNode.tsx +13 -0
- package/src/cmem/react-flow/{_nodes.scss → nodes/_colors.scss} +0 -0
- package/src/cmem/react-flow/nodes/_index.scss +2 -0
- package/src/cmem/react-flow/nodes/_stickynote.scss +72 -0
- package/src/common/utils/CssCustomProperties.ts +2 -2
- package/src/common/utils/getColorConfiguration.ts +1 -2
- package/src/components/Accordion/accordion.scss +11 -11
- package/src/components/Application/_header.scss +4 -3
- package/src/components/Button/button.scss +43 -6
- package/src/components/Card/card.scss +5 -5
- package/src/components/ContextOverlay/ContextMenu.stories.tsx +4 -1
- package/src/components/ContextOverlay/contextoverlay.scss +14 -2
- package/src/components/Dialog/dialog.scss +10 -8
- package/src/components/Form/form.scss +6 -6
- package/src/components/Icon/canonicalIconNames.tsx +134 -121
- package/src/components/Icon/icon.scss +1 -1
- package/src/components/Label/label.scss +2 -2
- package/src/components/Menu/menu.scss +6 -6
- package/src/components/Notification/notification.scss +3 -1
- package/src/components/OverviewItem/overviewitem.scss +8 -8
- package/src/components/PropertyValuePair/propertyvalue.scss +9 -7
- package/src/components/Separation/separation.scss +6 -6
- package/src/components/SimpleTable/simpletable.scss +5 -5
- package/src/components/Tabs/tabs.scss +2 -2
- package/src/components/Tag/Tag.tsx +6 -0
- package/src/components/Tag/tag.scss +36 -11
- package/src/components/TextField/textfield.scss +6 -4
- package/src/components/Tooltip/tooltip.scss +3 -3
- package/src/components/Typography/typography.scss +4 -4
- package/src/configuration/_variables.scss +11 -9
- package/src/extensions/codemirror/CodeMirror.tsx +9 -4
- package/src/extensions/react-flow/edges/_edges.scss +3 -3
- package/src/extensions/react-flow/handles/_handles.scss +13 -13
- package/src/extensions/react-flow/index.ts +1 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +16 -1
- package/src/extensions/react-flow/minimap/_minimap.scss +6 -6
- package/src/extensions/react-flow/minimap/utils.ts +8 -3
- package/src/extensions/react-flow/nodes/NodeContent.tsx +253 -166
- package/src/extensions/react-flow/nodes/NodeContentExtension.tsx +17 -11
- package/src/extensions/react-flow/nodes/_nodes.scss +44 -12
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +53 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +24 -13
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +39 -47
- package/src/includes/blueprintjs/_variables.scss +3 -1
- package/src/includes/carbon-components/_variables.scss +7 -5
- package/src/index.ts +1 -1
- package/src/legacy-replacements/Tabs/Tabs.tsx +3 -1
- package/src/legacy-replacements/TextField/TextField.tsx +7 -5
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Tag, TagList, SimpleDialog, Icon, Button, FieldItem } from "./../../../index";
|
|
3
|
+
import getColorConfiguration from "../../../common/utils/getColorConfiguration";
|
|
4
|
+
import { CodeEditor } from "../../../extensions";
|
|
5
|
+
|
|
6
|
+
export type StickyNoteModalTranslationKeys = "modalTitle" | "noteLabel" | "colorLabel" | "saveButton" | "cancelButton";
|
|
7
|
+
|
|
8
|
+
export type StickyNoteMetadataType = { note: string; color: string };
|
|
9
|
+
|
|
10
|
+
export interface StickyNoteModalProps {
|
|
11
|
+
/**
|
|
12
|
+
* sticky data containing the sticky note and the selected color
|
|
13
|
+
*/
|
|
14
|
+
metaData?: StickyNoteMetadataType;
|
|
15
|
+
/**
|
|
16
|
+
* utility to close the sticky note modal when cancelled as well as closed also
|
|
17
|
+
*/
|
|
18
|
+
onClose: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* utility to save recently entered metadata for sticky
|
|
21
|
+
* note and add on to the canvas
|
|
22
|
+
*/
|
|
23
|
+
onSubmit: (data: StickyNoteMetadataType) => void;
|
|
24
|
+
/**
|
|
25
|
+
* translation utility for language compatibility
|
|
26
|
+
*/
|
|
27
|
+
translate: (key: StickyNoteModalTranslationKeys) => string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const StickyNoteModal: React.FC<StickyNoteModalProps> = ({ metaData, onClose, onSubmit, translate }) => {
|
|
31
|
+
const refNote = React.useRef<string>(metaData?.note ?? "");
|
|
32
|
+
const [color, setSelectedColor] = React.useState<string>(metaData?.color ?? "");
|
|
33
|
+
const noteColors: [string, string][] = Object.entries(getColorConfiguration("stickynotes")).map(([key, value]) => [
|
|
34
|
+
key,
|
|
35
|
+
value as string,
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
React.useEffect(() => {
|
|
39
|
+
if (!color && noteColors[0][1]) {
|
|
40
|
+
setSelectedColor(noteColors[0][1]);
|
|
41
|
+
}
|
|
42
|
+
}, [color, noteColors]);
|
|
43
|
+
|
|
44
|
+
const wrapperDivProps: { [key: string]: (event: any) => any } = {
|
|
45
|
+
// Prevent react-flow from getting these events
|
|
46
|
+
onContextMenu: (event) => event.stopPropagation(),
|
|
47
|
+
onDrag: (event) => event.stopPropagation(),
|
|
48
|
+
onDragStart: (event) => event.stopPropagation(),
|
|
49
|
+
onDragEnd: (event) => event.stopPropagation(),
|
|
50
|
+
onMouseDown: (event) => event.stopPropagation(),
|
|
51
|
+
onMouseUp: (event) => event.stopPropagation(),
|
|
52
|
+
onClick: (event) => event.stopPropagation(),
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const predefinedColorsMenu = (
|
|
56
|
+
<TagList>
|
|
57
|
+
{noteColors &&
|
|
58
|
+
noteColors.map(([colorName, colorValue]) => {
|
|
59
|
+
const selectedFeedback =
|
|
60
|
+
color === colorValue
|
|
61
|
+
? {
|
|
62
|
+
icon: <Icon name="state-checkedsimple" />,
|
|
63
|
+
large: true,
|
|
64
|
+
}
|
|
65
|
+
: {};
|
|
66
|
+
return (
|
|
67
|
+
<Tag
|
|
68
|
+
round
|
|
69
|
+
onClick={() => setSelectedColor(colorValue)}
|
|
70
|
+
backgroundColor={colorValue}
|
|
71
|
+
{...selectedFeedback}
|
|
72
|
+
key={colorName}
|
|
73
|
+
/>
|
|
74
|
+
);
|
|
75
|
+
})}
|
|
76
|
+
</TagList>
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<SimpleDialog
|
|
81
|
+
data-test-id={"sticky-note-modal"}
|
|
82
|
+
size="small"
|
|
83
|
+
title={translate("modalTitle")}
|
|
84
|
+
hasBorder
|
|
85
|
+
isOpen
|
|
86
|
+
onClose={onClose}
|
|
87
|
+
wrapperDivProps={wrapperDivProps}
|
|
88
|
+
actions={[
|
|
89
|
+
<Button
|
|
90
|
+
key="submit"
|
|
91
|
+
data-test-id="sticky-submit-btn"
|
|
92
|
+
affirmative
|
|
93
|
+
onClick={() => {
|
|
94
|
+
onSubmit({ note: refNote.current, color: color || "#444444" });
|
|
95
|
+
onClose();
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{translate("saveButton")}
|
|
99
|
+
</Button>,
|
|
100
|
+
<Button key="cancel" onClick={onClose}>
|
|
101
|
+
{translate("cancelButton")}
|
|
102
|
+
</Button>,
|
|
103
|
+
]}
|
|
104
|
+
>
|
|
105
|
+
<FieldItem
|
|
106
|
+
key="note"
|
|
107
|
+
labelProps={{
|
|
108
|
+
htmlFor: "noteinput",
|
|
109
|
+
text: translate("noteLabel"),
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
<CodeEditor
|
|
113
|
+
name={translate("noteLabel")}
|
|
114
|
+
id={"sticky-note-input"}
|
|
115
|
+
mode="markdown"
|
|
116
|
+
preventLineNumbers
|
|
117
|
+
onChange={(value) => {
|
|
118
|
+
refNote.current = value;
|
|
119
|
+
}}
|
|
120
|
+
defaultValue={refNote.current}
|
|
121
|
+
/>
|
|
122
|
+
</FieldItem>
|
|
123
|
+
<FieldItem
|
|
124
|
+
key="color"
|
|
125
|
+
labelProps={{
|
|
126
|
+
htmlFor: "colorinput",
|
|
127
|
+
text: translate("colorLabel"),
|
|
128
|
+
}}
|
|
129
|
+
>
|
|
130
|
+
{predefinedColorsMenu}
|
|
131
|
+
</FieldItem>
|
|
132
|
+
</SimpleDialog>
|
|
133
|
+
);
|
|
134
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EdgeDefault } from "./../../../extensions/react-flow/edges/EdgeDefault";
|
|
2
2
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
import { GRAPH_NODE_TYPES } from "./typing";
|
|
3
4
|
|
|
4
5
|
const edgeTypes = {
|
|
5
6
|
default: EdgeDefault,
|
|
@@ -13,7 +14,7 @@ const edgeTypes = {
|
|
|
13
14
|
danger: EdgeDefault,
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
const nodeTypes = {
|
|
17
|
+
const nodeTypes: Record<GRAPH_NODE_TYPES, React.ReactNode> = {
|
|
17
18
|
default: NodeDefault,
|
|
18
19
|
graph: NodeDefault,
|
|
19
20
|
class: NodeDefault,
|
|
@@ -21,7 +22,4 @@ const nodeTypes = {
|
|
|
21
22
|
property: NodeDefault,
|
|
22
23
|
};
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
edgeTypes,
|
|
26
|
-
nodeTypes,
|
|
27
|
-
}
|
|
25
|
+
export { edgeTypes, nodeTypes };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
1
|
import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep";
|
|
3
2
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
import { StickyNoteNode } from "./../nodes/StickyNoteNode";
|
|
4
|
+
import { LINKING_NODE_TYPES } from "./typing";
|
|
4
5
|
|
|
5
6
|
const edgeTypes = {
|
|
6
7
|
default: EdgeStep,
|
|
@@ -11,16 +12,14 @@ const edgeTypes = {
|
|
|
11
12
|
danger: EdgeStep,
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const nodeTypes = {
|
|
15
|
+
const nodeTypes: Record<LINKING_NODE_TYPES, React.ReactNode> = {
|
|
15
16
|
default: NodeDefault,
|
|
16
17
|
sourcepath: NodeDefault,
|
|
17
18
|
targetpath: NodeDefault,
|
|
18
19
|
transformation: NodeDefault,
|
|
19
20
|
comparator: NodeDefault,
|
|
20
21
|
aggregator: NodeDefault,
|
|
22
|
+
stickynote: StickyNoteNode,
|
|
21
23
|
};
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
edgeTypes,
|
|
25
|
-
nodeTypes,
|
|
26
|
-
}
|
|
25
|
+
export { edgeTypes, nodeTypes };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** node types for linking editor nodes */
|
|
2
|
+
export enum LINKING_NODE_TYPES {
|
|
3
|
+
default = "default",
|
|
4
|
+
sourcepath = "sourcepath",
|
|
5
|
+
targetpath = "targetpath",
|
|
6
|
+
transformation = "transformation",
|
|
7
|
+
comparator = "comparator",
|
|
8
|
+
aggregator = "aggregator",
|
|
9
|
+
stickynote = "stickynote",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** node types for workflow editor nodes */
|
|
13
|
+
export enum WORKFLOW_NODE_TYPES {
|
|
14
|
+
default = "default",
|
|
15
|
+
dataset = "dataset",
|
|
16
|
+
linking = "linking",
|
|
17
|
+
transform = "transform",
|
|
18
|
+
task = "task",
|
|
19
|
+
workflow = "workflow",
|
|
20
|
+
stickynote = "stickynote",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** node types for graph editor */
|
|
24
|
+
export enum GRAPH_NODE_TYPES {
|
|
25
|
+
default = "default",
|
|
26
|
+
graph = "graph",
|
|
27
|
+
class = "class",
|
|
28
|
+
instance = "instance",
|
|
29
|
+
property = "property",
|
|
30
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { EdgeStep } from "./../../../extensions/react-flow/edges/EdgeStep";
|
|
2
2
|
import { NodeDefault } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
import { StickyNoteNode } from "./../nodes/StickyNoteNode";
|
|
4
|
+
import { WORKFLOW_NODE_TYPES } from "./typing";
|
|
3
5
|
|
|
4
6
|
const edgeTypes = {
|
|
5
7
|
default: EdgeStep,
|
|
@@ -8,16 +10,14 @@ const edgeTypes = {
|
|
|
8
10
|
danger: EdgeStep,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
|
-
const nodeTypes = {
|
|
13
|
+
const nodeTypes: Record<WORKFLOW_NODE_TYPES, React.ReactNode> = {
|
|
12
14
|
default: NodeDefault,
|
|
13
15
|
dataset: NodeDefault,
|
|
14
16
|
linking: NodeDefault,
|
|
15
17
|
transform: NodeDefault,
|
|
16
18
|
task: NodeDefault,
|
|
17
19
|
workflow: NodeDefault,
|
|
20
|
+
stickynote: StickyNoteNode,
|
|
18
21
|
};
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
edgeTypes,
|
|
22
|
-
nodeTypes,
|
|
23
|
-
}
|
|
23
|
+
export { edgeTypes, nodeTypes };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { memo } from "react";
|
|
2
|
+
import { NodeDefault, NodeProps } from "./../../../extensions/react-flow/nodes/NodeDefault";
|
|
3
|
+
|
|
4
|
+
export const StickyNoteNode = memo((node: NodeProps<any>) => {
|
|
5
|
+
const {
|
|
6
|
+
data,
|
|
7
|
+
...otherNodeProps
|
|
8
|
+
} = node;
|
|
9
|
+
|
|
10
|
+
data.minimalShape = data.minimalShape??"none";
|
|
11
|
+
|
|
12
|
+
return <NodeDefault data={data} {...otherNodeProps} />;
|
|
13
|
+
});
|
|
File without changes
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
.react-flow__node-stickynote {
|
|
2
|
+
.#{$eccgui}-graphviz__node {
|
|
3
|
+
&:not(.#{$eccgui}-graphviz__node--minimal-rectangular),
|
|
4
|
+
&:not(.#{$eccgui}-graphviz__node--minimal-circular) {
|
|
5
|
+
.#{$eccgui}-graphviz__node__header {
|
|
6
|
+
color: currentColor;
|
|
7
|
+
position: absolute;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 0px;
|
|
10
|
+
top: 0;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
min-height: unset;
|
|
13
|
+
}
|
|
14
|
+
.#{$eccgui}-graphviz__node__header-label {
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
}
|
|
17
|
+
.#{$eccgui}-graphviz__node__content {
|
|
18
|
+
color: currentColor;
|
|
19
|
+
background: transparent;
|
|
20
|
+
padding: $eccgui-size-block-whitespace / 2;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.#{$eccgui}-graphviz__node__header-menu {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
&.selected, &:hover {
|
|
28
|
+
.#{$eccgui}-graphviz__node__header-menu {
|
|
29
|
+
display: block;
|
|
30
|
+
opacity: $eccgui-opacity-muted;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
&.selected {
|
|
34
|
+
.#{$eccgui}-graphviz__node__header-menu {
|
|
35
|
+
opacity: $eccgui-opacity-regular;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.#{$eccgui}-typography__contentblock {
|
|
39
|
+
h1 {
|
|
40
|
+
font-size: $eccgui-size-typo-subtitle;
|
|
41
|
+
line-height: $eccgui-size-typo-subtitle-lineheight;
|
|
42
|
+
font-weight: $eccgui-font-weight-bold;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
h2 {
|
|
46
|
+
font-size: $eccgui-size-typo-subtitle;
|
|
47
|
+
line-height: $eccgui-size-typo-subtitle-lineheight;
|
|
48
|
+
font-weight: $eccgui-font-weight-regular;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
h3 {
|
|
52
|
+
font-size: $eccgui-size-typo-text;
|
|
53
|
+
line-height: $eccgui-size-typo-text-lineheight;
|
|
54
|
+
font-weight: $eccgui-font-weight-bold;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h4 {
|
|
58
|
+
font-size: $eccgui-size-typo-text;
|
|
59
|
+
line-height: $eccgui-size-typo-text-lineheight;
|
|
60
|
+
font-weight: $eccgui-font-weight-regular;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.#{eccgui}-configuration--colors__stickynotes {
|
|
66
|
+
--yellowish: #ffd54f;
|
|
67
|
+
--blueish: #3a7896;
|
|
68
|
+
--purplish: #ae3c74;
|
|
69
|
+
--success: #{$eccgui-color-success-text};
|
|
70
|
+
--warning: #{$eccgui-color-warning-text};
|
|
71
|
+
--danger: #{$eccgui-color-danger-text};
|
|
72
|
+
}
|
|
@@ -90,11 +90,11 @@ export default class CssCustomProperties {
|
|
|
90
90
|
const { propertyType = "all", ...otherFilters } = filter;
|
|
91
91
|
return CssCustomProperties.listLocalCssStyleRules(otherFilters)
|
|
92
92
|
.map((cssrule) => {
|
|
93
|
-
return [...cssrule.style]
|
|
93
|
+
return [...(cssrule as CSSStyleRule).style]
|
|
94
94
|
.map((propertyname) => {
|
|
95
95
|
return [
|
|
96
96
|
propertyname.trim(),
|
|
97
|
-
cssrule.style.getPropertyValue(propertyname).trim()
|
|
97
|
+
(cssrule as CSSStyleRule).style.getPropertyValue(propertyname).trim()
|
|
98
98
|
];
|
|
99
99
|
});
|
|
100
100
|
})
|
|
@@ -2,7 +2,7 @@ import CssCustomProperties from "./CssCustomProperties";
|
|
|
2
2
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
3
3
|
|
|
4
4
|
// Configurations can be found in `src/cmem/react-flow/configuration/_colors-*.scss`
|
|
5
|
-
type colorconfigs = "react-flow-graph" | "react-flow-linking" | "react-flow-workflow";
|
|
5
|
+
type colorconfigs = "react-flow-graph" | "react-flow-linking" | "react-flow-workflow" | "stickynotes";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Read and returns color values provided by CSS custom properties.
|
|
@@ -12,7 +12,6 @@ type colorconfigs = "react-flow-graph" | "react-flow-linking" | "react-flow-work
|
|
|
12
12
|
const getColorConfiguration = (configId: colorconfigs) => {
|
|
13
13
|
return new CssCustomProperties({
|
|
14
14
|
selectorText: `.${eccgui}-configuration--colors__${configId}`,
|
|
15
|
-
cssRuleType: "CSSStyleRule",
|
|
16
15
|
removeDashPrefix: true,
|
|
17
16
|
returnObject: true,
|
|
18
17
|
}).customProperties();
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
color: inherit;
|
|
10
10
|
|
|
11
11
|
.#{$prefix}--accordion__arrow {
|
|
12
|
-
margin: 0 $eccgui-size-block-whitespace
|
|
12
|
+
margin: 0 $eccgui-size-block-whitespace * 0.5 0 0;
|
|
13
13
|
|
|
14
14
|
.#{$prefix}--accordion--start & {
|
|
15
|
-
margin: 0 0 0 $eccgui-size-block-whitespace
|
|
15
|
+
margin: 0 0 0 $eccgui-size-block-whitespace * 0.5;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -25,27 +25,27 @@
|
|
|
25
25
|
margin: 0 0 0 $eccgui-size-block-whitespace;
|
|
26
26
|
|
|
27
27
|
.#{$prefix}--accordion--start & {
|
|
28
|
-
margin: 0 0 0 $eccgui-size-block-whitespace
|
|
28
|
+
margin: 0 0 0 $eccgui-size-block-whitespace * 0.5;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.#{$prefix}--accordion__content {
|
|
33
|
-
padding: $eccgui-size-block-whitespace
|
|
34
|
-
margin: 0 calc(1rem + #{$eccgui-size-block-whitespace
|
|
33
|
+
padding: $eccgui-size-block-whitespace * 0.5;
|
|
34
|
+
margin: 0 calc(1rem + #{$eccgui-size-block-whitespace * 0.5}) 0 $eccgui-size-block-whitespace * 0.5;
|
|
35
35
|
display: block;
|
|
36
36
|
opacity: 0;
|
|
37
37
|
position: fixed;
|
|
38
38
|
left: -5000em;
|
|
39
39
|
|
|
40
40
|
.#{$prefix}--accordion__item--active & {
|
|
41
|
-
padding: $eccgui-size-block-whitespace
|
|
41
|
+
padding: $eccgui-size-block-whitespace * 0.5 $eccgui-size-block-whitespace * 0.5 $eccgui-size-block-whitespace $eccgui-size-block-whitespace * 0.5;
|
|
42
42
|
opacity: 1;
|
|
43
43
|
position: static;
|
|
44
44
|
left: auto;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.#{$prefix}--accordion--start & {
|
|
48
|
-
margin: 0 $eccgui-size-block-whitespace
|
|
48
|
+
margin: 0 $eccgui-size-block-whitespace * 0.5 0 calc(1rem + #{$eccgui-size-block-whitespace * 0.5});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.#{$eccgui}-accordion__item--fullwidth & {
|
|
@@ -84,19 +84,19 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.#{$prefix}--accordion__title {
|
|
87
|
-
margin: 0 0 0 $eccgui-size-block-whitespace
|
|
87
|
+
margin: 0 0 0 $eccgui-size-block-whitespace * 0.25;
|
|
88
88
|
|
|
89
89
|
.#{$prefix}--accordion--start & {
|
|
90
|
-
margin: 0 0 0 $eccgui-size-block-whitespace
|
|
90
|
+
margin: 0 0 0 $eccgui-size-block-whitespace * 0.25;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.#{$prefix}--accordion__content {
|
|
96
|
-
padding: $eccgui-size-block-whitespace
|
|
96
|
+
padding: $eccgui-size-block-whitespace * 0.25 0;
|
|
97
97
|
|
|
98
98
|
.#{$prefix}--accordion__item--active & {
|
|
99
|
-
padding: $eccgui-size-block-whitespace
|
|
99
|
+
padding: $eccgui-size-block-whitespace * 0.25 0;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -68,12 +68,13 @@ $shell-header-link: $carbon--blue-60 !default;
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
span.#{$prefix}--header__name {
|
|
71
|
-
@extend a.#{$prefix}--header__name;
|
|
71
|
+
// @extend a.#{$prefix}--header__name;
|
|
72
|
+
@extend .#{$prefix}--header__name;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.#{$prefix}--header__name {
|
|
75
76
|
&.#{$eccgui}-application__title--withsidebar {
|
|
76
|
-
padding-right: $eccgui-size-block-whitespace
|
|
77
|
+
padding-right: $eccgui-size-block-whitespace * 0.5;
|
|
77
78
|
}
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -91,7 +92,7 @@ span.#{$prefix}--header__name {
|
|
|
91
92
|
|
|
92
93
|
.#{$eccgui}-application__title--depiction {
|
|
93
94
|
display: inline-block;
|
|
94
|
-
margin-right: $eccgui-size-block-whitespace
|
|
95
|
+
margin-right: $eccgui-size-block-whitespace * 0.5;
|
|
95
96
|
|
|
96
97
|
& > * {
|
|
97
98
|
display: none;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
1
4
|
$button-height: $pt-button-height;
|
|
2
5
|
$button-border-width: 1px; // !default;
|
|
3
|
-
$button-padding: ($pt-grid-size
|
|
6
|
+
$button-padding: ($pt-grid-size * 0.5) $pt-grid-size; // !default;
|
|
4
7
|
$button-border-radius: $pt-border-radius;
|
|
5
8
|
// $button-padding-small: 0 ($pt-grid-size * 0.7) !default;
|
|
6
|
-
// $button-padding-large: ($pt-grid-size
|
|
7
|
-
// $button-icon-spacing: ($pt-button-height - $pt-icon-size-standard)
|
|
8
|
-
// $button-icon-spacing-large: ($pt-button-height-large - $pt-icon-size-large)
|
|
9
|
+
// $button-padding-large: ($pt-grid-size * 0.5) ($pt-grid-size * 1.5) !default;
|
|
10
|
+
// $button-icon-spacing: ($pt-button-height - $pt-icon-size-standard) * 0.5 !default;
|
|
11
|
+
// $button-icon-spacing-large: ($pt-button-height-large - $pt-icon-size-large) * 0.5 !default;
|
|
9
12
|
// $button-box-shadow: inset 0 0 0 $button-border-width rgba($black, 0.2), inset 0 (-$button-border-width) 0 rgba($black, 0.1) !default;
|
|
10
13
|
// $button-box-shadow-active: inset 0 0 0 $button-border-width rgba($black, 0.2), inset 0 1px 2px rgba($black, 0.2) !default;
|
|
11
14
|
// $button-intent-box-shadow: inset 0 0 0 $button-border-width rgba($black, 0.4), inset 0 (-$button-border-width) 0 rgba($black, 0.2) !default;
|
|
@@ -44,10 +47,44 @@ $dark-button-gradient: $button-gradient; // !default; // linear-gradient(to bott
|
|
|
44
47
|
// $button-outlined-border-intent-opacity: 0.6 !default;
|
|
45
48
|
// $button-outlined-border-disabled-intent-opacity: 0.2 !default;
|
|
46
49
|
|
|
50
|
+
$button-intents: (
|
|
51
|
+
"primary": ($eccgui-color-accent, color.scale($eccgui-color-accent, $lightness: -20%), color.scale($eccgui-color-accent, $lightness: -40%)),
|
|
52
|
+
"success": ($eccgui-color-success-text, color.scale($eccgui-color-success-text, $lightness: -20%), color.scale($eccgui-color-success-text, $lightness: -40%)),
|
|
53
|
+
"warning": ($eccgui-color-warning-text, color.scale($eccgui-color-warning-text, $lightness: -20%), color.scale($eccgui-color-warning-text, $lightness: -40%)),
|
|
54
|
+
"danger": ($eccgui-color-danger-text, color.scale($eccgui-color-danger-text, $lightness: -20%), color.scale($eccgui-color-danger-text, $lightness: -40%))
|
|
55
|
+
);
|
|
56
|
+
|
|
47
57
|
@import "~@blueprintjs/core/src/components/button/button";
|
|
48
58
|
|
|
49
|
-
.#{$ns}-button
|
|
50
|
-
|
|
59
|
+
.#{$ns}-button {
|
|
60
|
+
.#{$ns}-large {
|
|
61
|
+
min-height: mini-units(6);
|
|
62
|
+
}
|
|
63
|
+
// special case override: blueprint do not use configured colors here
|
|
64
|
+
&.#{$ns}-intent-warning {
|
|
65
|
+
@include pt-button-intent(map.get($button-intents, "warning")...);
|
|
66
|
+
|
|
67
|
+
&:not(.#{$ns}-disabled).#{$ns}-icon > svg {
|
|
68
|
+
fill: rgba($white, 0.7);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:not(.#{$ns}-disabled):not(.#{$ns}-minimal):not(.#{$ns}-outlined) {
|
|
72
|
+
@include pt-button-intent(map.get($button-intents, "warning")...);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.#{$ns}-minimal,
|
|
76
|
+
&.#{$ns}-outlined {
|
|
77
|
+
background: none;
|
|
78
|
+
box-shadow: none;
|
|
79
|
+
color: $eccgui-color-warning-text;
|
|
80
|
+
border-color: $eccgui-color-warning-text;
|
|
81
|
+
|
|
82
|
+
&:disabled,
|
|
83
|
+
&.#{$ns}-disabled {
|
|
84
|
+
color: rgba($eccgui-color-warning-text, 0.39);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
51
88
|
}
|
|
52
89
|
|
|
53
90
|
.#{$ns}-button-text {
|
|
@@ -49,7 +49,7 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.#{$eccgui}-card__header {
|
|
52
|
-
padding: $eccgui-size-card-spacing
|
|
52
|
+
padding: $eccgui-size-card-spacing * 0.5 $eccgui-size-card-spacing * 0.5 $eccgui-size-card-spacing * 0.5 $eccgui-size-card-spacing;
|
|
53
53
|
box-sizing: content-box;
|
|
54
54
|
flex-grow: 0;
|
|
55
55
|
flex-shrink: 0;
|
|
@@ -83,7 +83,7 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.#{$eccgui}-card__content {
|
|
86
|
-
padding: $eccgui-size-card-spacing
|
|
86
|
+
padding: $eccgui-size-card-spacing * 0.5 $eccgui-size-card-spacing $eccgui-size-card-spacing $eccgui-size-card-spacing;
|
|
87
87
|
flex-grow: 1;
|
|
88
88
|
flex-shrink: 1;
|
|
89
89
|
overflow: auto;
|
|
@@ -95,7 +95,7 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
.#{$eccgui}-card__actions {
|
|
98
|
-
padding: $eccgui-size-card-spacing
|
|
98
|
+
padding: $eccgui-size-card-spacing * 0.25;
|
|
99
99
|
flex-grow: 0;
|
|
100
100
|
flex-shrink: 0;
|
|
101
101
|
display: flex;
|
|
@@ -103,7 +103,7 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
103
103
|
align-items: center;
|
|
104
104
|
|
|
105
105
|
& > * {
|
|
106
|
-
margin: $eccgui-size-card-spacing
|
|
106
|
+
margin: $eccgui-size-card-spacing * 0.25;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
&.#{$eccgui}-intent--success > .#{$eccgui}-button:first-child {
|
|
@@ -133,7 +133,7 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
133
133
|
align-items: center;
|
|
134
134
|
|
|
135
135
|
& > * {
|
|
136
|
-
margin: $eccgui-size-card-spacing
|
|
136
|
+
margin: $eccgui-size-card-spacing * 0.25;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.#{$eccgui}-card__actions--inversedirection > & {
|
|
@@ -25,6 +25,9 @@ export const Default = Template.bind({});
|
|
|
25
25
|
Default.args = {
|
|
26
26
|
children: [
|
|
27
27
|
<MenuItem key="m0" text={"First option"} />,
|
|
28
|
-
<MenuItem key="m1" text={"Item two"}
|
|
28
|
+
<MenuItem key="m1" text={"Item two"}>
|
|
29
|
+
<MenuItem key="m0" text={"First sub option"} />
|
|
30
|
+
<MenuItem key="m1" text={"Sub item two"} />
|
|
31
|
+
</MenuItem>
|
|
29
32
|
]
|
|
30
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
$
|
|
3
|
-
$dark-
|
|
2
|
+
$pt-popover2-background-color: $white !default;
|
|
3
|
+
$pt-dark-popover2-background-color: $dark-gray4 !default;
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
@import "~@blueprintjs/popover2/src/popover2";
|
|
@@ -13,3 +13,15 @@ $dark-popover-background-color: $dark-gray4 !default;
|
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
max-width: 100%;
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
.#{$ns}-submenu.#{$ns}-popover > .#{$ns}-popover-content {
|
|
18
|
+
// fix for submenu items in overlays/popovers
|
|
19
|
+
background-color: $pt-popover2-background-color;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$ns}-overlay-start-focus-trap,
|
|
23
|
+
.#{$ns}-overlay-end-focus-trap {
|
|
24
|
+
&:focus-visible {
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
@use "sass:math";
|
|
2
|
+
|
|
1
3
|
// our vars
|
|
2
|
-
$eccgui-size-modal-tiny-width: 4
|
|
3
|
-
$eccgui-size-modal-tiny-height:
|
|
4
|
-
$eccgui-size-modal-small-width:
|
|
5
|
-
$eccgui-size-modal-small-height:
|
|
6
|
-
$eccgui-size-modal-regular-width:
|
|
7
|
-
$eccgui-size-modal-regular-height:
|
|
8
|
-
$eccgui-size-modal-large-width:
|
|
9
|
-
$eccgui-size-modal-large-height:
|
|
4
|
+
$eccgui-size-modal-tiny-width: math.div(4, 16) * 100vw !default;
|
|
5
|
+
$eccgui-size-modal-tiny-height: math.div(1, 9) * 100vh !default;
|
|
6
|
+
$eccgui-size-modal-small-width: math.div(6, 16) * 100vw !default;
|
|
7
|
+
$eccgui-size-modal-small-height: math.div(2, 9) * 100vh !default;
|
|
8
|
+
$eccgui-size-modal-regular-width: math.div(6, 16) * 100vw !default;
|
|
9
|
+
$eccgui-size-modal-regular-height: math.div(3, 9) * 100vh !default;
|
|
10
|
+
$eccgui-size-modal-large-width: math.div(8, 16) * 100vw !default;
|
|
11
|
+
$eccgui-size-modal-large-height: math.div(6, 9) * 100vh !default;
|
|
10
12
|
$eccgui-color-modal-backdrop: rgba(invert($eccgui-color-workspace-background), 0.69) !default;
|
|
11
13
|
|
|
12
14
|
@import "~@blueprintjs/core/src/components/dialog/dialog";
|