Skip to content

Commit c4803cf

Browse files
authored
Merge pull request #139 from GetStream/add-missing-exports-to-public-api
Add missing exports to public api
2 parents ff91883 + d39ee98 commit c4803cf

File tree

7 files changed

+29
-8
lines changed

7 files changed

+29
-8
lines changed

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"schematics": {
1212
"@schematics/angular:component": {
1313
"style": "scss",
14-
"inlineStyle": true
14+
"inlineStyle": true,
15+
"export": true
1516
}
1617
},
1718
"root": "projects/stream-chat-angular",

projects/sample-app/.eslintrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
"prefix": "app",
2828
"style": "kebab-case"
2929
}
30+
],
31+
"no-restricted-imports": [
32+
"error",
33+
{
34+
"patterns": ["dist/*", "public-api"]
35+
}
3036
]
3137
}
3238
},

projects/stream-chat-angular/.eslintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
"prefix": "stream",
2828
"style": "kebab-case"
2929
}
30+
],
31+
"no-restricted-imports": [
32+
"error",
33+
{
34+
"paths": ["stream-chat-angular"],
35+
"patterns": ["dist/*", "public-api"]
36+
}
3037
]
3138
}
3239
},

projects/stream-chat-angular/src/lib/message-input/message-input.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
33
import { TranslateModule } from '@ngx-translate/core';
44
import { BehaviorSubject, Subject } from 'rxjs';
55
import { Channel, UserResponse } from 'stream-chat';
6-
import { AttachmentUpload } from 'stream-chat-angular';
76
import { AttachmentService } from '../attachment.service';
87
import { ChannelService } from '../channel.service';
98
import { ChatClientService } from '../chat-client.service';
109
import { generateMockChannels, mockCurrentUser, mockMessage } from '../mocks';
1110
import { NotificationService } from '../notification.service';
11+
import { AttachmentUpload } from '../types';
1212
import { MessageInputComponent } from './message-input.component';
1313

1414
describe('MessageInputComponent', () => {
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import { Component } from '@angular/core';
22
import { Observable } from 'rxjs';
3-
import { Notification, NotificationService } from '../notification.service';
3+
import {
4+
NotificationPayload,
5+
NotificationService,
6+
} from '../notification.service';
47

58
@Component({
69
selector: 'stream-notification-list',
710
templateUrl: './notification-list.component.html',
811
styles: [],
912
})
1013
export class NotificationListComponent {
11-
notifications$: Observable<Notification[]>;
14+
notifications$: Observable<NotificationPayload[]>;
1215

1316
constructor(private notificationService: NotificationService) {
1417
this.notifications$ = this.notificationService.notifications$;
1518
}
1619

17-
trackByItem(_: number, item: Notification) {
20+
trackByItem(_: number, item: NotificationPayload) {
1821
return item;
1922
}
2023
}

projects/stream-chat-angular/src/lib/notification.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { BehaviorSubject, Observable } from 'rxjs';
33

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

6-
export type Notification = {
6+
export type NotificationPayload = {
77
type: NotificationType;
88
text: string;
99
};
@@ -12,8 +12,8 @@ export type Notification = {
1212
providedIn: 'root',
1313
})
1414
export class NotificationService {
15-
notifications$: Observable<Notification[]>;
16-
private notificationsSubject = new BehaviorSubject<Notification[]>([]);
15+
notifications$: Observable<NotificationPayload[]>;
16+
private notificationsSubject = new BehaviorSubject<NotificationPayload[]>([]);
1717

1818
constructor() {
1919
this.notifications$ = this.notificationsSubject.asObservable();

projects/stream-chat-angular/src/public-api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export * from './lib/message-input/message-input.component';
2323
export * from './lib/message-input/message-input-config.service';
2424
export * from './lib/message-list/message-list.component';
2525
export * from './lib/message-list/image-load.service';
26+
export * from './lib/message-list/group-styles';
2627
export * from './lib/attachment-list/attachment-list.component';
2728
export * from './lib/attachment-preview-list/attachment-preview-list.component';
2829
export * from './lib/message-reactions/message-reactions.component';
@@ -31,5 +32,8 @@ export * from './lib/notification-list/notification-list.component';
3132
export * from './lib/modal/modal.component';
3233
export * from './lib/read-by';
3334
export * from './lib/is-image-attachment';
35+
export * from './lib/device-width';
36+
export * from './lib/message-preview';
37+
export * from './lib/notification.service';
3438
export * from './lib/stream-chat.module';
3539
export * from './lib/types';

0 commit comments

Comments
 (0)