- angular2-toaster: Full release of 6.0.0 functionality. Pins the library to 6.0.0 versions of Angular and RxJS. Closes #161.
- toaster.service: If a toastId is provided, that toastId is used instead of auto-generating a toastId. Thanks to @sherlock1982 for his work on #158.
- toaster-container.component: Mouseover functionality would incorrectly remove a toast when the toast's timeout was set to 0 and the container's configuration was set to a value other than
- Closes #164.
- toaster-container.component: Typescript compilation was failing for implicit any conversions for object typings for the configuration of showCloseButton, timeout, iconClasses and typeClasses. The type arguments have been strengthened to make more rigid compilation happy. This should not affect anyone who was not abusing the expected typed arguments. Closes #150. Closes #148.
- demos: The webpack demo has been rebuilt against
[email protected]
and webpack 4. Closes #147.
- angular2-toaster: Full release of 5.x.x functionality. See CHANGELOG below for details. Closes #144, #129, #142, #139 and #128.
-
angular2-toaster: The toaster.css is now generated via SCSS. Thanks to @bastienmoulia for his hard (and patient) work on this feature!
-
demos:
angular-cli
project updated to include better examples around multi-container instances.
- toaster-container.component: The container's config is no longer copied onto the toast
instance. Instead, titleClass and messageClass have been moved to input properties so that
individual containers can uniquely style these properties for the same toast instance being
broadcasted to multiple containers. The
toasterconfig
property has been removed fromToast
as a result to clean up the intent of theToast
interface. Closes #144.
-
angular2-toaster: The library's Angular dependencies have been pinned to a minimum version of 5.0.0 for common, compiler, and core and RxJS has been pinned to a minimum of 5.4.2 due to defects in lower RxJS versions.
-
toaster.module:
ToasterModule
now exposes bothforRoot
andforChild
methods to ensure thatToasterService
is always provided as a singleton instance.ToasterModule
should always be called withforRoot
in the root of the application and subsequently called withforChild
in additional "per component" container injections. Closes #129.
-
angular2-toaster: A
toaster.min.css
file inclusion has been added. Closes #142. -
demos: Rebuilt the
angular-cli
demo to pull from local pathing to allow for better local examples.
-
toaster.css: The close button is now properly responsive and no longer overflows its boundaries at collapsed resolutions. Closes #139.
-
angular2-toaster: Optimized builds now work as intended. Closes #128.
-
toaster-container.component: If the same toast was broadcast to multiple containers, the removal of the timeout for a toast in one container would affect all other timeouts for all other containers for that toast instance. Timeout Ids are now tracked internally in each container to ensure that each container's toast instance is tracked individually.
- angular2-toaster: Update Angular dependencies to support 5.x.x versions. Thanks @isaacplmann!
- toaster-container.component: The setTimeout call now runs outside of Angular and is patched on
reentry with an
ngZone.run()
call. This should provide better performance overall and should make protractor testing easier. Closes #120.
- angular2-toaster: Explicit animation configuration is now required for the library.
-
angular2-toaster: Animation support has been added. Closes #95.
-
angular2-toaster:
angular2-toaster
is now compiled with thestrictNullChecks
flag on by default. -
toast.ts: A
data:any
property has been added to the toast instance. This allows for data to be attached to a toast instance, accessible within an associated component. Closes #112. -
tslint: Added tslint to support cleaning up the style of the library and added initial cleanup changes.
- toast.component.ts: The elvis operator has been added to
titleClass
andmessageClass
toasterconfig property bindings in order to allow the library to be consumed by Ahead of Time compilation utilizing thestrictNullChecks: true
configuration. Closes #111
-
README: The documentation has been expanded to support the new animation feature.
-
demos: Cleaned up the
webpack
demo and added a simpleangular-cli
example.
- angular2-toaster: The library's Angular dependencies have been pinned to a minimum version of 4.0.0 for common, compiler, and core.
- angular2-toaster: The library has been recompiled against the 4.0.1 version of the Ahead of Time Angular compiler, resulting in smaller bundled UMD files. This allows for faster downloading and bootstrapping of the library. Closes #106.
- toaster.css: Center-positioned postionClasses now properly align in the middle of the page. Closes #104.
- angular2-toaster: The library has been converted to a UMD Format to mirror @angular packages
and properly expose the top-level module. As a result, a number of changes have been implemented
and require updates to your code.
- You no longer need to (or can) import from
angular2-toaster/angular2-toaster
. You can now import directly fromangular2-toaster
. - There is no longer a
/lib
folder. Thetoaster.css
file has been moved to the root of the package since this is a top-level file, just likeangular2-toaster
. - If you still need to deep-link to a specific file rather than consuming it via
angular2-toaster
, the compiled files are now available under/src
instead of/lib
. - The default module style for the library is now
es2015
instead ofcommonjs
.
- You no longer need to (or can) import from
- angular2-toaster: UMD files are now included under the
/bundles
folder of the package. The UMD files expect@angular/core
,@angular/common
, andrxjs
to exist in the global namespaces if being consumed.
-
angular2-toaster: The peerDependency requirement for rxjs has been relaxed to
rxjs@^5.0.0-beta.11
. This allows for flexibility all the way back to@[email protected]
. Closes #87. -
angular2-toaster: The
angular2-toaster
package entrance was never compiled via Ahead of Time compilation. As a result, nometadata.json
was available for the package entrance point and the library could not be consumed with AoT if trying to import directly fromangular2-toaster
. This has been corrected.
- README: The README documentation has been restructured to make it easier to find key information, such as how to get started. All import examples have been updated to match the new package structure.
- toast.component: When rendering BodyOutputType.Component, the toast instance itself is
applied to the rendered component. This allows the component to interact with the toast as
needed, as well as expose access to the toast id.
Addresses #84.
- toaster-container.component: ResetTimer on mouseout was not being properly called. It is now called appropriately when mouseoverTimerStop is set to true. Thanks to @kb3eua.
- README: Documented the mouseoverTimerStop config option and documented the addition of the toast instance to components when using BodyOutputType.Component. Closes #83.
- Angular 2.0.2 Support: The library has been tested through to Angular 2.0.2.
- toast.component: Dynamic template data would break
bodyOutputType.Component
rendering. A forceddetectChanges()
call has been added after the component is created and loaded to enable this functionality. Additional test cases were added for the gap. Closes #71. - angular2-toaster.js: The library entrance attempts to load
Toast
from./lib/toast
. Since theToast
file is an interface-only file, there is nothing to load. Closes #70.
- package.json: The
typings install
step was incorrectly set in thepostinstall
hook when it should have been set in theprebuild
hook. This was causing typings to attempt to be installed whenever the package was installed, which was incorrect. Closes #67.
- Angular: Final Version: The library has been updated to Angular
2.0.0
and the version has been bumped to1.0.0
as a result. Closes #63. - typings: The library has been updated from tsd to typings. Typings have been updated and
wired into the build and are now re-installed on
npm install
. In addition, typings are no longer checked into source. Closes #60.
- package.json: The main entrance has been updated to
angular2-toaster.js
. Addresses #60. - toast.component: The
bodyOutputType
property is public to enable AoT compilation on the template. Closes #62. - toaster.container.spec: The
TestComponent
module was improperly defined, causing errors in the correspondingngFactory
file. This has been corrected, closing #64.
- Angular: RC7: The library has been updated to Angular RC7. Closes #59.
- toaster.service: A
removeToast
observable has been added to toasterService. This allows the consumer to be notified when any toast is removed. This was added in #58.
- toaster.module: Toaster Module was improperly using
BrowserModule
when it should have been importingCommonModule
. Closes #55. - Test Build: Corrected broken Travis-CI build.
- Angular: RC6: The library has been updated to Angular RC6. Closes #52.
- Documentation: Updated to close #51.
-
package dependencies: @angular packages and the rxjs package have been removed from dependencies and added to peerDependencies to allow for more flexible consumption of alternative builds and configurations. The consumer is now responsible to ensure that the correct version is used per the minimum requirements in package.json. Closes #50.
-
toast.component: Due to Angular2-RC5 deprecating
ComponentResolver
and Angular2-RC6 removingComponentResolver
, dynamic component resolution has been moved toCompiler.compileComponentAsync
. -
toast.component: Dynamic body rendering via component has been moved to the
ngAfterViewInit
lifecycle hook to ensure full module compilation is complete and metadata is attached before attempting to render the component. -
toast.component: RC6 requires that all dynamically rendered components be enclosed in a
NgModule
. If a module is not used, an error will be thrown at runtime.
- toast.module: toast.module renamed to toaster.module for greater consistency with other components representing top-level APIs.
- demo: A plunker demo has been created and added to the README to begin work on #46.
- toaster.module: previous NPM build 0.3.6-rc.5 was improperly built with toast.module not being included. The module is now renamed and included appropriately.
- Angular: RC5: The library has been updated to Angular RC5.
- Angular: Toaster is now encapsulated in an ngModule ToastModule #47.
- Angular: RC4: The library has been updated to Angular RC4.
- toast.component.ts: The ClickHandler was called twice when the close button checked the ClickHandler function and the ClickHandler returned false. This is corrected by stopping the double event propagation. Closes #35.
- Angular: RC3: The library has been updated to Angular RC3.
- Angular RC2: The library has been updated to Angular RC2.
- toaster-container.component.ts: An explcit markForRef check has been added for timeouts. This allows toasts to be properly removed when their timeout expires, even if the rest of the consuming app is running as ChangeDectectionStrategy.OnPush.
- toaster.css: The toast icons were covering the entire toast body due to their layout. As a result, any component being rendered into the toast body could not have any interaction points (such as buttons) since it was beneath the icon. The toast has been slightly restructured to accommodate this scenario.
- README: Documentation has been added for the
toasterService.clear()
function. Added in 8e6404c. - demo.systemjs: An additional use case for rendering components with actions (buttons) in the toast body has been added to address #27.
- toast.component.ts: The
BodyOutputType.TrustedHtml
option was trying to improperly render thetoast.html
property of the toast. This has been updated to render the body property as the inner html of the new toast instance and addresses #24.
- README: Body Output Type documentation added to the README.
- toaster.container.component.ts: If
toast.timeout
property is set to 0, the toast instance will correctly be "sticky". If thetoast.timeout
is undefined, the timeout property assignment will continue to correctly fallback to thetoasterconfig.timeout
property. Closes #23.
The rc version has been bumped to match the currently targeted Angular 2 version.
- toaster.container.component.ts: If the component has not been properly initialized but ngDestroy is triggered, an exception will no longer be thrown. Fixed via #20.
- toaster.service.ts: JSDoc documentation added for public API methods of the toaster service.
This is the first release of Angular2-Toaster against the Angular2 Release Candidate. All Angular 2
NPM packages have been updated to use the appropriate @angular/*
import syntax. As a result, the
library is no longer backwards-compatible with Angular 2 Beta releases. Please update to
"@angular/*": "2.0.0-rc.1"
at minimum going forward.
- BodyOutputType.Component: BodyOutputType.Component (the ability to render components as the
body of the toast) has been updated to remove the soon to be deprecated
DynamicComponentLoader
in favor of theComponentResolver
. This eliminated a nasty but necessary manual timeout and detectChanges pairing and resolved a long-standing TODO. - Toast.Component: Toast rendering has been moved to its own component. This allows for
BodyOutputType.Component
to properly load into the appropriateTemplateRef
if multiple toasts are rendering components concurrently. - ToasterContainerComponent.Template: The template has been updated to the new
*ngFor
syntax. Closes #14.
- Angular2-rc compatibility
- toaster.css: Fixed width issues for center aligned
toast-containers
.
- toaster.service.ts: EventEmitters removed and Observables added instead to handle events between service and containers.
- toaster.service.ts:
pop
function returns toast instance after the toast has been added. - toaster.service.ts:
popAsync
function added to returnObservable<Toast>
to allow caller to subscribe to added toasts. - toaster.service.ts: If a
toaster-container
is not created when a toast is popped, an error will be thrown.
-
toastId:
toastId
has been changed from a number that is incremented internally in eachtoaster-container
to most-likely-random GUIDs that are generated in eachpop()
call. This allows for the toastId to always be known and prevents unwanted collisions when removing from multiple containers. -
toaster.service.ts: The
isAsync
parameter for the toasterService has been removed and a factory can no longer be passed in thetoaster-container
construction to specify async vs sync.