@layerfi/components 0.1.32 → 0.1.34
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 +22 -0
- package/dist/esm/index.js +2695 -2419
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +275 -146
- package/dist/index.js +2735 -2458
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +737 -615
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -692,9 +692,11 @@ declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
|
692
692
|
import React, { PropsWithChildren } from 'react';
|
|
693
693
|
export type BalanceSheetViewProps = PropsWithChildren & {
|
|
694
694
|
withExpandAllButton?: boolean;
|
|
695
|
+
asWidget?: boolean;
|
|
695
696
|
};
|
|
696
697
|
export type BalanceSheetProps = PropsWithChildren & {
|
|
697
698
|
effectiveDate?: Date;
|
|
699
|
+
asWidget?: boolean;
|
|
698
700
|
};
|
|
699
701
|
export const BalanceSheet: (props: BalanceSheetProps) => React.JSX.Element;
|
|
700
702
|
|
|
@@ -732,25 +734,6 @@ declare module '@layerfi/components/components/BalanceSheetExpandAllButton/Balan
|
|
|
732
734
|
declare module '@layerfi/components/components/BalanceSheetExpandAllButton/index' {
|
|
733
735
|
export { BalanceSheetExpandAllButton } from '@layerfi/components/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton';
|
|
734
736
|
|
|
735
|
-
}
|
|
736
|
-
declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow' {
|
|
737
|
-
import React from 'react';
|
|
738
|
-
import { LineItem } from '@layerfi/components/types';
|
|
739
|
-
type Props = {
|
|
740
|
-
depth?: number;
|
|
741
|
-
maxDepth?: number;
|
|
742
|
-
lineItem?: LineItem | null;
|
|
743
|
-
variant?: string;
|
|
744
|
-
summarize?: boolean;
|
|
745
|
-
defaultExpanded?: boolean;
|
|
746
|
-
};
|
|
747
|
-
export const BalanceSheetRow: ({ lineItem, depth, maxDepth, variant, summarize, defaultExpanded, }: Props) => React.JSX.Element | null;
|
|
748
|
-
export {};
|
|
749
|
-
|
|
750
|
-
}
|
|
751
|
-
declare module '@layerfi/components/components/BalanceSheetRow/index' {
|
|
752
|
-
export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
|
|
753
|
-
|
|
754
737
|
}
|
|
755
738
|
declare module '@layerfi/components/components/BalanceSheetTable/BalanceSheetTable' {
|
|
756
739
|
import React from 'react';
|
|
@@ -1019,7 +1002,10 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
|
|
|
1019
1002
|
filters?: BankTransactionFilters;
|
|
1020
1003
|
hideHeader?: boolean;
|
|
1021
1004
|
}
|
|
1022
|
-
export
|
|
1005
|
+
export interface BankTransactionsWithErrorProps extends BankTransactionsProps {
|
|
1006
|
+
onError?: (error: Error) => void;
|
|
1007
|
+
}
|
|
1008
|
+
export const BankTransactions: ({ onError, ...props }: BankTransactionsWithErrorProps) => React.JSX.Element;
|
|
1023
1009
|
|
|
1024
1010
|
}
|
|
1025
1011
|
declare module '@layerfi/components/components/BankTransactions/BankTransactionsHeader' {
|
|
@@ -1420,40 +1406,38 @@ declare module '@layerfi/components/components/DataState/index' {
|
|
|
1420
1406
|
export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
|
|
1421
1407
|
|
|
1422
1408
|
}
|
|
1423
|
-
declare module '@layerfi/components/components/
|
|
1409
|
+
declare module '@layerfi/components/components/DatePicker/DatePicker' {
|
|
1424
1410
|
import React from 'react';
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1411
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
1412
|
+
interface DatePickerProps {
|
|
1413
|
+
mode: 'dayPicker' | 'dayRangePicker' | 'monthPicker' | 'monthRangePicker' | 'timePicker';
|
|
1414
|
+
selected: Date | [Date | null, Date | null];
|
|
1415
|
+
onChange: (date: Date | [Date, Date | null]) => void;
|
|
1416
|
+
dateFormat?: string;
|
|
1417
|
+
timeIntervals?: number;
|
|
1418
|
+
timeCaption?: string;
|
|
1419
|
+
placeholderText?: string;
|
|
1420
|
+
options?: string[];
|
|
1421
|
+
wrapperClassName?: string;
|
|
1422
|
+
calendarClassName?: string;
|
|
1423
|
+
popperClassName?: string;
|
|
1429
1424
|
currentDateOption?: boolean;
|
|
1430
1425
|
minDate?: Date;
|
|
1431
1426
|
}
|
|
1432
|
-
export const
|
|
1427
|
+
export const DatePicker: ({ selected, onChange, mode, dateFormat, timeIntervals, timeCaption, placeholderText, options, wrapperClassName, calendarClassName, popperClassName, minDate, currentDateOption, ...props }: DatePickerProps) => React.JSX.Element;
|
|
1433
1428
|
export {};
|
|
1434
1429
|
|
|
1435
1430
|
}
|
|
1436
|
-
declare module '@layerfi/components/components/
|
|
1437
|
-
export { DateDayPicker } from '@layerfi/components/components/DateDayPicker/DateDayPicker';
|
|
1438
|
-
|
|
1439
|
-
}
|
|
1440
|
-
declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker' {
|
|
1431
|
+
declare module '@layerfi/components/components/DatePicker/DatePickerOptions' {
|
|
1441
1432
|
import React from 'react';
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
enableFutureDates?: boolean;
|
|
1447
|
-
minDate?: Date;
|
|
1448
|
-
currentDateOption?: boolean;
|
|
1449
|
-
responsive?: boolean;
|
|
1450
|
-
}
|
|
1451
|
-
export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, currentDateOption, responsive, }: DateMonthPickerProps) => React.JSX.Element;
|
|
1452
|
-
export {};
|
|
1433
|
+
export const DatePickerOptions: ({ options, setSelectedDate, }: {
|
|
1434
|
+
options: string[];
|
|
1435
|
+
setSelectedDate: (dates: [Date | null, Date | null]) => void;
|
|
1436
|
+
}) => React.JSX.Element;
|
|
1453
1437
|
|
|
1454
1438
|
}
|
|
1455
|
-
declare module '@layerfi/components/components/
|
|
1456
|
-
export {
|
|
1439
|
+
declare module '@layerfi/components/components/DatePicker/index' {
|
|
1440
|
+
export { DatePicker } from '@layerfi/components/components/DatePicker/DatePicker';
|
|
1457
1441
|
|
|
1458
1442
|
}
|
|
1459
1443
|
declare module '@layerfi/components/components/DateTime/DateTime' {
|
|
@@ -1512,6 +1496,36 @@ declare module '@layerfi/components/components/Drawer/Drawer' {
|
|
|
1512
1496
|
declare module '@layerfi/components/components/Drawer/index' {
|
|
1513
1497
|
export { Drawer } from '@layerfi/components/components/Drawer/Drawer';
|
|
1514
1498
|
|
|
1499
|
+
}
|
|
1500
|
+
declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundary' {
|
|
1501
|
+
import React, { ErrorInfo, Component } from 'react';
|
|
1502
|
+
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
1503
|
+
interface ErrorBoundaryProps {
|
|
1504
|
+
onError?: (error: Error) => void;
|
|
1505
|
+
}
|
|
1506
|
+
interface ErrorBoundaryState {
|
|
1507
|
+
hasError?: boolean;
|
|
1508
|
+
}
|
|
1509
|
+
export class ErrorBoundary extends Component<React.PropsWithChildren<ErrorBoundaryProps>, ErrorBoundaryState> {
|
|
1510
|
+
onError: (err: LayerError) => void;
|
|
1511
|
+
constructor(props: any);
|
|
1512
|
+
static getDerivedStateFromError(_error: Error): {
|
|
1513
|
+
hasError: boolean;
|
|
1514
|
+
};
|
|
1515
|
+
componentDidCatch(error: Error, _info: ErrorInfo): void;
|
|
1516
|
+
render(): any;
|
|
1517
|
+
}
|
|
1518
|
+
export {};
|
|
1519
|
+
|
|
1520
|
+
}
|
|
1521
|
+
declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundaryMessage' {
|
|
1522
|
+
import React from 'react';
|
|
1523
|
+
export const ErrorBoundaryMessage: () => React.JSX.Element;
|
|
1524
|
+
|
|
1525
|
+
}
|
|
1526
|
+
declare module '@layerfi/components/components/ErrorBoundary/index' {
|
|
1527
|
+
export { ErrorBoundary } from '@layerfi/components/components/ErrorBoundary/ErrorBoundary';
|
|
1528
|
+
|
|
1515
1529
|
}
|
|
1516
1530
|
declare module '@layerfi/components/components/ExpandedBankTransactionRow/APIErrorNotifications' {
|
|
1517
1531
|
import React from 'react';
|
|
@@ -1573,34 +1587,6 @@ declare module '@layerfi/components/components/HoverMenu/HoverMenu' {
|
|
|
1573
1587
|
declare module '@layerfi/components/components/HoverMenu/index' {
|
|
1574
1588
|
export { HoverMenu, HoverMenuProps } from '@layerfi/components/components/HoverMenu/HoverMenu';
|
|
1575
1589
|
|
|
1576
|
-
}
|
|
1577
|
-
declare module '@layerfi/components/components/Input/DateInput' {
|
|
1578
|
-
import React from 'react';
|
|
1579
|
-
import 'react-datepicker/dist/react-datepicker.css';
|
|
1580
|
-
export const DateInput: ({ selected, onChange, ...props }: {
|
|
1581
|
-
selected?: string | undefined;
|
|
1582
|
-
onChange?: ((date: string) => void) | undefined;
|
|
1583
|
-
dateFormat?: string | undefined;
|
|
1584
|
-
timeIntervals?: number | undefined;
|
|
1585
|
-
timeCaption?: string | undefined;
|
|
1586
|
-
placeholderText?: string | undefined;
|
|
1587
|
-
showTimeSelect?: boolean | undefined;
|
|
1588
|
-
showTimeSelectOnly?: boolean | undefined;
|
|
1589
|
-
}) => React.JSX.Element;
|
|
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
|
-
|
|
1604
1590
|
}
|
|
1605
1591
|
declare module '@layerfi/components/components/Input/FileInput' {
|
|
1606
1592
|
import React from 'react';
|
|
@@ -1670,8 +1656,6 @@ declare module '@layerfi/components/components/Input/index' {
|
|
|
1670
1656
|
export { FileInput } from '@layerfi/components/components/Input/FileInput';
|
|
1671
1657
|
export { Select } from '@layerfi/components/components/Input/Select';
|
|
1672
1658
|
export { InputWithBadge } from '@layerfi/components/components/Input/InputWithBadge';
|
|
1673
|
-
export { DateInput } from '@layerfi/components/components/Input/DateInput';
|
|
1674
|
-
export { DateRangeInput } from '@layerfi/components/components/Input/DateRangeInput';
|
|
1675
1659
|
|
|
1676
1660
|
}
|
|
1677
1661
|
declare module '@layerfi/components/components/Journal/Journal' {
|
|
@@ -2006,36 +1990,14 @@ declare module '@layerfi/components/components/Panel/Panel' {
|
|
|
2006
1990
|
sidebarIsOpen?: boolean;
|
|
2007
1991
|
header?: ReactNode;
|
|
2008
1992
|
parentRef?: RefObject<HTMLDivElement>;
|
|
1993
|
+
defaultSidebarHeight?: boolean;
|
|
2009
1994
|
}
|
|
2010
|
-
export const Panel: ({ children, className, sidebar, header, sidebarIsOpen, parentRef, }: PanelProps) => React.JSX.Element;
|
|
1995
|
+
export const Panel: ({ children, className, sidebar, header, sidebarIsOpen, parentRef, defaultSidebarHeight, }: PanelProps) => React.JSX.Element;
|
|
2011
1996
|
|
|
2012
1997
|
}
|
|
2013
1998
|
declare module '@layerfi/components/components/Panel/index' {
|
|
2014
1999
|
export { Panel } from '@layerfi/components/components/Panel/Panel';
|
|
2015
2000
|
|
|
2016
|
-
}
|
|
2017
|
-
declare module '@layerfi/components/components/PanelView/PanelView' {
|
|
2018
|
-
import React, { ReactNode } from 'react';
|
|
2019
|
-
export interface PanelViewProps {
|
|
2020
|
-
children: ReactNode;
|
|
2021
|
-
title?: string;
|
|
2022
|
-
headerControls?: ReactNode;
|
|
2023
|
-
}
|
|
2024
|
-
export const PanelView: ({ title, children, headerControls, }: PanelViewProps) => React.JSX.Element;
|
|
2025
|
-
|
|
2026
|
-
}
|
|
2027
|
-
declare module '@layerfi/components/components/PanelView/index' {
|
|
2028
|
-
export { PanelView } from '@layerfi/components/components/PanelView/PanelView';
|
|
2029
|
-
|
|
2030
|
-
}
|
|
2031
|
-
declare module '@layerfi/components/components/PanelViewHeader/PanelViewHeader' {
|
|
2032
|
-
import React, { ReactNode } from 'react';
|
|
2033
|
-
export interface PanelViewHeaderProps {
|
|
2034
|
-
title?: string;
|
|
2035
|
-
controls?: ReactNode;
|
|
2036
|
-
}
|
|
2037
|
-
export const PanelViewHeader: ({ title, controls }: PanelViewHeaderProps) => React.JSX.Element;
|
|
2038
|
-
|
|
2039
2001
|
}
|
|
2040
2002
|
declare module '@layerfi/components/components/Pill/Pill' {
|
|
2041
2003
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -2168,6 +2130,10 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
|
|
|
2168
2130
|
filters: ProfitAndLossFilters;
|
|
2169
2131
|
sortBy: (scope: Scope, field: string, direction?: SortDirection) => void;
|
|
2170
2132
|
}
|
|
2133
|
+
export const mapColorsToTypes: (data: any[]) => {
|
|
2134
|
+
color: any;
|
|
2135
|
+
opacity: any;
|
|
2136
|
+
}[];
|
|
2171
2137
|
export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, }: DetailedTableProps) => React.JSX.Element;
|
|
2172
2138
|
|
|
2173
2139
|
}
|
|
@@ -2314,25 +2280,6 @@ declare module '@layerfi/components/components/StatementOfCashFlow/constants' {
|
|
|
2314
2280
|
declare module '@layerfi/components/components/StatementOfCashFlow/index' {
|
|
2315
2281
|
export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
|
|
2316
2282
|
|
|
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
2283
|
}
|
|
2337
2284
|
declare module '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable' {
|
|
2338
2285
|
import React from 'react';
|
|
@@ -2354,6 +2301,61 @@ declare module '@layerfi/components/components/StatementOfCashFlowTable/Statemen
|
|
|
2354
2301
|
declare module '@layerfi/components/components/StatementOfCashFlowTable/index' {
|
|
2355
2302
|
export { StatementOfCashFlowTable } from '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable';
|
|
2356
2303
|
|
|
2304
|
+
}
|
|
2305
|
+
declare module '@layerfi/components/components/Table/Table' {
|
|
2306
|
+
import React from 'react';
|
|
2307
|
+
import { TableProps } from '@layerfi/components/types/table';
|
|
2308
|
+
export const Table: ({ componentName, children, borderCollapse, bottomSpacing, }: TableProps) => React.JSX.Element;
|
|
2309
|
+
|
|
2310
|
+
}
|
|
2311
|
+
declare module '@layerfi/components/components/Table/index' {
|
|
2312
|
+
import { TableBody } from '@layerfi/components/components/TableBody/index';
|
|
2313
|
+
import { TableCell } from '@layerfi/components/components/TableCell/index';
|
|
2314
|
+
import { TableHead } from '@layerfi/components/components/TableHead/index';
|
|
2315
|
+
import { TableRow } from '@layerfi/components/components/TableRow/index';
|
|
2316
|
+
import { Table } from '@layerfi/components/components/Table/Table';
|
|
2317
|
+
export { Table, TableBody, TableHead, TableRow, TableCell };
|
|
2318
|
+
|
|
2319
|
+
}
|
|
2320
|
+
declare module '@layerfi/components/components/TableBody/TableBody' {
|
|
2321
|
+
import React from 'react';
|
|
2322
|
+
import { TableBodyProps } from '@layerfi/components/types/table';
|
|
2323
|
+
export const TableBody: ({ children }: TableBodyProps) => React.JSX.Element;
|
|
2324
|
+
|
|
2325
|
+
}
|
|
2326
|
+
declare module '@layerfi/components/components/TableBody/index' {
|
|
2327
|
+
export { TableBody } from '@layerfi/components/components/TableBody/TableBody';
|
|
2328
|
+
|
|
2329
|
+
}
|
|
2330
|
+
declare module '@layerfi/components/components/TableCell/TableCell' {
|
|
2331
|
+
import React from 'react';
|
|
2332
|
+
import { TableCellProps } from '@layerfi/components/types/table';
|
|
2333
|
+
export const TableCell: ({ children, isHeaderCell, isCurrency, primary, withExpandIcon, }: TableCellProps) => React.JSX.Element;
|
|
2334
|
+
|
|
2335
|
+
}
|
|
2336
|
+
declare module '@layerfi/components/components/TableCell/index' {
|
|
2337
|
+
export { TableCell } from '@layerfi/components/components/TableCell/TableCell';
|
|
2338
|
+
|
|
2339
|
+
}
|
|
2340
|
+
declare module '@layerfi/components/components/TableHead/TableHead' {
|
|
2341
|
+
import React from 'react';
|
|
2342
|
+
import { TableHeadProps } from '@layerfi/components/types/table';
|
|
2343
|
+
export const TableHead: ({ children }: TableHeadProps) => React.JSX.Element;
|
|
2344
|
+
|
|
2345
|
+
}
|
|
2346
|
+
declare module '@layerfi/components/components/TableHead/index' {
|
|
2347
|
+
export { TableHead } from '@layerfi/components/components/TableHead/TableHead';
|
|
2348
|
+
|
|
2349
|
+
}
|
|
2350
|
+
declare module '@layerfi/components/components/TableRow/TableRow' {
|
|
2351
|
+
import React from 'react';
|
|
2352
|
+
import { TableRowProps } from '@layerfi/components/types/table';
|
|
2353
|
+
export const TableRow: React.FC<TableRowProps>;
|
|
2354
|
+
|
|
2355
|
+
}
|
|
2356
|
+
declare module '@layerfi/components/components/TableRow/index' {
|
|
2357
|
+
export { TableRow } from '@layerfi/components/components/TableRow/TableRow';
|
|
2358
|
+
|
|
2357
2359
|
}
|
|
2358
2360
|
declare module '@layerfi/components/components/Tabs/Tab' {
|
|
2359
2361
|
import React, { ChangeEvent, ReactNode } from 'react';
|
|
@@ -2397,8 +2399,12 @@ declare module '@layerfi/components/components/Tabs/index' {
|
|
|
2397
2399
|
}
|
|
2398
2400
|
declare module '@layerfi/components/components/Tasks/Tasks' {
|
|
2399
2401
|
import React from 'react';
|
|
2400
|
-
export const Tasks: (
|
|
2401
|
-
|
|
2402
|
+
export const Tasks: ({ tasksHeader }: {
|
|
2403
|
+
tasksHeader?: string | undefined;
|
|
2404
|
+
}) => React.JSX.Element;
|
|
2405
|
+
export const TasksComponent: ({ tasksHeader }: {
|
|
2406
|
+
tasksHeader?: string | undefined;
|
|
2407
|
+
}) => React.JSX.Element;
|
|
2402
2408
|
|
|
2403
2409
|
}
|
|
2404
2410
|
declare module '@layerfi/components/components/Tasks/index' {
|
|
@@ -2407,7 +2413,9 @@ declare module '@layerfi/components/components/Tasks/index' {
|
|
|
2407
2413
|
}
|
|
2408
2414
|
declare module '@layerfi/components/components/TasksHeader/TasksHeader' {
|
|
2409
2415
|
import React from 'react';
|
|
2410
|
-
export const TasksHeader: (
|
|
2416
|
+
export const TasksHeader: ({ tasksHeader, }: {
|
|
2417
|
+
tasksHeader?: string | undefined;
|
|
2418
|
+
}) => React.JSX.Element;
|
|
2411
2419
|
|
|
2412
2420
|
}
|
|
2413
2421
|
declare module '@layerfi/components/components/TasksHeader/index' {
|
|
@@ -2716,8 +2724,12 @@ declare module '@layerfi/components/components/View/View' {
|
|
|
2716
2724
|
children: ReactNode;
|
|
2717
2725
|
title?: string;
|
|
2718
2726
|
headerControls?: ReactNode;
|
|
2727
|
+
type?: 'default' | 'panel';
|
|
2728
|
+
withSidebar?: boolean;
|
|
2729
|
+
sidebar?: ReactNode;
|
|
2730
|
+
viewClassName?: string;
|
|
2719
2731
|
}
|
|
2720
|
-
export const View: ({ title, children, headerControls }: ViewProps) => React.JSX.Element;
|
|
2732
|
+
export const View: ({ title, children, headerControls, type, withSidebar, sidebar, viewClassName, }: ViewProps) => React.JSX.Element;
|
|
2721
2733
|
|
|
2722
2734
|
}
|
|
2723
2735
|
declare module '@layerfi/components/components/View/index' {
|
|
@@ -2739,6 +2751,8 @@ declare module '@layerfi/components/components/ViewHeader/index' {
|
|
|
2739
2751
|
}
|
|
2740
2752
|
declare module '@layerfi/components/config/charts' {
|
|
2741
2753
|
export const INACTIVE_OPACITY_LEVELS: number[];
|
|
2754
|
+
export const DEFAULT_CHART_OPACITY: number[];
|
|
2755
|
+
export const DEFAULT_CHART_COLOR_TYPE: string[];
|
|
2742
2756
|
export const DEFAULT_CHART_COLORS: {
|
|
2743
2757
|
color: string;
|
|
2744
2758
|
opacity: number;
|
|
@@ -3042,22 +3056,19 @@ declare module '@layerfi/components/contexts/StatementOfCashContext/index' {
|
|
|
3042
3056
|
export { StatementOfCashFlowContext } from '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext';
|
|
3043
3057
|
|
|
3044
3058
|
}
|
|
3045
|
-
declare module '@layerfi/components/contexts/
|
|
3059
|
+
declare module '@layerfi/components/contexts/TableContext/TableContext' {
|
|
3046
3060
|
import React, { ReactNode } from 'react';
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
}
|
|
3051
|
-
export const TableExpandContext: React.Context<TableExpandContextType>;
|
|
3052
|
-
interface TableExpandProviderProps {
|
|
3061
|
+
import { TableContextProps } from '@layerfi/components/types/table';
|
|
3062
|
+
export const TableContext: React.Context<TableContextProps>;
|
|
3063
|
+
interface TableProviderProps {
|
|
3053
3064
|
children: ReactNode;
|
|
3054
3065
|
}
|
|
3055
|
-
export const
|
|
3066
|
+
export const TableProvider: React.FC<TableProviderProps>;
|
|
3056
3067
|
export {};
|
|
3057
3068
|
|
|
3058
3069
|
}
|
|
3059
|
-
declare module '@layerfi/components/contexts/
|
|
3060
|
-
export {
|
|
3070
|
+
declare module '@layerfi/components/contexts/TableContext/index' {
|
|
3071
|
+
export { TableContext, TableProvider } from '@layerfi/components/contexts/TableContext/TableContext';
|
|
3061
3072
|
|
|
3062
3073
|
}
|
|
3063
3074
|
declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
|
|
@@ -3207,6 +3218,23 @@ declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts'
|
|
|
3207
3218
|
};
|
|
3208
3219
|
export {};
|
|
3209
3220
|
|
|
3221
|
+
}
|
|
3222
|
+
declare module '@layerfi/components/hooks/useDataSync/index' {
|
|
3223
|
+
export { useDataSync } from '@layerfi/components/hooks/useDataSync/useDataSync';
|
|
3224
|
+
|
|
3225
|
+
}
|
|
3226
|
+
declare module '@layerfi/components/hooks/useDataSync/useDataSync' {
|
|
3227
|
+
import { DataModel } from '@layerfi/components/types/general';
|
|
3228
|
+
type UseDataSync = () => {
|
|
3229
|
+
touch: (model: DataModel) => void;
|
|
3230
|
+
read: (model: DataModel) => void;
|
|
3231
|
+
syncTimestamps: Partial<Record<DataModel, number>>;
|
|
3232
|
+
readTimestamps: Partial<Record<DataModel, number>>;
|
|
3233
|
+
hasBeenTouched: (model: DataModel) => boolean;
|
|
3234
|
+
};
|
|
3235
|
+
export const useDataSync: UseDataSync;
|
|
3236
|
+
export {};
|
|
3237
|
+
|
|
3210
3238
|
}
|
|
3211
3239
|
declare module '@layerfi/components/hooks/useDrawer/index' {
|
|
3212
3240
|
export { useDrawer } from '@layerfi/components/hooks/useDrawer/useDrawer';
|
|
@@ -3480,12 +3508,11 @@ declare module '@layerfi/components/hooks/useTableExpandRow/index' {
|
|
|
3480
3508
|
|
|
3481
3509
|
}
|
|
3482
3510
|
declare module '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow' {
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
INDENTATION: number;
|
|
3511
|
+
export const useTableExpandRow: () => {
|
|
3512
|
+
isOpen: (rowKey: string) => boolean;
|
|
3513
|
+
setIsOpen: (rowKey: string | string[], withoutAllRowsUpdate?: boolean) => void;
|
|
3514
|
+
expandedAllRows: boolean;
|
|
3515
|
+
toggleAllRows: () => void;
|
|
3489
3516
|
};
|
|
3490
3517
|
|
|
3491
3518
|
}
|
|
@@ -3690,13 +3717,6 @@ declare module '@layerfi/components/icons/PlusIcon' {
|
|
|
3690
3717
|
const PlusIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
3691
3718
|
export default PlusIcon;
|
|
3692
3719
|
|
|
3693
|
-
}
|
|
3694
|
-
declare module '@layerfi/components/icons/ProgressIcon' {
|
|
3695
|
-
import * as React from 'react';
|
|
3696
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
3697
|
-
const ProgressIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
3698
|
-
export default ProgressIcon;
|
|
3699
|
-
|
|
3700
3720
|
}
|
|
3701
3721
|
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
3702
3722
|
import * as React from 'react';
|
|
@@ -3786,6 +3806,7 @@ declare module '@layerfi/components/index' {
|
|
|
3786
3806
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
3787
3807
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
3788
3808
|
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
3809
|
+
export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/index';
|
|
3789
3810
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
3790
3811
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
3791
3812
|
export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
|
|
@@ -3809,6 +3830,26 @@ declare module '@layerfi/components/models/APIError' {
|
|
|
3809
3830
|
getAllMessages(): (string | undefined)[] | undefined;
|
|
3810
3831
|
}
|
|
3811
3832
|
|
|
3833
|
+
}
|
|
3834
|
+
declare module '@layerfi/components/models/ErrorHandler' {
|
|
3835
|
+
import { APIError } from '@layerfi/components/models/APIError';
|
|
3836
|
+
type LayerErrorType = 'unauthenticated' | 'api' | 'render';
|
|
3837
|
+
type LayerErrorScope = 'BankTransaction' | 'ChartOfAccounts';
|
|
3838
|
+
export interface LayerError {
|
|
3839
|
+
type?: LayerErrorType;
|
|
3840
|
+
scope?: LayerErrorScope;
|
|
3841
|
+
payload: Error | APIError;
|
|
3842
|
+
}
|
|
3843
|
+
class ErrorHandlerClass {
|
|
3844
|
+
onErrorCallback?: (err: LayerError) => void | undefined;
|
|
3845
|
+
constructor();
|
|
3846
|
+
setOnError(errorFnc: ((err: LayerError) => void) | undefined): void;
|
|
3847
|
+
onError(err: LayerError): void;
|
|
3848
|
+
}
|
|
3849
|
+
export const errorHandler: ErrorHandlerClass;
|
|
3850
|
+
export const reportError: (payload: LayerError) => void;
|
|
3851
|
+
export {};
|
|
3852
|
+
|
|
3812
3853
|
}
|
|
3813
3854
|
declare module '@layerfi/components/models/Money' {
|
|
3814
3855
|
export const centsToDollars: (cents?: number) => string;
|
|
@@ -3835,6 +3876,7 @@ declare module '@layerfi/components/providers/BankTransactionsProvider/index' {
|
|
|
3835
3876
|
}
|
|
3836
3877
|
declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
3837
3878
|
import React, { PropsWithChildren } from 'react';
|
|
3879
|
+
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
3838
3880
|
import { LayerThemeConfig } from '@layerfi/components/types/layer_context';
|
|
3839
3881
|
type LayerEnvironmentConfig = {
|
|
3840
3882
|
url: string;
|
|
@@ -3850,8 +3892,9 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
|
3850
3892
|
environment?: keyof typeof LayerEnvironment;
|
|
3851
3893
|
theme?: LayerThemeConfig;
|
|
3852
3894
|
usePlaidSandbox?: boolean;
|
|
3895
|
+
onError?: (error: LayerError) => void;
|
|
3853
3896
|
};
|
|
3854
|
-
export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, }: PropsWithChildren<Props>) => React.JSX.Element;
|
|
3897
|
+
export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, onError, }: PropsWithChildren<Props>) => React.JSX.Element;
|
|
3855
3898
|
export {};
|
|
3856
3899
|
|
|
3857
3900
|
}
|
|
@@ -3900,6 +3943,7 @@ declare module '@layerfi/components/types/balance_sheet' {
|
|
|
3900
3943
|
export interface BalanceSheet {
|
|
3901
3944
|
business_id: string;
|
|
3902
3945
|
type: 'Balance_Sheet';
|
|
3946
|
+
effective_date: string;
|
|
3903
3947
|
start_date: string;
|
|
3904
3948
|
end_date: string;
|
|
3905
3949
|
assets: LineItem;
|
|
@@ -4049,6 +4093,9 @@ declare module '@layerfi/components/types/categories' {
|
|
|
4049
4093
|
} | {
|
|
4050
4094
|
type: 'AccountId';
|
|
4051
4095
|
id: string;
|
|
4096
|
+
} | {
|
|
4097
|
+
type: 'Exclusion';
|
|
4098
|
+
exclusion_type: string;
|
|
4052
4099
|
};
|
|
4053
4100
|
export type SingleCategoryUpdate = {
|
|
4054
4101
|
type: 'Category';
|
|
@@ -4152,6 +4199,18 @@ declare module '@layerfi/components/types/general' {
|
|
|
4152
4199
|
fileType: string;
|
|
4153
4200
|
}
|
|
4154
4201
|
export type LoadedStatus = 'initial' | 'loading' | 'complete';
|
|
4202
|
+
export enum DataModel {
|
|
4203
|
+
BUSINESS = "BUSINESS",
|
|
4204
|
+
BALANCE_SHEET = "BALANCE_SHEET",
|
|
4205
|
+
BANK_TRANSACTIONS = "BANK_TRANSACTIONS",
|
|
4206
|
+
CHART_OF_ACCOUNTS = "CHART_OF_ACCOUNTS",
|
|
4207
|
+
JOURNAL = "JOURNAL",
|
|
4208
|
+
LEDGER_ACCOUNTS = "LEDGER_ACCOUNTS",
|
|
4209
|
+
LINKED_ACCOUNTS = "LINKED_ACCOUNTS",
|
|
4210
|
+
PROFIT_AND_LOSS = "PROFIT_AND_LOSS",
|
|
4211
|
+
STATEMENT_OF_CASH_FLOWS = "STATEMENT_OF_CASH_FLOWS",
|
|
4212
|
+
TASKS = "TASKS"
|
|
4213
|
+
}
|
|
4155
4214
|
|
|
4156
4215
|
}
|
|
4157
4216
|
declare module '@layerfi/components/types/journal' {
|
|
@@ -4216,8 +4275,10 @@ declare module '@layerfi/components/types/journal' {
|
|
|
4216
4275
|
}
|
|
4217
4276
|
declare module '@layerfi/components/types/layer_context' {
|
|
4218
4277
|
import { ToastProps } from '@layerfi/components/components/Toast/Toast';
|
|
4278
|
+
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
4219
4279
|
import { Business, Category } from '@layerfi/components/types';
|
|
4220
4280
|
import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
|
|
4281
|
+
import { DataModel } from '@layerfi/components/types/general';
|
|
4221
4282
|
export type LayerContextValues = {
|
|
4222
4283
|
auth: ExpiringOAuthResponse;
|
|
4223
4284
|
businessId: string;
|
|
@@ -4242,6 +4303,12 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
4242
4303
|
setOnboardingStep: (value: OnboardingStep) => void;
|
|
4243
4304
|
addToast: (toast: ToastProps) => void;
|
|
4244
4305
|
removeToast: (toast: ToastProps) => void;
|
|
4306
|
+
onError?: (error: LayerError) => void;
|
|
4307
|
+
touch: (model: DataModel) => void;
|
|
4308
|
+
read: (model: DataModel) => void;
|
|
4309
|
+
syncTimestamps: Partial<Record<DataModel, number>>;
|
|
4310
|
+
readTimestamps: Partial<Record<DataModel, number>>;
|
|
4311
|
+
hasBeenTouched: (model: DataModel) => boolean;
|
|
4245
4312
|
};
|
|
4246
4313
|
export interface ColorHSLConfig {
|
|
4247
4314
|
h: string;
|
|
@@ -4537,6 +4604,48 @@ declare module '@layerfi/components/types/statement_of_cash_flow' {
|
|
|
4537
4604
|
cash_at_end_of_period: number;
|
|
4538
4605
|
}
|
|
4539
4606
|
|
|
4607
|
+
}
|
|
4608
|
+
declare module '@layerfi/components/types/table' {
|
|
4609
|
+
import { ReactNode } from 'react';
|
|
4610
|
+
export interface TableContextProps {
|
|
4611
|
+
expandedRows: string[];
|
|
4612
|
+
setExpandedRows: (rowKey: string) => void;
|
|
4613
|
+
expandAllRows: (rowKeys: string[]) => void;
|
|
4614
|
+
expandedAllRows: boolean;
|
|
4615
|
+
setExpandedAllRows: (expanded: boolean) => void;
|
|
4616
|
+
}
|
|
4617
|
+
export interface TableProps {
|
|
4618
|
+
children: ReactNode | ReactNode[];
|
|
4619
|
+
componentName?: string;
|
|
4620
|
+
borderCollapse?: 'collapse' | 'separate';
|
|
4621
|
+
bottomSpacing?: boolean;
|
|
4622
|
+
}
|
|
4623
|
+
export interface TableHeadProps {
|
|
4624
|
+
children: React.ReactNode;
|
|
4625
|
+
}
|
|
4626
|
+
export interface TableBodyProps {
|
|
4627
|
+
children: ReactNode | ReactNode[];
|
|
4628
|
+
}
|
|
4629
|
+
export interface TableRowProps {
|
|
4630
|
+
rowKey: string;
|
|
4631
|
+
children: ReactNode;
|
|
4632
|
+
depth?: number;
|
|
4633
|
+
expandable?: boolean;
|
|
4634
|
+
variant?: 'expandable' | 'default' | 'summation';
|
|
4635
|
+
withDivider?: boolean;
|
|
4636
|
+
withDividerPosition?: 'top' | 'bottom';
|
|
4637
|
+
isExpanded?: boolean;
|
|
4638
|
+
handleExpand?: () => void;
|
|
4639
|
+
isHeadRow?: boolean;
|
|
4640
|
+
}
|
|
4641
|
+
export interface TableCellProps {
|
|
4642
|
+
children?: number | string | ReactNode;
|
|
4643
|
+
isCurrency?: boolean;
|
|
4644
|
+
isHeaderCell?: boolean;
|
|
4645
|
+
primary?: boolean;
|
|
4646
|
+
withExpandIcon?: boolean;
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4540
4649
|
}
|
|
4541
4650
|
declare module '@layerfi/components/types/tasks' {
|
|
4542
4651
|
export interface TaskTypes {
|
|
@@ -4554,8 +4663,9 @@ declare module '@layerfi/components/types/tasks' {
|
|
|
4554
4663
|
created_at: string;
|
|
4555
4664
|
updated_at: string;
|
|
4556
4665
|
}
|
|
4557
|
-
export type TasksStatusType = 'COMPLETED' | 'TODO';
|
|
4666
|
+
export type TasksStatusType = 'COMPLETED' | 'TODO' | 'USER_MARKED_COMPLETED';
|
|
4558
4667
|
export type TasksResponseType = 'FREE_RESPONSE';
|
|
4668
|
+
export function isComplete(taskType: TasksStatusType): boolean;
|
|
4559
4669
|
|
|
4560
4670
|
}
|
|
4561
4671
|
declare module '@layerfi/components/types' {
|
|
@@ -4598,12 +4708,19 @@ declare module '@layerfi/components/utils/bankTransactions' {
|
|
|
4598
4708
|
dateRange?: DateRange | undefined;
|
|
4599
4709
|
}) => number;
|
|
4600
4710
|
export const getCategorizePayload: (category: CategoryOption) => {
|
|
4711
|
+
type: "Exclusion";
|
|
4712
|
+
exclusion_type: string;
|
|
4713
|
+
id?: undefined;
|
|
4714
|
+
stable_name?: undefined;
|
|
4715
|
+
} | {
|
|
4601
4716
|
type: "AccountId";
|
|
4602
4717
|
id: string;
|
|
4718
|
+
exclusion_type?: undefined;
|
|
4603
4719
|
stable_name?: undefined;
|
|
4604
4720
|
} | {
|
|
4605
4721
|
type: "StableName";
|
|
4606
4722
|
stable_name: string;
|
|
4723
|
+
exclusion_type?: undefined;
|
|
4607
4724
|
id?: undefined;
|
|
4608
4725
|
};
|
|
4609
4726
|
|
|
@@ -4711,6 +4828,18 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
|
|
|
4711
4828
|
declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {
|
|
4712
4829
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts';
|
|
4713
4830
|
|
|
4831
|
+
}
|
|
4832
|
+
declare module '@layerfi/components/views/BookkeepingOverview/BookkeepingOverview' {
|
|
4833
|
+
import React from 'react';
|
|
4834
|
+
export interface BookkeepingOverviewProps {
|
|
4835
|
+
title?: string;
|
|
4836
|
+
}
|
|
4837
|
+
export const BookkeepingOverview: ({ title, }: BookkeepingOverviewProps) => React.JSX.Element;
|
|
4838
|
+
|
|
4839
|
+
}
|
|
4840
|
+
declare module '@layerfi/components/views/BookkeepingOverview/index' {
|
|
4841
|
+
export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/BookkeepingOverview';
|
|
4842
|
+
|
|
4714
4843
|
}
|
|
4715
4844
|
declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
|
|
4716
4845
|
import React from 'react';
|