Browse Source

Merge branch 'dev' of https://github.com/abpframework/abp into dev

pull/3719/head
Alper Ebicoglu 7 years ago
parent
commit
c4e884b46a
  1. 14
      npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts
  2. 2
      npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts
  3. 1
      npm/ng-packs/packages/theme-shared/src/public-api.ts

14
npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts

@ -37,7 +37,7 @@ export class ToasterService {
message: Config.LocalizationParam,
title?: Config.LocalizationParam,
options?: Partial<Toaster.ToastOptions>,
) {
): number {
return this.show(message, title, 'info', options);
}
@ -51,7 +51,7 @@ export class ToasterService {
message: Config.LocalizationParam,
title?: Config.LocalizationParam,
options?: Partial<Toaster.ToastOptions>,
) {
): number {
return this.show(message, title, 'success', options);
}
@ -65,7 +65,7 @@ export class ToasterService {
message: Config.LocalizationParam,
title?: Config.LocalizationParam,
options?: Partial<Toaster.ToastOptions>,
) {
): number {
return this.show(message, title, 'warning', options);
}
@ -79,7 +79,7 @@ export class ToasterService {
message: Config.LocalizationParam,
title?: Config.LocalizationParam,
options?: Partial<Toaster.ToastOptions>,
) {
): number {
return this.show(message, title, 'error', options);
}
@ -96,7 +96,7 @@ export class ToasterService {
title: Config.LocalizationParam = null,
severity: Toaster.Severity = 'neutral',
options = {} as Partial<Toaster.ToastOptions>,
) {
): number {
if (!this.containerComponentRef) this.setContainer();
const id = ++this.lastId;
@ -114,7 +114,7 @@ export class ToasterService {
* Removes the toast with given id.
* @param id ID of the toast to be removed.
*/
remove(id: number) {
remove(id: number): void {
this.toasts = this.toasts.filter(toast => snq(() => toast.options.id) !== id);
this.toasts$.next(this.toasts);
}
@ -122,7 +122,7 @@ export class ToasterService {
/**
* Removes all open toasts at once.
*/
clear(key?: string) {
clear(key?: string): void {
this.toasts = !key
? []
: this.toasts.filter(toast => snq(() => toast.options.containerKey) !== key);

2
npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts

@ -0,0 +1,2 @@
export * from './append-content.token';
export * from './http-error.token';

1
npm/ng-packs/packages/theme-shared/src/public-api.ts

@ -8,4 +8,5 @@ export * from './lib/components';
export * from './lib/directives';
export * from './lib/models';
export * from './lib/services';
export * from './lib/tokens';
export * from './lib/utils';

Loading…
Cancel
Save