@eccenca/gui-elements 24.0.0 → 24.1.0-featureimprovepublishingprocesscmem6356.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 +95 -0
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +7 -2
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +3 -3
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js +13 -3
- package/dist/cjs/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/cjs/components/AutoSuggestion/ExtendedCodeEditor.js +3 -3
- package/dist/cjs/components/AutoSuggestion/ExtendedCodeEditor.js.map +1 -1
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js +4 -2
- package/dist/cjs/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/cjs/components/Card/CardActions.js +2 -1
- package/dist/cjs/components/Card/CardActions.js.map +1 -1
- package/dist/cjs/components/Card/CardContent.js +4 -6
- package/dist/cjs/components/Card/CardContent.js.map +1 -1
- package/dist/cjs/components/ContentGroup/ContentGroup.js +95 -0
- package/dist/cjs/components/ContentGroup/ContentGroup.js.map +1 -0
- package/dist/cjs/components/Dialog/SimpleDialog.js +3 -3
- package/dist/cjs/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +12 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Label/Label.js +8 -3
- package/dist/cjs/components/Label/Label.js.map +1 -1
- package/dist/cjs/components/Menu/MenuItem.js +3 -2
- package/dist/cjs/components/Menu/MenuItem.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +1 -0
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItem.js +5 -2
- package/dist/cjs/components/OverviewItem/OverviewItem.js.map +1 -1
- package/dist/cjs/components/OverviewItem/OverviewItemList.js +2 -2
- package/dist/cjs/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js +6 -4
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/Tag/TagList.js +1 -1
- package/dist/cjs/components/Tag/TagList.js.map +1 -1
- package/dist/cjs/components/TextField/SearchField.js +19 -2
- package/dist/cjs/components/TextField/SearchField.js.map +1 -1
- package/dist/cjs/components/Typography/OverflowText.js +1 -1
- package/dist/cjs/components/Typography/OverflowText.js.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +93 -11
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/codemirror/debouncedLinter.js +18 -0
- package/dist/cjs/extensions/codemirror/debouncedLinter.js.map +1 -0
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +23 -14
- package/dist/cjs/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/cjs/extensions/codemirror/linters/jsLinter.js +36 -0
- package/dist/cjs/extensions/codemirror/linters/jsLinter.js.map +1 -0
- package/dist/cjs/extensions/codemirror/linters/turtleLinter.js +81 -0
- package/dist/cjs/extensions/codemirror/linters/turtleLinter.js.map +1 -0
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js +4 -1
- package/dist/cjs/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
- package/dist/cjs/extensions/codemirror/toolbars/commands/markdown.command.js +278 -0
- package/dist/cjs/extensions/codemirror/toolbars/commands/markdown.command.js.map +1 -0
- package/dist/cjs/extensions/codemirror/toolbars/markdown.toolbar.js +47 -0
- package/dist/cjs/extensions/codemirror/toolbars/markdown.toolbar.js.map +1 -0
- package/dist/cjs/extensions/codemirror/types.js +3 -0
- package/dist/cjs/extensions/codemirror/types.js.map +1 -0
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +140 -41
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js +5 -6
- package/dist/cjs/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js +7 -2
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +4 -4
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js +13 -3
- package/dist/esm/components/AutoSuggestion/AutoSuggestion.js.map +1 -1
- package/dist/esm/components/AutoSuggestion/ExtendedCodeEditor.js +14 -3
- package/dist/esm/components/AutoSuggestion/ExtendedCodeEditor.js.map +1 -1
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js +4 -3
- package/dist/esm/components/AutocompleteField/AutoCompleteField.js.map +1 -1
- package/dist/esm/components/Card/CardActions.js +2 -1
- package/dist/esm/components/Card/CardActions.js.map +1 -1
- package/dist/esm/components/Card/CardContent.js +4 -5
- package/dist/esm/components/Card/CardContent.js.map +1 -1
- package/dist/esm/components/ContentGroup/ContentGroup.js +100 -0
- package/dist/esm/components/ContentGroup/ContentGroup.js.map +1 -0
- package/dist/esm/components/Dialog/SimpleDialog.js +4 -4
- package/dist/esm/components/Dialog/SimpleDialog.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +12 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Label/Label.js +8 -3
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +3 -2
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +1 -0
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/components/OverviewItem/OverviewItem.js +5 -2
- package/dist/esm/components/OverviewItem/OverviewItem.js.map +1 -1
- package/dist/esm/components/OverviewItem/OverviewItemList.js +2 -2
- package/dist/esm/components/OverviewItem/OverviewItemList.js.map +1 -1
- package/dist/esm/components/Switch/Switch.js +7 -5
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/esm/components/Tag/TagList.js +1 -1
- package/dist/esm/components/Tag/TagList.js.map +1 -1
- package/dist/esm/components/TextField/SearchField.js +35 -2
- package/dist/esm/components/TextField/SearchField.js.map +1 -1
- package/dist/esm/components/Typography/OverflowText.js +1 -1
- package/dist/esm/components/Typography/OverflowText.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +94 -13
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/codemirror/debouncedLinter.js +15 -0
- package/dist/esm/extensions/codemirror/debouncedLinter.js.map +1 -0
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js +20 -11
- package/dist/esm/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.js.map +1 -1
- package/dist/esm/extensions/codemirror/linters/jsLinter.js +32 -0
- package/dist/esm/extensions/codemirror/linters/jsLinter.js.map +1 -0
- package/dist/esm/extensions/codemirror/linters/turtleLinter.js +77 -0
- package/dist/esm/extensions/codemirror/linters/turtleLinter.js.map +1 -0
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js +4 -0
- package/dist/esm/extensions/codemirror/tests/codemirrorTestHelper.js.map +1 -1
- package/dist/esm/extensions/codemirror/toolbars/commands/markdown.command.js +283 -0
- package/dist/esm/extensions/codemirror/toolbars/commands/markdown.command.js.map +1 -0
- package/dist/esm/extensions/codemirror/toolbars/markdown.toolbar.js +41 -0
- package/dist/esm/extensions/codemirror/toolbars/markdown.toolbar.js.map +1 -0
- package/dist/esm/extensions/codemirror/types.js +2 -0
- package/dist/esm/extensions/codemirror/types.js.map +1 -0
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +149 -48
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js +5 -6
- package/dist/esm/extensions/react-flow/nodes/nodeUtils.js.map +1 -1
- package/dist/types/cmem/ActivityControl/ActivityControlWidget.d.ts +1 -1
- package/dist/types/cmem/react-flow/StickyNoteModal/StickyNoteModal.d.ts +5 -1
- package/dist/types/components/AutoSuggestion/ExtendedCodeEditor.d.ts +11 -6
- package/dist/types/components/Card/CardActions.d.ts +5 -1
- package/dist/types/components/Card/CardContent.d.ts +1 -2
- package/dist/types/components/ContentGroup/ContentGroup.d.ts +78 -0
- package/dist/types/components/Dialog/SimpleDialog.d.ts +4 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +12 -0
- package/dist/types/components/Label/Label.d.ts +7 -1
- package/dist/types/components/Menu/MenuItem.d.ts +8 -1
- package/dist/types/components/OverviewItem/OverviewItem.d.ts +13 -1
- package/dist/types/components/OverviewItem/OverviewItemList.d.ts +3 -2
- package/dist/types/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/types/components/Structure/TitleSubsection.d.ts +9 -1
- package/dist/types/components/Switch/Switch.d.ts +3 -3
- package/dist/types/components/Tabs/Tab.d.ts +20 -4
- package/dist/types/components/TextField/SearchField.d.ts +1 -1
- package/dist/types/components/Typography/OverflowText.d.ts +23 -2
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +32 -5
- package/dist/types/extensions/codemirror/debouncedLinter.d.ts +4 -0
- package/dist/types/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.d.ts +7 -5
- package/dist/types/extensions/codemirror/linters/jsLinter.d.ts +5 -0
- package/dist/types/extensions/codemirror/linters/turtleLinter.d.ts +5 -0
- package/dist/types/extensions/codemirror/tests/codemirrorTestHelper.d.ts +1 -0
- package/dist/types/extensions/codemirror/toolbars/commands/markdown.command.d.ts +55 -0
- package/dist/types/extensions/codemirror/toolbars/markdown.toolbar.d.ts +12 -0
- package/dist/types/extensions/codemirror/types.d.ts +5 -0
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +18 -4
- package/dist/types/extensions/react-flow/nodes/nodeUtils.d.ts +7 -6
- package/dist/types/extensions/react-flow/versionsupport.d.ts +1 -1
- package/package.json +59 -47
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +5 -2
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +16 -2
- package/src/cmem/react-flow/configuration/_colors-graph.scss +4 -1
- package/src/cmem/react-flow/configuration/_colors-workflow.scss +3 -0
- package/src/components/AutoSuggestion/AutoSuggestion.tsx +14 -3
- package/src/components/AutoSuggestion/ExtendedCodeEditor.tsx +29 -6
- package/src/components/AutocompleteField/AutoCompleteField.tsx +5 -3
- package/src/components/Card/CardActions.tsx +6 -0
- package/src/components/Card/CardContent.tsx +8 -4
- package/src/components/Card/card.scss +15 -0
- package/src/components/CodeAutocompleteField/CodeAutocompleteField.stories.tsx +3 -2
- package/src/components/ContentGroup/ContentGroup.stories.tsx +47 -0
- package/src/components/ContentGroup/ContentGroup.tsx +256 -0
- package/src/components/ContentGroup/_contentgroup.scss +56 -0
- package/src/components/ContextOverlay/ContextOverlay.stories.tsx +15 -4
- package/src/components/Depiction/depiction.scss +7 -0
- package/src/components/Dialog/SimpleDialog.tsx +9 -2
- package/src/components/Dialog/stories/AlertDialog.stories.tsx +5 -1
- package/src/components/Dialog/stories/Modal.stories.tsx +4 -2
- package/src/components/Dialog/stories/SimpleDialog.stories.tsx +5 -2
- package/src/components/Icon/canonicalIconNames.tsx +12 -0
- package/src/components/Label/Label.stories.tsx +2 -1
- package/src/components/Label/Label.tsx +17 -1
- package/src/components/Label/label.scss +5 -1
- package/src/components/Menu/MenuItem.tsx +27 -1
- package/src/components/Menu/menu.scss +1 -0
- package/src/components/MultiSelect/MultiSelect.tsx +1 -0
- package/src/components/OverviewItem/OverviewItem.tsx +24 -1
- package/src/components/OverviewItem/OverviewItemList.tsx +3 -2
- package/src/components/OverviewItem/overviewitem.scss +4 -1
- package/src/components/OverviewItem/stories/OverviewItem.stories.tsx +6 -12
- package/src/components/Select/Select.stories.tsx +4 -1
- package/src/components/Switch/Switch.tsx +27 -8
- package/src/components/Tag/TagList.tsx +2 -2
- package/src/components/TextField/SearchField.tsx +37 -9
- package/src/components/TextField/stories/SearchField.stories.tsx +15 -1
- package/src/components/TextField/stories/TextField.stories.tsx +2 -1
- package/src/components/TextField/textfield.scss +17 -3
- package/src/components/Typography/OverflowText.tsx +24 -3
- package/src/components/Typography/stories/OverflowText.stories.tsx +33 -0
- package/src/components/index.scss +1 -0
- package/src/components/index.ts +1 -0
- package/src/extensions/codemirror/CodeMirror.stories.tsx +19 -1
- package/src/extensions/codemirror/CodeMirror.tsx +154 -16
- package/src/extensions/codemirror/_codemirror.scss +130 -1
- package/src/extensions/codemirror/debouncedLinter.ts +26 -0
- package/src/extensions/codemirror/hooks/useCodemirrorModeExtension.hooks.ts +21 -12
- package/src/extensions/codemirror/linters/jsLinter.ts +38 -0
- package/src/extensions/codemirror/linters/turtleLinter.ts +102 -0
- package/src/extensions/codemirror/tests/codemirrorTestHelper.ts +4 -0
- package/src/extensions/codemirror/toolbars/commands/markdown.command.ts +340 -0
- package/src/extensions/codemirror/toolbars/markdown.toolbar.tsx +117 -0
- package/src/extensions/codemirror/types.ts +7 -0
- package/src/extensions/react-flow/_config.scss +1 -0
- package/src/extensions/react-flow/nodes/NodeContent.tsx +170 -52
- package/src/extensions/react-flow/nodes/_nodes.scss +71 -35
- package/src/extensions/react-flow/nodes/nodeUtils.tsx +16 -14
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +51 -12
|
@@ -30,6 +30,12 @@ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>
|
|
|
30
30
|
* visual appearance of the label
|
|
31
31
|
*/
|
|
32
32
|
emphasis?: "strong" | "normal";
|
|
33
|
+
/**
|
|
34
|
+
* Add other elements to the end of the label content
|
|
35
|
+
*/
|
|
36
|
+
additionalElements?: React.ReactNode | React.ReactNode[];
|
|
37
|
+
/** Force label to get displayed as inline block element. */
|
|
38
|
+
inline?: boolean;
|
|
33
39
|
}
|
|
34
|
-
export declare const Label: ({ children, className, disabled, text, info, tooltip, tooltipProps, isLayoutForElement, emphasis, ...otherLabelProps }: LabelProps) => React.JSX.Element;
|
|
40
|
+
export declare const Label: ({ children, className, disabled, text, info, tooltip, tooltipProps, isLayoutForElement, emphasis, additionalElements, inline, ...otherLabelProps }: LabelProps) => React.JSX.Element;
|
|
35
41
|
export default Label;
|
|
@@ -4,10 +4,17 @@ import { ValidIconName } from "../Icon/canonicalIconNames";
|
|
|
4
4
|
import { TestIconProps } from "./../Icon/TestIcon";
|
|
5
5
|
export interface MenuItemProps extends Omit<BlueprintMenuItemProps, "icon" | "children">, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "onFocus" | "target" | "children"> {
|
|
6
6
|
icon?: ValidIconName | string[] | React.ReactElement<TestIconProps>;
|
|
7
|
+
/**
|
|
8
|
+
* Submenu.
|
|
9
|
+
*/
|
|
7
10
|
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Tooltip, but only added to the label, not to the full menu item.
|
|
13
|
+
*/
|
|
14
|
+
tooltip?: string | JSX.Element;
|
|
8
15
|
}
|
|
9
16
|
/**
|
|
10
17
|
* Single item, used as child inside `Menu`.
|
|
11
18
|
*/
|
|
12
|
-
export declare const MenuItem: ({ children, className, icon, onClick, href, ...restProps }: MenuItemProps) => React.JSX.Element;
|
|
19
|
+
export declare const MenuItem: ({ children, className, icon, onClick, href, text, tooltip, ...restProps }: MenuItemProps) => React.JSX.Element;
|
|
13
20
|
export default MenuItem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { CardProps } from "../Card/Card";
|
|
2
3
|
export interface OverviewItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
/**
|
|
4
5
|
* Displays the element using reduced height and less white space inside.
|
|
@@ -8,10 +9,21 @@ export interface OverviewItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
8
9
|
* Add a bit white space around the element.
|
|
9
10
|
*/
|
|
10
11
|
hasSpacing?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Uses a `Card` element to wrap the `OverviewItem` inside.
|
|
14
|
+
* It is always used with `isOnlyLayout` set to `true`.
|
|
15
|
+
* Should be used together with `hasSpacing`.
|
|
16
|
+
*/
|
|
17
|
+
hasCardWrapper?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Forwarding basic `Card` properties to the wrapper element.
|
|
20
|
+
* Only used if `hasCardWrapper` is set to `true`.
|
|
21
|
+
*/
|
|
22
|
+
cardProps?: Omit<CardProps, "children" | "isOnlyLayout" | "fullHeight" | "whitespaceAmount" | "compact">;
|
|
11
23
|
}
|
|
12
24
|
/**
|
|
13
25
|
* This element can include all basic information and actions to give an overview about the item.
|
|
14
26
|
* Mainly used in items list or to create basic widgets.
|
|
15
27
|
*/
|
|
16
|
-
export declare const OverviewItem: ({ children, className, densityHigh, hasSpacing, ...otherProps }: OverviewItemProps) => React.
|
|
28
|
+
export declare const OverviewItem: ({ children, className, densityHigh, hasSpacing, hasCardWrapper, cardProps, ...otherProps }: OverviewItemProps) => React.JSX.Element;
|
|
17
29
|
export default OverviewItem;
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
export interface OverviewItemListProps extends React.HTMLAttributes<HTMLOListElement> {
|
|
3
3
|
/**
|
|
4
4
|
* Displays the element using reduced height and less white space inside.
|
|
5
|
+
* @deprecated (v25) use property directly on `OverviewItem` children.
|
|
5
6
|
*/
|
|
6
7
|
densityHigh?: boolean;
|
|
7
8
|
/**
|
|
@@ -19,8 +20,8 @@ export interface OverviewItemListProps extends React.HTMLAttributes<HTMLOListEle
|
|
|
19
20
|
columns?: 1 | 2;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
|
-
* This
|
|
23
|
-
*
|
|
23
|
+
* This component is a listing container for multiple `OverviewItem` elements.
|
|
24
|
+
* It should only contains `OverviewItem` children but it does not check and control that condition.
|
|
24
25
|
*/
|
|
25
26
|
export declare const OverviewItemList: ({ children, className, densityHigh, hasDivider, hasSpacing, columns, ...restProps }: OverviewItemListProps) => React.JSX.Element;
|
|
26
27
|
export default OverviewItemList;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const ProgressBar:
|
|
1
|
+
import { ProgressBarProps as BlueprintProgressBarProps } from "@blueprintjs/core";
|
|
2
|
+
export declare const ProgressBar: import("react").FC<BlueprintProgressBarProps>;
|
|
3
3
|
export type ProgressBarProps = BlueprintProgressBarProps;
|
|
@@ -12,11 +12,13 @@ export declare const TitleSubsection: ({ children, className, useHtmlElement, ..
|
|
|
12
12
|
suppressContentEditableWarning?: boolean | undefined;
|
|
13
13
|
suppressHydrationWarning?: boolean | undefined;
|
|
14
14
|
accessKey?: string | undefined;
|
|
15
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
15
16
|
autoFocus?: boolean | undefined;
|
|
16
17
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
17
18
|
contextMenu?: string | undefined;
|
|
18
19
|
dir?: string | undefined;
|
|
19
20
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
21
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
20
22
|
hidden?: boolean | undefined;
|
|
21
23
|
id?: string | undefined;
|
|
22
24
|
lang?: string | undefined;
|
|
@@ -41,7 +43,6 @@ export declare const TitleSubsection: ({ children, className, useHtmlElement, ..
|
|
|
41
43
|
rev?: string | undefined;
|
|
42
44
|
typeof?: string | undefined;
|
|
43
45
|
vocab?: string | undefined;
|
|
44
|
-
autoCapitalize?: string | undefined;
|
|
45
46
|
autoCorrect?: string | undefined;
|
|
46
47
|
autoSave?: string | undefined;
|
|
47
48
|
color?: string | undefined;
|
|
@@ -55,17 +56,23 @@ export declare const TitleSubsection: ({ children, className, useHtmlElement, ..
|
|
|
55
56
|
unselectable?: "on" | "off" | undefined;
|
|
56
57
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
57
58
|
is?: string | undefined;
|
|
59
|
+
exportparts?: string | undefined;
|
|
60
|
+
part?: string | undefined;
|
|
58
61
|
"aria-activedescendant"?: string | undefined;
|
|
59
62
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
60
63
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
64
|
+
"aria-braillelabel"?: string | undefined;
|
|
65
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
61
66
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
62
67
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
63
68
|
"aria-colcount"?: number | undefined;
|
|
64
69
|
"aria-colindex"?: number | undefined;
|
|
70
|
+
"aria-colindextext"?: string | undefined;
|
|
65
71
|
"aria-colspan"?: number | undefined;
|
|
66
72
|
"aria-controls"?: string | undefined;
|
|
67
73
|
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
68
74
|
"aria-describedby"?: string | undefined;
|
|
75
|
+
"aria-description"?: string | undefined;
|
|
69
76
|
"aria-details"?: string | undefined;
|
|
70
77
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
71
78
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
@@ -95,6 +102,7 @@ export declare const TitleSubsection: ({ children, className, useHtmlElement, ..
|
|
|
95
102
|
"aria-roledescription"?: string | undefined;
|
|
96
103
|
"aria-rowcount"?: number | undefined;
|
|
97
104
|
"aria-rowindex"?: number | undefined;
|
|
105
|
+
"aria-rowindextext"?: string | undefined;
|
|
98
106
|
"aria-rowspan"?: number | undefined;
|
|
99
107
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
100
108
|
"aria-setsize"?: number | undefined;
|
|
@@ -4,12 +4,12 @@ export interface SwitchProps extends Omit<BlueprintSwitchProps, "onChange"> {
|
|
|
4
4
|
/**
|
|
5
5
|
* Event handler for changed state.
|
|
6
6
|
*/
|
|
7
|
-
onChange?: (value: boolean) =>
|
|
7
|
+
onChange?: (value: boolean) => void;
|
|
8
8
|
/**
|
|
9
9
|
* class names
|
|
10
10
|
*/
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare const Switch: ({ onChange, className, ...otherProps }: SwitchProps) => React.JSX.Element;
|
|
14
|
-
declare const _default: React.MemoExoticComponent<({ onChange, className, ...otherProps }: SwitchProps) => React.JSX.Element>;
|
|
13
|
+
export declare const Switch: ({ onChange, className, label, ...otherProps }: SwitchProps) => React.JSX.Element;
|
|
14
|
+
declare const _default: React.MemoExoticComponent<({ onChange, className, label, ...otherProps }: SwitchProps) => React.JSX.Element>;
|
|
15
15
|
export default _default;
|
|
@@ -37,11 +37,13 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
37
37
|
suppressContentEditableWarning?: boolean | undefined;
|
|
38
38
|
suppressHydrationWarning?: boolean | undefined;
|
|
39
39
|
accessKey?: string | undefined;
|
|
40
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
40
41
|
autoFocus?: boolean | undefined;
|
|
41
42
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
42
43
|
contextMenu?: string | undefined;
|
|
43
44
|
dir?: string | undefined;
|
|
44
45
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
46
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
45
47
|
hidden?: boolean | undefined;
|
|
46
48
|
id: import("@blueprintjs/core").TabId;
|
|
47
49
|
lang?: string | undefined;
|
|
@@ -63,7 +65,6 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
63
65
|
rev?: string | undefined;
|
|
64
66
|
typeof?: string | undefined;
|
|
65
67
|
vocab?: string | undefined;
|
|
66
|
-
autoCapitalize?: string | undefined;
|
|
67
68
|
autoCorrect?: string | undefined;
|
|
68
69
|
autoSave?: string | undefined;
|
|
69
70
|
color?: string | undefined;
|
|
@@ -77,17 +78,23 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
77
78
|
unselectable?: "on" | "off" | undefined;
|
|
78
79
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
79
80
|
is?: string | undefined;
|
|
81
|
+
exportparts?: string | undefined;
|
|
82
|
+
part?: string | undefined;
|
|
80
83
|
"aria-activedescendant"?: string | undefined;
|
|
81
84
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
82
85
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
86
|
+
"aria-braillelabel"?: string | undefined;
|
|
87
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
83
88
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
84
89
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
85
90
|
"aria-colcount"?: number | undefined;
|
|
86
91
|
"aria-colindex"?: number | undefined;
|
|
92
|
+
"aria-colindextext"?: string | undefined;
|
|
87
93
|
"aria-colspan"?: number | undefined;
|
|
88
94
|
"aria-controls"?: string | undefined;
|
|
89
95
|
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
90
96
|
"aria-describedby"?: string | undefined;
|
|
97
|
+
"aria-description"?: string | undefined;
|
|
91
98
|
"aria-details"?: string | undefined;
|
|
92
99
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
93
100
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
@@ -117,6 +124,7 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
117
124
|
"aria-roledescription"?: string | undefined;
|
|
118
125
|
"aria-rowcount"?: number | undefined;
|
|
119
126
|
"aria-rowindex"?: number | undefined;
|
|
127
|
+
"aria-rowindextext"?: string | undefined;
|
|
120
128
|
"aria-rowspan"?: number | undefined;
|
|
121
129
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
122
130
|
"aria-setsize"?: number | undefined;
|
|
@@ -288,8 +296,8 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
288
296
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
289
297
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
290
298
|
icon?: import("@blueprintjs/core").IconName | import("@blueprintjs/core").MaybeElement;
|
|
291
|
-
tagProps?: Omit<import("@blueprintjs/core").TagProps, "children">;
|
|
292
299
|
panel?: React.JSX.Element | ((props: import("@blueprintjs/core/lib/esm/components/tabs/tab").TabIdProps) => React.JSX.Element);
|
|
300
|
+
tagProps?: Omit<import("@blueprintjs/core").TagProps, "children">;
|
|
293
301
|
panelClassName?: string;
|
|
294
302
|
tagContent?: import("@blueprintjs/core").TagProps["children"];
|
|
295
303
|
key: import("@blueprintjs/core").TabId;
|
|
@@ -307,11 +315,13 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
307
315
|
suppressContentEditableWarning?: boolean | undefined;
|
|
308
316
|
suppressHydrationWarning?: boolean | undefined;
|
|
309
317
|
accessKey?: string | undefined;
|
|
318
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
310
319
|
autoFocus?: boolean | undefined;
|
|
311
320
|
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
312
321
|
contextMenu?: string | undefined;
|
|
313
322
|
dir?: string | undefined;
|
|
314
323
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
324
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
315
325
|
hidden?: boolean | undefined;
|
|
316
326
|
id: import("@blueprintjs/core").TabId;
|
|
317
327
|
lang?: string | undefined;
|
|
@@ -333,7 +343,6 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
333
343
|
rev?: string | undefined;
|
|
334
344
|
typeof?: string | undefined;
|
|
335
345
|
vocab?: string | undefined;
|
|
336
|
-
autoCapitalize?: string | undefined;
|
|
337
346
|
autoCorrect?: string | undefined;
|
|
338
347
|
autoSave?: string | undefined;
|
|
339
348
|
color?: string | undefined;
|
|
@@ -347,17 +356,23 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
347
356
|
unselectable?: "on" | "off" | undefined;
|
|
348
357
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
349
358
|
is?: string | undefined;
|
|
359
|
+
exportparts?: string | undefined;
|
|
360
|
+
part?: string | undefined;
|
|
350
361
|
"aria-activedescendant"?: string | undefined;
|
|
351
362
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
352
363
|
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
364
|
+
"aria-braillelabel"?: string | undefined;
|
|
365
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
353
366
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
354
367
|
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
355
368
|
"aria-colcount"?: number | undefined;
|
|
356
369
|
"aria-colindex"?: number | undefined;
|
|
370
|
+
"aria-colindextext"?: string | undefined;
|
|
357
371
|
"aria-colspan"?: number | undefined;
|
|
358
372
|
"aria-controls"?: string | undefined;
|
|
359
373
|
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
360
374
|
"aria-describedby"?: string | undefined;
|
|
375
|
+
"aria-description"?: string | undefined;
|
|
361
376
|
"aria-details"?: string | undefined;
|
|
362
377
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
363
378
|
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
@@ -387,6 +402,7 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
387
402
|
"aria-roledescription"?: string | undefined;
|
|
388
403
|
"aria-rowcount"?: number | undefined;
|
|
389
404
|
"aria-rowindex"?: number | undefined;
|
|
405
|
+
"aria-rowindextext"?: string | undefined;
|
|
390
406
|
"aria-rowspan"?: number | undefined;
|
|
391
407
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
392
408
|
"aria-setsize"?: number | undefined;
|
|
@@ -558,8 +574,8 @@ export declare const transformTabProperties: ({ title, dontShrink, className, ba
|
|
|
558
574
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
559
575
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
560
576
|
icon?: import("@blueprintjs/core").IconName | import("@blueprintjs/core").MaybeElement;
|
|
561
|
-
tagProps?: Omit<import("@blueprintjs/core").TagProps, "children">;
|
|
562
577
|
panel?: React.JSX.Element | ((props: import("@blueprintjs/core/lib/esm/components/tabs/tab").TabIdProps) => React.JSX.Element);
|
|
578
|
+
tagProps?: Omit<import("@blueprintjs/core").TagProps, "children">;
|
|
563
579
|
panelClassName?: string;
|
|
564
580
|
tagContent?: import("@blueprintjs/core").TagProps["children"];
|
|
565
581
|
key: import("@blueprintjs/core").TabId;
|
|
@@ -19,5 +19,5 @@ export interface SearchFieldProps extends TestableComponent, Omit<TextFieldProps
|
|
|
19
19
|
/**
|
|
20
20
|
* Special `TextField` element for search term inputs.
|
|
21
21
|
*/
|
|
22
|
-
export declare const SearchField: ({ className, emptySearchInputMessage, onClearanceHandler, onClearanceText, leftIcon, ...otherProps }: SearchFieldProps) => React.JSX.Element;
|
|
22
|
+
export declare const SearchField: ({ className, emptySearchInputMessage, onClearanceHandler, onClearanceText, onChange, leftIcon, rightElement, ...otherProps }: SearchFieldProps) => React.JSX.Element;
|
|
23
23
|
export default SearchField;
|
|
@@ -1,10 +1,31 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { TestableComponent } from "../../components/interfaces";
|
|
3
|
+
export interface OverflowTextProps extends React.HTMLAttributes<HTMLElement>, TestableComponent {
|
|
4
|
+
/**
|
|
5
|
+
* How is ellipsis used to cut text overflows.
|
|
6
|
+
* Use `reverse`to use the ellipis on text start and display the end of the text.
|
|
7
|
+
*/
|
|
8
|
+
ellipsis?: "add" | "reverse" | "none";
|
|
9
|
+
/**
|
|
10
|
+
* Display component as inline element.
|
|
11
|
+
*/
|
|
4
12
|
inline?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Using text overflow on all children elements.
|
|
15
|
+
*/
|
|
5
16
|
passDown?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Additional CSS class name.
|
|
19
|
+
*/
|
|
6
20
|
className?: string;
|
|
21
|
+
/**
|
|
22
|
+
* HTML element that is used for the component.
|
|
23
|
+
*/
|
|
7
24
|
useHtmlElement?: "p" | "div" | "span";
|
|
25
|
+
/**
|
|
26
|
+
* Used for all other necessary properties.
|
|
27
|
+
* @deprecated (v25) we will allow only basic HTML element properties and testing IDs
|
|
28
|
+
*/
|
|
8
29
|
[key: string]: any;
|
|
9
30
|
}
|
|
10
31
|
/** Prevents text from overflowing. */
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Extension } from "@codemirror/state";
|
|
3
3
|
import { EditorView, Rect } from "@codemirror/view";
|
|
4
|
+
import { IntentTypes } from "../../common/Intent";
|
|
5
|
+
import { TestableComponent } from "../../components/interfaces";
|
|
4
6
|
import { SupportedCodeEditorModes } from "./hooks/useCodemirrorModeExtension.hooks";
|
|
5
|
-
export interface CodeEditorProps {
|
|
6
|
-
setEditorView?: (editor: EditorView | undefined) =>
|
|
7
|
+
export interface CodeEditorProps extends TestableComponent {
|
|
8
|
+
setEditorView?: (editor: EditorView | undefined) => void;
|
|
7
9
|
/**
|
|
8
10
|
* `name` attribute of connected textarea element.
|
|
9
11
|
*/
|
|
@@ -25,7 +27,7 @@ export interface CodeEditorProps {
|
|
|
25
27
|
/**
|
|
26
28
|
* Called when the focus status changes
|
|
27
29
|
*/
|
|
28
|
-
onFocusChange?: (focused: boolean) =>
|
|
30
|
+
onFocusChange?: (focused: boolean) => void;
|
|
29
31
|
/**
|
|
30
32
|
* Called when the user presses a key
|
|
31
33
|
*/
|
|
@@ -40,7 +42,7 @@ export interface CodeEditorProps {
|
|
|
40
42
|
onSelection?: (ranges: {
|
|
41
43
|
from: number;
|
|
42
44
|
to: number;
|
|
43
|
-
}[]) =>
|
|
45
|
+
}[]) => void;
|
|
44
46
|
/**
|
|
45
47
|
* Called when the cursor position changes
|
|
46
48
|
*/
|
|
@@ -101,11 +103,36 @@ export interface CodeEditorProps {
|
|
|
101
103
|
* If the <Tab> key is enabled as normal input, i.e. it won't have the behavior of changing to the next input element, expected in a web app.
|
|
102
104
|
*/
|
|
103
105
|
enableTab?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Enables linting feature in the editor ("turtle" and "javascript" modes can use linting currently).
|
|
108
|
+
*/
|
|
109
|
+
useLinting?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Autofocus the editor when it is rendered
|
|
112
|
+
*/
|
|
113
|
+
autoFocus?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Intent state of the code editor.
|
|
116
|
+
*/
|
|
117
|
+
intent?: IntentTypes | "edited" | "removed";
|
|
118
|
+
/**
|
|
119
|
+
* Disables the editor.
|
|
120
|
+
*/
|
|
121
|
+
disabled?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Add toolbar for mode.
|
|
124
|
+
* Currently only `markdown` is supported.
|
|
125
|
+
*/
|
|
126
|
+
useToolbar?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Get the translation for a specific key
|
|
129
|
+
*/
|
|
130
|
+
translate?: (key: string) => string | false;
|
|
104
131
|
}
|
|
105
132
|
/**
|
|
106
133
|
* Includes a code editor, currently we use CodeMirror library as base.
|
|
107
134
|
*/
|
|
108
135
|
export declare const CodeEditor: {
|
|
109
|
-
({ onChange, onSelection, onMouseDown, onFocusChange, onKeyDown, onCursorChange, name, id, mode, preventLineNumbers, defaultValue, readOnly, shouldHaveMinimalSetup, wrapLines, onScroll, setEditorView, supportCodeFolding, shouldHighlightActiveLine, outerDivAttributes, tabIntentSize, tabIntentStyle, placeholder, additionalExtensions, tabForceSpaceForModes, enableTab, height, }: CodeEditorProps): React.JSX.Element;
|
|
136
|
+
({ onChange, onSelection, onMouseDown, onFocusChange, onKeyDown, onCursorChange, name, id, mode, preventLineNumbers, defaultValue, readOnly, shouldHaveMinimalSetup, wrapLines, onScroll, setEditorView, supportCodeFolding, shouldHighlightActiveLine, outerDivAttributes, tabIntentSize, tabIntentStyle, placeholder, additionalExtensions, tabForceSpaceForModes, enableTab, height, useLinting, "data-test-id": dataTestId, autoFocus, disabled, intent, useToolbar, translate, ...otherCodeEditorProps }: CodeEditorProps): React.JSX.Element;
|
|
110
137
|
supportedModes: ("markdown" | "python" | "sparql" | "turtle" | "xml" | "yaml" | "jinja2" | "json" | "ntriples" | "mathematica" | "sql" | "javascript")[];
|
|
111
138
|
};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { markdown } from "@codemirror/lang-markdown";
|
|
1
|
+
import { javascript } from "@codemirror/lang-javascript";
|
|
3
2
|
import { json } from "@codemirror/lang-json";
|
|
3
|
+
import { markdown } from "@codemirror/lang-markdown";
|
|
4
|
+
import { sql } from "@codemirror/lang-sql";
|
|
4
5
|
import { xml } from "@codemirror/lang-xml";
|
|
5
|
-
import {
|
|
6
|
+
import { yaml } from "@codemirror/lang-yaml";
|
|
7
|
+
import { StreamParser } from "@codemirror/language";
|
|
6
8
|
declare const supportedModes: {
|
|
7
9
|
readonly markdown: typeof markdown;
|
|
8
10
|
readonly python: StreamParser<unknown>;
|
|
9
11
|
readonly sparql: StreamParser<unknown>;
|
|
10
12
|
readonly turtle: StreamParser<unknown>;
|
|
11
13
|
readonly xml: typeof xml;
|
|
12
|
-
readonly yaml:
|
|
14
|
+
readonly yaml: typeof yaml;
|
|
13
15
|
readonly jinja2: StreamParser<unknown>;
|
|
14
16
|
readonly json: typeof json;
|
|
15
17
|
readonly ntriples: StreamParser<unknown>;
|
|
16
18
|
readonly mathematica: StreamParser<unknown>;
|
|
17
19
|
readonly sql: typeof sql;
|
|
18
|
-
readonly javascript:
|
|
20
|
+
readonly javascript: typeof javascript;
|
|
19
21
|
};
|
|
20
22
|
export declare const supportedCodeEditorModes: Array<keyof typeof supportedModes>;
|
|
21
23
|
export type SupportedCodeEditorModes = (typeof supportedCodeEditorModes)[number];
|
|
@@ -18,3 +18,4 @@ export declare const adaptedLineNumbers: (props?: any) => any;
|
|
|
18
18
|
export declare const adaptedHighlightActiveLine: () => any;
|
|
19
19
|
export declare const adaptedFoldGutter: (props?: any) => any;
|
|
20
20
|
export declare const adaptedCodeFolding: (props?: any) => any;
|
|
21
|
+
export declare const adaptedLintGutter: (props?: any) => any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EditorView } from "codemirror";
|
|
2
|
+
import { ValidIconName } from "../../../../components/Icon/canonicalIconNames";
|
|
3
|
+
declare enum Commands {
|
|
4
|
+
header1 = "Heading 1",
|
|
5
|
+
header2 = "Heading 2",
|
|
6
|
+
header3 = "Heading 3",
|
|
7
|
+
header4 = "Heading 4",
|
|
8
|
+
header5 = "Heading 5",
|
|
9
|
+
header6 = "Heading 6",
|
|
10
|
+
codeBlock = "Code block",
|
|
11
|
+
quote = "Block quote",
|
|
12
|
+
bold = "Bold",
|
|
13
|
+
italic = "Italic",
|
|
14
|
+
strike = "StrikeThrough",
|
|
15
|
+
inlineCode = "Inline code",
|
|
16
|
+
unorderedList = "Unordered list",
|
|
17
|
+
orderedList = "Ordered list",
|
|
18
|
+
todoList = "Todo list",
|
|
19
|
+
link = "Link",
|
|
20
|
+
image = "Image"
|
|
21
|
+
}
|
|
22
|
+
export default class MarkdownCommand {
|
|
23
|
+
private view;
|
|
24
|
+
static commands: {
|
|
25
|
+
readonly paragraphs: readonly [Commands.header1, Commands.header2, Commands.header3, Commands.header4, Commands.header5, Commands.header6, Commands.quote, Commands.codeBlock];
|
|
26
|
+
readonly basic: {
|
|
27
|
+
title: Commands;
|
|
28
|
+
icon: ValidIconName;
|
|
29
|
+
}[];
|
|
30
|
+
readonly lists: {
|
|
31
|
+
title: Commands;
|
|
32
|
+
icon: ValidIconName;
|
|
33
|
+
moniker: string;
|
|
34
|
+
}[];
|
|
35
|
+
readonly attachments: {
|
|
36
|
+
title: Commands;
|
|
37
|
+
icon: ValidIconName;
|
|
38
|
+
}[];
|
|
39
|
+
};
|
|
40
|
+
constructor(view: EditorView);
|
|
41
|
+
/**
|
|
42
|
+
* Supported list types are ol, ul, todo.
|
|
43
|
+
* utility helps to determine which at the start of the line
|
|
44
|
+
*/
|
|
45
|
+
private getListTypeOfLine;
|
|
46
|
+
private createListDelimiter;
|
|
47
|
+
private createList;
|
|
48
|
+
private enforceCursorFocus;
|
|
49
|
+
private createHeading;
|
|
50
|
+
private applyFormatting;
|
|
51
|
+
private applyAttachment;
|
|
52
|
+
private applyQuoteFormatting;
|
|
53
|
+
executeCommand: (command: Commands) => true | void;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EditorView } from "codemirror";
|
|
3
|
+
interface MarkdownToolbarProps {
|
|
4
|
+
view?: EditorView;
|
|
5
|
+
togglePreviewStatus: () => void;
|
|
6
|
+
showPreview: boolean;
|
|
7
|
+
translate: (key: string) => string | false;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const MarkdownToolbar: React.FC<MarkdownToolbarProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Diagnostic } from "@codemirror/lint";
|
|
2
|
+
import { Extension } from "@codemirror/state";
|
|
3
|
+
import { EditorView } from "@codemirror/view";
|
|
4
|
+
export type Linter = (view: EditorView) => ReadonlyArray<Diagnostic> | Promise<ReadonlyArray<Diagnostic>>;
|
|
5
|
+
export type ExtensionCreator<T = unknown> = (options?: T) => Extension;
|
|
@@ -11,9 +11,19 @@ import { NodeHighlightColor } from "./sharedTypes";
|
|
|
11
11
|
type NodeContentHandleLegacyProps = HandleProps;
|
|
12
12
|
type NodeContentHandleNextProps = HandleNextProps;
|
|
13
13
|
export type NodeContentHandleProps = NodeContentHandleLegacyProps | NodeContentHandleNextProps;
|
|
14
|
-
type NodeDimensions = {
|
|
15
|
-
width
|
|
16
|
-
height
|
|
14
|
+
export type NodeDimensions = {
|
|
15
|
+
width?: number;
|
|
16
|
+
height?: number;
|
|
17
|
+
};
|
|
18
|
+
type ResizeDirections = {
|
|
19
|
+
right: true;
|
|
20
|
+
bottom?: false;
|
|
21
|
+
} | {
|
|
22
|
+
right?: false;
|
|
23
|
+
bottom: true;
|
|
24
|
+
} | {
|
|
25
|
+
right: true;
|
|
26
|
+
bottom: true;
|
|
17
27
|
};
|
|
18
28
|
type IntroductionTime = {
|
|
19
29
|
/**
|
|
@@ -185,12 +195,16 @@ export interface NodeContentProps<NODE_DATA, NODE_CONTENT_PROPS = any> extends N
|
|
|
185
195
|
* width and height dimensions of the node (Optional)
|
|
186
196
|
*/
|
|
187
197
|
nodeDimensions?: NodeDimensions;
|
|
198
|
+
/** if node is resizable, this allows direction of specificity */
|
|
199
|
+
resizeDirections?: ResizeDirections;
|
|
200
|
+
/** determines how much width a node can be resized to */
|
|
201
|
+
resizeMaxDimensions?: Partial<NodeDimensions>;
|
|
188
202
|
}
|
|
189
203
|
/**
|
|
190
204
|
* The `NodeContent` element manages the main view of how a node is displaying which content.
|
|
191
205
|
* This element cannot be used directly, all properties must be routed through the `data` property of an `elements` property item inside the `ReactFlow` container.
|
|
192
206
|
*/
|
|
193
|
-
export declare function NodeContent<CONTENT_PROPS = any>({ flowVersion, iconName, depiction, leftElement, typeLabel, label, labelSubline, enlargeHeader, fullWidth, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, intent, border, highlightColor, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, introductionTime, onNodeResize, nodeDimensions, targetPosition, sourcePosition, isConnectable, selected, letPassWheelEvents, businessData, ...otherDomProps }: NodeContentProps<any>): React.JSX.Element;
|
|
207
|
+
export declare function NodeContent<CONTENT_PROPS = any>({ flowVersion, iconName, depiction, leftElement, typeLabel, label, labelSubline, enlargeHeader, fullWidth, showExecutionButtons, executionButtons, menuButtons, content, contentExtension, footerContent, size, minimalShape, intent, border, highlightColor, adaptHeightForHandleMinCount, adaptSizeIncrement, getMinimalTooltipData, style, showUnconnectableHandles, animated, introductionTime, onNodeResize, nodeDimensions, resizeDirections, resizeMaxDimensions, targetPosition, sourcePosition, isConnectable, selected, letPassWheelEvents, businessData, ...otherDomProps }: NodeContentProps<any>): React.JSX.Element;
|
|
194
208
|
export declare const nodeContentUtils: {
|
|
195
209
|
evaluateHighlightColors: (baseCustomProperty: string, highlightColor?: NodeHighlightColor | NodeHighlightColor[]) => {
|
|
196
210
|
highlightClassNameSuffix: string[];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
import { Node } from "react-flow-renderer";
|
|
3
|
-
|
|
2
|
+
import { Node, XYPosition } from "react-flow-renderer";
|
|
3
|
+
import { NodeDimensions } from "./NodeContent";
|
|
4
|
+
/** A sticky note for display in the UI as returned from the backend. */
|
|
5
|
+
export interface StickyNote {
|
|
4
6
|
id: string;
|
|
5
7
|
content: string;
|
|
6
8
|
color: string;
|
|
7
|
-
position:
|
|
8
|
-
|
|
9
|
-
};
|
|
9
|
+
position: XYPosition & NodeDimensions;
|
|
10
|
+
}
|
|
10
11
|
export declare const nodeDefaultUtils: {
|
|
11
12
|
generateStyleWithColor: (color: string) => CSSProperties;
|
|
12
|
-
transformNodeToStickyNode: (node: Node<any>) =>
|
|
13
|
+
transformNodeToStickyNode: (node: Node<any>) => StickyNote;
|
|
13
14
|
};
|
|
14
15
|
export default nodeDefaultUtils;
|