@layerfi/components 0.1.30 → 0.1.32
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 +6 -0
- package/dist/esm/index.js +1484 -1055
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +153 -10
- package/dist/index.js +1596 -1174
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +413 -43
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -323,6 +323,22 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
|
323
323
|
error?: unknown;
|
|
324
324
|
}>;
|
|
325
325
|
|
|
326
|
+
}
|
|
327
|
+
declare module '@layerfi/components/api/layer/statement-of-cash-flow' {
|
|
328
|
+
import { StatementOfCashFlow } from '@layerfi/components/types';
|
|
329
|
+
export const getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
330
|
+
params?: GetStatementOfCashFlowParams | undefined;
|
|
331
|
+
} | undefined) => () => Promise<GetStatementOfCashFlowReturn>;
|
|
332
|
+
export type GetStatementOfCashFlowReturn = {
|
|
333
|
+
data?: StatementOfCashFlow;
|
|
334
|
+
error?: unknown;
|
|
335
|
+
};
|
|
336
|
+
export interface GetStatementOfCashFlowParams extends Record<string, string | undefined> {
|
|
337
|
+
businessId: string;
|
|
338
|
+
startDate: string;
|
|
339
|
+
endDate: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
326
342
|
}
|
|
327
343
|
declare module '@layerfi/components/api/layer/tasks' {
|
|
328
344
|
import { TaskTypes } from '@layerfi/components/types/tasks';
|
|
@@ -579,6 +595,9 @@ declare module '@layerfi/components/api/layer' {
|
|
|
579
595
|
} | undefined;
|
|
580
596
|
body?: Record<string, unknown> | undefined;
|
|
581
597
|
} | undefined) => Promise<Record<string, unknown>>;
|
|
598
|
+
getStatementOfCashFlow: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
599
|
+
params?: import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowParams | undefined;
|
|
600
|
+
} | undefined) => () => Promise<import("@layerfi/components/api/layer/statement-of-cash-flow").GetStatementOfCashFlowReturn>;
|
|
582
601
|
};
|
|
583
602
|
|
|
584
603
|
}
|
|
@@ -675,13 +694,9 @@ declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
|
675
694
|
withExpandAllButton?: boolean;
|
|
676
695
|
};
|
|
677
696
|
export type BalanceSheetProps = PropsWithChildren & {
|
|
678
|
-
effectiveDate
|
|
679
|
-
};
|
|
680
|
-
const BalanceSheet: {
|
|
681
|
-
(props: BalanceSheetProps): React.JSX.Element;
|
|
682
|
-
View: ({ withExpandAllButton, }: BalanceSheetViewProps) => React.JSX.Element;
|
|
697
|
+
effectiveDate?: Date;
|
|
683
698
|
};
|
|
684
|
-
export
|
|
699
|
+
export const BalanceSheet: (props: BalanceSheetProps) => React.JSX.Element;
|
|
685
700
|
|
|
686
701
|
}
|
|
687
702
|
declare module '@layerfi/components/components/BalanceSheet/constants' {
|
|
@@ -727,8 +742,9 @@ declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow'
|
|
|
727
742
|
lineItem?: LineItem | null;
|
|
728
743
|
variant?: string;
|
|
729
744
|
summarize?: boolean;
|
|
745
|
+
defaultExpanded?: boolean;
|
|
730
746
|
};
|
|
731
|
-
export const BalanceSheetRow: ({ lineItem, depth, maxDepth, variant, summarize, }: Props) => React.JSX.Element | null;
|
|
747
|
+
export const BalanceSheetRow: ({ lineItem, depth, maxDepth, variant, summarize, defaultExpanded, }: Props) => React.JSX.Element | null;
|
|
732
748
|
export {};
|
|
733
749
|
|
|
734
750
|
}
|
|
@@ -1430,8 +1446,9 @@ declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker'
|
|
|
1430
1446
|
enableFutureDates?: boolean;
|
|
1431
1447
|
minDate?: Date;
|
|
1432
1448
|
currentDateOption?: boolean;
|
|
1449
|
+
responsive?: boolean;
|
|
1433
1450
|
}
|
|
1434
|
-
export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, currentDateOption, }: DateMonthPickerProps) => React.JSX.Element;
|
|
1451
|
+
export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, currentDateOption, responsive, }: DateMonthPickerProps) => React.JSX.Element;
|
|
1435
1452
|
export {};
|
|
1436
1453
|
|
|
1437
1454
|
}
|
|
@@ -1571,6 +1588,19 @@ declare module '@layerfi/components/components/Input/DateInput' {
|
|
|
1571
1588
|
showTimeSelectOnly?: boolean | undefined;
|
|
1572
1589
|
}) => React.JSX.Element;
|
|
1573
1590
|
|
|
1591
|
+
}
|
|
1592
|
+
declare module '@layerfi/components/components/Input/DateRangeInput' {
|
|
1593
|
+
import React from 'react';
|
|
1594
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
1595
|
+
export const DateRangeInput: ({ selected, onChange, ...props }: {
|
|
1596
|
+
selected?: Date[] | undefined;
|
|
1597
|
+
onChange?: ((dates: [Date | null, Date | null]) => void) | undefined;
|
|
1598
|
+
dateFormat?: string | undefined;
|
|
1599
|
+
timeIntervals?: number | undefined;
|
|
1600
|
+
timeCaption?: string | undefined;
|
|
1601
|
+
placeholderText?: string | undefined;
|
|
1602
|
+
}) => React.JSX.Element;
|
|
1603
|
+
|
|
1574
1604
|
}
|
|
1575
1605
|
declare module '@layerfi/components/components/Input/FileInput' {
|
|
1576
1606
|
import React from 'react';
|
|
@@ -1641,6 +1671,7 @@ declare module '@layerfi/components/components/Input/index' {
|
|
|
1641
1671
|
export { Select } from '@layerfi/components/components/Input/Select';
|
|
1642
1672
|
export { InputWithBadge } from '@layerfi/components/components/Input/InputWithBadge';
|
|
1643
1673
|
export { DateInput } from '@layerfi/components/components/Input/DateInput';
|
|
1674
|
+
export { DateRangeInput } from '@layerfi/components/components/Input/DateRangeInput';
|
|
1644
1675
|
|
|
1645
1676
|
}
|
|
1646
1677
|
declare module '@layerfi/components/components/Journal/Journal' {
|
|
@@ -2118,8 +2149,9 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
|
|
|
2118
2149
|
sidebarScope?: SidebarScope;
|
|
2119
2150
|
date: number | Date;
|
|
2120
2151
|
isLoading?: boolean;
|
|
2152
|
+
showDatePicker?: boolean;
|
|
2121
2153
|
}
|
|
2122
|
-
export const DetailedChart: ({ filteredData, filteredTotal, hoveredItem, setHoveredItem, sidebarScope, date, isLoading, }: DetailedChartProps) => React.JSX.Element;
|
|
2154
|
+
export const DetailedChart: ({ filteredData, filteredTotal, hoveredItem, setHoveredItem, sidebarScope, date, isLoading, showDatePicker, }: DetailedChartProps) => React.JSX.Element;
|
|
2123
2155
|
export {};
|
|
2124
2156
|
|
|
2125
2157
|
}
|
|
@@ -2262,6 +2294,66 @@ declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
|
|
|
2262
2294
|
declare module '@layerfi/components/components/SkeletonLoader/index' {
|
|
2263
2295
|
export { SkeletonLoader } from '@layerfi/components/components/SkeletonLoader/SkeletonLoader';
|
|
2264
2296
|
|
|
2297
|
+
}
|
|
2298
|
+
declare module '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow' {
|
|
2299
|
+
import React from 'react';
|
|
2300
|
+
export const StatementOfCashFlow: () => React.JSX.Element;
|
|
2301
|
+
|
|
2302
|
+
}
|
|
2303
|
+
declare module '@layerfi/components/components/StatementOfCashFlow/constants' {
|
|
2304
|
+
export const STATEMENT_OF_CASH_FLOW_ROWS: {
|
|
2305
|
+
name: string;
|
|
2306
|
+
displayName: string;
|
|
2307
|
+
lineItem: string;
|
|
2308
|
+
type: string;
|
|
2309
|
+
summarize: boolean;
|
|
2310
|
+
}[];
|
|
2311
|
+
export const ADJUSTMENTS_ROW_NAME = "Adjustments to Net Income";
|
|
2312
|
+
|
|
2313
|
+
}
|
|
2314
|
+
declare module '@layerfi/components/components/StatementOfCashFlow/index' {
|
|
2315
|
+
export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
|
|
2316
|
+
|
|
2317
|
+
}
|
|
2318
|
+
declare module '@layerfi/components/components/StatementOfCashFlowRow/StatementOfCashFlowRow' {
|
|
2319
|
+
import React from 'react';
|
|
2320
|
+
import { LineItem } from '@layerfi/components/types';
|
|
2321
|
+
type Props = {
|
|
2322
|
+
depth?: number;
|
|
2323
|
+
maxDepth?: number;
|
|
2324
|
+
lineItem?: LineItem | null;
|
|
2325
|
+
variant?: string;
|
|
2326
|
+
summarize?: boolean;
|
|
2327
|
+
defaultExpanded?: boolean;
|
|
2328
|
+
};
|
|
2329
|
+
export const StatementOfCashFlowRow: ({ lineItem, depth, maxDepth, variant, summarize, defaultExpanded, }: Props) => React.JSX.Element | null;
|
|
2330
|
+
export {};
|
|
2331
|
+
|
|
2332
|
+
}
|
|
2333
|
+
declare module '@layerfi/components/components/StatementOfCashFlowRow/index' {
|
|
2334
|
+
export { StatementOfCashFlowRow } from '@layerfi/components/components/StatementOfCashFlowRow/StatementOfCashFlowRow';
|
|
2335
|
+
|
|
2336
|
+
}
|
|
2337
|
+
declare module '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable' {
|
|
2338
|
+
import React from 'react';
|
|
2339
|
+
import { StatementOfCashFlow } from '@layerfi/components/types';
|
|
2340
|
+
type StatementOfCashFlowRowProps = {
|
|
2341
|
+
name: string;
|
|
2342
|
+
displayName: string;
|
|
2343
|
+
lineItem: string | undefined;
|
|
2344
|
+
summarize: boolean;
|
|
2345
|
+
type: string;
|
|
2346
|
+
};
|
|
2347
|
+
export const StatementOfCashFlowTable: ({ data, config, }: {
|
|
2348
|
+
data: StatementOfCashFlow;
|
|
2349
|
+
config: StatementOfCashFlowRowProps[];
|
|
2350
|
+
}) => React.JSX.Element;
|
|
2351
|
+
export {};
|
|
2352
|
+
|
|
2353
|
+
}
|
|
2354
|
+
declare module '@layerfi/components/components/StatementOfCashFlowTable/index' {
|
|
2355
|
+
export { StatementOfCashFlowTable } from '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable';
|
|
2356
|
+
|
|
2265
2357
|
}
|
|
2266
2358
|
declare module '@layerfi/components/components/Tabs/Tab' {
|
|
2267
2359
|
import React, { ChangeEvent, ReactNode } from 'react';
|
|
@@ -2728,6 +2820,7 @@ declare module '@layerfi/components/contexts/BalanceSheetContext/BalanceSheetCon
|
|
|
2728
2820
|
data: import("@layerfi/components/types").BalanceSheet | undefined;
|
|
2729
2821
|
isLoading: boolean;
|
|
2730
2822
|
error: unknown;
|
|
2823
|
+
refetch: () => void;
|
|
2731
2824
|
}>;
|
|
2732
2825
|
|
|
2733
2826
|
}
|
|
@@ -2932,6 +3025,22 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccount
|
|
|
2932
3025
|
declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
|
|
2933
3026
|
export { LinkedAccountsContext } from '@layerfi/components/contexts/LinkedAccountsContext/LinkedAccountsContext';
|
|
2934
3027
|
|
|
3028
|
+
}
|
|
3029
|
+
declare module '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext' {
|
|
3030
|
+
/// <reference types="react" />
|
|
3031
|
+
import { useStatementOfCashFlow } from '@layerfi/components/hooks/useStatementOfCashFlow/index';
|
|
3032
|
+
export type StatementOfCashFlowContextType = ReturnType<typeof useStatementOfCashFlow>;
|
|
3033
|
+
export const StatementOfCashFlowContext: import("react").Context<{
|
|
3034
|
+
data: import("@layerfi/components/types").StatementOfCashFlow | undefined;
|
|
3035
|
+
isLoading: boolean;
|
|
3036
|
+
error: unknown;
|
|
3037
|
+
refetch: () => void;
|
|
3038
|
+
}>;
|
|
3039
|
+
|
|
3040
|
+
}
|
|
3041
|
+
declare module '@layerfi/components/contexts/StatementOfCashContext/index' {
|
|
3042
|
+
export { StatementOfCashFlowContext } from '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext';
|
|
3043
|
+
|
|
2935
3044
|
}
|
|
2936
3045
|
declare module '@layerfi/components/contexts/TableExpandContext/TableExpandContext' {
|
|
2937
3046
|
import React, { ReactNode } from 'react';
|
|
@@ -2979,6 +3088,7 @@ declare module '@layerfi/components/hooks/useBalanceSheet/useBalanceSheet' {
|
|
|
2979
3088
|
data: BalanceSheet | undefined;
|
|
2980
3089
|
isLoading: boolean;
|
|
2981
3090
|
error: unknown;
|
|
3091
|
+
refetch: () => void;
|
|
2982
3092
|
};
|
|
2983
3093
|
export const useBalanceSheet: UseBalanceSheet;
|
|
2984
3094
|
export {};
|
|
@@ -3348,6 +3458,22 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLossQuery
|
|
|
3348
3458
|
export const useProfitAndLossQuery: UseProfitAndLossQueryReturn;
|
|
3349
3459
|
export {};
|
|
3350
3460
|
|
|
3461
|
+
}
|
|
3462
|
+
declare module '@layerfi/components/hooks/useStatementOfCashFlow/index' {
|
|
3463
|
+
export { useStatementOfCashFlow } from '@layerfi/components/hooks/useStatementOfCashFlow/useStatementOfCashFlow';
|
|
3464
|
+
|
|
3465
|
+
}
|
|
3466
|
+
declare module '@layerfi/components/hooks/useStatementOfCashFlow/useStatementOfCashFlow' {
|
|
3467
|
+
import { StatementOfCashFlow } from '@layerfi/components/types';
|
|
3468
|
+
type UseStatementOfCashFlow = (startDate?: Date, endDate?: Date) => {
|
|
3469
|
+
data: StatementOfCashFlow | undefined;
|
|
3470
|
+
isLoading: boolean;
|
|
3471
|
+
error: unknown;
|
|
3472
|
+
refetch: () => void;
|
|
3473
|
+
};
|
|
3474
|
+
export const useStatementOfCashFlow: UseStatementOfCashFlow;
|
|
3475
|
+
export {};
|
|
3476
|
+
|
|
3351
3477
|
}
|
|
3352
3478
|
declare module '@layerfi/components/hooks/useTableExpandRow/index' {
|
|
3353
3479
|
export { useTableExpandRow } from '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow';
|
|
@@ -3656,6 +3782,7 @@ declare module '@layerfi/components/index' {
|
|
|
3656
3782
|
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
3657
3783
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
3658
3784
|
export { BalanceSheet } from '@layerfi/components/components/BalanceSheet/index';
|
|
3785
|
+
export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/index';
|
|
3659
3786
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
3660
3787
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
3661
3788
|
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
@@ -4395,6 +4522,21 @@ declare module '@layerfi/components/types/profit_and_loss' {
|
|
|
4395
4522
|
months: ProfitAndLossSummary[];
|
|
4396
4523
|
}
|
|
4397
4524
|
|
|
4525
|
+
}
|
|
4526
|
+
declare module '@layerfi/components/types/statement_of_cash_flow' {
|
|
4527
|
+
import { LineItem } from '@layerfi/components/types/line_item';
|
|
4528
|
+
export interface StatementOfCashFlow {
|
|
4529
|
+
business_id: string;
|
|
4530
|
+
type: 'Cashflow_Statement';
|
|
4531
|
+
start_date: string;
|
|
4532
|
+
end_date: string;
|
|
4533
|
+
financing_activities: LineItem;
|
|
4534
|
+
investing_activities: LineItem;
|
|
4535
|
+
operating_activities: LineItem;
|
|
4536
|
+
period_net_cash_increase: number;
|
|
4537
|
+
cash_at_end_of_period: number;
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4398
4540
|
}
|
|
4399
4541
|
declare module '@layerfi/components/types/tasks' {
|
|
4400
4542
|
export interface TaskTypes {
|
|
@@ -4423,6 +4565,7 @@ declare module '@layerfi/components/types' {
|
|
|
4423
4565
|
export { ProfitAndLoss } from '@layerfi/components/types/profit_and_loss';
|
|
4424
4566
|
export { LineItem } from '@layerfi/components/types/line_item';
|
|
4425
4567
|
export { BalanceSheet } from '@layerfi/components/types/balance_sheet';
|
|
4568
|
+
export { StatementOfCashFlow } from '@layerfi/components/types/statement_of_cash_flow';
|
|
4426
4569
|
export { Direction, BankTransaction } from '@layerfi/components/types/bank_transactions';
|
|
4427
4570
|
export { CategorizationStatus, CategorizationScope, Category, CategorizationType, AutoCategorization, SuggestedCategorization, SingleCategoryUpdate, SplitCategoryUpdate, CategoryUpdate, } from '@layerfi/components/types/categories';
|
|
4428
4571
|
export { ChartOfAccounts, Account, NewAccount, EditAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
@@ -4586,7 +4729,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
|
|
|
4586
4729
|
export interface ReportsProps {
|
|
4587
4730
|
title?: string;
|
|
4588
4731
|
}
|
|
4589
|
-
type ReportType = 'profitAndLoss' | 'balanceSheet';
|
|
4732
|
+
type ReportType = 'profitAndLoss' | 'balanceSheet' | 'statementOfCashFlow';
|
|
4590
4733
|
export interface ReportsPanelProps {
|
|
4591
4734
|
containerRef: RefObject<HTMLDivElement>;
|
|
4592
4735
|
openReport: ReportType;
|