UNPKG

@finos/legend-studio

Version:
59 lines 2.76 kB
/** * Copyright (c) 2020-present, Goldman Sachs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { EditorStore } from '../EditorStore.js'; import { type GeneratorFn } from '@finos/legend-shared'; import { type ViewerPathParams } from '../LegendStudioRouter.js'; import type { Entity } from '@finos/legend-model-storage'; import { Revision, Version } from '@finos/legend-server-sdlc'; import { type ProjectGAVCoordinates } from '@finos/legend-server-depot'; import { type WorkflowManagerState } from '../sidebar-state/WorkflowManagerState.js'; export declare class ProjectViewerStore { editorStore: EditorStore; currentRevision?: Revision | undefined; latestVersion?: Version | undefined; revision?: Revision | undefined; version?: Version | undefined; elementPath?: string | undefined; projectGAVCoordinates?: ProjectGAVCoordinates | undefined; workflowManagerState: WorkflowManagerState | undefined; constructor(editorStore: EditorStore); get onLatestVersion(): boolean; get onCurrentRevision(): boolean; /** * Since we don't dynamically change the route based on the currently opened element * We have to handle the following cases: * 1. if the element is found and then the user opens another element * 2. if the elemnt is not found * in either case, the most suitable behavior at the moment is to internalize/swallow up the entity path param */ internalizeEntityPath(params: ViewerPathParams): void; private initializeGraphManagerState; /** * Initialize the graph by fetching project information from the SDLC server. */ private initializeWithProjectInformation; /** * Initialize the viewer store given GAV coordinate of a project. * This flow is different than the SDLC flow as we need to fetch the project * from Depot server here, where SDLC objects like project configurations * are not available. */ private initializeWithGAV; buildGraph(entities: Entity[], dependencyEntitiesIndex: Map<string, Entity[]>): GeneratorFn<boolean>; initialize(params: ViewerPathParams): GeneratorFn<void>; initWorkflowManagerState(): void; } //# sourceMappingURL=ProjectViewerStore.d.ts.map