stream-chat-angular 4.4.0 → 4.5.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.
Files changed (34) hide show
  1. package/assets/i18n/en.d.ts +2 -0
  2. package/assets/version.d.ts +1 -1
  3. package/bundles/stream-chat-angular.umd.js +111 -23
  4. package/bundles/stream-chat-angular.umd.js.map +1 -1
  5. package/esm2015/assets/i18n/en.js +3 -1
  6. package/esm2015/assets/version.js +2 -2
  7. package/esm2015/lib/channel-preview/channel-preview.component.js +4 -2
  8. package/esm2015/lib/channel.service.js +27 -7
  9. package/esm2015/lib/get-message-translation.js +13 -0
  10. package/esm2015/lib/message/message.component.js +64 -16
  11. package/esm2015/lib/message-input/message-input.component.js +2 -2
  12. package/esm2015/lib/types.js +1 -1
  13. package/fesm2015/stream-chat-angular.js +107 -24
  14. package/fesm2015/stream-chat-angular.js.map +1 -1
  15. package/lib/get-message-translation.d.ts +3 -0
  16. package/lib/message/message.component.d.ts +7 -0
  17. package/lib/types.d.ts +3 -1
  18. package/package.json +1 -1
  19. package/src/assets/i18n/en.ts +3 -0
  20. package/src/assets/styles/css/index.css +1 -1
  21. package/src/assets/styles/css/index.css.map +1 -1
  22. package/src/assets/styles/scss/Attachment.scss +6 -2
  23. package/src/assets/styles/scss/Message.scss +18 -0
  24. package/src/assets/styles/v2/css/index.css +1 -1
  25. package/src/assets/styles/v2/css/index.css.map +1 -1
  26. package/src/assets/styles/v2/css/index.layout.css +1 -1
  27. package/src/assets/styles/v2/css/index.layout.css.map +1 -1
  28. package/src/assets/styles/v2/scss/AttachmentList/AttachmentList-layout.scss +16 -7
  29. package/src/assets/styles/v2/scss/Autocomplete/Autocomplete-layout.scss +2 -0
  30. package/src/assets/styles/v2/scss/Message/Message-layout.scss +12 -0
  31. package/src/assets/styles/v2/scss/Message/Message-theme.scss +20 -0
  32. package/src/assets/styles/v2/scss/index.scss +1 -1
  33. package/src/assets/styles/v2/scss/vendor/react-image-gallery.scss +232 -0
  34. package/src/assets/version.ts +1 -1
@@ -71,6 +71,7 @@
71
71
  grid-template-areas:
72
72
  'avatar message'
73
73
  '. replies'
74
+ '. translation-notice'
74
75
  '. metadata';
75
76
  column-gap: var(--str-chat__spacing-2);
76
77
  grid-template-columns: auto 1fr;
@@ -81,6 +82,7 @@
81
82
  grid-template-areas:
82
83
  'message'
83
84
  'replies'
85
+ 'translation-notice'
84
86
  'metadata';
85
87
  justify-items: end;
86
88
 
@@ -166,6 +168,16 @@
166
168
  }
167
169
  }
168
170
 
171
+ .str-chat__translation-notice {
172
+ grid-area: translation-notice;
173
+
174
+ button {
175
+ cursor: pointer;
176
+ padding: var(--str-chat__spacing-1) 0;
177
+ margin: 0;
178
+ }
179
+ }
180
+
169
181
  .str-chat__message-metadata {
170
182
  grid-area: metadata;
171
183
  display: flex;
@@ -165,6 +165,12 @@
165
165
 
166
166
  /* Box shadow applied to a date separator */
167
167
  --str-chat__date-separator-box-shadow: none;
168
+
169
+ /* The text color of the translation notice that is displayed if a message is translated with auto-translation */
170
+ --str-chat__translation-notice-color: var(--str-chat__text-low-emphasis-color);
171
+
172
+ /* The hover color of the translation notice that is displayed if a message is translated with auto-translation */
173
+ --str-chat__translation-notice-active-background-color: var(--str-chat__tertiary-surface-color);
168
174
  }
169
175
 
170
176
  .str-chat__message--system {
@@ -237,6 +243,20 @@
237
243
  }
238
244
  }
239
245
 
246
+ .str-chat__translation-notice {
247
+ button {
248
+ font: var(--str-chat__body2-text);
249
+ color: var(--str-chat__translation-notice-color);
250
+ border: none;
251
+ background: none;
252
+
253
+ &:active,
254
+ &:hover {
255
+ background: var(--str-chat__translation-notice-active-background-color);
256
+ }
257
+ }
258
+ }
259
+
240
260
  .str-chat__message-metadata {
241
261
  color: var(--str-chat__message-secondary-color);
242
262
  font: var(--str-chat__caption-text);
@@ -3,6 +3,7 @@
3
3
  @use 'global-theme-variables';
4
4
 
5
5
  @use 'vendor/emoji-mart.scss';
6
+ @use 'vendor/react-image-gallery';
6
7
 
7
8
  @use 'common/CTAButton/CTAButton-theme';
8
9
  @use 'common/CircleFAButton/CircleFAButton-theme';
@@ -33,4 +34,3 @@
33
34
  @use 'Tooltip/Tooltip-theme';
34
35
  @use 'TypingIndicator/TypingIndicator-theme';
35
36
 
36
- @use '../../vendor/react-image-gallery';
@@ -0,0 +1,232 @@
1
+ $ig-small-screen: 768px !default;
2
+ $ig-xsmall-screen: 480px !default;
3
+ $ig-white: #fff !default;
4
+ $ig-black: #000 !default;
5
+ $ig-blue: #337ab7 !default;
6
+ $ig-background-black: rgba(0, 0, 0, 0.4) !default;
7
+ $ig-transparent: rgba(0, 0, 0, 0) !default;
8
+ $ig-shadow: 0 2px 2px lighten($ig-black, 10%);
9
+
10
+ @mixin vendor-prefix($name, $value) {
11
+ @each $vendor in ('-webkit-', '-moz-', '-ms-', '-o-', '') {
12
+ #{$vendor}#{$name}: #{$value};
13
+ }
14
+ }
15
+
16
+ // SVG ICON STYLES
17
+ .image-gallery-icon {
18
+ color: $ig-white;
19
+ transition: all 0.3s ease-out;
20
+ appearance: none;
21
+ background-color: transparent;
22
+ border: 0;
23
+ cursor: pointer;
24
+ outline: none;
25
+ position: absolute;
26
+ z-index: 4;
27
+ filter: drop-shadow($ig-shadow);
28
+
29
+ @media (hover: hover) and (pointer: fine) {
30
+ &:hover {
31
+ color: $ig-blue;
32
+
33
+ .image-gallery-svg {
34
+ transform: scale(1.1);
35
+ }
36
+ }
37
+ }
38
+
39
+ &:focus {
40
+ // a11y support
41
+ outline: 2px solid $ig-blue;
42
+ }
43
+ }
44
+
45
+ .image-gallery-using-mouse {
46
+ .image-gallery-icon {
47
+ &:focus {
48
+ outline: none;
49
+ }
50
+ }
51
+ }
52
+
53
+ .image-gallery-fullscreen-button {
54
+ bottom: 0;
55
+ padding: 20px;
56
+
57
+ .image-gallery-svg {
58
+ height: 28px;
59
+ width: 28px;
60
+ }
61
+
62
+ @media (max-width: $ig-small-screen) {
63
+ padding: 15px;
64
+
65
+ .image-gallery-svg {
66
+ height: 24px;
67
+ width: 24px;
68
+ }
69
+ }
70
+
71
+ @media (max-width: $ig-xsmall-screen) {
72
+ padding: 10px;
73
+
74
+ .image-gallery-svg {
75
+ height: 16px;
76
+ width: 16px;
77
+ }
78
+ }
79
+ }
80
+
81
+ .image-gallery-fullscreen-button {
82
+ right: 0;
83
+ }
84
+
85
+ .image-gallery-left-nav,
86
+ .image-gallery-right-nav {
87
+ padding: 50px 10px;
88
+ top: 50%;
89
+ transform: translateY(-50%);
90
+
91
+ .image-gallery-svg {
92
+ height: 120px;
93
+ width: 60px;
94
+ }
95
+
96
+ @media (max-width: $ig-small-screen) {
97
+ .image-gallery-svg {
98
+ height: 72px;
99
+ width: 36px;
100
+ }
101
+ }
102
+
103
+ @media (max-width: $ig-xsmall-screen) {
104
+ .image-gallery-svg {
105
+ height: 48px;
106
+ width: 24px;
107
+ }
108
+ }
109
+
110
+ &[disabled] {
111
+ cursor: disabled;
112
+ opacity: 0.6;
113
+ pointer-events: none;
114
+ }
115
+ }
116
+
117
+ .image-gallery-left-nav {
118
+ left: 0;
119
+ }
120
+
121
+ .image-gallery-right-nav {
122
+ right: 0;
123
+ }
124
+ // End of Icon styles
125
+
126
+ .image-gallery {
127
+ @include vendor-prefix('user-select', none);
128
+ -webkit-tap-highlight-color: $ig-transparent;
129
+ position: relative;
130
+
131
+ &.fullscreen-modal {
132
+ background: $ig-black;
133
+ bottom: 0;
134
+ height: 100%;
135
+ left: 0;
136
+ position: fixed;
137
+ right: 0;
138
+ top: 0;
139
+ width: 100%;
140
+ z-index: 5;
141
+
142
+ .image-gallery-content {
143
+ top: 50%;
144
+ transform: translateY(-50%);
145
+ }
146
+ }
147
+ }
148
+
149
+ .image-gallery-content {
150
+ position: relative;
151
+ line-height: 0;
152
+ top: 0;
153
+
154
+ &.fullscreen {
155
+ background: $ig-black;
156
+
157
+ .image-gallery-slide .image-gallery-image {
158
+ max-width: 100%;
159
+ }
160
+ }
161
+
162
+ .image-gallery-slide .image-gallery-image {
163
+ max-height: calc(100vh - 80px); // 80 px for the thumbnail space
164
+ max-width: unset;
165
+ object-fit: contain;
166
+ }
167
+
168
+ &.left,
169
+ &.right {
170
+ .image-gallery-slide .image-gallery-image {
171
+ max-height: 100vh;
172
+ }
173
+ }
174
+ }
175
+
176
+ .image-gallery-slide-wrapper {
177
+ position: relative;
178
+
179
+ &.left,
180
+ &.right {
181
+ display: inline-block;
182
+ width: calc(100% - 110px); // 100px + 10px for margin
183
+
184
+ @media (max-width: $ig-small-screen) {
185
+ width: calc(100% - 87px); // 81px + 6px for margin
186
+ }
187
+ }
188
+
189
+ &.image-gallery-rtl {
190
+ direction: rtl;
191
+ }
192
+ }
193
+
194
+ .image-gallery-slides {
195
+ line-height: 0;
196
+ overflow: hidden;
197
+ position: relative;
198
+ white-space: nowrap;
199
+ text-align: center;
200
+ }
201
+
202
+ .image-gallery-slide {
203
+ left: 0;
204
+ position: absolute;
205
+ top: 0;
206
+ width: 100%;
207
+
208
+ &.center {
209
+ position: relative;
210
+ }
211
+
212
+ .image-gallery-image {
213
+ width: 100%;
214
+ object-fit: contain;
215
+ }
216
+ }
217
+
218
+ .image-gallery-index {
219
+ background: $ig-background-black;
220
+ color: $ig-white;
221
+ line-height: 1;
222
+ padding: 10px 20px;
223
+ position: absolute;
224
+ right: 0;
225
+ top: 0;
226
+ z-index: 4;
227
+
228
+ @media (max-width: $ig-small-screen) {
229
+ font-size: 0.8em;
230
+ padding: 5px 10px;
231
+ }
232
+ }
@@ -1 +1 @@
1
- export const version = '4.4.0';
1
+ export const version = '4.5.1';