@@ -68,38 +68,41 @@ const DEFAULT_CHIP_FOCUS_DELAY = 50;
6868 templateUrl : './query-builder-tree.component.html' ,
6969 host : { 'class' : 'igx-query-builder-tree' } ,
7070 imports : [
71- DatePipe ,
72- FormsModule ,
73- IgxButtonDirective ,
74- IgxCheckboxComponent ,
75- IgxChipComponent ,
76- IgxComboComponent ,
77- IgxComboHeaderDirective ,
78- IgxDatePickerComponent ,
79- IgxDateTimeEditorDirective ,
80- IgxDialogComponent ,
81- IgxDragIgnoreDirective ,
82- IgxDropDirective ,
83- IgxDropDownComponent ,
84- IgxDropDownItemComponent ,
85- IgxDropDownItemNavigationDirective ,
86- IgxFieldFormatterPipe ,
87- IgxIconButtonDirective ,
88- IgxIconComponent ,
89- IgxInputDirective ,
90- IgxInputGroupComponent ,
91- IgxOverlayOutletDirective ,
92- IgxPickerClearComponent ,
93- IgxPickerToggleComponent ,
94- IgxPrefixDirective ,
95- IgxSelectComponent ,
96- IgxSelectItemComponent ,
97- IgxTimePickerComponent ,
98- IgxTooltipDirective ,
99- IgxTooltipTargetDirective ,
100- NgClass ,
101- NgTemplateOutlet
102- ]
71+ DatePipe ,
72+ FormsModule ,
73+ IgxButtonDirective ,
74+ IgxCheckboxComponent ,
75+ IgxChipComponent ,
76+ IgxComboComponent ,
77+ IgxComboHeaderDirective ,
78+ IgxDatePickerComponent ,
79+ IgxDateTimeEditorDirective ,
80+ IgxDialogComponent ,
81+ IgxDragIgnoreDirective ,
82+ IgxDropDirective ,
83+ IgxDropDownComponent ,
84+ IgxDropDownItemComponent ,
85+ IgxDropDownItemNavigationDirective ,
86+ IgxFieldFormatterPipe ,
87+ IgxIconButtonDirective ,
88+ IgxIconComponent ,
89+ IgxInputDirective ,
90+ IgxInputGroupComponent ,
91+ IgxOverlayOutletDirective ,
92+ IgxPickerClearComponent ,
93+ IgxPickerToggleComponent ,
94+ IgxPrefixDirective ,
95+ IgxSelectComponent ,
96+ IgxSelectItemComponent ,
97+ IgxTimePickerComponent ,
98+ IgxTooltipDirective ,
99+ IgxTooltipTargetDirective ,
100+ NgClass ,
101+ NgTemplateOutlet
102+ ] ,
103+ providers : [
104+ IgxQueryBuilderDragService
105+ ]
103106} )
104107export class IgxQueryBuilderTreeComponent implements AfterViewInit , OnDestroy {
105108 /**
@@ -519,11 +522,12 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
519522 }
520523
521524 constructor ( public cdr : ChangeDetectorRef ,
525+ public dragService : IgxQueryBuilderDragService ,
522526 protected platform : PlatformUtil ,
523- protected el : ElementRef ,
524527 private elRef : ElementRef ,
525528 @Inject ( LOCALE_ID ) protected _localeId : string ) {
526529 this . locale = this . locale || this . _localeId ;
530+ this . dragService . register ( this , elRef ) ;
527531 }
528532
529533 /**
@@ -840,7 +844,10 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
840844 }
841845 }
842846
843- private deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
847+ /**
848+ * @hidden @internal
849+ */
850+ public deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
844851 if ( ! expressionItem . parent ) {
845852 this . rootGroup = null ;
846853 this . currentGroup = null ;
@@ -1023,15 +1030,13 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
10231030 this . deleteItem ( expressionItem ) ;
10241031 }
10251032
1026- private focusChipAfterDrag = ( index : number ) => {
1027- this . _lastFocusedChipIndex = index ;
1028- this . focusEditedExpressionChip ( ) ;
1029- }
1030-
10311033 /**
10321034 * @hidden @internal
10331035 */
1034- public dragService : IgxQueryBuilderDragService = new IgxQueryBuilderDragService ( this , this . el , this . deleteItem , this . focusChipAfterDrag ) ;
1036+ public focusChipAfterDrag = ( index : number ) => {
1037+ this . _lastFocusedChipIndex = index ;
1038+ this . focusEditedExpressionChip ( ) ;
1039+ }
10351040
10361041 /**
10371042 * @hidden @internal
0 commit comments