@finos/legend-extension-dsl-diagram 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -30,9 +30,9 @@ export const getElementPosition = (element) => {
|
|
30
30
|
export const getClassView = (diagram, sourceViewId) => diagram.classViews.find((classView) => classView.id === sourceViewId);
|
31
31
|
export const cleanUpDeadReferencesInDiagram = (diagram, graph) => {
|
32
32
|
// Delete orphan property views
|
33
|
-
const propertyViewsToRemove = diagram.propertyViews.filter((
|
34
|
-
.map((
|
35
|
-
.includes(
|
33
|
+
const propertyViewsToRemove = diagram.propertyViews.filter((propertyView) => !propertyView.property.ownerReference.value.properties
|
34
|
+
.map((property) => property.name)
|
35
|
+
.includes(propertyView.property.value.name));
|
36
36
|
propertyViewsToRemove.forEach((propertyView) => diagram.deletePropertyView(propertyView));
|
37
37
|
// Fix orphan class views
|
38
38
|
const classViewsToRemove = diagram.classViews.filter((cv) => !graph.getNullableClass(cv.class.value.path));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DiagramHelper.js","sourceRoot":"","sources":["../../src/helpers/DiagramHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,EAAE,KAAK,EAAE,MAAM,sEAAsE,CAAC;AAE7F;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAoB,EAAS,EAAE;IAChE,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,OAAO,OAAO,CAAC,YAAY,EAAE;QAC3B,SAAS,IAAI,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QAC1E,SAAS,IAAI,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACvE,OAAO,GAAG,OAAO,CAAC,YAA2B,CAAC;KAC/C;IACD,OAAO,IAAI,KAAK,CAAC,SA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gBAAgB,CAAC,WAAW,CAAC,IAAI,CAAC;YACzC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,WAAW,CAAC;iBACpE,MAAM,KAAK,CAAC,CAChB,CAAC;IACJ,CAAC,CACF,CAAC;IACF,2BAA2B,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CACxC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CACpC,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/index.css
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-extension-dsl-diagram",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.10",
|
4
4
|
"description": "Legend extension for Diagram DSL",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -40,12 +40,12 @@
|
|
40
40
|
"test:watch": "jest --watch"
|
41
41
|
},
|
42
42
|
"dependencies": {
|
43
|
-
"@finos/legend-application": "1.1.
|
44
|
-
"@finos/legend-art": "0.3.
|
45
|
-
"@finos/legend-graph": "1.0.
|
46
|
-
"@finos/legend-model-storage": "0.0.
|
47
|
-
"@finos/legend-shared": "1.1.
|
48
|
-
"@finos/legend-studio": "2.
|
43
|
+
"@finos/legend-application": "1.1.3",
|
44
|
+
"@finos/legend-art": "0.3.3",
|
45
|
+
"@finos/legend-graph": "1.0.3",
|
46
|
+
"@finos/legend-model-storage": "0.0.16",
|
47
|
+
"@finos/legend-shared": "1.1.2",
|
48
|
+
"@finos/legend-studio": "2.4.0",
|
49
49
|
"@types/react": "17.0.38",
|
50
50
|
"mobx": "6.3.13",
|
51
51
|
"mobx-react-lite": "3.2.3",
|
@@ -56,15 +56,15 @@
|
|
56
56
|
"serializr": "2.0.5"
|
57
57
|
},
|
58
58
|
"devDependencies": {
|
59
|
-
"@finos/legend-dev-utils": "0.3.
|
59
|
+
"@finos/legend-dev-utils": "0.3.8",
|
60
60
|
"@testing-library/react": "12.1.2",
|
61
61
|
"cross-env": "7.0.3",
|
62
|
-
"eslint": "8.
|
62
|
+
"eslint": "8.8.0",
|
63
63
|
"jest": "27.4.7",
|
64
64
|
"jest-canvas-mock": "2.3.1",
|
65
65
|
"npm-run-all": "4.1.5",
|
66
66
|
"rimraf": "3.0.2",
|
67
|
-
"sass": "1.49.
|
67
|
+
"sass": "1.49.7",
|
68
68
|
"typescript": "4.5.5"
|
69
69
|
},
|
70
70
|
"peerDependencies": {
|
@@ -45,10 +45,10 @@ export const cleanUpDeadReferencesInDiagram = (
|
|
45
45
|
): void => {
|
46
46
|
// Delete orphan property views
|
47
47
|
const propertyViewsToRemove = diagram.propertyViews.filter(
|
48
|
-
(
|
49
|
-
!
|
50
|
-
.map((
|
51
|
-
.includes(
|
48
|
+
(propertyView) =>
|
49
|
+
!propertyView.property.ownerReference.value.properties
|
50
|
+
.map((property) => property.name)
|
51
|
+
.includes(propertyView.property.value.name),
|
52
52
|
);
|
53
53
|
propertyViewsToRemove.forEach((propertyView) =>
|
54
54
|
diagram.deletePropertyView(propertyView),
|