@layerfi/components 0.1.29 → 0.1.30
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/README.md +116 -21
- package/dist/esm/index.js +10617 -10513
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +281 -74
- package/dist/index.js +10816 -10713
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +147 -177
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
- package/.idea/layer-react.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -31,22 +31,27 @@ declare module '@layerfi/components/api/layer/authenticated_http' {
|
|
|
31
31
|
params?: Params | undefined;
|
|
32
32
|
body?: Body_1 | undefined;
|
|
33
33
|
} | undefined) => Promise<Return>;
|
|
34
|
+
export const postWithFormData: <Return extends Record<string, unknown> = Record<string, unknown>>(url: string, formData: FormData, baseUrl: string, accessToken: string | undefined) => Promise<Return>;
|
|
34
35
|
|
|
35
36
|
}
|
|
36
37
|
declare module '@layerfi/components/api/layer/balance_sheet' {
|
|
37
38
|
import { BalanceSheet } from '@layerfi/components/types';
|
|
38
|
-
export
|
|
39
|
+
export const getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
40
|
+
params?: GetBalanceSheetParams | undefined;
|
|
41
|
+
} | undefined) => () => Promise<GetBalanceSheetReturn>;
|
|
42
|
+
export type GetBalanceSheetReturn = {
|
|
43
|
+
data?: BalanceSheet;
|
|
44
|
+
error?: unknown;
|
|
45
|
+
};
|
|
46
|
+
export interface GetBalanceSheetParams extends Record<string, string | undefined> {
|
|
39
47
|
businessId: string;
|
|
40
|
-
|
|
48
|
+
effectiveDate: string;
|
|
41
49
|
}
|
|
42
|
-
export const getBalanceSheet: (_token: string, _params: {
|
|
43
|
-
params: GetBalanceSheetParams;
|
|
44
|
-
}) => () => BalanceSheet;
|
|
45
50
|
|
|
46
51
|
}
|
|
47
52
|
declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
48
53
|
import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
|
|
49
|
-
import { BankTransactionMatch, BankTransactionMatchType } from '@layerfi/components/types/bank_transactions';
|
|
54
|
+
import { BankTransactionMatch, BankTransactionMatchType, BankTransactionMetadata, DocumentS3Urls, FileMetadata } from '@layerfi/components/types/bank_transactions';
|
|
50
55
|
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
51
56
|
export type GetBankTransactionsReturn = {
|
|
52
57
|
data?: BankTransaction[];
|
|
@@ -93,6 +98,36 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
93
98
|
data?: S3PresignedUrl | undefined;
|
|
94
99
|
error?: unknown;
|
|
95
100
|
}>;
|
|
101
|
+
export const getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
102
|
+
params?: Record<string, string | undefined> | undefined;
|
|
103
|
+
} | undefined) => () => Promise<{
|
|
104
|
+
data: BankTransactionMetadata;
|
|
105
|
+
errors: unknown;
|
|
106
|
+
}>;
|
|
107
|
+
export const updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
108
|
+
params?: Record<string, string | undefined> | undefined;
|
|
109
|
+
body?: {
|
|
110
|
+
memo: string;
|
|
111
|
+
} | undefined;
|
|
112
|
+
} | undefined) => Promise<{
|
|
113
|
+
data: BankTransactionMetadata;
|
|
114
|
+
errors: unknown;
|
|
115
|
+
}>;
|
|
116
|
+
export const listBankTransactionDocuments: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
117
|
+
params?: Record<string, string | undefined> | undefined;
|
|
118
|
+
} | undefined) => () => Promise<{
|
|
119
|
+
data: DocumentS3Urls;
|
|
120
|
+
errors: unknown;
|
|
121
|
+
}>;
|
|
122
|
+
export const uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
|
|
123
|
+
businessId: string;
|
|
124
|
+
bankTransactionId: string;
|
|
125
|
+
file: File;
|
|
126
|
+
documentType: string;
|
|
127
|
+
}) => Promise<{
|
|
128
|
+
data: FileMetadata;
|
|
129
|
+
errors: unknown;
|
|
130
|
+
}>;
|
|
96
131
|
|
|
97
132
|
}
|
|
98
133
|
declare module '@layerfi/components/api/layer/business' {
|
|
@@ -352,9 +387,9 @@ declare module '@layerfi/components/api/layer' {
|
|
|
352
387
|
} | undefined) => Promise<{
|
|
353
388
|
data: import("@layerfi/components/types").Account;
|
|
354
389
|
}>;
|
|
355
|
-
getBalanceSheet: (
|
|
356
|
-
params
|
|
357
|
-
}) => () => import("@layerfi/components/
|
|
390
|
+
getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
391
|
+
params?: import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetParams | undefined;
|
|
392
|
+
} | undefined) => () => Promise<import("@layerfi/components/api/layer/balance_sheet").GetBalanceSheetReturn>;
|
|
358
393
|
getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
359
394
|
params?: import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsParams | undefined;
|
|
360
395
|
} | undefined) => () => Promise<import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsReturn>;
|
|
@@ -364,6 +399,36 @@ declare module '@layerfi/components/api/layer' {
|
|
|
364
399
|
data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
|
|
365
400
|
error?: unknown;
|
|
366
401
|
}>;
|
|
402
|
+
getBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
403
|
+
params?: Record<string, string | undefined> | undefined;
|
|
404
|
+
} | undefined) => () => Promise<{
|
|
405
|
+
data: import("@layerfi/components/types/bank_transactions").BankTransactionMetadata;
|
|
406
|
+
errors: unknown;
|
|
407
|
+
}>;
|
|
408
|
+
listBankTransactionDocuments: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
409
|
+
params?: Record<string, string | undefined> | undefined;
|
|
410
|
+
} | undefined) => () => Promise<{
|
|
411
|
+
data: import("@layerfi/components/types/bank_transactions").DocumentS3Urls;
|
|
412
|
+
errors: unknown;
|
|
413
|
+
}>;
|
|
414
|
+
updateBankTransactionMetadata: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
415
|
+
params?: Record<string, string | undefined> | undefined;
|
|
416
|
+
body?: {
|
|
417
|
+
memo: string;
|
|
418
|
+
} | undefined;
|
|
419
|
+
} | undefined) => Promise<{
|
|
420
|
+
data: import("@layerfi/components/types/bank_transactions").BankTransactionMetadata;
|
|
421
|
+
errors: unknown;
|
|
422
|
+
}>;
|
|
423
|
+
uploadBankTransactionDocument: (baseUrl: string, accessToken: string) => ({ businessId, bankTransactionId, file, documentType, }: {
|
|
424
|
+
businessId: string;
|
|
425
|
+
bankTransactionId: string;
|
|
426
|
+
file: File;
|
|
427
|
+
documentType: string;
|
|
428
|
+
}) => Promise<{
|
|
429
|
+
data: import("@layerfi/components/types/bank_transactions").FileMetadata;
|
|
430
|
+
errors: unknown;
|
|
431
|
+
}>;
|
|
367
432
|
getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
368
433
|
params?: Record<string, string | undefined> | undefined;
|
|
369
434
|
} | undefined) => () => Promise<{
|
|
@@ -605,8 +670,26 @@ declare module '@layerfi/components/components/BadgeLoader/index' {
|
|
|
605
670
|
|
|
606
671
|
}
|
|
607
672
|
declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
608
|
-
import React from 'react';
|
|
609
|
-
export
|
|
673
|
+
import React, { PropsWithChildren } from 'react';
|
|
674
|
+
export type BalanceSheetViewProps = PropsWithChildren & {
|
|
675
|
+
withExpandAllButton?: boolean;
|
|
676
|
+
};
|
|
677
|
+
export type BalanceSheetProps = PropsWithChildren & {
|
|
678
|
+
effectiveDate: Date;
|
|
679
|
+
};
|
|
680
|
+
const BalanceSheet: {
|
|
681
|
+
(props: BalanceSheetProps): React.JSX.Element;
|
|
682
|
+
View: ({ withExpandAllButton, }: BalanceSheetViewProps) => React.JSX.Element;
|
|
683
|
+
};
|
|
684
|
+
export { BalanceSheet };
|
|
685
|
+
|
|
686
|
+
}
|
|
687
|
+
declare module '@layerfi/components/components/BalanceSheet/constants' {
|
|
688
|
+
export const BALANCE_SHEET_ROWS: {
|
|
689
|
+
name: string;
|
|
690
|
+
displayName: string;
|
|
691
|
+
lineItem: string;
|
|
692
|
+
}[];
|
|
610
693
|
|
|
611
694
|
}
|
|
612
695
|
declare module '@layerfi/components/components/BalanceSheet/index' {
|
|
@@ -615,17 +698,25 @@ declare module '@layerfi/components/components/BalanceSheet/index' {
|
|
|
615
698
|
}
|
|
616
699
|
declare module '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker' {
|
|
617
700
|
import React from 'react';
|
|
618
|
-
type
|
|
619
|
-
|
|
620
|
-
|
|
701
|
+
export type BalanceSheetDatePickerProps = {
|
|
702
|
+
effectiveDate: Date;
|
|
703
|
+
setEffectiveDate: (date: Date) => void;
|
|
621
704
|
};
|
|
622
|
-
export const BalanceSheetDatePicker: ({
|
|
623
|
-
export {};
|
|
705
|
+
export const BalanceSheetDatePicker: ({ effectiveDate, setEffectiveDate, }: BalanceSheetDatePickerProps) => React.JSX.Element;
|
|
624
706
|
|
|
625
707
|
}
|
|
626
708
|
declare module '@layerfi/components/components/BalanceSheetDatePicker/index' {
|
|
627
709
|
export { BalanceSheetDatePicker } from '@layerfi/components/components/BalanceSheetDatePicker/BalanceSheetDatePicker';
|
|
628
710
|
|
|
711
|
+
}
|
|
712
|
+
declare module '@layerfi/components/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton' {
|
|
713
|
+
import React from 'react';
|
|
714
|
+
export const BalanceSheetExpandAllButton: () => React.JSX.Element;
|
|
715
|
+
|
|
716
|
+
}
|
|
717
|
+
declare module '@layerfi/components/components/BalanceSheetExpandAllButton/index' {
|
|
718
|
+
export { BalanceSheetExpandAllButton } from '@layerfi/components/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton';
|
|
719
|
+
|
|
629
720
|
}
|
|
630
721
|
declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow' {
|
|
631
722
|
import React from 'react';
|
|
@@ -644,6 +735,25 @@ declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow'
|
|
|
644
735
|
declare module '@layerfi/components/components/BalanceSheetRow/index' {
|
|
645
736
|
export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
|
|
646
737
|
|
|
738
|
+
}
|
|
739
|
+
declare module '@layerfi/components/components/BalanceSheetTable/BalanceSheetTable' {
|
|
740
|
+
import React from 'react';
|
|
741
|
+
import { BalanceSheet } from '@layerfi/components/types';
|
|
742
|
+
type BalanceSheetRowProps = {
|
|
743
|
+
name: string;
|
|
744
|
+
displayName: string;
|
|
745
|
+
lineItem: string;
|
|
746
|
+
};
|
|
747
|
+
export const BalanceSheetTable: ({ data, config, }: {
|
|
748
|
+
data: BalanceSheet;
|
|
749
|
+
config: BalanceSheetRowProps[];
|
|
750
|
+
}) => React.JSX.Element;
|
|
751
|
+
export {};
|
|
752
|
+
|
|
753
|
+
}
|
|
754
|
+
declare module '@layerfi/components/components/BalanceSheetTable/index' {
|
|
755
|
+
export { BalanceSheetTable } from '@layerfi/components/components/BalanceSheetTable/BalanceSheetTable';
|
|
756
|
+
|
|
647
757
|
}
|
|
648
758
|
declare module '@layerfi/components/components/BankTransactionList/Assignment' {
|
|
649
759
|
import React from 'react';
|
|
@@ -1293,6 +1403,23 @@ declare module '@layerfi/components/components/DataState/DataState' {
|
|
|
1293
1403
|
declare module '@layerfi/components/components/DataState/index' {
|
|
1294
1404
|
export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
|
|
1295
1405
|
|
|
1406
|
+
}
|
|
1407
|
+
declare module '@layerfi/components/components/DateDayPicker/DateDayPicker' {
|
|
1408
|
+
import React from 'react';
|
|
1409
|
+
interface DateDayPickerProps {
|
|
1410
|
+
dateDay: Date;
|
|
1411
|
+
changeDateDay: (dateDay: Date) => void;
|
|
1412
|
+
enableFutureDates?: boolean;
|
|
1413
|
+
currentDateOption?: boolean;
|
|
1414
|
+
minDate?: Date;
|
|
1415
|
+
}
|
|
1416
|
+
export const DateDayPicker: ({ dateDay, changeDateDay, minDate, enableFutureDates, currentDateOption, }: DateDayPickerProps) => React.JSX.Element;
|
|
1417
|
+
export {};
|
|
1418
|
+
|
|
1419
|
+
}
|
|
1420
|
+
declare module '@layerfi/components/components/DateDayPicker/index' {
|
|
1421
|
+
export { DateDayPicker } from '@layerfi/components/components/DateDayPicker/DateDayPicker';
|
|
1422
|
+
|
|
1296
1423
|
}
|
|
1297
1424
|
declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker' {
|
|
1298
1425
|
import React from 'react';
|
|
@@ -1413,19 +1540,6 @@ declare module '@layerfi/components/components/GlobalWidgets/GlobalWidgets' {
|
|
|
1413
1540
|
declare module '@layerfi/components/components/GlobalWidgets/index' {
|
|
1414
1541
|
export { GlobalWidgets } from '@layerfi/components/components/GlobalWidgets/GlobalWidgets';
|
|
1415
1542
|
|
|
1416
|
-
}
|
|
1417
|
-
declare module '@layerfi/components/components/Hello/Hello' {
|
|
1418
|
-
import React from 'react';
|
|
1419
|
-
type Props = {
|
|
1420
|
-
user?: string | undefined;
|
|
1421
|
-
};
|
|
1422
|
-
export const Hello: ({ user }: Props) => React.JSX.Element;
|
|
1423
|
-
export {};
|
|
1424
|
-
|
|
1425
|
-
}
|
|
1426
|
-
declare module '@layerfi/components/components/Hello/index' {
|
|
1427
|
-
export { Hello } from '@layerfi/components/components/Hello/Hello';
|
|
1428
|
-
|
|
1429
1543
|
}
|
|
1430
1544
|
declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
|
|
1431
1545
|
import React, { ReactNode } from 'react';
|
|
@@ -1738,9 +1852,11 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccounts' {
|
|
|
1738
1852
|
asWidget?: boolean;
|
|
1739
1853
|
elevated?: boolean;
|
|
1740
1854
|
showLedgerBalance?: boolean;
|
|
1855
|
+
showUnlinkItem?: boolean;
|
|
1856
|
+
showBreakConnection?: boolean;
|
|
1741
1857
|
}
|
|
1742
1858
|
export const LinkedAccounts: (props: LinkedAccountsProps) => React.JSX.Element;
|
|
1743
|
-
export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, }: LinkedAccountsProps) => React.JSX.Element;
|
|
1859
|
+
export const LinkedAccountsComponent: ({ asWidget, elevated, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountsProps) => React.JSX.Element;
|
|
1744
1860
|
|
|
1745
1861
|
}
|
|
1746
1862
|
declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsContent' {
|
|
@@ -1748,8 +1864,10 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsCont
|
|
|
1748
1864
|
interface LinkedAccountsDataProps {
|
|
1749
1865
|
asWidget?: boolean;
|
|
1750
1866
|
showLedgerBalance?: boolean;
|
|
1867
|
+
showUnlinkItem?: boolean;
|
|
1868
|
+
showBreakConnection?: boolean;
|
|
1751
1869
|
}
|
|
1752
|
-
export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, }: LinkedAccountsDataProps) => React.JSX.Element;
|
|
1870
|
+
export const LinkedAccountsContent: ({ asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountsDataProps) => React.JSX.Element;
|
|
1753
1871
|
export {};
|
|
1754
1872
|
|
|
1755
1873
|
}
|
|
@@ -1816,7 +1934,7 @@ declare module '@layerfi/components/components/Onboarding/ConnectAccount' {
|
|
|
1816
1934
|
onTransactionsToReviewClick?: () => void;
|
|
1817
1935
|
currentMonthOnly?: boolean;
|
|
1818
1936
|
}
|
|
1819
|
-
export const ConnectAccount: ({ onboardingStep, onTransactionsToReviewClick,
|
|
1937
|
+
export const ConnectAccount: ({ onboardingStep, onTransactionsToReviewClick, }: ConnectAccountProps) => React.JSX.Element;
|
|
1820
1938
|
|
|
1821
1939
|
}
|
|
1822
1940
|
declare module '@layerfi/components/components/Onboarding/Onboarding' {
|
|
@@ -1864,6 +1982,29 @@ declare module '@layerfi/components/components/Panel/Panel' {
|
|
|
1864
1982
|
declare module '@layerfi/components/components/Panel/index' {
|
|
1865
1983
|
export { Panel } from '@layerfi/components/components/Panel/Panel';
|
|
1866
1984
|
|
|
1985
|
+
}
|
|
1986
|
+
declare module '@layerfi/components/components/PanelView/PanelView' {
|
|
1987
|
+
import React, { ReactNode } from 'react';
|
|
1988
|
+
export interface PanelViewProps {
|
|
1989
|
+
children: ReactNode;
|
|
1990
|
+
title?: string;
|
|
1991
|
+
headerControls?: ReactNode;
|
|
1992
|
+
}
|
|
1993
|
+
export const PanelView: ({ title, children, headerControls, }: PanelViewProps) => React.JSX.Element;
|
|
1994
|
+
|
|
1995
|
+
}
|
|
1996
|
+
declare module '@layerfi/components/components/PanelView/index' {
|
|
1997
|
+
export { PanelView } from '@layerfi/components/components/PanelView/PanelView';
|
|
1998
|
+
|
|
1999
|
+
}
|
|
2000
|
+
declare module '@layerfi/components/components/PanelViewHeader/PanelViewHeader' {
|
|
2001
|
+
import React, { ReactNode } from 'react';
|
|
2002
|
+
export interface PanelViewHeaderProps {
|
|
2003
|
+
title?: string;
|
|
2004
|
+
controls?: ReactNode;
|
|
2005
|
+
}
|
|
2006
|
+
export const PanelViewHeader: ({ title, controls }: PanelViewHeaderProps) => React.JSX.Element;
|
|
2007
|
+
|
|
1867
2008
|
}
|
|
1868
2009
|
declare module '@layerfi/components/components/Pill/Pill' {
|
|
1869
2010
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -2107,17 +2248,6 @@ declare module '@layerfi/components/components/ProfitAndLossView/ProfitAndLossVi
|
|
|
2107
2248
|
declare module '@layerfi/components/components/ProfitAndLossView/index' {
|
|
2108
2249
|
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView';
|
|
2109
2250
|
|
|
2110
|
-
}
|
|
2111
|
-
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow' {
|
|
2112
|
-
import React, { PropsWithChildren } from 'react';
|
|
2113
|
-
type Props = PropsWithChildren;
|
|
2114
|
-
export const SkeletonBalanceSheetRow: ({ children }: Props) => React.JSX.Element;
|
|
2115
|
-
export {};
|
|
2116
|
-
|
|
2117
|
-
}
|
|
2118
|
-
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/index' {
|
|
2119
|
-
export { SkeletonBalanceSheetRow } from '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow';
|
|
2120
|
-
|
|
2121
2251
|
}
|
|
2122
2252
|
declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
|
|
2123
2253
|
import React from 'react';
|
|
@@ -2331,13 +2461,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
2331
2461
|
floating: HTMLElement | null;
|
|
2332
2462
|
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
2333
2463
|
context: {
|
|
2464
|
+
update: () => void;
|
|
2334
2465
|
x: number;
|
|
2335
2466
|
y: number;
|
|
2336
2467
|
placement: import("@floating-ui/utils").Placement;
|
|
2337
2468
|
strategy: import("@floating-ui/utils").Strategy;
|
|
2338
2469
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
2339
2470
|
isPositioned: boolean;
|
|
2340
|
-
update: () => void;
|
|
2341
2471
|
floatingStyles: React.CSSProperties;
|
|
2342
2472
|
open: boolean;
|
|
2343
2473
|
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
@@ -2380,13 +2510,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
2380
2510
|
floating: HTMLElement | null;
|
|
2381
2511
|
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
2382
2512
|
context: {
|
|
2513
|
+
update: () => void;
|
|
2383
2514
|
x: number;
|
|
2384
2515
|
y: number;
|
|
2385
2516
|
placement: import("@floating-ui/utils").Placement;
|
|
2386
2517
|
strategy: import("@floating-ui/utils").Strategy;
|
|
2387
2518
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
2388
2519
|
isPositioned: boolean;
|
|
2389
|
-
update: () => void;
|
|
2390
2520
|
floatingStyles: React.CSSProperties;
|
|
2391
2521
|
open: boolean;
|
|
2392
2522
|
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
@@ -2415,9 +2545,9 @@ declare module '@layerfi/components/components/TransactionToReviewCard/Transacti
|
|
|
2415
2545
|
import React from 'react';
|
|
2416
2546
|
export interface TransactionToReviewCardProps {
|
|
2417
2547
|
onClick?: () => void;
|
|
2418
|
-
|
|
2548
|
+
usePnlDateRange?: boolean;
|
|
2419
2549
|
}
|
|
2420
|
-
export const TransactionToReviewCard: ({ onClick,
|
|
2550
|
+
export const TransactionToReviewCard: ({ onClick, usePnlDateRange, }: TransactionToReviewCardProps) => React.JSX.Element;
|
|
2421
2551
|
|
|
2422
2552
|
}
|
|
2423
2553
|
declare module '@layerfi/components/components/TransactionToReviewCard/index' {
|
|
@@ -2589,6 +2719,21 @@ declare module '@layerfi/components/config/theme' {
|
|
|
2589
2719
|
};
|
|
2590
2720
|
};
|
|
2591
2721
|
|
|
2722
|
+
}
|
|
2723
|
+
declare module '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetContext' {
|
|
2724
|
+
/// <reference types="react" />
|
|
2725
|
+
import { useBalanceSheet } from '@layerfi/components/hooks/useBalanceSheet/index';
|
|
2726
|
+
export type BalanceSheetContextType = ReturnType<typeof useBalanceSheet>;
|
|
2727
|
+
export const BalanceSheetContext: import("react").Context<{
|
|
2728
|
+
data: import("@layerfi/components/types").BalanceSheet | undefined;
|
|
2729
|
+
isLoading: boolean;
|
|
2730
|
+
error: unknown;
|
|
2731
|
+
}>;
|
|
2732
|
+
|
|
2733
|
+
}
|
|
2734
|
+
declare module '@layerfi/components/contexts/BalanceSheetContext/index' {
|
|
2735
|
+
export { BalanceSheetContext } from '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetContext';
|
|
2736
|
+
|
|
2592
2737
|
}
|
|
2593
2738
|
declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransactionsContext' {
|
|
2594
2739
|
/// <reference types="react" />
|
|
@@ -2701,7 +2846,7 @@ declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
|
|
|
2701
2846
|
selectedEntryId?: string | undefined;
|
|
2702
2847
|
setSelectedEntryId: (id?: string | undefined) => void;
|
|
2703
2848
|
closeSelectedEntry: () => void;
|
|
2704
|
-
create: (newJournalEntry: import("@layerfi/components/types/journal").
|
|
2849
|
+
create: (newJournalEntry: import("@layerfi/components/types/journal").NewApiJournalEntry) => void;
|
|
2705
2850
|
changeFormData: (name: string, value: string | number | import("@layerfi/components/types/general").BaseSelectOption | undefined, lineItemIndex?: number | undefined, accounts?: import("../../types/chart_of_accounts").LedgerAccountBalance[] | undefined) => void;
|
|
2706
2851
|
submitForm: () => void;
|
|
2707
2852
|
cancelForm: () => void;
|
|
@@ -2787,6 +2932,24 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccount
|
|
|
2787
2932
|
declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
|
|
2788
2933
|
export { LinkedAccountsContext } from '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccountsContext';
|
|
2789
2934
|
|
|
2935
|
+
}
|
|
2936
|
+
declare module '@layerfi/components/contexts/TableExpandContext/TableExpandContext' {
|
|
2937
|
+
import React, { ReactNode } from 'react';
|
|
2938
|
+
interface TableExpandContextType {
|
|
2939
|
+
tableExpandState: boolean;
|
|
2940
|
+
toggleTableExpandState: () => void;
|
|
2941
|
+
}
|
|
2942
|
+
export const TableExpandContext: React.Context<TableExpandContextType>;
|
|
2943
|
+
interface TableExpandProviderProps {
|
|
2944
|
+
children: ReactNode;
|
|
2945
|
+
}
|
|
2946
|
+
export const TableExpandProvider: React.FC<TableExpandProviderProps>;
|
|
2947
|
+
export {};
|
|
2948
|
+
|
|
2949
|
+
}
|
|
2950
|
+
declare module '@layerfi/components/contexts/TableExpandContext/index' {
|
|
2951
|
+
export { TableExpandContext, TableExpandProvider } from '@layerfi/components/contexts/TableExpandContext/TableExpandContext';
|
|
2952
|
+
|
|
2790
2953
|
}
|
|
2791
2954
|
declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
|
|
2792
2955
|
/// <reference types="react" />
|
|
@@ -2974,7 +3137,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
|
|
|
2974
3137
|
import { Direction, FormError, FormErrorWithId } from '@layerfi/components/types';
|
|
2975
3138
|
import { LedgerAccountBalance } from '@layerfi/components/types/chart_of_accounts';
|
|
2976
3139
|
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
2977
|
-
import { JournalEntry,
|
|
3140
|
+
import { JournalEntry, NewApiJournalEntry, NewFormJournalEntry } from '@layerfi/components/types/journal';
|
|
2978
3141
|
type UseJournal = () => {
|
|
2979
3142
|
data?: JournalEntry[];
|
|
2980
3143
|
isLoading?: boolean;
|
|
@@ -2987,7 +3150,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
|
|
|
2987
3150
|
selectedEntryId?: string;
|
|
2988
3151
|
setSelectedEntryId: (id?: string) => void;
|
|
2989
3152
|
closeSelectedEntry: () => void;
|
|
2990
|
-
create: (newJournalEntry:
|
|
3153
|
+
create: (newJournalEntry: NewApiJournalEntry) => void;
|
|
2991
3154
|
changeFormData: (name: string, value: string | BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: LedgerAccountBalance[] | undefined) => void;
|
|
2992
3155
|
submitForm: () => void;
|
|
2993
3156
|
cancelForm: () => void;
|
|
@@ -3001,7 +3164,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
|
|
|
3001
3164
|
};
|
|
3002
3165
|
export interface JournalFormTypes {
|
|
3003
3166
|
action: string;
|
|
3004
|
-
data:
|
|
3167
|
+
data: NewFormJournalEntry;
|
|
3005
3168
|
errors?: {
|
|
3006
3169
|
entry: FormError[];
|
|
3007
3170
|
lineItems: FormErrorWithId[];
|
|
@@ -3185,6 +3348,20 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
|
|
|
3185
3348
|
export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
|
|
3186
3349
|
export {};
|
|
3187
3350
|
|
|
3351
|
+
}
|
|
3352
|
+
declare module '@layerfi/components/hooks/useTableExpandRow/index' {
|
|
3353
|
+
export { useTableExpandRow } from '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow';
|
|
3354
|
+
|
|
3355
|
+
}
|
|
3356
|
+
declare module '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow' {
|
|
3357
|
+
/// <reference types="react" />
|
|
3358
|
+
export const useTableExpandRow: (index: number, defaultOpen?: boolean) => {
|
|
3359
|
+
isOpen: boolean;
|
|
3360
|
+
setIsOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
3361
|
+
showComponent: boolean;
|
|
3362
|
+
INDENTATION: number;
|
|
3363
|
+
};
|
|
3364
|
+
|
|
3188
3365
|
}
|
|
3189
3366
|
declare module '@layerfi/components/hooks/useTasks/index' {
|
|
3190
3367
|
export { useTasks } from '@layerfi/components/hooks/useTasks/useTasks';
|
|
@@ -3248,13 +3425,6 @@ declare module '@layerfi/components/icons/Bell' {
|
|
|
3248
3425
|
const Bell: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
3249
3426
|
export default Bell;
|
|
3250
3427
|
|
|
3251
|
-
}
|
|
3252
|
-
declare module '@layerfi/components/icons/Calendar' {
|
|
3253
|
-
import * as React from 'react';
|
|
3254
|
-
import { SVGProps } from 'react';
|
|
3255
|
-
const Calendar: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
3256
|
-
export default Calendar;
|
|
3257
|
-
|
|
3258
3428
|
}
|
|
3259
3429
|
declare module '@layerfi/components/icons/Check' {
|
|
3260
3430
|
import * as React from 'react';
|
|
@@ -3481,20 +3651,19 @@ declare module '@layerfi/components/icons/types' {
|
|
|
3481
3651
|
}
|
|
3482
3652
|
declare module '@layerfi/components/index' {
|
|
3483
3653
|
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
3484
|
-
export {
|
|
3485
|
-
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
3486
|
-
export { Hello } from '@layerfi/components/components/Hello/index';
|
|
3654
|
+
export { Onboarding } from '@layerfi/components/components/Onboarding/index';
|
|
3487
3655
|
export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
|
|
3656
|
+
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
3488
3657
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
3489
|
-
export {
|
|
3658
|
+
export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
|
|
3490
3659
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
3491
3660
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
3492
|
-
export { Onboarding } from '@layerfi/components/components/Onboarding/index';
|
|
3493
3661
|
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
3494
3662
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
3495
3663
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
3496
|
-
export { Reports } from '@layerfi/components/views/Reports/index';
|
|
3497
3664
|
export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
|
|
3665
|
+
export { Reports } from '@layerfi/components/views/Reports/index';
|
|
3666
|
+
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
|
|
3498
3667
|
export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
|
|
3499
3668
|
export { useBankTransactionsContext } from '@layerfi/components/contexts/BankTransactionsContext/index';
|
|
3500
3669
|
|
|
@@ -3606,14 +3775,15 @@ declare module '@layerfi/components/types/balance_sheet' {
|
|
|
3606
3775
|
type: 'Balance_Sheet';
|
|
3607
3776
|
start_date: string;
|
|
3608
3777
|
end_date: string;
|
|
3609
|
-
assets: LineItem
|
|
3610
|
-
liabilities_and_equity: LineItem
|
|
3778
|
+
assets: LineItem;
|
|
3779
|
+
liabilities_and_equity: LineItem;
|
|
3611
3780
|
fully_categorized: boolean;
|
|
3612
3781
|
}
|
|
3613
3782
|
|
|
3614
3783
|
}
|
|
3615
3784
|
declare module '@layerfi/components/types/bank_transactions' {
|
|
3616
3785
|
import { Categorization, CategorizationStatus, Category } from '@layerfi/components/types/categories';
|
|
3786
|
+
import { S3PresignedUrl } from "@layerfi/components/types/general";
|
|
3617
3787
|
export enum Direction {
|
|
3618
3788
|
CREDIT = "CREDIT",
|
|
3619
3789
|
DEBIT = "DEBIT"
|
|
@@ -3668,6 +3838,20 @@ declare module '@layerfi/components/types/bank_transactions' {
|
|
|
3668
3838
|
type: string;
|
|
3669
3839
|
};
|
|
3670
3840
|
}
|
|
3841
|
+
export interface BankTransactionMetadata {
|
|
3842
|
+
memo: string | null;
|
|
3843
|
+
}
|
|
3844
|
+
export interface DocumentS3Urls {
|
|
3845
|
+
type: 'Document_S3_Urls';
|
|
3846
|
+
documentUrls: S3PresignedUrl[];
|
|
3847
|
+
}
|
|
3848
|
+
export interface FileMetadata {
|
|
3849
|
+
type: 'File_Metadata';
|
|
3850
|
+
id: string | null;
|
|
3851
|
+
fileType: string;
|
|
3852
|
+
fileName: string;
|
|
3853
|
+
documentType: string;
|
|
3854
|
+
}
|
|
3671
3855
|
|
|
3672
3856
|
}
|
|
3673
3857
|
declare module '@layerfi/components/types/business' {
|
|
@@ -3732,7 +3916,7 @@ declare module '@layerfi/components/types/categories' {
|
|
|
3732
3916
|
suggestions: Category[];
|
|
3733
3917
|
}
|
|
3734
3918
|
export type Categorization = AutoCategorization | SuggestedCategorization;
|
|
3735
|
-
export type
|
|
3919
|
+
export type AccountIdentifierPayloadObject = {
|
|
3736
3920
|
type: 'StableName';
|
|
3737
3921
|
stable_name: string;
|
|
3738
3922
|
} | {
|
|
@@ -3741,12 +3925,12 @@ declare module '@layerfi/components/types/categories' {
|
|
|
3741
3925
|
};
|
|
3742
3926
|
export type SingleCategoryUpdate = {
|
|
3743
3927
|
type: 'Category';
|
|
3744
|
-
category:
|
|
3928
|
+
category: AccountIdentifierPayloadObject;
|
|
3745
3929
|
};
|
|
3746
3930
|
export type SplitCategoryUpdate = {
|
|
3747
3931
|
type: 'Split';
|
|
3748
3932
|
entries: {
|
|
3749
|
-
category: string |
|
|
3933
|
+
category: string | AccountIdentifierPayloadObject;
|
|
3750
3934
|
amount: number;
|
|
3751
3935
|
}[];
|
|
3752
3936
|
};
|
|
@@ -3846,6 +4030,7 @@ declare module '@layerfi/components/types/general' {
|
|
|
3846
4030
|
declare module '@layerfi/components/types/journal' {
|
|
3847
4031
|
import { Account } from '@layerfi/components/types';
|
|
3848
4032
|
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
4033
|
+
import { AccountIdentifierPayloadObject } from '@layerfi/components/types/categories';
|
|
3849
4034
|
import { LedgerEntrySource } from '@layerfi/components/types/ledger_accounts';
|
|
3850
4035
|
export interface JournalEntry {
|
|
3851
4036
|
id: string;
|
|
@@ -3869,7 +4054,18 @@ declare module '@layerfi/components/types/journal' {
|
|
|
3869
4054
|
entry_at: string;
|
|
3870
4055
|
createdAt: string;
|
|
3871
4056
|
}
|
|
3872
|
-
export type
|
|
4057
|
+
export type NewApiJournalEntry = {
|
|
4058
|
+
entry_at: string;
|
|
4059
|
+
created_by: string;
|
|
4060
|
+
memo: string;
|
|
4061
|
+
line_items: NewApiJournalEntryLineItem[];
|
|
4062
|
+
};
|
|
4063
|
+
export type NewApiJournalEntryLineItem = {
|
|
4064
|
+
account_identifier: AccountIdentifierPayloadObject;
|
|
4065
|
+
amount: number;
|
|
4066
|
+
direction: Direction;
|
|
4067
|
+
};
|
|
4068
|
+
export type NewFormJournalEntry = {
|
|
3873
4069
|
entry_at: string;
|
|
3874
4070
|
created_by: string;
|
|
3875
4071
|
memo: string;
|
|
@@ -4250,13 +4446,13 @@ declare module '@layerfi/components/types' {
|
|
|
4250
4446
|
}
|
|
4251
4447
|
declare module '@layerfi/components/utils/bankTransactions' {
|
|
4252
4448
|
import { CategoryOption } from '@layerfi/components/components/CategorySelect/CategorySelect';
|
|
4253
|
-
import { BankTransaction } from '@layerfi/components/types';
|
|
4449
|
+
import { BankTransaction, DateRange } from '@layerfi/components/types';
|
|
4254
4450
|
export const hasMatch: (bankTransaction?: BankTransaction) => boolean;
|
|
4255
4451
|
export const isCredit: ({ direction }: Pick<BankTransaction, 'direction'>) => boolean;
|
|
4256
4452
|
export const isAlreadyMatched: (bankTransaction?: BankTransaction) => string | undefined;
|
|
4257
|
-
export const countTransactionsToReview: ({ transactions,
|
|
4453
|
+
export const countTransactionsToReview: ({ transactions, dateRange }: {
|
|
4258
4454
|
transactions?: BankTransaction[] | undefined;
|
|
4259
|
-
|
|
4455
|
+
dateRange?: DateRange | undefined;
|
|
4260
4456
|
}) => number;
|
|
4261
4457
|
export const getCategorizePayload: (category: CategoryOption) => {
|
|
4262
4458
|
type: "AccountId";
|
|
@@ -4322,6 +4518,12 @@ declare module '@layerfi/components/utils/helpers' {
|
|
|
4322
4518
|
*/
|
|
4323
4519
|
export const convertToStableName: (name: string) => string;
|
|
4324
4520
|
|
|
4521
|
+
}
|
|
4522
|
+
declare module '@layerfi/components/utils/journal' {
|
|
4523
|
+
import { AccountIdentifierPayloadObject } from '@layerfi/components/types/categories';
|
|
4524
|
+
import { JournalEntryLineItem } from '@layerfi/components/types/journal';
|
|
4525
|
+
export const getAccountIdentifierPayload: (journalLineItem: JournalEntryLineItem) => AccountIdentifierPayloadObject;
|
|
4526
|
+
|
|
4325
4527
|
}
|
|
4326
4528
|
declare module '@layerfi/components/utils/profitAndLossUtils' {
|
|
4327
4529
|
import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
@@ -4354,11 +4556,13 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
|
|
|
4354
4556
|
title?: string;
|
|
4355
4557
|
elevatedLinkedAccounts?: boolean;
|
|
4356
4558
|
showLedgerBalance?: boolean;
|
|
4559
|
+
showUnlinkItem?: boolean;
|
|
4560
|
+
showBreakConnection?: boolean;
|
|
4357
4561
|
showDescriptions?: boolean;
|
|
4358
4562
|
showReceiptUploads?: boolean;
|
|
4359
4563
|
mobileComponent?: MobileComponentType;
|
|
4360
4564
|
}
|
|
4361
|
-
export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
|
|
4565
|
+
export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
|
|
4362
4566
|
|
|
4363
4567
|
}
|
|
4364
4568
|
declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {
|
|
@@ -4382,10 +4586,13 @@ declare module '@layerfi/components/views/Reports/Reports' {
|
|
|
4382
4586
|
export interface ReportsProps {
|
|
4383
4587
|
title?: string;
|
|
4384
4588
|
}
|
|
4589
|
+
type ReportType = 'profitAndLoss' | 'balanceSheet';
|
|
4385
4590
|
export interface ReportsPanelProps {
|
|
4386
4591
|
containerRef: RefObject<HTMLDivElement>;
|
|
4592
|
+
openReport: ReportType;
|
|
4387
4593
|
}
|
|
4388
4594
|
export const Reports: ({ title }: ReportsProps) => React.JSX.Element;
|
|
4595
|
+
export {};
|
|
4389
4596
|
|
|
4390
4597
|
}
|
|
4391
4598
|
declare module '@layerfi/components/views/Reports/index' {
|