@layerfi/components 0.1.10 → 0.1.12
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/esm/index.js +2548 -1511
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +697 -187
- package/dist/index.js +2595 -1559
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +547 -149
- package/dist/styles/index.css.map +3 -3
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ declare module '@layerfi/components/api/layer/authenticated_http' {
|
|
|
27
27
|
params?: Params | undefined;
|
|
28
28
|
body?: Body_1 | undefined;
|
|
29
29
|
} | undefined) => Promise<Return>;
|
|
30
|
+
export const deleteRequest: <Return extends Record<string, unknown> = Record<string, unknown>, Body_1 extends Record<string, unknown> = Record<string, unknown>, Params extends Record<string, string | undefined> = Record<string, string | undefined>>(url: (params: Params) => string) => (baseUrl: string, accessToken: string | undefined, options?: {
|
|
31
|
+
params?: Params | undefined;
|
|
32
|
+
body?: Body_1 | undefined;
|
|
33
|
+
} | undefined) => Promise<Return>;
|
|
30
34
|
|
|
31
35
|
}
|
|
32
36
|
declare module '@layerfi/components/api/layer/balance_sheet' {
|
|
@@ -87,12 +91,19 @@ declare module '@layerfi/components/api/layer/categories' {
|
|
|
87
91
|
}>;
|
|
88
92
|
|
|
89
93
|
}
|
|
90
|
-
declare module '@layerfi/components/api/layer/
|
|
91
|
-
import { Account,
|
|
92
|
-
|
|
94
|
+
declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
95
|
+
import { Account, ChartOfAccounts, NewAccount, EditAccount, LedgerAccountsEntry } from '@layerfi/components/types';
|
|
96
|
+
import { ChartWithBalances } from '@layerfi/components/types/chart_of_accounts';
|
|
97
|
+
import { LedgerAccountLineItems } from '@layerfi/components/types/ledger_accounts';
|
|
98
|
+
export const getChartOfAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
93
99
|
params?: Record<string, string | undefined> | undefined;
|
|
94
100
|
} | undefined) => () => Promise<{
|
|
95
|
-
data:
|
|
101
|
+
data: ChartOfAccounts;
|
|
102
|
+
}>;
|
|
103
|
+
export const getLedgerAccountBalances: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
104
|
+
params?: Record<string, string | undefined> | undefined;
|
|
105
|
+
} | undefined) => () => Promise<{
|
|
106
|
+
data: ChartWithBalances;
|
|
96
107
|
}>;
|
|
97
108
|
export const createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
98
109
|
params?: Record<string, string | undefined> | undefined;
|
|
@@ -106,15 +117,55 @@ declare module '@layerfi/components/api/layer/ledger_accounts' {
|
|
|
106
117
|
} | undefined) => Promise<{
|
|
107
118
|
data: Account;
|
|
108
119
|
}>;
|
|
120
|
+
export const getLedgerAccountsLines: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
121
|
+
params?: Record<string, string | undefined> | undefined;
|
|
122
|
+
} | undefined) => () => Promise<{
|
|
123
|
+
data: LedgerAccountLineItems;
|
|
124
|
+
}>;
|
|
125
|
+
export const getLedgerAccountsEntry: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
126
|
+
params?: Record<string, string | undefined> | undefined;
|
|
127
|
+
} | undefined) => () => Promise<{
|
|
128
|
+
data: LedgerAccountsEntry;
|
|
129
|
+
}>;
|
|
109
130
|
|
|
110
131
|
}
|
|
111
132
|
declare module '@layerfi/components/api/layer/linked_accounts' {
|
|
112
|
-
import { LinkedAccounts } from '@layerfi/components/types/linked_accounts';
|
|
133
|
+
import { LinkedAccounts, PublicToken } from '@layerfi/components/types/linked_accounts';
|
|
113
134
|
export const getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
114
135
|
params?: Record<string, string | undefined> | undefined;
|
|
115
136
|
} | undefined) => () => Promise<{
|
|
116
137
|
data: LinkedAccounts;
|
|
117
138
|
}>;
|
|
139
|
+
export const getPlaidLinkToken: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
140
|
+
params?: Record<string, string | undefined> | undefined;
|
|
141
|
+
body?: Record<string, unknown> | undefined;
|
|
142
|
+
} | undefined) => Promise<{
|
|
143
|
+
data: {
|
|
144
|
+
type: 'Link_Token';
|
|
145
|
+
link_token: string;
|
|
146
|
+
};
|
|
147
|
+
}>;
|
|
148
|
+
export const exchangePlaidPublicToken: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
149
|
+
params?: Record<string, string | undefined> | undefined;
|
|
150
|
+
body?: PublicToken | undefined;
|
|
151
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
152
|
+
/**
|
|
153
|
+
* This is named per plaid terminology. It means unlinking an institution
|
|
154
|
+
*/
|
|
155
|
+
export const unlinkPlaidItem: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
156
|
+
params?: {
|
|
157
|
+
businessId: string;
|
|
158
|
+
plaidItemId: string;
|
|
159
|
+
} | undefined;
|
|
160
|
+
body?: Record<string, unknown> | undefined;
|
|
161
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
162
|
+
export const unlinkPlaidAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
163
|
+
params?: {
|
|
164
|
+
businessId: string;
|
|
165
|
+
accountId: string;
|
|
166
|
+
} | undefined;
|
|
167
|
+
body?: Record<string, unknown> | undefined;
|
|
168
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
118
169
|
|
|
119
170
|
}
|
|
120
171
|
declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
@@ -178,11 +229,26 @@ declare module '@layerfi/components/api/layer' {
|
|
|
178
229
|
categories: import("@layerfi/components/types").Category[];
|
|
179
230
|
};
|
|
180
231
|
}>;
|
|
181
|
-
|
|
232
|
+
getChartOfAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
233
|
+
params?: Record<string, string | undefined> | undefined;
|
|
234
|
+
} | undefined) => () => Promise<{
|
|
235
|
+
data: import("@layerfi/components/types").ChartOfAccounts;
|
|
236
|
+
}>;
|
|
237
|
+
getLedgerAccountBalances: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
238
|
+
params?: Record<string, string | undefined> | undefined;
|
|
239
|
+
} | undefined) => () => Promise<{
|
|
240
|
+
data: import("@layerfi/components/types/chart_of_accounts").ChartWithBalances;
|
|
241
|
+
}>;
|
|
242
|
+
getLedgerAccountsLines: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
182
243
|
params?: Record<string, string | undefined> | undefined;
|
|
183
244
|
} | undefined) => () => Promise<{
|
|
184
245
|
data: import("@layerfi/components/types").LedgerAccounts;
|
|
185
246
|
}>;
|
|
247
|
+
getLedgerAccountsEntry: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
248
|
+
params?: Record<string, string | undefined> | undefined;
|
|
249
|
+
} | undefined) => () => Promise<{
|
|
250
|
+
data: import("@layerfi/components/types").LedgerAccountsEntry;
|
|
251
|
+
}>;
|
|
186
252
|
getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
187
253
|
params?: Record<string, string | undefined> | undefined;
|
|
188
254
|
} | undefined) => () => Promise<{
|
|
@@ -194,21 +260,39 @@ declare module '@layerfi/components/api/layer' {
|
|
|
194
260
|
} | undefined) => () => Promise<{
|
|
195
261
|
data: import("@layerfi/components/types/linked_accounts").LinkedAccounts;
|
|
196
262
|
}>;
|
|
263
|
+
getPlaidLinkToken: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
264
|
+
params?: Record<string, string | undefined> | undefined;
|
|
265
|
+
body?: Record<string, unknown> | undefined;
|
|
266
|
+
} | undefined) => Promise<{
|
|
267
|
+
data: {
|
|
268
|
+
type: "Link_Token";
|
|
269
|
+
link_token: string;
|
|
270
|
+
};
|
|
271
|
+
}>;
|
|
272
|
+
exchangePlaidPublicToken: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
273
|
+
params?: Record<string, string | undefined> | undefined;
|
|
274
|
+
body?: import("@layerfi/components/types/linked_accounts").PublicToken | undefined;
|
|
275
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
276
|
+
unlinkPlaidAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
277
|
+
params?: {
|
|
278
|
+
businessId: string;
|
|
279
|
+
accountId: string;
|
|
280
|
+
} | undefined;
|
|
281
|
+
body?: Record<string, unknown> | undefined;
|
|
282
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
283
|
+
unlinkPlaidItem: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
284
|
+
params?: {
|
|
285
|
+
businessId: string;
|
|
286
|
+
plaidItemId: string;
|
|
287
|
+
} | undefined;
|
|
288
|
+
body?: Record<string, unknown> | undefined;
|
|
289
|
+
} | undefined) => Promise<Record<string, unknown>>;
|
|
197
290
|
};
|
|
198
291
|
|
|
199
292
|
}
|
|
200
293
|
declare module '@layerfi/components/api/util' {
|
|
201
294
|
export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
|
|
202
295
|
|
|
203
|
-
}
|
|
204
|
-
declare module '@layerfi/components/components/AccountsReceivable/AccountsReceivableIndex' {
|
|
205
|
-
import React from 'react';
|
|
206
|
-
export const AccountsReceivable: () => React.JSX.Element;
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
declare module '@layerfi/components/components/AccountsReceivable/index' {
|
|
210
|
-
export { AccountsReceivable } from '@layerfi/components/components/AccountsReceivable/AccountsReceivableIndex';
|
|
211
|
-
|
|
212
296
|
}
|
|
213
297
|
declare module '@layerfi/components/components/Badge/Badge' {
|
|
214
298
|
import React, { ReactNode } from 'react';
|
|
@@ -217,18 +301,27 @@ declare module '@layerfi/components/components/Badge/Badge' {
|
|
|
217
301
|
SMALL = "small",
|
|
218
302
|
MEDIUM = "medium"
|
|
219
303
|
}
|
|
304
|
+
export enum BadgeVariant {
|
|
305
|
+
DEFAULT = "default",
|
|
306
|
+
SUCCESS = "success",
|
|
307
|
+
WARNING = "warning",
|
|
308
|
+
ERROR = "error"
|
|
309
|
+
}
|
|
220
310
|
export interface BadgeProps {
|
|
221
311
|
children: ReactNode;
|
|
222
312
|
icon?: ReactNode;
|
|
223
313
|
onClick?: ButtonProps['onClick'];
|
|
224
314
|
tooltip?: ReactNode;
|
|
225
315
|
size?: BadgeSize;
|
|
316
|
+
variant?: BadgeVariant;
|
|
317
|
+
hoverable?: boolean;
|
|
226
318
|
}
|
|
227
|
-
export const Badge: ({ icon, onClick, children, tooltip, size, }: BadgeProps) => React.JSX.Element;
|
|
319
|
+
export const Badge: ({ icon, onClick, children, tooltip, size, variant, hoverable, }: BadgeProps) => React.JSX.Element;
|
|
228
320
|
|
|
229
321
|
}
|
|
230
322
|
declare module '@layerfi/components/components/Badge/index' {
|
|
231
323
|
export { Badge } from '@layerfi/components/components/Badge/Badge';
|
|
324
|
+
export { BadgeVariant } from '@layerfi/components/components/Badge/Badge';
|
|
232
325
|
|
|
233
326
|
}
|
|
234
327
|
declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
@@ -435,6 +528,19 @@ declare module '@layerfi/components/components/Button/index' {
|
|
|
435
528
|
export { TextButton } from '@layerfi/components/components/Button/TextButton';
|
|
436
529
|
export { BackButton } from '@layerfi/components/components/Button/BackButton';
|
|
437
530
|
|
|
531
|
+
}
|
|
532
|
+
declare module '@layerfi/components/components/Card/Card' {
|
|
533
|
+
import React, { ReactNode } from 'react';
|
|
534
|
+
export interface CardProps {
|
|
535
|
+
children: ReactNode;
|
|
536
|
+
className?: string;
|
|
537
|
+
}
|
|
538
|
+
export const Card: ({ children, className }: CardProps) => React.JSX.Element;
|
|
539
|
+
|
|
540
|
+
}
|
|
541
|
+
declare module '@layerfi/components/components/Card/index' {
|
|
542
|
+
export { Card } from '@layerfi/components/components/Card/Card';
|
|
543
|
+
|
|
438
544
|
}
|
|
439
545
|
declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
|
|
440
546
|
import React from 'react';
|
|
@@ -479,6 +585,121 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
|
|
|
479
585
|
declare module '@layerfi/components/components/CategorySelect/index' {
|
|
480
586
|
export { CategorySelect } from '@layerfi/components/components/CategorySelect/CategorySelect';
|
|
481
587
|
|
|
588
|
+
}
|
|
589
|
+
declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts' {
|
|
590
|
+
import React from 'react';
|
|
591
|
+
import { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/index';
|
|
592
|
+
import { useLedgerAccounts } from '@layerfi/components/hooks/useLedgerAccounts/index';
|
|
593
|
+
export type View = 'mobile' | 'tablet' | 'desktop';
|
|
594
|
+
export interface ChartOfAccountsProps {
|
|
595
|
+
asWidget?: boolean;
|
|
596
|
+
}
|
|
597
|
+
export type ChartOfAccountsContextType = ReturnType<typeof useChartOfAccounts>;
|
|
598
|
+
export const ChartOfAccountsContext: React.Context<{
|
|
599
|
+
data: import("@layerfi/components/types/chart_of_accounts").ChartWithBalances | undefined;
|
|
600
|
+
isLoading?: boolean | undefined;
|
|
601
|
+
isValidating?: boolean | undefined;
|
|
602
|
+
error?: unknown;
|
|
603
|
+
refetch: () => void;
|
|
604
|
+
create: (newAccount: import("@layerfi/components/types").NewAccount) => void;
|
|
605
|
+
form?: import("@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts").ChartOfAccountsForm | undefined;
|
|
606
|
+
sendingForm?: boolean | undefined;
|
|
607
|
+
apiError?: string | undefined;
|
|
608
|
+
addAccount: () => void;
|
|
609
|
+
editAccount: (id: string) => void;
|
|
610
|
+
cancelForm: () => void;
|
|
611
|
+
changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined) => void;
|
|
612
|
+
submitForm: () => void;
|
|
613
|
+
}>;
|
|
614
|
+
export type LedgerAccountsContextType = ReturnType<typeof useLedgerAccounts>;
|
|
615
|
+
export const LedgerAccountsContext: React.Context<{
|
|
616
|
+
data?: import("@layerfi/components/types").LedgerAccounts | undefined;
|
|
617
|
+
entryData?: import("@layerfi/components/types").LedgerAccountsEntry | undefined;
|
|
618
|
+
isLoading?: boolean | undefined;
|
|
619
|
+
isLoadingEntry?: boolean | undefined;
|
|
620
|
+
isValidating?: boolean | undefined;
|
|
621
|
+
isValidatingEntry?: boolean | undefined;
|
|
622
|
+
error?: unknown;
|
|
623
|
+
errorEntry?: unknown;
|
|
624
|
+
refetch: () => void;
|
|
625
|
+
accountId?: string | undefined;
|
|
626
|
+
setAccountId: (id?: string | undefined) => void;
|
|
627
|
+
selectedEntryId?: string | undefined;
|
|
628
|
+
setSelectedEntryId: (id?: string | undefined) => void;
|
|
629
|
+
closeSelectedEntry: () => void;
|
|
630
|
+
}>;
|
|
631
|
+
export const ChartOfAccounts: (props: ChartOfAccountsProps) => React.JSX.Element;
|
|
632
|
+
|
|
633
|
+
}
|
|
634
|
+
declare module '@layerfi/components/components/ChartOfAccounts/index' {
|
|
635
|
+
export { ChartOfAccounts, ChartOfAccountsContext, LedgerAccountsContext, View, } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
636
|
+
|
|
637
|
+
}
|
|
638
|
+
declare module '@layerfi/components/components/ChartOfAccountsForm/ChartOfAccountsForm' {
|
|
639
|
+
import React from 'react';
|
|
640
|
+
export const ChartOfAccountsForm: () => React.JSX.Element | undefined;
|
|
641
|
+
|
|
642
|
+
}
|
|
643
|
+
declare module '@layerfi/components/components/ChartOfAccountsForm/constants' {
|
|
644
|
+
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
645
|
+
export const SUB_TYPE_OPTIONS: BaseSelectOption[];
|
|
646
|
+
|
|
647
|
+
}
|
|
648
|
+
declare module '@layerfi/components/components/ChartOfAccountsForm/index' {
|
|
649
|
+
export { ChartOfAccountsForm } from '@layerfi/components/components/ChartOfAccountsForm/ChartOfAccountsForm';
|
|
650
|
+
|
|
651
|
+
}
|
|
652
|
+
declare module '@layerfi/components/components/ChartOfAccountsForm/useParentOptions' {
|
|
653
|
+
import { ChartWithBalances } from '@layerfi/components/types/chart_of_accounts';
|
|
654
|
+
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
655
|
+
export const useParentOptions: (data?: ChartWithBalances) => BaseSelectOption[];
|
|
656
|
+
|
|
657
|
+
}
|
|
658
|
+
declare module '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow' {
|
|
659
|
+
import React from 'react';
|
|
660
|
+
import { LedgerAccountBalance } from '@layerfi/components/types/chart_of_accounts';
|
|
661
|
+
import { View } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
662
|
+
type ChartOfAccountsRowProps = {
|
|
663
|
+
account: LedgerAccountBalance;
|
|
664
|
+
depth?: number;
|
|
665
|
+
index: number;
|
|
666
|
+
cumulativeIndex?: number;
|
|
667
|
+
expanded: boolean;
|
|
668
|
+
acountsLength: number;
|
|
669
|
+
defaultOpen?: boolean;
|
|
670
|
+
view?: View;
|
|
671
|
+
};
|
|
672
|
+
export const ChartOfAccountsRow: ({ account, depth, index, cumulativeIndex, expanded, defaultOpen, acountsLength, view, }: ChartOfAccountsRowProps) => React.JSX.Element;
|
|
673
|
+
export {};
|
|
674
|
+
|
|
675
|
+
}
|
|
676
|
+
declare module '@layerfi/components/components/ChartOfAccountsRow/index' {
|
|
677
|
+
export { ChartOfAccountsRow } from '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow';
|
|
678
|
+
|
|
679
|
+
}
|
|
680
|
+
declare module '@layerfi/components/components/ChartOfAccountsSidebar/ChartOfAccountsSidebar' {
|
|
681
|
+
import React, { RefObject } from 'react';
|
|
682
|
+
export const ChartOfAccountsSidebar: ({ parentRef: _parentRef, }: {
|
|
683
|
+
parentRef?: RefObject<HTMLDivElement>;
|
|
684
|
+
}) => React.JSX.Element;
|
|
685
|
+
|
|
686
|
+
}
|
|
687
|
+
declare module '@layerfi/components/components/ChartOfAccountsSidebar/index' {
|
|
688
|
+
export { ChartOfAccountsSidebar } from '@layerfi/components/components/ChartOfAccountsSidebar/ChartOfAccountsSidebar';
|
|
689
|
+
|
|
690
|
+
}
|
|
691
|
+
declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccountsTable' {
|
|
692
|
+
import React, { RefObject } from 'react';
|
|
693
|
+
import { View } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
694
|
+
export const ChartOfAccountsTable: ({ view, containerRef, }: {
|
|
695
|
+
view: View;
|
|
696
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
697
|
+
}) => React.JSX.Element;
|
|
698
|
+
|
|
699
|
+
}
|
|
700
|
+
declare module '@layerfi/components/components/ChartOfAccountsTable/index' {
|
|
701
|
+
export { ChartOfAccountsTable } from '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccountsTable';
|
|
702
|
+
|
|
482
703
|
}
|
|
483
704
|
declare module '@layerfi/components/components/Container/Container' {
|
|
484
705
|
import React, { ReactNode } from 'react';
|
|
@@ -486,6 +707,7 @@ declare module '@layerfi/components/components/Container/Container' {
|
|
|
486
707
|
name: string;
|
|
487
708
|
className?: string;
|
|
488
709
|
asWidget?: boolean;
|
|
710
|
+
elevated?: boolean;
|
|
489
711
|
children: ReactNode;
|
|
490
712
|
}
|
|
491
713
|
export const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -526,6 +748,50 @@ declare module '@layerfi/components/components/DataState/DataState' {
|
|
|
526
748
|
declare module '@layerfi/components/components/DataState/index' {
|
|
527
749
|
export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
|
|
528
750
|
|
|
751
|
+
}
|
|
752
|
+
declare module '@layerfi/components/components/DateTime/DateTime' {
|
|
753
|
+
import React from 'react';
|
|
754
|
+
interface DateTimeProps {
|
|
755
|
+
value: string;
|
|
756
|
+
format?: string;
|
|
757
|
+
dateFormat?: string;
|
|
758
|
+
timeFormat?: string;
|
|
759
|
+
onlyDate?: boolean;
|
|
760
|
+
onlyTime?: boolean;
|
|
761
|
+
}
|
|
762
|
+
export const DateTime: ({ value, format, dateFormat, timeFormat, onlyDate, onlyTime, }: DateTimeProps) => React.JSX.Element;
|
|
763
|
+
export {};
|
|
764
|
+
|
|
765
|
+
}
|
|
766
|
+
declare module '@layerfi/components/components/DateTime/index' {
|
|
767
|
+
export { DateTime } from '@layerfi/components/components/DateTime/DateTime';
|
|
768
|
+
|
|
769
|
+
}
|
|
770
|
+
declare module '@layerfi/components/components/DetailsList/DetailsList' {
|
|
771
|
+
import React, { ReactNode } from 'react';
|
|
772
|
+
export interface DetailsListProps {
|
|
773
|
+
title?: string;
|
|
774
|
+
className?: string;
|
|
775
|
+
children: ReactNode;
|
|
776
|
+
actions?: ReactNode;
|
|
777
|
+
}
|
|
778
|
+
export const DetailsList: ({ title, children, className, actions, }: DetailsListProps) => React.JSX.Element;
|
|
779
|
+
|
|
780
|
+
}
|
|
781
|
+
declare module '@layerfi/components/components/DetailsList/DetailsListItem' {
|
|
782
|
+
import React, { ReactNode } from 'react';
|
|
783
|
+
export interface DetailsListItemProps {
|
|
784
|
+
label: string;
|
|
785
|
+
children: ReactNode | string;
|
|
786
|
+
isLoading?: boolean;
|
|
787
|
+
}
|
|
788
|
+
export const DetailsListItem: ({ label, children, isLoading, }: DetailsListItemProps) => React.JSX.Element;
|
|
789
|
+
|
|
790
|
+
}
|
|
791
|
+
declare module '@layerfi/components/components/DetailsList/index' {
|
|
792
|
+
export { DetailsList } from '@layerfi/components/components/DetailsList/DetailsList';
|
|
793
|
+
export { DetailsListItem } from '@layerfi/components/components/DetailsList/DetailsListItem';
|
|
794
|
+
|
|
529
795
|
}
|
|
530
796
|
declare module '@layerfi/components/components/ExpandedBankTransactionRow/APIErrorNotifications' {
|
|
531
797
|
import React from 'react';
|
|
@@ -580,10 +846,12 @@ declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
|
|
|
580
846
|
children: ReactNode;
|
|
581
847
|
config: {
|
|
582
848
|
name: string;
|
|
583
|
-
action: () => void;
|
|
849
|
+
action: (plaidItemId: string, accountId: string) => void;
|
|
584
850
|
}[];
|
|
851
|
+
plaidItemId: string;
|
|
852
|
+
accountId: string;
|
|
585
853
|
}
|
|
586
|
-
export const HoverMenu: ({ children, config }: HoverMenuProps) => React.JSX.Element;
|
|
854
|
+
export const HoverMenu: ({ children, config, plaidItemId, accountId, }: HoverMenuProps) => React.JSX.Element;
|
|
587
855
|
|
|
588
856
|
}
|
|
589
857
|
declare module '@layerfi/components/components/HoverMenu/index' {
|
|
@@ -632,8 +900,9 @@ declare module '@layerfi/components/components/Input/Select' {
|
|
|
632
900
|
value?: T;
|
|
633
901
|
onChange: (selected: T) => void;
|
|
634
902
|
disabled?: boolean;
|
|
903
|
+
placeholder?: string;
|
|
635
904
|
}
|
|
636
|
-
export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, }: SelectProps<T>) => React.JSX.Element;
|
|
905
|
+
export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, placeholder, }: SelectProps<T>) => React.JSX.Element;
|
|
637
906
|
|
|
638
907
|
}
|
|
639
908
|
declare module '@layerfi/components/components/Input/index' {
|
|
@@ -643,71 +912,41 @@ declare module '@layerfi/components/components/Input/index' {
|
|
|
643
912
|
export { Select } from '@layerfi/components/components/Input/Select';
|
|
644
913
|
|
|
645
914
|
}
|
|
646
|
-
declare module '@layerfi/components/components/
|
|
647
|
-
import React from 'react';
|
|
648
|
-
import {
|
|
649
|
-
export
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
refetch: () => void;
|
|
656
|
-
create: (newAccount: import("@layerfi/components/types").NewAccount) => void;
|
|
657
|
-
form?: import("@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts").LedgerAccountsForm | undefined;
|
|
658
|
-
sendingForm?: boolean | undefined;
|
|
659
|
-
apiError?: string | undefined;
|
|
660
|
-
addAccount: () => void;
|
|
661
|
-
editAccount: (id: string) => void;
|
|
662
|
-
cancelForm: () => void;
|
|
663
|
-
changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined) => void;
|
|
664
|
-
submitForm: () => void;
|
|
665
|
-
showARForAccountId?: string | undefined;
|
|
666
|
-
setShowARForAccountId: (id?: string | undefined) => void;
|
|
667
|
-
}>;
|
|
668
|
-
export const LedgerAccounts: () => React.JSX.Element;
|
|
669
|
-
|
|
670
|
-
}
|
|
671
|
-
declare module '@layerfi/components/components/LedgerAccounts/index' {
|
|
672
|
-
export { LedgerAccounts } from '@layerfi/components/components/LedgerAccounts/LedgerAccounts';
|
|
673
|
-
|
|
674
|
-
}
|
|
675
|
-
declare module '@layerfi/components/components/LedgerAccountsForm/LedgerAccountsForm' {
|
|
676
|
-
import React from 'react';
|
|
677
|
-
export const LedgerAccountsForm: () => React.JSX.Element | undefined;
|
|
678
|
-
|
|
679
|
-
}
|
|
680
|
-
declare module '@layerfi/components/components/LedgerAccountsForm/index' {
|
|
681
|
-
export { LedgerAccountsForm } from '@layerfi/components/components/LedgerAccountsForm/LedgerAccountsForm';
|
|
915
|
+
declare module '@layerfi/components/components/LedgerAccount/LedgerAccountIndex' {
|
|
916
|
+
import React, { RefObject } from 'react';
|
|
917
|
+
import { View } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
918
|
+
export interface LedgerAccountProps {
|
|
919
|
+
view: View;
|
|
920
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
921
|
+
pageSize?: number;
|
|
922
|
+
}
|
|
923
|
+
export const LedgerAccount: ({ containerRef, pageSize, view, }: LedgerAccountProps) => React.JSX.Element;
|
|
682
924
|
|
|
683
925
|
}
|
|
684
|
-
declare module '@layerfi/components/components/
|
|
926
|
+
declare module '@layerfi/components/components/LedgerAccount/LedgerAccountRow' {
|
|
685
927
|
import React from 'react';
|
|
686
|
-
import {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
928
|
+
import { LedgerAccountLineItem } from '@layerfi/components/types';
|
|
929
|
+
import { View } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
930
|
+
export interface LedgerAccountRowProps {
|
|
931
|
+
row: LedgerAccountLineItem;
|
|
690
932
|
index: number;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
};
|
|
696
|
-
export const LedgerAccountsRow: ({ account, depth, index, cumulativeIndex, expanded, defaultOpen, acountsLength, }: LedgerAccountsRowProps) => React.JSX.Element;
|
|
697
|
-
export {};
|
|
933
|
+
initialLoad?: boolean;
|
|
934
|
+
view: View;
|
|
935
|
+
}
|
|
936
|
+
export const LedgerAccountRow: ({ row, index, initialLoad, view, }: LedgerAccountRowProps) => React.JSX.Element;
|
|
698
937
|
|
|
699
938
|
}
|
|
700
|
-
declare module '@layerfi/components/components/
|
|
701
|
-
export {
|
|
939
|
+
declare module '@layerfi/components/components/LedgerAccount/index' {
|
|
940
|
+
export { LedgerAccount } from '@layerfi/components/components/LedgerAccount/LedgerAccountIndex';
|
|
702
941
|
|
|
703
942
|
}
|
|
704
|
-
declare module '@layerfi/components/components/
|
|
943
|
+
declare module '@layerfi/components/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails' {
|
|
705
944
|
import React from 'react';
|
|
706
|
-
export const
|
|
945
|
+
export const LedgerAccountEntryDetails: () => React.JSX.Element;
|
|
707
946
|
|
|
708
947
|
}
|
|
709
|
-
declare module '@layerfi/components/components/
|
|
710
|
-
export {
|
|
948
|
+
declare module '@layerfi/components/components/LedgerAccountEntryDetails/index' {
|
|
949
|
+
export { LedgerAccountEntryDetails } from '@layerfi/components/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails';
|
|
711
950
|
|
|
712
951
|
}
|
|
713
952
|
declare module '@layerfi/components/components/LinkedAccountOptions/LinkedAccountOptions' {
|
|
@@ -715,7 +954,7 @@ declare module '@layerfi/components/components/LinkedAccountOptions/LinkedAccoun
|
|
|
715
954
|
import { HoverMenuProps } from '@layerfi/components/components/HoverMenu/index';
|
|
716
955
|
interface LinkedAccountOptionsProps extends HoverMenuProps {
|
|
717
956
|
}
|
|
718
|
-
export const LinkedAccountOptions: ({ children, config, }: LinkedAccountOptionsProps) => React.JSX.Element;
|
|
957
|
+
export const LinkedAccountOptions: ({ children, config, accountId, plaidItemId, }: LinkedAccountOptionsProps) => React.JSX.Element;
|
|
719
958
|
export {};
|
|
720
959
|
|
|
721
960
|
}
|
|
@@ -739,9 +978,11 @@ declare module '@layerfi/components/components/LinkedAccountThumb/index' {
|
|
|
739
978
|
}
|
|
740
979
|
declare module '@layerfi/components/components/LinkedAccounts/LinkedAccounts' {
|
|
741
980
|
import React from 'react';
|
|
742
|
-
export
|
|
743
|
-
asWidget?: boolean
|
|
744
|
-
|
|
981
|
+
export interface LinkedAccountsProps {
|
|
982
|
+
asWidget?: boolean;
|
|
983
|
+
elevated?: boolean;
|
|
984
|
+
}
|
|
985
|
+
export const LinkedAccounts: ({ asWidget, elevated }: LinkedAccountsProps) => React.JSX.Element;
|
|
745
986
|
|
|
746
987
|
}
|
|
747
988
|
declare module '@layerfi/components/components/LinkedAccounts/index' {
|
|
@@ -792,6 +1033,23 @@ declare module '@layerfi/components/components/Pagination/Pagination' {
|
|
|
792
1033
|
declare module '@layerfi/components/components/Pagination/index' {
|
|
793
1034
|
export { Pagination } from '@layerfi/components/components/Pagination/Pagination';
|
|
794
1035
|
|
|
1036
|
+
}
|
|
1037
|
+
declare module '@layerfi/components/components/Panel/Panel' {
|
|
1038
|
+
import React, { ReactNode, RefObject } from 'react';
|
|
1039
|
+
export interface PanelProps {
|
|
1040
|
+
children: ReactNode;
|
|
1041
|
+
className?: string;
|
|
1042
|
+
sidebar?: ReactNode;
|
|
1043
|
+
sidebarIsOpen?: boolean;
|
|
1044
|
+
header?: ReactNode;
|
|
1045
|
+
parentRef?: RefObject<HTMLDivElement>;
|
|
1046
|
+
}
|
|
1047
|
+
export const Panel: ({ children, className, sidebar, header, sidebarIsOpen, parentRef, }: PanelProps) => React.JSX.Element;
|
|
1048
|
+
|
|
1049
|
+
}
|
|
1050
|
+
declare module '@layerfi/components/components/Panel/index' {
|
|
1051
|
+
export { Panel } from '@layerfi/components/components/Panel/Panel';
|
|
1052
|
+
|
|
795
1053
|
}
|
|
796
1054
|
declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
797
1055
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -802,14 +1060,17 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
802
1060
|
values: string[];
|
|
803
1061
|
};
|
|
804
1062
|
reportingBasis?: ReportingBasis;
|
|
1063
|
+
asContainer?: boolean;
|
|
805
1064
|
};
|
|
806
1065
|
const ProfitAndLoss: {
|
|
807
|
-
({ children, tagFilter, reportingBasis }: Props): React.JSX.Element;
|
|
1066
|
+
({ children, tagFilter, reportingBasis, asContainer, }: Props): React.JSX.Element;
|
|
808
1067
|
Chart: () => React.JSX.Element;
|
|
809
1068
|
Context: React.Context<{
|
|
810
1069
|
data: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
811
|
-
|
|
812
|
-
|
|
1070
|
+
filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
|
|
1071
|
+
filteredTotalRevenue?: number | undefined;
|
|
1072
|
+
filteredDataExpenses: import("@layerfi/components/types/line_item").LineBaseItem[];
|
|
1073
|
+
filteredTotalExpenses?: number | undefined;
|
|
813
1074
|
isLoading: boolean;
|
|
814
1075
|
isValidating: boolean;
|
|
815
1076
|
error: unknown;
|
|
@@ -823,12 +1084,19 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
823
1084
|
setFilterTypes: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, types: string[]) => void;
|
|
824
1085
|
}>;
|
|
825
1086
|
DatePicker: () => React.JSX.Element;
|
|
826
|
-
Summaries: ({ vertical, revenueLabel, }: {
|
|
1087
|
+
Summaries: ({ vertical, revenueLabel, actionable, }: {
|
|
827
1088
|
revenueLabel?: string | undefined;
|
|
828
1089
|
vertical?: boolean | undefined;
|
|
1090
|
+
actionable?: boolean | undefined;
|
|
829
1091
|
}) => React.JSX.Element;
|
|
830
|
-
Table: ({ lockExpanded }: {
|
|
1092
|
+
Table: ({ lockExpanded, asContainer }: {
|
|
831
1093
|
lockExpanded?: boolean | undefined;
|
|
1094
|
+
asContainer?: boolean | undefined;
|
|
1095
|
+
}) => React.JSX.Element;
|
|
1096
|
+
DetailedCharts: ({ scope, hideClose, showDatePicker, }: {
|
|
1097
|
+
scope?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
|
|
1098
|
+
hideClose?: boolean | undefined;
|
|
1099
|
+
showDatePicker?: boolean | undefined;
|
|
832
1100
|
}) => React.JSX.Element;
|
|
833
1101
|
};
|
|
834
1102
|
export { ProfitAndLoss };
|
|
@@ -878,8 +1146,9 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
|
|
|
878
1146
|
setHoveredItem: (name?: string) => void;
|
|
879
1147
|
sidebarScope?: SidebarScope;
|
|
880
1148
|
date: number | Date;
|
|
1149
|
+
isLoading?: boolean;
|
|
881
1150
|
}
|
|
882
|
-
export const DetailedChart: ({ filteredData, filteredTotal, hoveredItem, setHoveredItem, sidebarScope, date, }: DetailedChartProps) => React.JSX.Element;
|
|
1151
|
+
export const DetailedChart: ({ filteredData, filteredTotal, hoveredItem, setHoveredItem, sidebarScope, date, isLoading, }: DetailedChartProps) => React.JSX.Element;
|
|
883
1152
|
export {};
|
|
884
1153
|
|
|
885
1154
|
}
|
|
@@ -914,7 +1183,12 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Filte
|
|
|
914
1183
|
}
|
|
915
1184
|
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts' {
|
|
916
1185
|
import React from 'react';
|
|
917
|
-
|
|
1186
|
+
import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
1187
|
+
export const ProfitAndLossDetailedCharts: ({ scope, hideClose, showDatePicker, }: {
|
|
1188
|
+
scope?: SidebarScope;
|
|
1189
|
+
hideClose?: boolean | undefined;
|
|
1190
|
+
showDatePicker?: boolean | undefined;
|
|
1191
|
+
}) => React.JSX.Element;
|
|
918
1192
|
|
|
919
1193
|
}
|
|
920
1194
|
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/index' {
|
|
@@ -957,8 +1231,9 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndL
|
|
|
957
1231
|
type Props = {
|
|
958
1232
|
revenueLabel?: string;
|
|
959
1233
|
vertical?: boolean;
|
|
1234
|
+
actionable?: boolean;
|
|
960
1235
|
};
|
|
961
|
-
export const ProfitAndLossSummaries: ({ vertical, revenueLabel, }: Props) => React.JSX.Element;
|
|
1236
|
+
export const ProfitAndLossSummaries: ({ vertical, revenueLabel, actionable, }: Props) => React.JSX.Element;
|
|
962
1237
|
export {};
|
|
963
1238
|
|
|
964
1239
|
}
|
|
@@ -970,8 +1245,9 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
|
|
|
970
1245
|
import React from 'react';
|
|
971
1246
|
type Props = {
|
|
972
1247
|
lockExpanded?: boolean;
|
|
1248
|
+
asContainer?: boolean;
|
|
973
1249
|
};
|
|
974
|
-
export const ProfitAndLossTable: ({ lockExpanded }: Props) => React.JSX.Element;
|
|
1250
|
+
export const ProfitAndLossTable: ({ lockExpanded, asContainer }: Props) => React.JSX.Element;
|
|
975
1251
|
export {};
|
|
976
1252
|
|
|
977
1253
|
}
|
|
@@ -986,12 +1262,15 @@ declare module '@layerfi/components/components/ProfitAndLossTable/index' {
|
|
|
986
1262
|
|
|
987
1263
|
}
|
|
988
1264
|
declare module '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView' {
|
|
989
|
-
import React from 'react';
|
|
1265
|
+
import React, { RefObject } from 'react';
|
|
990
1266
|
export interface ProfitAndLossViewProps {
|
|
991
1267
|
hideTable?: boolean;
|
|
992
1268
|
hideChart?: boolean;
|
|
993
1269
|
showDetailedCharts?: boolean;
|
|
994
1270
|
}
|
|
1271
|
+
export interface ProfitAndLossViewPanelProps extends ProfitAndLossViewProps {
|
|
1272
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
1273
|
+
}
|
|
995
1274
|
export const ProfitAndLossView: (props: ProfitAndLossViewProps) => React.JSX.Element;
|
|
996
1275
|
|
|
997
1276
|
}
|
|
@@ -1039,6 +1318,7 @@ declare module '@layerfi/components/components/Toggle/Toggle' {
|
|
|
1039
1318
|
label: string;
|
|
1040
1319
|
value: string;
|
|
1041
1320
|
disabled?: boolean;
|
|
1321
|
+
disabledMessage?: string;
|
|
1042
1322
|
leftIcon?: ReactNode;
|
|
1043
1323
|
}
|
|
1044
1324
|
export enum ToggleSize {
|
|
@@ -1255,6 +1535,33 @@ declare module '@layerfi/components/components/Typography/index' {
|
|
|
1255
1535
|
export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
|
|
1256
1536
|
export { ErrorText } from '@layerfi/components/components/Typography/ErrorText';
|
|
1257
1537
|
|
|
1538
|
+
}
|
|
1539
|
+
declare module '@layerfi/components/components/View/View' {
|
|
1540
|
+
import React, { ReactNode } from 'react';
|
|
1541
|
+
export interface ViewProps {
|
|
1542
|
+
children: ReactNode;
|
|
1543
|
+
title?: string;
|
|
1544
|
+
headerControls?: ReactNode;
|
|
1545
|
+
}
|
|
1546
|
+
export const View: ({ title, children, headerControls }: ViewProps) => React.JSX.Element;
|
|
1547
|
+
|
|
1548
|
+
}
|
|
1549
|
+
declare module '@layerfi/components/components/View/index' {
|
|
1550
|
+
export { View } from '@layerfi/components/components/View/View';
|
|
1551
|
+
|
|
1552
|
+
}
|
|
1553
|
+
declare module '@layerfi/components/components/ViewHeader/ViewHeader' {
|
|
1554
|
+
import React, { ReactNode } from 'react';
|
|
1555
|
+
export interface ViewHeaderProps {
|
|
1556
|
+
title?: string;
|
|
1557
|
+
controls?: ReactNode;
|
|
1558
|
+
}
|
|
1559
|
+
export const ViewHeader: ({ title, controls }: ViewHeaderProps) => React.JSX.Element;
|
|
1560
|
+
|
|
1561
|
+
}
|
|
1562
|
+
declare module '@layerfi/components/components/ViewHeader/index' {
|
|
1563
|
+
export { ViewHeader } from '@layerfi/components/components/ViewHeader/ViewHeader';
|
|
1564
|
+
|
|
1258
1565
|
}
|
|
1259
1566
|
declare module '@layerfi/components/config/charts' {
|
|
1260
1567
|
export const INACTIVE_OPACITY_LEVELS: number[];
|
|
@@ -1266,6 +1573,11 @@ declare module '@layerfi/components/config/charts' {
|
|
|
1266
1573
|
}
|
|
1267
1574
|
declare module '@layerfi/components/config/general' {
|
|
1268
1575
|
export const DATE_FORMAT = "LLL d, yyyy";
|
|
1576
|
+
export const TIME_FORMAT = "p";
|
|
1577
|
+
export const BREAKPOINTS: {
|
|
1578
|
+
TABLET: number;
|
|
1579
|
+
MOBILE: number;
|
|
1580
|
+
};
|
|
1269
1581
|
|
|
1270
1582
|
}
|
|
1271
1583
|
declare module '@layerfi/components/config/theme' {
|
|
@@ -1369,6 +1681,50 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
|
|
|
1369
1681
|
export const useBankTransactions: UseBankTransactions;
|
|
1370
1682
|
export {};
|
|
1371
1683
|
|
|
1684
|
+
}
|
|
1685
|
+
declare module '@layerfi/components/hooks/useChartOfAccounts/index' {
|
|
1686
|
+
export { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts';
|
|
1687
|
+
|
|
1688
|
+
}
|
|
1689
|
+
declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts' {
|
|
1690
|
+
import { NewAccount } from '@layerfi/components/types';
|
|
1691
|
+
import { ChartWithBalances, LedgerAccountBalance } from '@layerfi/components/types/chart_of_accounts';
|
|
1692
|
+
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
1693
|
+
interface FormError {
|
|
1694
|
+
field: string;
|
|
1695
|
+
message: string;
|
|
1696
|
+
}
|
|
1697
|
+
export interface ChartOfAccountsForm {
|
|
1698
|
+
action: 'new' | 'edit';
|
|
1699
|
+
accountId?: string;
|
|
1700
|
+
data: {
|
|
1701
|
+
parent?: BaseSelectOption;
|
|
1702
|
+
name?: string;
|
|
1703
|
+
type: BaseSelectOption;
|
|
1704
|
+
subType?: BaseSelectOption;
|
|
1705
|
+
};
|
|
1706
|
+
errors?: FormError[];
|
|
1707
|
+
}
|
|
1708
|
+
type UseChartOfAccounts = () => {
|
|
1709
|
+
data: ChartWithBalances | undefined;
|
|
1710
|
+
isLoading?: boolean;
|
|
1711
|
+
isValidating?: boolean;
|
|
1712
|
+
error?: unknown;
|
|
1713
|
+
refetch: () => void;
|
|
1714
|
+
create: (newAccount: NewAccount) => void;
|
|
1715
|
+
form?: ChartOfAccountsForm;
|
|
1716
|
+
sendingForm?: boolean;
|
|
1717
|
+
apiError?: string;
|
|
1718
|
+
addAccount: () => void;
|
|
1719
|
+
editAccount: (id: string) => void;
|
|
1720
|
+
cancelForm: () => void;
|
|
1721
|
+
changeFormData: (name: string, value: string | BaseSelectOption | undefined) => void;
|
|
1722
|
+
submitForm: () => void;
|
|
1723
|
+
};
|
|
1724
|
+
export const flattenAccounts: (accounts: LedgerAccountBalance[]) => LedgerAccountBalance[];
|
|
1725
|
+
export const useChartOfAccounts: UseChartOfAccounts;
|
|
1726
|
+
export {};
|
|
1727
|
+
|
|
1372
1728
|
}
|
|
1373
1729
|
declare module '@layerfi/components/hooks/useElementSize/index' {
|
|
1374
1730
|
export { useElementSize } from '@layerfi/components/hooks/useElementSize/useElementSize';
|
|
@@ -1379,6 +1735,8 @@ declare module '@layerfi/components/hooks/useElementSize/useElementSize' {
|
|
|
1379
1735
|
export const useElementSize: <T extends HTMLElement>(callback: (target: T, entry: ResizeObserverEntry, size: {
|
|
1380
1736
|
width: number;
|
|
1381
1737
|
height: number;
|
|
1738
|
+
clientWidth: number;
|
|
1739
|
+
clientHeight: number;
|
|
1382
1740
|
}) => void) => import("react").RefObject<T>;
|
|
1383
1741
|
|
|
1384
1742
|
}
|
|
@@ -1397,43 +1755,23 @@ declare module '@layerfi/components/hooks/useLedgerAccounts/index' {
|
|
|
1397
1755
|
|
|
1398
1756
|
}
|
|
1399
1757
|
declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
|
|
1400
|
-
import {
|
|
1401
|
-
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
1402
|
-
interface FormError {
|
|
1403
|
-
field: string;
|
|
1404
|
-
message: string;
|
|
1405
|
-
}
|
|
1406
|
-
export interface LedgerAccountsForm {
|
|
1407
|
-
action: 'new' | 'edit';
|
|
1408
|
-
accountId?: string;
|
|
1409
|
-
data: {
|
|
1410
|
-
parent?: BaseSelectOption;
|
|
1411
|
-
name?: string;
|
|
1412
|
-
type?: BaseSelectOption;
|
|
1413
|
-
subType?: BaseSelectOption;
|
|
1414
|
-
category?: BaseSelectOption;
|
|
1415
|
-
};
|
|
1416
|
-
errors?: FormError[];
|
|
1417
|
-
}
|
|
1758
|
+
import { LedgerAccounts, LedgerAccountsEntry } from '@layerfi/components/types';
|
|
1418
1759
|
type UseLedgerAccounts = () => {
|
|
1419
|
-
data
|
|
1760
|
+
data?: LedgerAccounts;
|
|
1761
|
+
entryData?: LedgerAccountsEntry;
|
|
1420
1762
|
isLoading?: boolean;
|
|
1763
|
+
isLoadingEntry?: boolean;
|
|
1421
1764
|
isValidating?: boolean;
|
|
1765
|
+
isValidatingEntry?: boolean;
|
|
1422
1766
|
error?: unknown;
|
|
1767
|
+
errorEntry?: unknown;
|
|
1423
1768
|
refetch: () => void;
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
editAccount: (id: string) => void;
|
|
1430
|
-
cancelForm: () => void;
|
|
1431
|
-
changeFormData: (name: string, value: string | BaseSelectOption | undefined) => void;
|
|
1432
|
-
submitForm: () => void;
|
|
1433
|
-
showARForAccountId?: string;
|
|
1434
|
-
setShowARForAccountId: (id?: string) => void;
|
|
1769
|
+
accountId?: string;
|
|
1770
|
+
setAccountId: (id?: string) => void;
|
|
1771
|
+
selectedEntryId?: string;
|
|
1772
|
+
setSelectedEntryId: (id?: string) => void;
|
|
1773
|
+
closeSelectedEntry: () => void;
|
|
1435
1774
|
};
|
|
1436
|
-
export const flattenAccounts: (accounts: Account[]) => Account[];
|
|
1437
1775
|
export const useLedgerAccounts: UseLedgerAccounts;
|
|
1438
1776
|
export {};
|
|
1439
1777
|
|
|
@@ -1441,17 +1779,24 @@ declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
|
|
|
1441
1779
|
declare module '@layerfi/components/hooks/useLinkedAccounts/index' {
|
|
1442
1780
|
export { useLinkedAccounts } from '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts';
|
|
1443
1781
|
|
|
1782
|
+
}
|
|
1783
|
+
declare module '@layerfi/components/hooks/useLinkedAccounts/mockData' {
|
|
1784
|
+
import { LinkedAccount } from '@layerfi/components/types/linked_accounts';
|
|
1785
|
+
export const LINKED_ACCOUNTS_MOCK_DATA: LinkedAccount[];
|
|
1786
|
+
|
|
1444
1787
|
}
|
|
1445
1788
|
declare module '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts' {
|
|
1446
1789
|
import { LinkedAccount } from '@layerfi/components/types/linked_accounts';
|
|
1790
|
+
type Source = 'PLAID' | 'STRIPE';
|
|
1447
1791
|
type UseLinkedAccounts = () => {
|
|
1448
1792
|
data?: LinkedAccount[];
|
|
1449
1793
|
isLoading: boolean;
|
|
1450
1794
|
isValidating: boolean;
|
|
1451
1795
|
error: unknown;
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1796
|
+
addConnection: (source: Source) => void;
|
|
1797
|
+
removeConnection: (source: Source, sourceId: string) => void;
|
|
1798
|
+
refetchAccounts: () => void;
|
|
1799
|
+
unlinkAccount: (plaidAccountId: string) => void;
|
|
1455
1800
|
renewLinkAccount: () => void;
|
|
1456
1801
|
};
|
|
1457
1802
|
export const useLinkedAccounts: UseLinkedAccounts;
|
|
@@ -1500,8 +1845,10 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
|
1500
1845
|
export type ProfitAndLossFilters = Record<Scope, ProfitAndLossFilter | undefined>;
|
|
1501
1846
|
type UseProfitAndLoss = (props?: Props) => {
|
|
1502
1847
|
data: ProfitAndLoss | undefined;
|
|
1503
|
-
|
|
1504
|
-
|
|
1848
|
+
filteredDataRevenue: LineBaseItem[];
|
|
1849
|
+
filteredTotalRevenue?: number;
|
|
1850
|
+
filteredDataExpenses: LineBaseItem[];
|
|
1851
|
+
filteredTotalExpenses?: number;
|
|
1505
1852
|
isLoading: boolean;
|
|
1506
1853
|
isValidating: boolean;
|
|
1507
1854
|
error: unknown;
|
|
@@ -1531,13 +1878,6 @@ declare module '@layerfi/components/icons/AlertOctagon' {
|
|
|
1531
1878
|
const AlertOctagon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1532
1879
|
export default AlertOctagon;
|
|
1533
1880
|
|
|
1534
|
-
}
|
|
1535
|
-
declare module '@layerfi/components/icons/ArrowRightCircle' {
|
|
1536
|
-
import * as React from 'react';
|
|
1537
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1538
|
-
const ArrowRightCircle: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1539
|
-
export default ArrowRightCircle;
|
|
1540
|
-
|
|
1541
1881
|
}
|
|
1542
1882
|
declare module '@layerfi/components/icons/BackArrow' {
|
|
1543
1883
|
import * as React from 'react';
|
|
@@ -1721,8 +2061,12 @@ declare module '@layerfi/components/index' {
|
|
|
1721
2061
|
export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
|
|
1722
2062
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
1723
2063
|
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
|
|
1724
|
-
export {
|
|
2064
|
+
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
1725
2065
|
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
2066
|
+
export { useLayerContext } from '@layerfi/components/hooks/useLayerContext/index';
|
|
2067
|
+
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
2068
|
+
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
2069
|
+
export { Reports } from '@layerfi/components/views/Reports/index';
|
|
1726
2070
|
|
|
1727
2071
|
}
|
|
1728
2072
|
declare module '@layerfi/components/models/APIError' {
|
|
@@ -1924,6 +2268,82 @@ declare module '@layerfi/components/types/categories' {
|
|
|
1924
2268
|
export type CategoryUpdate = SingleCategoryUpdate | SplitCategoryUpdate;
|
|
1925
2269
|
export function hasSuggestions(categorization: Categorization): categorization is SuggestedCategorization;
|
|
1926
2270
|
|
|
2271
|
+
}
|
|
2272
|
+
declare module '@layerfi/components/types/chart_of_accounts' {
|
|
2273
|
+
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
2274
|
+
import { Category } from '@layerfi/components/types/categories';
|
|
2275
|
+
export interface ChartOfAccounts {
|
|
2276
|
+
type: string;
|
|
2277
|
+
accounts: Account[];
|
|
2278
|
+
entries?: any[];
|
|
2279
|
+
}
|
|
2280
|
+
export interface AccountEntry {
|
|
2281
|
+
account: Account;
|
|
2282
|
+
amount?: number;
|
|
2283
|
+
createdAt?: string;
|
|
2284
|
+
direction: Direction;
|
|
2285
|
+
entry_at?: string;
|
|
2286
|
+
entry_id?: string;
|
|
2287
|
+
id?: string;
|
|
2288
|
+
}
|
|
2289
|
+
export interface Account {
|
|
2290
|
+
id: string;
|
|
2291
|
+
number: number;
|
|
2292
|
+
pnlCategory?: Category;
|
|
2293
|
+
headerForPnlCategory?: Category;
|
|
2294
|
+
name: string;
|
|
2295
|
+
accountStableName?: string;
|
|
2296
|
+
description?: string;
|
|
2297
|
+
scheduleCLine?: string;
|
|
2298
|
+
scheduleCLineDescription?: string;
|
|
2299
|
+
sub_accounts?: Account[];
|
|
2300
|
+
hidePnl: boolean;
|
|
2301
|
+
showInPnlIfEmpty: boolean;
|
|
2302
|
+
normality: Direction;
|
|
2303
|
+
balance: number;
|
|
2304
|
+
selfOnlyBalance: number;
|
|
2305
|
+
entries?: AccountEntry[];
|
|
2306
|
+
}
|
|
2307
|
+
export type ChartWithBalances = {
|
|
2308
|
+
accounts: LedgerAccountBalance[];
|
|
2309
|
+
};
|
|
2310
|
+
export type ApiAccountType = {
|
|
2311
|
+
value: string;
|
|
2312
|
+
display_name: string;
|
|
2313
|
+
};
|
|
2314
|
+
export type LedgerAccountBalance = {
|
|
2315
|
+
id: string;
|
|
2316
|
+
name: string;
|
|
2317
|
+
stable_name: string;
|
|
2318
|
+
account_type: ApiAccountType;
|
|
2319
|
+
account_subtype?: ApiAccountType;
|
|
2320
|
+
normality: Direction;
|
|
2321
|
+
balance: number;
|
|
2322
|
+
sub_accounts: LedgerAccountBalance[];
|
|
2323
|
+
};
|
|
2324
|
+
export type NewAccount = {
|
|
2325
|
+
name: string;
|
|
2326
|
+
normality: Direction;
|
|
2327
|
+
parent_id?: {
|
|
2328
|
+
type: 'AccountId';
|
|
2329
|
+
id: string;
|
|
2330
|
+
};
|
|
2331
|
+
account_type: string;
|
|
2332
|
+
account_subtype?: string;
|
|
2333
|
+
};
|
|
2334
|
+
export type EditAccount = {
|
|
2335
|
+
stable_name: string;
|
|
2336
|
+
name: string;
|
|
2337
|
+
normality: Direction;
|
|
2338
|
+
parent_id?: {
|
|
2339
|
+
type: 'AccountId';
|
|
2340
|
+
id: string;
|
|
2341
|
+
};
|
|
2342
|
+
account_type: string;
|
|
2343
|
+
account_subtype?: string;
|
|
2344
|
+
always_show_in_pnl: boolean;
|
|
2345
|
+
};
|
|
2346
|
+
|
|
1927
2347
|
}
|
|
1928
2348
|
declare module '@layerfi/components/types/general' {
|
|
1929
2349
|
export type SortDirection = 'asc' | 'desc';
|
|
@@ -1946,6 +2366,9 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
1946
2366
|
};
|
|
1947
2367
|
export type LayerContextHelpers = {
|
|
1948
2368
|
getColor: (shade: number) => ColorsPaletteOption | undefined;
|
|
2369
|
+
setLightColor: (color?: ColorConfig) => void;
|
|
2370
|
+
setDarkColor: (color?: ColorConfig) => void;
|
|
2371
|
+
setColors: (colors?: LayerThemeConfigColors) => void;
|
|
1949
2372
|
};
|
|
1950
2373
|
export interface ColorHSLConfig {
|
|
1951
2374
|
h: string;
|
|
@@ -1977,11 +2400,12 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
1977
2400
|
hex: string;
|
|
1978
2401
|
}
|
|
1979
2402
|
export type ColorsPalette = Record<number, ColorsPaletteOption>;
|
|
2403
|
+
export interface LayerThemeConfigColors {
|
|
2404
|
+
dark?: ColorConfig;
|
|
2405
|
+
light?: ColorConfig;
|
|
2406
|
+
}
|
|
1980
2407
|
export interface LayerThemeConfig {
|
|
1981
|
-
colors?:
|
|
1982
|
-
dark?: ColorConfig;
|
|
1983
|
-
light?: ColorConfig;
|
|
1984
|
-
};
|
|
2408
|
+
colors?: LayerThemeConfigColors;
|
|
1985
2409
|
}
|
|
1986
2410
|
export enum LayerContextActionName {
|
|
1987
2411
|
setAuth = "LayerContext.setAuth",
|
|
@@ -2007,59 +2431,91 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
2007
2431
|
|
|
2008
2432
|
}
|
|
2009
2433
|
declare module '@layerfi/components/types/ledger_accounts' {
|
|
2010
|
-
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
2011
|
-
|
|
2012
|
-
export interface
|
|
2434
|
+
import { BankTransaction, Direction } from '@layerfi/components/types/bank_transactions';
|
|
2435
|
+
export type LedgerAccountLineItems = LedgerAccountLineItem[];
|
|
2436
|
+
export interface LedgerAccountsEntry {
|
|
2437
|
+
agent?: string;
|
|
2438
|
+
business_id: string;
|
|
2439
|
+
date: string;
|
|
2440
|
+
entry_at: string;
|
|
2441
|
+
entry_type: string;
|
|
2442
|
+
id: string;
|
|
2443
|
+
invoice?: Record<string, string>;
|
|
2444
|
+
ledger_id: string;
|
|
2445
|
+
line_items: LedgerAccountLineItem[];
|
|
2446
|
+
manual_entry?: boolean;
|
|
2447
|
+
reversal_id?: string;
|
|
2448
|
+
reversal_of_id?: string;
|
|
2013
2449
|
type: string;
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
}
|
|
2017
|
-
export interface AccountEntry {
|
|
2018
|
-
account: Account;
|
|
2019
|
-
amount?: number;
|
|
2020
|
-
createdAt?: string;
|
|
2021
|
-
direction: Direction;
|
|
2022
|
-
entry_at?: string;
|
|
2023
|
-
entry_id?: string;
|
|
2024
|
-
id?: string;
|
|
2450
|
+
transaction?: BankTransaction;
|
|
2451
|
+
source?: LedgerEntrySource;
|
|
2025
2452
|
}
|
|
2026
|
-
export interface
|
|
2453
|
+
export interface LedgerAccountsAccount {
|
|
2454
|
+
always_show_in_pnl?: boolean;
|
|
2027
2455
|
id: string;
|
|
2028
|
-
number: number;
|
|
2029
|
-
pnlCategory?: Category;
|
|
2030
|
-
headerForPnlCategory?: Category;
|
|
2031
|
-
name: string;
|
|
2032
|
-
accountStableName?: string;
|
|
2033
|
-
description?: string;
|
|
2034
|
-
scheduleCLine?: string;
|
|
2035
|
-
scheduleCLineDescription?: string;
|
|
2036
|
-
sub_accounts?: Account[];
|
|
2037
|
-
hidePnl: boolean;
|
|
2038
|
-
showInPnlIfEmpty: boolean;
|
|
2039
|
-
normality: Direction;
|
|
2040
|
-
balance: number;
|
|
2041
|
-
selfOnlyBalance: number;
|
|
2042
|
-
entries?: AccountEntry[];
|
|
2043
|
-
}
|
|
2044
|
-
export type NewAccount = {
|
|
2045
|
-
name: string;
|
|
2046
|
-
normality: Direction;
|
|
2047
|
-
parent_id?: {
|
|
2048
|
-
type: 'AccountId';
|
|
2049
|
-
id: string;
|
|
2050
|
-
};
|
|
2051
|
-
description: string;
|
|
2052
|
-
};
|
|
2053
|
-
export type EditAccount = {
|
|
2054
2456
|
name: string;
|
|
2457
|
+
normality: string;
|
|
2458
|
+
pnl_category?: string;
|
|
2055
2459
|
stable_name: string;
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2460
|
+
}
|
|
2461
|
+
export interface LedgerAccountLineItem {
|
|
2462
|
+
id: string;
|
|
2463
|
+
entry_id: string;
|
|
2464
|
+
account: LedgerAccountsAccount;
|
|
2465
|
+
amount: number;
|
|
2466
|
+
direction: Direction;
|
|
2467
|
+
date: string;
|
|
2468
|
+
source?: LedgerEntrySource;
|
|
2469
|
+
running_balance: number;
|
|
2470
|
+
}
|
|
2471
|
+
export interface LedgerEntrySource {
|
|
2472
|
+
display_description: string;
|
|
2473
|
+
type: string;
|
|
2474
|
+
}
|
|
2475
|
+
export interface TransactionLedgerEntrySource extends LedgerEntrySource {
|
|
2476
|
+
transaction_id: string;
|
|
2477
|
+
external_id: string;
|
|
2478
|
+
account_name: string;
|
|
2479
|
+
date: string;
|
|
2480
|
+
amount: number;
|
|
2481
|
+
direction: Direction;
|
|
2482
|
+
counterparty?: string;
|
|
2483
|
+
}
|
|
2484
|
+
export interface InvoiceLedgerEntrySource extends LedgerEntrySource {
|
|
2485
|
+
invoice_id: string;
|
|
2486
|
+
external_id: string;
|
|
2487
|
+
invoice_number: string;
|
|
2488
|
+
recipient_name: string;
|
|
2489
|
+
date: string;
|
|
2490
|
+
amount: number;
|
|
2491
|
+
}
|
|
2492
|
+
export interface ManualLedgerEntrySource extends LedgerEntrySource {
|
|
2493
|
+
manual_entry_id: string;
|
|
2494
|
+
memo: string;
|
|
2495
|
+
created_by: string;
|
|
2496
|
+
}
|
|
2497
|
+
export interface InvoicePaymentLedgerEntrySource extends LedgerEntrySource {
|
|
2498
|
+
external_id: string;
|
|
2499
|
+
invoice_id: string;
|
|
2500
|
+
invoice_number: string;
|
|
2501
|
+
amount: number;
|
|
2502
|
+
}
|
|
2503
|
+
export interface RefundPaymentLedgerEntrySource extends LedgerEntrySource {
|
|
2504
|
+
external_id: string;
|
|
2505
|
+
refund_id: string;
|
|
2506
|
+
refunded_to_customer_amount: number;
|
|
2507
|
+
recipient_name: string;
|
|
2508
|
+
}
|
|
2509
|
+
export interface OpeningBalanceLedgerEntrySource extends LedgerEntrySource {
|
|
2510
|
+
account_name: string;
|
|
2511
|
+
}
|
|
2512
|
+
export interface PayoutLedgerEntrySource extends LedgerEntrySource {
|
|
2513
|
+
payout_id: string;
|
|
2514
|
+
external_id: string;
|
|
2515
|
+
paid_out_amount: number;
|
|
2516
|
+
processor: string;
|
|
2517
|
+
completed_at: string;
|
|
2518
|
+
}
|
|
2063
2519
|
|
|
2064
2520
|
}
|
|
2065
2521
|
declare module '@layerfi/components/types/line_item' {
|
|
@@ -2081,14 +2537,16 @@ declare module '@layerfi/components/types/line_item' {
|
|
|
2081
2537
|
|
|
2082
2538
|
}
|
|
2083
2539
|
declare module '@layerfi/components/types/linked_accounts' {
|
|
2540
|
+
import { PlaidInstitution } from 'react-plaid-link';
|
|
2084
2541
|
export interface LinkedAccounts {
|
|
2085
2542
|
type: string;
|
|
2086
2543
|
external_accounts: LinkedAccount[];
|
|
2087
2544
|
}
|
|
2088
2545
|
export interface LinkedAccount {
|
|
2089
2546
|
id: string;
|
|
2547
|
+
external_account_external_id: string;
|
|
2548
|
+
external_account_source: string;
|
|
2090
2549
|
external_account_name: string;
|
|
2091
|
-
external_account_number: string;
|
|
2092
2550
|
latest_balance_timestamp: {
|
|
2093
2551
|
external_account_external_id: string;
|
|
2094
2552
|
external_account_source: string;
|
|
@@ -2097,9 +2555,17 @@ declare module '@layerfi/components/types/linked_accounts' {
|
|
|
2097
2555
|
created_at: string;
|
|
2098
2556
|
};
|
|
2099
2557
|
current_ledger_balance: number;
|
|
2100
|
-
institution:
|
|
2101
|
-
|
|
2558
|
+
institution: {
|
|
2559
|
+
name: string;
|
|
2560
|
+
logo: string;
|
|
2561
|
+
};
|
|
2562
|
+
mask?: string;
|
|
2563
|
+
logo_base64?: string;
|
|
2102
2564
|
}
|
|
2565
|
+
export type PublicToken = {
|
|
2566
|
+
public_token: string;
|
|
2567
|
+
institution_id: PlaidInstitution | null;
|
|
2568
|
+
};
|
|
2103
2569
|
|
|
2104
2570
|
}
|
|
2105
2571
|
declare module '@layerfi/components/types/profit_and_loss' {
|
|
@@ -2131,7 +2597,8 @@ declare module '@layerfi/components/types' {
|
|
|
2131
2597
|
export { BalanceSheet } from '@layerfi/components/types/balance_sheet';
|
|
2132
2598
|
export { Direction, BankTransaction } from '@layerfi/components/types/bank_transactions';
|
|
2133
2599
|
export { CategorizationStatus, Category, CategorizationType, AutoCategorization, SuggestedCategorization, SingleCategoryUpdate, SplitCategoryUpdate, CategoryUpdate, } from '@layerfi/components/types/categories';
|
|
2134
|
-
export {
|
|
2600
|
+
export { ChartOfAccounts, Account, NewAccount, EditAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
2601
|
+
export { LedgerAccountLineItems as LedgerAccounts, LedgerAccountLineItem, LedgerAccountsAccount, LedgerAccountsEntry, } from '@layerfi/components/types/ledger_accounts';
|
|
2135
2602
|
export { SortDirection } from '@layerfi/components/types/general';
|
|
2136
2603
|
export type DateRange<T = Date> = {
|
|
2137
2604
|
startDate: T;
|
|
@@ -2168,6 +2635,10 @@ declare module '@layerfi/components/utils/format' {
|
|
|
2168
2635
|
* 0.00123 -> 0.12%
|
|
2169
2636
|
*/
|
|
2170
2637
|
export const formatPercent: (value?: number, options?: Intl.NumberFormatOptions) => string | undefined;
|
|
2638
|
+
/**
|
|
2639
|
+
* Convert Enum-like (upper snakecase) text into human friendly format.
|
|
2640
|
+
*/
|
|
2641
|
+
export const humanizeEnum: (text: string) => string;
|
|
2171
2642
|
|
|
2172
2643
|
}
|
|
2173
2644
|
declare module '@layerfi/components/utils/helpers' {
|
|
@@ -2189,6 +2660,45 @@ declare module '@layerfi/components/utils/profitAndLossUtils' {
|
|
|
2189
2660
|
export const humanizeTitle: (sidebarView: SidebarScope) => "Expenses" | "Revenue" | "Profit & Loss";
|
|
2190
2661
|
export const applyShare: (items: LineBaseItem[], total: number) => LineBaseItem[];
|
|
2191
2662
|
|
|
2663
|
+
}
|
|
2664
|
+
declare module '@layerfi/components/views/AccountingOverview/AccountingOverview' {
|
|
2665
|
+
import React from 'react';
|
|
2666
|
+
export interface AccountingOverviewProps {
|
|
2667
|
+
title?: string;
|
|
2668
|
+
}
|
|
2669
|
+
export const AccountingOverview: ({ title, }: AccountingOverviewProps) => React.JSX.Element;
|
|
2670
|
+
|
|
2671
|
+
}
|
|
2672
|
+
declare module '@layerfi/components/views/AccountingOverview/index' {
|
|
2673
|
+
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/AccountingOverview';
|
|
2674
|
+
|
|
2675
|
+
}
|
|
2676
|
+
declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts' {
|
|
2677
|
+
import React from 'react';
|
|
2678
|
+
export interface BankTransactionsWithLinkedAccountsProps {
|
|
2679
|
+
title?: string;
|
|
2680
|
+
}
|
|
2681
|
+
export const BankTransactionsWithLinkedAccounts: ({ title, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
|
|
2682
|
+
|
|
2683
|
+
}
|
|
2684
|
+
declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {
|
|
2685
|
+
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts';
|
|
2686
|
+
|
|
2687
|
+
}
|
|
2688
|
+
declare module '@layerfi/components/views/Reports/Reports' {
|
|
2689
|
+
import React, { RefObject } from 'react';
|
|
2690
|
+
export interface ReportsProps {
|
|
2691
|
+
title?: string;
|
|
2692
|
+
}
|
|
2693
|
+
export interface ReportsPanelProps {
|
|
2694
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
2695
|
+
}
|
|
2696
|
+
export const Reports: ({ title }: ReportsProps) => React.JSX.Element;
|
|
2697
|
+
|
|
2698
|
+
}
|
|
2699
|
+
declare module '@layerfi/components/views/Reports/index' {
|
|
2700
|
+
export { Reports } from '@layerfi/components/views/Reports/Reports';
|
|
2701
|
+
|
|
2192
2702
|
}
|
|
2193
2703
|
declare module '@layerfi/components' {
|
|
2194
2704
|
import main = require('@layerfi/components/index');
|