stream-chat-angular 4.6.0 → 4.8.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 +27 -24
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-configuration.service.js +26 -23
- package/esm2015/lib/attachment-list/attachment-list.component.js +2 -2
- package/esm2015/lib/types.js +1 -1
- package/fesm2015/stream-chat-angular.js +27 -24
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-configuration.service.d.ts +3 -3
- package/lib/attachment-list/attachment-list.component.d.ts +3 -3
- package/lib/types.d.ts +5 -1
- package/package.json +1 -1
- package/src/assets/styles/css/index.css +1 -1
- package/src/assets/styles/css/index.css.map +1 -1
- package/src/assets/styles/scss/Attachment.scss +45 -20
- package/src/assets/styles/scss/Audio.scss +1 -0
- package/src/assets/styles/scss/ChannelList.scss +14 -0
- package/src/assets/styles/scss/ChannelSearch.scss +8 -8
- package/src/assets/styles/scss/Message.scss +26 -41
- package/src/assets/styles/scss/MessageCommerce.scss +1 -1
- package/src/assets/styles/scss/Thread.scss +39 -2
- package/src/assets/styles/scss/VirtualMessage.scss +2 -6
- package/src/assets/styles/v2/css/index.css +1 -1
- package/src/assets/styles/v2/css/index.css.map +1 -1
- package/src/assets/styles/v2/css/index.layout.css +1 -1
- package/src/assets/styles/v2/css/index.layout.css.map +1 -1
- package/src/assets/styles/v2/scss/AttachmentList/AttachmentList-layout.scss +18 -13
- package/src/assets/styles/v2/scss/ChannelList/ChannelList-layout.scss +14 -0
- package/src/assets/styles/v2/scss/ChannelSearch/ChannelSearch-layout.scss +68 -51
- package/src/assets/styles/v2/scss/ChannelSearch/ChannelSearch-theme.scss +48 -0
- package/src/assets/styles/v2/scss/MessageList/MessageList-layout.scss +1 -4
- package/src/assets/styles/v2/scss/MessageList/VirtualizedMessageList-layout.scss +21 -0
- package/src/assets/styles/v2/scss/MessageList/VirtualizedMessageList-theme.scss +9 -0
- package/src/assets/styles/v2/scss/Notification/NotificationList-theme.scss +2 -2
- package/src/assets/styles/v2/scss/Tooltip/Tooltip-layout.scss +1 -1
- package/src/assets/styles/v2/scss/_utils.scss +8 -0
- package/src/assets/version.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attachment } from 'stream-chat';
|
|
2
|
-
import { AttachmentConfigration, DefaultStreamChatGenerics, VideoAttachmentConfiguration } from './types';
|
|
2
|
+
import { AttachmentConfigration, DefaultStreamChatGenerics, ImageAttachmentConfiguration, VideoAttachmentConfiguration } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* The `AttachmentConfigurationService` provides customization for certain attributes of attachments displayed inside the message component. If you're using your own CDN, you can integrate resizing features of it by providing your own handlers.
|
|
@@ -8,7 +8,7 @@ export declare class AttachmentConfigurationService<T extends DefaultStreamChatG
|
|
|
8
8
|
/**
|
|
9
9
|
* A custom handler can be provided to override the default image attachment (images uploaded from files) configuration. By default the SDK uses fixed image height (a size that's known before image is loaded), if you override that with dynamic image height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
10
10
|
*/
|
|
11
|
-
customImageAttachmentConfigurationHandler?: (a: Attachment<T>, type: 'gallery' | 'single' | 'carousel', containerElement: HTMLElement) =>
|
|
11
|
+
customImageAttachmentConfigurationHandler?: (a: Attachment<T>, type: 'gallery' | 'single' | 'carousel', containerElement: HTMLElement) => ImageAttachmentConfiguration;
|
|
12
12
|
/**
|
|
13
13
|
* A custom handler can be provided to override the default video attachment (videos uploaded from files) configuration. By default the SDK uses fixed height (a size that's known before video is loaded), if you override that with dynamic height (for example: height: 100%) the scrolling logic inside the message list can break.
|
|
14
14
|
*/
|
|
@@ -31,7 +31,7 @@ export declare class AttachmentConfigurationService<T extends DefaultStreamChatG
|
|
|
31
31
|
* @param location Specifies where the image is being displayed
|
|
32
32
|
* @param element The default resizing logics reads the height/max-height and max-width propperties of this element and reduces file size based on the given values. File size reduction is done by Stream's CDN.
|
|
33
33
|
*/
|
|
34
|
-
getImageAttachmentConfiguration(attachment: Attachment<T>, location: 'gallery' | 'single' | 'carousel', element: HTMLElement):
|
|
34
|
+
getImageAttachmentConfiguration(attachment: Attachment<T>, location: 'gallery' | 'single' | 'carousel', element: HTMLElement): ImageAttachmentConfiguration;
|
|
35
35
|
/**
|
|
36
36
|
* Handles the configuration for video attachments, it's possible to provide your own function to override the default logic
|
|
37
37
|
* @param attachment The attachment to configure
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { Action, Attachment } from 'stream-chat';
|
|
3
|
-
import { ModalContext, DefaultStreamChatGenerics, AttachmentConfigration, VideoAttachmentConfiguration } from '../types';
|
|
3
|
+
import { ModalContext, DefaultStreamChatGenerics, AttachmentConfigration, VideoAttachmentConfiguration, ImageAttachmentConfiguration } from '../types';
|
|
4
4
|
import { ChannelService } from '../channel.service';
|
|
5
5
|
import { CustomTemplatesService } from '../custom-templates.service';
|
|
6
6
|
import { AttachmentConfigurationService } from '../attachment-configuration.service';
|
|
@@ -50,8 +50,8 @@ export declare class AttachmentListComponent implements OnChanges {
|
|
|
50
50
|
openImageModal(attachments: Attachment[], selectedIndex?: number): void;
|
|
51
51
|
stepImages(dir: -1 | 1): void;
|
|
52
52
|
trackByImageUrl(_: number, item: Attachment): unknown;
|
|
53
|
-
getImageAttachmentConfiguration(attachment: Attachment, type: 'gallery' | 'single', element: HTMLElement):
|
|
54
|
-
getCarouselImageAttachmentConfiguration(attachment: Attachment, element: HTMLElement):
|
|
53
|
+
getImageAttachmentConfiguration(attachment: Attachment, type: 'gallery' | 'single', element: HTMLElement): ImageAttachmentConfiguration;
|
|
54
|
+
getCarouselImageAttachmentConfiguration(attachment: Attachment, element: HTMLElement): ImageAttachmentConfiguration;
|
|
55
55
|
getVideoAttachmentConfiguration(attachment: Attachment, element: HTMLElement): VideoAttachmentConfiguration;
|
|
56
56
|
getCardAttachmentConfiguration(attachment: Attachment): AttachmentConfigration;
|
|
57
57
|
get isImageModalPrevButtonVisible(): boolean;
|
package/lib/types.d.ts
CHANGED
|
@@ -188,6 +188,10 @@ export declare type AttachmentConfigration = {
|
|
|
188
188
|
height: string;
|
|
189
189
|
width: string;
|
|
190
190
|
};
|
|
191
|
-
export declare type
|
|
191
|
+
export declare type ImageAttachmentConfiguration = AttachmentConfigration & {
|
|
192
|
+
originalHeight: number;
|
|
193
|
+
originalWidth: number;
|
|
194
|
+
};
|
|
195
|
+
export declare type VideoAttachmentConfiguration = ImageAttachmentConfiguration & {
|
|
192
196
|
thumbUrl?: string;
|
|
193
197
|
};
|
package/package.json
CHANGED