@finos/legend-studio
Version:
138 lines • 7.92 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.
*/
/// <reference types="react" resolution-mode="require"/>
import type { DSL_LegendStudioApplicationPlugin_Extension } from './LegendStudioApplicationPlugin.js';
import type { ConnectionValueState } from './editor-state/element-editor-state/connection/ConnectionEditorState.js';
import type { EditorStore } from './EditorStore.js';
import type { Store, Connection, SetImplementation, InstanceSetImplementation } from '@finos/legend-graph';
import type { MappingTestState } from './editor-state/element-editor-state/mapping/MappingTestState.js';
import type { MappingExecutionState } from './editor-state/element-editor-state/mapping/MappingExecutionState.js';
import type { NewConnectionValueDriver } from './editor/NewElementState.js';
import type { MappingElement, MappingElementSource } from './editor-state/element-editor-state/mapping/MappingEditorState.js';
import type { InstanceSetImplementationState, MappingElementState, PropertyMappingState } from './editor-state/element-editor-state/mapping/MappingElementState.js';
declare type MappingSourceTypeInfo = {
sourceType: string;
sourceName: string;
};
export declare type SetImplementationDecorator = (setImplementation: SetImplementation) => void;
export declare type SetImplementationDecorationCleaner = (setImplementation: SetImplementation) => void;
export interface MappingElementLabel {
value: string;
root: boolean;
tooltip: string;
}
export declare type SetImplementationMappingElementLabelInfoBuilder = (setImplementation: SetImplementation) => MappingElementLabel | undefined;
export declare type MappingElementSourceExtractor = (mappingElement: MappingElement) => MappingElementSource | undefined;
export declare type SetImplemtationClassifier = (setImplementation: SetImplementation) => string | undefined;
export declare type MappingElementStateCreator = (mappingElement: MappingElement | undefined, editorStore: EditorStore) => MappingElementState | undefined;
export declare type DefaultConnectionValueBuilder = (store: Store) => Connection | undefined;
export declare type ConnectionValueEditorStateBuilder = (editorStore: EditorStore, connection: Connection) => ConnectionValueState | undefined;
export declare type ConnectionEditorRenderer = (connectionValueState: ConnectionValueState, isReadOnly: boolean) => React.ReactNode | undefined;
export declare type RuntimeConnectionTooltipTextBuilder = (connection: Connection) => string | undefined;
export declare type NewConnectionDriverCreator = (editorStore: EditorStore, store: Store) => NewConnectionValueDriver<Connection> | undefined;
export declare type MappingExecutionQueryEditorActionConfiguration = {
key: string;
renderer: (executionState: MappingExecutionState) => React.ReactNode | undefined;
};
export declare type MappingTestQueryEditorActionConfiguration = {
key: string;
renderer: (testState: MappingTestState, isReadOnly: boolean) => React.ReactNode | undefined;
};
/**
* @returns a boolean indicating whether the update has ocurred or not
*/
export declare type InstanceSetImplementationSourceUpdater = (setImplementation: InstanceSetImplementation, newSource: unknown | undefined) => boolean;
export declare type MappingSourceTypeInfoGetter = (setImplementation: SetImplementation) => MappingSourceTypeInfo | undefined;
export declare type PropertyMappingEditorRenderer = (instanceSetImplementationState: InstanceSetImplementationState, propertyMappingState: PropertyMappingState) => React.ReactNode | undefined;
export declare type InstanceSetImplementationBlockingErrorChecker = (setImplementationState: InstanceSetImplementationState) => boolean | undefined;
export declare type InstanceSetImplementationStoreExtractor = (sourceElement: MappingElementSource) => Store | undefined;
export interface DSLMapping_LegendStudioApplicationPlugin_Extension extends DSL_LegendStudioApplicationPlugin_Extension {
/**
* Get the list of set implementation decorators.
*/
getExtraSetImplementationDecorationCleaners?(): SetImplementationDecorationCleaner[];
/**
* Get the list of set implementation decorators.
*/
getExtraSetImplementationDecorators?(): SetImplementationDecorator[];
/**
* Get the list of mapping element info builders for set implemenetation.
*/
getExtraSetImplementationMappingElementLabelInfoBuilders?(): SetImplementationMappingElementLabelInfoBuilder[];
/**
* Get the list of set implementation classifiers.
*/
getExtraSetImplementationClassifiers?(): SetImplemtationClassifier[];
/**
* Get the list of the mapping element state creators for the given class mapping.
*/
getExtraMappingElementStateCreators?(): MappingElementStateCreator[];
/**
* Get the list of source extractors for the specified mapping element.
*/
getExtraMappingElementSourceExtractors?(): MappingElementSourceExtractor[];
/**
* Get the list of the default connection value builder for a specified store.
*/
getExtraDefaultConnectionValueBuilders?(): DefaultConnectionValueBuilder[];
/**
* Get the list of editor state builders for a specified connection value.
*/
getExtraConnectionValueEditorStateBuilders?(): ConnectionValueEditorStateBuilder[];
/**
* Get the list of renderers for a specified connection editor state.
*/
getExtraConnectionEditorRenderers?(): ConnectionEditorRenderer[];
/**
* Get the list of the runtime connection tooltip text builders for a specified connection.
*/
getExtraRuntimeConnectionTooltipTextBuilders?(): RuntimeConnectionTooltipTextBuilder[];
/**
* Get the list of creators for connection creation state driver given the store.
*/
getExtraNewConnectionDriverCreators?(): NewConnectionDriverCreator[];
/**
* Get the list of actions for mapping execution query editor.
*/
getExtraMappingExecutionQueryEditorActionConfigurations?(): MappingExecutionQueryEditorActionConfiguration[];
/**
* Get the list of actions for mapping test query editor.
*/
getExtraMappingTestQueryEditorActionConfigurations?(): MappingTestQueryEditorActionConfiguration[];
/**
* Get the list of instance set implementation source updaters.
*/
getExtraInstanceSetImplementationSourceUpdaters?(): InstanceSetImplementationSourceUpdater[];
/**
* Get the list of source-type info getters for mapping.
*/
getExtraMappingSourceTypeInfoGetters?(): MappingSourceTypeInfoGetter[];
/**
* Get the list of renderers for property mapping editor.
*/
getExtraPropertyMappingEditorRenderers?(): PropertyMappingEditorRenderer[];
/**
* Get the list of checkers for errors in the specified instance set implementation that could
* potentially block the user interaction until fixed (e.g. parser error in some property mapping transform lambda editor).
*/
getExtraInstanceSetImplementationBlockingErrorCheckers?(): InstanceSetImplementationBlockingErrorChecker[];
/**
* Get the list of store extractor for the given set implementation source.
*/
getExtraInstanceSetImplementationStoreExtractors?(): InstanceSetImplementationStoreExtractor[];
}
export {};
//# sourceMappingURL=DSLMapping_LegendStudioApplicationPlugin_Extension.d.ts.map