stream-chat-angular 6.1.0-next.2 → 6.2.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/assets/version.d.ts +1 -1
- package/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/stream-i18n.service.mjs +15 -6
- package/fesm2015/stream-chat-angular.mjs +16 -6
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +15 -6
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/lib/stream-i18n.service.d.ts +2 -2
- package/package.json +3 -3
- package/src/assets/version.ts +1 -1
package/README.md
CHANGED
|
@@ -51,30 +51,37 @@ Check out our current openings and apply via [Stream's website](https://getstrea
|
|
|
51
51
|
|
|
52
52
|
### Install with NPM
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Supported Angular versions: **Angular 15-20**
|
|
55
|
+
|
|
56
|
+
Run this command if you are using **Angular 20**:
|
|
55
57
|
|
|
56
58
|
```shell
|
|
57
|
-
|
|
59
|
+
# Not all dependencies support Anglar 20 yet, so --force is required
|
|
60
|
+
npm install stream-chat-angular stream-chat @ngx-translate/core@16 ngx-float-ui@19 --force
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
Run this command if you are using **Angular 19**:
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
npm install stream-chat-angular stream-chat @ngx-translate/core@16 ngx-float-ui@19
|
|
67
|
+
```
|
|
61
68
|
|
|
62
69
|
Run this command if you are using **Angular 18**:
|
|
63
70
|
|
|
64
71
|
```shell
|
|
65
|
-
npm install stream-chat-angular stream-chat ngx-float-ui@18
|
|
72
|
+
npm install stream-chat-angular stream-chat @ngx-translate/core@16 ngx-float-ui@18
|
|
66
73
|
```
|
|
67
74
|
|
|
68
75
|
Run this command if you are using **Angular 17**:
|
|
69
76
|
|
|
70
77
|
```shell
|
|
71
|
-
npm install stream-chat-angular stream-chat ngx-float-ui@17
|
|
78
|
+
npm install stream-chat-angular stream-chat @ngx-translate/core@16 ngx-float-ui@17
|
|
72
79
|
```
|
|
73
80
|
|
|
74
81
|
Run this command if you are using **Angular 16**:
|
|
75
82
|
|
|
76
83
|
```shell
|
|
77
|
-
npm install stream-chat-angular stream-chat ngx-float-ui@16
|
|
84
|
+
npm install stream-chat-angular stream-chat @ngx-translate/core@16 ngx-float-ui@16
|
|
78
85
|
```
|
|
79
86
|
|
|
80
87
|
Run this command if you are using **Angular 15**:
|
|
@@ -85,8 +92,6 @@ npm install stream-chat-angular stream-chat @ngx-translate/core@14 ngx-float-ui@
|
|
|
85
92
|
|
|
86
93
|
Supported node verisons: 18+
|
|
87
94
|
|
|
88
|
-
```
|
|
89
|
-
|
|
90
95
|
## Sample App
|
|
91
96
|
|
|
92
97
|
This repository includes a sample app to test our library.
|
|
@@ -126,4 +131,7 @@ Run `npm start:customizations-example` and navigate to `http://localhost:4200/`.
|
|
|
126
131
|
## Local development
|
|
127
132
|
|
|
128
133
|
Run `npm install` in the root of the project. You can use the `npm run start:dev` command to start the SampleApp with automatic reloading.
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
|
|
129
137
|
```
|
package/assets/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "6.
|
|
1
|
+
export declare const version = "6.2.0-next.1";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = '6.
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export const version = '6.2.0-next.1';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3N0cmVhbS1jaGF0LWFuZ3VsYXIvc3JjL2Fzc2V0cy92ZXJzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBRyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgdmVyc2lvbiA9ICc2LjIuMC1uZXh0LjEnO1xuIl19
|
|
@@ -6,8 +6,8 @@ import * as i1 from "@ngx-translate/core";
|
|
|
6
6
|
* The `StreamI18nService` can be used to customize the labels of the chat UI. Our [translation guide](/chat/docs/sdk/angular/concepts/translation/) covers this topic in detail.
|
|
7
7
|
*/
|
|
8
8
|
export class StreamI18nService {
|
|
9
|
-
constructor(
|
|
10
|
-
this.
|
|
9
|
+
constructor(translateService) {
|
|
10
|
+
this.translateService = translateService;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Registers the translation to the [ngx-translate](https://github.com/ngx-translate/core) TranslateService.
|
|
@@ -15,10 +15,19 @@ export class StreamI18nService {
|
|
|
15
15
|
* @param overrides An object which keys are translation keys, and the values are custom translations
|
|
16
16
|
*/
|
|
17
17
|
setTranslation(lang = 'en', overrides) {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const translateService = this.translateService;
|
|
19
|
+
const defaultLang = 'getFallbackLang' in translateService
|
|
20
|
+
? translateService.getFallbackLang?.()
|
|
21
|
+
: translateService.defaultLang;
|
|
22
|
+
if (!defaultLang) {
|
|
23
|
+
if (typeof translateService.setDefaultLang !== 'undefined') {
|
|
24
|
+
translateService.setDefaultLang(lang);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
translateService.defaultLang = lang;
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
|
-
this.
|
|
30
|
+
this.translateService.setTranslation(lang, { streamChat: { ...en.streamChat, ...overrides } }, true);
|
|
22
31
|
}
|
|
23
32
|
}
|
|
24
33
|
StreamI18nService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: StreamI18nService, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -29,4 +38,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
29
38
|
providedIn: 'root',
|
|
30
39
|
}]
|
|
31
40
|
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; } });
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyZWFtLWkxOG4uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3N0cmVhbS1jaGF0LWFuZ3VsYXIvc3JjL2xpYi9zdHJlYW0taTE4bi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLG1CQUFtQixDQUFDOzs7QUFFdkM7O0dBRUc7QUFJSCxNQUFNLE9BQU8saUJBQWlCO0lBQzVCLFlBQW9CLGdCQUFrQztRQUFsQyxxQkFBZ0IsR0FBaEIsZ0JBQWdCLENBQWtCO0lBQUcsQ0FBQztJQUUxRDs7OztPQUlHO0lBQ0gsY0FBYyxDQUFDLElBQUksR0FBRyxJQUFJLEVBQUUsU0FBcUM7UUFDL0QsTUFBTSxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsZ0JBRzdCLENBQUM7UUFFRixNQUFNLFdBQVcsR0FDZixpQkFBaUIsSUFBSSxnQkFBZ0I7WUFDbkMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLGVBQWUsRUFBRSxFQUFFO1lBQ3RDLENBQUMsQ0FBQyxnQkFBZ0IsQ0FBQyxXQUFXLENBQUM7UUFDbkMsSUFBSSxDQUFDLFdBQVcsRUFBRTtZQUNoQixJQUFJLE9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mICghZGVmYXVsdExhbmcpIHtcbiAgICAgIGlmICh0eXBlb2YgdHJhbnNsYXRlU2VydmljZS5zZXREZWZhdWx0TGFuZyAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgdHJhbnNsYXRlU2VydmljZS5zZXREZWZhdWx0TGFuZyhsYW5nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHRyYW5zbGF0ZVNlcnZpY2UuZGVmYXVsdExhbmcgPSBsYW5nO1xuICAgICAgfVxuICAgIH1cbiAgICB0aGlzLnRyYW5zbGF0ZVNlcnZpY2Uuc2V0VHJhbnNsYXRpb24oXG4gICAgICBsYW5nLFxuICAgICAgeyBzdHJlYW1DaGF0OiB7IC4uLmVuLnN0cmVhbUNoYXQsIC4uLm92ZXJyaWRlcyB9IH0sXG4gICAgICB0cnVlXG4gICAgKTtcbiAgfVxufVxuIl19
|
|
@@ -21,7 +21,7 @@ import transliterate from '@stream-io/transliterate';
|
|
|
21
21
|
import * as i8$1 from 'angular-mentions';
|
|
22
22
|
import { MentionModule } from 'angular-mentions';
|
|
23
23
|
|
|
24
|
-
const version = '6.
|
|
24
|
+
const version = '6.2.0-next.1';
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) component displays the currently active notifications.
|
|
@@ -2908,8 +2908,8 @@ const en = {
|
|
|
2908
2908
|
* The `StreamI18nService` can be used to customize the labels of the chat UI. Our [translation guide](/chat/docs/sdk/angular/concepts/translation/) covers this topic in detail.
|
|
2909
2909
|
*/
|
|
2910
2910
|
class StreamI18nService {
|
|
2911
|
-
constructor(
|
|
2912
|
-
this.
|
|
2911
|
+
constructor(translateService) {
|
|
2912
|
+
this.translateService = translateService;
|
|
2913
2913
|
}
|
|
2914
2914
|
/**
|
|
2915
2915
|
* Registers the translation to the [ngx-translate](https://github.com/ngx-translate/core) TranslateService.
|
|
@@ -2917,10 +2917,20 @@ class StreamI18nService {
|
|
|
2917
2917
|
* @param overrides An object which keys are translation keys, and the values are custom translations
|
|
2918
2918
|
*/
|
|
2919
2919
|
setTranslation(lang = 'en', overrides) {
|
|
2920
|
-
|
|
2921
|
-
|
|
2920
|
+
var _a;
|
|
2921
|
+
const translateService = this.translateService;
|
|
2922
|
+
const defaultLang = 'getFallbackLang' in translateService
|
|
2923
|
+
? (_a = translateService.getFallbackLang) === null || _a === void 0 ? void 0 : _a.call(translateService)
|
|
2924
|
+
: translateService.defaultLang;
|
|
2925
|
+
if (!defaultLang) {
|
|
2926
|
+
if (typeof translateService.setDefaultLang !== 'undefined') {
|
|
2927
|
+
translateService.setDefaultLang(lang);
|
|
2928
|
+
}
|
|
2929
|
+
else {
|
|
2930
|
+
translateService.defaultLang = lang;
|
|
2931
|
+
}
|
|
2922
2932
|
}
|
|
2923
|
-
this.
|
|
2933
|
+
this.translateService.setTranslation(lang, { streamChat: Object.assign(Object.assign({}, en.streamChat), overrides) }, true);
|
|
2924
2934
|
}
|
|
2925
2935
|
}
|
|
2926
2936
|
StreamI18nService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: StreamI18nService, deps: [{ token: i6.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|