@finos/legend-application-studio 27.1.5 → 27.1.7
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.
- package/lib/__lib__/LegendStudioDocumentation.d.ts +1 -0
- package/lib/__lib__/LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioDocumentation.js +1 -0
- package/lib/__lib__/LegendStudioDocumentation.js.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.d.ts +0 -5
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +0 -6
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.js +1 -3
- package/lib/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +1 -3
- package/lib/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts +0 -3
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +7 -17
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.js +2 -4
- package/lib/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/NewMappingElementModal.js +5 -7
- package/lib/components/editor/editor-group/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts +1 -7
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +2 -72
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +10 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +2 -0
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +25 -3
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts +16 -1
- package/lib/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/__lib__/LegendStudioDocumentation.ts +1 -0
- package/src/application/LegendStudioApplicationConfig.ts +0 -7
- package/src/components/editor/editor-group/mapping-editor/EnumerationMappingEditor.tsx +2 -5
- package/src/components/editor/editor-group/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +2 -5
- package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +13 -21
- package/src/components/editor/editor-group/mapping-editor/MappingExecutionBuilder.tsx +2 -5
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +3 -1
- package/src/components/editor/editor-group/mapping-editor/NewMappingElementModal.tsx +5 -9
- package/src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +1 -119
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +16 -1
- package/src/stores/editor/utils/TestableUtils.ts +38 -3
- package/src/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.ts +33 -1
- package/tsconfig.json +0 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -22
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +0 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js +0 -61
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js.map +0 -1
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx +0 -103
@@ -64,8 +64,21 @@ export const createBareModelStoreData = (_class, editorStore) => {
|
|
64
64
|
return modelStoreData;
|
65
65
|
};
|
66
66
|
export class EmbeddedDataCreatorFromEmbeddedData {
|
67
|
+
editorStore;
|
68
|
+
constructor(editorStore) {
|
69
|
+
this.editorStore = editorStore;
|
70
|
+
}
|
67
71
|
visit_EmbeddedData(data) {
|
68
|
-
|
72
|
+
const extraEmbeddedDataCloners = this.editorStore.pluginManager
|
73
|
+
.getApplicationPlugins()
|
74
|
+
.flatMap((plugin) => plugin.getExtraEmbeddedDataCloners?.() ?? []);
|
75
|
+
for (const creator of extraEmbeddedDataCloners) {
|
76
|
+
const embeddedData = creator(data);
|
77
|
+
if (embeddedData) {
|
78
|
+
return embeddedData;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
throw new UnsupportedOperationError(`Unsupported embedded data${data.toString()}`);
|
69
82
|
}
|
70
83
|
visit_INTERNAL__UnknownEmbeddedData(data) {
|
71
84
|
throw new Error('Method not implemented.');
|
@@ -83,7 +96,7 @@ export class EmbeddedDataCreatorFromEmbeddedData {
|
|
83
96
|
if (e instanceof ModelEmbeddedData) {
|
84
97
|
const v = new ModelEmbeddedData();
|
85
98
|
v.model = PackageableElementExplicitReference.create(e.model.value);
|
86
|
-
v.data = e.data.accept_EmbeddedDataVisitor(new EmbeddedDataCreatorFromEmbeddedData());
|
99
|
+
v.data = e.data.accept_EmbeddedDataVisitor(new EmbeddedDataCreatorFromEmbeddedData(this.editorStore));
|
87
100
|
return v;
|
88
101
|
}
|
89
102
|
return undefined;
|
@@ -92,7 +105,7 @@ export class EmbeddedDataCreatorFromEmbeddedData {
|
|
92
105
|
return val;
|
93
106
|
}
|
94
107
|
visit_DataElementReference(data) {
|
95
|
-
return data.dataElement.value.data.accept_EmbeddedDataVisitor(new EmbeddedDataCreatorFromEmbeddedData());
|
108
|
+
return data.dataElement.value.data.accept_EmbeddedDataVisitor(new EmbeddedDataCreatorFromEmbeddedData(this.editorStore));
|
96
109
|
}
|
97
110
|
visit_RelationalCSVData(data) {
|
98
111
|
const val = new RelationalCSVData();
|
@@ -138,6 +151,15 @@ export class EmbeddedDataConnectionTypeVisitor {
|
|
138
151
|
this.editorStore = editorStore;
|
139
152
|
}
|
140
153
|
visit_Connection(connection) {
|
154
|
+
const extraEmbeddedDataCreator = this.editorStore.pluginManager
|
155
|
+
.getApplicationPlugins()
|
156
|
+
.flatMap((plugin) => plugin.getExtraEmbeddedDataTypeFromConnectionMatchers?.() ?? []);
|
157
|
+
for (const creator of extraEmbeddedDataCreator) {
|
158
|
+
const embeddedData = creator(connection);
|
159
|
+
if (embeddedData) {
|
160
|
+
return embeddedData;
|
161
|
+
}
|
162
|
+
}
|
141
163
|
return EmbeddedDataType.EXTERNAL_FORMAT_DATA;
|
142
164
|
}
|
143
165
|
visit_INTERNAL__UnknownConnection(connection) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TestableUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/TestableUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAeL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,6BAA6B,EAC7B,sBAAsB,EAEtB,sCAAsC,EACtC,cAAc,EACd,iBAAiB,EACjB,mCAAmC,EAInC,YAAY,EACZ,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,WAAW,EACX,+BAA+B,EAC/B,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,OAAO,EAAE,qCAAqC,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"TestableUtils.js","sourceRoot":"","sources":["../../../../src/stores/editor/utils/TestableUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAeL,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,6BAA6B,EAC7B,sBAAsB,EAEtB,sCAAsC,EACtC,cAAc,EACd,iBAAiB,EACjB,mCAAmC,EAInC,YAAY,EACZ,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,UAAU,EACV,WAAW,EACX,+BAA+B,EAC/B,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,yBAAyB,EACzB,IAAI,GACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAw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C,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC9D,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;QAC3B,MAAM,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC7C,UAAU,CACR,SAAS,CAAC,MAAM,IAAI,CAAC,EACrB,+CAA+C,CAChD,CAAC;QACF,MAAM,KAAK,GAAG,IAAI,sBAAsB,EAAE,CAAC;QAC3C,KAAK,CAAC,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1D,KAAK,CAAC,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC;QACzD,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,cAAc;AACd,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,UAAsB,EAAW,EAAE,CAC/D,UAAU,YAAY,YAAY;IAClC,UAAU,CAAC,mBAAmB,KAAK,mBAAmB,CAAC,IAAI,CAAC"}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
/// <reference types="react" resolution-mode="require"/>
|
17
|
-
import type { EmbeddedData } from '@finos/legend-graph';
|
17
|
+
import type { Connection, EmbeddedData, SetImplementation, StoreTestData } from '@finos/legend-graph';
|
18
18
|
import type { EmbeddedDataTypeOption } from '../editor/editor-state/element-editor-state/data/DataEditorState.js';
|
19
19
|
import type { EmbeddedDataState } from '../editor/editor-state/element-editor-state/data/EmbeddedDataState.js';
|
20
20
|
import type { EditorStore } from '../editor/EditorStore.js';
|
@@ -23,6 +23,9 @@ import type { ElementEmbeddedContentSnippetSuggestion } from '@finos/legend-lego
|
|
23
23
|
export type EmbeddedDataEditorStateBuilder = (editorStore: EditorStore, embeddedData: EmbeddedData) => EmbeddedDataState | undefined;
|
24
24
|
export type EmbeddedDataEditorRenderer = (embeddedDataState: EmbeddedDataState, isReadOnly: boolean) => React.ReactNode | undefined;
|
25
25
|
export type EmbeddedDataCreator = (embeddedDataType: string) => EmbeddedData | undefined;
|
26
|
+
export type EmbeddedDataCloner = (embeddedData: EmbeddedData) => EmbeddedData | undefined;
|
27
|
+
export type StoreTestDataCreators = (setImp: SetImplementation) => StoreTestData | undefined;
|
28
|
+
export type EmbeddedDataTypeFromConnectionMatcher = (connection: Connection) => string | undefined;
|
26
29
|
/**
|
27
30
|
* NOTE: The tab-stop index of the snippet must start from 2
|
28
31
|
*/
|
@@ -48,5 +51,17 @@ export interface DSL_Data_LegendStudioApplicationPlugin_Extension extends DSL_Le
|
|
48
51
|
* Get the list of embedded data creators
|
49
52
|
*/
|
50
53
|
getExtraEmbeddedDataCreators?(): EmbeddedDataCreator[];
|
54
|
+
/**
|
55
|
+
* Get the list of embedded data type from connection matchers
|
56
|
+
*/
|
57
|
+
getExtraEmbeddedDataTypeFromConnectionMatchers?(): EmbeddedDataTypeFromConnectionMatcher[];
|
58
|
+
/**
|
59
|
+
* Get the list of store test data creators
|
60
|
+
*/
|
61
|
+
getExtraStoreTestDataCreators?(): StoreTestDataCreators[];
|
62
|
+
/**
|
63
|
+
* Get the list of embedded data cloners
|
64
|
+
*/
|
65
|
+
getExtraEmbeddedDataCloners?(): EmbeddedDataCloner[];
|
51
66
|
}
|
52
67
|
//# sourceMappingURL=DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts","sourceRoot":"","sources":["../../../src/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts","sourceRoot":"","sources":["../../../src/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAClH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uEAAuE,CAAC;AAC/G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,2CAA2C,EAAE,MAAM,qCAAqC,CAAC;AACvG,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,gCAAgC,CAAC;AAE9F,MAAM,MAAM,8BAA8B,GAAG,CAC3C,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,KACvB,iBAAiB,GAAG,SAAS,CAAC;AAEnC,MAAM,MAAM,0BAA0B,GAAG,CACvC,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,OAAO,KAChB,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAEjC,MAAM,MAAM,mBAAmB,GAAG,CAChC,gBAAgB,EAAE,MAAM,KACrB,YAAY,GAAG,SAAS,CAAC;AAE9B,MAAM,MAAM,kBAAkB,GAAG,CAC/B,YAAY,EAAE,YAAY,KACvB,YAAY,GAAG,SAAS,CAAC;AAE9B,MAAM,MAAM,qBAAqB,GAAG,CAClC,MAAM,EAAE,iBAAiB,KACtB,aAAa,GAAG,SAAS,CAAC;AAE/B,MAAM,MAAM,qCAAqC,GAAG,CAClD,UAAU,EAAE,UAAU,KACnB,MAAM,GAAG,SAAS,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,6BAA6B,GACvC,uCAAuC,CAAC;AAE1C,MAAM,WAAW,gDACf,SAAQ,2CAA2C;IACnD;;OAEG;IACH,uCAAuC,CAAC,IAAI,8BAA8B,EAAE,CAAC;IAE7E;;OAEG;IACH,mCAAmC,CAAC,IAAI,0BAA0B,EAAE,CAAC;IAErE;;OAEG;IACH,+BAA+B,CAAC,IAAI,sBAAsB,EAAE,CAAC;IAE7D;;OAEG;IACH,sCAAsC,CAAC,IAAI,6BAA6B,EAAE,CAAC;IAE3E;;OAEG;IACH,4BAA4B,CAAC,IAAI,mBAAmB,EAAE,CAAC;IAEvD;;OAEG;IACH,8CAA8C,CAAC,IAAI,qCAAqC,EAAE,CAAC;IAE3F;;OAEG;IACH,6BAA6B,CAAC,IAAI,qBAAqB,EAAE,CAAC;IAE1D;;OAEG;IACH,2BAA2B,CAAC,IAAI,kBAAkB,EAAE,CAAC;CACtD"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-application-studio",
|
3
|
-
"version": "27.1.
|
3
|
+
"version": "27.1.7",
|
4
4
|
"description": "Legend Studio application core",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -45,15 +45,15 @@
|
|
45
45
|
"test:watch": "jest --watch"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@finos/legend-application": "15.0.
|
49
|
-
"@finos/legend-art": "7.0.
|
50
|
-
"@finos/legend-graph": "30.0.
|
51
|
-
"@finos/legend-lego": "1.1.
|
52
|
-
"@finos/legend-query-builder": "4.1.
|
53
|
-
"@finos/legend-server-depot": "6.0.
|
54
|
-
"@finos/legend-server-sdlc": "5.0.
|
55
|
-
"@finos/legend-shared": "10.0.
|
56
|
-
"@finos/legend-storage": "3.0.
|
48
|
+
"@finos/legend-application": "15.0.30",
|
49
|
+
"@finos/legend-art": "7.0.30",
|
50
|
+
"@finos/legend-graph": "30.0.15",
|
51
|
+
"@finos/legend-lego": "1.1.7",
|
52
|
+
"@finos/legend-query-builder": "4.1.7",
|
53
|
+
"@finos/legend-server-depot": "6.0.19",
|
54
|
+
"@finos/legend-server-sdlc": "5.0.21",
|
55
|
+
"@finos/legend-shared": "10.0.18",
|
56
|
+
"@finos/legend-storage": "3.0.68",
|
57
57
|
"@testing-library/react": "14.0.0",
|
58
58
|
"@types/react": "18.2.14",
|
59
59
|
"@types/react-dom": "18.2.6",
|
@@ -70,7 +70,7 @@
|
|
70
70
|
"yaml": "2.3.1"
|
71
71
|
},
|
72
72
|
"devDependencies": {
|
73
|
-
"@finos/legend-dev-utils": "2.0.
|
73
|
+
"@finos/legend-dev-utils": "2.0.73",
|
74
74
|
"@jest/globals": "29.6.1",
|
75
75
|
"cross-env": "7.0.3",
|
76
76
|
"eslint": "8.44.0",
|
@@ -72,6 +72,7 @@ export enum LEGEND_STUDIO_DOCUMENTATION_KEY {
|
|
72
72
|
QUESTION_WHEN_TO_CONFIGURE_PLATFORM_VERSIONS = 'question.when-to-configure-project-platform-dependencies-versions',
|
73
73
|
QUESTION_WHAT_IS_EMBEDDED_MODE_PROJECT_TYPE = 'question.what-is-embedded-project-type',
|
74
74
|
QUESTION_HOW_TO_WRITE_A_SERVICE_TEST = 'question.how-to-write-a-service-test',
|
75
|
+
QUESTION_HOW_TO_WRITE_A_MAPPING_TEST = 'question.how-to-write-a-mapping-test',
|
75
76
|
QUESTION_HOW_TO_WRITE_A_SERVICE_POST_VALIDATION = 'question.how-to-write-a-service-post-validation',
|
76
77
|
QUESTION_WHY_DO_I_SEE_ERROR_WITH_ASSOCIATION_PROPERTY_TYPE = 'question.why-do-i-see-error-with-association-property-type',
|
77
78
|
QUESTION_HOW_TO_WRITE_SERVICE_CONNECTION_TEST_DATA = 'question.how-to-write-service-connection-test-data',
|
@@ -92,12 +92,6 @@ class LegendStudioApplicationCoreOptions {
|
|
92
92
|
*/
|
93
93
|
TEMPORARY__enableNewServiceRegistrationInputCollectorMechanism = false;
|
94
94
|
|
95
|
-
/**
|
96
|
-
* Indicates whether we should render the new mapping testable editor or the deprecated legacy editor.
|
97
|
-
* This flag will be removed once the editor for testable editor is agreed on.
|
98
|
-
*/
|
99
|
-
TEMPORARY__enableMappingTestableEditor = true;
|
100
|
-
|
101
95
|
/**
|
102
96
|
* Provides service registration environment configs.
|
103
97
|
*
|
@@ -118,7 +112,6 @@ class LegendStudioApplicationCoreOptions {
|
|
118
112
|
TEMPORARY__enableFunctionActivatorSupport: optional(primitive()),
|
119
113
|
TEMPORARY__enableRawSQLExecutor: optional(primitive()),
|
120
114
|
TEMPORARY__enableLocalConnectionBuilder: optional(primitive()),
|
121
|
-
TEMPORARY__enableMappingTestableEditor: optional(primitive()),
|
122
115
|
TEMPORARY__serviceRegistrationConfig: list(
|
123
116
|
object(ServiceRegistrationEnvironmentConfig),
|
124
117
|
),
|
@@ -124,9 +124,6 @@ const EnumerationMappingSourceSelectorModal = observer(
|
|
124
124
|
};
|
125
125
|
const handleEnter = (): void => sourceSelectorRef.current?.focus();
|
126
126
|
|
127
|
-
const isDarkMode =
|
128
|
-
editorStore.applicationStore.config.options
|
129
|
-
.TEMPORARY__enableMappingTestableEditor;
|
130
127
|
return (
|
131
128
|
<Dialog
|
132
129
|
open={open}
|
@@ -143,7 +140,7 @@ const EnumerationMappingSourceSelectorModal = observer(
|
|
143
140
|
},
|
144
141
|
}}
|
145
142
|
>
|
146
|
-
<Modal className="search-modal" darkMode={
|
143
|
+
<Modal className="search-modal" darkMode={true}>
|
147
144
|
<ModalTitle title="Choose a Source" />
|
148
145
|
<CustomSelectorInput
|
149
146
|
ref={sourceSelectorRef}
|
@@ -152,7 +149,7 @@ const EnumerationMappingSourceSelectorModal = observer(
|
|
152
149
|
value={selectedSourceType}
|
153
150
|
placeholder="Choose a type..."
|
154
151
|
isClearable={true}
|
155
|
-
darkMode={
|
152
|
+
darkMode={true}
|
156
153
|
filterOption={filterOption}
|
157
154
|
formatOptionLabel={getPackageableElementOptionFormatter({})}
|
158
155
|
/>
|
@@ -131,9 +131,6 @@ export const InstanceSetImplementationSourceSelectorModal = observer(
|
|
131
131
|
} = props;
|
132
132
|
const editorStore = useEditorStore();
|
133
133
|
const applicationStore = useApplicationStore();
|
134
|
-
const isDarkMode =
|
135
|
-
editorStore.applicationStore.config.options
|
136
|
-
.TEMPORARY__enableMappingTestableEditor;
|
137
134
|
const options = (
|
138
135
|
editorStore.graphManagerState.usableClasses as MappingElementSource[]
|
139
136
|
)
|
@@ -212,7 +209,7 @@ export const InstanceSetImplementationSourceSelectorModal = observer(
|
|
212
209
|
},
|
213
210
|
}}
|
214
211
|
>
|
215
|
-
<Modal className="modal search-modal" darkMode={
|
212
|
+
<Modal className="modal search-modal" darkMode={true}>
|
216
213
|
<ModalTitle title="Choose a Source" />
|
217
214
|
<CustomSelectorInput
|
218
215
|
ref={sourceSelectorRef}
|
@@ -220,7 +217,7 @@ export const InstanceSetImplementationSourceSelectorModal = observer(
|
|
220
217
|
onChange={changeSourceType}
|
221
218
|
value={selectedSourceType}
|
222
219
|
placeholder="Choose a source..."
|
223
|
-
darkMode={
|
220
|
+
darkMode={true}
|
224
221
|
isClearable={true}
|
225
222
|
filterOption={sourceFilterOption}
|
226
223
|
formatOptionLabel={formatSourceOptionLabel}
|
@@ -73,6 +73,8 @@ import {
|
|
73
73
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
74
74
|
import type { MappingEditorTabState } from '../../../../stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js';
|
75
75
|
import { MappingTestableEditor } from './MappingTestableEditor.js';
|
76
|
+
import { DocumentationLink } from '@finos/legend-lego/application';
|
77
|
+
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
76
78
|
|
77
79
|
export const MappingEditorSplashScreen: React.FC = () => {
|
78
80
|
const logoWidth = 280;
|
@@ -146,7 +148,7 @@ const getMappingElementTargetIcon = (
|
|
146
148
|
return <PURE_UnknownElementTypeIcon />;
|
147
149
|
};
|
148
150
|
|
149
|
-
const
|
151
|
+
const MappingClassMappingEditor = observer(() => {
|
150
152
|
const editorStore = useEditorStore();
|
151
153
|
const applicationStore = useApplicationStore();
|
152
154
|
const mappingEditorState =
|
@@ -217,13 +219,7 @@ const _MappingEditor = observer(() => {
|
|
217
219
|
);
|
218
220
|
|
219
221
|
return (
|
220
|
-
<div
|
221
|
-
className={clsx('mapping-editor', {
|
222
|
-
mapping__theme__dark:
|
223
|
-
editorStore.applicationStore.config.options
|
224
|
-
.TEMPORARY__enableMappingTestableEditor,
|
225
|
-
})}
|
226
|
-
>
|
222
|
+
<div className={clsx('mapping-editor', 'mapping__theme__dark')}>
|
227
223
|
<ResizablePanelGroup orientation="vertical">
|
228
224
|
<ResizablePanel size={300} minSize={300}>
|
229
225
|
<div className="mapping-editor__side-bar">
|
@@ -345,7 +341,7 @@ const _MappingEditor = observer(() => {
|
|
345
341
|
);
|
346
342
|
});
|
347
343
|
|
348
|
-
export const
|
344
|
+
export const MappingEditor = observer(() => {
|
349
345
|
const editorStore = useEditorStore();
|
350
346
|
const mappingEditorState =
|
351
347
|
editorStore.tabManagerState.getCurrentEditorState(MappingEditorState);
|
@@ -384,13 +380,20 @@ export const MappingEditorWithTestable = observer(() => {
|
|
384
380
|
})}
|
385
381
|
>
|
386
382
|
{prettyCONSTName(tab)}
|
383
|
+
{tab === MAPPING_EDITOR_TAB.TEST_SUITES && (
|
384
|
+
<DocumentationLink
|
385
|
+
documentationKey={
|
386
|
+
LEGEND_STUDIO_DOCUMENTATION_KEY.QUESTION_HOW_TO_WRITE_A_MAPPING_TEST
|
387
|
+
}
|
388
|
+
/>
|
389
|
+
)}
|
387
390
|
</div>
|
388
391
|
))}
|
389
392
|
</div>
|
390
393
|
</div>
|
391
394
|
<div className="panel__content service-editor__content">
|
392
395
|
{selectedTab === MAPPING_EDITOR_TAB.CLASS_MAPPINGS && (
|
393
|
-
<
|
396
|
+
<MappingClassMappingEditor />
|
394
397
|
)}
|
395
398
|
{selectedTab === MAPPING_EDITOR_TAB.TEST_SUITES && (
|
396
399
|
<MappingTestableEditor
|
@@ -402,14 +405,3 @@ export const MappingEditorWithTestable = observer(() => {
|
|
402
405
|
</div>
|
403
406
|
);
|
404
407
|
});
|
405
|
-
|
406
|
-
export const MappingEditor = observer(() => {
|
407
|
-
const editorStore = useEditorStore();
|
408
|
-
const withTestableEditor =
|
409
|
-
editorStore.applicationStore.config.options
|
410
|
-
.TEMPORARY__enableMappingTestableEditor;
|
411
|
-
if (!withTestableEditor) {
|
412
|
-
return <_MappingEditor />;
|
413
|
-
}
|
414
|
-
return <MappingEditorWithTestable />;
|
415
|
-
});
|
@@ -123,9 +123,6 @@ export const ClassMappingSelectorModal = observer(
|
|
123
123
|
} = props;
|
124
124
|
const editorStore = useEditorStore();
|
125
125
|
|
126
|
-
const darkMappingMode =
|
127
|
-
editorStore.applicationStore.config.options
|
128
|
-
.TEMPORARY__enableMappingTestableEditor;
|
129
126
|
// Class mapping selector
|
130
127
|
const classMappingSelectorRef = useRef<SelectComponent>(null);
|
131
128
|
const filterOption = createFilter({
|
@@ -163,7 +160,7 @@ export const ClassMappingSelectorModal = observer(
|
|
163
160
|
>
|
164
161
|
<Modal
|
165
162
|
className={clsx('search-modal', {
|
166
|
-
'modal--dark':
|
163
|
+
'modal--dark': true,
|
167
164
|
})}
|
168
165
|
>
|
169
166
|
<ModalTitle title="Choose a class mapping" />
|
@@ -175,7 +172,7 @@ export const ClassMappingSelectorModal = observer(
|
|
175
172
|
placeholder="Choose a class mapping..."
|
176
173
|
filterOption={filterOption}
|
177
174
|
isClearable={true}
|
178
|
-
darkMode={
|
175
|
+
darkMode={true}
|
179
176
|
/>
|
180
177
|
</Modal>
|
181
178
|
</Dialog>
|
@@ -734,7 +734,9 @@ const StoreTestDataEditor = observer(
|
|
734
734
|
if (isUsingReference) {
|
735
735
|
const newBare = returnUndefOnError(() =>
|
736
736
|
currentData.accept_EmbeddedDataVisitor(
|
737
|
-
new EmbeddedDataCreatorFromEmbeddedData(
|
737
|
+
new EmbeddedDataCreatorFromEmbeddedData(
|
738
|
+
mappingTestState.editorStore,
|
739
|
+
),
|
738
740
|
),
|
739
741
|
);
|
740
742
|
if (newBare) {
|
@@ -106,10 +106,6 @@ export const NewMappingElementModal = observer(() => {
|
|
106
106
|
: '';
|
107
107
|
setId(suggestedId && !mappingIds.includes(suggestedId) ? suggestedId : '');
|
108
108
|
};
|
109
|
-
|
110
|
-
const darkMappingMode =
|
111
|
-
editorStore.applicationStore.config.options
|
112
|
-
.TEMPORARY__enableMappingTestableEditor;
|
113
109
|
// Class Mapping Type
|
114
110
|
const classMappingTypeSelectorRef = useRef<SelectComponent>(null);
|
115
111
|
const classMappingTypeOptions = [
|
@@ -228,7 +224,7 @@ export const NewMappingElementModal = observer(() => {
|
|
228
224
|
handleSubmit();
|
229
225
|
}}
|
230
226
|
className={clsx('modal search-modal new-mapping-element-modal', {
|
231
|
-
'modal--dark':
|
227
|
+
'modal--dark': true,
|
232
228
|
})}
|
233
229
|
>
|
234
230
|
{titleText && <div className="modal__title">{titleText}</div>}
|
@@ -242,7 +238,7 @@ export const NewMappingElementModal = observer(() => {
|
|
242
238
|
formatOptionLabel={getPackageableElementOptionFormatter({})}
|
243
239
|
placeholder="Choose a target"
|
244
240
|
isClearable={true}
|
245
|
-
darkMode={
|
241
|
+
darkMode={true}
|
246
242
|
/>
|
247
243
|
)}
|
248
244
|
{showId && (
|
@@ -252,7 +248,7 @@ export const NewMappingElementModal = observer(() => {
|
|
252
248
|
<PanelDivider />
|
253
249
|
<input
|
254
250
|
className={clsx('input new-mapping-element-modal__id-input', {
|
255
|
-
'input--dark':
|
251
|
+
'input--dark': true,
|
256
252
|
})}
|
257
253
|
ref={mappingIdInputRef}
|
258
254
|
spellCheck={false}
|
@@ -270,7 +266,7 @@ export const NewMappingElementModal = observer(() => {
|
|
270
266
|
options={classMappingTypeOptions}
|
271
267
|
onChange={changeClassMappingType}
|
272
268
|
value={classMappingType}
|
273
|
-
darkMode={
|
269
|
+
darkMode={true}
|
274
270
|
placeholder="Choose a class mapping type"
|
275
271
|
/>
|
276
272
|
</>
|
@@ -279,7 +275,7 @@ export const NewMappingElementModal = observer(() => {
|
|
279
275
|
<div className="search-modal__actions">
|
280
276
|
<button
|
281
277
|
className={clsx('btn btn--primary', {
|
282
|
-
'btn--dark':
|
278
|
+
'btn--dark': true,
|
283
279
|
})}
|
284
280
|
disabled={disableCreateButton}
|
285
281
|
>
|
@@ -18,21 +18,11 @@ import packageJson from '../../../package.json' assert { type: 'json' };
|
|
18
18
|
import { BufferIcon, SitemapIcon } from '@finos/legend-art';
|
19
19
|
import { SchemaSetEditor } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js';
|
20
20
|
import {
|
21
|
-
type Connection,
|
22
21
|
type PackageableElement,
|
23
|
-
type Store,
|
24
|
-
PackageableElementExplicitReference,
|
25
22
|
SchemaSet,
|
26
23
|
Binding,
|
27
24
|
ModelUnit,
|
28
|
-
ExternalFormatConnection,
|
29
|
-
UrlStream,
|
30
25
|
} from '@finos/legend-graph';
|
31
|
-
import {
|
32
|
-
ExternalFormatConnectionEditor,
|
33
|
-
ExternalFormatConnectionValueState,
|
34
|
-
NewExternalFormatConnectionDriver,
|
35
|
-
} from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js';
|
36
26
|
import { BindingEditor } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js';
|
37
27
|
import { guaranteeNonNullable, prettyCONSTName } from '@finos/legend-shared';
|
38
28
|
import type { ReactNode } from 'react';
|
@@ -53,24 +43,14 @@ import {
|
|
53
43
|
type DSL_LegendStudioApplicationPlugin_Extension,
|
54
44
|
} from '../../stores/LegendStudioApplicationPlugin.js';
|
55
45
|
import type {
|
56
|
-
ConnectionEditorRenderer,
|
57
46
|
ConnectionTypeOption,
|
58
|
-
ConnectionValueEditorStateBuilder,
|
59
|
-
DefaultConnectionValueBuilder,
|
60
47
|
DSL_Mapping_LegendStudioApplicationPlugin_Extension,
|
61
|
-
NewConnectionDriverCreator,
|
62
|
-
PureGrammarConnectionLabeler,
|
63
|
-
RuntimeConnectionTooltipTextBuilder,
|
64
48
|
} from '../../stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
|
65
49
|
import type { EditorStore } from '../../stores/editor/EditorStore.js';
|
66
50
|
import type { ElementEditorState } from '../../stores/editor/editor-state/element-editor-state/ElementEditorState.js';
|
67
51
|
import { SchemaSetEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js';
|
68
52
|
import { BindingEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_BindingEditorState.js';
|
69
|
-
import
|
70
|
-
import {
|
71
|
-
externalFormat_Binding_setContentType,
|
72
|
-
externalFormat_urlStream_setUrl,
|
73
|
-
} from '../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
53
|
+
import { externalFormat_Binding_setContentType } from '../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
74
54
|
import type { DocumentationEntry } from '@finos/legend-application';
|
75
55
|
import { DSL_EXTERNAL_FORMAT_LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../__lib__/DSL_ExternalFormat_LegendStudioDocumentation.js';
|
76
56
|
import {
|
@@ -85,7 +65,6 @@ import {
|
|
85
65
|
NewSchemaSetDriverEditor,
|
86
66
|
} from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.js';
|
87
67
|
import type {
|
88
|
-
NewConnectionValueDriver,
|
89
68
|
NewElementDriver,
|
90
69
|
NewElementState,
|
91
70
|
} from '../../stores/editor/NewElementState.js';
|
@@ -101,8 +80,6 @@ export const EXTERNAL_FORMAT_CONNECTION = 'EXTERNAL_FORMAT_CONNECTION';
|
|
101
80
|
const PURE_GRAMMAR_EXTERNAL_FORMAT_PARSER_NAME = 'ExternalFormat';
|
102
81
|
const PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL = 'Binding';
|
103
82
|
const PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL = 'SchemaSet';
|
104
|
-
const PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL =
|
105
|
-
'ExternalFormatConnection';
|
106
83
|
|
107
84
|
export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
108
85
|
extends LegendStudioApplicationPlugin
|
@@ -129,18 +106,6 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
|
129
106
|
return [
|
130
107
|
PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL,
|
131
108
|
PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL,
|
132
|
-
PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL,
|
133
|
-
];
|
134
|
-
}
|
135
|
-
|
136
|
-
getExtraPureGrammarConnectionLabelers(): PureGrammarConnectionLabeler[] {
|
137
|
-
return [
|
138
|
-
(connection): string | undefined => {
|
139
|
-
if (connection instanceof ExternalFormatConnection) {
|
140
|
-
return PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL;
|
141
|
-
}
|
142
|
-
return undefined;
|
143
|
-
},
|
144
109
|
];
|
145
110
|
}
|
146
111
|
|
@@ -286,89 +251,6 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
|
286
251
|
];
|
287
252
|
}
|
288
253
|
|
289
|
-
getExtraRuntimeConnectionTooltipTextBuilders(): RuntimeConnectionTooltipTextBuilder[] {
|
290
|
-
return [
|
291
|
-
(connection: Connection): string | undefined => {
|
292
|
-
if (connection instanceof ExternalFormatConnection) {
|
293
|
-
return `External format connection \u2022 store ${connection.store.value.path}`;
|
294
|
-
}
|
295
|
-
return undefined;
|
296
|
-
},
|
297
|
-
];
|
298
|
-
}
|
299
|
-
|
300
|
-
getExtraDefaultConnectionValueBuilders(): DefaultConnectionValueBuilder[] {
|
301
|
-
return [
|
302
|
-
(store: Store): Connection | undefined => {
|
303
|
-
if (store instanceof Binding) {
|
304
|
-
const externalFormatConnection = new ExternalFormatConnection(
|
305
|
-
PackageableElementExplicitReference.create(store),
|
306
|
-
);
|
307
|
-
const urlStream = new UrlStream();
|
308
|
-
externalFormat_urlStream_setUrl(urlStream, '');
|
309
|
-
externalFormatConnection.externalSource = urlStream;
|
310
|
-
return externalFormatConnection;
|
311
|
-
}
|
312
|
-
return undefined;
|
313
|
-
},
|
314
|
-
];
|
315
|
-
}
|
316
|
-
|
317
|
-
getExtraConnectionValueEditorStateBuilders(): ConnectionValueEditorStateBuilder[] {
|
318
|
-
return [
|
319
|
-
(
|
320
|
-
editorStore: EditorStore,
|
321
|
-
connection: Connection,
|
322
|
-
): ConnectionValueState | undefined => {
|
323
|
-
if (connection instanceof ExternalFormatConnection) {
|
324
|
-
return new ExternalFormatConnectionValueState(
|
325
|
-
editorStore,
|
326
|
-
connection,
|
327
|
-
);
|
328
|
-
}
|
329
|
-
return undefined;
|
330
|
-
},
|
331
|
-
];
|
332
|
-
}
|
333
|
-
|
334
|
-
getExtraConnectionEditorRenderers(): ConnectionEditorRenderer[] {
|
335
|
-
return [
|
336
|
-
(
|
337
|
-
connectionValueState: ConnectionValueState,
|
338
|
-
isReadOnly: boolean,
|
339
|
-
): React.ReactNode | undefined => {
|
340
|
-
if (
|
341
|
-
connectionValueState instanceof ExternalFormatConnectionValueState
|
342
|
-
) {
|
343
|
-
return (
|
344
|
-
<ExternalFormatConnectionEditor
|
345
|
-
connectionValueState={connectionValueState}
|
346
|
-
isReadOnly={isReadOnly}
|
347
|
-
/>
|
348
|
-
);
|
349
|
-
}
|
350
|
-
return undefined;
|
351
|
-
},
|
352
|
-
];
|
353
|
-
}
|
354
|
-
|
355
|
-
getExtraNewConnectionDriverCreators(): NewConnectionDriverCreator[] {
|
356
|
-
return [
|
357
|
-
(
|
358
|
-
editorStore: EditorStore,
|
359
|
-
typeOrStore: Store | string,
|
360
|
-
): NewConnectionValueDriver<Connection> | undefined => {
|
361
|
-
if (typeOrStore instanceof Binding) {
|
362
|
-
return new NewExternalFormatConnectionDriver(editorStore);
|
363
|
-
}
|
364
|
-
if (typeOrStore === EXTERNAL_FORMAT_CONNECTION) {
|
365
|
-
return new NewExternalFormatConnectionDriver(editorStore);
|
366
|
-
}
|
367
|
-
return undefined;
|
368
|
-
},
|
369
|
-
];
|
370
|
-
}
|
371
|
-
|
372
254
|
getExtraConnectionTypeOptions(): ConnectionTypeOption[] {
|
373
255
|
return [
|
374
256
|
{
|
package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts
CHANGED
@@ -409,7 +409,7 @@ export class MappingTestSuiteState extends TestableTestSuiteEditorState {
|
|
409
409
|
firstData.store.value,
|
410
410
|
);
|
411
411
|
storeTestData.data = firstData.data.accept_EmbeddedDataVisitor(
|
412
|
-
new EmbeddedDataCreatorFromEmbeddedData(),
|
412
|
+
new EmbeddedDataCreatorFromEmbeddedData(this.editorStore),
|
413
413
|
);
|
414
414
|
return storeTestData;
|
415
415
|
} else if (targetClass) {
|