@finos/legend-extension-dsl-diagram 1.0.35 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. package/lib/components/studio/DSLDiagram_CodeSnippets.d.ts +20 -0
  2. package/lib/components/studio/DSLDiagram_CodeSnippets.d.ts.map +1 -0
  3. package/lib/components/studio/DSLDiagram_CodeSnippets.js +81 -0
  4. package/lib/components/studio/DSLDiagram_CodeSnippets.js.map +1 -0
  5. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts +32 -0
  6. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.d.ts.map +1 -0
  7. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js +33 -0
  8. package/lib/components/studio/DSLDiagram_LegendStudioDocumentation.js.map +1 -0
  9. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts +8 -2
  10. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.d.ts.map +1 -1
  11. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js +70 -1
  12. package/lib/components/studio/DSLDiagram_LegendStudioPlugin.js.map +1 -1
  13. package/lib/components/studio/DiagramEditor.d.ts.map +1 -1
  14. package/lib/components/studio/DiagramEditor.js +2 -3
  15. package/lib/components/studio/DiagramEditor.js.map +1 -1
  16. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts +2 -1
  17. package/lib/graphManager/DSLDiagram_GraphManagerHelper.d.ts.map +1 -1
  18. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js +2 -0
  19. package/lib/graphManager/DSLDiagram_GraphManagerHelper.js.map +1 -1
  20. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts +2 -0
  21. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.d.ts.map +1 -1
  22. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js +2 -2
  23. package/lib/graphManager/DSLDiagram_PureGraphManagerPlugin.js.map +1 -1
  24. package/lib/index.css +1 -1
  25. package/lib/index.d.ts +1 -0
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +1 -0
  28. package/lib/index.js.map +1 -1
  29. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.d.ts.map +1 -1
  30. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js +5 -5
  31. package/lib/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.js.map +1 -1
  32. package/lib/package.json +12 -9
  33. package/lib/stores/studio/DiagramEditorState.d.ts.map +1 -1
  34. package/lib/stores/studio/DiagramEditorState.js +2 -2
  35. package/lib/stores/studio/DiagramEditorState.js.map +1 -1
  36. package/package.json +19 -16
  37. package/src/components/studio/DSLDiagram_CodeSnippets.ts +88 -0
  38. package/src/components/studio/DSLDiagram_LegendStudioDocumentation.ts +33 -0
  39. package/src/components/studio/DSLDiagram_LegendStudioPlugin.tsx +114 -1
  40. package/src/components/studio/DiagramEditor.tsx +1 -7
  41. package/src/graphManager/DSLDiagram_GraphManagerHelper.ts +8 -1
  42. package/src/graphManager/DSLDiagram_PureGraphManagerPlugin.ts +2 -2
  43. package/src/index.ts +1 -0
  44. package/src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts +5 -4
  45. package/src/stores/studio/DiagramEditorState.ts +3 -2
  46. package/tsconfig.json +2 -0
@@ -18,10 +18,10 @@ import { V1_Diagram } from './v1/model/packageableElements/diagram/V1_DSLDiagram
18
18
  import { assertType } from '@finos/legend-shared';
19
19
  import { deserialize, serialize } from 'serializr';
20
20
  import { V1_diagramModelSchema, V1_DIAGRAM_ELEMENT_PROTOCOL_TYPE, } from './v1/transformation/pureProtocol/V1_DSLDiagram_ProtocolHelper';
21
- import { PureProtocolProcessorPlugin, V1_ElementBuilder, } from '@finos/legend-graph';
21
+ import { PureProtocolProcessorPlugin, V1_ElementBuilder, V1_buildFullPath, } from '@finos/legend-graph';
22
22
  import { V1_transformDiagram } from './v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper';
23
23
  import { Diagram } from '../../metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
24
- import { getDiagram } from '../../../graphManager/DSLDiagram_GraphManagerHelper';
24
+ import { getOwnDiagram } from '../../../graphManager/DSLDiagram_GraphManagerHelper';
25
25
  import { V1_buildClassView, V1_buildGeneralizationView, V1_buildPropertyView, } from './v1/transformation/pureGraph/V1_DSLDiagram_GraphBuilderHelper';
26
26
  const DIAGRAM_ELEMENT_CLASSIFIER_PATH = 'meta::pure::metamodel::diagram::Diagram';
27
27
  export const V1_DSLDiagram_PackageableElementPointerType = 'DIAGRAM';
@@ -37,14 +37,14 @@ export class DSLDiagram_PureProtocolProcessorPlugin extends PureProtocolProcesso
37
37
  firstPass: (elementProtocol, context) => {
38
38
  assertType(elementProtocol, V1_Diagram);
39
39
  const element = new Diagram(elementProtocol.name);
40
- const path = context.currentSubGraph.buildPath(elementProtocol.package, elementProtocol.name);
40
+ const path = V1_buildFullPath(elementProtocol.package, elementProtocol.name);
41
41
  context.currentSubGraph.setOwnElementInExtension(path, element, Diagram);
42
42
  return element;
43
43
  },
44
44
  secondPass: (elementProtocol, context) => {
45
45
  assertType(elementProtocol, V1_Diagram);
46
- const path = context.graph.buildPath(elementProtocol.package, elementProtocol.name);
47
- const element = getDiagram(path, context.graph);
46
+ const path = V1_buildFullPath(elementProtocol.package, elementProtocol.name);
47
+ const element = getOwnDiagram(path, context.currentSubGraph);
48
48
  element.classViews = elementProtocol.classViews.map((classView) => V1_buildClassView(classView, context, element));
49
49
  element.propertyViews = elementProtocol.propertyViews.map((propertyView) => V1_buildPropertyView(propertyView, context, element));
50
50
  element.generalizationViews = elementProtocol.generalizationViews.map((generalizationView) => V1_buildGeneralizationView(generalizationView, element));
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDiagram_PureProtocolProcessorPlugin.js","sourceRoot":"","sources":["../../../../src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WA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C,qBAAqB,EAAE,eAAe,CAAC,CAAC;iBAC1D;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAEQ,uCAAuC;QAC9C,OAAO;YACL,CACE,IAAwC,EACxC,OAAsC,EACH,EAAE;gBACrC,IAAI,IAAI,CAAC,KAAK,KAAK,gCAAgC,EAAE;oBACnD,OAAO,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;iBACjD;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAEQ,8BAA8B;QACrC,OAAO;YACL,CACE,SAA6B,EAC7B,OAAmC,EACA,EAAE;gBACrC,IAAI,SAAS,YAAY,OAAO,EAAE;oBAChC,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC;iBACvC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAEQ,gCAAgC;QACvC,OAAO;YACL,wBAAwB;YACxB,6BAA6B;YAC7B,6BAA6B;SAC9B,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDiagram_PureProtocolProcessorPlugin.js","sourceRoot":"","sources":["../../../../src/models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC1F,OAAO,EAAoB,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACL,qBAAqB,EACrB,gCAAgC,GACjC,MAAM,+DAA+D,CAAC;AACvE,OAAO,EASL,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,+DAA+D,CAAC;AACp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ACrC,IAAI,SAAS,YAAY,OAAO,EAAE;oBAChC,OAAO,mBAAmB,CAAC,SAAS,CAAC,CAAC;iBACvC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAEQ,gCAAgC;QACvC,OAAO;YACL,wBAAwB;YACxB,6BAA6B;YAC7B,6BAA6B;SAC9B,CAAC;IACJ,CAAC;CACF"}
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-diagram",
3
- "version": "1.0.35",
3
+ "version": "2.0.1",
4
4
  "description": "Legend extension for Diagram DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -20,7 +20,10 @@
20
20
  "license": "Apache-2.0",
21
21
  "sideEffects": false,
22
22
  "type": "module",
23
- "main": "lib/index.js",
23
+ "exports": {
24
+ ".": "./lib/index.js",
25
+ "./lib/index.css": "./lib/index.css"
26
+ },
24
27
  "module": "lib/index.js",
25
28
  "types": "lib/index.d.ts",
26
29
  "scripts": {
@@ -46,7 +49,7 @@
46
49
  "@finos/legend-model-storage": "workspace:*",
47
50
  "@finos/legend-shared": "workspace:*",
48
51
  "@finos/legend-studio": "workspace:*",
49
- "@types/react": "17.0.43",
52
+ "@types/react": "17.0.44",
50
53
  "mobx": "6.5.0",
51
54
  "mobx-react-lite": "3.3.0",
52
55
  "react": "17.0.2",
@@ -57,15 +60,15 @@
57
60
  },
58
61
  "devDependencies": {
59
62
  "@finos/legend-dev-utils": "workspace:*",
60
- "@testing-library/react": "12.1.4",
63
+ "@testing-library/react": "12.1.5",
61
64
  "cross-env": "7.0.3",
62
- "eslint": "8.13.0",
63
- "jest": "27.5.1",
64
- "jest-canvas-mock": "2.3.1",
65
+ "eslint": "8.14.0",
66
+ "jest": "28.0.3",
67
+ "jest-canvas-mock": "2.4.0",
65
68
  "npm-run-all": "4.1.5",
66
69
  "rimraf": "3.0.2",
67
- "sass": "1.50.0",
68
- "typescript": "4.6.3"
70
+ "sass": "1.51.0",
71
+ "typescript": "4.6.4"
69
72
  },
70
73
  "peerDependencies": {
71
74
  "react": "^17.0.0"
@@ -1 +1 @@
1
- {"version":3,"file":"DiagramEditorState.d.ts","sourceRoot":"","sources":["../../../src/stores/studio/DiagramEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAuB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAOvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAChB,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+EAA+E,CAAC;AAC/G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oFAAoF,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,MAAM,6EAA6E,CAAC;AAyBtG,8BAAsB,2BAA2B;IAC/C,IAAI,SAAU;IACd,WAAW,EAAE,WAAW,CAAC;IACzB,kBAAkB,EAAE,kBAAkB,CAAC;gBAGrC,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB;CAKzC;AAED,oBAAY,6BAA6B;IACvC,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AAED,qBAAa,0CAA2C,SAAQ,2BAA2B;IACzF,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,gCAAyC;gBAGlD,WAAW,EAAE,WAAW,EACxB,kBAAkB,EAAE,kBAAkB,EACtC,SAAS,EAAE,SAAS;IAoBtB,cAAc,CAAC,GAAG,EAAE,6BAA6B,GAAG,IAAI;CAGzD;AAED,qBAAa,oCAAoC;IAC/C,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,KAA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GAAG,SAAS,CAAC;IACzD,yBAAyB,CAAC,EACtB,sCAAsC,GACtC,SAAS,CAAC;IACd,uBAAuB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IAC3E,uBAAuB,CAAC,EAAE,oCAAoC,GAAG,SAAS,CAAC;IAC3E,eAAe,UAAS;IACxB,oBAAoB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;gBAEjC,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IA4BjE,IAAI,OAAO,IAAI,OAAO,CAMrB;IAED,IAAI,QAAQ,IAAI,eAAe,CAK9B;IAED,IAAI,4BAA4B,IAAI,OAAO,CAE1C;IAMD,IAAI,kBAAkB,IAAI,MAAM,CAqE/B;IAED,WAAW,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAIvC,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAI3C,iBAAiB,CAAC,GAAG,EAAE,2BAA2B,GAAG,SAAS,GAAG,IAAI;IAIrE,4BAA4B,CAC1B,GAAG,EAAE,sCAAsC,GAAG,SAAS,GACtD,IAAI;IAIP,0BAA0B,CACxB,GAAG,EAAE,oCAAoC,GAAG,SAAS,GACpD,IAAI;IAIP,0BAA0B,CACxB,GAAG,EAAE,oCAAoC,GAAG,SAAS,GACpD,IAAI;IAIP,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;IAItC,uBAAuB,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAIzD,gBAAgB,IAAI,IAAI;IAIxB,aAAa,IAAI,IAAI;IAiIrB,OAAO,IAAI,IAAI;IAIf,OAAO,CAAC,yBAAyB,CAuBrB;IAEZ,SAAS,CACP,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,kBAAkB;CAItB"}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { computed, action, makeObservable, observable } from 'mobx';
17
- import { guaranteeNonNullable, guaranteeType, uuid, } from '@finos/legend-shared';
17
+ import { guaranteeNonNullable, guaranteeType, isType, uuid, } from '@finos/legend-shared';
18
18
  import { DIAGRAM_INTERACTION_MODE, } from '../../DiagramRenderer';
19
19
  import { HotkeyConfiguration, PanelDisplayState } from '@finos/legend-art';
20
20
  import { GenericTypeExplicitReference, PRIMITIVE_TYPE, TYPICAL_MULTIPLICITY_TYPE, Property, GenericType, PropertyExplicitReference, } from '@finos/legend-graph';
@@ -66,7 +66,7 @@ export class DiagramEditorClassViewEditorSidePanelState extends DiagramEditorSid
66
66
  setSelectedTab: action,
67
67
  });
68
68
  this.classView = classView;
69
- this.classEditorState = guaranteeType(this.editorStore.openedEditorStates.find((elementState) => elementState instanceof ClassEditorState &&
69
+ this.classEditorState = guaranteeType(this.editorStore.openedEditorStates.find((elementState) => isType(elementState, ClassEditorState) &&
70
70
  elementState.element === classView.class.value) ?? this.editorStore.createElementState(classView.class.value), ClassEditorState);
71
71
  }
72
72
  setSelectedTab(val) {
@@ -1 +1 @@
1
- {"version":3,"file":"DiagramEditorState.js","sourceRoot":"","sources":["../../../src/stores/studio/DiagramEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAIL,4BAA4B,EAC5B,cAAc,EACd,yBAAyB,EACzB,QAAQ,EACR,WAAW,EACX,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;A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ACH,CAAC,CAAC,CACH,CACF,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC;IAClC,CAAC;IAEO,yBAAyB,GAAG,CAClC,OAAwC,EACL,EAAE,CACrC,IAAI,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,KAAqB,EAAQ,EAAE;QACxE;QACE,6DAA6D;QAC7D,IAAI,CAAC,WAAW,CAAC,kBAAkB,KAAK,IAAI;YAC5C,wCAAwC;YACxC,IAAI,CAAC,4BAA4B;YACjC,kEAAkE;YAClE,8EAA8E;YAC9E,mCAAmC;YACnC,IAAI,CAAC,QAAQ,CAAC,GAAG,KAAK,QAAQ,CAAC,aAAa;YAC5C,wDAAwD;YACxD,oEAAoE;YACpE,0CAA0C;YAC1C,CAAC,CAAC,QAAQ,CAAC,aAAa;gBACtB,CAAC,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,CACvC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,WAAW,EAAE,CAC7C,CAAC,EACJ;YACA,OAAO,CAAC,KAAK,CAAC,CAAC;SAChB;IACH,CAAC,EAAE,KAAK,CAAC,CAAC;IAEZ,SAAS,CACP,UAA8B,EAC9B,WAAwB;QAExB,MAAM,kBAAkB,GAAG,IAAI,kBAAkB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAC3E,OAAO,kBAAkB,CAAC;IAC5B,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-diagram",
3
- "version": "1.0.35",
3
+ "version": "2.0.1",
4
4
  "description": "Legend extension for Diagram DSL",
5
5
  "keywords": [
6
6
  "legend",
@@ -20,7 +20,10 @@
20
20
  "license": "Apache-2.0",
21
21
  "sideEffects": false,
22
22
  "type": "module",
23
- "main": "lib/index.js",
23
+ "exports": {
24
+ ".": "./lib/index.js",
25
+ "./lib/index.css": "./lib/index.css"
26
+ },
24
27
  "module": "lib/index.js",
25
28
  "types": "lib/index.d.ts",
26
29
  "scripts": {
@@ -40,13 +43,13 @@
40
43
  "test:watch": "jest --watch"
41
44
  },
42
45
  "dependencies": {
43
- "@finos/legend-application": "2.0.13",
44
- "@finos/legend-art": "0.3.17",
45
- "@finos/legend-graph": "4.0.3",
46
- "@finos/legend-model-storage": "0.0.29",
47
- "@finos/legend-shared": "1.3.0",
48
- "@finos/legend-studio": "7.0.2",
49
- "@types/react": "17.0.43",
46
+ "@finos/legend-application": "3.0.1",
47
+ "@finos/legend-art": "1.0.0",
48
+ "@finos/legend-graph": "6.0.1",
49
+ "@finos/legend-model-storage": "1.0.0",
50
+ "@finos/legend-shared": "2.0.0",
51
+ "@finos/legend-studio": "9.0.1",
52
+ "@types/react": "17.0.44",
50
53
  "mobx": "6.5.0",
51
54
  "mobx-react-lite": "3.3.0",
52
55
  "react": "17.0.2",
@@ -56,16 +59,16 @@
56
59
  "serializr": "2.0.5"
57
60
  },
58
61
  "devDependencies": {
59
- "@finos/legend-dev-utils": "0.3.20",
60
- "@testing-library/react": "12.1.4",
62
+ "@finos/legend-dev-utils": "1.0.0",
63
+ "@testing-library/react": "12.1.5",
61
64
  "cross-env": "7.0.3",
62
- "eslint": "8.13.0",
63
- "jest": "27.5.1",
64
- "jest-canvas-mock": "2.3.1",
65
+ "eslint": "8.14.0",
66
+ "jest": "28.0.3",
67
+ "jest-canvas-mock": "2.4.0",
65
68
  "npm-run-all": "4.1.5",
66
69
  "rimraf": "3.0.2",
67
- "sass": "1.50.0",
68
- "typescript": "4.6.3"
70
+ "sass": "1.51.0",
71
+ "typescript": "4.6.4"
69
72
  },
70
73
  "peerDependencies": {
71
74
  "react": "^17.0.0"
@@ -0,0 +1,88 @@
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 { uuid } from '@finos/legend-shared';
18
+
19
+ export const EMPTY_DIAGRAM_SNIPPET = `Diagram \${1:model::NewDiagram}
20
+ {
21
+ \${2:// diagram content: it is highly recommended to create diagrams using\n // diagram editor as it gives better visual guidance and less error-prone}
22
+ }`;
23
+
24
+ export const getDiagramSnippetWithOneClassView =
25
+ (): string => `Diagram \${1:model::NewDiagram}
26
+ {
27
+ classView ${uuid()}
28
+ {
29
+ class: \${2:model::SomeClass};
30
+ position: (0.0,0.0);
31
+ rectangle: (10.0, 10.0);
32
+ }
33
+ }`;
34
+
35
+ export const getDiagramSnippetWithPropertyView = (): string => {
36
+ const classId1 = uuid();
37
+ const classId2 = uuid();
38
+
39
+ return `Diagram \${1:model::NewDiagram}
40
+ {
41
+ classView ${classId1}
42
+ {
43
+ class: \${2:model::Class1};
44
+ position: (0.0,0.0);
45
+ rectangle: (10.0, 10.0);
46
+ }
47
+ classView ${classId2}
48
+ {
49
+ class: \${3:model::Class2};
50
+ position: (0.0,0.0);
51
+ rectangle: (10.0, 10.0);
52
+ }
53
+ propertyView
54
+ {
55
+ property: \${4:model::Class1.prop1};
56
+ source: ${classId1};
57
+ target: ${classId2};
58
+ points: [];
59
+ }
60
+ }`;
61
+ };
62
+
63
+ export const getDiagramSnippetWithGeneralizationView = (): string => {
64
+ const classId1 = uuid();
65
+ const classId2 = uuid();
66
+
67
+ return `Diagram \${1:model::NewDiagram}
68
+ {
69
+ classView ${classId1}
70
+ {
71
+ class: \${2:model::Class1};
72
+ position: (0.0,0.0);
73
+ rectangle: (10.0, 10.0);
74
+ }
75
+ classView ${classId2}
76
+ {
77
+ class: \${3:model::Class2};
78
+ position: (0.0,0.0);
79
+ rectangle: (10.0, 10.0);
80
+ }
81
+ generalizationView
82
+ {
83
+ source: ${classId1};
84
+ target: ${classId2};
85
+ points: [];
86
+ }
87
+ }`;
88
+ };
@@ -0,0 +1,33 @@
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
+ export enum DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY {
18
+ GRAMMAR_PARSER = 'dsl-diagram__grammar-parser',
19
+ GRAMMAR_DIAGRAM_ELEMENT = 'dsl-diagram__grammar-diagram-element',
20
+ }
21
+
22
+ export const DSL_DIAGRAM_DOCUMENTATION_ENTRIES = {
23
+ [DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
24
+ markdownText: {
25
+ value: `DSL Diagram (\`###Diagram\`) concerns with visualizing data models and their relationship`,
26
+ },
27
+ },
28
+ [DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DIAGRAM_ELEMENT]: {
29
+ markdownText: {
30
+ value: `A diagram element specifies the visualization/rendering of data models and their relationship`,
31
+ },
32
+ },
33
+ };
@@ -30,6 +30,11 @@ import {
30
30
  type ElementEditorPostDeleteAction,
31
31
  type ElementEditorPostRenameAction,
32
32
  type ClassPreviewRenderer,
33
+ type PureGrammarParserDocumentationGetter,
34
+ type PureGrammarParserElementDocumentationGetter,
35
+ type PureGrammarParserKeywordSuggestionGetter,
36
+ type PureGrammarTextSuggestion,
37
+ type PureGrammarParserElementSnippetSuggestionsGetter,
33
38
  } from '@finos/legend-studio';
34
39
  import { ShapesIcon } from '@finos/legend-art';
35
40
  import type { Class, PackageableElement } from '@finos/legend-graph';
@@ -37,6 +42,25 @@ import { Diagram } from '../../models/metamodels/pure/packageableElements/diagra
37
42
  import { DiagramEditorState } from '../../stores/studio/DiagramEditorState';
38
43
  import { DiagramEditor } from './DiagramEditor';
39
44
  import { ClassDiagramPreview } from './ClassDiagramPreview';
45
+ import {
46
+ type LegendApplicationDocumentationEntry,
47
+ type LegendApplicationKeyedDocumentationEntry,
48
+ collectKeyedDocumnetationEntriesFromConfig,
49
+ } from '@finos/legend-application';
50
+ import {
51
+ PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
52
+ PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
53
+ } from '../../graphManager/DSLDiagram_PureGraphManagerPlugin';
54
+ import {
55
+ DSL_DIAGRAM_DOCUMENTATION_ENTRIES,
56
+ DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY,
57
+ } from './DSLDiagram_LegendStudioDocumentation';
58
+ import {
59
+ EMPTY_DIAGRAM_SNIPPET,
60
+ getDiagramSnippetWithGeneralizationView,
61
+ getDiagramSnippetWithOneClassView,
62
+ getDiagramSnippetWithPropertyView,
63
+ } from './DSLDiagram_CodeSnippets';
40
64
 
41
65
  const DIAGRAM_ELEMENT_TYPE = 'DIAGRAM';
42
66
  const DIAGRAM_ELEMENT_PROJECT_EXPLORER_DND_TYPE = 'PROJECT_EXPLORER_DIAGRAM';
@@ -49,6 +73,12 @@ export class DSLDiagram_LegendStudioPlugin
49
73
  super(packageJson.extensions.studioPlugin, packageJson.version);
50
74
  }
51
75
 
76
+ override getExtraKeyedDocumentationEntries(): LegendApplicationKeyedDocumentationEntry[] {
77
+ return collectKeyedDocumnetationEntriesFromConfig(
78
+ DSL_DIAGRAM_DOCUMENTATION_ENTRIES,
79
+ );
80
+ }
81
+
52
82
  override getExtraClassPreviewRenderers(): ClassPreviewRenderer[] {
53
83
  return [
54
84
  (_class: Class): React.ReactNode => (
@@ -138,7 +168,7 @@ export class DSLDiagram_LegendStudioPlugin
138
168
  ];
139
169
  }
140
170
 
141
- getExtraGrammarTextEditorDnDTypes(): string[] {
171
+ getExtraPureGrammarTextEditorDnDTypes(): string[] {
142
172
  return [DIAGRAM_ELEMENT_PROJECT_EXPLORER_DND_TYPE];
143
173
  }
144
174
 
@@ -163,4 +193,87 @@ export class DSLDiagram_LegendStudioPlugin
163
193
  },
164
194
  ];
165
195
  }
196
+
197
+ getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[] {
198
+ return [
199
+ (
200
+ editorStore: EditorStore,
201
+ parserKeyword: string,
202
+ elementKeyword: string,
203
+ ): LegendApplicationDocumentationEntry | undefined => {
204
+ if (parserKeyword === PURE_GRAMMAR_DIAGRAM_PARSER_NAME) {
205
+ if (elementKeyword === PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL) {
206
+ return editorStore.applicationStore.docRegistry.getEntry(
207
+ DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DIAGRAM_ELEMENT,
208
+ );
209
+ }
210
+ }
211
+ return undefined;
212
+ },
213
+ ];
214
+ }
215
+
216
+ getExtraPureGrammarParserDocumentationGetters(): PureGrammarParserDocumentationGetter[] {
217
+ return [
218
+ (
219
+ editorStore: EditorStore,
220
+ parserKeyword: string,
221
+ ): LegendApplicationDocumentationEntry | undefined => {
222
+ if (parserKeyword === PURE_GRAMMAR_DIAGRAM_PARSER_NAME) {
223
+ return editorStore.applicationStore.docRegistry.getEntry(
224
+ DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
225
+ );
226
+ }
227
+ return undefined;
228
+ },
229
+ ];
230
+ }
231
+
232
+ getExtraPureGrammarParserKeywordSuggestionGetters(): PureGrammarParserKeywordSuggestionGetter[] {
233
+ return [
234
+ (editorStore: EditorStore): PureGrammarTextSuggestion[] => [
235
+ {
236
+ text: PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
237
+ description: `(dsl)`,
238
+ documentation: editorStore.applicationStore.docRegistry.getEntry(
239
+ DSL_DIAGRAM_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
240
+ ),
241
+ insertText: PURE_GRAMMAR_DIAGRAM_PARSER_NAME,
242
+ },
243
+ ],
244
+ ];
245
+ }
246
+
247
+ getExtraPureGrammarParserElementSnippetSuggestionsGetters(): PureGrammarParserElementSnippetSuggestionsGetter[] {
248
+ return [
249
+ (
250
+ editorStore: EditorStore,
251
+ parserKeyword: string,
252
+ ): PureGrammarTextSuggestion[] | undefined =>
253
+ parserKeyword === PURE_GRAMMAR_DIAGRAM_PARSER_NAME
254
+ ? [
255
+ {
256
+ text: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
257
+ description: '(blank)',
258
+ insertText: EMPTY_DIAGRAM_SNIPPET,
259
+ },
260
+ {
261
+ text: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
262
+ description: 'with class',
263
+ insertText: getDiagramSnippetWithOneClassView(),
264
+ },
265
+ {
266
+ text: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
267
+ description: 'with inheritance',
268
+ insertText: getDiagramSnippetWithGeneralizationView(),
269
+ },
270
+ {
271
+ text: PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL,
272
+ description: 'with composition',
273
+ insertText: getDiagramSnippetWithPropertyView(),
274
+ },
275
+ ]
276
+ : undefined,
277
+ ];
278
+ }
166
279
  }
@@ -103,7 +103,6 @@ import {
103
103
  property_setName,
104
104
  property_setGenericType,
105
105
  property_setMultiplicity,
106
- package_addElement,
107
106
  } from '@finos/legend-studio';
108
107
  import { cleanUpDeadReferencesInDiagram } from '../../helpers/DiagramHelper';
109
108
  import { Point } from '../../models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_Point';
@@ -865,12 +864,7 @@ const DiagramEditorInlineClassCreatorInner = observer(
865
864
  diagramEditorState.setInlineClassCreatorState(undefined);
866
865
  const [packagePath, name] = resolvePackagePathAndElementName(path);
867
866
  const _class = new Class(name);
868
- package_addElement(
869
- editorStore.graphManagerState.graph.getOrCreatePackage(packagePath),
870
- _class,
871
- editorStore.changeDetectionState.observerContext,
872
- );
873
- await flowResult(editorStore.addElement(_class, false));
867
+ await flowResult(editorStore.addElement(_class, packagePath, false));
874
868
  diagramEditorState.renderer.addClassView(
875
869
  _class,
876
870
  inlineClassCreatorState.point,
@@ -14,8 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import type { PureModel } from '@finos/legend-graph';
17
+ import type { BasicModel, PureModel } from '@finos/legend-graph';
18
+ import { guaranteeNonNullable } from '@finos/legend-shared';
18
19
  import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
19
20
 
20
21
  export const getDiagram = (path: string, graph: PureModel): Diagram =>
21
22
  graph.getExtensionElement(path, Diagram, `Can't find diagram '${path}'`);
23
+
24
+ export const getOwnDiagram = (path: string, graph: BasicModel): Diagram =>
25
+ guaranteeNonNullable(
26
+ graph.getOwnNullableExtensionElement(path, Diagram),
27
+ `Can't find diagram '${path}'`,
28
+ );
@@ -25,8 +25,8 @@ import {
25
25
  import { Diagram } from '../models/metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
26
26
  import { observe_Diagram } from './action/changeDetection/DSLDiagram_ObserverHelper';
27
27
 
28
- const PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';
29
- const PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL = 'Diagram';
28
+ export const PURE_GRAMMAR_DIAGRAM_PARSER_NAME = 'Diagram';
29
+ export const PURE_GRAMMAR_DIAGRAM_ELEMENT_TYPE_LABEL = 'Diagram';
30
30
 
31
31
  export class DSLDiagram_PureGraphManagerPlugin extends PureGraphManagerPlugin {
32
32
  constructor() {
package/src/index.ts CHANGED
@@ -34,4 +34,5 @@ export { Rectangle } from './models/metamodels/pure/packageableElements/diagram/
34
34
  export { PositionedRectangle } from './models/metamodels/pure/packageableElements/diagram/geometry/DSLDiagram_PositionedRectangle';
35
35
 
36
36
  export * from './helpers/DiagramHelper';
37
+ export * from './graphManager/DSLDiagram_GraphManagerHelper';
37
38
  export { V1_DSLDiagram_PackageableElementPointerType } from './models/protocols/pure/DSLDiagram_PureProtocolProcessorPlugin';
@@ -33,10 +33,11 @@ import {
33
33
  type V1_PackageableElement,
34
34
  PureProtocolProcessorPlugin,
35
35
  V1_ElementBuilder,
36
+ V1_buildFullPath,
36
37
  } from '@finos/legend-graph';
37
38
  import { V1_transformDiagram } from './v1/transformation/pureGraph/V1_DSLDiagram_TransformerHelper';
38
39
  import { Diagram } from '../../metamodels/pure/packageableElements/diagram/DSLDiagram_Diagram';
39
- import { getDiagram } from '../../../graphManager/DSLDiagram_GraphManagerHelper';
40
+ import { getOwnDiagram } from '../../../graphManager/DSLDiagram_GraphManagerHelper';
40
41
  import {
41
42
  V1_buildClassView,
42
43
  V1_buildGeneralizationView,
@@ -67,7 +68,7 @@ export class DSLDiagram_PureProtocolProcessorPlugin extends PureProtocolProcesso
67
68
  ): PackageableElement => {
68
69
  assertType(elementProtocol, V1_Diagram);
69
70
  const element = new Diagram(elementProtocol.name);
70
- const path = context.currentSubGraph.buildPath(
71
+ const path = V1_buildFullPath(
71
72
  elementProtocol.package,
72
73
  elementProtocol.name,
73
74
  );
@@ -83,11 +84,11 @@ export class DSLDiagram_PureProtocolProcessorPlugin extends PureProtocolProcesso
83
84
  context: V1_GraphBuilderContext,
84
85
  ): void => {
85
86
  assertType(elementProtocol, V1_Diagram);
86
- const path = context.graph.buildPath(
87
+ const path = V1_buildFullPath(
87
88
  elementProtocol.package,
88
89
  elementProtocol.name,
89
90
  );
90
- const element = getDiagram(path, context.graph);
91
+ const element = getOwnDiagram(path, context.currentSubGraph);
91
92
  element.classViews = elementProtocol.classViews.map((classView) =>
92
93
  V1_buildClassView(classView, context, element),
93
94
  );
@@ -18,6 +18,7 @@ import { computed, action, makeObservable, observable } from 'mobx';
18
18
  import {
19
19
  guaranteeNonNullable,
20
20
  guaranteeType,
21
+ isType,
21
22
  uuid,
22
23
  } from '@finos/legend-shared';
23
24
  import {
@@ -108,8 +109,8 @@ export class DiagramEditorClassViewEditorSidePanelState extends DiagramEditorSid
108
109
  this.classView = classView;
109
110
  this.classEditorState = guaranteeType(
110
111
  this.editorStore.openedEditorStates.find(
111
- (elementState): elementState is ClassEditorState =>
112
- elementState instanceof ClassEditorState &&
112
+ (elementState) =>
113
+ isType(elementState, ClassEditorState) &&
113
114
  elementState.element === classView.class.value,
114
115
  ) ?? this.editorStore.createElementState(classView.class.value),
115
116
  ClassEditorState,
package/tsconfig.json CHANGED
@@ -39,6 +39,8 @@
39
39
  "./src/DSLDiagram_Extension.ts",
40
40
  "./src/DiagramRenderer.ts",
41
41
  "./src/index.ts",
42
+ "./src/components/studio/DSLDiagram_CodeSnippets.ts",
43
+ "./src/components/studio/DSLDiagram_LegendStudioDocumentation.ts",
42
44
  "./src/components/studio/DSLDiagram_TestID.ts",
43
45
  "./src/components/studio/InheritanceDiagramRenderer.ts",
44
46
  "./src/graph/DSLDiagram_PureGraphPlugin.ts",