@@ -102,8 +102,7 @@ export class Feature<Model> {
102102
103103 constructor ( el : ElementRef ) {
104104 this . _el = el ;
105- let nodeName = el . nativeElement . nodeName . toLowerCase ( ) ;
106- this . name = nodeName . charAt ( 0 ) . toUpperCase ( ) + nodeName . slice ( 1 ) ;
105+ this . name = this . normalizeName ( el . nativeElement . nodeName . toLowerCase ( ) ) ;
107106 this . featureName = "igGrid" + this . name ;
108107 for ( var propt in jQuery . ui [ "igGrid" + this . name ] . prototype . events ) {
109108 this [ propt ] = new EventEmitter ( ) ;
@@ -171,6 +170,14 @@ export class Feature<Model> {
171170 return jQuery . proxy ( feature [ name ] , feature ) ;
172171 }
173172 }
173+
174+ normalizeName ( str ) {
175+ //convert hyphen to camelCase
176+ let name = str . replace ( / - ( [ a - z ] ) / g, function ( group ) {
177+ return group [ 1 ] . toUpperCase ( ) ;
178+ } )
179+ return name . charAt ( 0 ) . toUpperCase ( ) + name . slice ( 1 ) ;
180+ }
174181}
175182
176183@Directive ( {
@@ -424,7 +431,7 @@ export class IgGridUpdatingFeature extends Feature<IgGridUpdating> {
424431}
425432
426433@Directive ( {
427- selector : 'groupBy ' ,
434+ selector : 'group-by ' ,
428435 inputs : [ "disabled" , "create" , "groupByAreaVisibility" , "initialExpand" , "emptyGroupByAreaContent" , "emptyGroupByAreaContentSelectColumns" , "expansionIndicatorVisibility" , "groupByLabelWidth" , "labelDragHelperOpacity" , "indentation" , "defaultSortingDirection" , "groupedColumns" , "resultResponseKey" , "groupedRowTextTemplate" , "type" , "groupByUrlKey" , "groupByUrlKeyAscValue" , "groupByUrlKeyDescValue" , "summarySettings" , "columnSettings" , "expandTooltip" , "collapseTooltip" , "removeButtonTooltip" , "modalDialogGroupByOnClick" , "modalDialogGroupByButtonText" , "modalDialogCaptionButtonDesc" , "modalDialogCaptionButtonAsc" , "modalDialogCaptionButtonUngroup" , "modalDialogCaptionText" , "modalDialogDropDownLabel" , "modalDialogRootLevelHierarchicalGrid" , "modalDialogDropDownButtonCaption" , "modalDialogClearAllButtonLabel" , "emptyGroupByAreaContentSelectColumnsCaption" , "modalDialogDropDownWidth" , "modalDialogDropDownAreaWidth" , "modalDialogAnimationDuration" , "modalDialogWidth" , "modalDialogHeight" , "modalDialogButtonApplyText" , "modalDialogButtonCancelText" , "useGridColumnFormatter" , "persist" , "groupByDialogContainment" , "dialogWidget" , "inherit" ] ,
429436 outputs : [ "groupedColumnsChanging" , "groupedColumnsChanged" , "modalDialogMoving" , "modalDialogClosing" , "modalDialogClosed" , "modalDialogOpening" , "modalDialogOpened" , "modalDialogContentsRendering" , "modalDialogContentsRendered" , "modalDialogButtonApplyClick" , "modalDialogButtonResetClick" , "modalDialogGroupingColumn" , "modalDialogGroupColumn" , "modalDialogUngroupingColumn" , "modalDialogUngroupColumn" , "modalDialogSortGroupedColumn" ]
430437} )
@@ -523,7 +530,7 @@ export class IgGridGroupByFeature extends Feature<IgGridGroupBy> {
523530}
524531
525532@Directive ( {
526- selector : 'columnMoving ' ,
533+ selector : 'column-moving ' ,
527534 inputs : [ "disabled" , "create" , "columnSettings" , "mode" , "moveType" , "addMovingDropdown" , "movingDialogWidth" , "movingDialogHeight" , "movingDialogAnimationDuration" , "movingAcceptanceTolerance" , "movingScrollTolerance" , "scrollSpeedMultiplier" , "scrollDelta" , "hideHeaderContentsDuringDrag" , "dragHelperOpacity" , "movingDialogCaptionButtonDesc" , "movingDialogCaptionButtonAsc" , "movingDialogCaptionText" , "movingDialogDisplayText" , "movingDialogDropTooltipText" , "movingDialogDropTooltipMarkup" , "dropDownMoveLeftText" , "dropDownMoveRightText" , "dropDownMoveFirstText" , "dropDownMoveLastText" , "movingToolTipMove" , "featureChooserSubmenuText" , "columnMovingDialogContainment" , "dialogWidget" , "inherit" ] ,
528535 outputs : [ "columnDragStart" , "columnDragEnd" , "columnDragCanceled" , "columnMoving" , "columnMoved" , "movingDialogOpening" , "movingDialogOpened" , "movingDialogDragged" , "movingDialogClosing" , "movingDialogClosed" , "movingDialogContentsRendering" , "movingDialogContentsRendered" , "movingDialogMoveUpButtonPressed" , "movingDialogMoveDownButtonPressed" , "movingDialogDragColumnMoving" , "movingDialogDragColumnMoved" ]
529536} )
@@ -1034,6 +1041,63 @@ export class IgGridTooltipsFeature extends Feature<IgGridTooltips> {
10341041 public id ( ) : string { return ; } ;
10351042}
10361043
1044+ @Directive ( {
1045+ selector : 'append-rows-on-demand' ,
1046+ inputs : [ "type" , "chunkSize" , "recordCountKey" , "chunkSizeUrlKey" , "chunkIndexUrlKey" , "defaultChunkIndex" , "currentChunkIndex" , "loadTrigger" , "loadMoreDataButtonText" ] ,
1047+ outputs : [ "rowsRequesting" , "rowsRequested" ]
1048+ } )
1049+ export class IgGridAppendRowsOnDemandFeature extends Feature < IgGridAppendRowsOnDemand > {
1050+ constructor ( el : ElementRef ) {
1051+ super ( el ) ;
1052+ }
1053+
1054+ /**
1055+ * Destroys the append rows on demand widget
1056+ */
1057+ public destroy ( ) : void { return ; } ;
1058+
1059+ /**
1060+ * Loads the next chunk of data.
1061+ */
1062+ public nextChunk ( ) : void { return ; } ;
1063+ }
1064+
1065+ @Directive ( {
1066+ selector : 'multi-column-headers' ,
1067+ inputs : [ "inherit" ] ,
1068+ outputs : [ "groupCollapsing" , "groupCollapsed" , "groupExpanding" , "groupExpanded" ]
1069+ } )
1070+ export class IgGridMultiColumnHeadersFeature extends Feature < IgGridMultiColumnHeaders > {
1071+ constructor ( el : ElementRef ) {
1072+ super ( el ) ;
1073+ }
1074+
1075+ /**
1076+ * Destroys the widget
1077+ */
1078+ public destroy ( ) : void { return ; } ;
1079+
1080+ /**
1081+ * Collapses an expanded group. If the group is collapsed, the method does nothing.
1082+ * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method.
1083+ */
1084+ public collapseGroup ( groupKey : string , callback ?: Function ) : void { return ; } ;
1085+ /**
1086+ * Expands a collapsed group. If the group is expanded, the method does nothing.
1087+ * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method.
1088+ */
1089+ public expandGroup ( groupKey : string , callback ?: Function ) : void { return ; } ;
1090+ /**
1091+ * Returns multicolumn headers array. if there aren"t multicolumn headers returns undefined.
1092+ */
1093+ public getMultiColumnHeaders ( ) : Array < Column > { return ; } ;
1094+ /**
1095+ * Toggles a collapsible group.
1096+ * Note: This method is asynchronous which means that it returns immediately and any subsequent code will execute in parallel. This may lead to runtime errors. To avoid them put the subsequent code in the callback parameter provided by the method.
1097+ */
1098+ public toggleGroup ( groupKey : string , callback ?: Function ) : void { return ; } ;
1099+ }
1100+
10371101@Directive ( {
10381102 selector : 'features'
10391103} )
@@ -1054,6 +1118,8 @@ export class Features implements AfterContentInit {
10541118 @ContentChild ( IgGridSummariesFeature ) summaries : IgGridSummariesFeature ;
10551119 @ContentChild ( IgGridColumnFixingFeature ) columnFixing : IgGridColumnFixingFeature ;
10561120 @ContentChild ( IgGridTooltipsFeature ) tooltips : IgGridTooltipsFeature ;
1121+ @ContentChild ( IgGridAppendRowsOnDemandFeature ) appendRowsOnDemand : IgGridAppendRowsOnDemand ;
1122+ @ContentChild ( IgGridMultiColumnHeadersFeature ) multiColumnHeaders : IgGridMultiColumnHeaders ;
10571123
10581124 ngAfterContentInit ( ) {
10591125 this . filtering ? this . allFeatures . push ( this . filtering ) : null ;
@@ -1064,16 +1130,16 @@ export class Features implements AfterContentInit {
10641130 this . moving ? this . allFeatures . push ( this . moving ) : null ;
10651131 this . hiding ? this . allFeatures . push ( this . hiding ) : null ;
10661132 this . responsive ? this . allFeatures . push ( this . responsive ) : null ;
1067- this . responsive ? this . allFeatures . push ( this . responsive ) : null ;
1133+ this . cellMerging ? this . allFeatures . push ( this . cellMerging ) : null ;
10681134 this . resizing ? this . allFeatures . push ( this . resizing ) : null ;
10691135 this . selection ? this . allFeatures . push ( this . selection ) : null ;
10701136 this . rowSelectors ? this . allFeatures . push ( this . rowSelectors ) : null ;
10711137 this . summaries ? this . allFeatures . push ( this . summaries ) : null ;
10721138 this . columnFixing ? this . allFeatures . push ( this . columnFixing ) : null ;
10731139 this . tooltips ? this . allFeatures . push ( this . tooltips ) : null ;
1140+ this . appendRowsOnDemand ? this . allFeatures . push ( this . appendRowsOnDemand ) : null ;
1141+ this . multiColumnHeaders ? this . allFeatures . push ( this . multiColumnHeaders ) : null ;
10741142 }
1075-
1076-
10771143}
10781144
10791145export class IgControlBase < Model > implements DoCheck {
@@ -5684,7 +5750,7 @@ export class IgSpreadsheetComponent extends IgControlBase<IgSpreadsheet> {
56845750}
56855751
56865752@NgModule ( {
5687- declarations : [ Column , IgGridSortingFeature , IgGridFilteringFeature , IgGridPagingFeature , IgGridUpdatingFeature , IgGridGroupByFeature , IgGridColumnMovingFeature , IgGridHidingFeature , IgGridCellMergingFeature , IgGridResponsiveFeature , IgGridResizingFeature , IgGridSelectionFeature , IgGridRowSelectorsFeature , IgGridSummariesFeature , IgGridColumnFixingFeature , IgGridTooltipsFeature , Features , IgGridComponent , IgTreeGridComponent , IgHierarchicalGridComponent , IgComboComponent , IgCheckboxEditorComponent , IgCurrencyEditorComponent , IgDateEditorComponent , IgDatePickerComponent , IgMaskEditorComponent , IgNumericEditorComponent , IgPercentEditorComponent , IgTextEditorComponent , IgTreeComponent , IgDialogComponent , IgSplitterComponent , IgLayoutManagerComponent , IgTileManagerComponent , IgHtmlEditorComponent , IgValidatorComponent , IgPivotDataSelectorComponent , IgPivotGridComponent , IgDataChartComponent , IgPieChartComponent , IgDoughnutChartComponent , IgFunnelChartComponent , IgRadialGaugeComponent , IgZoombarComponent , IgMapComponent , IgSparklineComponent , IgBulletGraphComponent , IgLinearGaugeComponent , IgQRCodeBarcodeComponent , IgUploadComponent , IgPopoverComponent , IgNotifierComponent , IgRatingComponent , IgVideoPlayerComponent , IgRadialMenuComponent , IgSplitButtonComponent , IgSpreadsheetComponent , IgSchedulerComponent ] ,
5688- exports : [ Column , IgGridSortingFeature , IgGridFilteringFeature , IgGridPagingFeature , IgGridUpdatingFeature , IgGridGroupByFeature , IgGridColumnMovingFeature , IgGridHidingFeature , IgGridCellMergingFeature , IgGridResponsiveFeature , IgGridResizingFeature , IgGridSelectionFeature , IgGridRowSelectorsFeature , IgGridSummariesFeature , IgGridColumnFixingFeature , IgGridTooltipsFeature , Features , IgGridComponent , IgTreeGridComponent , IgHierarchicalGridComponent , IgComboComponent , IgCheckboxEditorComponent , IgCurrencyEditorComponent , IgDateEditorComponent , IgDatePickerComponent , IgMaskEditorComponent , IgNumericEditorComponent , IgPercentEditorComponent , IgTextEditorComponent , IgTreeComponent , IgDialogComponent , IgSplitterComponent , IgLayoutManagerComponent , IgTileManagerComponent , IgHtmlEditorComponent , IgValidatorComponent , IgPivotDataSelectorComponent , IgPivotGridComponent , IgDataChartComponent , IgPieChartComponent , IgDoughnutChartComponent , IgFunnelChartComponent , IgRadialGaugeComponent , IgZoombarComponent , IgMapComponent , IgSparklineComponent , IgBulletGraphComponent , IgLinearGaugeComponent , IgQRCodeBarcodeComponent , IgUploadComponent , IgPopoverComponent , IgNotifierComponent , IgRatingComponent , IgVideoPlayerComponent , IgRadialMenuComponent , IgSplitButtonComponent , IgSpreadsheetComponent , IgSchedulerComponent ]
5753+ declarations : [ Column , IgGridSortingFeature , IgGridFilteringFeature , IgGridPagingFeature , IgGridUpdatingFeature , IgGridGroupByFeature , IgGridColumnMovingFeature , IgGridHidingFeature , IgGridCellMergingFeature , IgGridResponsiveFeature , IgGridResizingFeature , IgGridSelectionFeature , IgGridRowSelectorsFeature , IgGridSummariesFeature , IgGridColumnFixingFeature , IgGridTooltipsFeature , IgGridAppendRowsOnDemandFeature , Features , IgGridComponent , IgTreeGridComponent , IgHierarchicalGridComponent , IgComboComponent , IgCheckboxEditorComponent , IgCurrencyEditorComponent , IgDateEditorComponent , IgDatePickerComponent , IgMaskEditorComponent , IgNumericEditorComponent , IgPercentEditorComponent , IgTextEditorComponent , IgTreeComponent , IgDialogComponent , IgSplitterComponent , IgLayoutManagerComponent , IgTileManagerComponent , IgHtmlEditorComponent , IgValidatorComponent , IgPivotDataSelectorComponent , IgPivotGridComponent , IgDataChartComponent , IgPieChartComponent , IgDoughnutChartComponent , IgFunnelChartComponent , IgRadialGaugeComponent , IgZoombarComponent , IgMapComponent , IgSparklineComponent , IgBulletGraphComponent , IgLinearGaugeComponent , IgQRCodeBarcodeComponent , IgUploadComponent , IgPopoverComponent , IgNotifierComponent , IgRatingComponent , IgVideoPlayerComponent , IgRadialMenuComponent , IgSplitButtonComponent , IgSpreadsheetComponent , IgSchedulerComponent ] ,
5754+ exports : [ Column , IgGridSortingFeature , IgGridFilteringFeature , IgGridPagingFeature , IgGridUpdatingFeature , IgGridGroupByFeature , IgGridColumnMovingFeature , IgGridHidingFeature , IgGridCellMergingFeature , IgGridResponsiveFeature , IgGridResizingFeature , IgGridSelectionFeature , IgGridRowSelectorsFeature , IgGridSummariesFeature , IgGridColumnFixingFeature , IgGridTooltipsFeature , IgGridAppendRowsOnDemandFeature , Features , IgGridComponent , IgTreeGridComponent , IgHierarchicalGridComponent , IgComboComponent , IgCheckboxEditorComponent , IgCurrencyEditorComponent , IgDateEditorComponent , IgDatePickerComponent , IgMaskEditorComponent , IgNumericEditorComponent , IgPercentEditorComponent , IgTextEditorComponent , IgTreeComponent , IgDialogComponent , IgSplitterComponent , IgLayoutManagerComponent , IgTileManagerComponent , IgHtmlEditorComponent , IgValidatorComponent , IgPivotDataSelectorComponent , IgPivotGridComponent , IgDataChartComponent , IgPieChartComponent , IgDoughnutChartComponent , IgFunnelChartComponent , IgRadialGaugeComponent , IgZoombarComponent , IgMapComponent , IgSparklineComponent , IgBulletGraphComponent , IgLinearGaugeComponent , IgQRCodeBarcodeComponent , IgUploadComponent , IgPopoverComponent , IgNotifierComponent , IgRatingComponent , IgVideoPlayerComponent , IgRadialMenuComponent , IgSplitButtonComponent , IgSpreadsheetComponent , IgSchedulerComponent ]
56895755} )
56905756export class IgniteUIModule { }
0 commit comments