@finos/legend-application-studio 26.1.8 → 26.1.10
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/StatusBar.d.ts.map +1 -1
- package/lib/components/editor/StatusBar.js +1 -4
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/editor-group/{FileGenerationViewer.d.ts → ArtifactGenerationViewer.d.ts} +2 -2
- package/lib/components/editor/editor-group/ArtifactGenerationViewer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/ArtifactGenerationViewer.js +32 -0
- package/lib/components/editor/editor-group/ArtifactGenerationViewer.js.map +1 -0
- package/lib/components/editor/editor-group/EditorGroup.js +6 -6
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +2 -2
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/DataElementEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/DataElementEditor.js +1 -1
- package/lib/components/editor/editor-group/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.d.ts +15 -2
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js +47 -6
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js +18 -3
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.js +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileSystemViewer.d.ts.map +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileSystemViewer.js +1 -1
- package/lib/components/editor/editor-group/element-generation-editor/FileSystemViewer.js.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.d.ts.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.js +2 -2
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.js.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js +0 -3
- package/lib/components/editor/editor-group/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +36 -72
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.d.ts +5 -0
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js +53 -8
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.js +3 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js +7 -3
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js.map +1 -1
- package/lib/components/editor/panel-group/DevToolPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/DevToolPanel.js +4 -1
- package/lib/components/editor/panel-group/DevToolPanel.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +1 -1
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +4 -4
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +7 -6
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.js +2 -2
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/ExplorerTreeState.d.ts +3 -3
- package/lib/stores/editor/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/editor/ExplorerTreeState.js +10 -10
- package/lib/stores/editor/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +3 -3
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +2 -2
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/editor-state/{FileGenerationViewerState.d.ts → ArtifactGenerationViewerState.d.ts} +4 -4
- package/lib/stores/editor/editor-state/ArtifactGenerationViewerState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/{FileGenerationViewerState.js → ArtifactGenerationViewerState.js} +10 -9
- package/lib/stores/editor/editor-state/ArtifactGenerationViewerState.js.map +1 -0
- package/lib/stores/editor/editor-state/FileGenerationState.js +1 -1
- package/lib/stores/editor/editor-state/FileGenerationState.js.map +1 -1
- package/lib/stores/editor/editor-state/GraphGenerationState.d.ts +32 -19
- package/lib/stores/editor/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/GraphGenerationState.js +173 -113
- package/lib/stores/editor/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +22 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js +56 -5
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +12 -12
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +113 -61
- 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/service/ServiceEditorState.d.ts +4 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js +23 -9
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +5 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +23 -16
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts +3 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +11 -7
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +3 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +29 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js +8 -6
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +14 -2
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +75 -5
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts +4 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.js +70 -2
- package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +1 -2
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +4 -13
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_Data_GraphModifierHelper.d.ts +6 -2
- package/lib/stores/graph-modifier/DSL_Data_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_Data_GraphModifierHelper.js +23 -4
- package/lib/stores/graph-modifier/DSL_Data_GraphModifierHelper.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js.map +1 -1
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.d.ts +1 -0
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.js +3 -0
- package/lib/stores/graph-modifier/STO_Relational_GraphModifierHelper.js.map +1 -1
- package/lib/stores/project-view/ProjectViewerStore.js +1 -1
- package/lib/stores/project-view/ProjectViewerStore.js.map +1 -1
- package/package.json +14 -14
- package/src/components/editor/StatusBar.tsx +1 -4
- package/src/components/editor/editor-group/{FileGenerationViewer.tsx → ArtifactGenerationViewer.tsx} +28 -25
- package/src/components/editor/editor-group/EditorGroup.tsx +6 -6
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +13 -0
- package/src/components/editor/editor-group/data-editor/DataElementEditor.tsx +1 -1
- package/src/components/editor/editor-group/data-editor/EmbeddedDataEditor.tsx +130 -4
- package/src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx +65 -0
- package/src/components/editor/editor-group/element-generation-editor/FileGenerationEditor.tsx +1 -1
- package/src/components/editor/editor-group/element-generation-editor/FileSystemViewer.tsx +4 -4
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_NewSchemaSetDriver.tsx +6 -3
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +1 -1
- package/src/components/editor/editor-group/mapping-editor/MappingEditor.tsx +0 -6
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +159 -366
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestDataEditor.tsx +187 -61
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestableEditor.tsx +26 -18
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +85 -83
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +2 -2
- package/src/components/editor/panel-group/DevToolPanel.tsx +14 -0
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +3 -5
- package/src/components/editor/side-bar/Explorer.tsx +1 -1
- package/src/stores/editor/EditorGraphState.ts +7 -6
- package/src/stores/editor/EditorStore.ts +2 -2
- package/src/stores/editor/ExplorerTreeState.ts +10 -10
- package/src/stores/editor/NewElementState.ts +5 -5
- package/src/stores/editor/editor-state/{FileGenerationViewerState.ts → ArtifactGenerationViewerState.ts} +12 -9
- package/src/stores/editor/editor-state/FileGenerationState.ts +1 -1
- package/src/stores/editor/editor-state/GraphGenerationState.ts +258 -170
- package/src/stores/editor/editor-state/element-editor-state/ElementEditorState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts +75 -4
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +157 -69
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.ts +45 -10
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +37 -15
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +15 -8
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +57 -6
- package/src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts +10 -6
- package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +92 -3
- package/src/stores/editor/utils/MockDataUtils.ts +109 -1
- package/src/stores/editor/utils/TestableUtils.ts +4 -19
- package/src/stores/graph-modifier/DSL_Data_GraphModifierHelper.ts +45 -6
- package/src/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.ts +1 -1
- package/src/stores/graph-modifier/STO_Relational_GraphModifierHelper.ts +6 -0
- package/src/stores/project-view/ProjectViewerStore.ts +1 -1
- package/tsconfig.json +2 -2
- package/lib/components/editor/editor-group/FileGenerationViewer.d.ts.map +0 -1
- package/lib/components/editor/editor-group/FileGenerationViewer.js +0 -32
- package/lib/components/editor/editor-group/FileGenerationViewer.js.map +0 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.d.ts.map +0 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.js.map +0 -1
@@ -66,8 +66,7 @@ import { UnsupportedElementEditor } from './UnsupportedElementEditor.js';
|
|
66
66
|
import { getPrettyLabelForRevision } from '../../../stores/editor/editor-state/entity-diff-editor-state/EntityDiffEditorState.js';
|
67
67
|
import { GenerationSpecificationEditorState } from '../../../stores/editor/editor-state/GenerationSpecificationEditorState.js';
|
68
68
|
import { GenerationSpecificationEditor } from './GenerationSpecificationEditor.js';
|
69
|
-
import {
|
70
|
-
import { FileGenerationViewer } from './FileGenerationViewer.js';
|
69
|
+
import { ArtifactGenerationViewer } from './ArtifactGenerationViewer.js';
|
71
70
|
import type { DSL_LegendStudioApplicationPlugin_Extension } from '../../../stores/LegendStudioApplicationPlugin.js';
|
72
71
|
import { useEditorStore } from '../EditorStoreProvider.js';
|
73
72
|
import { PackageableDataEditorState } from '../../../stores/editor/editor-state/element-editor-state/data/DataEditorState.js';
|
@@ -77,6 +76,7 @@ import { TabManager, type TabState } from '@finos/legend-lego/application';
|
|
77
76
|
import { INTERNAL__UnknownFunctionActivatorEdtiorState } from '../../../stores/editor/editor-state/element-editor-state/INTERNAL__UnknownFunctionActivatorEditorState.js';
|
78
77
|
import { INTERNAL__UnknownFunctionActivatorEdtior } from './INTERNAL__UnknownFunctionActivatorEdtior.js';
|
79
78
|
import { getElementIcon } from '../../ElementIconUtils.js';
|
79
|
+
import { ArtifactGenerationViewerState } from '../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
|
80
80
|
|
81
81
|
export const ViewerEditorGroupSplashScreen: React.FC = () => {
|
82
82
|
const commandListWidth = 300;
|
@@ -194,7 +194,7 @@ export const EditorGroup = observer(() => {
|
|
194
194
|
: [];
|
195
195
|
const generationViewModes = (
|
196
196
|
currentTabState instanceof ElementEditorState
|
197
|
-
? editorStore.graphState.graphGenerationState.fileGenerationConfigurations
|
197
|
+
? editorStore.graphState.graphGenerationState.globalFileGenerationState.fileGenerationConfigurations
|
198
198
|
.slice()
|
199
199
|
.sort((a, b): number => a.label.localeCompare(b.label))
|
200
200
|
: []
|
@@ -309,8 +309,8 @@ export const EditorGroup = observer(() => {
|
|
309
309
|
conflictEditorState={currentTabState}
|
310
310
|
/>
|
311
311
|
);
|
312
|
-
} else if (currentTabState instanceof
|
313
|
-
return <
|
312
|
+
} else if (currentTabState instanceof ArtifactGenerationViewerState) {
|
313
|
+
return <ArtifactGenerationViewer key={currentTabState.uuid} />;
|
314
314
|
} else if (currentTabState instanceof ModelImporterState) {
|
315
315
|
return <ModelImporter />;
|
316
316
|
} else if (currentTabState instanceof ProjectConfigurationEditorState) {
|
@@ -478,7 +478,7 @@ export const EditorGroup = observer(() => {
|
|
478
478
|
key={mode.key}
|
479
479
|
className="editor-group__view-mode__option"
|
480
480
|
disabled={
|
481
|
-
!editorStore.graphState.graphGenerationState.supportedFileGenerationConfigurationsForCurrentElement.includes(
|
481
|
+
!editorStore.graphState.graphGenerationState.globalFileGenerationState.supportedFileGenerationConfigurationsForCurrentElement.includes(
|
482
482
|
mode,
|
483
483
|
)
|
484
484
|
}
|
package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx
CHANGED
@@ -128,6 +128,7 @@ import {
|
|
128
128
|
snowflakeDatasourceSpec_setProxyHost,
|
129
129
|
snowflakeDatasourceSpec_setProxyPort,
|
130
130
|
snowflakeDatasourceSpec_setQuotedIdentifiersIgnoreCase,
|
131
|
+
snowflakeDatasourceSpec_setEnableQueryTags,
|
131
132
|
snowflakeDatasourceSpec_setRegion,
|
132
133
|
snowflakeDatasourceSpec_setRole,
|
133
134
|
snowflakeDatasourceSpec_setWarehouseName,
|
@@ -585,6 +586,18 @@ const SnowflakeDatasourceSpecificationEditor = observer(
|
|
585
586
|
)
|
586
587
|
}
|
587
588
|
/>
|
589
|
+
<PanelFormBooleanField
|
590
|
+
isReadOnly={isReadOnly}
|
591
|
+
value={sourceSpec.enableQueryTags}
|
592
|
+
name="Enable Query Tags"
|
593
|
+
prompt="Controls whether engine sets a tag on each query for identification"
|
594
|
+
update={(value: boolean | undefined): void =>
|
595
|
+
snowflakeDatasourceSpec_setEnableQueryTags(
|
596
|
+
sourceSpec,
|
597
|
+
Boolean(value),
|
598
|
+
)
|
599
|
+
}
|
600
|
+
/>
|
588
601
|
</>
|
589
602
|
);
|
590
603
|
},
|
@@ -69,7 +69,6 @@ import {
|
|
69
69
|
externalFormatData_setContentType,
|
70
70
|
externalFormatData_setData,
|
71
71
|
} from '../../../../stores/graph-modifier/DSL_Data_GraphModifierHelper.js';
|
72
|
-
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/FileGenerationViewerState.js';
|
73
72
|
import type { ExternalFormatDataState } from '../../../../stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js';
|
74
73
|
import { renderEmbeddedDataEditor } from './EmbeddedDataEditor.js';
|
75
74
|
import {
|
@@ -79,6 +78,7 @@ import {
|
|
79
78
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
80
79
|
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
81
80
|
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
81
|
+
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
|
82
82
|
|
83
83
|
export const ExternalFormatDataEditor = observer(
|
84
84
|
(props: {
|
@@ -27,27 +27,41 @@ import {
|
|
27
27
|
MenuContent,
|
28
28
|
MenuContentItem,
|
29
29
|
PanelContent,
|
30
|
+
PURE_ClassIcon,
|
30
31
|
PURE_DataIcon,
|
31
32
|
WrenchIcon,
|
33
|
+
type SelectComponent,
|
34
|
+
createFilter,
|
32
35
|
} from '@finos/legend-art';
|
33
|
-
import { useEffect, useRef } from 'react';
|
36
|
+
import React, { useEffect, useRef } from 'react';
|
34
37
|
import { UnsupportedEditorPanel } from '../UnsupportedElementEditor.js';
|
35
38
|
import {
|
36
39
|
externalFormatData_setContentType,
|
37
40
|
externalFormatData_setData,
|
41
|
+
modelStoreData_setDataModelModel,
|
38
42
|
} from '../../../../stores/graph-modifier/DSL_Data_GraphModifierHelper.js';
|
39
43
|
import type { DSL_Data_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.js';
|
40
|
-
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/FileGenerationViewerState.js';
|
41
44
|
import {
|
42
45
|
type EmbeddedDataState,
|
43
46
|
DataElementReferenceState,
|
44
47
|
ExternalFormatDataState,
|
45
48
|
RelationalCSVDataState,
|
49
|
+
ModelStoreDataState,
|
50
|
+
ModelEmbeddedDataState,
|
46
51
|
} from '../../../../stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js';
|
47
|
-
import
|
48
|
-
|
52
|
+
import {
|
53
|
+
PackageableElementExplicitReference,
|
54
|
+
type Class,
|
55
|
+
type DataElement,
|
56
|
+
} from '@finos/legend-graph';
|
57
|
+
import {
|
58
|
+
buildElementOption,
|
59
|
+
getPackageableElementOptionFormatter,
|
60
|
+
type PackageableElementOption,
|
61
|
+
} from '@finos/legend-lego/graph-editor';
|
49
62
|
import { RelationalCSVDataEditor } from './RelationalCSVDataEditor.js';
|
50
63
|
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
64
|
+
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
|
51
65
|
|
52
66
|
export const ExternalFormatDataEditor = observer(
|
53
67
|
(props: {
|
@@ -218,6 +232,111 @@ export const DataElementReferenceDataEditor = observer(
|
|
218
232
|
},
|
219
233
|
);
|
220
234
|
|
235
|
+
export const ModelEmbeddedDataEditor = observer(
|
236
|
+
(props: {
|
237
|
+
modelDataState: ModelEmbeddedDataState;
|
238
|
+
modelStoreDataState: ModelStoreDataState;
|
239
|
+
isReadOnly: boolean;
|
240
|
+
}) => {
|
241
|
+
const { isReadOnly, modelStoreDataState, modelDataState } = props;
|
242
|
+
const modelData = modelDataState.modelData;
|
243
|
+
const classSelectorRef = useRef<SelectComponent>(null);
|
244
|
+
const elementFilterOption = createFilter({
|
245
|
+
ignoreCase: true,
|
246
|
+
ignoreAccents: false,
|
247
|
+
stringify: (option: PackageableElementOption<Class>): string =>
|
248
|
+
option.value.path,
|
249
|
+
});
|
250
|
+
const editorStore = modelStoreDataState.editorStore;
|
251
|
+
const _class = modelData.model.value;
|
252
|
+
const classOptions = editorStore.graphManagerState.usableClasses.map(
|
253
|
+
(_cl) => ({
|
254
|
+
value: _cl,
|
255
|
+
label: _cl.name,
|
256
|
+
}),
|
257
|
+
);
|
258
|
+
|
259
|
+
const selectedClassOption = {
|
260
|
+
value: _class,
|
261
|
+
label: _class.name,
|
262
|
+
};
|
263
|
+
|
264
|
+
const changeClass = (val: PackageableElementOption<Class> | null): void => {
|
265
|
+
if (val?.value) {
|
266
|
+
modelStoreData_setDataModelModel(
|
267
|
+
modelData,
|
268
|
+
PackageableElementExplicitReference.create(val.value),
|
269
|
+
);
|
270
|
+
}
|
271
|
+
};
|
272
|
+
|
273
|
+
return (
|
274
|
+
<div>
|
275
|
+
<div className="sample-data-generator__controller">
|
276
|
+
<div
|
277
|
+
className="sample-data-generator__controller__icon"
|
278
|
+
title="class"
|
279
|
+
>
|
280
|
+
<PURE_ClassIcon />
|
281
|
+
</div>
|
282
|
+
<CustomSelectorInput
|
283
|
+
ref={classSelectorRef}
|
284
|
+
className="sample-data-generator__controller__class-selector"
|
285
|
+
options={classOptions}
|
286
|
+
onChange={changeClass}
|
287
|
+
value={selectedClassOption}
|
288
|
+
darkMode={true}
|
289
|
+
filterOption={elementFilterOption}
|
290
|
+
formatOptionLabel={getPackageableElementOptionFormatter({
|
291
|
+
darkMode: true,
|
292
|
+
})}
|
293
|
+
/>
|
294
|
+
</div>
|
295
|
+
<div>
|
296
|
+
{renderEmbeddedDataEditor(
|
297
|
+
modelDataState.embeddedDataState,
|
298
|
+
isReadOnly,
|
299
|
+
)}
|
300
|
+
</div>
|
301
|
+
</div>
|
302
|
+
);
|
303
|
+
},
|
304
|
+
);
|
305
|
+
|
306
|
+
export const ModelStoreDataEditor = observer(
|
307
|
+
(props: {
|
308
|
+
modelStoreDataState: ModelStoreDataState;
|
309
|
+
isReadOnly: boolean;
|
310
|
+
}) => {
|
311
|
+
const { isReadOnly, modelStoreDataState } = props;
|
312
|
+
|
313
|
+
return (
|
314
|
+
<div className="panel connection-editor">
|
315
|
+
{modelStoreDataState.modelDataStates.map((_modelDataState) => {
|
316
|
+
if (_modelDataState instanceof ModelEmbeddedDataState) {
|
317
|
+
return (
|
318
|
+
<ModelEmbeddedDataEditor
|
319
|
+
key={_modelDataState.uuid}
|
320
|
+
modelDataState={_modelDataState}
|
321
|
+
modelStoreDataState={modelStoreDataState}
|
322
|
+
isReadOnly={isReadOnly}
|
323
|
+
/>
|
324
|
+
);
|
325
|
+
}
|
326
|
+
|
327
|
+
return (
|
328
|
+
<UnsupportedEditorPanel
|
329
|
+
key={_modelDataState.uuid}
|
330
|
+
text={'Unsuppored Model Data Type'}
|
331
|
+
isReadOnly={false}
|
332
|
+
/>
|
333
|
+
);
|
334
|
+
})}
|
335
|
+
</div>
|
336
|
+
);
|
337
|
+
},
|
338
|
+
);
|
339
|
+
|
221
340
|
export const EmbeddedDataEditor = observer(
|
222
341
|
(props: {
|
223
342
|
embeddedDataEditorState: EmbeddedDataEditorState;
|
@@ -260,6 +379,13 @@ export function renderEmbeddedDataEditor(
|
|
260
379
|
isReadOnly={isReadOnly}
|
261
380
|
/>
|
262
381
|
);
|
382
|
+
} else if (embeddedDataState instanceof ModelStoreDataState) {
|
383
|
+
return (
|
384
|
+
<ModelStoreDataEditor
|
385
|
+
modelStoreDataState={embeddedDataState}
|
386
|
+
isReadOnly={isReadOnly}
|
387
|
+
/>
|
388
|
+
);
|
263
389
|
} else {
|
264
390
|
const extraEmbeddedDataEditorRenderers =
|
265
391
|
embeddedDataState.editorStore.pluginManager
|
@@ -21,11 +21,17 @@ import {
|
|
21
21
|
Dialog,
|
22
22
|
MenuContent,
|
23
23
|
MenuContentItem,
|
24
|
+
Modal,
|
25
|
+
ModalBody,
|
26
|
+
ModalFooter,
|
27
|
+
ModalFooterButton,
|
28
|
+
ModalHeader,
|
24
29
|
PlusIcon,
|
25
30
|
ResizablePanel,
|
26
31
|
ResizablePanelGroup,
|
27
32
|
ResizablePanelSplitter,
|
28
33
|
ResizablePanelSplitterLine,
|
34
|
+
UploadIcon,
|
29
35
|
} from '@finos/legend-art';
|
30
36
|
import type { RelationalCSVDataTable } from '@finos/legend-graph';
|
31
37
|
import { observer } from 'mobx-react-lite';
|
@@ -126,6 +132,52 @@ const RelationalCSVTableContextMenu = observer(
|
|
126
132
|
}),
|
127
133
|
);
|
128
134
|
|
135
|
+
const ImportModal = observer(
|
136
|
+
(props: { dataState: RelationalCSVDataState; isReadOnly: boolean }) => {
|
137
|
+
const { isReadOnly, dataState } = props;
|
138
|
+
const [csv, setCSV] = useState('');
|
139
|
+
const closeModal = (): void => dataState.closeCSVModal();
|
140
|
+
const importVal = (): void => {
|
141
|
+
dataState.importCSV(csv);
|
142
|
+
setCSV('');
|
143
|
+
closeModal();
|
144
|
+
};
|
145
|
+
const changeCSV: React.ChangeEventHandler<
|
146
|
+
HTMLTextAreaElement | HTMLInputElement
|
147
|
+
> = (event) => {
|
148
|
+
setCSV(event.target.value);
|
149
|
+
};
|
150
|
+
return (
|
151
|
+
<Dialog
|
152
|
+
open={dataState.showImportCSVModal}
|
153
|
+
onClose={closeModal}
|
154
|
+
classes={{ container: 'search-modal__container' }}
|
155
|
+
PaperProps={{ classes: { root: 'search-modal__inner-container' } }}
|
156
|
+
>
|
157
|
+
<Modal darkMode={true} className="relational-data-editor__import">
|
158
|
+
<ModalHeader title="Import CSV" />
|
159
|
+
<ModalBody>
|
160
|
+
<textarea
|
161
|
+
className="relational-data-editor__import__textarea"
|
162
|
+
spellCheck={false}
|
163
|
+
value={csv}
|
164
|
+
onChange={changeCSV}
|
165
|
+
disabled={isReadOnly}
|
166
|
+
/>
|
167
|
+
</ModalBody>
|
168
|
+
<ModalFooter>
|
169
|
+
<ModalFooterButton
|
170
|
+
text="Import"
|
171
|
+
title="Create new query"
|
172
|
+
onClick={importVal}
|
173
|
+
/>
|
174
|
+
</ModalFooter>
|
175
|
+
</Modal>
|
176
|
+
</Dialog>
|
177
|
+
);
|
178
|
+
},
|
179
|
+
);
|
180
|
+
|
129
181
|
export const RelationalCSVDataEditor = observer(
|
130
182
|
(props: { dataState: RelationalCSVDataState; isReadOnly: boolean }) => {
|
131
183
|
const { dataState, isReadOnly } = props;
|
@@ -145,6 +197,7 @@ export const RelationalCSVDataEditor = observer(
|
|
145
197
|
setSelectedTableFromContextMenu(undefined);
|
146
198
|
const isTableActive = (table: RelationalCSVDataTable): boolean =>
|
147
199
|
currentTableState?.table === table;
|
200
|
+
const showCSVModal = (): void => dataState.setShowImportCsvModal(true);
|
148
201
|
return (
|
149
202
|
<ResizablePanelGroup orientation="vertical">
|
150
203
|
<ResizablePanel minSize={30} size={300}>
|
@@ -156,6 +209,15 @@ export const RelationalCSVDataEditor = observer(
|
|
156
209
|
</div>
|
157
210
|
</div>
|
158
211
|
<div className="relational-data-editor__header__actions">
|
212
|
+
<button
|
213
|
+
className="schema-set-panel__header__action"
|
214
|
+
onClick={showCSVModal}
|
215
|
+
disabled={isReadOnly}
|
216
|
+
tabIndex={-1}
|
217
|
+
title="Import CSV"
|
218
|
+
>
|
219
|
+
<UploadIcon />
|
220
|
+
</button>
|
159
221
|
<button
|
160
222
|
className="relational-data-editor__header__action"
|
161
223
|
onClick={openIdentifierModal}
|
@@ -250,6 +312,9 @@ export const RelationalCSVDataEditor = observer(
|
|
250
312
|
isReadOnly={isReadOnly}
|
251
313
|
/>
|
252
314
|
)}
|
315
|
+
{dataState.showImportCSVModal && (
|
316
|
+
<ImportModal dataState={dataState} isReadOnly={isReadOnly} />
|
317
|
+
)}
|
253
318
|
</div>
|
254
319
|
</div>
|
255
320
|
</ResizablePanel>
|
package/src/components/editor/editor-group/element-generation-editor/FileGenerationEditor.tsx
CHANGED
@@ -967,7 +967,7 @@ export const FileGenerationConfigurationEditor = observer(
|
|
967
967
|
const applicationStore = useApplicationStore();
|
968
968
|
const fileGeneration = fileGenerationState.fileGeneration;
|
969
969
|
const fileGenerationConfiguration =
|
970
|
-
editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(
|
970
|
+
editorStore.graphState.graphGenerationState.globalFileGenerationState.getFileGenerationConfiguration(
|
971
971
|
fileGeneration.type,
|
972
972
|
).properties;
|
973
973
|
const debouncedRegenerate = useMemo(
|
@@ -17,10 +17,6 @@
|
|
17
17
|
import { Fragment } from 'react';
|
18
18
|
import { observer } from 'mobx-react-lite';
|
19
19
|
import { flowResult } from 'mobx';
|
20
|
-
import {
|
21
|
-
getTextContent,
|
22
|
-
getEditorLanguageForFormat,
|
23
|
-
} from '../../../../stores/editor/editor-state/FileGenerationViewerState.js';
|
24
20
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
25
21
|
import {
|
26
22
|
type TreeNodeContainerProps,
|
@@ -56,6 +52,10 @@ import {
|
|
56
52
|
import { useApplicationStore } from '@finos/legend-application';
|
57
53
|
import type { DSL_Generation_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Generation_LegendStudioApplicationPlugin_Extension.js';
|
58
54
|
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
55
|
+
import {
|
56
|
+
getEditorLanguageForFormat,
|
57
|
+
getTextContent,
|
58
|
+
} from '../../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
|
59
59
|
|
60
60
|
export const FileSystemTreeNodeContainer: React.FC<
|
61
61
|
TreeNodeContainerProps<
|
@@ -78,8 +78,11 @@ export const NewSchemaSetDriverEditor = observer(() => {
|
|
78
78
|
}
|
79
79
|
};
|
80
80
|
return (
|
81
|
-
|
82
|
-
<div className="">
|
81
|
+
<>
|
82
|
+
<div className="panel__content__form__section__header__label">
|
83
|
+
Schema Type
|
84
|
+
</div>
|
85
|
+
<div className="explorer__new-element-modal__driver">
|
83
86
|
<CustomSelectorInput
|
84
87
|
className="sub-panel__content__form__section__dropdown"
|
85
88
|
options={options}
|
@@ -87,6 +90,6 @@ export const NewSchemaSetDriverEditor = observer(() => {
|
|
87
90
|
value={newConnectionDriver.formatOption}
|
88
91
|
/>
|
89
92
|
</div>
|
90
|
-
|
93
|
+
</>
|
91
94
|
);
|
92
95
|
});
|
@@ -44,7 +44,6 @@ import {
|
|
44
44
|
type InnerSchemaSetEditorState,
|
45
45
|
SCHEMA_SET_TAB_TYPE,
|
46
46
|
} from '../../../../stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.js';
|
47
|
-
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/FileGenerationViewerState.js';
|
48
47
|
import { guaranteeNonNullable, prettyCONSTName } from '@finos/legend-shared';
|
49
48
|
import { useEditorStore } from '../../EditorStoreProvider.js';
|
50
49
|
import {
|
@@ -59,6 +58,7 @@ import {
|
|
59
58
|
CODE_EDITOR_LANGUAGE,
|
60
59
|
CodeEditor,
|
61
60
|
} from '@finos/legend-lego/code-editor';
|
61
|
+
import { getEditorLanguageForFormat } from '../../../../stores/editor/editor-state/ArtifactGenerationViewerState.js';
|
62
62
|
|
63
63
|
const SchemaLoader = observer(
|
64
64
|
(props: {
|
@@ -72,7 +72,6 @@ import {
|
|
72
72
|
} from '@finos/legend-application';
|
73
73
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
74
74
|
import type { MappingEditorTabState } from '../../../../stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js';
|
75
|
-
import { LEGEND_STUDIO_DOCUMENTATION_KEY } from '../../../../__lib__/LegendStudioDocumentation.js';
|
76
75
|
import { MappingTestableEditor } from './MappingTestableEditor.js';
|
77
76
|
|
78
77
|
export const MappingEditorSplashScreen: React.FC = () => {
|
@@ -348,7 +347,6 @@ const _MappingEditor = observer(() => {
|
|
348
347
|
|
349
348
|
export const MappingEditorWithTestable = observer(() => {
|
350
349
|
const editorStore = useEditorStore();
|
351
|
-
const applicationStore = useApplicationStore();
|
352
350
|
const mappingEditorState =
|
353
351
|
editorStore.tabManagerState.getCurrentEditorState(MappingEditorState);
|
354
352
|
const isReadOnly = mappingEditorState.isReadOnly;
|
@@ -358,10 +356,6 @@ export const MappingEditorWithTestable = observer(() => {
|
|
358
356
|
(tab: MAPPING_EDITOR_TAB): (() => void) =>
|
359
357
|
(): void =>
|
360
358
|
mappingEditorState.setSelectedTab(tab);
|
361
|
-
applicationStore.assistantService.openDocumentationEntry(
|
362
|
-
LEGEND_STUDIO_DOCUMENTATION_KEY.QUESTION_HOW_TO_WRITE_A_SERVICE_TEST,
|
363
|
-
);
|
364
|
-
|
365
359
|
return (
|
366
360
|
<div className="service-editor">
|
367
361
|
<div className="panel">
|