import { SelectionService } from '../selection.service' ; export class SelectionStrategy < T = any > { constructor ( protected selectionService ? ) { } setSelectionService ( selectionService ) { this . selectionService = selectionService ; } mousedown ( event , data ) { } click ( event , data ) { } keydown ( event , data ) { } /**
     * Select the item - default behavior
     */ select ( ... data ) { this . selectionService . select ( ... data ) ; } /**
     * Replace the current selection with the list of items specified
     */ selectOnly ( ... data ) { this . selectionService . selectOnly ( ... data ) ; } /**
     * Toggle the item's selected state - default behavior
     */ toggle ( ... data ) { this . selectionService . toggle ( ... data ) ; } /**
     * Deselect the item - default behavior
     */ deselect ( ... data ) { this . selectionService . deselect ( ... data ) ; } /**
     * Select all items - default behavior
     */ selectAll ( ) { this . select ( ... this . selectionService . dataset ) ; } /**
     * Deselect all items - default behavior
     */ deselectAll ( ) { this . selectionService . deselectAll ( ) ; } destroy ( ) { } }