UNPKG

@finos/legend-application-studio

Version:
81 lines 4.8 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 { InstanceSetImplementationState, PropertyMappingState } from './MappingElementState.js'; import { type GeneratorFn } from '@finos/legend-shared'; import type { EditorStore } from '../../../EditorStore.js'; import { type SourceInformation, type CompilationError, type FlatDataInstanceSetImplementation, type AbstractFlatDataPropertyMapping, type PropertyMapping, type Property, ParserError, EmbeddedFlatDataPropertyMapping, type CodeCompletionResult } from '@finos/legend-graph'; export declare class FlatDataPropertyMappingState extends PropertyMappingState { editorStore: EditorStore; instanceSetImplementationState: FlatDataInstanceSetImplementationState; propertyMapping: AbstractFlatDataPropertyMapping; constructor(editorStore: EditorStore, instanceSetImplementationState: FlatDataInstanceSetImplementationState, propertyMapping: AbstractFlatDataPropertyMapping); get lambdaId(): string; convertLambdaGrammarStringToObject(): GeneratorFn<void>; convertLambdaObjectToGrammarString(options?: { pretty?: boolean | undefined; preserveCompilationError?: boolean | undefined; }): GeneratorFn<void>; } export declare abstract class FlatDataInstanceSetImplementationState extends InstanceSetImplementationState { mappingElement: FlatDataInstanceSetImplementation | EmbeddedFlatDataPropertyMapping; propertyMappingStates: FlatDataPropertyMappingState[]; isConvertingTransformLambdaObjects: boolean; constructor(editorStore: EditorStore, setImplementation: FlatDataInstanceSetImplementation | EmbeddedFlatDataPropertyMapping); abstract getPropertyMappingStates(propertyMappings: PropertyMapping[]): FlatDataPropertyMappingState[]; get hasParserError(): boolean; setPropertyMappingStates(propertyMappingState: FlatDataPropertyMappingState[]): void; /** * When we decorate, we might lose the error (parser/compiler) on each of the property mapping state * so here we make sure that we reuse existing state and only add new decorated ones */ decorate(): void; convertPropertyMappingTransformObjects(): GeneratorFn<void>; addEmbeddedPropertyMapping(property: Property): EmbeddedFlatDataPropertyMapping; } export declare class EmbeddedFlatDataInstanceSetImplementationState extends FlatDataInstanceSetImplementationState implements FlatDataPropertyMappingState { instanceSetImplementationState: FlatDataInstanceSetImplementationState; mappingElement: EmbeddedFlatDataPropertyMapping; propertyMapping: EmbeddedFlatDataPropertyMapping; constructor(editorStore: EditorStore, instanceSetImplementationState: FlatDataInstanceSetImplementationState, setImplementation: EmbeddedFlatDataPropertyMapping); typeAheadEnabled: boolean; getCodeComplete(input: string): Promise<CodeCompletionResult>; setTypeAhead(val: boolean): void; get lambdaId(): string; getPropertyMappingStates(propertyMappings: PropertyMapping[]): FlatDataPropertyMappingState[]; lambdaPrefix: string; lambdaString: string; parserError?: ParserError | undefined; compilationError?: CompilationError | undefined; setLambdaString(val: string): void; setParserError(error: ParserError | undefined): void; setCompilationError(error: CompilationError | undefined): void; get fullLambdaString(): string; processSourceInformation(sourceInformation: SourceInformation): SourceInformation; extractLambdaString(fullLambdaString: string): string; clearErrors(options?: { preserveCompilationError?: boolean | undefined; }): void; convertLambdaGrammarStringToObject(): GeneratorFn<void>; convertLambdaObjectToGrammarString(options?: { pretty?: boolean | undefined; }): GeneratorFn<void>; } export declare class RootFlatDataInstanceSetImplementationState extends FlatDataInstanceSetImplementationState { mappingElement: FlatDataInstanceSetImplementation; constructor(editorStore: EditorStore, setImplementation: FlatDataInstanceSetImplementation); getPropertyMappingStates(propertyMappings: PropertyMapping[]): FlatDataPropertyMappingState[]; } //# sourceMappingURL=FlatDataInstanceSetImplementationState.d.ts.map