@finos/legend-studio
Version:
52 lines • 2.42 kB
TypeScript
/**
* 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 { EditorState } from './EditorState.js';
import { type GeneratorFn } from '@finos/legend-shared';
import type { EditorStore } from '../EditorStore.js';
import { type ImportConfigurationDescription } from '@finos/legend-graph';
import type { ModelLoaderExtensionConfiguration } from '../LegendStudioApplicationPlugin.js';
export declare enum MODEL_UPDATER_INPUT_TYPE {
ENTITIES = "ENTITIES",
PURE_PROTOCOL = "PURE_PROTOCOL",
PURE_GRAMMAR = "PURE_GRAMMAR"
}
export declare class ModelLoaderState extends EditorState {
modelText: string;
currentModelLoadType: MODEL_UPDATER_INPUT_TYPE | string;
modelImportDescriptions: ImportConfigurationDescription[];
modelLoaderExtensionConfigurations: ModelLoaderExtensionConfiguration[];
replace: boolean;
isLoadingModel: boolean;
constructor(editorStore: EditorStore);
get headerName(): string;
getImportConfigurationDescription(key: string): ImportConfigurationDescription | undefined;
getLoaderExtensionConfiguration(key: string): ModelLoaderExtensionConfiguration | undefined;
setReplaceFlag(val: boolean): void;
setModelText(modelText: string): void;
setCurrentModelLoadType(modelLoadType: MODEL_UPDATER_INPUT_TYPE | string): void;
getExampleText(inputType: MODEL_UPDATER_INPUT_TYPE | string): string;
/**
* Current project entities will be taken from the current graph
* If graph is not parsable, we will fall back to model loader
*/
loadCurrentProjectEntities(): GeneratorFn<void>;
loadModel(): GeneratorFn<void>;
fetchAvailableModelImportDescriptions(): GeneratorFn<void>;
private getExampleEntitiesInputText;
private getExamplePureProtocolInputText;
private getExampleExternalFormatInputText;
}
//# sourceMappingURL=ModelLoaderState.d.ts.map