@finos/legend-extension-dsl-data-space 1.1.16 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/lib/components/studio/DSLDataSpace_CodeSnippets.d.ts +17 -0
  2. package/lib/components/studio/DSLDataSpace_CodeSnippets.d.ts.map +1 -0
  3. package/lib/components/studio/DSLDataSpace_CodeSnippets.js +40 -0
  4. package/lib/components/studio/DSLDataSpace_CodeSnippets.js.map +1 -0
  5. package/lib/components/studio/DSLDataSpace_LegendStudioDocumentation.d.ts +32 -0
  6. package/lib/components/studio/DSLDataSpace_LegendStudioDocumentation.d.ts.map +1 -0
  7. package/lib/components/studio/DSLDataSpace_LegendStudioDocumentation.js +33 -0
  8. package/lib/components/studio/DSLDataSpace_LegendStudioDocumentation.js.map +1 -0
  9. package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts +8 -2
  10. package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.d.ts.map +1 -1
  11. package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js +55 -1
  12. package/lib/components/studio/DSLDataSpace_LegendStudioPlugin.js.map +1 -1
  13. package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts +2 -0
  14. package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.d.ts.map +1 -1
  15. package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js +2 -2
  16. package/lib/graphManager/DSLDataSpace_PureGraphManagerPlugin.js.map +1 -1
  17. package/lib/index.css +1 -1
  18. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.d.ts.map +1 -1
  19. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js +18 -3
  20. package/lib/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.js.map +1 -1
  21. package/lib/package.json +10 -7
  22. package/package.json +20 -17
  23. package/src/components/studio/DSLDataSpace_CodeSnippets.ts +40 -0
  24. package/src/components/studio/DSLDataSpace_LegendStudioDocumentation.ts +33 -0
  25. package/src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx +94 -1
  26. package/src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts +2 -2
  27. package/src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts +21 -15
  28. package/tsconfig.json +2 -0
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare const SIMPLE_DATA_SPACE_SNIPPET = "DataSpace ${1:model::NewDataSpace}\n{\n groupId: '${2:test.group}';\n artifactId: '${3:test-data-space}';\n versionId: '${4:1.0.0}';\n executionContexts:\n [\n {\n name: '${5:Some Context}';\n description: 'some information about the execution context';\n mapping: ${6:model::SomeMapping};\n defaultRuntime: ${7:model::SomeRuntime};\n }\n ];\n defaultExecutionContext: '${5:Some Context}';\n // description: 'description of the data models';\n // featuredDiagrams:\n // [\n // model::SomeDiagram\n // ];\n // supportInfo: Email {\n // address: 'someEmail@test.org';\n // };\n}";
17
+ //# sourceMappingURL=DSLDataSpace_CodeSnippets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDataSpace_CodeSnippets.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,yBAAyB,knBAuBpC,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export const SIMPLE_DATA_SPACE_SNIPPET = `DataSpace \${1:model::NewDataSpace}
17
+ {
18
+ groupId: '\${2:test.group}';
19
+ artifactId: '\${3:test-data-space}';
20
+ versionId: '\${4:1.0.0}';
21
+ executionContexts:
22
+ [
23
+ {
24
+ name: '\${5:Some Context}';
25
+ description: 'some information about the execution context';
26
+ mapping: \${6:model::SomeMapping};
27
+ defaultRuntime: \${7:model::SomeRuntime};
28
+ }
29
+ ];
30
+ defaultExecutionContext: '\${5:Some Context}';
31
+ // description: 'description of the data models';
32
+ // featuredDiagrams:
33
+ // [
34
+ // model::SomeDiagram
35
+ // ];
36
+ // supportInfo: Email {
37
+ // address: 'someEmail@test.org';
38
+ // };
39
+ }`;
40
+ //# sourceMappingURL=DSLDataSpace_CodeSnippets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDataSpace_CodeSnippets.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_CodeSnippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;EAuBvC,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export declare enum DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY {
17
+ GRAMMAR_PARSER = "dsl-dataspace__grammar-parser",
18
+ GRAMMAR_DATA_SPACE_ELEMENT = "dsl-dataspace__grammar-data-space-element"
19
+ }
20
+ export declare const DSL_DATA_SPACE_DOCUMENTATION_ENTRIES: {
21
+ "dsl-dataspace__grammar-parser": {
22
+ markdownText: {
23
+ value: string;
24
+ };
25
+ };
26
+ "dsl-dataspace__grammar-data-space-element": {
27
+ markdownText: {
28
+ value: string;
29
+ };
30
+ };
31
+ };
32
+ //# sourceMappingURL=DSLDataSpace_LegendStudioDocumentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDataSpace_LegendStudioDocumentation.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,8CAA8C;IACxD,cAAc,kCAAkC;IAChD,0BAA0B,8CAA8C;CACzE;AAED,eAAO,MAAM,oCAAoC;;;;;;;;;;;CAWhD,CAAC"}
@@ -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
+ export var DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY;
17
+ (function (DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY) {
18
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY["GRAMMAR_PARSER"] = "dsl-dataspace__grammar-parser";
19
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY["GRAMMAR_DATA_SPACE_ELEMENT"] = "dsl-dataspace__grammar-data-space-element";
20
+ })(DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY || (DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY = {}));
21
+ export const DSL_DATA_SPACE_DOCUMENTATION_ENTRIES = {
22
+ [DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
23
+ markdownText: {
24
+ value: `DSL DataSpace (\`###DataSpace\`) concerns with providing information and documentation about the taxonomy of data models`,
25
+ },
26
+ },
27
+ [DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DATA_SPACE_ELEMENT]: {
28
+ markdownText: {
29
+ value: `A data-space element specifies a grouping of model diagrams, execution context (mapping, runtime), test data, and so on to help communicate about the _meaning_, _usage_, and relationships of data models and to help users quickly explore and understand the models`,
30
+ },
31
+ },
32
+ };
33
+ //# sourceMappingURL=DSLDataSpace_LegendStudioDocumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DSLDataSpace_LegendStudioDocumentation.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioDocumentation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,8CAGX;AAHD,WAAY,8CAA8C;IACxD,kGAAgD,CAAA;IAChD,0HAAwE,CAAA;AAC1E,CAAC,EAHW,8CAA8C,KAA9C,8CAA8C,QAGzD;AAED,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,CAAC,8CAA8C,CAAC,cAAc,CAAC,EAAE;QAC/D,YAAY,EAAE;YACZ,KAAK,EAAE,0HAA0H;SAClI;KACF;IACD,CAAC,8CAA8C,CAAC,0BAA0B,CAAC,EAAE;QAC3E,YAAY,EAAE;YACZ,KAAK,EAAE,wQAAwQ;SAChR;KACF;CACF,CAAC"}
@@ -13,15 +13,21 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type NewElementFromStateCreator, type ElementTypeGetter, type ElementProjectExplorerDnDTypeGetter, type ElementIconGetter, type DSL_LegendStudioPlugin_Extension, type ElementEditorStateCreator, LegendStudioPlugin } from '@finos/legend-studio';
16
+ import { type NewElementFromStateCreator, type ElementTypeGetter, type ElementProjectExplorerDnDTypeGetter, type ElementIconGetter, type DSL_LegendStudioPlugin_Extension, type ElementEditorStateCreator, type PureGrammarParserElementDocumentationGetter, type PureGrammarParserDocumentationGetter, type PureGrammarParserKeywordSuggestionGetter, type PureGrammarParserElementSnippetSuggestionsGetter, LegendStudioPlugin } from '@finos/legend-studio';
17
+ import { type LegendApplicationKeyedDocumentationEntry } from '@finos/legend-application';
17
18
  export declare class DSLDataSpace_LegendStudioPlugin extends LegendStudioPlugin implements DSL_LegendStudioPlugin_Extension {
18
19
  constructor();
20
+ getExtraKeyedDocumentationEntries(): LegendApplicationKeyedDocumentationEntry[];
19
21
  getExtraSupportedElementTypes(): string[];
20
22
  getExtraElementTypeGetters(): ElementTypeGetter[];
21
23
  getExtraElementIconGetters(): ElementIconGetter[];
22
24
  getExtraNewElementFromStateCreators(): NewElementFromStateCreator[];
23
25
  getExtraElementEditorStateCreators(): ElementEditorStateCreator[];
24
26
  getExtraElementProjectExplorerDnDTypeGetters(): ElementProjectExplorerDnDTypeGetter[];
25
- getExtraGrammarTextEditorDnDTypes(): string[];
27
+ getExtraPureGrammarTextEditorDnDTypes(): string[];
28
+ getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[];
29
+ getExtraPureGrammarParserDocumentationGetters(): PureGrammarParserDocumentationGetter[];
30
+ getExtraPureGrammarParserKeywordSuggestionGetters(): PureGrammarParserKeywordSuggestionGetter[];
31
+ getExtraPureGrammarParserElementSnippetSuggestionsGetters(): PureGrammarParserElementSnippetSuggestionsGetter[];
26
32
  }
27
33
  //# sourceMappingURL=DSLDataSpace_LegendStudioPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDataSpace_LegendStudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EAErC,KAAK,yBAAyB,EAI9B,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAa9B,qBAAa,+BACX,SAAQ,kBACR,YAAW,gCAAgC;;IAM3C,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,mCAAmC,IAAI,0BAA0B,EAAE;IA2BnE,kCAAkC,IAAI,yBAAyB,EAAE;IAcjE,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,iCAAiC,IAAI,MAAM,EAAE;CAG9C"}
1
+ {"version":3,"file":"DSLDataSpace_LegendStudioPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,mCAAmC,EACxC,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EAErC,KAAK,yBAAyB,EAG9B,KAAK,2CAA2C,EAChD,KAAK,oCAAoC,EACzC,KAAK,wCAAwC,EAE7C,KAAK,gDAAgD,EAErD,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAQ9B,OAAO,EAGL,KAAK,wCAAwC,EAC9C,MAAM,2BAA2B,CAAC;AAenC,qBAAa,+BACX,SAAQ,kBACR,YAAW,gCAAgC;;IAMlC,iCAAiC,IAAI,wCAAwC,EAAE;IAMxF,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAWjD,0BAA0B,IAAI,iBAAiB,EAAE;IAejD,mCAAmC,IAAI,0BAA0B,EAAE;IA2BnE,kCAAkC,IAAI,yBAAyB,EAAE;IAcjE,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,qCAAqC,IAAI,MAAM,EAAE;IAIjD,oDAAoD,IAAI,2CAA2C,EAAE;IAmBrG,6CAA6C,IAAI,oCAAoC,EAAE;IAgBvF,iDAAiD,IAAI,wCAAwC,EAAE;IAe/F,yDAAyD,IAAI,gDAAgD,EAAE;CAiBhH"}
@@ -19,12 +19,19 @@ import { UnsupportedElementEditorState, LegendStudioPlugin, } from '@finos/legen
19
19
  import { SquareIcon } from '@finos/legend-art';
20
20
  import { DataSpace, DataSpaceExecutionContext, } from '../../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace';
21
21
  import { LATEST_VERSION_ALIAS } from '@finos/legend-server-depot';
22
+ import { collectKeyedDocumnetationEntriesFromConfig, } from '@finos/legend-application';
23
+ import { DSL_DATA_SPACE_DOCUMENTATION_ENTRIES, DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY, } from './DSLDataSpace_LegendStudioDocumentation';
24
+ import { PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL, PURE_GRAMMAR_DATA_SPACE_PARSER_NAME, } from '../../graphManager/DSLDataSpace_PureGraphManagerPlugin';
25
+ import { SIMPLE_DATA_SPACE_SNIPPET } from './DSLDataSpace_CodeSnippets';
22
26
  const DATA_SPACE_ELEMENT_TYPE = 'DATA SPACE';
23
27
  const DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE = 'PROJECT_EXPLORER_DATA_SPACE';
24
28
  export class DSLDataSpace_LegendStudioPlugin extends LegendStudioPlugin {
25
29
  constructor() {
26
30
  super(packageJson.extensions.studioPlugin, packageJson.version);
27
31
  }
32
+ getExtraKeyedDocumentationEntries() {
33
+ return collectKeyedDocumnetationEntriesFromConfig(DSL_DATA_SPACE_DOCUMENTATION_ENTRIES);
34
+ }
28
35
  getExtraSupportedElementTypes() {
29
36
  return [DATA_SPACE_ELEMENT_TYPE];
30
37
  }
@@ -90,8 +97,55 @@ export class DSLDataSpace_LegendStudioPlugin extends LegendStudioPlugin {
90
97
  },
91
98
  ];
92
99
  }
93
- getExtraGrammarTextEditorDnDTypes() {
100
+ getExtraPureGrammarTextEditorDnDTypes() {
94
101
  return [DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE];
95
102
  }
103
+ getExtraPureGrammarParserElementDocumentationGetters() {
104
+ return [
105
+ (editorStore, parserKeyword, elementKeyword) => {
106
+ if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
107
+ if (elementKeyword === PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL) {
108
+ return editorStore.applicationStore.docRegistry.getEntry(DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DATA_SPACE_ELEMENT);
109
+ }
110
+ }
111
+ return undefined;
112
+ },
113
+ ];
114
+ }
115
+ getExtraPureGrammarParserDocumentationGetters() {
116
+ return [
117
+ (editorStore, parserKeyword) => {
118
+ if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
119
+ return editorStore.applicationStore.docRegistry.getEntry(DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER);
120
+ }
121
+ return undefined;
122
+ },
123
+ ];
124
+ }
125
+ getExtraPureGrammarParserKeywordSuggestionGetters() {
126
+ return [
127
+ (editorStore) => [
128
+ {
129
+ text: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
130
+ description: `(dsl)`,
131
+ documentation: editorStore.applicationStore.docRegistry.getEntry(DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER),
132
+ insertText: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
133
+ },
134
+ ],
135
+ ];
136
+ }
137
+ getExtraPureGrammarParserElementSnippetSuggestionsGetters() {
138
+ return [
139
+ (editorStore, parserKeyword) => parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME
140
+ ? [
141
+ {
142
+ text: PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
143
+ description: 'simple',
144
+ insertText: SIMPLE_DATA_SPACE_SNIPPET,
145
+ },
146
+ ]
147
+ : undefined,
148
+ ];
149
+ }
96
150
  }
97
151
  //# sourceMappingURL=DSLDataSpace_LegendStudioPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDataSpace_LegendStudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAUL,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,SAAS,EACT,yBAAyB,GAC1B,MAAM,yFAAyF,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAC7C,MAAM,4CAA4C,GAChD,6BAA6B,CAAC;AAEhC,MAAM,OAAO,+BACX,S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D,SAAS,CAAC,iBAAiB,GAAG,CAAC,yBAAyB,CAAC,CAAC;oBAC1D,SAAS,CAAC,uBAAuB,GAAG,yBAAyB,CAAC;oBAC9D,OAAO,SAAS,CAAC;iBAClB;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,kCAAkC;QAChC,OAAO;YACL,CACE,WAAwB,EACxB,OAA2B,EACK,EAAE;gBAClC,IAAI,OAAO,YAAY,SAAS,EAAE;oBAChC,OAAO,IAAI,6BAA6B,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;iBAChE;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,4CAA4C;QAC1C,OAAO;YACL,CAAC,OAA2B,EAAsB,EAAE;gBAClD,IAAI,OAAO,YAAY,SAAS,EAAE;oBAChC,OAAO,4CAA4C,CAAC;iBACrD;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,iCAAiC;QAC/B,OAAO,CAAC,4CAA4C,CAAC,CAAC;IACxD,CAAC;CACF"}
1
+ {"version":3,"file":"DSLDataSpace_LegendStudioPlugin.js","sourceRoot":"","sources":["../../../src/components/studio/DSLDataSpace_LegendStudioPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAeL,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EACL,SAAS,EACT,yBAAyB,GAC1B,MAAM,yFAAyF,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EACL,0CAA0C,GAG3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oCAAoC,EACpC,8CAA8C,GAC/C,MAAM,0CAA0C,CAAC;A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B,CAC1E,CAAC;qBACH;iBACF;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,6CAA6C;QAC3C,OAAO;YACL,CACE,WAAwB,EACxB,aAAqB,EAC4B,EAAE;gBACnD,IAAI,aAAa,KAAK,mCAAmC,EAAE;oBACzD,OAAO,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CACtD,8CAA8C,CAAC,cAAc,CAC9D,CAAC;iBACH;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAED,iDAAiD;QAC/C,OAAO;YACL,CAAC,WAAwB,EAA+B,EAAE,CAAC;gBACzD;oBACE,IAAI,EAAE,mCAAmC;oBACzC,WAAW,EAAE,OAAO;oBACpB,aAAa,EAAE,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAC9D,8CAA8C,CAAC,cAAc,CAC9D;oBACD,UAAU,EAAE,mCAAmC;iBAChD;aACF;SACF,CAAC;IACJ,CAAC;IAED,yDAAyD;QACvD,OAAO;YACL,CACE,WAAwB,EACxB,aAAqB,EACoB,EAAE,CAC3C,aAAa,KAAK,mCAAmC;gBACnD,CAAC,CAAC;oBACE;wBACE,IAAI,EAAE,0CAA0C;wBAChD,WAAW,EAAE,QAAQ;wBACrB,UAAU,EAAE,yBAAyB;qBACtC;iBACF;gBACH,CAAC,CAAC,SAAS;SAChB,CAAC;IACJ,CAAC;CACF"}
@@ -14,6 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { PureGraphManagerPlugin, type ElementObserver, type PureGrammarElementLabeler } from '@finos/legend-graph';
17
+ export declare const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = "DataSpace";
18
+ export declare const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = "DataSpace";
17
19
  export declare class DSLDataSpace_PureGraphManagerPlugin extends PureGraphManagerPlugin {
18
20
  constructor();
19
21
  getExtraPureGrammarParserNames(): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDataSpace_PureGraphManagerPlugin.d.ts","sourceRoot":"","sources":["../../src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,sBAAsB,EAEtB,KAAK,eAAe,EAEpB,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAM7B,qBAAa,mCAAoC,SAAQ,sBAAsB;;IAKpE,8BAA8B,IAAI,MAAM,EAAE;IAI1C,2BAA2B,IAAI,MAAM,EAAE;IAIvC,kCAAkC,IAAI,yBAAyB,EAAE;IAWjE,wBAAwB,IAAI,eAAe,EAAE;CAavD"}
1
+ {"version":3,"file":"DSLDataSpace_PureGraphManagerPlugin.d.ts","sourceRoot":"","sources":["../../src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,sBAAsB,EAEtB,KAAK,eAAe,EAEpB,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAC;AAG7B,eAAO,MAAM,mCAAmC,cAAc,CAAC;AAC/D,eAAO,MAAM,0CAA0C,cAAc,CAAC;AAEtE,qBAAa,mCAAoC,SAAQ,sBAAsB;;IAKpE,8BAA8B,IAAI,MAAM,EAAE;IAI1C,2BAA2B,IAAI,MAAM,EAAE;IAIvC,kCAAkC,IAAI,yBAAyB,EAAE;IAWjE,wBAAwB,IAAI,eAAe,EAAE;CAavD"}
@@ -17,8 +17,8 @@ import packageJson from '../../package.json';
17
17
  import { DataSpace } from '../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace';
18
18
  import { PureGraphManagerPlugin, } from '@finos/legend-graph';
19
19
  import { observe_DataSpace } from './action/changeDetection/DSLDataSpace_ObserverHelper';
20
- const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = 'DataSpace';
21
- const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = 'DataSpace';
20
+ export const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = 'DataSpace';
21
+ export const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = 'DataSpace';
22
22
  export class DSLDataSpace_PureGraphManagerPlugin extends PureGraphManagerPlugin {
23
23
  constructor() {
24
24
  super(packageJson.extensions.pureGraphManagerPlugin, packageJson.version);
@@ -1 +1 @@
1
- {"version":3,"file":"DSLDataSpace_PureGraphManagerPlugin.js","sourceRoot":"","sources":["../../src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,sFAAsF,CAAC;AACjH,OAAO,EACL,sBAAsB,GAKvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sDAAsD,CAAC;AAEzF,MAAM,mCAAmC,GAAG,WAAW,CAAC;AACxD,MAAM,0CAA0C,GAAG,WAAW,CAAC;AAE/D,MAAM,OAAO,mCAAoC,SAAQ,sBAAsB;IAC7E;QACE,KAAK,CAAC,WAAW,CAAC,UAAU,CAAC,sBAAsB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5E,CAAC;IAEQ,8BAA8B;QACrC,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAC/C,CAAC;IAEQ,2BAA2B;QAClC,OAAO,CAAC,0CAA0C,CAAC,CAAC;IACtD,CAAC;IAEQ,kCAAkC;QACzC,OAAO;YACL,CAAC,OAA2B,EAAsB,EAAE;gBAClD,IAAI,OAAO,YAAY,SAAS,EAAE;oBAChC,OAAO,0CAA0C,CAAC;iBACnD;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;IAEQ,wBAAwB;QAC/B,OAAO;YACL,CACE,OAA2B,EAC3B,OAAwB,EAC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,CAAC;iBACnC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-extension-dsl-data-space v1.1.16
1
+ /** @license @finos/legend-extension-dsl-data-space v2.0.0
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1 +1 @@
1
- {"version":3,"file":"V1_DSLDataSpace_ProtocolHelper.d.ts","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2BH,OAAO,EAEL,YAAY,EAGb,MAAM,qEAAqE,CAAC;AAE7E,eAAO,MAAM,mCAAmC,cAAc,CAAC;AAC/D,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAgDxD,eAAO,MAAM,uBAAuB,+CA0DlC,CAAC"}
1
+ {"version":3,"file":"V1_DSLDataSpace_ProtocolHelper.d.ts","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA0BH,OAAO,EAEL,YAAY,EAGb,MAAM,qEAAqE,CAAC;AAE7E,eAAO,MAAM,mCAAmC,cAAc,CAAC;AAC/D,eAAO,MAAM,gCAAgC,UAAU,CAAC;AAgDxD,eAAO,MAAM,uBAAuB,+CAiElC,CAAC"}
@@ -56,13 +56,28 @@ export const V1_dataSpaceModelSchema = createModelSchema(V1_DataSpace, {
56
56
  defaultExecutionContext: primitive(),
57
57
  description: optional(primitive()),
58
58
  executionContexts: list(object(V1_dataSpaceExecutionContextModelSchema)),
59
- featuredDiagrams: custom((values) => serializeArray(values, (value) => serialize(V1_packageableElementPointerDeserializerSchema, value), true), (values) => deserializeArray(values, (value) => deserialize(V1_packageableElementPointerDeserializerSchema, value), false)),
59
+ featuredDiagrams: custom((values) => serializeArray(values, (value) => serialize(V1_packageableElementPointerDeserializerSchema, value), {
60
+ skipIfEmpty: true,
61
+ INTERNAL__forceReturnEmptyInTest: true,
62
+ }), (values) => deserializeArray(values, (value) => deserialize(V1_packageableElementPointerDeserializerSchema, value), {
63
+ skipIfEmpty: false,
64
+ })),
60
65
  groupId: primitive(),
61
66
  name: primitive(),
62
67
  package: primitive(),
63
- stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), true), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), false)),
68
+ stereotypes: custom((values) => serializeArray(values, (value) => serialize(V1_stereotypePtrSchema, value), {
69
+ skipIfEmpty: true,
70
+ INTERNAL__forceReturnEmptyInTest: true,
71
+ }), (values) => deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {
72
+ skipIfEmpty: false,
73
+ })),
64
74
  supportInfo: custom((val) => V1_serializeSupportInfo(val), (val) => V1_deserializeSupportInfo(val)),
65
- taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), true), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), false)),
75
+ taggedValues: custom((values) => serializeArray(values, (value) => serialize(V1_taggedValueSchema, value), {
76
+ skipIfEmpty: true,
77
+ INTERNAL__forceReturnEmptyInTest: true,
78
+ }), (values) => deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {
79
+ skipIfEmpty: false,
80
+ })),
66
81
  versionId: primitive(),
67
82
  });
68
83
  //# sourceMappingURL=V1_DSLDataSpace_ProtocolHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1_DSLDataSpace_ProtocolHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAC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,CAAC,CAAmB,EAAE,EAAE,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC,CAAC,EAC/D,KAAK,CACN,CACJ;IACD,WAAW,EAAE,MAAM,CACjB,CAAC,GAAG,EAAE,EAAE,CAAC,uBAAuB,CAAC,GAAG,CAAC,EACrC,CAAC,GAAG,EAAE,EAAE,CAAC,yBAAyB,CAAC,GAAG,CAAC,CACxC;IACD,YAAY,EAAE,MAAM,CAClB,CAAC,MAAM,EAAE,EAAE,CACT,cAAc,CACZ,MAAM,EACN,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,oBAAoB,EAAE,KAAK,CAAC,EACjD,IAAI,CACL,EACH,CAAC,MAAM,EAAE,EAAE,CACT,gBAAgB,CACd,MAAM,EACN,CAAC,CAAmB,EAAE,EAAE,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAC7D,KAAK,CACN,CACJ;IACD,SAAS,EAAE,SAAS,EAAE;CACvB,CAAC,CAAC"}
1
+ {"version":3,"file":"V1_DSLDataSpace_ProtocolHelper.js","sourceRoot":"","sources":["../../../../../../../src/models/protocols/pure/v1/transformation/pureProtocol/V1_DSLDataSpace_ProtocolHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,IAAI,GACL,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,8CAA8C,GAC/C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,YAAY,EACZ,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,qEAAqE,CAAC;AAE7E,MAAM,CAAC,MAAM,mCAAmC,GA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M,EAAE,EAAE,CACT,cAAc,CACZ,MAAM,EACN,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,oBAAoB,EAAE,KAAK,CAAC,EACjD;QACE,WAAW,EAAE,IAAI;QACjB,gCAAgC,EAAE,IAAI;KACvC,CACF,EACH,CAAC,MAAM,EAAE,EAAE,CACT,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,oBAAoB,EAAE,CAAC,CAAC,EAAE;QACpE,WAAW,EAAE,KAAK;KACnB,CAAC,CACL;IACD,SAAS,EAAE,SAAS,EAAE;CACvB,CAAC,CAAC"}
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-data-space",
3
- "version": "1.1.16",
3
+ "version": "2.0.0",
4
4
  "description": "Legend extension for Data Space 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": {
@@ -49,7 +52,7 @@
49
52
  "@finos/legend-server-depot": "workspace:*",
50
53
  "@finos/legend-shared": "workspace:*",
51
54
  "@finos/legend-studio": "workspace:*",
52
- "@types/react": "17.0.43",
55
+ "@types/react": "17.0.44",
53
56
  "mobx": "6.5.0",
54
57
  "mobx-react-lite": "3.3.0",
55
58
  "react": "17.0.2",
@@ -60,12 +63,12 @@
60
63
  "devDependencies": {
61
64
  "@finos/legend-dev-utils": "workspace:*",
62
65
  "cross-env": "7.0.3",
63
- "eslint": "8.13.0",
64
- "jest": "27.5.1",
66
+ "eslint": "8.14.0",
67
+ "jest": "28.0.3",
65
68
  "npm-run-all": "4.1.5",
66
69
  "rimraf": "3.0.2",
67
- "sass": "1.50.1",
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-extension-dsl-data-space",
3
- "version": "1.1.16",
3
+ "version": "2.0.0",
4
4
  "description": "Legend extension for Data Space 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,16 +43,16 @@
40
43
  "test:watch": "jest --watch"
41
44
  },
42
45
  "dependencies": {
43
- "@finos/legend-application": "2.0.14",
44
- "@finos/legend-art": "0.3.18",
45
- "@finos/legend-extension-dsl-diagram": "1.0.36",
46
- "@finos/legend-graph": "5.0.0",
47
- "@finos/legend-model-storage": "0.0.30",
48
- "@finos/legend-query": "1.3.12",
49
- "@finos/legend-server-depot": "0.0.33",
50
- "@finos/legend-shared": "1.3.1",
51
- "@finos/legend-studio": "8.0.0",
52
- "@types/react": "17.0.43",
46
+ "@finos/legend-application": "3.0.0",
47
+ "@finos/legend-art": "1.0.0",
48
+ "@finos/legend-extension-dsl-diagram": "2.0.0",
49
+ "@finos/legend-graph": "6.0.0",
50
+ "@finos/legend-model-storage": "1.0.0",
51
+ "@finos/legend-query": "2.0.0",
52
+ "@finos/legend-server-depot": "1.0.0",
53
+ "@finos/legend-shared": "2.0.0",
54
+ "@finos/legend-studio": "9.0.0",
55
+ "@types/react": "17.0.44",
53
56
  "mobx": "6.5.0",
54
57
  "mobx-react-lite": "3.3.0",
55
58
  "react": "17.0.2",
@@ -58,14 +61,14 @@
58
61
  "serializr": "2.0.5"
59
62
  },
60
63
  "devDependencies": {
61
- "@finos/legend-dev-utils": "0.3.21",
64
+ "@finos/legend-dev-utils": "1.0.0",
62
65
  "cross-env": "7.0.3",
63
- "eslint": "8.13.0",
64
- "jest": "27.5.1",
66
+ "eslint": "8.14.0",
67
+ "jest": "28.0.3",
65
68
  "npm-run-all": "4.1.5",
66
69
  "rimraf": "3.0.2",
67
- "sass": "1.50.1",
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,40 @@
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 const SIMPLE_DATA_SPACE_SNIPPET = `DataSpace \${1:model::NewDataSpace}
18
+ {
19
+ groupId: '\${2:test.group}';
20
+ artifactId: '\${3:test-data-space}';
21
+ versionId: '\${4:1.0.0}';
22
+ executionContexts:
23
+ [
24
+ {
25
+ name: '\${5:Some Context}';
26
+ description: 'some information about the execution context';
27
+ mapping: \${6:model::SomeMapping};
28
+ defaultRuntime: \${7:model::SomeRuntime};
29
+ }
30
+ ];
31
+ defaultExecutionContext: '\${5:Some Context}';
32
+ // description: 'description of the data models';
33
+ // featuredDiagrams:
34
+ // [
35
+ // model::SomeDiagram
36
+ // ];
37
+ // supportInfo: Email {
38
+ // address: 'someEmail@test.org';
39
+ // };
40
+ }`;
@@ -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_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY {
18
+ GRAMMAR_PARSER = 'dsl-dataspace__grammar-parser',
19
+ GRAMMAR_DATA_SPACE_ELEMENT = 'dsl-dataspace__grammar-data-space-element',
20
+ }
21
+
22
+ export const DSL_DATA_SPACE_DOCUMENTATION_ENTRIES = {
23
+ [DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER]: {
24
+ markdownText: {
25
+ value: `DSL DataSpace (\`###DataSpace\`) concerns with providing information and documentation about the taxonomy of data models`,
26
+ },
27
+ },
28
+ [DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DATA_SPACE_ELEMENT]: {
29
+ markdownText: {
30
+ value: `A data-space element specifies a grouping of model diagrams, execution context (mapping, runtime), test data, and so on to help communicate about the _meaning_, _usage_, and relationships of data models and to help users quickly explore and understand the models`,
31
+ },
32
+ },
33
+ };
@@ -25,6 +25,11 @@ import {
25
25
  type ElementEditorStateCreator,
26
26
  type EditorStore,
27
27
  type ElementEditorState,
28
+ type PureGrammarParserElementDocumentationGetter,
29
+ type PureGrammarParserDocumentationGetter,
30
+ type PureGrammarParserKeywordSuggestionGetter,
31
+ type PureGrammarTextSuggestion,
32
+ type PureGrammarParserElementSnippetSuggestionsGetter,
28
33
  UnsupportedElementEditorState,
29
34
  LegendStudioPlugin,
30
35
  } from '@finos/legend-studio';
@@ -35,6 +40,20 @@ import {
35
40
  DataSpaceExecutionContext,
36
41
  } from '../../models/metamodels/pure/model/packageableElements/dataSpace/DSLDataSpace_DataSpace';
37
42
  import { LATEST_VERSION_ALIAS } from '@finos/legend-server-depot';
43
+ import {
44
+ collectKeyedDocumnetationEntriesFromConfig,
45
+ type LegendApplicationDocumentationEntry,
46
+ type LegendApplicationKeyedDocumentationEntry,
47
+ } from '@finos/legend-application';
48
+ import {
49
+ DSL_DATA_SPACE_DOCUMENTATION_ENTRIES,
50
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY,
51
+ } from './DSLDataSpace_LegendStudioDocumentation';
52
+ import {
53
+ PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
54
+ PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
55
+ } from '../../graphManager/DSLDataSpace_PureGraphManagerPlugin';
56
+ import { SIMPLE_DATA_SPACE_SNIPPET } from './DSLDataSpace_CodeSnippets';
38
57
 
39
58
  const DATA_SPACE_ELEMENT_TYPE = 'DATA SPACE';
40
59
  const DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE =
@@ -48,6 +67,12 @@ export class DSLDataSpace_LegendStudioPlugin
48
67
  super(packageJson.extensions.studioPlugin, packageJson.version);
49
68
  }
50
69
 
70
+ override getExtraKeyedDocumentationEntries(): LegendApplicationKeyedDocumentationEntry[] {
71
+ return collectKeyedDocumnetationEntriesFromConfig(
72
+ DSL_DATA_SPACE_DOCUMENTATION_ENTRIES,
73
+ );
74
+ }
75
+
51
76
  getExtraSupportedElementTypes(): string[] {
52
77
  return [DATA_SPACE_ELEMENT_TYPE];
53
78
  }
@@ -130,7 +155,75 @@ export class DSLDataSpace_LegendStudioPlugin
130
155
  ];
131
156
  }
132
157
 
133
- getExtraGrammarTextEditorDnDTypes(): string[] {
158
+ getExtraPureGrammarTextEditorDnDTypes(): string[] {
134
159
  return [DATA_SPACE_ELEMENT_PROJECT_EXPLORER_DND_TYPE];
135
160
  }
161
+
162
+ getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[] {
163
+ return [
164
+ (
165
+ editorStore: EditorStore,
166
+ parserKeyword: string,
167
+ elementKeyword: string,
168
+ ): LegendApplicationDocumentationEntry | undefined => {
169
+ if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
170
+ if (elementKeyword === PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL) {
171
+ return editorStore.applicationStore.docRegistry.getEntry(
172
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_DATA_SPACE_ELEMENT,
173
+ );
174
+ }
175
+ }
176
+ return undefined;
177
+ },
178
+ ];
179
+ }
180
+
181
+ getExtraPureGrammarParserDocumentationGetters(): PureGrammarParserDocumentationGetter[] {
182
+ return [
183
+ (
184
+ editorStore: EditorStore,
185
+ parserKeyword: string,
186
+ ): LegendApplicationDocumentationEntry | undefined => {
187
+ if (parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME) {
188
+ return editorStore.applicationStore.docRegistry.getEntry(
189
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
190
+ );
191
+ }
192
+ return undefined;
193
+ },
194
+ ];
195
+ }
196
+
197
+ getExtraPureGrammarParserKeywordSuggestionGetters(): PureGrammarParserKeywordSuggestionGetter[] {
198
+ return [
199
+ (editorStore: EditorStore): PureGrammarTextSuggestion[] => [
200
+ {
201
+ text: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
202
+ description: `(dsl)`,
203
+ documentation: editorStore.applicationStore.docRegistry.getEntry(
204
+ DSL_DATA_SPACE_LEGEND_STUDIO_DOCUMENTATION_KEY.GRAMMAR_PARSER,
205
+ ),
206
+ insertText: PURE_GRAMMAR_DATA_SPACE_PARSER_NAME,
207
+ },
208
+ ],
209
+ ];
210
+ }
211
+
212
+ getExtraPureGrammarParserElementSnippetSuggestionsGetters(): PureGrammarParserElementSnippetSuggestionsGetter[] {
213
+ return [
214
+ (
215
+ editorStore: EditorStore,
216
+ parserKeyword: string,
217
+ ): PureGrammarTextSuggestion[] | undefined =>
218
+ parserKeyword === PURE_GRAMMAR_DATA_SPACE_PARSER_NAME
219
+ ? [
220
+ {
221
+ text: PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL,
222
+ description: 'simple',
223
+ insertText: SIMPLE_DATA_SPACE_SNIPPET,
224
+ },
225
+ ]
226
+ : undefined,
227
+ ];
228
+ }
136
229
  }
@@ -25,8 +25,8 @@ import {
25
25
  } from '@finos/legend-graph';
26
26
  import { observe_DataSpace } from './action/changeDetection/DSLDataSpace_ObserverHelper';
27
27
 
28
- const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = 'DataSpace';
29
- const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = 'DataSpace';
28
+ export const PURE_GRAMMAR_DATA_SPACE_PARSER_NAME = 'DataSpace';
29
+ export const PURE_GRAMMAR_DATA_SPACE_ELEMENT_TYPE_LABEL = 'DataSpace';
30
30
 
31
31
  export class DSLDataSpace_PureGraphManagerPlugin extends PureGraphManagerPlugin {
32
32
  constructor() {
@@ -26,7 +26,6 @@ import {
26
26
  SKIP,
27
27
  } from 'serializr';
28
28
  import {
29
- type V1_StereotypePtr,
30
29
  V1_stereotypePtrSchema,
31
30
  V1_taggedValueSchema,
32
31
  V1_packageableElementPointerDeserializerSchema,
@@ -107,14 +106,19 @@ export const V1_dataSpaceModelSchema = createModelSchema(V1_DataSpace, {
107
106
  values,
108
107
  (value) =>
109
108
  serialize(V1_packageableElementPointerDeserializerSchema, value),
110
- true,
109
+ {
110
+ skipIfEmpty: true,
111
+ INTERNAL__forceReturnEmptyInTest: true,
112
+ },
111
113
  ),
112
114
  (values) =>
113
115
  deserializeArray(
114
116
  values,
115
117
  (value) =>
116
118
  deserialize(V1_packageableElementPointerDeserializerSchema, value),
117
- false,
119
+ {
120
+ skipIfEmpty: false,
121
+ },
118
122
  ),
119
123
  ),
120
124
  groupId: primitive(),
@@ -125,14 +129,15 @@ export const V1_dataSpaceModelSchema = createModelSchema(V1_DataSpace, {
125
129
  serializeArray(
126
130
  values,
127
131
  (value) => serialize(V1_stereotypePtrSchema, value),
128
- true,
132
+ {
133
+ skipIfEmpty: true,
134
+ INTERNAL__forceReturnEmptyInTest: true,
135
+ },
129
136
  ),
130
137
  (values) =>
131
- deserializeArray(
132
- values,
133
- (v: V1_StereotypePtr) => deserialize(V1_stereotypePtrSchema, v),
134
- false,
135
- ),
138
+ deserializeArray(values, (v) => deserialize(V1_stereotypePtrSchema, v), {
139
+ skipIfEmpty: false,
140
+ }),
136
141
  ),
137
142
  supportInfo: custom(
138
143
  (val) => V1_serializeSupportInfo(val),
@@ -143,14 +148,15 @@ export const V1_dataSpaceModelSchema = createModelSchema(V1_DataSpace, {
143
148
  serializeArray(
144
149
  values,
145
150
  (value) => serialize(V1_taggedValueSchema, value),
146
- true,
151
+ {
152
+ skipIfEmpty: true,
153
+ INTERNAL__forceReturnEmptyInTest: true,
154
+ },
147
155
  ),
148
156
  (values) =>
149
- deserializeArray(
150
- values,
151
- (v: V1_StereotypePtr) => deserialize(V1_taggedValueSchema, v),
152
- false,
153
- ),
157
+ deserializeArray(values, (v) => deserialize(V1_taggedValueSchema, v), {
158
+ skipIfEmpty: false,
159
+ }),
154
160
  ),
155
161
  versionId: primitive(),
156
162
  });
package/tsconfig.json CHANGED
@@ -38,6 +38,8 @@
38
38
  "files": [
39
39
  "./src/DSLDataSpace_Extension.ts",
40
40
  "./src/index.ts",
41
+ "./src/components/studio/DSLDataSpace_CodeSnippets.ts",
42
+ "./src/components/studio/DSLDataSpace_LegendStudioDocumentation.ts",
41
43
  "./src/graph/DSLDataSpace_PureGraphPlugin.ts",
42
44
  "./src/graphManager/DSLDataSpace_GraphManagerHelper.ts",
43
45
  "./src/graphManager/DSLDataSpace_PureGraphManagerPlugin.ts",