@tellescope/chat 1.32.2 → 1.32.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellescope/chat",
3
- "version": "1.32.2",
3
+ "version": "1.32.4",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",
@@ -34,13 +34,13 @@
34
34
  "@fontsource/roboto": "^4.5.1",
35
35
  "@mui/icons-material": "^5.0.1",
36
36
  "@mui/material": "^5.0.2",
37
- "@tellescope/constants": "^1.32.1",
38
- "@tellescope/react-components": "^1.32.1",
39
- "@tellescope/sdk": "^1.32.1",
40
- "@tellescope/types-client": "^1.32.1",
41
- "@tellescope/types-models": "^1.32.1",
37
+ "@tellescope/constants": "^1.32.4",
38
+ "@tellescope/react-components": "^1.32.4",
39
+ "@tellescope/sdk": "^1.32.4",
40
+ "@tellescope/types-client": "^1.32.4",
41
+ "@tellescope/types-models": "^1.32.4",
42
42
  "@tellescope/types-utilities": "^1.5.1",
43
- "@tellescope/utilities": "^1.32.1",
43
+ "@tellescope/utilities": "^1.32.4",
44
44
  "@typescript-eslint/eslint-plugin": "^4.33.0",
45
45
  "@typescript-eslint/parser": "^4.33.0",
46
46
  "eslint": "^7.32.0",
@@ -51,7 +51,7 @@
51
51
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
52
52
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
53
53
  },
54
- "gitHead": "e075e216593a7491af189089d77ae0b801d171fa",
54
+ "gitHead": "1e3a5926ef8a59d2586292d9e4bee5a9a0f3f517",
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  }
package/src/chat.tsx CHANGED
@@ -203,16 +203,22 @@ export const Message = ({
203
203
  {attachments}
204
204
  </Flex>
205
205
  ) : (
206
- <Flex column flex={1}>
206
+ <Flex flex={1}>
207
207
  <Flex style={{ ...textBGStyle }} alignItems="center">
208
- <Typography component="div" style={{ ...textStyle }}>
208
+ <Typography style={{ ...textStyle }}>
209
209
  {message.html
210
210
  ? <HTMLMessage html={message.html} />
211
211
  : message.message
212
212
  }
213
213
  </Typography>
214
214
  </Flex>
215
- {attachments}
215
+
216
+ <Flex
217
+ justifyContent={message.senderId === chatUserId ? 'flex-end' : 'flex-start'}
218
+ style={{ width: '100%' }}
219
+ >
220
+ {attachments}
221
+ </Flex>
216
222
  </Flex>
217
223
  )
218
224
 
@@ -235,7 +241,15 @@ export const Message = ({
235
241
  return (
236
242
  <Flex column>
237
243
  {showDate && (
238
- <Flex alignSelf="center">
244
+ <Flex alignSelf="center"
245
+ style={
246
+ IN_REACT_WEB
247
+ ? {}
248
+ : {
249
+ marginTop: 8
250
+ }
251
+ }
252
+ >
239
253
  <Typography>
240
254
  {formatted_date(new Date(message.createdAt))}
241
255
  </Typography>
@@ -275,6 +289,9 @@ export const SecureLinkText = ({ secureName } : { secureName: string }) => {
275
289
  onClick={() => {
276
290
  if (IN_REACT_WEB) {
277
291
  window.open(file.downloadURL, "_blank")
292
+ } else {
293
+ // todo: allow a function prop for handling open without requiring ReactNative in this package
294
+ // require('react-native').Linking.openURL(file.downloadURL)
278
295
  }
279
296
  }}
280
297
  >