@finos/legend-application-studio 27.1.6 → 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/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/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/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +3 -1
- 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
@@ -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/Testable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AAY,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",
|
@@ -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) {
|
@@ -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) {
|
package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts
CHANGED
@@ -62,6 +62,7 @@ import {
|
|
62
62
|
assertTrue,
|
63
63
|
guaranteeNonNullable,
|
64
64
|
} from '@finos/legend-shared';
|
65
|
+
import type { DSL_Data_LegendStudioApplicationPlugin_Extension } from '../../../../../extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.js';
|
65
66
|
|
66
67
|
export const createGraphFetchRawLambda = (
|
67
68
|
mainClass: Class,
|
@@ -116,7 +117,7 @@ export const generateStoreTestDataFromSetImpl = (
|
|
116
117
|
);
|
117
118
|
if (_table instanceof TableAlias) {
|
118
119
|
const relation = _table.relation.value;
|
119
|
-
const owner = relation.
|
120
|
+
const owner = _table.relation.ownerReference.value;
|
120
121
|
const val = new RelationalCSVData();
|
121
122
|
if (tryAndMockTable && relation instanceof Table) {
|
122
123
|
const mockTable = new RelationalCSVDataTable();
|
@@ -137,6 +138,20 @@ export const generateStoreTestDataFromSetImpl = (
|
|
137
138
|
return createStoreBareModelStoreData(srcClass.value, editorStore);
|
138
139
|
}
|
139
140
|
}
|
141
|
+
const extraStoreDataCreators = editorStore.pluginManager
|
142
|
+
.getApplicationPlugins()
|
143
|
+
.flatMap(
|
144
|
+
(plugin) =>
|
145
|
+
(
|
146
|
+
plugin as DSL_Data_LegendStudioApplicationPlugin_Extension
|
147
|
+
).getExtraStoreTestDataCreators?.() ?? [],
|
148
|
+
);
|
149
|
+
for (const creator of extraStoreDataCreators) {
|
150
|
+
const embeddedData = creator(setImpl);
|
151
|
+
if (embeddedData) {
|
152
|
+
return embeddedData;
|
153
|
+
}
|
154
|
+
}
|
140
155
|
return undefined;
|
141
156
|
};
|
142
157
|
|
@@ -59,6 +59,7 @@ import {
|
|
59
59
|
import { EmbeddedDataType } from '../editor-state/ExternalFormatState.js';
|
60
60
|
import type { EditorStore } from '../EditorStore.js';
|
61
61
|
import { createMockDataForMappingElementSource } from './MockDataUtils.js';
|
62
|
+
import type { DSL_Data_LegendStudioApplicationPlugin_Extension } from '../../extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.js';
|
62
63
|
|
63
64
|
export const DEFAULT_TEST_ASSERTION_ID = 'assertion_1';
|
64
65
|
export const DEFAULT_TEST_ID = 'test_1';
|
@@ -127,8 +128,28 @@ export const createBareModelStoreData = (
|
|
127
128
|
export class EmbeddedDataCreatorFromEmbeddedData
|
128
129
|
implements EmbeddedDataVisitor<EmbeddedData>
|
129
130
|
{
|
131
|
+
editorStore: EditorStore;
|
132
|
+
constructor(editorStore: EditorStore) {
|
133
|
+
this.editorStore = editorStore;
|
134
|
+
}
|
130
135
|
visit_EmbeddedData(data: EmbeddedData): EmbeddedData {
|
131
|
-
|
136
|
+
const extraEmbeddedDataCloners = this.editorStore.pluginManager
|
137
|
+
.getApplicationPlugins()
|
138
|
+
.flatMap(
|
139
|
+
(plugin) =>
|
140
|
+
(
|
141
|
+
plugin as DSL_Data_LegendStudioApplicationPlugin_Extension
|
142
|
+
).getExtraEmbeddedDataCloners?.() ?? [],
|
143
|
+
);
|
144
|
+
for (const creator of extraEmbeddedDataCloners) {
|
145
|
+
const embeddedData = creator(data);
|
146
|
+
if (embeddedData) {
|
147
|
+
return embeddedData;
|
148
|
+
}
|
149
|
+
}
|
150
|
+
throw new UnsupportedOperationError(
|
151
|
+
`Unsupported embedded data${data.toString()}`,
|
152
|
+
);
|
132
153
|
}
|
133
154
|
visit_INTERNAL__UnknownEmbeddedData(
|
134
155
|
data: INTERNAL__UnknownEmbeddedData,
|
@@ -149,7 +170,7 @@ export class EmbeddedDataCreatorFromEmbeddedData
|
|
149
170
|
const v = new ModelEmbeddedData();
|
150
171
|
v.model = PackageableElementExplicitReference.create(e.model.value);
|
151
172
|
v.data = e.data.accept_EmbeddedDataVisitor(
|
152
|
-
new EmbeddedDataCreatorFromEmbeddedData(),
|
173
|
+
new EmbeddedDataCreatorFromEmbeddedData(this.editorStore),
|
153
174
|
);
|
154
175
|
return v;
|
155
176
|
}
|
@@ -160,7 +181,7 @@ export class EmbeddedDataCreatorFromEmbeddedData
|
|
160
181
|
}
|
161
182
|
visit_DataElementReference(data: DataElementReference): EmbeddedData {
|
162
183
|
return data.dataElement.value.data.accept_EmbeddedDataVisitor(
|
163
|
-
new EmbeddedDataCreatorFromEmbeddedData(),
|
184
|
+
new EmbeddedDataCreatorFromEmbeddedData(this.editorStore),
|
164
185
|
);
|
165
186
|
}
|
166
187
|
visit_RelationalCSVData(data: RelationalCSVData): EmbeddedData {
|
@@ -224,6 +245,20 @@ export class EmbeddedDataConnectionTypeVisitor
|
|
224
245
|
}
|
225
246
|
|
226
247
|
visit_Connection(connection: Connection): string {
|
248
|
+
const extraEmbeddedDataCreator = this.editorStore.pluginManager
|
249
|
+
.getApplicationPlugins()
|
250
|
+
.flatMap(
|
251
|
+
(plugin) =>
|
252
|
+
(
|
253
|
+
plugin as DSL_Data_LegendStudioApplicationPlugin_Extension
|
254
|
+
).getExtraEmbeddedDataTypeFromConnectionMatchers?.() ?? [],
|
255
|
+
);
|
256
|
+
for (const creator of extraEmbeddedDataCreator) {
|
257
|
+
const embeddedData = creator(connection);
|
258
|
+
if (embeddedData) {
|
259
|
+
return embeddedData;
|
260
|
+
}
|
261
|
+
}
|
227
262
|
return EmbeddedDataType.EXTERNAL_FORMAT_DATA;
|
228
263
|
}
|
229
264
|
visit_INTERNAL__UnknownConnection(
|
@@ -14,7 +14,12 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import type {
|
17
|
+
import type {
|
18
|
+
Connection,
|
19
|
+
EmbeddedData,
|
20
|
+
SetImplementation,
|
21
|
+
StoreTestData,
|
22
|
+
} from '@finos/legend-graph';
|
18
23
|
import type { EmbeddedDataTypeOption } from '../editor/editor-state/element-editor-state/data/DataEditorState.js';
|
19
24
|
import type { EmbeddedDataState } from '../editor/editor-state/element-editor-state/data/EmbeddedDataState.js';
|
20
25
|
import type { EditorStore } from '../editor/EditorStore.js';
|
@@ -35,6 +40,18 @@ export type EmbeddedDataCreator = (
|
|
35
40
|
embeddedDataType: string,
|
36
41
|
) => EmbeddedData | undefined;
|
37
42
|
|
43
|
+
export type EmbeddedDataCloner = (
|
44
|
+
embeddedData: EmbeddedData,
|
45
|
+
) => EmbeddedData | undefined;
|
46
|
+
|
47
|
+
export type StoreTestDataCreators = (
|
48
|
+
setImp: SetImplementation,
|
49
|
+
) => StoreTestData | undefined;
|
50
|
+
|
51
|
+
export type EmbeddedDataTypeFromConnectionMatcher = (
|
52
|
+
connection: Connection,
|
53
|
+
) => string | undefined;
|
54
|
+
|
38
55
|
/**
|
39
56
|
* NOTE: The tab-stop index of the snippet must start from 2
|
40
57
|
*/
|
@@ -67,4 +84,19 @@ export interface DSL_Data_LegendStudioApplicationPlugin_Extension
|
|
67
84
|
* Get the list of embedded data creators
|
68
85
|
*/
|
69
86
|
getExtraEmbeddedDataCreators?(): EmbeddedDataCreator[];
|
87
|
+
|
88
|
+
/**
|
89
|
+
* Get the list of embedded data type from connection matchers
|
90
|
+
*/
|
91
|
+
getExtraEmbeddedDataTypeFromConnectionMatchers?(): EmbeddedDataTypeFromConnectionMatcher[];
|
92
|
+
|
93
|
+
/**
|
94
|
+
* Get the list of store test data creators
|
95
|
+
*/
|
96
|
+
getExtraStoreTestDataCreators?(): StoreTestDataCreators[];
|
97
|
+
|
98
|
+
/**
|
99
|
+
* Get the list of embedded data cloners
|
100
|
+
*/
|
101
|
+
getExtraEmbeddedDataCloners?(): EmbeddedDataCloner[];
|
70
102
|
}
|
package/tsconfig.json
CHANGED
@@ -210,7 +210,6 @@
|
|
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",
|
214
213
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.tsx",
|
215
214
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx",
|
216
215
|
"./src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx",
|
@@ -1,22 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,61 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"DSL_ExternalFormat_ExternalFormatConnectionEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,SAAS,GAEV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iGAAiG,CAAC;AAEvI,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;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