-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(dependencies): upgrade dependencies
BREAKING CHANGE: The peer dependencies have been upgraded to be: * "rxjs": "^5.4.2", * "@angular/core": "^4.3.0", * "@ngrx/store": "^2.2.3" close #2, close #3
- Loading branch information
1 parent
dd18a17
commit 1258f13
Showing
15 changed files
with
4,577 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/ngrx/notify/compare/v1.0.0...v2.0.0) (2017-07-22) | ||
|
||
|
||
### Chores | ||
|
||
* **dependencies:** upgrade dependencies ([8592504](https://github.com/ngrx/notify/commit/8592504)), closes [#2](https://github.com/ngrx/notify/issues/2) [#3](https://github.com/ngrx/notify/issues/3) | ||
|
||
|
||
### BREAKING CHANGES | ||
|
||
* **dependencies:** The peer dependencies have been upgraded to be: | ||
* "rxjs": "^5.4.2", | ||
* "@angular/core": "^4.3.0", | ||
* "@ngrx/store": "^2.2.3" | ||
|
||
|
||
|
||
<a name="1.0.0"></a> | ||
# 1.0.0 (2016-06-07) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { Notify } from './notify'; | ||
export { NOTIFY_PROVIDERS, NOTIFY_GLOBAL_OPTIONS } from './ng2'; | ||
export { NotifyModule, NOTIFY_GLOBAL_OPTIONS } from './ng2'; | ||
export { NotificationInstance, NotificationOptions } from './notification'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,57 @@ | ||
import { OpaqueToken } from '@angular/core'; | ||
import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core'; | ||
|
||
import { Notify } from './notify'; | ||
import { NotificationStatic, NotificationOptions } from './notification'; | ||
import { NotificationPermission } from './notification-permission'; | ||
|
||
declare var Notification: NotificationStatic; | ||
|
||
export const NOTIFY_GLOBAL_OPTIONS = new OpaqueToken('[@ngrx/notify] Global Options'); | ||
export const NOTIFICATION_STATIC = new OpaqueToken('[@ngrx/notify] Notification Static Constructor'); | ||
|
||
|
||
const NOTIFICATION_STATIC_PROVIDER = { | ||
provide: NOTIFICATION_STATIC, | ||
useValue: Notification | ||
}; | ||
|
||
const NOTIFICATION_PERMISSION_PROVIDER = { | ||
provide: NotificationPermission, | ||
deps: [ NOTIFICATION_STATIC ], | ||
useFactory(Notification: NotificationStatic) { | ||
return new NotificationPermission(Notification); | ||
declare const window: any; | ||
export declare var Notification: NotificationStatic; | ||
|
||
export const NOTIFY_GLOBAL_OPTIONS = new InjectionToken<NotificationOptions>('[@ngrx/notify] Global Options'); | ||
export const NOTIFICATION_STATIC = new InjectionToken<NotificationStatic>('[@ngrx/notify] Notification Static Constructor'); | ||
|
||
export function createNotification(): NotificationStatic { | ||
return window.Notification; | ||
} | ||
|
||
export function createNotificationPermission(notification: NotificationStatic): NotificationPermission { | ||
return new NotificationPermission(notification); | ||
} | ||
|
||
export function createNotify(notification: NotificationStatic, options: NotificationOptions, permission$: NotificationPermission): Notify { | ||
return new Notify(notification, options, permission$); | ||
} | ||
|
||
@NgModule({ | ||
}) | ||
export class NotifyModule { | ||
static forRoot(options: NotificationOptions = {}): ModuleWithProviders { | ||
return { | ||
ngModule: NotifyModule, | ||
providers: [ | ||
{ | ||
provide: NOTIFICATION_STATIC, | ||
useFactory: (createNotification) | ||
}, | ||
{ | ||
provide: NotificationPermission, | ||
deps: [NOTIFICATION_STATIC], | ||
useFactory: (createNotificationPermission) | ||
}, | ||
{ | ||
provide: NOTIFY_GLOBAL_OPTIONS, | ||
useValue: options | ||
}, | ||
{ | ||
provide: Notify, | ||
deps: [ | ||
NOTIFICATION_STATIC, | ||
NOTIFY_GLOBAL_OPTIONS, | ||
NotificationPermission | ||
], | ||
useFactory: (createNotify) | ||
} | ||
] | ||
}; | ||
} | ||
}; | ||
|
||
const NOTIFY_PROVIDER = { | ||
provide: Notify, | ||
deps: [ NOTIFICATION_STATIC, NOTIFY_GLOBAL_OPTIONS, NotificationPermission ], | ||
useFactory(Notification: NotificationStatic, options: NotificationOptions[], permission$: NotificationPermission) { | ||
return new Notify(Notification, options, permission$); | ||
} | ||
}; | ||
|
||
const DEFAULT_GLOBAL_OPTIONS_PROVIDER = { | ||
provide: NOTIFY_GLOBAL_OPTIONS, | ||
multi: true, | ||
useValue: {} | ||
}; | ||
|
||
export const NOTIFY_PROVIDERS: any[] = [ | ||
NOTIFICATION_STATIC_PROVIDER, | ||
NOTIFICATION_PERMISSION_PROVIDER, | ||
NOTIFY_PROVIDER, | ||
DEFAULT_GLOBAL_OPTIONS_PROVIDER | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.