@finos/legend-extension-dsl-diagram 2.0.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. package/lib/DSLDiagram_Extension.d.ts +0 -2
  2. package/lib/DSLDiagram_Extension.d.ts.map +1 -1
  3. package/lib/DSLDiagram_Extension.js +8 -9
  4. package/lib/DSLDiagram_Extension.js.map +1 -1
  5. package/lib/DiagramRenderer.d.ts +8 -8
  6. package/lib/DiagramRenderer.d.ts.map +1 -1
  7. package/lib/DiagramRenderer.js +26 -30
  8. package/lib/DiagramRenderer.js.map +1 -1
  9. package/lib/components/studio/ClassDiagramPreview.js +2 -2
  10. package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
  11. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts +4 -14
  12. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts.map +1 -1
  13. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js +8 -6
  14. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js.map +1 -1
  15. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -1
  16. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js +10 -10
  17. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -1
  18. package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts +3 -3
  19. package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts.map +1 -1
  20. package/lib/components/studio/DSLDiagram_TestID.js +1 -1
  21. package/lib/components/studio/DSLDiagram_TestID.js.map +1 -1
  22. package/lib/components/studio/DiagramEditor.js +5 -5
  23. package/lib/components/studio/DiagramEditor.js.map +1 -1
  24. package/lib/components/studio/InheritanceDiagramRenderer.d.ts +1 -1
  25. package/lib/components/studio/InheritanceDiagramRenderer.d.ts.map +1 -1
  26. package/lib/components/studio/InheritanceDiagramRenderer.js +3 -3
  27. package/lib/components/studio/InheritanceDiagramRenderer.js.map +1 -1
  28. package/lib/graph/DSLDiagram_PureGraphPlugin.js +2 -2
  29. package/lib/graph/DSLDiagram_PureGraphPlugin.js.map +1 -1
  30. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts +1 -1
  31. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts.map +1 -1
  32. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js +1 -1
  33. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js.map +1 -1
  34. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +2 -2
  35. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
  36. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +9 -9
  37. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -1
  38. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +1 -1
  39. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -1
  40. package/lib/helpers/{DiagramHelper.d.ts → DSLDiagram_Helper.d.ts} +28 -6
  41. package/lib/helpers/DSLDiagram_Helper.d.ts.map +1 -0
  42. package/lib/helpers/{DiagramHelper.js → DSLDiagram_Helper.js} +56 -9
  43. package/lib/helpers/{DiagramHelper.js.map → DSLDiagram_Helper.js.map} +1 -1
  44. package/lib/index.css +1 -1
  45. package/lib/index.d.ts +18 -18
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/index.js +18 -18
  48. package/lib/index.js.map +1 -1
  49. package/lib/models/DSLDiagram_ModelUtils.js +1 -1
  50. package/lib/models/DSLDiagram_ModelUtils.js.map +1 -1
  51. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts +3 -3
  52. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
  53. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +2 -2
  54. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
  55. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +2 -2
  56. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
  57. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +4 -4
  58. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  59. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +2 -2
  60. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  61. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +4 -4
  62. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  63. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +1 -1
  64. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  65. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +1 -1
  66. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
  67. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +2 -2
  68. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
  69. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts +3 -3
  70. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts.map +1 -1
  71. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js +2 -2
  72. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js.map +1 -1
  73. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +1 -1
  74. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
  75. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +2 -2
  76. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
  77. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts +4 -4
  78. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +1 -1
  79. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js +3 -3
  80. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +1 -1
  81. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +4 -4
  82. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
  83. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +16 -8
  84. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  85. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts +0 -2
  86. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts.map +1 -1
  87. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js +1 -7
  88. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js.map +1 -1
  89. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +3 -9
  90. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  91. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +11 -22
  92. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  93. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js +1 -1
  94. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js.map +1 -1
  95. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +6 -6
  96. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
  97. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts +1 -1
  98. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts.map +1 -1
  99. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js +2 -2
  100. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js.map +1 -1
  101. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts +3 -3
  102. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts.map +1 -1
  103. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js +1 -1
  104. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js.map +1 -1
  105. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts +2 -2
  106. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts.map +1 -1
  107. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js +2 -2
  108. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js.map +1 -1
  109. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts +1 -1
  110. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts.map +1 -1
  111. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js +2 -2
  112. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js.map +1 -1
  113. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts +1 -1
  114. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts.map +1 -1
  115. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js +2 -2
  116. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js.map +1 -1
  117. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts +1 -1
  118. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts.map +1 -1
  119. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js +1 -1
  120. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js.map +1 -1
  121. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts +1 -1
  122. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts.map +1 -1
  123. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js +1 -1
  124. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js.map +1 -1
  125. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts +2 -2
  126. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  127. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js +1 -1
  128. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js.map +1 -1
  129. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js +1 -1
  130. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js.map +1 -1
  131. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts +7 -7
  132. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  133. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +7 -7
  134. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  135. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts +2 -2
  136. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts.map +1 -1
  137. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +7 -7
  138. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
  139. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts +1 -1
  140. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts.map +1 -1
  141. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js +7 -7
  142. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js.map +1 -1
  143. package/lib/package.json +10 -9
  144. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts +10 -10
  145. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -1
  146. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js +8 -8
  147. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -1
  148. package/lib/stores/studio/DiagramEditorState.d.ts +4 -4
  149. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  150. package/lib/stores/studio/DiagramEditorState.js +3 -3
  151. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  152. package/package.json +17 -16
  153. package/src/DSLDiagram_Extension.ts +8 -11
  154. package/src/DiagramRenderer.ts +39 -36
  155. package/src/components/studio/ClassDiagramPreview.tsx +2 -2
  156. package/src/components/studio/DSLDiagram_LegendStudioDocumentation.ts +13 -6
  157. package/src/components/studio/DSLDiagram_LegendStudioPlugin.tsx +14 -13
  158. package/src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx +2 -2
  159. package/src/components/studio/DiagramEditor.tsx +6 -6
  160. package/src/components/studio/InheritanceDiagramRenderer.ts +3 -3
  161. package/src/graph/DSLDiagram_PureGraphPlugin.ts +2 -2
  162. package/src/graphManager/DSLDiagram_GraphManagerHelper.ts +1 -1
  163. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +2 -2
  164. package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +10 -10
  165. package/src/helpers/{DiagramHelper.ts → DSLDiagram_Helper.ts} +102 -11
  166. package/src/index.ts +21 -18
  167. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +4 -4
  168. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +5 -5
  169. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +2 -2
  170. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +5 -5
  171. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +2 -2
  172. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts +4 -4
  173. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +2 -2
  174. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts +5 -4
  175. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +18 -10
  176. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.ts +1 -9
  177. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +12 -42
  178. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.ts +1 -1
  179. package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +6 -6
  180. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.ts +2 -2
  181. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.ts +4 -4
  182. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.ts +3 -3
  183. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.ts +2 -2
  184. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.ts +2 -2
  185. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.ts +2 -2
  186. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.ts +1 -1
  187. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.ts +1 -1
  188. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.ts +3 -3
  189. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.ts +1 -1
  190. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +13 -13
  191. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +12 -12
  192. package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.ts +7 -7
  193. package/src/stores/studio/DSLDiagram_GraphModifierHelper.ts +20 -18
  194. package/src/stores/studio/DiagramEditorState.ts +5 -5
  195. package/tsconfig.json +4 -10
  196. package/tsconfig.package.json +1 -4
  197. package/lib/helpers/DiagramHelper.d.ts.map +0 -1
  198. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +0 -26
  199. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +0 -1
  200. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +0 -37
  201. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +0 -1
  202. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +0 -44
@@ -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-diagram__grammar-parser',
19
- GRAMMAR_DIAGRAM_ELEMENT = 'dsl-diagram__grammar-diagram-element',
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: `DSL Diagram (\`###Diagram\`) concerns with visualizing data models and their relationship`,
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.GRAMMAR_DIAGRAM_ELEMENT]: {
34
+ [DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_ELEMENT_DIAGRAM]: {
35
+ title: `What is a diagram element?`,
29
36
  markdownText: {
30
- value: `A diagram element specifies the visualization/rendering of data models and their relationship`,
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.docRegistry.getEntry(
207
- DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DIAGRAM_ELEMENT,
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.docRegistry.getEntry(
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: editorStore.applicationStore.docRegistry.getEntry(
239
- DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
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/DiagramHelper';
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/DiagramHelper';
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 { RelationshipEdgeView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
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 { RelationshipEdgeView } from '../../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.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
- dummyObservable: observable,
37
+ _dummyObservable: observable,
38
38
  }),
39
39
  );
40
40
 
@@ -14,13 +14,45 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { RelationshipView } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
18
- import { Point } from '../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
19
- import { Vector } from '../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector';
20
- import type { PureModel } from '@finos/legend-graph';
17
+ import { RelationshipView } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
18
+ import { Point } from '../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
19
+ import {
20
+ type PureModel,
21
+ Class,
22
+ getAllOwnClassProperties,
23
+ } from '@finos/legend-graph';
21
24
  import { deleteEntry } from '@finos/legend-shared';
22
- import type { ClassView } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
23
- import type { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
25
+ import type { ClassView } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
26
+ import type { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
27
+ import { PositionedRectangle } from '../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
28
+ import { Rectangle } from '../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
29
+
30
+ export class Vector {
31
+ readonly x: number;
32
+ readonly y: number;
33
+
34
+ constructor(x: number, y: number) {
35
+ this.x = x;
36
+ this.y = y;
37
+ }
38
+
39
+ static fromPoints(a: Point, b: Point): Vector {
40
+ return new Vector(b.x - a.x, b.y - a.y);
41
+ }
42
+
43
+ unit(): Vector {
44
+ const norm = Math.sqrt(this.x * this.x + this.y * this.y);
45
+ return new Vector(this.x / norm, this.y / norm);
46
+ }
47
+
48
+ normal(other: Vector): Vector {
49
+ return new Vector(other.y - this.y, -(other.x - this.x));
50
+ }
51
+
52
+ dotProduct(other: Vector): number {
53
+ return this.x * other.x + this.y * other.y;
54
+ }
55
+ }
24
56
 
25
57
  /**
26
58
  * Get absolute position of element on the screen by recursively walking up element tree
@@ -49,7 +81,11 @@ export const cleanUpDeadReferencesInDiagram = (
49
81
  // Delete orphan property views
50
82
  const propertyViewsToRemove = diagram.propertyViews.filter(
51
83
  (propertyView) =>
52
- !propertyView.property.ownerReference.value.properties
84
+ !(
85
+ propertyView.property.ownerReference.value instanceof Class
86
+ ? getAllOwnClassProperties(propertyView.property.ownerReference.value)
87
+ : propertyView.property.ownerReference.value.properties
88
+ )
53
89
  .map((property) => property.name)
54
90
  .includes(propertyView.property.value.name),
55
91
  );
@@ -110,15 +146,15 @@ export const _relationshipView_simplifyPath = (
110
146
  // if it does we will update the offset
111
147
  if (newPath[0] !== fullPath[0]) {
112
148
  const center = relationshipView.from.classView.value.center();
113
- relationshipView.from.offsetX = (newPath[0] as Point).x - center.x;
114
- relationshipView.from.offsetY = (newPath[0] as Point).y - center.y;
149
+ relationshipView.from._offsetX = (newPath[0] as Point).x - center.x;
150
+ relationshipView.from._offsetY = (newPath[0] as Point).y - center.y;
115
151
  }
116
152
 
117
153
  if (newPath[newPath.length - 1] !== fullPath[fullPath.length - 1]) {
118
154
  const center = relationshipView.to.classView.value.center();
119
- relationshipView.to.offsetX =
155
+ relationshipView.to._offsetX =
120
156
  (newPath[newPath.length - 1] as Point).x - center.x;
121
- relationshipView.to.offsetY =
157
+ relationshipView.to._offsetY =
122
158
  (newPath[newPath.length - 1] as Point).y - center.y;
123
159
  }
124
160
 
@@ -199,3 +235,58 @@ export const _findOrBuildPoint = (
199
235
  }
200
236
  return point;
201
237
  };
238
+
239
+ export const rotatePointX = (point: Point, angle: number): number =>
240
+ point.x * Math.cos(angle) - point.y * Math.sin(angle);
241
+
242
+ export const rotatePointY = (point: Point, angle: number): number =>
243
+ point.x * Math.sin(angle) + point.y * Math.cos(angle);
244
+
245
+ export const getBottomRightCornerPoint = (pR: PositionedRectangle): Point =>
246
+ new Point(
247
+ pR.position.x + pR.rectangle.width,
248
+ pR.position.y + pR.rectangle.height,
249
+ );
250
+
251
+ /**
252
+ * Build a small box at the bottom right corner of the rectangle so we
253
+ * can use that for selection to resize the box
254
+ */
255
+ export const buildBottomRightCornerBox = (
256
+ pR: PositionedRectangle,
257
+ ): PositionedRectangle => {
258
+ const bottomRightCornerPoint = getBottomRightCornerPoint(pR);
259
+ const boxSize = 10;
260
+ return new PositionedRectangle(
261
+ new Point(
262
+ bottomRightCornerPoint.x - boxSize / 2,
263
+ bottomRightCornerPoint.y - boxSize / 2,
264
+ ),
265
+ new Rectangle(boxSize, boxSize),
266
+ );
267
+ };
268
+
269
+ /**
270
+ * Check if a box contains another box
271
+ */
272
+ export const boxContains = (
273
+ box: PositionedRectangle,
274
+ otherBox: PositionedRectangle,
275
+ ): boolean => {
276
+ otherBox = box.normalizeBox(otherBox);
277
+ return (
278
+ box.contains(otherBox.position.x, otherBox.position.y) ||
279
+ box.contains(
280
+ otherBox.position.x + otherBox.rectangle.width,
281
+ otherBox.position.y,
282
+ ) ||
283
+ box.contains(
284
+ otherBox.position.x,
285
+ otherBox.position.y + otherBox.rectangle.height,
286
+ ) ||
287
+ box.contains(
288
+ otherBox.position.x + otherBox.rectangle.width,
289
+ otherBox.position.y + otherBox.rectangle.height,
290
+ )
291
+ );
292
+ };
package/src/index.ts CHANGED
@@ -14,25 +14,28 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- export * from './DSLDiagram_Extension';
18
- export { DSLDiagram_LegendStudioPlugin } from './components/studio/DSLDiagram_LegendStudioPlugin';
19
- export * from './components/studio/DSLDiagram_LegendStudioPlugin_Extension';
17
+ export * from './DSLDiagram_Extension.js';
18
+ export { DSLDiagram_LegendStudioPlugin } from './components/studio/DSLDiagram_LegendStudioPlugin.js';
19
+ export * from './components/studio/DSLDiagram_LegendStudioPlugin_Extension.js';
20
20
 
21
- export { DiagramEditorState } from './stores/studio/DiagramEditorState';
21
+ export { DiagramEditorState } from './stores/studio/DiagramEditorState.js';
22
22
 
23
- export { DiagramRenderer, DIAGRAM_INTERACTION_MODE } from './DiagramRenderer';
23
+ export {
24
+ DiagramRenderer,
25
+ DIAGRAM_INTERACTION_MODE,
26
+ } from './DiagramRenderer.js';
24
27
 
25
- export { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
26
- export { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
27
- export { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
28
- export { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
29
- export { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
30
- export { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
31
- export { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
32
- export { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
33
- export { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
34
- export { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
28
+ export { Diagram } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
29
+ export { ClassView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
30
+ export { RelationshipView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
31
+ export { PropertyHolderView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js';
32
+ export { PropertyView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js';
33
+ export { AssociationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js';
34
+ export { GeneralizationView } from './models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
35
+ export { Point } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
36
+ export { Rectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
37
+ export { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
35
38
 
36
- export * from './helpers/DiagramHelper';
37
- export * from './graphManager/DSLDiagram_GraphManagerHelper';
38
- export { V1_DSLDiagram_PackageableElementPointerType } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin';
39
+ export * from './helpers/DSLDiagram_Helper.js';
40
+ export * from './graphManager/DSLDiagram_GraphManagerHelper.js';
41
+ export { V1_DSLDiagram_PackageableElementPointerType } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js';
@@ -15,10 +15,10 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import { PropertyHolderView } from './DSLDiagram_PropertyHolderView';
19
- import type { ClassView } from './DSLDiagram_ClassView';
20
- import type { Diagram } from './DSLDiagram_Diagram';
21
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
18
+ import { PropertyHolderView } from './DSLDiagram_PropertyHolderView.js';
19
+ import type { ClassView } from './DSLDiagram_ClassView.js';
20
+ import type { Diagram } from './DSLDiagram_Diagram.js';
21
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
22
22
  import type {
23
23
  Association,
24
24
  PackageableElementReference,
@@ -15,11 +15,11 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import { PositionedRectangle } from './geometry/DSLDiagram_PositionedRectangle';
19
- import { Rectangle } from './geometry/DSLDiagram_Rectangle';
20
- import { Point } from './geometry/DSLDiagram_Point';
21
- import type { Diagram } from './DSLDiagram_Diagram';
22
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
18
+ import { PositionedRectangle } from './geometry/DSLDiagram_PositionedRectangle.js';
19
+ import { Rectangle } from './geometry/DSLDiagram_Rectangle.js';
20
+ import { Point } from './geometry/DSLDiagram_Point.js';
21
+ import type { Diagram } from './DSLDiagram_Diagram.js';
22
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
23
23
  import type { Class, PackageableElementReference } from '@finos/legend-graph';
24
24
 
25
25
  export class ClassView extends PositionedRectangle implements Hashable {
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { Diagram } from './DSLDiagram_Diagram';
18
- import type { ClassView } from './DSLDiagram_ClassView';
17
+ import type { Diagram } from './DSLDiagram_Diagram.js';
18
+ import type { ClassView } from './DSLDiagram_ClassView.js';
19
19
  import {
20
20
  PackageableElementExplicitReference,
21
21
  ReferenceWithOwner,
@@ -15,15 +15,15 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import type { ClassView } from './DSLDiagram_ClassView';
19
- import type { PropertyView } from './DSLDiagram_PropertyView';
20
- import type { GeneralizationView } from './DSLDiagram_GeneralizationView';
21
- import type { AssociationView } from './DSLDiagram_AssociationView';
18
+ import type { ClassView } from './DSLDiagram_ClassView.js';
19
+ import type { PropertyView } from './DSLDiagram_PropertyView.js';
20
+ import type { GeneralizationView } from './DSLDiagram_GeneralizationView.js';
21
+ import type { AssociationView } from './DSLDiagram_AssociationView.js';
22
22
  import {
23
23
  type PackageableElementVisitor,
24
24
  PackageableElement,
25
25
  } from '@finos/legend-graph';
26
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
26
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
27
27
 
28
28
  export class Diagram extends PackageableElement implements Hashable {
29
29
  classViews: ClassView[] = [];
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import { RelationshipView } from './DSLDiagram_RelationshipView';
19
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
18
+ import { RelationshipView } from './DSLDiagram_RelationshipView.js';
19
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
20
20
 
21
21
  export class GeneralizationView extends RelationshipView implements Hashable {
22
22
  override get hashCode(): string {
@@ -15,11 +15,11 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import { RelationshipView } from './DSLDiagram_RelationshipView';
19
- import type { ClassView } from './DSLDiagram_ClassView';
20
- import type { Diagram } from './DSLDiagram_Diagram';
18
+ import { RelationshipView } from './DSLDiagram_RelationshipView.js';
19
+ import type { ClassView } from './DSLDiagram_ClassView.js';
20
+ import type { Diagram } from './DSLDiagram_Diagram.js';
21
21
  import type { PropertyReference } from '@finos/legend-graph';
22
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
22
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
23
23
 
24
24
  export class PropertyHolderView extends RelationshipView implements Hashable {
25
25
  property: PropertyReference;
@@ -15,8 +15,8 @@
15
15
  */
16
16
 
17
17
  import { hashArray, type Hashable } from '@finos/legend-shared';
18
- import { PropertyHolderView } from './DSLDiagram_PropertyHolderView';
19
- import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
18
+ import { PropertyHolderView } from './DSLDiagram_PropertyHolderView.js';
19
+ import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils.js';
20
20
 
21
21
  export class PropertyView extends PropertyHolderView implements Hashable {
22
22
  override get hashCode(): string {
@@ -14,17 +14,18 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { ClassViewReference } from './DSLDiagram_ClassViewReference';
17
+ import type { ClassViewReference } from './DSLDiagram_ClassViewReference.js';
18
18
 
19
19
  export class RelationshipEdgeView {
20
- classView: ClassViewReference;
21
20
  /**
22
21
  * Offsets from the center of the class view.
23
22
  *
24
23
  * These offsets can be used to compute the end points of relationship views.
25
24
  */
26
- offsetX?: number | undefined;
27
- offsetY?: number | undefined;
25
+ _offsetX?: number | undefined;
26
+ _offsetY?: number | undefined;
27
+
28
+ classView: ClassViewReference;
28
29
 
29
30
  constructor(classView: ClassViewReference) {
30
31
  this.classView = classView;