@ethora/chat-component 26.3.26 → 26.3.28
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/dist/assets/icons.d.ts +8 -0
- package/dist/components/ContextMenu/ContextMenuComponents.d.ts +10 -12
- package/dist/components/ExampleComponents/CustomMessage.d.ts +12 -19
- package/dist/components/MainComponents/ChooseChatMessage.d.ts +4 -4
- package/dist/components/MainComponents/EditWrapper.d.ts +4 -4
- package/dist/components/MainComponents/SystemMessage.d.ts +2 -5
- package/dist/components/MessageBubble/CustomDivider.d.ts +2 -6
- package/dist/components/MessageBubble/MessageReply.d.ts +2 -5
- package/dist/components/Modals/ModalReportChat/ModalReportChat.d.ts +1 -1
- package/dist/components/Modals/SettingsModals/SharedStyledComponents.d.ts +15 -61
- package/dist/components/Modals/SettingsModals/Visibility/StyledComponents.d.ts +7 -9
- package/dist/components/Modals/styledModalComponents.d.ts +23 -41
- package/dist/components/Notification/index.d.ts +2 -4
- package/dist/components/RoomComponents/styled/StyledRoomComponents.d.ts +6 -6
- package/dist/components/UsersList/StyledComponents.d.ts +4 -4
- package/dist/components/VideoCalls/VideoCallOverlay.d.ts +2 -0
- package/dist/components/VideoCalls/VideoCallSession.d.ts +12 -0
- package/dist/components/styled/ChatWrapperBox.d.ts +1 -1
- package/dist/components/styled/DateLabel.d.ts +2 -5
- package/dist/components/styled/Loader.d.ts +1 -1
- package/dist/components/styled/MediaModal.d.ts +2 -2
- package/dist/components/styled/NewMessageLabel.d.ts +1 -1
- package/dist/components/styled/RoomListComponents/index.d.ts +13 -21
- package/dist/components/styled/StyledComponents.d.ts +49 -79
- package/dist/components/styled/StyledInputComponents/MediaComponents.d.ts +11 -11
- package/dist/components/styled/StyledInputComponents/StyledInputComponents.d.ts +17 -26
- package/dist/components/styled/StyledInputComponents/VideoComponents.d.ts +6 -6
- package/dist/components/styled/TreadLabel.d.ts +2 -5
- package/dist/components/styled/VideoMessage.d.ts +6 -6
- package/dist/helpers/storeConsole.d.ts +1 -0
- package/dist/main.js +56096 -31994
- package/dist/main.js.map +1 -1
- package/dist/networking/api-requests/rooms.api.d.ts +3 -0
- package/dist/networking/callTokenStanza.d.ts +13 -0
- package/dist/roomStore/callSlice.d.ts +37 -0
- package/dist/roomStore/index.d.ts +4 -0
- package/dist/roomStore/roomsSlice.d.ts +12 -2
- package/dist/types/models/config.model.d.ts +6 -0
- package/dist/version.d.ts +1 -1
- package/package.json +4 -1
|
@@ -9,3 +9,6 @@ export declare function postReportRoom(data: PostReportRoom): Promise<any>;
|
|
|
9
9
|
export declare function postAddRoomMember(data: PostAddRoomMember): Promise<RoomMember[]>;
|
|
10
10
|
export declare function deleteRoomMember(data: DeleteRoomMember): Promise<any>;
|
|
11
11
|
export declare function deleteRoom(name: string): Promise<any>;
|
|
12
|
+
export declare function createChatCall(chatName: string, options?: {
|
|
13
|
+
kind?: 'audio' | 'video';
|
|
14
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Element } from 'ltx';
|
|
2
|
+
export declare const onCallTokenMessage: (stanza: Element) => boolean;
|
|
3
|
+
export type CallSignalState = 'ended' | 'declined' | 'cancelled' | 'rejected';
|
|
4
|
+
export declare const sendCallStateSignal: (state: CallSignalState, options?: {
|
|
5
|
+
peerXmppUsername?: string | null;
|
|
6
|
+
callId?: string | null;
|
|
7
|
+
roomBareName?: string | null;
|
|
8
|
+
}) => void;
|
|
9
|
+
export declare const sendCallInviteSignal: (kind: "audio" | "video", options: {
|
|
10
|
+
peerXmppUsername: string;
|
|
11
|
+
roomBareName: string;
|
|
12
|
+
callId?: string | null;
|
|
13
|
+
}) => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type CallPhase = 'idle' | 'requesting' | 'ringing-incoming' | 'connecting' | 'in-call' | 'error';
|
|
2
|
+
export type CallDirection = 'outgoing' | 'incoming' | null;
|
|
3
|
+
export type CallKind = 'audio' | 'video';
|
|
4
|
+
export interface CallState {
|
|
5
|
+
phase: CallPhase;
|
|
6
|
+
direction: CallDirection;
|
|
7
|
+
kind: CallKind;
|
|
8
|
+
roomJid: string | null;
|
|
9
|
+
roomName: string | null;
|
|
10
|
+
roomBareName: string | null;
|
|
11
|
+
callId: string | null;
|
|
12
|
+
peerXmppUsername: string | null;
|
|
13
|
+
token: string | null;
|
|
14
|
+
error: string | null;
|
|
15
|
+
startedAt: number | null;
|
|
16
|
+
}
|
|
17
|
+
export declare const startOutgoingCall: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
18
|
+
roomJid: string;
|
|
19
|
+
roomName?: string | null;
|
|
20
|
+
roomBareName?: string | null;
|
|
21
|
+
kind?: CallKind;
|
|
22
|
+
peerXmppUsername?: string | null;
|
|
23
|
+
}, "call/startOutgoingCall">, setIncomingCallToken: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
24
|
+
roomJid: string;
|
|
25
|
+
roomName?: string | null;
|
|
26
|
+
roomBareName?: string | null;
|
|
27
|
+
token: string;
|
|
28
|
+
kind?: CallKind;
|
|
29
|
+
callId?: string | null;
|
|
30
|
+
peerXmppUsername?: string | null;
|
|
31
|
+
}, "call/setIncomingCallToken">, setOutgoingCallToken: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
32
|
+
roomJid: string;
|
|
33
|
+
token: string;
|
|
34
|
+
callId?: string | null;
|
|
35
|
+
}, "call/setOutgoingCallToken">, acceptIncomingCall: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"call/acceptIncomingCall">, declineIncomingCall: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"call/declineIncomingCall">, endCall: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"call/endCall">, setCallError: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<string, "call/setCallError">, setCallPhase: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<CallPhase, "call/setCallPhase">, setCallKind: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<CallKind, "call/setCallKind">, resetCall: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"call/resetCall">;
|
|
36
|
+
declare const _default: import('redux').Reducer<import('immer').WritableDraft<CallState>>;
|
|
37
|
+
export default _default;
|
|
@@ -4,10 +4,12 @@ declare const rootReducer: Reducer<{
|
|
|
4
4
|
chatSettingStore: any;
|
|
5
5
|
rooms: any;
|
|
6
6
|
roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
|
|
7
|
+
call: import('immer').WritableDraft<import('./callSlice').CallState>;
|
|
7
8
|
}, import('redux').UnknownAction, Partial<{
|
|
8
9
|
chatSettingStore: any;
|
|
9
10
|
rooms: any;
|
|
10
11
|
roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
|
|
12
|
+
call: import('immer').WritableDraft<import('./callSlice').CallState>;
|
|
11
13
|
}>>;
|
|
12
14
|
export type RootState = ReturnType<typeof rootReducer>;
|
|
13
15
|
export declare const getActiveRoom: (state: RootState) => IRoom | null;
|
|
@@ -15,11 +17,13 @@ export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
|
|
|
15
17
|
chatSettingStore: any;
|
|
16
18
|
rooms: any;
|
|
17
19
|
roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
|
|
20
|
+
call: import('immer').WritableDraft<import('./callSlice').CallState>;
|
|
18
21
|
}, AnyAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
|
|
19
22
|
dispatch: import('redux-thunk').ThunkDispatch<{
|
|
20
23
|
chatSettingStore: any;
|
|
21
24
|
rooms: any;
|
|
22
25
|
roomHeapSlice: import('./roomHeapSlice').roomHeapSliceState;
|
|
26
|
+
call: import('immer').WritableDraft<import('./callSlice').CallState>;
|
|
23
27
|
}, undefined, import('redux').UnknownAction>;
|
|
24
28
|
}>, import('redux').StoreEnhancer]>>;
|
|
25
29
|
export type AppDispatch = typeof store.dispatch;
|
|
@@ -5,6 +5,7 @@ interface RoomMessagesState {
|
|
|
5
5
|
[jid: string]: IRoom;
|
|
6
6
|
};
|
|
7
7
|
activeRoomJID: string;
|
|
8
|
+
isChatUiVisible: boolean;
|
|
8
9
|
editAction?: EditAction;
|
|
9
10
|
isLoading: boolean;
|
|
10
11
|
usersSet: Record<string, RoomMember>;
|
|
@@ -24,7 +25,16 @@ interface PreloadRoomUpdate {
|
|
|
24
25
|
export declare const addRoomViaApi: import('@reduxjs/toolkit').AsyncThunk<void, {
|
|
25
26
|
room: IRoom;
|
|
26
27
|
xmpp: XmppClient;
|
|
27
|
-
},
|
|
28
|
+
}, {
|
|
29
|
+
state?: unknown;
|
|
30
|
+
dispatch?: import('redux-thunk').ThunkDispatch<unknown, unknown, import('redux').UnknownAction>;
|
|
31
|
+
extra?: unknown;
|
|
32
|
+
rejectValue?: unknown;
|
|
33
|
+
serializedErrorType?: unknown;
|
|
34
|
+
pendingMeta?: unknown;
|
|
35
|
+
fulfilledMeta?: unknown;
|
|
36
|
+
rejectedMeta?: unknown;
|
|
37
|
+
}>;
|
|
28
38
|
export declare const getLastMessageTimestamp: (state: RoomMessagesState, jid: string) => string | null;
|
|
29
39
|
export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
30
40
|
roomData: IRoom;
|
|
@@ -57,7 +67,7 @@ export declare const addRoom: import('@reduxjs/toolkit').ActionCreatorWithOption
|
|
|
57
67
|
chatJID?: string;
|
|
58
68
|
}, "roomMessages/setRoomNoMessages">, setCurrentRoom: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
59
69
|
roomJID: string | null;
|
|
60
|
-
}, "roomMessages/setCurrentRoom">, setRoomRole: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
70
|
+
}, "roomMessages/setCurrentRoom">, setChatUiVisible: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<boolean, "roomMessages/setChatUiVisible">, setRoomRole: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
61
71
|
chatJID: string;
|
|
62
72
|
role: string;
|
|
63
73
|
}, "roomMessages/setRoomRole">, setReactions: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<ReactionAction, "roomMessages/setReactions">, setLogoutState: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"roomMessages/setLogoutState">, setActiveMessage: import('@reduxjs/toolkit').ActionCreatorWithOptionalPayload<{
|
|
@@ -5,6 +5,11 @@ import { MessageBubble, MessageProps, IMessage } from './message.model';
|
|
|
5
5
|
import { Iso639_1Codes } from './language.model';
|
|
6
6
|
import { default as React } from 'react';
|
|
7
7
|
import { MessageNotificationToastProps } from '../../components/MessageNotification/MessageNotificationToast';
|
|
8
|
+
export interface VideoCallsConfig {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
livekitUrl: string;
|
|
11
|
+
allowedRoomTypes?: Array<'private'>;
|
|
12
|
+
}
|
|
8
13
|
export interface FBConfig {
|
|
9
14
|
apiKey: string;
|
|
10
15
|
authDomain: string;
|
|
@@ -226,4 +231,5 @@ export interface IConfig {
|
|
|
226
231
|
source?: 'service_worker' | 'foreground';
|
|
227
232
|
}) => void | Promise<void>;
|
|
228
233
|
};
|
|
234
|
+
videoCalls?: VideoCallsConfig;
|
|
229
235
|
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.
|
|
1
|
+
export declare const ETHORA_CHAT_COMPONENT_VERSION = "26.03.28";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethora/chat-component",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@emoji-mart/data": "^1.2.1",
|
|
31
31
|
"@emoji-mart/react": "^1.1.1",
|
|
32
|
+
"@livekit/components-react": "^2.9.20",
|
|
33
|
+
"@livekit/components-styles": "^1.2.0",
|
|
32
34
|
"@reduxjs/toolkit": "^2.8.2",
|
|
33
35
|
"@types/styled-components": "^5.1.34",
|
|
34
36
|
"@xmpp/client": "^0.13.6",
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
"firebase": "^11.9.1",
|
|
38
40
|
"i": "^0.3.7",
|
|
39
41
|
"js-sha256": "^0.11.1",
|
|
42
|
+
"livekit-client": "^2.18.3",
|
|
40
43
|
"ltx": "^3.1.2",
|
|
41
44
|
"react": "^18.3.1",
|
|
42
45
|
"react-dom": "^18.3.1",
|