@mx-sose-front/mx-sose-graph 1.0.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/LICENSE +21 -0
- package/README.md +343 -0
- package/dist/index.d.ts +3937 -0
- package/dist/index.esm.js +74367 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.umd.js +38 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/package.json +70 -0
- package/src/components/ContextMenu.vue +475 -0
- package/src/components/Diagram/StrategicTaxonomyDiagram.vue +141 -0
- package/src/components/Edge/Edge.vue +366 -0
- package/src/components/InteractionLayer.vue +2033 -0
- package/src/components/Label.vue +0 -0
- package/src/components/LineStyle/ConnectionLine.vue +126 -0
- package/src/components/LineStyle/LineStyleMarker.vue +87 -0
- package/src/components/Pin/Pin.vue +220 -0
- package/src/components/Pin/Port.vue +172 -0
- package/src/components/Shape/Action.vue +121 -0
- package/src/components/Shape/ActivityAction.vue +155 -0
- package/src/components/Shape/Block.vue +306 -0
- package/src/components/Shape/ConceptualRole.vue +266 -0
- package/src/components/Shape/Diagram.vue +220 -0
- package/src/components/Shape/DividingLine.vue +594 -0
- package/src/components/Shape/DogEar.vue +224 -0
- package/src/components/Shape/Package.vue +340 -0
- package/src/constants/edgeShapeKeys.ts +81 -0
- package/src/constants/index.ts +440 -0
- package/src/index.ts +28 -0
- package/src/render/shape-registry.ts +17 -0
- package/src/render/shape-renderer.ts +103 -0
- package/src/statics/icons/childIcons/relations@3x.png +0 -0
- package/src/statics/icons/childIcons/role@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/211/247/350/241/214/350/200/205@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/264/273/345/212/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/272/246/346/235/237/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/207/252/347/224/261/345/210/206/347/261/273/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/270/232/345/212/241/351/253/230/347/272/247/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/272/246/346/235/237/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//344/272/272/345/221/230/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/267/345/200/274/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/273/346/204/217/345/205/263/347/263/273@3x.png +0 -0
- package/src/statics/icons/childIcons//344/273/273/346/204/217/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/344/275/277/345/221/275@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/345/205/250/347/224/237/345/221/275/345/221/250/346/234/237@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/346/204/277/346/231/257@3x.png +0 -0
- package/src/statics/icons/childIcons//344/274/201/344/270/232/347/233/256/346/240/207@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//344/275/223/347/263/273/346/236/266/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//344/276/235/350/265/226@3x.png +0 -0
- package/src/statics/icons/childIcons//344/277/235/346/212/244@3x.png +0 -0
- package/src/statics/icons/childIcons//344/277/241/346/201/257/346/250/241/345/236/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/210/233/351/200/240@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//345/212/237/350/203/275/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//345/217/214/345/220/221/345/205/263/350/201/224@3x.png +0 -0
- package/src/statics/icons/childIcons//345/217/227/345/210/260/345/275/261/345/223/215@3x.png +0 -0
- package/src/statics/icons/childIcons//345/234/260/347/220/206/346/224/277/346/262/273/350/214/203/345/233/264/347/261/273/345/236/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/241/253/345/206/231/350/201/214/344/275/215/347/224/263/350/257/267@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/216/247/345/210/266@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/351/232/224/347/246/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/211/345/205/250/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/345/205/263/347/263/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/345/205/263/350/201/224@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/347/273/204/346/210/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/232/345/220/221/350/201/232/345/220/210@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/272/272/345/221/230@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/274/201/344/270/232/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/344/275/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/345/261/236/346/200/247/350/256/276/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/210/230/347/225/245/351/230/266/346/256/265/347/224/230/347/211/271/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/214/201/347/273/255/344/273/273/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/346/235/241/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/347/216/257/345/242/203@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/347/273/204/347/273/207@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/201/214/344/275/215@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/201/214/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/264/243/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/344/270/216/345/256/236/351/231/205/351/241/271/347/233/256/345/257/271/345/272/224/345/205/263/347/263/273/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/346/246/202/345/277/265/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/350/265/204/346/272/220/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/344/270/216/350/203/275/345/212/233/347/232/204/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/351/207/214/347/250/213/347/242/221@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/241/271/347/233/256/351/207/214/347/250/213/347/242/221/346/261/207/346/200/273/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//345/256/236/351/231/205/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//345/261/225/347/244/272@3x.png +0 -0
- package/src/statics/icons/childIcons//345/267/262/347/237/245/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//345/274/200/345/261/225/345/267/245/344/275/234/350/203/275/345/212/233@3x.png +0 -0
- package/src/statics/icons/childIcons//345/274/225/347/224/250/345/261/236/346/200/247@3x.png +0 -0
- package/src/statics/icons/childIcons//345/275/261/345/223/215@3x-2.png +0 -0
- package/src/statics/icons/childIcons//345/275/261/345/223/215@3x.png +0 -0
- package/src/statics/icons/childIcons//346/204/277/346/231/257/345/256/243/350/250/200@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/256/236/351/231/205/346/210/230/347/225/245/351/230/266/346/256/265/345/210/206/347/261/273/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/345/256/236/351/231/205/351/203/250/347/275/262/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/265/201/347/250/213/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/347/237/251/351/230/265@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/350/277/236/351/200/232/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/210/230/347/225/245/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/347/273/223/346/236/204/345/233/276@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/247/350/241/214/350/200/205/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/211/277/346/213/205/351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//346/212/200/346/234/257@3x.png +0 -0
- package/src/statics/icons/childIcons//346/213/245/346/234/211/346/265/201/347/250/213@3x.png +0 -0
- package/src/statics/icons/childIcons//346/217/220/344/276/233/346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//346/227/266/346/234/272@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/346/234/215/345/212/241/345/220/210/345/220/214/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/237/350/203/275@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/237/350/203/275/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/345/257/271/350/261/241/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/216/247/345/210/266/346/265/201@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/272/246/346/235/237/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/272/246/346/235/237/345/256/232/344/271/211/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/350/241/250@3x-2.png +0 -0
- package/src/statics/icons/childIcons//346/234/215/345/212/241/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//346/235/241/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/344/270/232/345/212/241/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/240/207/345/207/206/350/277/275/346/272/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//346/246/202/345/277/265/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//346/263/233/345/214/226@3x.png +0 -0
- package/src/statics/icons/childIcons//347/212/266/345/206/265@3x.png +0 -0
- package/src/statics/icons/childIcons//347/216/257/345/242/203@3x.png +0 -0
- package/src/statics/icons/childIcons//347/233/270/346/257/224@3x (1).png +0 -0
- package/src/statics/icons/childIcons//347/263/273/347/273/237@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/346/210/220@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/347/273/207@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/204/347/273/207/351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//347/273/221/345/256/232/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//347/274/223/350/247/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/201/214/344/275/215@3x.png +0 -0
- package/src/statics/icons/childIcons//350/201/232/345/220/210@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233/350/201/214/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/212/233/351/205/215/347/275/256@3x.png +0 -0
- package/src/statics/icons/childIcons//350/203/275/345/244/237/350/203/234/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//350/207/252/347/204/266/350/265/204/346/272/220@3x.png +0 -0
- package/src/statics/icons/childIcons//350/246/201/346/261/202@3x.png +0 -0
- package/src/statics/icons/childIcons//350/256/276/347/275/256/347/261/273/345/236/213.png +0 -0
- package/src/statics/icons/childIcons//350/264/237/350/264/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/264/243/344/273/273@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/344/272/247/351/243/216/351/231/251/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/270/216/344/270/232/345/212/241/346/264/273/345/212/250/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/270/216/350/203/275/345/212/233/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/345/217/267@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/346/201/257@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/344/277/241/346/201/257/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/206/205/351/203/250/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/217/202/346/225/260@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/217/202/346/225/260/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/345/267/245/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/216/245/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/234/215/345/212/241@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/236/266/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/264/273/345/212/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/264/273/345/212/250/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/212/266/346/200/201/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/253/257/345/217/243@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/272/246/346/235/237@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/273/223/346/236/204@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/347/274/223/350/247/243/346/216/252/346/226/275@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//350/265/204/346/272/220/350/277/236/351/200/232/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/275/257/344/273/266@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/223/345/205/245/346/240/223@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/223/345/207/272/346/240/223@3x.png +0 -0
- package/src/statics/icons/childIcons//350/276/276/345/210/260@3x.png +0 -0
- package/src/statics/icons/childIcons//350/277/236/346/216/245/345/231/250@3x.png +0 -0
- package/src/statics/icons/childIcons//350/277/236/347/272/277@3x.png +0 -0
- package/src/statics/icons/childIcons//351/207/214/347/250/213/347/242/221/344/276/235/350/265/226@3x.png +0 -0
- package/src/statics/icons/childIcons//351/230/266/346/256/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/234/200/346/261/202/346/235/203/351/231/220@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/266/347/272/247/344/270/232/345/212/241/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/344/270/273/351/242/230@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/345/206/205/351/203/250/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/246/202/345/277/265/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/246/202/345/277/265/350/241/250@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250/344/270/216/350/203/275/345/212/233/347/232/204/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/264/273/345/212/250/345/212/250/344/275/234@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/346/265/201/347/250/213/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/347/273/223/346/236/204/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/267/257/347/272/277/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/350/277/236/351/200/232/345/233/276@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/351/207/214/347/250/213/347/242/221@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/271/347/233/256/351/207/214/347/250/213/347/242/221/350/247/222/350/211/262@3x.png +0 -0
- package/src/statics/icons/childIcons//351/241/272/345/272/217@3x-2.png +0 -0
- package/src/statics/icons/childIcons//351/241/272/345/272/217@3x.png +0 -0
- package/src/statics/icons/childIcons//351/243/216/351/231/251@3x.png +0 -0
- package/src/statics/icons/childIcons//351/243/216/351/231/251/344/270/216/345/256/211/345/205/250/346/216/247/345/210/266/346/230/240/345/260/204/347/237/251/351/230/265@3x.png +0 -0
- package/src/statics/icons/childIcons//351/253/230/347/272/247/344/270/232/345/212/241/346/246/202/345/277/265@3x.png +0 -0
- package/src/statics/icons/createMenu/config.png +0 -0
- package/src/statics/icons/createMenu/contact.png +0 -0
- package/src/statics/icons/createMenu/copy.png +0 -0
- package/src/statics/icons/createMenu/delete.png +0 -0
- package/src/statics/icons/createMenu/diagram.png +0 -0
- package/src/statics/icons/createMenu/element.png +0 -0
- package/src/statics/icons/createMenu/locateChart.png +0 -0
- package/src/statics/icons/createMenu/paste.png +0 -0
- package/src/statics/icons/createMenu/rename.png +0 -0
- package/src/statics/icons/createMenu/scissors.png +0 -0
- package/src/store/eventBus.ts +38 -0
- package/src/store/graphStore.ts +782 -0
- package/src/store/index.ts +8 -0
- package/src/style/index.css +1 -0
- package/src/style/tailwind.css +33 -0
- package/src/types/index.ts +200 -0
- package/src/utils/autoExpandParent.ts +94 -0
- package/src/utils/colorUtils.ts +137 -0
- package/src/utils/compartment.ts +534 -0
- package/src/utils/containers.ts +910 -0
- package/src/utils/diagram.ts +403 -0
- package/src/utils/dom.ts +21 -0
- package/src/utils/drag.ts +224 -0
- package/src/utils/edgeUtils.ts +787 -0
- package/src/utils/geom.ts +177 -0
- package/src/utils/graphDragService.ts +329 -0
- package/src/utils/highlightUtils.ts +162 -0
- package/src/utils/hittest.ts +135 -0
- package/src/utils/iconLoader.ts +105 -0
- package/src/utils/index.ts +20 -0
- package/src/utils/packgeMap.ts +1 -0
- package/src/utils/pinUtils.ts +484 -0
- package/src/utils/policy.ts +212 -0
- package/src/utils/zorder.ts +39 -0
- package/src/view/graph.vue +419 -0
- package/src/vite-env.d.ts +33 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// import { createPinia } from 'pinia'
|
|
2
|
+
// import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
|
|
3
|
+
// 创建 Pinia 实例
|
|
4
|
+
// export const pinia = createPinia()
|
|
5
|
+
// pinia.use(piniaPluginPersistedstate)
|
|
6
|
+
// 导出所有 store
|
|
7
|
+
export { useGraphStore } from './graphStore'
|
|
8
|
+
export { eventBus } from './eventBus'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './tailwind.css';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/* 自定义组件样式 */
|
|
6
|
+
@layer components {
|
|
7
|
+
.btn-primary {
|
|
8
|
+
@apply bg-primary-500 hover:bg-primary-600 text-white font-medium py-2 px-4 rounded-lg transition-colors duration-200;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.btn-secondary {
|
|
12
|
+
@apply bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-lg transition-colors duration-200;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.card {
|
|
16
|
+
@apply bg-white rounded-lg shadow-md border border-gray-200 p-4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.input-field {
|
|
20
|
+
@apply w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* 自定义工具类 */
|
|
25
|
+
@layer utilities {
|
|
26
|
+
.text-shadow {
|
|
27
|
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.text-shadow-lg {
|
|
31
|
+
text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
// 边界位置接口
|
|
2
|
+
export interface Bounds {
|
|
3
|
+
x?: number | undefined
|
|
4
|
+
y?: number | undefined
|
|
5
|
+
width?: number | undefined
|
|
6
|
+
height?: number | undefined
|
|
7
|
+
}
|
|
8
|
+
export type Padding = number | { top: number; right: number; bottom: number; left: number };
|
|
9
|
+
// 样式接口
|
|
10
|
+
export interface Style {
|
|
11
|
+
fontSize?: number
|
|
12
|
+
fontFamily?: string
|
|
13
|
+
fontWeight?: string
|
|
14
|
+
color?: string
|
|
15
|
+
backgroundColor?: string
|
|
16
|
+
borderColor?: string
|
|
17
|
+
borderWidth?: number
|
|
18
|
+
borderRadius?: number
|
|
19
|
+
padding?: Padding
|
|
20
|
+
margin?: number
|
|
21
|
+
zIndex?: number//元素层级
|
|
22
|
+
canvasBorderWidth?: number// 画布边框粗细
|
|
23
|
+
canvasBorderColor?: string// 画布边框颜色
|
|
24
|
+
canvasBorderStyle?: 'dashed' | 'solid' | 'dotted'// 画布边框线条形状
|
|
25
|
+
canvasNameFontSize?: number// 画布名称字体大小
|
|
26
|
+
canvasNameFontFamily?: string// 画布名称字体
|
|
27
|
+
canvasNameFontColor?: string// 画布名称字体颜色
|
|
28
|
+
gradientLeftColor?: string // 渐变左颜色
|
|
29
|
+
gradientRightColor?: string // 渐变右颜色
|
|
30
|
+
textAnchor?: string // pin文本对齐方式
|
|
31
|
+
dominantBaseline?: string // pin文本基线
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// 名称对象接口
|
|
35
|
+
export interface NameObject {
|
|
36
|
+
name: string
|
|
37
|
+
value?: string
|
|
38
|
+
type?: string
|
|
39
|
+
defaultValue?: string
|
|
40
|
+
[key: string]: any
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 标签值接口
|
|
44
|
+
export interface TaggedValueLabel {
|
|
45
|
+
id: string
|
|
46
|
+
modelId: string
|
|
47
|
+
modelName: string
|
|
48
|
+
names: string // JSON字符串,包含NameObject
|
|
49
|
+
name: string
|
|
50
|
+
nameBounds?: string // JSON字符串,包含Bounds
|
|
51
|
+
nameStyle?: string // JSON字符串,包含Style
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 隔间组件接口
|
|
55
|
+
export interface Comparent {
|
|
56
|
+
keywords: string
|
|
57
|
+
keywordsBounds?: string // JSON字符串,包含Bounds
|
|
58
|
+
keywordsStyle?: string // JSON字符串,包含Style
|
|
59
|
+
comparentLabels: TaggedValueLabel[]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface Waypoint {
|
|
63
|
+
x: number
|
|
64
|
+
y: number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// 场景菜单接口
|
|
68
|
+
export interface scenarioMenu {
|
|
69
|
+
[key: string]: any
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// 图元接口
|
|
73
|
+
export interface Shape {
|
|
74
|
+
id: string // 图元ID
|
|
75
|
+
diagramId: string // 画布ID
|
|
76
|
+
parenShapeId: string // 父图元ID(图元嵌套)
|
|
77
|
+
shapeKey: string // 具体图元类型(即模型类型)
|
|
78
|
+
shapeType: 'shape' | 'edge' | 'pin' | 'diagram' // 图形大类
|
|
79
|
+
bounds: Bounds // 整体图元位置大小
|
|
80
|
+
style?: Style // 图元样式,JSON字符串
|
|
81
|
+
keywords: string // 关键字
|
|
82
|
+
keywordsBounds?: Bounds // 关键字位置,JSON字符串
|
|
83
|
+
keywordsStyle?: Style // 关键字位置样式,JSON字符串
|
|
84
|
+
icon?: string // 图标文件名
|
|
85
|
+
modelId: string // 图元对应模型id
|
|
86
|
+
modelName: string // 图元对应的模型名称
|
|
87
|
+
names: string // 模型名称拼接对象,JSON字符串
|
|
88
|
+
name: string // 图元显示名称(根据模型拼接)
|
|
89
|
+
nameBounds?: Bounds // 名称位置,JSON字符串
|
|
90
|
+
nameStyle?: Style // 名称样式,JSON字符串
|
|
91
|
+
direction?: string // 方向(例如端口)
|
|
92
|
+
sourceId?: string // 关系源图元id
|
|
93
|
+
targetId?: string // 关系目标图元id
|
|
94
|
+
waypointId?: string // 关系点位id
|
|
95
|
+
waypoints?: Waypoint[] // 关系点位,JSON字符串
|
|
96
|
+
showKeywords: boolean // 是否展示关键字
|
|
97
|
+
showIcon: boolean // 是否展示图标
|
|
98
|
+
showName: boolean // 是否展示名称
|
|
99
|
+
showTaggedValues: boolean // 是否展示拓展值
|
|
100
|
+
showComparents: boolean // 是否展示隔间组件
|
|
101
|
+
taggedValueLabels?: TaggedValueLabel[] // 标签值数组
|
|
102
|
+
comparents?: CompartmentRecord[] // 隔间组件数组
|
|
103
|
+
meta?: any; // 高亮信息
|
|
104
|
+
scenarioMenus?: scenarioMenu[],
|
|
105
|
+
inert?: boolean | true // 惰性可见(不可见/不渲染/不拾取)
|
|
106
|
+
sourceModels?: string[] // 允许的源图元数组
|
|
107
|
+
targetModels?: string[] // 允许的目标图元数组
|
|
108
|
+
modelTypePropertyId: string // 设置类型
|
|
109
|
+
targetCreateModel?: string // 允许的目标图元字符串
|
|
110
|
+
sourceModelId?: string // 允许的源图元字符串
|
|
111
|
+
isMovableComparents: boolean//是否能拖出隔间
|
|
112
|
+
}
|
|
113
|
+
export interface CompartmentRecord {
|
|
114
|
+
bounds: Bounds // 整个父隔间的大小位置
|
|
115
|
+
modelId: string // 模型 id(例如区域 ID)
|
|
116
|
+
modelName: string // 模型名称
|
|
117
|
+
comparentShapes: Shape[] // 子图元“快照”(深拷贝,去 comparents 字段)
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface scenarioMenu {
|
|
121
|
+
code: string,
|
|
122
|
+
name: string,
|
|
123
|
+
icon: string,
|
|
124
|
+
sourceModels: string[],
|
|
125
|
+
targetCreateModel: string,
|
|
126
|
+
targetModels: string[],
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export interface Diagram {
|
|
130
|
+
id: string // 图元ID
|
|
131
|
+
diagramId: string // 画布ID
|
|
132
|
+
parenShapeId?: string // 父图元ID(图元嵌套)
|
|
133
|
+
shapeKey: string // 具体图元类型(即模型类型)
|
|
134
|
+
shapeType: 'shape' | 'edge' | 'port' | 'diagram' // 图形大类
|
|
135
|
+
bounds: Bounds // 整体图元位置大小
|
|
136
|
+
keywords: string // 关键字
|
|
137
|
+
keywordsBounds?: Bounds // 关键字位置,JSON字符串
|
|
138
|
+
keywordsStyle?: Style // 关键字位置样式,JSON字符串
|
|
139
|
+
icon?: string // 图标文件名
|
|
140
|
+
modelId: string // 图元对应模型id
|
|
141
|
+
modelName: string // 图元对应的模型名称
|
|
142
|
+
names: string // 模型名称拼接对象,JSON字符串
|
|
143
|
+
name: string // 图元显示名称(根据模型拼接)
|
|
144
|
+
nameBounds?: Bounds // 名称位置,JSON字符串
|
|
145
|
+
nameStyle?: Style // 名称样式,JSON字符串
|
|
146
|
+
direction?: string // 方向(例如端口)
|
|
147
|
+
sourceId?: string // 关系源图元id
|
|
148
|
+
targetId?: string // 关系目标图元id waypoints?: Waypoint[] // 关系点位,JSON字符串
|
|
149
|
+
showKeywords: boolean // 是否展示关键字
|
|
150
|
+
showIcon: boolean // 是否展示图标
|
|
151
|
+
showName: boolean // 是否展示名称
|
|
152
|
+
showTaggedValues: boolean // 是否展示拓展值
|
|
153
|
+
showComparents: boolean // 是否展示隔间组件
|
|
154
|
+
taggedValueLabels?: TaggedValueLabel[] // 标签值数组
|
|
155
|
+
comparents?: Comparent[] // 隔间组件数组
|
|
156
|
+
shapeArr?: Shape[]
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// 事件类型
|
|
160
|
+
export interface GraphEvents {
|
|
161
|
+
onShapeClick?: (node: Shape, event: MouseEvent) => void
|
|
162
|
+
onShapeDoubleClick?: (node: Shape, event: MouseEvent) => void
|
|
163
|
+
onEdgeClick?: (edge: Shape, event: MouseEvent) => void
|
|
164
|
+
onDiagramClick?: (event: MouseEvent) => void
|
|
165
|
+
onZoom?: (scale: number) => void
|
|
166
|
+
onPan?: (x: number, y: number) => void
|
|
167
|
+
}
|
|
168
|
+
// 嵌套使用
|
|
169
|
+
export type NestingConfig = {
|
|
170
|
+
onlyUnderSameType?: string[] // 作为“子”只能挂到同类型父上
|
|
171
|
+
disallowAsChild?: string[] // 禁止当子
|
|
172
|
+
disallowAsParent?: string[] // 禁止当父
|
|
173
|
+
allowedParents?: Record<string, string[]> // 允许的父类型
|
|
174
|
+
allowedChildren?: Record<string, string[]> // 允许的子类型
|
|
175
|
+
rejectChildTypes?: Record<string, string[]>// 禁止的子类型
|
|
176
|
+
maxChildren?: Record<string, number> // 最大子数量
|
|
177
|
+
/** 同类型是否禁止互相嵌套(全局) */
|
|
178
|
+
disallowSameTypeAll?: boolean
|
|
179
|
+
/**只对这些类型禁止“同类型互相嵌套”(按类型粒度) */
|
|
180
|
+
disallowSameType?: string[]
|
|
181
|
+
}
|
|
182
|
+
export type OwnerPayload = {
|
|
183
|
+
id: string; // 子元素 modelId
|
|
184
|
+
ownerId: string; // 父元素 modelId
|
|
185
|
+
ownerType: string; // 父元素 shapeKey
|
|
186
|
+
shapeId?: string
|
|
187
|
+
}
|
|
188
|
+
export interface CheckNested {
|
|
189
|
+
modelType: string;//当前模型类型
|
|
190
|
+
modelShapeId?: string;//当前模型图元ID
|
|
191
|
+
targetModelType: string;//目标模型类型
|
|
192
|
+
targetModelShapeId: string;//目标模型图元ID
|
|
193
|
+
diagramCode: string;//目标模型图元所在图表类型
|
|
194
|
+
modelId: string;//当前模型id
|
|
195
|
+
}
|
|
196
|
+
//修改图元大小
|
|
197
|
+
export interface ShapeSizeUpdatePayload {
|
|
198
|
+
id: string
|
|
199
|
+
bounds: string // JSON string
|
|
200
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { Shape, } from '@/types/index'
|
|
2
|
+
import { expandParentToFitChildBounds } from './containers'
|
|
3
|
+
import { isCompartment } from './compartment';
|
|
4
|
+
export type Rect = { x: number; y: number; width: number; height: number }
|
|
5
|
+
/**
|
|
6
|
+
* 扩父工具入参
|
|
7
|
+
*/
|
|
8
|
+
export interface ExpandByChildOptions {
|
|
9
|
+
/** 当前画布上的所有图元(store 里的 shapes.value) */
|
|
10
|
+
shapes: Shape[]
|
|
11
|
+
/** 子元素完整数据(至少要有 id / parenShapeId / bounds) */
|
|
12
|
+
child: Shape
|
|
13
|
+
/** 更新图元的统一方法(store 里的 updateShape) */
|
|
14
|
+
updateShape: (id: string, updates: Partial<Shape>) => void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 扩父工具返回值
|
|
19
|
+
*/
|
|
20
|
+
export interface ExpandByChildResult {
|
|
21
|
+
/** 是否真的发生了扩父(如果父本来就够大,这里是 false) */
|
|
22
|
+
expanded: boolean
|
|
23
|
+
/** 所有被本次扩父影响到的图元 id(父、本父、祖先父等) */
|
|
24
|
+
affectedIds: string[]
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 通过“子元素数据”来触发扩父:
|
|
29
|
+
* - 从 child.parenShapeId 中取出父元素 id
|
|
30
|
+
* - 找到父元素 shape
|
|
31
|
+
* - 调用 expandParentToFitChildBounds,只改前端 store
|
|
32
|
+
* - 返回 expanded + affectedIds,供 store 再去发事件 / 调接口
|
|
33
|
+
*/
|
|
34
|
+
export function expandParentByChild(
|
|
35
|
+
options: ExpandByChildOptions,
|
|
36
|
+
): ExpandByChildResult {
|
|
37
|
+
const { shapes, child, updateShape } = options
|
|
38
|
+
|
|
39
|
+
// 1. 子元素必须有父 id 和 bounds,否则不需要扩父
|
|
40
|
+
const parentId = (child as any).parenShapeId as string | undefined | null
|
|
41
|
+
if (!parentId) {
|
|
42
|
+
return { expanded: false, affectedIds: [] }
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const bounds = child.bounds as Rect | undefined
|
|
46
|
+
if (!bounds) {
|
|
47
|
+
return { expanded: false, affectedIds: [] }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 2. 查找父元素
|
|
51
|
+
const parent = shapes.find(s => s.id === parentId)
|
|
52
|
+
if (!parent) {
|
|
53
|
+
return { expanded: false, affectedIds: [] }
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 3. 调用你原来的扩父核心方法(只修改 store 中父/祖先的 bounds)
|
|
57
|
+
const { expanded, affectedIds } = expandParentToFitChildBounds(
|
|
58
|
+
shapes,
|
|
59
|
+
parent,
|
|
60
|
+
child.id,
|
|
61
|
+
bounds,
|
|
62
|
+
updateShape,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
// 4. 直接把结果透传给调用方(store 再决定要不要发事件、调接口)
|
|
66
|
+
return { expanded, affectedIds }
|
|
67
|
+
}
|
|
68
|
+
// 根据“父是隔间”的场景,在父移动之后,重新检查它所有子是否压到头部 / 内容区
|
|
69
|
+
// 若是,则尝试再次扩父(此时 parent.y 已经离开画布顶部,availUp 可能 > 0)
|
|
70
|
+
export function autoExpandCompartmentAfterMoved(
|
|
71
|
+
shapes: Shape[],
|
|
72
|
+
parentId: string,
|
|
73
|
+
updateShape: (id: string, updates: Partial<Shape>) => void,
|
|
74
|
+
) {
|
|
75
|
+
const parent = shapes.find(s => s.id === parentId)
|
|
76
|
+
if (!parent || !isCompartment(parent)) return
|
|
77
|
+
// 找出所有“挂在这个隔间下面、并且有 bounds 的子元素”
|
|
78
|
+
const children = shapes.filter(
|
|
79
|
+
c => (c as any).parenShapeId === parent.id && c.bounds
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
for (const child of children) {
|
|
83
|
+
const rect = child.bounds as Rect
|
|
84
|
+
// 这里会走你写的 "if (isCompartment(parent)) { ... }" 逻辑
|
|
85
|
+
// 当 parent 已经从画布顶部拖下来,availUp 就 > 0,有空间继续向上扩
|
|
86
|
+
expandParentToFitChildBounds(
|
|
87
|
+
shapes,
|
|
88
|
+
parent,
|
|
89
|
+
child.id,
|
|
90
|
+
rect,
|
|
91
|
+
updateShape,
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 颜色转换与明度调整工具函数
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface HSL {
|
|
6
|
+
h: number
|
|
7
|
+
s: number
|
|
8
|
+
l: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 调整颜色明度(使颜色变深或变浅)
|
|
13
|
+
* @param color 原始颜色(支持hex或rgb格式)
|
|
14
|
+
* @param percent 调整百分比(正值增加明度-变浅,负值降低明度-变深)
|
|
15
|
+
* @returns 调整后的颜色(hex格式)
|
|
16
|
+
*/
|
|
17
|
+
export function adjustColorLightness(color: string, percent: number): string {
|
|
18
|
+
const hsl = colorToHsl(color)
|
|
19
|
+
if (!hsl) return color
|
|
20
|
+
|
|
21
|
+
// 调整明度并限制在10%-90%范围(避免过暗或过亮)
|
|
22
|
+
let newLightness = hsl.l + percent
|
|
23
|
+
newLightness = Math.max(10, Math.min(90, newLightness))
|
|
24
|
+
|
|
25
|
+
return hslToRgb(hsl.h, hsl.s, newLightness)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 将颜色字符串转换为HSL格式
|
|
30
|
+
* @param color 颜色字符串(hex或rgb格式)
|
|
31
|
+
* @returns HSL对象或null(转换失败时)
|
|
32
|
+
*/
|
|
33
|
+
export function colorToHsl(color: string): HSL | null {
|
|
34
|
+
// 处理十六进制颜色(#fff 或 #ffffff)
|
|
35
|
+
if (color.startsWith('#')) {
|
|
36
|
+
let hex = color.slice(1)
|
|
37
|
+
// 处理3位简写形式(#fff → #ffffff)
|
|
38
|
+
if (hex.length === 3) {
|
|
39
|
+
hex = hex.split('').map(c => c + c).join('')
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const r = parseInt(hex.slice(0, 2), 16) / 255
|
|
43
|
+
const g = parseInt(hex.slice(2, 4), 16) / 255
|
|
44
|
+
const b = parseInt(hex.slice(4, 6), 16) / 255
|
|
45
|
+
|
|
46
|
+
return rgbToHsl(r, g, b)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// 处理rgb颜色(rgb(255,255,255))
|
|
50
|
+
if (color.startsWith('rgb')) {
|
|
51
|
+
const match = color.match(/rgb\(?(\d+),\s*(\d+),\s*(\d+)\)?/)
|
|
52
|
+
if (match) {
|
|
53
|
+
const r = parseInt(match[1]) / 255
|
|
54
|
+
const g = parseInt(match[2]) / 255
|
|
55
|
+
const b = parseInt(match[3]) / 255
|
|
56
|
+
return rgbToHsl(r, g, b)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return null
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* RGB转HSL颜色空间
|
|
65
|
+
* @param r 红色通道(0-1)
|
|
66
|
+
* @param g 绿色通道(0-1)
|
|
67
|
+
* @param b 蓝色通道(0-1)
|
|
68
|
+
* @returns HSL对象
|
|
69
|
+
*/
|
|
70
|
+
export function rgbToHsl(r: number, g: number, b: number): HSL {
|
|
71
|
+
const max = Math.max(r, g, b)
|
|
72
|
+
const min = Math.min(r, g, b)
|
|
73
|
+
let h = 0, s = 0
|
|
74
|
+
const l = (max + min) / 2
|
|
75
|
+
|
|
76
|
+
if (max !== min) {
|
|
77
|
+
const d = max - min
|
|
78
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min)
|
|
79
|
+
|
|
80
|
+
switch (max) {
|
|
81
|
+
case r: h = (g - b) / d + (g < b ? 6 : 0); break
|
|
82
|
+
case g: h = (b - r) / d + 2; break
|
|
83
|
+
case b: h = (r - g) / d + 4; break
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
h *= 60
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
h: Math.round(h),
|
|
91
|
+
s: Math.round(s * 100),
|
|
92
|
+
l: Math.round(l * 100)
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* HSL转RGB颜色空间(返回hex格式)
|
|
98
|
+
* @param h 色相(0-360)
|
|
99
|
+
* @param s 饱和度(0-100)
|
|
100
|
+
* @param l 明度(0-100)
|
|
101
|
+
* @returns 十六进制颜色字符串
|
|
102
|
+
*/
|
|
103
|
+
export function hslToRgb(h: number, s: number, l: number): string {
|
|
104
|
+
h /= 360
|
|
105
|
+
s /= 100
|
|
106
|
+
l /= 100
|
|
107
|
+
|
|
108
|
+
let r, g, b
|
|
109
|
+
|
|
110
|
+
if (s === 0) {
|
|
111
|
+
r = g = b = l // 灰度
|
|
112
|
+
} else {
|
|
113
|
+
const hue2rgb = (p: number, q: number, t: number) => {
|
|
114
|
+
if (t < 0) t += 1
|
|
115
|
+
if (t > 1) t -= 1
|
|
116
|
+
if (t < 1/6) return p + (q - p) * 6 * t
|
|
117
|
+
if (t < 1/2) return q
|
|
118
|
+
if (t < 2/3) return p + (q - p) * (2/3 - t) * 6
|
|
119
|
+
return p
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s
|
|
123
|
+
const p = 2 * l - q
|
|
124
|
+
|
|
125
|
+
r = hue2rgb(p, q, h + 1/3)
|
|
126
|
+
g = hue2rgb(p, q, h)
|
|
127
|
+
b = hue2rgb(p, q, h - 1/3)
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 转换为十六进制格式
|
|
131
|
+
const toHex = (x: number) => {
|
|
132
|
+
const hex = Math.round(x * 255).toString(16)
|
|
133
|
+
return hex.length === 1 ? '0' + hex : hex
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return `#${toHex(r)}${toHex(g)}${toHex(b)}`
|
|
137
|
+
}
|