@uipath/apollo-react 4.34.0 → 4.36.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/dist/canvas/components/BaseCanvas/index.cjs +25 -15
- package/dist/canvas/components/BaseCanvas/index.d.ts +1 -0
- package/dist/canvas/components/BaseCanvas/index.d.ts.map +1 -1
- package/dist/canvas/components/BaseCanvas/index.js +1 -0
- package/dist/canvas/components/BaseNode/BaseNode.cjs +3 -1
- package/dist/canvas/components/BaseNode/BaseNode.d.ts.map +1 -1
- package/dist/canvas/components/BaseNode/BaseNode.js +3 -1
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts +3 -1
- package/dist/canvas/components/BaseNode/BaseNodeConfigContext.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +30 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts +11 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.js +30 -1
- package/dist/canvas/components/ButtonHandle/HandleButton.cjs +3 -1
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts +3 -1
- package/dist/canvas/components/ButtonHandle/HandleButton.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/HandleButton.js +3 -1
- package/dist/canvas/components/ButtonHandle/useButtonHandles.cjs +6 -2
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts +4 -2
- package/dist/canvas/components/ButtonHandle/useButtonHandles.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/useButtonHandles.js +6 -2
- package/dist/canvas/components/CaseFlow/case-flow.manifest.cjs +12 -0
- package/dist/canvas/components/CaseFlow/case-flow.manifest.d.ts.map +1 -1
- package/dist/canvas/components/CaseFlow/case-flow.manifest.js +12 -0
- package/dist/canvas/components/CaseFlow/index.cjs +42 -0
- package/dist/canvas/components/CaseFlow/index.d.ts +2 -0
- package/dist/canvas/components/CaseFlow/index.d.ts.map +1 -0
- package/dist/canvas/components/CaseFlow/index.js +2 -0
- package/dist/canvas/components/LoopNode/LoopNode.cjs +9 -3
- package/dist/canvas/components/LoopNode/LoopNode.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNode.js +9 -3
- package/dist/canvas/components/LoopNode/LoopNode.types.d.ts +10 -0
- package/dist/canvas/components/LoopNode/LoopNode.types.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/LoopNodeExecutionCount.cjs +370 -0
- package/dist/canvas/components/LoopNode/LoopNodeExecutionCount.d.ts +8 -0
- package/dist/canvas/components/LoopNode/LoopNodeExecutionCount.d.ts.map +1 -0
- package/dist/canvas/components/LoopNode/LoopNodeExecutionCount.js +333 -0
- package/dist/canvas/components/LoopNode/index.cjs +15 -8
- package/dist/canvas/components/LoopNode/index.d.ts +1 -0
- package/dist/canvas/components/LoopNode/index.d.ts.map +1 -1
- package/dist/canvas/components/LoopNode/index.js +1 -0
- package/dist/canvas/components/index.cjs +43 -36
- package/dist/canvas/components/index.d.ts +1 -0
- package/dist/canvas/components/index.d.ts.map +1 -1
- package/dist/canvas/components/index.js +1 -0
- package/dist/canvas/locales/en.cjs +1 -1
- package/dist/canvas/locales/en.d.ts.map +1 -1
- package/dist/canvas/locales/en.js +1 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/canvas/utils/CanvasEventBus.d.ts +13 -2
- package/dist/canvas/utils/CanvasEventBus.d.ts.map +1 -1
- package/dist/canvas/utils/manifest-resolver.d.ts +3 -1
- package/dist/canvas/utils/manifest-resolver.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12,6 +12,9 @@ var __webpack_modules__ = {
|
|
|
12
12
|
"./BaseCanvas.types" (module) {
|
|
13
13
|
module.exports = require("./BaseCanvas.types.cjs");
|
|
14
14
|
},
|
|
15
|
+
"./BaseCanvasModeProvider" (module) {
|
|
16
|
+
module.exports = require("./BaseCanvasModeProvider.cjs");
|
|
17
|
+
},
|
|
15
18
|
"./CanvasBackground" (module) {
|
|
16
19
|
module.exports = require("./CanvasBackground.cjs");
|
|
17
20
|
},
|
|
@@ -96,40 +99,47 @@ var __webpack_exports__ = {};
|
|
|
96
99
|
"default"
|
|
97
100
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_BaseCanvas_types__rspack_import_3[__rspack_import_key];
|
|
98
101
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
99
|
-
var
|
|
102
|
+
var _BaseCanvasModeProvider__rspack_import_4 = __webpack_require__("./BaseCanvasModeProvider");
|
|
103
|
+
var __rspack_reexport = {};
|
|
104
|
+
for(const __rspack_import_key in _BaseCanvasModeProvider__rspack_import_4)if ([
|
|
105
|
+
"BaseCanvas",
|
|
106
|
+
"default"
|
|
107
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_BaseCanvasModeProvider__rspack_import_4[__rspack_import_key];
|
|
108
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
109
|
+
var _CanvasBackground__rspack_import_5 = __webpack_require__("./CanvasBackground");
|
|
100
110
|
var __rspack_reexport = {};
|
|
101
|
-
for(const __rspack_import_key in
|
|
111
|
+
for(const __rspack_import_key in _CanvasBackground__rspack_import_5)if ([
|
|
102
112
|
"BaseCanvas",
|
|
103
113
|
"default"
|
|
104
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
114
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_CanvasBackground__rspack_import_5[__rspack_import_key];
|
|
105
115
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
106
|
-
var
|
|
116
|
+
var _CanvasProviders__rspack_import_6 = __webpack_require__("./CanvasProviders");
|
|
107
117
|
var __rspack_reexport = {};
|
|
108
|
-
for(const __rspack_import_key in
|
|
118
|
+
for(const __rspack_import_key in _CanvasProviders__rspack_import_6)if ([
|
|
109
119
|
"BaseCanvas",
|
|
110
120
|
"default"
|
|
111
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
121
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_CanvasProviders__rspack_import_6[__rspack_import_key];
|
|
112
122
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
113
|
-
var
|
|
123
|
+
var _CanvasThemeContext__rspack_import_7 = __webpack_require__("./CanvasThemeContext");
|
|
114
124
|
var __rspack_reexport = {};
|
|
115
|
-
for(const __rspack_import_key in
|
|
125
|
+
for(const __rspack_import_key in _CanvasThemeContext__rspack_import_7)if ([
|
|
116
126
|
"BaseCanvas",
|
|
117
127
|
"default"
|
|
118
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
128
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_CanvasThemeContext__rspack_import_7[__rspack_import_key];
|
|
119
129
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
120
|
-
var
|
|
130
|
+
var _ConnectedHandlesContext__rspack_import_8 = __webpack_require__("./ConnectedHandlesContext");
|
|
121
131
|
var __rspack_reexport = {};
|
|
122
|
-
for(const __rspack_import_key in
|
|
132
|
+
for(const __rspack_import_key in _ConnectedHandlesContext__rspack_import_8)if ([
|
|
123
133
|
"BaseCanvas",
|
|
124
134
|
"default"
|
|
125
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
135
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_ConnectedHandlesContext__rspack_import_8[__rspack_import_key];
|
|
126
136
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
127
|
-
var
|
|
137
|
+
var _SelectionStateContext__rspack_import_9 = __webpack_require__("./SelectionStateContext");
|
|
128
138
|
var __rspack_reexport = {};
|
|
129
|
-
for(const __rspack_import_key in
|
|
139
|
+
for(const __rspack_import_key in _SelectionStateContext__rspack_import_9)if ([
|
|
130
140
|
"BaseCanvas",
|
|
131
141
|
"default"
|
|
132
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
142
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_SelectionStateContext__rspack_import_9[__rspack_import_key];
|
|
133
143
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
134
144
|
})();
|
|
135
145
|
exports.BaseCanvas = __webpack_exports__.BaseCanvas;
|
|
@@ -2,6 +2,7 @@ export { BaseCanvas } from './BaseCanvas';
|
|
|
2
2
|
export * from './BaseCanvas.constants';
|
|
3
3
|
export * from './BaseCanvas.hooks';
|
|
4
4
|
export * from './BaseCanvas.types';
|
|
5
|
+
export * from './BaseCanvasModeProvider';
|
|
5
6
|
export * from './CanvasBackground';
|
|
6
7
|
export * from './CanvasProviders';
|
|
7
8
|
export * from './CanvasThemeContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseCanvas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseCanvas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { BaseCanvas } from "./BaseCanvas.js";
|
|
|
2
2
|
export * from "./BaseCanvas.constants.js";
|
|
3
3
|
export * from "./BaseCanvas.hooks.js";
|
|
4
4
|
export * from "./BaseCanvas.types.js";
|
|
5
|
+
export * from "./BaseCanvasModeProvider.js";
|
|
5
6
|
export * from "./CanvasBackground.js";
|
|
6
7
|
export * from "./CanvasProviders.js";
|
|
7
8
|
export * from "./CanvasThemeContext.js";
|
|
@@ -71,7 +71,7 @@ const getContainerHeight = (height, hasFooter, footerVariant)=>{
|
|
|
71
71
|
};
|
|
72
72
|
const BaseNodeComponent = (props)=>{
|
|
73
73
|
const { type, data, selected, id, dragging, width, height, parentId } = props;
|
|
74
|
-
const { onHandleAction: onHandleActionProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = (0, external_BaseNodeConfigContext_cjs_namespaceObject.useBaseNodeOverrideConfig)();
|
|
74
|
+
const { onHandleAction: onHandleActionProp, onHandleMouseEnter: onHandleMouseEnterProp, onHandleMouseLeave: onHandleMouseLeaveProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = (0, external_BaseNodeConfigContext_cjs_namespaceObject.useBaseNodeOverrideConfig)();
|
|
75
75
|
const updateNodeInternals = (0, react_cjs_namespaceObject.useUpdateNodeInternals)();
|
|
76
76
|
const { updateNodeData, updateNode } = (0, react_cjs_namespaceObject.useReactFlow)();
|
|
77
77
|
const containerRef = (0, external_react_namespaceObject.useRef)(null);
|
|
@@ -341,6 +341,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
341
341
|
handleConfigurations,
|
|
342
342
|
shouldShowHandles,
|
|
343
343
|
handleAction,
|
|
344
|
+
handleMouseEnter: onHandleMouseEnterProp,
|
|
345
|
+
handleMouseLeave: onHandleMouseLeaveProp,
|
|
344
346
|
nodeId: id,
|
|
345
347
|
selected: selected ?? false,
|
|
346
348
|
hovered: isHovered,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAwChF,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNode.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAwChF,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,kBAAkB,CAAC;AA6nB1B,eAAO,MAAM,QAAQ,8CAvlBa,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,6CAulBhB,CAAC"}
|
|
@@ -43,7 +43,7 @@ const getContainerHeight = (height, hasFooter, footerVariant)=>{
|
|
|
43
43
|
};
|
|
44
44
|
const BaseNodeComponent = (props)=>{
|
|
45
45
|
const { type, data, selected, id, dragging, width, height, parentId } = props;
|
|
46
|
-
const { onHandleAction: onHandleActionProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = useBaseNodeOverrideConfig();
|
|
46
|
+
const { onHandleAction: onHandleActionProp, onHandleMouseEnter: onHandleMouseEnterProp, onHandleMouseLeave: onHandleMouseLeaveProp, shouldShowAddButtonFn: shouldShowAddButtonFnProp, shouldShowButtonHandleNotchesFn: shouldShowButtonHandleNotchesFnProp, toolbarConfig: toolbarConfigProp, handleConfigurations: handleConfigurationsProp, adornments: adornmentsProp, suggestionType, disabled, executionStatusOverride, labelTooltip, labelBackgroundColor, footerVariant, footerComponent, subLabelComponent, iconComponent } = useBaseNodeOverrideConfig();
|
|
47
47
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
48
48
|
const { updateNodeData, updateNode } = useReactFlow();
|
|
49
49
|
const containerRef = useRef(null);
|
|
@@ -313,6 +313,8 @@ const BaseNodeComponent = (props)=>{
|
|
|
313
313
|
handleConfigurations,
|
|
314
314
|
shouldShowHandles,
|
|
315
315
|
handleAction,
|
|
316
|
+
handleMouseEnter: onHandleMouseEnterProp,
|
|
317
|
+
handleMouseLeave: onHandleMouseLeaveProp,
|
|
316
318
|
nodeId: id,
|
|
317
319
|
selected: selected ?? false,
|
|
318
320
|
hovered: isHovered,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { HandleGroupManifest } from '../../schema/node-definition';
|
|
2
2
|
import type { ElementStatusValues } from '../../types/execution';
|
|
3
|
-
import type { HandleActionEvent } from '../ButtonHandle/ButtonHandle';
|
|
3
|
+
import type { HandleActionEvent, HandleMouseEvent } from '../ButtonHandle/ButtonHandle';
|
|
4
4
|
import type { NodeToolbarConfig } from '../Toolbar';
|
|
5
5
|
import type { FooterVariant, NodeAdornments } from './BaseNode.types';
|
|
6
6
|
export interface BaseNodeOverrideConfig {
|
|
7
7
|
onHandleAction?: (event: HandleActionEvent) => void;
|
|
8
|
+
onHandleMouseEnter?: (event: HandleMouseEvent) => void;
|
|
9
|
+
onHandleMouseLeave?: (event: HandleMouseEvent) => void;
|
|
8
10
|
shouldShowAddButtonFn?: (opts: {
|
|
9
11
|
showAddButton: boolean;
|
|
10
12
|
selected: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseNodeConfigContext.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseNodeConfigContext.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/BaseNode/BaseNodeConfigContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AActE,MAAM,WAAW,sBAAsB;IAErC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEpD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAEvD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;IACzF,+BAA+B,CAAC,EAAE,CAAC,IAAI,EAAE;QACvC,YAAY,EAAE,OAAO,CAAC;QACtB,UAAU,EAAE,OAAO,CAAC;QACpB,SAAS,EAAE,OAAO,CAAC;KACpB,KAAK,OAAO,CAAC;IAGd,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC7C,UAAU,CAAC,EAAE,cAAc,CAAC;IAG5B,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,mBAAmB,CAAC;IAG9C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACjC;AAMD,eAAO,MAAM,8BAA8B,kDAAyC,CAAC;AAMrF,wBAAgB,yBAAyB,IAAI,sBAAsB,CAElE"}
|
|
@@ -38,10 +38,33 @@ const external_HandleButton_cjs_namespaceObject = require("./HandleButton.cjs");
|
|
|
38
38
|
const external_HandleLabel_cjs_namespaceObject = require("./HandleLabel.cjs");
|
|
39
39
|
const external_HandleNotch_cjs_namespaceObject = require("./HandleNotch.cjs");
|
|
40
40
|
const external_useButtonHandleSizeAndPosition_cjs_namespaceObject = require("./useButtonHandleSizeAndPosition.cjs");
|
|
41
|
-
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
41
|
+
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, onMouseEnter, onMouseLeave, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
42
42
|
const handleRef = (0, external_react_namespaceObject.useRef)(null);
|
|
43
43
|
const [isHovered, setIsHovered] = (0, external_react_namespaceObject.useState)(false);
|
|
44
44
|
const isVertical = position === react_cjs_namespaceObject.Position.Top || position === react_cjs_namespaceObject.Position.Bottom;
|
|
45
|
+
const dispatchMouseEvent = (0, external_react_namespaceObject.useCallback)((eventName, handler)=>{
|
|
46
|
+
const payload = {
|
|
47
|
+
handleId: id,
|
|
48
|
+
nodeId,
|
|
49
|
+
handleType,
|
|
50
|
+
position: connectionPosition
|
|
51
|
+
};
|
|
52
|
+
handler?.(payload);
|
|
53
|
+
CanvasEventBus_cjs_namespaceObject.canvasEventBus.emit(eventName, payload);
|
|
54
|
+
}, [
|
|
55
|
+
id,
|
|
56
|
+
nodeId,
|
|
57
|
+
handleType,
|
|
58
|
+
connectionPosition
|
|
59
|
+
]);
|
|
60
|
+
const handleButtonMouseEnter = (0, external_react_namespaceObject.useCallback)(()=>dispatchMouseEvent('handle:mouseenter', onMouseEnter), [
|
|
61
|
+
dispatchMouseEvent,
|
|
62
|
+
onMouseEnter
|
|
63
|
+
]);
|
|
64
|
+
const handleButtonMouseLeave = (0, external_react_namespaceObject.useCallback)(()=>dispatchMouseEvent('handle:mouseleave', onMouseLeave), [
|
|
65
|
+
dispatchMouseEvent,
|
|
66
|
+
onMouseLeave
|
|
67
|
+
]);
|
|
45
68
|
const positionPercent = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
46
69
|
const relevantSize = isVertical ? nodeWidth : nodeHeight;
|
|
47
70
|
if (relevantSize && relevantSize > 0) {
|
|
@@ -131,6 +154,8 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
131
154
|
labelVisible: visible,
|
|
132
155
|
position: connectionPosition,
|
|
133
156
|
onAction: handleButtonClick,
|
|
157
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
158
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
134
159
|
handleRef: handleRef
|
|
135
160
|
}) : null
|
|
136
161
|
]
|
|
@@ -175,6 +200,8 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
175
200
|
labelVisible: visible,
|
|
176
201
|
position: position,
|
|
177
202
|
onAction: handleButtonClick,
|
|
203
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
204
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
178
205
|
handleRef: handleRef,
|
|
179
206
|
label: label,
|
|
180
207
|
labelIcon: labelIcon,
|
|
@@ -254,6 +281,8 @@ const ButtonHandlesBase = ({ nodeId, handles, position, connectionPosition = pos
|
|
|
254
281
|
visible: handleVisible,
|
|
255
282
|
showButton: finalSelected && handleVisible && handle.showButton,
|
|
256
283
|
onAction: handle.onAction,
|
|
284
|
+
onMouseEnter: handle.onMouseEnter,
|
|
285
|
+
onMouseLeave: handle.onMouseLeave,
|
|
257
286
|
showNotches: showNotches,
|
|
258
287
|
customPositionAndOffsets: customPositionAndOffsets,
|
|
259
288
|
nodeWidth: nodeWidth,
|
|
@@ -8,6 +8,12 @@ export interface HandleActionEvent {
|
|
|
8
8
|
position: Position;
|
|
9
9
|
originalEvent: React.MouseEvent;
|
|
10
10
|
}
|
|
11
|
+
export interface HandleMouseEvent {
|
|
12
|
+
handleId: string;
|
|
13
|
+
nodeId: string;
|
|
14
|
+
handleType: HandleType;
|
|
15
|
+
position: Position;
|
|
16
|
+
}
|
|
11
17
|
type ButtonHandleProps = {
|
|
12
18
|
id: string;
|
|
13
19
|
nodeId: string;
|
|
@@ -24,13 +30,15 @@ type ButtonHandleProps = {
|
|
|
24
30
|
index?: number;
|
|
25
31
|
total?: number;
|
|
26
32
|
onAction?: (event: HandleActionEvent) => void;
|
|
33
|
+
onMouseEnter?: (event: HandleMouseEvent) => void;
|
|
34
|
+
onMouseLeave?: (event: HandleMouseEvent) => void;
|
|
27
35
|
showNotches?: boolean;
|
|
28
36
|
customPositionAndOffsets?: HandleConfigurationSpecificPosition;
|
|
29
37
|
nodeWidth?: number;
|
|
30
38
|
nodeHeight?: number;
|
|
31
39
|
portalAction?: boolean;
|
|
32
40
|
};
|
|
33
|
-
export declare const ButtonHandle: import("react").MemoExoticComponent<({ id, nodeId, type, position, connectionPosition, handleType, label, labelIcon, labelBackgroundColor, visible, showButton, selected, index, total, onAction, showNotches, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction, }: ButtonHandleProps) => import("react/jsx-runtime").JSX.Element>;
|
|
41
|
+
export declare const ButtonHandle: import("react").MemoExoticComponent<({ id, nodeId, type, position, connectionPosition, handleType, label, labelIcon, labelBackgroundColor, visible, showButton, selected, index, total, onAction, onMouseEnter, onMouseLeave, showNotches, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction, }: ButtonHandleProps) => import("react/jsx-runtime").JSX.Element>;
|
|
34
42
|
export interface ButtonHandleConfig {
|
|
35
43
|
id: string;
|
|
36
44
|
type: 'source' | 'target';
|
|
@@ -42,6 +50,8 @@ export interface ButtonHandleConfig {
|
|
|
42
50
|
visible?: boolean;
|
|
43
51
|
showHandle?: boolean;
|
|
44
52
|
onAction?: (event: HandleActionEvent) => void;
|
|
53
|
+
onMouseEnter?: (event: HandleMouseEvent) => void;
|
|
54
|
+
onMouseLeave?: (event: HandleMouseEvent) => void;
|
|
45
55
|
customPositionAndOffsets?: HandleConfigurationSpecificPosition;
|
|
46
56
|
}
|
|
47
57
|
export declare const ButtonHandles: import("react").MemoExoticComponent<({ nodeId, handles, position, connectionPosition, selected, hovered, visible, showAddButton, showNotches, customPositionAndOffsets, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAW/F,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAG7D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,KAAK,CAAC,UAAU,CAAC;CACjC;AAED,KAAK,iBAAiB,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,QAAQ,EAAE,QAAQ,CAAC;IAGnB,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"ButtonHandle.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/ButtonHandle.tsx"],"names":[],"mappings":"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"}
|
|
@@ -9,10 +9,33 @@ import { HandleButton, HandleHoverBridge } from "./HandleButton.js";
|
|
|
9
9
|
import { HandleLabel } from "./HandleLabel.js";
|
|
10
10
|
import { HandleNotch } from "./HandleNotch.js";
|
|
11
11
|
import { useButtonHandleSizeAndPosition } from "./useButtonHandleSizeAndPosition.js";
|
|
12
|
-
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
12
|
+
const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = position, handleType, label, labelIcon, labelBackgroundColor, visible = true, showButton = true, selected = false, index = 0, total = 1, onAction, onMouseEnter, onMouseLeave, showNotches = true, customPositionAndOffsets, nodeWidth, nodeHeight, portalAction = false })=>{
|
|
13
13
|
const handleRef = useRef(null);
|
|
14
14
|
const [isHovered, setIsHovered] = useState(false);
|
|
15
15
|
const isVertical = position === Position.Top || position === Position.Bottom;
|
|
16
|
+
const dispatchMouseEvent = useCallback((eventName, handler)=>{
|
|
17
|
+
const payload = {
|
|
18
|
+
handleId: id,
|
|
19
|
+
nodeId,
|
|
20
|
+
handleType,
|
|
21
|
+
position: connectionPosition
|
|
22
|
+
};
|
|
23
|
+
handler?.(payload);
|
|
24
|
+
canvasEventBus.emit(eventName, payload);
|
|
25
|
+
}, [
|
|
26
|
+
id,
|
|
27
|
+
nodeId,
|
|
28
|
+
handleType,
|
|
29
|
+
connectionPosition
|
|
30
|
+
]);
|
|
31
|
+
const handleButtonMouseEnter = useCallback(()=>dispatchMouseEvent('handle:mouseenter', onMouseEnter), [
|
|
32
|
+
dispatchMouseEvent,
|
|
33
|
+
onMouseEnter
|
|
34
|
+
]);
|
|
35
|
+
const handleButtonMouseLeave = useCallback(()=>dispatchMouseEvent('handle:mouseleave', onMouseLeave), [
|
|
36
|
+
dispatchMouseEvent,
|
|
37
|
+
onMouseLeave
|
|
38
|
+
]);
|
|
16
39
|
const positionPercent = useMemo(()=>{
|
|
17
40
|
const relevantSize = isVertical ? nodeWidth : nodeHeight;
|
|
18
41
|
if (relevantSize && relevantSize > 0) {
|
|
@@ -102,6 +125,8 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
102
125
|
labelVisible: visible,
|
|
103
126
|
position: connectionPosition,
|
|
104
127
|
onAction: handleButtonClick,
|
|
128
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
129
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
105
130
|
handleRef: handleRef
|
|
106
131
|
}) : null
|
|
107
132
|
]
|
|
@@ -146,6 +171,8 @@ const ButtonHandleBase = ({ id, nodeId, type, position, connectionPosition = pos
|
|
|
146
171
|
labelVisible: visible,
|
|
147
172
|
position: position,
|
|
148
173
|
onAction: handleButtonClick,
|
|
174
|
+
onMouseEnter: handleButtonMouseEnter,
|
|
175
|
+
onMouseLeave: handleButtonMouseLeave,
|
|
149
176
|
handleRef: handleRef,
|
|
150
177
|
label: label,
|
|
151
178
|
labelIcon: labelIcon,
|
|
@@ -225,6 +252,8 @@ const ButtonHandlesBase = ({ nodeId, handles, position, connectionPosition = pos
|
|
|
225
252
|
visible: handleVisible,
|
|
226
253
|
showButton: finalSelected && handleVisible && handle.showButton,
|
|
227
254
|
onAction: handle.onAction,
|
|
255
|
+
onMouseEnter: handle.onMouseEnter,
|
|
256
|
+
onMouseLeave: handle.onMouseLeave,
|
|
228
257
|
showNotches: showNotches,
|
|
229
258
|
customPositionAndOffsets: customPositionAndOffsets,
|
|
230
259
|
nodeWidth: nodeWidth,
|
|
@@ -42,7 +42,7 @@ const BUTTON_POSITION = {
|
|
|
42
42
|
[react_cjs_namespaceObject.Position.Right]: 'flex-row left-full top-1/2 -translate-y-1/2'
|
|
43
43
|
};
|
|
44
44
|
const DRAG_THRESHOLD = 5;
|
|
45
|
-
const HandleButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ visible, labelVisible, position, onAction, handleRef, label, labelIcon, labelBackgroundColor, portal })=>{
|
|
45
|
+
const HandleButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ visible, labelVisible, position, onAction, onMouseEnter, onMouseLeave, handleRef, label, labelIcon, labelBackgroundColor, portal })=>{
|
|
46
46
|
const didDragRef = (0, external_react_namespaceObject.useRef)(false);
|
|
47
47
|
const teardownRef = (0, external_react_namespaceObject.useRef)(null);
|
|
48
48
|
(0, external_react_namespaceObject.useEffect)(()=>()=>teardownRef.current?.(), []);
|
|
@@ -97,6 +97,8 @@ const HandleButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ v
|
|
|
97
97
|
"aria-label": "Add node",
|
|
98
98
|
onClick: handleClick,
|
|
99
99
|
onPointerDown: handlePointerDown,
|
|
100
|
+
onMouseEnter: onMouseEnter,
|
|
101
|
+
onMouseLeave: onMouseLeave,
|
|
100
102
|
className: "nodrag nopan pointer-events-auto animate-fade-in"
|
|
101
103
|
}),
|
|
102
104
|
label && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(InlineLabel, {
|
|
@@ -7,11 +7,13 @@ export type HandleButtonPortal = {
|
|
|
7
7
|
height: number;
|
|
8
8
|
transform: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const HandleButton: import("react").MemoExoticComponent<({ visible, labelVisible, position, onAction, handleRef, label, labelIcon, labelBackgroundColor, portal, }: {
|
|
10
|
+
export declare const HandleButton: import("react").MemoExoticComponent<({ visible, labelVisible, position, onAction, onMouseEnter, onMouseLeave, handleRef, label, labelIcon, labelBackgroundColor, portal, }: {
|
|
11
11
|
visible?: boolean;
|
|
12
12
|
labelVisible?: boolean;
|
|
13
13
|
position: Position;
|
|
14
14
|
onAction: (event: React.MouseEvent) => void;
|
|
15
|
+
onMouseEnter?: () => void;
|
|
16
|
+
onMouseLeave?: () => void;
|
|
15
17
|
handleRef?: React.RefObject<HTMLDivElement | null>;
|
|
16
18
|
label?: string;
|
|
17
19
|
labelIcon?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HandleButton.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/HandleButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAepE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAUF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"HandleButton.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/HandleButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAepE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAUF,eAAO,MAAM,YAAY,8KAapB;IACD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B,6CA+GF,CAAC;AA0CF,eAAO,MAAM,iBAAiB,8DACJ;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,oDAOlE,CAAC"}
|
|
@@ -13,7 +13,7 @@ const BUTTON_POSITION = {
|
|
|
13
13
|
[Position.Right]: 'flex-row left-full top-1/2 -translate-y-1/2'
|
|
14
14
|
};
|
|
15
15
|
const DRAG_THRESHOLD = 5;
|
|
16
|
-
const HandleButton = /*#__PURE__*/ memo(({ visible, labelVisible, position, onAction, handleRef, label, labelIcon, labelBackgroundColor, portal })=>{
|
|
16
|
+
const HandleButton = /*#__PURE__*/ memo(({ visible, labelVisible, position, onAction, onMouseEnter, onMouseLeave, handleRef, label, labelIcon, labelBackgroundColor, portal })=>{
|
|
17
17
|
const didDragRef = useRef(false);
|
|
18
18
|
const teardownRef = useRef(null);
|
|
19
19
|
useEffect(()=>()=>teardownRef.current?.(), []);
|
|
@@ -68,6 +68,8 @@ const HandleButton = /*#__PURE__*/ memo(({ visible, labelVisible, position, onAc
|
|
|
68
68
|
"aria-label": "Add node",
|
|
69
69
|
onClick: handleClick,
|
|
70
70
|
onPointerDown: handlePointerDown,
|
|
71
|
+
onMouseEnter: onMouseEnter,
|
|
72
|
+
onMouseLeave: onMouseLeave,
|
|
71
73
|
className: "nodrag nopan pointer-events-auto animate-fade-in"
|
|
72
74
|
}),
|
|
73
75
|
label && /*#__PURE__*/ jsx(InlineLabel, {
|
|
@@ -32,7 +32,7 @@ const external_react_namespaceObject = require("react");
|
|
|
32
32
|
const manifest_resolver_cjs_namespaceObject = require("../../utils/manifest-resolver.cjs");
|
|
33
33
|
const ConnectedHandlesContext_cjs_namespaceObject = require("../BaseCanvas/ConnectedHandlesContext.cjs");
|
|
34
34
|
const external_index_cjs_namespaceObject = require("./index.cjs");
|
|
35
|
-
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions })=>{
|
|
35
|
+
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, handleMouseEnter, handleMouseLeave, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions })=>{
|
|
36
36
|
const connectedHandleIds = (0, ConnectedHandlesContext_cjs_namespaceObject.useConnectedHandles)(nodeId);
|
|
37
37
|
const node = (0, react_namespaceObject.useNodesData)(nodeId);
|
|
38
38
|
const handleElements = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
@@ -43,7 +43,9 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
43
43
|
const enhancedHandles = config.handles.map((handle)=>({
|
|
44
44
|
...handle,
|
|
45
45
|
showHandle: connectedHandleIds.has(handle.id) || groupVisible,
|
|
46
|
-
onAction: handle.onAction || handleAction
|
|
46
|
+
onAction: handle.onAction || handleAction,
|
|
47
|
+
onMouseEnter: handle.onMouseEnter || handleMouseEnter,
|
|
48
|
+
onMouseLeave: handle.onMouseLeave || handleMouseLeave
|
|
47
49
|
}));
|
|
48
50
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_cjs_namespaceObject.ButtonHandles, {
|
|
49
51
|
nodeId: nodeId,
|
|
@@ -68,6 +70,8 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
68
70
|
shouldShowHandles,
|
|
69
71
|
connectedHandleIds,
|
|
70
72
|
handleAction,
|
|
73
|
+
handleMouseEnter,
|
|
74
|
+
handleMouseLeave,
|
|
71
75
|
nodeId,
|
|
72
76
|
showAddButton,
|
|
73
77
|
showNotches,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { HandleGroupManifest } from '../../schema/node-definition';
|
|
2
|
-
import type { HandleActionEvent } from '../ButtonHandle';
|
|
3
|
-
export declare const useButtonHandles: ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions, }: {
|
|
2
|
+
import type { HandleActionEvent, HandleMouseEvent } from '../ButtonHandle';
|
|
3
|
+
export declare const useButtonHandles: ({ handleConfigurations, shouldShowHandles, handleAction, handleMouseEnter, handleMouseLeave, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions, }: {
|
|
4
4
|
handleConfigurations: HandleGroupManifest[];
|
|
5
5
|
shouldShowHandles: boolean;
|
|
6
6
|
nodeId: string;
|
|
7
7
|
selected: boolean;
|
|
8
8
|
hovered?: boolean;
|
|
9
9
|
handleAction?: (event: HandleActionEvent) => void;
|
|
10
|
+
handleMouseEnter?: (event: HandleMouseEvent) => void;
|
|
11
|
+
handleMouseLeave?: (event: HandleMouseEvent) => void;
|
|
10
12
|
showAddButton?: boolean;
|
|
11
13
|
showNotches?: boolean;
|
|
12
14
|
nodeWidth?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useButtonHandles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/useButtonHandles.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"useButtonHandles.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/ButtonHandle/useButtonHandles.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,eAAO,MAAM,gBAAgB,GAAI,oNAe9B;IACD,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;IAC5C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IAUxB,qBAAqB,CAAC,EAAE,CAAC,EACvB,aAAa,EACb,QAAQ,EACR,OAAO,GACR,EAAE;QACD,aAAa,EAAE,OAAO,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;KAClB,KAAK,OAAO,CAAC;CACf,wFAsEA,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { useMemo } from "react";
|
|
|
4
4
|
import { resolveHandles } from "../../utils/manifest-resolver.js";
|
|
5
5
|
import { useConnectedHandles } from "../BaseCanvas/ConnectedHandlesContext.js";
|
|
6
6
|
import { ButtonHandles } from "./index.js";
|
|
7
|
-
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions })=>{
|
|
7
|
+
const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleAction, handleMouseEnter, handleMouseLeave, nodeId, selected, hovered, showAddButton, showNotches, shouldShowAddButtonFn, nodeWidth, nodeHeight, portalActions })=>{
|
|
8
8
|
const connectedHandleIds = useConnectedHandles(nodeId);
|
|
9
9
|
const node = useNodesData(nodeId);
|
|
10
10
|
const handleElements = useMemo(()=>{
|
|
@@ -15,7 +15,9 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
15
15
|
const enhancedHandles = config.handles.map((handle)=>({
|
|
16
16
|
...handle,
|
|
17
17
|
showHandle: connectedHandleIds.has(handle.id) || groupVisible,
|
|
18
|
-
onAction: handle.onAction || handleAction
|
|
18
|
+
onAction: handle.onAction || handleAction,
|
|
19
|
+
onMouseEnter: handle.onMouseEnter || handleMouseEnter,
|
|
20
|
+
onMouseLeave: handle.onMouseLeave || handleMouseLeave
|
|
19
21
|
}));
|
|
20
22
|
return /*#__PURE__*/ jsx(ButtonHandles, {
|
|
21
23
|
nodeId: nodeId,
|
|
@@ -40,6 +42,8 @@ const useButtonHandles = ({ handleConfigurations, shouldShowHandles, handleActio
|
|
|
40
42
|
shouldShowHandles,
|
|
41
43
|
connectedHandleIds,
|
|
42
44
|
handleAction,
|
|
45
|
+
handleMouseEnter,
|
|
46
|
+
handleMouseLeave,
|
|
43
47
|
nodeId,
|
|
44
48
|
showAddButton,
|
|
45
49
|
showNotches,
|
|
@@ -71,6 +71,7 @@ const caseManagementTriggerManifest = {
|
|
|
71
71
|
id: 'output',
|
|
72
72
|
type: 'source',
|
|
73
73
|
handleType: 'output',
|
|
74
|
+
showButton: true,
|
|
74
75
|
constraints: {
|
|
75
76
|
minConnections: 1,
|
|
76
77
|
allowedTargetCategories: [
|
|
@@ -115,6 +116,17 @@ const caseManagementTriggerManifest = {
|
|
|
115
116
|
type: 'object'
|
|
116
117
|
}
|
|
117
118
|
}
|
|
119
|
+
},
|
|
120
|
+
toolbarExtensions: {
|
|
121
|
+
design: {
|
|
122
|
+
actions: [
|
|
123
|
+
{
|
|
124
|
+
id: 'change-trigger-type',
|
|
125
|
+
icon: 'square-mouse-pointer',
|
|
126
|
+
label: 'Change trigger type'
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
118
130
|
}
|
|
119
131
|
};
|
|
120
132
|
const caseFlowManifest = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case-flow.manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/CaseFlow/case-flow.manifest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMnF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAUhD,CAAC;AAMF,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"case-flow.manifest.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/CaseFlow/case-flow.manifest.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAMnF,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAUhD,CAAC;AAMF,eAAO,MAAM,6BAA6B,EAAE,YAsD3C,CAAC;AAMF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI5B,CAAC"}
|
|
@@ -41,6 +41,7 @@ const caseManagementTriggerManifest = {
|
|
|
41
41
|
id: 'output',
|
|
42
42
|
type: 'source',
|
|
43
43
|
handleType: 'output',
|
|
44
|
+
showButton: true,
|
|
44
45
|
constraints: {
|
|
45
46
|
minConnections: 1,
|
|
46
47
|
allowedTargetCategories: [
|
|
@@ -85,6 +86,17 @@ const caseManagementTriggerManifest = {
|
|
|
85
86
|
type: 'object'
|
|
86
87
|
}
|
|
87
88
|
}
|
|
89
|
+
},
|
|
90
|
+
toolbarExtensions: {
|
|
91
|
+
design: {
|
|
92
|
+
actions: [
|
|
93
|
+
{
|
|
94
|
+
id: 'change-trigger-type',
|
|
95
|
+
icon: 'square-mouse-pointer',
|
|
96
|
+
label: 'Change trigger type'
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
88
100
|
}
|
|
89
101
|
};
|
|
90
102
|
const caseFlowManifest = {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
caseFlowCategories: ()=>external_case_flow_manifest_cjs_namespaceObject.caseFlowCategories,
|
|
28
|
+
caseFlowManifest: ()=>external_case_flow_manifest_cjs_namespaceObject.caseFlowManifest,
|
|
29
|
+
caseManagementTriggerManifest: ()=>external_case_flow_manifest_cjs_namespaceObject.caseManagementTriggerManifest
|
|
30
|
+
});
|
|
31
|
+
const external_case_flow_manifest_cjs_namespaceObject = require("./case-flow.manifest.cjs");
|
|
32
|
+
exports.caseFlowCategories = __webpack_exports__.caseFlowCategories;
|
|
33
|
+
exports.caseFlowManifest = __webpack_exports__.caseFlowManifest;
|
|
34
|
+
exports.caseManagementTriggerManifest = __webpack_exports__.caseManagementTriggerManifest;
|
|
35
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
36
|
+
"caseFlowCategories",
|
|
37
|
+
"caseFlowManifest",
|
|
38
|
+
"caseManagementTriggerManifest"
|
|
39
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
40
|
+
Object.defineProperty(exports, '__esModule', {
|
|
41
|
+
value: true
|
|
42
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/canvas/components/CaseFlow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC"}
|