@ethora/chat-component-rn 26.10.2 → 26.10.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/lib/commonjs/components/Header/HeaderRoomList.js +72 -69
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +13 -11
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageContainer.js +10 -2
- package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +8 -18
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +17 -14
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +131 -17
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +6 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +203 -0
- package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/CallButtons.js +3 -1
- package/lib/commonjs/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +123 -129
- package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js +212 -414
- package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/callActions.js +61 -0
- package/lib/commonjs/components/VideoCalls/callActions.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js +461 -0
- package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/callUiStore.js +91 -0
- package/lib/commonjs/components/VideoCalls/callUiStore.js.map +1 -0
- package/lib/commonjs/components/VideoCalls/livekitRuntime.js +1 -0
- package/lib/commonjs/components/VideoCalls/livekitRuntime.js.map +1 -1
- package/lib/commonjs/components/VideoCalls/useDraggable.js +59 -0
- package/lib/commonjs/components/VideoCalls/useDraggable.js.map +1 -0
- package/lib/commonjs/helpers/createRoomFromApi.js +4 -0
- package/lib/commonjs/helpers/createRoomFromApi.js.map +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js +1 -1
- package/lib/commonjs/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/commonjs/helpers/roomUserCount.js +7 -1
- package/lib/commonjs/helpers/roomUserCount.js.map +1 -1
- package/lib/commonjs/helpers/uniqueMembers.js +36 -0
- package/lib/commonjs/helpers/uniqueMembers.js.map +1 -0
- package/lib/commonjs/hooks/useLeaveRoom.js +52 -0
- package/lib/commonjs/hooks/useLeaveRoom.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +24 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +36 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/networking/callTokenStanza.js +47 -3
- package/lib/commonjs/networking/callTokenStanza.js.map +1 -1
- package/lib/commonjs/networking/xmppClient.js +9 -2
- package/lib/commonjs/networking/xmppClient.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +73 -70
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +15 -13
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/MessageContainer.js +10 -2
- package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +8 -18
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +18 -15
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +132 -18
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +6 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/VideoCalls/ActiveCallBar.js +195 -0
- package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -0
- package/lib/module/components/VideoCalls/CallButtons.js +3 -1
- package/lib/module/components/VideoCalls/CallButtons.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallOverlay.js +125 -131
- package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
- package/lib/module/components/VideoCalls/VideoCallSession.js +213 -417
- package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
- package/lib/module/components/VideoCalls/callActions.js +55 -0
- package/lib/module/components/VideoCalls/callActions.js.map +1 -0
- package/lib/module/components/VideoCalls/callSessionController.js +450 -0
- package/lib/module/components/VideoCalls/callSessionController.js.map +1 -0
- package/lib/module/components/VideoCalls/callUiStore.js +84 -0
- package/lib/module/components/VideoCalls/callUiStore.js.map +1 -0
- package/lib/module/components/VideoCalls/livekitRuntime.js +1 -0
- package/lib/module/components/VideoCalls/livekitRuntime.js.map +1 -1
- package/lib/module/components/VideoCalls/useDraggable.js +55 -0
- package/lib/module/components/VideoCalls/useDraggable.js.map +1 -0
- package/lib/module/helpers/createRoomFromApi.js +4 -0
- package/lib/module/helpers/createRoomFromApi.js.map +1 -1
- package/lib/module/helpers/incomingCallFromPush.js +1 -1
- package/lib/module/helpers/incomingCallFromPush.js.map +1 -1
- package/lib/module/helpers/roomUserCount.js +7 -1
- package/lib/module/helpers/roomUserCount.js.map +1 -1
- package/lib/module/helpers/uniqueMembers.js +31 -0
- package/lib/module/helpers/uniqueMembers.js.map +1 -0
- package/lib/module/hooks/useLeaveRoom.js +48 -0
- package/lib/module/hooks/useLeaveRoom.js.map +1 -0
- package/lib/module/i18n/strings.js +24 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +35 -1
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/networking/callTokenStanza.js +47 -3
- package/lib/module/networking/callTokenStanza.js.map +1 -1
- package/lib/module/networking/xmppClient.js +8 -1
- package/lib/module/networking/xmppClient.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts +21 -0
- package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/CallButtons.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts +0 -6
- package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts +15 -22
- package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/callActions.d.ts +15 -0
- package/lib/typescript/components/VideoCalls/callActions.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts +63 -0
- package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/callUiStore.d.ts +24 -0
- package/lib/typescript/components/VideoCalls/callUiStore.d.ts.map +1 -0
- package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts +2 -0
- package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts.map +1 -1
- package/lib/typescript/components/VideoCalls/useDraggable.d.ts +19 -0
- package/lib/typescript/components/VideoCalls/useDraggable.d.ts.map +1 -0
- package/lib/typescript/helpers/createRoomFromApi.d.ts.map +1 -1
- package/lib/typescript/helpers/roomUserCount.d.ts +1 -0
- package/lib/typescript/helpers/roomUserCount.d.ts.map +1 -1
- package/lib/typescript/helpers/uniqueMembers.d.ts +11 -0
- package/lib/typescript/helpers/uniqueMembers.d.ts.map +1 -0
- package/lib/typescript/hooks/useLeaveRoom.d.ts +9 -0
- package/lib/typescript/hooks/useLeaveRoom.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +8 -0
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/networking/callTokenStanza.d.ts.map +1 -1
- package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Header/HeaderRoomList.tsx +66 -61
- package/src/components/MainComponents/ChatHeader.tsx +13 -8
- package/src/components/MainComponents/MessageContainer.tsx +14 -1
- package/src/components/MainComponents/RoomList.tsx +8 -14
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +16 -13
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +167 -36
- package/src/components/RoomComponents/ChatRoomItem.tsx +8 -1
- package/src/components/VideoCalls/ActiveCallBar.tsx +176 -0
- package/src/components/VideoCalls/CallButtons.tsx +5 -1
- package/src/components/VideoCalls/VideoCallOverlay.tsx +153 -183
- package/src/components/VideoCalls/VideoCallSession.tsx +227 -439
- package/src/components/VideoCalls/callActions.ts +63 -0
- package/src/components/VideoCalls/callSessionController.ts +439 -0
- package/src/components/VideoCalls/callUiStore.ts +76 -0
- package/src/components/VideoCalls/livekitRuntime.ts +3 -0
- package/src/components/VideoCalls/useDraggable.ts +46 -0
- package/src/helpers/createRoomFromApi.tsx +2 -0
- package/src/helpers/incomingCallFromPush.ts +2 -2
- package/src/helpers/roomUserCount.ts +6 -2
- package/src/helpers/uniqueMembers.ts +26 -0
- package/src/hooks/useLeaveRoom.ts +42 -0
- package/src/i18n/strings.ts +24 -0
- package/src/networking/api-requests/rooms.api.ts +28 -1
- package/src/networking/callTokenStanza.ts +46 -6
- package/src/networking/xmppClient.ts +10 -1
- package/src/version.ts +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useCallUi = exports.setCallMinimized = exports.registerCallBarHost = exports.getCallUiState = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _roomStore = require("../../roomStore");
|
|
9
|
+
/**
|
|
10
|
+
* UI state of the call shared between the overlay and the header bar:
|
|
11
|
+
* whether the call is minimized, and which header (if any) currently hosts
|
|
12
|
+
* the minimized bar.
|
|
13
|
+
*
|
|
14
|
+
* Minimized, the call is a strip under the visible header (ChatHeader or
|
|
15
|
+
* HeaderRoomList), Telegram-style, instead of a floating panel. Each header
|
|
16
|
+
* registers itself while mounted; the most recently mounted one shows the
|
|
17
|
+
* strip (on an iPad split view both are mounted, and only one strip should
|
|
18
|
+
* appear). With no header mounted (the user is on a host-app screen) the
|
|
19
|
+
* overlay docks the same strip to the top of the screen.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
let state = {
|
|
23
|
+
minimized: false,
|
|
24
|
+
barHost: null
|
|
25
|
+
};
|
|
26
|
+
const hosts = [];
|
|
27
|
+
let nextHostId = 1;
|
|
28
|
+
const listeners = new Set();
|
|
29
|
+
let storeUnsubscribe = null;
|
|
30
|
+
const emit = patch => {
|
|
31
|
+
state = {
|
|
32
|
+
...state,
|
|
33
|
+
...patch
|
|
34
|
+
};
|
|
35
|
+
listeners.forEach(listener => listener());
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// The next call always opens full-screen.
|
|
39
|
+
const ensureStoreWatcher = () => {
|
|
40
|
+
if (storeUnsubscribe) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
storeUnsubscribe = _roomStore.store.subscribe(() => {
|
|
44
|
+
if (state.minimized && _roomStore.store.getState().call.phase === 'idle') {
|
|
45
|
+
emit({
|
|
46
|
+
minimized: false
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
const subscribe = listener => {
|
|
52
|
+
ensureStoreWatcher();
|
|
53
|
+
listeners.add(listener);
|
|
54
|
+
return () => {
|
|
55
|
+
listeners.delete(listener);
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const getSnapshot = () => state;
|
|
59
|
+
|
|
60
|
+
/** Current state, for non-React code and tests. */
|
|
61
|
+
const getCallUiState = () => state;
|
|
62
|
+
exports.getCallUiState = getCallUiState;
|
|
63
|
+
const useCallUi = () => (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
64
|
+
exports.useCallUi = useCallUi;
|
|
65
|
+
const setCallMinimized = minimized => {
|
|
66
|
+
if (state.minimized !== minimized) {
|
|
67
|
+
emit({
|
|
68
|
+
minimized
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.setCallMinimized = setCallMinimized;
|
|
73
|
+
const registerCallBarHost = onId => {
|
|
74
|
+
const id = nextHostId++;
|
|
75
|
+
hosts.push(id);
|
|
76
|
+
onId?.(id);
|
|
77
|
+
emit({
|
|
78
|
+
barHost: id
|
|
79
|
+
});
|
|
80
|
+
return () => {
|
|
81
|
+
const index = hosts.indexOf(id);
|
|
82
|
+
if (index >= 0) {
|
|
83
|
+
hosts.splice(index, 1);
|
|
84
|
+
}
|
|
85
|
+
emit({
|
|
86
|
+
barHost: hosts.length ? hosts[hosts.length - 1] : null
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
exports.registerCallBarHost = registerCallBarHost;
|
|
91
|
+
//# sourceMappingURL=callUiStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_roomStore","state","minimized","barHost","hosts","nextHostId","listeners","Set","storeUnsubscribe","emit","patch","forEach","listener","ensureStoreWatcher","store","subscribe","getState","call","phase","add","delete","getSnapshot","getCallUiState","exports","useCallUi","useSyncExternalStore","setCallMinimized","registerCallBarHost","onId","id","push","index","indexOf","splice","length"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/callUiStore.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,IAAIE,KAAkB,GAAG;EAAEC,SAAS,EAAE,KAAK;EAAEC,OAAO,EAAE;AAAK,CAAC;AAC5D,MAAMC,KAAe,GAAG,EAAE;AAC1B,IAAIC,UAAU,GAAG,CAAC;AAClB,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,IAAIC,gBAAqC,GAAG,IAAI;AAEhD,MAAMC,IAAI,GAAIC,KAA2B,IAAK;EAC5CT,KAAK,GAAG;IAAE,GAAGA,KAAK;IAAE,GAAGS;EAAM,CAAC;EAC9BJ,SAAS,CAACK,OAAO,CAAEC,QAAQ,IAAKA,QAAQ,CAAC,CAAC,CAAC;AAC7C,CAAC;;AAED;AACA,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIL,gBAAgB,EAAE;IAAC;EAAO;EAC9BA,gBAAgB,GAAGM,gBAAK,CAACC,SAAS,CAAC,MAAM;IACvC,IAAId,KAAK,CAACC,SAAS,IAAIY,gBAAK,CAACE,QAAQ,CAAC,CAAC,CAACC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EN,OAAO,EAAEC,KAAK,CAAC8B,MAAM,GAAG9B,KAAK,CAACA,KAAK,CAAC8B,MAAM,GAAG,CAAC,CAAC,GAAG;IAAK,CAAC,CAAC;EAClE,CAAC;AACH,CAAC;AAACX,OAAA,CAAAI,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cached","isLiveKitAvailable","loadLiveKit","exports","undefined","rn","require","core","Room","RoomEvent","Track","ConnectionState","VideoTrack","AudioSession","registerGlobals","globalsRegistered","ensureLiveKitGlobals","runtime","__resetLiveKitRuntimeForTests"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/livekitRuntime.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["cached","isLiveKitAvailable","loadLiveKit","exports","undefined","rn","require","core","Room","RoomEvent","Track","ConnectionState","VideoPresets","VideoTrack","AudioSession","registerGlobals","globalsRegistered","ensureLiveKitGlobals","runtime","__resetLiveKitRuntimeForTests"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/livekitRuntime.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA,IAAIA,MAAyC;AAEtC,MAAMC,kBAAkB,GAAGA,CAAA,KAAeC,WAAW,CAAC,CAAC,KAAK,IAAI;;AAEvE;AACA;AACA;AACA;AACA;AAJAC,OAAA,CAAAF,kBAAA,GAAAA,kBAAA;AAKO,MAAMC,WAAW,GAAGA,CAAA,KAA6B;EACtD,IAAIF,MAAM,KAAKI,SAAS,EAAE;IACxB,OAAOJ,MAAM;EACf;EAEA,IAAI;IACF;IACA,MAAMK,EAAE,GAAGC,OAAO,CAAC,uBAAuB,CAAC;IAC3C;IACA;IACA;IACA;IACA;IACA,MAAMC,IAAI,GAAGD,OAAO,CAAC,gBAAgB,CAAC;IAEtCN,MAAM,GAAG;MACPQ,IAAI,EAAED,IAAI,CAACC,IAAI;MACfC,SAAS,EAAEF,IAAI,CAACE,SAAS;MACzBC,KAAK,EAAEH,IAAI,CAACG,KAAK;MACjBC,eAAe,EAAEJ,IAAI,CAACI,eAAe;MACrCC,YAAY,EAAEL,IAAI,CAACK,YAAY;MAC/BC,UAAU,EAAER,EAAE,CAACQ,UAAU;MACzBC,YAAY,EAAET,EAAE,CAACS,YAAY;MAC7BC,eAAe,EAAEV,EAAE,CAACU;IACtB,CAAC;EACH,CAAC,CAAC,MAAM;IACNf,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf,CAAC;AAACG,OAAA,CAAAD,WAAA,GAAAA,WAAA;AAEF,IAAIc,iBAAiB,GAAG,KAAK;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAAIC,OAAuB,IAAW;EACrE,IAAIF,iBAAiB,EAAE;IAAC;EAAO;EAC/B,IAAI;IACFE,OAAO,CAACH,eAAe,GAAG,CAAC;EAC7B,CAAC,CAAC,MAAM;IACN;EAAA;EAEFC,iBAAiB,GAAG,IAAI;AAC1B,CAAC;;AAED;AAAAb,OAAA,CAAAc,oBAAA,GAAAA,oBAAA;AACO,MAAME,6BAA6B,GAAGA,CAAA,KAAY;EACvDnB,MAAM,GAAGI,SAAS;EAClBY,iBAAiB,GAAG,KAAK;AAC3B,CAAC;AAACb,OAAA,CAAAgB,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDraggable = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
/**
|
|
10
|
+
* Drag a floating element around (web's useDraggable, for the self-view
|
|
11
|
+
* tile and the minimized call panel). The offset is kept between drags.
|
|
12
|
+
*
|
|
13
|
+
* The responder only claims the gesture once the finger actually moves a
|
|
14
|
+
* few points, so taps still reach the buttons inside the dragged element.
|
|
15
|
+
*/
|
|
16
|
+
const useDraggable = () => {
|
|
17
|
+
const position = (0, _react.useRef)(new _reactNative.Animated.ValueXY({
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0
|
|
20
|
+
})).current;
|
|
21
|
+
const offset = (0, _react.useRef)({
|
|
22
|
+
x: 0,
|
|
23
|
+
y: 0
|
|
24
|
+
});
|
|
25
|
+
const panHandlers = (0, _react.useMemo)(() => _reactNative.PanResponder.create({
|
|
26
|
+
onMoveShouldSetPanResponder: (_event, gesture) => Math.abs(gesture.dx) > 4 || Math.abs(gesture.dy) > 4,
|
|
27
|
+
onPanResponderGrant: () => {
|
|
28
|
+
position.setOffset(offset.current);
|
|
29
|
+
position.setValue({
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0
|
|
32
|
+
});
|
|
33
|
+
},
|
|
34
|
+
onPanResponderMove: _reactNative.Animated.event([null, {
|
|
35
|
+
dx: position.x,
|
|
36
|
+
dy: position.y
|
|
37
|
+
}], {
|
|
38
|
+
useNativeDriver: false
|
|
39
|
+
}),
|
|
40
|
+
onPanResponderRelease: (_event, gesture) => {
|
|
41
|
+
offset.current = {
|
|
42
|
+
x: offset.current.x + gesture.dx,
|
|
43
|
+
y: offset.current.y + gesture.dy
|
|
44
|
+
};
|
|
45
|
+
position.flattenOffset();
|
|
46
|
+
},
|
|
47
|
+
onPanResponderTerminate: () => {
|
|
48
|
+
position.flattenOffset();
|
|
49
|
+
}
|
|
50
|
+
}).panHandlers, [position]);
|
|
51
|
+
return {
|
|
52
|
+
panHandlers,
|
|
53
|
+
style: {
|
|
54
|
+
transform: position.getTranslateTransform()
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
exports.useDraggable = useDraggable;
|
|
59
|
+
//# sourceMappingURL=useDraggable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","useDraggable","position","useRef","Animated","ValueXY","x","y","current","offset","panHandlers","useMemo","PanResponder","create","onMoveShouldSetPanResponder","_event","gesture","Math","abs","dx","dy","onPanResponderGrant","setOffset","setValue","onPanResponderMove","event","useNativeDriver","onPanResponderRelease","flattenOffset","onPanResponderTerminate","style","transform","getTranslateTransform","exports"],"sourceRoot":"../../../../src","sources":["components/VideoCalls/useDraggable.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAMC,QAAQ,GAAG,IAAAC,aAAM,EAAC,IAAIC,qBAAQ,CAACC,OAAO,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE;EAAE,CAAC,CAAC,CAAC,CAACC,OAAO;EACrE,MAAMC,MAAM,GAAG,IAAAN,aAAM,EAAC;IAAEG,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE;EAAE,CAAC,CAAC;EAErC,MAAMG,WAAW,GAAG,IAAAC,cAAO,EACzB,MACEC,yBAAY,CAACC,MAAM,CAAC;IAClBC,2BAA2B,EAAEA,CAACC,MAAM,EAAEC,OAAO,KAC3CC,IAAI,CAACC,GAAG,CAACF,OAAO,CAACG,EAAE,CAAC,GAAG,CAAC,IAAIF,IAAI,CAACC,GAAG,CAACF,OAAO,CAACI,EAAE,CAAC,GAAG,CAAC;IACtDC,mBAAmB,EAAEA,CAAA,KAAM;MACzBnB,QAAQ,CAACoB,SAAS,CAACb,MAAM,CAACD,OAAO,CAAC;MAClCN,QAAQ,CAACqB,QAAQ,CAAC;QAAEjB,CAAC,EAAE,CAAC;QAAEC,CAAC,EAAE;MAAE,CAAC,CAAC;IACnC,CAAC;IACDiB,kBAAkB,EAAEpB,qBAAQ,CAACqB,KAAK,CAChC,CAAC,IAAI,EAAE;MAAEN,EAAE,EAAEjB,QAAQ,CAACI,CAAC;MAAEc,EAAE,EAAElB,QAAQ,CAACK;IAAE,CAAC,CAAC,EAC1C;MAAEmB,eAAe,EAAE;IAAM,CAC3B,CAAC;IACDC,qBAAqB,EAAEA,CAACZ,MAAM,EAAEC,OAAO,KAAK;MAC1CP,MAAM,CAACD,OAAO,GAAG;QACfF,CAAC,EAAEG,MAAM,CAACD,OAAO,CAACF,CAAC,GAAGU,OAAO,CAACG,EAAE;QAChCZ,CAAC,EAAEE,MAAM,CAACD,OAAO,CAACD,CAAC,GAAGS,OAAO,CAACI;MAChC,CAAC;MACDlB,QAAQ,CAAC0B,aAAa,CAAC,CAAC;IAC1B,CAAC;IACDC,uBAAuB,EAAEA,CAAA,KAAM;MAC7B3B,QAAQ,CAAC0B,aAAa,CAAC,CAAC;IAC1B;EACF,CAAC,CAAC,CAAClB,WAAW,EAChB,CAACR,QAAQ,CACX,CAAC;EAED,OAAO;IACLQ,WAAW;IACXoB,KAAK,EAAE;MAAEC,SAAS,EAAE7B,QAAQ,CAAC8B,qBAAqB,CAAC;IAAE;EACvD,CAAC;AACH,CAAC;AAACC,OAAA,CAAAhC,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.readApiUsersCnt = exports.readApiUnreadCount = exports.mapApiLastMessage = exports.createRoomFromApi = void 0;
|
|
7
|
+
var _uniqueMembers = require("./uniqueMembers");
|
|
7
8
|
/**
|
|
8
9
|
* Maps the flattened `lastMessage` doc `GET /v1/chats/my` embeds per room
|
|
9
10
|
* into the shape a live message already takes. Backends differ in whether
|
|
@@ -75,6 +76,9 @@ const createRoomFromApi = (room, service = 'conference.dev.xmpp.ethoradev.com',
|
|
|
75
76
|
const lastMessage = mapApiLastMessage(room?.lastMessage, jid);
|
|
76
77
|
const roomData = {
|
|
77
78
|
...room,
|
|
79
|
+
...(Array.isArray(room?.members) ? {
|
|
80
|
+
members: (0, _uniqueMembers.uniqueMembers)(room.members)
|
|
81
|
+
} : {}),
|
|
78
82
|
id: room?._id || '',
|
|
79
83
|
jid,
|
|
80
84
|
name: room?.title || '',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["mapApiLastMessage","apiLastMessage","roomJid","body","String","trim","undefined","senderName","senderFirstName","senderLastName","id","messageId","stanzaId","xmppId","date","createdAt","isDeleted","user","fromUserId","from","name","exports","readApiUnreadCount","item","raw","unreadCount","Number","isFinite","Math","max","floor","readApiUsersCnt","fallback","membersLen","Array","isArray","members","length","total","usersCnt","participants","seedTimestamp","seed","ms","Date","getTime","NaN","createRoomFromApi","room","service","usersArrayLength","jid","apiUnreadCount","lastMessage","roomData","_id","title","messages","isLoading","roomBg","icon","picture","unreadMessages","apiUnreadSeededAt","now","lastViewedTimestamp","lastMessageTimestamp","error","console","log"],"sourceRoot":"../../../src","sources":["helpers/createRoomFromApi.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["_uniqueMembers","require","mapApiLastMessage","apiLastMessage","roomJid","body","String","trim","undefined","senderName","senderFirstName","senderLastName","id","messageId","stanzaId","xmppId","date","createdAt","isDeleted","user","fromUserId","from","name","exports","readApiUnreadCount","item","raw","unreadCount","Number","isFinite","Math","max","floor","readApiUsersCnt","fallback","membersLen","Array","isArray","members","length","total","usersCnt","participants","seedTimestamp","seed","ms","Date","getTime","NaN","createRoomFromApi","room","service","usersArrayLength","jid","apiUnreadCount","lastMessage","roomData","uniqueMembers","_id","title","messages","isLoading","roomBg","icon","picture","unreadMessages","apiUnreadSeededAt","now","lastViewedTimestamp","lastMessageTimestamp","error","console","log"],"sourceRoot":"../../../src","sources":["helpers/createRoomFromApi.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAIA;AACA;AACA;A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|
62
62
|
_roomStore.store.dispatch((0, _callSlice.setIncomingCallToken)({
|
|
63
63
|
roomJid,
|
|
64
|
-
roomName: parsed.callerName || resolved?.name || null,
|
|
64
|
+
roomName: parsed.callerName || resolved?.title || resolved?.name || null,
|
|
65
65
|
roomBareName: parsed.roomBareName,
|
|
66
66
|
token: parsed.token,
|
|
67
67
|
kind: parsed.kind,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_roomStore","require","_callSlice","_callPush","handleCallPush","data","isCallPush","parsed","parseCallPush","state","store","getState","chatSettingStore","config","videoCalls","enabled","current","call","phase","sameCall","callId","roomBareName","token","rooms","resolved","Object","values","find","room","jid","split","roomRef","roomJid","includes","dispatch","setIncomingCallToken","roomName","callerName","name","kind","peerXmppUsername","callerXmppUsername","exports"],"sourceRoot":"../../../src","sources":["helpers/incomingCallFromPush.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,cAAc,GACzBC,IAA4C,IAChC;EACZ,IAAI,CAAC,IAAAC,oBAAU,EAACD,IAAI,CAAC,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAME,MAAM,GAAG,IAAAC,uBAAa,EAACH,IAAI,CAAC;EAClC,MAAMI,KAAK,GAAGC,gBAAK,CAACC,QAAQ,CAAC,CAAC;;EAE9B;EACA;EACA,IAAIF,KAAK,CAACG,gBAAgB,CAACC,MAAM,EAAEC,UAAU,EAAEC,OAAO,KAAK,IAAI,EAAE;IAC/D,OAAO,IAAI;EACb;;EAEA;EACA;EACA;EACA,MAAMC,OAAO,GAAGP,KAAK,CAACQ,IAAI;EAC1B,IAAID,OAAO,CAACE,KAAK,KAAK,MAAM,EAAE;IAC5B,MAAMC,QAAQ,GACX,CAAC,CAACZ,MAAM,CAACa,MAAM,IAAIb,MAAM,CAACa,MAAM,KAAKJ,OAAO,CAACI,MAAM,IACnD,CAAC,CAACb,MAAM,CAACc,YAAY,IAAId,MAAM,CAACc,YAAY,KAAKL,OAAO,CAACK,YAAa;IACzE,IAAIF,QAAQ,IAAIH,OAAO,CAACE,KAAK,KAAK,SAAS,EAAE;MAC3C,OAAO,IAAI;IACb;EACF;;EAEA;EACA;EACA;EACA;EACA,IAAI,CAACX,MAAM,CAACe,KAAK,EAAE;IACjB,OAAO,IAAI;EACb;;EAEA;EACA;EACA,MAAMC,KAAK,GAAGd,KAAK,CAACc,KAAK,CAACA,KAAK,IAAI,CAAC,CAAC;EACrC,MAAMC,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACH,KAAK,CAAC,CAACI,IAAI,CACvCC,IAAS,IACR,CAACA,IAAI,EAAEC,GAAG,IAAI,EAAE,EAAEC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAKvB,MAAM,CAACc,YAAY,IACvDO,IAAI,EAAEC,GAAG,KAAKtB,MAAM,CAACwB,OACzB,
|
|
1
|
+
{"version":3,"names":["_roomStore","require","_callSlice","_callPush","handleCallPush","data","isCallPush","parsed","parseCallPush","state","store","getState","chatSettingStore","config","videoCalls","enabled","current","call","phase","sameCall","callId","roomBareName","token","rooms","resolved","Object","values","find","room","jid","split","roomRef","roomJid","includes","dispatch","setIncomingCallToken","roomName","callerName","title","name","kind","peerXmppUsername","callerXmppUsername","exports"],"sourceRoot":"../../../src","sources":["helpers/incomingCallFromPush.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,cAAc,GACzBC,IAA4C,IAChC;EACZ,IAAI,CAAC,IAAAC,oBAAU,EAACD,IAAI,CAAC,EAAE;IACrB,OAAO,KAAK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CAACwB,OAAO,GAAG,EAAE,CAAC;EACxE,IAAI,CAACC,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEAtB,gBAAK,CAACwB,QAAQ,CACZ,IAAAC,+BAAoB,EAAC;IACnBH,OAAO;IACPI,QAAQ,EAAE7B,MAAM,CAAC8B,UAAU,IAAIb,QAAQ,EAAEc,KAAK,IAAId,QAAQ,EAAEe,IAAI,IAAI,IAAI;IACxElB,YAAY,EAAEd,MAAM,CAACc,YAAY;IACjCC,KAAK,EAAEf,MAAM,CAACe,KAAK;IACnBkB,IAAI,EAAEjC,MAAM,CAACiC,IAAI;IACjBpB,MAAM,EAAEb,MAAM,CAACa,MAAM;IACrBqB,gBAAgB,EAAElC,MAAM,CAACmC;EAC3B,CAAC,CACH,CAAC;EAED,OAAO,IAAI;AACb,CAAC;AAACC,OAAA,CAAAvC,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -12,12 +12,18 @@ exports.isRoomMembersTruncated = exports.getRoomUserCount = exports.adjustUsersC
|
|
|
12
12
|
const getRoomUserCount = room => {
|
|
13
13
|
const members = Array.isArray(room?.members) ? room.members.length : 0;
|
|
14
14
|
const cnt = typeof room?.usersCnt === 'number' && Number.isFinite(room.usersCnt) ? room.usersCnt : 0;
|
|
15
|
-
|
|
15
|
+
const total = Math.max(cnt, members);
|
|
16
|
+
// A private chat is two people by definition; the server's usersCnt has
|
|
17
|
+
// been seen to drift above that (3 for a 1:1 room).
|
|
18
|
+
return room?.type === 'private' ? Math.min(total, 2) : total;
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
/** True when the room is known to have more users than members loaded. */
|
|
19
22
|
exports.getRoomUserCount = getRoomUserCount;
|
|
20
23
|
const isRoomMembersTruncated = room => {
|
|
24
|
+
if (room?.type === 'private') {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
21
27
|
const members = Array.isArray(room?.members) ? room.members.length : 0;
|
|
22
28
|
const cnt = typeof room?.usersCnt === 'number' && Number.isFinite(room.usersCnt) ? room.usersCnt : 0;
|
|
23
29
|
return cnt > members;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getRoomUserCount","room","members","Array","isArray","length","cnt","usersCnt","Number","isFinite","Math","max","exports","isRoomMembersTruncated","adjustUsersCnt","delta","nextMembersLength","current"],"sourceRoot":"../../../src","sources":["helpers/roomUserCount.ts"],"mappings":";;;;;;AAQA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAIC,IAAiB,IAAa;EAC7D,MAAMC,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,
|
|
1
|
+
{"version":3,"names":["getRoomUserCount","room","members","Array","isArray","length","cnt","usersCnt","Number","isFinite","total","Math","max","type","min","exports","isRoomMembersTruncated","adjustUsersCnt","delta","nextMembersLength","current"],"sourceRoot":"../../../src","sources":["helpers/roomUserCount.ts"],"mappings":";;;;;;AAQA;AACA;AACA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAIC,IAAiB,IAAa;EAC7D,MAAMC,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,MAAMG,KAAK,GAAGC,IAAI,CAACC,GAAG,CAACN,GAAG,EAAEJ,OAAO,CAAC;EACpC;EACA;EACA,OAAQD,IAAI,EAAyBY,IAAI,KAAK,SAAS,GAAGF,IAAI,CAACG,GAAG,CAACJ,KAAK,EAAE,CAAC,CAAC,GAAGA,KAAK;AACtF,CAAC;;AAED;AAAAK,OAAA,CAAAf,gBAAA,GAAAA,gBAAA;AACO,MAAMgB,sBAAsB,GAAIf,IAAiB,IAAc;EACpE,IAAKA,IAAI,EAAyBY,IAAI,KAAK,SAAS,EAAE;IAAC,OAAO,KAAK;EAAC;EACpE,MAAMX,OAAO,GAAGC,KAAK,CAACC,OAAO,CAACH,IAAI,EAAEC,OAAO,CAAC,GAAGD,IAAI,CAACC,OAAO,CAACG,MAAM,GAAG,CAAC;EACtE,MAAMC,GAAG,GACP,OAAOL,IAAI,EAAEM,QAAQ,KAAK,QAAQ,IAAIC,MAAM,CAACC,QAAQ,CAACR,IAAI,CAACM,QAAQ,CAAC,GAChEN,IAAI,CAACM,QAAQ,GACb,CAAC;EACP,OAAOD,GAAG,GAAGJ,OAAO;AACtB,CAAC;;AAED;AACA;AACA;AACA;AAHAa,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AAIO,MAAMC,cAAc,GAAGA,CAC5BhB,IAAiB,EACjBiB,KAAa,EACbC,iBAAyB,KACd;EACX,MAAMC,OAAO,GAAGpB,gBAAgB,CAACC,IAAI,CAAC;EACtC,OAAOU,IAAI,CAACC,GAAG,CAACO,iBAAiB,EAAEC,OAAO,GAAGF,KAAK,EAAE,CAAC,CAAC;AACxD,CAAC;AAACH,OAAA,CAAAE,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.uniqueMembers = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Drop repeated entries from a room's member list, keeping the first.
|
|
9
|
+
*
|
|
10
|
+
* The same person could appear twice in a 1:1 chat ("Members: 3", four
|
|
11
|
+
* rows): the list came back from the server with repeats after the private
|
|
12
|
+
* chat was requested again for an existing room. Members are keyed by
|
|
13
|
+
* whatever identity the entry carries: xmppUsername, then _id, then the
|
|
14
|
+
* JID's localpart.
|
|
15
|
+
*/
|
|
16
|
+
const uniqueMembers = members => {
|
|
17
|
+
if (!Array.isArray(members)) {
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
const seen = new Set();
|
|
21
|
+
const out = [];
|
|
22
|
+
for (const member of members) {
|
|
23
|
+
const m = member;
|
|
24
|
+
const key = String(m?.xmppUsername || m?._id || String(m?.jid || '').split('@')[0] || '').trim();
|
|
25
|
+
if (key) {
|
|
26
|
+
if (seen.has(key)) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
seen.add(key);
|
|
30
|
+
}
|
|
31
|
+
out.push(member);
|
|
32
|
+
}
|
|
33
|
+
return out;
|
|
34
|
+
};
|
|
35
|
+
exports.uniqueMembers = uniqueMembers;
|
|
36
|
+
//# sourceMappingURL=uniqueMembers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["uniqueMembers","members","Array","isArray","seen","Set","out","member","m","key","String","xmppUsername","_id","jid","split","trim","has","add","push","exports"],"sourceRoot":"../../../src","sources":["helpers/uniqueMembers.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,aAAa,GAAQC,OAA+B,IAAU;EACzE,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,EAAE;IAAC,OAAO,EAAE;EAAC;EACxC,MAAMG,IAAI,GAAG,IAAIC,GAAG,CAAS,CAAC;EAC9B,MAAMC,GAAQ,GAAG,EAAE;EACnB,KAAK,MAAMC,MAAM,IAAIN,OAAO,EAAE;IAC5B,MAAMO,CAAC,GAAGD,MAAa;IACvB,MAAME,GAAG,GAAGC,MAAM,CAChBF,CAAC,EAAEG,YAAY,IAAIH,CAAC,EAAEI,GAAG,IAAIF,MAAM,CAACF,CAAC,EAAEK,GAAG,IAAI,EAAE,CAAC,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,EACrE,CAAC,CAACC,IAAI,CAAC,CAAC;IACR,IAAIN,GAAG,EAAE;MACP,IAAIL,IAAI,CAACY,GAAG,CAACP,GAAG,CAAC,EAAE;QAAC;MAAS;MAC7BL,IAAI,CAACa,GAAG,CAACR,GAAG,CAAC;IACf;IACAH,GAAG,CAACY,IAAI,CAACX,MAAM,CAAC;EAClB;EACA,OAAOD,GAAG;AACZ,CAAC;AAACa,OAAA,CAAAnB,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useLeaveRoom = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRedux = require("react-redux");
|
|
9
|
+
var _roomsSlice = require("../roomStore/roomsSlice");
|
|
10
|
+
var _rooms = require("../networking/api-requests/rooms.api");
|
|
11
|
+
var _xmppProvider = require("../context/xmppProvider");
|
|
12
|
+
/** Rooms with a leave request in flight: a second tap waits for the first. */
|
|
13
|
+
const inFlight = new Set();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Leave a chat, shared by the room-list swipe, the chat header and the chat
|
|
17
|
+
* profile. The server goes first: if it refuses, the chat stays where it is
|
|
18
|
+
* (dropping it locally would only have it come back on the next /chats/my).
|
|
19
|
+
* Then the unavailable presence to the MUC and the room out of the store.
|
|
20
|
+
* Resolves false on failure, so the caller can say so in its own way.
|
|
21
|
+
*/
|
|
22
|
+
const useLeaveRoom = () => {
|
|
23
|
+
const dispatch = (0, _reactRedux.useDispatch)();
|
|
24
|
+
const {
|
|
25
|
+
client
|
|
26
|
+
} = (0, _xmppProvider.useXmppClient)();
|
|
27
|
+
return (0, _react.useCallback)(async jid => {
|
|
28
|
+
if (!jid || inFlight.has(jid)) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
inFlight.add(jid);
|
|
32
|
+
try {
|
|
33
|
+
await (0, _rooms.leaveRoom)(jid.split('@')[0]);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.warn('[ethora-rn] leave failed', error);
|
|
36
|
+
return false;
|
|
37
|
+
} finally {
|
|
38
|
+
inFlight.delete(jid);
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
client?.leaveTheRoomStanza?.(jid);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
console.error('Failed to leave the room:', error);
|
|
44
|
+
}
|
|
45
|
+
dispatch((0, _roomsSlice.deleteRoom)({
|
|
46
|
+
jid
|
|
47
|
+
}));
|
|
48
|
+
return true;
|
|
49
|
+
}, [client, dispatch]);
|
|
50
|
+
};
|
|
51
|
+
exports.useLeaveRoom = useLeaveRoom;
|
|
52
|
+
//# sourceMappingURL=useLeaveRoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactRedux","_roomsSlice","_rooms","_xmppProvider","inFlight","Set","useLeaveRoom","dispatch","useDispatch","client","useXmppClient","useCallback","jid","has","add","leaveRoom","split","error","console","warn","delete","leaveTheRoomStanza","deleteRoom","exports"],"sourceRoot":"../../../src","sources":["hooks/useLeaveRoom.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAEA;AACA,MAAMK,QAAQ,GAAG,IAAIC,GAAG,CAAS,CAAC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAGA,CAAA,KAAM;EAChC,MAAMC,QAAQ,GAAG,IAAAC,uBAAW,EAAC,CAAC;EAC9B,MAAM;IAAEC;EAAO,CAAC,GAAG,IAAAC,2BAAa,EAAC,CAAC;EAClC,OAAO,IAAAC,kBAAW,EAChB,MAAOC,GAAW,IAAuB;IACvC,IAAI,CAACA,GAAG,IAAIR,QAAQ,CAACS,GAAG,CAACD,GAAG,CAAC,EAAE;MAAC,OAAO,IAAI;IAAC;IAC5CR,QAAQ,CAACU,GAAG,CAACF,GAAG,CAAC;IACjB,IAAI;MACF,MAAM,IAAAG,gBAAS,EAACH,GAAG,CAACI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,OAAOC,KAAK,EAAE;MACdC,OAAO,CAACC,IAAI,CAAC,0BAA0B,EAAEF,KAAK,CAAC;MAC/C,OAAO,KAAK;IACd,CAAC,SAAS;MACRb,QAAQ,CAACgB,MAAM,CAACR,GAAG,CAAC;IACtB;IACA,IAAI;MACFH,MAAM,EAAEY,kBAAkB,GAAGT,GAAG,CAAC;IACnC,CAAC,CAAC,OAAOK,KAAK,EAAE;MACdC,OAAO,CAACD,KAAK,CAAC,2BAA2B,EAAEA,KAAK,CAAC;IACnD;IACAV,QAAQ,CAAC,IAAAe,sBAAU,EAAC;MAAEV;IAAI,CAAC,CAAC,CAAC;IAC7B,OAAO,IAAI;EACb,CAAC,EACD,CAACH,MAAM,EAAEF,QAAQ,CACnB,CAAC;AACH,CAAC;AAACgB,OAAA,CAAAjB,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -119,6 +119,7 @@ const en = {
|
|
|
119
119
|
'call.action.stopCamera': 'Turn camera off',
|
|
120
120
|
'call.action.startCamera': 'Turn camera on',
|
|
121
121
|
'call.action.switchCamera': 'Switch camera',
|
|
122
|
+
'call.action.swapVideo': 'Swap videos',
|
|
122
123
|
'call.action.speakerOn': 'Turn speaker on',
|
|
123
124
|
'call.action.speakerOff': 'Turn speaker off',
|
|
124
125
|
'call.action.startAudioCall': 'Start audio call',
|
|
@@ -132,6 +133,8 @@ const en = {
|
|
|
132
133
|
'call.error.deviceInUse': 'Your camera or microphone is already in use by another app.',
|
|
133
134
|
'call.error.deviceGeneric': 'Could not access your camera or microphone.',
|
|
134
135
|
'call.error.noAnswerTimeout': 'No answer, the call timed out',
|
|
136
|
+
'call.peerMuted': '{name} is muted',
|
|
137
|
+
'call.selfMuted': 'Your microphone is muted',
|
|
135
138
|
'action.send': 'Send',
|
|
136
139
|
'action.cancel': 'Cancel',
|
|
137
140
|
'action.save': 'Save',
|
|
@@ -142,6 +145,7 @@ const en = {
|
|
|
142
145
|
'action.mute': 'Mute',
|
|
143
146
|
'action.unmute': 'Unmute',
|
|
144
147
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
148
|
+
'toast.leaveFailed': 'Could not leave this chat',
|
|
145
149
|
'action.create': 'Create',
|
|
146
150
|
'action.submit': 'Submit',
|
|
147
151
|
'action.translate': 'Translate',
|
|
@@ -495,6 +499,7 @@ const fr = {
|
|
|
495
499
|
'call.action.stopCamera': 'Désactiver la caméra',
|
|
496
500
|
'call.action.startCamera': 'Activer la caméra',
|
|
497
501
|
'call.action.switchCamera': 'Changer de caméra',
|
|
502
|
+
'call.action.swapVideo': 'Inverser les vidéos',
|
|
498
503
|
'call.action.speakerOn': 'Activer le haut-parleur',
|
|
499
504
|
'call.action.speakerOff': 'Désactiver le haut-parleur',
|
|
500
505
|
'call.action.startAudioCall': 'Démarrer un appel audio',
|
|
@@ -508,6 +513,8 @@ const fr = {
|
|
|
508
513
|
'call.error.deviceInUse': 'Votre caméra ou microphone est déjà utilisé par une autre application.',
|
|
509
514
|
'call.error.deviceGeneric': 'Impossible d\'accéder à votre caméra ou microphone.',
|
|
510
515
|
'call.error.noAnswerTimeout': 'Pas de réponse, l\'appel a expiré',
|
|
516
|
+
'call.peerMuted': '{name} a coupé son micro',
|
|
517
|
+
'call.selfMuted': 'Votre micro est coupé',
|
|
511
518
|
'action.send': 'Envoyer',
|
|
512
519
|
'action.cancel': 'Annuler',
|
|
513
520
|
'action.save': 'Enregistrer',
|
|
@@ -518,6 +525,7 @@ const fr = {
|
|
|
518
525
|
'action.mute': 'Muet',
|
|
519
526
|
'action.unmute': 'Réactiver',
|
|
520
527
|
'toast.muteFailed': 'Impossible de modifier les notifications de ce chat',
|
|
528
|
+
'toast.leaveFailed': 'Impossible de quitter ce chat',
|
|
521
529
|
'action.create': 'Créer',
|
|
522
530
|
'action.submit': 'Soumettre',
|
|
523
531
|
'action.translate': 'Traduire',
|
|
@@ -871,6 +879,7 @@ const es = {
|
|
|
871
879
|
'call.action.stopCamera': 'Apagar la cámara',
|
|
872
880
|
'call.action.startCamera': 'Encender la cámara',
|
|
873
881
|
'call.action.switchCamera': 'Cambiar de cámara',
|
|
882
|
+
'call.action.swapVideo': 'Intercambiar vídeos',
|
|
874
883
|
'call.action.speakerOn': 'Activar el altavoz',
|
|
875
884
|
'call.action.speakerOff': 'Desactivar el altavoz',
|
|
876
885
|
'call.action.startAudioCall': 'Iniciar llamada de audio',
|
|
@@ -884,6 +893,8 @@ const es = {
|
|
|
884
893
|
'call.error.deviceInUse': 'Tu cámara o micrófono ya está siendo usado por otra aplicación.',
|
|
885
894
|
'call.error.deviceGeneric': 'No se pudo acceder a tu cámara o micrófono.',
|
|
886
895
|
'call.error.noAnswerTimeout': 'Sin respuesta, la llamada expiró',
|
|
896
|
+
'call.peerMuted': '{name} tiene el micrófono silenciado',
|
|
897
|
+
'call.selfMuted': 'Tu micrófono está silenciado',
|
|
887
898
|
'action.send': 'Enviar',
|
|
888
899
|
'action.cancel': 'Cancelar',
|
|
889
900
|
'action.save': 'Guardar',
|
|
@@ -894,6 +905,7 @@ const es = {
|
|
|
894
905
|
'action.mute': 'Silenciar',
|
|
895
906
|
'action.unmute': 'Activar',
|
|
896
907
|
'toast.muteFailed': 'No se pudieron cambiar las notificaciones de este chat',
|
|
908
|
+
'toast.leaveFailed': 'No se pudo salir de este chat',
|
|
897
909
|
'action.create': 'Crear',
|
|
898
910
|
'action.submit': 'Enviar',
|
|
899
911
|
'action.translate': 'Traducir',
|
|
@@ -1247,6 +1259,7 @@ const pt = {
|
|
|
1247
1259
|
'call.action.stopCamera': 'Desligar a câmara',
|
|
1248
1260
|
'call.action.startCamera': 'Ligar a câmara',
|
|
1249
1261
|
'call.action.switchCamera': 'Mudar de câmara',
|
|
1262
|
+
'call.action.swapVideo': 'Trocar vídeos',
|
|
1250
1263
|
'call.action.speakerOn': 'Ligar o altifalante',
|
|
1251
1264
|
'call.action.speakerOff': 'Desligar o altifalante',
|
|
1252
1265
|
'call.action.startAudioCall': 'Iniciar chamada de áudio',
|
|
@@ -1260,6 +1273,8 @@ const pt = {
|
|
|
1260
1273
|
'call.error.deviceInUse': 'A sua câmara ou microfone já está a ser utilizado por outra aplicação.',
|
|
1261
1274
|
'call.error.deviceGeneric': 'Não foi possível aceder à câmara ou microfone.',
|
|
1262
1275
|
'call.error.noAnswerTimeout': 'Sem resposta, a chamada expirou',
|
|
1276
|
+
'call.peerMuted': '{name} está com o microfone desativado',
|
|
1277
|
+
'call.selfMuted': 'Seu microfone está desativado',
|
|
1263
1278
|
'action.send': 'Enviar',
|
|
1264
1279
|
'action.cancel': 'Cancelar',
|
|
1265
1280
|
'action.save': 'Guardar',
|
|
@@ -1270,6 +1285,7 @@ const pt = {
|
|
|
1270
1285
|
'action.mute': 'Silenciar',
|
|
1271
1286
|
'action.unmute': 'Ativar som',
|
|
1272
1287
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
1288
|
+
'toast.leaveFailed': 'Não foi possível sair deste chat',
|
|
1273
1289
|
'action.create': 'Criar',
|
|
1274
1290
|
'action.submit': 'Enviar',
|
|
1275
1291
|
'action.translate': 'Traduzir',
|
|
@@ -1623,6 +1639,7 @@ const ht = {
|
|
|
1623
1639
|
'call.action.stopCamera': 'Etenn kamera a',
|
|
1624
1640
|
'call.action.startCamera': 'Limen kamera a',
|
|
1625
1641
|
'call.action.switchCamera': 'Chanje kamera',
|
|
1642
|
+
'call.action.swapVideo': 'Chanje videyo yo',
|
|
1626
1643
|
'call.action.speakerOn': 'Limen opalè a',
|
|
1627
1644
|
'call.action.speakerOff': 'Etenn opalè a',
|
|
1628
1645
|
'call.action.startAudioCall': 'Kòmanse yon apèl odyo',
|
|
@@ -1636,6 +1653,8 @@ const ht = {
|
|
|
1636
1653
|
'call.error.deviceInUse': 'Kamera oswa mikwofòn ou deja ap itilize pa yon lòt app.',
|
|
1637
1654
|
'call.error.deviceGeneric': 'Nou pa t kapab jwenn aksè nan kamera oswa mikwofòn ou.',
|
|
1638
1655
|
'call.error.noAnswerTimeout': 'Pa gen repons, apèl la fini',
|
|
1656
|
+
'call.peerMuted': '{name} koupe mikwo li',
|
|
1657
|
+
'call.selfMuted': 'Mikwo ou koupe',
|
|
1639
1658
|
'action.send': 'Voye',
|
|
1640
1659
|
'action.cancel': 'Anile',
|
|
1641
1660
|
'action.save': 'Anrejistre',
|
|
@@ -1646,6 +1665,7 @@ const ht = {
|
|
|
1646
1665
|
'action.mute': 'Mete an silans',
|
|
1647
1666
|
'action.unmute': 'Retire silans',
|
|
1648
1667
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
1668
|
+
'toast.leaveFailed': 'Pa t kapab kite chat sa a',
|
|
1649
1669
|
'action.create': 'Kreye',
|
|
1650
1670
|
'action.submit': 'Soumèt',
|
|
1651
1671
|
'action.translate': 'Tradui',
|
|
@@ -1999,6 +2019,7 @@ const zh = {
|
|
|
1999
2019
|
'call.action.stopCamera': '关闭摄像头',
|
|
2000
2020
|
'call.action.startCamera': '打开摄像头',
|
|
2001
2021
|
'call.action.switchCamera': '切换摄像头',
|
|
2022
|
+
'call.action.swapVideo': '切换画面',
|
|
2002
2023
|
'call.action.speakerOn': '打开扬声器',
|
|
2003
2024
|
'call.action.speakerOff': '关闭扬声器',
|
|
2004
2025
|
'call.action.startAudioCall': '发起语音通话',
|
|
@@ -2012,6 +2033,8 @@ const zh = {
|
|
|
2012
2033
|
'call.error.deviceInUse': '您的摄像头或麦克风正被其他应用占用。',
|
|
2013
2034
|
'call.error.deviceGeneric': '无法访问您的摄像头或麦克风。',
|
|
2014
2035
|
'call.error.noAnswerTimeout': '无人接听,通话已超时',
|
|
2036
|
+
'call.peerMuted': '{name} 已静音',
|
|
2037
|
+
'call.selfMuted': '你的麦克风已静音',
|
|
2015
2038
|
'action.send': '发送',
|
|
2016
2039
|
'action.cancel': '取消',
|
|
2017
2040
|
'action.save': '保存',
|
|
@@ -2022,6 +2045,7 @@ const zh = {
|
|
|
2022
2045
|
'action.mute': '静音',
|
|
2023
2046
|
'action.unmute': '取消静音',
|
|
2024
2047
|
'toast.muteFailed': 'Could not update notifications for this chat',
|
|
2048
|
+
'toast.leaveFailed': '无法退出此聊天',
|
|
2025
2049
|
'action.create': '创建',
|
|
2026
2050
|
'action.submit': '提交',
|
|
2027
2051
|
'action.translate': '翻译',
|