@finos/legend-studio
Version:
68 lines • 3.27 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 { type GeneratorFn, ActionState } from '@finos/legend-shared';
import { type GenerationProperty, type PackageableElement, type ExternalFormatDescription, CompilationError, ConfigurationProperty, ExternalFormatSchema as Schema, SchemaSet } from '@finos/legend-graph';
import type { EditorStore } from '../../../EditorStore.js';
import { ElementEditorState } from '../ElementEditorState.js';
export declare enum SCHEMA_SET_TAB_TYPE {
GENERAL = "GENERAL",
MODEL_GENERATION = "MODEL_GENERATION"
}
export declare class SchemaSetModelGenerationState {
isGenerating: boolean;
isImportingGeneratedElements: boolean;
schemaSetEditorState: SchemaSetEditorState;
configurationProperties: ConfigurationProperty[];
generationValue: string;
constructor(schemaSetEditorState: SchemaSetEditorState);
setConfigurationProperty(val: ConfigurationProperty[]): void;
get description(): ExternalFormatDescription;
get modelGenerationProperties(): GenerationProperty[];
getConfigValue(name: string): unknown | undefined;
getConfig(name: string): ConfigurationProperty | undefined;
setGenerationValue(val: string): void;
updateGenerationParameters(generationProperty: GenerationProperty, newValue: unknown): void;
generateModel(): GeneratorFn<void>;
importGrammar(): GeneratorFn<void>;
}
export declare class ImportSchemaContentState {
editorStore: EditorStore;
schemaSetEditorState: SchemaSetEditorState;
loadingSchemaContentState: ActionState;
files: File[] | undefined;
importSchemaModal: boolean;
constructor(schemaSetEditorState: SchemaSetEditorState, editorStore: EditorStore);
setImportSchemaModal(val: boolean): void;
setFiles(files: File[] | undefined): void;
removeFile(file: File): void;
closeModal(): void;
importSchemas(files: File[]): GeneratorFn<void>;
}
export declare class SchemaSetEditorState extends ElementEditorState {
currentSchema?: Schema | undefined;
selectedTab: SCHEMA_SET_TAB_TYPE;
schemaValidationError?: CompilationError;
importSchemaContentState: ImportSchemaContentState;
schemaSetModelGenerationState: SchemaSetModelGenerationState;
constructor(editorStore: EditorStore, element: PackageableElement);
get schemaSet(): SchemaSet;
setCurrentSchema(value: Schema | undefined): void;
setSelectedTab(tab: SCHEMA_SET_TAB_TYPE): void;
setSchemaValidationerror(error: CompilationError): void;
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
validateSchema(currentSchema: Schema): GeneratorFn<void>;
}
//# sourceMappingURL=SchemaSetEditorState.d.ts.map