@finos/legend-application-studio 22.2.0 → 22.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/editor/StatusBar.js +1 -1
- package/lib/components/editor/StatusBar.js.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.d.ts.map +1 -1
- package/lib/components/editor/command-center/ProjectSearchCommand.js +1 -0
- package/lib/components/editor/command-center/ProjectSearchCommand.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +24 -11
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js +2 -1
- package/lib/components/editor/edit-panel/GenerationSpecificationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js +1 -0
- package/lib/components/editor/edit-panel/connection-editor/ConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js +4 -3
- package/lib/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts +32 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js +66 -0
- package/lib/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.js.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts +0 -23
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js +6 -58
- package/lib/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts +41 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +77 -0
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -0
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts +7 -0
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +19 -14
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js +3 -0
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js +3 -1
- package/lib/components/editor/edit-panel/mapping-editor/NewMappingElementModal.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +51 -13
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +18 -10
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts +1 -3
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js +2 -20
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.js +9 -3
- package/lib/components/editor/edit-panel/uml-editor/ClassEditor.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 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.d.ts.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +29 -8
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +17 -3
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts +2 -2
- package/lib/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/DependencyProjectViewerHelper.d.ts +19 -0
- package/lib/stores/DependencyProjectViewerHelper.d.ts.map +1 -0
- package/lib/stores/DependencyProjectViewerHelper.js +23 -0
- package/lib/stores/DependencyProjectViewerHelper.js.map +1 -0
- package/lib/stores/EditorGraphState.d.ts +9 -2
- package/lib/stores/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/EditorGraphState.js +39 -137
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts +1 -1
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +14 -6
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +1 -2
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.js +11 -25
- package/lib/stores/EditorTabManagerState.js.map +1 -1
- package/lib/stores/ExplorerTreeState.d.ts +4 -4
- package/lib/stores/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/ExplorerTreeState.js +12 -15
- package/lib/stores/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +0 -3
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.d.ts +2 -0
- package/lib/stores/editor-state/ExternalFormatState.d.ts.map +1 -1
- package/lib/stores/editor-state/ExternalFormatState.js +6 -0
- package/lib/stores/editor-state/ExternalFormatState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.d.ts +18 -18
- package/lib/stores/editor-state/FileGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationState.js +86 -133
- package/lib/stores/editor-state/FileGenerationState.js.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts +3 -3
- package/lib/stores/editor-state/FileGenerationViewerState.d.ts.map +1 -1
- package/lib/stores/editor-state/FileGenerationViewerState.js.map +1 -1
- package/lib/stores/editor-state/FileSystemState.d.ts +30 -0
- package/lib/stores/editor-state/FileSystemState.d.ts.map +1 -0
- package/lib/stores/editor-state/FileSystemState.js +82 -0
- package/lib/stores/editor-state/FileSystemState.js.map +1 -0
- package/lib/stores/editor-state/GraphGenerationState.d.ts +9 -9
- package/lib/stores/editor-state/GraphGenerationState.d.ts.map +1 -1
- package/lib/stores/editor-state/GraphGenerationState.js +14 -15
- package/lib/stores/editor-state/GraphGenerationState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts +25 -2
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js +50 -7
- package/lib/stores/editor-state/element-editor-state/ElementEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts +44 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.d.ts.map +1 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js +172 -0
- package/lib/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.js.map +1 -0
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts +3 -0
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js +14 -2
- package/lib/stores/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +9 -6
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js +38 -28
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js +6 -3
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.js.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js +1 -0
- package/lib/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.js.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.d.ts.map +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js +1 -1
- package/lib/stores/project-viewer/ProjectViewerStore.js.map +1 -1
- package/lib/stores/shared/FileSystemTreeUtils.d.ts +56 -0
- package/lib/stores/shared/FileSystemTreeUtils.d.ts.map +1 -0
- package/lib/stores/shared/{FileGenerationTreeUtils.js → FileSystemTreeUtils.js} +31 -32
- package/lib/stores/shared/FileSystemTreeUtils.js.map +1 -0
- package/lib/stores/shared/PackageTreeUtils.d.ts +6 -4
- package/lib/stores/shared/PackageTreeUtils.d.ts.map +1 -1
- package/lib/stores/shared/PackageTreeUtils.js +90 -11
- package/lib/stores/shared/PackageTreeUtils.js.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.d.ts +16 -3
- package/lib/stores/sidebar-state/LocalChangesState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/LocalChangesState.js +143 -246
- package/lib/stores/sidebar-state/LocalChangesState.js.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts +3 -3
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js +37 -1
- package/lib/stores/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/package.json +12 -12
- package/src/components/editor/StatusBar.tsx +1 -1
- package/src/components/editor/command-center/ProjectSearchCommand.tsx +1 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +79 -25
- package/src/components/editor/edit-panel/GenerationSpecificationEditor.tsx +2 -1
- package/src/components/editor/edit-panel/connection-editor/ConnectionEditor.tsx +1 -0
- package/src/components/editor/edit-panel/element-generation-editor/ElementGenerationEditor.tsx +5 -7
- package/src/components/editor/edit-panel/element-generation-editor/ElementXTGenerationEditor.tsx +194 -0
- package/src/components/editor/edit-panel/element-generation-editor/FileGenerationEditor.tsx +6 -270
- package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +296 -0
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +177 -155
- package/src/components/editor/edit-panel/mapping-editor/EnumerationMappingEditor.tsx +3 -1
- package/src/components/editor/edit-panel/mapping-editor/InstanceSetImplementationSourceSelectorModal.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionQueryBuilder.tsx +3 -0
- package/src/components/editor/edit-panel/mapping-editor/NewMappingElementModal.tsx +3 -1
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +243 -184
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +42 -15
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestableEditor.tsx +2 -65
- package/src/components/editor/edit-panel/uml-editor/ClassEditor.tsx +9 -3
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +1 -0
- package/src/components/editor/side-bar/Explorer.tsx +82 -13
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +31 -9
- package/src/index.ts +5 -2
- package/src/stores/DSL_Generation_LegendStudioApplicationPlugin_Extension.ts +2 -2
- package/src/stores/DependencyProjectViewerHelper.ts +39 -0
- package/src/stores/EditorGraphState.ts +67 -197
- package/src/stores/EditorStore.ts +22 -10
- package/src/stores/EditorTabManagerState.ts +16 -38
- package/src/stores/ExplorerTreeState.ts +29 -23
- package/src/stores/editor/NewElementState.ts +0 -2
- package/src/stores/editor-state/ExternalFormatState.ts +9 -0
- package/src/stores/editor-state/FileGenerationState.ts +129 -180
- package/src/stores/editor-state/FileGenerationViewerState.ts +3 -3
- package/src/stores/editor-state/FileSystemState.ts +111 -0
- package/src/stores/editor-state/GraphGenerationState.ts +35 -31
- package/src/stores/editor-state/element-editor-state/ElementEditorState.ts +91 -6
- package/src/stores/editor-state/element-editor-state/ElementExternalFormatGenerationState.ts +266 -0
- package/src/stores/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor-state/element-editor-state/mapping/MappingTestState.ts +2 -2
- package/src/stores/editor-state/element-editor-state/service/ServiceEditorState.ts +23 -2
- package/src/stores/editor-state/element-editor-state/service/ServiceExecutionState.ts +60 -55
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +6 -2
- package/src/stores/editor-state/project-configuration-editor-state/ProjectDependencyEditorState.ts +2 -0
- package/src/stores/project-viewer/ProjectViewerStore.ts +3 -1
- package/src/stores/shared/{FileGenerationTreeUtils.ts → FileSystemTreeUtils.ts} +77 -76
- package/src/stores/shared/PackageTreeUtils.ts +144 -10
- package/src/stores/sidebar-state/LocalChangesState.ts +279 -450
- package/src/stores/sidebar-state/testable/GlobalTestRunnerState.ts +42 -3
- package/tsconfig.json +6 -1
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts +0 -56
- package/lib/stores/shared/FileGenerationTreeUtils.d.ts.map +0 -1
- package/lib/stores/shared/FileGenerationTreeUtils.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalFormatState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/ExternalFormatState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAEL,iBAAiB,EACjB,QAAQ,EACR,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM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8BAA8B,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAC9D,CAAC;YACJ,IAAI,CAAC,yBAAyB,CAAC,QAAQ,EAAE,CAAC;SAC3C;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,KAAK,CACzC,QAAQ,CAAC,MAAM,CAAC,uBAAuB,CAAC,uBAAuB,CAAC,EAChE,KAAK,CACN,CAAC;YACF,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACrD,IAAI,CAAC,yBAAyB,CAAC,IAAI,EAAE,CAAC;SACvC;IACH,CAAC;IAED,kBAAkB,CAAC,IAAY;QAC7B,OAAO,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACvE,CAAC;CACF"}
|
|
@@ -14,31 +14,31 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { EditorStore } from '../EditorStore.js';
|
|
17
|
-
import type
|
|
18
|
-
import { type GenerationTreeNodeData, type GenerationFile, type GenerationOutputResult, GenerationDirectory } from '../shared/FileGenerationTreeUtils.js';
|
|
19
|
-
import { type GeneratorFn } from '@finos/legend-shared';
|
|
17
|
+
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
|
20
18
|
import { type FileGenerationSpecification, type GenerationOutput, type GenerationProperty, PackageableElement, PackageableElementReference } from '@finos/legend-graph';
|
|
21
|
-
|
|
19
|
+
import { FileSystemState } from './FileSystemState.js';
|
|
20
|
+
export declare abstract class GeneratedFileStructureState {
|
|
22
21
|
readonly editorStore: EditorStore;
|
|
22
|
+
fileSystemState: FileSystemState;
|
|
23
|
+
generatingAction: ActionState;
|
|
24
|
+
rootDirectoryName: string;
|
|
25
|
+
constructor(rootDirectory: string, editorStore: EditorStore);
|
|
26
|
+
abstract resetGenerator(): void;
|
|
27
|
+
abstract generate(): GeneratorFn<void>;
|
|
28
|
+
abstract get rootFolder(): string;
|
|
29
|
+
abstract get generationParentId(): string | undefined;
|
|
30
|
+
processGenerationResult(output: GenerationOutput[]): void;
|
|
31
|
+
}
|
|
32
|
+
export declare class FileGenerationState extends GeneratedFileStructureState {
|
|
23
33
|
readonly fileGeneration: FileGenerationSpecification;
|
|
24
|
-
isGenerating: boolean;
|
|
25
|
-
root: GenerationDirectory;
|
|
26
|
-
directoryTreeData?: TreeData<GenerationTreeNodeData> | undefined;
|
|
27
|
-
selectedNode?: GenerationTreeNodeData | undefined;
|
|
28
|
-
filesIndex: Map<string, GenerationFile>;
|
|
29
34
|
constructor(editorStore: EditorStore, fileGeneration: FileGenerationSpecification);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
get rootFolder(): string;
|
|
36
|
+
get generationParentId(): string | undefined;
|
|
37
|
+
resetGenerator(): void;
|
|
38
|
+
updateFileGenerationParameters(fileGeneration: FileGenerationSpecification, generationProperty: GenerationProperty, newValue: unknown): void;
|
|
34
39
|
generate(): GeneratorFn<void>;
|
|
35
|
-
processGenerationResult(output: GenerationOutput[]): void;
|
|
36
|
-
reprocessNodeTree(generationResult: GenerationOutputResult[], treeData: TreeData<GenerationTreeNodeData>, openedNodeIds: string[]): void;
|
|
37
|
-
setSelectedNode(node?: GenerationTreeNodeData): void;
|
|
38
|
-
onTreeNodeSelect(node: GenerationTreeNodeData, treeData: TreeData<GenerationTreeNodeData>): void;
|
|
39
40
|
getScopeElement(element: PackageableElement | string): PackageableElementReference<PackageableElement> | string | undefined;
|
|
40
41
|
addScopeElement(element: PackageableElement | string): void;
|
|
41
42
|
deleteScopeElement(element: PackageableElement | string): void;
|
|
42
|
-
updateFileGenerationParameters(fileGeneration: FileGenerationSpecification, generationProperty: GenerationProperty, newValue: unknown): void;
|
|
43
43
|
}
|
|
44
44
|
//# sourceMappingURL=FileGenerationState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileGenerationState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"FileGenerationState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWrD,OAAO,EACL,KAAK,WAAW,EAKhB,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAGvB,kBAAkB,EAClB,2BAA2B,EAI5B,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,8BAAsB,2BAA2B;IAC/C,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,cAAwB;IACxC,iBAAiB,EAAE,MAAM,CAAC;gBAEd,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;IAM3D,QAAQ,CAAC,cAAc,IAAI,IAAI;IAE/B,QAAQ,CAAC,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAEtC,QAAQ,KAAK,UAAU,IAAI,MAAM,CAAC;IAElC,QAAQ,KAAK,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAAC;IAEtD,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAI;CAwC1D;AAED,qBAAa,mBAAoB,SAAQ,2BAA2B;IAClE,QAAQ,CAAC,cAAc,EAAE,2BAA2B,CAAC;gBAGnD,WAAW,EAAE,WAAW,EACxB,cAAc,EAAE,2BAA2B;IAgB7C,IAAI,UAAU,IAAI,MAAM,CAKvB;IAED,IAAI,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAE3C;IAED,cAAc,IAAI,IAAI;IAItB,8BAA8B,CAC5B,cAAc,EAAE,2BAA2B,EAC3C,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,OAAO,GAChB,IAAI;IAiEN,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IAkC9B,eAAe,CACb,OAAO,EAAE,kBAAkB,GAAG,MAAM,GACnC,2BAA2B,CAAC,kBAAkB,CAAC,GAAG,MAAM,GAAG,SAAS;IAQvE,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI;IAY3D,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI;CAM/D"}
|
|
@@ -15,162 +15,72 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { observable, action, makeObservable, flow } from 'mobx';
|
|
17
17
|
import { LEGEND_STUDIO_APP_EVENT } from '../LegendStudioAppEvent.js';
|
|
18
|
-
import {
|
|
19
|
-
import { assertErrorThrown, deepEqual, isEmpty, LogEvent, } from '@finos/legend-shared';
|
|
18
|
+
import { FileSystem_Directory, GENERATION_FILE_ROOT_NAME, getFileSystemTreeData, buildFileSystemDirectory, } from '../shared/FileSystemTreeUtils.js';
|
|
19
|
+
import { assertErrorThrown, deepEqual, isEmpty, LogEvent, ActionState, } from '@finos/legend-shared';
|
|
20
20
|
import { ConfigurationProperty, GenerationPropertyItemType, PackageableElement, PackageableElementReference, PackageableElementExplicitReference, ELEMENT_PATH_DELIMITER, getNullableFileGenerationConfig, } from '@finos/legend-graph';
|
|
21
21
|
import { configurationProperty_setValue, configurationProperty_addConfigurationProperty, fileGeneration_addScopeElement, fileGeneration_deleteScopeElement, } from '../shared/modifier/DSL_Generation_GraphModifierHelper.js';
|
|
22
|
-
|
|
22
|
+
import { FileSystemState } from './FileSystemState.js';
|
|
23
|
+
export class GeneratedFileStructureState {
|
|
23
24
|
editorStore;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
constructor(editorStore, fileGeneration) {
|
|
31
|
-
makeObservable(this, {
|
|
32
|
-
isGenerating: observable,
|
|
33
|
-
root: observable,
|
|
34
|
-
directoryTreeData: observable.ref,
|
|
35
|
-
selectedNode: observable.ref,
|
|
36
|
-
filesIndex: observable,
|
|
37
|
-
resetFileGeneration: action,
|
|
38
|
-
setIsGeneration: action,
|
|
39
|
-
setDirectoryTreeData: action,
|
|
40
|
-
processGenerationResult: action,
|
|
41
|
-
reprocessNodeTree: action,
|
|
42
|
-
setSelectedNode: action,
|
|
43
|
-
onTreeNodeSelect: action,
|
|
44
|
-
addScopeElement: action,
|
|
45
|
-
deleteScopeElement: action,
|
|
46
|
-
updateFileGenerationParameters: action,
|
|
47
|
-
generate: flow,
|
|
48
|
-
});
|
|
25
|
+
fileSystemState;
|
|
26
|
+
generatingAction = ActionState.create();
|
|
27
|
+
rootDirectoryName;
|
|
28
|
+
constructor(rootDirectory, editorStore) {
|
|
29
|
+
this.rootDirectoryName = rootDirectory;
|
|
30
|
+
this.fileSystemState = new FileSystemState(rootDirectory);
|
|
49
31
|
this.editorStore = editorStore;
|
|
50
|
-
this.fileGeneration = fileGeneration;
|
|
51
|
-
this.root = new GenerationDirectory(GENERATION_FILE_ROOT_NAME);
|
|
52
|
-
}
|
|
53
|
-
getOrCreateDirectory(directoryName) {
|
|
54
|
-
return GenerationDirectory.getOrCreateDirectory(this.root, directoryName, true);
|
|
55
|
-
}
|
|
56
|
-
resetFileGeneration() {
|
|
57
|
-
this.fileGeneration.configurationProperties = [];
|
|
58
|
-
}
|
|
59
|
-
setIsGeneration(isGenerating) {
|
|
60
|
-
this.isGenerating = isGenerating;
|
|
61
|
-
}
|
|
62
|
-
setDirectoryTreeData(directoryTreeData) {
|
|
63
|
-
this.directoryTreeData = directoryTreeData;
|
|
64
|
-
}
|
|
65
|
-
*generate() {
|
|
66
|
-
this.isGenerating = true;
|
|
67
|
-
try {
|
|
68
|
-
// avoid wasting a network call when the scope is empty, we can short-circuit this
|
|
69
|
-
if (!this.fileGeneration.scopeElements.length) {
|
|
70
|
-
this.selectedNode = undefined;
|
|
71
|
-
this.processGenerationResult([]);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
const mode = this.editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(this.fileGeneration.type).generationMode;
|
|
75
|
-
const result = (yield this.editorStore.graphManagerState.graphManager.generateFile(this.fileGeneration, mode, this.editorStore.graphManagerState.graph));
|
|
76
|
-
this.processGenerationResult(result);
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
assertErrorThrown(error);
|
|
80
|
-
this.selectedNode = undefined;
|
|
81
|
-
this.processGenerationResult([]);
|
|
82
|
-
this.editorStore.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.GENERATION_FAILURE), error);
|
|
83
|
-
this.editorStore.applicationStore.notifyError(error);
|
|
84
|
-
}
|
|
85
|
-
finally {
|
|
86
|
-
this.isGenerating = false;
|
|
87
|
-
}
|
|
88
32
|
}
|
|
89
33
|
processGenerationResult(output) {
|
|
90
|
-
this.root = new
|
|
91
|
-
this.filesIndex = new Map();
|
|
92
|
-
const openedNodeIds = this.directoryTreeData
|
|
93
|
-
? Array.from(this.directoryTreeData.nodes.values())
|
|
34
|
+
this.fileSystemState.root = new FileSystem_Directory(this.rootDirectoryName);
|
|
35
|
+
this.fileSystemState.filesIndex = new Map();
|
|
36
|
+
const openedNodeIds = this.fileSystemState.directoryTreeData
|
|
37
|
+
? Array.from(this.fileSystemState.directoryTreeData.nodes.values())
|
|
94
38
|
.filter((node) => node.isOpen)
|
|
95
39
|
.map((node) => node.id)
|
|
96
40
|
: [];
|
|
97
41
|
const generationResultIndex = new Map();
|
|
98
|
-
const rootFolder = this.
|
|
99
|
-
this.fileGeneration.path.split(ELEMENT_PATH_DELIMITER).join('_');
|
|
42
|
+
const rootFolder = this.rootFolder;
|
|
100
43
|
output.forEach((entry) => {
|
|
101
44
|
entry.cleanFileName(rootFolder);
|
|
102
45
|
if (generationResultIndex.has(entry.fileName)) {
|
|
103
46
|
this.editorStore.applicationStore.log.warn(LogEvent.create(LEGEND_STUDIO_APP_EVENT.GENERATION_FAILURE), 'Found 2 generation outputs with same path');
|
|
104
47
|
}
|
|
105
48
|
generationResultIndex.set(entry.fileName, {
|
|
106
|
-
|
|
107
|
-
parentId: this.
|
|
49
|
+
value: entry,
|
|
50
|
+
parentId: this.generationParentId,
|
|
108
51
|
});
|
|
109
52
|
});
|
|
110
53
|
// take generation outputs and put them into the root directory
|
|
111
|
-
|
|
112
|
-
this.directoryTreeData =
|
|
113
|
-
this.reprocessNodeTree(Array.from(generationResultIndex.values()), this.directoryTreeData, openedNodeIds);
|
|
54
|
+
buildFileSystemDirectory(this.fileSystemState.root, generationResultIndex, this.fileSystemState.filesIndex);
|
|
55
|
+
this.fileSystemState.directoryTreeData = getFileSystemTreeData(this.fileSystemState.root);
|
|
56
|
+
this.fileSystemState.reprocessNodeTree(Array.from(generationResultIndex.values()), this.fileSystemState.directoryTreeData, openedNodeIds);
|
|
114
57
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
else {
|
|
132
|
-
this.selectedNode = undefined;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
this.setDirectoryTreeData({ ...treeData });
|
|
58
|
+
}
|
|
59
|
+
export class FileGenerationState extends GeneratedFileStructureState {
|
|
60
|
+
fileGeneration;
|
|
61
|
+
constructor(editorStore, fileGeneration) {
|
|
62
|
+
super(GENERATION_FILE_ROOT_NAME, editorStore);
|
|
63
|
+
makeObservable(this, {
|
|
64
|
+
generatingAction: observable,
|
|
65
|
+
fileSystemState: observable,
|
|
66
|
+
resetGenerator: action,
|
|
67
|
+
processGenerationResult: action,
|
|
68
|
+
addScopeElement: action,
|
|
69
|
+
deleteScopeElement: action,
|
|
70
|
+
updateFileGenerationParameters: action,
|
|
71
|
+
generate: flow,
|
|
72
|
+
});
|
|
73
|
+
this.fileGeneration = fileGeneration;
|
|
136
74
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
this.
|
|
140
|
-
}
|
|
141
|
-
if (node) {
|
|
142
|
-
node.isSelected = true;
|
|
143
|
-
}
|
|
144
|
-
this.selectedNode = node;
|
|
75
|
+
get rootFolder() {
|
|
76
|
+
return (this.fileGeneration.generationOutputPath ??
|
|
77
|
+
this.fileGeneration.path.split(ELEMENT_PATH_DELIMITER).join('_'));
|
|
145
78
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
node.isOpen = !node.isOpen;
|
|
149
|
-
if (node.fileNode instanceof GenerationDirectory) {
|
|
150
|
-
populateDirectoryTreeNodeChildren(node, treeData);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
this.setSelectedNode(node);
|
|
154
|
-
this.setDirectoryTreeData({ ...treeData });
|
|
79
|
+
get generationParentId() {
|
|
80
|
+
return this.fileGeneration.path;
|
|
155
81
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
? el.value === element
|
|
159
|
-
: element === el);
|
|
160
|
-
}
|
|
161
|
-
addScopeElement(element) {
|
|
162
|
-
const el = this.getScopeElement(element);
|
|
163
|
-
if (!el) {
|
|
164
|
-
fileGeneration_addScopeElement(this.fileGeneration, element instanceof PackageableElement
|
|
165
|
-
? PackageableElementExplicitReference.create(element)
|
|
166
|
-
: element);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
deleteScopeElement(element) {
|
|
170
|
-
const el = this.getScopeElement(element);
|
|
171
|
-
if (el) {
|
|
172
|
-
fileGeneration_deleteScopeElement(this.fileGeneration, el);
|
|
173
|
-
}
|
|
82
|
+
resetGenerator() {
|
|
83
|
+
this.fileGeneration.configurationProperties = [];
|
|
174
84
|
}
|
|
175
85
|
updateFileGenerationParameters(fileGeneration, generationProperty, newValue) {
|
|
176
86
|
if (generationProperty.type === GenerationPropertyItemType.MAP) {
|
|
@@ -217,5 +127,48 @@ export class FileGenerationState {
|
|
|
217
127
|
}
|
|
218
128
|
}
|
|
219
129
|
}
|
|
130
|
+
*generate() {
|
|
131
|
+
this.generatingAction.inProgress();
|
|
132
|
+
try {
|
|
133
|
+
// avoid wasting a network call when the scope is empty, we can short-circuit this
|
|
134
|
+
if (!this.fileGeneration.scopeElements.length) {
|
|
135
|
+
this.fileSystemState.selectedNode = undefined;
|
|
136
|
+
this.processGenerationResult([]);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const mode = this.editorStore.graphState.graphGenerationState.getFileGenerationConfiguration(this.fileGeneration.type).generationMode;
|
|
140
|
+
const result = (yield this.editorStore.graphManagerState.graphManager.generateFile(this.fileGeneration, mode, this.editorStore.graphManagerState.graph));
|
|
141
|
+
this.processGenerationResult(result);
|
|
142
|
+
}
|
|
143
|
+
catch (error) {
|
|
144
|
+
assertErrorThrown(error);
|
|
145
|
+
this.fileSystemState.selectedNode = undefined;
|
|
146
|
+
this.processGenerationResult([]);
|
|
147
|
+
this.editorStore.applicationStore.log.error(LogEvent.create(LEGEND_STUDIO_APP_EVENT.GENERATION_FAILURE), error);
|
|
148
|
+
this.editorStore.applicationStore.notifyError(error);
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
this.generatingAction.complete();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
getScopeElement(element) {
|
|
155
|
+
return this.fileGeneration.scopeElements.find((el) => el instanceof PackageableElementReference
|
|
156
|
+
? el.value === element
|
|
157
|
+
: element === el);
|
|
158
|
+
}
|
|
159
|
+
addScopeElement(element) {
|
|
160
|
+
const el = this.getScopeElement(element);
|
|
161
|
+
if (!el) {
|
|
162
|
+
fileGeneration_addScopeElement(this.fileGeneration, element instanceof PackageableElement
|
|
163
|
+
? PackageableElementExplicitReference.create(element)
|
|
164
|
+
: element);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
deleteScopeElement(element) {
|
|
168
|
+
const el = this.getScopeElement(element);
|
|
169
|
+
if (el) {
|
|
170
|
+
fileGeneration_deleteScopeElement(this.fileGeneration, el);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
220
173
|
}
|
|
221
174
|
//# sourceMappingURL=FileGenerationState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileGenerationState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"FileGenerationState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAGL,oBAAoB,EACpB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAIL,qBAAqB,EACrB,0BAA0B,EAC1B,kB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CAAC,CAAC,mCAAmC,CAAC,MAAM,CAAC,OAAO,CAAC;gBACrD,CAAC,CAAC,OAAO,CACZ,CAAC;SACH;IACH,CAAC;IAED,kBAAkB,CAAC,OAAoC;QACrD,MAAM,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,EAAE,EAAE;YACN,iCAAiC,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;SAC5D;IACH,CAAC;CACF"}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { EditorStore } from '../EditorStore.js';
|
|
17
17
|
import { EditorState } from './EditorState.js';
|
|
18
|
-
import type {
|
|
18
|
+
import type { FileSystem_File } from '../shared/FileSystemTreeUtils.js';
|
|
19
19
|
import { EDITOR_LANGUAGE } from '@finos/legend-application';
|
|
20
20
|
export declare const getTextContent: (content: string, format: string | undefined) => string;
|
|
21
21
|
export declare const getEditorLanguageForFormat: (format?: string) => EDITOR_LANGUAGE;
|
|
22
22
|
export declare class FileGenerationViewerState extends EditorState {
|
|
23
|
-
file:
|
|
24
|
-
constructor(editorStore: EditorStore, file:
|
|
23
|
+
file: FileSystem_File;
|
|
24
|
+
constructor(editorStore: EditorStore, file: FileSystem_File);
|
|
25
25
|
get label(): string;
|
|
26
26
|
match(tab: EditorState): boolean;
|
|
27
27
|
get generatedFilePath(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileGenerationViewerState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"FileGenerationViewerState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,eAAe,EAAY,MAAM,2BAA2B,CAAC;AAGtE,eAAO,MAAM,cAAc,YAChB,MAAM,UACP,MAAM,GAAG,SAAS,KACzB,MAWF,CAAC;AAEF,eAAO,MAAM,0BAA0B,YAC5B,MAAM,KACd,eASF,CAAC;AAEF,qBAAa,yBAA0B,SAAQ,WAAW;IACxD,IAAI,EAAE,eAAe,CAAC;gBAEV,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe;IAY3D,IAAI,KAAK,IAAI,MAAM,CAElB;IAEQ,KAAK,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO;IAIzC,IAAI,iBAAiB,IAAI,MAAM,CAE9B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileGenerationViewerState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAe,EACf,MAA0B,EAClB,EAAE;IACV,QAAQ,MAAM,EAAE,WAAW,EAAE,EAAE;QAC7B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,CACL,kBAAkB,CAAC,GAAG,EAAE,CACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CACzD,IAAI,OAAO,CACb,CAAC;QACJ;YACE,OAAO,OAAO,CAAC;KAClB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,MAAe,EACE,EAAE;IACnB,QAAQ,MAAM,EAAE,WAAW,EAAE,EAAE;QAC7B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B;YACE,OAAO,eAAe,CAAC,IAAI,CAAC;KAC/B;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IACxD,IAAI,
|
|
1
|
+
{"version":3,"file":"FileGenerationViewerState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/FileGenerationViewerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAAe,EACf,MAA0B,EAClB,EAAE;IACV,QAAQ,MAAM,EAAE,WAAW,EAAE,EAAE;QAC7B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,CACL,kBAAkB,CAAC,GAAG,EAAE,CACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,CACzD,IAAI,OAAO,CACb,CAAC;QACJ;YACE,OAAO,OAAO,CAAC;KAClB;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,MAAe,EACE,EAAE;IACnB,QAAQ,MAAM,EAAE,WAAW,EAAE,EAAE;QAC7B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B,KAAK,eAAe,CAAC,IAAI;YACvB,OAAO,eAAe,CAAC,IAAI,CAAC;QAC9B;YACE,OAAO,eAAe,CAAC,IAAI,CAAC;KAC/B;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,yBAA0B,SAAQ,WAAW;IACxD,IAAI,CAAkB;IAEtB,YAAY,WAAwB,EAAE,IAAqB;QACzD,KAAK,CAAC,WAAW,CAAC,CAAC;QAEnB,cAAc,CAAC,IAAI,EAAE;YACnB,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,iBAAiB,EAAE,QAAQ;SAC5B,CAAC,CAAC;QAEH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC;IAEQ,KAAK,CAAC,GAAgB;QAC7B,OAAO,GAAG,YAAY,yBAAyB,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC;IAC5E,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 type { TreeData } from '@finos/legend-art';
|
|
17
|
+
import { type FileResult, type FileSystemTreeNodeData, type FileSystem_File, FileSystem_Directory } from '../shared/FileSystemTreeUtils.js';
|
|
18
|
+
export declare class FileSystemState {
|
|
19
|
+
root: FileSystem_Directory;
|
|
20
|
+
directoryTreeData?: TreeData<FileSystemTreeNodeData> | undefined;
|
|
21
|
+
selectedNode?: FileSystemTreeNodeData | undefined;
|
|
22
|
+
filesIndex: Map<string, FileSystem_File>;
|
|
23
|
+
constructor(root: string);
|
|
24
|
+
getOrCreateDirectory(directoryName: string): FileSystem_Directory;
|
|
25
|
+
setDirectoryTreeData(directoryTreeData: TreeData<FileSystemTreeNodeData>): void;
|
|
26
|
+
reprocessNodeTree(generationResult: FileResult[], treeData: TreeData<FileSystemTreeNodeData>, openedNodeIds: string[]): void;
|
|
27
|
+
onTreeNodeSelect(node: FileSystemTreeNodeData, treeData: TreeData<FileSystemTreeNodeData>): void;
|
|
28
|
+
setSelectedNode(node?: FileSystemTreeNodeData): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=FileSystemState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/FileSystemState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EACL,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,oBAAoB,EAIrB,MAAM,kCAAkC,CAAC;AAE1C,qBAAa,eAAe;IAC1B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,iBAAiB,CAAC,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAAG,SAAS,CAAC;IACjE,YAAY,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAClD,UAAU,+BAAsC;gBAEpC,IAAI,EAAE,MAAM;IAaxB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,oBAAoB;IAQjE,oBAAoB,CAClB,iBAAiB,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GAClD,IAAI;IAIP,iBAAiB,CACf,gBAAgB,EAAE,UAAU,EAAE,EAC9B,QAAQ,EAAE,QAAQ,CAAC,sBAAsB,CAAC,EAC1C,aAAa,EAAE,MAAM,EAAE,GACtB,IAAI;IAsBP,gBAAgB,CACd,IAAI,EAAE,sBAAsB,EAC5B,QAAQ,EAAE,QAAQ,CAAC,sBAAsB,CAAC,GACzC,IAAI;IAWP,eAAe,CAAC,IAAI,CAAC,EAAE,sBAAsB,GAAG,IAAI;CASrD"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 { action, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { FileSystem_Directory, openNode, populateDirectoryTreeNodeChildren, reprocessOpenNodes, } from '../shared/FileSystemTreeUtils.js';
|
|
18
|
+
export class FileSystemState {
|
|
19
|
+
root;
|
|
20
|
+
directoryTreeData;
|
|
21
|
+
selectedNode;
|
|
22
|
+
filesIndex = new Map();
|
|
23
|
+
constructor(root) {
|
|
24
|
+
this.root = new FileSystem_Directory(root);
|
|
25
|
+
makeObservable(this, {
|
|
26
|
+
root: observable,
|
|
27
|
+
directoryTreeData: observable.ref,
|
|
28
|
+
selectedNode: observable.ref,
|
|
29
|
+
reprocessNodeTree: action,
|
|
30
|
+
setDirectoryTreeData: action,
|
|
31
|
+
onTreeNodeSelect: action,
|
|
32
|
+
setSelectedNode: action,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
getOrCreateDirectory(directoryName) {
|
|
36
|
+
return FileSystem_Directory.getOrCreateDirectory(this.root, directoryName, true);
|
|
37
|
+
}
|
|
38
|
+
setDirectoryTreeData(directoryTreeData) {
|
|
39
|
+
this.directoryTreeData = directoryTreeData;
|
|
40
|
+
}
|
|
41
|
+
reprocessNodeTree(generationResult, treeData, openedNodeIds) {
|
|
42
|
+
reprocessOpenNodes(treeData, this.filesIndex, this.root, openedNodeIds);
|
|
43
|
+
// select the current file node if available, else select the first output
|
|
44
|
+
const selectedFileNodePath = generationResult.length === 1 ||
|
|
45
|
+
(this.selectedNode === undefined && generationResult.length !== 0)
|
|
46
|
+
? generationResult[0].value.fileName
|
|
47
|
+
: this.selectedNode?.fileNode.path;
|
|
48
|
+
if (selectedFileNodePath) {
|
|
49
|
+
const file = this.filesIndex.get(selectedFileNodePath);
|
|
50
|
+
if (file) {
|
|
51
|
+
const node = openNode(file, treeData);
|
|
52
|
+
if (node) {
|
|
53
|
+
this.onTreeNodeSelect(node, treeData);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.selectedNode = undefined;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
this.setDirectoryTreeData({ ...treeData });
|
|
61
|
+
}
|
|
62
|
+
onTreeNodeSelect(node, treeData) {
|
|
63
|
+
if (node.childrenIds?.length) {
|
|
64
|
+
node.isOpen = !node.isOpen;
|
|
65
|
+
if (node.fileNode instanceof FileSystem_Directory) {
|
|
66
|
+
populateDirectoryTreeNodeChildren(node, treeData);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
this.setSelectedNode(node);
|
|
70
|
+
this.setDirectoryTreeData({ ...treeData });
|
|
71
|
+
}
|
|
72
|
+
setSelectedNode(node) {
|
|
73
|
+
if (this.selectedNode) {
|
|
74
|
+
this.selectedNode.isSelected = false;
|
|
75
|
+
}
|
|
76
|
+
if (node) {
|
|
77
|
+
node.isSelected = true;
|
|
78
|
+
}
|
|
79
|
+
this.selectedNode = node;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=FileSystemState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemState.js","sourceRoot":"","sources":["../../../src/stores/editor-state/FileSystemState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAIL,oBAAoB,EACpB,QAAQ,EACR,iCAAiC,EACjC,kBAAkB,GACnB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,OAAO,eAAe;IAC1B,IAAI,CAAuB;IAC3B,iBAAiB,CAAgD;IACjE,YAAY,CAAsC;IAClD,UAAU,GAAG,IAAI,GAAG,EAA2B,CAAC;IAEhD,YAAY,IAAY;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC3C,cAAc,CAAC,IAAI,EAAE;YACnB,IAAI,EAAE,UAAU;YAChB,iBAAiB,EAAE,UAAU,CAAC,GAAG;YACjC,YAAY,EAAE,UAAU,CAAC,GAAG;YAC5B,iBAAiB,EAAE,MAAM;YACzB,oBAAoB,EAAE,M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EAC5B,QAA0C;QAE1C,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE;YAC5B,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;YAC3B,IAAI,IAAI,CAAC,QAAQ,YAAY,oBAAoB,EAAE;gBACjD,iCAAiC,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;aACnD;SACF;QACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,oBAAoB,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,IAA6B;QAC3C,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,CAAC,YAAY,CAAC,UAAU,GAAG,KAAK,CAAC;SACtC;QACD,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type GeneratorFn } from '@finos/legend-shared';
|
|
17
|
-
import { type
|
|
16
|
+
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
|
|
17
|
+
import { type FileSystemTreeNodeData, type FileResult, FileSystem_Directory, FileSystem_File } from '../shared/FileSystemTreeUtils.js';
|
|
18
18
|
import type { TreeData } from '@finos/legend-art';
|
|
19
19
|
import type { EditorStore } from '../EditorStore.js';
|
|
20
20
|
import type { EditorState } from './EditorState.js';
|
|
@@ -30,12 +30,12 @@ export declare class GraphGenerationState {
|
|
|
30
30
|
editorStore: EditorStore;
|
|
31
31
|
isRunningGlobalGenerate: boolean;
|
|
32
32
|
generatedEntities: Map<string, Entity[]>;
|
|
33
|
-
|
|
33
|
+
clearingGenerationEntitiesState: ActionState;
|
|
34
34
|
externalFormatState: ExternalFormatState;
|
|
35
35
|
fileGenerationConfigurations: GenerationConfigurationDescription[];
|
|
36
|
-
rootFileDirectory:
|
|
37
|
-
filesIndex: Map<string,
|
|
38
|
-
selectedNode?:
|
|
36
|
+
rootFileDirectory: FileSystem_Directory;
|
|
37
|
+
filesIndex: Map<string, FileSystem_File>;
|
|
38
|
+
selectedNode?: FileSystemTreeNodeData | undefined;
|
|
39
39
|
constructor(editorStore: EditorStore);
|
|
40
40
|
get fileGenerationConfigurationOptions(): FileGenerationTypeOption[];
|
|
41
41
|
get supportedFileGenerationConfigurationsForCurrentElement(): GenerationConfigurationDescription[];
|
|
@@ -66,9 +66,9 @@ export declare class GraphGenerationState {
|
|
|
66
66
|
possiblyAddMissingGenerationSpecifications(): GeneratorFn<void>;
|
|
67
67
|
processGenerationResult(generationOutputIndex: Map<string, GenerationOutput[]>): void;
|
|
68
68
|
reprocessGenerationFileState(editorState: EditorState): EditorState | undefined;
|
|
69
|
-
reprocessNodeTree(generationResult:
|
|
70
|
-
onTreeNodeSelect(node:
|
|
71
|
-
setSelectedNode(node?:
|
|
69
|
+
reprocessNodeTree(generationResult: FileResult[], treeData: TreeData<FileSystemTreeNodeData>, openedNodeIds: string[]): TreeData<FileSystemTreeNodeData>;
|
|
70
|
+
onTreeNodeSelect(node: FileSystemTreeNodeData, treeData: TreeData<FileSystemTreeNodeData>, reprocess?: boolean): void;
|
|
71
|
+
setSelectedNode(node?: FileSystemTreeNodeData): void;
|
|
72
72
|
emptyFileGeneration(): void;
|
|
73
73
|
}
|
|
74
74
|
//# sourceMappingURL=GraphGenerationState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GraphGenerationState.d.ts","sourceRoot":"","sources":["../../../src/stores/editor-state/GraphGenerationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"GraphGenerationState.d.ts","sourceRoot":"","sources":["../../../src/st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