stream-chat-angular 4.68.3 → 4.68.5
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 +17 -14
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +4 -9
- package/esm2015/lib/message-input/autocomplete-textarea/autocomplete-textarea.component.js +9 -1
- package/fesm2015/stream-chat-angular.js +12 -9
- package/fesm2015/stream-chat-angular.js.map +1 -1
- 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 = "4.68.
|
|
1
|
+
export declare const version = "4.68.5";
|
|
@@ -356,7 +356,7 @@
|
|
|
356
356
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
var version = '4.68.
|
|
359
|
+
var version = '4.68.5';
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
362
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -907,11 +907,10 @@
|
|
|
907
907
|
this.areReadEventsPaused = false;
|
|
908
908
|
var readState = channel.state.read[((_a = this.chatClientService.chatClient.user) === null || _a === void 0 ? void 0 : _a.id) || ''];
|
|
909
909
|
this.activeChannelLastReadMessageId = readState === null || readState === void 0 ? void 0 : readState.last_read_message_id;
|
|
910
|
-
|
|
911
|
-
if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId ||
|
|
912
|
-
this.activeChannelUnreadCount === 0) {
|
|
910
|
+
if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId) {
|
|
913
911
|
this.activeChannelLastReadMessageId = undefined;
|
|
914
912
|
}
|
|
913
|
+
this.activeChannelUnreadCount = (readState === null || readState === void 0 ? void 0 : readState.unread_messages) || 0;
|
|
915
914
|
this.watchForActiveChannelEvents(channel);
|
|
916
915
|
this.addChannel(channel);
|
|
917
916
|
this.activeChannelSubject.next(channel);
|
|
@@ -1880,9 +1879,6 @@
|
|
|
1880
1879
|
_this.ngZone.run(function () {
|
|
1881
1880
|
_this.activeChannelLastReadMessageId = e.last_read_message_id;
|
|
1882
1881
|
_this.activeChannelUnreadCount = e.unread_messages;
|
|
1883
|
-
if (_this.activeChannelUnreadCount === 0) {
|
|
1884
|
-
_this.activeChannelLastReadMessageId = undefined;
|
|
1885
|
-
}
|
|
1886
1882
|
_this.activeChannelSubject.next(_this.activeChannel);
|
|
1887
1883
|
});
|
|
1888
1884
|
}));
|
|
@@ -2480,8 +2476,7 @@
|
|
|
2480
2476
|
if (isThrottled === void 0) { isThrottled = true; }
|
|
2481
2477
|
if (this.canSendReadEvents &&
|
|
2482
2478
|
this.shouldMarkActiveChannelAsRead &&
|
|
2483
|
-
!this.areReadEventsPaused
|
|
2484
|
-
channel.countUnread() > 0) {
|
|
2479
|
+
!this.areReadEventsPaused) {
|
|
2485
2480
|
if (isThrottled) {
|
|
2486
2481
|
this.markReadThrottled(channel);
|
|
2487
2482
|
}
|
|
@@ -7204,8 +7199,8 @@
|
|
|
7204
7199
|
var _a;
|
|
7205
7200
|
var commands = ((_a = channel === null || channel === void 0 ? void 0 : channel.getConfig()) === null || _a === void 0 ? void 0 : _a.commands) || [];
|
|
7206
7201
|
_this.slashCommandConfig.items = commands.map(function (c) {
|
|
7207
|
-
var
|
|
7208
|
-
return (Object.assign(Object.assign({}, c), (
|
|
7202
|
+
var _d;
|
|
7203
|
+
return (Object.assign(Object.assign({}, c), (_d = {}, _d[_this.autocompleteKey] = c.name, _d.type = 'command', _d)));
|
|
7209
7204
|
});
|
|
7210
7205
|
_this.mentionedUsers = [];
|
|
7211
7206
|
_this.userMentions.next(__spreadArray([], __read(_this.mentionedUsers)));
|
|
@@ -7230,6 +7225,7 @@
|
|
|
7230
7225
|
this.themeVersion = this.themeService.themeVersion;
|
|
7231
7226
|
}
|
|
7232
7227
|
AutocompleteTextareaComponent.prototype.ngOnChanges = function (changes) {
|
|
7228
|
+
var _a, _b, _c;
|
|
7233
7229
|
if (changes.areMentionsEnabled) {
|
|
7234
7230
|
if (this.areMentionsEnabled) {
|
|
7235
7231
|
this.autocompleteConfig.mentions = [
|
|
@@ -7248,10 +7244,13 @@
|
|
|
7248
7244
|
}
|
|
7249
7245
|
if (changes.value && !this.value && this.messageInput) {
|
|
7250
7246
|
this.messageInput.nativeElement.style.height = 'auto';
|
|
7247
|
+
(_c = (_b = (_a = this.chatClientService) === null || _a === void 0 ? void 0 : _a.chatClient) === null || _b === void 0 ? void 0 : _b.logger) === null || _c === void 0 ? void 0 : _c.call(_b, 'info', '[Autocomplete textarea] Value reset, adjusting textarea height to auto');
|
|
7251
7248
|
this.updateMentionedUsersFromText();
|
|
7252
7249
|
}
|
|
7253
7250
|
};
|
|
7254
7251
|
AutocompleteTextareaComponent.prototype.ngAfterViewInit = function () {
|
|
7252
|
+
var _a, _b, _c;
|
|
7253
|
+
(_c = (_b = (_a = this.chatClientService) === null || _a === void 0 ? void 0 : _a.chatClient) === null || _b === void 0 ? void 0 : _b.logger) === null || _c === void 0 ? void 0 : _c.call(_b, 'info', '[Autocomplete textarea] View inited');
|
|
7255
7254
|
if (this.messageInput.nativeElement.scrollHeight > 0) {
|
|
7256
7255
|
this.adjustTextareaHeight();
|
|
7257
7256
|
}
|
|
@@ -7277,6 +7276,8 @@
|
|
|
7277
7276
|
}
|
|
7278
7277
|
};
|
|
7279
7278
|
AutocompleteTextareaComponent.prototype.inputChanged = function () {
|
|
7279
|
+
var _a, _b, _c;
|
|
7280
|
+
(_c = (_b = (_a = this.chatClientService) === null || _a === void 0 ? void 0 : _a.chatClient) === null || _b === void 0 ? void 0 : _b.logger) === null || _c === void 0 ? void 0 : _c.call(_b, 'info', '[Autocomplete textarea] Input changed');
|
|
7280
7281
|
this.valueChange.emit(this.messageInput.nativeElement.value);
|
|
7281
7282
|
this.adjustTextareaHeight();
|
|
7282
7283
|
};
|
|
@@ -7291,7 +7292,9 @@
|
|
|
7291
7292
|
}
|
|
7292
7293
|
};
|
|
7293
7294
|
AutocompleteTextareaComponent.prototype.adjustTextareaHeight = function () {
|
|
7295
|
+
var _a, _b, _c;
|
|
7294
7296
|
if (this.themeVersion === '2') {
|
|
7297
|
+
(_c = (_b = (_a = this.chatClientService) === null || _a === void 0 ? void 0 : _a.chatClient) === null || _b === void 0 ? void 0 : _b.logger) === null || _c === void 0 ? void 0 : _c.call(_b, 'info', "[Autocomplete textarea] Textarea height set from " + this.messageInput.nativeElement.style.height + " to " + this.messageInput.nativeElement.scrollHeight + "px");
|
|
7295
7298
|
this.messageInput.nativeElement.style.height = '';
|
|
7296
7299
|
this.messageInput.nativeElement.style.height = this.messageInput.nativeElement.scrollHeight + "px";
|
|
7297
7300
|
}
|
|
@@ -7308,8 +7311,8 @@
|
|
|
7308
7311
|
return __awaiter(this, void 0, void 0, function () {
|
|
7309
7312
|
var request, result, items;
|
|
7310
7313
|
var _this = this;
|
|
7311
|
-
return __generator(this, function (
|
|
7312
|
-
switch (
|
|
7314
|
+
return __generator(this, function (_d) {
|
|
7315
|
+
switch (_d.label) {
|
|
7313
7316
|
case 0:
|
|
7314
7317
|
if (!this.areMentionsEnabled) {
|
|
7315
7318
|
return [2 /*return*/];
|
|
@@ -7320,7 +7323,7 @@
|
|
|
7320
7323
|
: function (s) { return _this.channelService.autocompleteMembers(s); };
|
|
7321
7324
|
return [4 /*yield*/, request(searchTerm || '')];
|
|
7322
7325
|
case 1:
|
|
7323
|
-
result =
|
|
7326
|
+
result = _d.sent();
|
|
7324
7327
|
items = this.filter(searchTerm || '', result.map(function (i) {
|
|
7325
7328
|
var user = (i.user ? i.user : i);
|
|
7326
7329
|
return Object.assign(Object.assign({}, i), { autocompleteLabel: user.name || user.id, type: 'mention' });
|