@html-graph/html-graph 3.13.0 → 3.15.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/html-graph.d.ts +37 -3
- package/dist/html-graph.js +1916 -1706
- package/dist/html-graph.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/html-graph.d.ts
CHANGED
|
@@ -201,12 +201,14 @@ export declare class CanvasBuilder {
|
|
|
201
201
|
private transformConfig;
|
|
202
202
|
private backgroundConfig;
|
|
203
203
|
private connectablePortsConfig;
|
|
204
|
+
private draggableEdgesConfig;
|
|
204
205
|
private virtualScrollConfig;
|
|
205
206
|
private hasDraggableNode;
|
|
206
207
|
private hasTransformableViewport;
|
|
207
208
|
private hasResizeReactiveNodes;
|
|
208
209
|
private hasBackground;
|
|
209
210
|
private hasUserConnectablePorts;
|
|
211
|
+
private hasUserDraggableEdges;
|
|
210
212
|
private boxRenderingTrigger;
|
|
211
213
|
private readonly window;
|
|
212
214
|
constructor(element?: HTMLElement);
|
|
@@ -248,6 +250,7 @@ export declare class CanvasBuilder {
|
|
|
248
250
|
* enables edge creation by dragging one port to another
|
|
249
251
|
*/
|
|
250
252
|
enableUserConnectablePorts(config?: ConnectablePortsConfig): CanvasBuilder;
|
|
253
|
+
enableUserDraggableEdges(config?: DraggableEdgesConfig): CanvasBuilder;
|
|
251
254
|
/**
|
|
252
255
|
* builds final canvas
|
|
253
256
|
*/
|
|
@@ -376,6 +379,19 @@ declare interface DotsRenderer {
|
|
|
376
379
|
readonly color?: string;
|
|
377
380
|
}
|
|
378
381
|
|
|
382
|
+
declare interface DraggableEdgesConfig {
|
|
383
|
+
readonly connectionPreprocessor?: ConnectionPreprocessor;
|
|
384
|
+
readonly mouseDownEventVerifier?: MouseEventVerifier;
|
|
385
|
+
readonly mouseUpEventVerifier?: MouseEventVerifier;
|
|
386
|
+
readonly draggingEdgeResolver?: DraggingEdgeResolver;
|
|
387
|
+
readonly draggingEdgeShape?: EdgeShapeConfig;
|
|
388
|
+
readonly events?: {
|
|
389
|
+
readonly onAfterEdgeReattached?: (edgeId: unknown) => void;
|
|
390
|
+
readonly onEdgeReattachInterrupted?: (edge: GraphEdge) => void;
|
|
391
|
+
readonly onEdgeReattachPrevented?: (request: AddEdgeRequest) => void;
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
|
|
379
395
|
declare interface DraggableNodesConfig {
|
|
380
396
|
readonly moveOnTop?: boolean;
|
|
381
397
|
readonly moveEdgesOnTop?: boolean;
|
|
@@ -393,6 +409,8 @@ declare interface DraggableNodesConfig {
|
|
|
393
409
|
export { DraggableNodesConfig as DragOptions }
|
|
394
410
|
export { DraggableNodesConfig }
|
|
395
411
|
|
|
412
|
+
export declare type DraggingEdgeResolver = (portId: unknown) => unknown | null;
|
|
413
|
+
|
|
396
414
|
declare interface EdgePath {
|
|
397
415
|
readonly path: string;
|
|
398
416
|
readonly midpoint: Point;
|
|
@@ -469,14 +487,29 @@ export declare class Graph {
|
|
|
469
487
|
getPort(portId: unknown): GraphPort | null;
|
|
470
488
|
getAllPortIds(): readonly unknown[];
|
|
471
489
|
getNodePortIds(nodeId: unknown): readonly unknown[] | null;
|
|
490
|
+
getElementPortIds(element: HTMLElement): readonly unknown[];
|
|
491
|
+
/**
|
|
492
|
+
* @deprecated
|
|
493
|
+
* use getElementPortIds instead
|
|
494
|
+
*/
|
|
472
495
|
getElementPortsIds(element: HTMLElement): readonly unknown[];
|
|
473
496
|
getAllEdgeIds(): readonly unknown[];
|
|
474
497
|
getEdge(edgeId: unknown): GraphEdge | null;
|
|
475
498
|
getPortIncomingEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
499
|
+
getPortOutgoingEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
500
|
+
/**
|
|
501
|
+
* @deprecated
|
|
502
|
+
* use getPortOutgoingEdgeIds instead
|
|
503
|
+
*/
|
|
476
504
|
getPortOutcomingEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
477
505
|
getPortCycleEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
478
506
|
getPortAdjacentEdgeIds(portId: unknown): readonly unknown[] | null;
|
|
479
507
|
getNodeIncomingEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
508
|
+
getNodeOutgoingEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
509
|
+
/**
|
|
510
|
+
* @deprecated
|
|
511
|
+
* use getNodeOutgoingEdgeIds instead
|
|
512
|
+
*/
|
|
480
513
|
getNodeOutcomingEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
481
514
|
getNodeCycleEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
482
515
|
getNodeAdjacentEdgeIds(nodeId: unknown): readonly unknown[] | null;
|
|
@@ -486,6 +519,7 @@ export declare interface GraphEdge {
|
|
|
486
519
|
readonly from: unknown;
|
|
487
520
|
readonly to: unknown;
|
|
488
521
|
readonly priority: number;
|
|
522
|
+
readonly shape: EdgeShape;
|
|
489
523
|
}
|
|
490
524
|
|
|
491
525
|
export declare interface GraphNode {
|
|
@@ -548,7 +582,7 @@ declare class GraphStore {
|
|
|
548
582
|
getPort(portId: unknown): PortPayload | undefined;
|
|
549
583
|
updatePort(portId: unknown, request: UpdatePortRequest_2): void;
|
|
550
584
|
getAllPortIds(): readonly unknown[];
|
|
551
|
-
|
|
585
|
+
getElementPortIds(element: HTMLElement): readonly unknown[];
|
|
552
586
|
getNodePortIds(nodeId: unknown): readonly unknown[] | undefined;
|
|
553
587
|
removePort(portId: unknown): void;
|
|
554
588
|
addEdge(request: AddEdgeRequest_2): void;
|
|
@@ -558,11 +592,11 @@ declare class GraphStore {
|
|
|
558
592
|
removeEdge(edgeId: unknown): void;
|
|
559
593
|
clear(): void;
|
|
560
594
|
getPortIncomingEdgeIds(portId: unknown): readonly unknown[];
|
|
561
|
-
|
|
595
|
+
getPortOutgoingEdgeIds(portId: unknown): readonly unknown[];
|
|
562
596
|
getPortCycleEdgeIds(portId: unknown): readonly unknown[];
|
|
563
597
|
getPortAdjacentEdgeIds(portId: unknown): readonly unknown[];
|
|
564
598
|
getNodeIncomingEdgeIds(nodeId: unknown): readonly unknown[];
|
|
565
|
-
|
|
599
|
+
getNodeOutgoingEdgeIds(nodeId: unknown): readonly unknown[];
|
|
566
600
|
getNodeCycleEdgeIds(nodeId: unknown): readonly unknown[];
|
|
567
601
|
getNodeAdjacentEdgeIds(nodeId: unknown): readonly unknown[];
|
|
568
602
|
private addEdgeInternal;
|