@mx-sose-front/mx-sose-graph 1.1.5 → 1.1.6
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/index.d.ts +120 -4
- package/dist/index.esm.js +987 -614
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/InteractionLayer.vue +93 -3
- package/src/constants/edgeShapeKeys.ts +4 -2
- package/src/constants/index.ts +306 -295
- package/src/render/shape-renderer.ts +13 -6
- package/src/store/graphStore.ts +256 -92
- package/src/utils/containers.ts +4 -2
- package/src/utils/contextMenuUtils.ts +40 -9
- package/src/utils/drag.ts +48 -8
- package/src/utils/graphDragService.ts +10 -9
- package/src/utils/keyboardUtils.ts +25 -11
- package/src/utils/shapeOps/shapeOps.ts +104 -32
- package/src/view/graph.vue +4 -2
package/dist/index.d.ts
CHANGED
|
@@ -107,10 +107,23 @@ export declare class ContextMenuUtils {
|
|
|
107
107
|
*/
|
|
108
108
|
static getCopiedShapes(): any[];
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
|
|
110
|
+
* 检查剪贴板是否有内容
|
|
111
|
+
*/
|
|
112
|
+
static hasClipboardContent(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* 清空剪贴板(粘贴完成后调用)
|
|
115
|
+
*/
|
|
116
|
+
static clearClipboard(): void;
|
|
117
|
+
/**
|
|
118
|
+
* 清除剪切状态(只清除SVG遮盖层,不清除剪贴板数据)
|
|
119
|
+
* 当点击空白处时调用
|
|
112
120
|
*/
|
|
113
121
|
static clearCutState(): void;
|
|
122
|
+
/**
|
|
123
|
+
* 完全清除剪切状态和剪贴板数据
|
|
124
|
+
* 当需要完全重置时调用(如按ESC取消操作)
|
|
125
|
+
*/
|
|
126
|
+
static clearAll(): void;
|
|
114
127
|
/**
|
|
115
128
|
* 收集图元及其所有子图元的 ID
|
|
116
129
|
* @param shapes 要收集的图元数组
|
|
@@ -124,7 +137,7 @@ export declare class ContextMenuUtils {
|
|
|
124
137
|
/**
|
|
125
138
|
* 处理粘贴
|
|
126
139
|
*/
|
|
127
|
-
static handlePaste(
|
|
140
|
+
static handlePaste(_target?: any): void;
|
|
128
141
|
/**
|
|
129
142
|
* 处理剪切
|
|
130
143
|
*/
|
|
@@ -355,6 +368,13 @@ declare type Padding = number | {
|
|
|
355
368
|
left: number;
|
|
356
369
|
};
|
|
357
370
|
|
|
371
|
+
declare type Rect = {
|
|
372
|
+
x: number;
|
|
373
|
+
y: number;
|
|
374
|
+
width: number;
|
|
375
|
+
height: number;
|
|
376
|
+
};
|
|
377
|
+
|
|
358
378
|
declare interface scenarioMenu {
|
|
359
379
|
[key: string]: any;
|
|
360
380
|
}
|
|
@@ -1474,6 +1494,38 @@ parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
|
1474
1494
|
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
1475
1495
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
1476
1496
|
ghostShadow: ComputedRef<Shape[]>;
|
|
1497
|
+
dragDescendantsSnapshot: Ref<Map<string, {
|
|
1498
|
+
id: string;
|
|
1499
|
+
x: number;
|
|
1500
|
+
y: number;
|
|
1501
|
+
width: number;
|
|
1502
|
+
height: number;
|
|
1503
|
+
}[]> & Omit<Map<string, {
|
|
1504
|
+
id: string;
|
|
1505
|
+
x: number;
|
|
1506
|
+
y: number;
|
|
1507
|
+
width: number;
|
|
1508
|
+
height: number;
|
|
1509
|
+
}[]>, keyof Map<any, any>>, Map<string, {
|
|
1510
|
+
id: string;
|
|
1511
|
+
x: number;
|
|
1512
|
+
y: number;
|
|
1513
|
+
width: number;
|
|
1514
|
+
height: number;
|
|
1515
|
+
}[]> | (Map<string, {
|
|
1516
|
+
id: string;
|
|
1517
|
+
x: number;
|
|
1518
|
+
y: number;
|
|
1519
|
+
width: number;
|
|
1520
|
+
height: number;
|
|
1521
|
+
}[]> & Omit<Map<string, {
|
|
1522
|
+
id: string;
|
|
1523
|
+
x: number;
|
|
1524
|
+
y: number;
|
|
1525
|
+
width: number;
|
|
1526
|
+
height: number;
|
|
1527
|
+
}[]>, keyof Map<any, any>>)>;
|
|
1528
|
+
dragBase: Ref<Record<string, Rect>, Record<string, Rect>>;
|
|
1477
1529
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
1478
1530
|
activeDiagramId: Ref<string | null, string | null>;
|
|
1479
1531
|
currentScale: ComputedRef<number>;
|
|
@@ -1696,7 +1748,7 @@ setIsMouseInGraphView: (isIn: boolean) => void;
|
|
|
1696
1748
|
setCutShapeIds: (ids: string[]) => void;
|
|
1697
1749
|
clearCutShapeIds: () => void;
|
|
1698
1750
|
setCopiedShapesCount: (count: number) => void;
|
|
1699
|
-
}, "taggedValueLabels" | "shapes" | "selectedShape" | "pendingNestedIds" | "diagramTitle" | "isDragging" | "draggingShapeId" | "dragOffset" | "diagrams" | "selectedIds" | "hoverContainerId" | "hoverNestable" | "currentDiagramId" | "canDropOnCanvas" | "canOperate" | "cutShapeIds" | "copiedShapesCount" | "packagesTypes" | "classMetaTypes" | "ownerRequiredShapeKeys" | "pinsTypes" | "portsTypes" | "scales" | "activeDiagramId" | "museInGraphView" | "connectMode" | "externalCreatingId">, Pick<{
|
|
1751
|
+
}, "taggedValueLabels" | "shapes" | "selectedShape" | "pendingNestedIds" | "diagramTitle" | "isDragging" | "draggingShapeId" | "dragOffset" | "diagrams" | "selectedIds" | "hoverContainerId" | "hoverNestable" | "currentDiagramId" | "canDropOnCanvas" | "canOperate" | "cutShapeIds" | "copiedShapesCount" | "packagesTypes" | "classMetaTypes" | "ownerRequiredShapeKeys" | "pinsTypes" | "portsTypes" | "dragDescendantsSnapshot" | "dragBase" | "scales" | "activeDiagramId" | "museInGraphView" | "connectMode" | "externalCreatingId">, Pick<{
|
|
1700
1752
|
shapes: Ref<{
|
|
1701
1753
|
id: string;
|
|
1702
1754
|
diagramId: string;
|
|
@@ -2724,6 +2776,38 @@ parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
|
2724
2776
|
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
2725
2777
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
2726
2778
|
ghostShadow: ComputedRef<Shape[]>;
|
|
2779
|
+
dragDescendantsSnapshot: Ref<Map<string, {
|
|
2780
|
+
id: string;
|
|
2781
|
+
x: number;
|
|
2782
|
+
y: number;
|
|
2783
|
+
width: number;
|
|
2784
|
+
height: number;
|
|
2785
|
+
}[]> & Omit<Map<string, {
|
|
2786
|
+
id: string;
|
|
2787
|
+
x: number;
|
|
2788
|
+
y: number;
|
|
2789
|
+
width: number;
|
|
2790
|
+
height: number;
|
|
2791
|
+
}[]>, keyof Map<any, any>>, Map<string, {
|
|
2792
|
+
id: string;
|
|
2793
|
+
x: number;
|
|
2794
|
+
y: number;
|
|
2795
|
+
width: number;
|
|
2796
|
+
height: number;
|
|
2797
|
+
}[]> | (Map<string, {
|
|
2798
|
+
id: string;
|
|
2799
|
+
x: number;
|
|
2800
|
+
y: number;
|
|
2801
|
+
width: number;
|
|
2802
|
+
height: number;
|
|
2803
|
+
}[]> & Omit<Map<string, {
|
|
2804
|
+
id: string;
|
|
2805
|
+
x: number;
|
|
2806
|
+
y: number;
|
|
2807
|
+
width: number;
|
|
2808
|
+
height: number;
|
|
2809
|
+
}[]>, keyof Map<any, any>>)>;
|
|
2810
|
+
dragBase: Ref<Record<string, Rect>, Record<string, Rect>>;
|
|
2727
2811
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
2728
2812
|
activeDiagramId: Ref<string | null, string | null>;
|
|
2729
2813
|
currentScale: ComputedRef<number>;
|
|
@@ -3974,6 +4058,38 @@ parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
|
3974
4058
|
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
3975
4059
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
3976
4060
|
ghostShadow: ComputedRef<Shape[]>;
|
|
4061
|
+
dragDescendantsSnapshot: Ref<Map<string, {
|
|
4062
|
+
id: string;
|
|
4063
|
+
x: number;
|
|
4064
|
+
y: number;
|
|
4065
|
+
width: number;
|
|
4066
|
+
height: number;
|
|
4067
|
+
}[]> & Omit<Map<string, {
|
|
4068
|
+
id: string;
|
|
4069
|
+
x: number;
|
|
4070
|
+
y: number;
|
|
4071
|
+
width: number;
|
|
4072
|
+
height: number;
|
|
4073
|
+
}[]>, keyof Map<any, any>>, Map<string, {
|
|
4074
|
+
id: string;
|
|
4075
|
+
x: number;
|
|
4076
|
+
y: number;
|
|
4077
|
+
width: number;
|
|
4078
|
+
height: number;
|
|
4079
|
+
}[]> | (Map<string, {
|
|
4080
|
+
id: string;
|
|
4081
|
+
x: number;
|
|
4082
|
+
y: number;
|
|
4083
|
+
width: number;
|
|
4084
|
+
height: number;
|
|
4085
|
+
}[]> & Omit<Map<string, {
|
|
4086
|
+
id: string;
|
|
4087
|
+
x: number;
|
|
4088
|
+
y: number;
|
|
4089
|
+
width: number;
|
|
4090
|
+
height: number;
|
|
4091
|
+
}[]>, keyof Map<any, any>>)>;
|
|
4092
|
+
dragBase: Ref<Record<string, Rect>, Record<string, Rect>>;
|
|
3977
4093
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
3978
4094
|
activeDiagramId: Ref<string | null, string | null>;
|
|
3979
4095
|
currentScale: ComputedRef<number>;
|