@oxyhq/services 15.0.0 → 17.0.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/commonjs/index.js +25 -55
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -14
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +764 -0
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +11 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +10 -21
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +25 -112
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +299 -0
- package/lib/commonjs/ui/components/RequireOxyAuth.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +106 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +10 -10
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +7 -8
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +19 -30
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +37 -267
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/commonjs/ui/index.js +5 -40
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +91 -0
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +0 -2
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +17 -18
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +4 -3
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +10 -2
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/index.js +20 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +1 -2
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialog.js +761 -0
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +11 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +10 -21
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +26 -112
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +294 -0
- package/lib/module/ui/components/RequireOxyAuth.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +107 -3
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationKeys.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +8 -8
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +5 -6
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +19 -30
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +38 -267
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/module/ui/index.js +1 -5
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +81 -0
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +0 -2
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +19 -20
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +4 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +10 -2
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +6 -13
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -4
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +35 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +11 -23
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +55 -0
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +13 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +6 -7
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +13 -152
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -5
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +49 -0
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +9 -2
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +9 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/storageHelpers.d.ts +7 -7
- package/lib/typescript/module/index.d.ts +6 -13
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -4
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +35 -0
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +2 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +11 -23
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +55 -0
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +13 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +6 -7
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +13 -152
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +2 -5
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +49 -0
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +9 -2
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +9 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/storageHelpers.d.ts +7 -7
- package/package.json +4 -4
- package/src/index.ts +23 -28
- package/src/ui/client.ts +0 -4
- package/src/ui/components/OxyAccountDialog.tsx +760 -0
- package/src/ui/components/OxyProvider.tsx +12 -6
- package/src/ui/components/OxySignInButton.tsx +10 -21
- package/src/ui/components/ProfileButton.tsx +23 -126
- package/src/ui/components/RequireOxyAuth.tsx +266 -0
- package/src/ui/context/OxyContext.tsx +146 -7
- package/src/ui/hooks/mutations/mutationKeys.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +8 -8
- package/src/ui/hooks/queries/queryKeys.ts +1 -1
- package/src/ui/hooks/queries/useAccountQueries.ts +8 -9
- package/src/ui/hooks/useAuth.ts +19 -31
- package/src/ui/hooks/useSwitchableAccounts.ts +42 -376
- package/src/ui/index.ts +2 -5
- package/src/ui/navigation/accountDialogManager.ts +84 -0
- package/src/ui/navigation/routes.ts +1 -5
- package/src/ui/screens/ConnectedAppsScreen.tsx +23 -24
- package/src/ui/screens/ManageAccountScreen.tsx +3 -2
- package/src/ui/session/createSessionClient.ts +9 -1
- package/src/ui/types/navigation.ts +9 -0
- package/src/ui/utils/storageHelpers.ts +7 -7
- package/lib/commonjs/ui/components/AccountMenu.js +0 -598
- package/lib/commonjs/ui/components/AccountMenu.js.map +0 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js +0 -135
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +0 -1
- package/lib/commonjs/ui/components/AccountSwitcher.js +0 -780
- package/lib/commonjs/ui/components/AccountSwitcher.js.map +0 -1
- package/lib/commonjs/ui/components/AnotherDeviceQR.js +0 -116
- package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +0 -1
- package/lib/commonjs/ui/components/ProfileMenu.js +0 -518
- package/lib/commonjs/ui/components/ProfileMenu.js.map +0 -1
- package/lib/commonjs/ui/components/SignInAccountChooser.js +0 -189
- package/lib/commonjs/ui/components/SignInAccountChooser.js.map +0 -1
- package/lib/commonjs/ui/components/SignInModal.js +0 -600
- package/lib/commonjs/ui/components/SignInModal.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js +0 -501
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +0 -1
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js +0 -170
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -51
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +0 -312
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +0 -1
- package/lib/commonjs/utils/deviceFlowSignIn.js +0 -109
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +0 -1
- package/lib/module/ui/components/AccountMenu.js +0 -593
- package/lib/module/ui/components/AccountMenu.js.map +0 -1
- package/lib/module/ui/components/AccountMenuButton.js +0 -130
- package/lib/module/ui/components/AccountMenuButton.js.map +0 -1
- package/lib/module/ui/components/AccountSwitcher.js +0 -774
- package/lib/module/ui/components/AccountSwitcher.js.map +0 -1
- package/lib/module/ui/components/AnotherDeviceQR.js +0 -110
- package/lib/module/ui/components/AnotherDeviceQR.js.map +0 -1
- package/lib/module/ui/components/ProfileMenu.js +0 -514
- package/lib/module/ui/components/ProfileMenu.js.map +0 -1
- package/lib/module/ui/components/SignInAccountChooser.js +0 -183
- package/lib/module/ui/components/SignInAccountChooser.js.map +0 -1
- package/lib/module/ui/components/SignInModal.js +0 -591
- package/lib/module/ui/components/SignInModal.js.map +0 -1
- package/lib/module/ui/hooks/useOxyAuthSession.js +0 -495
- package/lib/module/ui/hooks/useOxyAuthSession.js.map +0 -1
- package/lib/module/ui/hooks/usePasswordSignIn.js +0 -165
- package/lib/module/ui/hooks/usePasswordSignIn.js.map +0 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -48
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +0 -306
- package/lib/module/ui/screens/OxyAuthScreen.js.map +0 -1
- package/lib/module/utils/deviceFlowSignIn.js +0 -106
- package/lib/module/utils/deviceFlowSignIn.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +0 -47
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +0 -26
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts +0 -46
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +0 -34
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts +0 -49
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +0 -28
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +0 -105
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +0 -31
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +0 -11
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +0 -22
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +0 -97
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +0 -47
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +0 -26
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +0 -46
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +0 -34
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts +0 -49
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +0 -29
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts +0 -28
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +0 -105
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +0 -31
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +0 -11
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +0 -22
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +0 -1
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +0 -97
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +0 -1
- package/src/ui/components/AccountMenu.tsx +0 -645
- package/src/ui/components/AccountMenuButton.tsx +0 -126
- package/src/ui/components/AccountSwitcher.tsx +0 -751
- package/src/ui/components/AnotherDeviceQR.tsx +0 -119
- package/src/ui/components/ProfileMenu.tsx +0 -564
- package/src/ui/components/SignInAccountChooser.tsx +0 -162
- package/src/ui/components/SignInModal.tsx +0 -530
- package/src/ui/hooks/useOxyAuthSession.ts +0 -635
- package/src/ui/hooks/usePasswordSignIn.ts +0 -207
- package/src/ui/screens/AccountSwitcherScreen.tsx +0 -43
- package/src/ui/screens/OxyAuthScreen.tsx +0 -324
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +0 -231
- package/src/utils/deviceFlowSignIn.ts +0 -152
|
@@ -1,593 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Modal, Pressable, Platform, ActivityIndicator } from 'react-native';
|
|
5
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import { toast, useDialogControl, Dialog } from '@oxyhq/bloom';
|
|
7
|
-
import { Divider } from '@oxyhq/bloom/divider';
|
|
8
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
9
|
-
import Avatar from "./Avatar.js";
|
|
10
|
-
import { useOxy } from "../context/OxyContext.js";
|
|
11
|
-
import { useI18n } from "../hooks/useI18n.js";
|
|
12
|
-
import { isDev, logger as loggerUtil } from '@oxyhq/core';
|
|
13
|
-
import { useSwitchableAccounts } from "../hooks/useSwitchableAccounts.js";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Web-only anchor for the popover panel. Each field anchors the panel against
|
|
17
|
-
* one viewport edge, so the popover can be placed against ANY corner: a
|
|
18
|
-
* top-right avatar chip opens downward/right-aligned (`{ top, right }`), while a
|
|
19
|
-
* bottom-left account button opens upward/left-aligned (`{ bottom, left }`).
|
|
20
|
-
*
|
|
21
|
-
* Callers MUST supply at most one vertical edge (`top` XOR `bottom`) and at most
|
|
22
|
-
* one horizontal edge (`left` XOR `right`). The panel has a fixed width and
|
|
23
|
-
* `maxHeight`, so a single vertical + single horizontal edge fully positions it.
|
|
24
|
-
* Supplying both opposite edges (e.g. `top` AND `bottom`) would stretch the
|
|
25
|
-
* panel on RN-Web and is unsupported.
|
|
26
|
-
*/
|
|
27
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
-
const isWeb = Platform.OS === 'web';
|
|
29
|
-
|
|
30
|
-
/** Fixed popover width on web. Callers that compute an anchor (e.g. inbox's
|
|
31
|
-
* MailboxDrawer) key their gutter math off this — keep them consistent. */
|
|
32
|
-
const PANEL_WIDTH = 360;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Unified, canonical account switcher for the Oxy ecosystem. Gmail-style: the
|
|
36
|
-
* accounts list sits at the top (current account first, with a checkmark), then
|
|
37
|
-
* "Add another account", "Manage account", and the sign-out actions. Lists EVERY
|
|
38
|
-
* switchable account (device sign-ins AND linked graph accounts) and routes every
|
|
39
|
-
* switch through the single `switchToAccount(accountId)` path.
|
|
40
|
-
*
|
|
41
|
-
* Reads everything it needs from `useOxy()` / `useSwitchableAccounts()` — never
|
|
42
|
-
* receives a session via props. Renders as a popover anchored to the trigger on
|
|
43
|
-
* web, and as a full-width bottom-sheet style modal on native.
|
|
44
|
-
*/
|
|
45
|
-
const AccountMenu = ({
|
|
46
|
-
open,
|
|
47
|
-
onClose,
|
|
48
|
-
onNavigateManage,
|
|
49
|
-
onAddAccount,
|
|
50
|
-
anchor,
|
|
51
|
-
onBeforeSessionChange
|
|
52
|
-
}) => {
|
|
53
|
-
const {
|
|
54
|
-
switchToAccount,
|
|
55
|
-
logout,
|
|
56
|
-
logoutAll,
|
|
57
|
-
removeSession
|
|
58
|
-
} = useOxy();
|
|
59
|
-
const {
|
|
60
|
-
t
|
|
61
|
-
} = useI18n();
|
|
62
|
-
const bloomTheme = useTheme();
|
|
63
|
-
const colors = bloomTheme.colors;
|
|
64
|
-
|
|
65
|
-
// Source EVERY switchable account — device sign-ins AND linked graph
|
|
66
|
-
// accounts (owned orgs + shared-with-you) — from the single
|
|
67
|
-
// `useSwitchableAccounts` hook, each hydrated with real
|
|
68
|
-
// name/email/avatar/color. It also synthesises a live-user row when the
|
|
69
|
-
// device set has not synced yet, so the signed-in user is always represented
|
|
70
|
-
// (no "Not signed in" false negative).
|
|
71
|
-
const {
|
|
72
|
-
accounts
|
|
73
|
-
} = useSwitchableAccounts();
|
|
74
|
-
const [switchingAccountId, setSwitchingAccountId] = useState(null);
|
|
75
|
-
const [removingSessionId, setRemovingSessionId] = useState(null);
|
|
76
|
-
const [signingOut, setSigningOut] = useState(false);
|
|
77
|
-
const [signingOutAll, setSigningOutAll] = useState(false);
|
|
78
|
-
const signOutDialog = useDialogControl();
|
|
79
|
-
const signOutAllDialog = useDialogControl();
|
|
80
|
-
const containerRef = useRef(null);
|
|
81
|
-
|
|
82
|
-
// Current account first, then the remaining device sign-ins, then the linked
|
|
83
|
-
// graph accounts — matching the Gmail-style chooser the inbox design ports.
|
|
84
|
-
const rows = useMemo(() => {
|
|
85
|
-
const device = accounts.filter(account => account.onDevice);
|
|
86
|
-
const graph = accounts.filter(account => !account.onDevice);
|
|
87
|
-
const current = device.filter(account => account.isCurrent);
|
|
88
|
-
const others = device.filter(account => !account.isCurrent);
|
|
89
|
-
return [...current, ...others, ...graph];
|
|
90
|
-
}, [accounts]);
|
|
91
|
-
|
|
92
|
-
// "Sign out of all accounts" only applies to real device sessions.
|
|
93
|
-
const deviceCount = useMemo(() => accounts.filter(account => account.onDevice).length, [accounts]);
|
|
94
|
-
|
|
95
|
-
// Account ids currently listed — used to indent a graph-only row whose parent
|
|
96
|
-
// account is also shown.
|
|
97
|
-
const listedAccountIds = useMemo(() => new Set(rows.map(row => row.accountId)), [rows]);
|
|
98
|
-
const isSwitching = switchingAccountId !== null;
|
|
99
|
-
|
|
100
|
-
// The ONE uniform switch path: every row (device sign-in or linked graph
|
|
101
|
-
// account) routes through `useOxy().switchToAccount(accountId)`. It reuses
|
|
102
|
-
// the device session when the account is already signed in here, and mints a
|
|
103
|
-
// real session only on the first switch into a graph account — a single
|
|
104
|
-
// source of truth for every switch.
|
|
105
|
-
const handleSwitch = useCallback(async account => {
|
|
106
|
-
if (account.isCurrent || switchingAccountId) {
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
setSwitchingAccountId(account.accountId);
|
|
110
|
-
try {
|
|
111
|
-
await onBeforeSessionChange?.();
|
|
112
|
-
await switchToAccount(account.accountId);
|
|
113
|
-
toast.success(t('accountSwitcher.toasts.switchSuccess') || 'Switched account');
|
|
114
|
-
onClose();
|
|
115
|
-
} catch (error) {
|
|
116
|
-
if (!isDev()) {
|
|
117
|
-
loggerUtil.warn('Switch account failed', {
|
|
118
|
-
component: 'AccountMenu'
|
|
119
|
-
}, error);
|
|
120
|
-
}
|
|
121
|
-
toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
|
|
122
|
-
} finally {
|
|
123
|
-
setSwitchingAccountId(null);
|
|
124
|
-
}
|
|
125
|
-
}, [switchingAccountId, switchToAccount, t, onClose, onBeforeSessionChange]);
|
|
126
|
-
|
|
127
|
-
// Sign out a SPECIFIC inactive account from its per-row icon. `removeSession`
|
|
128
|
-
// is the SDK's canonical per-session sign-out: it targets the given session
|
|
129
|
-
// id (cookie-cleared logout via `authuser` slot on web, bearer logout
|
|
130
|
-
// otherwise) and removes ONLY that account without switching/clearing the
|
|
131
|
-
// active session. The menu stays open so the user can keep managing accounts.
|
|
132
|
-
const handleRemove = useCallback(async sessionId => {
|
|
133
|
-
if (removingSessionId) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
setRemovingSessionId(sessionId);
|
|
137
|
-
try {
|
|
138
|
-
await removeSession(sessionId);
|
|
139
|
-
toast.success(t('common.actions.signedOut') || 'Signed out');
|
|
140
|
-
} catch (error) {
|
|
141
|
-
loggerUtil.warn('Remove account failed', {
|
|
142
|
-
component: 'AccountMenu'
|
|
143
|
-
}, error);
|
|
144
|
-
toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
|
|
145
|
-
} finally {
|
|
146
|
-
setRemovingSessionId(null);
|
|
147
|
-
}
|
|
148
|
-
}, [removingSessionId, removeSession, t]);
|
|
149
|
-
const performSignOut = useCallback(async () => {
|
|
150
|
-
if (signingOut) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
setSigningOut(true);
|
|
154
|
-
try {
|
|
155
|
-
await onBeforeSessionChange?.();
|
|
156
|
-
await logout();
|
|
157
|
-
toast.success(t('common.actions.signedOut') || 'Signed out');
|
|
158
|
-
onClose();
|
|
159
|
-
} catch (error) {
|
|
160
|
-
loggerUtil.warn('Sign out failed', {
|
|
161
|
-
component: 'AccountMenu'
|
|
162
|
-
}, error);
|
|
163
|
-
toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
|
|
164
|
-
} finally {
|
|
165
|
-
setSigningOut(false);
|
|
166
|
-
}
|
|
167
|
-
}, [signingOut, logout, t, onClose, onBeforeSessionChange]);
|
|
168
|
-
const performSignOutAll = useCallback(async () => {
|
|
169
|
-
if (signingOutAll) {
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
setSigningOutAll(true);
|
|
173
|
-
try {
|
|
174
|
-
await onBeforeSessionChange?.();
|
|
175
|
-
await logoutAll();
|
|
176
|
-
toast.success(t('accountSwitcher.toasts.signOutAllSuccess') || 'Signed out of all accounts');
|
|
177
|
-
onClose();
|
|
178
|
-
} catch (error) {
|
|
179
|
-
loggerUtil.warn('Sign out all failed', {
|
|
180
|
-
component: 'AccountMenu'
|
|
181
|
-
}, error);
|
|
182
|
-
toast.error(t('common.errors.signOutAllFailed') || 'Failed to sign out of all accounts');
|
|
183
|
-
} finally {
|
|
184
|
-
setSigningOutAll(false);
|
|
185
|
-
}
|
|
186
|
-
}, [signingOutAll, logoutAll, t, onClose, onBeforeSessionChange]);
|
|
187
|
-
|
|
188
|
-
// Escape-to-close + focus management (web only).
|
|
189
|
-
useEffect(() => {
|
|
190
|
-
if (!open || !isWeb || typeof document === 'undefined') {
|
|
191
|
-
return undefined;
|
|
192
|
-
}
|
|
193
|
-
const onKey = event => {
|
|
194
|
-
if (event.key === 'Escape') {
|
|
195
|
-
event.stopPropagation();
|
|
196
|
-
onClose();
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
document.addEventListener('keydown', onKey, true);
|
|
200
|
-
return () => document.removeEventListener('keydown', onKey, true);
|
|
201
|
-
}, [open, onClose]);
|
|
202
|
-
if (!open) {
|
|
203
|
-
return null;
|
|
204
|
-
}
|
|
205
|
-
const overlayStyles = isWeb ? styles.webOverlay : styles.nativeOverlay;
|
|
206
|
-
|
|
207
|
-
// Apply ONLY the edges the anchor supplies (so the panel never sets
|
|
208
|
-
// conflicting opposite edges). When no anchor is provided, fall back to the
|
|
209
|
-
// historical top-right placement used by `AccountMenuButton`.
|
|
210
|
-
const anchorStyle = anchor ? {
|
|
211
|
-
...(anchor.top !== undefined ? {
|
|
212
|
-
top: anchor.top
|
|
213
|
-
} : null),
|
|
214
|
-
...(anchor.bottom !== undefined ? {
|
|
215
|
-
bottom: anchor.bottom
|
|
216
|
-
} : null),
|
|
217
|
-
...(anchor.left !== undefined ? {
|
|
218
|
-
left: anchor.left
|
|
219
|
-
} : null),
|
|
220
|
-
...(anchor.right !== undefined ? {
|
|
221
|
-
right: anchor.right
|
|
222
|
-
} : null)
|
|
223
|
-
} : {
|
|
224
|
-
top: 64,
|
|
225
|
-
right: 16
|
|
226
|
-
};
|
|
227
|
-
const panelStyles = isWeb ? [styles.panelBase, styles.panelWeb, anchorStyle, {
|
|
228
|
-
backgroundColor: colors.background,
|
|
229
|
-
borderColor: colors.border
|
|
230
|
-
}] : [styles.panelBase, styles.panelNative, {
|
|
231
|
-
backgroundColor: colors.background
|
|
232
|
-
}];
|
|
233
|
-
const actionDisabled = isSwitching || signingOut || signingOutAll;
|
|
234
|
-
const content = /*#__PURE__*/_jsx(Pressable, {
|
|
235
|
-
ref: containerRef
|
|
236
|
-
// Swallow taps inside the panel so they never reach the overlay's
|
|
237
|
-
// outside-tap-to-close handler. (On web the panel is a direct,
|
|
238
|
-
// absolutely-positioned child of the overlay so the anchor resolves
|
|
239
|
-
// against the viewport.)
|
|
240
|
-
,
|
|
241
|
-
onPress: () => undefined,
|
|
242
|
-
style: panelStyles,
|
|
243
|
-
accessibilityRole: "menu",
|
|
244
|
-
accessibilityLabel: t('accountMenu.label') || 'Account menu',
|
|
245
|
-
children: /*#__PURE__*/_jsxs(ScrollView, {
|
|
246
|
-
style: styles.scroll,
|
|
247
|
-
contentContainerStyle: styles.scrollContent,
|
|
248
|
-
showsVerticalScrollIndicator: false,
|
|
249
|
-
children: [rows.map(row => {
|
|
250
|
-
const sessionId = row.sessionId;
|
|
251
|
-
const isBusy = switchingAccountId === row.accountId;
|
|
252
|
-
const isRemoving = sessionId ? removingSessionId === sessionId : false;
|
|
253
|
-
const isChild = Boolean(row.parentAccountId && listedAccountIds.has(row.parentAccountId));
|
|
254
|
-
const role = row.callerMembership?.role;
|
|
255
|
-
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
256
|
-
accessibilityRole: "menuitem",
|
|
257
|
-
accessibilityLabel: row.displayName,
|
|
258
|
-
accessibilityState: {
|
|
259
|
-
selected: row.isCurrent
|
|
260
|
-
},
|
|
261
|
-
onPress: () => handleSwitch(row),
|
|
262
|
-
disabled: row.isCurrent || isBusy || isSwitching,
|
|
263
|
-
activeOpacity: 0.6,
|
|
264
|
-
style: [styles.accountRow, isChild && styles.childRow, row.isCurrent && {
|
|
265
|
-
backgroundColor: colors.primarySubtle
|
|
266
|
-
}, isSwitching && !row.isCurrent && styles.rowDisabled],
|
|
267
|
-
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
268
|
-
uri: row.avatarUrl,
|
|
269
|
-
name: row.displayName,
|
|
270
|
-
size: row.isCurrent ? 40 : isChild ? 28 : 32
|
|
271
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
272
|
-
style: styles.accountInfo,
|
|
273
|
-
children: [/*#__PURE__*/_jsxs(View, {
|
|
274
|
-
style: styles.nameRow,
|
|
275
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
276
|
-
style: [styles.accountName, {
|
|
277
|
-
color: colors.text
|
|
278
|
-
}, row.isCurrent && styles.accountNameActive],
|
|
279
|
-
numberOfLines: 1,
|
|
280
|
-
children: row.displayName
|
|
281
|
-
}), role ? /*#__PURE__*/_jsx(View, {
|
|
282
|
-
style: [styles.roleBadge, {
|
|
283
|
-
backgroundColor: colors.card
|
|
284
|
-
}],
|
|
285
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
286
|
-
style: [styles.roleBadgeText, {
|
|
287
|
-
color: colors.textSecondary
|
|
288
|
-
}],
|
|
289
|
-
children: t(`accounts.roles.${role}.label`) || role
|
|
290
|
-
})
|
|
291
|
-
}) : null]
|
|
292
|
-
}), row.email ? /*#__PURE__*/_jsx(Text, {
|
|
293
|
-
style: [styles.accountEmail, {
|
|
294
|
-
color: colors.textSecondary
|
|
295
|
-
}],
|
|
296
|
-
numberOfLines: 1,
|
|
297
|
-
children: row.email
|
|
298
|
-
}) : null]
|
|
299
|
-
}), isBusy ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
300
|
-
color: colors.primary,
|
|
301
|
-
size: "small"
|
|
302
|
-
}) : row.isCurrent ? /*#__PURE__*/_jsx(Ionicons, {
|
|
303
|
-
name: "checkmark",
|
|
304
|
-
size: 20,
|
|
305
|
-
color: colors.primary
|
|
306
|
-
}) : isRemoving ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
307
|
-
color: colors.textSecondary,
|
|
308
|
-
size: "small"
|
|
309
|
-
}) : sessionId ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
310
|
-
accessibilityRole: "button",
|
|
311
|
-
accessibilityLabel: t('accountMenu.signOutAccount', {
|
|
312
|
-
name: row.displayName
|
|
313
|
-
}) || `Sign out ${row.displayName}`,
|
|
314
|
-
onPress: () => handleRemove(sessionId),
|
|
315
|
-
disabled: isSwitching || removingSessionId !== null,
|
|
316
|
-
activeOpacity: 0.6,
|
|
317
|
-
hitSlop: {
|
|
318
|
-
top: 8,
|
|
319
|
-
bottom: 8,
|
|
320
|
-
left: 8,
|
|
321
|
-
right: 8
|
|
322
|
-
},
|
|
323
|
-
style: styles.rowSignOutButton,
|
|
324
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
325
|
-
name: "log-out-outline",
|
|
326
|
-
size: 18,
|
|
327
|
-
color: colors.textSecondary
|
|
328
|
-
})
|
|
329
|
-
}) : null]
|
|
330
|
-
}, `account-${row.accountId}`);
|
|
331
|
-
}), isSwitching ? /*#__PURE__*/_jsxs(View, {
|
|
332
|
-
style: styles.switchingRow,
|
|
333
|
-
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
334
|
-
color: colors.textSecondary,
|
|
335
|
-
size: "small"
|
|
336
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
337
|
-
style: [styles.switchingText, {
|
|
338
|
-
color: colors.textSecondary
|
|
339
|
-
}],
|
|
340
|
-
children: t('accountMenu.switching') || 'Switching account…'
|
|
341
|
-
})]
|
|
342
|
-
}) : null, /*#__PURE__*/_jsx(Divider, {
|
|
343
|
-
color: colors.border,
|
|
344
|
-
spacing: 4
|
|
345
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
346
|
-
accessibilityRole: "menuitem",
|
|
347
|
-
accessibilityLabel: t('accountMenu.addAnother') || 'Add another account',
|
|
348
|
-
onPress: () => {
|
|
349
|
-
onClose();
|
|
350
|
-
onAddAccount();
|
|
351
|
-
},
|
|
352
|
-
disabled: actionDisabled,
|
|
353
|
-
activeOpacity: 0.6,
|
|
354
|
-
style: [styles.actionRow, actionDisabled && styles.rowDisabled],
|
|
355
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
356
|
-
name: "person-add-outline",
|
|
357
|
-
size: 20,
|
|
358
|
-
color: colors.icon
|
|
359
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
360
|
-
style: [styles.actionText, {
|
|
361
|
-
color: colors.text
|
|
362
|
-
}],
|
|
363
|
-
children: t('accountMenu.addAnother') || 'Add another account'
|
|
364
|
-
})]
|
|
365
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
|
366
|
-
color: colors.border,
|
|
367
|
-
spacing: 4
|
|
368
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
369
|
-
accessibilityRole: "menuitem",
|
|
370
|
-
accessibilityLabel: t('accountMenu.manage') || 'Manage your Oxy Account',
|
|
371
|
-
onPress: () => {
|
|
372
|
-
onClose();
|
|
373
|
-
onNavigateManage();
|
|
374
|
-
},
|
|
375
|
-
disabled: actionDisabled,
|
|
376
|
-
activeOpacity: 0.6,
|
|
377
|
-
style: [styles.actionRow, actionDisabled && styles.rowDisabled],
|
|
378
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
379
|
-
name: "settings-outline",
|
|
380
|
-
size: 18,
|
|
381
|
-
color: colors.icon
|
|
382
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
383
|
-
style: [styles.actionText, {
|
|
384
|
-
color: colors.text
|
|
385
|
-
}],
|
|
386
|
-
children: t('accountMenu.manage') || 'Manage your Oxy Account'
|
|
387
|
-
})]
|
|
388
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
389
|
-
accessibilityRole: "menuitem",
|
|
390
|
-
accessibilityLabel: t('common.actions.signOut') || 'Sign out',
|
|
391
|
-
onPress: () => signOutDialog.open(),
|
|
392
|
-
disabled: actionDisabled,
|
|
393
|
-
activeOpacity: 0.6,
|
|
394
|
-
style: [styles.actionRow, actionDisabled && styles.rowDisabled],
|
|
395
|
-
children: [signingOut ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
396
|
-
color: colors.error,
|
|
397
|
-
size: "small"
|
|
398
|
-
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
399
|
-
name: "log-out-outline",
|
|
400
|
-
size: 18,
|
|
401
|
-
color: colors.error
|
|
402
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
403
|
-
style: [styles.actionText, {
|
|
404
|
-
color: colors.error
|
|
405
|
-
}],
|
|
406
|
-
children: t('common.actions.signOut') || 'Sign out'
|
|
407
|
-
})]
|
|
408
|
-
}), deviceCount > 1 ? /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
409
|
-
accessibilityRole: "menuitem",
|
|
410
|
-
accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
411
|
-
onPress: () => signOutAllDialog.open(),
|
|
412
|
-
disabled: actionDisabled,
|
|
413
|
-
activeOpacity: 0.6,
|
|
414
|
-
style: [styles.actionRow, actionDisabled && styles.rowDisabled],
|
|
415
|
-
children: [signingOutAll ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
416
|
-
color: colors.error,
|
|
417
|
-
size: "small"
|
|
418
|
-
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
419
|
-
name: "log-out-outline",
|
|
420
|
-
size: 18,
|
|
421
|
-
color: colors.error
|
|
422
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
423
|
-
style: [styles.actionText, {
|
|
424
|
-
color: colors.error
|
|
425
|
-
}],
|
|
426
|
-
children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
|
|
427
|
-
})]
|
|
428
|
-
}) : null]
|
|
429
|
-
})
|
|
430
|
-
});
|
|
431
|
-
return /*#__PURE__*/_jsxs(Modal, {
|
|
432
|
-
visible: open,
|
|
433
|
-
transparent: true,
|
|
434
|
-
animationType: isWeb ? 'fade' : 'slide',
|
|
435
|
-
onRequestClose: onClose,
|
|
436
|
-
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
437
|
-
accessibilityRole: "button",
|
|
438
|
-
accessibilityLabel: t('common.actions.close') || 'Close',
|
|
439
|
-
onPress: onClose,
|
|
440
|
-
style: overlayStyles,
|
|
441
|
-
children: content
|
|
442
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
443
|
-
control: signOutDialog,
|
|
444
|
-
title: t('common.actions.signOut') || 'Sign out',
|
|
445
|
-
description: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
|
|
446
|
-
actions: [{
|
|
447
|
-
label: t('common.actions.signOut') || 'Sign out',
|
|
448
|
-
color: 'destructive',
|
|
449
|
-
onPress: performSignOut
|
|
450
|
-
}, {
|
|
451
|
-
label: t('common.cancel') || 'Cancel',
|
|
452
|
-
color: 'cancel'
|
|
453
|
-
}]
|
|
454
|
-
}), /*#__PURE__*/_jsx(Dialog, {
|
|
455
|
-
control: signOutAllDialog,
|
|
456
|
-
title: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
457
|
-
description: t('common.confirms.signOutAll') || 'Are you sure you want to sign out of all accounts?',
|
|
458
|
-
actions: [{
|
|
459
|
-
label: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
460
|
-
color: 'destructive',
|
|
461
|
-
onPress: performSignOutAll
|
|
462
|
-
}, {
|
|
463
|
-
label: t('common.cancel') || 'Cancel',
|
|
464
|
-
color: 'cancel'
|
|
465
|
-
}]
|
|
466
|
-
})]
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
const styles = StyleSheet.create({
|
|
470
|
-
webOverlay: {
|
|
471
|
-
flex: 1,
|
|
472
|
-
backgroundColor: 'transparent',
|
|
473
|
-
// Explicit positioning context: the absolutely-positioned panel is a
|
|
474
|
-
// direct child and resolves its anchor edges (top/bottom/left/right)
|
|
475
|
-
// against this full-viewport overlay — matching the trigger-rect math
|
|
476
|
-
// callers compute from `window.innerWidth` / `window.innerHeight`.
|
|
477
|
-
position: 'relative'
|
|
478
|
-
},
|
|
479
|
-
nativeOverlay: {
|
|
480
|
-
flex: 1,
|
|
481
|
-
backgroundColor: 'rgba(0,0,0,0.32)',
|
|
482
|
-
justifyContent: 'flex-end'
|
|
483
|
-
},
|
|
484
|
-
panelBase: {
|
|
485
|
-
borderRadius: 12,
|
|
486
|
-
shadowColor: '#000',
|
|
487
|
-
shadowOpacity: 0.18,
|
|
488
|
-
shadowRadius: 24,
|
|
489
|
-
shadowOffset: {
|
|
490
|
-
width: 0,
|
|
491
|
-
height: 8
|
|
492
|
-
},
|
|
493
|
-
elevation: 12,
|
|
494
|
-
overflow: 'hidden'
|
|
495
|
-
},
|
|
496
|
-
panelWeb: {
|
|
497
|
-
position: 'absolute',
|
|
498
|
-
width: PANEL_WIDTH,
|
|
499
|
-
maxHeight: '85%',
|
|
500
|
-
borderWidth: 1
|
|
501
|
-
},
|
|
502
|
-
panelNative: {
|
|
503
|
-
marginHorizontal: 0,
|
|
504
|
-
borderTopLeftRadius: 20,
|
|
505
|
-
borderTopRightRadius: 20,
|
|
506
|
-
borderBottomLeftRadius: 0,
|
|
507
|
-
borderBottomRightRadius: 0,
|
|
508
|
-
paddingBottom: 12,
|
|
509
|
-
maxHeight: '85%'
|
|
510
|
-
},
|
|
511
|
-
scroll: {
|
|
512
|
-
flexGrow: 0
|
|
513
|
-
},
|
|
514
|
-
scrollContent: {
|
|
515
|
-
paddingVertical: 4
|
|
516
|
-
},
|
|
517
|
-
accountRow: {
|
|
518
|
-
flexDirection: 'row',
|
|
519
|
-
alignItems: 'center',
|
|
520
|
-
paddingHorizontal: 14,
|
|
521
|
-
paddingVertical: 10,
|
|
522
|
-
gap: 10
|
|
523
|
-
},
|
|
524
|
-
childRow: {
|
|
525
|
-
paddingLeft: 34
|
|
526
|
-
},
|
|
527
|
-
rowDisabled: {
|
|
528
|
-
opacity: 0.4
|
|
529
|
-
},
|
|
530
|
-
accountInfo: {
|
|
531
|
-
flex: 1,
|
|
532
|
-
minWidth: 0
|
|
533
|
-
},
|
|
534
|
-
nameRow: {
|
|
535
|
-
flexDirection: 'row',
|
|
536
|
-
alignItems: 'center',
|
|
537
|
-
gap: 6
|
|
538
|
-
},
|
|
539
|
-
accountName: {
|
|
540
|
-
fontSize: 13,
|
|
541
|
-
fontWeight: '500',
|
|
542
|
-
flexShrink: 1
|
|
543
|
-
},
|
|
544
|
-
accountNameActive: {
|
|
545
|
-
fontWeight: '600'
|
|
546
|
-
},
|
|
547
|
-
roleBadge: {
|
|
548
|
-
paddingHorizontal: 6,
|
|
549
|
-
paddingVertical: 1,
|
|
550
|
-
borderRadius: 8
|
|
551
|
-
},
|
|
552
|
-
roleBadgeText: {
|
|
553
|
-
fontSize: 10,
|
|
554
|
-
fontWeight: '600',
|
|
555
|
-
textTransform: 'capitalize'
|
|
556
|
-
},
|
|
557
|
-
accountEmail: {
|
|
558
|
-
fontSize: 11,
|
|
559
|
-
marginTop: 1
|
|
560
|
-
},
|
|
561
|
-
rowSignOutButton: {
|
|
562
|
-
width: 28,
|
|
563
|
-
height: 28,
|
|
564
|
-
alignItems: 'center',
|
|
565
|
-
justifyContent: 'center',
|
|
566
|
-
borderRadius: 14,
|
|
567
|
-
opacity: 0.6
|
|
568
|
-
},
|
|
569
|
-
switchingRow: {
|
|
570
|
-
flexDirection: 'row',
|
|
571
|
-
alignItems: 'center',
|
|
572
|
-
justifyContent: 'center',
|
|
573
|
-
paddingVertical: 8,
|
|
574
|
-
gap: 8
|
|
575
|
-
},
|
|
576
|
-
switchingText: {
|
|
577
|
-
fontSize: 12,
|
|
578
|
-
fontWeight: '500'
|
|
579
|
-
},
|
|
580
|
-
actionRow: {
|
|
581
|
-
flexDirection: 'row',
|
|
582
|
-
alignItems: 'center',
|
|
583
|
-
paddingHorizontal: 14,
|
|
584
|
-
paddingVertical: 12,
|
|
585
|
-
gap: 10
|
|
586
|
-
},
|
|
587
|
-
actionText: {
|
|
588
|
-
fontSize: 13,
|
|
589
|
-
fontWeight: '500'
|
|
590
|
-
}
|
|
591
|
-
});
|
|
592
|
-
export default AccountMenu;
|
|
593
|
-
//# sourceMappingURL=AccountMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","View","Text","TouchableOpacity","StyleSheet","ScrollView","Modal","Pressable","Platform","ActivityIndicator","Ionicons","toast","useDialogControl","Dialog","Divider","useTheme","Avatar","useOxy","useI18n","isDev","logger","loggerUtil","useSwitchableAccounts","jsx","_jsx","jsxs","_jsxs","isWeb","OS","PANEL_WIDTH","AccountMenu","open","onClose","onNavigateManage","onAddAccount","anchor","onBeforeSessionChange","switchToAccount","logout","logoutAll","removeSession","t","bloomTheme","colors","accounts","switchingAccountId","setSwitchingAccountId","removingSessionId","setRemovingSessionId","signingOut","setSigningOut","signingOutAll","setSigningOutAll","signOutDialog","signOutAllDialog","containerRef","rows","device","filter","account","onDevice","graph","current","isCurrent","others","deviceCount","length","listedAccountIds","Set","map","row","accountId","isSwitching","handleSwitch","success","error","warn","component","handleRemove","sessionId","performSignOut","performSignOutAll","document","undefined","onKey","event","key","stopPropagation","addEventListener","removeEventListener","overlayStyles","styles","webOverlay","nativeOverlay","anchorStyle","top","bottom","left","right","panelStyles","panelBase","panelWeb","backgroundColor","background","borderColor","border","panelNative","actionDisabled","content","ref","onPress","style","accessibilityRole","accessibilityLabel","children","scroll","contentContainerStyle","scrollContent","showsVerticalScrollIndicator","isBusy","isRemoving","isChild","Boolean","parentAccountId","has","role","callerMembership","displayName","accessibilityState","selected","disabled","activeOpacity","accountRow","childRow","primarySubtle","rowDisabled","uri","avatarUrl","name","size","accountInfo","nameRow","accountName","color","text","accountNameActive","numberOfLines","roleBadge","card","roleBadgeText","textSecondary","email","accountEmail","primary","hitSlop","rowSignOutButton","switchingRow","switchingText","spacing","actionRow","icon","actionText","visible","transparent","animationType","onRequestClose","control","title","description","actions","label","create","flex","position","justifyContent","borderRadius","shadowColor","shadowOpacity","shadowRadius","shadowOffset","width","height","elevation","overflow","maxHeight","borderWidth","marginHorizontal","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingBottom","flexGrow","paddingVertical","flexDirection","alignItems","paddingHorizontal","gap","paddingLeft","opacity","minWidth","fontSize","fontWeight","flexShrink","textTransform","marginTop"],"sourceRoot":"../../../../src","sources":["ui/components/AccountMenu.tsx"],"mappings":";;A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