Skip to content

Commit 2c0a18c

Browse files
authored
Merge branch 'master' into rkaraivanov/fix-9479
2 parents 4875536 + ab50fd7 commit 2c0a18c

File tree

10 files changed

+51
-146
lines changed

10 files changed

+51
-146
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/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/toast/toast.component.spec.ts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
ComponentFixture,
88
} from '@angular/core/testing';
99
import { By } from '@angular/platform-browser';
10-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
10+
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
1111
import {
1212
IgxToastComponent,
1313
IgxToastModule,
@@ -19,7 +19,7 @@ describe('IgxToast', () => {
1919
beforeAll(waitForAsync(() => {
2020
TestBed.configureTestingModule({
2121
declarations: [ToastInitializeTestComponent],
22-
imports: [BrowserAnimationsModule, IgxToastModule],
22+
imports: [NoopAnimationsModule, IgxToastModule]
2323
}).compileComponents();
2424
}));
2525

@@ -73,18 +73,27 @@ describe('IgxToast', () => {
7373
expect(toast.onOpening.emit).toHaveBeenCalled();
7474
});
7575

76-
it('should emit onHiding when toast is hidden', () => {
77-
spyOn(toast.hiding, 'emit');
76+
it('should emit onClosing when toast is hidden', () => {
77+
spyOn(toast.onClosing, 'emit');
78+
toast.open();
7879
toast.close();
79-
expect(toast.hiding.emit).toHaveBeenCalled();
80+
expect(toast.onClosing.emit).toHaveBeenCalled();
8081
});
8182

82-
it('should emit onOpened when toast is opened', () => {
83-
expect(toast.isVisible).toBeFalse();
83+
it('should emit onOpened when toast is opened', fakeAsync(() => {
84+
spyOn(toast.onOpened, 'emit');
8485
toast.open();
85-
fixture.detectChanges();
86-
expect(toast.isVisible).toBeTrue();
87-
});
86+
tick(4000);
87+
expect(toast.onOpened.emit).toHaveBeenCalled();
88+
}));
89+
90+
it('should emit onClosed when toast is closed', fakeAsync(() => {
91+
spyOn(toast.onClosed, 'emit');
92+
toast.open();
93+
toast.close();
94+
tick(4000);
95+
expect(toast.onClosed.emit).toHaveBeenCalled();
96+
}));
8897

8998
it('visibility is updated by the toggle() method', () => {
9099
expect(toast.isVisible).toBeFalse();

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

Lines changed: 1 addition & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { DeprecateMethod, DeprecateProperty } from '../core/deprecateDecorators';
2+
import { DeprecateProperty } from '../core/deprecateDecorators';
33
import {
44
ChangeDetectorRef,
55
Component,
@@ -87,58 +87,6 @@ export class IgxToastComponent extends IgxToggleDirective
8787
@Input()
8888
public id = `igx-toast-${NEXT_ID++}`;
8989

90-
/**
91-
* Emits an event prior the toast is shown.
92-
* Provides reference to the `IgxToastComponent` as event argument.
93-
* ```html
94-
* <igx-toast (showing)="handleShowing($event)"></igx-toast>
95-
* ```
96-
*
97-
* @memberof IgxToastComponent
98-
*/
99-
@DeprecateProperty(`'showing' property is deprecated. You can use 'onOpening' instead.`)
100-
@Output()
101-
public showing = new EventEmitter<IgxToastComponent>();
102-
103-
/**
104-
* Emits an event when the toast is shown.
105-
* Provides reference to the `IgxToastComponent` as event argument.
106-
* ```html
107-
* <igx-toast (shown)="handleShown($event)"></igx-toast>
108-
* ```
109-
*
110-
* @memberof IgxToastComponent
111-
*/
112-
@DeprecateProperty(`'shown' property is deprecated. You can use 'onOpened' instead.`)
113-
@Output()
114-
public shown = new EventEmitter<IgxToastComponent>();
115-
116-
/**
117-
* Emits an event prior the toast is hidden.
118-
* Provides reference to the `IgxToastComponent` as event argument.
119-
* ```html
120-
* <igx-toast (hiding)="handleHiding($event)"></igx-toast>
121-
* ```
122-
*
123-
* @memberof IgxToastComponent
124-
*/
125-
@DeprecateProperty(`'hiding' property is deprecated. You can use 'onClosing' instead.`)
126-
@Output()
127-
public hiding = new EventEmitter<IgxToastComponent>();
128-
129-
/**
130-
* Emits an event when the toast is hidden.
131-
* Provides reference to the `IgxToastComponent` as event argument.
132-
* ```html
133-
* <igx-toast (hidden)="handleHidden($event)"></igx-toast>
134-
* ```
135-
*
136-
* @memberof IgxToastComponent
137-
*/
138-
@DeprecateProperty(`'hidden' property is deprecated. You can use 'onClosed' instead.`)
139-
@Output()
140-
public hidden = new EventEmitter<IgxToastComponent>();
141-
14290
/**
14391
* Sets/gets the `role` attribute.
14492
* If not set, `role` will have value `"alert"`.
@@ -328,37 +276,6 @@ export class IgxToastComponent extends IgxToggleDirective
328276
super(_element, cdr, overlayService, navService);
329277
}
330278

331-
/**
332-
* @deprecated
333-
* Shows the toast.
334-
* If `autoHide` is enabled, the toast will hide after `displayTime` is over.
335-
*
336-
* ```typescript
337-
* this.toast.show();
338-
* ```
339-
*
340-
* @memberof IgxToastComponent
341-
*/
342-
@DeprecateMethod(`'show' is deprecated. Use 'open' method instead.`)
343-
public show(message?: string): void {
344-
this.open(message);
345-
}
346-
347-
/**
348-
* @deprecated
349-
* Hides the toast.
350-
*
351-
* ```typescript
352-
* this.toast.hide();
353-
* ```
354-
*
355-
* @memberof IgxToastComponent
356-
*/
357-
@DeprecateMethod(`'hide' is deprecated. Use 'close' method instead.`)
358-
public hide(): void {
359-
this.close();
360-
}
361-
362279
/**
363280
* Shows the toast.
364281
* If `autoHide` is enabled, the toast will hide after `displayTime` is over.
@@ -390,7 +307,6 @@ export class IgxToastComponent extends IgxToggleDirective
390307
this.toastMessage = message;
391308
}
392309

393-
this.showing.emit(this);
394310
super.open(overlaySettings);
395311

396312
if (this.autoHide) {
@@ -409,7 +325,6 @@ export class IgxToastComponent extends IgxToggleDirective
409325
*/
410326
public close() {
411327
clearInterval(this.timeoutId);
412-
this.hiding.emit(this);
413328
super.close();
414329
}
415330

@@ -431,12 +346,10 @@ export class IgxToastComponent extends IgxToggleDirective
431346
public ngOnInit() {
432347
this.onOpened.pipe(takeUntil(this.d$)).subscribe(() => {
433348
this.isVisibleChange.emit(true);
434-
this.shown.emit(this);
435349
});
436350

437351
this.onClosed.pipe(takeUntil(this.d$)).subscribe(() => {
438352
this.isVisibleChange.emit(false);
439-
this.hidden.emit(this);
440353
});
441354
}
442355

src/app/toast/toast.sample.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ <h4 class="sample-title">Toggle Toast</h4>
8484
<igx-toast
8585
#toast
8686
[outlet]="outlet"
87-
(onShowing)="handleShowing($event)"
88-
(onShown)="handleShown($event)"
89-
(onHiding)="handleHiding($event)"
90-
(onHidden)="handleHidden($event)"
87+
(onOpening)="handleShowing($event)"
88+
(onOpened)="handleShown($event)"
89+
(onClosing)="handleHiding($event)"
90+
(onClosed)="handleHidden($event)"
9191
>
9292
This message will self-destruct in 4 seconds.
9393
</igx-toast>

0 commit comments

Comments
 (0)