@pfm-platform/accounts-ui-mui 0.1.1
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 +2089 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +330 -0
- package/dist/index.d.ts +330 -0
- package/dist/index.js +2074 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Account, NetWorthAccountCreate } from '@pfm-platform/shared';
|
|
3
|
+
|
|
4
|
+
interface AccountListProps {
|
|
5
|
+
userId: string;
|
|
6
|
+
/** Filter accounts by status */
|
|
7
|
+
filter?: 'all' | 'opened' | 'closed';
|
|
8
|
+
/** Group accounts by type */
|
|
9
|
+
groupByType?: boolean;
|
|
10
|
+
/** Custom title for the list */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Maximum number of accounts to display */
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AccountList component displays user accounts with optional filtering and grouping.
|
|
17
|
+
* Supports filtering by opened/closed status and grouping by account type.
|
|
18
|
+
*/
|
|
19
|
+
declare function AccountList({ userId, filter, groupByType, title, maxItems, }: AccountListProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface AccountSummaryProps {
|
|
22
|
+
userId: string;
|
|
23
|
+
/** Custom title for the summary */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Currency symbol to display */
|
|
26
|
+
currencySymbol?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* AccountSummary component displays account statistics.
|
|
30
|
+
* Shows total count, opened/closed counts, and total balance.
|
|
31
|
+
*/
|
|
32
|
+
declare function AccountSummary({ userId, title, currencySymbol, }: AccountSummaryProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface AccountCreateFormProps {
|
|
35
|
+
userId: string;
|
|
36
|
+
onSuccess?: () => void;
|
|
37
|
+
}
|
|
38
|
+
declare function AccountCreateForm({ userId, onSuccess }: AccountCreateFormProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
interface AccountEditFormProps {
|
|
41
|
+
account: Account;
|
|
42
|
+
open: boolean;
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
declare function AccountEditForm({ account, open, onClose, userId }: AccountEditFormProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
interface AccountDeleteButtonProps {
|
|
49
|
+
accountId: number;
|
|
50
|
+
userId: string;
|
|
51
|
+
accountName: string;
|
|
52
|
+
}
|
|
53
|
+
declare function AccountDeleteButton({ accountId, userId, accountName, }: AccountDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* AccountBalanceChart
|
|
57
|
+
*
|
|
58
|
+
* Account balance history line chart component.
|
|
59
|
+
* Migrated from legacy Accounts/LineChart.js (D3) to MUI X Charts.
|
|
60
|
+
*
|
|
61
|
+
* Features:
|
|
62
|
+
* - Time-based balance tracking
|
|
63
|
+
* - Multiple account support (multi-line)
|
|
64
|
+
* - Currency-formatted Y-axis
|
|
65
|
+
* - Hover tooltips with date and balance
|
|
66
|
+
* - Grid lines and axis labels
|
|
67
|
+
* - Responsive sizing
|
|
68
|
+
* - Material-UI v7 theming
|
|
69
|
+
*
|
|
70
|
+
* Migration Notes:
|
|
71
|
+
* - Legacy: D3-based SVG rendering (d3-scale, d3-axis, d3-shape)
|
|
72
|
+
* - Modern: MUI X Charts LineChart with declarative API
|
|
73
|
+
* - Removed: Complex D3 setup, manual SVG manipulation
|
|
74
|
+
* - Added: TypeScript types, responsive sizing, theme integration
|
|
75
|
+
*/
|
|
76
|
+
interface AccountBalanceDataPoint {
|
|
77
|
+
/**
|
|
78
|
+
* Date for this data point
|
|
79
|
+
*/
|
|
80
|
+
date: Date;
|
|
81
|
+
/**
|
|
82
|
+
* Balance amount
|
|
83
|
+
*/
|
|
84
|
+
balance: number;
|
|
85
|
+
}
|
|
86
|
+
interface AccountBalanceSeries {
|
|
87
|
+
/**
|
|
88
|
+
* Account identifier
|
|
89
|
+
*/
|
|
90
|
+
accountId: string;
|
|
91
|
+
/**
|
|
92
|
+
* Account name for legend
|
|
93
|
+
*/
|
|
94
|
+
accountName: string;
|
|
95
|
+
/**
|
|
96
|
+
* Data points for this account
|
|
97
|
+
*/
|
|
98
|
+
data: AccountBalanceDataPoint[];
|
|
99
|
+
/**
|
|
100
|
+
* Optional custom color
|
|
101
|
+
*/
|
|
102
|
+
color?: string;
|
|
103
|
+
}
|
|
104
|
+
interface AccountBalanceChartProps {
|
|
105
|
+
/**
|
|
106
|
+
* Account balance series to display
|
|
107
|
+
*/
|
|
108
|
+
series: AccountBalanceSeries[];
|
|
109
|
+
/**
|
|
110
|
+
* Chart width
|
|
111
|
+
* @default '100%'
|
|
112
|
+
*/
|
|
113
|
+
width?: number | string;
|
|
114
|
+
/**
|
|
115
|
+
* Chart height
|
|
116
|
+
* @default 150
|
|
117
|
+
*/
|
|
118
|
+
height?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Whether to show legend for multiple accounts
|
|
121
|
+
* @default true for multiple series
|
|
122
|
+
*/
|
|
123
|
+
showLegend?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Currency formatter
|
|
126
|
+
*/
|
|
127
|
+
currencyFormatter?: (value: number) => string;
|
|
128
|
+
/**
|
|
129
|
+
* Callback when a data point is clicked
|
|
130
|
+
*/
|
|
131
|
+
onPointClick?: (accountId: string, dataPoint: AccountBalanceDataPoint) => void;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Account balance history line chart
|
|
135
|
+
*
|
|
136
|
+
* Displays balance trends over time with support for multiple accounts.
|
|
137
|
+
* Migrated from D3-based LineChart to MUI X Charts for better integration.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* <AccountBalanceChart
|
|
142
|
+
* series={[
|
|
143
|
+
* {
|
|
144
|
+
* accountId: '1',
|
|
145
|
+
* accountName: 'Checking',
|
|
146
|
+
* data: [
|
|
147
|
+
* { date: new Date('2024-01-01'), balance: 1000 },
|
|
148
|
+
* { date: new Date('2024-02-01'), balance: 1500 },
|
|
149
|
+
* ],
|
|
150
|
+
* },
|
|
151
|
+
* ]}
|
|
152
|
+
* height={200}
|
|
153
|
+
* showLegend={true}
|
|
154
|
+
* />
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
declare function AccountBalanceChart({ series, width, height, showLegend, currencyFormatter, onPointClick, }: AccountBalanceChartProps): react_jsx_runtime.JSX.Element;
|
|
158
|
+
|
|
159
|
+
interface NetWorthSummaryProps {
|
|
160
|
+
userId: string;
|
|
161
|
+
/** Custom title for the summary */
|
|
162
|
+
title?: string;
|
|
163
|
+
/** Currency symbol to display */
|
|
164
|
+
currencySymbol?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* NetWorthSummary component displays net worth statistics.
|
|
168
|
+
* Shows net worth, change, assets/debts totals, and account counts.
|
|
169
|
+
*/
|
|
170
|
+
declare function NetWorthSummary({ userId, title, currencySymbol, }: NetWorthSummaryProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
|
|
172
|
+
interface NetWorthHistoryChartProps {
|
|
173
|
+
userId: string;
|
|
174
|
+
/** Custom title for the chart */
|
|
175
|
+
title?: string;
|
|
176
|
+
/** Height of the chart in pixels */
|
|
177
|
+
height?: number;
|
|
178
|
+
/** Currency symbol to display */
|
|
179
|
+
currencySymbol?: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* NetWorthHistoryChart component displays net worth trends over time.
|
|
183
|
+
* Shows a line chart with total net worth, assets, and debts history.
|
|
184
|
+
*/
|
|
185
|
+
declare function NetWorthHistoryChart({ userId, title, height, currencySymbol, }: NetWorthHistoryChartProps): react_jsx_runtime.JSX.Element;
|
|
186
|
+
|
|
187
|
+
interface NetWorthAccountFormProps {
|
|
188
|
+
userId: string;
|
|
189
|
+
/** If provided, form is in edit mode */
|
|
190
|
+
accountId?: number;
|
|
191
|
+
/** Initial values for edit mode */
|
|
192
|
+
initialValues?: Partial<NetWorthAccountCreate>;
|
|
193
|
+
onSuccess?: () => void;
|
|
194
|
+
onCancel?: () => void;
|
|
195
|
+
}
|
|
196
|
+
declare function NetWorthAccountForm({ userId, accountId, initialValues, onSuccess, onCancel, }: NetWorthAccountFormProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
interface EnhancedNetWorthAccountData extends NetWorthAccountCreate {
|
|
199
|
+
category?: string;
|
|
200
|
+
notes?: string;
|
|
201
|
+
institution?: string;
|
|
202
|
+
lastUpdated?: string;
|
|
203
|
+
}
|
|
204
|
+
interface NetWorthAccountEnhancedFormProps {
|
|
205
|
+
userId: string;
|
|
206
|
+
/** If provided, form is in edit mode */
|
|
207
|
+
accountId?: number;
|
|
208
|
+
/** Initial values for edit mode */
|
|
209
|
+
initialValues?: Partial<EnhancedNetWorthAccountData>;
|
|
210
|
+
onSuccess?: () => void;
|
|
211
|
+
onCancel?: () => void;
|
|
212
|
+
/** Show multi-step wizard */
|
|
213
|
+
wizardMode?: boolean;
|
|
214
|
+
/** Currency symbol */
|
|
215
|
+
currencySymbol?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* NetWorthAccountEnhancedForm component with validation, categorization, and optional wizard mode.
|
|
219
|
+
* Features account categorization, notes, institution tracking, and step-by-step guidance.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```tsx
|
|
223
|
+
* <NetWorthAccountEnhancedForm
|
|
224
|
+
* userId={userId}
|
|
225
|
+
* wizardMode
|
|
226
|
+
* currencySymbol="$"
|
|
227
|
+
* onSuccess={() => console.log('Account created!')}
|
|
228
|
+
* />
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
declare function NetWorthAccountEnhancedForm({ userId, accountId, initialValues, onSuccess, onCancel, wizardMode, currencySymbol, }: NetWorthAccountEnhancedFormProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface NetWorthAccountDeleteButtonProps {
|
|
234
|
+
userId: string;
|
|
235
|
+
accountId: number;
|
|
236
|
+
accountName?: string;
|
|
237
|
+
/** Render as icon button instead of text button */
|
|
238
|
+
iconButton?: boolean;
|
|
239
|
+
onSuccess?: () => void;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* NetWorthAccountDeleteButton component for deleting manual net worth accounts.
|
|
243
|
+
* Shows confirmation dialog before deletion.
|
|
244
|
+
*/
|
|
245
|
+
declare function NetWorthAccountDeleteButton({ userId, accountId, accountName, iconButton, onSuccess, }: NetWorthAccountDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
interface NetWorthAccountListProps {
|
|
248
|
+
userId: string;
|
|
249
|
+
/** Currency symbol to display */
|
|
250
|
+
currencySymbol?: string;
|
|
251
|
+
/** Enable bulk operations */
|
|
252
|
+
enableBulkOperations?: boolean;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* NetWorthAccountList component displays manual net worth accounts.
|
|
256
|
+
* Supports viewing, editing, deleting, and bulk operations.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```tsx
|
|
260
|
+
* <NetWorthAccountList
|
|
261
|
+
* userId="user123"
|
|
262
|
+
* currencySymbol="$"
|
|
263
|
+
* enableBulkOperations
|
|
264
|
+
* />
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
declare function NetWorthAccountList({ userId, currencySymbol, enableBulkOperations, }: NetWorthAccountListProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
interface NetWorthDashboardProps {
|
|
270
|
+
userId: string;
|
|
271
|
+
/** Custom title for the dashboard */
|
|
272
|
+
title?: string;
|
|
273
|
+
/** Currency symbol to display */
|
|
274
|
+
currencySymbol?: string;
|
|
275
|
+
/** Show chart by default */
|
|
276
|
+
showChart?: boolean;
|
|
277
|
+
/** Show account list by default */
|
|
278
|
+
showAccountList?: boolean;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* NetWorthDashboard component integrates summary, chart, and account list.
|
|
282
|
+
* Provides comprehensive net worth visualization and management.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```tsx
|
|
286
|
+
* <NetWorthDashboard
|
|
287
|
+
* userId="user123"
|
|
288
|
+
* title="My Net Worth"
|
|
289
|
+
* currencySymbol="$"
|
|
290
|
+
* />
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
declare function NetWorthDashboard({ userId, title, currencySymbol, showChart, showAccountList, }: NetWorthDashboardProps): react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
interface NetWorthAccount {
|
|
296
|
+
id: number;
|
|
297
|
+
user_id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
balance: string;
|
|
300
|
+
account_type: 'asset' | 'debt';
|
|
301
|
+
}
|
|
302
|
+
interface NetWorthAccountReconciliationDialogProps {
|
|
303
|
+
/** Account to reconcile */
|
|
304
|
+
account: NetWorthAccount | null;
|
|
305
|
+
/** Whether dialog is open */
|
|
306
|
+
open: boolean;
|
|
307
|
+
/** Callback when dialog should close */
|
|
308
|
+
onClose: () => void;
|
|
309
|
+
/** Callback on successful reconciliation */
|
|
310
|
+
onSuccess?: () => void;
|
|
311
|
+
/** Currency symbol */
|
|
312
|
+
currencySymbol?: string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* NetWorthAccountReconciliationDialog component for reconciling account balances.
|
|
316
|
+
* Allows users to update account balance based on actual bank/account statement.
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```tsx
|
|
320
|
+
* <NetWorthAccountReconciliationDialog
|
|
321
|
+
* account={selectedAccount}
|
|
322
|
+
* open={isOpen}
|
|
323
|
+
* onClose={() => setIsOpen(false)}
|
|
324
|
+
* currencySymbol="$"
|
|
325
|
+
* />
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
declare function NetWorthAccountReconciliationDialog({ account, open, onClose, onSuccess, currencySymbol, }: NetWorthAccountReconciliationDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
329
|
+
|
|
330
|
+
export { AccountBalanceChart, type AccountBalanceChartProps, type AccountBalanceDataPoint, type AccountBalanceSeries, AccountCreateForm, AccountDeleteButton, AccountEditForm, AccountList, type AccountListProps, AccountSummary, type AccountSummaryProps, type NetWorthAccount, NetWorthAccountDeleteButton, type NetWorthAccountDeleteButtonProps, NetWorthAccountEnhancedForm, NetWorthAccountForm, NetWorthAccountList, type NetWorthAccountListProps, NetWorthAccountReconciliationDialog, type NetWorthAccountReconciliationDialogProps, NetWorthDashboard, type NetWorthDashboardProps, NetWorthHistoryChart, type NetWorthHistoryChartProps, NetWorthSummary, type NetWorthSummaryProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Account, NetWorthAccountCreate } from '@pfm-platform/shared';
|
|
3
|
+
|
|
4
|
+
interface AccountListProps {
|
|
5
|
+
userId: string;
|
|
6
|
+
/** Filter accounts by status */
|
|
7
|
+
filter?: 'all' | 'opened' | 'closed';
|
|
8
|
+
/** Group accounts by type */
|
|
9
|
+
groupByType?: boolean;
|
|
10
|
+
/** Custom title for the list */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Maximum number of accounts to display */
|
|
13
|
+
maxItems?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* AccountList component displays user accounts with optional filtering and grouping.
|
|
17
|
+
* Supports filtering by opened/closed status and grouping by account type.
|
|
18
|
+
*/
|
|
19
|
+
declare function AccountList({ userId, filter, groupByType, title, maxItems, }: AccountListProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
interface AccountSummaryProps {
|
|
22
|
+
userId: string;
|
|
23
|
+
/** Custom title for the summary */
|
|
24
|
+
title?: string;
|
|
25
|
+
/** Currency symbol to display */
|
|
26
|
+
currencySymbol?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* AccountSummary component displays account statistics.
|
|
30
|
+
* Shows total count, opened/closed counts, and total balance.
|
|
31
|
+
*/
|
|
32
|
+
declare function AccountSummary({ userId, title, currencySymbol, }: AccountSummaryProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface AccountCreateFormProps {
|
|
35
|
+
userId: string;
|
|
36
|
+
onSuccess?: () => void;
|
|
37
|
+
}
|
|
38
|
+
declare function AccountCreateForm({ userId, onSuccess }: AccountCreateFormProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
interface AccountEditFormProps {
|
|
41
|
+
account: Account;
|
|
42
|
+
open: boolean;
|
|
43
|
+
onClose: () => void;
|
|
44
|
+
userId: string;
|
|
45
|
+
}
|
|
46
|
+
declare function AccountEditForm({ account, open, onClose, userId }: AccountEditFormProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
interface AccountDeleteButtonProps {
|
|
49
|
+
accountId: number;
|
|
50
|
+
userId: string;
|
|
51
|
+
accountName: string;
|
|
52
|
+
}
|
|
53
|
+
declare function AccountDeleteButton({ accountId, userId, accountName, }: AccountDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* AccountBalanceChart
|
|
57
|
+
*
|
|
58
|
+
* Account balance history line chart component.
|
|
59
|
+
* Migrated from legacy Accounts/LineChart.js (D3) to MUI X Charts.
|
|
60
|
+
*
|
|
61
|
+
* Features:
|
|
62
|
+
* - Time-based balance tracking
|
|
63
|
+
* - Multiple account support (multi-line)
|
|
64
|
+
* - Currency-formatted Y-axis
|
|
65
|
+
* - Hover tooltips with date and balance
|
|
66
|
+
* - Grid lines and axis labels
|
|
67
|
+
* - Responsive sizing
|
|
68
|
+
* - Material-UI v7 theming
|
|
69
|
+
*
|
|
70
|
+
* Migration Notes:
|
|
71
|
+
* - Legacy: D3-based SVG rendering (d3-scale, d3-axis, d3-shape)
|
|
72
|
+
* - Modern: MUI X Charts LineChart with declarative API
|
|
73
|
+
* - Removed: Complex D3 setup, manual SVG manipulation
|
|
74
|
+
* - Added: TypeScript types, responsive sizing, theme integration
|
|
75
|
+
*/
|
|
76
|
+
interface AccountBalanceDataPoint {
|
|
77
|
+
/**
|
|
78
|
+
* Date for this data point
|
|
79
|
+
*/
|
|
80
|
+
date: Date;
|
|
81
|
+
/**
|
|
82
|
+
* Balance amount
|
|
83
|
+
*/
|
|
84
|
+
balance: number;
|
|
85
|
+
}
|
|
86
|
+
interface AccountBalanceSeries {
|
|
87
|
+
/**
|
|
88
|
+
* Account identifier
|
|
89
|
+
*/
|
|
90
|
+
accountId: string;
|
|
91
|
+
/**
|
|
92
|
+
* Account name for legend
|
|
93
|
+
*/
|
|
94
|
+
accountName: string;
|
|
95
|
+
/**
|
|
96
|
+
* Data points for this account
|
|
97
|
+
*/
|
|
98
|
+
data: AccountBalanceDataPoint[];
|
|
99
|
+
/**
|
|
100
|
+
* Optional custom color
|
|
101
|
+
*/
|
|
102
|
+
color?: string;
|
|
103
|
+
}
|
|
104
|
+
interface AccountBalanceChartProps {
|
|
105
|
+
/**
|
|
106
|
+
* Account balance series to display
|
|
107
|
+
*/
|
|
108
|
+
series: AccountBalanceSeries[];
|
|
109
|
+
/**
|
|
110
|
+
* Chart width
|
|
111
|
+
* @default '100%'
|
|
112
|
+
*/
|
|
113
|
+
width?: number | string;
|
|
114
|
+
/**
|
|
115
|
+
* Chart height
|
|
116
|
+
* @default 150
|
|
117
|
+
*/
|
|
118
|
+
height?: number;
|
|
119
|
+
/**
|
|
120
|
+
* Whether to show legend for multiple accounts
|
|
121
|
+
* @default true for multiple series
|
|
122
|
+
*/
|
|
123
|
+
showLegend?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Currency formatter
|
|
126
|
+
*/
|
|
127
|
+
currencyFormatter?: (value: number) => string;
|
|
128
|
+
/**
|
|
129
|
+
* Callback when a data point is clicked
|
|
130
|
+
*/
|
|
131
|
+
onPointClick?: (accountId: string, dataPoint: AccountBalanceDataPoint) => void;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Account balance history line chart
|
|
135
|
+
*
|
|
136
|
+
* Displays balance trends over time with support for multiple accounts.
|
|
137
|
+
* Migrated from D3-based LineChart to MUI X Charts for better integration.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* <AccountBalanceChart
|
|
142
|
+
* series={[
|
|
143
|
+
* {
|
|
144
|
+
* accountId: '1',
|
|
145
|
+
* accountName: 'Checking',
|
|
146
|
+
* data: [
|
|
147
|
+
* { date: new Date('2024-01-01'), balance: 1000 },
|
|
148
|
+
* { date: new Date('2024-02-01'), balance: 1500 },
|
|
149
|
+
* ],
|
|
150
|
+
* },
|
|
151
|
+
* ]}
|
|
152
|
+
* height={200}
|
|
153
|
+
* showLegend={true}
|
|
154
|
+
* />
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
declare function AccountBalanceChart({ series, width, height, showLegend, currencyFormatter, onPointClick, }: AccountBalanceChartProps): react_jsx_runtime.JSX.Element;
|
|
158
|
+
|
|
159
|
+
interface NetWorthSummaryProps {
|
|
160
|
+
userId: string;
|
|
161
|
+
/** Custom title for the summary */
|
|
162
|
+
title?: string;
|
|
163
|
+
/** Currency symbol to display */
|
|
164
|
+
currencySymbol?: string;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* NetWorthSummary component displays net worth statistics.
|
|
168
|
+
* Shows net worth, change, assets/debts totals, and account counts.
|
|
169
|
+
*/
|
|
170
|
+
declare function NetWorthSummary({ userId, title, currencySymbol, }: NetWorthSummaryProps): react_jsx_runtime.JSX.Element;
|
|
171
|
+
|
|
172
|
+
interface NetWorthHistoryChartProps {
|
|
173
|
+
userId: string;
|
|
174
|
+
/** Custom title for the chart */
|
|
175
|
+
title?: string;
|
|
176
|
+
/** Height of the chart in pixels */
|
|
177
|
+
height?: number;
|
|
178
|
+
/** Currency symbol to display */
|
|
179
|
+
currencySymbol?: string;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* NetWorthHistoryChart component displays net worth trends over time.
|
|
183
|
+
* Shows a line chart with total net worth, assets, and debts history.
|
|
184
|
+
*/
|
|
185
|
+
declare function NetWorthHistoryChart({ userId, title, height, currencySymbol, }: NetWorthHistoryChartProps): react_jsx_runtime.JSX.Element;
|
|
186
|
+
|
|
187
|
+
interface NetWorthAccountFormProps {
|
|
188
|
+
userId: string;
|
|
189
|
+
/** If provided, form is in edit mode */
|
|
190
|
+
accountId?: number;
|
|
191
|
+
/** Initial values for edit mode */
|
|
192
|
+
initialValues?: Partial<NetWorthAccountCreate>;
|
|
193
|
+
onSuccess?: () => void;
|
|
194
|
+
onCancel?: () => void;
|
|
195
|
+
}
|
|
196
|
+
declare function NetWorthAccountForm({ userId, accountId, initialValues, onSuccess, onCancel, }: NetWorthAccountFormProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
|
|
198
|
+
interface EnhancedNetWorthAccountData extends NetWorthAccountCreate {
|
|
199
|
+
category?: string;
|
|
200
|
+
notes?: string;
|
|
201
|
+
institution?: string;
|
|
202
|
+
lastUpdated?: string;
|
|
203
|
+
}
|
|
204
|
+
interface NetWorthAccountEnhancedFormProps {
|
|
205
|
+
userId: string;
|
|
206
|
+
/** If provided, form is in edit mode */
|
|
207
|
+
accountId?: number;
|
|
208
|
+
/** Initial values for edit mode */
|
|
209
|
+
initialValues?: Partial<EnhancedNetWorthAccountData>;
|
|
210
|
+
onSuccess?: () => void;
|
|
211
|
+
onCancel?: () => void;
|
|
212
|
+
/** Show multi-step wizard */
|
|
213
|
+
wizardMode?: boolean;
|
|
214
|
+
/** Currency symbol */
|
|
215
|
+
currencySymbol?: string;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* NetWorthAccountEnhancedForm component with validation, categorization, and optional wizard mode.
|
|
219
|
+
* Features account categorization, notes, institution tracking, and step-by-step guidance.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```tsx
|
|
223
|
+
* <NetWorthAccountEnhancedForm
|
|
224
|
+
* userId={userId}
|
|
225
|
+
* wizardMode
|
|
226
|
+
* currencySymbol="$"
|
|
227
|
+
* onSuccess={() => console.log('Account created!')}
|
|
228
|
+
* />
|
|
229
|
+
* ```
|
|
230
|
+
*/
|
|
231
|
+
declare function NetWorthAccountEnhancedForm({ userId, accountId, initialValues, onSuccess, onCancel, wizardMode, currencySymbol, }: NetWorthAccountEnhancedFormProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
interface NetWorthAccountDeleteButtonProps {
|
|
234
|
+
userId: string;
|
|
235
|
+
accountId: number;
|
|
236
|
+
accountName?: string;
|
|
237
|
+
/** Render as icon button instead of text button */
|
|
238
|
+
iconButton?: boolean;
|
|
239
|
+
onSuccess?: () => void;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* NetWorthAccountDeleteButton component for deleting manual net worth accounts.
|
|
243
|
+
* Shows confirmation dialog before deletion.
|
|
244
|
+
*/
|
|
245
|
+
declare function NetWorthAccountDeleteButton({ userId, accountId, accountName, iconButton, onSuccess, }: NetWorthAccountDeleteButtonProps): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
interface NetWorthAccountListProps {
|
|
248
|
+
userId: string;
|
|
249
|
+
/** Currency symbol to display */
|
|
250
|
+
currencySymbol?: string;
|
|
251
|
+
/** Enable bulk operations */
|
|
252
|
+
enableBulkOperations?: boolean;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* NetWorthAccountList component displays manual net worth accounts.
|
|
256
|
+
* Supports viewing, editing, deleting, and bulk operations.
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* ```tsx
|
|
260
|
+
* <NetWorthAccountList
|
|
261
|
+
* userId="user123"
|
|
262
|
+
* currencySymbol="$"
|
|
263
|
+
* enableBulkOperations
|
|
264
|
+
* />
|
|
265
|
+
* ```
|
|
266
|
+
*/
|
|
267
|
+
declare function NetWorthAccountList({ userId, currencySymbol, enableBulkOperations, }: NetWorthAccountListProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
interface NetWorthDashboardProps {
|
|
270
|
+
userId: string;
|
|
271
|
+
/** Custom title for the dashboard */
|
|
272
|
+
title?: string;
|
|
273
|
+
/** Currency symbol to display */
|
|
274
|
+
currencySymbol?: string;
|
|
275
|
+
/** Show chart by default */
|
|
276
|
+
showChart?: boolean;
|
|
277
|
+
/** Show account list by default */
|
|
278
|
+
showAccountList?: boolean;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* NetWorthDashboard component integrates summary, chart, and account list.
|
|
282
|
+
* Provides comprehensive net worth visualization and management.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```tsx
|
|
286
|
+
* <NetWorthDashboard
|
|
287
|
+
* userId="user123"
|
|
288
|
+
* title="My Net Worth"
|
|
289
|
+
* currencySymbol="$"
|
|
290
|
+
* />
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
declare function NetWorthDashboard({ userId, title, currencySymbol, showChart, showAccountList, }: NetWorthDashboardProps): react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
interface NetWorthAccount {
|
|
296
|
+
id: number;
|
|
297
|
+
user_id: string;
|
|
298
|
+
name: string;
|
|
299
|
+
balance: string;
|
|
300
|
+
account_type: 'asset' | 'debt';
|
|
301
|
+
}
|
|
302
|
+
interface NetWorthAccountReconciliationDialogProps {
|
|
303
|
+
/** Account to reconcile */
|
|
304
|
+
account: NetWorthAccount | null;
|
|
305
|
+
/** Whether dialog is open */
|
|
306
|
+
open: boolean;
|
|
307
|
+
/** Callback when dialog should close */
|
|
308
|
+
onClose: () => void;
|
|
309
|
+
/** Callback on successful reconciliation */
|
|
310
|
+
onSuccess?: () => void;
|
|
311
|
+
/** Currency symbol */
|
|
312
|
+
currencySymbol?: string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* NetWorthAccountReconciliationDialog component for reconciling account balances.
|
|
316
|
+
* Allows users to update account balance based on actual bank/account statement.
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```tsx
|
|
320
|
+
* <NetWorthAccountReconciliationDialog
|
|
321
|
+
* account={selectedAccount}
|
|
322
|
+
* open={isOpen}
|
|
323
|
+
* onClose={() => setIsOpen(false)}
|
|
324
|
+
* currencySymbol="$"
|
|
325
|
+
* />
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
declare function NetWorthAccountReconciliationDialog({ account, open, onClose, onSuccess, currencySymbol, }: NetWorthAccountReconciliationDialogProps): react_jsx_runtime.JSX.Element | null;
|
|
329
|
+
|
|
330
|
+
export { AccountBalanceChart, type AccountBalanceChartProps, type AccountBalanceDataPoint, type AccountBalanceSeries, AccountCreateForm, AccountDeleteButton, AccountEditForm, AccountList, type AccountListProps, AccountSummary, type AccountSummaryProps, type NetWorthAccount, NetWorthAccountDeleteButton, type NetWorthAccountDeleteButtonProps, NetWorthAccountEnhancedForm, NetWorthAccountForm, NetWorthAccountList, type NetWorthAccountListProps, NetWorthAccountReconciliationDialog, type NetWorthAccountReconciliationDialogProps, NetWorthDashboard, type NetWorthDashboardProps, NetWorthHistoryChart, type NetWorthHistoryChartProps, NetWorthSummary, type NetWorthSummaryProps };
|