@oxyhq/services 12.2.0 → 13.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 +56 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js +26 -9
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/commonjs/ui/components/AccountSwitcher.js +792 -0
- package/lib/commonjs/ui/components/AccountSwitcher.js.map +1 -0
- package/lib/commonjs/ui/components/ActiveAccountBanner.js +144 -0
- package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +64 -27
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/index.js +42 -0
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +4 -1
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +469 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +264 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +51 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/{CreateManagedAccountScreen.js → CreateAccountScreen.js} +116 -25
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +11 -11
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/index.js +16 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenuButton.js +26 -9
- package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/module/ui/components/AccountSwitcher.js +786 -0
- package/lib/module/ui/components/AccountSwitcher.js.map +1 -0
- package/lib/module/ui/components/ActiveAccountBanner.js +141 -0
- package/lib/module/ui/components/ActiveAccountBanner.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +64 -27
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/index.js +5 -0
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +4 -1
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +464 -0
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js +259 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js +48 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/module/ui/screens/{CreateManagedAccountScreen.js → CreateAccountScreen.js} +117 -26
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/ManageAccountScreen.js +11 -11
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +7 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +13 -4
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts +47 -0
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/{ActingAsBanner.d.ts → ActiveAccountBanner.d.ts} +1 -1
- package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +33 -5
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +5 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- 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/AccountMembersScreen.d.ts +10 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts +12 -0
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +11 -0
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts +11 -0
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +7 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +13 -4
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +47 -0
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/{ActingAsBanner.d.ts → ActiveAccountBanner.d.ts} +1 -1
- package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +33 -5
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +5 -0
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- 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/AccountMembersScreen.d.ts +10 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +12 -0
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +11 -0
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +11 -0
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/index.ts +18 -4
- package/src/ui/components/AccountMenuButton.tsx +25 -10
- package/src/ui/components/AccountSwitcher.tsx +763 -0
- package/src/ui/components/ActiveAccountBanner.tsx +130 -0
- package/src/ui/context/OxyContext.tsx +113 -35
- package/src/ui/index.ts +5 -0
- package/src/ui/navigation/routes.ts +8 -2
- package/src/ui/screens/AccountMembersScreen.tsx +481 -0
- package/src/ui/screens/AccountSettingsScreen.tsx +261 -0
- package/src/ui/screens/AccountSwitcherScreen.tsx +43 -0
- package/src/ui/screens/{CreateManagedAccountScreen.tsx → CreateAccountScreen.tsx} +140 -22
- package/src/ui/screens/ManageAccountScreen.tsx +19 -19
- package/lib/commonjs/ui/components/ActingAsBanner.js +0 -140
- package/lib/commonjs/ui/components/ActingAsBanner.js.map +0 -1
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +0 -1
- package/lib/module/ui/components/ActingAsBanner.js +0 -137
- package/lib/module/ui/components/ActingAsBanner.js.map +0 -1
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/ActingAsBanner.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ActingAsBanner.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +0 -1
- package/src/ui/components/ActingAsBanner.tsx +0 -129
|
@@ -8,11 +8,20 @@ export interface AccountMenuButtonProps {
|
|
|
8
8
|
onAddAccount: () => void;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Avatar entry-point that opens the unified {@link
|
|
12
|
-
* active account from `useOxy()` — never
|
|
11
|
+
* Avatar entry-point that opens the unified {@link AccountSwitcher}. Reads the
|
|
12
|
+
* EFFECTIVE active account from `useOxy().activeAccount` — never receives user
|
|
13
|
+
* data via props.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
15
|
+
* The chip reflects the account the user is currently switched into (an org /
|
|
16
|
+
* project / bot / shared account) exactly as it reflects their personal account:
|
|
17
|
+
* a switch makes the whole app — including this header avatar — become that
|
|
18
|
+
* account. `activeAccount` falls back to the personal user when no switch is
|
|
19
|
+
* active, so the chip always shows the current account.
|
|
20
|
+
*
|
|
21
|
+
* Renders a small avatar chip (top-right friendly). Click → opens the switcher
|
|
22
|
+
* (device sign-ins + account graph). Pure component: owns only the open-state
|
|
23
|
+
* and the trigger's measured anchor. Create-account and per-account settings
|
|
24
|
+
* route through the global bottom-sheet manager.
|
|
16
25
|
*/
|
|
17
26
|
declare const AccountMenuButton: React.FC<AccountMenuButtonProps>;
|
|
18
27
|
export default AccountMenuButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMenuButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AccountMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AccountMenuButton.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AccountMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,MAAM,WAAW,sBAAsB;IACnC,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,wDAAwD;IACxD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC5B;AAID;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA+EvD,CAAC;AAUF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AccountMenuAnchor } from './AccountMenu';
|
|
3
|
+
/**
|
|
4
|
+
* The set of action callbacks the switcher body needs. Supplied by whichever
|
|
5
|
+
* chrome wraps it — the {@link AccountSwitcher} modal/popover (web header chip,
|
|
6
|
+
* native sheet) or the {@link AccountSwitcherScreen} bottom-sheet route.
|
|
7
|
+
*/
|
|
8
|
+
export interface AccountSwitcherActions {
|
|
9
|
+
/** Close the surface (dismiss the modal, or pop the bottom sheet). */
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
/** Start adding another device sign-in. */
|
|
12
|
+
onAddAccount: () => void;
|
|
13
|
+
/** Open "Manage your Oxy Account" (the caller's own personal account). */
|
|
14
|
+
onNavigateManage: () => void;
|
|
15
|
+
/** Open the create-account flow. */
|
|
16
|
+
onCreateAccount: () => void;
|
|
17
|
+
/** Open the per-account settings surface for a non-personal account. */
|
|
18
|
+
onOpenAccountSettings?: (accountId: string) => void;
|
|
19
|
+
/** Called before the active device session changes so apps can clear tenant state. */
|
|
20
|
+
onBeforeSessionChange?: () => void | Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The presentational, chrome-agnostic body of the unified account switcher.
|
|
24
|
+
*
|
|
25
|
+
* Two levels, relationship-aware:
|
|
26
|
+
* - Section A — accounts signed in on THIS device (independent sign-ins). Tap
|
|
27
|
+
* to switch session; per-row sign-out; "Add another account".
|
|
28
|
+
* - Section B — the account GRAPH under the active sign-in: "Your accounts"
|
|
29
|
+
* (self / owned) and "Shared with you" (member). 2-level tree (org →
|
|
30
|
+
* children), role badge, search, one-tap to act-as.
|
|
31
|
+
*
|
|
32
|
+
* Reads everything from `useOxy()` / `useDeviceAccounts()`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const AccountSwitcherView: React.FC<AccountSwitcherActions>;
|
|
35
|
+
export interface AccountSwitcherProps extends AccountSwitcherActions {
|
|
36
|
+
open: boolean;
|
|
37
|
+
/** Optional anchor (web only). Native ignores this and docks as a bottom sheet. */
|
|
38
|
+
anchor?: AccountMenuAnchor | null;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Unified account switcher presented as a popover (web) / bottom-sheet style
|
|
42
|
+
* modal (native). The canonical entry point opened by {@link AccountMenuButton}.
|
|
43
|
+
* Supersedes `AccountMenu` (which remains exported as the device-only switcher).
|
|
44
|
+
*/
|
|
45
|
+
declare const AccountSwitcher: React.FC<AccountSwitcherProps>;
|
|
46
|
+
export default AccountSwitcher;
|
|
47
|
+
//# sourceMappingURL=AccountSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSwitcher.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/AccountSwitcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAKvD;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACnC,sEAAsE;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,2CAA2C;IAC3C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,oCAAoC;IACpC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,sFAAsF;IACtF,qBAAqB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAyCD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAichE,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,sBAAsB;IAChE,IAAI,EAAE,OAAO,CAAC;IACd,mFAAmF;IACnF,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CACrC;AAED;;;;GAIG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAyDnD,CAAC;AA6IF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveAccountBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActiveAccountBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAiI1B,wBAA+C"}
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
3
|
import { OxyServices } from '@oxyhq/core';
|
|
4
4
|
import type { User, ApiError, SessionLoginResponse } from '@oxyhq/core';
|
|
5
|
-
import type {
|
|
5
|
+
import type { AccountNode, CreateAccountInput } from '@oxyhq/core';
|
|
6
6
|
import type { ClientSession } from '@oxyhq/core';
|
|
7
7
|
import type { UseFollowHook } from '../hooks/useFollow.types';
|
|
8
8
|
import { useLanguageManagement } from '../hooks/useLanguageManagement';
|
|
@@ -98,11 +98,39 @@ export interface OxyContextState {
|
|
|
98
98
|
props?: Record<string, unknown>;
|
|
99
99
|
}) => void;
|
|
100
100
|
openAvatarPicker: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* The id of the account switched INTO (`X-Acting-As`), or `null` when the
|
|
103
|
+
* active account is the sign-in's own personal account. This is the underlying
|
|
104
|
+
* mechanism state — UI should present the result through {@link activeAccount}
|
|
105
|
+
* rather than framing it as delegation.
|
|
106
|
+
*/
|
|
101
107
|
actingAs: string | null;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
/** Every account the caller can access — own personal root, owned, and shared — from `listAccounts()`. */
|
|
109
|
+
accounts: AccountNode[];
|
|
110
|
+
/**
|
|
111
|
+
* The {@link AccountNode} switched into, resolved from `accounts` by
|
|
112
|
+
* `actingAs`. `null` when the active account is the sign-in's own personal
|
|
113
|
+
* account, or while the switched-into id has not yet appeared in the loaded
|
|
114
|
+
* `accounts` list.
|
|
115
|
+
*/
|
|
116
|
+
actingAsAccount: AccountNode | null;
|
|
117
|
+
/**
|
|
118
|
+
* The effective ACTIVE account presented across the whole app — the account
|
|
119
|
+
* the user switched into when one is set and resolved, otherwise the signed-in
|
|
120
|
+
* user's own personal account. This is the single "who am I" source every
|
|
121
|
+
* identity surface (header avatar/name, profile chrome, context cues) should
|
|
122
|
+
* read, so a switch is reflected everywhere as a real account change.
|
|
123
|
+
*
|
|
124
|
+
* It is a {@link User} (the personal user, or the switched-into account's
|
|
125
|
+
* embedded user) so every identity surface renders it identically. Falls back
|
|
126
|
+
* to the personal `user` during the brief window after a switch before
|
|
127
|
+
* `accounts` has loaded the switched-into node, so the header never flashes
|
|
128
|
+
* empty. `null` only when signed out.
|
|
129
|
+
*/
|
|
130
|
+
activeAccount: User | null;
|
|
131
|
+
setActingAs: (accountId: string | null) => void;
|
|
132
|
+
refreshAccounts: () => Promise<void>;
|
|
133
|
+
createAccount: (data: CreateAccountInput) => Promise<AccountNode>;
|
|
106
134
|
}
|
|
107
135
|
declare const OxyContext: React.Context<OxyContextState | null>;
|
|
108
136
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/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AAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACnE;AAED,QAAA,MAAM,UAAU,uCAA8C,CAAC;AAE/D;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,MAAM,EAAE,IAAI,CAAA;CAAE,GAChB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAMnD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAsPD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAotDzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAkE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"useAccountMutations.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AC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;UAWd,gBAAgB;iBACT,SAAS,GAAG,QAAQ,GAAG,UAAU;eACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBACrB,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI;WAS5C,CAAC"}
|
|
@@ -23,6 +23,7 @@ export { FontLoader, setupFonts } from './components/FontLoader';
|
|
|
23
23
|
export { default as OxyIcon } from './components/icon/OxyIcon';
|
|
24
24
|
export { default as AccountMenu } from './components/AccountMenu';
|
|
25
25
|
export { default as AccountMenuButton } from './components/AccountMenuButton';
|
|
26
|
+
export { default as AccountSwitcher, AccountSwitcherView } from './components/AccountSwitcher';
|
|
26
27
|
export { useOxy } from './context/OxyContext';
|
|
27
28
|
export { useAuth } from './hooks/useAuth';
|
|
28
29
|
export { useFollow } from './hooks/useFollow';
|
|
@@ -30,6 +31,10 @@ export { useStorage } from './hooks/useStorage';
|
|
|
30
31
|
export type { UseStorageOptions, UseStorageResult } from './hooks/useStorage';
|
|
31
32
|
export { default as ProfileScreen } from './screens/ProfileScreen';
|
|
32
33
|
export { default as ManageAccountScreen } from './screens/ManageAccountScreen';
|
|
34
|
+
export { default as AccountSwitcherScreen } from './screens/AccountSwitcherScreen';
|
|
35
|
+
export { default as CreateAccountScreen } from './screens/CreateAccountScreen';
|
|
36
|
+
export { default as AccountMembersScreen } from './screens/AccountMembersScreen';
|
|
37
|
+
export { default as AccountSettingsScreen } from './screens/AccountSettingsScreen';
|
|
33
38
|
export { useAuthStore } from './stores/authStore';
|
|
34
39
|
export { useAccountStore } from './stores/accountStore';
|
|
35
40
|
export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extractErrorMessage, } from './utils/errorHandlers';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAE,OAAO,IA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BAAuB,EACvB,mBAAmB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
-
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | '
|
|
3
|
+
export type RouteName = 'OxyAuth' | 'ManageAccount' | 'AccountVerification' | 'PaymentGateway' | 'Profile' | 'LanguageSelector' | 'PrivacySettings' | 'SearchSettings' | 'FileManagement' | 'HelpSupport' | 'FAQ' | 'Feedback' | 'LegalDocuments' | 'AppInfo' | 'PremiumSubscription' | 'WelcomeNewUser' | 'UserLinks' | 'HistoryView' | 'SavesCollections' | 'EditProfileField' | 'LearnMoreUsernames' | 'TrustCenter' | 'TrustLeaderboard' | 'TrustRewards' | 'TrustRules' | 'AboutTrust' | 'TrustFAQ' | 'FollowersList' | 'FollowingList' | 'AccountSwitcher' | 'CreateAccount' | 'AccountMembers' | 'AccountSettings' | 'AvatarCrop' | 'Notifications' | 'ConnectedApps' | 'Preferences';
|
|
4
4
|
export declare const getScreenComponent: (routeName: RouteName) => ComponentType<BaseScreenProps> | undefined;
|
|
5
5
|
export declare const isValidRoute: (routeName: string) => routeName is RouteName;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,
|
|
1
|
+
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/navigation/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAO3D,MAAM,MAAM,SAAS,GACf,SAAS,GACT,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,SAAS,GACT,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,UAAU,GACV,gBAAgB,GAChB,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,aAAa,GACb,kBAAkB,GAClB,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,aAAa,CAAC;AAmDpB,eAAO,MAAM,kBAAkB,GAAI,WAAW,SAAS,KAAG,aAAa,CAAC,eAAe,CAAC,GAAG,SAsB1F,CAAC;AAIF,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,SAAS,IAAI,SAE7D,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;OAUG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,SAAS,CAAC;CACrC;AA+BD;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACvB,WAAW,SAAS,GAAG,IAAI,EAC3B,aAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACrC,gBASF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
+
/**
|
|
4
|
+
* Manage the members of an account (invite by username/email, change roles,
|
|
5
|
+
* remove, transfer ownership). Gated on the caller's `callerMembership`
|
|
6
|
+
* permissions. Receives the target `accountId` via navigation props.
|
|
7
|
+
*/
|
|
8
|
+
declare const AccountMembersScreen: React.FC<BaseScreenProps>;
|
|
9
|
+
export default AccountMembersScreen;
|
|
10
|
+
//# sourceMappingURL=AccountMembersScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountMembersScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountMembersScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAkB3D;;;;GAIG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmbnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
+
/**
|
|
4
|
+
* Per-account settings: edit the account's profile, jump to member management,
|
|
5
|
+
* and archive the account (danger zone). Receives the target `accountId` via
|
|
6
|
+
* navigation props. Self-surface for the caller's own personal account lives in
|
|
7
|
+
* {@link ManageAccountScreen}; this screen manages a non-personal account in the
|
|
8
|
+
* graph.
|
|
9
|
+
*/
|
|
10
|
+
declare const AccountSettingsScreen: React.FC<BaseScreenProps>;
|
|
11
|
+
export default AccountSettingsScreen;
|
|
12
|
+
//# sourceMappingURL=AccountSettingsScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAY3D;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8NpD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
+
/**
|
|
4
|
+
* Bottom-sheet route wrapper around {@link AccountSwitcherView}. Used when the
|
|
5
|
+
* switcher is opened as a sheet (e.g. from the `ActiveAccountBanner` cue or the
|
|
6
|
+
* "Your accounts" entry in ManageAccount) rather than as the header-chip
|
|
7
|
+
* popover (which uses the `AccountSwitcher` modal directly).
|
|
8
|
+
*/
|
|
9
|
+
declare const AccountSwitcherScreen: React.FC<BaseScreenProps>;
|
|
10
|
+
export default AccountSwitcherScreen;
|
|
11
|
+
//# sourceMappingURL=AccountSwitcherScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountSwitcherScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/AccountSwitcherScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAK3D;;;;;GAKG;AACH,QAAA,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0BpD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseScreenProps } from '../types/navigation';
|
|
3
|
+
/**
|
|
4
|
+
* Create a new account in the unified account graph (an organization, project,
|
|
5
|
+
* or bot). The caller becomes its owner. Optionally nested under a parent
|
|
6
|
+
* account via the `parentAccountId` prop. NOT the cryptographic Commons/DID
|
|
7
|
+
* "identity" — that is a separate concept.
|
|
8
|
+
*/
|
|
9
|
+
declare const CreateAccountScreen: React.FC<BaseScreenProps>;
|
|
10
|
+
export default CreateAccountScreen;
|
|
11
|
+
//# sourceMappingURL=CreateAccountScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateAccountScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/CreateAccountScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AA8D3D;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8RlD,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@oxyhq/contracts": "0.
|
|
109
|
+
"@oxyhq/contracts": "0.6.0"
|
|
110
110
|
},
|
|
111
111
|
"devDependencies": {
|
|
112
112
|
"nativewind": "5.0.0-preview.3",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"@expo/vector-icons": "^15.0.3",
|
|
154
154
|
"@oxyhq/bloom": ">=0.16.0",
|
|
155
|
-
"@oxyhq/core": "^
|
|
155
|
+
"@oxyhq/core": "^4.0.0",
|
|
156
156
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
157
157
|
"@react-native-community/netinfo": "^11.4.1",
|
|
158
158
|
"@tanstack/query-async-storage-persister": "^5.100",
|
package/src/index.ts
CHANGED
|
@@ -205,15 +205,23 @@ export type { FollowButtonProps, SingleFollowButtonProps, MultiFollowButtonProps
|
|
|
205
205
|
export { LogoIcon } from './ui/components/logo/LogoIcon';
|
|
206
206
|
export { LogoText } from './ui/components/logo/LogoText';
|
|
207
207
|
|
|
208
|
-
//
|
|
209
|
-
|
|
208
|
+
// Subtle "active account" context cue for the account graph (not Commons/DID).
|
|
209
|
+
// Shows which account is active when the user has switched into a non-personal
|
|
210
|
+
// account; reads as the current account, not as delegation.
|
|
211
|
+
export { default as ActiveAccountBanner } from './ui/components/ActiveAccountBanner';
|
|
210
212
|
|
|
211
|
-
// Unified account menu (popover on web,
|
|
213
|
+
// Unified account menu (device-only switcher — popover on web, sheet on native)
|
|
212
214
|
export { default as AccountMenu } from './ui/components/AccountMenu';
|
|
213
215
|
export type { AccountMenuProps, AccountMenuAnchor } from './ui/components/AccountMenu';
|
|
214
216
|
export { default as AccountMenuButton } from './ui/components/AccountMenuButton';
|
|
215
217
|
export type { AccountMenuButtonProps } from './ui/components/AccountMenuButton';
|
|
216
218
|
|
|
219
|
+
// Unified account switcher (device sign-ins + account graph). `AccountMenuButton`
|
|
220
|
+
// opens this; the `AccountSwitcherView` body also backs the `AccountSwitcher`
|
|
221
|
+
// bottom-sheet route.
|
|
222
|
+
export { default as AccountSwitcher, AccountSwitcherView } from './ui/components/AccountSwitcher';
|
|
223
|
+
export type { AccountSwitcherProps, AccountSwitcherActions } from './ui/components/AccountSwitcher';
|
|
224
|
+
|
|
217
225
|
// Unified device-account hook (hydrates every signed-in account on the device
|
|
218
226
|
// with real name/email/avatar/color for the account switcher).
|
|
219
227
|
export { useDeviceAccounts } from './ui/hooks/useDeviceAccounts';
|
|
@@ -223,12 +231,18 @@ export type {
|
|
|
223
231
|
UseDeviceAccountsResult,
|
|
224
232
|
} from './ui/hooks/useDeviceAccounts';
|
|
225
233
|
|
|
226
|
-
// Unified "Manage your Oxy Account" screen
|
|
234
|
+
// Unified "Manage your Oxy Account" screen (the caller's own personal account)
|
|
227
235
|
export { default as ManageAccountScreen } from './ui/screens/ManageAccountScreen';
|
|
228
236
|
export { default as NotificationsScreen } from './ui/screens/NotificationsScreen';
|
|
229
237
|
export { default as PreferencesScreen } from './ui/screens/PreferencesScreen';
|
|
230
238
|
export { default as ConnectedAppsScreen } from './ui/screens/ConnectedAppsScreen';
|
|
231
239
|
|
|
240
|
+
// Account-graph screens (organization / project / bot accounts)
|
|
241
|
+
export { default as AccountSwitcherScreen } from './ui/screens/AccountSwitcherScreen';
|
|
242
|
+
export { default as CreateAccountScreen } from './ui/screens/CreateAccountScreen';
|
|
243
|
+
export { default as AccountMembersScreen } from './ui/screens/AccountMembersScreen';
|
|
244
|
+
export { default as AccountSettingsScreen } from './ui/screens/AccountSettingsScreen';
|
|
245
|
+
|
|
232
246
|
// ---------------------------------------------------------------------------
|
|
233
247
|
// Bottom-sheet navigation
|
|
234
248
|
// ---------------------------------------------------------------------------
|
|
@@ -3,9 +3,11 @@ import { useCallback, useRef, useState } from 'react';
|
|
|
3
3
|
import { TouchableOpacity, StyleSheet, Platform, type LayoutChangeEvent } from 'react-native';
|
|
4
4
|
import { getAccountDisplayName } from '@oxyhq/core';
|
|
5
5
|
import Avatar from './Avatar';
|
|
6
|
-
import
|
|
6
|
+
import AccountSwitcher from './AccountSwitcher';
|
|
7
|
+
import type { AccountMenuAnchor } from './AccountMenu';
|
|
7
8
|
import { useOxy } from '../context/OxyContext';
|
|
8
9
|
import { useI18n } from '../hooks/useI18n';
|
|
10
|
+
import { showBottomSheet } from '../navigation/bottomSheetManager';
|
|
9
11
|
|
|
10
12
|
export interface AccountMenuButtonProps {
|
|
11
13
|
/** Avatar size (px). Defaults to 36 (Google account chip size). */
|
|
@@ -19,18 +21,27 @@ export interface AccountMenuButtonProps {
|
|
|
19
21
|
const isWeb = Platform.OS === 'web';
|
|
20
22
|
|
|
21
23
|
/**
|
|
22
|
-
* Avatar entry-point that opens the unified {@link
|
|
23
|
-
* active account from `useOxy()` — never
|
|
24
|
+
* Avatar entry-point that opens the unified {@link AccountSwitcher}. Reads the
|
|
25
|
+
* EFFECTIVE active account from `useOxy().activeAccount` — never receives user
|
|
26
|
+
* data via props.
|
|
24
27
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
28
|
+
* The chip reflects the account the user is currently switched into (an org /
|
|
29
|
+
* project / bot / shared account) exactly as it reflects their personal account:
|
|
30
|
+
* a switch makes the whole app — including this header avatar — become that
|
|
31
|
+
* account. `activeAccount` falls back to the personal user when no switch is
|
|
32
|
+
* active, so the chip always shows the current account.
|
|
33
|
+
*
|
|
34
|
+
* Renders a small avatar chip (top-right friendly). Click → opens the switcher
|
|
35
|
+
* (device sign-ins + account graph). Pure component: owns only the open-state
|
|
36
|
+
* and the trigger's measured anchor. Create-account and per-account settings
|
|
37
|
+
* route through the global bottom-sheet manager.
|
|
27
38
|
*/
|
|
28
39
|
const AccountMenuButton: React.FC<AccountMenuButtonProps> = ({
|
|
29
40
|
size = 36,
|
|
30
41
|
onNavigateManage,
|
|
31
42
|
onAddAccount,
|
|
32
43
|
}) => {
|
|
33
|
-
const {
|
|
44
|
+
const { activeAccount, oxyServices, isAuthenticated } = useOxy();
|
|
34
45
|
const { t, locale } = useI18n();
|
|
35
46
|
const [open, setOpen] = useState(false);
|
|
36
47
|
const [anchor, setAnchor] = useState<AccountMenuAnchor | null>(null);
|
|
@@ -66,9 +77,9 @@ const AccountMenuButton: React.FC<AccountMenuButtonProps> = ({
|
|
|
66
77
|
}
|
|
67
78
|
}, [measureAnchor, open]);
|
|
68
79
|
|
|
69
|
-
const displayName = getAccountDisplayName(
|
|
70
|
-
const avatarUri =
|
|
71
|
-
? oxyServices.getFileDownloadUrl(
|
|
80
|
+
const displayName = getAccountDisplayName(activeAccount, locale);
|
|
81
|
+
const avatarUri = activeAccount?.avatar
|
|
82
|
+
? oxyServices.getFileDownloadUrl(activeAccount.avatar, 'thumb')
|
|
72
83
|
: undefined;
|
|
73
84
|
|
|
74
85
|
const accessibilityLabel = isAuthenticated
|
|
@@ -91,11 +102,15 @@ const AccountMenuButton: React.FC<AccountMenuButtonProps> = ({
|
|
|
91
102
|
>
|
|
92
103
|
<Avatar uri={avatarUri} name={displayName} size={size} />
|
|
93
104
|
</TouchableOpacity>
|
|
94
|
-
<
|
|
105
|
+
<AccountSwitcher
|
|
95
106
|
open={open}
|
|
96
107
|
onClose={handleClose}
|
|
97
108
|
onNavigateManage={onNavigateManage}
|
|
98
109
|
onAddAccount={onAddAccount}
|
|
110
|
+
onCreateAccount={() => showBottomSheet('CreateAccount')}
|
|
111
|
+
onOpenAccountSettings={(accountId) =>
|
|
112
|
+
showBottomSheet({ screen: 'AccountSettings', props: { accountId } })
|
|
113
|
+
}
|
|
99
114
|
anchor={anchor}
|
|
100
115
|
/>
|
|
101
116
|
</>
|