stream-chat-angular 4.0.0 → 4.3.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/i18n/en.d.ts +2 -0
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +669 -204
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/i18n/en.js +3 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/attachment-configuration.service.js +158 -0
- package/esm2015/lib/attachment-list/attachment-list.component.js +64 -25
- package/esm2015/lib/attachment.service.js +4 -1
- package/esm2015/lib/avatar/avatar.component.js +30 -6
- package/esm2015/lib/channel-preview/channel-preview.component.js +4 -4
- package/esm2015/lib/channel.service.js +127 -18
- package/esm2015/lib/message/message.component.js +17 -9
- package/esm2015/lib/message-actions-box/message-actions-box.component.js +5 -3
- package/esm2015/lib/message-list/image-load.service.js +2 -1
- package/esm2015/lib/message-list/message-list.component.js +158 -75
- package/esm2015/lib/types.js +1 -1
- package/esm2015/public-api.js +2 -1
- package/fesm2015/stream-chat-angular.js +598 -170
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/attachment-configuration.service.d.ts +58 -0
- package/lib/attachment-list/attachment-list.component.d.ts +12 -8
- package/lib/avatar/avatar.component.d.ts +2 -0
- package/lib/channel.service.d.ts +35 -3
- package/lib/message/message.component.d.ts +7 -21
- package/lib/message-list/image-load.service.d.ts +1 -0
- package/lib/message-list/message-list.component.d.ts +14 -9
- package/lib/types.d.ts +10 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/src/assets/i18n/en.ts +2 -0
- 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 -2
- package/src/assets/styles/scss/Gallery.scss +12 -6
- package/src/assets/styles/scss/ImageCarousel.scss +6 -0
- package/src/assets/styles/scss/Message.scss +8 -2
- 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 +72 -46
- package/src/assets/styles/v2/scss/Message/Message-layout.scss +0 -16
- package/src/assets/styles/v2/scss/MessageReactions/MessageReactions-layout.scss +1 -10
- package/src/assets/styles/v2/scss/Tooltip/Tooltip-layout.scss +2 -23
- package/src/assets/version.ts +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/* The margin applied to every attachment in the attachment list */
|
|
5
5
|
--str-chat__attachment-margin: var(--str-chat__spacing-0_5);
|
|
6
6
|
|
|
7
|
-
/* The maximum allowed width of attachments */
|
|
7
|
+
/* The maximum allowed width and height of attachments, in case of gallery images this is the maximum size of the whole gallery (not just for a single image inside the gallery). In case of Angular, there are some [constraints](https://getstream.io/chat/docs/sdk/angular/components/AttachmentListComponent/#maximum-size) for the acceptable values you can provide for this variable. */
|
|
8
8
|
--str-chat__attachment-max-width: unset;
|
|
9
9
|
|
|
10
10
|
/* The height of scraped images, the default value is optimized for 1.91:1 aspect ratio */
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
/* The height of GIFs */
|
|
17
17
|
--str-chat__gif-height: calc(var(--str-chat__spacing-px) * 200);
|
|
18
18
|
|
|
19
|
-
/* The height of videos */
|
|
20
|
-
--str-chat__video-height:
|
|
19
|
+
/* The height of videos, the default value is the mase as `--str-chat__attachment-max-width`. In Angular SDK this is the maximum height, the video can be smaller based on the aspect ratio */
|
|
20
|
+
--str-chat__video-height: unset;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.str-chat__attachment-list {
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
var(--str-chat__message-max-width) - calc(2 * var(--str-chat__attachment-margin))
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
+
--str-chat__video-height: var(--str-chat__attachment-max-width);
|
|
29
|
+
|
|
28
30
|
--str-chat__scraped-image-height: calc(var(--str-chat__attachment-max-width) * calc(1 / 1.91));
|
|
29
31
|
|
|
30
32
|
--str-chat__scraped-video-height: calc(var(--str-chat__attachment-max-width) * calc(9 / 16));
|
|
@@ -102,6 +104,7 @@
|
|
|
102
104
|
// Images uploaded from files
|
|
103
105
|
.str-chat__message-attachment--image:not(.str-chat__message-attachment--card) {
|
|
104
106
|
img {
|
|
107
|
+
// CDN resize requires max-width and height/max-height to be present on this element
|
|
105
108
|
max-width: var(--str-chat__attachment-max-width);
|
|
106
109
|
max-height: var(--str-chat__attachment-max-width);
|
|
107
110
|
object-fit: cover;
|
|
@@ -126,14 +129,25 @@
|
|
|
126
129
|
.str-chat__video-angular {
|
|
127
130
|
height: 100%;
|
|
128
131
|
width: 100%;
|
|
132
|
+
// CDN resize requires max-width to be present on this element
|
|
133
|
+
max-width: var(--str-chat__attachment-max-width);
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
}
|
|
132
137
|
|
|
133
|
-
.str-chat__message-attachment--video:not(.str-chat__message-attachment--card) {
|
|
138
|
+
.str-chat__message-attachment--video:not(.str-chat__message-attachment--card):not(.str-chat__message-attachment-dynamic-size) {
|
|
134
139
|
height: var(--str-chat__video-height);
|
|
135
140
|
}
|
|
136
141
|
|
|
142
|
+
.str-chat__message-attachment--video.str-chat__message-attachment-dynamic-size:not(.str-chat__message-attachment--card) {
|
|
143
|
+
max-height: var(--str-chat__video-height);
|
|
144
|
+
|
|
145
|
+
.str-chat__video-angular {
|
|
146
|
+
// CDN resize requires max-height to be present on this element
|
|
147
|
+
max-height: var(--str-chat__video-height);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
137
151
|
.str-chat__message-attachment-card--video .str-chat__message-attachment-card--header {
|
|
138
152
|
height: var(--str-chat__scraped-video-height);
|
|
139
153
|
}
|
|
@@ -143,55 +157,66 @@
|
|
|
143
157
|
margin: var(--str-chat__attachment-margin);
|
|
144
158
|
}
|
|
145
159
|
|
|
146
|
-
.str-
|
|
147
|
-
|
|
148
|
-
grid-template-columns: 50% 50%;
|
|
149
|
-
overflow: hidden;
|
|
150
|
-
gap: var(--str-chat__spacing-0_5);
|
|
151
|
-
max-width: var(--str-chat__attachment-max-width);
|
|
152
|
-
height: var(--str-chat__attachment-max-width);
|
|
160
|
+
.str-chat__message-attachment--gallery {
|
|
161
|
+
$max-width: var(--str-chat__attachment-max-width);
|
|
153
162
|
margin: var(--str-chat__attachment-margin);
|
|
154
163
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
img
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
.str-chat__gallery {
|
|
165
|
+
display: grid;
|
|
166
|
+
grid-template-columns: 50% 50%;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
// Safari needs this
|
|
169
|
+
width: fit-content;
|
|
170
|
+
gap: var(--str-chat__spacing-0_5);
|
|
171
|
+
max-width: $max-width;
|
|
172
|
+
// CDN resize requires height/max-height to be present on the img element, this rule ensures that
|
|
173
|
+
height: var(--str-chat__attachment-max-width);
|
|
174
|
+
|
|
175
|
+
&.str-chat__gallery-two-rows {
|
|
176
|
+
grid-template-rows: 50% 50%;
|
|
168
177
|
}
|
|
169
|
-
}
|
|
170
178
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
.str-chat__gallery-image {
|
|
180
|
+
padding: 0;
|
|
181
|
+
margin: 0;
|
|
182
|
+
|
|
183
|
+
img {
|
|
184
|
+
width: 100%;
|
|
185
|
+
height: 100%;
|
|
186
|
+
object-fit: cover;
|
|
187
|
+
cursor: zoom-in;
|
|
188
|
+
// CDN resize requires max-width to be present on this element
|
|
189
|
+
max-width: $max-width;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
181
192
|
|
|
182
|
-
|
|
193
|
+
.str-chat__gallery-placeholder {
|
|
183
194
|
position: relative;
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
background-size: cover;
|
|
199
|
+
background-position: top left;
|
|
200
|
+
background-repeat: no-repeat;
|
|
201
|
+
margin: 0;
|
|
202
|
+
cursor: zoom-in;
|
|
203
|
+
// CDN resize requires max-width to be present on this element
|
|
204
|
+
max-width: $max-width;
|
|
186
205
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
206
|
+
p {
|
|
207
|
+
position: relative;
|
|
208
|
+
z-index: 1;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&::after {
|
|
212
|
+
content: '';
|
|
213
|
+
position: absolute;
|
|
214
|
+
top: 0;
|
|
215
|
+
left: 0;
|
|
216
|
+
width: 100%;
|
|
217
|
+
height: 100%;
|
|
218
|
+
z-index: 0;
|
|
219
|
+
}
|
|
195
220
|
}
|
|
196
221
|
}
|
|
197
222
|
}
|
|
@@ -203,6 +228,7 @@
|
|
|
203
228
|
|
|
204
229
|
img {
|
|
205
230
|
object-fit: contain;
|
|
231
|
+
// CDN resize requires max-width and height/max-height to be present on this element
|
|
206
232
|
max-width: calc(var(--str-chat__attachment-max-width) - #{$padding});
|
|
207
233
|
max-height: calc(var(--str-chat__attachment-max-width) - #{$padding});
|
|
208
234
|
}
|
|
@@ -179,26 +179,10 @@
|
|
|
179
179
|
column-gap: var(--str-chat__spacing-0_5);
|
|
180
180
|
position: relative;
|
|
181
181
|
|
|
182
|
-
.str-chat__message-status-tooltip-container {
|
|
183
|
-
display: flex;
|
|
184
|
-
justify-content: center;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
182
|
svg {
|
|
188
183
|
width: calc(var(--str-chat__spacing-px) * 15);
|
|
189
184
|
height: calc(var(--str-chat__spacing-px) * 15);
|
|
190
185
|
}
|
|
191
|
-
|
|
192
|
-
.str-chat__tooltip {
|
|
193
|
-
word-break: normal;
|
|
194
|
-
display: none;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
&:hover {
|
|
198
|
-
.str-chat__tooltip {
|
|
199
|
-
display: flex;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
186
|
}
|
|
203
187
|
|
|
204
188
|
.str-chat__message-replies-count-button-wrapper {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
justify-content: center;
|
|
19
19
|
align-items: center;
|
|
20
20
|
padding: var(--str-chat__spacing-1_5);
|
|
21
|
+
position: relative;
|
|
21
22
|
|
|
22
23
|
button {
|
|
23
24
|
@include utils.button-reset;
|
|
@@ -31,16 +32,6 @@
|
|
|
31
32
|
align-items: center;
|
|
32
33
|
justify-content: center;
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
.str-chat__tooltip {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:hover {
|
|
40
|
-
.str-chat__tooltip {
|
|
41
|
-
display: flex;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
35
|
}
|
|
45
36
|
|
|
46
37
|
// Only in theme-v1
|
|
@@ -3,28 +3,7 @@
|
|
|
3
3
|
.str-chat__tooltip {
|
|
4
4
|
display: flex;
|
|
5
5
|
padding: var(--str-chat__spacing-2);
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
.str-chat__tooltip:not(.str-chat__tooltip-angular) {
|
|
9
|
-
$size: 10px;
|
|
10
|
-
|
|
11
|
-
min-width: calc(var(--str-chat__spacing-px) * 100px);
|
|
12
|
-
max-width: calc(var(--str-chat__spacing-px) * 150px);
|
|
13
|
-
word-break: break-all;
|
|
14
|
-
position: absolute;
|
|
15
|
-
bottom: calc(100% + calc(0.8 * #{$size}));
|
|
16
|
-
|
|
17
|
-
&::after {
|
|
18
|
-
content: '';
|
|
19
|
-
position: absolute;
|
|
20
|
-
bottom: calc(-1 * calc(#{$size} / 2));
|
|
21
|
-
inset-inline-start: calc(50% - calc(#{$size} / 2));
|
|
22
|
-
width: $size;
|
|
23
|
-
height: $size;
|
|
24
|
-
transform: rotate(45deg);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.str-chat__tooltip-angular {
|
|
6
|
+
z-index: 1;
|
|
29
7
|
word-break: normal;
|
|
8
|
+
max-width: calc(var(--str-chat__spacing-px) * 150);
|
|
30
9
|
}
|
package/src/assets/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.
|
|
1
|
+
export const version = '4.3.0';
|