stream-chat-angular 4.3.0 → 4.4.0
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 +10 -4
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-configuration.service.js +9 -4
- package/fesm2015/stream-chat-angular.js +9 -4
- 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.
|
|
1
|
+
export declare const version = "4.4.0";
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
var version = '4.
|
|
358
|
+
var version = '4.4.0';
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -2363,7 +2363,8 @@
|
|
|
2363
2363
|
attachment.thumb_url ||
|
|
2364
2364
|
attachment.image_url ||
|
|
2365
2365
|
''));
|
|
2366
|
-
var
|
|
2366
|
+
var displayWarning = location === 'gallery' || location === 'single';
|
|
2367
|
+
var _b = this.getSizingRestrictions(url, element, displayWarning), sizeRestriction = _b.sizeRestriction, height = _b.height;
|
|
2367
2368
|
if (sizeRestriction) {
|
|
2368
2369
|
// Apply 2x for retina displays
|
|
2369
2370
|
sizeRestriction.height *= 2;
|
|
@@ -2389,7 +2390,8 @@
|
|
|
2389
2390
|
var thumbUrl = undefined;
|
|
2390
2391
|
if (attachment.thumb_url && this.shouldGenerateVideoThumbnail) {
|
|
2391
2392
|
var url = new URL(attachment.thumb_url);
|
|
2392
|
-
var
|
|
2393
|
+
var displayWarning = true;
|
|
2394
|
+
var _b = this.getSizingRestrictions(url, element, displayWarning), sizeRestriction = _b.sizeRestriction, height = _b.height;
|
|
2393
2395
|
if (sizeRestriction) {
|
|
2394
2396
|
sizeRestriction.height *= 2;
|
|
2395
2397
|
sizeRestriction.width *= 2;
|
|
@@ -2443,7 +2445,8 @@
|
|
|
2443
2445
|
url.searchParams.set('h', sizeRestriction.height.toString());
|
|
2444
2446
|
url.searchParams.set('w', sizeRestriction.width.toString());
|
|
2445
2447
|
};
|
|
2446
|
-
AttachmentConfigurationService.prototype.getSizingRestrictions = function (url, htmlElement) {
|
|
2448
|
+
AttachmentConfigurationService.prototype.getSizingRestrictions = function (url, htmlElement, displayWarning) {
|
|
2449
|
+
if (displayWarning === void 0) { displayWarning = false; }
|
|
2447
2450
|
var urlParams = url.searchParams;
|
|
2448
2451
|
var originalHeight = Number(urlParams.get('oh')) || 1;
|
|
2449
2452
|
var originalWidth = Number(urlParams.get('ow')) || 1;
|
|
@@ -2466,6 +2469,9 @@
|
|
|
2466
2469
|
}
|
|
2467
2470
|
else {
|
|
2468
2471
|
sizeRestriction = undefined;
|
|
2472
|
+
if (displayWarning) {
|
|
2473
|
+
console.warn("Invalid value set for height/max-height and/or max-width for HTML element, this can cause scrolling issues inside the message list, more info https://getstream.io/chat/docs/sdk/angular/components/AttachmentListComponent/#image-and-video-sizing");
|
|
2474
|
+
}
|
|
2469
2475
|
}
|
|
2470
2476
|
return { sizeRestriction: sizeRestriction, height: height };
|
|
2471
2477
|
};
|