Files
Umbraco-CMS/src/Umbraco.Web.UI.Client/libs/store/tree-store.interface.ts

13 lines
502 B
TypeScript
Raw Normal View History

2023-03-24 10:44:19 +01:00
import type { Observable } from 'rxjs';
import { TreeItemPresentationModel } from '../backend-api';
2023-03-24 10:44:19 +01:00
export interface UmbTreeStore<T extends TreeItemPresentationModel = TreeItemPresentationModel> {
2023-03-24 10:44:19 +01:00
appendItems: (items: Array<T>) => void;
updateItem: (unique: string, item: Partial<T>) => void;
removeItem: (unique: string) => void;
2023-03-24 10:50:00 +01:00
rootItems: Observable<Array<T>>;
2023-03-24 10:44:19 +01:00
childrenOf: (parentUnique: string | null) => Observable<Array<T>>;
treeItems: (uniques: Array<string>) => Observable<Array<T>>;
}