Skip to content

Commit 224c4fc

Browse files
authored
Merge branch 'master' into 12.0.x
2 parents 08fafe9 + c256830 commit 224c4fc

File tree

19 files changed

+239
-302
lines changed

19 files changed

+239
-302
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ All notable changes for each version of this project will be documented in this
146146
- `IgxLinearProgressBarComponent`
147147
- **Breaking Change** - The following outputs are renamed:
148148
- `onProgressChanged` to `progressChanged`
149+
- `IgxToast`
150+
- **Breaking Change** - The following deprecated methods and outputs have been removed
151+
- Outputs `showing`, `shown`, `hiding`, `hidden`. Use `onOpening`, `onOpened`, `onClosing`, `onClosed` instead.
152+
- Methods `show`, `hide`. Use `open`, `close` instead.
153+
- `IgxSnackbar`
154+
- **Breaking Change** - The following deprecated methods have been removed
155+
- `show`, `hide`. Use `open`, `close` instead.
149156

150157

151158
### New Features

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
![Node.js CI](https://github.com/IgniteUI/igniteui-angular/workflows/Node.js%20CI/badge.svg)
44
[![Build Status](https://dev.azure.com/IgniteUI/igniteui-angular/_apis/build/status/IgniteUI.igniteui-angular)](https://dev.azure.com/IgniteUI/igniteui-angular/_build/latest?definitionId=3)
5-
[![Build Status](https://travis-ci.org/IgniteUI/igniteui-angular.svg?branch=master)](https://travis-ci.org/IgniteUI/igniteui-angular)
65
[![Coverage Status](https://coveralls.io/repos/github/IgniteUI/igniteui-angular/badge.svg?branch=master)](https://coveralls.io/github/IgniteUI/igniteui-angular?branch=master)
76
[![npm version](https://badge.fury.io/js/igniteui-angular.svg)](https://badge.fury.io/js/igniteui-angular)
87

ROADMAP.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
2. **[DONE]** Themes: Scope custom CSS props to component selectors [#8868](https://github.com/IgniteUI/igniteui-angular/issues/8868)
99
3. **[DONE]** Switch thumb templatable and add indeterminate state [#8949](https://github.com/IgniteUI/igniteui-angular/issues/8949)
1010
4. **[DONE]** IgxDateTimeEditor should support spin delta [#7169](https://github.com/IgniteUI/igniteui-angular/issues/7169)
11-
5. Expose a column input for passing additional data/state in the template contexts of the column [#9020](https://github.com/IgniteUI/igniteui-angular/issues/9020)
11+
5. **[DONE]** Expose a column input for passing additional data/state in the template contexts of the column [#9020](https://github.com/IgniteUI/igniteui-angular/issues/9020)
1212
6. **[DONE]** Export Hierarchical Grid to Excel [#5848](https://github.com/IgniteUI/igniteui-angular/issues/5848)
13-
7. Tree component [#7475](https://github.com/IgniteUI/igniteui-angular/issues/7475)
14-
8. IgxDatePicker refactoring [#6483](https://github.com/IgniteUI/igniteui-angular/issues/6483)
15-
9. IgxTimePicker refactoring [#6482](https://github.com/IgniteUI/igniteui-angular/issues/6482)
13+
7. **[DONE]** Tree component [#7475](https://github.com/IgniteUI/igniteui-angular/issues/7475)
14+
8. **[DONE]** IgxDatePicker refactoring [#6483](https://github.com/IgniteUI/igniteui-angular/issues/6483)
15+
9. **[DONE]** IgxTimePicker refactoring [#6482](https://github.com/IgniteUI/igniteui-angular/issues/6482)
1616
10. **[DONE]** Tabs and Bottom Nav Components Refactoring [#8793](https://github.com/IgniteUI/igniteui-angular/issues/8793)
17-
11. Datetime and Time column types [#7678](https://github.com/IgniteUI/igniteui-angular/issues/7678)
17+
11. **[DONE]** Datetime and Time column types [#7678](https://github.com/IgniteUI/igniteui-angular/issues/7678)
1818
12. **[DONE]** Add detach method to IgxOverlay [#6063](https://github.com/IgniteUI/igniteui-angular/issues/6063)
1919
13. **[DONE]** Accept ISO 8601 Date-only string as input for IgxDateTimeEditorDirective [#6994](https://github.com/IgniteUI/igniteui-angular/issues/6994)
2020

@@ -27,7 +27,7 @@
2727

2828
# Previous Milestone
2929

30-
## Milestone 15 (Due by February, 2021)
30+
## Milestone 15 (Released February 17th, 2021)
3131

3232
1. **[DONE]** Filters should support filtering by formatted value [#8009](https://github.com/IgniteUI/igniteui-angular/issues/8009)
3333
2. **[DONE]** Support changing theme dynamically on Input Group [#8619](https://github.com/IgniteUI/igniteui-angular/issues/8619)
@@ -72,7 +72,7 @@
7272
16. **[DONE]** Allow setting of the name of the worksheet in exported workbook in IgxExcelExporter [#7396](https://github.com/IgniteUI/igniteui-angular/issues/7396)
7373
17. **[DONE]** Enhance behavior of the Select All checkbox in Excel Style Filtering [#6617](https://github.com/IgniteUI/igniteui-angular/issues/6617)
7474

75-
## Milestone 12 (Due by August 17th, 2020)
75+
## Milestone 12 (Released August 19th, 2020)
7676

7777
1. **[DONE]** igx-grid improve IGridEditEventArgs [#4965](https://github.com/IgniteUI/igniteui-angular/issues/4965)
7878
2. **[DONE]** igxCombo has to include caseSensitive property in filter search [#7282](https://github.com/IgniteUI/igniteui-angular/issues/7282)

projects/igniteui-angular/src/lib/core/styles/components/grid/_grid-theme.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,7 @@
12101210

12111211
%igx-grid__tr--inner {
12121212
display: flex;
1213+
background: inherit;
12131214
}
12141215

12151216
%igx-grid__tr--add-animate {

projects/igniteui-angular/src/lib/directives/toggle/toggle.directive.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
302302
/**
303303
* Offsets the content along the corresponding axis by the provided amount
304304
*/
305-
setOffset(deltaX: number, deltaY: number) {
305+
public setOffset(deltaX: number, deltaY: number) {
306306
this.overlayService.setOffset(this._overlayId, deltaX, deltaY);
307307
}
308308

@@ -335,8 +335,8 @@ export class IgxToggleDirective implements IToggleView, OnInit, OnDestroy {
335335
this.cdr.detectChanges();
336336
this.unsubscribe();
337337
this.overlayService.detach(this.overlayId);
338-
delete this._overlayId;
339338
const closedEventArgs: ToggleViewEventArgs = { owner: this, id: this._overlayId, event: ev.event };
339+
delete this._overlayId;
340340
this.onClosed.emit(closedEventArgs);
341341
};
342342

@@ -428,7 +428,7 @@ export class IgxToggleActionDirective implements OnInit {
428428
* @hidden
429429
*/
430430
@Input('igxToggleAction')
431-
set target(target: any) {
431+
public set target(target: any) {
432432
if (target !== null && target !== '') {
433433
this._target = target;
434434
}
@@ -437,7 +437,7 @@ export class IgxToggleActionDirective implements OnInit {
437437
/**
438438
* @hidden
439439
*/
440-
get target(): any {
440+
public get target(): any {
441441
if (typeof this._target === 'string') {
442442
return this.navigationService.get(this._target);
443443
}

projects/igniteui-angular/src/lib/grids/selection/selection.service.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ export class IgxGridSelectionService {
6262
*/
6363
public selectedRowsChange = new Subject();
6464

65+
/**
66+
* Toggled when a pointerdown event is triggered inside the grid body (cells).
67+
* When `false` the drag select behavior is disabled.
68+
*/
69+
private pointerEventInGridBody = false;
70+
6571
private allRowsSelected: boolean;
6672
private _ranges: Set<string> = new Set<string>();
6773
private _selectionRange: Range;
@@ -265,6 +271,8 @@ export class IgxGridSelectionService {
265271
this.initKeyboardState();
266272
this.pointerState.ctrl = ctrl;
267273
this.pointerState.shift = shift;
274+
this.pointerEventInGridBody = true;
275+
document.body.addEventListener('pointerup', this.pointerOriginHandler);
268276

269277
// No ctrl key pressed - no multiple selection
270278
if (!ctrl) {
@@ -311,7 +319,7 @@ export class IgxGridSelectionService {
311319

312320
public pointerEnter(node: ISelectionNode, event: PointerEvent): boolean {
313321
// https://www.w3.org/TR/pointerevents/#the-button-property
314-
this.dragMode = event.buttons === 1 && (event.button === -1 || event.button === 0);
322+
this.dragMode = (event.buttons === 1 && (event.button === -1 || event.button === 0)) && this.pointerEventInGridBody;
315323
if (!this.dragMode) {
316324
return false;
317325
}
@@ -351,7 +359,9 @@ export class IgxGridSelectionService {
351359
return true;
352360
}
353361

354-
this.add(node);
362+
if (this.pointerEventInGridBody) {
363+
this.add(node);
364+
}
355365
return false;
356366
}
357367

@@ -727,6 +737,11 @@ export class IgxGridSelectionService {
727737
private isRowDeleted(rowID): boolean {
728738
return this.grid.gridAPI.row_deleted_transaction(rowID);
729739
}
740+
741+
private pointerOriginHandler = () => {
742+
this.pointerEventInGridBody = false;
743+
document.body.removeEventListener('pointerup', this.pointerOriginHandler);
744+
};
730745
}
731746

732747
export const isChromium = (): boolean => (/Chrom|e?ium/g.test(navigator.userAgent) ||

projects/igniteui-angular/src/lib/snackbar/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
88
## Simple Snackbar
99

1010
```html
11-
<button (click)="snackbar.show()">Show snackbar</button>
11+
<button (click)="snackbar.open()">Show snackbar</button>
1212

1313
<igx-snackbar #snackbar
1414
message="This is a simple snackbar!">
@@ -17,25 +17,25 @@ A walkthrough of how to get started can be found [here](https://www.infragistics
1717

1818
You can be more descriptive and set a message `message="This is a simple snackbar!"`.
1919

20-
You can show the snackbar by using `snackbar.show()` method.
20+
You can show the snackbar by using `snackbar.open()` method.
2121

2222

2323
## Snackbar with button and action
2424

2525
```html
26-
<button (click)="snackbar.show()">Show snackbar</button>
26+
<button (click)="snackbar.open()">Show snackbar</button>
2727

2828
<igx-snackbar #snackbar
2929
message="This is a snackbar with a button and action!"
3030
actionName="Dismiss"
31-
(onAction)="snackbar.hide()">
31+
(onAction)="snackbar.close()">
3232
</igx-snackbar>
3333
```
3434
You can set the id of the component by `id="Snackbar"`, otherwise it will be automatically generated.
3535

3636
You can set the title of the button by setting `actionName="Dismiss"`.
3737

38-
You can hide the Snackbar by using `snackbar.hide()` method.
38+
You can hide the Snackbar by using `snackbar.close()` method.
3939

4040
By default, the IgxSnackbar will be automatically hidden after 4000 milliseconds. The automatic hiding behavior can be controlled via the following attributes:
4141
- `autoHide` - whether the snackbar should be hidden after a certain time interval.
@@ -45,11 +45,11 @@ By default, the IgxSnackbar will be automatically hidden after 4000 milliseconds
4545
## Snackbar with custom content
4646

4747
```html
48-
<button (click)="snackbar.show()">Show snackbar</button>
48+
<button (click)="snackbar.open()">Show snackbar</button>
4949

5050
<igx-snackbar #snackbar
5151
actionName="Dismiss"
52-
(onAction)="snackbar.hide()">
52+
(onAction)="snackbar.close()">
5353
<span>Custom content</span>
5454
</igx-snackbar>
5555
```

projects/igniteui-angular/src/lib/snackbar/snackbar.component.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Output
1515
} from '@angular/core';
1616
import { fadeIn, fadeOut, slideInBottom, slideOutBottom } from '../animations/main';
17-
import { DeprecateMethod, DeprecateProperty } from '../core/deprecateDecorators';
17+
import { DeprecateProperty } from '../core/deprecateDecorators';
1818

1919
let NEXT_ID = 0;
2020
/**
@@ -223,30 +223,6 @@ export class IgxSnackbarComponent {
223223

224224
constructor() { }
225225

226-
/**
227-
* @deprecated
228-
* Shows the snackbar and hides it after the `displayTime` is over if `autoHide` is set to `true`.
229-
* ```typescript
230-
* this.snackbar.show();
231-
* ```
232-
*/
233-
@DeprecateMethod(`'show' is deprecated. Use 'open' method instead.`)
234-
public show(message?: string): void {
235-
this.open(message);
236-
}
237-
238-
/**
239-
* @deprecated
240-
* Hides the snackbar.
241-
* ```typescript
242-
* this.snackbar.hide();
243-
* ```
244-
*/
245-
@DeprecateMethod(`'hide' is deprecated. Use 'close' method instead.`)
246-
public hide(): void {
247-
this.close();
248-
}
249-
250226
/**
251227
* Shows the snackbar and hides it after the `displayTime` is over if `autoHide` is set to `true`.
252228
* ```typescript

projects/igniteui-angular/src/lib/tabs/tabs.directive.ts

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,40 @@ export abstract class IgxTabsDirective extends IgxCarouselComponentBase implemen
192192
protected scrollTabHeaderIntoView() {
193193
}
194194

195+
/** @hidden */
196+
protected onItemChanges() {
197+
this.setAttributes();
198+
199+
if (this.selectedIndex >= 0 && this.selectedIndex < this.items.length) {
200+
201+
// Check if there is selected tab
202+
let selectedIndex = -1;
203+
this.items.some((tab, i) => {
204+
if (tab.selected) {
205+
selectedIndex = i;
206+
}
207+
return tab.selected;
208+
});
209+
210+
if (selectedIndex >= 0) {
211+
// Select the same tab that was previously selected
212+
Promise.resolve().then(() => {
213+
this.selectedIndex = selectedIndex;
214+
});
215+
} else {
216+
// Select the tab on the same index the previous selected tab was
217+
Promise.resolve().then(() => {
218+
this.updateSelectedTabs(null);
219+
});
220+
}
221+
} else if (this.selectedIndex >= this.items.length) {
222+
// Select the last tab
223+
Promise.resolve().then(() => {
224+
this.selectedIndex = this.items.length - 1;
225+
});
226+
}
227+
}
228+
195229
private setAttributes() {
196230
this.items.forEach(item => {
197231
if (item.panelComponent && !item.headerComponent.nativeElement.getAttribute('id')) {
@@ -253,39 +287,6 @@ export abstract class IgxTabsDirective extends IgxCarouselComponentBase implemen
253287
}
254288
}
255289

256-
private onItemChanges() {
257-
this.setAttributes();
258-
259-
if (this.selectedIndex >= 0 && this.selectedIndex < this.items.length) {
260-
261-
// Check if there is selected tab
262-
let selectedIndex = -1;
263-
this.items.some((tab, i) => {
264-
if (tab.selected) {
265-
selectedIndex = i;
266-
}
267-
return tab.selected;
268-
});
269-
270-
if (selectedIndex >= 0) {
271-
// Select the same tab that was previously selected
272-
Promise.resolve().then(() => {
273-
this.selectedIndex = selectedIndex;
274-
});
275-
} else {
276-
// Select the tab on the same index the previous selected tab was
277-
Promise.resolve().then(() => {
278-
this.updateSelectedTabs(null);
279-
});
280-
}
281-
} else if (this.selectedIndex >= this.items.length) {
282-
// Select the last tab
283-
Promise.resolve().then(() => {
284-
this.selectedIndex = this.items.length - 1;
285-
});
286-
}
287-
}
288-
289290
private triggerPanelAnimations(oldSelectedIndex: number) {
290291
const item = this.items.get(this._selectedIndex);
291292

projects/igniteui-angular/src/lib/tabs/tabs/tabs.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div #headerContainer class="igx-tabs__header">
22
<button
3+
#leftButton
34
igxButton="icon"
45
igxRipple
5-
igxLeftButtonStyle
66
class="igx-tabs__header-button"
77
(click)="scrollLeft()"
88
>
@@ -26,9 +26,9 @@
2626
</div>
2727
</div>
2828
<button
29+
#rightButton
2930
igxButton="icon"
3031
igxRipple
31-
igxRightButtonStyle
3232
class="igx-tabs__header-button"
3333
(click)="scrollRight()"
3434
>

0 commit comments

Comments
 (0)