@aranzatech/diagrams-bpmn 0.2.11 → 0.2.13
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/{catalog-Ch3YT0-0.d.cts → catalog-BiLXVn-2.d.cts} +1 -1
- package/dist/{catalog-BOwJOaXV.d.ts → catalog-Di2nzGs9.d.ts} +1 -1
- package/dist/chunk-FBTGIYZS.js +218 -0
- package/dist/chunk-FBTGIYZS.js.map +1 -0
- package/dist/{chunk-HLCUGTEK.js → chunk-YUE5EM3W.js} +223 -35
- package/dist/chunk-YUE5EM3W.js.map +1 -0
- package/dist/elements/index.cjs +217 -0
- package/dist/elements/index.cjs.map +1 -1
- package/dist/elements/index.d.cts +15 -16
- package/dist/elements/index.d.ts +15 -16
- package/dist/elements/index.js +1 -1
- package/dist/guards-DPHXfpY8.d.cts +16 -0
- package/dist/guards-qgSeZEU4.d.ts +16 -0
- package/dist/index.cjs +221 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/layout/index.cjs +87 -0
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.d.cts +22 -4
- package/dist/layout/index.d.ts +22 -4
- package/dist/layout/index.js +90 -2
- package/dist/layout/index.js.map +1 -1
- package/dist/modeling/index.d.cts +3 -3
- package/dist/modeling/index.d.ts +3 -3
- package/dist/{types-BTuiBv7p.d.cts → types-Dfrt0wVs.d.cts} +45 -1
- package/dist/{types-BTuiBv7p.d.ts → types-Dfrt0wVs.d.ts} +45 -1
- package/dist/{types-DSDMCAre.d.ts → types-rEfHsPr5.d.ts} +1 -1
- package/dist/{types-C7tONwP5.d.cts → types-s2_VvPGf.d.cts} +1 -1
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/xml/index.cjs +221 -33
- package/dist/xml/index.cjs.map +1 -1
- package/dist/xml/index.d.cts +3 -3
- package/dist/xml/index.d.ts +3 -3
- package/dist/xml/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-HLCUGTEK.js.map +0 -1
- package/dist/chunk-OZKTOILD.js +0 -3
- package/dist/chunk-OZKTOILD.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-
|
|
2
|
-
export { acceptsBoundaryEvents, getHandlePolicy, getOrientation, isChoreographyType, isContainerType, isConversationType, isDataType, isEventType, isGatewayType, isTaskType, supportsCollapse, supportsMarkers } from './
|
|
3
|
-
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnSignalDefinition, q as BpmnTimerDefinition, r as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-
|
|
1
|
+
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-BiLXVn-2.cjs';
|
|
2
|
+
export { a as acceptsBoundaryEvents, g as getHandlePolicy, b as getOrientation, i as isChoreographyType, c as isContainerType, d as isConversationType, e as isDataType, f as isEventType, h as isGatewayType, j as isTaskType, s as supportsCollapse, k as supportsMarkers } from './guards-DPHXfpY8.cjs';
|
|
3
|
+
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnSignalDefinition, q as BpmnTimerDefinition, r as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-Dfrt0wVs.cjs';
|
|
4
4
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './nodes/index.cjs';
|
|
5
5
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './edges/index.cjs';
|
|
6
6
|
export { parseBpmnXml, serializeBpmnXml } from './xml/index.cjs';
|
|
7
|
-
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-
|
|
7
|
+
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-s2_VvPGf.cjs';
|
|
8
8
|
import { SimDiagram } from './simulation/index.cjs';
|
|
9
9
|
export { SimEdge, SimLogEntry, SimLogType, SimNode, SimStatus, SimToken, SimVariables, SimulationState, createSimulation, fire, getFireable, isCompleted, setVariable, tick } from './simulation/index.cjs';
|
|
10
10
|
export { BPMN_EDGE_CONNECTION_RULES, BPMN_MODELING_RULES, BPMN_POOL_LANE_LAYOUT, BPMN_ROUTABLE_EDGE_TYPES, BPMN_SELECTION_STYLE, BpmnClipboardState, BpmnConnectionRule, BpmnDiagramDocument, BpmnDiagramSnapshot, BpmnDiagramState, BpmnEventBus, ConnectBpmnOptions, CreateBpmnNodeOptions, FindBpmnContainerAtOptions, GroupAsBpmnSubProcessOptions, MoveBpmnLaneOptions, PasteBpmnOptions, ReorderBpmnLaneOptions, ReparentBpmnNodeAtPositionOptions, ReparentBpmnNodeOptions, ReplaceBpmnNodeOptions, ResizeBpmnNodeByHandleOptions, ResizeBpmnNodeOptions, RouteBpmnEdgeOptions, attachBoundaryEventCommand, bpmnConnectionValidators, canContainBpmnElement, computeBpmnSmartGuides, connectBpmnCommand, copyBpmnElements, createBpmnDiagramDocument, createBpmnEventBus, createBpmnLayoutCache, createBpmnNode, createBpmnNodeCommand, deleteBpmnElementsCommand, deserializeBpmnDiagram, deserializeBpmnDiagramSnapshot, findBpmnContainerAt, getBpmnDragHandleSelector, getBpmnEdgeLabelLayout, getBpmnLaneIndexAtPosition, getBpmnNodeAbsolutePosition, getBpmnNodeCenter, getBpmnNodeSize, getBpmnNodeZIndex, getBpmnPoolLanes, getBpmnTabOrder, groupAsBpmnSubProcessCommand, inferBpmnEdgeType, isBpmnDroppableInContainer, isBpmnEdgeRoutingEditable, isBpmnProcessNode, layoutBpmnPoolLaneNodes, layoutBpmnPoolLanes, moveBpmnLaneCommand, parseBpmnDiagramDocument, pasteBpmnElementsCommand, persistBpmnHistory, reorderBpmnLane, reorderBpmnLaneAfterDrop, reorderBpmnLaneCommand, reparentBpmnNodeAtPosition, reparentBpmnNodeCommand, replaceBpmnNodeCommand, resizeBpmnNodeByHandleCommand, resizeBpmnNodeCommand, restoreBpmnHistory, routeBpmnEdgeCommand, runBpmnCommand, runBpmnCommands, selectBpmnElementsCommand, serializeBpmnDiagram, toBpmnRelativePosition, validateBpmnConnectionForEdgeType, withBpmnLayoutCache, withBpmnNodeZIndexes } from './modeling/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-
|
|
2
|
-
export { acceptsBoundaryEvents, getHandlePolicy, getOrientation, isChoreographyType, isContainerType, isConversationType, isDataType, isEventType, isGatewayType, isTaskType, supportsCollapse, supportsMarkers } from './
|
|
3
|
-
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnSignalDefinition, q as BpmnTimerDefinition, r as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-
|
|
1
|
+
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-Di2nzGs9.js';
|
|
2
|
+
export { a as acceptsBoundaryEvents, g as getHandlePolicy, b as getOrientation, i as isChoreographyType, c as isContainerType, d as isConversationType, e as isDataType, f as isEventType, h as isGatewayType, j as isTaskType, s as supportsCollapse, k as supportsMarkers } from './guards-qgSeZEU4.js';
|
|
3
|
+
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnSignalDefinition, q as BpmnTimerDefinition, r as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-Dfrt0wVs.js';
|
|
4
4
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './nodes/index.js';
|
|
5
5
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './edges/index.js';
|
|
6
6
|
export { parseBpmnXml, serializeBpmnXml } from './xml/index.js';
|
|
7
|
-
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-
|
|
7
|
+
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-rEfHsPr5.js';
|
|
8
8
|
import { SimDiagram } from './simulation/index.js';
|
|
9
9
|
export { SimEdge, SimLogEntry, SimLogType, SimNode, SimStatus, SimToken, SimVariables, SimulationState, createSimulation, fire, getFireable, isCompleted, setVariable, tick } from './simulation/index.js';
|
|
10
10
|
export { BPMN_EDGE_CONNECTION_RULES, BPMN_MODELING_RULES, BPMN_POOL_LANE_LAYOUT, BPMN_ROUTABLE_EDGE_TYPES, BPMN_SELECTION_STYLE, BpmnClipboardState, BpmnConnectionRule, BpmnDiagramDocument, BpmnDiagramSnapshot, BpmnDiagramState, BpmnEventBus, ConnectBpmnOptions, CreateBpmnNodeOptions, FindBpmnContainerAtOptions, GroupAsBpmnSubProcessOptions, MoveBpmnLaneOptions, PasteBpmnOptions, ReorderBpmnLaneOptions, ReparentBpmnNodeAtPositionOptions, ReparentBpmnNodeOptions, ReplaceBpmnNodeOptions, ResizeBpmnNodeByHandleOptions, ResizeBpmnNodeOptions, RouteBpmnEdgeOptions, attachBoundaryEventCommand, bpmnConnectionValidators, canContainBpmnElement, computeBpmnSmartGuides, connectBpmnCommand, copyBpmnElements, createBpmnDiagramDocument, createBpmnEventBus, createBpmnLayoutCache, createBpmnNode, createBpmnNodeCommand, deleteBpmnElementsCommand, deserializeBpmnDiagram, deserializeBpmnDiagramSnapshot, findBpmnContainerAt, getBpmnDragHandleSelector, getBpmnEdgeLabelLayout, getBpmnLaneIndexAtPosition, getBpmnNodeAbsolutePosition, getBpmnNodeCenter, getBpmnNodeSize, getBpmnNodeZIndex, getBpmnPoolLanes, getBpmnTabOrder, groupAsBpmnSubProcessCommand, inferBpmnEdgeType, isBpmnDroppableInContainer, isBpmnEdgeRoutingEditable, isBpmnProcessNode, layoutBpmnPoolLaneNodes, layoutBpmnPoolLanes, moveBpmnLaneCommand, parseBpmnDiagramDocument, pasteBpmnElementsCommand, persistBpmnHistory, reorderBpmnLane, reorderBpmnLaneAfterDrop, reorderBpmnLaneCommand, reparentBpmnNodeAtPosition, reparentBpmnNodeCommand, replaceBpmnNodeCommand, resizeBpmnNodeByHandleCommand, resizeBpmnNodeCommand, restoreBpmnHistory, routeBpmnEdgeCommand, runBpmnCommand, runBpmnCommands, selectBpmnElementsCommand, serializeBpmnDiagram, toBpmnRelativePosition, validateBpmnConnectionForEdgeType, withBpmnLayoutCache, withBpmnNodeZIndexes } from './modeling/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './chunk-
|
|
1
|
+
import './chunk-FBTGIYZS.js';
|
|
2
2
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './chunk-IMW6RG6F.js';
|
|
3
3
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './chunk-O3NWJ5H7.js';
|
|
4
4
|
import './chunk-PDTXM32P.js';
|
|
5
|
-
export { parseBpmnXml, serializeBpmnXml } from './chunk-
|
|
5
|
+
export { parseBpmnXml, serializeBpmnXml } from './chunk-YUE5EM3W.js';
|
|
6
6
|
import { createSimulation, tick, getFireable, fire } from './chunk-M46UDUN3.js';
|
|
7
7
|
export { createSimulation, fire, getFireable, isCompleted, setVariable, tick } from './chunk-M46UDUN3.js';
|
|
8
8
|
export { BPMN_EDGE_CONNECTION_RULES, BPMN_MODELING_RULES, BPMN_POOL_LANE_LAYOUT, BPMN_ROUTABLE_EDGE_TYPES, BPMN_SELECTION_STYLE, attachBoundaryEventCommand, bpmnConnectionValidators, canContainBpmnElement, computeBpmnSmartGuides, connectBpmnCommand, copyBpmnElements, createBpmnDiagramDocument, createBpmnEventBus, createBpmnLayoutCache, createBpmnNode, createBpmnNodeCommand, deleteBpmnElementsCommand, deserializeBpmnDiagram, deserializeBpmnDiagramSnapshot, findBpmnContainerAt, getBpmnDragHandleSelector, getBpmnEdgeLabelLayout, getBpmnLaneIndexAtPosition, getBpmnNodeAbsolutePosition, getBpmnNodeCenter, getBpmnNodeSize, getBpmnNodeZIndex, getBpmnPoolLanes, getBpmnTabOrder, groupAsBpmnSubProcessCommand, inferBpmnEdgeType, isBpmnDroppableInContainer, isBpmnEdgeRoutingEditable, isBpmnProcessNode, layoutBpmnPoolLaneNodes, layoutBpmnPoolLanes, moveBpmnLaneCommand, parseBpmnDiagramDocument, pasteBpmnElementsCommand, persistBpmnHistory, reorderBpmnLane, reorderBpmnLaneAfterDrop, reorderBpmnLaneCommand, reparentBpmnNodeAtPosition, reparentBpmnNodeCommand, replaceBpmnNodeCommand, resizeBpmnNodeByHandleCommand, resizeBpmnNodeCommand, restoreBpmnHistory, routeBpmnEdgeCommand, runBpmnCommand, runBpmnCommands, selectBpmnElementsCommand, serializeBpmnDiagram, toBpmnRelativePosition, validateBpmnConnectionForEdgeType, withBpmnLayoutCache, withBpmnNodeZIndexes } from './chunk-UAWLUDKC.js';
|
package/dist/layout/index.cjs
CHANGED
|
@@ -859,6 +859,92 @@ diagramsCore.createModelingRules({
|
|
|
859
859
|
({ node }) => !node || isBpmnElementResizable(node.data.elementType) ? true : `${node.data.elementType} is not resizable in BPMN.`
|
|
860
860
|
]
|
|
861
861
|
});
|
|
862
|
+
var BPMN_CONTAINER_TYPES = /* @__PURE__ */ new Set([
|
|
863
|
+
"Pool",
|
|
864
|
+
"Lane",
|
|
865
|
+
"SubProcess",
|
|
866
|
+
"Transaction",
|
|
867
|
+
"EventSubProcess",
|
|
868
|
+
"AdHocSubProcess"
|
|
869
|
+
]);
|
|
870
|
+
var CONTAINER_MIN_SIZE = {
|
|
871
|
+
Pool: { w: 560, h: 160 },
|
|
872
|
+
Lane: { w: 480, h: 100 },
|
|
873
|
+
SubProcess: { w: 200, h: 120 },
|
|
874
|
+
Transaction: { w: 200, h: 120 },
|
|
875
|
+
EventSubProcess: { w: 200, h: 120 },
|
|
876
|
+
AdHocSubProcess: { w: 200, h: 120 }
|
|
877
|
+
};
|
|
878
|
+
var CONTAINER_PADDING = {
|
|
879
|
+
Pool: "[top=30,left=55,bottom=30,right=40]",
|
|
880
|
+
Lane: "[top=25,left=60,bottom=25,right=40]",
|
|
881
|
+
SubProcess: "[top=25,left=35,bottom=25,right=35]",
|
|
882
|
+
Transaction: "[top=25,left=35,bottom=25,right=35]",
|
|
883
|
+
EventSubProcess: "[top=25,left=35,bottom=25,right=35]",
|
|
884
|
+
AdHocSubProcess: "[top=25,left=35,bottom=25,right=35]"
|
|
885
|
+
};
|
|
886
|
+
async function bpmnElkLayout(nodes, edges) {
|
|
887
|
+
const poolsWithLanes = /* @__PURE__ */ new Set();
|
|
888
|
+
for (const node of nodes) {
|
|
889
|
+
if (node.data.elementType === "Lane" && node.parentId) {
|
|
890
|
+
poolsWithLanes.add(node.parentId);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
const result = await layout.elkLayout(
|
|
894
|
+
nodes,
|
|
895
|
+
edges,
|
|
896
|
+
{
|
|
897
|
+
direction: "LR",
|
|
898
|
+
getNodeSize: (node) => {
|
|
899
|
+
const bNode = node;
|
|
900
|
+
if (BPMN_CONTAINER_TYPES.has(bNode.data.elementType)) return void 0;
|
|
901
|
+
return getBpmnNodeSize(bNode);
|
|
902
|
+
},
|
|
903
|
+
isContainerNode: (node) => BPMN_CONTAINER_TYPES.has(node.data.elementType),
|
|
904
|
+
getNodeLayoutOptions: (node) => {
|
|
905
|
+
const type = node.data.elementType;
|
|
906
|
+
if (!BPMN_CONTAINER_TYPES.has(type)) return void 0;
|
|
907
|
+
const min = CONTAINER_MIN_SIZE[type];
|
|
908
|
+
const dir = type === "Pool" && poolsWithLanes.has(node.id) ? "DOWN" : "RIGHT";
|
|
909
|
+
return {
|
|
910
|
+
"elk.direction": dir,
|
|
911
|
+
"elk.nodeSize.constraints": "MINIMUM_SIZE",
|
|
912
|
+
...min ? { "elk.nodeSize.minimum": `[w=${min.w},h=${min.h}]` } : {},
|
|
913
|
+
...CONTAINER_PADDING[type] ? { "elk.padding": CONTAINER_PADDING[type] } : {}
|
|
914
|
+
};
|
|
915
|
+
},
|
|
916
|
+
elk: {
|
|
917
|
+
"elk.algorithm": "layered",
|
|
918
|
+
"elk.direction": "RIGHT",
|
|
919
|
+
"elk.hierarchyHandling": "INCLUDE_CHILDREN",
|
|
920
|
+
"elk.edgeRouting": "ORTHOGONAL",
|
|
921
|
+
"elk.layered.spacing.nodeNodeBetweenLayers": "100",
|
|
922
|
+
"elk.layered.spacing.edgeNodeBetweenLayers": "40",
|
|
923
|
+
"elk.spacing.nodeNode": "60",
|
|
924
|
+
"elk.spacing.componentComponent": "80"
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
const nodeMap = new Map(result.nodes.map((n) => [n.id, n]));
|
|
929
|
+
const edgeMap = new Map(result.edges.map((e) => [e.id, e]));
|
|
930
|
+
const updatedNodes = nodes.map((node) => {
|
|
931
|
+
const laid = nodeMap.get(node.id);
|
|
932
|
+
if (!laid) return node;
|
|
933
|
+
return { ...node, position: laid.position, width: laid.width, height: laid.height };
|
|
934
|
+
});
|
|
935
|
+
const updatedEdges = edges.map((edge) => {
|
|
936
|
+
const laid = edgeMap.get(edge.id);
|
|
937
|
+
if (!laid) return edge;
|
|
938
|
+
const nextData = { ...edge.data };
|
|
939
|
+
if (laid.points && laid.points.length > 0) {
|
|
940
|
+
nextData.routingPoints = laid.points;
|
|
941
|
+
} else {
|
|
942
|
+
delete nextData.routingPoints;
|
|
943
|
+
}
|
|
944
|
+
return { ...edge, data: nextData };
|
|
945
|
+
});
|
|
946
|
+
return { nodes: updatedNodes, edges: updatedEdges };
|
|
947
|
+
}
|
|
862
948
|
|
|
863
949
|
// src/layout/index.ts
|
|
864
950
|
async function bpmnDagreLayout(nodes, edges, options = {}) {
|
|
@@ -877,5 +963,6 @@ Object.defineProperty(exports, "applyLayoutResultToDiagram", {
|
|
|
877
963
|
});
|
|
878
964
|
exports.applyBpmnLayoutResult = applyBpmnLayoutResult;
|
|
879
965
|
exports.bpmnDagreLayout = bpmnDagreLayout;
|
|
966
|
+
exports.bpmnElkLayout = bpmnElkLayout;
|
|
880
967
|
//# sourceMappingURL=index.cjs.map
|
|
881
968
|
//# sourceMappingURL=index.cjs.map
|