From 6477791961e9b251a25b563c1e51d801688652fc Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 22 Apr 2020 16:23:30 +0300 Subject: [PATCH 1/2] feat(theme-shared): export theme-shared tokens --- npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts | 2 ++ npm/ng-packs/packages/theme-shared/src/public-api.ts | 1 + 2 files changed, 3 insertions(+) create mode 100644 npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts diff --git a/npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts b/npm/ng-packs/packages/theme-shared/src/lib/tokens/index.ts new file mode 100644 index 0000000000..1bdd74c53e --- /dev/null +++ b/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'; diff --git a/npm/ng-packs/packages/theme-shared/src/public-api.ts b/npm/ng-packs/packages/theme-shared/src/public-api.ts index 0cb3139a22..436f687044 100644 --- a/npm/ng-packs/packages/theme-shared/src/public-api.ts +++ b/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'; From fe636d9426b75c48945ef94274bebbdeb68f23bc Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 22 Apr 2020 16:23:53 +0300 Subject: [PATCH 2/2] refactor(theme-shared): add methods of toaster.service return types --- .../src/lib/services/toaster.service.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts b/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts index 60471efdfa..4d178c0ad2 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/services/toaster.service.ts +++ b/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, - ) { + ): number { return this.show(message, title, 'info', options); } @@ -51,7 +51,7 @@ export class ToasterService { message: Config.LocalizationParam, title?: Config.LocalizationParam, options?: Partial, - ) { + ): number { return this.show(message, title, 'success', options); } @@ -65,7 +65,7 @@ export class ToasterService { message: Config.LocalizationParam, title?: Config.LocalizationParam, options?: Partial, - ) { + ): number { return this.show(message, title, 'warning', options); } @@ -79,7 +79,7 @@ export class ToasterService { message: Config.LocalizationParam, title?: Config.LocalizationParam, options?: Partial, - ) { + ): 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, - ) { + ): 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);