Skip to content

Commit af48fe4

Browse files
authored
Merge pull request #696 from GetStream/6.x.x-rc
6.x.x rc
2 parents 1151578 + 3cffdb1 commit af48fe4

File tree

62 files changed

+1478
-1072
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1478
-1072
lines changed

.github/workflows/workflow.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ on:
33
push:
44
branches:
55
- master
6-
- angular-19
7-
- test-update
8-
- fix-voice-recording
6+
- 6.x.x-rc
97
pull_request:
108
branches:
119
- master
12-
- 5.x.x-beta
10+
- 6.x.x-rc
1311
jobs:
1412
workflow:
1513
runs-on: ubuntu-latest

package-lock.json

Lines changed: 756 additions & 198 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"name": "stream-chat-angular",
33
"version": "0.0.0",
4+
"watch": {
5+
"remove-stream-chat-augmentation": "dist/stream-chat-angular/stream-chat.d.ts.map"
6+
},
47
"scripts": {
58
"prepare": "husky install",
69
"postinstall": "npm run config:dev & npm run copy-css",
@@ -14,8 +17,14 @@
1417
"prestart:dev:customizations-example": "npm run config:dev",
1518
"start:dev:customizations-example": "rm -rf dist & npm run watch & (wait-on dist && ng serve customizations-example --host 0.0.0.0)",
1619
"build": "ng build stream-chat-angular",
20+
"postbuild": "npm run remove-stream-chat-augmentation",
21+
"delete-stream-chat-declaration": "rm -f dist/stream-chat-angular/stream-chat.d.ts",
22+
"delete-stream-chat-declaration-map": "rm -f dist/stream-chat-angular/stream-chat.d.ts.map",
23+
"remove-stream-chat-reference": "replace '/// <reference path=\"stream-chat.d.ts\" />' '' dist/stream-chat-angular/public-api.d.ts",
24+
"remove-stream-chat-augmentation": "npm run delete-stream-chat-declaration && npm run delete-stream-chat-declaration-map && npm run remove-stream-chat-reference",
1725
"build:prod": "npm run copy-css && ng build stream-chat-angular --configuration production",
18-
"watch": "ng build stream-chat-angular --watch --configuration development",
26+
"postbuild:prod": "npm run remove-stream-chat-augmentation",
27+
"watch": "ng build stream-chat-angular --watch --configuration development & npm-watch",
1928
"test": "rm -rf dist & npm run watch & (wait-on dist && ng run stream-chat-angular:test)",
2029
"test:ci": "ng run stream-chat-angular:test --browsers ChromeHeadlessCustom --watch false",
2130
"lint": "ng lint",
@@ -26,10 +35,10 @@
2635
"preanalyze:sample-app": "npm run build:sample-app",
2736
"analyze:sample-app": "webpack-bundle-analyzer dist/sample-app/stats.json",
2837
"copy-css": "rm -rf projects/stream-chat-angular/src/assets/styles && copyfiles --up 5 \"node_modules/@stream-io/stream-chat-css/dist/v2/**/*\" projects/stream-chat-angular/src/assets/styles && copyfiles --up 5 \"node_modules/@stream-io/stream-chat-css/dist/assets/**/*\" projects/stream-chat-angular/src/assets/assets",
29-
"generate-docs": "npm run typedoc:services && npm run typedoc:components && npm run copy-docs:v5",
38+
"generate-docs": "npm run typedoc:services && npm run typedoc:components && npm run copy-docs:v6",
3039
"typedoc:services": "typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-reference-excluder --cleanOutputDir true --excludeConstructors true --hideBreadcrumbs true --hideInPageTOC true --excludePrivate true --out temp-service-docs --exclude '!**/*service.ts' --excludeNotDocumented --tsconfig projects/stream-chat-angular/tsconfig.lib.json projects/stream-chat-angular/src/public-api.ts",
3140
"typedoc:components": "typedoc --plugin typedoc-plugin-markdown --plugin typedoc-plugin-reference-excluder --cleanOutputDir true --excludeConstructors true --sort source-order --hideBreadcrumbs true --hideInPageTOC true --excludePrivate true --excludeNotDocumented --out temp-component-docs --exclude '!**/*component.ts' --tsconfig projects/stream-chat-angular/tsconfig.lib.json projects/stream-chat-angular/src/public-api.ts",
32-
"copy-docs:v5": "ts-node copy-generated-service-docs.ts ../docs/data/docs/chat-sdk/angular/v5-latest/06-services & (ts-node remove-generated-component-docs-content ../docs/data/docs/chat-sdk/angular/v5-latest/05-components && ts-node copy-generated-component-docs.ts ../docs/data/docs/chat-sdk/angular/v5-latest/05-components)"
41+
"copy-docs:v6": "ts-node copy-generated-service-docs.ts ../docs/data/docs/chat-sdk/angular/06-services & (ts-node remove-generated-component-docs-content ../docs/data/docs/chat-sdk/angular/05-components && ts-node copy-generated-component-docs.ts ../docs/data/docs/chat-sdk/angular/05-components)"
3342
},
3443
"lint-staged": {
3544
"**/*": [
@@ -41,19 +50,9 @@
4150
"branches": [
4251
"master",
4352
{
44-
"name": "test-update",
45-
"prerelease": true,
46-
"channel": "beta"
47-
},
48-
{
49-
"name": "fix-voice-recording",
50-
"prerelease": true,
51-
"channel": "beta"
52-
},
53-
{
54-
"name": "5.x.x-beta",
55-
"prerelease": true,
56-
"channel": "beta"
53+
"name": "6.x.x-rc",
54+
"prerelease": "rc",
55+
"channel": "rc"
5756
}
5857
],
5958
"dryRun": false,
@@ -125,10 +124,12 @@
125124
"emoji-regex": "^10.3.0",
126125
"fix-webm-duration": "^1.0.6",
127126
"ngx-float-ui": "^15.0.0",
127+
"npm-watch": "^0.13.0",
128128
"pretty-bytes": "^6.1.1",
129+
"replace": "^1.2.2",
129130
"rxjs": "~7.4.0",
130131
"starwars-names": "^1.6.0",
131-
"stream-chat": "^8.60.0",
132+
"stream-chat": "9.0.0",
132133
"ts-node": "^10.9.2",
133134
"tslib": "^2.3.0",
134135
"uuid": "^9.0.1",

projects/customizations-example/src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256
let-latestMessageText="latestMessageText"
257257
let-latestMessage="latestMessage"
258258
>
259-
<div>Channel title: {{ channel.title }}</div>
259+
<div>Channel title: {{ channel.name }}</div>
260260
<div>Display title: {{ channelDisplayTitle }}</div>
261261
<div>Unread count: {{ unreadCount }}</div>
262262
<div>Latest message text: {{ latestMessageText }}</div>

projects/customizations-example/src/app/message-action/message-action.component.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, Input } from '@angular/core';
22
import {
3-
DefaultStreamChatGenerics,
43
MessageActionHandlerExtraParams,
54
StreamMessage,
65
} from 'stream-chat-angular';
@@ -13,9 +12,9 @@ import {
1312
export class MessageActionComponent {
1413
@Input() actionName!: 'quote' | 'pin' | 'flag' | 'edit' | 'delete';
1514
@Input() actionLabelOrTranslationKey!:
16-
| ((m: StreamMessage<DefaultStreamChatGenerics>) => string)
15+
| ((m: StreamMessage) => string)
1716
| string;
18-
@Input() message!: StreamMessage<DefaultStreamChatGenerics>;
17+
@Input() message!: StreamMessage;
1918
@Input() extraParams!: MessageActionHandlerExtraParams;
2019
@Input() actionHandler!: (
2120
message: StreamMessage,
@@ -36,9 +35,7 @@ export class MessageActionComponent {
3635
}
3736

3837
getActionLabel(
39-
actionLabelOrTranslationKey:
40-
| ((m: StreamMessage<DefaultStreamChatGenerics>) => string)
41-
| string
38+
actionLabelOrTranslationKey: ((m: StreamMessage) => string) | string
4239
) {
4340
return typeof actionLabelOrTranslationKey === 'string'
4441
? actionLabelOrTranslationKey

projects/customizations-example/src/app/message-text/message-text.component.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import { Component, Input } from '@angular/core';
2-
import { MessageResponseBase } from 'stream-chat';
3-
import { DefaultStreamChatGenerics, StreamMessage } from 'stream-chat-angular';
2+
import { StreamMessage } from 'stream-chat-angular';
43

54
@Component({
65
selector: 'app-message-text',
76
templateUrl: './message-text.component.html',
87
styleUrls: ['./message-text.component.scss'],
98
})
109
export class MessageTextComponent {
11-
@Input() message:
12-
| StreamMessage<DefaultStreamChatGenerics>
13-
| undefined
14-
| MessageResponseBase<DefaultStreamChatGenerics>;
10+
@Input() message: StreamMessage | undefined | StreamMessage['quoted_message'];
1511
@Input() isQuoted: boolean = false;
1612
@Input() shouldTranslate: boolean = false;
1713
isExpanded = false;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { DefaultAttachmentData, DefaultChannelData } from 'stream-chat-angular';
2+
3+
declare module 'stream-chat' {
4+
interface CustomChannelData extends DefaultChannelData {}
5+
6+
interface CustomAttachmentData extends DefaultAttachmentData {}
7+
}

projects/stream-chat-angular/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stream-chat-angular",
3-
"version": "5.14.0",
3+
"version": "6.0.0-rc.8",
44
"description": "Angular components to create chat conversations or livestream style chat",
55
"author": "GetStream",
66
"homepage": "https://getstream.io/chat/",
@@ -20,9 +20,9 @@
2020
"@angular/common": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
2121
"@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
2222
"@breezystack/lamejs": "^1.2.7",
23-
"@ngx-translate/core": "^14.0.0 || ^15.0.0",
23+
"@ngx-translate/core": "^14.0.0 || ^15.0.0 || ^16.0.0",
2424
"rxjs": "^7.4.0",
25-
"stream-chat": "^8.60.0"
25+
"stream-chat": "^9.0.0"
2626
},
2727
"peerDependenciesMeta": {
2828
"@breezystack/lamejs": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '5.14.0';
1+
export const version = '6.0.0-rc.8';

projects/stream-chat-angular/src/lib/attachment-configuration.service.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('AttachmentConfigurationService', () => {
7070
const spy = jasmine.createSpy();
7171
service.customImageAttachmentConfigurationHandler = spy;
7272
const attachment: Attachment = {
73-
img_url: 'http://url/to/img',
73+
image_url: 'http://url/to/img',
7474
thumb_url: 'different/url',
7575
};
7676
const htmlElement = {
@@ -88,7 +88,7 @@ describe('AttachmentConfigurationService', () => {
8888

8989
it('should provide the correct configuration for gallery image attachments', () => {
9090
const attachment: Attachment = {
91-
img_url: 'http://url/to/img',
91+
image_url: 'http://url/to/img',
9292
};
9393
const htmlElement = {
9494
'max-width': '300px',
@@ -112,7 +112,7 @@ describe('AttachmentConfigurationService', () => {
112112

113113
it('should provide the correct configuration for image attachments inside the carousel', () => {
114114
const attachment: Attachment = {
115-
img_url: 'http://url/to/img',
115+
image_url: 'http://url/to/img',
116116
};
117117
const htmlElement = {
118118
'max-width': 'none',
@@ -191,7 +191,7 @@ describe('AttachmentConfigurationService', () => {
191191
const spy = jasmine.createSpy();
192192
service.customVideoAttachmentConfigurationHandler = spy;
193193
const attachment: Attachment = {
194-
img_url: 'http://url/to/video',
194+
image_url: 'http://url/to/video',
195195
thumb_url: 'different/url',
196196
};
197197
const htmlElement = {
@@ -348,7 +348,7 @@ describe('AttachmentConfigurationService', () => {
348348

349349
it('should provide integer values for image resize and make sure that each dimension is at least the size restriction', () => {
350350
const attachment = {
351-
img_url: 'http://url/to/img?ow=3534&oh=4417',
351+
image_url: 'http://url/to/img?ow=3534&oh=4417',
352352
};
353353
const htmlElement = {
354354
'max-width': '300px',

0 commit comments

Comments
 (0)