@finos/legend-extension-dsl-diagram 1.0.27 → 1.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/lib/DiagramRenderer.d.ts +4 -1
  2. package/lib/DiagramRenderer.d.ts.map +1 -1
  3. package/lib/DiagramRenderer.js +63 -63
  4. package/lib/DiagramRenderer.js.map +1 -1
  5. package/lib/components/studio/ClassDiagramPreview.d.ts.map +1 -1
  6. package/lib/components/studio/ClassDiagramPreview.js +3 -1
  7. package/lib/components/studio/ClassDiagramPreview.js.map +1 -1
  8. package/lib/components/studio/DiagramEditor.d.ts.map +1 -1
  9. package/lib/components/studio/DiagramEditor.js +10 -9
  10. package/lib/components/studio/DiagramEditor.js.map +1 -1
  11. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts +2 -1
  12. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts.map +1 -1
  13. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +11 -0
  14. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
  15. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts +34 -0
  16. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.d.ts.map +1 -0
  17. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js +94 -0
  18. package/lib/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.js.map +1 -0
  19. package/lib/helpers/DiagramHelper.d.ts +16 -1
  20. package/lib/helpers/DiagramHelper.d.ts.map +1 -1
  21. package/lib/helpers/DiagramHelper.js +90 -3
  22. package/lib/helpers/DiagramHelper.js.map +1 -1
  23. package/lib/index.css +1 -1
  24. package/lib/index.d.ts +1 -1
  25. package/lib/index.d.ts.map +1 -1
  26. package/lib/index.js +1 -1
  27. package/lib/index.js.map +1 -1
  28. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.d.ts.map +1 -1
  29. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js +0 -4
  30. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.js.map +1 -1
  31. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts +0 -3
  32. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.d.ts.map +1 -1
  33. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +0 -20
  34. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  35. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts +0 -1
  36. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  37. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +1 -10
  38. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
  39. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +0 -12
  40. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  41. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +1 -56
  42. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  43. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +0 -3
  44. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
  45. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +0 -7
  46. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
  47. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +0 -4
  48. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
  49. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +0 -7
  50. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
  51. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts +6 -3
  52. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +1 -1
  53. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js +6 -14
  54. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +1 -1
  55. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +24 -23
  56. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
  57. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +57 -129
  58. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  59. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts +0 -8
  60. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  61. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +0 -19
  62. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  63. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +3 -3
  64. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +1 -1
  65. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +1 -1
  66. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +1 -1
  67. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  68. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +3 -3
  69. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  70. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +2 -2
  71. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
  72. package/lib/package.json +4 -4
  73. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts +57 -0
  74. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -0
  75. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js +94 -0
  76. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -0
  77. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  78. package/lib/stores/studio/DiagramEditorState.js +13 -10
  79. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  80. package/package.json +11 -11
  81. package/src/DiagramRenderer.ts +136 -72
  82. package/src/components/studio/ClassDiagramPreview.tsx +3 -1
  83. package/src/components/studio/DiagramEditor.tsx +17 -11
  84. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +17 -0
  85. package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +153 -0
  86. package/src/helpers/DiagramHelper.ts +126 -4
  87. package/src/index.ts +1 -4
  88. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +0 -6
  89. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +0 -23
  90. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +0 -13
  91. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +1 -64
  92. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +0 -11
  93. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +0 -17
  94. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts +6 -16
  95. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +71 -169
  96. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +0 -21
  97. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +3 -3
  98. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +6 -3
  99. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +4 -4
  100. package/src/stores/studio/DSLDiagram_GraphModifierHelper.ts +164 -0
  101. package/src/stores/studio/DiagramEditorState.ts +28 -9
  102. package/tsconfig.json +2 -0
@@ -13,7 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { computed, observable, action, makeObservable } from 'mobx';
17
16
  import { hashArray } from '@finos/legend-shared';
18
17
  import { PositionedRectangle } from './geometry/DSLDiagram_PositionedRectangle';
19
18
  import { Rectangle } from './geometry/DSLDiagram_Rectangle';
@@ -28,29 +27,10 @@ export class ClassView extends PositionedRectangle {
28
27
  hideStereotypes;
29
28
  constructor(owner, id, _class) {
30
29
  super(new Point(0, 0), new Rectangle(0, 0));
31
- makeObservable(this, {
32
- id: observable,
33
- hideProperties: observable,
34
- hideTaggedValues: observable,
35
- hideStereotypes: observable,
36
- setHideProperties: action,
37
- setHideStereotypes: action,
38
- setHideTaggedValues: action,
39
- hashCode: computed,
40
- });
41
30
  this.owner = owner;
42
31
  this.id = id;
43
32
  this.class = _class;
44
33
  }
45
- setHideProperties(val) {
46
- this.hideProperties = val;
47
- }
48
- setHideStereotypes(val) {
49
- this.hideStereotypes = val;
50
- }
51
- setHideTaggedValues(val) {
52
- this.hideTaggedValues = val;
53
- }
54
34
  get hashCode() {
55
35
  return hashArray([
56
36
  DIAGRAM_HASH_STRUCTURE.CLASS_VIEW,
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_ClassView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAG3E,MAAM,OAAO,SAAU,SAAQ,mBAAmB;IAChD,KAAK,CAAU;IACf,KAAK,CAAqC;IAC1C,EAAE,CAAS;IACX,cAAc,CAAuB;IACrC,gBAAgB,CAAuB;IACvC,eAAe,CAAuB;IAEtC,YACE,KAAc,EACd,EAAU,EACV,MAA0C;QAE1C,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAE5C,cAAc,CAAC,IAAI,EAAE;YACnB,EAAE,EAAE,UAAU;YACd,cAAc,EAAE,UAAU;YAC1B,gBAAgB,EAAE,UAAU;YAC5B,eAAe,EAAE,UAAU;YAC3B,iBAAiB,EAAE,MAAM;YACzB,kBAAkB,EAAE,MAAM;YAC1B,mBAAmB,EAAE,MAAM;YAC3B,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,iBAAiB,CAAC,GAAY;QAC5B,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;IAC5B,CAAC;IACD,kBAAkB,CAAC,GAAY;QAC7B,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC;IAC7B,CAAC;IACD,mBAAmB,CAAC,GAAY;QAC9B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC;IAC9B,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,sBAAsB,CAAC,UAAU;YACjC,KAAK,CAAC,QAAQ;YACd,IAAI,CAAC,EAAE;YACP,IAAI,CAAC,KAAK,CAAC,SAAS;YACpB,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE;YACvC,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDiagram_ClassView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAG3E,MAAM,OAAO,SAAU,SAAQ,mBAAmB;IAChD,KAAK,CAAU;IACf,KAAK,CAAqC;IAC1C,EAAE,CAAS;IACX,cAAc,CAAuB;IACrC,gBAAgB,CAAuB;IACvC,eAAe,CAAuB;IAEtC,YACE,KAAc,EACd,EAAU,EACV,MAA0C;QAE1C,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC;IACtB,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,sBAAsB,CAAC,UAAU;YACjC,KAAK,CAAC,QAAQ;YACd,IAAI,CAAC,EAAE;YACP,IAAI,CAAC,KAAK,CAAC,SAAS;YACpB,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrC,IAAI,CAAC,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE;YACvC,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE;SACvC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -20,7 +20,6 @@ export declare abstract class ClassViewReference extends ReferenceWithOwner {
20
20
  readonly ownerReference: PackageableElementReference<Diagram>;
21
21
  value: ClassView;
22
22
  protected constructor(ownerReference: PackageableElementReference<Diagram>, value: ClassView);
23
- setValue(value: ClassView): void;
24
23
  }
25
24
  export declare class ClassViewExplicitReference extends ClassViewReference {
26
25
  readonly ownerReference: PackageableElementExplicitReference<Diagram>;
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_ClassViewReference.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,kBAAkB,EAElB,KAAK,mCAAmC,EACxC,KAAK,2BAA2B,EACjC,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,kBAAmB,SAAQ,kBAAkB;IACjE,SAAkB,cAAc,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC;IAEjB,SAAS,aACP,cAAc,EAAE,2BAA2B,CAAC,OAAO,CAAC,EACpD,KAAK,EAAE,SAAS;IAalB,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;CAIjC;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,SAAkB,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;IAE/E,OAAO;IAQP,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,0BAA0B;CAG5D;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,SAAkB,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;IAE/E,OAAO;IAQP,MAAM,CAAC,MAAM,CACX,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,EAC5D,KAAK,EAAE,SAAS,GACf,0BAA0B;CAG9B"}
1
+ {"version":3,"file":"DSLDiagram_ClassViewReference.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,kBAAkB,EAClB,KAAK,mCAAmC,EACxC,KAAK,2BAA2B,EACjC,MAAM,qBAAqB,CAAC;AAE7B,8BAAsB,kBAAmB,SAAQ,kBAAkB;IACjE,SAAkB,cAAc,EAAE,2BAA2B,CAAC,OAAO,CAAC,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC;IAEjB,SAAS,aACP,cAAc,EAAE,2BAA2B,CAAC,OAAO,CAAC,EACpD,KAAK,EAAE,SAAS;CAMnB;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,SAAkB,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;IAE/E,OAAO;IAQP,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,0BAA0B;CAG5D;AAED,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,SAAkB,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,CAAC;IAE/E,OAAO;IAQP,MAAM,CAAC,MAAM,CACX,cAAc,EAAE,mCAAmC,CAAC,OAAO,CAAC,EAC5D,KAAK,EAAE,SAAS,GACf,0BAA0B;CAG9B"}
@@ -13,24 +13,15 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { observable, action, makeObservable } from 'mobx';
17
- import { PackageableElementExplicitReference, ReferenceWithOwner, setPackageableElementReferenceValue, } from '@finos/legend-graph';
16
+ import { PackageableElementExplicitReference, ReferenceWithOwner, } from '@finos/legend-graph';
18
17
  export class ClassViewReference extends ReferenceWithOwner {
19
18
  ownerReference;
20
19
  value;
21
20
  constructor(ownerReference, value) {
22
21
  super(ownerReference);
23
- makeObservable(this, {
24
- value: observable,
25
- setValue: action,
26
- });
27
22
  this.ownerReference = ownerReference;
28
23
  this.value = value;
29
24
  }
30
- setValue(value) {
31
- this.value = value;
32
- setPackageableElementReferenceValue(this.ownerReference, value.owner);
33
- }
34
25
  }
35
26
  export class ClassViewExplicitReference extends ClassViewReference {
36
27
  ownerReference;
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_ClassViewReference.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,EACL,mCAAmC,EACnC,kBAAkB,EAClB,mCAAmC,GAGpC,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAgB,kBAAmB,SAAQ,kBAAkB;IAC/C,cAAc,CAAuC;IACvE,KAAK,CAAY;IAEjB,YACE,cAAoD,EACpD,KAAgB;QAEhB,KAAK,CAAC,cAAc,CAAC,CAAC;QAEtB,cAAc,CAAC,IAAI,EAAE;YACnB,KAAK,EAAE,UAAU;YACjB,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,KAAgB;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,mCAAmC,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACxE,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC9C,cAAc,CAA+C;IAE/E,YAAoB,KAAgB;QAClC,MAAM,cAAc,GAAG,mCAAmC,CAAC,MAAM,CAC/D,KAAK,CAAC,KAAK,CACZ,CAAC;QACF,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC9C,cAAc,CAA+C;IAE/E,YACE,cAA4D,EAC5D,KAAgB;QAEhB,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAM,CACX,cAA4D,EAC5D,KAAgB;QAEhB,OAAO,IAAI,0BAA0B,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDiagram_ClassViewReference.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,mCAAmC,EACnC,kBAAkB,GAGnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAgB,kBAAmB,SAAQ,kBAAkB;IAC/C,cAAc,CAAuC;IACvE,KAAK,CAAY;IAEjB,YACE,cAAoD,EACpD,KAAgB;QAEhB,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC9C,cAAc,CAA+C;IAE/E,YAAoB,KAAgB;QAClC,MAAM,cAAc,GAAG,mCAAmC,CAAC,MAAM,CAC/D,KAAK,CAAC,KAAK,CACZ,CAAC;QACF,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAM,CAAC,KAAgB;QAC5B,OAAO,IAAI,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,kBAAkB;IAC9C,cAAc,CAA+C;IAE/E,YACE,cAA4D,EAC5D,KAAgB;QAEhB,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAC7B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,MAAM,CACX,cAA4D,EAC5D,KAAgB;QAEhB,OAAO,IAAI,0BAA0B,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC;CACF"}
@@ -24,18 +24,6 @@ export declare class Diagram extends PackageableElement implements Hashable {
24
24
  associationViews: AssociationView[];
25
25
  generalizationViews: GeneralizationView[];
26
26
  propertyViews: PropertyView[];
27
- constructor(name: string);
28
- setClassViews(val: ClassView[]): void;
29
- addClassView(val: ClassView): void;
30
- deleteClassView(val: ClassView): void;
31
- setAssociationViews(val: AssociationView[]): void;
32
- deleteAssociationView(val: AssociationView): void;
33
- setGeneralizationViews(val: GeneralizationView[]): void;
34
- addGeneralizationView(val: GeneralizationView): void;
35
- deleteGeneralizationView(val: GeneralizationView): void;
36
- setPropertyViews(val: PropertyView[]): void;
37
- addPropertyView(val: PropertyView): void;
38
- deletePropertyView(val: PropertyView): void;
39
27
  protected get _elementHashCode(): string;
40
28
  accept_PackageableElementVisitor<T>(visitor: PackageableElementVisitor<T>): T;
41
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_Diagram.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,OAAQ,SAAQ,kBAAmB,YAAW,QAAQ;IACjE,UAAU,EAAE,SAAS,EAAE,CAAM;IAC7B,gBAAgB,EAAE,eAAe,EAAE,CAAM;IACzC,mBAAmB,EAAE,kBAAkB,EAAE,CAAM;IAC/C,aAAa,EAAE,YAAY,EAAE,CAAM;gBAEvB,IAAI,EAAE,MAAM;IAuBxB,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI;IAGrC,YAAY,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;IAGlC,eAAe,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;IAGrC,mBAAmB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI;IAGjD,qBAAqB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAGjD,sBAAsB,CAAC,GAAG,EAAE,kBAAkB,EAAE,GAAG,IAAI;IAGvD,qBAAqB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAGpD,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,GAAG,IAAI;IAGvD,gBAAgB,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,IAAI;IAG3C,eAAe,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IAGxC,kBAAkB,CAAC,GAAG,EAAE,YAAY,GAAG,IAAI;IAI3C,cAAuB,gBAAgB,IAAI,MAAM,CAShD;IAED,gCAAgC,CAAC,CAAC,EAChC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,CAAC;CAGL"}
1
+ {"version":3,"file":"DSLDiagram_Diagram.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EACL,KAAK,yBAAyB,EAC9B,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B,qBAAa,OAAQ,SAAQ,kBAAmB,YAAW,QAAQ;IACjE,UAAU,EAAE,SAAS,EAAE,CAAM;IAC7B,gBAAgB,EAAE,eAAe,EAAE,CAAM;IACzC,mBAAmB,EAAE,kBAAkB,EAAE,CAAM;IAC/C,aAAa,EAAE,YAAY,EAAE,CAAM;IAEnC,cAAuB,gBAAgB,IAAI,MAAM,CAShD;IAED,gCAAgC,CAAC,CAAC,EAChC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,CAAC;CAGL"}
@@ -13,8 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { observable, action, makeObservable, override } from 'mobx';
17
- import { hashArray, addUniqueEntry, deleteEntry, } from '@finos/legend-shared';
16
+ import { hashArray } from '@finos/legend-shared';
18
17
  import { PackageableElement, } from '@finos/legend-graph';
19
18
  import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
20
19
  export class Diagram extends PackageableElement {
@@ -22,60 +21,6 @@ export class Diagram extends PackageableElement {
22
21
  associationViews = [];
23
22
  generalizationViews = [];
24
23
  propertyViews = [];
25
- constructor(name) {
26
- super(name);
27
- makeObservable(this, {
28
- classViews: observable,
29
- associationViews: observable,
30
- generalizationViews: observable,
31
- propertyViews: observable,
32
- setClassViews: action,
33
- addClassView: action,
34
- deleteClassView: action,
35
- setAssociationViews: action,
36
- deleteAssociationView: action,
37
- setGeneralizationViews: action,
38
- addGeneralizationView: action,
39
- deleteGeneralizationView: action,
40
- setPropertyViews: action,
41
- addPropertyView: action,
42
- deletePropertyView: action,
43
- _elementHashCode: override,
44
- });
45
- }
46
- setClassViews(val) {
47
- this.classViews = val;
48
- }
49
- addClassView(val) {
50
- addUniqueEntry(this.classViews, val);
51
- }
52
- deleteClassView(val) {
53
- deleteEntry(this.classViews, val);
54
- }
55
- setAssociationViews(val) {
56
- this.associationViews = val;
57
- }
58
- deleteAssociationView(val) {
59
- deleteEntry(this.associationViews, val);
60
- }
61
- setGeneralizationViews(val) {
62
- this.generalizationViews = val;
63
- }
64
- addGeneralizationView(val) {
65
- addUniqueEntry(this.generalizationViews, val);
66
- }
67
- deleteGeneralizationView(val) {
68
- deleteEntry(this.generalizationViews, val);
69
- }
70
- setPropertyViews(val) {
71
- this.propertyViews = val;
72
- }
73
- addPropertyView(val) {
74
- addUniqueEntry(this.propertyViews, val);
75
- }
76
- deletePropertyView(val) {
77
- deleteEntry(this.propertyViews, val);
78
- }
79
24
  get _elementHashCode() {
80
25
  return hashArray([
81
26
  DIAGRAM_HASH_STRUCTURE.DIAGRAM,
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_Diagram.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"DSLDiagram_Diagram.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAKhE,OAAO,EAEL,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,OAAO,OAAQ,SAAQ,kBAAkB;IAC7C,UAAU,GAAgB,EAAE,CAAC;IAC7B,gBAAgB,GAAsB,EAAE,CAAC;IACzC,mBAAmB,GAAyB,EAAE,CAAC;IAC/C,aAAa,GAAmB,EAAE,CAAC;IAEnC,IAAuB,gBAAgB;QACrC,OAAO,SAAS,CAAC;YACf,sBAAsB,CAAC,OAAO;YAC9B,IAAI,CAAC,IAAI;YACT,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1B,0BAA0B;YAC1B,SAAS,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACnC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;IAED,gCAAgC,CAC9B,OAAqC;QAErC,OAAO,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
@@ -15,10 +15,7 @@
15
15
  */
16
16
  import { type Hashable } from '@finos/legend-shared';
17
17
  import { RelationshipView } from './DSLDiagram_RelationshipView';
18
- import type { Diagram } from './DSLDiagram_Diagram';
19
- import type { ClassView } from './DSLDiagram_ClassView';
20
18
  export declare class GeneralizationView extends RelationshipView implements Hashable {
21
- constructor(owner: Diagram, from: ClassView, to: ClassView);
22
19
  get hashCode(): string;
23
20
  }
24
21
  //# sourceMappingURL=DSLDiagram_GeneralizationView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_GeneralizationView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGxD,qBAAa,kBAAmB,SAAQ,gBAAiB,YAAW,QAAQ;gBAC9D,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAQ1D,IAAa,QAAQ,IAAI,MAAM,CAK9B;CACF"}
1
+ {"version":3,"file":"DSLDiagram_GeneralizationView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,qBAAa,kBAAmB,SAAQ,gBAAiB,YAAW,QAAQ;IAC1E,IAAa,QAAQ,IAAI,MAAM,CAK9B;CACF"}
@@ -13,17 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { computed, makeObservable } from 'mobx';
17
16
  import { hashArray } from '@finos/legend-shared';
18
17
  import { RelationshipView } from './DSLDiagram_RelationshipView';
19
18
  import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
20
19
  export class GeneralizationView extends RelationshipView {
21
- constructor(owner, from, to) {
22
- super(owner, from, to);
23
- makeObservable(this, {
24
- hashCode: computed,
25
- });
26
- }
27
20
  get hashCode() {
28
21
  return hashArray([
29
22
  DIAGRAM_HASH_STRUCTURE.GENERALIZATION_VIEW,
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_GeneralizationView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IACtD,YAAY,KAAc,EAAE,IAAe,EAAE,EAAa;QACxD,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAEvB,cAAc,CAAC,IAAI,EAAE;YACnB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,sBAAsB,CAAC,mBAAmB;YAC1C,KAAK,CAAC,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDiagram_GeneralizationView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,OAAO,kBAAmB,SAAQ,gBAAgB;IACtD,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC;YACf,sBAAsB,CAAC,mBAAmB;YAC1C,KAAK,CAAC,QAAQ;SACf,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -15,11 +15,7 @@
15
15
  */
16
16
  import { type Hashable } from '@finos/legend-shared';
17
17
  import { PropertyHolderView } from './DSLDiagram_PropertyHolderView';
18
- import type { Diagram } from './DSLDiagram_Diagram';
19
- import type { ClassView } from './DSLDiagram_ClassView';
20
- import type { PropertyReference } from '@finos/legend-graph';
21
18
  export declare class PropertyView extends PropertyHolderView implements Hashable {
22
- constructor(owner: Diagram, property: PropertyReference, from: ClassView, to: ClassView);
23
19
  get hashCode(): string;
24
20
  }
25
21
  //# sourceMappingURL=DSLDiagram_PropertyView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_PropertyView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,qBAAa,YAAa,SAAQ,kBAAmB,YAAW,QAAQ;gBAEpE,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,SAAS;IASf,IAAa,QAAQ,IAAI,MAAM,CAE9B;CACF"}
1
+ {"version":3,"file":"DSLDiagram_PropertyView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,qBAAa,YAAa,SAAQ,kBAAmB,YAAW,QAAQ;IACtE,IAAa,QAAQ,IAAI,MAAM,CAE9B;CACF"}
@@ -13,17 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { computed, makeObservable } from 'mobx';
17
16
  import { hashArray } from '@finos/legend-shared';
18
17
  import { PropertyHolderView } from './DSLDiagram_PropertyHolderView';
19
18
  import { DIAGRAM_HASH_STRUCTURE } from '../../../../DSLDiagram_ModelUtils';
20
19
  export class PropertyView extends PropertyHolderView {
21
- constructor(owner, property, from, to) {
22
- super(owner, property, from, to);
23
- makeObservable(this, {
24
- hashCode: computed,
25
- });
26
- }
27
20
  get hashCode() {
28
21
  return hashArray([DIAGRAM_HASH_STRUCTURE.PROPERTY_VIEW, super.hashCode]);
29
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_PropertyView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAIrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,OAAO,YAAa,SAAQ,kBAAkB;IAClD,YACE,KAAc,EACd,QAA2B,EAC3B,IAAe,EACf,EAAa;QAEb,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAEjC,cAAc,CAAC,IAAI,EAAE;YACnB,QAAQ,EAAE,QAAQ;SACnB,CAAC,CAAC;IACL,CAAC;IAED,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC,CAAC,sBAAsB,CAAC,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDiagram_PropertyView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAiB,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,MAAM,OAAO,YAAa,SAAQ,kBAAkB;IAClD,IAAa,QAAQ;QACnB,OAAO,SAAS,CAAC,CAAC,sBAAsB,CAAC,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -14,12 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { ClassViewReference } from './DSLDiagram_ClassViewReference';
17
- export declare class RelationShipEdgeView {
17
+ export declare class RelationshipEdgeView {
18
18
  classView: ClassViewReference;
19
+ /**
20
+ * Offsets from the center of the class view.
21
+ *
22
+ * These offsets can be used to compute the end points of relationship views.
23
+ */
19
24
  offsetX?: number | undefined;
20
25
  offsetY?: number | undefined;
21
26
  constructor(classView: ClassViewReference);
22
- setOffsetX(val: number): void;
23
- setOffsetY(val: number): void;
24
27
  }
25
28
  //# sourceMappingURL=DSLDiagram_RelationshipEdgeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_RelationshipEdgeView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,qBAAa,oBAAoB;IAC/B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEjB,SAAS,EAAE,kBAAkB;IAWzC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAG7B,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAG9B"}
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"}
@@ -13,25 +13,17 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { observable, action, makeObservable } from 'mobx';
17
- export class RelationShipEdgeView {
16
+ export class RelationshipEdgeView {
18
17
  classView;
18
+ /**
19
+ * Offsets from the center of the class view.
20
+ *
21
+ * These offsets can be used to compute the end points of relationship views.
22
+ */
19
23
  offsetX;
20
24
  offsetY;
21
25
  constructor(classView) {
22
- makeObservable(this, {
23
- offsetX: observable,
24
- offsetY: observable,
25
- setOffsetX: action,
26
- setOffsetY: action,
27
- });
28
26
  this.classView = classView;
29
27
  }
30
- setOffsetX(val) {
31
- this.offsetX = val;
32
- }
33
- setOffsetY(val) {
34
- this.offsetY = val;
35
- }
36
28
  }
37
29
  //# sourceMappingURL=DSLDiagram_RelationshipEdgeView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_RelationshipEdgeView.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAG1D,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAqB;IAC9B,OAAO,CAAsB;IAC7B,OAAO,CAAsB;IAE7B,YAAY,SAA6B;QACvC,cAAc,CAAC,IAAI,EAAE;YACnB,OAAO,EAAE,UAAU;YACnB,OAAO,EAAE,UAAU;YACnB,UAAU,EAAE,MAAM;YAClB,UAAU,EAAE,MAAM;SACnB,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,UAAU,CAAC,GAAW;QACpB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACrB,CAAC;IACD,UAAU,CAAC,GAAW;QACpB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACrB,CAAC;CACF"}
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"}
@@ -14,46 +14,47 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { type Hashable } from '@finos/legend-shared';
17
- import { RelationShipEdgeView as RelationshipEdgeView } from './DSLDiagram_RelationshipEdgeView';
17
+ import { RelationshipEdgeView } from './DSLDiagram_RelationshipEdgeView';
18
18
  import { Point } from './geometry/DSLDiagram_Point';
19
19
  import type { ClassView } from './DSLDiagram_ClassView';
20
20
  import type { Diagram } from './DSLDiagram_Diagram';
21
- /**
22
- * For a path, only counts the points which lie outside of the 2 class views
23
- */
24
- export declare const manageInsidePointsDynamically: (path: Point[], from: ClassView, to: ClassView) => Point[];
25
21
  export declare class RelationshipView implements Hashable {
26
22
  owner: Diagram;
27
23
  from: RelationshipEdgeView;
28
24
  to: RelationshipEdgeView;
29
- path: Point[];
30
- constructor(owner: Diagram, from: ClassView, to: ClassView);
31
- setPath(val: Point[]): void;
32
- changePoint(val: Point, newVal: Point): void;
33
25
  /**
34
- * Compute the full path for an edge, but notice here that the end points are recomputed every time, as such
35
- * `path` only stores point that matters to the edge but are not end points
26
+ * NOTE: Unlike in the protocol model, we don't store the end points in the path but only store the
27
+ * offsets of that point from the center of the end/start classviews. The main purpose here is to
28
+ * make less error. We don't need to bother maintaining these points in the path. They are
29
+ * auto-managed. Even if an erroneous path is set (e.g. an empty list of points), this logic
30
+ * that we have will rectify that and create a sensible path.
31
+ *
32
+ * In exchange, this logic is a little complicated, we have tried to document as much about it as we could
33
+ * but the logic is not straight forward. Perhaps, we could simplify this in the future.
36
34
  */
37
- buildFullPath(allowChange?: boolean): Point[];
35
+ path: Point[];
36
+ constructor(owner: Diagram, from: ClassView, to: ClassView);
38
37
  /**
39
- * This method will compute the full path from the offset within class view for persistence purpose
38
+ * Calculate the end points of the edge using offset, otherwise, use the center
40
39
  */
41
- get fullPath(): Point[];
40
+ private computeEdgeEndpoint;
42
41
  /**
43
- * Flatten the path if the angle is wide enough
44
- * Also `swallow` points in path which lie inside of the rectangle of a view
42
+ * Compute the full path for the relationship view (including the ends even if these
43
+ * ends lie inside of the classviews)
44
+ *
45
+ * Notice here that the end points are recomputed every time, as such
46
+ * `path` only stores point that matters to the edge but are not end points
45
47
  */
46
- possiblyFlattenPath(): void;
48
+ buildFullPath(allowChange?: boolean): Point[];
47
49
  /**
48
- * Based on the location, find the point on the path that matches or create new point
49
- * (within a threshold of proximity) from the coordinate and put this in the path array
50
- * so it doesn't look too weird
50
+ * For a path, only keep **at most** 1 point at each end that lies inside the class view.
51
+ * If there is no inside points, none of kept, so the path only contains outside points.
51
52
  */
52
- findOrBuildPoint(x: number, y: number, zoom: number, allowChange?: boolean): Point | undefined;
53
+ static pruneUnnecessaryInsidePoints: (path: Point[], from: ClassView, to: ClassView) => Point[];
53
54
  /**
54
- * Calculate the end points of the edge using offset, otherwise, use the center
55
+ * This method will compute the full path from the offset within class view for serialization and persistence purpose
55
56
  */
56
- private computeEdgeEndpoint;
57
+ get pathForSerialization(): Point[];
57
58
  get hashCode(): string;
58
59
  }
59
60
  //# sourceMappingURL=DSLDiagram_RelationshipView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_RelationshipView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIpD;;GAEG;AACH,eAAO,MAAM,6BAA6B,SAClC,KAAK,EAAE,QACP,SAAS,MACX,SAAS,KACZ,KAAK,EAsBP,CAAC;AAEF,qBAAa,gBAAiB,YAAW,QAAQ;IAC/C,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,oBAAoB,CAAC;IAC3B,EAAE,EAAE,oBAAoB,CAAC;IAGzB,IAAI,EAAE,KAAK,EAAE,CAAM;gBAEP,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAe1D,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI;IAG3B,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,IAAI;IAI5C;;;OAGG;IACH,aAAa,CAAC,WAAW,UAAO,GAAG,KAAK,EAAE;IAQ1C;;OAEG;IACH,IAAI,QAAQ,IAAI,KAAK,EAAE,CAMtB;IAED;;;OAGG;IACH,mBAAmB,IAAI,IAAI;IA6C3B;;;;OAIG;IACH,gBAAgB,CACd,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,EACZ,WAAW,UAAO,GACjB,KAAK,GAAG,SAAS;IA0CpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B,IAAI,QAAQ,IAAI,MAAM,CAOrB;CACF"}
1
+ {"version":3,"file":"DSLDiagram_RelationshipView.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIpD,qBAAa,gBAAiB,YAAW,QAAQ;IAC/C,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,oBAAoB,CAAC;IAC3B,EAAE,EAAE,oBAAoB,CAAC;IACzB;;;;;;;;;OASG;IACH,IAAI,EAAE,KAAK,EAAE,CAAM;gBAEP,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS;IAQ1D;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;OAMG;IACH,aAAa,CAAC,WAAW,UAAO,GAAG,KAAK,EAAE;IAQ1C;;;OAGG;IACH,MAAM,CAAC,4BAA4B,SAC3B,KAAK,EAAE,QACP,SAAS,MACX,SAAS,KACZ,KAAK,EAAE,CA6BR;IAEF;;OAEG;IACH,IAAI,oBAAoB,IAAI,KAAK,EAAE,CAMlC;IAED,IAAI,QAAQ,IAAI,MAAM,CAOrB;CACF"}