@eccenca/gui-elements 23.0.0-rc.5 → 23.0.0-rc.7
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 +4 -1
- package/dist/cjs/cmem/markdown/Markdown.js +14 -2
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js +0 -4
- package/dist/cjs/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/cjs/components/Accordion/Accordion.js +7 -2
- package/dist/cjs/components/Accordion/Accordion.js.map +1 -1
- package/dist/cjs/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +59 -33
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js +10 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js +10 -4
- package/dist/cjs/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +13 -8
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +1 -0
- package/dist/cjs/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Form/FieldItem.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +12 -16
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Menu/Menu.js +2 -2
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/components/Menu/MenuDivider.js +2 -2
- package/dist/cjs/components/Menu/MenuDivider.js.map +1 -1
- package/dist/cjs/components/Menu/MenuItem.js +5 -3
- package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +17 -4
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js.map +1 -1
- package/dist/cjs/components/RadioButton/RadioButton.js +1 -0
- package/dist/cjs/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/cjs/components/Separation/Spacing.js +4 -1
- package/dist/cjs/components/Separation/Spacing.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +3 -3
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +13 -2
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js +0 -4
- package/dist/esm/cmem/react-flow/ReactFlow/ReactFlow.js.map +1 -1
- package/dist/esm/components/Accordion/Accordion.js +8 -3
- package/dist/esm/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/components/Accordion/AccordionItem.js +1 -1
- package/dist/esm/components/Accordion/AccordionItem.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +71 -45
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js +11 -2
- package/dist/esm/components/AutoSuggestion/AutoSuggestionList.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js +11 -5
- package/dist/esm/components/AutoSuggestion/SingleLineCodeEditor.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +19 -14
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +1 -0
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Form/FieldItem.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +12 -16
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +3 -3
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/MenuDivider.js +3 -3
- package/dist/esm/components/Menu/MenuDivider.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +5 -3
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +22 -9
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/RadioButton/RadioButton.js +2 -1
- package/dist/esm/components/RadioButton/RadioButton.js.map +1 -1
- package/dist/esm/components/Separation/Spacing.js +4 -1
- package/dist/esm/components/Separation/Spacing.js.map +1 -1
- package/dist/esm/components/Spinner/Spinner.js +3 -4
- package/dist/esm/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +1 -1
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/types/cmem/markdown/Markdown.d.ts +19 -3
- package/dist/types/cmem/react-flow/ReactFlow/ReactFlow.d.ts +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts +12 -1
- package/dist/types/components/Accordion/AccordionItem.d.ts +21 -6
- package/dist/types/components/AutoSuggestion/AutoSuggestionList.d.ts +4 -2
- package/dist/types/components/AutocompleteField/AutoCompleteField.d.ts +7 -0
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +4 -1
- package/dist/types/components/Form/FieldItem.d.ts +32 -2
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +4 -1
- package/dist/types/components/Menu/MenuDivider.d.ts +4 -1
- package/dist/types/components/Menu/MenuItem.d.ts +5 -2
- package/dist/types/components/Pagination/Pagination.d.ts +9 -5
- package/dist/types/components/RadioButton/RadioButton.d.ts +4 -1
- package/dist/types/components/Separation/Spacing.d.ts +17 -3
- package/dist/types/components/Spinner/Spinner.d.ts +38 -5
- package/dist/types/components/Switch/Switch.d.ts +6 -3
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +15 -0
- package/package.json +4 -6
- package/src/cmem/markdown/Markdown.stories.tsx +55 -0
- package/src/cmem/markdown/Markdown.tsx +21 -9
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +15 -86
- package/src/cmem/react-flow/ReactFlow/ReactFlow.tsx +1 -5
- package/src/cmem/react-flow/nodes/_stickynote.scss +1 -1
- package/src/components/Accordion/Accordion.tsx +33 -3
- package/src/components/Accordion/AccordionItem.tsx +23 -33
- package/src/components/Accordion/Stories/Accordion.stories.tsx +33 -0
- package/src/components/Accordion/Stories/AccordionItem.stories.tsx +27 -0
- package/src/components/Accordion/accordion.scss +20 -1
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +73 -39
- package/src/components/AutoSuggestion/AutoSuggestionList.tsx +15 -2
- package/src/components/AutoSuggestion/SingleLineCodeEditor.tsx +17 -9
- package/src/components/AutoSuggestion/tests/AutoSuggestionList.test.tsx +9 -7
- package/src/components/AutocompleteField/AutoCompleteField.tsx +24 -6
- package/src/components/AutocompleteField/autoCompleteFieldUtils.tsx +1 -1
- package/src/components/AutocompleteField/autocompletefield.scss +1 -1
- package/src/components/AutocompleteField/stories/AutoCompleteField.stories.tsx +1 -1
- package/src/components/Button/Button.stories.tsx +1 -107
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Card/stories/Card.stories.tsx +2 -21
- package/src/components/Checkbox/Checkbox.tsx +9 -2
- package/src/components/Checkbox/Stories/Checkbox.stories.tsx +30 -0
- package/src/components/Checkbox/checkbox.scss +4 -0
- package/src/components/ContextOverlay/ContextMenu.stories.tsx +2 -2
- package/src/components/Dialog/stories/Modal.stories.tsx +1 -61
- package/src/components/Dialog/stories/SimpleDialog.stories.tsx +1 -2
- package/src/components/Form/FieldItem.tsx +32 -2
- package/src/components/Form/Stories/FieldItem.stories.tsx +27 -0
- package/src/components/Form/Stories/FieldItemRow.stories.tsx +31 -0
- package/src/components/Icon/canonicalIconNames.tsx +113 -119
- package/src/components/Label/Label.stories.tsx +1 -1
- package/src/components/Menu/Menu.tsx +21 -3
- package/src/components/Menu/MenuDivider.tsx +20 -3
- package/src/components/Menu/MenuItem.tsx +13 -10
- package/src/components/Menu/Stories/Menu.stories.tsx +31 -0
- package/src/components/Menu/Stories/MenuItem.stories.tsx +25 -0
- package/src/components/MultiSelect/MultiSelect.stories.tsx +2 -21
- package/src/components/MultiSelect/MultiSelect.tsx +22 -5
- package/src/components/Notification/Notification.stories.tsx +1 -29
- package/src/components/Pagination/Pagination.tsx +13 -6
- package/src/components/Pagination/Stories/Pagination.stories.tsx +32 -0
- package/src/components/Pagination/pagination.scss +2 -2
- package/src/components/ProgressBar/Stories/ProgressBar.stories.tsx +25 -0
- package/src/components/RadioButton/RadioButton.tsx +9 -2
- package/src/components/RadioButton/Stories/RadioButton.stories.tsx +30 -0
- package/src/components/Select/Select.stories.tsx +1 -1
- package/src/components/Separation/Spacing.tsx +17 -4
- package/src/components/Separation/Stories/Spacing.stories.tsx +25 -0
- package/src/components/Spinner/Spinner.tsx +39 -7
- package/src/components/Spinner/Stories/spinner.stories.tsx +26 -0
- package/src/components/Switch/Stories/Switch.stories.tsx +27 -0
- package/src/components/Switch/Switch.tsx +9 -3
- package/src/components/Tabs/stories/Tab.stories.tsx +1 -32
- package/src/components/Tabs/stories/Tabs.stories.tsx +1 -39
- package/src/components/Tag/Tag.stories.tsx +1 -9
- package/src/components/TextField/stories/TextArea.stories.tsx +10 -25
- package/src/components/TextField/stories/TextField.stories.tsx +2 -73
- package/src/components/Typography/typography.scss +3 -3
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +19 -0
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +121 -0
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +1 -1
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js +0 -13
- package/dist/cjs/cmem/react-flow/configuration/customLabel.js.map +0 -1
- package/dist/cjs/cmem/react-flow/configuration/inverseEdge.js +0 -13
- package/dist/cjs/cmem/react-flow/configuration/inverseEdge.js.map +0 -1
- package/dist/esm/cmem/react-flow/configuration/customLabel.js +0 -10
- package/dist/esm/cmem/react-flow/configuration/customLabel.js.map +0 -1
- package/dist/esm/cmem/react-flow/configuration/inverseEdge.js +0 -10
- package/dist/esm/cmem/react-flow/configuration/inverseEdge.js.map +0 -1
- package/dist/types/cmem/react-flow/configuration/customLabel.d.ts +0 -8
- package/dist/types/cmem/react-flow/configuration/inverseEdge.d.ts +0 -8
- package/src/cmem/react-flow/configuration/customLabel.ts +0 -11
- package/src/cmem/react-flow/configuration/inverseEdge.ts +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/** Valid icon names. */
|
|
3
|
-
export declare type ValidIconName = "application-
|
|
3
|
+
export declare type ValidIconName = "application-activities" | "application-dataintegration" | "application-explore" | "application-homepage" | "application-legacygui" | "application-mapping" | "application-queries" | "application-useraccount" | "application-vocabularies" | "application-warning" | "artefact-commit" | "artefact-customtask" | "artefact-dataset" | "artefact-dataset-csv" | "artefact-dataset-eccencadataplatform" | "artefact-dataset-excel" | "artefact-dataset-file" | "artefact-dataset-jdbc" | "artefact-dataset-json" | "artefact-dataset-multicsv" | "artefact-dataset-neo4j" | "artefact-dataset-sparkview" | "artefact-dataset-sparqlendpoint" | "artefact-dataset-sqlendpoint" | "artefact-dataset-xml" | "artefact-deprecated" | "artefact-embedded" | "artefact-errorlog" | "artefact-file" | "artefact-linking" | "artefact-project" | "artefact-rawdata" | "artefact-remote" | "artefact-report" | "artefact-task" | "artefact-transform" | "artefact-uncategorized" | "artefact-workflow" | "data-sourcepath" | "data-targetpath" | "item-add-artefact" | "item-clone" | "item-comment" | "item-copy" | "item-download" | "item-draggable" | "item-edit" | "item-evaluation" | "item-execution" | "item-info" | "item-launch" | "item-moremenu" | "item-question" | "item-reload" | "item-remove" | "item-reset" | "item-save" | "item-settings" | "item-shuffle" | "item-start" | "item-stop" | "item-upload" | "item-vertmenu" | "item-viewdetails" | "list-sort" | "list-sortasc" | "list-sortdesc" | "module-accesscontrol" | "module-annotation" | "module-dashboard" | "module-gdprsearch" | "module-integrations" | "module-linkedrules" | "module-reports" | "module-search" | "module-thesauri" | "module-timetracker" | "module-visualization" | "navigation-back" | "navigation-close" | "navigation-first" | "navigation-forth" | "navigation-jump" | "navigation-last" | "navigation-next" | "navigation-previous" | "operation-aggregation" | "operation-autolayout" | "operation-clear" | "operation-commit" | "operation-comparison" | "operation-filter" | "operation-filteredit" | "operation-link" | "operation-logout" | "operation-redo" | "operation-search" | "operation-sharelink" | "operation-transform" | "operation-undo" | "operation-unlink" | "state-checked" | "state-checkedsimple" | "state-confirmed" | "state-danger" | "state-declined" | "state-info" | "state-partlychecked" | "state-protected" | "state-success" | "state-unchecked" | "state-warning" | "toggler-caret" | "toggler-maximize" | "toggler-minimize" | "toggler-moveleft" | "toggler-moveright" | "toggler-showless" | "toggler-showmore" | "toggler-star-empty" | "toggler-star-filled" | "toggler-tree" | "undefined" | "Undefined";
|
|
4
4
|
export interface IconSized {
|
|
5
5
|
small: (props: any) => JSX.Element | null;
|
|
6
6
|
normal: (props: any) => JSX.Element | null;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { MenuProps as BlueprintMenuProps } from "@blueprintjs/core";
|
|
3
|
+
export interface MenuProps extends BlueprintMenuProps {
|
|
4
|
+
}
|
|
5
|
+
declare function Menu({ children, className, ...restProps }: MenuProps): JSX.Element;
|
|
3
6
|
export default Menu;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { MenuDividerProps as BlueprintMenuDividerProps } from "@blueprintjs/core";
|
|
3
|
+
export interface MenuDividerProps extends BlueprintMenuDividerProps {
|
|
4
|
+
}
|
|
5
|
+
declare function MenuDivider({ children, className, ...restProps }: MenuDividerProps): JSX.Element;
|
|
3
6
|
export default MenuDivider;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MenuItemProps as BlueprintMenuItemProps } from "@blueprintjs/core";
|
|
3
3
|
import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
4
|
-
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target"> {
|
|
4
|
+
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon" | "children">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "children"> {
|
|
5
5
|
icon?: ValidIconName | string[];
|
|
6
|
+
children?: React.ReactNode;
|
|
6
7
|
}
|
|
7
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Single item, used as child inside `Menu`.
|
|
10
|
+
*/
|
|
8
11
|
declare function MenuItem({ children, className, icon, onClick, href, ...restProps }: MenuItemProps): JSX.Element;
|
|
9
12
|
export default MenuItem;
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PaginationProps as CarbonPaginationProps } from "carbon-components-react";
|
|
3
|
-
interface PaginationProps extends CarbonPaginationProps {
|
|
3
|
+
export interface PaginationProps extends CarbonPaginationProps {
|
|
4
4
|
/**
|
|
5
|
-
|
|
5
|
+
* Additional class names.
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Hide dropdown to select how many items will be shown per page.
|
|
6
10
|
*/
|
|
7
11
|
hidePageSizeConfiguration?: boolean;
|
|
8
12
|
/**
|
|
9
|
-
Hide info about the
|
|
13
|
+
* Hide info block about the section of the displayed items.
|
|
10
14
|
*/
|
|
11
15
|
hideInfoText?: boolean;
|
|
12
16
|
/**
|
|
13
|
-
Hide
|
|
17
|
+
* Hide dropdown to select page number directly.
|
|
14
18
|
*/
|
|
15
19
|
hidePageSelect?: boolean;
|
|
16
20
|
/**
|
|
17
|
-
Hide
|
|
21
|
+
* Hide prev/next arrows to navigate through the pages.
|
|
18
22
|
*/
|
|
19
23
|
hideNavigationArrows?: boolean;
|
|
20
24
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
import { RadioProps as BlueprintRadioProps } from "@blueprintjs/core";
|
|
3
|
+
interface RadioButtonProps extends BlueprintRadioProps {
|
|
4
|
+
}
|
|
5
|
+
declare function RadioButton({ children, className, ...restProps }: RadioButtonProps): JSX.Element;
|
|
3
6
|
export default RadioButton;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
interface
|
|
2
|
+
export interface SpacingProps {
|
|
3
|
+
/**
|
|
4
|
+
* Set the amount of white space that separates two elements.
|
|
5
|
+
*/
|
|
3
6
|
size?: "tiny" | "small" | "medium" | "large";
|
|
7
|
+
/**
|
|
8
|
+
* If set then is a ruler displayed in the middle of the spacing area.
|
|
9
|
+
* The direction of the ruler is used from the spacing.
|
|
10
|
+
*/
|
|
4
11
|
hasDivider?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* If set then the spacing separates two elements on the horizontal axis.
|
|
14
|
+
* The spacing area then is created on a vertical axis.
|
|
15
|
+
*/
|
|
5
16
|
vertical?: boolean;
|
|
6
17
|
}
|
|
7
|
-
/**
|
|
8
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Adds horizontal or vertical space between neighbouring elements.
|
|
20
|
+
* It also can add a visual ruler inside.
|
|
21
|
+
*/
|
|
22
|
+
declare function Spacing({ size, hasDivider, vertical }: SpacingProps): JSX.Element;
|
|
9
23
|
export default Spacing;
|
|
@@ -5,21 +5,54 @@ export declare type SpinnerSize = "tiny" | "small" | "medium" | "large" | "xlarg
|
|
|
5
5
|
export declare type SpinnerStroke = "thin" | "medium" | "bold";
|
|
6
6
|
declare type Intent = "inherit" | "primary" | "success" | "warning" | "danger";
|
|
7
7
|
/** A spinner that is either displayed globally or locally. */
|
|
8
|
-
export interface SpinnerProps extends
|
|
8
|
+
export interface SpinnerProps extends Omit<BlueprintSpinnerProps, "size"> {
|
|
9
|
+
/**
|
|
10
|
+
* intent value or a valid css color definition
|
|
11
|
+
*/
|
|
9
12
|
color?: Intent | string;
|
|
13
|
+
/**
|
|
14
|
+
* Additional CSS class names.
|
|
15
|
+
*/
|
|
10
16
|
className?: string;
|
|
11
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Position where and how the spinner is displayed:
|
|
19
|
+
* * `local`: the spinner is displayed as centered overlay to the neareast parent with relative (or equivalent) positioning
|
|
20
|
+
* * `inline`: the spinner is displayed as inline element
|
|
21
|
+
* * `global`: the spinner is displayed including backdrop centered over the full viewport
|
|
22
|
+
*/
|
|
12
23
|
position?: SpinnerPosition;
|
|
24
|
+
/**
|
|
25
|
+
* The size of the spinner.
|
|
26
|
+
* The default size relates to the `position`.
|
|
27
|
+
*/
|
|
13
28
|
size?: SpinnerSize;
|
|
29
|
+
/**
|
|
30
|
+
* The stroke width that is used to visualize the spinner.
|
|
31
|
+
* The default size relates to the `position`.
|
|
32
|
+
* There are only rare cases to set this property,
|
|
33
|
+
*/
|
|
14
34
|
stroke?: SpinnerStroke;
|
|
35
|
+
/**
|
|
36
|
+
* Delay when to show the spinner in ms.
|
|
37
|
+
*/
|
|
15
38
|
delay?: number;
|
|
16
39
|
/**
|
|
17
40
|
* Includes a backdrop behind the spinner that narrows visibility of the area behind the spinner.
|
|
18
41
|
* This option only works with "local" spinners, for "inline" spinners there is no backdrop, "global" spinners always have backdrops.
|
|
19
|
-
* The backdrop and the spinner are located over the nearest parent element that is styled by `position: relative` or
|
|
42
|
+
* The backdrop and the spinner are located over the nearest parent element that is styled by `position: relative` or some other CSS rule with an equivalent outcome.
|
|
20
43
|
*/
|
|
21
44
|
showLocalBackdrop?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Use this property to alter the display of the backdrop used for the global spinner
|
|
47
|
+
*/
|
|
48
|
+
overlayProps?: BlueprintOverlayProps;
|
|
49
|
+
/**
|
|
50
|
+
* Label displayed next to the spinner (planned).
|
|
51
|
+
* You can set it to document the purpose of the spinner.
|
|
52
|
+
* It is currently not supported and not displayed.
|
|
53
|
+
*/
|
|
54
|
+
description?: string;
|
|
22
55
|
}
|
|
23
|
-
declare function Spinner({ className, color, description, // currently unsupported (FIXME)
|
|
24
|
-
|
|
56
|
+
declare function Spinner({ className, color, position, size, stroke, showLocalBackdrop, delay, overlayProps, description, // currently unsupported (FIXME):
|
|
57
|
+
...otherProps }: SpinnerProps): JSX.Element | null;
|
|
25
58
|
export default Spinner;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SwitchProps } from "@blueprintjs/core";
|
|
3
|
-
interface
|
|
2
|
+
import { SwitchProps as BlueprintSwitchProps } from "@blueprintjs/core";
|
|
3
|
+
export interface SwitchProps extends Omit<BlueprintSwitchProps, "onChange"> {
|
|
4
|
+
/**
|
|
5
|
+
* Event handler for changed state.
|
|
6
|
+
*/
|
|
4
7
|
onChange?: (value: boolean) => any;
|
|
5
8
|
}
|
|
6
|
-
declare function Switch({ onChange, ...otherProps }:
|
|
9
|
+
declare function Switch({ onChange, ...otherProps }: SwitchProps): JSX.Element;
|
|
7
10
|
declare const _default: React.MemoExoticComponent<typeof Switch>;
|
|
8
11
|
export default _default;
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EdgeProps as ReactFlowEdgeProps } from "react-flow-renderer/dist/types";
|
|
3
3
|
export interface EdgeDefaultDataProps {
|
|
4
|
+
/**
|
|
5
|
+
* Size of the "glow" effect when the edge is hovered.
|
|
6
|
+
*/
|
|
4
7
|
pathGlowWidth?: number;
|
|
5
8
|
inversePath?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Reference linnk to the SVG marker used for the start of the edge
|
|
11
|
+
*/
|
|
6
12
|
markerStart?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Callback handler that returns a React element used as edge title.
|
|
15
|
+
*/
|
|
7
16
|
renderLabel?: (edgeCenter: [number, number, number, number]) => React.ReactNode;
|
|
8
17
|
}
|
|
9
18
|
export interface EdgeDefaultProps extends ReactFlowEdgeProps {
|
|
19
|
+
/**
|
|
20
|
+
* Defining content and markers for the edge.
|
|
21
|
+
*/
|
|
10
22
|
data?: EdgeDefaultDataProps;
|
|
23
|
+
/**
|
|
24
|
+
* Callback handler that returns a SVG path as string to define how the edge is rendered.
|
|
25
|
+
*/
|
|
11
26
|
drawSvgPath?: (edge: ReactFlowEdgeProps) => string;
|
|
12
27
|
}
|
|
13
28
|
export declare const EdgeDefault: React.MemoExoticComponent<(edge: EdgeDefaultProps) => JSX.Element>;
|
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.0.0-rc.
|
|
4
|
+
"version": "23.0.0-rc.7",
|
|
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",
|
|
@@ -116,7 +116,6 @@
|
|
|
116
116
|
"@typescript-eslint/parser": "^4.33.0",
|
|
117
117
|
"babel-jest": "^27.5.1",
|
|
118
118
|
"chromatic": "^6.5.1",
|
|
119
|
-
"css-loader": "3.4.2",
|
|
120
119
|
"eslint": "^7.32.0",
|
|
121
120
|
"eslint-config-react-app": "^6.0.0",
|
|
122
121
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -131,11 +130,9 @@
|
|
|
131
130
|
"rimraf": "^3.0.2",
|
|
132
131
|
"sass": "^1.53.0",
|
|
133
132
|
"sass-loader": "^10.3.1",
|
|
134
|
-
"style-loader": "0.23.1",
|
|
135
133
|
"ts-node": "^10.9.1",
|
|
136
134
|
"tsc-esm-fix": "^2.13.0",
|
|
137
|
-
"typescript": "4.4.4"
|
|
138
|
-
"webpack": "^4.46.0"
|
|
135
|
+
"typescript": "4.4.4"
|
|
139
136
|
},
|
|
140
137
|
"peerDependencies": {
|
|
141
138
|
"react": ">=16",
|
|
@@ -152,7 +149,8 @@
|
|
|
152
149
|
"**/glob-parent": "^5.1.2",
|
|
153
150
|
"**/trim": "^0.0.3",
|
|
154
151
|
"**/trim-newlines": "^3.0.1",
|
|
155
|
-
"**/minimist": "^1.2.6"
|
|
152
|
+
"**/minimist": "^1.2.6",
|
|
153
|
+
"**/postcss": "^7.0.36"
|
|
156
154
|
},
|
|
157
155
|
"eslintConfig": {
|
|
158
156
|
"extends": [
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
import { Markdown } from "./../../../index";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Cmem/Markdown",
|
|
7
|
+
component: Markdown,
|
|
8
|
+
argTypes: {
|
|
9
|
+
},
|
|
10
|
+
} as ComponentMeta<typeof Markdown>;
|
|
11
|
+
|
|
12
|
+
const Template: ComponentStory<typeof Markdown> = (args) => <Markdown {...args} />;
|
|
13
|
+
|
|
14
|
+
export const Default = Template.bind({});
|
|
15
|
+
|
|
16
|
+
Default.args = {
|
|
17
|
+
children: `
|
|
18
|
+
# This is a headline level 1
|
|
19
|
+
|
|
20
|
+
This is a paragraph.
|
|
21
|
+
|
|
22
|
+
* this is a unordered list
|
|
23
|
+
* with sub items
|
|
24
|
+
* with sub items
|
|
25
|
+
* another level
|
|
26
|
+
* another level
|
|
27
|
+
* sub item
|
|
28
|
+
* other list item
|
|
29
|
+
* a last one
|
|
30
|
+
|
|
31
|
+
1. ordered list
|
|
32
|
+
1. ordered sub items
|
|
33
|
+
2. second line
|
|
34
|
+
2. second item
|
|
35
|
+
* unordered sub items
|
|
36
|
+
* another line
|
|
37
|
+
3. third item
|
|
38
|
+
|
|
39
|
+
This is a paragraph with a [text link](http://example.com/).
|
|
40
|
+
|
|
41
|
+
## Headline level 2
|
|
42
|
+
### Headline level 3
|
|
43
|
+
#### Headline level 4
|
|
44
|
+
##### Headline level 5
|
|
45
|
+
###### Headline level 6
|
|
46
|
+
|
|
47
|
+
This is a code block.
|
|
48
|
+
|
|
49
|
+
> This is a block quote.
|
|
50
|
+
>
|
|
51
|
+
> With 2 paragraphs.
|
|
52
|
+
|
|
53
|
+
A line with some <strong>HTML code</strong> inside.
|
|
54
|
+
`
|
|
55
|
+
};
|
|
@@ -5,20 +5,31 @@ import remarkGfm from "remark-gfm";
|
|
|
5
5
|
import remarkTypograf from "@mavrin/remark-typograf";
|
|
6
6
|
import {remarkDefinitionList} from 'remark-definition-list';
|
|
7
7
|
import React from "react";
|
|
8
|
-
import {
|
|
8
|
+
import {HtmlContentBlock, TestableComponent} from "../../index";
|
|
9
9
|
import { PluggableList } from "react-markdown/lib/react-markdown";
|
|
10
10
|
|
|
11
|
-
export interface MarkdownParserProps {
|
|
11
|
+
export interface MarkdownParserProps extends TestableComponent {
|
|
12
12
|
children: string;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Allow HTML as partial content, otherwise escape HTML tags.
|
|
15
|
+
* Use with caution!
|
|
16
|
+
*/
|
|
14
17
|
allowHtml?: boolean;
|
|
15
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Return an object that only contains simple text without any HTML.
|
|
20
|
+
*/
|
|
16
21
|
removeMarkup?: boolean;
|
|
17
|
-
|
|
22
|
+
/**
|
|
23
|
+
* If defined, only elements from this list will be rendered.
|
|
24
|
+
* This overwrites the removeMarkup parameter if both are set.
|
|
25
|
+
*/
|
|
18
26
|
allowedElements?: string[];
|
|
19
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Do not wrap it in a content block element.
|
|
29
|
+
*/
|
|
20
30
|
inheritBlock?: boolean;
|
|
21
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Additional reHype plugins to execute.
|
|
22
33
|
* @see https://github.com/remarkjs/react-markdown#architecture
|
|
23
34
|
*/
|
|
24
35
|
reHypePlugins?: PluggableList;
|
|
@@ -54,7 +65,8 @@ export const Markdown = ({
|
|
|
54
65
|
removeMarkup = false,
|
|
55
66
|
inheritBlock = false,
|
|
56
67
|
allowedElements,
|
|
57
|
-
reHypePlugins
|
|
68
|
+
reHypePlugins,
|
|
69
|
+
...otherProps
|
|
58
70
|
}: MarkdownParserProps) => {
|
|
59
71
|
|
|
60
72
|
const configHtml = allowHtml ? {
|
|
@@ -82,7 +94,7 @@ export const Markdown = ({
|
|
|
82
94
|
return inheritBlock ? (
|
|
83
95
|
<ReactMarkdown {...reactMarkdownProperties} />
|
|
84
96
|
) : (
|
|
85
|
-
<HtmlContentBlock>
|
|
97
|
+
<HtmlContentBlock data-test-id={otherProps["data-test-id"]} >
|
|
86
98
|
<ReactMarkdown {...reactMarkdownProperties} />
|
|
87
99
|
</HtmlContentBlock>
|
|
88
100
|
);
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect, useCallback, FC } from "react";
|
|
2
2
|
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
import { ReactFlow, EdgeTools, NodeTools
|
|
3
|
+
import { ReactFlow, EdgeTools, NodeTools } from "./../../../index";
|
|
4
4
|
import { ReactFlowProps } from "./ReactFlow";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: "CMEM/React Flow/Configurations",
|
|
9
|
-
component: ReactFlow,
|
|
10
|
-
argTypes: {
|
|
11
|
-
},
|
|
12
|
-
} as ComponentMeta<typeof ReactFlow>;
|
|
5
|
+
import { Elements, FlowElement } from "react-flow-renderer";
|
|
13
6
|
|
|
14
7
|
const nodeExamples = {
|
|
15
8
|
unspecified: [
|
|
@@ -32,10 +25,10 @@ const nodeExamples = {
|
|
|
32
25
|
position: { x: 200, y: 300 },
|
|
33
26
|
},
|
|
34
27
|
{
|
|
35
|
-
id: 'unspecified-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed",source: 'unspecified-1', target: 'unspecified-2',
|
|
28
|
+
id: 'unspecified-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed", source: 'unspecified-1', target: 'unspecified-2',
|
|
36
29
|
},
|
|
37
30
|
{
|
|
38
|
-
id: 'unspecified-e2', type: 'step', label: "step edge", arrowHeadType: "arrowclosed",source: 'unspecified-2', target: 'unspecified-1',
|
|
31
|
+
id: 'unspecified-e2', type: 'step', label: "step edge", arrowHeadType: "arrowclosed", source: 'unspecified-2', target: 'unspecified-1',
|
|
39
32
|
}
|
|
40
33
|
],
|
|
41
34
|
linking: [
|
|
@@ -188,83 +181,19 @@ const nodeExamples = {
|
|
|
188
181
|
{ id: 'graph-e4', type: 'subproperty', label: "subproperty edge", arrowHeadType: "arrowclosed",source: 'graph-4', target: 'graph-5' },
|
|
189
182
|
{ id: 'graph-e5', type: 'rdftype', label: "rdftype edge", arrowHeadType: "arrowclosed",source: 'graph-5', target: 'graph-1' },
|
|
190
183
|
],
|
|
191
|
-
inverseEdge: [
|
|
192
|
-
{
|
|
193
|
-
id: 'inverseEdge-1',
|
|
194
|
-
type: "default",
|
|
195
|
-
data: {
|
|
196
|
-
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
197
|
-
},
|
|
198
|
-
position: { x: 200, y: 50 },
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: 'inverseEdge-2',
|
|
202
|
-
type: "default",
|
|
203
|
-
data: {
|
|
204
|
-
label: "Default ", content: "Example content.", minimalShape: "none",
|
|
205
|
-
handles: [ { type: "source", position: "left" }, { type: "target", position: "right" } ],
|
|
206
|
-
inversePath: true,
|
|
207
|
-
},
|
|
208
|
-
position: { x: 200, y: 300 },
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: 'inverseEdge-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed",source: 'inverseEdge-1', target: 'inverseEdge-2',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: 'inverseEdge-e2', type: 'default', label: "inverse edge", source: 'inverseEdge-2', target: 'inverseEdge-1',
|
|
215
|
-
data: {
|
|
216
|
-
markerStart: getMarkerEnd(
|
|
217
|
-
`${ArrowHeadType.ArrowClosed}-inverse` as ArrowHeadType
|
|
218
|
-
),
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
customLabel: [
|
|
223
|
-
{
|
|
224
|
-
id: 'customLabel-1',
|
|
225
|
-
type: "default",
|
|
226
|
-
data: {
|
|
227
|
-
label: "Default ", content: "Example content.", minimalShape: "none"
|
|
228
|
-
},
|
|
229
|
-
position: { x: 200, y: 50 },
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: 'customLabel-2',
|
|
233
|
-
type: "default",
|
|
234
|
-
data: {
|
|
235
|
-
label: "Default ", content: "Example content.", minimalShape: "none",
|
|
236
|
-
handles: [ { type: "source", position: "left" }, { type: "target", position: "right" } ],
|
|
237
|
-
inversePath: true,
|
|
238
|
-
},
|
|
239
|
-
position: { x: 200, y: 300 },
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
id: 'customLabel-e1', type: 'straight', label: "straight edge", arrowHeadType: "arrowclosed", source: 'customLabel-1', target: 'customLabel-2',
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
id: 'customLabel-e2', type: 'default', label: "custom edge", arrowHeadType: "arrowclosed", source: 'customLabel-2', target: 'customLabel-1',
|
|
246
|
-
data: {
|
|
247
|
-
renderLabel: (
|
|
248
|
-
edgeCenter: [number, number, number, number]
|
|
249
|
-
) => (
|
|
250
|
-
<foreignObject
|
|
251
|
-
width={30}
|
|
252
|
-
height={30}
|
|
253
|
-
x={edgeCenter[0] - 15}
|
|
254
|
-
y={edgeCenter[1] - 15}
|
|
255
|
-
className="instance-viz-multiedge"
|
|
256
|
-
requiredExtensions="http://www.w3.org/1999/xhtml"
|
|
257
|
-
>
|
|
258
|
-
<body>
|
|
259
|
-
<IconButton name="navigation-close" />
|
|
260
|
-
</body>
|
|
261
|
-
</foreignObject>
|
|
262
|
-
)
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
]
|
|
266
184
|
}
|
|
267
185
|
|
|
186
|
+
export default {
|
|
187
|
+
title: "CMEM/React Flow/Configurations",
|
|
188
|
+
component: ReactFlow,
|
|
189
|
+
argTypes: {
|
|
190
|
+
configuration: {
|
|
191
|
+
control: "select",
|
|
192
|
+
options: Object.keys(nodeExamples),
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
} as ComponentMeta<typeof ReactFlow>;
|
|
196
|
+
|
|
268
197
|
const ReactFlowExample: FC<ReactFlowProps> = (args) => {
|
|
269
198
|
const [reactflowInstance, setReactflowInstance] = useState(null);
|
|
270
199
|
const [elements, setElements] = useState([] as Elements);
|
|
@@ -5,14 +5,12 @@ import * as unspecifiedConfig from "./../configuration/unspecified";
|
|
|
5
5
|
import * as graphConfig from "./../configuration/graph";
|
|
6
6
|
import * as workflowConfig from "./../configuration/workflow";
|
|
7
7
|
import * as linkingConfig from "./../configuration/linking";
|
|
8
|
-
import * as inverseEdgeConfig from "./../configuration/inverseEdge";
|
|
9
|
-
import * as customLabelConfig from "./../configuration/customLabel";
|
|
10
8
|
|
|
11
9
|
export interface ReactFlowProps extends ReactFlowOriginalProps {
|
|
12
10
|
/**
|
|
13
11
|
* Load `ReactFlow` component with pre-configured values for `nodeTypes` and `edgeTypes`
|
|
14
12
|
*/
|
|
15
|
-
configuration?: "unspecified" | "graph" | "workflow" | "linking"
|
|
13
|
+
configuration?: "unspecified" | "graph" | "workflow" | "linking";
|
|
16
14
|
}
|
|
17
15
|
|
|
18
16
|
/**
|
|
@@ -31,8 +29,6 @@ export const ReactFlow = React.forwardRef<HTMLDivElement, ReactFlowProps>((
|
|
|
31
29
|
graph: graphConfig,
|
|
32
30
|
workflow: workflowConfig,
|
|
33
31
|
linking: linkingConfig,
|
|
34
|
-
inverseEdge: inverseEdgeConfig,
|
|
35
|
-
customLabel: customLabelConfig,
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
return (
|
|
@@ -1,10 +1,40 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Accordion as CarbonAccordion,
|
|
4
|
+
AccordionProps as CarbonAccordionProps,
|
|
5
|
+
} from "carbon-components-react";
|
|
3
6
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
export interface AccordionProps extends Omit<CarbonAccordionProps, "className" | "size"> {
|
|
9
|
+
/**
|
|
10
|
+
* Additional CSS classes.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* How much space is used for the header of the each of the accordion items.
|
|
15
|
+
*/
|
|
16
|
+
size?: "small" | "medium" | "large";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const carbonAccordionSizeMapping = {
|
|
20
|
+
"small": "sm" as "sm",
|
|
21
|
+
"medium": "md" as "md",
|
|
22
|
+
"large": "lg" as "lg"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function Accordion({
|
|
26
|
+
children,
|
|
27
|
+
className = "",
|
|
28
|
+
align = "start",
|
|
29
|
+
size = "medium",
|
|
30
|
+
...otherProps
|
|
31
|
+
}: AccordionProps) {
|
|
6
32
|
return (
|
|
7
|
-
<CarbonAccordion
|
|
33
|
+
<CarbonAccordion
|
|
34
|
+
className={`${eccgui}-accordion__container ` + className}
|
|
35
|
+
align={align}
|
|
36
|
+
size={carbonAccordionSizeMapping[size]}
|
|
37
|
+
{...otherProps}>
|
|
8
38
|
{children}
|
|
9
39
|
</CarbonAccordion>
|
|
10
40
|
);
|