@finos/legend-extension-dsl-diagram 2.0.2 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/DSLDiagram_Extension.d.ts +0 -2
- package/lib/DSLDiagram_Extension.d.ts.map +1 -1
- package/lib/DSLDiagram_Extension.js +8 -9
- package/lib/DSLDiagram_Extension.js.map +1 -1
- package/lib/DiagramRenderer.d.ts +8 -8
- package/lib/DiagramRenderer.d.ts.map +1 -1
- package/lib/DiagramRenderer.js +42 -44
- package/lib/DiagramRenderer.js.map +1 -1
- package/lib/components/studio/ClassDiagramPreview.d.ts +1 -1
- package/lib/components/studio/ClassDiagramPreview.js +2 -2
- package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts +4 -14
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js +8 -6
- package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js +10 -10
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -1
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts +3 -3
- package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts.map +1 -1
- package/lib/components/studio/DSLDiagram_TestID.js +1 -1
- package/lib/components/studio/DSLDiagram_TestID.js.map +1 -1
- package/lib/components/studio/DiagramEditor.d.ts +1 -1
- package/lib/components/studio/DiagramEditor.js +5 -5
- package/lib/components/studio/DiagramEditor.js.map +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.d.ts +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.d.ts.map +1 -1
- package/lib/components/studio/InheritanceDiagramRenderer.js +3 -3
- package/lib/components/studio/InheritanceDiagramRenderer.js.map +1 -1
- package/lib/graph/DSLDiagram_PureGraphPlugin.js +2 -2
- package/lib/graph/DSLDiagram_PureGraphPlugin.js.map +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts.map +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.js +1 -1
- package/lib/graphManager/DSLDiagram_GraphManagerHelper.js.map +1 -1
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +2 -2
- package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +10 -10
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +1 -1
- package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -1
- package/lib/helpers/{DiagramHelper.d.ts → DSLDiagram_Helper.d.ts} +28 -6
- package/lib/helpers/DSLDiagram_Helper.d.ts.map +1 -0
- package/lib/helpers/{DiagramHelper.js → DSLDiagram_Helper.js} +56 -9
- package/lib/helpers/{DiagramHelper.js.map → DSLDiagram_Helper.js.map} +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +18 -18
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -18
- package/lib/index.js.map +1 -1
- package/lib/models/DSLDiagram_ModelUtils.js +1 -1
- package/lib/models/DSLDiagram_ModelUtils.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +6 -6
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +4 -4
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts +3 -3
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +2 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +7 -7
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +20 -12
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.d.ts → DSLDiagram_RelationshipViewEnd.d.ts} +6 -6
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.d.ts.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.js → DSLDiagram_RelationshipViewEnd.js} +5 -5
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.js.map +1 -0
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts +0 -2
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js +1 -7
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +3 -9
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +11 -22
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js +1 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js.map +1 -1
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +6 -6
- package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts +3 -3
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts +2 -2
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js.map +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js +1 -1
- package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +8 -8
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts +2 -2
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts.map +1 -1
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js +7 -7
- package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js.map +1 -1
- package/lib/package.json +15 -14
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts +12 -12
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js +8 -8
- package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -1
- package/lib/stores/studio/DiagramEditorState.d.ts +5 -5
- package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
- package/lib/stores/studio/DiagramEditorState.js +6 -6
- package/lib/stores/studio/DiagramEditorState.js.map +1 -1
- package/package.json +22 -21
- package/src/DSLDiagram_Extension.ts +8 -11
- package/src/DiagramRenderer.ts +64 -53
- package/src/components/studio/ClassDiagramPreview.tsx +2 -2
- package/src/components/studio/DSLDiagram_LegendStudioDocumentation.ts +13 -6
- package/src/components/studio/DSLDiagram_LegendStudioPlugin.tsx +14 -13
- package/src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx +2 -2
- package/src/components/studio/DiagramEditor.tsx +6 -6
- package/src/components/studio/InheritanceDiagramRenderer.ts +3 -3
- package/src/graph/DSLDiagram_PureGraphPlugin.ts +2 -2
- package/src/graphManager/DSLDiagram_GraphManagerHelper.ts +1 -1
- package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +2 -2
- package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +11 -11
- package/src/helpers/{DiagramHelper.ts → DSLDiagram_Helper.ts} +102 -11
- package/src/index.ts +21 -18
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +4 -4
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +8 -7
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +3 -3
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +5 -5
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +2 -2
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts +4 -4
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +2 -2
- package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +26 -17
- package/src/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.ts → DSLDiagram_RelationshipViewEnd.ts} +6 -5
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.ts +1 -9
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +12 -42
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.ts +1 -1
- package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +6 -6
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.ts +4 -4
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.ts +3 -3
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.ts +2 -2
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.ts +1 -1
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.ts +1 -1
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.ts +3 -3
- package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.ts +1 -1
- package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +14 -14
- package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +13 -13
- package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.ts +7 -7
- package/src/stores/studio/DSLDiagram_GraphModifierHelper.ts +22 -20
- package/src/stores/studio/DiagramEditorState.ts +9 -9
- package/tsconfig.json +5 -11
- package/tsconfig.package.json +1 -4
- package/lib/helpers/DiagramHelper.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +0 -26
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +0 -1
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +0 -37
- package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +0 -1
- package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +0 -44
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-diagram",
|
3
|
-
"version": "
|
3
|
+
"version": "4.0.0",
|
4
4
|
"description": "Legend extension for Diagram DSL",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -43,35 +43,36 @@
|
|
43
43
|
"test:watch": "jest --watch"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@finos/legend-application": "
|
47
|
-
"@finos/legend-art": "
|
48
|
-
"@finos/legend-graph": "
|
49
|
-
"@finos/legend-model-storage": "
|
50
|
-
"@finos/legend-shared": "
|
51
|
-
"@finos/legend-studio": "
|
52
|
-
"@types/react": "
|
53
|
-
"mobx": "6.
|
54
|
-
"mobx-react-lite": "3.
|
55
|
-
"react": "
|
56
|
-
"react-dnd": "
|
57
|
-
"react-dom": "
|
58
|
-
"react-resize-detector": "7.
|
46
|
+
"@finos/legend-application": "4.0.1",
|
47
|
+
"@finos/legend-art": "2.0.1",
|
48
|
+
"@finos/legend-graph": "8.0.1",
|
49
|
+
"@finos/legend-model-storage": "2.0.1",
|
50
|
+
"@finos/legend-shared": "3.0.1",
|
51
|
+
"@finos/legend-studio": "10.1.0",
|
52
|
+
"@types/react": "18.0.14",
|
53
|
+
"mobx": "6.6.0",
|
54
|
+
"mobx-react-lite": "3.4.0",
|
55
|
+
"react": "18.2.0",
|
56
|
+
"react-dnd": "16.0.1",
|
57
|
+
"react-dom": "18.2.0",
|
58
|
+
"react-resize-detector": "7.1.2",
|
59
59
|
"serializr": "2.0.5"
|
60
60
|
},
|
61
61
|
"devDependencies": {
|
62
|
-
"@finos/legend-dev-utils": "
|
63
|
-
"@
|
62
|
+
"@finos/legend-dev-utils": "2.0.1",
|
63
|
+
"@jest/globals": "28.1.1",
|
64
|
+
"@testing-library/react": "13.3.0",
|
64
65
|
"cross-env": "7.0.3",
|
65
|
-
"eslint": "8.
|
66
|
-
"jest": "28.
|
66
|
+
"eslint": "8.18.0",
|
67
|
+
"jest": "28.1.1",
|
67
68
|
"jest-canvas-mock": "2.4.0",
|
68
69
|
"npm-run-all": "4.1.5",
|
69
70
|
"rimraf": "3.0.2",
|
70
|
-
"sass": "1.
|
71
|
-
"typescript": "4.
|
71
|
+
"sass": "1.52.3",
|
72
|
+
"typescript": "4.7.4"
|
72
73
|
},
|
73
74
|
"peerDependencies": {
|
74
|
-
"react": "^
|
75
|
+
"react": "^18.0.0"
|
75
76
|
},
|
76
77
|
"publishConfig": {
|
77
78
|
"directory": "build/publishContent"
|
@@ -16,19 +16,16 @@
|
|
16
16
|
|
17
17
|
import packageJson from '../package.json';
|
18
18
|
import { AbstractPreset } from '@finos/legend-shared';
|
19
|
-
import { DSLDiagram_PureGraphManagerPlugin } from './graphManager/DSLDiagram_PureGraphManagerPlugin';
|
20
|
-
import { DSLDiagram_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin';
|
21
|
-
import
|
22
|
-
import { DSLDiagram_PureGraphPlugin } from './graph/DSLDiagram_PureGraphPlugin';
|
19
|
+
import { DSLDiagram_PureGraphManagerPlugin } from './graphManager/DSLDiagram_PureGraphManagerPlugin.js';
|
20
|
+
import { DSLDiagram_PureProtocolProcessorPlugin } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js';
|
21
|
+
import { DSLDiagram_PureGraphPlugin } from './graph/DSLDiagram_PureGraphPlugin.js';
|
23
22
|
|
24
23
|
export class DSLDiagram_GraphPreset extends AbstractPreset {
|
25
24
|
constructor() {
|
26
|
-
super(packageJson.extensions.graphPreset, packageJson.version
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
new DSLDiagram_PureGraphManagerPlugin().install(pluginManager);
|
32
|
-
new DSLDiagram_PureProtocolProcessorPlugin().install(pluginManager);
|
25
|
+
super(packageJson.extensions.graphPreset, packageJson.version, [
|
26
|
+
new DSLDiagram_PureGraphPlugin(),
|
27
|
+
new DSLDiagram_PureGraphManagerPlugin(),
|
28
|
+
new DSLDiagram_PureProtocolProcessorPlugin(),
|
29
|
+
]);
|
33
30
|
}
|
34
31
|
}
|
package/src/DiagramRenderer.ts
CHANGED
@@ -36,19 +36,30 @@ import {
|
|
36
36
|
GenericType,
|
37
37
|
Property,
|
38
38
|
Multiplicity,
|
39
|
+
getAllSuperclasses,
|
40
|
+
getAllOwnClassProperties,
|
41
|
+
generateMultiplicityString,
|
42
|
+
getRawGenericType,
|
39
43
|
} from '@finos/legend-graph';
|
40
44
|
import { action, makeObservable, observable } from 'mobx';
|
41
|
-
import type { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
42
|
-
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
|
43
|
-
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
|
44
|
-
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
|
45
|
-
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
46
|
-
import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
|
47
|
-
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
|
48
|
-
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
|
49
|
-
import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
|
50
|
-
import {
|
51
|
-
|
45
|
+
import type { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
46
|
+
import { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
|
47
|
+
import { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
|
48
|
+
import { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
|
49
|
+
import { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
50
|
+
import type { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js';
|
51
|
+
import { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
|
52
|
+
import { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
|
53
|
+
import { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js';
|
54
|
+
import {
|
55
|
+
boxContains,
|
56
|
+
buildBottomRightCornerBox,
|
57
|
+
getBottomRightCornerPoint,
|
58
|
+
getElementPosition,
|
59
|
+
rotatePointX,
|
60
|
+
rotatePointY,
|
61
|
+
} from './helpers/DSLDiagram_Helper.js';
|
62
|
+
import { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js';
|
52
63
|
import { class_addProperty, class_addSuperType } from '@finos/legend-studio';
|
53
64
|
import {
|
54
65
|
classView_setHideProperties,
|
@@ -74,7 +85,7 @@ import {
|
|
74
85
|
relationshipView_changePoint,
|
75
86
|
relationshipView_simplifyPath,
|
76
87
|
relationshipView_setPath,
|
77
|
-
} from './stores/studio/DSLDiagram_GraphModifierHelper';
|
88
|
+
} from './stores/studio/DSLDiagram_GraphModifierHelper.js';
|
78
89
|
|
79
90
|
export enum DIAGRAM_INTERACTION_MODE {
|
80
91
|
LAYOUT,
|
@@ -595,11 +606,11 @@ export class DiagramRenderer {
|
|
595
606
|
// Do not allow creating self-inheritance
|
596
607
|
startClassView.class.value !== targetClassView.class.value &&
|
597
608
|
// Avoid creating inhertance that already existed
|
598
|
-
!startClassView.class.value.
|
609
|
+
!getAllSuperclasses(startClassView.class.value).includes(
|
599
610
|
targetClassView.class.value,
|
600
611
|
) &&
|
601
612
|
// Avoid loop (might be expensive)
|
602
|
-
!targetClassView.class.value.
|
613
|
+
!getAllSuperclasses(targetClassView.class.value).includes(
|
603
614
|
startClassView.class.value,
|
604
615
|
)
|
605
616
|
) {
|
@@ -762,8 +773,8 @@ export class DiagramRenderer {
|
|
762
773
|
);
|
763
774
|
minX = Math.min(minX, box.position.x);
|
764
775
|
minY = Math.min(minY, box.position.y);
|
765
|
-
maxX = Math.max(maxX, box
|
766
|
-
maxY = Math.max(maxY, box
|
776
|
+
maxX = Math.max(maxX, getBottomRightCornerPoint(box).x);
|
777
|
+
maxY = Math.max(maxY, getBottomRightCornerPoint(box).y);
|
767
778
|
}
|
768
779
|
// if (relationshipView.from.name) {
|
769
780
|
// var box = this.displayText(fullPath[1], fullPath[0], relationshipView.from.classView, relationshipView.property, this.ctx);
|
@@ -924,7 +935,7 @@ export class DiagramRenderer {
|
|
924
935
|
);
|
925
936
|
}
|
926
937
|
// Add property view
|
927
|
-
addedClass
|
938
|
+
getAllOwnClassProperties(addedClass).forEach((property) => {
|
928
939
|
if (property.genericType.value.rawType === _class) {
|
929
940
|
diagram_addPropertyView(
|
930
941
|
this.diagram,
|
@@ -938,7 +949,7 @@ export class DiagramRenderer {
|
|
938
949
|
);
|
939
950
|
}
|
940
951
|
});
|
941
|
-
_class
|
952
|
+
getAllOwnClassProperties(_class).forEach((property) => {
|
942
953
|
if (property.genericType.value.rawType === addedClass) {
|
943
954
|
diagram_addPropertyView(
|
944
955
|
this.diagram,
|
@@ -1394,14 +1405,14 @@ export class DiagramRenderer {
|
|
1394
1405
|
this.ctx.font = `${(this.fontSize - 1) * (measureOnly ? 1 : this.zoom)}px ${
|
1395
1406
|
this.fontFamily
|
1396
1407
|
}`;
|
1408
|
+
const multiplicityString = generateMultiplicityString(
|
1409
|
+
property.multiplicity.lowerBound,
|
1410
|
+
property.multiplicity.upperBound,
|
1411
|
+
);
|
1397
1412
|
if (!measureOnly) {
|
1398
|
-
this.ctx.fillText(
|
1399
|
-
`[${property.multiplicity.str}]`,
|
1400
|
-
propX + txtMeasure,
|
1401
|
-
propY,
|
1402
|
-
);
|
1413
|
+
this.ctx.fillText(`[${multiplicityString}]`, propX + txtMeasure, propY);
|
1403
1414
|
}
|
1404
|
-
txtMeasure += this.ctx.measureText(`[${
|
1415
|
+
txtMeasure += this.ctx.measureText(`[${multiplicityString}]`).width;
|
1405
1416
|
return txtMeasure;
|
1406
1417
|
}
|
1407
1418
|
|
@@ -1451,7 +1462,7 @@ export class DiagramRenderer {
|
|
1451
1462
|
|
1452
1463
|
// Calculate box for properties
|
1453
1464
|
if (!classView.hideProperties) {
|
1454
|
-
classView.class.value
|
1465
|
+
getAllOwnClassProperties(classView.class.value).forEach((property) => {
|
1455
1466
|
if (!this.hasPropertyView(classView, property)) {
|
1456
1467
|
const propertyTextMeasure = this.drawClassViewProperty(
|
1457
1468
|
classView,
|
@@ -1632,7 +1643,7 @@ export class DiagramRenderer {
|
|
1632
1643
|
);
|
1633
1644
|
this.ctx.stroke();
|
1634
1645
|
|
1635
|
-
for (const property of classView.class.value
|
1646
|
+
for (const property of getAllOwnClassProperties(classView.class.value)) {
|
1636
1647
|
if (!this.hasPropertyView(classView, property)) {
|
1637
1648
|
this.ctx.fillStyle =
|
1638
1649
|
property instanceof DerivedProperty
|
@@ -1671,8 +1682,12 @@ export class DiagramRenderer {
|
|
1671
1682
|
): PositionedRectangle {
|
1672
1683
|
this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;
|
1673
1684
|
const propertyName = getPropertyDisplayName(property);
|
1685
|
+
const multiplictyString = generateMultiplicityString(
|
1686
|
+
property.multiplicity.lowerBound,
|
1687
|
+
property.multiplicity.upperBound,
|
1688
|
+
);
|
1674
1689
|
const textSize = this.ctx.measureText(propertyName).width;
|
1675
|
-
const mulSize = this.ctx.measureText(
|
1690
|
+
const mulSize = this.ctx.measureText(multiplictyString).width;
|
1676
1691
|
this.ctx.font = `${this.fontSize * this.zoom}px ${this.fontFamily}`;
|
1677
1692
|
const posX = textPositionX(textSize);
|
1678
1693
|
const posY = textPositionY(textSize);
|
@@ -1689,7 +1704,7 @@ export class DiagramRenderer {
|
|
1689
1704
|
);
|
1690
1705
|
if (!measureOnly) {
|
1691
1706
|
this.ctx.fillText(
|
1692
|
-
|
1707
|
+
multiplictyString,
|
1693
1708
|
multiplicityPosition.x,
|
1694
1709
|
multiplicityPosition.y,
|
1695
1710
|
);
|
@@ -2006,34 +2021,34 @@ export class DiagramRenderer {
|
|
2006
2021
|
this.ctx.beginPath();
|
2007
2022
|
this.ctx.moveTo(
|
2008
2023
|
resultX +
|
2009
|
-
(this.screenOffset.x + (this.triangle[0] as Point
|
2024
|
+
(this.screenOffset.x + rotatePointX(this.triangle[0] as Point, angle)) *
|
2010
2025
|
this.zoom,
|
2011
2026
|
resultY +
|
2012
|
-
(this.screenOffset.y + (this.triangle[0] as Point
|
2027
|
+
(this.screenOffset.y + rotatePointY(this.triangle[0] as Point, angle)) *
|
2013
2028
|
this.zoom,
|
2014
2029
|
);
|
2015
2030
|
this.ctx.lineTo(
|
2016
2031
|
resultX +
|
2017
|
-
(this.screenOffset.x + (this.triangle[1] as Point
|
2032
|
+
(this.screenOffset.x + rotatePointX(this.triangle[1] as Point, angle)) *
|
2018
2033
|
this.zoom,
|
2019
2034
|
resultY +
|
2020
|
-
(this.screenOffset.y + (this.triangle[1] as Point
|
2035
|
+
(this.screenOffset.y + rotatePointY(this.triangle[1] as Point, angle)) *
|
2021
2036
|
this.zoom,
|
2022
2037
|
);
|
2023
2038
|
this.ctx.lineTo(
|
2024
2039
|
resultX +
|
2025
|
-
(this.screenOffset.x + (this.triangle[2] as Point
|
2040
|
+
(this.screenOffset.x + rotatePointX(this.triangle[2] as Point, angle)) *
|
2026
2041
|
this.zoom,
|
2027
2042
|
resultY +
|
2028
|
-
(this.screenOffset.y + (this.triangle[2] as Point
|
2043
|
+
(this.screenOffset.y + rotatePointY(this.triangle[2] as Point, angle)) *
|
2029
2044
|
this.zoom,
|
2030
2045
|
);
|
2031
2046
|
this.ctx.lineTo(
|
2032
2047
|
resultX +
|
2033
|
-
(this.screenOffset.x + (this.triangle[0] as Point
|
2048
|
+
(this.screenOffset.x + rotatePointX(this.triangle[0] as Point, angle)) *
|
2034
2049
|
this.zoom,
|
2035
2050
|
resultY +
|
2036
|
-
(this.screenOffset.y + (this.triangle[0] as Point
|
2051
|
+
(this.screenOffset.y + rotatePointY(this.triangle[0] as Point, angle)) *
|
2037
2052
|
this.zoom,
|
2038
2053
|
);
|
2039
2054
|
this.ctx.fillStyle = this.generalizationViewInheritanceTriangeFillColor;
|
@@ -2341,7 +2356,7 @@ export class DiagramRenderer {
|
|
2341
2356
|
else if ('ArrowDown' === e.key) {
|
2342
2357
|
const views = uniqBy(
|
2343
2358
|
this.selectedClasses.flatMap((x) =>
|
2344
|
-
x.class.value.
|
2359
|
+
x.class.value._subclasses.flatMap(
|
2345
2360
|
(c) =>
|
2346
2361
|
new ClassView(
|
2347
2362
|
this.diagram,
|
@@ -2629,12 +2644,10 @@ export class DiagramRenderer {
|
|
2629
2644
|
for (let i = this.diagram.classViews.length - 1; i >= 0; i--) {
|
2630
2645
|
const targetClassView = this.diagram.classViews[i] as ClassView;
|
2631
2646
|
if (
|
2632
|
-
targetClassView
|
2633
|
-
.
|
2634
|
-
.
|
2635
|
-
|
2636
|
-
eventPointInModelCoordinate.y,
|
2637
|
-
)
|
2647
|
+
buildBottomRightCornerBox(targetClassView).contains(
|
2648
|
+
eventPointInModelCoordinate.x,
|
2649
|
+
eventPointInModelCoordinate.y,
|
2650
|
+
)
|
2638
2651
|
) {
|
2639
2652
|
this.setSelectedClasses([]);
|
2640
2653
|
this.setSelectedClassCorner(this.diagram.classViews[i]);
|
@@ -2996,8 +3009,8 @@ export class DiagramRenderer {
|
|
2996
3009
|
this.setSelectedClasses([]);
|
2997
3010
|
for (const classView of this.diagram.classViews) {
|
2998
3011
|
if (
|
2999
|
-
this.selection
|
3000
|
-
|
3012
|
+
boxContains(this.selection, classView) ||
|
3013
|
+
boxContains(classView, this.selection)
|
3001
3014
|
) {
|
3002
3015
|
this.setSelectedClasses([...this.selectedClasses, classView]);
|
3003
3016
|
}
|
@@ -3057,12 +3070,10 @@ export class DiagramRenderer {
|
|
3057
3070
|
|
3058
3071
|
// Check hover class corner
|
3059
3072
|
if (
|
3060
|
-
classView
|
3061
|
-
.
|
3062
|
-
.
|
3063
|
-
|
3064
|
-
eventPointInModelCoordinate.y,
|
3065
|
-
)
|
3073
|
+
buildBottomRightCornerBox(classView).contains(
|
3074
|
+
eventPointInModelCoordinate.x,
|
3075
|
+
eventPointInModelCoordinate.y,
|
3076
|
+
)
|
3066
3077
|
) {
|
3067
3078
|
this.setMouseOverClassCorner(classView);
|
3068
3079
|
}
|
@@ -3115,7 +3126,7 @@ export class DiagramRenderer {
|
|
3115
3126
|
cursorY += this.classViewSpaceY;
|
3116
3127
|
|
3117
3128
|
// Check hover class property
|
3118
|
-
for (const property of _class
|
3129
|
+
for (const property of getAllOwnClassProperties(_class)) {
|
3119
3130
|
if (!this.hasPropertyView(classView, property)) {
|
3120
3131
|
this.ctx.font = `${(this.fontSize - 1) * this.zoom}px ${
|
3121
3132
|
this.fontFamily
|
@@ -3204,7 +3215,7 @@ export class DiagramRenderer {
|
|
3204
3215
|
diagram,
|
3205
3216
|
uuid(),
|
3206
3217
|
PackageableElementExplicitReference.create(
|
3207
|
-
generation.value
|
3218
|
+
getRawGenericType(generation.value, Class),
|
3208
3219
|
),
|
3209
3220
|
),
|
3210
3221
|
),
|
@@ -19,8 +19,8 @@ import { useResizeDetector } from 'react-resize-detector';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
20
20
|
import { useApplicationStore } from '@finos/legend-application';
|
21
21
|
import type { Class } from '@finos/legend-graph';
|
22
|
-
import { InheritanceDiagramRenderer } from './InheritanceDiagramRenderer';
|
23
|
-
import { DSL_DIAGRAM_TEST_ID } from './DSLDiagram_TestID';
|
22
|
+
import { InheritanceDiagramRenderer } from './InheritanceDiagramRenderer.js';
|
23
|
+
import { DSL_DIAGRAM_TEST_ID } from './DSLDiagram_TestID.js';
|
24
24
|
import { useEditorStore } from '@finos/legend-studio';
|
25
25
|
|
26
26
|
export const ClassDiagramPreview = observer((props: { _class: Class }) => {
|
@@ -14,20 +14,27 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
+
import type { LegendApplicationDocumentationEntryConfig } from '@finos/legend-application';
|
18
|
+
|
17
19
|
export enum DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY {
|
18
|
-
GRAMMAR_PARSER = 'dsl-
|
19
|
-
|
20
|
+
GRAMMAR_PARSER = 'dsl-diagram.grammar.parser',
|
21
|
+
GRAMMAR_ELEMENT_DIAGRAM = 'dsl-diagram.grammar.element.diagram',
|
20
22
|
}
|
21
23
|
|
22
|
-
export const DSL_DIAGRAM_DOCUMENTATION_ENTRIES
|
24
|
+
export const DSL_DIAGRAM_DOCUMENTATION_ENTRIES: Record<
|
25
|
+
string,
|
26
|
+
LegendApplicationDocumentationEntryConfig
|
27
|
+
> = {
|
23
28
|
[DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
|
29
|
+
title: `What is Diagram DSL about?`,
|
24
30
|
markdownText: {
|
25
|
-
value:
|
31
|
+
value: `\`Diagram DSL\` (coressponding to \`###Diagram\` section in \`Pure\`) concerns with visualizing data models and their relationship`,
|
26
32
|
},
|
27
33
|
},
|
28
|
-
[DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.
|
34
|
+
[DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_DIAGRAM]: {
|
35
|
+
title: `What is a diagram element?`,
|
29
36
|
markdownText: {
|
30
|
-
value: `A
|
37
|
+
value: `A \`Diagram\` element specifies the visualization/rendering of data models and their relationship`,
|
31
38
|
},
|
32
39
|
},
|
33
40
|
};
|
@@ -38,10 +38,10 @@ import {
|
|
38
38
|
} from '@finos/legend-studio';
|
39
39
|
import { ShapesIcon } from '@finos/legend-art';
|
40
40
|
import type { Class, PackageableElement } from '@finos/legend-graph';
|
41
|
-
import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
42
|
-
import { DiagramEditorState } from '../../stores/studio/DiagramEditorState';
|
43
|
-
import { DiagramEditor } from './DiagramEditor';
|
44
|
-
import { ClassDiagramPreview } from './ClassDiagramPreview';
|
41
|
+
import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
42
|
+
import { DiagramEditorState } from '../../stores/studio/DiagramEditorState.js';
|
43
|
+
import { DiagramEditor } from './DiagramEditor.js';
|
44
|
+
import { ClassDiagramPreview } from './ClassDiagramPreview.js';
|
45
45
|
import {
|
46
46
|
type LegendApplicationDocumentationEntry,
|
47
47
|
type LegendApplicationKeyedDocumentationEntry,
|
@@ -50,17 +50,17 @@ import {
|
|
50
50
|
import {
|
51
51
|
PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
|
52
52
|
PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
|
53
|
-
} from '../../graphManager/DSLDiagram_PureGraphManagerPlugin';
|
53
|
+
} from '../../graphManager/DSLDiagram_PureGraphManagerPlugin.js';
|
54
54
|
import {
|
55
55
|
DSL_DIAGRAM_DOCUMENTATION_ENTRIES,
|
56
56
|
DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY,
|
57
|
-
} from './DSLDiagram_LegendStudioDocumentation';
|
57
|
+
} from './DSLDiagram_LegendStudioDocumentation.js';
|
58
58
|
import {
|
59
59
|
EMPTY_DIAGRAM_SNIPPET,
|
60
60
|
getDiagramSnippetWithGeneralizationView,
|
61
61
|
getDiagramSnippetWithOneClassView,
|
62
62
|
getDiagramSnippetWithPropertyView,
|
63
|
-
} from './DSLDiagram_CodeSnippets';
|
63
|
+
} from './DSLDiagram_CodeSnippets.js';
|
64
64
|
|
65
65
|
const DIAGRAM_ELEMENT_TYPE = 'DIAGRAM';
|
66
66
|
const DIAGRAM_ELEMENT_PROJECT_EXPLORER_DND_TYPE = 'PROJECT_EXPLORER_DIAGRAM';
|
@@ -203,8 +203,8 @@ export class DSLDiagram_LegendStudioPlugin
|
|
203
203
|
): LegendApplicationDocumentationEntry | undefined => {
|
204
204
|
if (parserKeyword === PURE_GRAMMAR_DIAGRAM_PARSER_NAME) {
|
205
205
|
if (elementKeyword === PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL) {
|
206
|
-
return editorStore.applicationStore.
|
207
|
-
DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.
|
206
|
+
return editorStore.applicationStore.documentationService.getDocEntry(
|
207
|
+
DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_DIAGRAM,
|
208
208
|
);
|
209
209
|
}
|
210
210
|
}
|
@@ -220,7 +220,7 @@ export class DSLDiagram_LegendStudioPlugin
|
|
220
220
|
parserKeyword: string,
|
221
221
|
): LegendApplicationDocumentationEntry | undefined => {
|
222
222
|
if (parserKeyword === PURE_GRAMMAR_DIAGRAM_PARSER_NAME) {
|
223
|
-
return editorStore.applicationStore.
|
223
|
+
return editorStore.applicationStore.documentationService.getDocEntry(
|
224
224
|
DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
225
225
|
);
|
226
226
|
}
|
@@ -235,9 +235,10 @@ export class DSLDiagram_LegendStudioPlugin
|
|
235
235
|
{
|
236
236
|
text: PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
|
237
237
|
description: `(dsl)`,
|
238
|
-
documentation:
|
239
|
-
|
240
|
-
|
238
|
+
documentation:
|
239
|
+
editorStore.applicationStore.documentationService.getDocEntry(
|
240
|
+
DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
|
241
|
+
),
|
241
242
|
insertText: PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
|
242
243
|
},
|
243
244
|
],
|
@@ -15,8 +15,8 @@
|
|
15
15
|
*/
|
16
16
|
|
17
17
|
import type { DSL_LegendStudioPlugin_Extension } from '@finos/legend-studio';
|
18
|
-
import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
19
|
-
import type { DiagramEditorState } from '../../stores/studio/DiagramEditorState';
|
18
|
+
import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
19
|
+
import type { DiagramEditorState } from '../../stores/studio/DiagramEditorState.js';
|
20
20
|
|
21
21
|
export type ClassViewContextMenuItemRendererConfiguration = {
|
22
22
|
key: string;
|
@@ -30,7 +30,7 @@ import {
|
|
30
30
|
DIAGRAM_INTERACTION_MODE,
|
31
31
|
DIAGRAM_RELATIONSHIP_EDIT_MODE,
|
32
32
|
DIAGRAM_ZOOM_LEVELS,
|
33
|
-
} from '../../DiagramRenderer';
|
33
|
+
} from '../../DiagramRenderer.js';
|
34
34
|
import {
|
35
35
|
type DiagramEditorInlineClassCreatorState,
|
36
36
|
type DiagramEditorInlineClassRenamerState,
|
@@ -38,7 +38,7 @@ import {
|
|
38
38
|
DIAGRAM_EDITOR_SIDE_PANEL_TAB,
|
39
39
|
DiagramEditorClassViewEditorSidePanelState,
|
40
40
|
DiagramEditorState,
|
41
|
-
} from '../../stores/studio/DiagramEditorState';
|
41
|
+
} from '../../stores/studio/DiagramEditorState.js';
|
42
42
|
import {
|
43
43
|
type ResizablePanelHandlerProps,
|
44
44
|
ContextMenu,
|
@@ -104,14 +104,14 @@ import {
|
|
104
104
|
property_setGenericType,
|
105
105
|
property_setMultiplicity,
|
106
106
|
} from '@finos/legend-studio';
|
107
|
-
import { cleanUpDeadReferencesInDiagram } from '../../helpers/
|
108
|
-
import { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
|
109
|
-
import type { DSLDiagram_LegendStudioPlugin_Extension } from './DSLDiagram_LegendStudioPlugin_Extension';
|
107
|
+
import { cleanUpDeadReferencesInDiagram } from '../../helpers/DSLDiagram_Helper.js';
|
108
|
+
import { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
|
109
|
+
import type { DSLDiagram_LegendStudioPlugin_Extension } from './DSLDiagram_LegendStudioPlugin_Extension.js';
|
110
110
|
import {
|
111
111
|
classView_setHideProperties,
|
112
112
|
classView_setHideStereotypes,
|
113
113
|
classView_setHideTaggedValues,
|
114
|
-
} from '../../stores/studio/DSLDiagram_GraphModifierHelper';
|
114
|
+
} from '../../stores/studio/DSLDiagram_GraphModifierHelper.js';
|
115
115
|
|
116
116
|
const DiagramEditorContextMenu = observer(
|
117
117
|
forwardRef<
|
@@ -14,14 +14,14 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { DiagramRenderer } from '../../DiagramRenderer';
|
17
|
+
import { DiagramRenderer } from '../../DiagramRenderer.js';
|
18
18
|
import { uuid } from '@finos/legend-shared';
|
19
19
|
import {
|
20
20
|
type Class,
|
21
21
|
PackageableElementExplicitReference,
|
22
22
|
} from '@finos/legend-graph';
|
23
|
-
import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
24
|
-
import { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
23
|
+
import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
24
|
+
import { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
25
25
|
|
26
26
|
export class InheritanceDiagramRenderer extends DiagramRenderer {
|
27
27
|
constructor(div: HTMLDivElement, _class: Class) {
|
@@ -22,8 +22,8 @@ import {
|
|
22
22
|
type PackageableElement,
|
23
23
|
type PureModel,
|
24
24
|
} from '@finos/legend-graph';
|
25
|
-
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
26
|
-
import { cleanUpDeadReferencesInDiagram } from '../helpers/
|
25
|
+
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
26
|
+
import { cleanUpDeadReferencesInDiagram } from '../helpers/DSLDiagram_Helper.js';
|
27
27
|
|
28
28
|
export class DSLDiagram_PureGraphPlugin extends PureGraphPlugin {
|
29
29
|
constructor() {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
import type { BasicModel, PureModel } from '@finos/legend-graph';
|
18
18
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
19
|
-
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
19
|
+
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
20
20
|
|
21
21
|
export const getDiagram = (path: string, graph: PureModel): Diagram =>
|
22
22
|
graph.getExtensionElement(path, Diagram, `Can't find diagram '${path}'`);
|
@@ -22,8 +22,8 @@ import {
|
|
22
22
|
type PackageableElement,
|
23
23
|
type PureGrammarElementLabeler,
|
24
24
|
} from '@finos/legend-graph';
|
25
|
-
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
26
|
-
import { observe_Diagram } from './action/changeDetection/DSLDiagram_ObserverHelper';
|
25
|
+
import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
26
|
+
import { observe_Diagram } from './action/changeDetection/DSLDiagram_ObserverHelper.js';
|
27
27
|
|
28
28
|
export const PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';
|
29
29
|
export const PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL = 'Diagram';
|
@@ -21,20 +21,20 @@ import {
|
|
21
21
|
skipObserved,
|
22
22
|
} from '@finos/legend-graph';
|
23
23
|
import { computed, makeObservable, observable, override } from 'mobx';
|
24
|
-
import type { AssociationView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
|
25
|
-
import type { ClassView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
|
26
|
-
import type { ClassViewReference } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference';
|
27
|
-
import type { Diagram } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
|
28
|
-
import type { GeneralizationView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
|
29
|
-
import type { PropertyView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
|
30
|
-
import type {
|
31
|
-
import type { RelationshipView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
|
32
|
-
import type { PositionedRectangle } from '../../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
|
24
|
+
import type { AssociationView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js';
|
25
|
+
import type { ClassView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
|
26
|
+
import type { ClassViewReference } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js';
|
27
|
+
import type { Diagram } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
|
28
|
+
import type { GeneralizationView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
|
29
|
+
import type { PropertyView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js';
|
30
|
+
import type { RelationshipViewEnd } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.js';
|
31
|
+
import type { RelationshipView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
|
32
|
+
import type { PositionedRectangle } from '../../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
|
33
33
|
|
34
34
|
export const observe_PositionedRectangle = skipObserved(
|
35
35
|
(metamodel: PositionedRectangle): PositionedRectangle =>
|
36
36
|
makeObservable(metamodel, {
|
37
|
-
|
37
|
+
_dummyObservable: observable,
|
38
38
|
}),
|
39
39
|
);
|
40
40
|
|
@@ -69,7 +69,7 @@ export const observe_ClassView = skipObserved(
|
|
69
69
|
);
|
70
70
|
|
71
71
|
export const observe_RelationShipEdgeView = skipObserved(
|
72
|
-
(metamodel:
|
72
|
+
(metamodel: RelationshipViewEnd): RelationshipViewEnd => {
|
73
73
|
observe_ClassViewReference(metamodel.classView);
|
74
74
|
|
75
75
|
return metamodel;
|