@eccenca/gui-elements 23.6.0-rc.2 → 23.7.0-rc.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 +38 -19
- package/dist/cjs/cmem/markdown/Markdown.js +10 -2
- package/dist/cjs/cmem/markdown/Markdown.js.map +1 -1
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +4 -4
- package/dist/cjs/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/cjs/components/MultiSelect/MultiSelect.js +67 -41
- package/dist/cjs/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js +1 -1
- package/dist/cjs/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js +7 -7
- package/dist/cjs/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +3 -2
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js +14 -2
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js +6 -8
- package/dist/cjs/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/esm/cmem/markdown/Markdown.js +10 -2
- package/dist/esm/cmem/markdown/Markdown.js.map +1 -1
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js +5 -5
- package/dist/esm/cmem/react-flow/StickyNoteModal/StickyNoteModal.js.map +1 -1
- package/dist/esm/components/MultiSelect/MultiSelect.js +73 -52
- package/dist/esm/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js +1 -1
- package/dist/esm/extensions/codemirror/CodeMirror.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js +7 -7
- package/dist/esm/extensions/react-flow/edges/EdgeDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +3 -2
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleContent.js +13 -2
- package/dist/esm/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleTools.js +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js +6 -8
- package/dist/esm/extensions/react-flow/minimap/MiniMap.js.map +1 -1
- package/dist/types/cmem/react-flow/StickyNoteModal/StickyNoteModal.d.ts +5 -0
- package/dist/types/cmem/react-flow/configuration/graph.d.ts +9 -9
- package/dist/types/cmem/react-flow/configuration/unspecified.d.ts +2 -2
- package/dist/types/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/types/extensions/react-flow/edges/EdgeDefault.d.ts +6 -1
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +1 -1
- package/dist/types/extensions/react-flow/edges/edgeTypes.d.ts +10 -10
- package/dist/types/extensions/react-flow/handles/HandleContent.d.ts +2 -3
- package/dist/types/extensions/react-flow/minimap/MiniMap.d.ts +12 -1
- package/package.json +5 -2
- package/src/cmem/markdown/Markdown.stories.tsx +8 -1
- package/src/cmem/markdown/Markdown.tsx +22 -1
- package/src/cmem/react-flow/ReactFlow/ReactFlow.stories.tsx +10 -4
- package/src/cmem/react-flow/StickyNoteModal/StickyNoteModal.tsx +8 -3
- package/src/components/Card/card.scss +17 -5
- package/src/components/MultiSelect/MultiSelect.tsx +74 -47
- package/src/components/MultiSuggestField/MultiSuggestField.stories.tsx +70 -25
- package/src/components/MultiSuggestField/tests/MultiSuggestField.test.tsx +136 -14
- package/src/extensions/codemirror/CodeMirror.tsx +1 -1
- package/src/extensions/react-flow/edges/EdgeDefault.tsx +70 -62
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +14 -2
- package/src/extensions/react-flow/edges/stories/EdgeDefault.stories.tsx +11 -5
- package/src/extensions/react-flow/edges/stories/EdgeLabel.stories.tsx +2 -0
- package/src/extensions/react-flow/handles/HandleContent.tsx +28 -25
- package/src/extensions/react-flow/handles/HandleTools.tsx +1 -0
- package/src/extensions/react-flow/handles/stories/HandleDefault.stories.tsx +5 -1
- package/src/extensions/react-flow/minimap/MiniMap.stories.tsx +62 -0
- package/src/extensions/react-flow/minimap/MiniMap.tsx +23 -7
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +2 -0
- package/src/extensions/react-flow/nodes/stories/NodeContentExtension.stories.tsx +2 -0
- package/src/extensions/react-flow/nodes/stories/NodeDefault.stories.tsx +0 -1
|
@@ -9,12 +9,23 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import React, { memo } from "react";
|
|
13
24
|
import { CLASSPREFIX as eccgui } from "../../../configuration/constants.js";
|
|
14
25
|
import { Tooltip } from "../../../index.js";
|
|
15
26
|
export var HandleContent = memo(function (_a) {
|
|
16
|
-
var children = _a.children, extendedTooltip = _a.extendedTooltip, tooltipProps = _a.tooltipProps;
|
|
17
|
-
var handleContent = children ? (React.createElement("div", { className: "".concat(eccgui, "-graphviz__handle__content") }, children)) : extendedTooltip ? (React.createElement("div", { className: "".concat(eccgui, "-graphviz__handle__content") })) : (React.createElement(React.Fragment, null));
|
|
27
|
+
var children = _a.children, extendedTooltip = _a.extendedTooltip, tooltipProps = _a.tooltipProps, otherDivProps = __rest(_a, ["children", "extendedTooltip", "tooltipProps"]);
|
|
28
|
+
var handleContent = children ? (React.createElement("div", __assign({ className: "".concat(eccgui, "-graphviz__handle__content") }, otherDivProps), children)) : extendedTooltip ? (React.createElement("div", __assign({ className: "".concat(eccgui, "-graphviz__handle__content") }, otherDivProps))) : (React.createElement(React.Fragment, null));
|
|
18
29
|
if (extendedTooltip && (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.isOpen)) {
|
|
19
30
|
return (React.createElement(Tooltip, __assign({ content: extendedTooltip, autoFocus: false, enforceFocus: false, openOnTargetFocus: false }, tooltipProps), handleContent));
|
|
20
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleContent.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HandleContent.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAgB,MAAM,gBAAgB,CAAC;AAavD,MAAM,CAAC,IAAM,aAAa,GAAG,IAAI,CAC7B,UAAC,EAAiF;IAA/E,IAAA,QAAQ,cAAA,EAAE,eAAe,qBAAA,EAAE,YAAY,kBAAA,EAAK,aAAa,cAA3D,+CAA6D,CAAF;IACxD,IAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAC7B,sCAAK,SAAS,EAAE,UAAG,MAAM,+BAA4B,IAAM,aAAa,GACnE,QAAQ,CACP,CACT,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAClB,sCAAK,SAAS,EAAE,UAAG,MAAM,+BAA4B,IAAM,aAAa,EAAI,CAC/E,CAAC,CAAC,CAAC,CACA,yCAAK,CACR,CAAC;IAEF,IAAI,eAAe,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,CAAA,EAAE;QACzC,OAAO,CACH,oBAAC,OAAO,aACJ,OAAO,EAAE,eAAe,EACxB,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,KAAK,EACnB,iBAAiB,EAAE,KAAK,IACpB,YAAY,GAEf,aAAa,CACR,CACb,CAAC;KACL;IAED,OAAO,aAAa,CAAC;AACzB,CAAC,CACJ,CAAC"}
|
|
@@ -56,6 +56,6 @@ export var HandleTools = function (_a) {
|
|
|
56
56
|
},
|
|
57
57
|
};
|
|
58
58
|
return (React.createElement(ContextOverlay, __assign({ hoverCloseDelay: 500 }, configToolsDisplayed, otherContextOverlayProps, { content: React.createElement("div", { className: "".concat(eccgui, "-graphviz__handletools-content") }, children), className: "".concat(eccgui, "-graphviz__handletools-target"), popoverClassName: "".concat(eccgui, "-graphviz__handletools-overlay") }),
|
|
59
|
-
React.createElement("div", { className: "".concat(eccgui, "-graphviz__handletools-target"), "data-test-id": otherContextOverlayProps["data-test-id"] })));
|
|
59
|
+
React.createElement("div", { className: "".concat(eccgui, "-graphviz__handletools-target"), "data-test-id": otherContextOverlayProps["data-test-id"], "data-testid": otherContextOverlayProps["data-testid"] })));
|
|
60
60
|
};
|
|
61
61
|
//# sourceMappingURL=HandleTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleTools.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleTools.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,IAAI,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAE9F,OAAO,EAAE,WAAW,IAAI,MAAM,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAqB,MAAM,gBAAgB,CAAC;AAUnE,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,EAA2D;IAAzD,IAAA,QAAQ,cAAA,EAAK,wBAAwB,cAAvC,YAAyC,CAAF;IACzD,IAAA,KAAA,OAAsC,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,IAAA,EAAnE,cAAc,QAAA,EAAE,iBAAiB,QAAkC,CAAC;IAE3E,IAAM,oBAAoB,GAAG,cAAc;QACvC,CAAC,CAAC;YACI,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,IAAI;YACf,eAAe,EAAE,+BAA+B,CAAC,KAAK;YACtD,SAAS,EAAE,cAAM,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB;SAC5C;QACH,CAAC,CAAC;YACI,SAAS,EAAE;gBACP,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;SACJ,CAAC;IAER,OAAO,CACH,oBAAC,cAAc,aACX,eAAe,EAAE,GAAG,IAChB,oBAAoB,EACpB,wBAAwB,IAC5B,OAAO,EAAE,6BAAK,SAAS,EAAE,UAAG,MAAM,mCAAgC,IAAG,QAAQ,CAAO,EACpF,SAAS,EAAE,UAAG,MAAM,kCAA+B,EACnD,gBAAgB,EAAE,UAAG,MAAM,mCAAgC;QAE3D,6BACI,SAAS,EAAE,UAAG,MAAM,kCAA+B,kBACrC,wBAAwB,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"HandleTools.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleTools.tsx"],"names":[],"mappings":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f = {
|
|
|
30
30
|
};
|
|
31
31
|
/** An improved mini-map for react-flow that supports navigation via the mini-map. */
|
|
32
32
|
export var MiniMap = memo(function (_a) {
|
|
33
|
-
var
|
|
33
|
+
var _b;
|
|
34
|
+
var flowInstance = _a.flowInstance, _c = _a.enableNavigation, enableNavigation = _c === void 0 ? false : _c, _d = _a.maskColor, maskColor = _d === void 0 ? "#ddddddbb" : _d, _e = _a.nodeClassName, nodeClassName = _e === void 0 ? miniMapUtils.nodeClassName : _e, _f = _a.nodeColor, nodeColor = _f === void 0 ? miniMapUtils.nodeColor : _f, _g = _a.nodeStrokeColor, nodeStrokeColor = _g === void 0 ? miniMapUtils.borderColor : _g, wrapperProps = _a.wrapperProps, minimapProps = __rest(_a, ["flowInstance", "enableNavigation", "maskColor", "nodeClassName", "nodeColor", "nodeStrokeColor", "wrapperProps"]);
|
|
34
35
|
var minimapWrapper = React.useRef(null);
|
|
35
36
|
useEffect(function () {
|
|
36
37
|
var minimapDiv = minimapWrapper.current;
|
|
@@ -78,22 +79,19 @@ export var MiniMap = memo(function (_a) {
|
|
|
78
79
|
flowInstance.setTransform(canvasNewState);
|
|
79
80
|
}
|
|
80
81
|
};
|
|
81
|
-
|
|
82
|
-
sets the view for the user when clicked and finish navigation
|
|
83
|
-
**/
|
|
82
|
+
// sets the view for the user when clicked and finish navigation
|
|
84
83
|
var handleMiniMapMouseUp = function (event) {
|
|
85
84
|
handleMiniMapMouseMove(event);
|
|
86
85
|
minimapCalcConf.navigationOn = false;
|
|
87
86
|
};
|
|
88
|
-
|
|
89
|
-
enables the mini-map fake drag effect see "handleMiniMapMouseMove" above.
|
|
90
|
-
**/
|
|
87
|
+
// enables the mini-map fake drag effect see "handleMiniMapMouseMove" above.
|
|
91
88
|
var handleMiniMapMouseDown = function () {
|
|
92
89
|
if (enableNavigation && flowInstance) {
|
|
93
90
|
minimapCalcConf.navigationOn = true;
|
|
94
91
|
}
|
|
95
92
|
};
|
|
96
|
-
return (React.createElement("div", { ref: minimapWrapper, onMouseDown: handleMiniMapMouseDown, onMouseUp: handleMiniMapMouseUp, onMouseMove: handleMiniMapMouseMove, onMouseLeave: handleMiniMapMouseUp,
|
|
93
|
+
return (React.createElement("div", __assign({ ref: minimapWrapper, onMouseDown: handleMiniMapMouseDown, onMouseUp: handleMiniMapMouseUp, onMouseMove: handleMiniMapMouseMove, onMouseLeave: handleMiniMapMouseUp }, wrapperProps, { style: flowInstance && enableNavigation
|
|
94
|
+
? __assign(__assign({}, ((_b = wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style) !== null && _b !== void 0 ? _b : {})), { cursor: "grab" }) : wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style }),
|
|
97
95
|
React.createElement(ReactFlowMiniMap, __assign({ maskColor: maskColor, nodeClassName: nodeClassName, nodeColor: nodeColor, nodeStrokeColor: nodeStrokeColor }, minimapProps))));
|
|
98
96
|
});
|
|
99
97
|
//# sourceMappingURL=MiniMap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiniMap.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/minimap/MiniMap.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAuD,MAAM,qBAAqB,CAAC;AAGvH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"MiniMap.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/minimap/MiniMap.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAuD,MAAM,qBAAqB,CAAC;AAGvH,OAAO,EAAE,YAA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./../../../index";
|
|
2
3
|
export declare type StickyNoteModalTranslationKeys = "modalTitle" | "noteLabel" | "colorLabel" | "saveButton" | "cancelButton";
|
|
3
4
|
export declare type StickyNoteMetadataType = {
|
|
4
5
|
note: string;
|
|
@@ -22,5 +23,9 @@ export interface StickyNoteModalProps {
|
|
|
22
23
|
* translation utility for language compatibility
|
|
23
24
|
*/
|
|
24
25
|
translate: (key: StickyNoteModalTranslationKeys) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Forward other properties to the `SimpleModal` element that is used for this dialog.
|
|
28
|
+
*/
|
|
29
|
+
simpleDialogProps?: Omit<SimpleDialogProps, "size" | "title" | "hasBorder" | "isOpen" | "onClose" | "actions">;
|
|
25
30
|
}
|
|
26
31
|
export declare const StickyNoteModal: React.FC<StickyNoteModalProps>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GRAPH_NODE_TYPES } from "./typing";
|
|
3
3
|
declare const edgeTypes: {
|
|
4
|
-
default: import("react").MemoExoticComponent<(
|
|
5
|
-
implicit: import("react").MemoExoticComponent<(
|
|
6
|
-
import: import("react").MemoExoticComponent<(
|
|
7
|
-
subclass: import("react").MemoExoticComponent<(
|
|
8
|
-
subproperty: import("react").MemoExoticComponent<(
|
|
9
|
-
rdftype: import("react").MemoExoticComponent<(
|
|
10
|
-
success: import("react").MemoExoticComponent<(
|
|
11
|
-
warning: import("react").MemoExoticComponent<(
|
|
12
|
-
danger: import("react").MemoExoticComponent<(
|
|
4
|
+
default: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
5
|
+
implicit: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
6
|
+
import: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
7
|
+
subclass: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
8
|
+
subproperty: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
9
|
+
rdftype: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
10
|
+
success: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
11
|
+
warning: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
12
|
+
danger: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
13
13
|
};
|
|
14
14
|
declare const nodeTypes: Record<GRAPH_NODE_TYPES, React.ReactNode>;
|
|
15
15
|
export { edgeTypes, nodeTypes };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const edgeTypes: {
|
|
3
|
-
default: import("react").MemoExoticComponent<(
|
|
4
|
-
straight: import("react").MemoExoticComponent<(
|
|
3
|
+
default: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
4
|
+
straight: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./../../../extensions/react-flow/edges/EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
5
5
|
step: import("react").MemoExoticComponent<(edge: import("./../../../extensions/react-flow/edges/EdgeStep").EdgeStepProps) => import("react").JSX.Element>;
|
|
6
6
|
};
|
|
7
7
|
export declare const nodeTypes: {
|
|
@@ -4,7 +4,7 @@ import { MultiSelect as BlueprintMultiSelect, MultiSelectProps as BlueprintMulti
|
|
|
4
4
|
import { TestableComponent } from "../interfaces";
|
|
5
5
|
import { ContextOverlayProps } from "./../../index";
|
|
6
6
|
export interface MultiSelectSelectionProps<T> {
|
|
7
|
-
newlySelected
|
|
7
|
+
newlySelected?: T;
|
|
8
8
|
selectedItems: T[];
|
|
9
9
|
createdItems: Partial<T>[];
|
|
10
10
|
}
|
|
@@ -28,6 +28,11 @@ export interface EdgeDefaultDataProps {
|
|
|
28
28
|
* Callback handler that returns a React element used as edge title.
|
|
29
29
|
*/
|
|
30
30
|
renderLabel?: (edgeCenter: [number, number, number, number]) => React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Properties are forwarded to the internally used SVG `g` element.
|
|
33
|
+
* Data attributes for test ids coud be included here.
|
|
34
|
+
*/
|
|
35
|
+
edgeSvgProps?: React.SVGProps<SVGGElement>;
|
|
31
36
|
}
|
|
32
37
|
export interface EdgeDefaultProps extends ReactFlowEdgeProps {
|
|
33
38
|
/**
|
|
@@ -39,7 +44,7 @@ export interface EdgeDefaultProps extends ReactFlowEdgeProps {
|
|
|
39
44
|
*/
|
|
40
45
|
drawSvgPath?: (edge: ReactFlowEdgeProps) => string;
|
|
41
46
|
}
|
|
42
|
-
export declare const EdgeDefault: React.MemoExoticComponent<(
|
|
47
|
+
export declare const EdgeDefault: React.MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: EdgeDefaultProps) => React.JSX.Element>;
|
|
43
48
|
export declare const edgeDefaultUtils: {
|
|
44
49
|
createEdgeDefaultClassName: ({ strokeType, intent, highlightColor }: EdgeDefaultDataProps, baseClass?: string) => string;
|
|
45
50
|
drawEdgeStep: ({ sourceX, sourceY, sourcePosition, targetX, targetY, targetPosition, data, }: import("./EdgeStep").EdgeStepProps) => string;
|
|
@@ -33,7 +33,7 @@ export interface EdgeLabelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
33
33
|
*/
|
|
34
34
|
intent?: IntentTypes;
|
|
35
35
|
}
|
|
36
|
-
export declare const EdgeLabel: React.MemoExoticComponent<({ depiction, text, actions, large, fullWidth, loose, intent, title, ...otherDivProps }: EdgeLabelProps) => React.JSX.Element>;
|
|
36
|
+
export declare const EdgeLabel: React.MemoExoticComponent<({ depiction, text, actions, large, fullWidth, loose, intent, title, className, ...otherDivProps }: EdgeLabelProps) => React.JSX.Element>;
|
|
37
37
|
export interface EdgeLabelObjectProps extends React.SVGAttributes<SVGForeignObjectElement> {
|
|
38
38
|
/**
|
|
39
39
|
* The `<EdgeLabel />` element that need to be displayed.
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const edgeTypes: {
|
|
3
|
-
default: import("react").MemoExoticComponent<(
|
|
4
|
-
straight: import("react").MemoExoticComponent<(
|
|
3
|
+
default: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
4
|
+
straight: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
5
5
|
step: import("react").MemoExoticComponent<(edge: import("./EdgeStep").EdgeStepProps) => import("react").JSX.Element>;
|
|
6
|
-
success: import("react").MemoExoticComponent<(
|
|
7
|
-
warning: import("react").MemoExoticComponent<(
|
|
8
|
-
danger: import("react").MemoExoticComponent<(
|
|
9
|
-
implicit: import("react").MemoExoticComponent<(
|
|
10
|
-
import: import("react").MemoExoticComponent<(
|
|
11
|
-
subclass: import("react").MemoExoticComponent<(
|
|
12
|
-
subproperty: import("react").MemoExoticComponent<(
|
|
13
|
-
rdftype: import("react").MemoExoticComponent<(
|
|
6
|
+
success: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
7
|
+
warning: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
8
|
+
danger: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
9
|
+
implicit: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
10
|
+
import: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
11
|
+
subclass: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
12
|
+
subproperty: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
13
|
+
rdftype: import("react").MemoExoticComponent<({ data, drawSvgPath, ...edgeOriginalProperties }: import("./EdgeDefault").EdgeDefaultProps) => import("react").JSX.Element>;
|
|
14
14
|
value: import("react").MemoExoticComponent<(edge: import("./EdgeStep").EdgeStepProps) => import("react").JSX.Element>;
|
|
15
15
|
score: import("react").MemoExoticComponent<(edge: import("./EdgeStep").EdgeStepProps) => import("react").JSX.Element>;
|
|
16
16
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TooltipProps } from "../../../index";
|
|
3
|
-
export interface HandleContentProps {
|
|
4
|
-
children?: JSX.Element | string;
|
|
3
|
+
export interface HandleContentProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "className"> {
|
|
5
4
|
/**
|
|
6
5
|
* Tooltip displayed as overlay on hover.
|
|
7
6
|
*/
|
|
@@ -11,4 +10,4 @@ export interface HandleContentProps {
|
|
|
11
10
|
*/
|
|
12
11
|
tooltipProps?: Omit<TooltipProps, "content" | "children" | "renderTarget">;
|
|
13
12
|
}
|
|
14
|
-
export declare const HandleContent: React.MemoExoticComponent<({ children, extendedTooltip, tooltipProps }: HandleContentProps) => React.JSX.Element>;
|
|
13
|
+
export declare const HandleContent: React.MemoExoticComponent<({ children, extendedTooltip, tooltipProps, ...otherDivProps }: HandleContentProps) => React.JSX.Element>;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MiniMapProps as ReactFlowMiniMapProps, OnLoadParams } from "react-flow-renderer";
|
|
3
3
|
export interface MiniMapProps extends ReactFlowMiniMapProps {
|
|
4
|
+
/**
|
|
5
|
+
* React-Flow instance
|
|
6
|
+
*/
|
|
4
7
|
flowInstance?: OnLoadParams;
|
|
8
|
+
/**
|
|
9
|
+
* Enable navigating the react-flow canvas by dragging and clicking on the mini-map.
|
|
10
|
+
*/
|
|
5
11
|
enableNavigation?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Properties are forwarded to the HTML `div` element used as minimap wrapper.
|
|
14
|
+
* Data attributes for test ids coud be included here.
|
|
15
|
+
*/
|
|
16
|
+
wrapperProps?: Omit<React.HTMLAttributes<HTMLDivElement>, "onMouseDown" | "onMouseUp" | "onMouseMove" | "onMouseLeave">;
|
|
6
17
|
}
|
|
7
18
|
/** An improved mini-map for react-flow that supports navigation via the mini-map. */
|
|
8
|
-
export declare const MiniMap: React.MemoExoticComponent<({ flowInstance, enableNavigation, maskColor, nodeClassName, nodeColor, nodeStrokeColor, ...minimapProps }: MiniMapProps) => React.JSX.Element>;
|
|
19
|
+
export declare const MiniMap: React.MemoExoticComponent<({ flowInstance, enableNavigation, maskColor, nodeClassName, nodeColor, nodeStrokeColor, wrapperProps, ...minimapProps }: MiniMapProps) => React.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.
|
|
4
|
+
"version": "23.7.0-rc.0",
|
|
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",
|
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"react-flow-renderer-lts": "npm:react-flow-renderer@^10.3.17",
|
|
86
86
|
"react-inlinesvg": "^3.0.3",
|
|
87
87
|
"react-markdown": "^8.0.7",
|
|
88
|
+
"react-syntax-highlighter": "15.5.0",
|
|
88
89
|
"rehype-raw": "^6.1.1",
|
|
89
90
|
"remark-definition-list": "^1.2.0",
|
|
90
91
|
"remark-gfm": "^3.0.1",
|
|
@@ -117,6 +118,7 @@
|
|
|
117
118
|
"@types/color": "^3.0.6",
|
|
118
119
|
"@types/jest": "^29.5.12",
|
|
119
120
|
"@types/lodash": "^4.14.202",
|
|
121
|
+
"@types/react-syntax-highlighter": "15.5.11",
|
|
120
122
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
121
123
|
"@typescript-eslint/parser": "^5.62.0",
|
|
122
124
|
"babel-jest": "^29.7.0",
|
|
@@ -161,7 +163,8 @@
|
|
|
161
163
|
"**/@carbon/icons-react": "11.19.0",
|
|
162
164
|
"**/jackspeak": "2.1.1",
|
|
163
165
|
"node-sass-package-importer/**/postcss": "^8.4.31",
|
|
164
|
-
"**/word-wrap": "^1.2.4"
|
|
166
|
+
"**/word-wrap": "^1.2.4",
|
|
167
|
+
"**/webpack-dev-middleware": "^6.1.2"
|
|
165
168
|
},
|
|
166
169
|
"husky": {
|
|
167
170
|
"hooks": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Blockquote } from "@blueprintjs/core";
|
|
2
3
|
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
4
|
|
|
4
5
|
import { Markdown } from "./../../../index";
|
|
@@ -44,11 +45,17 @@ This is a paragraph with a [text link](http://example.com/) and a footnote refer
|
|
|
44
45
|
##### Headline level 5
|
|
45
46
|
###### Headline level 6
|
|
46
47
|
|
|
47
|
-
This is a code block.
|
|
48
|
+
This is a code block.
|
|
49
|
+
|
|
50
|
+
\`\`\`
|
|
51
|
+
another code block
|
|
52
|
+
{{templateVar}}
|
|
53
|
+
\`\`\`
|
|
48
54
|
|
|
49
55
|
> This is a block quote.
|
|
50
56
|
>
|
|
51
57
|
> With 2 paragraphs.
|
|
58
|
+
> And some code like \`{{showThisNotItsValue}}\`
|
|
52
59
|
|
|
53
60
|
A line with some <strong>HTML code</strong> inside.
|
|
54
61
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import ReactMarkdown from "react-markdown";
|
|
3
3
|
import { PluggableList } from "react-markdown/lib/react-markdown";
|
|
4
|
-
|
|
4
|
+
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
5
|
+
import { materialLight } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
6
|
+
// @ts-expect-error: No declaration file for module
|
|
5
7
|
import remarkTypograf from "@mavrin/remark-typograf";
|
|
6
8
|
import rehypeRaw from "rehype-raw";
|
|
7
9
|
import { remarkDefinitionList } from "remark-definition-list";
|
|
@@ -132,6 +134,25 @@ export const Markdown = ({
|
|
|
132
134
|
return linkTarget as React.HTMLAttributeAnchorTarget;
|
|
133
135
|
}
|
|
134
136
|
: undefined,
|
|
137
|
+
components: {
|
|
138
|
+
code(props: any) {
|
|
139
|
+
const { children, className, node, ...rest } = props;
|
|
140
|
+
const match = /language-(\w+)/.exec(className || "");
|
|
141
|
+
return match ? (
|
|
142
|
+
<SyntaxHighlighter
|
|
143
|
+
{...rest}
|
|
144
|
+
PreTag="div"
|
|
145
|
+
children={String(children).replace(/\n$/, "")}
|
|
146
|
+
language={match[1]}
|
|
147
|
+
style={materialLight}
|
|
148
|
+
/>
|
|
149
|
+
) : (
|
|
150
|
+
<code {...rest} className={className}>
|
|
151
|
+
{children}
|
|
152
|
+
</code>
|
|
153
|
+
);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
135
156
|
};
|
|
136
157
|
allowedElements && (reactMarkdownProperties.allowedElements = allowedElements);
|
|
137
158
|
reHypePlugins &&
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { Elements, FlowElement } from "react-flow-renderer";
|
|
3
|
-
import {
|
|
3
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
4
4
|
|
|
5
5
|
import { EdgeTools, NodeTools, ReactFlow } from "./../../../index";
|
|
6
6
|
import { ReactFlowProps } from "./ReactFlow";
|
|
@@ -361,7 +361,7 @@ export default {
|
|
|
361
361
|
options: Object.keys(nodeExamples),
|
|
362
362
|
},
|
|
363
363
|
},
|
|
364
|
-
} as
|
|
364
|
+
} as Meta<typeof ReactFlow>;
|
|
365
365
|
|
|
366
366
|
const ReactFlowExample: FC<ReactFlowProps> = (args) => {
|
|
367
367
|
const [reactflowInstance, setReactflowInstance] = useState(null);
|
|
@@ -402,10 +402,13 @@ const ReactFlowExample: FC<ReactFlowProps> = (args) => {
|
|
|
402
402
|
[reactflowInstance]
|
|
403
403
|
);
|
|
404
404
|
|
|
405
|
+
const { configuration, ...otherArgs } = args;
|
|
406
|
+
|
|
405
407
|
return (
|
|
406
408
|
<>
|
|
407
409
|
<ReactFlow
|
|
408
|
-
|
|
410
|
+
{...otherArgs}
|
|
411
|
+
configuration={configuration}
|
|
409
412
|
elements={elements}
|
|
410
413
|
style={{ height: "400px" }}
|
|
411
414
|
onLoad={onLoad}
|
|
@@ -418,9 +421,12 @@ const ReactFlowExample: FC<ReactFlowProps> = (args) => {
|
|
|
418
421
|
);
|
|
419
422
|
};
|
|
420
423
|
|
|
421
|
-
const Template:
|
|
424
|
+
const Template: StoryFn<typeof ReactFlow> = (args) => <ReactFlowExample {...args} />;
|
|
422
425
|
|
|
423
426
|
export const Default = Template.bind({});
|
|
424
427
|
Default.args = {
|
|
425
428
|
configuration: "unspecified",
|
|
429
|
+
"data-test-id": "reactflow-test-id",
|
|
430
|
+
"data-testid": "reactflow-testid",
|
|
426
431
|
};
|
|
432
|
+
Default.nodeExamples = nodeExamples;
|
|
@@ -4,7 +4,7 @@ import getColorConfiguration from "../../../common/utils/getColorConfiguration";
|
|
|
4
4
|
import { CodeEditor } from "../../../extensions";
|
|
5
5
|
import { ReactFlowHotkeyContext } from "../extensions/ReactFlowHotkeyContext";
|
|
6
6
|
|
|
7
|
-
import { Button, FieldItem, Icon, SimpleDialog, Tag, TagList } from "./../../../index";
|
|
7
|
+
import { Button, FieldItem, Icon, SimpleDialog, SimpleDialogProps, Tag, TagList } from "./../../../index";
|
|
8
8
|
|
|
9
9
|
export type StickyNoteModalTranslationKeys = "modalTitle" | "noteLabel" | "colorLabel" | "saveButton" | "cancelButton";
|
|
10
10
|
|
|
@@ -28,10 +28,14 @@ export interface StickyNoteModalProps {
|
|
|
28
28
|
* translation utility for language compatibility
|
|
29
29
|
*/
|
|
30
30
|
translate: (key: StickyNoteModalTranslationKeys) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Forward other properties to the `SimpleModal` element that is used for this dialog.
|
|
33
|
+
*/
|
|
34
|
+
simpleDialogProps?: Omit<SimpleDialogProps, "size" | "title" | "hasBorder" | "isOpen" | "onClose" | "actions">;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
export const StickyNoteModal: React.FC<StickyNoteModalProps> = React.memo(
|
|
34
|
-
({ metaData, onClose, onSubmit, translate }) => {
|
|
38
|
+
({ metaData, onClose, onSubmit, translate, simpleDialogProps }) => {
|
|
35
39
|
const refNote = React.useRef<string>(metaData?.note ?? "");
|
|
36
40
|
const [color, setSelectedColor] = React.useState<string>(metaData?.color ?? "");
|
|
37
41
|
const noteColors: [string, string][] = Object.entries(getColorConfiguration("stickynotes")).map(
|
|
@@ -79,7 +83,6 @@ export const StickyNoteModal: React.FC<StickyNoteModalProps> = React.memo(
|
|
|
79
83
|
|
|
80
84
|
return (
|
|
81
85
|
<SimpleDialog
|
|
82
|
-
data-test-id={"sticky-note-modal"}
|
|
83
86
|
size="small"
|
|
84
87
|
title={translate("modalTitle")}
|
|
85
88
|
hasBorder
|
|
@@ -101,6 +104,8 @@ export const StickyNoteModal: React.FC<StickyNoteModalProps> = React.memo(
|
|
|
101
104
|
{translate("cancelButton")}
|
|
102
105
|
</Button>,
|
|
103
106
|
]}
|
|
107
|
+
{...simpleDialogProps}
|
|
108
|
+
data-test-id={(simpleDialogProps ?? {})["data-test-id"] ?? "sticky-note-modal"} // @deprecated we remove this automatically set testid with the next major release
|
|
104
109
|
>
|
|
105
110
|
<FieldItem
|
|
106
111
|
key="note"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
$card-padding: 0 !default;
|
|
2
2
|
$card-background-color: $white !default;
|
|
3
|
-
|
|
4
|
-
//$dark-card-background-color: $dark-gray4 !default;
|
|
5
|
-
|
|
3
|
+
$card-selected-background-color: rgba($blue3, 0.1);
|
|
6
4
|
$eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
7
5
|
|
|
6
|
+
@use "sass:color";
|
|
8
7
|
@import "~@blueprintjs/core/src/components/card/card";
|
|
9
8
|
|
|
10
9
|
.#{$eccgui}-card {
|
|
@@ -14,10 +13,10 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
14
13
|
justify-content: flex-start;
|
|
15
14
|
|
|
16
15
|
&.#{$eccgui}-intent--primary {
|
|
17
|
-
background-color: mix($eccgui-color-primary, $card-background-color, 5%);
|
|
16
|
+
background-color: color.mix($eccgui-color-primary, $card-background-color, 5%);
|
|
18
17
|
}
|
|
19
18
|
&.#{$eccgui}-intent--accent {
|
|
20
|
-
background-color: mix($eccgui-color-accent, $card-background-color, 10%);
|
|
19
|
+
background-color: color.mix($eccgui-color-accent, $card-background-color, 10%);
|
|
21
20
|
}
|
|
22
21
|
&.#{$eccgui}-intent--success {
|
|
23
22
|
background-color: $eccgui-color-success-background;
|
|
@@ -35,6 +34,19 @@ $eccgui-size-card-spacing: $eccgui-size-typo-base !default;
|
|
|
35
34
|
&.#{$ns}-interactive:hover {
|
|
36
35
|
background-color: $button-background-color-hover;
|
|
37
36
|
}
|
|
37
|
+
|
|
38
|
+
&.#{$ns}-selected {
|
|
39
|
+
background-color: $card-selected-background-color;
|
|
40
|
+
box-shadow: 0 0 0 3px rgba($eccgui-color-accent, 0.2), 0 0 0 1px $eccgui-color-accent;
|
|
41
|
+
|
|
42
|
+
&.#{$ns}-interactive {
|
|
43
|
+
box-shadow: 0 0 0 3px rgba($eccgui-color-accent, 0.2), 0 0 0 1px $eccgui-color-accent;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
background-color: color.mix($card-selected-background-color, $button-background-color-hover, 50%);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
.#{$eccgui}-card--elevated {
|