@arbidocs/react 0.5.109 → 0.5.111
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/PdfViewerImpl-QUSDLNNM.cjs +380 -0
- package/dist/PdfViewerImpl-QUSDLNNM.cjs.map +1 -0
- package/dist/PdfViewerImpl-TEBYF2QI.js +378 -0
- package/dist/PdfViewerImpl-TEBYF2QI.js.map +1 -0
- package/dist/{PdfViewer.d-bQH9yxFg.d.cts → PdfViewerImpl.d-B28hLEuj.d.cts} +8 -1
- package/dist/{PdfViewer.d-bQH9yxFg.d.ts → PdfViewerImpl.d-B28hLEuj.d.ts} +8 -1
- package/dist/annotations/freeze/index.d.cts +1 -1
- package/dist/annotations/freeze/index.d.ts +1 -1
- package/dist/artifacts/index.cjs +13 -13
- package/dist/artifacts/index.js +3 -3
- package/dist/calls/livekit/index.cjs +48 -48
- package/dist/calls/livekit/index.js +3 -3
- package/dist/{chunk-W2FATOTX.cjs → chunk-3JAEX57E.cjs} +4 -4
- package/dist/{chunk-W2FATOTX.cjs.map → chunk-3JAEX57E.cjs.map} +1 -1
- package/dist/{chunk-H5M7FXLB.js → chunk-4FL3X3LA.js} +3 -3
- package/dist/{chunk-H5M7FXLB.js.map → chunk-4FL3X3LA.js.map} +1 -1
- package/dist/{chunk-HD5H2PPP.cjs → chunk-5TRUFWKT.cjs} +66 -66
- package/dist/{chunk-HD5H2PPP.cjs.map → chunk-5TRUFWKT.cjs.map} +1 -1
- package/dist/chunk-6QNBSXCE.js +271 -0
- package/dist/chunk-6QNBSXCE.js.map +1 -0
- package/dist/{chunk-QF2BW6HZ.cjs → chunk-DI5KSVKY.cjs} +38 -38
- package/dist/{chunk-QF2BW6HZ.cjs.map → chunk-DI5KSVKY.cjs.map} +1 -1
- package/dist/{chunk-DQALOQPI.js → chunk-DZKRL5H3.js} +4 -4
- package/dist/{chunk-DQALOQPI.js.map → chunk-DZKRL5H3.js.map} +1 -1
- package/dist/{chunk-RVUGSM65.cjs → chunk-GKGAPU6T.cjs} +44 -44
- package/dist/{chunk-RVUGSM65.cjs.map → chunk-GKGAPU6T.cjs.map} +1 -1
- package/dist/chunk-L2IPPTVC.js +20 -0
- package/dist/chunk-L2IPPTVC.js.map +1 -0
- package/dist/{chunk-FZJMA32S.js → chunk-LSU4UPS5.js} +4 -4
- package/dist/{chunk-FZJMA32S.js.map → chunk-LSU4UPS5.js.map} +1 -1
- package/dist/{chunk-7LIMHY56.cjs → chunk-O32T7XRD.cjs} +3 -3
- package/dist/{chunk-7LIMHY56.cjs.map → chunk-O32T7XRD.cjs.map} +1 -1
- package/dist/chunk-PWGSIM3F.cjs +291 -0
- package/dist/chunk-PWGSIM3F.cjs.map +1 -0
- package/dist/{chunk-CPQ3CU4B.js → chunk-QMY2JKBI.js} +3 -3
- package/dist/{chunk-CPQ3CU4B.js.map → chunk-QMY2JKBI.js.map} +1 -1
- package/dist/chunk-QP3WQSAA.cjs +23 -0
- package/dist/chunk-QP3WQSAA.cjs.map +1 -0
- package/dist/chunk-SSXFVWCT.js +46 -0
- package/dist/chunk-SSXFVWCT.js.map +1 -0
- package/dist/chunk-T5FZICXN.cjs +50 -0
- package/dist/chunk-T5FZICXN.cjs.map +1 -0
- package/dist/{chunk-P6WLV5UY.js → chunk-XWPLOFDN.js} +3 -3
- package/dist/{chunk-P6WLV5UY.js.map → chunk-XWPLOFDN.js.map} +1 -1
- package/dist/{chunk-5HDKL6XB.cjs → chunk-YMB6XUR2.cjs} +57 -57
- package/dist/{chunk-5HDKL6XB.cjs.map → chunk-YMB6XUR2.cjs.map} +1 -1
- package/dist/{chunk-6H3O63TQ.js → chunk-ZM6N7YZH.js} +3 -3
- package/dist/{chunk-6H3O63TQ.js.map → chunk-ZM6N7YZH.js.map} +1 -1
- package/dist/document-tools/core.cjs +98 -98
- package/dist/document-tools/core.d.cts +2 -2
- package/dist/document-tools/core.d.ts +2 -2
- package/dist/document-tools/core.js +3 -3
- package/dist/document-tools/index.cjs +100 -100
- package/dist/document-tools/index.d.cts +1 -1
- package/dist/document-tools/index.d.ts +1 -1
- package/dist/document-tools/index.js +4 -4
- package/dist/index.cjs +1426 -1341
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BMhTH98a.d.ts → index.d-CYXcTKYt.d.ts} +1 -0
- package/dist/{index.d-BMhTH98a.d.cts → index.d-LArLnpI8.d.cts} +1 -0
- package/dist/index.d.cts +39 -8
- package/dist/index.d.ts +39 -8
- package/dist/index.js +104 -33
- package/dist/index.js.map +1 -1
- package/dist/lazy-chunk.d-B6YDLMKI.d.cts +31 -0
- package/dist/lazy-chunk.d-B6YDLMKI.d.ts +31 -0
- package/dist/{query-keys.d-ChgpJLPF.d.cts → query-keys.d-B1Am9tIF.d.cts} +1 -1
- package/dist/{query-keys.d-ChgpJLPF.d.ts → query-keys.d-B1Am9tIF.d.ts} +1 -1
- package/dist/ui/index.cjs +13 -0
- package/dist/ui/index.d.cts +2 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -0
- package/dist/viewers/PdfViewer.cjs +17 -0
- package/dist/viewers/PdfViewer.cjs.map +1 -0
- package/dist/viewers/PdfViewer.d.cts +9 -0
- package/dist/viewers/PdfViewer.d.ts +9 -0
- package/dist/viewers/PdfViewer.js +4 -0
- package/dist/viewers/PdfViewer.js.map +1 -0
- package/dist/viewers/index.cjs +79 -653
- package/dist/viewers/index.cjs.map +1 -1
- package/dist/viewers/index.d.cts +3 -1
- package/dist/viewers/index.d.ts +3 -1
- package/dist/viewers/index.js +6 -639
- package/dist/viewers/index.js.map +1 -1
- package/package.json +11 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYMB6XUR2_cjs = require('./chunk-YMB6XUR2.cjs');
|
|
4
|
+
var chunkO32T7XRD_cjs = require('./chunk-O32T7XRD.cjs');
|
|
5
5
|
var chunkRLSBRZ6Z_cjs = require('./chunk-RLSBRZ6Z.cjs');
|
|
6
6
|
var chunkEEIYXVM4_cjs = require('./chunk-EEIYXVM4.cjs');
|
|
7
7
|
var reactQuery = require('@tanstack/react-query');
|
|
@@ -10,9 +10,9 @@ var browser = require('@arbidocs/sdk/browser');
|
|
|
10
10
|
var client = require('@arbidocs/client');
|
|
11
11
|
|
|
12
12
|
function useUserSettings(options) {
|
|
13
|
-
const arbi =
|
|
13
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
14
14
|
return reactQuery.useQuery({
|
|
15
|
-
queryKey:
|
|
15
|
+
queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.userSettings(),
|
|
16
16
|
queryFn: () => arbi.settings.get(),
|
|
17
17
|
// Edited about once a month, and every write here patches the cache: no refetch on each mount.
|
|
18
18
|
staleTime: 30 * 60 * 1e3,
|
|
@@ -21,23 +21,23 @@ function useUserSettings(options) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function useUpdateUserSettings() {
|
|
24
|
-
const arbi =
|
|
24
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
25
25
|
const qc = reactQuery.useQueryClient();
|
|
26
26
|
return reactQuery.useMutation({
|
|
27
27
|
mutationFn: (patch) => arbi.settings.update(patch),
|
|
28
28
|
onMutate: async (patch) => {
|
|
29
|
-
await qc.cancelQueries({ queryKey:
|
|
30
|
-
const previous = qc.getQueryData(
|
|
29
|
+
await qc.cancelQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.userSettings() });
|
|
30
|
+
const previous = qc.getQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.userSettings());
|
|
31
31
|
qc.setQueryData(
|
|
32
|
-
|
|
32
|
+
chunkO32T7XRD_cjs.arbiQueryKeys.userSettings(),
|
|
33
33
|
(old) => old ? { ...old, ...patch } : old
|
|
34
34
|
);
|
|
35
35
|
return { previous };
|
|
36
36
|
},
|
|
37
37
|
onError: (_err, _patch, context) => {
|
|
38
|
-
qc.setQueryData(
|
|
38
|
+
qc.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.userSettings(), context?.previous);
|
|
39
39
|
},
|
|
40
|
-
onSettled: () => qc.invalidateQueries({ queryKey:
|
|
40
|
+
onSettled: () => qc.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.userSettings() })
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
var ALWAYS_ON = { on: true, set: () => {
|
|
@@ -60,7 +60,7 @@ function useLocalSwitch(source, feature) {
|
|
|
60
60
|
return { on: saved ?? fallback, set };
|
|
61
61
|
}
|
|
62
62
|
function useFeatureSwitch(feature) {
|
|
63
|
-
const source =
|
|
63
|
+
const source = chunkO32T7XRD_cjs.useArbiHost().features?.[feature];
|
|
64
64
|
const useSource = !source ? useUnlisted : "userSetting" in source ? useUserSettingSwitch : useLocalSwitch;
|
|
65
65
|
return useSource(source, feature);
|
|
66
66
|
}
|
|
@@ -71,7 +71,7 @@ function useNoSettings() {
|
|
|
71
71
|
return { data: void 0 };
|
|
72
72
|
}
|
|
73
73
|
function useFeatureCheck() {
|
|
74
|
-
const features =
|
|
74
|
+
const features = chunkO32T7XRD_cjs.useArbiHost().features;
|
|
75
75
|
const useSettings = Object.values(features ?? {}).some(
|
|
76
76
|
(source) => !!source && "userSetting" in source
|
|
77
77
|
) ? useUserSettings : useNoSettings;
|
|
@@ -183,7 +183,7 @@ var LISTS = {
|
|
|
183
183
|
};
|
|
184
184
|
function patchConversationList(queryClient, workspaceId, reducer) {
|
|
185
185
|
if (!workspaceId) return;
|
|
186
|
-
const key =
|
|
186
|
+
const key = chunkO32T7XRD_cjs.arbiQueryKeys.conversations(workspaceId);
|
|
187
187
|
const current = queryClient.getQueryData(key) ?? [];
|
|
188
188
|
const next = reducer(current);
|
|
189
189
|
if (next !== current) queryClient.setQueryData(key, next);
|
|
@@ -247,13 +247,13 @@ function byActivity(a, b) {
|
|
|
247
247
|
return bt - at;
|
|
248
248
|
}
|
|
249
249
|
function cachedChats(queryClient) {
|
|
250
|
-
return queryClient.getQueryData(
|
|
250
|
+
return queryClient.getQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatList()) ?? [];
|
|
251
251
|
}
|
|
252
252
|
function cachedChat(queryClient, chatExtId) {
|
|
253
253
|
return cachedChats(queryClient).find((c) => c.external_id === chatExtId);
|
|
254
254
|
}
|
|
255
255
|
function upsertChat(queryClient, chat) {
|
|
256
|
-
queryClient.setQueryData(
|
|
256
|
+
queryClient.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatList(), (old) => {
|
|
257
257
|
if (!old) return old;
|
|
258
258
|
const rest = old.filter((c) => c.external_id !== chat.external_id);
|
|
259
259
|
return [chat, ...rest].sort(byActivity);
|
|
@@ -261,13 +261,13 @@ function upsertChat(queryClient, chat) {
|
|
|
261
261
|
}
|
|
262
262
|
function removeChat(queryClient, chatExtId) {
|
|
263
263
|
queryClient.setQueryData(
|
|
264
|
-
|
|
264
|
+
chunkO32T7XRD_cjs.arbiQueryKeys.chatList(),
|
|
265
265
|
(old) => old?.filter((c) => c.external_id !== chatExtId)
|
|
266
266
|
);
|
|
267
|
-
queryClient.removeQueries({ queryKey:
|
|
267
|
+
queryClient.removeQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
268
268
|
}
|
|
269
269
|
function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
270
|
-
queryClient.setQueryData(
|
|
270
|
+
queryClient.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
271
271
|
if (!old) return old;
|
|
272
272
|
const without = old.messages.filter(
|
|
273
273
|
(m) => m.external_id !== message.external_id && m.external_id !== replaceOptimisticId
|
|
@@ -277,12 +277,12 @@ function appendToThread(queryClient, chatExtId, message, replaceOptimisticId) {
|
|
|
277
277
|
}
|
|
278
278
|
function dropFromThread(queryClient, chatExtId, messageExtId) {
|
|
279
279
|
queryClient.setQueryData(
|
|
280
|
-
|
|
280
|
+
chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId),
|
|
281
281
|
(old) => old ? { ...old, messages: old.messages.filter((m) => m.external_id !== messageExtId) } : old
|
|
282
282
|
);
|
|
283
283
|
}
|
|
284
284
|
function replaceInThread(queryClient, chatExtId, message) {
|
|
285
|
-
queryClient.setQueryData(
|
|
285
|
+
queryClient.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId), (old) => {
|
|
286
286
|
if (!old || !old.messages.some((m) => m.external_id === message.external_id)) return old;
|
|
287
287
|
return {
|
|
288
288
|
...old,
|
|
@@ -292,14 +292,14 @@ function replaceInThread(queryClient, chatExtId, message) {
|
|
|
292
292
|
}
|
|
293
293
|
function patchLastMessage(queryClient, chatExtId, message) {
|
|
294
294
|
queryClient.setQueryData(
|
|
295
|
-
|
|
295
|
+
chunkO32T7XRD_cjs.arbiQueryKeys.chatList(),
|
|
296
296
|
(old) => old?.map(
|
|
297
297
|
(c) => c.external_id === chatExtId && c.last_message?.external_id === message.external_id ? { ...c, last_message: message } : c
|
|
298
298
|
)
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
async function deleteChatMessage(arbi, queryClient, chatExtId, messageExtId) {
|
|
302
|
-
const thread = queryClient.getQueryData(
|
|
302
|
+
const thread = queryClient.getQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId));
|
|
303
303
|
const before = thread?.messages.find((m) => m.external_id === messageExtId);
|
|
304
304
|
const listed = cachedChat(queryClient, chatExtId);
|
|
305
305
|
const wasLast = listed?.last_message?.external_id === messageExtId ? listed.last_message : null;
|
|
@@ -320,7 +320,7 @@ async function applyChangedMessage(arbi, queryClient, chatExtId, message) {
|
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
const chat = cachedChat(queryClient, chatExtId);
|
|
323
|
-
if (!chat || !queryClient.getQueryData(
|
|
323
|
+
if (!chat || !queryClient.getQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId))) return;
|
|
324
324
|
try {
|
|
325
325
|
replaceInThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
326
326
|
} catch (err) {
|
|
@@ -332,7 +332,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
332
332
|
const me = myChatId(arbi);
|
|
333
333
|
const chat = cachedChat(queryClient, chatExtId);
|
|
334
334
|
if (!chat) {
|
|
335
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
335
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.chatList() });
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
const mine = message.sender_ext_id === me;
|
|
@@ -346,7 +346,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
346
346
|
(m) => m.user.external_id === me ? { ...m, last_read_at: message.created_at } : m
|
|
347
347
|
) : chat.members
|
|
348
348
|
});
|
|
349
|
-
if (queryClient.getQueryData(
|
|
349
|
+
if (queryClient.getQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId))) {
|
|
350
350
|
try {
|
|
351
351
|
appendToThread(queryClient, chatExtId, await arbi.chats.decrypt(chat, message));
|
|
352
352
|
} catch (err) {
|
|
@@ -357,7 +357,7 @@ async function applyChatMessage(arbi, queryClient, chatExtId, message) {
|
|
|
357
357
|
function applyChatRead(arbi, queryClient, chatExtId, userExtId, lastReadAt) {
|
|
358
358
|
const me = myChatId(arbi);
|
|
359
359
|
queryClient.setQueryData(
|
|
360
|
-
|
|
360
|
+
chunkO32T7XRD_cjs.arbiQueryKeys.chatList(),
|
|
361
361
|
(old) => old?.map(
|
|
362
362
|
(c) => c.external_id !== chatExtId ? c : {
|
|
363
363
|
...c,
|
|
@@ -383,11 +383,11 @@ async function applyChatUpdated(arbi, queryClient, chatExtId, message) {
|
|
|
383
383
|
}
|
|
384
384
|
upsertChat(queryClient, chat);
|
|
385
385
|
if (!message)
|
|
386
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
386
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.chatThread(chatExtId) });
|
|
387
387
|
}
|
|
388
388
|
function applyAgentDmStatus(queryClient, status) {
|
|
389
389
|
if (!["queued", "working", "done", "failed"].includes(status.status)) return;
|
|
390
|
-
queryClient.setQueryData(
|
|
390
|
+
queryClient.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.agentDmStatus(status.agent_ext_id), status);
|
|
391
391
|
}
|
|
392
392
|
async function applyChatEvent(arbi, queryClient, event) {
|
|
393
393
|
const e = event;
|
|
@@ -402,13 +402,13 @@ async function applyChatEvent(arbi, queryClient, event) {
|
|
|
402
402
|
|
|
403
403
|
// src/calls/keys.ts
|
|
404
404
|
function serverCallsExperimental(queryClient) {
|
|
405
|
-
return queryClient.getQueryData(
|
|
405
|
+
return queryClient.getQueryData(chunkO32T7XRD_cjs.callQueryKeys.config())?.experimental !== false;
|
|
406
406
|
}
|
|
407
407
|
function invalidateCall(queryClient, message) {
|
|
408
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
408
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.callQueryKeys.call(message.call_ext_id) });
|
|
409
409
|
const thread = message.log_conversation_ext_id;
|
|
410
410
|
if (thread) {
|
|
411
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
411
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.conversationActivity(thread) });
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
@@ -659,19 +659,19 @@ function applyCallEvent(queryClient, event, options = {}) {
|
|
|
659
659
|
}
|
|
660
660
|
case "call.recording": {
|
|
661
661
|
if (callExtId)
|
|
662
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
662
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
663
663
|
const state2 = browser.calls.recordingStateFrom(m);
|
|
664
664
|
relay("call.recording", callExtId && state2 ? { ...state2, call_ext_id: callExtId } : null);
|
|
665
665
|
return true;
|
|
666
666
|
}
|
|
667
667
|
case "call.recording_updated": {
|
|
668
668
|
if (callExtId)
|
|
669
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
669
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
670
670
|
return true;
|
|
671
671
|
}
|
|
672
672
|
case "call.recording_deleted": {
|
|
673
673
|
if (callExtId)
|
|
674
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
674
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.callQueryKeys.recordingsOf(callExtId) });
|
|
675
675
|
const recordingExtId = str(m.recording_ext_id);
|
|
676
676
|
relay(
|
|
677
677
|
"call.recording_deleted",
|
|
@@ -964,11 +964,11 @@ function useProfile(options) {
|
|
|
964
964
|
const { client, enabled } = useAccountClient();
|
|
965
965
|
const qc = reactQuery.useQueryClient();
|
|
966
966
|
react.useEffect(
|
|
967
|
-
() => client.onProfileChange(() => qc.setQueryData(
|
|
967
|
+
() => client.onProfileChange(() => qc.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.profile(), client.profile())),
|
|
968
968
|
[client, qc]
|
|
969
969
|
);
|
|
970
970
|
return reactQuery.useQuery({
|
|
971
|
-
queryKey:
|
|
971
|
+
queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.profile(),
|
|
972
972
|
queryFn: () => client.profile(),
|
|
973
973
|
enabled: (options?.enabled ?? true) && enabled,
|
|
974
974
|
staleTime: Infinity
|
|
@@ -983,9 +983,9 @@ function useUpdateProfile() {
|
|
|
983
983
|
return client.profile();
|
|
984
984
|
},
|
|
985
985
|
onSuccess: (profile) => {
|
|
986
|
-
qc.setQueryData(
|
|
987
|
-
void qc.invalidateQueries({ queryKey:
|
|
988
|
-
return qc.invalidateQueries({ queryKey:
|
|
986
|
+
qc.setQueryData(chunkO32T7XRD_cjs.arbiQueryKeys.profile(), profile);
|
|
987
|
+
void qc.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.identity() });
|
|
988
|
+
return qc.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.workspaces() });
|
|
989
989
|
}
|
|
990
990
|
});
|
|
991
991
|
}
|
|
@@ -1087,7 +1087,7 @@ function arbiAccountClient(arbi, overrides = {}) {
|
|
|
1087
1087
|
if (everywhere) await arbi.sessions.logoutAll();
|
|
1088
1088
|
else await arbi.logout();
|
|
1089
1089
|
} finally {
|
|
1090
|
-
|
|
1090
|
+
chunkYMB6XUR2_cjs.clearSealedDrafts();
|
|
1091
1091
|
chunkRLSBRZ6Z_cjs.clearChatArtifacts();
|
|
1092
1092
|
await wipeOfflineMail().catch(() => {
|
|
1093
1093
|
});
|
|
@@ -1134,7 +1134,7 @@ var NO_ACCOUNT = {
|
|
|
1134
1134
|
};
|
|
1135
1135
|
var ALWAYS = () => true;
|
|
1136
1136
|
function useAccountClient() {
|
|
1137
|
-
const { account, arbi } =
|
|
1137
|
+
const { account, arbi } = chunkO32T7XRD_cjs.useArbiHost();
|
|
1138
1138
|
const fallback = react.useMemo(() => arbi ? arbiAccountClient(arbi) : null, [arbi]);
|
|
1139
1139
|
const useEnabled = account?.useEnabled ?? ALWAYS;
|
|
1140
1140
|
const enabled = useEnabled();
|
|
@@ -1145,9 +1145,9 @@ function useAccountClient() {
|
|
|
1145
1145
|
return { client: fallback, enabled: arbi.isLoggedIn };
|
|
1146
1146
|
}
|
|
1147
1147
|
function useEntitlements() {
|
|
1148
|
-
const { arbi } =
|
|
1148
|
+
const { arbi } = chunkO32T7XRD_cjs.useArbiHost();
|
|
1149
1149
|
return reactQuery.useQuery({
|
|
1150
|
-
queryKey:
|
|
1150
|
+
queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.entitlements(),
|
|
1151
1151
|
queryFn: () => arbi.account.entitlements(),
|
|
1152
1152
|
enabled: !!arbi?.isLoggedIn,
|
|
1153
1153
|
// A plan change shows on the next read; the API enforces it at once either way.
|
|
@@ -1156,7 +1156,7 @@ function useEntitlements() {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
function useInvalidateEntitlements() {
|
|
1158
1158
|
const qc = reactQuery.useQueryClient();
|
|
1159
|
-
return () => qc.invalidateQueries({ queryKey:
|
|
1159
|
+
return () => qc.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.entitlements() });
|
|
1160
1160
|
}
|
|
1161
1161
|
function useIsEntitled(feature) {
|
|
1162
1162
|
const { data } = useEntitlements();
|
|
@@ -1280,7 +1280,7 @@ function ensureMeetingChat(arbi, queryClient, callExtId, callKey) {
|
|
|
1280
1280
|
});
|
|
1281
1281
|
if (!ref) throw new Error("The server did not return a meeting chat");
|
|
1282
1282
|
if (ref.kind === "chat")
|
|
1283
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
1283
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.arbiQueryKeys.chatList() });
|
|
1284
1284
|
else void invalidateConversationLists(queryClient);
|
|
1285
1285
|
return ref;
|
|
1286
1286
|
})();
|
|
@@ -2286,9 +2286,9 @@ async function transcribeRecording(params) {
|
|
|
2286
2286
|
return { stored, failed };
|
|
2287
2287
|
}
|
|
2288
2288
|
function useCallsConfig() {
|
|
2289
|
-
const arbi =
|
|
2289
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2290
2290
|
const { data } = reactQuery.useQuery({
|
|
2291
|
-
queryKey:
|
|
2291
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.config(),
|
|
2292
2292
|
queryFn: () => arbi.calls.config(),
|
|
2293
2293
|
enabled: arbi.isLoggedIn,
|
|
2294
2294
|
staleTime: 5 * 6e4,
|
|
@@ -2306,9 +2306,9 @@ function useCallTranscriptionAvailable() {
|
|
|
2306
2306
|
return useCallsConfig()?.transcription_available === true;
|
|
2307
2307
|
}
|
|
2308
2308
|
function useCall(callExtId) {
|
|
2309
|
-
const arbi =
|
|
2309
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2310
2310
|
return reactQuery.useQuery({
|
|
2311
|
-
queryKey:
|
|
2311
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.call(callExtId ?? ""),
|
|
2312
2312
|
queryFn: () => arbi.calls.get(callExtId),
|
|
2313
2313
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2314
2314
|
staleTime: 6e4,
|
|
@@ -2316,18 +2316,18 @@ function useCall(callExtId) {
|
|
|
2316
2316
|
});
|
|
2317
2317
|
}
|
|
2318
2318
|
function useCallRecordings(callExtId, enabled = true) {
|
|
2319
|
-
const arbi =
|
|
2319
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2320
2320
|
return reactQuery.useQuery({
|
|
2321
|
-
queryKey:
|
|
2321
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.recordings(callExtId ?? ""),
|
|
2322
2322
|
queryFn: () => arbi.calls.recording.list(callExtId),
|
|
2323
2323
|
enabled: !!callExtId && enabled && arbi.isLoggedIn,
|
|
2324
2324
|
retry: false
|
|
2325
2325
|
});
|
|
2326
2326
|
}
|
|
2327
2327
|
function useCallRecording(callExtId, recordingExtId) {
|
|
2328
|
-
const arbi =
|
|
2328
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2329
2329
|
return reactQuery.useQuery({
|
|
2330
|
-
queryKey:
|
|
2330
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.recording(callExtId ?? "", recordingExtId ?? ""),
|
|
2331
2331
|
queryFn: () => arbi.calls.recording.get(callExtId, recordingExtId),
|
|
2332
2332
|
enabled: !!callExtId && !!recordingExtId && arbi.isLoggedIn,
|
|
2333
2333
|
retry: false
|
|
@@ -2339,21 +2339,21 @@ function useRecordingWindows(callExtId, enabled) {
|
|
|
2339
2339
|
return react.useMemo(() => data ? recordingWindowsOf(data) : NO_WINDOWS, [data]);
|
|
2340
2340
|
}
|
|
2341
2341
|
function useCallInviteLinks(callExtId) {
|
|
2342
|
-
const arbi =
|
|
2342
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2343
2343
|
return reactQuery.useQuery({
|
|
2344
|
-
queryKey:
|
|
2344
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.inviteLinks(callExtId ?? ""),
|
|
2345
2345
|
queryFn: () => arbi.calls.inviteLinks.list(callExtId),
|
|
2346
2346
|
enabled: !!callExtId && arbi.isLoggedIn,
|
|
2347
2347
|
retry: false
|
|
2348
2348
|
});
|
|
2349
2349
|
}
|
|
2350
2350
|
function useRecordingActions(call) {
|
|
2351
|
-
const arbi =
|
|
2351
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2352
2352
|
const queryClient = reactQuery.useQueryClient();
|
|
2353
2353
|
return react.useMemo(
|
|
2354
2354
|
() => ({
|
|
2355
2355
|
refresh: () => void queryClient.invalidateQueries({
|
|
2356
|
-
queryKey:
|
|
2356
|
+
queryKey: chunkO32T7XRD_cjs.callQueryKeys.recordingsOf(call.external_id)
|
|
2357
2357
|
}),
|
|
2358
2358
|
open: (recording) => openRecording(arbi, queryClient, call, recording.external_id, recording),
|
|
2359
2359
|
transcribe: async (opened, onProgress) => transcribeRecording({
|
|
@@ -2369,12 +2369,12 @@ function useRecordingActions(call) {
|
|
|
2369
2369
|
);
|
|
2370
2370
|
}
|
|
2371
2371
|
function useRevokeCallInviteLink(callExtId) {
|
|
2372
|
-
const arbi =
|
|
2372
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2373
2373
|
const queryClient = reactQuery.useQueryClient();
|
|
2374
2374
|
return react.useCallback(
|
|
2375
2375
|
async (inviteExtId) => {
|
|
2376
2376
|
await arbi.calls.inviteLinks.revoke(callExtId, inviteExtId);
|
|
2377
|
-
void queryClient.invalidateQueries({ queryKey:
|
|
2377
|
+
void queryClient.invalidateQueries({ queryKey: chunkO32T7XRD_cjs.callQueryKeys.inviteLinks(callExtId) });
|
|
2378
2378
|
},
|
|
2379
2379
|
[arbi, queryClient, callExtId]
|
|
2380
2380
|
);
|
|
@@ -2432,7 +2432,7 @@ async function saveRecordingFilesToThread(arbi, params) {
|
|
|
2432
2432
|
});
|
|
2433
2433
|
}
|
|
2434
2434
|
function useSaveToThread() {
|
|
2435
|
-
const arbi =
|
|
2435
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2436
2436
|
const queryClient = reactQuery.useQueryClient();
|
|
2437
2437
|
return react.useMemo(() => {
|
|
2438
2438
|
const thenRefresh = async (run) => {
|
|
@@ -2719,9 +2719,9 @@ function isWorkspaceGuestOf(workspaces, workspaceExtId, me) {
|
|
|
2719
2719
|
return workspace?.users?.find((wu) => wu.user.external_id === me)?.role === "guest";
|
|
2720
2720
|
}
|
|
2721
2721
|
function useMeetingReadOnly(lockedWorkspaceExtId) {
|
|
2722
|
-
const arbi =
|
|
2722
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2723
2723
|
const me = arbi.isLoggedIn ? arbi.user.identity()?.externalId ?? null : null;
|
|
2724
|
-
const { data: workspaces } =
|
|
2724
|
+
const { data: workspaces } = chunkYMB6XUR2_cjs.useWorkspaces({
|
|
2725
2725
|
enabled: !!lockedWorkspaceExtId && arbi.isLoggedIn
|
|
2726
2726
|
});
|
|
2727
2727
|
return isWorkspaceGuestOf(
|
|
@@ -2744,9 +2744,9 @@ function useCanHostCalls() {
|
|
|
2744
2744
|
return callsEnabled && entitled;
|
|
2745
2745
|
}
|
|
2746
2746
|
function useOpenCallMeetingChat() {
|
|
2747
|
-
const arbi =
|
|
2747
|
+
const arbi = chunkO32T7XRD_cjs.useArbi();
|
|
2748
2748
|
const queryClient = reactQuery.useQueryClient();
|
|
2749
|
-
const open =
|
|
2749
|
+
const open = chunkO32T7XRD_cjs.useArbiHost().calls?.openMeetingChat;
|
|
2750
2750
|
return react.useCallback(
|
|
2751
2751
|
async (target) => {
|
|
2752
2752
|
try {
|
|
@@ -2983,5 +2983,5 @@ exports.useUserSettings = useUserSettings;
|
|
|
2983
2983
|
exports.wipeOfflineMail = wipeOfflineMail;
|
|
2984
2984
|
exports.wrapTrackKey = wrapTrackKey;
|
|
2985
2985
|
exports.writeSamples = writeSamples;
|
|
2986
|
-
//# sourceMappingURL=chunk-
|
|
2987
|
-
//# sourceMappingURL=chunk-
|
|
2986
|
+
//# sourceMappingURL=chunk-5TRUFWKT.cjs.map
|
|
2987
|
+
//# sourceMappingURL=chunk-5TRUFWKT.cjs.map
|