Skip to content

Commit

Permalink
fix: Missing exports from public apis #132
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Nov 17, 2021
1 parent ea25886 commit ba4bef4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { Notification, NotificationService } from '../notification.service';
import {
NotificationPayload,
NotificationService,
} from '../notification.service';

@Component({
selector: 'stream-notification-list',
templateUrl: './notification-list.component.html',
styles: [],
})
export class NotificationListComponent {
notifications$: Observable<Notification[]>;
notifications$: Observable<NotificationPayload[]>;

constructor(private notificationService: NotificationService) {
this.notifications$ = this.notificationService.notifications$;
}

trackByItem(_: number, item: Notification) {
trackByItem(_: number, item: NotificationPayload) {
return item;
}
}
6 changes: 3 additions & 3 deletions projects/stream-chat-angular/src/lib/notification.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BehaviorSubject, Observable } from 'rxjs';

export type NotificationType = 'success' | 'error';

export type Notification = {
export type NotificationPayload = {
type: NotificationType;
text: string;
};
Expand All @@ -12,8 +12,8 @@ export type Notification = {
providedIn: 'root',
})
export class NotificationService {
notifications$: Observable<Notification[]>;
private notificationsSubject = new BehaviorSubject<Notification[]>([]);
notifications$: Observable<NotificationPayload[]>;
private notificationsSubject = new BehaviorSubject<NotificationPayload[]>([]);

constructor() {
this.notifications$ = this.notificationsSubject.asObservable();
Expand Down
4 changes: 4 additions & 0 deletions projects/stream-chat-angular/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export * from './lib/message-input/message-input.component';
export * from './lib/message-input/message-input-config.service';
export * from './lib/message-list/message-list.component';
export * from './lib/message-list/image-load.service';
export * from './lib/message-list/group-styles';
export * from './lib/attachment-list/attachment-list.component';
export * from './lib/attachment-preview-list/attachment-preview-list.component';
export * from './lib/message-reactions/message-reactions.component';
Expand All @@ -31,5 +32,8 @@ export * from './lib/notification-list/notification-list.component';
export * from './lib/modal/modal.component';
export * from './lib/read-by';
export * from './lib/is-image-attachment';
export * from './lib/device-width';
export * from './lib/message-preview';
export * from './lib/notification.service';
export * from './lib/stream-chat.module';
export * from './lib/types';

0 comments on commit ba4bef4

Please sign in to comment.