stream-chat-angular 2.3.0 → 2.3.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/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +28 -17
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/message-input/message-input.component.js +16 -14
- package/esm2015/lib/message-input/textarea.directive.js +12 -2
- package/fesm2015/stream-chat-angular.js +27 -15
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/message-input/message-input.component.d.ts +2 -3
- package/lib/message-input/textarea.directive.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
package/assets/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.3.
|
|
1
|
+
export declare const version = "2.3.1";
|
|
@@ -353,7 +353,7 @@
|
|
|
353
353
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
var version = '2.3.
|
|
356
|
+
var version = '2.3.1';
|
|
357
357
|
|
|
358
358
|
var NotificationService = /** @class */ (function () {
|
|
359
359
|
function NotificationService() {
|
|
@@ -1731,9 +1731,11 @@
|
|
|
1731
1731
|
this.send = new i0.EventEmitter();
|
|
1732
1732
|
this.userMentions = new i0.EventEmitter();
|
|
1733
1733
|
this.subscriptions = [];
|
|
1734
|
+
this.unpropagatedChanges = [];
|
|
1734
1735
|
}
|
|
1735
1736
|
TextareaDirective.prototype.ngOnChanges = function (changes) {
|
|
1736
1737
|
var _this = this;
|
|
1738
|
+
this.unpropagatedChanges.push(changes);
|
|
1737
1739
|
if (!this.componentRef) {
|
|
1738
1740
|
return;
|
|
1739
1741
|
}
|
|
@@ -1745,6 +1747,11 @@
|
|
|
1745
1747
|
if (this.componentRef.instance.userMentions) {
|
|
1746
1748
|
this.subscriptions.push(this.componentRef.instance.userMentions.subscribe(function (value) { return _this.userMentions.next(value); }));
|
|
1747
1749
|
}
|
|
1750
|
+
this.componentRef.instance.areMentionsEnabled = this.areMentionsEnabled;
|
|
1751
|
+
this.componentRef.instance.mentionAutocompleteItemTemplate =
|
|
1752
|
+
this.mentionAutocompleteItemTemplate;
|
|
1753
|
+
this.componentRef.instance.mentionScope = this.mentionScope;
|
|
1754
|
+
this.componentRef.instance.value = this.value;
|
|
1748
1755
|
}
|
|
1749
1756
|
}
|
|
1750
1757
|
if (changes.areMentionsEnabled) {
|
|
@@ -1761,8 +1768,11 @@
|
|
|
1761
1768
|
this.componentRef.instance.value = this.value;
|
|
1762
1769
|
}
|
|
1763
1770
|
// ngOnChanges not called for dynamic components since we don't use template binding
|
|
1771
|
+
var changesToPropagate = {};
|
|
1772
|
+
this.unpropagatedChanges.forEach(function (c) { return (changesToPropagate = Object.assign(Object.assign({}, changesToPropagate), c)); });
|
|
1764
1773
|
// eslint-disable-next-line @angular-eslint/no-lifecycle-call
|
|
1765
|
-
this.componentRef.instance.ngOnChanges(
|
|
1774
|
+
this.componentRef.instance.ngOnChanges(changesToPropagate);
|
|
1775
|
+
this.unpropagatedChanges = [];
|
|
1766
1776
|
};
|
|
1767
1777
|
return TextareaDirective;
|
|
1768
1778
|
}());
|
|
@@ -1868,24 +1878,13 @@
|
|
|
1868
1878
|
this.textareaValue = '';
|
|
1869
1879
|
this.mentionedUsers = [];
|
|
1870
1880
|
this.subscriptions = [];
|
|
1881
|
+
this.isViewInited = false;
|
|
1871
1882
|
this.subscriptions.push(this.attachmentService.attachmentUploadInProgressCounter$.subscribe(function (counter) {
|
|
1872
1883
|
if (counter === 0 && _this.hideNotification) {
|
|
1873
1884
|
_this.hideNotification();
|
|
1874
1885
|
_this.hideNotification = undefined;
|
|
1875
1886
|
}
|
|
1876
1887
|
}));
|
|
1877
|
-
this.attachmentUploads$ = this.attachmentService.attachmentUploads$;
|
|
1878
|
-
this.isFileUploadEnabled = this.configService.isFileUploadEnabled;
|
|
1879
|
-
this.acceptedFileTypes = this.configService.acceptedFileTypes;
|
|
1880
|
-
this.isMultipleFileUploadEnabled =
|
|
1881
|
-
this.configService.isMultipleFileUploadEnabled;
|
|
1882
|
-
this.areMentionsEnabled = this.configService.areMentionsEnabled;
|
|
1883
|
-
this.mentionAutocompleteItemTemplate =
|
|
1884
|
-
this.configService.mentionAutocompleteItemTemplate;
|
|
1885
|
-
this.mentionScope = this.configService.mentionScope;
|
|
1886
|
-
}
|
|
1887
|
-
MessageInputComponent.prototype.ngOnInit = function () {
|
|
1888
|
-
var _this = this;
|
|
1889
1888
|
this.subscriptions.push(this.channelService.activeChannel$.subscribe(function (channel) {
|
|
1890
1889
|
var _a;
|
|
1891
1890
|
_this.textareaValue = '';
|
|
@@ -1896,12 +1895,24 @@
|
|
|
1896
1895
|
capabilities.indexOf('upload-file') !== -1;
|
|
1897
1896
|
_this.canSendLinks = capabilities.indexOf('send-links') !== -1;
|
|
1898
1897
|
_this.canSendMessages = capabilities.indexOf('send-message') !== -1;
|
|
1899
|
-
_this.
|
|
1900
|
-
|
|
1898
|
+
if (_this.isViewInited) {
|
|
1899
|
+
_this.cdRef.detectChanges();
|
|
1900
|
+
_this.initTextarea();
|
|
1901
|
+
}
|
|
1901
1902
|
}
|
|
1902
1903
|
}));
|
|
1903
|
-
|
|
1904
|
+
this.attachmentUploads$ = this.attachmentService.attachmentUploads$;
|
|
1905
|
+
this.isFileUploadEnabled = this.configService.isFileUploadEnabled;
|
|
1906
|
+
this.acceptedFileTypes = this.configService.acceptedFileTypes;
|
|
1907
|
+
this.isMultipleFileUploadEnabled =
|
|
1908
|
+
this.configService.isMultipleFileUploadEnabled;
|
|
1909
|
+
this.areMentionsEnabled = this.configService.areMentionsEnabled;
|
|
1910
|
+
this.mentionAutocompleteItemTemplate =
|
|
1911
|
+
this.configService.mentionAutocompleteItemTemplate;
|
|
1912
|
+
this.mentionScope = this.configService.mentionScope;
|
|
1913
|
+
}
|
|
1904
1914
|
MessageInputComponent.prototype.ngAfterViewInit = function () {
|
|
1915
|
+
this.isViewInited = true;
|
|
1905
1916
|
this.initTextarea();
|
|
1906
1917
|
};
|
|
1907
1918
|
MessageInputComponent.prototype.ngOnChanges = function (changes) {
|