@finos/legend-application-pure-ide
Version:
Legend Pure IDE application core
42 lines • 1.77 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 { TreeData, TreeNodeData } from '@finos/legend-art';
import { type GeneratorFn, ActionState } from '@finos/legend-shared';
import type { PureIDEStore } from './PureIDEStore.js';
export declare abstract class TreeState<T extends TreeNodeData & {
isLoading: boolean;
}, V> {
readonly ideStore: PureIDEStore;
treeData?: TreeData<T>;
selectedNode?: T | undefined;
loadInitialDataState: ActionState;
refreshDataState: ActionState;
constructor(ideStore: PureIDEStore);
getTreeData(): TreeData<T>;
abstract getRootNodes(): Promise<V[]>;
abstract buildTreeData(rootNodes: V[]): TreeData<T>;
abstract getChildNodes(node: T): Promise<V[]>;
abstract processChildNodes(node: T, childNodes: V[]): void;
initialize(): GeneratorFn<void>;
setSelectedNode(node: T | undefined): void;
setTreeData(data: TreeData<T>): void;
refreshTree(): void;
abstract openNode(node: T): GeneratorFn<void>;
expandNode(node: T): GeneratorFn<void>;
refreshTreeData(): GeneratorFn<void>;
refreshOpenNodes(nodesToOpen: T[], openingNodeIds: Set<string>): Promise<void>;
}
//# sourceMappingURL=TreeState.d.ts.map