@finos/legend-application-studio 22.2.1 → 22.3.1
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 +35 -95
- package/lib/stores/EditorGraphState.js.map +1 -1
- package/lib/stores/EditorStore.d.ts.map +1 -1
- package/lib/stores/EditorStore.js +7 -1
- package/lib/stores/EditorStore.js.map +1 -1
- package/lib/stores/EditorTabManagerState.d.ts +1 -1
- package/lib/stores/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/EditorTabManagerState.js +11 -13
- 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 -13
- 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/RuntimeEditorState.d.ts.map +1 -1
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js +7 -3
- package/lib/stores/editor-state/element-editor-state/RuntimeEditorState.js.map +1 -1
- 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 +39 -29
- package/lib/stores/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +2 -2
- package/lib/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.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/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/shared/testable/TestableUtils.d.ts +1 -1
- package/lib/stores/shared/testable/TestableUtils.d.ts.map +1 -1
- package/lib/stores/shared/testable/TestableUtils.js +6 -4
- package/lib/stores/shared/testable/TestableUtils.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 +56 -153
- package/src/stores/EditorStore.ts +15 -5
- package/src/stores/EditorTabManagerState.ts +17 -20
- package/src/stores/ExplorerTreeState.ts +26 -18
- 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/RuntimeEditorState.ts +10 -8
- 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 +61 -56
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +2 -2
- package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts +6 -2
- package/src/stores/shared/{FileGenerationTreeUtils.ts → FileSystemTreeUtils.ts} +77 -76
- package/src/stores/shared/PackageTreeUtils.ts +144 -10
- package/src/stores/shared/testable/TestableUtils.ts +8 -4
- 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
|
@@ -379,69 +379,70 @@ export interface ServiceExecutionContext {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
export abstract class ServiceExecutionContextState {
|
|
382
|
-
executionContext: ServiceExecutionContext;
|
|
383
382
|
executionState: ServiceExecutionState;
|
|
384
383
|
|
|
385
|
-
constructor(
|
|
386
|
-
executionContext: ServiceExecutionContext,
|
|
387
|
-
executionState: ServiceExecutionState,
|
|
388
|
-
) {
|
|
389
|
-
this.executionContext = executionContext;
|
|
384
|
+
constructor(executionState: ServiceExecutionState) {
|
|
390
385
|
this.executionState = executionState;
|
|
391
386
|
}
|
|
392
387
|
|
|
388
|
+
abstract get executionContext(): ServiceExecutionContext;
|
|
393
389
|
abstract setMapping(value: Mapping): void;
|
|
394
390
|
abstract setRuntime(value: Runtime): void;
|
|
395
391
|
}
|
|
396
392
|
|
|
397
393
|
export class SingleExecutionContextState extends ServiceExecutionContextState {
|
|
398
|
-
declare
|
|
394
|
+
declare executionState: SingleServicePureExecutionState;
|
|
399
395
|
|
|
400
|
-
constructor(
|
|
401
|
-
|
|
402
|
-
executionState: ServiceExecutionState,
|
|
403
|
-
) {
|
|
404
|
-
super(
|
|
405
|
-
{
|
|
406
|
-
mapping:
|
|
407
|
-
executionContext.mapping as PackageableElementReference<Mapping>,
|
|
408
|
-
runtime: executionContext.runtime as Runtime,
|
|
409
|
-
},
|
|
410
|
-
executionState,
|
|
411
|
-
);
|
|
412
|
-
this.executionContext1 = executionContext;
|
|
396
|
+
constructor(executionState: SingleServicePureExecutionState) {
|
|
397
|
+
super(executionState);
|
|
413
398
|
makeObservable(this, {
|
|
414
|
-
executionContext: observable,
|
|
415
399
|
setMapping: action,
|
|
416
400
|
setRuntime: action,
|
|
417
401
|
});
|
|
402
|
+
this.executionState = executionState;
|
|
418
403
|
}
|
|
419
404
|
|
|
420
405
|
setMapping(value: Mapping): void {
|
|
421
|
-
this.executionContext.mapping =
|
|
422
|
-
PackageableElementExplicitReference.create(value);
|
|
423
406
|
pureSingleExecution_setMapping(
|
|
424
|
-
this.
|
|
407
|
+
this.executionState.execution,
|
|
425
408
|
value,
|
|
426
409
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
427
410
|
);
|
|
428
411
|
}
|
|
429
412
|
setRuntime(value: Runtime): void {
|
|
430
|
-
this.executionContext.runtime = value;
|
|
431
413
|
pureSingleExecution_setRuntime(
|
|
432
|
-
this.
|
|
414
|
+
this.executionState.execution,
|
|
433
415
|
value,
|
|
434
416
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
435
417
|
);
|
|
436
418
|
}
|
|
419
|
+
|
|
420
|
+
get executionContext(): ServiceExecutionContext {
|
|
421
|
+
return {
|
|
422
|
+
mapping: guaranteeNonNullable(this.executionState.execution.mapping),
|
|
423
|
+
runtime: guaranteeNonNullable(this.executionState.execution.runtime),
|
|
424
|
+
};
|
|
425
|
+
}
|
|
437
426
|
}
|
|
438
427
|
|
|
439
428
|
export class KeyedExecutionContextState extends ServiceExecutionContextState {
|
|
440
|
-
|
|
429
|
+
keyedExecutionParameter: KeyedExecutionParameter;
|
|
430
|
+
|
|
431
|
+
constructor(
|
|
432
|
+
keyedExecutionParameter: KeyedExecutionParameter,
|
|
433
|
+
executionState: MultiServicePureExecutionState,
|
|
434
|
+
) {
|
|
435
|
+
super(executionState);
|
|
436
|
+
makeObservable(this, {
|
|
437
|
+
setMapping: action,
|
|
438
|
+
setRuntime: action,
|
|
439
|
+
});
|
|
440
|
+
this.keyedExecutionParameter = keyedExecutionParameter;
|
|
441
|
+
}
|
|
441
442
|
|
|
442
443
|
setMapping(value: Mapping): void {
|
|
443
444
|
pureSingleExecution_setMapping(
|
|
444
|
-
this.
|
|
445
|
+
this.keyedExecutionParameter,
|
|
445
446
|
value,
|
|
446
447
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
447
448
|
);
|
|
@@ -449,11 +450,15 @@ export class KeyedExecutionContextState extends ServiceExecutionContextState {
|
|
|
449
450
|
|
|
450
451
|
setRuntime(value: Runtime): void {
|
|
451
452
|
pureSingleExecution_setRuntime(
|
|
452
|
-
this.
|
|
453
|
+
this.keyedExecutionParameter,
|
|
453
454
|
value,
|
|
454
455
|
this.executionState.editorStore.changeDetectionState.observerContext,
|
|
455
456
|
);
|
|
456
457
|
}
|
|
458
|
+
|
|
459
|
+
get executionContext(): ServiceExecutionContext {
|
|
460
|
+
return this.keyedExecutionParameter;
|
|
461
|
+
}
|
|
457
462
|
}
|
|
458
463
|
|
|
459
464
|
export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
@@ -522,7 +527,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
522
527
|
};
|
|
523
528
|
|
|
524
529
|
*generatePlan(debug: boolean): GeneratorFn<void> {
|
|
525
|
-
if (
|
|
530
|
+
if (this.isGeneratingPlan) {
|
|
526
531
|
return;
|
|
527
532
|
}
|
|
528
533
|
try {
|
|
@@ -533,8 +538,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
533
538
|
const debugResult =
|
|
534
539
|
(yield this.editorStore.graphManagerState.graphManager.debugExecutionPlanGeneration(
|
|
535
540
|
query,
|
|
536
|
-
this.selectedExecutionContextState
|
|
537
|
-
this.selectedExecutionContextState
|
|
541
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
542
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
538
543
|
this.editorStore.graphManagerState.graph,
|
|
539
544
|
)) as { plan: RawExecutionPlan; debug: string };
|
|
540
545
|
rawPlan = debugResult.plan;
|
|
@@ -543,8 +548,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
543
548
|
rawPlan =
|
|
544
549
|
(yield this.editorStore.graphManagerState.graphManager.generateExecutionPlan(
|
|
545
550
|
query,
|
|
546
|
-
this.selectedExecutionContextState
|
|
547
|
-
this.selectedExecutionContextState
|
|
551
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
552
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
548
553
|
this.editorStore.graphManagerState.graph,
|
|
549
554
|
)) as object;
|
|
550
555
|
}
|
|
@@ -571,8 +576,8 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
571
576
|
}
|
|
572
577
|
}
|
|
573
578
|
|
|
574
|
-
*
|
|
575
|
-
if (
|
|
579
|
+
*handleRunQuery(): GeneratorFn<void> {
|
|
580
|
+
if (this.isRunningQuery) {
|
|
576
581
|
return;
|
|
577
582
|
}
|
|
578
583
|
const query = this.queryState.query;
|
|
@@ -585,25 +590,24 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
585
590
|
}
|
|
586
591
|
|
|
587
592
|
*runQuery(): GeneratorFn<void> {
|
|
588
|
-
if (
|
|
593
|
+
if (this.isRunningQuery) {
|
|
589
594
|
return;
|
|
590
595
|
}
|
|
591
596
|
try {
|
|
592
597
|
this.isRunningQuery = true;
|
|
593
|
-
const promise =
|
|
594
|
-
this.
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
);
|
|
598
|
+
const promise = this.editorStore.graphManagerState.graphManager.runQuery(
|
|
599
|
+
this.getExecutionQuery(),
|
|
600
|
+
this.selectedExecutionContextState?.executionContext.mapping.value,
|
|
601
|
+
this.selectedExecutionContextState?.executionContext.runtime,
|
|
602
|
+
this.editorStore.graphManagerState.graph,
|
|
603
|
+
{
|
|
604
|
+
useLosslessParse: true,
|
|
605
|
+
parameterValues: buildExecutionParameterValues(
|
|
606
|
+
this.parameterState.parameterStates,
|
|
607
|
+
this.editorStore.graphManagerState,
|
|
608
|
+
),
|
|
609
|
+
},
|
|
610
|
+
);
|
|
607
611
|
this.setQueryRunPromise(promise);
|
|
608
612
|
const result = (yield promise) as ExecutionResult;
|
|
609
613
|
if (this.queryRunPromise === promise) {
|
|
@@ -679,7 +683,7 @@ export abstract class ServicePureExecutionState extends ServiceExecutionState {
|
|
|
679
683
|
),
|
|
680
684
|
);
|
|
681
685
|
decorateRuntimeWithNewMapping(
|
|
682
|
-
|
|
686
|
+
customRuntime,
|
|
683
687
|
executionState.executionContext.mapping.value,
|
|
684
688
|
this.editorStore,
|
|
685
689
|
);
|
|
@@ -734,7 +738,7 @@ export class InlineServicePureExecutionState extends ServicePureExecutionState {
|
|
|
734
738
|
updateExecutionQuery: action,
|
|
735
739
|
setOpeningQueryEditor: action,
|
|
736
740
|
generatePlan: flow,
|
|
737
|
-
|
|
741
|
+
handleRunQuery: flow,
|
|
738
742
|
runQuery: flow,
|
|
739
743
|
});
|
|
740
744
|
this.selectedExecutionContextState =
|
|
@@ -767,6 +771,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
767
771
|
makeObservable(this, {
|
|
768
772
|
queryState: observable,
|
|
769
773
|
getInitiallySelectedExecutionContextState: observable,
|
|
774
|
+
selectedExecutionContextState: observable,
|
|
770
775
|
runtimeEditorState: observable,
|
|
771
776
|
isRunningQuery: observable,
|
|
772
777
|
isGeneratingPlan: observable,
|
|
@@ -789,7 +794,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
789
794
|
setShowChangeExecModal: action,
|
|
790
795
|
setIsRunningQuery: action,
|
|
791
796
|
generatePlan: flow,
|
|
792
|
-
|
|
797
|
+
handleRunQuery: flow,
|
|
793
798
|
runQuery: flow,
|
|
794
799
|
});
|
|
795
800
|
this.selectedExecutionContextState =
|
|
@@ -801,7 +806,7 @@ export class SingleServicePureExecutionState extends ServicePureExecutionState {
|
|
|
801
806
|
}
|
|
802
807
|
|
|
803
808
|
getInitiallySelectedExecutionContextState(): ServiceExecutionContextState {
|
|
804
|
-
return new SingleExecutionContextState(this
|
|
809
|
+
return new SingleExecutionContextState(this);
|
|
805
810
|
}
|
|
806
811
|
|
|
807
812
|
setMultiExecutionKey(val: string): void {
|
|
@@ -877,7 +882,7 @@ export class MultiServicePureExecutionState extends ServicePureExecutionState {
|
|
|
877
882
|
setIsRunningQuery: action,
|
|
878
883
|
changeExecution: action,
|
|
879
884
|
generatePlan: flow,
|
|
880
|
-
|
|
885
|
+
handleRunQuery: flow,
|
|
881
886
|
runQuery: flow,
|
|
882
887
|
});
|
|
883
888
|
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
createMockPrimitiveProperty,
|
|
58
58
|
} from '../../../../shared/MockDataUtils.js';
|
|
59
59
|
import {
|
|
60
|
-
|
|
60
|
+
TEMPORARY_createRelationalDataFromCSV,
|
|
61
61
|
EmbeddedDataConnectionTypeVisitor,
|
|
62
62
|
getAllIdentifiedConnectionsFromRuntime,
|
|
63
63
|
TEMPORARY_EmbeddedDataConnectionVisitor,
|
|
@@ -155,7 +155,7 @@ export class ConnectionTestDataState {
|
|
|
155
155
|
anonymizeGeneratedData: this.anonymizeGeneratedData,
|
|
156
156
|
},
|
|
157
157
|
)) as string;
|
|
158
|
-
embeddedData =
|
|
158
|
+
embeddedData = TEMPORARY_createRelationalDataFromCSV(value);
|
|
159
159
|
} else {
|
|
160
160
|
embeddedData = connection.accept_ConnectionVisitor(
|
|
161
161
|
new TEMPORARY_EmbeddedDataConnectionVisitor(this.editorStore),
|
package/src/stores/editor-state/element-editor-state/service/testable/ServiceTestEditorState.ts
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
buildLambdaVariableExpressions,
|
|
25
25
|
VariableExpression,
|
|
26
26
|
PureMultiExecution,
|
|
27
|
+
PureExecution,
|
|
27
28
|
} from '@finos/legend-graph';
|
|
28
29
|
import { action, flow, makeObservable, observable } from 'mobx';
|
|
29
30
|
import { TestableTestEditorState } from '../../testable/TestableEditorState.js';
|
|
@@ -183,8 +184,11 @@ export class ServiceTestSetupState {
|
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
get serviceQuery(): RawLambda | undefined {
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
const execution = this.testState.testable.execution;
|
|
188
|
+
if (execution instanceof PureExecution) {
|
|
189
|
+
return execution.func;
|
|
190
|
+
}
|
|
191
|
+
return undefined;
|
|
188
192
|
}
|
|
189
193
|
|
|
190
194
|
get queryVariableExpressions(): VariableExpression[] {
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
type GenerationOutput,
|
|
26
26
|
} from '@finos/legend-graph';
|
|
27
27
|
|
|
28
|
-
export
|
|
29
|
-
|
|
28
|
+
export const GENERATION_FILE_ROOT_NAME = 'GENERATION_FILE_ROOT';
|
|
29
|
+
|
|
30
|
+
export interface FileResult {
|
|
31
|
+
value: GenerationOutput;
|
|
30
32
|
parentId?: string | undefined;
|
|
31
33
|
}
|
|
32
|
-
export const GENERATION_FILE_ROOT_NAME = 'GENERATION_FILE_ROOT';
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
class GenerationFileNodeElement {
|
|
35
|
+
class FileSystemElement {
|
|
36
36
|
name: string;
|
|
37
|
-
directory?:
|
|
37
|
+
directory?: FileSystem_Directory | undefined;
|
|
38
38
|
parentId?: string | undefined;
|
|
39
39
|
|
|
40
40
|
constructor(name: string, fileGenerationParent?: string) {
|
|
@@ -53,42 +53,42 @@ class GenerationFileNodeElement {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export class
|
|
57
|
-
children:
|
|
56
|
+
export class FileSystem_Directory extends FileSystemElement {
|
|
57
|
+
children: FileSystemElement[] = [];
|
|
58
58
|
|
|
59
|
-
setDirectory(val:
|
|
59
|
+
setDirectory(val: FileSystem_Directory): void {
|
|
60
60
|
this.directory = val;
|
|
61
61
|
}
|
|
62
|
-
addChild(val:
|
|
62
|
+
addChild(val: FileSystemElement): void {
|
|
63
63
|
addUniqueEntry(this.children, val);
|
|
64
64
|
}
|
|
65
|
-
addElement(val:
|
|
65
|
+
addElement(val: FileSystemElement): void {
|
|
66
66
|
this.addChild(val);
|
|
67
67
|
val.directory = this;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
static createDirectoryFromParent(
|
|
71
71
|
name: string,
|
|
72
|
-
parent:
|
|
73
|
-
|
|
74
|
-
):
|
|
75
|
-
const newDirectory = new
|
|
72
|
+
parent: FileSystem_Directory,
|
|
73
|
+
genParent?: string,
|
|
74
|
+
): FileSystem_Directory {
|
|
75
|
+
const newDirectory = new FileSystem_Directory(name, genParent);
|
|
76
76
|
newDirectory.setDirectory(parent);
|
|
77
77
|
return newDirectory;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
static getOrCreateDirectory(
|
|
81
|
-
parent:
|
|
81
|
+
parent: FileSystem_Directory,
|
|
82
82
|
directoryName: string,
|
|
83
83
|
insert: boolean,
|
|
84
|
-
):
|
|
84
|
+
): FileSystem_Directory {
|
|
85
85
|
const index = directoryName.indexOf(DIRECTORY_PATH_DELIMITER);
|
|
86
86
|
const str =
|
|
87
87
|
index === -1 ? directoryName : directoryName.substring(0, index);
|
|
88
|
-
let node:
|
|
88
|
+
let node: FileSystem_Directory | undefined;
|
|
89
89
|
node = parent.children.find(
|
|
90
|
-
(child:
|
|
91
|
-
child instanceof
|
|
90
|
+
(child: FileSystemElement): child is FileSystem_Directory =>
|
|
91
|
+
child instanceof FileSystem_Directory && child.name === str,
|
|
92
92
|
);
|
|
93
93
|
if (!node) {
|
|
94
94
|
if (!insert) {
|
|
@@ -97,11 +97,11 @@ export class GenerationDirectory extends GenerationFileNodeElement {
|
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
// create the node if it is not in parent directory
|
|
100
|
-
node =
|
|
100
|
+
node = FileSystem_Directory.createDirectoryFromParent(str, parent);
|
|
101
101
|
parent.addChild(node);
|
|
102
102
|
}
|
|
103
103
|
if (index !== -1) {
|
|
104
|
-
return
|
|
104
|
+
return FileSystem_Directory.getOrCreateDirectory(
|
|
105
105
|
node,
|
|
106
106
|
directoryName.substring(index + DIRECTORY_PATH_DELIMITER.length),
|
|
107
107
|
insert,
|
|
@@ -121,7 +121,7 @@ export class GenerationDirectory extends GenerationFileNodeElement {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
export class
|
|
124
|
+
export class FileSystem_File extends FileSystemElement {
|
|
125
125
|
content!: string;
|
|
126
126
|
format?: string | undefined;
|
|
127
127
|
|
|
@@ -137,31 +137,31 @@ export class GenerationFile extends GenerationFileNodeElement {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
//
|
|
141
|
-
export interface
|
|
142
|
-
fileNode:
|
|
140
|
+
// Tree Node
|
|
141
|
+
export interface FileSystemTreeNodeData extends TreeNodeData {
|
|
142
|
+
fileNode: FileSystemElement;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
export const
|
|
146
|
-
fileNode:
|
|
147
|
-
):
|
|
145
|
+
export const getFileSystemTreeNodeData = (
|
|
146
|
+
fileNode: FileSystemElement,
|
|
147
|
+
): FileSystemTreeNodeData => ({
|
|
148
148
|
id: fileNode.path,
|
|
149
149
|
label: fileNode.name,
|
|
150
150
|
childrenIds:
|
|
151
|
-
fileNode instanceof
|
|
151
|
+
fileNode instanceof FileSystem_Directory
|
|
152
152
|
? fileNode.children.map((child) => child.path)
|
|
153
153
|
: undefined,
|
|
154
154
|
fileNode: fileNode,
|
|
155
155
|
});
|
|
156
156
|
|
|
157
157
|
export const populateDirectoryTreeNodeChildren = (
|
|
158
|
-
node:
|
|
159
|
-
treeData: TreeData<
|
|
158
|
+
node: FileSystemTreeNodeData,
|
|
159
|
+
treeData: TreeData<FileSystemTreeNodeData>,
|
|
160
160
|
): void => {
|
|
161
|
-
if (node.childrenIds && node.fileNode instanceof
|
|
161
|
+
if (node.childrenIds && node.fileNode instanceof FileSystem_Directory) {
|
|
162
162
|
node.childrenIds = node.fileNode.children.map((child) => child.path);
|
|
163
163
|
node.fileNode.children
|
|
164
|
-
.map((child) =>
|
|
164
|
+
.map((child) => getFileSystemTreeNodeData(child))
|
|
165
165
|
.forEach((childNode) => {
|
|
166
166
|
const currentNode = treeData.nodes.get(childNode.id);
|
|
167
167
|
if (currentNode) {
|
|
@@ -174,14 +174,14 @@ export const populateDirectoryTreeNodeChildren = (
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
export const
|
|
178
|
-
dir:
|
|
177
|
+
export const getFileSystemTreeData = (
|
|
178
|
+
dir: FileSystem_Directory,
|
|
179
179
|
rootWrapperName?: string,
|
|
180
|
-
): TreeData<
|
|
180
|
+
): TreeData<FileSystemTreeNodeData> => {
|
|
181
181
|
const rootIds: string[] = [];
|
|
182
|
-
const nodes = new Map<string,
|
|
182
|
+
const nodes = new Map<string, FileSystemTreeNodeData>();
|
|
183
183
|
if (rootWrapperName) {
|
|
184
|
-
const rootNode =
|
|
184
|
+
const rootNode = getFileSystemTreeNodeData(dir);
|
|
185
185
|
rootNode.label = rootWrapperName;
|
|
186
186
|
addUniqueEntry(rootIds, rootNode.id);
|
|
187
187
|
nodes.set(rootNode.id, rootNode);
|
|
@@ -191,11 +191,11 @@ export const getGenerationTreeData = (
|
|
|
191
191
|
.sort((a, b) => a.name.localeCompare(b.name))
|
|
192
192
|
.sort(
|
|
193
193
|
(a, b) =>
|
|
194
|
-
(b instanceof
|
|
195
|
-
(a instanceof
|
|
194
|
+
(b instanceof FileSystem_Directory ? 1 : 0) -
|
|
195
|
+
(a instanceof FileSystem_Directory ? 1 : 0),
|
|
196
196
|
)
|
|
197
197
|
.forEach((childDirectory) => {
|
|
198
|
-
const childTreeNodeData =
|
|
198
|
+
const childTreeNodeData = getFileSystemTreeNodeData(childDirectory);
|
|
199
199
|
addUniqueEntry(rootIds, childTreeNodeData.id);
|
|
200
200
|
nodes.set(childTreeNodeData.id, childTreeNodeData);
|
|
201
201
|
});
|
|
@@ -204,11 +204,11 @@ export const getGenerationTreeData = (
|
|
|
204
204
|
};
|
|
205
205
|
|
|
206
206
|
export const addNode = (
|
|
207
|
-
element:
|
|
208
|
-
treeData: TreeData<
|
|
207
|
+
element: FileSystemElement,
|
|
208
|
+
treeData: TreeData<FileSystemTreeNodeData>,
|
|
209
209
|
showRoot?: boolean,
|
|
210
|
-
):
|
|
211
|
-
const newNode =
|
|
210
|
+
): FileSystemTreeNodeData => {
|
|
211
|
+
const newNode = getFileSystemTreeNodeData(element);
|
|
212
212
|
treeData.nodes.set(newNode.id, newNode);
|
|
213
213
|
if (
|
|
214
214
|
!element.directory ||
|
|
@@ -227,28 +227,28 @@ export const addNode = (
|
|
|
227
227
|
};
|
|
228
228
|
|
|
229
229
|
export const openNode = (
|
|
230
|
-
element:
|
|
231
|
-
treeData: TreeData<
|
|
230
|
+
element: FileSystemElement,
|
|
231
|
+
treeData: TreeData<FileSystemTreeNodeData>,
|
|
232
232
|
showRoot?: boolean,
|
|
233
|
-
):
|
|
233
|
+
): FileSystemTreeNodeData | undefined => {
|
|
234
234
|
let currentElement = element;
|
|
235
|
-
let openingNode:
|
|
235
|
+
let openingNode: FileSystemTreeNodeData | undefined;
|
|
236
236
|
while (currentElement.directory) {
|
|
237
|
-
const node:
|
|
237
|
+
const node: FileSystemTreeNodeData =
|
|
238
238
|
treeData.nodes.get(currentElement.path) ??
|
|
239
239
|
addNode(currentElement, treeData, showRoot);
|
|
240
|
-
node.isOpen = currentElement instanceof
|
|
240
|
+
node.isOpen = currentElement instanceof FileSystem_Directory;
|
|
241
241
|
openingNode = !openingNode ? node : openingNode;
|
|
242
242
|
currentElement = currentElement.directory;
|
|
243
243
|
}
|
|
244
244
|
return openingNode;
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
export const
|
|
248
|
-
node:
|
|
249
|
-
treeData: TreeData<
|
|
250
|
-
):
|
|
251
|
-
if (node.childrenIds && node.fileNode instanceof
|
|
247
|
+
export const getFileSystemChildNodes = (
|
|
248
|
+
node: FileSystemTreeNodeData,
|
|
249
|
+
treeData: TreeData<FileSystemTreeNodeData>,
|
|
250
|
+
): FileSystemTreeNodeData[] => {
|
|
251
|
+
if (node.childrenIds && node.fileNode instanceof FileSystem_Directory) {
|
|
252
252
|
populateDirectoryTreeNodeChildren(node, treeData);
|
|
253
253
|
return node.childrenIds
|
|
254
254
|
.map((id) => treeData.nodes.get(id))
|
|
@@ -256,21 +256,21 @@ export const getFileGenerationChildNodes = (
|
|
|
256
256
|
.sort((a, b) => a.label.localeCompare(b.label))
|
|
257
257
|
.sort(
|
|
258
258
|
(a, b) =>
|
|
259
|
-
(b.fileNode instanceof
|
|
260
|
-
(a.fileNode instanceof
|
|
259
|
+
(b.fileNode instanceof FileSystem_Directory ? 1 : 0) -
|
|
260
|
+
(a.fileNode instanceof FileSystem_Directory ? 1 : 0),
|
|
261
261
|
);
|
|
262
262
|
}
|
|
263
263
|
return [];
|
|
264
264
|
};
|
|
265
265
|
|
|
266
|
-
export const
|
|
267
|
-
rootDirectory:
|
|
268
|
-
|
|
269
|
-
filesIndex: Map<string,
|
|
266
|
+
export const buildFileSystemDirectory = (
|
|
267
|
+
rootDirectory: FileSystem_Directory,
|
|
268
|
+
filesResultIndex: Map<string, FileResult>,
|
|
269
|
+
filesIndex: Map<string, FileSystem_File>,
|
|
270
270
|
): void => {
|
|
271
|
-
Array.from(
|
|
272
|
-
const
|
|
273
|
-
const filePath =
|
|
271
|
+
Array.from(filesResultIndex.values()).forEach((fileResult) => {
|
|
272
|
+
const resultValue = fileResult.value;
|
|
273
|
+
const filePath = resultValue.fileName;
|
|
274
274
|
const index = filePath.lastIndexOf(DIRECTORY_PATH_DELIMITER);
|
|
275
275
|
const fileName =
|
|
276
276
|
index === -1
|
|
@@ -283,22 +283,23 @@ export const buildGenerationDirectory = (
|
|
|
283
283
|
index === -1 ? undefined : filePath.substring(0, index);
|
|
284
284
|
let directory = rootDirectory;
|
|
285
285
|
if (directoryName) {
|
|
286
|
-
directory =
|
|
286
|
+
directory = FileSystem_Directory.getOrCreateDirectory(
|
|
287
287
|
rootDirectory,
|
|
288
288
|
directoryName,
|
|
289
289
|
true,
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
|
-
const file = new
|
|
292
|
+
const file = new FileSystem_File(
|
|
293
293
|
fileName,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
resultValue.content,
|
|
295
|
+
fileResult.value.format,
|
|
296
|
+
fileResult.parentId,
|
|
297
297
|
);
|
|
298
298
|
directory.addElement(file);
|
|
299
299
|
filesIndex.set(filePath, file);
|
|
300
300
|
});
|
|
301
301
|
};
|
|
302
|
+
|
|
302
303
|
const openNodeById = (
|
|
303
304
|
id: string,
|
|
304
305
|
treeData: TreeData<TreeNodeData> | undefined,
|
|
@@ -312,19 +313,19 @@ const openNodeById = (
|
|
|
312
313
|
};
|
|
313
314
|
|
|
314
315
|
export const reprocessOpenNodes = (
|
|
315
|
-
treeData: TreeData<
|
|
316
|
-
filesIndex: Map<string,
|
|
317
|
-
rootDirectory:
|
|
316
|
+
treeData: TreeData<FileSystemTreeNodeData>,
|
|
317
|
+
filesIndex: Map<string, FileSystem_File>,
|
|
318
|
+
rootDirectory: FileSystem_Directory,
|
|
318
319
|
openedNodeIds: string[],
|
|
319
320
|
showRoot?: boolean,
|
|
320
321
|
): void => {
|
|
321
322
|
const openNodeElement = (
|
|
322
323
|
elementPath: string,
|
|
323
|
-
):
|
|
324
|
+
): FileSystemTreeNodeData | undefined => {
|
|
324
325
|
const element =
|
|
325
326
|
filesIndex.get(elementPath) ??
|
|
326
327
|
returnUndefOnError(() =>
|
|
327
|
-
|
|
328
|
+
FileSystem_Directory.getOrCreateDirectory(
|
|
328
329
|
rootDirectory,
|
|
329
330
|
elementPath,
|
|
330
331
|
false,
|