UNPKG

@finos/legend-application-studio

Version:
87 lines 3.91 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 { EditorSDLCState } from '../EditorSDLCState.js'; import { type GeneratorFn, ActionState } from '@finos/legend-shared'; import { type EntityChangeConflict, EntityDiff, EntityChange } from '@finos/legend-server-sdlc'; import { WorkspaceSyncState } from './WorkspaceSyncState.js'; declare class PatchLoaderState { readonly editorStore: EditorStore; readonly sdlcState: EditorSDLCState; changes: EntityChange[] | undefined; currentChanges: EntityChange[]; isLoadingChanges: boolean; showModal: boolean; isValidPatch: boolean; constructor(editorStore: EditorStore, sdlcState: EditorSDLCState); get overiddingChanges(): EntityChange[]; openModal(localChanges: EntityChange[]): void; closeModal(): void; setIsValidPatch(val: boolean): void; setPatchChanges(changes: EntityChange[] | undefined): void; deleteChange(change: EntityChange): void; loadPatchFile(file: File): GeneratorFn<void>; applyChanges(): GeneratorFn<void>; } export declare abstract class LocalChangesState { readonly editorStore: EditorStore; readonly sdlcState: EditorSDLCState; readonly workspaceSyncState: WorkspaceSyncState; readonly pushChangesState: ActionState; readonly refreshLocalChangesDetectorState: ActionState; readonly refreshWorkspaceSyncStatusState: ActionState; readonly patchLoaderState: PatchLoaderState; constructor(editorStore: EditorStore, sdlcState: EditorSDLCState); get hasUnpushedChanges(): boolean; downloadLocalChanges(): void; alertUnsavedChanges(onProceed: () => void): void; refreshWorkspaceSyncStatus(): GeneratorFn<void>; abstract refreshLocalChanges(): GeneratorFn<void>; abstract processConflicts(): GeneratorFn<void>; abstract getCurrentHashIndexes(): Map<string, string>; abstract stopChangeDetection(): void; abstract restartChangeDetection(): GeneratorFn<void>; abstract computeLocalEntityChanges(): EntityChange[]; pushLocalChanges(pushMessage?: string): GeneratorFn<void>; } export declare class FormLocalChangesState extends LocalChangesState { constructor(editorStore: EditorStore, sdlcState: EditorSDLCState); openLocalChange(diff: EntityDiff): void; openWorkspacePullChange(diff: EntityDiff): void; openPotentialWorkspacePullConflict(conflict: EntityChangeConflict): void; refreshLocalChanges(): GeneratorFn<void>; processConflicts(): GeneratorFn<void>; /** * Get entitiy changes to prepare for syncing */ computeLocalEntityChanges(): EntityChange[]; getCurrentHashIndexes(): Map<string, string>; stopChangeDetection(): void; restartChangeDetection(): GeneratorFn<void>; } export declare class TextLocalChangesState extends LocalChangesState { localChanges: EntityChange[]; constructor(editorStore: EditorStore, sdlcState: EditorSDLCState); setLocalChanges(val: EntityChange[]): void; refreshLocalChanges(): GeneratorFn<void>; processConflicts(): GeneratorFn<void>; getCurrentHashIndexes(): Map<string, string>; stopChangeDetection(): void; computeLocalEntityChanges(): EntityChange[]; restartChangeDetection(): GeneratorFn<void>; } export {}; //# sourceMappingURL=LocalChangesState.d.ts.map