stream-chat-angular 5.11.2 → 5.12.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.
Files changed (36) hide show
  1. package/assets/version.d.ts +1 -1
  2. package/esm2020/assets/version.mjs +2 -2
  3. package/esm2020/lib/custom-templates.service.mjs +6 -2
  4. package/esm2020/lib/message/message.component.mjs +41 -127
  5. package/esm2020/lib/message-input/message-input.component.mjs +12 -4
  6. package/esm2020/lib/message-text/message-text.component.mjs +137 -0
  7. package/esm2020/lib/stream-chat.module.mjs +8 -3
  8. package/esm2020/lib/types.mjs +1 -1
  9. package/esm2020/public-api.mjs +2 -1
  10. package/fesm2015/stream-chat-angular.mjs +223 -161
  11. package/fesm2015/stream-chat-angular.mjs.map +1 -1
  12. package/fesm2020/stream-chat-angular.mjs +215 -154
  13. package/fesm2020/stream-chat-angular.mjs.map +1 -1
  14. package/lib/custom-templates.service.d.ts +6 -2
  15. package/lib/message/message.component.d.ts +5 -21
  16. package/lib/message-input/message-input.component.d.ts +3 -2
  17. package/lib/message-text/message-text.component.d.ts +45 -0
  18. package/lib/stream-chat.module.d.ts +8 -7
  19. package/lib/types.d.ts +5 -0
  20. package/package.json +1 -1
  21. package/public-api.d.ts +1 -0
  22. package/src/assets/styles/css/index.css +2 -2
  23. package/src/assets/styles/css/index.layout.css +2 -2
  24. package/src/assets/styles/scss/AIStateIndicator/AIStateIndicator-layout.scss +3 -0
  25. package/src/assets/styles/scss/AIStateIndicator/AIStateIndicator-theme.scss +7 -0
  26. package/src/assets/styles/scss/Avatar/Avatar-layout.scss +48 -0
  27. package/src/assets/styles/scss/Avatar/Avatar-theme.scss +5 -0
  28. package/src/assets/styles/scss/ChannelPreview/ChannelPreview-layout.scss +24 -0
  29. package/src/assets/styles/scss/ChannelPreview/ChannelPreview-theme.scss +18 -0
  30. package/src/assets/styles/scss/Message/Message-layout.scss +12 -5
  31. package/src/assets/styles/scss/MessageInput/MessageInput-layout.scss +7 -1
  32. package/src/assets/styles/scss/MessageInput/MessageInput-theme.scss +9 -3
  33. package/src/assets/styles/scss/_icons.scss +1 -0
  34. package/src/assets/styles/scss/index.layout.scss +1 -0
  35. package/src/assets/styles/scss/index.scss +1 -0
  36. package/src/assets/version.ts +1 -1
@@ -0,0 +1,3 @@
1
+ .str-chat__ai-state-indicator-container {
2
+ padding: 0 8px;
3
+ }
@@ -0,0 +1,7 @@
1
+ .str-chat__ai-state-indicator-container {
2
+ background-color: var(--str-chat__grey300);
3
+ }
4
+
5
+ .str-chat__ai-state-indicator-text {
6
+ color: var(--str-chat__text-color);
7
+ }
@@ -87,3 +87,51 @@
87
87
  width: calc(var(--str-chat__spacing-px) * 49);
88
88
  height: calc(var(--str-chat__spacing-px) * 49);
89
89
  }
90
+
91
+
92
+ .str-chat__avatar-group {
93
+ display: grid;
94
+ grid-template-columns: repeat(2, 1fr);
95
+ grid-template-rows: repeat(2, 1fr);
96
+ height: var(--str-chat__avatar-size);
97
+ line-height: var(--str-chat__avatar-size);
98
+ width: var(--str-chat__avatar-size);
99
+ min-width: var(--str-chat__avatar-size);
100
+ overflow: hidden;
101
+
102
+ &.str-chat__avatar-group--three-part {
103
+ .str-chat__avatar:nth-child(1) {
104
+ grid-area: 1 / 1 / 3 / 2;
105
+ }
106
+
107
+ .str-chat__avatar:nth-child(2) {
108
+ grid-area: 1 / 2 / 2 / 3;
109
+ }
110
+
111
+ .str-chat__avatar:nth-child(3) {
112
+ grid-area: 2 / 2 / 3 / 3;
113
+ }
114
+ }
115
+
116
+ .str-chat__avatar {
117
+ height: 100%;
118
+ line-height: 100%;
119
+ width: 100%;
120
+ min-width: 100%;
121
+
122
+ .str-chat__avatar-fallback, img {
123
+ border-radius: 0;
124
+ }
125
+
126
+ &.str-chat__avatar--single .str-chat__avatar-fallback {
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ font-size: calc(var(--str-chat__avatar-size) * 0.5);
131
+ }
132
+
133
+ .str-chat__avatar-fallback {
134
+ font-size: calc(var(--str-chat__avatar-size) * 0.33);
135
+ }
136
+ }
137
+ }
@@ -57,3 +57,8 @@
57
57
  .str-chat__loading-channels-avatar {
58
58
  border-radius: var(--str-chat__avatar-border-radius);
59
59
  }
60
+
61
+
62
+ .str-chat__avatar-group {
63
+ border-radius: var(--str-chat__avatar-border-radius);
64
+ }
@@ -25,6 +25,28 @@
25
25
  }
26
26
  }
27
27
 
28
+ .str-chat__channel-preview-container {
29
+ position: relative;
30
+
31
+ .str-chat__channel-preview__action-buttons {
32
+ position: absolute;
33
+ right: var(--str-chat__spacing-2);
34
+ bottom: var(--str-chat__spacing-3);
35
+ display: flex;
36
+ flex-direction: row;
37
+ align-items: center;
38
+ gap: 1px;
39
+
40
+ .str-chat__channel-preview__action-button {
41
+
42
+ --str-chat-icon-height: 13px;
43
+ cursor: pointer;
44
+ padding-block: 2px;
45
+ padding-inline: 4px;
46
+ }
47
+ }
48
+ }
49
+
28
50
  .str-chat__channel-preview {
29
51
  @include channel-preview-layout;
30
52
  cursor: pointer;
@@ -78,6 +100,8 @@
78
100
  p {
79
101
  @include utils.ellipsis-text;
80
102
  margin: 0;
103
+ // 40px is the width of the two action buttons
104
+ max-width: calc(100% - 40px);
81
105
  }
82
106
  }
83
107
  }
@@ -64,6 +64,24 @@
64
64
  --str-chat__channel-preview-message-time-color: var(--str-chat__message-secondary-color);
65
65
  }
66
66
 
67
+ .str-chat__channel-preview-container {
68
+ .str-chat__channel-preview__action-buttons {
69
+ .str-chat__channel-preview__action-button {
70
+ --str-chat-icon-color: var(--str-chat__text-low-emphasis-color);
71
+ border: none;
72
+ background-color: transparent;
73
+ }
74
+
75
+ .str-chat__channel-preview__action-button--pin.str-chat__channel-preview__action-button--active {
76
+ --str-chat-icon-color: var(--str-chat__unread-badge-color);
77
+ }
78
+
79
+ .str-chat__channel-preview__action-button--archive.str-chat__channel-preview__action-button--active {
80
+ --str-chat-icon-color: var(--str-chat__text-color);
81
+ }
82
+ }
83
+ }
84
+
67
85
  .str-chat__channel-preview {
68
86
  @include utils.component-layer-overrides('channel-preview');
69
87
 
@@ -23,6 +23,9 @@
23
23
  var(--str-chat__quoted-message-inside-message-input-max-width) +
24
24
  calc(var(--str-chat__spacing-px) * 50)
25
25
  );
26
+
27
+ /* The maximum number of lines displayed for quoted messages, set to "none" to turn off clamping */
28
+ --str-chat__quoted-message-line-clamp: 5;
26
29
  }
27
30
 
28
31
  .str-chat__message {
@@ -59,12 +62,21 @@
59
62
  }
60
63
  }
61
64
 
65
+ .str-chat__quoted-message-text-value {
66
+ overflow: hidden;
67
+ display: -webkit-box;
68
+ -webkit-line-clamp: var(--str-chat__quoted-message-line-clamp);
69
+ line-clamp: var(--str-chat__quoted-message-line-clamp);
70
+ -webkit-box-orient: vertical;
71
+ }
72
+
62
73
  .str-chat__message,
63
74
  .str-chat__quoted-message-preview {
64
75
  @mixin chat-bubble-spacing {
65
76
  padding: var(--str-chat__spacing-2) var(--str-chat__spacing-4);
66
77
 
67
78
  p {
79
+ white-space: pre-line;
68
80
  margin: 0;
69
81
  }
70
82
  }
@@ -165,10 +177,6 @@
165
177
  .str-chat__message-text-inner {
166
178
  @include utils.prevent-glitch-text-overflow;
167
179
  }
168
-
169
- p {
170
- white-space: pre-line;
171
- }
172
180
  }
173
181
  }
174
182
  }
@@ -357,7 +365,6 @@
357
365
  }
358
366
  }
359
367
 
360
-
361
368
  .str-chat__message-inner {
362
369
  .str-chat__message-options {
363
370
  display: none;
@@ -129,6 +129,12 @@
129
129
  width: 100%;
130
130
  }
131
131
 
132
+ .str-chat__stop-ai-generation-button {
133
+ width: calc(var(--str-chat__spacing-px) * 30);
134
+ height: calc(var(--str-chat__spacing-px) * 28);
135
+ cursor: pointer;
136
+ }
137
+
132
138
  .str-chat__send-button {
133
139
  --str-chat-icon-height: calc(var(--str-chat__spacing-px) * 32);
134
140
  @include utils.flex-row-center;
@@ -240,4 +246,4 @@
240
246
  .str-chat__attachment-selector-actions-menu {
241
247
  min-width: 300px;
242
248
  padding-block: 0.5rem;
243
- }
249
+ }
@@ -168,10 +168,10 @@
168
168
 
169
169
  /* Box shadow applied to the cooldown timer */
170
170
  --str-chat__cooldown-box-shadow: none;
171
-
171
+
172
172
  /* Color applied to an icon in a button that opens attachment selector */
173
173
  --str-chat__attachment-selector-button-icon-color: var(--str-chat__text-low-emphasis-color);
174
-
174
+
175
175
  /* Color applied to an icon in a button that opens attachment selector when hovered over */
176
176
  --str-chat__attachment-selector-button-icon-color-hover: var(--str-chat__primary-color);
177
177
 
@@ -221,6 +221,12 @@
221
221
  }
222
222
  }
223
223
 
224
+ .str-chat__stop-ai-generation-button {
225
+ background-image: var(--str-chat__circle-stop-icon);
226
+ background-color: transparent;
227
+ border-width: 0;
228
+ }
229
+
224
230
  .str-chat__send-button {
225
231
  --str-chat-icon-color: var(--str-chat__message-send-color);
226
232
  @include utils.component-layer-overrides('message-send');
@@ -342,4 +348,4 @@
342
348
  mask: var(--str-chat__poll-icon) no-repeat center / contain;
343
349
  }
344
350
  }
345
- }
351
+ }
@@ -9,6 +9,7 @@
9
9
  --str-chat__folder-icon: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIGZpbGw9ImN1cnJlbnRDb2xvciIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik0xOCAySDEwTDggMEgyQzAuOSAwIDAuMDA5OTk5OTkgMC45IDAuMDA5OTk5OTkgMkwwIDE0QzAgMTUuMSAwLjkgMTYgMiAxNkgxOEMxOS4xIDE2IDIwIDE1LjEgMjAgMTRWNEMyMCAyLjkgMTkuMSAyIDE4IDJaTTE4IDE0SDJWNEgxOFYxNFoiIC8+Cjwvc3ZnPgo=');
10
10
  --str-chat__poll-icon: url('data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTggMTgiIGZpbGw9ImN1cnJlbnRDb2xvciIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3Jn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DEgNi41NDc1MyAxNi40NDQgNi41NDc1M0MyMS42NjggNi41NDc1MyAyNS44NTE2IDEwLjczMTEgMjUuODYyNiAxNS45NTUxQzI1Ljg3MzcgMjEuMTc5IDIxLjY3OSAyNS4zNjI2IDE2LjQ1NTEgMjUuMzYyNlpNMTMuNTIyMSAxOS45ODM3SDE5LjM2NTlDMjAuMDYzMiAxOS45ODM3IDIwLjQ3MjcgMTkuNTc0MiAyMC40NzI3IDE4Ljg5OTFWMTMuMDExMUMyMC40NzI3IDEyLjMyNDkgMjAuMDYzMiAxMS45MjY0IDE5LjM2NTkgMTEuOTI2NEgxMy41MjIxQzEyLjgzNTkgMTEuOTI2NCAxMi40MTU0IDEyLjMyNDkgMTIuNDE1NCAxMy4wMTExVjE4Ljg5OTFDMTIuNDE1NCAxOS41NzQyIDEyLjgzNTkgMTkuOTgzNyAxMy41MjIxIDE5Ljk4MzdaIiBmaWxsPSIjMDA1ZmZmIi8+Cjwvc3ZnPg==');
12
13
  }
13
14
 
14
15
  @font-face {
@@ -43,3 +43,4 @@
43
43
  @use 'ThreadList/ThreadList-layout';
44
44
  @use 'ChatView/ChatView-layout';
45
45
  @use 'UnreadCountBadge/UnreadCountBadge-layout';
46
+ @use 'AIStateIndicator/AIStateIndicator-layout';
@@ -44,3 +44,4 @@
44
44
  @use 'ThreadList/ThreadList-theme';
45
45
  @use 'ChatView/ChatView-theme';
46
46
  @use 'UnreadCountBadge/UnreadCountBadge-theme';
47
+ @use 'AIStateIndicator/AIStateIndicator-theme';
@@ -1 +1 @@
1
- export const version = '5.11.2';
1
+ export const version = '5.12.0';