@@ -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 /**
@@ -842,7 +846,10 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
842846 }
843847 }
844848
845- private deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
849+ /**
850+ * @hidden @internal
851+ */
852+ public deleteItem = ( expressionItem : ExpressionItem , skipEmit : boolean = false ) => {
846853 if ( ! expressionItem . parent ) {
847854 this . rootGroup = null ;
848855 this . currentGroup = null ;
@@ -1025,15 +1032,13 @@ export class IgxQueryBuilderTreeComponent implements AfterViewInit, OnDestroy {
10251032 this . deleteItem ( expressionItem ) ;
10261033 }
10271034
1028- private focusChipAfterDrag = ( index : number ) => {
1029- this . _lastFocusedChipIndex = index ;
1030- this . focusEditedExpressionChip ( ) ;
1031- }
1032-
10331035 /**
10341036 * @hidden @internal
10351037 */
1036- public dragService : IgxQueryBuilderDragService = new IgxQueryBuilderDragService ( this , this . el , this . deleteItem , this . focusChipAfterDrag ) ;
1038+ public focusChipAfterDrag = ( index : number ) => {
1039+ this . _lastFocusedChipIndex = index ;
1040+ this . focusEditedExpressionChip ( ) ;
1041+ }
10371042
10381043 /**
10391044 * @hidden @internal
0 commit comments