@eccenca/gui-elements 23.1.0-rc.1 → 23.1.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -10
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +6 -4
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js +33 -8
- package/dist/cjs/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/cjs/cmem/ConfidenceValue/ConfidenceValue.js +52 -0
- package/dist/cjs/cmem/ConfidenceValue/ConfidenceValue.js.map +1 -0
- package/dist/cjs/cmem/ConfidenceValue/index.js +14 -0
- package/dist/cjs/cmem/ConfidenceValue/index.js.map +1 -0
- package/dist/cjs/cmem/index.js +11 -0
- package/dist/cjs/cmem/index.js.map +1 -1
- package/dist/cjs/cmem/markdown/Markdown.js +8 -4
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/common/Intent/index.js +1 -0
- package/dist/cjs/common/Intent/index.js.map +1 -1
- package/dist/cjs/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +10 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +8 -10
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/cjs/components/Card/Card.js +7 -6
- package/dist/cjs/components/Card/Card.js.map +1 -1
- package/dist/cjs/components/Card/CardContent.js +4 -2
- package/dist/cjs/components/Card/CardContent.js.map +1 -1
- package/dist/cjs/components/Card/CardHeader.js.map +1 -1
- package/dist/cjs/components/Depiction/Depiction.js +13 -13
- package/dist/cjs/components/Depiction/Depiction.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +6 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js +24 -9
- package/dist/cjs/components/Pagination/Pagination.js.map +1 -1
- package/dist/cjs/components/ProgressBar/index.js +14 -0
- package/dist/cjs/components/ProgressBar/index.js.map +1 -0
- package/dist/cjs/components/Separation/Divider.js +20 -2
- package/dist/cjs/components/Separation/Divider.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js +2 -2
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/Table/Table.js +46 -0
- package/dist/cjs/components/Table/Table.js.map +1 -0
- package/dist/cjs/components/Table/TableCell.js +29 -0
- package/dist/cjs/components/Table/TableCell.js.map +1 -0
- package/dist/cjs/components/Table/TableContainer.js +32 -0
- package/dist/cjs/components/Table/TableContainer.js.map +1 -0
- package/dist/cjs/components/Table/TableExpandHeader.js +36 -0
- package/dist/cjs/components/Table/TableExpandHeader.js.map +1 -0
- package/dist/cjs/components/Table/TableExpandRow.js +45 -0
- package/dist/cjs/components/Table/TableExpandRow.js.map +1 -0
- package/dist/cjs/components/{SimpleTable/TableContainer.js → Table/TableRow.js} +9 -11
- package/dist/cjs/components/Table/TableRow.js.map +1 -0
- package/dist/cjs/components/Table/index.js +26 -0
- package/dist/cjs/components/Table/index.js.map +1 -0
- package/dist/cjs/components/Tag/TagList.js.map +1 -1
- package/dist/cjs/components/Tag/index.js +11 -0
- package/dist/cjs/components/Tag/index.js.map +1 -0
- package/dist/cjs/components/TextField/TextField.js +25 -9
- package/dist/cjs/components/TextField/TextField.js.map +1 -1
- package/dist/cjs/components/index.js +4 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +20 -5
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +74 -0
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/cjs/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +14 -3
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/index.js +13 -3
- package/dist/cjs/extensions/react-flow/index.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +113 -33
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js +5 -2
- package/dist/cjs/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/versionsupport.js +20 -0
- package/dist/cjs/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/cjs/index.js +3 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +6 -4
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js +35 -10
- package/dist/esm/cmem/ActivityControl/SilkActivityControl.js.map +1 -1
- package/dist/esm/cmem/ConfidenceValue/ConfidenceValue.js +56 -0
- package/dist/esm/cmem/ConfidenceValue/ConfidenceValue.js.map +1 -0
- package/dist/esm/cmem/ConfidenceValue/index.js +2 -0
- package/dist/esm/cmem/ConfidenceValue/index.js.map +1 -0
- package/dist/esm/cmem/index.js +1 -0
- package/dist/esm/cmem/index.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +8 -4
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/common/Intent/index.js +1 -0
- package/dist/esm/common/Intent/index.js.map +1 -1
- package/dist/esm/common/utils/CssCustomProperties.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +10 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js +8 -10
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/esm/components/Card/Card.js +7 -6
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardContent.js +4 -2
- package/dist/esm/components/Card/CardContent.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Depiction/Depiction.js +15 -14
- package/dist/esm/components/Depiction/Depiction.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +6 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +25 -10
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/ProgressBar/index.js +2 -0
- package/dist/esm/components/ProgressBar/index.js.map +1 -0
- package/dist/esm/components/Separation/Divider.js +29 -3
- package/dist/esm/components/Separation/Divider.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +2 -2
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Table/Table.js +50 -0
- package/dist/esm/components/Table/Table.js.map +1 -0
- package/dist/esm/components/{SimpleTable/TableContainer.js → Table/TableCell.js} +8 -12
- package/dist/esm/components/Table/TableCell.js.map +1 -0
- package/dist/esm/components/Table/TableContainer.js +36 -0
- package/dist/esm/components/Table/TableContainer.js.map +1 -0
- package/dist/esm/components/Table/TableExpandHeader.js +40 -0
- package/dist/esm/components/Table/TableExpandHeader.js.map +1 -0
- package/dist/esm/components/Table/TableExpandRow.js +49 -0
- package/dist/esm/components/Table/TableExpandRow.js.map +1 -0
- package/dist/esm/components/Table/TableRow.js +33 -0
- package/dist/esm/components/Table/TableRow.js.map +1 -0
- package/dist/esm/components/Table/index.js +9 -0
- package/dist/esm/components/Table/index.js.map +1 -0
- package/dist/esm/components/Tag/TagList.js.map +1 -1
- package/dist/esm/components/Tag/index.js +4 -0
- package/dist/esm/components/Tag/index.js.map +1 -0
- package/dist/esm/components/TextField/TextField.js +26 -10
- package/dist/esm/components/TextField/TextField.js.map +1 -1
- package/dist/esm/components/index.js +4 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +20 -4
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +63 -0
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -0
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js +10 -9
- package/dist/esm/extensions/react-flow/edges/edgeTypes.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +15 -4
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/index.js +2 -1
- package/dist/esm/extensions/react-flow/index.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +121 -38
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js +5 -2
- package/dist/esm/extensions/react-flow/nodes/NodeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/versionsupport.js +32 -0
- package/dist/esm/extensions/react-flow/versionsupport.js.map +1 -0
- package/dist/esm/index.js +3 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +1 -1
- package/dist/types/cmem/ActivityControl/SilkActivityControl.d.ts +6 -2
- package/dist/types/cmem/ConfidenceValue/ConfidenceValue.d.ts +46 -0
- package/dist/types/cmem/ConfidenceValue/index.d.ts +1 -0
- package/dist/types/cmem/index.d.ts +1 -0
- package/dist/types/cmem/markdown/Markdown.d.ts +6 -1
- package/dist/types/common/Intent/index.d.ts +1 -1
- package/dist/types/common/utils/CssCustomProperties.d.ts +1 -1
- package/dist/types/components/Card/Card.d.ts +5 -1
- package/dist/types/components/Card/CardContent.d.ts +7 -1
- package/dist/types/components/Card/CardHeader.d.ts +9 -1
- package/dist/types/components/Grid/Grid.d.ts +1 -1
- package/dist/types/components/Grid/GridColumn.d.ts +1 -1
- package/dist/types/components/Grid/GridRow.d.ts +1 -1
- package/dist/types/components/Icon/IconButton.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.d.ts +5 -1
- package/dist/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/types/components/Separation/Divider.d.ts +18 -2
- package/dist/types/components/Separation/Spacing.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +5 -1
- package/dist/types/components/Table/Table.d.ts +32 -0
- package/dist/types/components/Table/TableCell.d.ts +11 -0
- package/dist/types/components/Table/TableContainer.d.ts +13 -0
- package/dist/types/components/Table/TableExpandHeader.d.ts +13 -0
- package/dist/types/components/Table/TableExpandRow.d.ts +17 -0
- package/dist/types/components/Table/TableRow.d.ts +10 -0
- package/dist/types/components/Table/index.d.ts +7 -0
- package/dist/types/components/Tag/Tag.d.ts +1 -1
- package/dist/types/components/Tag/TagList.d.ts +5 -2
- package/dist/types/components/Tag/index.d.ts +4 -0
- package/dist/types/components/TextField/TextField.d.ts +9 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +16 -1
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +44 -0
- package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +10 -9
- package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +11 -3
- package/dist/types/extensions/react-flow/index.d.ts +2 -2
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +55 -8
- package/dist/types/extensions/react-flow/nodes/NodeDefault.d.ts +2 -1
- package/dist/types/extensions/react-flow/versionsupport.d.ts +7 -0
- package/dist/types/index.d.ts +1 -6
- package/package.json +2 -1
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +5 -5
- package/src/cmem/ActivityControl/SilkActivityControl.tsx +44 -17
- package/src/cmem/ConfidenceValue/ConfidenceValue.stories.tsx +22 -0
- package/src/cmem/ConfidenceValue/ConfidenceValue.tsx +116 -0
- package/src/cmem/ConfidenceValue/confidencevalue.scss +49 -0
- package/src/cmem/ConfidenceValue/index.ts +1 -0
- package/src/cmem/_index.scss +1 -0
- package/src/cmem/index.ts +2 -0
- package/src/cmem/markdown/Markdown.stories.tsx +3 -1
- package/src/cmem/markdown/Markdown.tsx +22 -10
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +2 -2
- package/src/cmem/react-flow/_edges.scss +3 -2
- package/src/cmem/react-flow/configuration/_colors-workflow.scss +3 -0
- package/src/common/Intent/index.ts +2 -1
- package/src/common/utils/CssCustomProperties.ts +1 -1
- package/src/components/AutoSuggestion/AutoSuggestion.scss +1 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +10 -1
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +8 -10
- package/src/components/AutoSuggestion/tests/SingleLineCodeEditor.test.tsx +5 -0
- package/src/components/Badge/badge.scss +2 -5
- package/src/components/Card/Card.tsx +11 -5
- package/src/components/Card/CardContent.tsx +12 -1
- package/src/components/Card/CardHeader.tsx +9 -1
- package/src/components/Card/card.scss +108 -3
- package/src/components/Checkbox/checkbox.scss +6 -2
- package/src/components/Depiction/Depiction.tsx +11 -10
- package/src/components/Grid/Grid.tsx +1 -1
- package/src/components/Grid/GridColumn.tsx +1 -1
- package/src/components/Grid/GridRow.tsx +1 -1
- package/src/components/Grid/grid.scss +6 -2
- package/src/components/Icon/IconButton.tsx +1 -1
- package/src/components/Icon/canonicalIconNames.tsx +13 -0
- package/src/components/Menu/menu.scss +4 -0
- package/src/components/OverviewItem/overviewitem.scss +2 -2
- package/src/components/Pagination/Pagination.tsx +29 -9
- package/src/components/Pagination/pagination.scss +16 -0
- package/src/components/ProgressBar/index.ts +1 -0
- package/src/components/Separation/Divider.tsx +36 -2
- package/src/components/Separation/Spacing.tsx +1 -1
- package/src/components/Separation/Stories/Divider.stories.tsx +22 -0
- package/src/components/Separation/separation.scss +31 -5
- package/src/components/Switch/Switch.tsx +6 -2
- package/src/components/Table/Table.tsx +88 -0
- package/src/components/Table/TableCell.tsx +37 -0
- package/src/components/Table/TableContainer.tsx +49 -0
- package/src/components/Table/TableExpandHeader.tsx +51 -0
- package/src/components/Table/TableExpandRow.tsx +70 -0
- package/src/components/Table/TableRow.tsx +36 -0
- package/src/components/Table/index.tsx +14 -0
- package/src/components/Table/table.scss +323 -0
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tag/TagList.tsx +5 -3
- package/src/components/Tag/index.ts +5 -0
- package/src/components/Tag/{Tag.stories.tsx → stories/Tag.stories.tsx} +3 -2
- package/src/components/Tag/stories/TagList.stories.tsx +28 -0
- package/src/components/Tag/tag.scss +1 -0
- package/src/components/TextField/TextField.tsx +43 -12
- package/src/components/TextField/stories/TextField.stories.tsx +3 -0
- package/src/components/TextField/textfield.scss +23 -1
- package/src/components/Tree/tree.scss +4 -0
- package/src/components/Typography/typography.scss +2 -2
- package/src/components/index.scss +1 -0
- package/src/components/index.ts +5 -0
- package/src/extensions/react-flow/_config.scss +8 -4
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +60 -5
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +127 -0
- package/src/extensions/react-flow/edges/_edges.scss +214 -38
- package/src/extensions/react-flow/edges/edgeTypes.ts +13 -9
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +34 -13
- package/src/extensions/react-flow/edges/stories/EdgeLabel.stories.tsx +40 -0
- package/src/extensions/react-flow/handles/HandleDefault.tsx +41 -10
- package/src/extensions/react-flow/index.ts +3 -2
- package/src/extensions/react-flow/nodes/NodeContent.tsx +233 -60
- package/src/extensions/react-flow/nodes/NodeDefault.tsx +7 -2
- package/src/extensions/react-flow/nodes/_nodes.scss +232 -67
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +67 -1
- package/src/extensions/react-flow/versionsupport.ts +22 -0
- package/src/index.scss +0 -1
- package/src/index.ts +5 -38
- package/dist/cjs/components/SimpleTable/TableContainer.js.map +0 -1
- package/dist/cjs/components/SimpleTable/index.js +0 -16
- package/dist/cjs/components/SimpleTable/index.js.map +0 -1
- package/dist/esm/components/SimpleTable/TableContainer.js.map +0 -1
- package/dist/esm/components/SimpleTable/index.js +0 -4
- package/dist/esm/components/SimpleTable/index.js.map +0 -1
- package/dist/types/components/SimpleTable/TableContainer.d.ts +0 -3
- package/dist/types/components/SimpleTable/index.d.ts +0 -3
- package/src/components/SimpleTable/TableContainer.tsx +0 -20
- package/src/components/SimpleTable/index.tsx +0 -4
- package/src/components/SimpleTable/simpletable.scss +0 -180
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import Color from "color";
|
|
2
3
|
import { Position } from "react-flow-renderer";
|
|
3
4
|
import { ValidIconName } from "../../../components/Icon/canonicalIconNames";
|
|
4
|
-
import {
|
|
5
|
+
import { DepictionProps } from "../../../components/Depiction/Depiction";
|
|
6
|
+
import { IntentTypes } from "../../../common/Intent";
|
|
7
|
+
import { ReacFlowVersionSupportProps } from "../versionsupport";
|
|
8
|
+
import { HandleProps, HandleNextProps } from "./../handles/HandleDefault";
|
|
5
9
|
import { NodeProps } from "./NodeDefault";
|
|
6
10
|
import { NodeContentExtensionProps } from "./NodeContentExtension";
|
|
7
11
|
export declare type HighlightingState = "success" | "warning" | "danger" | "match" | "altmatch";
|
|
12
|
+
export declare type NodeHighlightColor = "default" | "alternate" | Color | string;
|
|
8
13
|
export interface IHandleProps extends HandleProps {
|
|
9
14
|
category?: "configuration";
|
|
10
15
|
}
|
|
16
|
+
interface NodeContentHandleNextProps extends HandleNextProps {
|
|
17
|
+
category?: "configuration";
|
|
18
|
+
}
|
|
11
19
|
export declare type NodeDimensions = {
|
|
12
20
|
width: number;
|
|
13
21
|
height: number;
|
|
@@ -19,13 +27,22 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
19
27
|
*/
|
|
20
28
|
iconName?: ValidIconName;
|
|
21
29
|
/**
|
|
22
|
-
*
|
|
30
|
+
* Depiction element that should be displayed before the node label.
|
|
31
|
+
* As alternative a valid and accessible URL or `data-uri` for an image can be set, then the Depiction element is created automatically.
|
|
23
32
|
*/
|
|
24
|
-
depiction?: string
|
|
33
|
+
depiction?: string | React.ReactElement<DepictionProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Any element that should be displayed as depiction before the node label.
|
|
36
|
+
*/
|
|
37
|
+
leftElement?: JSX.Element;
|
|
25
38
|
/**
|
|
26
39
|
* Label that is displayed in the node header.
|
|
27
40
|
*/
|
|
28
|
-
label: string;
|
|
41
|
+
label: string | JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* Element that is displayed as subline under the label in the header.
|
|
44
|
+
*/
|
|
45
|
+
labelSubline?: JSX.Element;
|
|
29
46
|
/**
|
|
30
47
|
* Content element, displayed in the node body.
|
|
31
48
|
*/
|
|
@@ -39,7 +56,7 @@ interface NodeContentData<CONTENT_PROPS = any> {
|
|
|
39
56
|
*/
|
|
40
57
|
footerContent?: React.ReactNode;
|
|
41
58
|
}
|
|
42
|
-
export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, React.HTMLAttributes<HTMLDivElement> {
|
|
59
|
+
export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends NodeContentData, ReacFlowVersionSupportProps, React.HTMLAttributes<HTMLDivElement> {
|
|
43
60
|
/**
|
|
44
61
|
* Size of the node.
|
|
45
62
|
* If `minimalShape` is not set to `none`then the configured size definition is only used for the selected node state.
|
|
@@ -51,9 +68,35 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
51
68
|
*/
|
|
52
69
|
minimalShape?: "none" | "circular" | "rectangular";
|
|
53
70
|
/**
|
|
71
|
+
* Stretches the node to the full available width.
|
|
72
|
+
*/
|
|
73
|
+
fullWidth?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Increase the hight of the node header.
|
|
76
|
+
* Use this for example if you need more space for a label subline.
|
|
77
|
+
* Also the depiction is displayed larger.
|
|
78
|
+
*/
|
|
79
|
+
enlargeHeader?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated
|
|
54
82
|
* Set the type of used highlights to mark the node.
|
|
83
|
+
* Replaced by `intent` and `highlightColor` properties.
|
|
55
84
|
*/
|
|
56
85
|
highlightedState?: HighlightingState | HighlightingState[];
|
|
86
|
+
/**
|
|
87
|
+
* Defines how the borders of a node are displayed.
|
|
88
|
+
* Use this property to overwrite default styles.
|
|
89
|
+
* You can use this to visuaize different states or type without depending only on color.
|
|
90
|
+
*/
|
|
91
|
+
border?: "solid" | "double" | "dashed" | "dotted";
|
|
92
|
+
/**
|
|
93
|
+
* Feedback state of the node.
|
|
94
|
+
*/
|
|
95
|
+
intent?: IntentTypes;
|
|
96
|
+
/**
|
|
97
|
+
* Set the type of used highlights to mark the node.
|
|
98
|
+
*/
|
|
99
|
+
highlightColor?: NodeHighlightColor | [NodeHighlightColor, NodeHighlightColor];
|
|
57
100
|
/**
|
|
58
101
|
* Text used for tooltip used on icon and depiction.
|
|
59
102
|
*/
|
|
@@ -76,7 +119,7 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
76
119
|
* Array of property definition objects for `Handle` components that need to be created for the node.
|
|
77
120
|
* @see https://reactflow.dev/docs/api/handle/
|
|
78
121
|
*/
|
|
79
|
-
handles?: IHandleProps[];
|
|
122
|
+
handles?: IHandleProps[] | NodeContentHandleNextProps[];
|
|
80
123
|
/**
|
|
81
124
|
* Set the minimal number of handles on left or right side of the node to activate the recalculation of the minimal height of the node.
|
|
82
125
|
*/
|
|
@@ -134,10 +177,14 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
134
177
|
*/
|
|
135
178
|
nodeDimensions?: NodeDimensions;
|
|
136
179
|
}
|
|
137
|
-
export declare const gethighlightedStateClasses: (state:
|
|
180
|
+
export declare const gethighlightedStateClasses: (state: HighlightingState | HighlightingState[], baseClassName: string) => string;
|
|
138
181
|
/**
|
|
139
182
|
* The `NodeContent` element manages the main view of how a node is displaying which content.
|
|
140
183
|
* This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
|
|
141
184
|
*/
|
|
142
|
-
export declare function NodeContent<CONTENT_PROPS = any>({ iconName, depiction, typeLabel, label, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, highlightedState,
|
|
185
|
+
export declare function NodeContent<CONTENT_PROPS = any>({ flowVersion, iconName, depiction, leftElement, typeLabel, label, labelSubline, enlargeHeader, fullWidth, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, highlightedState, intent, border, highlightColor, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, onNodeResize, nodeDimensions, targetPosition, sourcePosition, isConnectable, selected, letPassWheelEvents, businessData, ...otherDomProps }: NodeContentProps<any>): JSX.Element;
|
|
186
|
+
export declare const evaluateHighlightColors: (baseCustomProperty: string, highlightColor?: NodeHighlightColor | NodeHighlightColor[] | undefined) => {
|
|
187
|
+
highlightClassNameSuffix: string[];
|
|
188
|
+
highlightCustomPropertySettings: React.CSSProperties;
|
|
189
|
+
};
|
|
143
190
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NodeProps as ReactFlowNodeProps } from "react-flow-renderer";
|
|
3
3
|
import { NodeContentProps } from "./NodeContent";
|
|
4
|
-
|
|
4
|
+
import { ReacFlowVersionSupportProps } from "../versionsupport";
|
|
5
|
+
export interface NodeProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends ReacFlowVersionSupportProps, ReactFlowNodeProps {
|
|
5
6
|
/**
|
|
6
7
|
* Contains all properties for our implementation of the React-Flow node.
|
|
7
8
|
* For details pls see the `NodeContent` element documentation.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ReacFlowVersionSupportProps {
|
|
2
|
+
/**
|
|
3
|
+
* Spevifies the context of the react flow renderer version that is used for the component.
|
|
4
|
+
*/
|
|
5
|
+
flowVersion?: "legacy" | "next" | "none";
|
|
6
|
+
}
|
|
7
|
+
export declare const useReactFlowVersion: () => "none" | "legacy" | "next";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -44,8 +44,6 @@ import MenuDivider from "./components/Menu/MenuDivider";
|
|
|
44
44
|
import ContextOverlay from "./components/ContextOverlay/ContextOverlay";
|
|
45
45
|
import ContextMenu from "./components/ContextOverlay/ContextMenu";
|
|
46
46
|
import Pagination from "./components/Pagination/Pagination";
|
|
47
|
-
import Tag from "./components/Tag/Tag";
|
|
48
|
-
import TagList from "./components/Tag/TagList";
|
|
49
47
|
import Notification from "./components/Notification/Notification";
|
|
50
48
|
import Toast from "./components/Notification/Toast";
|
|
51
49
|
import Select from "./components/Select/Select";
|
|
@@ -53,7 +51,6 @@ import MultiSelect from "./components/MultiSelect/MultiSelect";
|
|
|
53
51
|
import { Iframe } from "./components/Iframe/Iframe";
|
|
54
52
|
import { IframeModal } from "./components/Iframe/IframeModal";
|
|
55
53
|
import { OverviewItem, OverviewItemActions, OverviewItemDepiction, OverviewItemDescription, OverviewItemLine, OverviewItemList } from "./components/OverviewItem";
|
|
56
|
-
import { TableContainer, Table, TableHead, TableRow, TableBody, TableCell, TableHeader } from "./components/SimpleTable";
|
|
57
54
|
import BreadcrumbList from "./components/Breadcrumb/BreadcrumbList";
|
|
58
55
|
import BreadcrumbItem from "./components/Breadcrumb/BreadcrumbItem";
|
|
59
56
|
import Modal from "./components/Dialog/Modal";
|
|
@@ -76,7 +73,6 @@ import Link from "./components/Link/Link";
|
|
|
76
73
|
import Spinner from "./components/Spinner/Spinner";
|
|
77
74
|
import InteractionGate from "./components/InteractionGate/InteractionGate";
|
|
78
75
|
import { PropertyName, PropertyValue, PropertyValuePair, PropertyValueList } from "./components/PropertyValuePair";
|
|
79
|
-
import { ProgressBar } from "./components/ProgressBar/ProgressBar";
|
|
80
76
|
import List from "./components/List/List";
|
|
81
77
|
import * as LegacyReplacements from "./legacy-replacements";
|
|
82
78
|
import * as TypographyClassNames from "./components/Typography/classnames";
|
|
@@ -90,8 +86,7 @@ declare const Utilities: {
|
|
|
90
86
|
openInNewTab: (event: import("react").MouseEvent<HTMLElement, MouseEvent>, handler?: ((e: import("react").MouseEvent<HTMLElement, MouseEvent>) => void) | undefined, url?: string | undefined) => void;
|
|
91
87
|
decideContrastColorValue: ({ testColor, lightColor, darkColor }: import("./common/utils/colorDecideContrastvalue").decideContrastColorValueProps) => string;
|
|
92
88
|
};
|
|
93
|
-
export { ApplicationContainer, ApplicationHeader, ApplicationContent, ApplicationSidebarNavigation, ApplicationSidebarToggler, ApplicationTitle, ApplicationToolbar, ApplicationToolbarSection, ApplicationToolbarAction, ApplicationToolbarPanel, AutoSuggestion, AutoSuggestionList, SingleLineCodeEditor, Grid, GridRow, GridColumn, List, WorkspaceContent, WorkspaceMain, WorkspaceSide, WorkspaceHeader, Menu, MenuItem, MenuDivider, ContextOverlay, ContextMenu, OverviewItem, OverviewItemDepiction, OverviewItemDescription, OverviewItemLine, OverviewItemActions, OverviewItemList,
|
|
89
|
+
export { ApplicationContainer, ApplicationHeader, ApplicationContent, ApplicationSidebarNavigation, ApplicationSidebarToggler, ApplicationTitle, ApplicationToolbar, ApplicationToolbarSection, ApplicationToolbarAction, ApplicationToolbarPanel, AutoSuggestion, AutoSuggestionList, SingleLineCodeEditor, Grid, GridRow, GridColumn, List, WorkspaceContent, WorkspaceMain, WorkspaceSide, WorkspaceHeader, Menu, MenuItem, MenuDivider, ContextOverlay, ContextMenu, OverviewItem, OverviewItemDepiction, OverviewItemDescription, OverviewItemLine, OverviewItemActions, OverviewItemList, IconButton, Label, Button, Checkbox, RadioButton, Tabs, Tab, TabTitle, TabPanel, TextField, TextArea, SearchField, Switch, NumericInput, FieldItem, FieldItemRow, FieldSet, BreadcrumbList, BreadcrumbItem, Modal, SimpleDialog, AlertDialog, Card, CardHeader, CardTitle, CardOptions, CardContent, CardActions, CardActionsAux, HoverToggler, Spacing, Divider, Tooltip, Section, SectionHeader, TitlePage, TitleMainsection, TitleSubsection, Accordion, AccordionItem, Toolbar, ToolbarSection, Pagination, Notification, Link, Spinner, InteractionGate, PropertyName, PropertyValue, PropertyValuePair, PropertyValueList, Toast, HelperClasses, Select, MultiSelect, AutoCompleteField, Iframe, IframeModal, Utilities, LegacyReplacements, };
|
|
94
90
|
export * from "./components";
|
|
95
|
-
export * from "./components/interfaces";
|
|
96
91
|
export * from "./extensions";
|
|
97
92
|
export * from "./cmem";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eccenca/gui-elements",
|
|
3
3
|
"description": "GUI elements based on other libraries, usable in React application, written in Typescript.",
|
|
4
|
-
"version": "23.1.0-rc.
|
|
4
|
+
"version": "23.1.0-rc.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/eccenca/gui-elements",
|
|
7
7
|
"bugs": "https://github.com/eccenca/gui-elements/issues",
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
"react-codemirror2": "^7.2.1",
|
|
81
81
|
"react-dom": "^16.13.1",
|
|
82
82
|
"react-flow-renderer": "9.7.4",
|
|
83
|
+
"react-flow-renderer-lts": "npm:react-flow-renderer@^10.3.17",
|
|
83
84
|
"react-inlinesvg": "^3.0.1",
|
|
84
85
|
"react-markdown": "^7.0.1",
|
|
85
86
|
"rehype-raw": "^6.1.0",
|
|
@@ -91,7 +91,7 @@ export interface IActivityAction extends TestableComponent {
|
|
|
91
91
|
// The tooltip that should be shown over the action icon
|
|
92
92
|
tooltip?: string;
|
|
93
93
|
// The icon of the action button
|
|
94
|
-
icon: ValidIconName
|
|
94
|
+
icon: ValidIconName | React.ReactElement<TestIconProps>
|
|
95
95
|
// Action is currently disabled (but shown)
|
|
96
96
|
disabled?: boolean;
|
|
97
97
|
// Warning state
|
|
@@ -167,10 +167,10 @@ export function ActivityControlWidget(props: IActivityControlProps) {
|
|
|
167
167
|
</OverviewItemDescription>
|
|
168
168
|
<OverviewItemActions>
|
|
169
169
|
{activityActions &&
|
|
170
|
-
activityActions.map((action) => {
|
|
170
|
+
activityActions.map((action, idx) => {
|
|
171
171
|
return (
|
|
172
172
|
<IconButton
|
|
173
|
-
key={action.icon}
|
|
173
|
+
key={typeof action.icon === "string" ? action.icon : action["data-test-id"] ?? idx}
|
|
174
174
|
data-test-id={action["data-test-id"]}
|
|
175
175
|
name={action.icon}
|
|
176
176
|
text={action.tooltip}
|
|
@@ -189,11 +189,11 @@ export function ActivityControlWidget(props: IActivityControlProps) {
|
|
|
189
189
|
data-test-id={activityContextMenu["data-test-id"]}
|
|
190
190
|
togglerText={activityContextMenu.tooltip}
|
|
191
191
|
>
|
|
192
|
-
{activityContextMenu.menuItems.map((menuAction) => {
|
|
192
|
+
{activityContextMenu.menuItems.map((menuAction, idx) => {
|
|
193
193
|
return (
|
|
194
194
|
<MenuItem
|
|
195
195
|
icon={menuAction.icon}
|
|
196
|
-
key={menuAction.icon}
|
|
196
|
+
key={typeof menuAction.icon === "string" ? menuAction.icon : menuAction["data-test-id"] ?? idx}
|
|
197
197
|
onClick={menuAction.action}
|
|
198
198
|
text={menuAction.tooltip}
|
|
199
199
|
/>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import React, {
|
|
1
|
+
import {TestableComponent} from "../../components/interfaces";
|
|
2
|
+
import {ActivityControlWidget, IActivityAction} from "./ActivityControlWidget";
|
|
3
|
+
import React, {useEffect, useRef, useState} from "react";
|
|
4
4
|
import {ConcreteActivityStatus, IActivityStatus} from "./ActivityControlTypes";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import {Intent} from "@blueprintjs/core/src/common/intent";
|
|
6
|
+
import {ActivityExecutionErrorReportModal} from "./ActivityExecutionErrorReportModal";
|
|
7
|
+
import {Icon, Spacing} from "../../";
|
|
8
|
+
import {ElapsedDateTimeDisplay, TimeUnits} from "../DateTimeDisplay/ElapsedDateTimeDisplay";
|
|
9
|
+
import {IntentTypes} from "../../common/Intent";
|
|
10
10
|
|
|
11
11
|
const progressBreakpointIndetermination = 10;
|
|
12
12
|
const progressBreakpointAnimation = 99;
|
|
@@ -41,6 +41,10 @@ interface SilkActivityControlProps extends TestableComponent {
|
|
|
41
41
|
};
|
|
42
42
|
// DI activity actions
|
|
43
43
|
executeActivityAction: (action: ActivityAction) => void;
|
|
44
|
+
/** If specified, the activity control will offer a "Start prioritized" button while the activity is in the waiting state.
|
|
45
|
+
* When the button is clicked it should start the activity via the startPrioritized endpoint.
|
|
46
|
+
*/
|
|
47
|
+
executePrioritized?: () => void;
|
|
44
48
|
// Get the translation for a specific key
|
|
45
49
|
translate: (key: ActivityControlTranslationKeys) => string;
|
|
46
50
|
// When defined the elapsed time since the last start is displayed next to the label
|
|
@@ -127,7 +131,7 @@ interface IStacktrace {
|
|
|
127
131
|
cause?: IStacktrace;
|
|
128
132
|
}
|
|
129
133
|
|
|
130
|
-
export type ActivityControlTranslationKeys = "startActivity" | "stopActivity" | "reloadActivity" | "showErrorReport";
|
|
134
|
+
export type ActivityControlTranslationKeys = "startActivity" | "stopActivity" | "reloadActivity" | "showErrorReport" | "startPrioritized";
|
|
131
135
|
|
|
132
136
|
export type ActivityAction = "start" | "cancel" | "restart";
|
|
133
137
|
|
|
@@ -153,14 +157,28 @@ export function useSilkActivityControl({
|
|
|
153
157
|
tags,
|
|
154
158
|
layoutConfig = defaultLayout,
|
|
155
159
|
hideMessageOnStatus = () => false,
|
|
160
|
+
executePrioritized,
|
|
156
161
|
...props
|
|
157
162
|
}: SilkActivityControlProps) {
|
|
158
163
|
const [activityStatus, setActivityStatus] = useState<IActivityStatus | undefined>(initialStatus);
|
|
164
|
+
const currentStatus = useRef<IActivityStatus | undefined>(initialStatus)
|
|
165
|
+
const [showStartPrioritized, setShowStartPrioritized] = useState(false)
|
|
159
166
|
const [errorReport, setErrorReport] = useState<string | IActivityExecutionReport | undefined>(undefined);
|
|
160
167
|
|
|
161
168
|
// Register update function
|
|
162
169
|
useEffect(() => {
|
|
163
|
-
const updateActivityStatus = (status:
|
|
170
|
+
const updateActivityStatus = (status: IActivityStatus | undefined) => {
|
|
171
|
+
if(status?.concreteStatus !== "Waiting") {
|
|
172
|
+
setShowStartPrioritized(false)
|
|
173
|
+
} else if(executePrioritized) {
|
|
174
|
+
// Show start prioritized button only-if the activity is still in Waiting status after 2s
|
|
175
|
+
setTimeout(() => {
|
|
176
|
+
if(currentStatus.current?.concreteStatus === "Waiting") {
|
|
177
|
+
setShowStartPrioritized(true)
|
|
178
|
+
}
|
|
179
|
+
}, 2000)
|
|
180
|
+
}
|
|
181
|
+
currentStatus.current = status
|
|
164
182
|
setActivityStatus(status)
|
|
165
183
|
}
|
|
166
184
|
registerForUpdates(updateActivityStatus)
|
|
@@ -184,13 +202,22 @@ export function useSilkActivityControl({
|
|
|
184
202
|
}
|
|
185
203
|
|
|
186
204
|
if (showStartAction) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
205
|
+
if(showStartPrioritized && executePrioritized) {
|
|
206
|
+
actions.push({
|
|
207
|
+
"data-test-id": "activity-start-prioritized-activity",
|
|
208
|
+
icon: "item-skip-forward",
|
|
209
|
+
action: executePrioritized,
|
|
210
|
+
tooltip: translate("startPrioritized"),
|
|
211
|
+
})
|
|
212
|
+
} else {
|
|
213
|
+
actions.push({
|
|
214
|
+
"data-test-id": "activity-start-activity",
|
|
215
|
+
icon: "item-start",
|
|
216
|
+
action: () => executeActivityAction("start"),
|
|
217
|
+
tooltip: translate("startActivity"),
|
|
218
|
+
disabled: activityStatus?.isRunning === true,
|
|
219
|
+
});
|
|
220
|
+
}
|
|
194
221
|
}
|
|
195
222
|
|
|
196
223
|
if (showReloadAction) {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { ConfidenceValue } from "../../../index";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "cmem/ConfidenceValue",
|
|
7
|
+
component: ConfidenceValue,
|
|
8
|
+
argTypes: {
|
|
9
|
+
barColor: {
|
|
10
|
+
control: "color",
|
|
11
|
+
},
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
} as ComponentMeta<typeof ConfidenceValue>;
|
|
15
|
+
|
|
16
|
+
const TemplateIcons: ComponentStory<typeof ConfidenceValue> = (args) => (
|
|
17
|
+
<ConfidenceValue {...args} />
|
|
18
|
+
);
|
|
19
|
+
export const Default = TemplateIcons.bind({});
|
|
20
|
+
Default.args = {
|
|
21
|
+
value: "0.5"
|
|
22
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Color from "color";
|
|
3
|
+
import { Tag, TagProps } from "./../../components/Tag";
|
|
4
|
+
import { ProgressBar, ProgressBarProps } from "./../../components/ProgressBar";
|
|
5
|
+
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
6
|
+
|
|
7
|
+
export interface ConfidenceValueProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
8
|
+
/**
|
|
9
|
+
* Confidence value.
|
|
10
|
+
*/
|
|
11
|
+
value: number;
|
|
12
|
+
/**
|
|
13
|
+
* Minimal border for the confidence range.
|
|
14
|
+
*/
|
|
15
|
+
minValue?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Center (or average) value of the confidence range.
|
|
18
|
+
*/
|
|
19
|
+
centerValue?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Maximum border for the confidence range.
|
|
22
|
+
*/
|
|
23
|
+
maxValue?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Color of the confidence bar.
|
|
26
|
+
* By default it is colorized red for values below the `centerValue`, otherwise green.
|
|
27
|
+
*/
|
|
28
|
+
barColor?: Color | string;
|
|
29
|
+
/**
|
|
30
|
+
* The value is displayed by a bar.
|
|
31
|
+
* This confidence bar can be start from the left or right side, or from the center of the element.
|
|
32
|
+
*/
|
|
33
|
+
barStart?: "side" | "center";
|
|
34
|
+
/**
|
|
35
|
+
* What width is used to display the lement.
|
|
36
|
+
* It could use the `minimal` necessary space, the `maximal` available space, or a `static` width.
|
|
37
|
+
*/
|
|
38
|
+
spaceUsage?: "minimal" | "static" | "maximal";
|
|
39
|
+
/**
|
|
40
|
+
* Additional properties for the `<Tag/>` element that is used to display the confidence value.
|
|
41
|
+
*/
|
|
42
|
+
tagProps?: Omit<TagProps, "className">;
|
|
43
|
+
/**
|
|
44
|
+
* Additional properties for the `<PRogressBar/>` element that is used to display the confidence bar.
|
|
45
|
+
*/
|
|
46
|
+
progressBarProps?: Omit<ProgressBarProps, "className">;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const toPercent = (n: number) => {
|
|
50
|
+
let formatted = (n * 100).toFixed(2)
|
|
51
|
+
const maybeRemovedFraction = formatted.replace(/(\.0+$)|(0+$)/, "")
|
|
52
|
+
return `${maybeRemovedFraction}%`
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ConfidenceValue ({
|
|
56
|
+
className,
|
|
57
|
+
value,
|
|
58
|
+
minValue = -1,
|
|
59
|
+
maxValue = 1,
|
|
60
|
+
centerValue = 0,
|
|
61
|
+
barColor,
|
|
62
|
+
barStart = "side",
|
|
63
|
+
spaceUsage = "static",
|
|
64
|
+
tagProps,
|
|
65
|
+
progressBarProps,
|
|
66
|
+
...otherProps
|
|
67
|
+
}: ConfidenceValueProps) {
|
|
68
|
+
|
|
69
|
+
const barValue = (
|
|
70
|
+
value === centerValue ? 0 :
|
|
71
|
+
value < centerValue ? value / (minValue - centerValue) :
|
|
72
|
+
value / (maxValue - centerValue)
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
let color = Color("#000000");
|
|
76
|
+
if (!!barColor) {
|
|
77
|
+
try {
|
|
78
|
+
color = Color(barColor);
|
|
79
|
+
} catch(ex) {
|
|
80
|
+
console.warn("Received invalid color for confidence bar: " + barColor)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<span
|
|
86
|
+
className={
|
|
87
|
+
`${eccgui}-confidencevalue` +
|
|
88
|
+
` ${eccgui}-confidencevalue--${barStart}` +
|
|
89
|
+
` ${eccgui}-confidencevalue--${spaceUsage}space` +
|
|
90
|
+
(value < centerValue ? ` ${eccgui}-confidencevalue--negative` : ` ${eccgui}-confidencevalue--positive`) +
|
|
91
|
+
(className ? ` ${className}` : "")
|
|
92
|
+
}
|
|
93
|
+
{...otherProps}
|
|
94
|
+
>
|
|
95
|
+
<Tag
|
|
96
|
+
className={`${eccgui}-confidencevalue__value`}
|
|
97
|
+
{...tagProps}
|
|
98
|
+
>
|
|
99
|
+
{toPercent(value)}
|
|
100
|
+
</Tag>
|
|
101
|
+
<div
|
|
102
|
+
className={`${eccgui}-confidencevalue__bar-colorwrapper`}
|
|
103
|
+
style={!!barColor ? { color: color.rgb().toString() } : {}}
|
|
104
|
+
>
|
|
105
|
+
<ProgressBar
|
|
106
|
+
className={`${eccgui}-confidencevalue__bar`}
|
|
107
|
+
value={barValue}
|
|
108
|
+
intent={!!barColor ? undefined : value < centerValue ? "danger" : "success"}
|
|
109
|
+
stripes={false}
|
|
110
|
+
animate={false}
|
|
111
|
+
{...progressBarProps}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</span>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.#{$eccgui}-confidencevalue {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 5rem;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.#{$eccgui}-confidencevalue--minimalspace {
|
|
8
|
+
width: auto;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.#{$eccgui}-confidencevalue--maximalspace {
|
|
13
|
+
width: auto;
|
|
14
|
+
min-width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.#{$eccgui}-confidencevalue__value {
|
|
18
|
+
width: 100%;
|
|
19
|
+
text-align: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$eccgui}-confidencevalue__bar {
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 0;
|
|
25
|
+
bottom: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 3px;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
|
|
30
|
+
.#{$eccgui}-confidencevalue--center & {
|
|
31
|
+
left: 50%;
|
|
32
|
+
width: 50%;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.#{$eccgui}-confidencevalue--negative & {
|
|
36
|
+
transform: rotate(180deg);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.#{$eccgui}-confidencevalue--center.#{$eccgui}-confidencevalue--negative & {
|
|
40
|
+
left: 0;
|
|
41
|
+
right: 50%;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.#{$eccgui}-confidencevalue__bar-colorwrapper {
|
|
46
|
+
& .#{$ns}-progress-meter {
|
|
47
|
+
background-color: currentColor;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ConfidenceValue";
|
package/src/cmem/_index.scss
CHANGED
package/src/cmem/index.ts
CHANGED
|
@@ -36,7 +36,7 @@ This is a paragraph.
|
|
|
36
36
|
* another line
|
|
37
37
|
3. third item
|
|
38
38
|
|
|
39
|
-
This is a paragraph with a [text link](http://example.com/).
|
|
39
|
+
This is a paragraph with a [text link](http://example.com/) and a footnote reference [^1].
|
|
40
40
|
|
|
41
41
|
## Headline level 2
|
|
42
42
|
### Headline level 3
|
|
@@ -51,5 +51,7 @@ This is a paragraph with a [text link](http://example.com/).
|
|
|
51
51
|
> With 2 paragraphs.
|
|
52
52
|
|
|
53
53
|
A line with some <strong>HTML code</strong> inside.
|
|
54
|
+
|
|
55
|
+
[^1]: This is the text related to the the footnote referrer.
|
|
54
56
|
`
|
|
55
57
|
};
|
|
@@ -33,6 +33,11 @@ export interface MarkdownParserProps extends TestableComponent {
|
|
|
33
33
|
* @see https://github.com/remarkjs/react-markdown#architecture
|
|
34
34
|
*/
|
|
35
35
|
reHypePlugins?: PluggableList;
|
|
36
|
+
/**
|
|
37
|
+
* Name for browser target where links withing the Markdown content are opened.
|
|
38
|
+
* Set to `false` to disable this feature.
|
|
39
|
+
*/
|
|
40
|
+
linkTargetName?: false | string;
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
const configDefault = {
|
|
@@ -60,14 +65,15 @@ const configDefault = {
|
|
|
60
65
|
|
|
61
66
|
/** Renders a markdown string. */
|
|
62
67
|
export const Markdown = ({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
children,
|
|
69
|
+
allowHtml = false,
|
|
70
|
+
removeMarkup = false,
|
|
71
|
+
inheritBlock = false,
|
|
72
|
+
allowedElements,
|
|
73
|
+
reHypePlugins,
|
|
74
|
+
linkTargetName = "_mdref",
|
|
75
|
+
...otherProps
|
|
76
|
+
}: MarkdownParserProps) => {
|
|
71
77
|
|
|
72
78
|
const configHtml = allowHtml ? {
|
|
73
79
|
rehypePlugins: [...configDefault.rehypePlugins].concat([rehypeRaw]),
|
|
@@ -87,15 +93,21 @@ export const Markdown = ({
|
|
|
87
93
|
...configDefault,
|
|
88
94
|
...configHtml,
|
|
89
95
|
...configTextOnly,
|
|
96
|
+
linkTarget: linkTargetName ? (href: string, _children: any, _title: string) => {
|
|
97
|
+
const linkTarget = href.charAt(0) !== "#" ? linkTargetName : "";
|
|
98
|
+
return linkTarget as React.HTMLAttributeAnchorTarget;
|
|
99
|
+
} : undefined,
|
|
90
100
|
};
|
|
91
101
|
allowedElements && (reactMarkdownProperties.allowedElements = allowedElements)
|
|
92
102
|
reHypePlugins && reHypePlugins.forEach(plugin => reactMarkdownProperties.rehypePlugins = [...reactMarkdownProperties.rehypePlugins, plugin])
|
|
93
103
|
|
|
104
|
+
// @ts-ignore because against the lib spec it does not allow a function for linkTarget.
|
|
105
|
+
const markdownDisplay = <ReactMarkdown {...reactMarkdownProperties} />
|
|
94
106
|
return inheritBlock ? (
|
|
95
|
-
|
|
107
|
+
markdownDisplay
|
|
96
108
|
) : (
|
|
97
109
|
<HtmlContentBlock data-test-id={otherProps["data-test-id"]} >
|
|
98
|
-
|
|
110
|
+
{ markdownDisplay }
|
|
99
111
|
</HtmlContentBlock>
|
|
100
112
|
);
|
|
101
113
|
}
|
|
@@ -125,8 +125,8 @@ const nodeExamples = {
|
|
|
125
125
|
},
|
|
126
126
|
position: { x: 50, y: 300 },
|
|
127
127
|
},
|
|
128
|
-
{ id: 'workflow-e1', arrowHeadType: "arrowclosed",source: 'workflow-1', target: 'workflow-2' },
|
|
129
|
-
{ id: 'workflow-e2', arrowHeadType: "arrowclosed",source: 'workflow-2', target: 'workflow-3' },
|
|
128
|
+
{ id: 'workflow-e1', label: "default", arrowHeadType: "arrowclosed",source: 'workflow-1', target: 'workflow-2' },
|
|
129
|
+
{ id: 'workflow-e2', label: "default", arrowHeadType: "arrowclosed",source: 'workflow-2', target: 'workflow-3' },
|
|
130
130
|
{ id: 'workflow-e3', type: 'success', label: "success edge", arrowHeadType: "arrowclosed",source: 'workflow-3', target: 'workflow-4' },
|
|
131
131
|
{ id: 'workflow-e4', type: 'warning', label: "warning edge", arrowHeadType: "arrowclosed",source: 'workflow-4', target: 'workflow-5' },
|
|
132
132
|
{ id: 'workflow-e5', type: 'danger', label: "danger edge", arrowHeadType: "arrowclosed",source: 'workflow-5', target: 'workflow-1' },
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
@mixin edgecoloring($color) {
|
|
8
|
-
|
|
9
|
-
color: $color;
|
|
8
|
+
--#{$eccgui}-reactflow-node-color-default: #{$color};
|
|
9
|
+
--#{$eccgui}-reactflow-node-color-hover: #{$color};
|
|
10
|
+
--#{$eccgui}-reactflow-node-color-selected: #{$color};
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
// Graph edge types
|