@eccenca/gui-elements 23.3.0-rc.0 → 23.3.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 +39 -19
- package/dist/cjs/common/index.js +5 -2
- package/dist/cjs/common/index.js.map +1 -1
- package/dist/cjs/common/utils/globalVars.js +21 -0
- package/dist/cjs/common/utils/globalVars.js.map +1 -0
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js +3 -2
- package/dist/cjs/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/cjs/components/Dialog/Modal.js +20 -2
- package/dist/cjs/components/Dialog/Modal.js.map +1 -1
- package/dist/cjs/components/Icon/canonicalIconNames.js +4 -0
- package/dist/cjs/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/cjs/components/Table/TableExpandHeader.js +7 -8
- package/dist/cjs/components/Table/TableExpandHeader.js.map +1 -1
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js +10 -9
- package/dist/cjs/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js +4 -4
- package/dist/cjs/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js +62 -24
- package/dist/cjs/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js +16 -2
- package/dist/cjs/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js +17 -8
- package/dist/cjs/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/esm/common/index.js +5 -2
- package/dist/esm/common/index.js.map +1 -1
- package/dist/esm/common/utils/globalVars.js +16 -0
- package/dist/esm/common/utils/globalVars.js.map +1 -0
- package/dist/esm/components/ContextOverlay/ContextOverlay.js +5 -4
- package/dist/esm/components/ContextOverlay/ContextOverlay.js.map +1 -1
- package/dist/esm/components/Dialog/Modal.js +20 -2
- package/dist/esm/components/Dialog/Modal.js.map +1 -1
- package/dist/esm/components/Icon/canonicalIconNames.js +4 -0
- package/dist/esm/components/Icon/canonicalIconNames.js.map +1 -1
- package/dist/esm/components/Table/TableExpandHeader.js +7 -8
- package/dist/esm/components/Table/TableExpandHeader.js.map +1 -1
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js +10 -9
- package/dist/esm/extensions/react-flow/edges/EdgeLabel.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleContent.js +16 -5
- package/dist/esm/extensions/react-flow/handles/HandleContent.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js +62 -24
- package/dist/esm/extensions/react-flow/handles/HandleDefault.js.map +1 -1
- package/dist/esm/extensions/react-flow/handles/HandleTools.js +32 -2
- package/dist/esm/extensions/react-flow/handles/HandleTools.js.map +1 -1
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js +17 -8
- package/dist/esm/extensions/react-flow/nodes/NodeContent.js.map +1 -1
- package/dist/types/common/index.d.ts +4 -0
- package/dist/types/common/utils/globalVars.d.ts +2 -0
- package/dist/types/components/ContextOverlay/ContextOverlay.d.ts +7 -2
- package/dist/types/components/Dialog/Modal.d.ts +11 -3
- package/dist/types/components/Icon/canonicalIconNames.d.ts +1 -1
- package/dist/types/components/Table/TableExpandHeader.d.ts +5 -1
- package/dist/types/extensions/react-flow/edges/EdgeLabel.d.ts +7 -3
- package/dist/types/extensions/react-flow/handles/HandleContent.d.ts +7 -2
- package/dist/types/extensions/react-flow/handles/HandleDefault.d.ts +13 -4
- package/dist/types/extensions/react-flow/handles/HandleTools.d.ts +2 -1
- package/dist/types/extensions/react-flow/nodes/NodeContent.d.ts +3 -7
- package/package.json +8 -7
- package/src/common/index.ts +6 -3
- package/src/common/utils/globalVars.ts +18 -0
- package/src/components/Application/application.scss +7 -9
- package/src/components/ContextOverlay/ContextOverlay.tsx +20 -12
- package/src/components/ContextOverlay/contextoverlay.scss +8 -0
- package/src/components/Dialog/Modal.tsx +35 -3
- package/src/components/Dialog/dialog.scss +4 -0
- package/src/components/Icon/canonicalIconNames.tsx +9 -0
- package/src/components/PropertyValuePair/propertyvalue.scss +1 -0
- package/src/components/Table/TableExpandHeader.tsx +21 -18
- package/src/configuration/_variables.scss +27 -36
- package/src/extensions/react-flow/edges/EdgeLabel.tsx +78 -81
- package/src/extensions/react-flow/edges/_edges.scss +62 -67
- package/src/extensions/react-flow/handles/HandleContent.tsx +14 -13
- package/src/extensions/react-flow/handles/HandleDefault.tsx +127 -44
- package/src/extensions/react-flow/handles/HandleTools.tsx +28 -4
- package/src/extensions/react-flow/handles/_handles.scss +86 -21
- package/src/extensions/react-flow/handles/stories/HandleDefault.stories.tsx +41 -3
- package/src/extensions/react-flow/nodes/NodeContent.tsx +35 -30
- package/src/extensions/react-flow/nodes/stories/NodeContent.stories.tsx +75 -52
- package/src/extensions/react-flow/nodes/stories/NodeDefault.stories.tsx +4 -4
- package/src/extensions/react-flow/nodes/stories/nodeTypes.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,43 +6,63 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [23.3.0] - 2023-11-09
|
|
10
|
+
|
|
9
11
|
### Added
|
|
10
12
|
|
|
11
13
|
- `<PropertyName />`
|
|
12
|
-
-
|
|
14
|
+
- `labelProps`: configure the automatically injected `Label` element when `PropertyName` is only a string
|
|
15
|
+
- `<TextField />`
|
|
16
|
+
- `escapeToBlur`: if set to true the input field blurs/de-focuces when the `Escape` key is pressed.
|
|
13
17
|
- `<CodeEditor />`
|
|
14
|
-
- support for additional modes: jinja2
|
|
18
|
+
- support for additional modes: `jinja2`, `yaml` and `json`
|
|
15
19
|
- add read-only mode
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- `<
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- `<
|
|
20
|
+
- `height`: set a fixed height of the editor
|
|
21
|
+
- `wrapLines`: control auto-wrapping long lines (the default for wrap long lines is set to false now)
|
|
22
|
+
- `<Modal />`
|
|
23
|
+
- `modalFocusable`: when `true` the outer `div` element of the modal can be focused by clicking on it.
|
|
24
|
+
This is needed e.g. when key (down, up) events should trigger on the modal in order to bubble up to its parent elements.
|
|
25
|
+
- `forceTopPosition`: when `true` then the `z-index` of the modal's portal element is recalculated, so that the modal is always displayed on top of all other visible elements. Use with care, see documentation.
|
|
26
|
+
- `<ContextOverlay />`
|
|
27
|
+
- `preventTopPosition`: when true then the `z-index` is decreased to the value for modals. Use it when you need to display modal dialogs out of the context overlay. Type of counter property to `Modal.forceTopPosition`.
|
|
28
|
+
- `<ReactFlow />`
|
|
29
|
+
- support disabling the react-flow hot keys via a React context, e.g. `Delete` etc.
|
|
30
|
+
- `<HandleDefault />`
|
|
31
|
+
- new `category` options that lead to different handle layouts: `dependency`, `fixed`, `flexible` and `unknown`
|
|
32
|
+
- `intent` option with defined colors for: primary, accent, info, success, warning, danger
|
|
33
|
+
- `<HandleTools />`
|
|
34
|
+
- can be used as single handle content to add an context menu to handles
|
|
25
35
|
- `<NodeContent />`
|
|
26
|
-
- `introductionTime
|
|
27
|
-
- `<
|
|
28
|
-
-
|
|
36
|
+
- `introductionTime`: can be used to visualize the node was added or updated
|
|
37
|
+
- `<EdgeLabel />`
|
|
38
|
+
- `loose`: can be set to `true` to prevent the box with border on the label component
|
|
39
|
+
- `<TableExpandHeader />`
|
|
40
|
+
- `toggleIcon`: optional icon that should be displayed instead of the default ones.
|
|
41
|
+
- `Utilities`
|
|
42
|
+
- `getGlobalVar` and `setGlobalVar`: can be used to manage global variables indepentently from component states. They are stored to the `window` object under a `eccgui` "namespace". Can be used for example to manage globally increased counters. Do not use them if you need to store user session properties or confidential data!
|
|
43
|
+
- canonical icons for `artefact-chatlog`, `entity-human`, `entity-robot` and `operation-magic`
|
|
29
44
|
|
|
30
45
|
### Changed
|
|
31
46
|
|
|
47
|
+
- `<SimpleDialog />`
|
|
48
|
+
- by default, prevent certain (React) events from bubbling up through the dialog (backdrop is not affected):
|
|
49
|
+
- event handler: `onContextMenu`, `onDrag`, `onDragStart`, `onDragEnd`, `onMouseDown`, `onMouseUp`, `onClick`
|
|
50
|
+
- handlers can be overwritten via `wrapperDivProps`
|
|
32
51
|
- `<ApplicationHeader />`
|
|
33
|
-
- it is now possible to overwrite the background color by setting `--eccgui-appheader-color-background`
|
|
52
|
+
- it is now possible to overwrite the background color by setting `--eccgui-appheader-color-background` in its `style` attribute
|
|
34
53
|
- `<Modal />`
|
|
35
54
|
- new `xlarge` size option
|
|
36
55
|
- re-configure appearance of the sizes, `small` is displayed a bit smaller, `large` a bit larger than before
|
|
37
56
|
|
|
38
57
|
### Fixed
|
|
39
58
|
|
|
40
|
-
- `<Modal
|
|
41
|
-
- Escape key to close does not work anymore after clicking on the backdrop for `canOutsideClickClose=false` and `canEscapeKeyClose=true`.
|
|
42
|
-
- `<PropertyName />`
|
|
43
|
-
- provide `labelProps` to configure the automatically injected `Label` element when `PropertyName` is only a string
|
|
59
|
+
- `<Modal />`
|
|
60
|
+
- `Escape` key to close does not work anymore after clicking on the backdrop for `canOutsideClickClose=false` and `canEscapeKeyClose=true`.
|
|
44
61
|
- `<Spacing />`
|
|
45
62
|
- allow other `div` attributes, e.g. `style`
|
|
63
|
+
- tooltips of Carbon based elements are displayed correctly in position and layout
|
|
64
|
+
- `<PropertyValuePair />`
|
|
65
|
+
- force maximum width for situation when the block could be wider, e.g. inside a flex layout, otherwise name and value could be wrongly aligned in a list with other property value pairs
|
|
46
66
|
|
|
47
67
|
## [23.2.0] - 2023-07-14
|
|
48
68
|
|
package/dist/cjs/common/index.js
CHANGED
|
@@ -4,15 +4,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Utilities = exports.utils = void 0;
|
|
7
|
-
const
|
|
7
|
+
const characters_1 = require("./utils/characters");
|
|
8
8
|
const colorDecideContrastvalue_1 = __importDefault(require("./utils/colorDecideContrastvalue"));
|
|
9
9
|
const getColorConfiguration_1 = __importDefault(require("./utils/getColorConfiguration"));
|
|
10
|
-
const
|
|
10
|
+
const globalVars_1 = require("./utils/globalVars");
|
|
11
|
+
const openInNewTab_1 = require("./utils/openInNewTab");
|
|
11
12
|
exports.utils = {
|
|
12
13
|
openInNewTab: openInNewTab_1.openInNewTab,
|
|
13
14
|
decideContrastColorValue: colorDecideContrastvalue_1.default,
|
|
14
15
|
getColorConfiguration: getColorConfiguration_1.default,
|
|
15
16
|
invisibleZeroWidthCharacters: characters_1.invisibleZeroWidthCharacters,
|
|
17
|
+
getGlobalVar: globalVars_1.getGlobalVar,
|
|
18
|
+
setGlobalVar: globalVars_1.setGlobalVar,
|
|
16
19
|
};
|
|
17
20
|
// @deprecated use `utils`
|
|
18
21
|
exports.Utilities = exports.utils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAkE;AAClE,gGAAwE;AACxE,0FAAkE;AAClE,mDAAgE;AAChE,uDAAoD;AAEvC,QAAA,KAAK,GAAG;IACjB,YAAY,EAAZ,2BAAY;IACZ,wBAAwB,EAAxB,kCAAwB;IACxB,qBAAqB,EAArB,+BAAqB;IACrB,4BAA4B,EAA5B,yCAA4B;IAC5B,YAAY,EAAZ,yBAAY;IACZ,YAAY,EAAZ,yBAAY;CACf,CAAC;AACF,0BAA0B;AACb,QAAA,SAAS,GAAG,aAAK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setGlobalVar = exports.getGlobalVar = void 0;
|
|
4
|
+
const constants_1 = require("../../configuration/constants");
|
|
5
|
+
const getGlobalConfig = () => {
|
|
6
|
+
return typeof window[constants_1.CLASSPREFIX] === "undefined"
|
|
7
|
+
? Object.defineProperty(window, `${constants_1.CLASSPREFIX}`, {
|
|
8
|
+
value: {},
|
|
9
|
+
writable: true,
|
|
10
|
+
})[constants_1.CLASSPREFIX]
|
|
11
|
+
: window[constants_1.CLASSPREFIX];
|
|
12
|
+
};
|
|
13
|
+
const getGlobalVar = (varname) => {
|
|
14
|
+
return getGlobalConfig()[varname];
|
|
15
|
+
};
|
|
16
|
+
exports.getGlobalVar = getGlobalVar;
|
|
17
|
+
const setGlobalVar = (varname, value) => {
|
|
18
|
+
return (getGlobalConfig()[varname] = value);
|
|
19
|
+
};
|
|
20
|
+
exports.setGlobalVar = setGlobalVar;
|
|
21
|
+
//# sourceMappingURL=globalVars.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalVars.js","sourceRoot":"","sources":["../../../../src/common/utils/globalVars.ts"],"names":[],"mappings":";;;AAAA,6DAAsE;AAEtE,MAAM,eAAe,GAAG,GAAG,EAAE;IACzB,OAAO,OAAO,MAAM,CAAC,uBAAa,CAAC,KAAK,WAAW;QAC/C,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,uBAAM,EAAE,EAAE;YACvC,KAAK,EAAE,EAAE;YACT,QAAQ,EAAE,IAAI;SACjB,CAAC,CAAC,uBAAa,CAAC;QACnB,CAAC,CAAC,MAAM,CAAC,uBAAa,CAAC,CAAC;AAChC,CAAC,CAAC;AAEK,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE;IAC5C,OAAO,eAAe,EAAE,CAAC,OAAc,CAAC,CAAC;AAC7C,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEK,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,KAAU,EAAE,EAAE;IACxD,OAAO,CAAC,eAAe,EAAE,CAAC,OAAc,CAAC,GAAG,KAAK,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
|
|
@@ -23,8 +23,9 @@ const constants_1 = require("../../configuration/constants");
|
|
|
23
23
|
* Full list of available option can be seen at https://blueprintjs.com/docs/#popover2-package/popover2
|
|
24
24
|
*/
|
|
25
25
|
const ContextOverlay = (_a) => {
|
|
26
|
-
var { children, className =
|
|
27
|
-
return (react_1.default.createElement(popover2_1.Popover2, Object.assign({ placement: "bottom" }, restProps, { className: `${constants_1.CLASSPREFIX}-contextoverlay
|
|
26
|
+
var { children, portalClassName, preventTopPosition, className = "" } = _a, restProps = __rest(_a, ["children", "portalClassName", "preventTopPosition", "className"]);
|
|
27
|
+
return (react_1.default.createElement(popover2_1.Popover2, Object.assign({ placement: "bottom" }, restProps, { className: `${constants_1.CLASSPREFIX}-contextoverlay` + (className ? ` ${className}` : ""), portalClassName: (preventTopPosition ? `${constants_1.CLASSPREFIX}-contextoverlay__portal--lowertop` : "") +
|
|
28
|
+
(portalClassName ? ` ${portalClassName}` : "") }), children));
|
|
28
29
|
};
|
|
29
30
|
exports.ContextOverlay = ContextOverlay;
|
|
30
31
|
exports.default = exports.ContextOverlay;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextOverlay.js","sourceRoot":"","sources":["../../../../src/components/ContextOverlay/ContextOverlay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"ContextOverlay.js","sourceRoot":"","sources":["../../../../src/components/ContextOverlay/ContextOverlay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,oDAA6G;AAE7G,6DAAsE;AActE;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,EAMT,EAAE,EAAE;QANK,EAC3B,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,SAAS,GAAG,EAAE,OAEI,EADf,SAAS,cALe,kEAM9B,CADe;IAEZ,OAAO,CACH,8BAAC,mBAAgB,kBACb,SAAS,EAAC,QAAQ,IACd,SAAS,IACb,SAAS,EAAE,GAAG,uBAAM,iBAAiB,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC1E,eAAe,EACX,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,uBAAM,mCAAmC,CAAC,CAAC,CAAC,EAAE,CAAC;YACxE,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAGjD,QAAQ,CACM,CACtB,CAAC;AACN,CAAC,CAAC;AApBW,QAAA,cAAc,kBAoBzB;AAEF,kBAAe,sBAAc,CAAC"}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.Modal = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const core_1 = require("@blueprintjs/core");
|
|
20
|
+
const common_1 = require("../../common");
|
|
20
21
|
const constants_1 = require("../../configuration/constants");
|
|
21
22
|
const Card_1 = require("./../Card");
|
|
22
23
|
/**
|
|
@@ -27,7 +28,7 @@ const Card_1 = require("./../Card");
|
|
|
27
28
|
*/
|
|
28
29
|
const Modal = (_a) => {
|
|
29
30
|
var _b;
|
|
30
|
-
var { children, className = "", overlayClassName = "", size = "regular", canOutsideClickClose = false, canEscapeKeyClose = false, preventBackdrop = false, wrapperDivProps, modalFocusable = true } = _a, otherProps = __rest(_a, ["children", "className", "overlayClassName", "size", "canOutsideClickClose", "canEscapeKeyClose", "preventBackdrop", "wrapperDivProps", "modalFocusable"]);
|
|
31
|
+
var { children, className = "", overlayClassName = "", size = "regular", canOutsideClickClose = false, canEscapeKeyClose = false, preventBackdrop = false, wrapperDivProps, modalFocusable = true, usePortal = true, forceTopPosition = false, onOpening } = _a, otherProps = __rest(_a, ["children", "className", "overlayClassName", "size", "canOutsideClickClose", "canEscapeKeyClose", "preventBackdrop", "wrapperDivProps", "modalFocusable", "usePortal", "forceTopPosition", "onOpening"]);
|
|
31
32
|
const backdropProps = !canOutsideClickClose && canEscapeKeyClose
|
|
32
33
|
? Object.assign(Object.assign({}, otherProps.backdropProps), {
|
|
33
34
|
// Escape key won't work anymore otherwise after clicking on the backdrop
|
|
@@ -46,7 +47,24 @@ const Modal = (_a) => {
|
|
|
46
47
|
}
|
|
47
48
|
return child;
|
|
48
49
|
});
|
|
49
|
-
|
|
50
|
+
const handlerOnOpening = (modalElement) => {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
if (onOpening) {
|
|
53
|
+
// call the original event handler
|
|
54
|
+
onOpening(modalElement);
|
|
55
|
+
}
|
|
56
|
+
if (usePortal && forceTopPosition) {
|
|
57
|
+
const parentalPortal = modalElement.closest(`.${core_1.Classes.PORTAL}`);
|
|
58
|
+
const highestTopIndex = (_a = common_1.Utilities.getGlobalVar("highestModalTopIndex")) !== null && _a !== void 0 ? _a : 0;
|
|
59
|
+
if (parentalPortal) {
|
|
60
|
+
const portalTopIndex = parseInt((_b = getComputedStyle(parentalPortal).zIndex) !== null && _b !== void 0 ? _b : 0, 10);
|
|
61
|
+
const newTopIndex = Math.max(portalTopIndex, highestTopIndex) + 1;
|
|
62
|
+
parentalPortal.style.zIndex = `${newTopIndex}`;
|
|
63
|
+
common_1.Utilities.setGlobalVar("highestModalTopIndex", newTopIndex);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
return (react_1.default.createElement(core_1.Overlay, Object.assign({}, otherProps, { backdropProps: backdropProps, className: overlayClassName, backdropClassName: `${constants_1.CLASSPREFIX}-dialog__backdrop`, canOutsideClickClose: canOutsideClickClose, canEscapeKeyClose: canEscapeKeyClose, hasBackdrop: !preventBackdrop, usePortal: usePortal, onOpening: handlerOnOpening, portalClassName: `${constants_1.CLASSPREFIX}-dialog__portal` }),
|
|
50
68
|
react_1.default.createElement("div", Object.assign({}, wrapperDivProps, { className: core_1.Classes.DIALOG_CONTAINER, "data-test-id": (_b = otherProps["data-test-id"]) !== null && _b !== void 0 ? _b : "simpleDialogWidget" }, focusableProps, { tabIndex: 0 }),
|
|
51
69
|
react_1.default.createElement("section", { className: `${constants_1.CLASSPREFIX}-dialog__wrapper` +
|
|
52
70
|
(typeof size === "string" ? ` ${constants_1.CLASSPREFIX}-dialog__wrapper--` + size : "") +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAK2B;AAE3B,6DAAsE;AAEtE,oCAAiC;
|
|
1
|
+
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Modal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAK2B;AAE3B,yCAAyC;AACzC,6DAAsE;AAEtE,oCAAiC;AAmCjC;;;;;GAKG;AACI,MAAM,KAAK,GAAG,CAAC,EAcT,EAAE,EAAE;;QAdK,EAClB,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,gBAAgB,GAAG,EAAE,EACrB,IAAI,GAAG,SAAS,EAChB,oBAAoB,GAAG,KAAK,EAC5B,iBAAiB,GAAG,KAAK,EACzB,eAAe,GAAG,KAAK,EACvB,eAAe,EACf,cAAc,GAAG,IAAI,EACrB,SAAS,GAAG,IAAI,EAChB,gBAAgB,GAAG,KAAK,EACxB,SAAS,OAEA,EADN,UAAU,cAbK,wMAcrB,CADgB;IAEb,MAAM,aAAa,GACf,CAAC,oBAAoB,IAAI,iBAAiB;QACtC,CAAC,iCACQ,UAAU,CAAC,aAAa;YAC3B,yEAAyE;YACzE,QAAQ,EAAE,CAAC,IAEjB,CAAC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CAAC;IAEF,OAAO,CACH,8BAAC,cAAgB,oBACT,UAAU,IACd,aAAa,EAAE,aAAa,EAC5B,SAAS,EAAE,gBAAgB,EAC3B,iBAAiB,EAAE,GAAG,uBAAM,mBAAmB,EAC/C,oBAAoB,EAAE,oBAAoB,EAC1C,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,CAAC,eAAe,EAC7B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,gBAAgB,EAC3B,eAAe,EAAE,GAAG,uBAAM,iBAAiB;QAE3C,uDACQ,eAAe,IACnB,SAAS,EAAE,cAAmB,CAAC,gBAAgB,kBAEjC,MAAC,UAAkB,CAAC,cAAc,CAAC,mCAAI,oBAAoB,IACrE,cAAc,IAClB,QAAQ,EAAE,CAAC;YAEX,2CACI,SAAS,EACL,GAAG,uBAAM,kBAAkB;oBAC3B,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,uBAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;oBACvE,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAGrC,eAAe,CACV,CACR,CACS,CACtB,CAAC;AACN,CAAC,CAAC;AA3FW,QAAA,KAAK,SA2FhB;AAEF,kBAAe,aAAK,CAAC"}
|
|
@@ -32,6 +32,7 @@ const canonicalIconNames = {
|
|
|
32
32
|
"application-vocabularies": icons.Catalog,
|
|
33
33
|
"application-warning": icons.WarningAlt,
|
|
34
34
|
"application-hotkeys": icons.Keyboard,
|
|
35
|
+
"artefact-chatlog": icons.Chat,
|
|
35
36
|
"artefact-commit": icons.Commit,
|
|
36
37
|
"artefact-customtask": icons.Script,
|
|
37
38
|
"artefact-dataset-csv": icons.Csv,
|
|
@@ -62,6 +63,8 @@ const canonicalIconNames = {
|
|
|
62
63
|
"artefact-workflow": icons.ModelBuilder,
|
|
63
64
|
"data-sourcepath": icons.Data_2,
|
|
64
65
|
"data-targetpath": icons.Data_1,
|
|
66
|
+
"entity-human": icons.User,
|
|
67
|
+
"entity-robot": icons.Bot,
|
|
65
68
|
"item-add-artefact": icons.AddAlt,
|
|
66
69
|
"item-clone": icons.Copy,
|
|
67
70
|
"item-comment": icons.AddComment,
|
|
@@ -126,6 +129,7 @@ const canonicalIconNames = {
|
|
|
126
129
|
"operation-fix": icons.Tools,
|
|
127
130
|
"operation-link": icons.Link,
|
|
128
131
|
"operation-logout": icons.Logout,
|
|
132
|
+
"operation-magic": icons.MagicWand,
|
|
129
133
|
"operation-merge": icons.DirectionMerge,
|
|
130
134
|
"operation-redo": icons.Redo,
|
|
131
135
|
"operation-search": icons.Search,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalIconNames.js","sourceRoot":"","sources":["../../../../src/components/Icon/canonicalIconNames.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2DAA6C;
|
|
1
|
+
{"version":3,"file":"canonicalIconNames.js","sourceRoot":"","sources":["../../../../src/components/Icon/canonicalIconNames.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,2DAA6C;AA8J7C,MAAM,kBAAkB,GAA0C;IAC9D,wBAAwB,EAAE,KAAK,CAAC,QAAQ;IACxC,6BAA6B,EAAE,KAAK,CAAC,gBAAgB;IACrD,qBAAqB,EAAE,KAAK,CAAC,OAAO;IACpC,sBAAsB,EAAE,KAAK,CAAC,SAAS;IACvC,uBAAuB,EAAE,KAAK,CAAC,QAAQ;IACvC,qBAAqB,EAAE,KAAK,CAAC,YAAY;IACzC,qBAAqB,EAAE,KAAK,CAAC,QAAQ;IACrC,yBAAyB,EAAE,KAAK,CAAC,UAAU;IAC3C,0BAA0B,EAAE,KAAK,CAAC,OAAO;IACzC,qBAAqB,EAAE,KAAK,CAAC,UAAU;IACvC,qBAAqB,EAAE,KAAK,CAAC,QAAQ;IAErC,kBAAkB,EAAE,KAAK,CAAC,IAAI;IA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,IAAI;IAChC,qBAAqB,EAAE,KAAK,CAAC,UAAU;IACvC,cAAc,EAAE,KAAK,CAAC,WAAW;IAEjC,eAAe,EAAE,KAAK,CAAC,SAAS;IAEhC,SAAS,EAAE,KAAK,CAAC,SAAS;CAC7B,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
|
|
@@ -17,19 +17,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.TableExpandHeader = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
19
|
const carbon_components_react_1 = require("carbon-components-react");
|
|
20
|
-
const IconButton_1 = __importDefault(require("./../Icon/IconButton"));
|
|
21
20
|
const constants_1 = require("../../configuration/constants");
|
|
22
|
-
;
|
|
21
|
+
const IconButton_1 = __importDefault(require("./../Icon/IconButton"));
|
|
23
22
|
/**
|
|
24
23
|
* Adds a button to the table header that can trigger a function to expand/collapse all rows of the table.
|
|
25
24
|
*/
|
|
26
25
|
function TableExpandHeader(_a) {
|
|
27
|
-
var { togglerText, isExpanded, onExpand, className, enableToggle } = _a, otherCarbonTableExpandHeaderProps = __rest(_a, ["togglerText", "isExpanded", "onExpand", "className", "enableToggle"]);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
var { togglerText, isExpanded, onExpand, className, enableToggle, toggleIcon } = _a, otherCarbonTableExpandHeaderProps = __rest(_a, ["togglerText", "isExpanded", "onExpand", "className", "enableToggle", "toggleIcon"]);
|
|
27
|
+
const defaultToggleIcon = isExpanded ? "toggler-rowcollapse" : "toggler-rowexpand";
|
|
28
|
+
const toggleButton = react_1.default.cloneElement(react_1.default.createElement(IconButton_1.default, { name: toggleIcon !== null && toggleIcon !== void 0 ? toggleIcon : defaultToggleIcon, text: togglerText }), {
|
|
29
|
+
onClick: onExpand,
|
|
30
|
+
});
|
|
31
|
+
return (react_1.default.createElement(carbon_components_react_1.TableExpandHeader, Object.assign({ className: `${constants_1.CLASSPREFIX}-simpletable__headexpander` + (className ? ` ${className}` : ""), isExpanded: isExpanded, onExpand: onExpand, enableToggle: false }, otherCarbonTableExpandHeaderProps), enableToggle && toggleButton));
|
|
33
32
|
}
|
|
34
33
|
exports.TableExpandHeader = TableExpandHeader;
|
|
35
34
|
exports.default = TableExpandHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableExpandHeader.js","sourceRoot":"","sources":["../../../../src/components/Table/TableExpandHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,qEAGiC;
|
|
1
|
+
{"version":3,"file":"TableExpandHeader.js","sourceRoot":"","sources":["../../../../src/components/Table/TableExpandHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,qEAGiC;AAEjC,6DAAsE;AAItE,sEAA8C;AAc9C;;GAEG;AACH,SAAgB,iBAAiB,CAAC,EAQT;QARS,EAC9B,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,OAEW,EADlB,iCAAiC,cAPN,oFAQjC,CADuC;IAEpC,MAAM,iBAAiB,GAAG,UAAU,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IACnF,MAAM,YAAY,GAAG,eAAK,CAAC,YAAY,CAAC,8BAAC,oBAAU,IAAC,IAAI,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,iBAAiB,EAAE,IAAI,EAAE,WAAW,GAAI,EAAE;QAC9G,OAAO,EAAE,QAAQ;KACpB,CAAC,CAAC;IACH,OAAO,CACH,8BAAC,2CAAuB,kBACpB,SAAS,EAAE,GAAG,uBAAM,4BAA4B,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EACrF,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,KAAK,IACf,iCAAiC,GAEpC,YAAY,IAAI,YAAY,CACP,CAC7B,CAAC;AACN,CAAC;AAxBD,8CAwBC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -32,18 +32,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
32
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
33
|
exports.EdgeLabelObject = exports.EdgeLabel = void 0;
|
|
34
34
|
const react_1 = __importStar(require("react"));
|
|
35
|
-
const index_1 = require("../../../index");
|
|
36
|
-
const constants_1 = require("../../../configuration/constants");
|
|
37
35
|
const Intent_1 = require("../../../common/Intent");
|
|
36
|
+
const constants_1 = require("../../../configuration/constants");
|
|
37
|
+
const index_1 = require("../../../index");
|
|
38
38
|
exports.EdgeLabel = (0, react_1.memo)((_a) => {
|
|
39
|
-
var { depiction, text, actions, large, fullWidth, intent, title } = _a, otherDivProps = __rest(_a, ["depiction", "text", "actions", "large", "fullWidth", "intent", "title"]);
|
|
40
|
-
const depEl =
|
|
41
|
-
? react_1.default.createElement(index_1.Depiction, { image: react_1.default.createElement(index_1.Icon, { name: depiction }) })
|
|
42
|
-
: depiction;
|
|
39
|
+
var { depiction, text, actions, large, fullWidth, loose, intent, title } = _a, otherDivProps = __rest(_a, ["depiction", "text", "actions", "large", "fullWidth", "loose", "intent", "title"]);
|
|
40
|
+
const depEl = !!depiction && typeof depiction === "string" ? (react_1.default.createElement(index_1.Depiction, { image: react_1.default.createElement(index_1.Icon, { name: depiction }) })) : (depiction);
|
|
43
41
|
return (react_1.default.createElement("div", Object.assign({ className: `${constants_1.CLASSPREFIX}-graphviz__edge-label` +
|
|
44
42
|
(large ? ` ${constants_1.CLASSPREFIX}-graphviz__edge-label--large` : "") +
|
|
45
43
|
(fullWidth ? ` ${constants_1.CLASSPREFIX}-graphviz__edge-label--fullwidth` : "") +
|
|
46
|
-
(
|
|
44
|
+
(loose ? ` ${constants_1.CLASSPREFIX}-graphviz__edge-label--loose` : "") +
|
|
45
|
+
(intent ? ` ${(0, Intent_1.intentClassName)(intent)}` : "") }, otherDivProps),
|
|
47
46
|
!!depEl && (react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__edge-label__depiction` }, react_1.default.cloneElement(depEl, {
|
|
48
47
|
padding: "tiny",
|
|
49
48
|
ratio: "1:1",
|
|
@@ -53,7 +52,7 @@ exports.EdgeLabel = (0, react_1.memo)((_a) => {
|
|
|
53
52
|
backgroundColor: undefined,
|
|
54
53
|
}))),
|
|
55
54
|
react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__edge-label__text`, title: title }, typeof text === "string" ? react_1.default.createElement(index_1.OverflowText, null, text) : text),
|
|
56
|
-
!!actions &&
|
|
55
|
+
!!actions && react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__edge-label__aux` }, actions)));
|
|
57
56
|
});
|
|
58
57
|
exports.EdgeLabelObject = (0, react_1.memo)((_a) => {
|
|
59
58
|
var { children, edgeCenter, resizeTimeout = -1 } = _a, otherForeignObjectProps = __rest(_a, ["children", "edgeCenter", "resizeTimeout"]);
|
|
@@ -74,7 +73,9 @@ exports.EdgeLabelObject = (0, react_1.memo)((_a) => {
|
|
|
74
73
|
else if (resizeTimeout > 0) {
|
|
75
74
|
// Content is not ready yet, recall resizing process after timeout.
|
|
76
75
|
// This can happen in case the children is actually not a `EdgeLabel`.
|
|
77
|
-
setTimeout(() => {
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
labelSize(container);
|
|
78
|
+
}, resizeTimeout);
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
81
|
return (react_1.default.createElement("foreignObject", Object.assign({ ref: containerCallback, className: `${constants_1.CLASSPREFIX}-graphviz__edge-labelobject`, width: "1", height: "1" }, otherForeignObjectProps, { requiredExtensions: "http://www.w3.org/1999/xhtml" }), children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeLabel.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/edges/EdgeLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoC;
|
|
1
|
+
{"version":3,"file":"EdgeLabel.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/edges/EdgeLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoC;AAEpC,mDAAsE;AAEtE,gEAAyE;AACzE,0CAA+E;AAkClE,QAAA,SAAS,GAAG,IAAA,YAAI,EACzB,CAAC,EAAsG,EAAE,EAAE;QAA1G,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,OAAoC,EAA/B,aAAa,cAApF,kFAAsF,CAAF;IACjF,MAAM,KAAK,GACP,CAAC,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC3C,8BAAC,iBAAS,IAAC,KAAK,EAAE,8BAAC,YAAI,IAAC,IAAI,EAAE,SAA0B,GAAI,GAAI,CACnE,CAAC,CAAC,CAAC,CACA,SAAS,CACZ,CAAC;IAEN,OAAO,CACH,qDACI,SAAS,EACL,GAAG,uBAAM,uBAAuB;YAChC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,uBAAM,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,uBAAM,kCAAkC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,uBAAM,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAA,wBAAe,EAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAE7C,aAAa;QAEhB,CAAC,CAAC,KAAK,IAAI,CACR,uCAAK,SAAS,EAAE,GA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,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YACpE,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrE,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAClD,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;SACvD;aAAM,IAAI,aAAa,GAAG,CAAC,EAAE;YAC1B,mEAAmE;YACnE,sEAAsE;YACtE,UAAU,CAAC,GAAG,EAAE;gBACZ,SAAS,CAAC,SAAS,CAAC,CAAC;YACzB,CAAC,EAAE,aAAa,CAAC,CAAC;SACrB;IACL,CAAC,CAAC;IAEF,OAAO,CACH,+DACI,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE,GAAG,uBAAM,6BAA6B,EACjD,KAAK,EAAC,GAAG,EACT,MAAM,EAAC,GAAG,IACN,uBAAuB,IAC3B,kBAAkB,EAAC,8BAA8B,KAEhD,QAAQ,CACG,CACnB,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -23,10 +23,10 @@ exports.HandleContent = void 0;
|
|
|
23
23
|
const react_1 = __importStar(require("react"));
|
|
24
24
|
const constants_1 = require("../../../configuration/constants");
|
|
25
25
|
const index_1 = require("../../../index");
|
|
26
|
-
exports.HandleContent = (0, react_1.memo)(({ children, extendedTooltip }) => {
|
|
27
|
-
const handleContent =
|
|
28
|
-
if (
|
|
29
|
-
return (react_1.default.createElement(index_1.Tooltip, { content: extendedTooltip, autoFocus: false, enforceFocus: false, openOnTargetFocus: false }, handleContent));
|
|
26
|
+
exports.HandleContent = (0, react_1.memo)(({ children, extendedTooltip, tooltipProps }) => {
|
|
27
|
+
const handleContent = children ? (react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__handle__content` }, children)) : extendedTooltip ? (react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__handle__content` })) : (react_1.default.createElement(react_1.default.Fragment, null));
|
|
28
|
+
if (extendedTooltip && (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.isOpen)) {
|
|
29
|
+
return (react_1.default.createElement(index_1.Tooltip, Object.assign({ content: extendedTooltip, autoFocus: false, enforceFocus: false, openOnTargetFocus: false }, tooltipProps), handleContent));
|
|
30
30
|
}
|
|
31
31
|
return handleContent;
|
|
32
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleContent.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"HandleContent.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoC;AAEpC,gEAAyE;AACzE,0CAAuD;AAc1C,QAAA,aAAa,GAAG,IAAA,YAAI,EAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAsB,EAAE,EAAE;IAClG,MAAM,aAAa,GAAG,QAAQ,CAAC,CAAC,CAAC,CAC7B,uCAAK,SAAS,EAAE,GAAG,uBAAM,4BAA4B,IAAG,QAAQ,CAAO,CAC1E,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAClB,uCAAK,SAAS,EAAE,GAAG,uBAAM,4BAA4B,GAAI,CAC5D,CAAC,CAAC,CAAC,CACA,6DAAK,CACR,CAAC;IAEF,IAAI,eAAe,KAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,MAAM,CAAA,EAAE;QACzC,OAAO,CACH,8BAAC,eAAO,kBACJ,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,CAAC,CAAC"}
|
|
@@ -34,40 +34,78 @@ exports.HandleDefault = void 0;
|
|
|
34
34
|
const react_1 = __importStar(require("react"));
|
|
35
35
|
const react_flow_renderer_1 = require("react-flow-renderer");
|
|
36
36
|
const react_flow_renderer_lts_1 = require("react-flow-renderer-lts");
|
|
37
|
-
const
|
|
37
|
+
const Intent_1 = require("../../../common/Intent");
|
|
38
|
+
const constants_1 = require("../../../configuration/constants");
|
|
38
39
|
const versionsupport_1 = require("../versionsupport");
|
|
39
40
|
const HandleContent_1 = require("./HandleContent");
|
|
40
|
-
const HandleTools_1 = require("./HandleTools");
|
|
41
41
|
exports.HandleDefault = (0, react_1.memo)((_a) => {
|
|
42
|
-
var { flowVersion, data, tooltip, children } = _a, handleProps = __rest(_a, ["flowVersion", "data", "tooltip", "children"]);
|
|
42
|
+
var { flowVersion, data, tooltip, children, category, intent } = _a, handleProps = __rest(_a, ["flowVersion", "data", "tooltip", "children", "category", "intent"]);
|
|
43
43
|
const evaluateFlowVersion = (0, versionsupport_1.useReactFlowVersion)();
|
|
44
44
|
const flowVersionCheck = flowVersion || evaluateFlowVersion;
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const handleDefaultRef = react_1.default.useRef();
|
|
46
|
+
const [extendedTooltipDisplayed, setExtendedTooltipDisplayed] = react_1.default.useState(false);
|
|
47
|
+
const [handleToolsDisplayed, setHandleToolsDisplayed] = react_1.default.useState(false);
|
|
48
|
+
const routeClickToTools = react_1.default.useCallback((e) => {
|
|
49
|
+
const toolsTarget = handleDefaultRef.current.getElementsByClassName(`${constants_1.CLASSPREFIX}-graphviz__handletools-target`);
|
|
50
|
+
if (toolsTarget.length > 0 && e.target === handleDefaultRef.current) {
|
|
51
|
+
setHandleToolsDisplayed(true);
|
|
52
|
+
setExtendedTooltipDisplayed(false);
|
|
53
|
+
}
|
|
54
|
+
}, [handleDefaultRef]);
|
|
55
|
+
react_1.default.useEffect(() => {
|
|
56
|
+
const toolsTarget = handleDefaultRef.current.getElementsByClassName(`${constants_1.CLASSPREFIX}-graphviz__handletools-target`);
|
|
57
|
+
if (toolsTarget && toolsTarget[0] && handleToolsDisplayed) {
|
|
58
|
+
toolsTarget[0].click();
|
|
59
|
+
}
|
|
60
|
+
}, [handleToolsDisplayed]);
|
|
61
|
+
react_1.default.useEffect(() => {
|
|
62
|
+
const toolsTarget = handleDefaultRef.current.getElementsByClassName(`${constants_1.CLASSPREFIX}-graphviz__handletools-target`);
|
|
63
|
+
if (toolsTarget && toolsTarget[0]) {
|
|
64
|
+
// Polyfill for FF that does not support the `:has()` pseudo selector until at least version 119 or 120
|
|
65
|
+
// need to be re-evaluated then
|
|
66
|
+
// @see https://connect.mozilla.org/t5/ideas/when-is-has-css-selector-going-to-be-fully-implemented-in/idi-p/23794
|
|
67
|
+
handleDefaultRef.current.classList.add(`ffpolyfill-has-${constants_1.CLASSPREFIX}-graphviz__handletools-target`);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
49
70
|
const tooltipTitle = tooltip ? { title: tooltip } : {};
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
const handleContentTooltipProps = {
|
|
72
|
+
placement: handleProps.position === "left" || handleProps.position === "right"
|
|
73
|
+
? `${handleProps.position}-end`
|
|
74
|
+
: undefined,
|
|
75
|
+
modifiers: {
|
|
76
|
+
offset: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
options: {
|
|
79
|
+
offset: [3, 20],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
intent: intent,
|
|
84
|
+
className: `${constants_1.CLASSPREFIX}-graphviz__handle__tooltip-target`,
|
|
85
|
+
isOpen: extendedTooltipDisplayed && !handleToolsDisplayed,
|
|
55
86
|
};
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
87
|
+
const handleContentProps = Object.assign(Object.assign({}, data), { tooltipProps: Object.assign(Object.assign({}, handleContentTooltipProps), data === null || data === void 0 ? void 0 : data.tooltipProps) });
|
|
88
|
+
const handleContent = react_1.default.createElement(HandleContent_1.HandleContent, Object.assign({}, handleContentProps), children);
|
|
89
|
+
let switchTooltipTimerOn;
|
|
90
|
+
const handleConfig = Object.assign(Object.assign(Object.assign({}, handleProps), tooltipTitle), { className: intent ? `${(0, Intent_1.intentClassName)(intent)} ` : "", onClick: (e) => {
|
|
91
|
+
if (handleProps.onClick) {
|
|
92
|
+
handleProps.onClick(e);
|
|
93
|
+
}
|
|
94
|
+
routeClickToTools(e);
|
|
95
|
+
}, "data-category": category, onMouseEnter: () => {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
switchTooltipTimerOn = setTimeout(() => setExtendedTooltipDisplayed(true), (_b = (_a = data === null || data === void 0 ? void 0 : data.tooltipProps) === null || _a === void 0 ? void 0 : _a.hoverOpenDelay) !== null && _b !== void 0 ? _b : 500);
|
|
98
|
+
setHandleToolsDisplayed(false);
|
|
99
|
+
}, onMouseLeave: () => {
|
|
100
|
+
if (switchTooltipTimerOn)
|
|
101
|
+
clearTimeout(switchTooltipTimerOn);
|
|
102
|
+
setExtendedTooltipDisplayed(false);
|
|
103
|
+
} });
|
|
66
104
|
switch (flowVersionCheck) {
|
|
67
105
|
case "legacy":
|
|
68
|
-
return react_1.default.createElement(react_flow_renderer_1.Handle, Object.assign({}, handleConfig), handleContent);
|
|
106
|
+
return (react_1.default.createElement(react_flow_renderer_1.Handle, Object.assign({ ref: handleDefaultRef }, handleConfig), handleContent));
|
|
69
107
|
case "next":
|
|
70
|
-
return react_1.default.createElement(react_flow_renderer_lts_1.Handle, Object.assign({}, handleConfig), handleContent);
|
|
108
|
+
return (react_1.default.createElement(react_flow_renderer_lts_1.Handle, Object.assign({ ref: handleDefaultRef }, handleConfig), handleContent));
|
|
71
109
|
default:
|
|
72
110
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
73
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleDefault.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleDefault.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoC;AACpC,6DAAwG;AACxG,qEAAwG;
|
|
1
|
+
{"version":3,"file":"HandleDefault.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleDefault.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoC;AACpC,6DAAwG;AACxG,qEAAwG;AAExG,mDAAsE;AACtE,gEAAyE;AAEzE,sDAAqF;AAErF,mDAAoE;AA+BvD,QAAA,aAAa,GAAG,IAAA,YAAI,EAC7B,CAAC,EAA8F,EAAE,EAAE;QAAlG,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAsC,EAAjC,WAAW,cAAxE,oEAA0E,CAAF;IACrE,MAAM,mBAAmB,GAAG,IAAA,oCAAmB,GAAE,CAAC;IAClD,MAAM,gBAAgB,GAAG,WAAW,IAAI,mBAAmB,CAAC;IAC5D,MAAM,gBAAgB,GAAG,eAAK,CAAC,MAAM,EAAO,CAAC;IAC7C,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC/F,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAEvF,MAAM,iBAAiB,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,KAAK,CAAC,CAAC;QACnC,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;YACf,IAAI,oBAAoB;gBAAE,YAAY,CAAC,oBAAoB,CAAC,CAAC;YAC7D,2BAA2B,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC,GACJ,CAAC;IAEF,QAAQ,gBAAgB,EAAE;QACtB,KAAK,QAAQ;YACT,OAAO,CACH,8BAAC,4BAAY,kBAAC,GAAG,EAAE,gBAAgB,IAAM,YAAY,GAChD,aAAa,CACH,CAClB,CAAC;QACN,KAAK,MAAM;YACP,OAAO,CACH,8BAAC,gCAAU,kBAAC,GAAG,EAAE,gBAAgB,IAAM,YAAY,GAC9C,aAAa,CACL,CAChB,CAAC;QACN;YACI,OAAO,6DAAK,CAAC;KACpB;AACL,CAAC,CACJ,CAAC"}
|
|
@@ -16,12 +16,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.HandleTools = void 0;
|
|
18
18
|
const react_1 = __importDefault(require("react"));
|
|
19
|
+
const core_1 = require("@blueprintjs/core");
|
|
19
20
|
const constants_1 = require("../../../configuration/constants");
|
|
20
21
|
const index_1 = require("../../../index");
|
|
21
22
|
const HandleTools = (_a) => {
|
|
22
23
|
var { children } = _a, otherContextOverlayProps = __rest(_a, ["children"]);
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
const [toolsDisplayed, setToolsDisplayed] = react_1.default.useState(false);
|
|
25
|
+
const configToolsDisplayed = toolsDisplayed
|
|
26
|
+
? {
|
|
27
|
+
defaultIsOpen: true,
|
|
28
|
+
autoFocus: true,
|
|
29
|
+
interactionKind: core_1.PopoverInteractionKind.HOVER,
|
|
30
|
+
onClosing: () => setToolsDisplayed(false),
|
|
31
|
+
}
|
|
32
|
+
: {
|
|
33
|
+
onOpening: () => {
|
|
34
|
+
setToolsDisplayed(true);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
return (react_1.default.createElement(index_1.ContextOverlay, Object.assign({ hoverCloseDelay: 500 }, configToolsDisplayed, otherContextOverlayProps, { content: react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__handletools-content` }, children), className: `${constants_1.CLASSPREFIX}-graphviz__handletools-target`, popoverClassName: `${constants_1.CLASSPREFIX}-graphviz__handletools-overlay` }),
|
|
38
|
+
react_1.default.createElement("div", { className: `${constants_1.CLASSPREFIX}-graphviz__handletools-target`, "data-test-id": otherContextOverlayProps["data-test-id"] })));
|
|
25
39
|
};
|
|
26
40
|
exports.HandleTools = HandleTools;
|
|
27
41
|
//# sourceMappingURL=HandleTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleTools.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleTools.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"HandleTools.js","sourceRoot":"","sources":["../../../../../src/extensions/react-flow/handles/HandleTools.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAA8F;AAE9F,gEAAyE;AACzE,0CAAmE;AAU5D,MAAM,WAAW,GAAG,CAAC,EAA2D,EAAE,EAAE;QAA/D,EAAE,QAAQ,OAAiD,EAA5C,wBAAwB,cAAvC,YAAyC,CAAF;IAC/D,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAE3E,MAAM,oBAAoB,GAAG,cAAc;QACvC,CAAC,CAAC;YACI,aAAa,EAAE,IAAI;YACnB,SAAS,EAAE,IAAI;YACf,eAAe,EAAE,6BAA+B,CAAC,KAAK;YACtD,SAAS,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;SAC5C;QACH,CAAC,CAAC;YACI,SAAS,EAAE,GAAG,EAAE;gBACZ,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;SACJ,CAAC;IAER,OAAO,CACH,8BAAC,sBAAc,kBACX,eAAe,EAAE,GAAG,IAChB,oBAAoB,EACpB,wBAAwB,IAC5B,OAAO,EAAE,uCAAK,SAAS,EAAE,GAAG,uBAAM,gCAAgC,IAAG,QAAQ,CAAO,EACpF,SAAS,EAAE,GAAG,uBAAM,+BAA+B,EACnD,gBAAgB,EAAE,GAAG,uBAAM,gCAAgC;QAE3D,uCACI,SAAS,EAAE,GAAG,uBAAM,+BAA+B,kBACrC,wBAAwB,CAAC,cAAc,CAAC,GACxD,CACW,CACpB,CAAC;AACN,CAAC,CAAC;AA/BW,QAAA,WAAW,eA+BtB"}
|