@fluxo-dev/shell-workflow 26.1.1 → 26.1.2
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/index.esm.css +761 -0
- package/index.esm.js +114700 -7344
- package/package.json +4 -4
- package/src/index.d.ts +5 -1
- package/src/lib/etl/browse/etl-browse.d.ts +8 -0
- package/src/lib/etl/browse/index.d.ts +2 -0
- package/src/lib/etl/components/nodes/EtlBlockNode.d.ts +3 -0
- package/src/lib/etl/components/nodes/index.d.ts +1 -0
- package/src/lib/etl/components/panels/BlockConfigPanel.d.ts +10 -0
- package/src/lib/etl/components/panels/BlocksPanel.d.ts +8 -0
- package/src/lib/etl/components/panels/PreviewDataPanel.d.ts +8 -0
- package/src/lib/etl/components/panels/index.d.ts +3 -0
- package/src/lib/etl/constants/index.d.ts +22 -0
- package/src/lib/etl/designer/EtlDesignerContext.d.ts +14 -0
- package/src/lib/etl/designer/etl-designer.d.ts +7 -0
- package/src/lib/etl/designer/index.d.ts +1 -0
- package/src/lib/etl/hooks/index.d.ts +6 -0
- package/src/lib/etl/hooks/useBlockDefinitions.d.ts +12 -0
- package/src/lib/etl/hooks/useExecutionHistory.d.ts +13 -0
- package/src/lib/etl/hooks/useNodeOperations.d.ts +15 -0
- package/src/lib/etl/hooks/usePipelineActions.d.ts +25 -0
- package/src/lib/etl/hooks/usePipelineLiveDebug.d.ts +20 -0
- package/src/lib/etl/hooks/usePipelineState.d.ts +16 -0
- package/src/lib/etl/services/etl-debug-hub.service.d.ts +13 -0
- package/src/lib/etl/types/etl-block.types.d.ts +2 -0
- package/src/lib/etl/types/etl-config-field.types.d.ts +9 -0
- package/src/lib/etl/types/etl-live-debug.types.d.ts +56 -0
- package/src/lib/etl/types/etl-pipeline.types.d.ts +243 -0
- package/src/lib/etl/types/index.d.ts +4 -0
- package/src/lib/etl/utils/dynamic-ports.d.ts +12 -0
- package/src/lib/etl/utils/icon-mapper.d.ts +12 -0
- package/src/lib/etl/utils/index.d.ts +5 -0
- package/src/lib/etl/utils/pipeline-converter.d.ts +14 -0
- package/src/lib/etl/utils/status-utils.d.ts +19 -0
- package/src/lib/etl/utils/validation.d.ts +17 -0
- package/src/lib/fluxo-module.d.ts +1 -2
- package/src/lib/workflow/browse/workflow-browse.d.ts +8 -0
- package/src/lib/workflow/browse/workflow-executions-panel.d.ts +8 -0
- package/src/lib/workflow/designer-v2/components/canvas/FlowCanvas.d.ts +16 -0
- package/src/lib/workflow/designer-v2/components/edges/CustomEdge.d.ts +3 -0
- package/src/lib/workflow/designer-v2/components/modals/TriggerInputModal.d.ts +10 -0
- package/src/lib/workflow/designer-v2/components/nodes/CustomNode.d.ts +3 -0
- package/src/lib/workflow/designer-v2/components/panels/ActionsPanel/ActionsPanel.d.ts +12 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/CollapsibleGroup.d.ts +12 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/ConditionalInput.d.ts +17 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/ExpressionEditor.d.ts +19 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/InputField.d.ts +26 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/InputsSection.d.ts +13 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/NodeConfigPanel.d.ts +12 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/OutcomesSection.d.ts +5 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/OutputsSection.d.ts +6 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/PrimitiveInputsSection.d.ts +13 -0
- package/src/lib/workflow/designer-v2/components/panels/NodeConfigPanel/TypedValueEditor.d.ts +17 -0
- package/src/lib/workflow/designer-v2/components/toolbar/WorkflowToolbar.d.ts +9 -0
- package/src/lib/workflow/designer-v2/constants/index.d.ts +3 -0
- package/src/lib/workflow/designer-v2/constants/primitives.d.ts +27 -0
- package/src/lib/workflow/designer-v2/constants/styles.d.ts +61 -0
- package/src/lib/workflow/designer-v2/constants/triggers.d.ts +10 -0
- package/src/lib/workflow/designer-v2/constants/ui-hints.d.ts +22 -0
- package/src/lib/workflow/designer-v2/hooks/index.d.ts +9 -0
- package/src/lib/workflow/designer-v2/hooks/useActionDefinitions.d.ts +11 -0
- package/src/lib/workflow/designer-v2/hooks/useAvailableOutputs.d.ts +14 -0
- package/src/lib/workflow/designer-v2/hooks/useInputDependencies.d.ts +9 -0
- package/src/lib/workflow/designer-v2/hooks/useInputValidation.d.ts +9 -0
- package/src/lib/workflow/designer-v2/hooks/useNodeInputs.d.ts +18 -0
- package/src/lib/workflow/designer-v2/hooks/useNodeOperations.d.ts +15 -0
- package/src/lib/workflow/designer-v2/hooks/useTriggerDefinitions.d.ts +11 -0
- package/src/lib/workflow/designer-v2/hooks/useWorkflowActions.d.ts +15 -0
- package/src/lib/workflow/designer-v2/hooks/useWorkflowState.d.ts +17 -0
- package/src/lib/workflow/designer-v2/index.d.ts +2 -0
- package/src/lib/workflow/designer-v2/types/index.d.ts +6 -0
- package/src/lib/workflow/designer-v2/types/input-config.types.d.ts +32 -0
- package/src/lib/workflow/designer-v2/types/input-dependency.types.d.ts +17 -0
- package/src/lib/workflow/designer-v2/types/input-group.types.d.ts +10 -0
- package/src/lib/workflow/designer-v2/types/input-validation.types.d.ts +11 -0
- package/src/lib/workflow/designer-v2/types/node-data.types.d.ts +52 -0
- package/src/lib/workflow/designer-v2/types/workflow-state.types.d.ts +28 -0
- package/src/lib/workflow/designer-v2/utils/branch-validation.d.ts +43 -0
- package/src/lib/workflow/designer-v2/utils/handle-helpers.d.ts +8 -0
- package/src/lib/workflow/designer-v2/utils/icon-mapper.d.ts +5 -0
- package/src/lib/workflow/designer-v2/utils/index.d.ts +8 -0
- package/src/lib/workflow/designer-v2/utils/node-factory.d.ts +31 -0
- package/src/lib/workflow/designer-v2/utils/parallel-detection.d.ts +32 -0
- package/src/lib/workflow/designer-v2/utils/transformers.d.ts +23 -0
- package/src/lib/workflow/designer-v2/utils/validation.d.ts +22 -0
- package/src/lib/workflow/designer-v2/utils/while-visual-edges.d.ts +7 -0
- package/src/lib/workflow/designer-v2/workflow-designer-v2.d.ts +8 -0
- package/src/lib/designer/components/action/action-card.d.ts +0 -5
- package/src/lib/designer/components/action/action-inputs.d.ts +0 -7
- package/src/lib/designer/components/action/outputs-picker.d.ts +0 -6
- package/src/lib/designer/components/action-chooser.d.ts +0 -5
- package/src/lib/designer/components/connectors/action-button.d.ts +0 -8
- package/src/lib/designer/components/connectors/action-connector-vertical-fill.d.ts +0 -10
- package/src/lib/designer/components/connectors/action-connector-vertical.d.ts +0 -9
- package/src/lib/designer/components/connectors/action-connector.d.ts +0 -7
- package/src/lib/designer/components/trigger/trigger-card.d.ts +0 -5
- package/src/lib/designer/components/trigger-chooser.d.ts +0 -5
- package/src/lib/designer/provider/workflow-designer-provider.d.ts +0 -27
- package/src/lib/designer/services/workflow-manager-interface.d.ts +0 -13
- package/src/lib/designer/services/workflow-manager.d.ts +0 -75
- package/src/lib/designer/workflow-designer.d.ts +0 -5
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { NodeType, NodeHandles, ActionInput } from '@fluxo-dev/api-client-base';
|
|
2
|
+
/**
|
|
3
|
+
* Extended NodeData for ReactFlow nodes
|
|
4
|
+
* Includes all properties needed for UI + backend compatibility
|
|
5
|
+
*/
|
|
6
|
+
export interface NodeData {
|
|
7
|
+
label: string;
|
|
8
|
+
nodeType: NodeType;
|
|
9
|
+
stepType?: string;
|
|
10
|
+
inputs?: Record<string, ActionInput>;
|
|
11
|
+
outputs?: Record<string, unknown>;
|
|
12
|
+
handles: NodeHandles;
|
|
13
|
+
condition?: string;
|
|
14
|
+
collection?: string;
|
|
15
|
+
interval?: string;
|
|
16
|
+
cronExpression?: string;
|
|
17
|
+
eventName?: string;
|
|
18
|
+
eventKey?: string;
|
|
19
|
+
branches?: number;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Available output from a previous node
|
|
24
|
+
*/
|
|
25
|
+
export interface AvailableOutput {
|
|
26
|
+
nodeId: string;
|
|
27
|
+
nodeLabel: string;
|
|
28
|
+
outputId: string;
|
|
29
|
+
outputName: string;
|
|
30
|
+
outputType: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Input definition for primitive nodes
|
|
34
|
+
*/
|
|
35
|
+
export interface PrimitiveInput {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
required: boolean;
|
|
40
|
+
dataType: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'expression';
|
|
41
|
+
defaultValue?: any;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Primitive workflow node definition
|
|
45
|
+
*/
|
|
46
|
+
export interface WorkflowPrimitive {
|
|
47
|
+
type: NodeType;
|
|
48
|
+
label: string;
|
|
49
|
+
description: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
inputs?: PrimitiveInput[];
|
|
52
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Node, Edge } from '@xyflow/react';
|
|
2
|
+
import { NodeData } from './node-data.types';
|
|
3
|
+
/**
|
|
4
|
+
* Workflow metadata
|
|
5
|
+
*/
|
|
6
|
+
export interface WorkflowMetadata {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
category: string;
|
|
10
|
+
workflowId?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Complete workflow state
|
|
14
|
+
*/
|
|
15
|
+
export interface WorkflowState {
|
|
16
|
+
nodes: Node<NodeData>[];
|
|
17
|
+
edges: Edge[];
|
|
18
|
+
selectedNodeId: string | null;
|
|
19
|
+
metadata: WorkflowMetadata;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Workflow save data
|
|
23
|
+
*/
|
|
24
|
+
export interface WorkflowSaveData {
|
|
25
|
+
nodes: Node<NodeData>[];
|
|
26
|
+
edges: Edge[];
|
|
27
|
+
metadata: WorkflowMetadata;
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { NodeData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Validate if a new edge would create a cross-branch connection
|
|
5
|
+
*
|
|
6
|
+
* IMPORTANT: Connections TO a Join node are ALLOWED even if cross-branch,
|
|
7
|
+
* because Join is specifically designed to merge parallel branches!
|
|
8
|
+
*
|
|
9
|
+
* @param sourceNodeId - Source node ID of the new edge
|
|
10
|
+
* @param targetNodeId - Target node ID of the new edge
|
|
11
|
+
* @param existingEdges - All existing edges in the workflow
|
|
12
|
+
* @param nodes - All nodes in the workflow (to check if target is a Join)
|
|
13
|
+
* @returns Object with isValid flag and error message if invalid
|
|
14
|
+
*/
|
|
15
|
+
export declare const validateCrossBranchConnection: (sourceNodeId: string, targetNodeId: string, existingEdges: Edge[], nodes: Node<NodeData>[]) => {
|
|
16
|
+
isValid: boolean;
|
|
17
|
+
error?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Check if a connection would create a cycle
|
|
21
|
+
*
|
|
22
|
+
* @param sourceNodeId - Source node ID
|
|
23
|
+
* @param targetNodeId - Target node ID
|
|
24
|
+
* @param existingEdges - All existing edges
|
|
25
|
+
* @returns Object with isValid flag and error message if invalid
|
|
26
|
+
*/
|
|
27
|
+
export declare const validateNoCycle: (sourceNodeId: string, targetNodeId: string, existingEdges: Edge[]) => {
|
|
28
|
+
isValid: boolean;
|
|
29
|
+
error?: string;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Validate a new connection comprehensively
|
|
33
|
+
*
|
|
34
|
+
* @param sourceNodeId - Source node ID
|
|
35
|
+
* @param targetNodeId - Target node ID
|
|
36
|
+
* @param existingEdges - All existing edges
|
|
37
|
+
* @param nodes - All nodes in the workflow
|
|
38
|
+
* @returns Object with isValid flag and error message if invalid
|
|
39
|
+
*/
|
|
40
|
+
export declare const validateConnection: (sourceNodeId: string, targetNodeId: string, existingEdges: Edge[], nodes: Node<NodeData>[]) => {
|
|
41
|
+
isValid: boolean;
|
|
42
|
+
error?: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get handle color based on handle ID/outcome
|
|
3
|
+
*/
|
|
4
|
+
export declare const getHandleColor: (handleId: string | undefined | null) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Check if handle is an outcome (not default)
|
|
7
|
+
*/
|
|
8
|
+
export declare const isOutcomeHandle: (handleId: string | undefined | null) => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './handle-helpers';
|
|
2
|
+
export * from './validation';
|
|
3
|
+
export * from './transformers';
|
|
4
|
+
export * from './node-factory';
|
|
5
|
+
export * from './parallel-detection';
|
|
6
|
+
export * from './branch-validation';
|
|
7
|
+
export * from './icon-mapper';
|
|
8
|
+
export * from './while-visual-edges';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Node } from '@xyflow/react';
|
|
2
|
+
import { NodeTypeEnum, WorkflowActionDto, WorkflowTriggerDto, ActionInputTypeEnum } from '@fluxo-dev/api-client-base';
|
|
3
|
+
import { NodeData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Create a new action node
|
|
6
|
+
*/
|
|
7
|
+
export declare const createActionNode: (action: WorkflowActionDto) => Node<NodeData>;
|
|
8
|
+
/**
|
|
9
|
+
* Create a new primitive node
|
|
10
|
+
*/
|
|
11
|
+
export declare const createPrimitiveNode: (primitiveType: NodeTypeEnum, label: string) => Node<NodeData>;
|
|
12
|
+
/**
|
|
13
|
+
* Create trigger node (replaces Start node)
|
|
14
|
+
* Triggers are always initial nodes and can have inputs/outputs like actions
|
|
15
|
+
*/
|
|
16
|
+
export declare const createTriggerNode: (trigger: WorkflowTriggerDto, position?: {
|
|
17
|
+
x: number;
|
|
18
|
+
y: number;
|
|
19
|
+
}, workflowId?: number) => Node<NodeData>;
|
|
20
|
+
/**
|
|
21
|
+
* Create start node (DEPRECATED - use createTriggerNode instead)
|
|
22
|
+
* Kept for backward compatibility
|
|
23
|
+
*/
|
|
24
|
+
export declare const createStartNode: () => Node<NodeData>;
|
|
25
|
+
/**
|
|
26
|
+
* Create default ActionInput with Manual type
|
|
27
|
+
*/
|
|
28
|
+
export declare const createDefaultActionInput: (value: any) => {
|
|
29
|
+
type: ActionInputTypeEnum;
|
|
30
|
+
value: any;
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Edge } from '@xyflow/react';
|
|
2
|
+
/**
|
|
3
|
+
* Detects parallel execution from edges
|
|
4
|
+
* A node has parallel execution if the same sourceHandle connects to multiple targets
|
|
5
|
+
*/
|
|
6
|
+
export interface ParallelExecution {
|
|
7
|
+
nodeId: string;
|
|
8
|
+
handle: string;
|
|
9
|
+
targetCount: number;
|
|
10
|
+
targets: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Find all parallel executions in the workflow
|
|
14
|
+
* @param edges - All edges in the workflow
|
|
15
|
+
* @returns Array of parallel execution configurations
|
|
16
|
+
*/
|
|
17
|
+
export declare const detectParallelExecutions: (edges: Edge[]) => ParallelExecution[];
|
|
18
|
+
/**
|
|
19
|
+
* Check if a specific node has parallel execution on any of its handles
|
|
20
|
+
* @param nodeId - The node ID to check
|
|
21
|
+
* @param edges - All edges in the workflow
|
|
22
|
+
* @returns true if the node has parallel execution
|
|
23
|
+
*/
|
|
24
|
+
export declare const hasParallelExecution: (nodeId: string, edges: Edge[]) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Get parallel execution info for a specific node and handle
|
|
27
|
+
* @param nodeId - The node ID
|
|
28
|
+
* @param handle - The source handle
|
|
29
|
+
* @param edges - All edges in the workflow
|
|
30
|
+
* @returns ParallelExecution info or null
|
|
31
|
+
*/
|
|
32
|
+
export declare const getParallelExecutionInfo: (nodeId: string, handle: string, edges: Edge[]) => ParallelExecution | null;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NodeType, WorkflowNode, WorkflowEdge } from '@fluxo-dev/api-client-base';
|
|
2
|
+
import { Node, Edge } from '@xyflow/react';
|
|
3
|
+
import { NodeData } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Map ReactFlow type to backend NodeType
|
|
6
|
+
*/
|
|
7
|
+
export declare const mapNodeTypeToBackend: (reactFlowType: string | number | undefined, nodeData: NodeData) => NodeType;
|
|
8
|
+
/**
|
|
9
|
+
* Convert ReactFlow nodes to backend WorkflowNodes
|
|
10
|
+
*/
|
|
11
|
+
export declare const convertNodesToBackend: (nodes: Node<NodeData>[]) => WorkflowNode[];
|
|
12
|
+
/**
|
|
13
|
+
* Convert ReactFlow edges to backend WorkflowEdges
|
|
14
|
+
*/
|
|
15
|
+
export declare const convertEdgesToBackend: (edges: Edge[], nodeIds: Set<string>) => WorkflowEdge[];
|
|
16
|
+
/**
|
|
17
|
+
* Convert backend WorkflowNodes to ReactFlow nodes
|
|
18
|
+
*/
|
|
19
|
+
export declare const convertNodesFromBackend: (workflowNodes: WorkflowNode[]) => Node<NodeData>[];
|
|
20
|
+
/**
|
|
21
|
+
* Generate a valid GUID
|
|
22
|
+
*/
|
|
23
|
+
export declare const generateGuid: () => string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, Edge } from '@xyflow/react';
|
|
2
|
+
import { NodeData } from '../types';
|
|
3
|
+
export interface ValidationResult {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
errors: string[];
|
|
6
|
+
warnings: string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Validate that all outcomes are connected
|
|
10
|
+
*/
|
|
11
|
+
export declare const validateOutcomes: (nodes: Node<NodeData>[], edges: Edge[]) => ValidationResult;
|
|
12
|
+
/**
|
|
13
|
+
* Clean inputs/outputs by removing undefined or null keys
|
|
14
|
+
*/
|
|
15
|
+
export declare const cleanRecord: (record: Record<string, any> | undefined) => Record<string, any>;
|
|
16
|
+
/**
|
|
17
|
+
* Validate required inputs are provided
|
|
18
|
+
*/
|
|
19
|
+
export declare const validateNodeInputs: (nodeData: NodeData, inputDescriptors: Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
required: boolean;
|
|
22
|
+
}>) => string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { NodeData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Build non-persistent visual edges to show the loop-back path of While primitives.
|
|
5
|
+
* These edges are UI-only and must not be saved to backend schema.
|
|
6
|
+
*/
|
|
7
|
+
export declare const computeWhileReturnVisualEdges: (nodes: Node<NodeData>[], edges: Edge[]) => Edge[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '@xyflow/react/dist/style.css';
|
|
2
|
+
import './workflow-designer-v2.css';
|
|
3
|
+
export interface WorkflowDesignerV2Props {
|
|
4
|
+
workflowId?: number;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSave?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function WorkflowDesignerV2({ workflowId, onClose, onSave }: WorkflowDesignerV2Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { WorkflowAction } from "@fluxo-dev/api-client-base";
|
|
2
|
-
export interface ActionInputsProps {
|
|
3
|
-
actionType: string;
|
|
4
|
-
action: WorkflowAction;
|
|
5
|
-
}
|
|
6
|
-
declare function ActionInputs(props: ActionInputsProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default ActionInputs;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WorkflowAction } from "@fluxo-dev/api-client-base";
|
|
2
|
-
export interface OutputsPickerProps {
|
|
3
|
-
action: WorkflowAction;
|
|
4
|
-
onValuePicked: (value: string) => void;
|
|
5
|
-
}
|
|
6
|
-
export declare function OutputsPicker(props: OutputsPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface ActionButtonProps {
|
|
2
|
-
disableBranch: boolean;
|
|
3
|
-
parentActionId: string | 'trigger';
|
|
4
|
-
parentActionOutcome: string;
|
|
5
|
-
parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last';
|
|
6
|
-
parallelBranchId?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function ActionButton(props: ActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface IActionConnectorVerticalFillProps {
|
|
2
|
-
position: 'left' | 'right' | 'center';
|
|
3
|
-
orientation: 'start' | 'end';
|
|
4
|
-
disableButton?: boolean;
|
|
5
|
-
parentActionId: string;
|
|
6
|
-
parentActionOutcome: string;
|
|
7
|
-
parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last';
|
|
8
|
-
parallelBranchId?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function ActionConnectorVerticalFill(props: IActionConnectorVerticalFillProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface ActionConnectorVerticalProps {
|
|
2
|
-
parentActionId: string;
|
|
3
|
-
parentActionOutcome: string;
|
|
4
|
-
parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last';
|
|
5
|
-
parallelBranchId?: number;
|
|
6
|
-
disableButton?: boolean;
|
|
7
|
-
disableBranch?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function ActionConnectorVertical(props: ActionConnectorVerticalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface ActionConnectorProps {
|
|
2
|
-
parentActionId: string;
|
|
3
|
-
parentActionOutcome: string;
|
|
4
|
-
parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last';
|
|
5
|
-
disableBranch?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare function ActionConnector(props: ActionConnectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TriggerDefinition } from "@fluxo-dev/api-client-base";
|
|
2
|
-
export interface TriggerChooserProps {
|
|
3
|
-
onTriggerSelected: (trigger: TriggerDefinition) => void;
|
|
4
|
-
}
|
|
5
|
-
export declare function TriggerChooser(props: TriggerChooserProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { TriggerCategoryDefinition, TriggerDefinition, Workflow, WorkflowAction, WorkflowActionInput, WorkflowActionInputType } from '@fluxo-dev/api-client-base';
|
|
3
|
-
import { IWorkflowDesignerManager } from "../services/workflow-manager-interface";
|
|
4
|
-
import { ActionCategoryDefinition, ActionDefinition, ActionOutputDefinition } from "@fluxo-dev/api-client-base";
|
|
5
|
-
export interface WorkflowDesignerContextState extends IWorkflowDesignerManager {
|
|
6
|
-
workflowDefinition: Workflow | undefined;
|
|
7
|
-
openedActionId: string | undefined;
|
|
8
|
-
setOpenedAction: (actionId: string | undefined) => void;
|
|
9
|
-
workflowActionDefinitions: ActionCategoryDefinition[];
|
|
10
|
-
workflowTriggerDefinitions: TriggerCategoryDefinition[];
|
|
11
|
-
getActionDefinition: (actionType: string) => ActionDefinition | undefined;
|
|
12
|
-
findParentActions: (action: WorkflowAction) => {
|
|
13
|
-
actionId: string;
|
|
14
|
-
actionName: string;
|
|
15
|
-
outputs: ActionOutputDefinition[];
|
|
16
|
-
}[];
|
|
17
|
-
setActionInput: (actionId: string, inputPropertyName: string, inputType: WorkflowActionInputType, value: string) => void;
|
|
18
|
-
getActionInput: (actionId: string, getActionInput: string) => WorkflowActionInput | undefined;
|
|
19
|
-
getTriggerDefinition: () => TriggerDefinition | undefined;
|
|
20
|
-
}
|
|
21
|
-
interface WorkflowDesignerContextProps {
|
|
22
|
-
children: any;
|
|
23
|
-
workflowDefinition: Workflow | undefined;
|
|
24
|
-
}
|
|
25
|
-
export declare const WorkflowDesignerCtx: React.Context<WorkflowDesignerContextState | null>;
|
|
26
|
-
export declare function WorkflowDesignerProvider(props: WorkflowDesignerContextProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Workflow, WorkflowAction, WorkflowTrigger } from "@fluxo-dev/api-client-base";
|
|
2
|
-
export interface IWorkflowDesignerManager {
|
|
3
|
-
load(workflowDefinition: Workflow): void;
|
|
4
|
-
createEmptyWorkflow(id: string, name: string, description: string, version: number, trigger: WorkflowTrigger): void;
|
|
5
|
-
findActionById(actionId: string): WorkflowAction | undefined;
|
|
6
|
-
addParallelAction(parentActionId: string, parallelAction: WorkflowAction): void;
|
|
7
|
-
addAction(actionToAdd: WorkflowAction, outcome: string, parentActionId: string, parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last', parallelBranchIndex?: number): void;
|
|
8
|
-
setTrigger(trigger: WorkflowTrigger): void;
|
|
9
|
-
addFirstAction(actionToAdd: WorkflowAction): void;
|
|
10
|
-
removeAction(actionToRemoveId: string): void;
|
|
11
|
-
findParentAction(childActionId: string): WorkflowAction | undefined;
|
|
12
|
-
searchLastNextActionRecursively(action: WorkflowAction, outcome: string): WorkflowAction;
|
|
13
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { IWorkflowDesignerManager } from "./workflow-manager-interface";
|
|
2
|
-
import { Workflow, WorkflowAction, WorkflowActionInput, WorkflowActionInputType, WorkflowTrigger } from '@fluxo-dev/api-client-base';
|
|
3
|
-
export declare class WorkflowDesignerManager implements IWorkflowDesignerManager {
|
|
4
|
-
private _workflowDefinition;
|
|
5
|
-
private _mode;
|
|
6
|
-
get workflowDefinition(): Workflow | undefined;
|
|
7
|
-
constructor();
|
|
8
|
-
/**
|
|
9
|
-
* Carica un workflow
|
|
10
|
-
* @param workflowDefinition workflow da caricare
|
|
11
|
-
*/
|
|
12
|
-
load(workflowDefinition: Workflow): void;
|
|
13
|
-
/**
|
|
14
|
-
* Crea un nuovo workflow vuoto
|
|
15
|
-
* @param id Id dell'assemblato
|
|
16
|
-
* @param name Nome del workflow
|
|
17
|
-
* @param description Descrizione del workflow
|
|
18
|
-
* @param version Versione del workflow
|
|
19
|
-
* @param firstAction Azione principale del workflow (Trigger)
|
|
20
|
-
*/
|
|
21
|
-
createEmptyWorkflow(id: string, name: string, description: string, version: number, trigger: WorkflowTrigger): void;
|
|
22
|
-
/**
|
|
23
|
-
* Attraversa l'albero partendo dalla prima azione, salva gli ids di tutte le azioni traversate finchè non trova l'azione con l'id specificato
|
|
24
|
-
* @param startAction Azione da cui iniziare la ricerca
|
|
25
|
-
* @param targetAction Azione da cercare
|
|
26
|
-
*/
|
|
27
|
-
findParentActions(startAction: WorkflowAction, targetAction: WorkflowAction): string[];
|
|
28
|
-
/**
|
|
29
|
-
* Ricerca un'azione ricorsivamente grazie al suo id all'interno dell'albero del Workflow. Cerca prima nell'azione principale e poi nelle azioni parallele e nelle nextActions
|
|
30
|
-
* @param actionId id dell'azione da cercare
|
|
31
|
-
* @param startAction
|
|
32
|
-
*/
|
|
33
|
-
findActionById(actionId: string, startAction?: WorkflowAction | undefined): WorkflowAction | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Aggiunge un'azione parallela all'azione padre
|
|
36
|
-
* @param parentActionId id dell'azione padre
|
|
37
|
-
* @param parallelAction azione parallela da aggiungere
|
|
38
|
-
*/
|
|
39
|
-
addParallelAction(parentActionId: string, parallelAction: WorkflowAction): void;
|
|
40
|
-
addFirstAction(actionToAdd: WorkflowAction): void;
|
|
41
|
-
setTrigger(trigger: WorkflowTrigger): void;
|
|
42
|
-
/**
|
|
43
|
-
* Aggiunge un'azione al workflow
|
|
44
|
-
* @param actionToAdd azione da aggiungere
|
|
45
|
-
* @param outcome outcome dell'azione padre
|
|
46
|
-
* @param parentActionId id dell'azione padre
|
|
47
|
-
* @param parallelStrategy eventuale strategia di inserimento dell'azione parallela
|
|
48
|
-
* @param parallelBranchIndex eventuale indice del branch parallelo in cui inserire l'azione
|
|
49
|
-
*/
|
|
50
|
-
addAction(actionToAdd: WorkflowAction, outcome: string, parentActionId: string, parallelStrategy?: 'after' | 'before' | 'in-first' | 'in-last', parallelBranchIndex?: number): void;
|
|
51
|
-
/**
|
|
52
|
-
* Cerca l'ultima azione figlia partendo da un'azione padre
|
|
53
|
-
* @param action child action
|
|
54
|
-
* @param outcome
|
|
55
|
-
*/
|
|
56
|
-
searchLastNextActionRecursively(action: WorkflowAction, outcome?: string): WorkflowAction;
|
|
57
|
-
/**
|
|
58
|
-
* Rimuove un'azione dal workflow
|
|
59
|
-
* @param actionToRemoveId id dell'azione da rimuovere
|
|
60
|
-
*/
|
|
61
|
-
removeAction(actionToRemoveId: string): void;
|
|
62
|
-
/**
|
|
63
|
-
* Ricerca l'azione padre di un'azione
|
|
64
|
-
* @param childActionId id dell'azione figlia
|
|
65
|
-
*/
|
|
66
|
-
findParentAction(childActionId: string): WorkflowAction | undefined;
|
|
67
|
-
setActionInput(actionId: string, inputPropertyName: string, inputType: WorkflowActionInputType, value: string): void;
|
|
68
|
-
getActionInput(actionId: string, inputPropertyName: string): WorkflowActionInput | undefined;
|
|
69
|
-
private findActionRecursive;
|
|
70
|
-
private removeSimpleAction;
|
|
71
|
-
private removeCustomOutcomeAction;
|
|
72
|
-
private removeParallelBranch;
|
|
73
|
-
private getActionCustomOutcomeParent;
|
|
74
|
-
private findParentActionRecursive;
|
|
75
|
-
}
|