Skip to content

Commit 5995f4d

Browse files
authored
Merge pull request #229 from IBM/breaking-changes
2.0!
2 parents b759758 + 7ed6c5b commit 5995f4d

File tree

90 files changed

+1516
-2787
lines changed

Some content is hidden

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

90 files changed

+1516
-2787
lines changed

.storybook/preview.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import "~carbon-components/css/carbon-components.min.css";
22

33
body {
4-
margin: 20px;
4+
padding: 20px;
55
// for tooltips/popovers ... can be on any chld element before the popover
66
// but body is most conveient
77
position: relative;

src/banner/banner-content.interface.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* Deprecated in favour of `NotificationContent` (to be removed in v3.0).
3+
*
4+
* @deprecated
5+
*/
16
export interface BannerContent {
27
type: string;
38
title: string;

src/banner/banner.component.spec.ts

Lines changed: 0 additions & 122 deletions
This file was deleted.

src/banner/banner.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ import { NotificationContent } from "./banner-content.interface";
1313
import { I18n } from "./../i18n/i18n.module";
1414

1515
/**
16+
* Deprecated in favour of `InlineNotification` (to be removed in v3.0).
1617
* Banner messages are displayed toward the top of the UI and do not interrupt user’s work.
1718
*
1819
* @export
1920
* @class Banner
21+
* @deprecated
2022
*/
2123
@Component({
2224
selector: "ibm-banner",
@@ -75,7 +77,9 @@ export class Banner implements OnInit {
7577

7678
@ViewChild("banner") banner;
7779

78-
constructor(protected bannerService: BannerService, protected i18n: I18n) {}
80+
constructor(protected bannerService: BannerService, protected i18n: I18n) {
81+
console.warn("`ibm-banner` has been deprecated in favour of `ibm-inline-notification`");
82+
}
7983

8084
ngOnInit() {
8185
if (!this.bannerObj.closeLabel) {

src/banner/banner.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ import { I18nModule } from "./../i18n/i18n.module";
1010

1111
export { BannerService } from "./banner.service";
1212
export { Banner } from "./banner.component";
13-
export { Toast } from "./toast.component";
1413

14+
/**
15+
* Deprecated in favour of `NotificationModule` (to be removed in v3.0).
16+
*
17+
* @deprecated
18+
*/
1519
@NgModule({
1620
declarations: [
1721
Toast,

src/banner/banner.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ import {
1010
} from "@angular/core";
1111

1212
import { BannerContent, NotificationContent, ToastContent } from "./banner-content.interface";
13-
import { Banner, Toast } from "./banner.module";
13+
import { Banner } from "./banner.module";
14+
import { Toast } from "./toast.component";
1415

1516
/**
17+
* Deprecated in favour of `NotificationService` (to be removed in v3.0).
1618
* Provides a way to use the banner component.
1719
*
1820
* Banners are displayed toward the top of the UI and do not interrupt the user’s work.
1921
*
2022
* @export
2123
* @class BannerService
24+
* @deprecated
2225
*/
2326
@Injectable()
2427
export class BannerService implements OnDestroy {
@@ -43,6 +46,7 @@ export class BannerService implements OnDestroy {
4346
private injector: Injector,
4447
private componentFactoryResolver: ComponentFactoryResolver,
4548
private applicationRef: ApplicationRef) {
49+
console.warn("`BannerService` has been deprecated in favour of `NotificationService`");
4650
}
4751

4852
/**

src/banner/banner.stories.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

src/banner/toast.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { ToastContent } from "./banner-content.interface";
55
import { Banner } from "./banner.component";
66

77
/**
8+
* Deprecated in favour of `ToastNotification` (to be removed in v3.0).
89
* Banner messages are displayed toward the top of the UI and do not interrupt user’s work.
910
*
1011
* @export
1112
* @class Banner
13+
* @deprecated
1214
*/
1315
@Component({
1416
selector: "ibm-toast",
@@ -52,6 +54,8 @@ export class Toast extends Banner implements OnInit {
5254
@Input() bannerObj: ToastContent;
5355

5456
ngOnInit() {
57+
console.warn("`ibm-toast` has been deprecated in favour of `ibm-toast-notification`");
58+
5559
if (!this.bannerObj.closeLabel) {
5660
this.bannerObj.closeLabel = this.i18n.get().BANNER.CLOSE_BUTTON;
5761
}

0 commit comments

Comments
 (0)