@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,518 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
-
var _avatar = require("@oxyhq/bloom/avatar");
|
|
11
|
-
var _typography = require("@oxyhq/bloom/typography");
|
|
12
|
-
var _theme = require("@oxyhq/bloom/theme");
|
|
13
|
-
var _bloom = require("@oxyhq/bloom");
|
|
14
|
-
var _divider = require("@oxyhq/bloom/divider");
|
|
15
|
-
var _core = require("@oxyhq/core");
|
|
16
|
-
var _OxyContext = require("../context/OxyContext.js");
|
|
17
|
-
var _useI18n = require("../hooks/useI18n.js");
|
|
18
|
-
var _useSwitchableAccounts = require("../hooks/useSwitchableAccounts.js");
|
|
19
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const isWeb = _reactNative.Platform.OS === 'web';
|
|
21
|
-
|
|
22
|
-
/** Fixed popover width on web. `ProfileButton` mirrors this when anchoring. */
|
|
23
|
-
const MENU_WIDTH = 300;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Web-only anchor. `ProfileButton` measures its trigger and anchors the panel to
|
|
27
|
-
* one corner so the menu opens either UPWARD (footer trigger) or DOWNWARD (a
|
|
28
|
-
* trigger at the top of a sidebar). Exactly ONE vertical edge is pinned:
|
|
29
|
-
* - `bottom` set → the panel's BOTTOM edge is anchored, so it opens UPWARD.
|
|
30
|
-
* - `top` set → the panel's TOP edge is anchored, so it opens DOWNWARD.
|
|
31
|
-
* Native ignores the anchor and docks the panel to the bottom as a sheet.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Clean account switcher, written with react-native `StyleSheet` + Bloom
|
|
36
|
-
* theme colors (the package convention — no NativeWind, which is only an
|
|
37
|
-
* optional peer and absent in the primary `accounts` consumer). Lists EVERY
|
|
38
|
-
* switchable account from {@link useSwitchableAccounts}
|
|
39
|
-
* — device sign-ins AND linked graph accounts (owned orgs + shared-with-you) —
|
|
40
|
-
* and routes EVERY switch through the context's single
|
|
41
|
-
* `switchToAccount(accountId)` dispatcher (there is no separate device-only
|
|
42
|
-
* path). Each on-device inactive row carries a per-account sign-out icon;
|
|
43
|
-
* graph-only rows carry a role badge and indent under their parent. Below the
|
|
44
|
-
* list: Add account, Manage account, optional View profile, and Sign out of all.
|
|
45
|
-
*
|
|
46
|
-
* Renders as an upward-opening popover anchored to the trigger on web, and a
|
|
47
|
-
* bottom-sheet style modal on native.
|
|
48
|
-
*/
|
|
49
|
-
const ProfileMenu = ({
|
|
50
|
-
open,
|
|
51
|
-
onClose,
|
|
52
|
-
anchor,
|
|
53
|
-
onNavigateManage,
|
|
54
|
-
onAddAccount,
|
|
55
|
-
onNavigateProfile,
|
|
56
|
-
onBeforeSessionChange
|
|
57
|
-
}) => {
|
|
58
|
-
const {
|
|
59
|
-
switchToAccount,
|
|
60
|
-
logoutAll,
|
|
61
|
-
removeSession
|
|
62
|
-
} = (0, _OxyContext.useOxy)();
|
|
63
|
-
const {
|
|
64
|
-
t
|
|
65
|
-
} = (0, _useI18n.useI18n)();
|
|
66
|
-
const {
|
|
67
|
-
colors
|
|
68
|
-
} = (0, _theme.useTheme)();
|
|
69
|
-
const {
|
|
70
|
-
accounts
|
|
71
|
-
} = (0, _useSwitchableAccounts.useSwitchableAccounts)();
|
|
72
|
-
const [busyAccountId, setBusyAccountId] = (0, _react.useState)(null);
|
|
73
|
-
const [removingSessionId, setRemovingSessionId] = (0, _react.useState)(null);
|
|
74
|
-
const [signingOutAll, setSigningOutAll] = (0, _react.useState)(false);
|
|
75
|
-
const signOutAllDialog = (0, _bloom.useDialogControl)();
|
|
76
|
-
const isSwitching = busyAccountId !== null;
|
|
77
|
-
const actionDisabled = isSwitching || removingSessionId !== null || signingOutAll;
|
|
78
|
-
|
|
79
|
-
// Account ids currently in the list — used to decide whether a graph-only
|
|
80
|
-
// row is a CHILD (its parent is also shown) so it can be indented.
|
|
81
|
-
const listedAccountIds = (0, _react.useMemo)(() => new Set(accounts.map(account => account.accountId)), [accounts]);
|
|
82
|
-
|
|
83
|
-
// The ONE uniform switch path: every row (device or linked) routes through
|
|
84
|
-
// `switchToAccount(accountId)`. It reuses the device session when the account
|
|
85
|
-
// is already signed in here, and mints one only on first entry.
|
|
86
|
-
const handleSwitch = (0, _react.useCallback)(async account => {
|
|
87
|
-
if (account.isCurrent || busyAccountId) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
setBusyAccountId(account.accountId);
|
|
91
|
-
try {
|
|
92
|
-
await onBeforeSessionChange?.();
|
|
93
|
-
await switchToAccount(account.accountId);
|
|
94
|
-
_bloom.toast.success(t('accountSwitcher.toasts.switchSuccess') || 'Switched account');
|
|
95
|
-
onClose();
|
|
96
|
-
} catch (error) {
|
|
97
|
-
if (!(0, _core.isDev)()) {
|
|
98
|
-
_core.logger.warn('Switch account failed', {
|
|
99
|
-
component: 'ProfileMenu'
|
|
100
|
-
}, error);
|
|
101
|
-
}
|
|
102
|
-
_bloom.toast.error(t('accountSwitcher.toasts.switchFailed') || 'Failed to switch account');
|
|
103
|
-
} finally {
|
|
104
|
-
setBusyAccountId(null);
|
|
105
|
-
}
|
|
106
|
-
}, [busyAccountId, switchToAccount, t, onClose, onBeforeSessionChange]);
|
|
107
|
-
|
|
108
|
-
// Sign out a specific inactive account without switching/clearing the active
|
|
109
|
-
// one. The menu stays open so the user can keep managing accounts.
|
|
110
|
-
const handleRemove = (0, _react.useCallback)(async sessionId => {
|
|
111
|
-
if (removingSessionId) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
setRemovingSessionId(sessionId);
|
|
115
|
-
try {
|
|
116
|
-
await removeSession(sessionId);
|
|
117
|
-
_bloom.toast.success(t('common.actions.signedOut') || 'Signed out');
|
|
118
|
-
} catch (error) {
|
|
119
|
-
_core.logger.warn('Remove account failed', {
|
|
120
|
-
component: 'ProfileMenu'
|
|
121
|
-
}, error);
|
|
122
|
-
_bloom.toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
|
|
123
|
-
} finally {
|
|
124
|
-
setRemovingSessionId(null);
|
|
125
|
-
}
|
|
126
|
-
}, [removingSessionId, removeSession, t]);
|
|
127
|
-
const performSignOutAll = (0, _react.useCallback)(async () => {
|
|
128
|
-
if (signingOutAll) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
setSigningOutAll(true);
|
|
132
|
-
try {
|
|
133
|
-
await onBeforeSessionChange?.();
|
|
134
|
-
await logoutAll();
|
|
135
|
-
_bloom.toast.success(t('accountSwitcher.toasts.signOutAllSuccess') || 'Signed out of all accounts');
|
|
136
|
-
onClose();
|
|
137
|
-
} catch (error) {
|
|
138
|
-
_core.logger.warn('Sign out all failed', {
|
|
139
|
-
component: 'ProfileMenu'
|
|
140
|
-
}, error);
|
|
141
|
-
_bloom.toast.error(t('common.errors.signOutAllFailed') || 'Failed to sign out of all accounts');
|
|
142
|
-
} finally {
|
|
143
|
-
setSigningOutAll(false);
|
|
144
|
-
}
|
|
145
|
-
}, [signingOutAll, logoutAll, t, onClose, onBeforeSessionChange]);
|
|
146
|
-
|
|
147
|
-
// Escape-to-close (web only).
|
|
148
|
-
(0, _react.useEffect)(() => {
|
|
149
|
-
if (!open || !isWeb || typeof document === 'undefined') {
|
|
150
|
-
return undefined;
|
|
151
|
-
}
|
|
152
|
-
const onKey = event => {
|
|
153
|
-
if (event.key === 'Escape') {
|
|
154
|
-
event.stopPropagation();
|
|
155
|
-
onClose();
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
document.addEventListener('keydown', onKey, true);
|
|
159
|
-
return () => document.removeEventListener('keydown', onKey, true);
|
|
160
|
-
}, [open, onClose]);
|
|
161
|
-
if (!open) {
|
|
162
|
-
return null;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Web: anchor the panel to the measured trigger. When the anchor pins `top`
|
|
166
|
-
// the panel opens DOWNWARD from the trigger; otherwise it pins `bottom` and
|
|
167
|
-
// opens UPWARD (the default footer behavior). With no anchor captured, fall
|
|
168
|
-
// back to a bottom-left placement. Native ignores this (the panel docks to
|
|
169
|
-
// the bottom via the overlay's flex-end).
|
|
170
|
-
const panelAnchorStyle = isWeb ? {
|
|
171
|
-
position: 'absolute',
|
|
172
|
-
width: MENU_WIDTH,
|
|
173
|
-
left: anchor?.left ?? 8,
|
|
174
|
-
...(typeof anchor?.top === 'number' ? {
|
|
175
|
-
top: anchor.top
|
|
176
|
-
} : {
|
|
177
|
-
bottom: anchor?.bottom ?? 8
|
|
178
|
-
})
|
|
179
|
-
} : undefined;
|
|
180
|
-
const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable
|
|
181
|
-
// Swallow taps inside the panel so they never reach the overlay's
|
|
182
|
-
// outside-tap-to-close handler.
|
|
183
|
-
, {
|
|
184
|
-
onPress: () => undefined,
|
|
185
|
-
style: [isWeb ? styles.panelWeb : styles.panelNative, {
|
|
186
|
-
backgroundColor: colors.background
|
|
187
|
-
}, isWeb ? {
|
|
188
|
-
borderColor: colors.border
|
|
189
|
-
} : null, panelAnchorStyle, styles.panelBounds, styles.shadow],
|
|
190
|
-
accessibilityRole: "menu",
|
|
191
|
-
accessibilityLabel: t('accountMenu.label') || 'Account menu',
|
|
192
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
|
|
193
|
-
style: styles.scroll,
|
|
194
|
-
contentContainerStyle: styles.scrollContent,
|
|
195
|
-
showsVerticalScrollIndicator: false,
|
|
196
|
-
children: [accounts.map(account => {
|
|
197
|
-
const isActive = account.isCurrent;
|
|
198
|
-
const isBusy = busyAccountId === account.accountId;
|
|
199
|
-
const sessionId = account.sessionId;
|
|
200
|
-
const isRemoving = sessionId ? removingSessionId === sessionId : false;
|
|
201
|
-
const isChild = Boolean(account.parentAccountId && listedAccountIds.has(account.parentAccountId));
|
|
202
|
-
const role = account.callerMembership?.role;
|
|
203
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
204
|
-
accessibilityRole: "menuitem",
|
|
205
|
-
accessibilityLabel: account.displayName,
|
|
206
|
-
accessibilityState: {
|
|
207
|
-
selected: isActive
|
|
208
|
-
},
|
|
209
|
-
onPress: () => handleSwitch(account),
|
|
210
|
-
disabled: isActive || isBusy || isSwitching,
|
|
211
|
-
style: [styles.accountRow, isChild && styles.childRow, isActive && {
|
|
212
|
-
backgroundColor: colors.backgroundSecondary
|
|
213
|
-
}, isSwitching && !isActive && styles.rowDimmed],
|
|
214
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_avatar.Avatar, {
|
|
215
|
-
source: account.user.avatar ?? undefined,
|
|
216
|
-
uri: account.avatarUrl,
|
|
217
|
-
variant: "thumb",
|
|
218
|
-
name: account.displayName,
|
|
219
|
-
size: isActive ? 40 : isChild ? 28 : 32
|
|
220
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
221
|
-
style: styles.accountInfo,
|
|
222
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
223
|
-
style: styles.nameRow,
|
|
224
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
225
|
-
style: [styles.accountName, {
|
|
226
|
-
color: colors.text
|
|
227
|
-
}, isActive && styles.accountNameActive],
|
|
228
|
-
numberOfLines: 1,
|
|
229
|
-
children: account.displayName
|
|
230
|
-
}), role ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
231
|
-
style: [styles.roleBadge, {
|
|
232
|
-
backgroundColor: colors.card
|
|
233
|
-
}],
|
|
234
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
235
|
-
style: [styles.roleBadgeText, {
|
|
236
|
-
color: colors.textSecondary
|
|
237
|
-
}],
|
|
238
|
-
children: t(`accounts.roles.${role}.label`) || role
|
|
239
|
-
})
|
|
240
|
-
}) : null]
|
|
241
|
-
}), account.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
242
|
-
style: [styles.accountEmail, {
|
|
243
|
-
color: colors.textSecondary
|
|
244
|
-
}],
|
|
245
|
-
numberOfLines: 1,
|
|
246
|
-
children: account.email
|
|
247
|
-
}) : null]
|
|
248
|
-
}), isBusy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
249
|
-
color: colors.primary,
|
|
250
|
-
size: "small"
|
|
251
|
-
}) : isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
252
|
-
name: "check",
|
|
253
|
-
size: 20,
|
|
254
|
-
color: colors.primary
|
|
255
|
-
}) : isRemoving ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
256
|
-
color: colors.textSecondary,
|
|
257
|
-
size: "small"
|
|
258
|
-
}) : sessionId ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
259
|
-
accessibilityRole: "button",
|
|
260
|
-
accessibilityLabel: t('accountMenu.signOutAccount', {
|
|
261
|
-
name: account.displayName
|
|
262
|
-
}) || `Sign out ${account.displayName}`,
|
|
263
|
-
onPress: () => handleRemove(sessionId),
|
|
264
|
-
disabled: actionDisabled,
|
|
265
|
-
hitSlop: {
|
|
266
|
-
top: 8,
|
|
267
|
-
bottom: 8,
|
|
268
|
-
left: 8,
|
|
269
|
-
right: 8
|
|
270
|
-
},
|
|
271
|
-
style: styles.rowSignOutButton,
|
|
272
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
273
|
-
name: "logout",
|
|
274
|
-
size: 18,
|
|
275
|
-
color: colors.textSecondary
|
|
276
|
-
})
|
|
277
|
-
}) : null]
|
|
278
|
-
}, `account-${account.accountId}`);
|
|
279
|
-
}), isSwitching ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
280
|
-
style: styles.switchingRow,
|
|
281
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
282
|
-
color: colors.textSecondary,
|
|
283
|
-
size: "small"
|
|
284
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
285
|
-
style: [styles.switchingText, {
|
|
286
|
-
color: colors.textSecondary
|
|
287
|
-
}],
|
|
288
|
-
children: t('accountMenu.switching') || 'Switching account…'
|
|
289
|
-
})]
|
|
290
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
|
|
291
|
-
color: colors.border,
|
|
292
|
-
spacing: 4
|
|
293
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
294
|
-
icon: "account-plus-outline",
|
|
295
|
-
iconColor: colors.icon,
|
|
296
|
-
textColor: colors.text,
|
|
297
|
-
label: t('accountMenu.addAnother') || 'Add another account',
|
|
298
|
-
disabled: actionDisabled,
|
|
299
|
-
onPress: () => {
|
|
300
|
-
onClose();
|
|
301
|
-
onAddAccount();
|
|
302
|
-
}
|
|
303
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
304
|
-
icon: "cog-outline",
|
|
305
|
-
iconColor: colors.icon,
|
|
306
|
-
textColor: colors.text,
|
|
307
|
-
label: t('accountMenu.manage') || 'Manage your Oxy Account',
|
|
308
|
-
disabled: actionDisabled,
|
|
309
|
-
onPress: () => {
|
|
310
|
-
onClose();
|
|
311
|
-
onNavigateManage();
|
|
312
|
-
}
|
|
313
|
-
}), onNavigateProfile ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ActionRow, {
|
|
314
|
-
icon: "account-outline",
|
|
315
|
-
iconColor: colors.icon,
|
|
316
|
-
textColor: colors.text,
|
|
317
|
-
label: t('accountMenu.viewProfile') || 'View profile',
|
|
318
|
-
disabled: actionDisabled,
|
|
319
|
-
onPress: () => {
|
|
320
|
-
onClose();
|
|
321
|
-
onNavigateProfile();
|
|
322
|
-
}
|
|
323
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
|
|
324
|
-
color: colors.border,
|
|
325
|
-
spacing: 4
|
|
326
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
327
|
-
accessibilityRole: "menuitem",
|
|
328
|
-
accessibilityLabel: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
329
|
-
onPress: () => signOutAllDialog.open(),
|
|
330
|
-
disabled: actionDisabled,
|
|
331
|
-
style: [styles.actionRow, actionDisabled && styles.rowDimmed],
|
|
332
|
-
children: [signingOutAll ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
333
|
-
color: colors.error,
|
|
334
|
-
size: "small"
|
|
335
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
336
|
-
name: "logout",
|
|
337
|
-
size: 18,
|
|
338
|
-
color: colors.error
|
|
339
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
340
|
-
style: [styles.actionText, {
|
|
341
|
-
color: colors.error
|
|
342
|
-
}],
|
|
343
|
-
children: t('accountMenu.signOutAll') || 'Sign out of all accounts'
|
|
344
|
-
})]
|
|
345
|
-
})]
|
|
346
|
-
})
|
|
347
|
-
});
|
|
348
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Modal, {
|
|
349
|
-
visible: open,
|
|
350
|
-
transparent: true,
|
|
351
|
-
animationType: isWeb ? 'fade' : 'slide',
|
|
352
|
-
onRequestClose: onClose,
|
|
353
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
354
|
-
accessibilityRole: "button",
|
|
355
|
-
accessibilityLabel: t('common.actions.close') || 'Close',
|
|
356
|
-
onPress: onClose,
|
|
357
|
-
style: isWeb ? styles.webOverlay : styles.nativeOverlay,
|
|
358
|
-
children: content
|
|
359
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
|
|
360
|
-
control: signOutAllDialog,
|
|
361
|
-
title: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
362
|
-
description: t('common.confirms.signOutAll') || 'Are you sure you want to sign out of all accounts?',
|
|
363
|
-
actions: [{
|
|
364
|
-
label: t('accountMenu.signOutAll') || 'Sign out of all accounts',
|
|
365
|
-
color: 'destructive',
|
|
366
|
-
onPress: performSignOutAll
|
|
367
|
-
}, {
|
|
368
|
-
label: t('common.cancel') || 'Cancel',
|
|
369
|
-
color: 'cancel'
|
|
370
|
-
}]
|
|
371
|
-
})]
|
|
372
|
-
});
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
/** Bottom-section action row (Add account / Manage / View profile). */
|
|
376
|
-
const ActionRow = ({
|
|
377
|
-
icon,
|
|
378
|
-
iconColor,
|
|
379
|
-
textColor,
|
|
380
|
-
label,
|
|
381
|
-
disabled,
|
|
382
|
-
onPress
|
|
383
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
384
|
-
accessibilityRole: "menuitem",
|
|
385
|
-
accessibilityLabel: label,
|
|
386
|
-
onPress: onPress,
|
|
387
|
-
disabled: disabled,
|
|
388
|
-
style: [styles.actionRow, disabled && styles.rowDimmed],
|
|
389
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.MaterialCommunityIcons, {
|
|
390
|
-
name: icon,
|
|
391
|
-
size: 20,
|
|
392
|
-
color: iconColor
|
|
393
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
394
|
-
style: [styles.actionText, {
|
|
395
|
-
color: textColor
|
|
396
|
-
}],
|
|
397
|
-
children: label
|
|
398
|
-
})]
|
|
399
|
-
});
|
|
400
|
-
const styles = _reactNative.StyleSheet.create({
|
|
401
|
-
// Overlay: web is a positioning context for the anchored panel; native dims
|
|
402
|
-
// the backdrop and docks the sheet to the bottom.
|
|
403
|
-
webOverlay: {
|
|
404
|
-
flex: 1,
|
|
405
|
-
position: 'relative'
|
|
406
|
-
},
|
|
407
|
-
nativeOverlay: {
|
|
408
|
-
flex: 1,
|
|
409
|
-
justifyContent: 'flex-end',
|
|
410
|
-
backgroundColor: 'rgba(0,0,0,0.32)'
|
|
411
|
-
},
|
|
412
|
-
// Panel shell — web popover / native bottom sheet.
|
|
413
|
-
panelWeb: {
|
|
414
|
-
overflow: 'hidden',
|
|
415
|
-
borderRadius: 16,
|
|
416
|
-
borderWidth: 1
|
|
417
|
-
},
|
|
418
|
-
panelNative: {
|
|
419
|
-
overflow: 'hidden',
|
|
420
|
-
borderTopLeftRadius: 24,
|
|
421
|
-
borderTopRightRadius: 24,
|
|
422
|
-
paddingBottom: 12
|
|
423
|
-
},
|
|
424
|
-
// Shared height cap applied to both panel variants.
|
|
425
|
-
panelBounds: {
|
|
426
|
-
maxHeight: '85%'
|
|
427
|
-
},
|
|
428
|
-
// The panel's drop shadow (dynamic elevation).
|
|
429
|
-
shadow: {
|
|
430
|
-
shadowColor: '#000',
|
|
431
|
-
shadowOpacity: 0.18,
|
|
432
|
-
shadowRadius: 24,
|
|
433
|
-
shadowOffset: {
|
|
434
|
-
width: 0,
|
|
435
|
-
height: 8
|
|
436
|
-
},
|
|
437
|
-
elevation: 12
|
|
438
|
-
},
|
|
439
|
-
scroll: {
|
|
440
|
-
flexGrow: 0
|
|
441
|
-
},
|
|
442
|
-
scrollContent: {
|
|
443
|
-
paddingVertical: 4
|
|
444
|
-
},
|
|
445
|
-
accountRow: {
|
|
446
|
-
flexDirection: 'row',
|
|
447
|
-
alignItems: 'center',
|
|
448
|
-
gap: 12,
|
|
449
|
-
paddingHorizontal: 16,
|
|
450
|
-
paddingVertical: 10
|
|
451
|
-
},
|
|
452
|
-
childRow: {
|
|
453
|
-
paddingLeft: 40
|
|
454
|
-
},
|
|
455
|
-
rowDimmed: {
|
|
456
|
-
opacity: 0.4
|
|
457
|
-
},
|
|
458
|
-
accountInfo: {
|
|
459
|
-
flex: 1,
|
|
460
|
-
minWidth: 0
|
|
461
|
-
},
|
|
462
|
-
nameRow: {
|
|
463
|
-
flexDirection: 'row',
|
|
464
|
-
alignItems: 'center',
|
|
465
|
-
gap: 6
|
|
466
|
-
},
|
|
467
|
-
accountName: {
|
|
468
|
-
fontWeight: '500',
|
|
469
|
-
flexShrink: 1
|
|
470
|
-
},
|
|
471
|
-
accountNameActive: {
|
|
472
|
-
fontWeight: '600'
|
|
473
|
-
},
|
|
474
|
-
accountEmail: {
|
|
475
|
-
fontSize: 12
|
|
476
|
-
},
|
|
477
|
-
roleBadge: {
|
|
478
|
-
paddingHorizontal: 6,
|
|
479
|
-
paddingVertical: 1,
|
|
480
|
-
borderRadius: 8
|
|
481
|
-
},
|
|
482
|
-
roleBadgeText: {
|
|
483
|
-
fontSize: 10,
|
|
484
|
-
fontWeight: '600',
|
|
485
|
-
textTransform: 'capitalize'
|
|
486
|
-
},
|
|
487
|
-
rowSignOutButton: {
|
|
488
|
-
width: 28,
|
|
489
|
-
height: 28,
|
|
490
|
-
alignItems: 'center',
|
|
491
|
-
justifyContent: 'center',
|
|
492
|
-
borderRadius: 9999,
|
|
493
|
-
opacity: 0.6
|
|
494
|
-
},
|
|
495
|
-
switchingRow: {
|
|
496
|
-
flexDirection: 'row',
|
|
497
|
-
alignItems: 'center',
|
|
498
|
-
justifyContent: 'center',
|
|
499
|
-
gap: 8,
|
|
500
|
-
paddingVertical: 8
|
|
501
|
-
},
|
|
502
|
-
switchingText: {
|
|
503
|
-
fontSize: 12,
|
|
504
|
-
fontWeight: '500'
|
|
505
|
-
},
|
|
506
|
-
actionRow: {
|
|
507
|
-
flexDirection: 'row',
|
|
508
|
-
alignItems: 'center',
|
|
509
|
-
gap: 12,
|
|
510
|
-
paddingHorizontal: 16,
|
|
511
|
-
paddingVertical: 12
|
|
512
|
-
},
|
|
513
|
-
actionText: {
|
|
514
|
-
fontWeight: '500'
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
var _default = exports.default = ProfileMenu;
|
|
518
|
-
//# sourceMappingURL=ProfileMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_vectorIcons","_avatar","_typography","_theme","_bloom","_divider","_core","_OxyContext","_useI18n","_useSwitchableAccounts","_jsxRuntime","isWeb","Platform","OS","MENU_WIDTH","ProfileMenu","open","onClose","anchor","onNavigateManage","onAddAccount","onNavigateProfile","onBeforeSessionChange","switchToAccount","logoutAll","removeSession","useOxy","t","useI18n","colors","useTheme","accounts","useSwitchableAccounts","busyAccountId","setBusyAccountId","useState","removingSessionId","setRemovingSessionId","signingOutAll","setSigningOutAll","signOutAllDialog","useDialogControl","isSwitching","actionDisabled","listedAccountIds","useMemo","Set","map","account","accountId","handleSwitch","useCallback","isCurrent","toast","success","error","isDev","loggerUtil","warn","component","handleRemove","sessionId","performSignOutAll","useEffect","document","undefined","onKey","event","key","stopPropagation","addEventListener","removeEventListener","panelAnchorStyle","position","width","left","top","bottom","content","jsx","Pressable","onPress","style","styles","panelWeb","panelNative","backgroundColor","background","borderColor","border","panelBounds","shadow","accessibilityRole","accessibilityLabel","children","jsxs","ScrollView","scroll","contentContainerStyle","scrollContent","showsVerticalScrollIndicator","isActive","isBusy","isRemoving","isChild","Boolean","parentAccountId","has","role","callerMembership","displayName","accessibilityState","selected","disabled","accountRow","childRow","backgroundSecondary","rowDimmed","Avatar","source","user","avatar","uri","avatarUrl","variant","name","size","View","accountInfo","nameRow","Text","accountName","color","text","accountNameActive","numberOfLines","roleBadge","card","roleBadgeText","textSecondary","email","accountEmail","ActivityIndicator","primary","MaterialCommunityIcons","hitSlop","right","rowSignOutButton","switchingRow","switchingText","Divider","spacing","ActionRow","icon","iconColor","textColor","label","actionRow","actionText","Modal","visible","transparent","animationType","onRequestClose","webOverlay","nativeOverlay","Dialog","control","title","description","actions","StyleSheet","create","flex","justifyContent","overflow","borderRadius","borderWidth","borderTopLeftRadius","borderTopRightRadius","paddingBottom","maxHeight","shadowColor","shadowOpacity","shadowRadius","shadowOffset","height","elevation","flexGrow","paddingVertical","flexDirection","alignItems","gap","paddingHorizontal","paddingLeft","opacity","minWidth","fontWeight","flexShrink","fontSize","textTransform","_default","exports","default"],"sourceRoot":"../../../../src","sources":["ui/components/ProfileMenu.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AACA,IAAAW,sBAAA,GAAAX,OAAA;AAA+F,IAAAY,WAAA,GAAAZ,OAAA;AAE/F,MAAMa,KAAK,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK;;AAEnC;AACA,MAAMC,UAAU,GAAG,GAAG;;A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