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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/lib/DiagramRenderer.d.ts +4 -1
  2. package/lib/DiagramRenderer.d.ts.map +1 -1
  3. package/lib/DiagramRenderer.js +21 -23
  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 +2 -2
  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 +87 -1
  22. package/lib/helpers/DiagramHelper.js.map +1 -1
  23. package/lib/index.css +1 -1
  24. package/lib/index.d.ts +0 -1
  25. package/lib/index.d.ts.map +1 -1
  26. package/lib/index.js +0 -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.map +1 -1
  32. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js +0 -8
  33. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.js.map +1 -1
  34. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.d.ts.map +1 -1
  35. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js +0 -4
  36. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.js.map +1 -1
  37. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts +0 -1
  38. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.d.ts.map +1 -1
  39. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js +0 -11
  40. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.js.map +1 -1
  41. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts +0 -3
  42. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.d.ts.map +1 -1
  43. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js +0 -7
  44. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.js.map +1 -1
  45. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts +0 -4
  46. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.d.ts.map +1 -1
  47. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js +0 -7
  48. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.js.map +1 -1
  49. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts +6 -1
  50. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.d.ts.map +1 -1
  51. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js +6 -6
  52. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.js.map +1 -1
  53. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts +24 -6
  54. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.d.ts.map +1 -1
  55. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js +58 -27
  56. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.js.map +1 -1
  57. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.d.ts.map +1 -1
  58. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js +0 -4
  59. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.js.map +1 -1
  60. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts +3 -3
  61. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.d.ts.map +1 -1
  62. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js +1 -1
  63. package/lib/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.js.map +1 -1
  64. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.d.ts.map +1 -1
  65. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js +3 -4
  66. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.js.map +1 -1
  67. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js +2 -2
  68. package/lib/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.js.map +1 -1
  69. package/lib/package.json +2 -2
  70. package/lib/stores/studio/{DSLDiagram_ModifierHelper.d.ts → DSLDiagram_GraphModifierHelper.d.ts} +10 -7
  71. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.d.ts.map +1 -0
  72. package/lib/stores/studio/{DSLDiagram_ModifierHelper.js → DSLDiagram_GraphModifierHelper.js} +20 -13
  73. package/lib/stores/studio/DSLDiagram_GraphModifierHelper.js.map +1 -0
  74. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  75. package/lib/stores/studio/DiagramEditorState.js +10 -7
  76. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  77. package/package.json +9 -9
  78. package/src/DiagramRenderer.ts +31 -34
  79. package/src/components/studio/ClassDiagramPreview.tsx +3 -1
  80. package/src/components/studio/DiagramEditor.tsx +2 -1
  81. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +17 -0
  82. package/src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts +153 -0
  83. package/src/helpers/DiagramHelper.ts +122 -1
  84. package/src/index.ts +0 -1
  85. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts +0 -6
  86. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassView.ts +0 -10
  87. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts +0 -6
  88. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts +0 -13
  89. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts +0 -11
  90. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts +0 -17
  91. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts +6 -7
  92. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView.ts +77 -34
  93. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle.ts +0 -5
  94. package/src/models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Vector.ts +3 -3
  95. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts +6 -4
  96. package/src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts +4 -4
  97. package/src/stores/studio/{DSLDiagram_ModifierHelper.ts → DSLDiagram_GraphModifierHelper.ts} +34 -18
  98. package/src/stores/studio/DiagramEditorState.ts +26 -7
  99. package/tsconfig.json +2 -2
  100. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts +0 -35
  101. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.d.ts.map +0 -1
  102. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js +0 -118
  103. package/lib/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.js.map +0 -1
  104. package/lib/stores/studio/DSLDiagram_ModifierHelper.d.ts.map +0 -1
  105. package/lib/stores/studio/DSLDiagram_ModifierHelper.js.map +0 -1
  106. package/src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts +0 -165
@@ -17,8 +17,8 @@
17
17
  import type { Point } from './DSLDiagram_Point';
18
18
 
19
19
  export class Vector {
20
- x: number;
21
- y: number;
20
+ readonly x: number;
21
+ readonly y: number;
22
22
 
23
23
  constructor(x: number, y: number) {
24
24
  this.x = x;
@@ -29,7 +29,7 @@ export class Vector {
29
29
  return new Vector(b.x - a.x, b.y - a.y);
30
30
  }
31
31
 
32
- norm(): Vector {
32
+ unit(): Vector {
33
33
  const norm = Math.sqrt(this.x * this.x + this.y * this.y);
34
34
  return new Vector(this.x / norm, this.y / norm);
35
35
  }
@@ -35,8 +35,10 @@ import type { V1_Point } from '../../model/packageableElements/diagram/geometry/
35
35
  import type { V1_Rectangle } from '../../model/packageableElements/diagram/geometry/V1_DSLDiagram_Rectangle';
36
36
  import type { V1_PropertyView } from '../../model/packageableElements/diagram/V1_DSLDiagram_PropertyView';
37
37
  import type { V1_GeneralizationView } from '../../model/packageableElements/diagram/V1_DSLDiagram_GeneralizationView';
38
- import { getClassView } from '../../../../../../helpers/DiagramHelper';
39
- import { _relationView_possiblyFlattenPath } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
38
+ import {
39
+ getClassView,
40
+ _relationshipView_simplifyPath,
41
+ } from '../../../../../../helpers/DiagramHelper';
40
42
 
41
43
  const buildPoint = (point: V1_Point): Point => {
42
44
  const x = guaranteeNonNullable(point.x, `Point 'x' coordinate is missing`);
@@ -116,7 +118,7 @@ export const V1_buildPropertyView = (
116
118
  targetClassView,
117
119
  );
118
120
  view.path = propertyView.line.points.map((point) => buildPoint(point));
119
- _relationView_possiblyFlattenPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
121
+ _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
120
122
  return view;
121
123
  };
122
124
 
@@ -142,7 +144,7 @@ export const V1_buildGeneralizationView = (
142
144
  targetClassView,
143
145
  );
144
146
  view.path = generalizationView.line.points.map((point) => buildPoint(point));
145
- _relationView_possiblyFlattenPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
147
+ _relationshipView_simplifyPath(view); // transform the line because we store only 2 end points that are inside points and we will calculate the offset
146
148
  return view;
147
149
  };
148
150
 
@@ -18,7 +18,7 @@ import type { ClassView } from '../../../../../metamodels/pure/packageableElemen
18
18
  import type { Diagram } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
19
19
  import type { GeneralizationView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
20
20
  import type { PropertyView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
21
- import type { RelationShipEdgeView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
21
+ import type { RelationshipEdgeView } from '../../../../../metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
22
22
  import { V1_Point } from '../../model/packageableElements/diagram/geometry/V1_DSLDiagram_Point';
23
23
  import { V1_ClassView } from '../../model/packageableElements/diagram/V1_DSLDiagram_ClassView';
24
24
  import { V1_Diagram } from '../../model/packageableElements/diagram/V1_DSLDiagram_Diagram';
@@ -32,7 +32,7 @@ import {
32
32
  V1_transformPropertyReference,
33
33
  } from '@finos/legend-graph';
34
34
 
35
- const relationshipEdgeViewTransformer = (value: RelationShipEdgeView): string =>
35
+ const relationshipEdgeViewTransformer = (value: RelationshipEdgeView): string =>
36
36
  value.classView.value.id;
37
37
 
38
38
  const createRectangle = (height: number, width: number): V1_Rectangle => {
@@ -52,7 +52,7 @@ const createPoint = (x: number, y: number): V1_Point => {
52
52
  const transformPropertyView = (element: PropertyView): V1_PropertyView => {
53
53
  const view = new V1_PropertyView();
54
54
  const line = new V1_Line();
55
- line.points = element.fullPath;
55
+ line.points = element.pathForSerialization;
56
56
  view.line = line;
57
57
  view.property = V1_transformPropertyReference(element.property);
58
58
  view.sourceView = relationshipEdgeViewTransformer(element.from);
@@ -65,7 +65,7 @@ const transformGenerationView = (
65
65
  ): V1_GeneralizationView => {
66
66
  const view = new V1_GeneralizationView();
67
67
  const line = new V1_Line();
68
- line.points = element.fullPath;
68
+ line.points = element.pathForSerialization;
69
69
  view.line = line;
70
70
  view.sourceView = relationshipEdgeViewTransformer(element.from);
71
71
  view.targetView = relationshipEdgeViewTransformer(element.to);
@@ -22,24 +22,30 @@ import type { Diagram } from '../../models/metamodels/pure/packageableElements/d
22
22
  import type { GeneralizationView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView';
23
23
  import {
24
24
  _findOrBuildPoint,
25
- _relationView_possiblyFlattenPath,
26
- _relationView_setPath,
27
- } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper';
25
+ _relationshipView_simplifyPath,
26
+ _relationshipView_setPath,
27
+ } from '../../helpers/DiagramHelper';
28
28
  import type { PropertyView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView';
29
- import type { RelationShipEdgeView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
29
+ import type { RelationshipEdgeView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView';
30
30
  import type { RelationshipView } from '../../models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipView';
31
31
  import type { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
32
32
  import type { PositionedRectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
33
33
  import type { Rectangle } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Rectangle';
34
+ import {
35
+ observe_AssociationView,
36
+ observe_ClassView,
37
+ observe_GeneralizationView,
38
+ observe_PropertyView,
39
+ } from '../../graphManager/action/changeDetection/DSLDiagram_ObserverHelper';
34
40
 
35
41
  export const diagram_setClassViews = action(
36
42
  (diagram: Diagram, val: ClassView[]): void => {
37
- diagram.classViews = val;
43
+ diagram.classViews = val.map(observe_ClassView);
38
44
  },
39
45
  );
40
46
  export const diagram_addClassView = action(
41
47
  (diagram: Diagram, val: ClassView): void => {
42
- addUniqueEntry(diagram.classViews, val);
48
+ addUniqueEntry(diagram.classViews, observe_ClassView(val));
43
49
  },
44
50
  );
45
51
  export const diagram_deleteClassView = action(
@@ -49,7 +55,7 @@ export const diagram_deleteClassView = action(
49
55
  );
50
56
  export const diagram_setAssociationViews = action(
51
57
  (diagram: Diagram, val: AssociationView[]): void => {
52
- diagram.associationViews = val;
58
+ diagram.associationViews = val.map(observe_AssociationView);
53
59
  },
54
60
  );
55
61
  export const diagram_deleteAssociationView = action(
@@ -59,12 +65,15 @@ export const diagram_deleteAssociationView = action(
59
65
  );
60
66
  export const diagram_setGeneralizationViews = action(
61
67
  (diagram: Diagram, val: GeneralizationView[]): void => {
62
- diagram.generalizationViews = val;
68
+ diagram.generalizationViews = val.map(observe_GeneralizationView);
63
69
  },
64
70
  );
65
71
  export const diagram_addGeneralizationView = action(
66
72
  (diagram: Diagram, val: GeneralizationView): void => {
67
- addUniqueEntry(diagram.generalizationViews, val);
73
+ addUniqueEntry(
74
+ diagram.generalizationViews,
75
+ observe_GeneralizationView(val),
76
+ );
68
77
  },
69
78
  );
70
79
  export const diagram_deleteGeneralizationView = action(
@@ -74,12 +83,12 @@ export const diagram_deleteGeneralizationView = action(
74
83
  );
75
84
  export const diagram_setPropertyViews = action(
76
85
  (diagram: Diagram, val: PropertyView[]): void => {
77
- diagram.propertyViews = val;
86
+ diagram.propertyViews = val.map(observe_PropertyView);
78
87
  },
79
88
  );
80
89
  export const diagram_addPropertyView = action(
81
90
  (diagram: Diagram, val: PropertyView): void => {
82
- addUniqueEntry(diagram.propertyViews, val);
91
+ addUniqueEntry(diagram.propertyViews, observe_PropertyView(val));
83
92
  },
84
93
  );
85
94
  export const diagram_deletePropertyView = action(
@@ -103,34 +112,38 @@ export const classView_setHideTaggedValues = action(
103
112
  cv.hideTaggedValues = val;
104
113
  },
105
114
  );
106
- export const relationShipEdgeView_setOffsetX = action(
107
- (r: RelationShipEdgeView, val: number): void => {
115
+ export const relationshipEdgeView_setOffsetX = action(
116
+ (r: RelationshipEdgeView, val: number): void => {
108
117
  r.offsetX = val;
109
118
  },
110
119
  );
111
- export const relationShipEdgeView_setOffsetY = action(
112
- (r: RelationShipEdgeView, val: number): void => {
120
+ export const relationshipEdgeView_setOffsetY = action(
121
+ (r: RelationshipEdgeView, val: number): void => {
113
122
  r.offsetY = val;
114
123
  },
115
124
  );
116
125
 
126
+ // To optimize performance we will not observe point (path)
117
127
  export const relationshipView_changePoint = action(
118
128
  (v: RelationshipView, val: Point, newVal: Point): void => {
119
129
  changeEntry(v.path, val, newVal);
120
130
  },
121
131
  );
122
- export const relationView_possiblyFlattenPath = action(
123
- _relationView_possiblyFlattenPath,
132
+ export const relationshipView_simplifyPath = action(
133
+ _relationshipView_simplifyPath,
124
134
  );
125
135
 
126
136
  export const findOrBuildPoint = action(_findOrBuildPoint);
127
- export const relationView_setPath = action(_relationView_setPath);
137
+ export const relationshipView_setPath = action(_relationshipView_setPath);
128
138
 
139
+ // To optimize performance we will not observe rectangle
129
140
  export const positionedRectangle_setRectangle = action(
130
141
  (pR: PositionedRectangle, value: Rectangle): void => {
131
142
  pR.rectangle = value;
132
143
  },
133
144
  );
145
+
146
+ // To optimize performance we will not observe point (path)
134
147
  export const positionedRectangle_setPosition = action(
135
148
  (pR: PositionedRectangle, value: Point): void => {
136
149
  pR.position = value;
@@ -140,6 +153,9 @@ export const positionedRectangle_setPosition = action(
140
153
  * NOTE: Having `position` and `rectangle` as observables compromises the performance of diagram
141
154
  * so we want to have a way to refresh the hash for change detection to pick up new hash when we resize
142
155
  * the class view box or move it.
156
+ *
157
+ * We should re-consider the usefulness of this method, maybe it's more worthwhile to recompute hash
158
+ * for the whole diagram instead?
143
159
  */
144
160
  export const positionedRectangle_forceRefreshHash = action(
145
161
  (pR: PositionedRectangle): void => {
@@ -275,18 +275,24 @@ export class DiagramEditorState extends ElementEditorState {
275
275
  return 'diagram-editor__cursor--resize';
276
276
  } else if (this.renderer.mouseOverClassProperty) {
277
277
  return this.isReadOnly ||
278
- this.renderer.mouseOverClassProperty.owner.isReadOnly
278
+ this.editorStore.graphManagerState.isElementReadOnly(
279
+ this.renderer.mouseOverClassProperty.owner,
280
+ )
279
281
  ? 'diagram-editor__cursor--not-allowed'
280
282
  : 'diagram-editor__cursor--text';
281
283
  } else if (this.renderer.mouseOverPropertyHolderViewLabel) {
282
284
  return this.isReadOnly ||
283
- this.renderer.mouseOverPropertyHolderViewLabel.property.value.owner
284
- .isReadOnly
285
+ this.editorStore.graphManagerState.isElementReadOnly(
286
+ this.renderer.mouseOverPropertyHolderViewLabel.property.value
287
+ .owner,
288
+ )
285
289
  ? 'diagram-editor__cursor--not-allowed'
286
290
  : 'diagram-editor__cursor--text';
287
291
  } else if (this.renderer.mouseOverClassName) {
288
292
  return this.isReadOnly ||
289
- this.renderer.mouseOverClassName.class.value.isReadOnly
293
+ this.editorStore.graphManagerState.isElementReadOnly(
294
+ this.renderer.mouseOverClassName.class.value,
295
+ )
290
296
  ? 'diagram-editor__cursor--not-allowed'
291
297
  : 'diagram-editor__cursor--text';
292
298
  } else if (this.renderer.mouseOverClassView) {
@@ -375,7 +381,12 @@ export class DiagramEditorState extends ElementEditorState {
375
381
  classView: ClassView,
376
382
  point: Point,
377
383
  ): void => {
378
- if (!this.isReadOnly && !classView.class.value.isReadOnly) {
384
+ if (
385
+ !this.isReadOnly &&
386
+ !this.editorStore.graphManagerState.isElementReadOnly(
387
+ classView.class.value,
388
+ )
389
+ ) {
379
390
  this.setInlineClassRenamerState(
380
391
  new DiagramEditorInlineClassRenamerState(this, classView, point),
381
392
  );
@@ -386,7 +397,10 @@ export class DiagramEditorState extends ElementEditorState {
386
397
  point: Point,
387
398
  propertyHolderView: PropertyHolderView | undefined,
388
399
  ): void => {
389
- if (!this.isReadOnly && !property.owner.isReadOnly) {
400
+ if (
401
+ !this.isReadOnly &&
402
+ !this.editorStore.graphManagerState.isElementReadOnly(property.owner)
403
+ ) {
390
404
  this.setInlinePropertyEditorState(
391
405
  new DiagramEditorInlinePropertyEditorState(
392
406
  this,
@@ -400,7 +414,12 @@ export class DiagramEditorState extends ElementEditorState {
400
414
  this.renderer.onClassPropertyDoubleClick = editProperty;
401
415
  this.renderer.handleEditProperty = editProperty;
402
416
  this.renderer.handleAddSimpleProperty = (classView: ClassView): void => {
403
- if (!this.isReadOnly && !classView.class.value.isReadOnly) {
417
+ if (
418
+ !this.isReadOnly &&
419
+ !this.editorStore.graphManagerState.isElementReadOnly(
420
+ classView.class.value,
421
+ )
422
+ ) {
404
423
  const _class = classView.class.value;
405
424
  class_addProperty(
406
425
  _class,
package/tsconfig.json CHANGED
@@ -44,6 +44,7 @@
44
44
  "./src/graph/DSLDiagram_PureGraphPlugin.ts",
45
45
  "./src/graphManager/DSLDiagram_GraphManagerHelper.ts",
46
46
  "./src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts",
47
+ "./src/graphManager/action/changeDetection/DSLDiagram_ObserverHelper.ts",
47
48
  "./src/helpers/DiagramHelper.ts",
48
49
  "./src/models/DSLDiagram_ModelUtils.ts",
49
50
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_AssociationView.ts",
@@ -51,7 +52,6 @@
51
52
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_ClassViewReference.ts",
52
53
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram.ts",
53
54
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GeneralizationView.ts",
54
- "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts",
55
55
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyHolderView.ts",
56
56
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_PropertyView.ts",
57
57
  "./src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_RelationshipEdgeView.ts",
@@ -74,7 +74,7 @@
74
74
  "./src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper.ts",
75
75
  "./src/models/protocols/pure/v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper.ts",
76
76
  "./src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper.ts",
77
- "./src/stores/studio/DSLDiagram_ModifierHelper.ts",
77
+ "./src/stores/studio/DSLDiagram_GraphModifierHelper.ts",
78
78
  "./src/stores/studio/DiagramEditorState.ts",
79
79
  "./src/components/studio/ClassDiagramPreview.tsx",
80
80
  "./src/components/studio/DSLDiagram_LegendStudioPlugin.tsx",
@@ -1,35 +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 { ClassView } from './DSLDiagram_ClassView';
17
- import type { RelationshipView } from './DSLDiagram_RelationshipView';
18
- import { Point } from './geometry/DSLDiagram_Point';
19
- export declare const _relationView_setPath: (relationView: RelationshipView, val: Point[]) => void;
20
- /**
21
- * For a path, only counts the points which lie outside of the 2 class views
22
- */
23
- export declare const _relationView_manageInsidePointsDynamically: (path: Point[], from: ClassView, to: ClassView) => Point[];
24
- /**
25
- * Flatten the path if the angle is wide enough
26
- * Also `swallow` points in path which lie inside of the rectangle of a view
27
- */
28
- export declare const _relationView_possiblyFlattenPath: (relationView: RelationshipView) => void;
29
- /**
30
- * Based on the location, find the point on the path that matches or create new point
31
- * (within a threshold of proximity) from the coordinate and put this in the path array
32
- * so it doesn't look too weird
33
- */
34
- export declare const _findOrBuildPoint: (relationView: RelationshipView, x: number, y: number, zoom: number, allowChange?: boolean) => Point | undefined;
35
- //# sourceMappingURL=DSLDiagram_GraphModifierHelper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_GraphModifierHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAGpD,eAAO,MAAM,qBAAqB,iBAClB,gBAAgB,OACzB,KAAK,EAAE,KACX,IAEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2CAA2C,SAChD,KAAK,EAAE,QACP,SAAS,MACX,SAAS,KACZ,KAAK,EAsBP,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,iBAC9B,gBAAgB,KAC7B,IA8CF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iBACd,gBAAgB,KAC3B,MAAM,KACN,MAAM,QACH,MAAM,4BAEX,KAAK,GAAG,SAwCV,CAAC"}
@@ -1,118 +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 { Point } from './geometry/DSLDiagram_Point';
17
- import { Vector } from './geometry/DSLDiagram_Vector';
18
- export const _relationView_setPath = (relationView, val) => {
19
- relationView.path = val;
20
- };
21
- /**
22
- * For a path, only counts the points which lie outside of the 2 class views
23
- */
24
- export const _relationView_manageInsidePointsDynamically = (path, from, to) => {
25
- if (!path.length) {
26
- return [];
27
- }
28
- let start = 0;
29
- let startPoint = path[start];
30
- while (start < path.length - 1 && from.contains(startPoint.x, startPoint.y)) {
31
- start++;
32
- startPoint = path[start];
33
- }
34
- let end = path.length - 1;
35
- let endPoint = path[end];
36
- while (end > 0 && to.contains(endPoint.x, endPoint.y)) {
37
- end--;
38
- endPoint = path[end];
39
- }
40
- return path.slice(start - 1, end + 2);
41
- };
42
- /**
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
45
- */
46
- export const _relationView_possiblyFlattenPath = (relationView) => {
47
- const fullPath = relationView.buildFullPath();
48
- // NOTE: this method here will `swallow` up points inside of the boxes
49
- const newPath = _relationView_manageInsidePointsDynamically(fullPath, relationView.from.classView.value, relationView.to.classView.value);
50
- // recompute the offset point from center inside of `from` and `to` classviews.
51
- // for each, we first check if `manageInsidePointsDynamically` removes any points from the full path
52
- // if it does we will update the offset
53
- if (newPath[0] !== fullPath[0]) {
54
- const center = relationView.from.classView.value.center();
55
- relationView.from.offsetX = newPath[0].x - center.x;
56
- relationView.from.offsetY = newPath[0].y - center.y;
57
- }
58
- if (newPath[newPath.length - 1] !== fullPath[fullPath.length - 1]) {
59
- const center = relationView.to.classView.value.center();
60
- relationView.to.offsetX =
61
- newPath[newPath.length - 1].x - center.x;
62
- relationView.to.offsetY =
63
- newPath[newPath.length - 1].y - center.y;
64
- }
65
- // find the point which can be flattened due to its wide angle
66
- const result = [];
67
- for (let i = 0; i < newPath.length - 2; i++) {
68
- const v1 = Vector.fromPoints(newPath[i + 1], newPath[i]).norm();
69
- const v2 = Vector.fromPoints(newPath[i + 1], newPath[i + 2]).norm();
70
- const dot = v1.dotProduct(v2);
71
- const angle = (Math.acos(dot) * 180) / Math.PI;
72
- if (Math.abs(angle - 180) > 5) {
73
- result.push(newPath[i + 1]);
74
- }
75
- }
76
- // here's where we will modify the path, i.e. swallow inside points if we have to
77
- _relationView_setPath(relationView, result);
78
- };
79
- /**
80
- * Based on the location, find the point on the path that matches or create new point
81
- * (within a threshold of proximity) from the coordinate and put this in the path array
82
- * so it doesn't look too weird
83
- */
84
- export const _findOrBuildPoint = (relationView, x, y, zoom, allowChange = true) => {
85
- for (const pt of relationView.path) {
86
- if (Math.sqrt((x - pt.x) * (x - pt.x) + (y - pt.y) * (y - pt.y)) <
87
- 10 / zoom) {
88
- return pt;
89
- }
90
- }
91
- const fullPath = relationView.buildFullPath(allowChange);
92
- const newPath = [];
93
- let point;
94
- for (let i = 0; i < fullPath.length - 1; i++) {
95
- const a = fullPath[i];
96
- const b = fullPath[i + 1];
97
- const n = new Vector(a.x, a.y).normal(new Vector(b.x, b.y)).norm();
98
- const v = Vector.fromPoints(a, new Point(x, y));
99
- if (Math.abs(n.dotProduct(v)) < 5 / zoom) {
100
- const lx = (a.x < b.x ? a.x : b.x) - 5 / zoom;
101
- const hx = (a.x < b.x ? b.x : a.x) + 5 / zoom;
102
- const ly = (a.y < b.y ? a.y : b.y) - 5 / zoom;
103
- const hy = (a.y < b.y ? b.y : a.y) + 5 / zoom;
104
- if (lx <= x && x <= hx && ly <= y && y <= hy) {
105
- point = new Point(x, y);
106
- newPath.push(point);
107
- }
108
- }
109
- if (i < fullPath.length - 2) {
110
- newPath.push(fullPath[i + 1]);
111
- }
112
- }
113
- if (point && allowChange) {
114
- _relationView_setPath(relationView, newPath);
115
- }
116
- return point;
117
- };
118
- //# sourceMappingURL=DSLDiagram_GraphModifierHelper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DSLDiagram_GraphModifierHelper.js","sourceRoot":"","sources":["../../../../../../src/models/metamodels/pure/packageableElements/diagram/DSLDiagram_GraphModifierHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,YAA8B,EAC9B,GAAY,EACN,EAAE;IACR,YAAY,CAAC,IAAI,GAAG,GAAG,CAAC;AAC1B,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2CAA2C,GAAG,CACzD,IAAa,EACb,IAAe,EACf,EAAa,EACJ,EAAE;IACX,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,K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