@mx-sose-front/mx-sose-graph 1.1.3 → 1.1.5
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 +177 -9
- package/dist/index.esm.js +4569 -63119
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -39
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +10 -1
- package/src/components/ContextMenu/ContextMenu.vue +10 -10
- package/src/components/DiagramListTooltip/DiagramListTooltip.vue +6 -11
- package/src/components/InteractionLayer.vue +323 -157
- package/src/components/LineStyle/LineStyleMarker.vue +1 -1
- package/src/components/{NameEditor.vue → NameEditor/NameEditor.vue} +4 -4
- package/src/components/{SelectionBox.vue → SelectionBox/SelectionBox.vue} +5 -5
- package/src/components/Shape/Block.vue +1 -1
- package/src/constants/edgeShapeKeys.ts +43 -3
- package/src/constants/index.ts +19 -4
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useHighlight.ts +223 -0
- package/src/hooks/useNameEdit.ts +234 -0
- package/src/{utils/resizeUtils.ts → hooks/useResize.ts} +55 -155
- package/src/index.ts +4 -1
- package/src/render/shape-renderer.ts +59 -46
- package/src/statics/icons/createMenu/show.png +0 -0
- package/src/statics/icons/createMenu/tree.png +0 -0
- package/src/statics/icons/createMenu//345/261/225/347/244/272/347/253/257/345/217/243/345/261/236/346/200/247@3x.png +0 -0
- package/src/statics/icons/createMenu//345/261/225/347/244/272/350/277/236/347/272/277@3x.png +0 -0
- package/src/statics/icons/createMenu//346/211/200/345/234/250/345/233/276/350/241/250@3x.png +0 -0
- package/src/store/graphStore.ts +185 -65
- package/src/types/index.ts +4 -2
- package/src/types/interactionLayer.ts +1 -0
- package/src/utils/batchAutoExpand.ts +65 -0
- package/src/utils/compartment.ts +78 -4
- package/src/utils/containers.ts +24 -10
- package/src/utils/contextMenuUtils.ts +106 -147
- package/src/utils/drag.ts +10 -5
- package/src/utils/edgeUtils.ts +3 -4
- package/src/utils/graphDragService.ts +27 -23
- package/src/utils/iconLoader.ts +7 -7
- package/src/utils/keyboardUtils.ts +195 -32
- package/src/utils/pinUtils.ts +1 -2
- package/src/utils/shapeOps/shapeOps.ts +168 -0
- package/src/utils/viewportCulling.ts +193 -0
- package/src/view/graph.vue +115 -60
- package/src/utils/highlightUtils.ts +0 -162
- package/src/utils/nameEditUtils.ts +0 -137
- /package/src/statics/icons/createMenu/{scissors.png → cut.png} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,99 @@ declare interface CompartmentRecord {
|
|
|
42
42
|
comparentShapes: Shape[];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export declare class ContextMenuUtils {
|
|
46
|
+
private static copiedShapes;
|
|
47
|
+
private static operationType;
|
|
48
|
+
/**
|
|
49
|
+
* 处理右键菜单点击事件
|
|
50
|
+
* @param event 鼠标事件
|
|
51
|
+
* @param layerRef 图层引用
|
|
52
|
+
* @param pickTarget 命中测试函数
|
|
53
|
+
* @param shapes 图元列表
|
|
54
|
+
* @param selectShape 选中图元函数
|
|
55
|
+
* @param isDragging 是否正在拖拽
|
|
56
|
+
* @param isResizing 是否正在缩放
|
|
57
|
+
* @returns 命中的图元(如果有)
|
|
58
|
+
*/
|
|
59
|
+
static handleContextMenuClick(event: MouseEvent, layerRef: Ref<HTMLElement | null>, pickTarget: (shapes: any[], point: {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
}) => {
|
|
63
|
+
kind: string;
|
|
64
|
+
shape?: any;
|
|
65
|
+
}, shapes: any[], selectShape?: (shape: any) => void, isDragging?: boolean, isResizing?: boolean, scale?: number): any | null;
|
|
66
|
+
/**
|
|
67
|
+
* 将鼠标事件坐标转换为本地坐标
|
|
68
|
+
* 注意:需要考虑画布的缩放比例
|
|
69
|
+
*/
|
|
70
|
+
static toLocalPoint(event: MouseEvent, layerRef: HTMLElement | null, scale?: number): {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* 检查点击是否在菜单外部
|
|
76
|
+
*/
|
|
77
|
+
static isClickOutsideMenu(event: MouseEvent, menuSelector?: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* 计算菜单位置(避免超出屏幕边界)
|
|
80
|
+
*/
|
|
81
|
+
static calculateMenuPosition(x: number, y: number, menuWidth?: number, menuHeight?: number, safeMargin?: number): {
|
|
82
|
+
x: number;
|
|
83
|
+
y: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* 处理删除操作
|
|
87
|
+
*/
|
|
88
|
+
static handleDelete(target: any): void;
|
|
89
|
+
/**
|
|
90
|
+
* 处理属性配置 (暂时不用)
|
|
91
|
+
*/
|
|
92
|
+
static handleShowPropertyPanel(target: any): void;
|
|
93
|
+
/**
|
|
94
|
+
* 处理树上高亮
|
|
95
|
+
*/
|
|
96
|
+
static handleHighlight(target: any): void;
|
|
97
|
+
/**
|
|
98
|
+
* 处理所在图表
|
|
99
|
+
*/
|
|
100
|
+
static handleLocateChart(target: any): void;
|
|
101
|
+
/**
|
|
102
|
+
* 设置复制的图元
|
|
103
|
+
*/
|
|
104
|
+
static setCopiedShapes(shapes: any[]): void;
|
|
105
|
+
/**
|
|
106
|
+
* 获取复制的图元
|
|
107
|
+
*/
|
|
108
|
+
static getCopiedShapes(): any[];
|
|
109
|
+
/**
|
|
110
|
+
* 清除剪切状态
|
|
111
|
+
* 当按 ESC 取消或其他需要清除剪切状态的场景调用
|
|
112
|
+
*/
|
|
113
|
+
static clearCutState(): void;
|
|
114
|
+
/**
|
|
115
|
+
* 收集图元及其所有子图元的 ID
|
|
116
|
+
* @param shapes 要收集的图元数组
|
|
117
|
+
* @returns 所有图元 ID 的数组(包括子图元)
|
|
118
|
+
*/
|
|
119
|
+
private static collectShapeAndChildrenIds;
|
|
120
|
+
/**
|
|
121
|
+
* 处理复制
|
|
122
|
+
*/
|
|
123
|
+
static handleCopy(targets: any[]): void;
|
|
124
|
+
/**
|
|
125
|
+
* 处理粘贴
|
|
126
|
+
*/
|
|
127
|
+
static handlePaste(target: any): void;
|
|
128
|
+
/**
|
|
129
|
+
* 处理剪切
|
|
130
|
+
*/
|
|
131
|
+
static handleCut(targets: any[]): void;
|
|
132
|
+
/**
|
|
133
|
+
* 记录日志
|
|
134
|
+
*/
|
|
135
|
+
static logSelectedShape(target: any): void;
|
|
136
|
+
}
|
|
137
|
+
|
|
45
138
|
declare class EventBus {
|
|
46
139
|
private events;
|
|
47
140
|
on(event: string, callback: Function): void;
|
|
@@ -76,6 +169,7 @@ referentialAttributeModel: string[];
|
|
|
76
169
|
ports: string[];
|
|
77
170
|
canOperate: boolean;
|
|
78
171
|
chartLocationData?: locationChart[] | null | undefined;
|
|
172
|
+
isTextareaDialogOpen: boolean;
|
|
79
173
|
}>>, {
|
|
80
174
|
getBoundingClientRect: () => DOMRect | undefined;
|
|
81
175
|
updateShapes: (shapes: Shape[]) => void;
|
|
@@ -164,6 +258,7 @@ referentialAttributeModel: string[];
|
|
|
164
258
|
ports: string[];
|
|
165
259
|
canOperate: boolean;
|
|
166
260
|
chartLocationData?: locationChart[] | null | undefined;
|
|
261
|
+
isTextareaDialogOpen: boolean;
|
|
167
262
|
}>>> & Readonly<{
|
|
168
263
|
onDiagramDoubleClick?: ((data: any) => any) | undefined;
|
|
169
264
|
"onScale-changed"?: ((scale: number) => any) | undefined;
|
|
@@ -231,6 +326,7 @@ declare interface locationChart {
|
|
|
231
326
|
modelCode: string;
|
|
232
327
|
treeId: string;
|
|
233
328
|
modelName: string;
|
|
329
|
+
modelIcon: string;
|
|
234
330
|
}
|
|
235
331
|
|
|
236
332
|
/**
|
|
@@ -305,6 +401,7 @@ export declare interface Shape {
|
|
|
305
401
|
meta?: any;
|
|
306
402
|
scenarioMenus?: scenarioMenu[];
|
|
307
403
|
inert?: boolean | true;
|
|
404
|
+
isCut?: boolean;
|
|
308
405
|
sourceModels?: string[];
|
|
309
406
|
targetModels?: string[];
|
|
310
407
|
modelTypePropertyId: string;
|
|
@@ -313,6 +410,8 @@ export declare interface Shape {
|
|
|
313
410
|
isMovableComparents: boolean;
|
|
314
411
|
}
|
|
315
412
|
|
|
413
|
+
declare type ShapeOp = "add" | "update" | "delete" | "upsert" | "replace";
|
|
414
|
+
|
|
316
415
|
export declare interface Style {
|
|
317
416
|
fontSize?: number;
|
|
318
417
|
fontFamily?: string;
|
|
@@ -506,6 +605,7 @@ targetCreateModel: string;
|
|
|
506
605
|
targetModels: string[];
|
|
507
606
|
}[] | undefined;
|
|
508
607
|
inert?: boolean | undefined;
|
|
608
|
+
isCut?: boolean | undefined;
|
|
509
609
|
sourceModels?: string[] | undefined;
|
|
510
610
|
targetModels?: string[] | undefined;
|
|
511
611
|
modelTypePropertyId: string;
|
|
@@ -670,6 +770,7 @@ targetCreateModel: string;
|
|
|
670
770
|
targetModels: string[];
|
|
671
771
|
}[] | undefined;
|
|
672
772
|
inert?: boolean | undefined;
|
|
773
|
+
isCut?: boolean | undefined;
|
|
673
774
|
sourceModels?: string[] | undefined;
|
|
674
775
|
targetModels?: string[] | undefined;
|
|
675
776
|
modelTypePropertyId: string;
|
|
@@ -836,6 +937,7 @@ targetCreateModel: string;
|
|
|
836
937
|
targetModels: string[];
|
|
837
938
|
}[] | undefined;
|
|
838
939
|
inert?: boolean | undefined;
|
|
940
|
+
isCut?: boolean | undefined;
|
|
839
941
|
sourceModels?: string[] | undefined;
|
|
840
942
|
targetModels?: string[] | undefined;
|
|
841
943
|
modelTypePropertyId: string;
|
|
@@ -1000,6 +1102,7 @@ targetCreateModel: string;
|
|
|
1000
1102
|
targetModels: string[];
|
|
1001
1103
|
}[] | undefined;
|
|
1002
1104
|
inert?: boolean | undefined;
|
|
1105
|
+
isCut?: boolean | undefined;
|
|
1003
1106
|
sourceModels?: string[] | undefined;
|
|
1004
1107
|
targetModels?: string[] | undefined;
|
|
1005
1108
|
modelTypePropertyId: string;
|
|
@@ -1178,6 +1281,7 @@ targetCreateModel: string;
|
|
|
1178
1281
|
targetModels: string[];
|
|
1179
1282
|
}[] | undefined;
|
|
1180
1283
|
inert?: boolean | undefined;
|
|
1284
|
+
isCut?: boolean | undefined;
|
|
1181
1285
|
sourceModels?: string[] | undefined;
|
|
1182
1286
|
targetModels?: string[] | undefined;
|
|
1183
1287
|
modelTypePropertyId: string;
|
|
@@ -1342,6 +1446,7 @@ targetCreateModel: string;
|
|
|
1342
1446
|
targetModels: string[];
|
|
1343
1447
|
}[] | undefined;
|
|
1344
1448
|
inert?: boolean | undefined;
|
|
1449
|
+
isCut?: boolean | undefined;
|
|
1345
1450
|
sourceModels?: string[] | undefined;
|
|
1346
1451
|
targetModels?: string[] | undefined;
|
|
1347
1452
|
modelTypePropertyId: string;
|
|
@@ -1355,6 +1460,8 @@ hoverNestable: Ref<boolean | null, boolean | null>;
|
|
|
1355
1460
|
currentDiagramId: Ref<string | null, string | null>;
|
|
1356
1461
|
canDropOnCanvas: Ref<boolean, boolean>;
|
|
1357
1462
|
canOperate: Ref<boolean, boolean>;
|
|
1463
|
+
cutShapeIds: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
1464
|
+
copiedShapesCount: Ref<number, number>;
|
|
1358
1465
|
taggedValueLabels: Ref<string[], string[]>;
|
|
1359
1466
|
packagesTypes: Ref<string[], string[]>;
|
|
1360
1467
|
classMetaTypes: Ref<string[], string[]>;
|
|
@@ -1363,6 +1470,8 @@ pinsTypes: Ref<string[], string[]>;
|
|
|
1363
1470
|
portsTypes: Ref<string[], string[]>;
|
|
1364
1471
|
shapeCount: ComputedRef<number>;
|
|
1365
1472
|
hasSelectedShape: ComputedRef<boolean>;
|
|
1473
|
+
parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
1474
|
+
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
1366
1475
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
1367
1476
|
ghostShadow: ComputedRef<Shape[]>;
|
|
1368
1477
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
@@ -1370,12 +1479,16 @@ activeDiagramId: Ref<string | null, string | null>;
|
|
|
1370
1479
|
currentScale: ComputedRef<number>;
|
|
1371
1480
|
museInGraphView: Ref<boolean, boolean>;
|
|
1372
1481
|
connectMode: Ref<string, string>;
|
|
1373
|
-
addShape: (shape: Shape
|
|
1482
|
+
addShape: (shape: Shape, options?: {
|
|
1483
|
+
autoExpandParent?: boolean;
|
|
1484
|
+
}) => void;
|
|
1374
1485
|
removeShape: (shapeId: string) => void;
|
|
1375
1486
|
updateShape: (shapeId: string, updates: Partial<Shape>, id?: 'id' | 'modelId') => void;
|
|
1376
1487
|
selectShape: (shape: Shape | null) => void;
|
|
1377
1488
|
setTitle: (title: string) => void;
|
|
1378
|
-
updateShapes: (
|
|
1489
|
+
updateShapes: (payload: Shape[] | Array<string | number>, op?: ShapeOp, options?: {
|
|
1490
|
+
autoExpandParents?: boolean;
|
|
1491
|
+
}) => void;
|
|
1379
1492
|
clearAll: () => void;
|
|
1380
1493
|
startDragShape: (shapeId: string, pointer: {
|
|
1381
1494
|
x: number;
|
|
@@ -1388,6 +1501,11 @@ y: number;
|
|
|
1388
1501
|
moveDraggedShape: (pointer: {
|
|
1389
1502
|
x: number;
|
|
1390
1503
|
y: number;
|
|
1504
|
+
}, options?: {
|
|
1505
|
+
hitPointer?: {
|
|
1506
|
+
x: number;
|
|
1507
|
+
y: number;
|
|
1508
|
+
};
|
|
1391
1509
|
}) => Promise<void>;
|
|
1392
1510
|
endDragShape: (source?: string) => Promise<void>;
|
|
1393
1511
|
getShapes: () => {
|
|
@@ -1548,6 +1666,7 @@ targetCreateModel: string;
|
|
|
1548
1666
|
targetModels: string[];
|
|
1549
1667
|
}[] | undefined;
|
|
1550
1668
|
inert?: boolean | undefined;
|
|
1669
|
+
isCut?: boolean | undefined;
|
|
1551
1670
|
sourceModels?: string[] | undefined;
|
|
1552
1671
|
targetModels?: string[] | undefined;
|
|
1553
1672
|
modelTypePropertyId: string;
|
|
@@ -1574,7 +1693,10 @@ visibleShapes: ComputedRef<Shape[]>;
|
|
|
1574
1693
|
externalCreatingId: Ref<string | null, string | null>;
|
|
1575
1694
|
expandParentAndEmitSizeUpdateByChild: (child: Shape) => void;
|
|
1576
1695
|
setIsMouseInGraphView: (isIn: boolean) => void;
|
|
1577
|
-
|
|
1696
|
+
setCutShapeIds: (ids: string[]) => void;
|
|
1697
|
+
clearCutShapeIds: () => void;
|
|
1698
|
+
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<{
|
|
1578
1700
|
shapes: Ref<{
|
|
1579
1701
|
id: string;
|
|
1580
1702
|
diagramId: string;
|
|
@@ -1733,6 +1855,7 @@ targetCreateModel: string;
|
|
|
1733
1855
|
targetModels: string[];
|
|
1734
1856
|
}[] | undefined;
|
|
1735
1857
|
inert?: boolean | undefined;
|
|
1858
|
+
isCut?: boolean | undefined;
|
|
1736
1859
|
sourceModels?: string[] | undefined;
|
|
1737
1860
|
targetModels?: string[] | undefined;
|
|
1738
1861
|
modelTypePropertyId: string;
|
|
@@ -1897,6 +2020,7 @@ targetCreateModel: string;
|
|
|
1897
2020
|
targetModels: string[];
|
|
1898
2021
|
}[] | undefined;
|
|
1899
2022
|
inert?: boolean | undefined;
|
|
2023
|
+
isCut?: boolean | undefined;
|
|
1900
2024
|
sourceModels?: string[] | undefined;
|
|
1901
2025
|
targetModels?: string[] | undefined;
|
|
1902
2026
|
modelTypePropertyId: string;
|
|
@@ -2063,6 +2187,7 @@ targetCreateModel: string;
|
|
|
2063
2187
|
targetModels: string[];
|
|
2064
2188
|
}[] | undefined;
|
|
2065
2189
|
inert?: boolean | undefined;
|
|
2190
|
+
isCut?: boolean | undefined;
|
|
2066
2191
|
sourceModels?: string[] | undefined;
|
|
2067
2192
|
targetModels?: string[] | undefined;
|
|
2068
2193
|
modelTypePropertyId: string;
|
|
@@ -2227,6 +2352,7 @@ targetCreateModel: string;
|
|
|
2227
2352
|
targetModels: string[];
|
|
2228
2353
|
}[] | undefined;
|
|
2229
2354
|
inert?: boolean | undefined;
|
|
2355
|
+
isCut?: boolean | undefined;
|
|
2230
2356
|
sourceModels?: string[] | undefined;
|
|
2231
2357
|
targetModels?: string[] | undefined;
|
|
2232
2358
|
modelTypePropertyId: string;
|
|
@@ -2405,6 +2531,7 @@ targetCreateModel: string;
|
|
|
2405
2531
|
targetModels: string[];
|
|
2406
2532
|
}[] | undefined;
|
|
2407
2533
|
inert?: boolean | undefined;
|
|
2534
|
+
isCut?: boolean | undefined;
|
|
2408
2535
|
sourceModels?: string[] | undefined;
|
|
2409
2536
|
targetModels?: string[] | undefined;
|
|
2410
2537
|
modelTypePropertyId: string;
|
|
@@ -2569,6 +2696,7 @@ targetCreateModel: string;
|
|
|
2569
2696
|
targetModels: string[];
|
|
2570
2697
|
}[] | undefined;
|
|
2571
2698
|
inert?: boolean | undefined;
|
|
2699
|
+
isCut?: boolean | undefined;
|
|
2572
2700
|
sourceModels?: string[] | undefined;
|
|
2573
2701
|
targetModels?: string[] | undefined;
|
|
2574
2702
|
modelTypePropertyId: string;
|
|
@@ -2582,6 +2710,8 @@ hoverNestable: Ref<boolean | null, boolean | null>;
|
|
|
2582
2710
|
currentDiagramId: Ref<string | null, string | null>;
|
|
2583
2711
|
canDropOnCanvas: Ref<boolean, boolean>;
|
|
2584
2712
|
canOperate: Ref<boolean, boolean>;
|
|
2713
|
+
cutShapeIds: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
2714
|
+
copiedShapesCount: Ref<number, number>;
|
|
2585
2715
|
taggedValueLabels: Ref<string[], string[]>;
|
|
2586
2716
|
packagesTypes: Ref<string[], string[]>;
|
|
2587
2717
|
classMetaTypes: Ref<string[], string[]>;
|
|
@@ -2590,6 +2720,8 @@ pinsTypes: Ref<string[], string[]>;
|
|
|
2590
2720
|
portsTypes: Ref<string[], string[]>;
|
|
2591
2721
|
shapeCount: ComputedRef<number>;
|
|
2592
2722
|
hasSelectedShape: ComputedRef<boolean>;
|
|
2723
|
+
parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
2724
|
+
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
2593
2725
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
2594
2726
|
ghostShadow: ComputedRef<Shape[]>;
|
|
2595
2727
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
@@ -2597,12 +2729,16 @@ activeDiagramId: Ref<string | null, string | null>;
|
|
|
2597
2729
|
currentScale: ComputedRef<number>;
|
|
2598
2730
|
museInGraphView: Ref<boolean, boolean>;
|
|
2599
2731
|
connectMode: Ref<string, string>;
|
|
2600
|
-
addShape: (shape: Shape
|
|
2732
|
+
addShape: (shape: Shape, options?: {
|
|
2733
|
+
autoExpandParent?: boolean;
|
|
2734
|
+
}) => void;
|
|
2601
2735
|
removeShape: (shapeId: string) => void;
|
|
2602
2736
|
updateShape: (shapeId: string, updates: Partial<Shape>, id?: 'id' | 'modelId') => void;
|
|
2603
2737
|
selectShape: (shape: Shape | null) => void;
|
|
2604
2738
|
setTitle: (title: string) => void;
|
|
2605
|
-
updateShapes: (
|
|
2739
|
+
updateShapes: (payload: Shape[] | Array<string | number>, op?: ShapeOp, options?: {
|
|
2740
|
+
autoExpandParents?: boolean;
|
|
2741
|
+
}) => void;
|
|
2606
2742
|
clearAll: () => void;
|
|
2607
2743
|
startDragShape: (shapeId: string, pointer: {
|
|
2608
2744
|
x: number;
|
|
@@ -2615,6 +2751,11 @@ y: number;
|
|
|
2615
2751
|
moveDraggedShape: (pointer: {
|
|
2616
2752
|
x: number;
|
|
2617
2753
|
y: number;
|
|
2754
|
+
}, options?: {
|
|
2755
|
+
hitPointer?: {
|
|
2756
|
+
x: number;
|
|
2757
|
+
y: number;
|
|
2758
|
+
};
|
|
2618
2759
|
}) => Promise<void>;
|
|
2619
2760
|
endDragShape: (source?: string) => Promise<void>;
|
|
2620
2761
|
getShapes: () => {
|
|
@@ -2775,6 +2916,7 @@ targetCreateModel: string;
|
|
|
2775
2916
|
targetModels: string[];
|
|
2776
2917
|
}[] | undefined;
|
|
2777
2918
|
inert?: boolean | undefined;
|
|
2919
|
+
isCut?: boolean | undefined;
|
|
2778
2920
|
sourceModels?: string[] | undefined;
|
|
2779
2921
|
targetModels?: string[] | undefined;
|
|
2780
2922
|
modelTypePropertyId: string;
|
|
@@ -2801,7 +2943,10 @@ visibleShapes: ComputedRef<Shape[]>;
|
|
|
2801
2943
|
externalCreatingId: Ref<string | null, string | null>;
|
|
2802
2944
|
expandParentAndEmitSizeUpdateByChild: (child: Shape) => void;
|
|
2803
2945
|
setIsMouseInGraphView: (isIn: boolean) => void;
|
|
2804
|
-
|
|
2946
|
+
setCutShapeIds: (ids: string[]) => void;
|
|
2947
|
+
clearCutShapeIds: () => void;
|
|
2948
|
+
setCopiedShapesCount: (count: number) => void;
|
|
2949
|
+
}, "shapeCount" | "hasSelectedShape" | "parentChildMap" | "shapeMap" | "marqueeShapes" | "ghostShadow" | "currentScale" | "visibleShapes">, Pick<{
|
|
2805
2950
|
shapes: Ref<{
|
|
2806
2951
|
id: string;
|
|
2807
2952
|
diagramId: string;
|
|
@@ -2960,6 +3105,7 @@ targetCreateModel: string;
|
|
|
2960
3105
|
targetModels: string[];
|
|
2961
3106
|
}[] | undefined;
|
|
2962
3107
|
inert?: boolean | undefined;
|
|
3108
|
+
isCut?: boolean | undefined;
|
|
2963
3109
|
sourceModels?: string[] | undefined;
|
|
2964
3110
|
targetModels?: string[] | undefined;
|
|
2965
3111
|
modelTypePropertyId: string;
|
|
@@ -3124,6 +3270,7 @@ targetCreateModel: string;
|
|
|
3124
3270
|
targetModels: string[];
|
|
3125
3271
|
}[] | undefined;
|
|
3126
3272
|
inert?: boolean | undefined;
|
|
3273
|
+
isCut?: boolean | undefined;
|
|
3127
3274
|
sourceModels?: string[] | undefined;
|
|
3128
3275
|
targetModels?: string[] | undefined;
|
|
3129
3276
|
modelTypePropertyId: string;
|
|
@@ -3290,6 +3437,7 @@ targetCreateModel: string;
|
|
|
3290
3437
|
targetModels: string[];
|
|
3291
3438
|
}[] | undefined;
|
|
3292
3439
|
inert?: boolean | undefined;
|
|
3440
|
+
isCut?: boolean | undefined;
|
|
3293
3441
|
sourceModels?: string[] | undefined;
|
|
3294
3442
|
targetModels?: string[] | undefined;
|
|
3295
3443
|
modelTypePropertyId: string;
|
|
@@ -3454,6 +3602,7 @@ targetCreateModel: string;
|
|
|
3454
3602
|
targetModels: string[];
|
|
3455
3603
|
}[] | undefined;
|
|
3456
3604
|
inert?: boolean | undefined;
|
|
3605
|
+
isCut?: boolean | undefined;
|
|
3457
3606
|
sourceModels?: string[] | undefined;
|
|
3458
3607
|
targetModels?: string[] | undefined;
|
|
3459
3608
|
modelTypePropertyId: string;
|
|
@@ -3632,6 +3781,7 @@ targetCreateModel: string;
|
|
|
3632
3781
|
targetModels: string[];
|
|
3633
3782
|
}[] | undefined;
|
|
3634
3783
|
inert?: boolean | undefined;
|
|
3784
|
+
isCut?: boolean | undefined;
|
|
3635
3785
|
sourceModels?: string[] | undefined;
|
|
3636
3786
|
targetModels?: string[] | undefined;
|
|
3637
3787
|
modelTypePropertyId: string;
|
|
@@ -3796,6 +3946,7 @@ targetCreateModel: string;
|
|
|
3796
3946
|
targetModels: string[];
|
|
3797
3947
|
}[] | undefined;
|
|
3798
3948
|
inert?: boolean | undefined;
|
|
3949
|
+
isCut?: boolean | undefined;
|
|
3799
3950
|
sourceModels?: string[] | undefined;
|
|
3800
3951
|
targetModels?: string[] | undefined;
|
|
3801
3952
|
modelTypePropertyId: string;
|
|
@@ -3809,6 +3960,8 @@ hoverNestable: Ref<boolean | null, boolean | null>;
|
|
|
3809
3960
|
currentDiagramId: Ref<string | null, string | null>;
|
|
3810
3961
|
canDropOnCanvas: Ref<boolean, boolean>;
|
|
3811
3962
|
canOperate: Ref<boolean, boolean>;
|
|
3963
|
+
cutShapeIds: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
3964
|
+
copiedShapesCount: Ref<number, number>;
|
|
3812
3965
|
taggedValueLabels: Ref<string[], string[]>;
|
|
3813
3966
|
packagesTypes: Ref<string[], string[]>;
|
|
3814
3967
|
classMetaTypes: Ref<string[], string[]>;
|
|
@@ -3817,6 +3970,8 @@ pinsTypes: Ref<string[], string[]>;
|
|
|
3817
3970
|
portsTypes: Ref<string[], string[]>;
|
|
3818
3971
|
shapeCount: ComputedRef<number>;
|
|
3819
3972
|
hasSelectedShape: ComputedRef<boolean>;
|
|
3973
|
+
parentChildMap: ComputedRef<Map<string, string[]>>;
|
|
3974
|
+
shapeMap: ComputedRef<Map<string, Shape>>;
|
|
3820
3975
|
marqueeShapes: ComputedRef<Shape[]>;
|
|
3821
3976
|
ghostShadow: ComputedRef<Shape[]>;
|
|
3822
3977
|
scales: Ref<Record<string, number>, Record<string, number>>;
|
|
@@ -3824,12 +3979,16 @@ activeDiagramId: Ref<string | null, string | null>;
|
|
|
3824
3979
|
currentScale: ComputedRef<number>;
|
|
3825
3980
|
museInGraphView: Ref<boolean, boolean>;
|
|
3826
3981
|
connectMode: Ref<string, string>;
|
|
3827
|
-
addShape: (shape: Shape
|
|
3982
|
+
addShape: (shape: Shape, options?: {
|
|
3983
|
+
autoExpandParent?: boolean;
|
|
3984
|
+
}) => void;
|
|
3828
3985
|
removeShape: (shapeId: string) => void;
|
|
3829
3986
|
updateShape: (shapeId: string, updates: Partial<Shape>, id?: 'id' | 'modelId') => void;
|
|
3830
3987
|
selectShape: (shape: Shape | null) => void;
|
|
3831
3988
|
setTitle: (title: string) => void;
|
|
3832
|
-
updateShapes: (
|
|
3989
|
+
updateShapes: (payload: Shape[] | Array<string | number>, op?: ShapeOp, options?: {
|
|
3990
|
+
autoExpandParents?: boolean;
|
|
3991
|
+
}) => void;
|
|
3833
3992
|
clearAll: () => void;
|
|
3834
3993
|
startDragShape: (shapeId: string, pointer: {
|
|
3835
3994
|
x: number;
|
|
@@ -3842,6 +4001,11 @@ y: number;
|
|
|
3842
4001
|
moveDraggedShape: (pointer: {
|
|
3843
4002
|
x: number;
|
|
3844
4003
|
y: number;
|
|
4004
|
+
}, options?: {
|
|
4005
|
+
hitPointer?: {
|
|
4006
|
+
x: number;
|
|
4007
|
+
y: number;
|
|
4008
|
+
};
|
|
3845
4009
|
}) => Promise<void>;
|
|
3846
4010
|
endDragShape: (source?: string) => Promise<void>;
|
|
3847
4011
|
getShapes: () => {
|
|
@@ -4002,6 +4166,7 @@ targetCreateModel: string;
|
|
|
4002
4166
|
targetModels: string[];
|
|
4003
4167
|
}[] | undefined;
|
|
4004
4168
|
inert?: boolean | undefined;
|
|
4169
|
+
isCut?: boolean | undefined;
|
|
4005
4170
|
sourceModels?: string[] | undefined;
|
|
4006
4171
|
targetModels?: string[] | undefined;
|
|
4007
4172
|
modelTypePropertyId: string;
|
|
@@ -4028,7 +4193,10 @@ visibleShapes: ComputedRef<Shape[]>;
|
|
|
4028
4193
|
externalCreatingId: Ref<string | null, string | null>;
|
|
4029
4194
|
expandParentAndEmitSizeUpdateByChild: (child: Shape) => void;
|
|
4030
4195
|
setIsMouseInGraphView: (isIn: boolean) => void;
|
|
4031
|
-
|
|
4196
|
+
setCutShapeIds: (ids: string[]) => void;
|
|
4197
|
+
clearCutShapeIds: () => void;
|
|
4198
|
+
setCopiedShapesCount: (count: number) => void;
|
|
4199
|
+
}, "addShape" | "removeShape" | "updateShape" | "selectShape" | "setTitle" | "updateShapes" | "clearAll" | "startDragShape" | "startDrag" | "moveDraggedShape" | "endDragShape" | "getShapes" | "addDiagram" | "setCurrentDiagramId" | "selectMany" | "clearSelection" | "selectAll" | "removeSelected" | "finalCheckCanNest" | "setHoverState" | "initializeAllEdgeEndpoints" | "endResizeShape" | "getScale" | "setScale" | "setActiveDiagramId" | "setConnectMode" | "getConnectMode" | "expandParentAndEmitSizeUpdateByChild" | "setIsMouseInGraphView" | "setCutShapeIds" | "clearCutShapeIds" | "setCopiedShapesCount">>;
|
|
4032
4200
|
|
|
4033
4201
|
declare interface Waypoint {
|
|
4034
4202
|
x: number;
|