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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) 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.d.ts +1 -0
  10. package/lib/components/studio/ClassDiagramPreview.d.ts.map +1 -1
  11. package/lib/components/studio/ClassDiagramPreview.js +2 -2
  12. package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
  13. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts +4 -14
  14. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts.map +1 -1
  15. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js +8 -6
  16. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js.map +1 -1
  17. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -1
  18. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js +10 -10
  19. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -1
  20. package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts +3 -3
  21. package/lib/components/studio/DSLDiagram_LegendStudioPlugin_Extension.d.ts.map +1 -1
  22. package/lib/components/studio/DSLDiagram_TestID.js +1 -1
  23. package/lib/components/studio/DSLDiagram_TestID.js.map +1 -1
  24. package/lib/components/studio/DiagramEditor.d.ts +1 -0
  25. package/lib/components/studio/DiagramEditor.d.ts.map +1 -1
  26. package/lib/components/studio/DiagramEditor.js +5 -5
  27. package/lib/components/studio/DiagramEditor.js.map +1 -1
  28. package/lib/components/studio/InheritanceDiagramRenderer.d.ts +1 -1
  29. package/lib/components/studio/InheritanceDiagramRenderer.d.ts.map +1 -1
  30. package/lib/components/studio/InheritanceDiagramRenderer.js +3 -3
  31. package/lib/components/studio/InheritanceDiagramRenderer.js.map +1 -1
  32. package/lib/graph/DSLDiagram_PureGraphPlugin.js +2 -2
  33. package/lib/graph/DSLDiagram_PureGraphPlugin.js.map +1 -1
  34. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts +1 -1
  35. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts.map +1 -1
  36. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js +1 -1
  37. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js.map +1 -1
  38. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +2 -2
  39. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
  40. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +10 -10
  41. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -1
  42. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +1 -1
  43. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -1
  44. package/lib/helpers/{DiagramHelper.d.ts → DSLDiagram_Helper.d.ts} +28 -6
  45. package/lib/helpers/DSLDiagram_Helper.d.ts.map +1 -0
  46. package/lib/helpers/{DiagramHelper.js → DSLDiagram_Helper.js} +56 -9
  47. package/lib/helpers/{DiagramHelper.js.map → DSLDiagram_Helper.js.map} +1 -1
  48. package/lib/index.css +1 -1
  49. package/lib/index.d.ts +18 -18
  50. package/lib/index.d.ts.map +1 -1
  51. package/lib/index.js +18 -18
  52. package/lib/index.js.map +1 -1
  53. package/lib/models/DSLDiagram_ModelUtils.js +1 -1
  54. package/lib/models/DSLDiagram_ModelUtils.js.map +1 -1
  55. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts +3 -3
  56. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
  57. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +2 -2
  58. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
  59. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +2 -2
  60. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
  61. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +4 -4
  62. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  63. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +2 -2
  64. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  65. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +4 -4
  66. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  67. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +1 -1
  68. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  69. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +1 -1
  70. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
  71. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +2 -2
  72. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
  73. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts +3 -3
  74. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.d.ts.map +1 -1
  75. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js +2 -2
  76. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js.map +1 -1
  77. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +1 -1
  78. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
  79. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +2 -2
  80. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
  81. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +6 -6
  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 +18 -10
  84. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  85. package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.d.ts → DSLDiagram_RelationshipViewEnd.d.ts} +6 -6
  86. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.d.ts.map +1 -0
  87. package/lib/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.js → DSLDiagram_RelationshipViewEnd.js} +5 -5
  88. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.js.map +1 -0
  89. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts +0 -2
  90. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.d.ts.map +1 -1
  91. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js +1 -7
  92. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js.map +1 -1
  93. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +3 -9
  94. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  95. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +11 -22
  96. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  97. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js +1 -1
  98. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js.map +1 -1
  99. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +6 -6
  100. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
  101. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts +1 -1
  102. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.d.ts.map +1 -1
  103. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js +2 -2
  104. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.js.map +1 -1
  105. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts +3 -3
  106. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.d.ts.map +1 -1
  107. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js +1 -1
  108. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.js.map +1 -1
  109. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts +2 -2
  110. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.d.ts.map +1 -1
  111. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js +2 -2
  112. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.js.map +1 -1
  113. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts +1 -1
  114. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.d.ts.map +1 -1
  115. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js +2 -2
  116. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.js.map +1 -1
  117. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts +1 -1
  118. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.d.ts.map +1 -1
  119. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js +2 -2
  120. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.js.map +1 -1
  121. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts +1 -1
  122. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.d.ts.map +1 -1
  123. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js +1 -1
  124. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.js.map +1 -1
  125. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts +1 -1
  126. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.d.ts.map +1 -1
  127. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js +1 -1
  128. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.js.map +1 -1
  129. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts +2 -2
  130. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  131. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js +1 -1
  132. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.js.map +1 -1
  133. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js +1 -1
  134. package/lib/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.js.map +1 -1
  135. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts +7 -7
  136. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  137. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +7 -7
  138. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  139. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts +2 -2
  140. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.d.ts.map +1 -1
  141. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +7 -7
  142. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
  143. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts +1 -1
  144. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.d.ts.map +1 -1
  145. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js +7 -7
  146. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.js.map +1 -1
  147. package/lib/package.json +12 -11
  148. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts +12 -12
  149. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -1
  150. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js +8 -8
  151. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -1
  152. package/lib/stores/studio/DiagramEditorState.d.ts +4 -4
  153. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  154. package/lib/stores/studio/DiagramEditorState.js +3 -3
  155. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  156. package/package.json +19 -18
  157. package/src/DSLDiagram_Extension.ts +8 -11
  158. package/src/DiagramRenderer.ts +39 -36
  159. package/src/components/studio/ClassDiagramPreview.tsx +2 -2
  160. package/src/components/studio/DSLDiagram_LegendStudioDocumentation.ts +13 -6
  161. package/src/components/studio/DSLDiagram_LegendStudioPlugin.tsx +14 -13
  162. package/src/components/studio/DSLDiagram_LegendStudioPlugin_Extension.tsx +2 -2
  163. package/src/components/studio/DiagramEditor.tsx +6 -6
  164. package/src/components/studio/InheritanceDiagramRenderer.ts +3 -3
  165. package/src/graph/DSLDiagram_PureGraphPlugin.ts +2 -2
  166. package/src/graphManager/DSLDiagram_GraphManagerHelper.ts +1 -1
  167. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +2 -2
  168. package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +11 -11
  169. package/src/helpers/{DiagramHelper.ts → DSLDiagram_Helper.ts} +102 -11
  170. package/src/index.ts +21 -18
  171. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +4 -4
  172. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +5 -5
  173. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +2 -2
  174. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +5 -5
  175. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +2 -2
  176. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts +4 -4
  177. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +2 -2
  178. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +23 -15
  179. package/src/models/metamodels/pure/packageableElements/diagram/{DSLDiagram_RelationshipEdgeView.ts → DSLDiagram_RelationshipViewEnd.ts} +6 -5
  180. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.ts +1 -9
  181. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +12 -42
  182. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.ts +1 -1
  183. package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +6 -6
  184. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.ts +2 -2
  185. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.ts +4 -4
  186. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView.ts +3 -3
  187. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyHolderView.ts +2 -2
  188. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_PropertyView.ts +2 -2
  189. package/src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_RelationshipView.ts +2 -2
  190. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Line.ts +1 -1
  191. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Point.ts +1 -1
  192. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_PositionedRectangle.ts +3 -3
  193. package/src/models/protocols/pure/v1/model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle.ts +1 -1
  194. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +13 -13
  195. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +13 -13
  196. package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.ts +7 -7
  197. package/src/stores/studio/DSLDiagram_GraphModifierHelper.ts +22 -20
  198. package/src/stores/studio/DiagramEditorState.ts +5 -5
  199. package/tsconfig.json +5 -11
  200. package/tsconfig.package.json +1 -4
  201. package/lib/helpers/DiagramHelper.d.ts.map +0 -1
  202. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +0 -1
  203. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +0 -1
  204. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +0 -26
  205. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +0 -1
  206. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +0 -37
  207. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +0 -1
  208. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +0 -44
@@ -16,27 +16,27 @@
16
16
 
17
17
  import { addUniqueEntry, changeEntry, deleteEntry } from '@finos/legend-shared';
18
18
  import { action } from 'mobx';
19
- import type { AssociationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView';
20
- import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
21
- import type { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
22
- import type { GeneralizationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
19
+ import type { AssociationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js';
20
+ import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
21
+ import type { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
22
+ import type { GeneralizationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js';
23
23
  import {
24
24
  _findOrBuildPoint,
25
25
  _relationshipView_simplifyPath,
26
26
  _relationshipView_setPath,
27
- } from '../../helpers/DiagramHelper';
28
- import type { PropertyView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
29
- import type { RelationshipEdgeView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
30
- import type { RelationshipView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
31
- import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
32
- import type { PositionedRectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
33
- import type { Rectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
27
+ } from '../../helpers/DSLDiagram_Helper.js';
28
+ import type { PropertyView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js';
29
+ import type { RelationshipViewEnd } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.js';
30
+ import type { RelationshipView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js';
31
+ import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
32
+ import type { PositionedRectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js';
33
+ import type { Rectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.js';
34
34
  import {
35
35
  observe_AssociationView,
36
36
  observe_ClassView,
37
37
  observe_GeneralizationView,
38
38
  observe_PropertyView,
39
- } from '../../graphManager/action/changeDetection/DSLDiagram_ObserverHelper';
39
+ } from '../../graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js';
40
40
 
41
41
  export const diagram_setClassViews = action(
42
42
  (diagram: Diagram, val: ClassView[]): void => {
@@ -113,22 +113,23 @@ export const classView_setHideTaggedValues = action(
113
113
  },
114
114
  );
115
115
  export const relationshipEdgeView_setOffsetX = action(
116
- (r: RelationshipEdgeView, val: number): void => {
117
- r.offsetX = val;
116
+ (r: RelationshipViewEnd, val: number): void => {
117
+ r._offsetX = val;
118
118
  },
119
119
  );
120
120
  export const relationshipEdgeView_setOffsetY = action(
121
- (r: RelationshipEdgeView, val: number): void => {
122
- r.offsetY = val;
121
+ (r: RelationshipViewEnd, val: number): void => {
122
+ r._offsetY = val;
123
123
  },
124
124
  );
125
125
 
126
- // To optimize performance we will not observe point (path)
126
+ // NOTE: To optimize performance, for now, we will not observe point (path)
127
127
  export const relationshipView_changePoint = action(
128
128
  (v: RelationshipView, val: Point, newVal: Point): void => {
129
129
  changeEntry(v.path, val, newVal);
130
130
  },
131
131
  );
132
+
132
133
  export const relationshipView_simplifyPath = action(
133
134
  _relationshipView_simplifyPath,
134
135
  );
@@ -136,19 +137,20 @@ export const relationshipView_simplifyPath = action(
136
137
  export const findOrBuildPoint = action(_findOrBuildPoint);
137
138
  export const relationshipView_setPath = action(_relationshipView_setPath);
138
139
 
139
- // To optimize performance we will not observe rectangle
140
+ // NOTE: To optimize performance, for now, we will not observe rectangle
140
141
  export const positionedRectangle_setRectangle = action(
141
142
  (pR: PositionedRectangle, value: Rectangle): void => {
142
143
  pR.rectangle = value;
143
144
  },
144
145
  );
145
146
 
146
- // To optimize performance we will not observe point (path)
147
+ // NOTE: To optimize performance, for now, we will not observe point (path)
147
148
  export const positionedRectangle_setPosition = action(
148
149
  (pR: PositionedRectangle, value: Point): void => {
149
150
  pR.position = value;
150
151
  },
151
152
  );
153
+
152
154
  /**
153
155
  * NOTE: Having `position` and `rectangle` as observables compromises the performance of diagram
154
156
  * so we want to have a way to refresh the hash for change detection to pick up new hash when we resize
@@ -159,6 +161,6 @@ export const positionedRectangle_setPosition = action(
159
161
  */
160
162
  export const positionedRectangle_forceRefreshHash = action(
161
163
  (pR: PositionedRectangle): void => {
162
- pR.dummyObservable = {};
164
+ pR._dummyObservable = {};
163
165
  },
164
166
  );
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  type DiagramRenderer,
26
26
  DIAGRAM_INTERACTION_MODE,
27
- } from '../../DiagramRenderer';
27
+ } from '../../DiagramRenderer.js';
28
28
  import { HotkeyConfiguration, PanelDisplayState } from '@finos/legend-art';
29
29
  import {
30
30
  type PackageableElement,
@@ -43,10 +43,10 @@ import {
43
43
  ElementEditorState,
44
44
  class_addProperty,
45
45
  } from '@finos/legend-studio';
46
- import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView';
47
- import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
48
- import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
49
- import type { PropertyHolderView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView';
46
+ import type { ClassView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js';
47
+ import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.js';
48
+ import { Diagram } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js';
49
+ import type { PropertyHolderView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.js';
50
50
 
51
51
  enum DIAGRAM_EDITOR_HOTKEY {
52
52
  RECENTER = 'RECENTER',
package/tsconfig.json CHANGED
@@ -12,14 +12,11 @@
12
12
  "declarationMap": true,
13
13
  "sourceMap": true,
14
14
  "target": "esnext",
15
- "module": "esnext",
15
+ "module": "nodenext",
16
16
  "skipLibCheck": true,
17
- "moduleResolution": "node",
18
17
  "resolveJsonModule": true,
19
18
  "isolatedModules": true,
20
19
  "importsNotUsedAsValues": "error",
21
- "esModuleInterop": true,
22
- "allowSyntheticDefaultImports": true,
23
20
  "strict": true,
24
21
  "noImplicitOverride": true,
25
22
  "noUncheckedIndexedAccess": true,
@@ -47,7 +44,7 @@
47
44
  "./src/graphManager/DSLDiagram_GraphManagerHelper.ts",
48
45
  "./src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts",
49
46
  "./src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts",
50
- "./src/helpers/DiagramHelper.ts",
47
+ "./src/helpers/DSLDiagram_Helper.ts",
51
48
  "./src/models/DSLDiagram_ModelUtils.ts",
52
49
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts",
53
50
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts",
@@ -56,12 +53,11 @@
56
53
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts",
57
54
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts",
58
55
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts",
59
- "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts",
60
56
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts",
57
+ "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipViewEnd.ts",
61
58
  "./src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point.ts",
62
59
  "./src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts",
63
60
  "./src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle.ts",
64
- "./src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts",
65
61
  "./src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts",
66
62
  "./src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_ClassView.ts",
67
63
  "./src/models/protocols/pure/v1/model/packageableElements/diagram/V1_DSLDiagram_Diagram.ts",
@@ -89,9 +85,7 @@
89
85
  "src/**/*.json"
90
86
  ],
91
87
  "exclude": [
92
- "src/**/__tests__/**/*.ts",
93
- "src/**/__tests__/**/*.tsx",
94
- "src/**/__mocks__/**/*.ts",
95
- "src/**/__mocks__/**/*.tsx"
88
+ "src/**/__tests__/**/*.*",
89
+ "src/**/__mocks__/**/*.*"
96
90
  ]
97
91
  }
@@ -12,14 +12,11 @@
12
12
  "declarationMap": true,
13
13
  "sourceMap": true,
14
14
  "target": "esnext",
15
- "module": "esnext",
15
+ "module": "nodenext",
16
16
  "skipLibCheck": true,
17
- "moduleResolution": "node",
18
17
  "resolveJsonModule": true,
19
18
  "isolatedModules": true,
20
19
  "importsNotUsedAsValues": "error",
21
- "esModuleInterop": true,
22
- "allowSyntheticDefaultImports": true,
23
20
  "strict": true,
24
21
  "noImplicitOverride": true,
25
22
  "noUncheckedIndexedAccess": true,
@@ -1 +0,0 @@
1
- {"version":3,"file":"DiagramHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/DiagramHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mFAAmF,CAAC;AACrH,OAAO,EAAE,KAAK,EAAE,MAAM,iFAAiF,CAAC;AAExG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4EAA4E,CAAC;AAC5G,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0EAA0E,CAAC;AAExG;;GAEG;AACH,eAAO,MAAM,kBAAkB,YAAa,WAAW,KAAG,KASzD,CAAC;AAEF,eAAO,MAAM,YAAY,YACd,OAAO,gBACF,MAAM,KACnB,SAAS,GAAG,SACwD,CAAC;AAExE,eAAO,MAAM,8BAA8B,YAChC,OAAO,SACT,SAAS,KACf,IAkCF,CAAC;AAEF,eAAO,MAAM,yBAAyB,qBAClB,gBAAgB,OAC7B,KAAK,EAAE,KACX,IAEF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,qBACvB,gBAAgB,KACjC,IA8CF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,qBACV,gBAAgB,KAC/B,MAAM,KACN,MAAM,QACH,MAAM,eACC,OAAO,KACnB,KAAK,GAAG,SA2CV,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_RelationshipEdgeView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,qBAAa,oBAAoB;IAC/B,SAAS,EAAE,kBAAkB,CAAC;IAC9B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEjB,SAAS,EAAE,kBAAkB;CAG1C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_RelationshipEdgeView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAqB;IAC9B;;;;OAIG;IACH,OAAO,CAAsB;IAC7B,OAAO,CAAsB;IAE7B,YAAY,SAA6B;QACvC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Copyright (c) 2020-present, Goldman Sachs
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import type { Point } from './DSLDiagram_Point';
17
- export declare class Vector {
18
- readonly x: number;
19
- readonly y: number;
20
- constructor(x: number, y: number);
21
- static fromPoints(a: Point, b: Point): Vector;
22
- unit(): Vector;
23
- normal(other: Vector): Vector;
24
- dotProduct(other: Vector): number;
25
- }
26
- //# sourceMappingURL=DSLDiagram_Vector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_Vector.d.ts","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,qBAAa,MAAM;IACjB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;gBAEP,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAKhC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,GAAG,MAAM;IAI7C,IAAI,IAAI,MAAM;IAKd,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAI7B,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAGlC"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Copyright (c) 2020-present, Goldman Sachs
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- export class Vector {
17
- x;
18
- y;
19
- constructor(x, y) {
20
- this.x = x;
21
- this.y = y;
22
- }
23
- static fromPoints(a, b) {
24
- return new Vector(b.x - a.x, b.y - a.y);
25
- }
26
- unit() {
27
- const norm = Math.sqrt(this.x * this.x + this.y * this.y);
28
- return new Vector(this.x / norm, this.y / norm);
29
- }
30
- normal(other) {
31
- return new Vector(other.y - this.y, -(other.x - this.x));
32
- }
33
- dotProduct(other) {
34
- return this.x * other.x + this.y * other.y;
35
- }
36
- }
37
- //# sourceMappingURL=DSLDiagram_Vector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_Vector.js","sourceRoot":"","sources":["../../../../../../../src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,OAAO,MAAM;IACR,CAAC,CAAS;IACV,CAAC,CAAS;IAEnB,YAAY,CAAS,EAAE,CAAS;QAC9B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACb,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,CAAQ,EAAE,CAAQ;QAClC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI;QACF,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAC1D,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,UAAU,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -1,44 +0,0 @@
1
- /**
2
- * Copyright (c) 2020-present, Goldman Sachs
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- import type { Point } from './DSLDiagram_Point';
18
-
19
- export class Vector {
20
- readonly x: number;
21
- readonly y: number;
22
-
23
- constructor(x: number, y: number) {
24
- this.x = x;
25
- this.y = y;
26
- }
27
-
28
- static fromPoints(a: Point, b: Point): Vector {
29
- return new Vector(b.x - a.x, b.y - a.y);
30
- }
31
-
32
- unit(): Vector {
33
- const norm = Math.sqrt(this.x * this.x + this.y * this.y);
34
- return new Vector(this.x / norm, this.y / norm);
35
- }
36
-
37
- normal(other: Vector): Vector {
38
- return new Vector(other.y - this.y, -(other.x - this.x));
39
- }
40
-
41
- dotProduct(other: Vector): number {
42
- return this.x * other.x + this.y * other.y;
43
- }
44
- }