@eccenca/gui-elements 24.1.0-rc.4 → 24.1.0-rc.5
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 +23 -2
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js +7 -2
- package/dist/cjs/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +10 -0
- package/dist/cjs/components/Icon/canonicalIconNames.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/extensions/codemirror/CodeMirror.js +35 -7
- package/dist/cjs/extensions/codemirror/CodeMirror.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/esm/cmem/ActivityControl/ActivityControlWidget.js +7 -2
- package/dist/esm/cmem/ActivityControl/ActivityControlWidget.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +10 -0
- package/dist/esm/components/Icon/canonicalIconNames.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/extensions/codemirror/CodeMirror.js +36 -8
- package/dist/esm/extensions/codemirror/CodeMirror.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/types/cmem/ActivityControl/ActivityControlWidget.d.ts +1 -1
- package/dist/types/components/Icon/canonicalIconNames.d.ts +10 -0
- package/dist/types/components/Typography/OverflowText.d.ts +23 -2
- package/dist/types/extensions/codemirror/CodeMirror.d.ts +10 -1
- 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/package.json +21 -19
- package/src/cmem/ActivityControl/ActivityControlWidget.tsx +5 -2
- package/src/components/CodeAutocompleteField/CodeAutocompleteField.stories.tsx +3 -2
- package/src/components/ContextOverlay/ContextOverlay.stories.tsx +15 -4
- 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 +10 -0
- package/src/components/Select/Select.stories.tsx +4 -1
- package/src/components/Typography/OverflowText.tsx +24 -3
- package/src/components/Typography/stories/OverflowText.stories.tsx +33 -0
- package/src/extensions/codemirror/CodeMirror.stories.tsx +5 -17
- package/src/extensions/codemirror/CodeMirror.tsx +65 -7
- package/src/extensions/codemirror/_codemirror.scss +35 -2
- package/src/extensions/codemirror/toolbars/commands/markdown.command.ts +340 -0
- package/src/extensions/codemirror/toolbars/markdown.toolbar.tsx +117 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.command.js","sourceRoot":"","sources":["../../../../../../src/extensions/codemirror/toolbars/commands/markdown.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKrE,IAAK,QAkBJ;AAlBD,WAAK,QAAQ;IACT,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,iCAAqB,CAAA;IACrB,oCAAwB,CAAA;IACxB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,6BAAiB,CAA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AAE,+BAA+B,EAAE,OAAO,EAAE,MAAM,EAAE;SACxB;QAChE,WAAW,EAAE;YACT,EAAE,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE;YAChD,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE;SACF;KACzC,AA1BY,CA0BX;IAuRf,sBAAC;CAAA,AArTD,IAqTC;eArToB,eAAe"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Button } from "../../../components/Button/Button.js";
|
|
3
|
+
import { ContextMenu } from "../../../components/ContextOverlay/index.js";
|
|
4
|
+
import { Icon, IconButton } from "../../../components/Icon/index.js";
|
|
5
|
+
import { MenuItem } from "../../../components/Menu/index.js";
|
|
6
|
+
import { Spacing } from "../../../components/Separation/Spacing.js";
|
|
7
|
+
import { Toolbar, ToolbarSection } from "../../../components/Toolbar/index.js";
|
|
8
|
+
import MarkdownCommand from "./commands/markdown.command.js";
|
|
9
|
+
export var MarkdownToolbar = function (_a) {
|
|
10
|
+
var view = _a.view, togglePreviewStatus = _a.togglePreviewStatus, showPreview = _a.showPreview, disabled = _a.disabled, readonly = _a.readonly, translate = _a.translate;
|
|
11
|
+
var commandRef = React.useRef(null);
|
|
12
|
+
React.useEffect(function () {
|
|
13
|
+
if (view) {
|
|
14
|
+
commandRef.current = new MarkdownCommand(view);
|
|
15
|
+
}
|
|
16
|
+
}, [view]);
|
|
17
|
+
var getTranslation = function (fallback) {
|
|
18
|
+
var key = fallback.toLowerCase().replace(" ", "-");
|
|
19
|
+
return translate(key) || fallback;
|
|
20
|
+
};
|
|
21
|
+
var _b = MarkdownCommand.commands, basic = _b.basic, lists = _b.lists, attachments = _b.attachments;
|
|
22
|
+
return (React.createElement(Toolbar, { noWrap: true },
|
|
23
|
+
React.createElement(ToolbarSection, { canShrink: true, hideOverflow: true },
|
|
24
|
+
React.createElement(ContextMenu, { togglerElement: React.createElement(Button, { rightIcon: React.createElement(Icon, { name: "toggler-showmore" }), text: getTranslation("Paragraphs"), minimal: true, fill: true, ellipsizeText: true, disabled: showPreview || disabled || readonly }) }, MarkdownCommand.commands.paragraphs.map(function (p, i) { return (React.createElement(MenuItem, { key: p, text: React.createElement(React.Fragment, null,
|
|
25
|
+
React.createElement("span", { style: p.startsWith("Head") ? { fontSize: 22 - (i * (22 - 12)) / 5 } : {} }, getTranslation(p))), onClick: function () { var _a; return (_a = commandRef.current) === null || _a === void 0 ? void 0 : _a.executeCommand(p); } })); }))),
|
|
26
|
+
React.createElement(ToolbarSection, { canShrink: true },
|
|
27
|
+
React.createElement(Spacing, { vertical: true, hasDivider: true, size: "tiny" })),
|
|
28
|
+
[basic, lists, attachments].map(function (section, i) {
|
|
29
|
+
return (React.createElement(React.Fragment, { key: i },
|
|
30
|
+
React.createElement(ToolbarSection, null, section.map(function (command) {
|
|
31
|
+
return (React.createElement(IconButton, { key: command.title, name: command.icon, onClick: function () { var _a; return (_a = commandRef.current) === null || _a === void 0 ? void 0 : _a.executeCommand(command.title); }, text: getTranslation(command.title), disabled: showPreview || disabled || readonly }));
|
|
32
|
+
})),
|
|
33
|
+
i < 2 && (React.createElement(ToolbarSection, { canShrink: true },
|
|
34
|
+
React.createElement(Spacing, { vertical: true, hasDivider: true, size: "tiny" })))));
|
|
35
|
+
}),
|
|
36
|
+
React.createElement(ToolbarSection, { canGrow: true, canShrink: true },
|
|
37
|
+
React.createElement(Spacing, { vertical: true, size: "small" })),
|
|
38
|
+
React.createElement(ToolbarSection, { canShrink: true, hideOverflow: true },
|
|
39
|
+
React.createElement(Button, { minimal: true, ellipsizeText: true, onClick: togglePreviewStatus, text: showPreview ? getTranslation("Continue editing") : getTranslation("Preview"), icon: showPreview ? "item-edit" : "item-viewdetails", disabled: disabled }))));
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=markdown.toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AG,EAAE,OAAO,CAAC,KAAK,EAClB,IAAI,EAAE,OAAO,CAAC,IAAI,EAClB,OAAO,EAAE,sBAAM,OAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA,EAAA,EAChE,IAAI,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,EACnC,QAAQ,EAAE,WAAW,IAAI,QAAQ,IAAI,QAAQ,GAC/C,CACL,CAAC;gBACN,CAAC,CAAC,CACW;gBAChB,CAAC,GAAG,CAAC,IAAI,CACN,oBAAC,cAAc,IAAC,SAAS;oBACrB,oBAAC,OAAO,IAAC,QAAQ,QAAC,UAAU,QAAC,IAAI,EAAC,MAAM,GAAG,CAC9B,CACpB,CACY,CACpB,CAAC;QACN,CAAC,CAAC;QACF,oBAAC,cAAc,IAAC,OAAO,QAAC,SAAS;YAC7B,oBAAC,OAAO,IAAC,QAAQ,QAAC,IAAI,EAAC,OAAO,GAAG,CACpB;QACjB,oBAAC,cAAc,IAAC,SAAS,QAAC,YAAY;YAClC,oBAAC,MAAM,IACH,OAAO,QACP,aAAa,QACb,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,EAClF,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,kBAAkB,EACpD,QAAQ,EAAE,QAAQ,GACpB,CACW,CACX,CACb,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -69,7 +69,7 @@ interface IActivityContextMenu extends TestableComponent {
|
|
|
69
69
|
menuItems: IActivityMenuAction[];
|
|
70
70
|
}
|
|
71
71
|
export interface ActivityControlWidgetAction extends TestableComponent {
|
|
72
|
-
action: () =>
|
|
72
|
+
action: () => void;
|
|
73
73
|
tooltip?: string;
|
|
74
74
|
icon: ValidIconName | React.ReactElement<TestIconProps>;
|
|
75
75
|
disabled?: boolean;
|
|
@@ -17,6 +17,8 @@ declare const canonicalIcons: {
|
|
|
17
17
|
"artefact-commit": icons.CarbonIconType;
|
|
18
18
|
"artefact-task-deleteprojectfiles": icons.CarbonIconType;
|
|
19
19
|
"artefact-task-downloadfile": icons.CarbonIconType;
|
|
20
|
+
"artefact-task-pivot": icons.CarbonIconType;
|
|
21
|
+
"artefact-task-unpivot": icons.CarbonIconType;
|
|
20
22
|
"artefact-task-concatenatetofile": icons.CarbonIconType;
|
|
21
23
|
"artefact-dataset-csv": icons.CarbonIconType;
|
|
22
24
|
"artefact-dataset-eccencadataplatform": icons.CarbonIconType;
|
|
@@ -81,6 +83,7 @@ declare const canonicalIcons: {
|
|
|
81
83
|
"item-vertmenu": icons.CarbonIconType;
|
|
82
84
|
"item-viewdetails": icons.CarbonIconType;
|
|
83
85
|
"item-hidedetails": icons.CarbonIconType;
|
|
86
|
+
"item-image": icons.CarbonIconType;
|
|
84
87
|
"list-sortasc": icons.CarbonIconType;
|
|
85
88
|
"list-sortdesc": icons.CarbonIconType;
|
|
86
89
|
"list-sort": icons.CarbonIconType;
|
|
@@ -118,6 +121,13 @@ declare const canonicalIcons: {
|
|
|
118
121
|
"operation-filterremove": icons.CarbonIconType;
|
|
119
122
|
"operation-filter": icons.CarbonIconType;
|
|
120
123
|
"operation-format-codeblock": icons.CarbonIconType;
|
|
124
|
+
"operation-format-text-code": icons.CarbonIconType;
|
|
125
|
+
"operation-format-text-bold": icons.CarbonIconType;
|
|
126
|
+
"operation-format-text-italic": icons.CarbonIconType;
|
|
127
|
+
"operation-format-text-strikethrough": icons.CarbonIconType;
|
|
128
|
+
"operation-format-list-bullet": icons.CarbonIconType;
|
|
129
|
+
"operation-format-list-checked": icons.CarbonIconType;
|
|
130
|
+
"operation-format-list-numbered": icons.CarbonIconType;
|
|
121
131
|
"operation-fix": icons.CarbonIconType;
|
|
122
132
|
"operation-link": icons.CarbonIconType;
|
|
123
133
|
"operation-logout": icons.CarbonIconType;
|
|
@@ -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. */
|
|
@@ -119,11 +119,20 @@ export interface CodeEditorProps extends TestableComponent {
|
|
|
119
119
|
* Disables the editor.
|
|
120
120
|
*/
|
|
121
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;
|
|
122
131
|
}
|
|
123
132
|
/**
|
|
124
133
|
* Includes a code editor, currently we use CodeMirror library as base.
|
|
125
134
|
*/
|
|
126
135
|
export declare const CodeEditor: {
|
|
127
|
-
({ 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, ...otherCodeEditorProps }: 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;
|
|
128
137
|
supportedModes: ("markdown" | "python" | "sparql" | "turtle" | "xml" | "yaml" | "jinja2" | "json" | "ntriples" | "mathematica" | "sql" | "javascript")[];
|
|
129
138
|
};
|
|
@@ -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 {};
|
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": "24.1.0-rc.
|
|
4
|
+
"version": "24.1.0-rc.5",
|
|
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",
|
|
@@ -106,27 +106,27 @@
|
|
|
106
106
|
"xml-formatter": "^3.6.3"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@babel/core": "^7.26.
|
|
110
|
-
"@babel/plugin-
|
|
111
|
-
"@babel/plugin-
|
|
112
|
-
"@babel/plugin-
|
|
113
|
-
"@babel/preset-env": "^7.26.
|
|
109
|
+
"@babel/core": "^7.26.10",
|
|
110
|
+
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
111
|
+
"@babel/plugin-transform-private-methods": "^7.25.9",
|
|
112
|
+
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
|
|
113
|
+
"@babel/preset-env": "^7.26.9",
|
|
114
114
|
"@babel/preset-flow": "^7.25.9",
|
|
115
115
|
"@babel/preset-react": "^7.26.3",
|
|
116
|
-
"@babel/preset-typescript": "^7.
|
|
116
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
117
117
|
"@eslint/compat": "^1.2.4",
|
|
118
118
|
"@eslint/eslintrc": "^3.2.0",
|
|
119
119
|
"@eslint/js": "^9.17.0",
|
|
120
|
-
"@storybook/addon-actions": "^8.
|
|
121
|
-
"@storybook/addon-essentials": "^8.
|
|
122
|
-
"@storybook/addon-jest": "^8.
|
|
123
|
-
"@storybook/addon-links": "^8.
|
|
124
|
-
"@storybook/addon-webpack5-compiler-babel": "^3.0.
|
|
125
|
-
"@storybook/cli": "^8.
|
|
120
|
+
"@storybook/addon-actions": "^8.6.9",
|
|
121
|
+
"@storybook/addon-essentials": "^8.6.9",
|
|
122
|
+
"@storybook/addon-jest": "^8.6.9",
|
|
123
|
+
"@storybook/addon-links": "^8.6.9",
|
|
124
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
125
|
+
"@storybook/cli": "^8.6.9",
|
|
126
126
|
"@storybook/preset-scss": "^1.0.3",
|
|
127
|
-
"@storybook/react": "^8.
|
|
128
|
-
"@storybook/react-webpack5": "^8.
|
|
129
|
-
"@storybook/test": "^8.
|
|
127
|
+
"@storybook/react": "^8.6.9",
|
|
128
|
+
"@storybook/react-webpack5": "^8.6.9",
|
|
129
|
+
"@storybook/test": "^8.6.9",
|
|
130
130
|
"@testing-library/jest-dom": "^6.6.3",
|
|
131
131
|
"@testing-library/react": "^12.1.2",
|
|
132
132
|
"@types/codemirror": "^5.60.15",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"@typescript-eslint/eslint-plugin": "^8.18.1",
|
|
140
140
|
"@typescript-eslint/parser": "^8.18.1",
|
|
141
141
|
"babel-jest": "^29.7.0",
|
|
142
|
-
"chromatic": "^11.
|
|
142
|
+
"chromatic": "^11.27.0",
|
|
143
143
|
"eslint": "^9.17.0",
|
|
144
144
|
"eslint-plugin-react": "^7.37.2",
|
|
145
145
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"rimraf": "^5.0.10",
|
|
160
160
|
"sass": "1.62.1",
|
|
161
161
|
"sass-loader": "10.3.1",
|
|
162
|
-
"storybook": "^8.
|
|
162
|
+
"storybook": "^8.6.9",
|
|
163
163
|
"stylelint": "^15.11.0",
|
|
164
164
|
"stylelint-config-recess-order": "^4.6.0",
|
|
165
165
|
"stylelint-config-standard-scss": "^9.0.0",
|
|
@@ -178,7 +178,9 @@
|
|
|
178
178
|
"**/@types/react": "^17.0.83",
|
|
179
179
|
"node-sass-package-importer/**/postcss": "^8.4.49",
|
|
180
180
|
"**/cross-spawn": "^7.0.5 ",
|
|
181
|
-
"**/micromatch": "^4.0.8"
|
|
181
|
+
"**/micromatch": "^4.0.8",
|
|
182
|
+
"**/@babel/runtime": "^7.26.10",
|
|
183
|
+
"**/@babel/helpers": "^7.26.10"
|
|
182
184
|
},
|
|
183
185
|
"husky": {
|
|
184
186
|
"hooks": {
|
|
@@ -92,7 +92,7 @@ interface IActivityContextMenu extends TestableComponent {
|
|
|
92
92
|
|
|
93
93
|
export interface ActivityControlWidgetAction extends TestableComponent {
|
|
94
94
|
// The action that should be triggered
|
|
95
|
-
action: () =>
|
|
95
|
+
action: () => void;
|
|
96
96
|
// The tooltip that should be shown over the action icon
|
|
97
97
|
tooltip?: string;
|
|
98
98
|
// The icon of the action button
|
|
@@ -147,6 +147,7 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
|
|
|
147
147
|
{props.label && (
|
|
148
148
|
<OverviewItemLine small={small}>
|
|
149
149
|
{React.cloneElement(labelWrapper, {}, props.label)}
|
|
150
|
+
{timerExecutionMsg && (props.statusMessage || tags) && <> ({timerExecutionMsg})</>}
|
|
150
151
|
</OverviewItemLine>
|
|
151
152
|
)}
|
|
152
153
|
{(props.statusMessage || tags) && (
|
|
@@ -170,7 +171,9 @@ export function ActivityControlWidget(props: ActivityControlWidgetProps) {
|
|
|
170
171
|
)}
|
|
171
172
|
</OverviewItemLine>
|
|
172
173
|
)}
|
|
173
|
-
{timerExecutionMsg &&
|
|
174
|
+
{timerExecutionMsg && !(props.statusMessage || tags) && (
|
|
175
|
+
<OverviewItemLine small>{timerExecutionMsg}</OverviewItemLine>
|
|
176
|
+
)}
|
|
174
177
|
</OverviewItemDescription>
|
|
175
178
|
<OverviewItemActions>
|
|
176
179
|
{activityActions &&
|
|
@@ -15,9 +15,10 @@ export default {
|
|
|
15
15
|
},
|
|
16
16
|
} as Meta<typeof CodeAutocompleteField>;
|
|
17
17
|
|
|
18
|
+
let forcedUpdateKey = 0; // @see https://github.com/storybookjs/storybook/issues/13375#issuecomment-1291011856
|
|
18
19
|
const Template: StoryFn<typeof CodeAutocompleteField> = (args) => (
|
|
19
20
|
<OverlaysProvider>
|
|
20
|
-
<CodeAutocompleteField {...args} />
|
|
21
|
+
<CodeAutocompleteField {...args} key={++forcedUpdateKey} />
|
|
21
22
|
</OverlaysProvider>
|
|
22
23
|
);
|
|
23
24
|
|
|
@@ -63,7 +64,7 @@ const defaultProps: CodeAutocompleteFieldProps = {
|
|
|
63
64
|
},
|
|
64
65
|
placeholder:
|
|
65
66
|
"The word before the cursor will be auto-completed. At the beginning or after a space, all results are shown.",
|
|
66
|
-
onChange():
|
|
67
|
+
onChange(): void {
|
|
67
68
|
// Do nothing
|
|
68
69
|
},
|
|
69
70
|
};
|
|
@@ -4,31 +4,40 @@ import { PopoverInteractionKind, PopperModifierOverrides } from "@blueprintjs/co
|
|
|
4
4
|
import { PopperPlacements } from "@blueprintjs/core";
|
|
5
5
|
import { OverlaysProvider } from "@blueprintjs/core";
|
|
6
6
|
import { Meta, StoryFn } from "@storybook/react";
|
|
7
|
+
import { fn } from "@storybook/test";
|
|
7
8
|
|
|
8
9
|
import { Button, ContextOverlay, HtmlContentBlock } from "../../index";
|
|
9
10
|
|
|
11
|
+
const interactionKindOptions = { UNDEFINED: undefined, ...PopoverInteractionKind };
|
|
12
|
+
const rootBoundaryOptions = { UNDEFINED: undefined, VIEWPORT: "viewport", DOCUMENT: "document" };
|
|
13
|
+
const positioningStrategyOptions = { UNDEFINED: undefined, ABSOLUTE: "absolute", FIXED: "fixed" };
|
|
14
|
+
|
|
10
15
|
export default {
|
|
11
16
|
title: "Components/ContextOverlay",
|
|
12
17
|
component: ContextOverlay,
|
|
13
18
|
argTypes: {
|
|
14
19
|
interactionKind: {
|
|
15
|
-
options:
|
|
20
|
+
options: Object.keys(interactionKindOptions),
|
|
21
|
+
mapping: interactionKindOptions,
|
|
16
22
|
},
|
|
17
23
|
placement: {
|
|
18
24
|
options: PopperPlacements,
|
|
19
25
|
},
|
|
20
26
|
rootBoundary: {
|
|
21
|
-
options:
|
|
27
|
+
options: Object.keys(rootBoundaryOptions),
|
|
28
|
+
mapping: rootBoundaryOptions,
|
|
22
29
|
},
|
|
23
30
|
positioningStrategy: {
|
|
24
|
-
options:
|
|
31
|
+
options: Object.keys(positioningStrategyOptions),
|
|
32
|
+
mapping: positioningStrategyOptions,
|
|
25
33
|
},
|
|
26
34
|
},
|
|
27
35
|
} as Meta<typeof ContextOverlay>;
|
|
28
36
|
|
|
37
|
+
let forcedUpdateKey = 0;
|
|
29
38
|
const Template: StoryFn<typeof ContextOverlay> = (args) => (
|
|
30
39
|
<OverlaysProvider>
|
|
31
|
-
<ContextOverlay {...args} />
|
|
40
|
+
<ContextOverlay {...args} key={++forcedUpdateKey} />
|
|
32
41
|
</OverlaysProvider>
|
|
33
42
|
);
|
|
34
43
|
|
|
@@ -55,4 +64,6 @@ Default.args = {
|
|
|
55
64
|
} as PopperModifierOverrides,
|
|
56
65
|
rootBoundary: "viewport",
|
|
57
66
|
hasBackdrop: false,
|
|
67
|
+
onOpening: fn(),
|
|
68
|
+
onInteraction: fn(),
|
|
58
69
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OverlaysProvider } from "@blueprintjs/core";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
import { fn } from "@storybook/test";
|
|
4
5
|
|
|
5
6
|
import { AlertDialog } from "./../../../../index";
|
|
6
|
-
import { Default as SimpleDialogExample } from "./SimpleDialog.stories";
|
|
7
|
+
import simpleDialogStory, { Default as SimpleDialogExample } from "./SimpleDialog.stories";
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
title: "Components/Dialog/AlertDialog",
|
|
10
11
|
component: AlertDialog,
|
|
11
12
|
argTypes: {
|
|
13
|
+
...simpleDialogStory.argTypes,
|
|
12
14
|
headerOptions: { table: { disable: true } },
|
|
13
15
|
children: { table: { disable: true } },
|
|
14
16
|
actions: { table: { disable: true } },
|
|
@@ -42,4 +44,6 @@ Default.args = {
|
|
|
42
44
|
success: false,
|
|
43
45
|
warning: true,
|
|
44
46
|
danger: false,
|
|
47
|
+
onOpening: fn(),
|
|
48
|
+
onClosing: fn(),
|
|
45
49
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OverlaysProvider } from "@blueprintjs/core";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
import { fn } from "@storybook/test";
|
|
4
5
|
|
|
5
6
|
import { SimpleCard } from "../../Card/stories/Card.stories";
|
|
6
7
|
|
|
@@ -11,8 +12,7 @@ export default {
|
|
|
11
12
|
component: Modal,
|
|
12
13
|
argTypes: {
|
|
13
14
|
children: {
|
|
14
|
-
control:
|
|
15
|
-
description: "Elements to include into the modal container.",
|
|
15
|
+
control: false,
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
18
|
} as Meta<typeof Modal>;
|
|
@@ -30,4 +30,6 @@ Default.args = {
|
|
|
30
30
|
isOpen: true,
|
|
31
31
|
usePortal: false,
|
|
32
32
|
children: <Card {...SimpleCard.args} />,
|
|
33
|
+
onOpening: fn(),
|
|
34
|
+
onClosing: fn(),
|
|
33
35
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OverlaysProvider } from "@blueprintjs/core";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
import { fn } from "@storybook/test";
|
|
4
5
|
|
|
5
6
|
import { SimpleDialog } from "./../../../../index";
|
|
6
7
|
import { Default as CardActionsExample } from "./../../Card/stories/CardActions.stories";
|
|
@@ -14,10 +15,10 @@ export default {
|
|
|
14
15
|
argTypes: {
|
|
15
16
|
...storyModal.argTypes,
|
|
16
17
|
headerOptions: {
|
|
17
|
-
control:
|
|
18
|
+
control: false,
|
|
18
19
|
},
|
|
19
20
|
actions: {
|
|
20
|
-
control:
|
|
21
|
+
control: false,
|
|
21
22
|
},
|
|
22
23
|
},
|
|
23
24
|
} as Meta<typeof SimpleDialog>;
|
|
@@ -39,4 +40,6 @@ Default.args = {
|
|
|
39
40
|
hasBorder: true,
|
|
40
41
|
isOpen: true,
|
|
41
42
|
usePortal: false,
|
|
43
|
+
onOpening: fn(),
|
|
44
|
+
onClosing: fn(),
|
|
42
45
|
};
|
|
@@ -19,6 +19,8 @@ const canonicalIcons = {
|
|
|
19
19
|
"artefact-commit": icons.Commit,
|
|
20
20
|
"artefact-task-deleteprojectfiles": icons.TrashCan,
|
|
21
21
|
"artefact-task-downloadfile": icons.CloudDownload,
|
|
22
|
+
"artefact-task-pivot": icons.Transpose,
|
|
23
|
+
"artefact-task-unpivot": icons.Transpose,
|
|
22
24
|
"artefact-task-concatenatetofile": icons.DocumentExport,
|
|
23
25
|
"artefact-dataset-csv": icons.Csv,
|
|
24
26
|
"artefact-dataset-eccencadataplatform": icons.DataVis_1,
|
|
@@ -86,6 +88,7 @@ const canonicalIcons = {
|
|
|
86
88
|
"item-vertmenu": icons.OverflowMenuHorizontal,
|
|
87
89
|
"item-viewdetails": icons.View,
|
|
88
90
|
"item-hidedetails": icons.ViewOff,
|
|
91
|
+
"item-image": icons.Image,
|
|
89
92
|
|
|
90
93
|
"list-sortasc": icons.ArrowDown,
|
|
91
94
|
"list-sortdesc": icons.ArrowUp,
|
|
@@ -127,6 +130,13 @@ const canonicalIcons = {
|
|
|
127
130
|
"operation-filterremove": icons.FilterRemove,
|
|
128
131
|
"operation-filter": icons.Filter,
|
|
129
132
|
"operation-format-codeblock": icons.CodeBlock,
|
|
133
|
+
"operation-format-text-code": icons.Code,
|
|
134
|
+
"operation-format-text-bold": icons.TextBold,
|
|
135
|
+
"operation-format-text-italic": icons.TextItalic,
|
|
136
|
+
"operation-format-text-strikethrough": icons.TextStrikethrough,
|
|
137
|
+
"operation-format-list-bullet": icons.ListBulleted,
|
|
138
|
+
"operation-format-list-checked": icons.ListChecked,
|
|
139
|
+
"operation-format-list-numbered": icons.ListNumbered,
|
|
130
140
|
"operation-fix": icons.Tools,
|
|
131
141
|
"operation-link": icons.Link,
|
|
132
142
|
"operation-logout": icons.Logout,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { loremIpsum } from "react-lorem-ipsum";
|
|
3
3
|
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
import { fn } from "@storybook/test";
|
|
4
5
|
|
|
5
6
|
import { helpersArgTypes } from "../../../.storybook/helpers";
|
|
6
7
|
import { Button, Depiction, MenuItem, Select } from "../../index";
|
|
@@ -30,7 +31,7 @@ Default.args = {
|
|
|
30
31
|
return { label: item };
|
|
31
32
|
}),
|
|
32
33
|
itemRenderer: (item, props) => {
|
|
33
|
-
return <MenuItem text={item.label} title={item.label} />;
|
|
34
|
+
return <MenuItem text={item.label} title={item.label} {...props} />;
|
|
34
35
|
},
|
|
35
36
|
fill: true,
|
|
36
37
|
};
|
|
@@ -53,6 +54,7 @@ ControlledTarget.args = {
|
|
|
53
54
|
...Default.args,
|
|
54
55
|
fill: false,
|
|
55
56
|
children: <Button text="Controlled select target" intent="primary" />,
|
|
57
|
+
onActiveItemChange: fn(),
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
/**
|
|
@@ -70,4 +72,5 @@ ClearanceOption.args = {
|
|
|
70
72
|
onClearanceHandler: () => {
|
|
71
73
|
alert("Reset now.");
|
|
72
74
|
},
|
|
75
|
+
onActiveItemChange: fn(),
|
|
73
76
|
};
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
import { CLASSPREFIX as eccgui } from "../../configuration/constants";
|
|
4
|
+
import { TestableComponent } from "../../components/interfaces";
|
|
4
5
|
|
|
5
|
-
export interface OverflowTextProps {
|
|
6
|
-
|
|
6
|
+
export interface OverflowTextProps extends React.HTMLAttributes<HTMLElement>, TestableComponent {
|
|
7
|
+
/**
|
|
8
|
+
* How is ellipsis used to cut text overflows.
|
|
9
|
+
* Use `reverse`to use the ellipis on text start and display the end of the text.
|
|
10
|
+
*/
|
|
11
|
+
ellipsis?: "add" | "reverse" | "none";
|
|
12
|
+
/**
|
|
13
|
+
* Display component as inline element.
|
|
14
|
+
*/
|
|
7
15
|
inline?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Using text overflow on all children elements.
|
|
18
|
+
*/
|
|
8
19
|
passDown?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Additional CSS class name.
|
|
22
|
+
*/
|
|
9
23
|
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* HTML element that is used for the component.
|
|
26
|
+
*/
|
|
10
27
|
useHtmlElement?: "p" | "div" | "span";
|
|
28
|
+
/**
|
|
29
|
+
* Used for all other necessary properties.
|
|
30
|
+
* @deprecated (v25) we will allow only basic HTML element properties and testing IDs
|
|
31
|
+
*/
|
|
11
32
|
[key: string]: any;
|
|
12
33
|
}
|
|
13
34
|
|
|
@@ -15,7 +36,7 @@ export interface OverflowTextProps {
|
|
|
15
36
|
export const OverflowText = ({
|
|
16
37
|
className = "",
|
|
17
38
|
children,
|
|
18
|
-
ellipsis,
|
|
39
|
+
ellipsis = "add",
|
|
19
40
|
inline = false,
|
|
20
41
|
passDown = false,
|
|
21
42
|
useHtmlElement,
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LoremIpsum, { loremIpsum } from "react-lorem-ipsum";
|
|
3
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
4
|
+
|
|
5
|
+
import { OverflowText } from "../../../index";
|
|
6
|
+
|
|
7
|
+
const config = {
|
|
8
|
+
title: "Components/Typography/OverflowText",
|
|
9
|
+
component: OverflowText,
|
|
10
|
+
argTypes: {
|
|
11
|
+
children: {
|
|
12
|
+
control: "select",
|
|
13
|
+
options: ["simple text", "2 paragraphs"],
|
|
14
|
+
mapping: {
|
|
15
|
+
"simple text": loremIpsum({
|
|
16
|
+
p: 1,
|
|
17
|
+
avgSentencesPerParagraph: 4,
|
|
18
|
+
random: false,
|
|
19
|
+
}),
|
|
20
|
+
"2 paragraphs": <LoremIpsum p={2} avgSentencesPerParagraph={4} random={false} />
|
|
21
|
+
},
|
|
22
|
+
description: "Content of the element.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
} as Meta<typeof OverflowText>;
|
|
26
|
+
export default config;
|
|
27
|
+
|
|
28
|
+
const Template: StoryFn<typeof OverflowText> = (args) => <OverflowText {...args} />;
|
|
29
|
+
|
|
30
|
+
export const Default = Template.bind({});
|
|
31
|
+
Default.args = {
|
|
32
|
+
children: config?.argTypes?.children?.mapping ? config.argTypes.children.mapping["simple text"] : "Overflow text",
|
|
33
|
+
};
|