@@ -12,6 +12,22 @@ export interface ItemTypeCustomisations {
12
12
typeCustomisations ( ) : { [ type : string ] : Customisations } ;
13
13
}
14
14
15
+ export interface DefaultBehaviors {
16
+ // Allow customisation of items that can be renamed on the tree.
17
+ enableRenaming ( type : string ) : void ;
18
+ // Allow customisation of items that can be deleted on the tree.
19
+ enableDeleting ( type : string ) : void ;
20
+ // Allow registration of handler to be called when an item of a particular type has been deleted.
21
+ registerItemDeletedHandler ( type : string , callback : ( item : TreeViewItem ) => Promise < TreeViewItem > ) : void ;
22
+ // Allow registration of a handler to be called when an item of a particular type has been renamed.
23
+ registerItemRenamedHandler ( type : string , callback : ( renamedItem : TreeViewItem ) => Promise < TreeViewItem > ) : void ;
24
+ // Allow registration of a handler to be called to verify if a drag-and-drop move operation is valid.
25
+ registerItemCanMoveHandler ( canItemMoveCallBack : ( movingItem : TreeViewItem , destinationItem : TreeViewItem ) => Promise < boolean > ) : void ;
26
+ // Allow registration of a handler to be called when a move operation is succesful. The moved item property will contain
27
+ // the information of the parentID of it's new parent or undefined if it was moved to the root directory.
28
+ registerItemMovedHandler ( callBack : ( movedItem : TreeViewItem ) => Promise < TreeViewItem > ) : void ;
29
+ }
30
+
15
31
export interface TreeViewCreatedEventPayload {
16
32
itemCustomisations : ItemTypeCustomisations ;
17
33
eventManager : EventManager ;
@@ -40,7 +56,6 @@ export interface TreeViewViewModel {
40
56
addTreeViewItem ( TreeViewItem : TreeViewItem ) : void ;
41
57
checkedStatusChanged ( item : TreeViewItem ) : void ;
42
58
setSelectionMode ( mode : SelectionMode ) : void ;
43
- selectedItems : TreeViewItem [ ] ;
44
59
readonly selectedItems : TreeViewItem [ ] ;
45
60
}
46
61
0 commit comments