@finos/legend-application-studio 27.1.7 → 27.1.9
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/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +22 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js +61 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js.map +1 -0
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts +7 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +72 -2
- 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/MappingTestingHelper.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -1
- package/package.json +10 -10
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx +103 -0
- package/src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +119 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +1 -1
- package/tsconfig.json +1 -0
@@ -0,0 +1,22 @@
|
|
1
|
+
import { ExternalFormatConnection, type Binding } from '@finos/legend-graph';
|
2
|
+
import { ConnectionValueState } from '../../../../stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
3
|
+
import type { EditorStore } from '../../../../stores/editor/EditorStore.js';
|
4
|
+
import { NewConnectionValueDriver } from '../../../../stores/editor/NewElementState.js';
|
5
|
+
export declare class ExternalFormatConnectionValueState extends ConnectionValueState {
|
6
|
+
connection: ExternalFormatConnection;
|
7
|
+
constructor(editorStore: EditorStore, connection: ExternalFormatConnection);
|
8
|
+
label(): string;
|
9
|
+
}
|
10
|
+
export declare const ExternalFormatConnectionEditor: ((props: {
|
11
|
+
connectionValueState: ExternalFormatConnectionValueState;
|
12
|
+
isReadOnly: boolean;
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
14
|
+
displayName: string;
|
15
|
+
};
|
16
|
+
export declare class NewExternalFormatConnectionDriver extends NewConnectionValueDriver<ExternalFormatConnection> {
|
17
|
+
constructor(editorStore: EditorStore);
|
18
|
+
get isValid(): boolean;
|
19
|
+
getConnectionType(): string;
|
20
|
+
createConnection(store: Binding): ExternalFormatConnection;
|
21
|
+
}
|
22
|
+
//# sourceMappingURL=DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACL,wBAAwB,EAGxB,KAAK,OAAO,EACb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,iGAAiG,CAAC;AACvI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AAIxF,qBAAa,kCAAmC,SAAQ,oBAAoB;IACjE,UAAU,EAAE,wBAAwB,CAAC;gBAElC,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,wBAAwB;IAK1E,KAAK,IAAI,MAAM;CAGhB;AAED,eAAO,MAAM,8BAA8B,WACjC;IACN,oBAAoB,EAAE,kCAAkC,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC;CACrB;;CA4BF,CAAC;AAEF,qBAAa,iCAAkC,SAAQ,wBAAwB,CAAC,wBAAwB,CAAC;gBAC3F,WAAW,EAAE,WAAW;IAQpC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,iBAAiB,IAAI,MAAM;IAI3B,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB;CAS3D"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
/**
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
4
|
+
*
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
8
|
+
*
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
16
|
+
*/
|
17
|
+
import { observer } from 'mobx-react-lite';
|
18
|
+
import { ExternalFormatConnection, PackageableElementExplicitReference, UrlStream, } from '@finos/legend-graph';
|
19
|
+
import { computed, makeObservable } from 'mobx';
|
20
|
+
import { ConnectionValueState } from '../../../../stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
21
|
+
import { NewConnectionValueDriver } from '../../../../stores/editor/NewElementState.js';
|
22
|
+
import { externalFormat_urlStream_setUrl } from '../../../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
23
|
+
import { EXTERNAL_FORMAT_CONNECTION } from '../../../extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js';
|
24
|
+
export class ExternalFormatConnectionValueState extends ConnectionValueState {
|
25
|
+
connection;
|
26
|
+
constructor(editorStore, connection) {
|
27
|
+
super(editorStore, connection);
|
28
|
+
this.connection = connection;
|
29
|
+
}
|
30
|
+
label() {
|
31
|
+
return 'external format connection';
|
32
|
+
}
|
33
|
+
}
|
34
|
+
export const ExternalFormatConnectionEditor = observer((props) => {
|
35
|
+
const { connectionValueState, isReadOnly } = props;
|
36
|
+
const connection = connectionValueState.connection;
|
37
|
+
const changeUrl = (event) => externalFormat_urlStream_setUrl(connection.externalSource, event.target.value);
|
38
|
+
return (_jsx("div", { className: "external-format-connection-editor", children: _jsxs("div", { className: "external-format-connection-editor__section", children: [_jsx("div", { className: "external-format-connection-editor__section__header__label", children: "URL" }), _jsx("div", { className: "external-format-connection-editor__section__header__prompt", children: "Specifies the connection URL" }), _jsx("textarea", { className: "external-format-connection-editor__section__textarea", spellCheck: false, value: connection.externalSource.url, onChange: changeUrl, disabled: isReadOnly })] }) }));
|
39
|
+
});
|
40
|
+
export class NewExternalFormatConnectionDriver extends NewConnectionValueDriver {
|
41
|
+
constructor(editorStore) {
|
42
|
+
super(editorStore);
|
43
|
+
makeObservable(this, {
|
44
|
+
isValid: computed,
|
45
|
+
});
|
46
|
+
}
|
47
|
+
get isValid() {
|
48
|
+
return true;
|
49
|
+
}
|
50
|
+
getConnectionType() {
|
51
|
+
return EXTERNAL_FORMAT_CONNECTION;
|
52
|
+
}
|
53
|
+
createConnection(store) {
|
54
|
+
const externalFormatConnection = new ExternalFormatConnection(PackageableElementExplicitReference.create(store));
|
55
|
+
const urlStream = new UrlStream();
|
56
|
+
externalFormat_urlStream_setUrl(urlStream, '');
|
57
|
+
externalFormatConnection.externalSource = urlStream;
|
58
|
+
return externalFormatConnection;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
//# sourceMappingURL=DSL_ExternalFormat_ExternalFormatConnectionEditor.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"DSL_ExternalFormat_ExternalFormatConnectionEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/external-format-editor/DSL_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AC,sDAAsD,EAChE,UAAU,EAAE,KAAK,EACjB,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,GAAG,EACpC,QAAQ,EAAE,SAAS,EACnB,QAAQ,EAAE,UAAU,GACpB,IACE,GACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,OAAO,iCAAkC,SAAQ,wBAAkD;IACvG,YAAY,WAAwB;QAClC,KAAK,CAAC,WAAW,CAAC,CAAC;QAEnB,cAAc,CAAC,IAAI,EAAE;YACnB,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iBAAiB;QACf,OAAO,0BAA0B,CAAC;IACpC,CAAC;IAED,gBAAgB,CAAC,KAAc;QAC7B,MAAM,wBAAwB,GAAG,IAAI,wBAAwB,CAC3D,mCAAmC,CAAC,MAAM,CAAC,KAAK,CAAC,CAClD,CAAC;QACF,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;QAClC,+BAA+B,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC/C,wBAAwB,CAAC,cAAc,GAAG,SAAS,CAAC;QACpD,OAAO,wBAAwB,CAAC;IAClC,CAAC;CACF"}
|
@@ -14,12 +14,13 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { type ElementEditorRenderer, type ElementEditorStateCreator, type ElementIconGetter, type DragElementClassifier, type ElementClassifier, type NewElementDriverCreator, type NewElementDriverEditorRenderer, type NewElementFromStateCreator, type PureGrammarParserElementSnippetSuggestionsGetter, type PureGrammarParserElementDocumentationGetter, type PureGrammarParserDocumentationGetter, type PureGrammarParserKeywordSuggestionGetter, LegendStudioApplicationPlugin, type DSL_LegendStudioApplicationPlugin_Extension } from '../../stores/LegendStudioApplicationPlugin.js';
|
17
|
-
import type { ConnectionTypeOption, DSL_Mapping_LegendStudioApplicationPlugin_Extension } from '../../stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
|
17
|
+
import type { ConnectionEditorRenderer, ConnectionTypeOption, ConnectionValueEditorStateBuilder, DefaultConnectionValueBuilder, DSL_Mapping_LegendStudioApplicationPlugin_Extension, NewConnectionDriverCreator, PureGrammarConnectionLabeler, RuntimeConnectionTooltipTextBuilder } from '../../stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
|
18
18
|
export declare const EXTERNAL_FORMAT_CONNECTION = "EXTERNAL_FORMAT_CONNECTION";
|
19
19
|
export declare class DSL_ExternalFormat_LegendStudioApplicationPlugin extends LegendStudioApplicationPlugin implements DSL_LegendStudioApplicationPlugin_Extension, DSL_Mapping_LegendStudioApplicationPlugin_Extension {
|
20
20
|
constructor();
|
21
21
|
getExtraRequiredDocumentationKeys(): string[];
|
22
22
|
getExtraPureGrammarKeywords(): string[];
|
23
|
+
getExtraPureGrammarConnectionLabelers(): PureGrammarConnectionLabeler[];
|
23
24
|
getExtraSupportedElementTypes(): string[];
|
24
25
|
getExtraElementClassifiers(): ElementClassifier[];
|
25
26
|
getExtraElementIconGetters(): ElementIconGetter[];
|
@@ -30,6 +31,11 @@ export declare class DSL_ExternalFormat_LegendStudioApplicationPlugin extends Le
|
|
30
31
|
getExtraNewElementDriverEditorRenderers(): NewElementDriverEditorRenderer[];
|
31
32
|
getExtraDragElementClassifiers(): DragElementClassifier[];
|
32
33
|
getExtraPureGrammarTextEditorDragElementTypes(): string[];
|
34
|
+
getExtraRuntimeConnectionTooltipTextBuilders(): RuntimeConnectionTooltipTextBuilder[];
|
35
|
+
getExtraDefaultConnectionValueBuilders(): DefaultConnectionValueBuilder[];
|
36
|
+
getExtraConnectionValueEditorStateBuilders(): ConnectionValueEditorStateBuilder[];
|
37
|
+
getExtraConnectionEditorRenderers(): ConnectionEditorRenderer[];
|
38
|
+
getExtraNewConnectionDriverCreators(): NewConnectionDriverCreator[];
|
33
39
|
getExtraConnectionTypeOptions(): ConnectionTypeOption[];
|
34
40
|
getExtraPureGrammarParserElementDocumentationGetters(): PureGrammarParserElementDocumentationGetter[];
|
35
41
|
getExtraPureGrammarParserDocumentationGetters(): PureGrammarParserDocumentationGetter[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
1
|
+
{"version":3,"file":"DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts","sourceRoot":"","sources":["../../../src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAwBH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAC/B,KAAK,gDAAgD,EACrD,KAAK,2CAA2C,EAChD,KAAK,oCAAoC,EACzC,KAAK,wCAAwC,EAC7C,6BAA6B,EAC7B,KAAK,2CAA2C,EACjD,MAAM,+CAA+C,CAAC;AACvD,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EACpB,iCAAiC,EACjC,6BAA6B,EAC7B,mDAAmD,EACnD,0BAA0B,EAC1B,4BAA4B,EAC5B,mCAAmC,EACpC,MAAM,gFAAgF,CAAC;AAmCxF,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAQvE,qBAAa,gDACX,SAAQ,6BACR,YACE,2CAA2C,EAC3C,mDAAmD;;IAS5C,iCAAiC,IAAI,MAAM,EAAE;IAQtD,2BAA2B,IAAI,MAAM,EAAE;IAQvC,qCAAqC,IAAI,4BAA4B,EAAE;IAWvE,6BAA6B,IAAI,MAAM,EAAE;IAIzC,0BAA0B,IAAI,iBAAiB,EAAE;IAajD,0BAA0B,IAAI,iBAAiB,EAAE;IAqBjD,8BAA8B,IAAI,qBAAqB,EAAE;IAazD,mCAAmC,IAAI,0BAA0B,EAAE;IA+BnE,kCAAkC,IAAI,yBAAyB,EAAE;IAgBjE,gCAAgC,IAAI,uBAAuB,EAAE;IAc7D,uCAAuC,IAAI,8BAA8B,EAAE;IAW3E,8BAA8B,IAAI,qBAAqB,EAAE;IAYzD,6CAA6C,IAAI,MAAM,EAAE;IAOzD,4CAA4C,IAAI,mCAAmC,EAAE;IAWrF,sCAAsC,IAAI,6BAA6B,EAAE;IAiBzE,0CAA0C,IAAI,iCAAiC,EAAE;IAiBjF,iCAAiC,IAAI,wBAAwB,EAAE;IAqB/D,mCAAmC,IAAI,0BAA0B,EAAE;IAiBnE,6BAA6B,IAAI,oBAAoB,EAAE;IASvD,oDAAoD,IAAI,2CAA2C,EAAE;IAyBrG,6CAA6C,IAAI,oCAAoC,EAAE;IAgBvF,iDAAiD,IAAI,wCAAwC,EAAE;IAgB/F,yDAAyD,IAAI,gDAAgD,EAAE;CAuChH"}
|
@@ -17,13 +17,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
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
|
-
import { SchemaSet, Binding, ModelUnit, } from '@finos/legend-graph';
|
20
|
+
import { PackageableElementExplicitReference, SchemaSet, Binding, ModelUnit, ExternalFormatConnection, UrlStream, } from '@finos/legend-graph';
|
21
|
+
import { ExternalFormatConnectionEditor, ExternalFormatConnectionValueState, NewExternalFormatConnectionDriver, } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js';
|
21
22
|
import { BindingEditor } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js';
|
22
23
|
import { guaranteeNonNullable, prettyCONSTName } from '@finos/legend-shared';
|
23
24
|
import { LegendStudioApplicationPlugin, } from '../../stores/LegendStudioApplicationPlugin.js';
|
24
25
|
import { SchemaSetEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js';
|
25
26
|
import { BindingEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_BindingEditorState.js';
|
26
|
-
import { externalFormat_Binding_setContentType } from '../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
27
|
+
import { externalFormat_Binding_setContentType, externalFormat_urlStream_setUrl, } from '../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
27
28
|
import { DSL_EXTERNAL_FORMAT_LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../__lib__/DSL_ExternalFormat_LegendStudioDocumentation.js';
|
28
29
|
import { BASIC_BINDING_SNIPPET, BASIC_SCHEMASET_SNIPPET, SCHEMASET_WITH_JSON_SCHEMA_SNIPPET, SCHEMASET_WITH_XML_SCHEMA_SNIPPET, SCHEMASET_WITH_FLAT_DATA_SCHEMA_SNIPPET, } from '../../__lib__/DSL_ExternalFormat_LegendStudioCodeSnippet.js';
|
29
30
|
import { NewSchemaSetDriver, NewSchemaSetDriverEditor, } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.js';
|
@@ -35,6 +36,7 @@ export const EXTERNAL_FORMAT_CONNECTION = 'EXTERNAL_FORMAT_CONNECTION';
|
|
35
36
|
const PURE_GRAMMAR_EXTERNAL_FORMAT_PARSER_NAME = 'ExternalFormat';
|
36
37
|
const PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL = 'Binding';
|
37
38
|
const PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL = 'SchemaSet';
|
39
|
+
const PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL = 'ExternalFormatConnection';
|
38
40
|
export class DSL_ExternalFormat_LegendStudioApplicationPlugin extends LegendStudioApplicationPlugin {
|
39
41
|
constructor() {
|
40
42
|
super(packageJson.extensions.dsl_external_format_applicationStudioPlugin, packageJson.version);
|
@@ -50,6 +52,17 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin extends LegendStud
|
|
50
52
|
return [
|
51
53
|
PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL,
|
52
54
|
PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL,
|
55
|
+
PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL,
|
56
|
+
];
|
57
|
+
}
|
58
|
+
getExtraPureGrammarConnectionLabelers() {
|
59
|
+
return [
|
60
|
+
(connection) => {
|
61
|
+
if (connection instanceof ExternalFormatConnection) {
|
62
|
+
return PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL;
|
63
|
+
}
|
64
|
+
return undefined;
|
65
|
+
},
|
53
66
|
];
|
54
67
|
}
|
55
68
|
getExtraSupportedElementTypes() {
|
@@ -168,6 +181,63 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin extends LegendStud
|
|
168
181
|
BINDING_ELEMENT_PROJECT_EXPLORER_DND_TYPE,
|
169
182
|
];
|
170
183
|
}
|
184
|
+
getExtraRuntimeConnectionTooltipTextBuilders() {
|
185
|
+
return [
|
186
|
+
(connection) => {
|
187
|
+
if (connection instanceof ExternalFormatConnection) {
|
188
|
+
return `External format connection \u2022 store ${connection.store.value.path}`;
|
189
|
+
}
|
190
|
+
return undefined;
|
191
|
+
},
|
192
|
+
];
|
193
|
+
}
|
194
|
+
getExtraDefaultConnectionValueBuilders() {
|
195
|
+
return [
|
196
|
+
(store) => {
|
197
|
+
if (store instanceof Binding) {
|
198
|
+
const externalFormatConnection = new ExternalFormatConnection(PackageableElementExplicitReference.create(store));
|
199
|
+
const urlStream = new UrlStream();
|
200
|
+
externalFormat_urlStream_setUrl(urlStream, '');
|
201
|
+
externalFormatConnection.externalSource = urlStream;
|
202
|
+
return externalFormatConnection;
|
203
|
+
}
|
204
|
+
return undefined;
|
205
|
+
},
|
206
|
+
];
|
207
|
+
}
|
208
|
+
getExtraConnectionValueEditorStateBuilders() {
|
209
|
+
return [
|
210
|
+
(editorStore, connection) => {
|
211
|
+
if (connection instanceof ExternalFormatConnection) {
|
212
|
+
return new ExternalFormatConnectionValueState(editorStore, connection);
|
213
|
+
}
|
214
|
+
return undefined;
|
215
|
+
},
|
216
|
+
];
|
217
|
+
}
|
218
|
+
getExtraConnectionEditorRenderers() {
|
219
|
+
return [
|
220
|
+
(connectionValueState, isReadOnly) => {
|
221
|
+
if (connectionValueState instanceof ExternalFormatConnectionValueState) {
|
222
|
+
return (_jsx(ExternalFormatConnectionEditor, { connectionValueState: connectionValueState, isReadOnly: isReadOnly }));
|
223
|
+
}
|
224
|
+
return undefined;
|
225
|
+
},
|
226
|
+
];
|
227
|
+
}
|
228
|
+
getExtraNewConnectionDriverCreators() {
|
229
|
+
return [
|
230
|
+
(editorStore, typeOrStore) => {
|
231
|
+
if (typeOrStore instanceof Binding) {
|
232
|
+
return new NewExternalFormatConnectionDriver(editorStore);
|
233
|
+
}
|
234
|
+
if (typeOrStore === EXTERNAL_FORMAT_CONNECTION) {
|
235
|
+
return new NewExternalFormatConnectionDriver(editorStore);
|
236
|
+
}
|
237
|
+
return undefined;
|
238
|
+
},
|
239
|
+
];
|
240
|
+
}
|
171
241
|
getExtraConnectionTypeOptions() {
|
172
242
|
return [
|
173
243
|
{
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DSL_ExternalFormat_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,4FAA4F,CAAC;AAC7H,OAAO,
|
1
|
+
{"version":3,"file":"DSL_ExternalFormat_LegendStudioApplicationPlugin.js","sourceRoot":"","sources":["../../../src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,WAAW,MAAM,uBAAuB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,4FAA4F,CAAC;AAC7H,OAAO,EAIL,mCAAmC,EACnC,SAAS,EACT,OAAO,EACP,SAAS,EACT,wBAAwB,EACxB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,iCAAiC,GAClC,MAAM,oGAAoG,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0FAA0F,CAAC;AACzH,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAaL,6BAA6B,GAE9B,MAAM,+CAA+C,CAAC;AAavD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kHAAkH,CAAC;AACxJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,gHAAgH,CAAC;AAEpJ,OAAO,EACL,qCAAqC,EACrC,+BAA+B,GAChC,MAAM,uEAAuE,CAAC;AAE/E,OAAO,EAAE,mDAAmD,EAAE,MAAM,+DAA+D,CAAC;AACpI,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,kCAAkC,EAClC,iCAAiC,EACjC,uCAAuC,GACxC,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,wFAAwF,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C,gBAAgB,CAAC,oBAAoB,CAAC,WAAW,CAClE,mDAAmD,CAAC,cAAc,CACnE,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,wCAAwC;oBAC9C,WAAW,EAAE,OAAO;oBACpB,aAAa,EACX,WAAW,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,WAAW,CAC3D,mDAAmD,CAAC,cAAc,CACnE;oBACH,UAAU,EAAE,wCAAwC;iBACrD;aACF;SACF,CAAC;IACJ,CAAC;IAED,yDAAyD;QACvD,OAAO;YACL,CACE,WAAwB,EACxB,aAAqB,EACoB,EAAE,CAC3C,aAAa,KAAK,wCAAwC;gBACxD,CAAC,CAAC;oBACE,UAAU;oBACV;wBACE,IAAI,EAAE,uCAAuC;wBAC7C,WAAW,EAAE,SAAS;wBACtB,UAAU,EAAE,qBAAqB;qBAClC;oBACD,aAAa;oBACb;wBACE,IAAI,EAAE,0CAA0C;wBAChD,WAAW,EAAE,SAAS;wBACtB,UAAU,EAAE,uBAAuB;qBACpC;oBACD;wBACE,IAAI,EAAE,0CAA0C;wBAChD,WAAW,EAAE,gBAAgB;wBAC7B,UAAU,EAAE,uCAAuC;qBACpD;oBACD;wBACE,IAAI,EAAE,0CAA0C;wBAChD,WAAW,EAAE,iBAAiB;wBAC9B,UAAU,EAAE,kCAAkC;qBAC/C;oBACD;wBACE,IAAI,EAAE,0CAA0C;wBAChD,WAAW,EAAE,gBAAgB;wBAC7B,UAAU,EAAE,iCAAiC;qBAC9C;iBACF;gBACH,CAAC,CAAC,SAAS;SAChB,CAAC;IACJ,CAAC;CACF"}
|
package/lib/index.css
CHANGED
package/lib/package.json
CHANGED
package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js
CHANGED
@@ -40,7 +40,7 @@ export const generateStoreTestDataFromSetImpl = (setImpl, editorStore, tryAndMoc
|
|
40
40
|
const _table = getMappingElementSource(setImpl, editorStore.pluginManager.getApplicationPlugins());
|
41
41
|
if (_table instanceof TableAlias) {
|
42
42
|
const relation = _table.relation.value;
|
43
|
-
const owner =
|
43
|
+
const owner = relation.schema._OWNER;
|
44
44
|
const val = new RelationalCSVData();
|
45
45
|
if (tryAndMockTable && relation instanceof Table) {
|
46
46
|
const mockTable = new RelationalCSVDataTable();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MappingTestingHelper.js","sourceRoot":"","sources":["../../../../../../../src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EAQd,kBAAkB,EAClB,mCAAmC,EACnC,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gCAAgC,EAChC,aAAa,EACb,mCAAmC,EACnC,2CAA2C,EAC3C,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,qCAAqC,GACtC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAgB,EAChB,iBAAoC,EACpC,IAAwB,EACb,EAAE;IACb,MAAM,cAAc,GAA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AM,KAAK,GAAG,
|
1
|
+
{"version":3,"file":"MappingTestingHelper.js","sourceRoot":"","sources":["../../../../../../../src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,cAAc,EAQd,kBAAkB,EAClB,mCAAmC,EACnC,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gCAAgC,EAChC,aAAa,EACb,mCAAmC,EACnC,2CAA2C,EAC3C,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,WAAW,EACX,UAAU,EACV,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,oCAAoC,GACrC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,qCAAqC,GACtC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAgB,EAChB,iBAAoC,EACpC,IAAwB,EACb,EAAE;IACb,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,YAAY,CACd,mCAAmC,CAAC,MAAM,CACxC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CACpD,EACD,YAAY,CAAC,GAAG,CACjB,CACF,CAAC;IACF,MAAM,cAAc,GAAG,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,oCAAoC,CACpD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AC,OAAO,KAAK,EAAE;QACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;QACzB,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,IAAI,YAAY,CACd,mCAAmC,CAAC,MAAM,CACxC,iBAAiB,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,CACpD,EACD,YAAY,CAAC,GAAG,CACjB,CACF,CAAC;QACF,cAAc,CAAC,kBAAkB,GAAG;YAClC,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC;SAC9C,CAAC;QACF,OAAO,gCAAgC,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;KAC5E;AACH,CAAC,CAAC"}
|
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.9",
|
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.31",
|
49
|
+
"@finos/legend-art": "7.0.31",
|
50
|
+
"@finos/legend-graph": "30.0.17",
|
51
|
+
"@finos/legend-lego": "1.1.9",
|
52
|
+
"@finos/legend-query-builder": "4.1.9",
|
53
|
+
"@finos/legend-server-depot": "6.0.20",
|
54
|
+
"@finos/legend-server-sdlc": "5.0.22",
|
55
|
+
"@finos/legend-shared": "10.0.19",
|
56
|
+
"@finos/legend-storage": "3.0.69",
|
57
57
|
"@testing-library/react": "14.0.0",
|
58
58
|
"@types/react": "18.2.14",
|
59
59
|
"@types/react-dom": "18.2.6",
|
@@ -0,0 +1,103 @@
|
|
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
|
+
import { observer } from 'mobx-react-lite';
|
17
|
+
import {
|
18
|
+
ExternalFormatConnection,
|
19
|
+
PackageableElementExplicitReference,
|
20
|
+
UrlStream,
|
21
|
+
type Binding,
|
22
|
+
} from '@finos/legend-graph';
|
23
|
+
import { computed, makeObservable } from 'mobx';
|
24
|
+
import { ConnectionValueState } from '../../../../stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
25
|
+
import type { EditorStore } from '../../../../stores/editor/EditorStore.js';
|
26
|
+
import { NewConnectionValueDriver } from '../../../../stores/editor/NewElementState.js';
|
27
|
+
import { externalFormat_urlStream_setUrl } from '../../../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
28
|
+
import { EXTERNAL_FORMAT_CONNECTION } from '../../../extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js';
|
29
|
+
|
30
|
+
export class ExternalFormatConnectionValueState extends ConnectionValueState {
|
31
|
+
override connection: ExternalFormatConnection;
|
32
|
+
|
33
|
+
constructor(editorStore: EditorStore, connection: ExternalFormatConnection) {
|
34
|
+
super(editorStore, connection);
|
35
|
+
this.connection = connection;
|
36
|
+
}
|
37
|
+
|
38
|
+
label(): string {
|
39
|
+
return 'external format connection';
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
export const ExternalFormatConnectionEditor = observer(
|
44
|
+
(props: {
|
45
|
+
connectionValueState: ExternalFormatConnectionValueState;
|
46
|
+
isReadOnly: boolean;
|
47
|
+
}) => {
|
48
|
+
const { connectionValueState, isReadOnly } = props;
|
49
|
+
const connection = connectionValueState.connection;
|
50
|
+
const changeUrl: React.ChangeEventHandler<HTMLTextAreaElement> = (event) =>
|
51
|
+
externalFormat_urlStream_setUrl(
|
52
|
+
connection.externalSource,
|
53
|
+
event.target.value,
|
54
|
+
);
|
55
|
+
return (
|
56
|
+
<div className="external-format-connection-editor">
|
57
|
+
<div className="external-format-connection-editor__section">
|
58
|
+
<div className="external-format-connection-editor__section__header__label">
|
59
|
+
URL
|
60
|
+
</div>
|
61
|
+
<div className="external-format-connection-editor__section__header__prompt">
|
62
|
+
Specifies the connection URL
|
63
|
+
</div>
|
64
|
+
<textarea
|
65
|
+
className="external-format-connection-editor__section__textarea"
|
66
|
+
spellCheck={false}
|
67
|
+
value={connection.externalSource.url}
|
68
|
+
onChange={changeUrl}
|
69
|
+
disabled={isReadOnly}
|
70
|
+
/>
|
71
|
+
</div>
|
72
|
+
</div>
|
73
|
+
);
|
74
|
+
},
|
75
|
+
);
|
76
|
+
|
77
|
+
export class NewExternalFormatConnectionDriver extends NewConnectionValueDriver<ExternalFormatConnection> {
|
78
|
+
constructor(editorStore: EditorStore) {
|
79
|
+
super(editorStore);
|
80
|
+
|
81
|
+
makeObservable(this, {
|
82
|
+
isValid: computed,
|
83
|
+
});
|
84
|
+
}
|
85
|
+
|
86
|
+
get isValid(): boolean {
|
87
|
+
return true;
|
88
|
+
}
|
89
|
+
|
90
|
+
getConnectionType(): string {
|
91
|
+
return EXTERNAL_FORMAT_CONNECTION;
|
92
|
+
}
|
93
|
+
|
94
|
+
createConnection(store: Binding): ExternalFormatConnection {
|
95
|
+
const externalFormatConnection = new ExternalFormatConnection(
|
96
|
+
PackageableElementExplicitReference.create(store),
|
97
|
+
);
|
98
|
+
const urlStream = new UrlStream();
|
99
|
+
externalFormat_urlStream_setUrl(urlStream, '');
|
100
|
+
externalFormatConnection.externalSource = urlStream;
|
101
|
+
return externalFormatConnection;
|
102
|
+
}
|
103
|
+
}
|
@@ -18,11 +18,21 @@ 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,
|
21
22
|
type PackageableElement,
|
23
|
+
type Store,
|
24
|
+
PackageableElementExplicitReference,
|
22
25
|
SchemaSet,
|
23
26
|
Binding,
|
24
27
|
ModelUnit,
|
28
|
+
ExternalFormatConnection,
|
29
|
+
UrlStream,
|
25
30
|
} from '@finos/legend-graph';
|
31
|
+
import {
|
32
|
+
ExternalFormatConnectionEditor,
|
33
|
+
ExternalFormatConnectionValueState,
|
34
|
+
NewExternalFormatConnectionDriver,
|
35
|
+
} from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js';
|
26
36
|
import { BindingEditor } from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js';
|
27
37
|
import { guaranteeNonNullable, prettyCONSTName } from '@finos/legend-shared';
|
28
38
|
import type { ReactNode } from 'react';
|
@@ -43,14 +53,24 @@ import {
|
|
43
53
|
type DSL_LegendStudioApplicationPlugin_Extension,
|
44
54
|
} from '../../stores/LegendStudioApplicationPlugin.js';
|
45
55
|
import type {
|
56
|
+
ConnectionEditorRenderer,
|
46
57
|
ConnectionTypeOption,
|
58
|
+
ConnectionValueEditorStateBuilder,
|
59
|
+
DefaultConnectionValueBuilder,
|
47
60
|
DSL_Mapping_LegendStudioApplicationPlugin_Extension,
|
61
|
+
NewConnectionDriverCreator,
|
62
|
+
PureGrammarConnectionLabeler,
|
63
|
+
RuntimeConnectionTooltipTextBuilder,
|
48
64
|
} from '../../stores/extensions/DSL_Mapping_LegendStudioApplicationPlugin_Extension.js';
|
49
65
|
import type { EditorStore } from '../../stores/editor/EditorStore.js';
|
50
66
|
import type { ElementEditorState } from '../../stores/editor/editor-state/element-editor-state/ElementEditorState.js';
|
51
67
|
import { SchemaSetEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js';
|
52
68
|
import { BindingEditorState } from '../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_BindingEditorState.js';
|
53
|
-
import {
|
69
|
+
import type { ConnectionValueState } from '../../stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
70
|
+
import {
|
71
|
+
externalFormat_Binding_setContentType,
|
72
|
+
externalFormat_urlStream_setUrl,
|
73
|
+
} from '../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
54
74
|
import type { DocumentationEntry } from '@finos/legend-application';
|
55
75
|
import { DSL_EXTERNAL_FORMAT_LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../__lib__/DSL_ExternalFormat_LegendStudioDocumentation.js';
|
56
76
|
import {
|
@@ -65,6 +85,7 @@ import {
|
|
65
85
|
NewSchemaSetDriverEditor,
|
66
86
|
} from '../editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.js';
|
67
87
|
import type {
|
88
|
+
NewConnectionValueDriver,
|
68
89
|
NewElementDriver,
|
69
90
|
NewElementState,
|
70
91
|
} from '../../stores/editor/NewElementState.js';
|
@@ -80,6 +101,8 @@ export const EXTERNAL_FORMAT_CONNECTION = 'EXTERNAL_FORMAT_CONNECTION';
|
|
80
101
|
const PURE_GRAMMAR_EXTERNAL_FORMAT_PARSER_NAME = 'ExternalFormat';
|
81
102
|
const PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL = 'Binding';
|
82
103
|
const PURE_GRAMMAR_SCHEMA_SET_ELEMENT_TYPE_LABEL = 'SchemaSet';
|
104
|
+
const PURE_GRAMMAR_EXTERNAL_FORMAT_CONNECTION_TYPE_LABEL =
|
105
|
+
'ExternalFormatConnection';
|
83
106
|
|
84
107
|
export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
85
108
|
extends LegendStudioApplicationPlugin
|
@@ -106,6 +129,18 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
|
106
129
|
return [
|
107
130
|
PURE_GRAMMAR_BINDING_ELEMENT_TYPE_LABEL,
|
108
131
|
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
|
+
},
|
109
144
|
];
|
110
145
|
}
|
111
146
|
|
@@ -251,6 +286,89 @@ export class DSL_ExternalFormat_LegendStudioApplicationPlugin
|
|
251
286
|
];
|
252
287
|
}
|
253
288
|
|
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
|
+
|
254
372
|
getExtraConnectionTypeOptions(): ConnectionTypeOption[] {
|
255
373
|
return [
|
256
374
|
{
|
package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts
CHANGED
@@ -117,7 +117,7 @@ export const generateStoreTestDataFromSetImpl = (
|
|
117
117
|
);
|
118
118
|
if (_table instanceof TableAlias) {
|
119
119
|
const relation = _table.relation.value;
|
120
|
-
const owner =
|
120
|
+
const owner = relation.schema._OWNER;
|
121
121
|
const val = new RelationalCSVData();
|
122
122
|
if (tryAndMockTable && relation instanceof Table) {
|
123
123
|
const mockTable = new RelationalCSVDataTable();
|
package/tsconfig.json
CHANGED
@@ -210,6 +210,7 @@
|
|
210
210
|
"./src/components/editor/editor-group/element-generation-editor/FileGenerationEditor.tsx",
|
211
211
|
"./src/components/editor/editor-group/element-generation-editor/FileSystemViewer.tsx",
|
212
212
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx",
|
213
|
+
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx",
|
213
214
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.tsx",
|
214
215
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx",
|
215
216
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx",
|