@finos/legend-application-studio 15.0.0 → 15.2.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.
- package/lib/components/EditorComponentTestUtils.d.ts.map +1 -1
- package/lib/components/EditorComponentTestUtils.js +6 -6
- package/lib/components/EditorComponentTestUtils.js.map +1 -1
- package/lib/components/editor/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.js +5 -3
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/FunctionEditor.js +3 -3
- package/lib/components/editor/edit-panel/FunctionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js +1 -1
- package/lib/components/editor/edit-panel/UnsupportedElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +2 -2
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.d.ts +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.d.ts.map +1 -0
- package/lib/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.js +0 -0
- package/lib/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.js.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts +3 -12
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +103 -41
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts +26 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js +77 -0
- package/lib/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +2 -5
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js +2 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js +8 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +7 -5
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +2 -2
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -7
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/StereotypeSelector.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js +4 -1
- package/lib/components/editor/edit-panel/uml-editor/TaggedValueEditor.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +7 -4
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +8 -2
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/StudioLambdaEditor.js +3 -1
- package/lib/components/shared/StudioLambdaEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +5 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -3
- package/lib/index.js.map +1 -1
- package/lib/package.json +9 -9
- package/lib/stores/EditorGraphState.d.ts +11 -3
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +17 -3
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +1 -9
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +3 -54
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts +28 -1
- package/lib/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +5 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.d.ts +2 -2
- package/lib/stores/editor-state/ModelImporterState.d.ts.map +1 -1
- package/lib/stores/editor-state/ModelImporterState.js +13 -9
- package/lib/stores/editor-state/ModelImporterState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts +9 -2
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js +32 -2
- package/lib/stores/editor-state/element-editor-state/connection/ConnectionEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts +30 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js +49 -0
- package/lib/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts +8 -5
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js +25 -16
- package/lib/stores/editor-state/element-editor-state/service/ServiceRegistrationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +2 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +6 -4
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts +10 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js +27 -1
- package/lib/stores/graphModifier/StoreRelational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +1 -3
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +1 -4
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/package.json +17 -17
- package/src/components/EditorComponentTestUtils.tsx +6 -12
- package/src/components/editor/StatusBar.tsx +5 -3
- package/src/components/editor/edit-panel/FunctionEditor.tsx +9 -2
- package/src/components/editor/edit-panel/UnsupportedElementEditor.tsx +1 -1
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +1 -1
- package/src/{stores/editor-state/element-editor-state/mapping/relational → components/editor/edit-panel/connection-editor}/DatabaseEditorHelper.tsx +0 -0
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +371 -172
- package/src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx +278 -0
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +2 -1
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +5 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationEditor.tsx +2 -2
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +2 -9
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +4 -3
- package/src/components/editor/edit-panel/mapping-editor/relational/TableOrViewSourceTree.tsx +1 -1
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionEditor.tsx +6 -2
- package/src/components/editor/edit-panel/service-editor/ServiceRegistrationEditor.tsx +36 -0
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +12 -5
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +3 -1
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +21 -12
- package/src/components/editor/edit-panel/uml-editor/StereotypeSelector.tsx +7 -4
- package/src/components/editor/edit-panel/uml-editor/TaggedValueEditor.tsx +7 -4
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +9 -3
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +13 -1
- package/src/components/shared/StudioLambdaEditor.tsx +5 -2
- package/src/index.ts +8 -7
- package/src/stores/EditorGraphState.ts +25 -6
- package/src/stores/EditorStore.ts +2 -81
- package/src/stores/StoreRelational_LegendStudioApplicationPlugin_Extension.ts +55 -0
- package/src/stores/editor/NewElementState.ts +8 -7
- package/src/stores/editor-state/ModelImporterState.ts +18 -16
- package/src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts +47 -1
- package/src/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.ts +73 -0
- package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +6 -1
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/service/ServiceRegistrationState.ts +30 -25
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +14 -4
- package/src/stores/graphModifier/StoreRelational_GraphModifierHelper.ts +64 -0
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +2 -9
- package/tsconfig.json +4 -2
- package/tsconfig.package.json +38 -0
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.d.ts.map +0 -1
- package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js.map +0 -1
|
@@ -61,7 +61,12 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
this.executionState = this.buildExecutionState();
|
|
64
|
-
this.registrationState = new ServiceRegistrationState(
|
|
64
|
+
this.registrationState = new ServiceRegistrationState(
|
|
65
|
+
editorStore,
|
|
66
|
+
this.service,
|
|
67
|
+
editorStore.applicationStore.config.options.TEMPORARY__serviceRegistrationConfig,
|
|
68
|
+
editorStore.sdlcServerClient.features.canCreateVersion,
|
|
69
|
+
);
|
|
65
70
|
this.testableState = new ServiceTestableState(editorStore, this);
|
|
66
71
|
}
|
|
67
72
|
|
|
@@ -904,7 +904,7 @@ export class MultiServicePureExecutionState extends ServicePureExecutionState {
|
|
|
904
904
|
|
|
905
905
|
addExecutionParameter(value: string): void {
|
|
906
906
|
const _mapping =
|
|
907
|
-
this.editorStore.
|
|
907
|
+
this.editorStore.graphManagerState.usableMappings[0] ?? stub_Mapping();
|
|
908
908
|
const _key = new KeyedExecutionParameter(
|
|
909
909
|
value,
|
|
910
910
|
PackageableElementExplicitReference.create(_mapping),
|
|
@@ -15,10 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { action, computed, makeAutoObservable } from 'mobx';
|
|
18
|
-
import {
|
|
19
|
-
type ServiceEditorState,
|
|
20
|
-
MINIMUM_SERVICE_OWNERS,
|
|
21
|
-
} from '../../../editor-state/element-editor-state/service/ServiceEditorState.js';
|
|
18
|
+
import { MINIMUM_SERVICE_OWNERS } from '../../../editor-state/element-editor-state/service/ServiceEditorState.js';
|
|
22
19
|
import type { EditorStore } from '../../../EditorStore.js';
|
|
23
20
|
import {
|
|
24
21
|
type GeneratorFn,
|
|
@@ -35,6 +32,7 @@ import {
|
|
|
35
32
|
import { LEGEND_STUDIO_APP_EVENT } from '../../../LegendStudioAppEvent.js';
|
|
36
33
|
import { Version } from '@finos/legend-server-sdlc';
|
|
37
34
|
import {
|
|
35
|
+
type Service,
|
|
38
36
|
type ServiceRegistrationResult,
|
|
39
37
|
ServiceExecutionMode,
|
|
40
38
|
} from '@finos/legend-graph';
|
|
@@ -74,23 +72,29 @@ export enum SERVICE_REGISTRATION_PHASE {
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
export class ServiceRegistrationState {
|
|
77
|
-
editorStore: EditorStore;
|
|
78
|
-
|
|
75
|
+
readonly editorStore: EditorStore;
|
|
76
|
+
readonly service: Service;
|
|
77
|
+
readonly registrationOptions: ServiceRegistrationEnvInfo[] = [];
|
|
79
78
|
registrationState = ActionState.create();
|
|
80
79
|
serviceEnv?: string | undefined;
|
|
81
80
|
serviceExecutionMode?: ServiceExecutionMode | undefined;
|
|
82
81
|
projectVersion?: Version | string | undefined;
|
|
83
82
|
activatePostRegistration = true;
|
|
83
|
+
enableModesWithVersioning: boolean;
|
|
84
|
+
TEMPORARY__useStoreModel = false;
|
|
84
85
|
|
|
85
86
|
constructor(
|
|
86
87
|
editorStore: EditorStore,
|
|
87
|
-
|
|
88
|
+
service: Service,
|
|
89
|
+
registrationOptions: ServiceRegistrationEnvInfo[],
|
|
90
|
+
enableModesWithVersioning: boolean,
|
|
88
91
|
) {
|
|
89
92
|
makeAutoObservable(this, {
|
|
90
93
|
editorStore: false,
|
|
91
94
|
executionModes: computed,
|
|
92
95
|
updateVersion: action,
|
|
93
96
|
setProjectVersion: action,
|
|
97
|
+
setUseStoreModelWithFullInteractive: action,
|
|
94
98
|
initialize: action,
|
|
95
99
|
updateType: action,
|
|
96
100
|
updateEnv: action,
|
|
@@ -98,7 +102,9 @@ export class ServiceRegistrationState {
|
|
|
98
102
|
});
|
|
99
103
|
|
|
100
104
|
this.editorStore = editorStore;
|
|
101
|
-
this.
|
|
105
|
+
this.service = service;
|
|
106
|
+
this.registrationOptions = registrationOptions;
|
|
107
|
+
this.enableModesWithVersioning = enableModesWithVersioning;
|
|
102
108
|
this.initialize();
|
|
103
109
|
this.registrationState.setMessageFormatter(prettyCONSTName);
|
|
104
110
|
}
|
|
@@ -112,16 +118,15 @@ export class ServiceRegistrationState {
|
|
|
112
118
|
setProjectVersion(val: Version | string | undefined): void {
|
|
113
119
|
this.projectVersion = val;
|
|
114
120
|
}
|
|
115
|
-
|
|
116
121
|
setActivatePostRegistration(val: boolean): void {
|
|
117
122
|
this.activatePostRegistration = val;
|
|
118
123
|
}
|
|
124
|
+
setUseStoreModelWithFullInteractive(val: boolean): void {
|
|
125
|
+
this.TEMPORARY__useStoreModel = val;
|
|
126
|
+
}
|
|
119
127
|
|
|
120
128
|
initialize(): void {
|
|
121
|
-
this.serviceEnv = getNullableFirstElement(
|
|
122
|
-
this.editorStore.applicationStore.config.options
|
|
123
|
-
.TEMPORARY__serviceRegistrationConfig,
|
|
124
|
-
)?.env;
|
|
129
|
+
this.serviceEnv = getNullableFirstElement(this.registrationOptions)?.env;
|
|
125
130
|
this.serviceExecutionMode = this.executionModes[0];
|
|
126
131
|
this.updateVersion();
|
|
127
132
|
}
|
|
@@ -147,12 +152,11 @@ export class ServiceRegistrationState {
|
|
|
147
152
|
}
|
|
148
153
|
|
|
149
154
|
get options(): ServiceRegistrationEnvInfo[] {
|
|
150
|
-
if (this.
|
|
151
|
-
return this.
|
|
152
|
-
.TEMPORARY__serviceRegistrationConfig;
|
|
155
|
+
if (this.enableModesWithVersioning) {
|
|
156
|
+
return this.registrationOptions;
|
|
153
157
|
}
|
|
154
|
-
return this.
|
|
155
|
-
(_envConfig) => {
|
|
158
|
+
return this.registrationOptions
|
|
159
|
+
.map((_envConfig) => {
|
|
156
160
|
const envConfig = new ServiceRegistrationEnvInfo();
|
|
157
161
|
envConfig.env = _envConfig.env;
|
|
158
162
|
envConfig.executionUrl = _envConfig.executionUrl;
|
|
@@ -162,8 +166,8 @@ export class ServiceRegistrationState {
|
|
|
162
166
|
(mode) => mode === ServiceExecutionMode.FULL_INTERACTIVE,
|
|
163
167
|
);
|
|
164
168
|
return envConfig;
|
|
165
|
-
}
|
|
166
|
-
|
|
169
|
+
})
|
|
170
|
+
.filter((envConfig) => envConfig.modes.length);
|
|
167
171
|
}
|
|
168
172
|
|
|
169
173
|
get executionModes(): ServiceExecutionMode[] {
|
|
@@ -174,8 +178,8 @@ export class ServiceRegistrationState {
|
|
|
174
178
|
|
|
175
179
|
get versionOptions(): ServiceVersionOption[] | undefined {
|
|
176
180
|
if (
|
|
177
|
-
this.
|
|
178
|
-
this.serviceExecutionMode
|
|
181
|
+
this.enableModesWithVersioning &&
|
|
182
|
+
!(this.serviceExecutionMode === ServiceExecutionMode.FULL_INTERACTIVE)
|
|
179
183
|
) {
|
|
180
184
|
const options: ServiceVersionOption[] =
|
|
181
185
|
this.editorStore.sdlcState.projectVersions.map((version) => ({
|
|
@@ -216,13 +220,14 @@ export class ServiceRegistrationState {
|
|
|
216
220
|
);
|
|
217
221
|
const serviceRegistrationResult =
|
|
218
222
|
(yield this.editorStore.graphManagerState.graphManager.registerService(
|
|
219
|
-
this.
|
|
223
|
+
this.service,
|
|
220
224
|
this.editorStore.graphManagerState.graph,
|
|
221
225
|
projectConfig.groupId,
|
|
222
226
|
projectConfig.artifactId,
|
|
223
227
|
versionInput,
|
|
224
228
|
serverUrl,
|
|
225
229
|
guaranteeNonNullable(this.serviceExecutionMode),
|
|
230
|
+
this.TEMPORARY__useStoreModel,
|
|
226
231
|
)) as ServiceRegistrationResult;
|
|
227
232
|
if (this.activatePostRegistration) {
|
|
228
233
|
this.registrationState.setMessage(
|
|
@@ -284,11 +289,11 @@ export class ServiceRegistrationState {
|
|
|
284
289
|
}
|
|
285
290
|
|
|
286
291
|
validateServiceForRegistration(): void {
|
|
287
|
-
this.
|
|
292
|
+
this.service.owners.forEach((owner) =>
|
|
288
293
|
assertNonEmptyString(owner, `Service can't have an empty owner name`),
|
|
289
294
|
);
|
|
290
295
|
assertTrue(
|
|
291
|
-
this.
|
|
296
|
+
this.service.owners.length >= MINIMUM_SERVICE_OWNERS,
|
|
292
297
|
`Service needs to have at least 2 owners in order to be registered`,
|
|
293
298
|
);
|
|
294
299
|
guaranteeNonNullable(
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
|
@@ -206,13 +206,17 @@ export class ConnectionTestDataState {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
export class NewConnectionDataState {
|
|
209
|
+
readonly editorStore: EditorStore;
|
|
209
210
|
readonly testSuiteState: ServiceTestDataState;
|
|
210
211
|
showModal = false;
|
|
211
212
|
connection: IdentifiedConnection | undefined;
|
|
212
213
|
embeddedDataType: EmbeddedDataTypeOption | undefined;
|
|
213
214
|
dataElement: DataElement | undefined;
|
|
214
215
|
|
|
215
|
-
constructor(
|
|
216
|
+
constructor(
|
|
217
|
+
editorStore: EditorStore,
|
|
218
|
+
serviceTestDataState: ServiceTestDataState,
|
|
219
|
+
) {
|
|
216
220
|
makeObservable(this, {
|
|
217
221
|
showModal: observable,
|
|
218
222
|
connection: observable,
|
|
@@ -224,8 +228,10 @@ export class NewConnectionDataState {
|
|
|
224
228
|
handleConnectionChange: action,
|
|
225
229
|
setDataElement: action,
|
|
226
230
|
});
|
|
227
|
-
|
|
228
|
-
this.
|
|
231
|
+
|
|
232
|
+
this.editorStore = editorStore;
|
|
233
|
+
this.testSuiteState = serviceTestDataState;
|
|
234
|
+
this.dataElement = editorStore.graphManagerState.usableDataElements[0];
|
|
229
235
|
}
|
|
230
236
|
|
|
231
237
|
setModal(val: boolean): void {
|
|
@@ -303,6 +309,7 @@ export class ServiceTestDataState {
|
|
|
303
309
|
newConnectionDataState: observable,
|
|
304
310
|
selectedDataState: observable,
|
|
305
311
|
});
|
|
312
|
+
|
|
306
313
|
this.testData = testData;
|
|
307
314
|
this.testSuiteState = testSuiteState;
|
|
308
315
|
this.editorStore = testSuiteState.editorStore;
|
|
@@ -315,7 +322,10 @@ export class ServiceTestDataState {
|
|
|
315
322
|
connectionData,
|
|
316
323
|
);
|
|
317
324
|
}
|
|
318
|
-
this.newConnectionDataState = new NewConnectionDataState(
|
|
325
|
+
this.newConnectionDataState = new NewConnectionDataState(
|
|
326
|
+
this.editorStore,
|
|
327
|
+
this,
|
|
328
|
+
);
|
|
319
329
|
}
|
|
320
330
|
|
|
321
331
|
createConnectionTestData(): void {
|
|
@@ -42,6 +42,8 @@ import {
|
|
|
42
42
|
type ObserverContext,
|
|
43
43
|
type EnumerationMappingReference,
|
|
44
44
|
type TableAlias,
|
|
45
|
+
type Mapper,
|
|
46
|
+
type PostProcessor,
|
|
45
47
|
getRelationalInputType,
|
|
46
48
|
observe_DatasourceSpecification,
|
|
47
49
|
observe_AuthenticationStrategy,
|
|
@@ -49,8 +51,14 @@ import {
|
|
|
49
51
|
observe_PropertyMapping,
|
|
50
52
|
observe_EnumerationMappingReference,
|
|
51
53
|
observe_TableAlias,
|
|
54
|
+
type SchemaNameMapper,
|
|
55
|
+
type MapperPostProcessor,
|
|
56
|
+
observe_PostProcessor,
|
|
57
|
+
observe_Mapper,
|
|
52
58
|
} from '@finos/legend-graph';
|
|
59
|
+
import { addUniqueEntry, deleteEntry } from '@finos/legend-shared';
|
|
53
60
|
import { action } from 'mobx';
|
|
61
|
+
import type { RelationalDatabaseConnectionValueState } from '../editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
|
54
62
|
|
|
55
63
|
// --------------------------------------------- DB Connection -------------------------------------
|
|
56
64
|
|
|
@@ -421,3 +429,59 @@ export const rootRelationalSetImp_setPropertyMappings = action(
|
|
|
421
429
|
);
|
|
422
430
|
},
|
|
423
431
|
);
|
|
432
|
+
|
|
433
|
+
// --------------------------------------------- Post-Processor -------------------------------------
|
|
434
|
+
|
|
435
|
+
export const relationalDatabaseConnection_addPostProcessor = action(
|
|
436
|
+
(
|
|
437
|
+
connectionValueState: RelationalDatabaseConnectionValueState,
|
|
438
|
+
postProcessor: PostProcessor,
|
|
439
|
+
observerContext: ObserverContext,
|
|
440
|
+
): void => {
|
|
441
|
+
addUniqueEntry(
|
|
442
|
+
connectionValueState.connection.postProcessors,
|
|
443
|
+
observe_PostProcessor(postProcessor, observerContext),
|
|
444
|
+
);
|
|
445
|
+
},
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
export const relationalDatabaseConnection_deletePostProcessor = action(
|
|
449
|
+
(
|
|
450
|
+
connectionValueState: RelationalDatabaseConnectionValueState,
|
|
451
|
+
postProcessor: PostProcessor,
|
|
452
|
+
): void => {
|
|
453
|
+
deleteEntry(connectionValueState.connection.postProcessors, postProcessor);
|
|
454
|
+
},
|
|
455
|
+
);
|
|
456
|
+
|
|
457
|
+
export const mapperPostProcessor_addMapper = action(
|
|
458
|
+
(mapperPostProcessor: MapperPostProcessor, mapper: Mapper): void => {
|
|
459
|
+
addUniqueEntry(mapperPostProcessor.mappers, observe_Mapper(mapper));
|
|
460
|
+
},
|
|
461
|
+
);
|
|
462
|
+
|
|
463
|
+
export const mapper_setFrom = action((mapper: Mapper, val: string): void => {
|
|
464
|
+
mapper.from = val;
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
export const mapper_setTo = action((mapper: Mapper, val: string): void => {
|
|
468
|
+
mapper.to = val;
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
export const schemaNameMapper_setTo = action(
|
|
472
|
+
(schemaNameMapper: SchemaNameMapper, val: string): void => {
|
|
473
|
+
schemaNameMapper.to = val;
|
|
474
|
+
},
|
|
475
|
+
);
|
|
476
|
+
|
|
477
|
+
export const schemaNameMapper_setFrom = action(
|
|
478
|
+
(schemaNameMapper: SchemaNameMapper, val: string): void => {
|
|
479
|
+
schemaNameMapper.from = val;
|
|
480
|
+
},
|
|
481
|
+
);
|
|
482
|
+
|
|
483
|
+
export const mapperPostProcessor_deleteMapper = action(
|
|
484
|
+
(mapperPostProcessor: MapperPostProcessor, val: Mapper): void => {
|
|
485
|
+
deleteEntry(mapperPostProcessor.mappers, val);
|
|
486
|
+
},
|
|
487
|
+
);
|
|
@@ -46,7 +46,6 @@ import {
|
|
|
46
46
|
filterByType,
|
|
47
47
|
} from '@finos/legend-shared';
|
|
48
48
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
49
|
-
import { getElementTypeIcon } from '../../../components/shared/ElementIconUtils.js';
|
|
50
49
|
import type { EditorSDLCState } from '../../EditorSDLCState.js';
|
|
51
50
|
import type { EditorStore } from '../../EditorStore.js';
|
|
52
51
|
import type {
|
|
@@ -56,10 +55,9 @@ import type {
|
|
|
56
55
|
|
|
57
56
|
// Testable Metadata
|
|
58
57
|
export interface TestableMetadata {
|
|
59
|
-
testable: Testable;
|
|
60
58
|
id: string;
|
|
61
59
|
name: string;
|
|
62
|
-
|
|
60
|
+
testable: Testable;
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
export const getTestableMetadata = (
|
|
@@ -69,7 +67,7 @@ export const getTestableMetadata = (
|
|
|
69
67
|
): TestableMetadata => {
|
|
70
68
|
if (testable instanceof PackageableElement) {
|
|
71
69
|
return {
|
|
72
|
-
testable
|
|
70
|
+
testable,
|
|
73
71
|
id:
|
|
74
72
|
getNullableIDFromTestable(
|
|
75
73
|
testable,
|
|
@@ -77,10 +75,6 @@ export const getTestableMetadata = (
|
|
|
77
75
|
editorStore.graphManagerState.pluginManager.getPureGraphManagerPlugins(),
|
|
78
76
|
) ?? uuid(),
|
|
79
77
|
name: testable.name,
|
|
80
|
-
icon: getElementTypeIcon(
|
|
81
|
-
editorStore,
|
|
82
|
-
editorStore.graphState.getPackageableElementType(testable),
|
|
83
|
-
),
|
|
84
78
|
};
|
|
85
79
|
}
|
|
86
80
|
const extraTestables = extraTestableMetadataGetters
|
|
@@ -91,7 +85,6 @@ export const getTestableMetadata = (
|
|
|
91
85
|
testable,
|
|
92
86
|
id: uuid(),
|
|
93
87
|
name: '(unknown)',
|
|
94
|
-
icon: null,
|
|
95
88
|
}
|
|
96
89
|
);
|
|
97
90
|
};
|
package/tsconfig.json
CHANGED
|
@@ -85,6 +85,7 @@
|
|
|
85
85
|
"./src/stores/editor-state/element-editor-state/UMLEditorState.ts",
|
|
86
86
|
"./src/stores/editor-state/element-editor-state/connection/ConnectionEditorState.ts",
|
|
87
87
|
"./src/stores/editor-state/element-editor-state/connection/DatabaseBuilderState.ts",
|
|
88
|
+
"./src/stores/editor-state/element-editor-state/connection/PostProcessorEditorState.ts",
|
|
88
89
|
"./src/stores/editor-state/element-editor-state/data/DataEditorState.ts",
|
|
89
90
|
"./src/stores/editor-state/element-editor-state/data/EmbeddedDataState.ts",
|
|
90
91
|
"./src/stores/editor-state/element-editor-state/external-format/BindingEditorState.ts",
|
|
@@ -165,8 +166,10 @@
|
|
|
165
166
|
"./src/components/editor/edit-panel/UnsupportedElementEditor.tsx",
|
|
166
167
|
"./src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx",
|
|
167
168
|
"./src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx",
|
|
169
|
+
"./src/components/editor/edit-panel/connection-editor/DatabaseEditorHelper.tsx",
|
|
168
170
|
"./src/components/editor/edit-panel/connection-editor/FlatDataConnectionEditor.tsx",
|
|
169
171
|
"./src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx",
|
|
172
|
+
"./src/components/editor/edit-panel/connection-editor/post-processor-editor/MapperPostProcessorEditor.tsx",
|
|
170
173
|
"./src/components/editor/edit-panel/data-editor/DataElementEditor.tsx",
|
|
171
174
|
"./src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx",
|
|
172
175
|
"./src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx",
|
|
@@ -242,8 +245,7 @@
|
|
|
242
245
|
"./src/components/workspace-setup/ProjectSelector.tsx",
|
|
243
246
|
"./src/components/workspace-setup/WorkspaceSelector.tsx",
|
|
244
247
|
"./src/components/workspace-setup/WorkspaceSetup.tsx",
|
|
245
|
-
"./src/components/workspace-setup/WorkspaceSetupStoreProvider.tsx"
|
|
246
|
-
"./src/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.tsx"
|
|
248
|
+
"./src/components/workspace-setup/WorkspaceSetupStoreProvider.tsx"
|
|
247
249
|
],
|
|
248
250
|
"include": [
|
|
249
251
|
"src/**/*.ts",
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": [
|
|
4
|
+
"dom",
|
|
5
|
+
"dom.iterable",
|
|
6
|
+
"esnext",
|
|
7
|
+
"webworker",
|
|
8
|
+
"scripthost"
|
|
9
|
+
],
|
|
10
|
+
"composite": true,
|
|
11
|
+
"declaration": true,
|
|
12
|
+
"declarationMap": true,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"target": "esnext",
|
|
15
|
+
"module": "nodenext",
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"importsNotUsedAsValues": "error",
|
|
20
|
+
"strict": true,
|
|
21
|
+
"noImplicitOverride": true,
|
|
22
|
+
"noUncheckedIndexedAccess": true,
|
|
23
|
+
"exactOptionalPropertyTypes": true,
|
|
24
|
+
"forceConsistentCasingInFileNames": true,
|
|
25
|
+
"outDir": "./lib",
|
|
26
|
+
"tsBuildInfoFile": "./build/package.tsbuildinfo",
|
|
27
|
+
"rootDir": "./"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"./package.json"
|
|
31
|
+
],
|
|
32
|
+
"include": [
|
|
33
|
+
"package.json"
|
|
34
|
+
],
|
|
35
|
+
"exclude": [
|
|
36
|
+
"lib"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseEditorHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,OAAO,EACL,KAAK,kBAAkB,EAmBxB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,uBAAuB,SAAU,kBAAkB,KAAG,MAuClE,CAAC;AAEF,eAAO,MAAM,oBAAoB,SACzB,kBAAkB,KACvB,MAAM,SA2CR,CAAC"}
|
package/lib/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseEditorHelper.js","sourceRoot":"","sources":["../../../../../../src/stores/editor-state/element-editor-state/mapping/relational/DatabaseEditorHelper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,KAA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