@chainberry/ui-components 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +78 -0
- package/dist/index.mjs +19914 -19602
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -699,6 +699,9 @@ declare type DateField = 'createdAt' | 'confirmedAt';
|
|
|
699
699
|
/** Default (English) tier column headers; override via the `tierLabels` prop. */
|
|
700
700
|
export declare const DEFAULT_TIER_LABELS: Record<WalletTier, string>;
|
|
701
701
|
|
|
702
|
+
/** Default (English) copy; override any subset via the `labels` prop. */
|
|
703
|
+
export declare const DEFAULT_USER_WALLETS_LABELS: UserWalletsTableLabels;
|
|
704
|
+
|
|
702
705
|
/** Default (English) copy; override any subset via the `labels` prop. */
|
|
703
706
|
export declare const DEFAULT_V3_LABELS: WalletBalancesTableV3Labels;
|
|
704
707
|
|
|
@@ -944,6 +947,11 @@ declare function filterMatches_2(r: TreasuryActivityRecord, f: ActivityFilter):
|
|
|
944
947
|
/** A short, human name summarizing the selection — used to prefill the preset name. */
|
|
945
948
|
declare function filterToName(f: TxFilter): string;
|
|
946
949
|
|
|
950
|
+
/** Filter the user groups by a query. A hit on the userId keeps the whole group;
|
|
951
|
+
otherwise only the address rows that match are kept, dropping empty groups.
|
|
952
|
+
Powers the page search box. */
|
|
953
|
+
export declare function filterUserGroups(groups: UserWalletGroup[], query: string): UserWalletGroup[];
|
|
954
|
+
|
|
947
955
|
export declare function findNavItem(id: string): NavItemConfig | undefined;
|
|
948
956
|
|
|
949
957
|
export declare type FooterAction = {
|
|
@@ -2356,6 +2364,9 @@ export declare function UiBadge({ className, variant, asChild, ...props }: React
|
|
|
2356
2364
|
|
|
2357
2365
|
export declare function useHeaderExtension(): HeaderStickyValue;
|
|
2358
2366
|
|
|
2367
|
+
/** Deposit addresses grouped by end user. */
|
|
2368
|
+
declare const USER_WALLET_GROUPS: UserWalletGroup[];
|
|
2369
|
+
|
|
2359
2370
|
export declare function UserMenu({ name, avatarSrc, navMode, onNavModeChange, headerMode, onHeaderModeChange, onAccount, onLogout, onTakeTour, onResetDemo, collapsed, side, align, fullWidth, }: {
|
|
2360
2371
|
name?: string;
|
|
2361
2372
|
avatarSrc?: string;
|
|
@@ -2379,6 +2390,73 @@ export declare function UserMenu({ name, avatarSrc, navMode, onNavModeChange, he
|
|
|
2379
2390
|
fullWidth?: boolean;
|
|
2380
2391
|
}): JSX.Element;
|
|
2381
2392
|
|
|
2393
|
+
/** An end user and the deposit addresses they hold across networks. */
|
|
2394
|
+
export declare type UserWalletGroup = {
|
|
2395
|
+
/** userId — group key + React key. */
|
|
2396
|
+
id: string;
|
|
2397
|
+
userId: string;
|
|
2398
|
+
/** Band heading, when the group is keyed by something other than an end user
|
|
2399
|
+
(e.g. a vault account). Defaults to `userId`. */
|
|
2400
|
+
label?: string;
|
|
2401
|
+
rows: UserWalletRow[];
|
|
2402
|
+
};
|
|
2403
|
+
|
|
2404
|
+
/** One deposit address held by a user — a single table row. */
|
|
2405
|
+
export declare type UserWalletRow = {
|
|
2406
|
+
id: string;
|
|
2407
|
+
/** On-chain deposit address (rendered as a link). */
|
|
2408
|
+
address: string;
|
|
2409
|
+
/** Destination tag / memo — only networks that share one address across users
|
|
2410
|
+
(e.g. TON) carry it; omitted elsewhere. */
|
|
2411
|
+
tag?: string;
|
|
2412
|
+
/** Network code for the badge logo (resolved via coinSrc), e.g. "TRX". */
|
|
2413
|
+
network: string;
|
|
2414
|
+
/** Network label shown in the row, e.g. "TRON". */
|
|
2415
|
+
networkName: string;
|
|
2416
|
+
/** Block-explorer URL for this address. Defaults to the "#" placeholder. */
|
|
2417
|
+
addressUrl?: string;
|
|
2418
|
+
/** Network logo URL, when the caller resolves its own chain artwork.
|
|
2419
|
+
Defaults to `coinSrc(network)`. */
|
|
2420
|
+
networkSrc?: string;
|
|
2421
|
+
/** Asset code (e.g. "USDT"). Rows carrying one render an asset chip before
|
|
2422
|
+
the address — needed when a group holds addresses across several coins,
|
|
2423
|
+
which the by-network sample data never does. */
|
|
2424
|
+
symbol?: string;
|
|
2425
|
+
/** Asset logo URL. Defaults to `coinSrc(symbol)`. */
|
|
2426
|
+
symbolSrc?: string;
|
|
2427
|
+
};
|
|
2428
|
+
|
|
2429
|
+
export declare namespace userWalletsData {
|
|
2430
|
+
export {
|
|
2431
|
+
filterUserGroups,
|
|
2432
|
+
UserWalletRow,
|
|
2433
|
+
UserWalletGroup,
|
|
2434
|
+
USER_WALLET_GROUPS
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
export declare function UserWalletsPage(): JSX.Element;
|
|
2439
|
+
|
|
2440
|
+
export declare function UserWalletsTable({ groups, labels, className, }: {
|
|
2441
|
+
groups: UserWalletGroup[];
|
|
2442
|
+
/** Translated copy; unset keys fall back to English. */
|
|
2443
|
+
labels?: Partial<UserWalletsTableLabels>;
|
|
2444
|
+
className?: string;
|
|
2445
|
+
}): JSX.Element;
|
|
2446
|
+
|
|
2447
|
+
/** Translatable strings the table renders itself. Everything else — the band
|
|
2448
|
+
headings, addresses, tags and network names — comes in through `groups`. */
|
|
2449
|
+
export declare type UserWalletsTableLabels = {
|
|
2450
|
+
/** Address column header. */
|
|
2451
|
+
address: string;
|
|
2452
|
+
/** Tag column header. */
|
|
2453
|
+
tag: string;
|
|
2454
|
+
/** Network column header. */
|
|
2455
|
+
network: string;
|
|
2456
|
+
/** A group's address count, e.g. (3) => "3 wallets". */
|
|
2457
|
+
wallets: (count: number) => string;
|
|
2458
|
+
};
|
|
2459
|
+
|
|
2382
2460
|
/** A vault and the currency/network rows it holds. */
|
|
2383
2461
|
declare type Vault = {
|
|
2384
2462
|
kind: VaultKind;
|