@tellescope/chat 1.141.0 → 1.142.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/lib/cjs/chat.d.ts +2 -1
- package/lib/cjs/chat.d.ts.map +1 -1
- package/lib/cjs/chat.js +5 -5
- package/lib/cjs/chat.js.map +1 -1
- package/lib/esm/chat.d.ts +2 -1
- package/lib/esm/chat.d.ts.map +1 -1
- package/lib/esm/chat.js +5 -5
- package/lib/esm/chat.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/chat.tsx +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tellescope/chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.142.0",
|
|
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.
|
|
38
|
-
"@tellescope/react-components": "^1.
|
|
39
|
-
"@tellescope/sdk": "^1.
|
|
40
|
-
"@tellescope/types-client": "^1.
|
|
41
|
-
"@tellescope/types-models": "^1.
|
|
42
|
-
"@tellescope/types-utilities": "^1.
|
|
43
|
-
"@tellescope/utilities": "^1.
|
|
37
|
+
"@tellescope/constants": "^1.142.0",
|
|
38
|
+
"@tellescope/react-components": "^1.142.0",
|
|
39
|
+
"@tellescope/sdk": "^1.142.0",
|
|
40
|
+
"@tellescope/types-client": "^1.142.0",
|
|
41
|
+
"@tellescope/types-models": "^1.142.0",
|
|
42
|
+
"@tellescope/types-utilities": "^1.142.0",
|
|
43
|
+
"@tellescope/utilities": "^1.142.0",
|
|
44
44
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
45
45
|
"@typescript-eslint/parser": "^4.33.0",
|
|
46
46
|
"eslint": "^7.32.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
53
53
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "26fa2efe5b68af7f3b0f18b4dc0b1746572b11a0",
|
|
56
56
|
"publishConfig": {
|
|
57
57
|
"access": "public"
|
|
58
58
|
}
|
package/src/chat.tsx
CHANGED
|
@@ -672,12 +672,14 @@ export interface CreateChatRoomProps extends Omit<UserAndEnduserSelectorProps, '
|
|
|
672
672
|
roomType?: ChatRoom['type'],
|
|
673
673
|
aboutEnduserId?: string,
|
|
674
674
|
limitToUsers?: User[],
|
|
675
|
+
addedUserIds?: string[],
|
|
675
676
|
}
|
|
676
677
|
export const CreateChatRoom = ({
|
|
677
678
|
roomTitle: defaultRoomTitle = "Group Chat",
|
|
678
679
|
onSuccess, onError,
|
|
679
680
|
roomType,
|
|
680
681
|
aboutEnduserId,
|
|
682
|
+
addedUserIds=[],
|
|
681
683
|
...props
|
|
682
684
|
} : CreateChatRoomProps) => {
|
|
683
685
|
const [, { createElement: createRoom }] = useChatRooms({ dontFetch: true })
|
|
@@ -689,7 +691,7 @@ export const CreateChatRoom = ({
|
|
|
689
691
|
|
|
690
692
|
createRoom({
|
|
691
693
|
enduserIds,
|
|
692
|
-
userIds,
|
|
694
|
+
userIds: Array.from(new Set([...userIds, ...addedUserIds])),
|
|
693
695
|
title: roomTitle,
|
|
694
696
|
type: roomType,
|
|
695
697
|
...aboutEnduserId ? { aboutEnduserId } : {},
|
|
@@ -702,6 +704,7 @@ export const CreateChatRoom = ({
|
|
|
702
704
|
|
|
703
705
|
return (
|
|
704
706
|
<UserAndEnduserSelector {...props} onSelect={handleCreateRoom}
|
|
707
|
+
initialSelected={addedUserIds} // allows for submitting without selection
|
|
705
708
|
titleInput={
|
|
706
709
|
<TextField autoFocus value={roomTitle} onChange={t => setRoomTitle(t)}
|
|
707
710
|
style={{
|