stream-chat-react 9.1.0 → 9.1.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.
@@ -888,7 +888,7 @@
888
888
  }
889
889
 
890
890
  > .str-chat__avatar,
891
- > .str-chat-angular__avatar-host > .str-chat__avatar {
891
+ > .str-chat-angular__avatar-host .str-chat__avatar {
892
892
  align-self: flex-end;
893
893
  margin-right: 0;
894
894
  }
@@ -110,3 +110,22 @@
110
110
  align-items: center;
111
111
  }
112
112
  }
113
+
114
+ .str-chat__message-moderation-error-actions-box {
115
+ display: flex;
116
+ justify-content: flex-end;
117
+ padding-top: var(--xs-p);
118
+ padding-bottom: var(--xs-p);
119
+ gap: var(--xs-p);
120
+
121
+ button {
122
+ border: none;
123
+ background: none;
124
+ font-weight: var(--font-weight-semi-bold);
125
+ color: var(--secondary-button-text);
126
+
127
+ &.str-chat__message-moderation-error-actions-box--primary {
128
+ color: var(--button-text);
129
+ }
130
+ }
131
+ }
@@ -3,16 +3,31 @@
3
3
  overflow-y: auto;
4
4
  }
5
5
 
6
+ // conditionally showing the loading indicator displaces items when prepending.
7
+ // a simple workaround is to make the loading indicator an overlay.
8
+ %loading-indicator-container {
9
+ display: flex;
10
+ padding-top: var(--xs-p);
11
+ justify-content: center;
12
+ width: 100%;
13
+ position: absolute;
14
+ }
15
+
6
16
  .str-chat-angular__message-list-host {
7
17
  @extend %scrollable;
8
18
  }
9
19
 
10
20
  .str-chat__list {
11
21
  @extend %scrollable;
22
+ position: relative;
12
23
  flex: 1;
13
24
  -webkit-overflow-scrolling: touch; /* enable smooth scrolling on ios */
14
25
  padding: 0;
15
26
 
27
+ &__loading {
28
+ @extend %loading-indicator-container;
29
+ }
30
+
16
31
  .str-chat__reverse-infinite-scroll {
17
32
  padding-top: 72px;
18
33
  }
@@ -177,14 +192,8 @@
177
192
  width: 100%;
178
193
  height: 100%;
179
194
 
180
- // conditionally showing the header displaces items when prepending.
181
- // a simple workaround is to make the loading indicator an overlay.
182
195
  &__loading {
183
- display: flex;
184
- padding-top: var(--xs-p);
185
- justify-content: center;
186
- width: 100%;
187
- position: absolute;
196
+ @extend %loading-indicator-container;
188
197
  }
189
198
 
190
199
  p {
@@ -15,7 +15,6 @@
15
15
  }
16
16
 
17
17
  &__inner {
18
- max-width: 667px;
19
18
  background: var(--white);
20
19
  padding: var(--md-p);
21
20
  border-radius: var(--border-radius-md);
@@ -48,7 +47,7 @@
48
47
  }
49
48
 
50
49
  .str-chat__edit-message-form {
51
- min-width: 300px;
50
+ width: var(--modal-edit-message-form-width);
52
51
  }
53
52
 
54
53
  .str-chat__input-emojiselect,
@@ -61,7 +61,6 @@
61
61
  .str-chat__message:first-of-type .str-chat__message-inner {
62
62
  margin-left: unset;
63
63
  margin-right: unset;
64
- width: 100%;
65
64
  }
66
65
 
67
66
  .str-chat__message-attachment.str-chat__message-attachment {
@@ -142,6 +142,7 @@ $border-radius: 16px;
142
142
  --border: #00000014; // 14 = 8% opacity; top: x=0, y=-1; bottom: x=0, y=1
143
143
  --button-background: #ffffff;
144
144
  --button-text: #005fff;
145
+ --secondary-button-text: var(--grey);
145
146
  --grey-gainsboro: #dbdbdb;
146
147
  --grey-whisper: #ecebeb;
147
148
  --highlight: #fbf4dd;
@@ -155,4 +156,5 @@ $border-radius: 16px;
155
156
  --white-snow: #fcfcfc;
156
157
 
157
158
  --modal-overlay-color: rgba(0, 0, 0, 0.89);
159
+ --modal-edit-message-form-width: 47em;
158
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"navigate-long-message-lists.stories.d.ts","sourceRoot":"","sources":["../../src/stories/navigate-long-message-lists.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AAgKvD,eAAO,MAAM,KAAK,mBAQjB,CAAC;AAEF,eAAO,MAAM,KAAK,mBAQjB,CAAC"}
1
+ {"version":3,"file":"navigate-long-message-lists.stories.d.ts","sourceRoot":"","sources":["../../src/stories/navigate-long-message-lists.stories.tsx"],"names":[],"mappings":"AACA,OAAO,+CAA+C,CAAC;AAsKvD,eAAO,MAAM,KAAK,mBAQjB,CAAC;AAEF,eAAO,MAAM,KAAK,mBAQjB,CAAC"}
@@ -111,10 +111,11 @@ var SetThreadOpen = function () {
111
111
  var openThread = useChannelActionContext().openThread;
112
112
  var messages = useChannelStateContext().messages;
113
113
  useEffect(function () {
114
- if (messages) {
115
- var lastMsg = messages.slice(-1)[0];
114
+ if (!messages)
115
+ return;
116
+ var lastMsg = messages.slice(-1)[0];
117
+ if (lastMsg)
116
118
  openThread(lastMsg, { preventDefault: function () { return null; } });
117
- }
118
119
  }, [messages]);
119
120
  return null;
120
121
  };
@@ -136,6 +137,7 @@ var OtherUserControls = function () {
136
137
  var WrappedConnectedUser = function (_a) {
137
138
  var token = _a.token, userId = _a.userId;
138
139
  return (React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
140
+ React.createElement("style", null, "\n\t \t.str-chat__thread .str-chat__message-data.str-chat__message-simple-data {\n\t\t\t visibility: hidden;\n\t\t}\n\t "),
139
141
  React.createElement("div", { className: userId },
140
142
  React.createElement(ConnectedUser, { token: token, userId: userId },
141
143
  React.createElement(ChannelList, { filters: { id: { $eq: channelId }, members: { $in: [userId] } }, setActiveChannelOnMount: false, sort: sort }),
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "9.1.0";
1
+ export declare const version = "9.1.1";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export var version = '9.1.0';
1
+ export var version = '9.1.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stream-chat-react",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "React components to create chat conversations or livestream style chat",
5
5
  "author": "GetStream",
6
6
  "homepage": "https://getstream.io/chat/",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@braintree/sanitize-url": "6.0.0",
32
32
  "@juggle/resize-observer": "^3.3.1",
33
- "@stream-io/stream-chat-css": "^2.8.0",
33
+ "@stream-io/stream-chat-css": "^2.10.0",
34
34
  "dayjs": "^1.10.4",
35
35
  "emoji-mart": "3.0.1",
36
36
  "emoji-regex": "^9.2.0",
@@ -46,7 +46,7 @@
46
46
  "pretty-bytes": "^5.4.1",
47
47
  "prop-types": "^15.7.2",
48
48
  "react-fast-compare": "^3.2.0",
49
- "react-file-utils": "^1.1.11",
49
+ "react-file-utils": "^1.1.12",
50
50
  "react-image-gallery": "^1.2.7",
51
51
  "react-is": "^18.1.0",
52
52
  "react-markdown": "^5.0.3",
@@ -81,7 +81,7 @@
81
81
  "@babel/preset-typescript": "^7.12.7",
82
82
  "@commitlint/cli": "^16.2.3",
83
83
  "@commitlint/config-conventional": "^16.2.1",
84
- "@ladle/react": "^0.11.0",
84
+ "@ladle/react": "^0.16.0",
85
85
  "@playwright/test": "^1.22.0",
86
86
  "@rollup/plugin-babel": "^5.2.1",
87
87
  "@rollup/plugin-image": "^2.1.1",