Skip to content

Commit 100d6f7

Browse files
authored
Merge pull request #7193 from IgniteUI/mdragnev/remove-deprecated-props
fix(*): Remove deprecated properties #7053
2 parents 1c7f8b5 + 25084a4 commit 100d6f7

File tree

61 files changed

+268
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+268
-451
lines changed

projects/igniteui-angular/src/lib/date-picker/date-picker.component.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -543,58 +543,12 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
543543
@Input()
544544
public outlet: IgxOverlayOutletDirective | ElementRef;
545545

546-
/**
547-
* @deprecated Use 'onOpened' instead.
548-
* An event that is emitted when the `IgxDatePickerComponent` calendar is opened.
549-
* @example
550-
* ```typescript
551-
* public open(event){
552-
* alert("The date-picker calendar has been opened!");
553-
* }
554-
* ```
555-
* ```html
556-
* <igx-date-picker (onOpen)="open($event)" cancelButtonLabel="cancel" todayButtonLabel="today"></igx-date-picker>
557-
* ```
558-
*/
559-
@DeprecateProperty(`'onOpen' @Output property is deprecated. Use 'onOpened' instead.`)
560-
@Output()
561-
public get onOpen(): EventEmitter<IgxDatePickerComponent> {
562-
return this._onOpen;
563-
}
564-
565-
public set onOpen(val: EventEmitter<IgxDatePickerComponent>) {
566-
this._onOpen = val;
567-
}
568-
569546
/**
570547
* Emitted when the `IgxDatePickerComponent` calendar is opened.
571548
*/
572549
@Output()
573550
public onOpened = new EventEmitter<IgxDatePickerComponent>();
574551

575-
/**
576-
* @deprecated Use 'onClosed' instead.
577-
* "An event that is emitted when the `IgxDatePickerComponent` is closed.
578-
* @example
579-
* ```typescript
580-
* public close(event){
581-
* alert("The date-picker has been closed!");
582-
* }
583-
* ```
584-
* ```html
585-
* <igx-date-picker (onClose)="close($event)" cancelButtonLabel="cancel" todayButtonLabel="today"></igx-date-picker>
586-
* ```
587-
*/
588-
@DeprecateProperty(`'onClose' @Output property is deprecated. Use 'onClosed' instead.`)
589-
@Output()
590-
public get onClose(): EventEmitter<IgxDatePickerComponent> {
591-
return this._onClose;
592-
}
593-
594-
public set onClose(val: EventEmitter<IgxDatePickerComponent>) {
595-
this._onClose = val;
596-
}
597-
598552
/**
599553
* Emitted after the `IgxDatePickerComponent` is closed.
600554
*/
@@ -1238,9 +1192,6 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
12381192
private _onOpened(): void {
12391193
this.onOpened.emit(this);
12401194

1241-
// TODO: remove this line after deprecating 'onOpen'
1242-
this._onOpen.emit(this);
1243-
12441195
if (this.calendar) {
12451196
this._focusCalendarDate();
12461197
}
@@ -1250,9 +1201,6 @@ export class IgxDatePickerComponent implements IDatePicker, ControlValueAccessor
12501201
this.collapsed = true;
12511202
this._componentID = null;
12521203
this.onClosed.emit(this);
1253-
1254-
// TODO: remove this line after deprecating 'onClose'
1255-
this.onClose.emit(this);
12561204
}
12571205

12581206
private _initializeCalendarContainer(componentInstance: IgxCalendarContainerComponent) {

projects/igniteui-angular/src/lib/directives/text-highlight/text-highlight.directive.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,6 @@ interface ISearchInfo {
2727
* An interface describing information for the active highlight.
2828
*/
2929
export interface IActiveHighlightInfo {
30-
/**
31-
* The row index of the highlight. This property is deprecated, use `row` instead.
32-
*/
33-
rowIndex?: number;
34-
/**
35-
* The column index of the highlight. This property is deprecated, use `column` instead.
36-
*/
37-
columnIndex?: number;
38-
/**
39-
* The page index of the highlight. This property is deprecated.
40-
*/
41-
page?: number;
4230
/**
4331
* The row of the highlight.
4432
*/
@@ -175,10 +163,6 @@ export class IgxTextHighlightDirective implements AfterViewInit, AfterViewChecke
175163
@Input('column')
176164
public column: any;
177165

178-
@Input('page')
179-
@DeprecateProperty(`IgxTextHighlightDirective 'page' input property is deprecated.`)
180-
public page: number;
181-
182166
/**
183167
* @hidden
184168
*/
@@ -328,14 +312,12 @@ export class IgxTextHighlightDirective implements AfterViewInit, AfterViewChecke
328312
}
329313

330314
/**
331-
* Activates the highlight if it is on the currently active row, column and page.
315+
* Activates the highlight if it is on the currently active row and column.
332316
*/
333317
public activateIfNecessary(): void {
334318
const group = IgxTextHighlightDirective.highlightGroupsMap.get(this.groupName);
335-
const column = group.columnIndex === undefined ? group.column : group.columnIndex;
336-
const row = group.rowIndex === undefined ? group.row : group.rowIndex;
337319

338-
if (column === this.column && row === this.row && group.page === this.page) {
320+
if (group.column === this.column && group.row === this.row) {
339321
this.activate(group.index);
340322
}
341323
}

projects/igniteui-angular/src/lib/drop-down/drop-down-item.base.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,6 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
152152
@Output()
153153
public selectedChange = new EventEmitter<boolean>();
154154

155-
/**
156-
* @hidden @internal
157-
*/
158-
@Input()
159-
@DeprecateProperty(`IgxDropDownItemBaseDirective \`isSelected\` property is deprecated.\n` +
160-
`Use \`selected\` instead.`)
161-
get isSelected(): boolean {
162-
return this.selected;
163-
}
164-
165-
/**
166-
* @hidden @internal
167-
*/
168-
set isSelected(value: boolean) {
169-
this.selected = value;
170-
}
171-
172155
/**
173156
* Sets/gets if the given item is focused
174157
* ```typescript
@@ -194,21 +177,6 @@ export class IgxDropDownItemBaseDirective implements DoCheck {
194177
this._focused = value;
195178
}
196179

197-
/**
198-
* @hidden @internal
199-
*/
200-
@DeprecateProperty(`IgxDropDownItemBaseDirective \`isFocused\` property is depracated.\n` +
201-
`Use \`focused\` instead.`)
202-
get isFocused(): boolean {
203-
return this.focused;
204-
}
205-
/**
206-
* @hidden @internal
207-
*/
208-
set isFocused(value: boolean) {
209-
this.focused = value;
210-
}
211-
212180
/**
213181
* Sets/gets if the given item is header
214182
* ```typescript

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -296,26 +296,6 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
296296
return this.element.nativeElement;
297297
}
298298

299-
/**
300-
* @deprecated
301-
* Use `cell.editMode` as a getter and
302-
* `cell.setEditMode(true | false)` to start/exit edit mode.
303-
*
304-
* Gets/sets whether the cell is in edit mode.
305-
* ```typescript
306-
* let isCellInEditMode = this.cell.inEditMode;
307-
* ```
308-
* @memberof IgxGridCellComponent
309-
*/
310-
@DeprecateProperty(`'inEditMode' is deprecated\nUse 'editMode' to get the current state and 'setEditMode(boolean)' as a setter`)
311-
get inEditMode(): boolean {
312-
return this.editMode;
313-
}
314-
315-
set inEditMode(value: boolean) {
316-
this.setEditMode(value);
317-
}
318-
319299
/**
320300
* @hidden
321301
* @internal

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -654,19 +654,6 @@ export class IgxColumnComponent implements AfterContentInit {
654654
@Output()
655655
public pinnedChange = new EventEmitter<boolean>();
656656

657-
/**
658-
* @deprecated
659-
* Gets/Sets the `id` of the `igx-grid`.
660-
* ```typescript
661-
* let columnGridId = this.column.gridID;
662-
* ```
663-
* ```typescript
664-
* this.column.gridID = 'grid-1';
665-
* ```
666-
* @memberof IgxColumnComponent
667-
*/
668-
@DeprecateProperty(`The property is deprecated. Please, use \`column.grid.id\` instead.`)
669-
public gridID: string;
670657
/**
671658
* Gets the column `summaries`.
672659
* ```typescript

projects/igniteui-angular/src/lib/grids/filtering/base/grid-filtering-row.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
[outlet]="filteringService.grid.outletDirective"
4848
[locale]="filteringService.grid.locale"
4949
(onSelection)="onDateSelected($event)"
50-
(onClose)="datePickerClose()">
50+
(onClosed)="datePickerClose()">
5151
<ng-template igxDatePickerTemplate let-openDialog="openDialog">
5252
<igx-input-group #inputGroup type="box" [displayDensity]="'compact'" (focusout)="onInputGroupFocusout()">
5353
<igx-prefix #inputGroupPrefix

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -526,17 +526,6 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
526526
}
527527
}
528528

529-
@DeprecateProperty('rowSelectable property is deprecated. Use rowSelection property instead.')
530-
@WatchChanges()
531-
@Input()
532-
get rowSelectable(): boolean {
533-
return this.isRowSelectable;
534-
}
535-
536-
set rowSelectable(val: boolean) {
537-
this.rowSelection = val ? GridSelectionMode.multiple : GridSelectionMode.none;
538-
}
539-
540529
/**
541530
* Gets/Sets if the row selectors are hidden.
542531
* @remarks

projects/igniteui-angular/src/lib/grids/grid/grid.master-detail.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { IgxGridExpandableCellComponent } from './expandable-cell.component';
1313
import { SortingDirection } from '../../data-operations/sorting-expression.interface';
1414
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
1515
import { IgxInputGroupComponent } from '../../input-group';
16-
import { GridSummaryCalculationMode, GridSummaryPosition } from '../common/enums';
16+
import { GridSummaryCalculationMode, GridSummaryPosition, GridSelectionMode } from '../common/enums';
1717
import { IgxCheckboxComponent } from '../../checkbox/checkbox.component';
1818

1919
const DEBOUNCETIME = 30;
@@ -1168,7 +1168,7 @@ describe('IgxGrid Master Detail #grid', () => {
11681168
@Component({
11691169
template: `
11701170
<igx-grid [data]="data" [width]="width" [height]="height" [primaryKey]="'ID'" [allowFiltering]='true'
1171-
[paging]="paging" [perPage]="perPage" [rowSelectable]="rowSelectable">
1171+
[paging]="paging" [perPage]="perPage" [rowSelection]="rowSelectable">
11721172
<igx-column *ngFor="let c of columns" [field]="c.field" [header]="c.field" [width]="c.width" [dataType]='c.dataType'
11731173
[hidden]='c.hidden' [sortable]="c.sortable" [movable]='c.movable' [groupable]='c.groupable' [editable]="c.editable"
11741174
[hasSummary]="c.hasSummary" [pinned]='c.pinned'>
@@ -1200,7 +1200,7 @@ export class DefaultGridMasterDetailComponent {
12001200
];
12011201
public paging = false;
12021202
public perPage = 15;
1203-
public rowSelectable = false;
1203+
public rowSelectable = GridSelectionMode.none;
12041204

12051205
@ViewChild(IgxGridComponent, { read: IgxGridComponent, static: true })
12061206
public grid: IgxGridComponent;
@@ -1209,7 +1209,7 @@ export class DefaultGridMasterDetailComponent {
12091209
@Component({
12101210
template: `
12111211
<igx-grid [data]="data" [expansionStates]='expStates'
1212-
[width]="width" [height]="height" [primaryKey]="'ID'" [paging]="paging" [rowSelectable]="rowSelectable">
1212+
[width]="width" [height]="height" [primaryKey]="'ID'" [paging]="paging" [rowSelection]="rowSelectable">
12131213
<igx-column *ngFor="let c of columns" [field]="c.field" [header]="c.field" [width]="c.width" [dataType]='c.dataType'
12141214
[hidden]='c.hidden' [sortable]="c.sortable" [movable]='c.movable' [groupable]='c.groupable' [editable]="c.editable"
12151215
[hasSummary]="c.hasSummary" [pinned]='c.pinned'>
@@ -1242,7 +1242,7 @@ export class AllExpandedGridMasterDetailComponent extends DefaultGridMasterDetai
12421242
@Component({
12431243
template: `
12441244
<igx-grid [data]="data"
1245-
[width]="width" [height]="height" [primaryKey]="'ID'" [paging]="paging" [rowSelectable]="rowSelectable">
1245+
[width]="width" [height]="height" [primaryKey]="'ID'" [paging]="paging" [rowSelection]="rowSelectable">
12461246
<igx-column-layout field='group2'>
12471247
<igx-column [rowStart]="1" [colStart]="1" [colEnd]="3" field="CompanyName" [width]="'300px'"></igx-column>
12481248
<igx-column [rowStart]="2" [colStart]="1" field="ContactName" [width]="'100px'"></igx-column>

projects/igniteui-angular/src/lib/grids/grid/grid.pinning.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SortingDirection } from '../../data-operations/sorting-expression.inter
55
import { IgxGridModule } from './index';
66
import { IgxStringFilteringOperand } from '../../data-operations/filtering-condition';
77
import { configureTestSuite } from '../../test-utils/configure-suite';
8-
import { ColumnPinningPosition } from '../common/enums';
8+
import { ColumnPinningPosition, GridSelectionMode } from '../common/enums';
99
import { IPinningConfig } from '../common/grid.interface';
1010
import { wait, UIInteractions } from '../../test-utils/ui-interactions.spec';
1111
import { GridSummaryFunctions,
@@ -553,7 +553,7 @@ describe('IgxGrid - Column Pinning #grid', () => {
553553
});
554554

555555
it('should correctly pin column to right when row selectors are enabled.', () => {
556-
grid.rowSelectable = true;
556+
grid.rowSelection = GridSelectionMode.multiple;
557557
fix.detectChanges();
558558

559559
// check row DOM

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.ts

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -111,42 +111,6 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
111111
return this._data;
112112
}
113113

114-
/**
115-
* @hidden
116-
* @deprecated
117-
* Sets the state of the `IgxHierarchicalGridComponent` containing which rows are expanded.
118-
*/
119-
@Input()
120-
@DeprecateProperty(`'hierarchicalState' property is deprecated. Use 'expansionStates' instead.`)
121-
public get hierarchicalState() {
122-
const res = Array.from(this.expansionStates.entries()).filter(({1: v}) => v === true).map(([k]) => k);
123-
return res;
124-
}
125-
public set hierarchicalState(val) {
126-
if (this.hasChildrenKey) {
127-
val = val.filter(item => {
128-
const rec = this.primaryKey ? this.data.find(x => x[this.primaryKey] === item.rowID) : item.rowID;
129-
return rec[this.hasChildrenKey];
130-
});
131-
}
132-
const expansionStates = new Map<any, boolean>();
133-
val.forEach(item => {
134-
const rec = this.primaryKey ? this.data.find(x => x[this.primaryKey] === item.rowID) : item.rowID;
135-
expansionStates.set(rec, true);
136-
});
137-
this.expansionStates = expansionStates;
138-
if (this.parent) {
139-
this.notifyChanges(true);
140-
}
141-
}
142-
143-
/**
144-
* @hidden
145-
* @deprecated
146-
*/
147-
@Output()
148-
@DeprecateProperty(`'hierarchicalStateChange' @Output property is deprecated. Use 'expansionStates' instead.`)
149-
public hierarchicalStateChange = new EventEmitter<any>();
150114

151115
/**
152116
* Sets an array of objects containing the filtered data in the `IgxHierarchicalGridComponent`.
@@ -293,7 +257,6 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
293257
}
294258
this.expansionStatesChange.pipe(takeUntil(this.destroy$)).subscribe((value: Map<any, boolean>) => {
295259
const res = Array.from(value.entries()).filter(({1: v}) => v === true).map(([k]) => k);
296-
this.hierarchicalStateChange.emit(res);
297260
});
298261
super.ngOnInit();
299262
}

0 commit comments

Comments
 (0)