Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
699 changes: 587 additions & 112 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "stream-chat-angular",
"version": "0.0.0",
"watch": {
"remove-stream-chat-augmentation": "dist/stream-chat-angular/stream-chat.d.ts.map"
},
"scripts": {
"prepare": "husky install",
"postinstall": "npm run config:dev & npm run copy-css",
Expand All @@ -14,8 +17,14 @@
"prestart:dev:customizations-example": "npm run config:dev",
"start:dev:customizations-example": "rm -rf dist & npm run watch & (wait-on dist && ng serve customizations-example --host 0.0.0.0)",
"build": "ng build stream-chat-angular",
"postbuild": "npm run remove-stream-chat-augmentation",
"delete-stream-chat-declaration": "rm -f dist/stream-chat-angular/stream-chat.d.ts",
"delete-stream-chat-declaration-map": "rm -f dist/stream-chat-angular/stream-chat.d.ts.map",
"remove-stream-chat-reference": "replace '/// <reference path=\"stream-chat.d.ts\" />' '' dist/stream-chat-angular/public-api.d.ts",
"remove-stream-chat-augmentation": "npm run delete-stream-chat-declaration && npm run delete-stream-chat-declaration-map && npm run remove-stream-chat-reference",
"build:prod": "npm run copy-css && ng build stream-chat-angular --configuration production",
"watch": "ng build stream-chat-angular --watch --configuration development",
"postbuild:prod": "npm run remove-stream-chat-augmentation",
"watch": "ng build stream-chat-angular --watch --configuration development & npm-watch",
"test": "rm -rf dist & npm run watch & (wait-on dist && ng run stream-chat-angular:test)",
"test:ci": "ng run stream-chat-angular:test --browsers ChromeHeadlessCustom --watch false",
"lint": "ng lint",
Expand Down Expand Up @@ -115,10 +124,12 @@
"emoji-regex": "^10.3.0",
"fix-webm-duration": "^1.0.6",
"ngx-float-ui": "^15.0.0",
"npm-watch": "^0.13.0",
"pretty-bytes": "^6.1.1",
"replace": "^1.2.2",
"rxjs": "~7.4.0",
"starwars-names": "^1.6.0",
"stream-chat": "9.0.0-rc.5",
"stream-chat": "9.0.0-rc.6",
"ts-node": "^10.9.2",
"tslib": "^2.3.0",
"uuid": "^9.0.1",
Expand Down
2 changes: 1 addition & 1 deletion projects/customizations-example/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
let-latestMessageText="latestMessageText"
let-latestMessage="latestMessage"
>
<div>Channel title: {{ channel.title }}</div>
<div>Channel title: {{ channel.name }}</div>
<div>Display title: {{ channelDisplayTitle }}</div>
<div>Unread count: {{ unreadCount }}</div>
<div>Latest message text: {{ latestMessageText }}</div>
Expand Down
7 changes: 7 additions & 0 deletions projects/customizations-example/src/app/stream-chat.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { DefaultAttachmentData, DefaultChannelData } from 'stream-chat-angular';

declare module 'stream-chat' {
interface CustomChannelData extends DefaultChannelData {}

interface CustomAttachmentData extends DefaultAttachmentData {}
}
2 changes: 1 addition & 1 deletion projects/stream-chat-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@breezystack/lamejs": "^1.2.7",
"@ngx-translate/core": "^14.0.0 || ^15.0.0 || ^16.0.0",
"rxjs": "^7.4.0",
"stream-chat": "9.0.0-rc.5"
"stream-chat": "9.0.0-rc.6"
},
"peerDependenciesMeta": {
"@breezystack/lamejs": {
Expand Down
17 changes: 17 additions & 0 deletions projects/stream-chat-angular/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,3 +470,20 @@ export type GalleryAttachment = {
type: 'gallery';
images: Attachment[];
};

export interface DefaultChannelData {
image?: string;
}

export interface DefaultAttachmentData {
/**
* @deprecated Please use `image_url` instead
*/
img_url?: string;
/**
* Will be `true` if an attachment was added using `attachmentService.addAttachment`
*
* This is a non-standard property, other SDKs will ignore this property
*/
isCustomAttachment?: boolean;
}
23 changes: 2 additions & 21 deletions projects/stream-chat-angular/src/public-api.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
declare module 'stream-chat' {
interface CustomUserData {
image?: string;
}
interface CustomAttachmentData {
/**
* @deprecated Please use `image_url` instead
*/
img_url?: string;
/**
* Will be `true` if an attachment was added using `attachmentService.addAttachment`
*
* This is a non-standard property, other SDKs will ignore this property
*/
isCustomAttachment?: boolean;
}

interface CustomChannelData {
image?: string;
}
}
/*
* Public API Surface of stream-chat-angular
*/
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="stream-chat.ts" />
export * from './lib/chat-client.service';
export * from './lib/channel.service';
export * from './lib/theme.service';
Expand Down
8 changes: 8 additions & 0 deletions projects/stream-chat-angular/src/stream-chat.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import 'stream-chat';
import { DefaultChannelData, DefaultAttachmentData } from './lib/types';

declare module 'stream-chat' {
interface CustomAttachmentData extends DefaultAttachmentData {}

interface CustomChannelData extends DefaultChannelData {}
}
3 changes: 2 additions & 1 deletion projects/stream-chat-angular/src/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="stream-chat.ts" />
import 'zone.js';
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
Expand Down
2 changes: 1 addition & 1 deletion projects/stream-chat-angular/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"outDir": "../../out-tsc/spec",
"types": ["jasmine"]
},
"files": ["src/test.ts", "src/public-api.ts"],
"files": ["src/test.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}