@layerfi/components 0.1.33 → 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 +2696 -2418
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +275 -144
- package/dist/index.js +2737 -2458
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +736 -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,32 +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
|
-
export const DateInput: ({ selected, onChange, ...props }: {
|
|
1580
|
-
selected?: string | undefined;
|
|
1581
|
-
onChange?: ((date: string) => void) | undefined;
|
|
1582
|
-
dateFormat?: string | undefined;
|
|
1583
|
-
timeIntervals?: number | undefined;
|
|
1584
|
-
timeCaption?: string | undefined;
|
|
1585
|
-
placeholderText?: string | undefined;
|
|
1586
|
-
showTimeSelect?: boolean | undefined;
|
|
1587
|
-
showTimeSelectOnly?: boolean | undefined;
|
|
1588
|
-
}) => React.JSX.Element;
|
|
1589
|
-
|
|
1590
|
-
}
|
|
1591
|
-
declare module '@layerfi/components/components/Input/DateRangeInput' {
|
|
1592
|
-
import React from 'react';
|
|
1593
|
-
export const DateRangeInput: ({ selected, onChange, ...props }: {
|
|
1594
|
-
selected?: Date[] | undefined;
|
|
1595
|
-
onChange?: ((dates: [Date | null, Date | null]) => void) | undefined;
|
|
1596
|
-
dateFormat?: string | undefined;
|
|
1597
|
-
timeIntervals?: number | undefined;
|
|
1598
|
-
timeCaption?: string | undefined;
|
|
1599
|
-
placeholderText?: string | undefined;
|
|
1600
|
-
}) => React.JSX.Element;
|
|
1601
|
-
|
|
1602
1590
|
}
|
|
1603
1591
|
declare module '@layerfi/components/components/Input/FileInput' {
|
|
1604
1592
|
import React from 'react';
|
|
@@ -1668,8 +1656,6 @@ declare module '@layerfi/components/components/Input/index' {
|
|
|
1668
1656
|
export { FileInput } from '@layerfi/components/components/Input/FileInput';
|
|
1669
1657
|
export { Select } from '@layerfi/components/components/Input/Select';
|
|
1670
1658
|
export { InputWithBadge } from '@layerfi/components/components/Input/InputWithBadge';
|
|
1671
|
-
export { DateInput } from '@layerfi/components/components/Input/DateInput';
|
|
1672
|
-
export { DateRangeInput } from '@layerfi/components/components/Input/DateRangeInput';
|
|
1673
1659
|
|
|
1674
1660
|
}
|
|
1675
1661
|
declare module '@layerfi/components/components/Journal/Journal' {
|
|
@@ -2004,36 +1990,14 @@ declare module '@layerfi/components/components/Panel/Panel' {
|
|
|
2004
1990
|
sidebarIsOpen?: boolean;
|
|
2005
1991
|
header?: ReactNode;
|
|
2006
1992
|
parentRef?: RefObject<HTMLDivElement>;
|
|
1993
|
+
defaultSidebarHeight?: boolean;
|
|
2007
1994
|
}
|
|
2008
|
-
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;
|
|
2009
1996
|
|
|
2010
1997
|
}
|
|
2011
1998
|
declare module '@layerfi/components/components/Panel/index' {
|
|
2012
1999
|
export { Panel } from '@layerfi/components/components/Panel/Panel';
|
|
2013
2000
|
|
|
2014
|
-
}
|
|
2015
|
-
declare module '@layerfi/components/components/PanelView/PanelView' {
|
|
2016
|
-
import React, { ReactNode } from 'react';
|
|
2017
|
-
export interface PanelViewProps {
|
|
2018
|
-
children: ReactNode;
|
|
2019
|
-
title?: string;
|
|
2020
|
-
headerControls?: ReactNode;
|
|
2021
|
-
}
|
|
2022
|
-
export const PanelView: ({ title, children, headerControls, }: PanelViewProps) => React.JSX.Element;
|
|
2023
|
-
|
|
2024
|
-
}
|
|
2025
|
-
declare module '@layerfi/components/components/PanelView/index' {
|
|
2026
|
-
export { PanelView } from '@layerfi/components/components/PanelView/PanelView';
|
|
2027
|
-
|
|
2028
|
-
}
|
|
2029
|
-
declare module '@layerfi/components/components/PanelViewHeader/PanelViewHeader' {
|
|
2030
|
-
import React, { ReactNode } from 'react';
|
|
2031
|
-
export interface PanelViewHeaderProps {
|
|
2032
|
-
title?: string;
|
|
2033
|
-
controls?: ReactNode;
|
|
2034
|
-
}
|
|
2035
|
-
export const PanelViewHeader: ({ title, controls }: PanelViewHeaderProps) => React.JSX.Element;
|
|
2036
|
-
|
|
2037
2001
|
}
|
|
2038
2002
|
declare module '@layerfi/components/components/Pill/Pill' {
|
|
2039
2003
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -2166,6 +2130,10 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
|
|
|
2166
2130
|
filters: ProfitAndLossFilters;
|
|
2167
2131
|
sortBy: (scope: Scope, field: string, direction?: SortDirection) => void;
|
|
2168
2132
|
}
|
|
2133
|
+
export const mapColorsToTypes: (data: any[]) => {
|
|
2134
|
+
color: any;
|
|
2135
|
+
opacity: any;
|
|
2136
|
+
}[];
|
|
2169
2137
|
export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, }: DetailedTableProps) => React.JSX.Element;
|
|
2170
2138
|
|
|
2171
2139
|
}
|
|
@@ -2312,25 +2280,6 @@ declare module '@layerfi/components/components/StatementOfCashFlow/constants' {
|
|
|
2312
2280
|
declare module '@layerfi/components/components/StatementOfCashFlow/index' {
|
|
2313
2281
|
export { StatementOfCashFlow } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
|
|
2314
2282
|
|
|
2315
|
-
}
|
|
2316
|
-
declare module '@layerfi/components/components/StatementOfCashFlowRow/StatementOfCashFlowRow' {
|
|
2317
|
-
import React from 'react';
|
|
2318
|
-
import { LineItem } from '@layerfi/components/types';
|
|
2319
|
-
type Props = {
|
|
2320
|
-
depth?: number;
|
|
2321
|
-
maxDepth?: number;
|
|
2322
|
-
lineItem?: LineItem | null;
|
|
2323
|
-
variant?: string;
|
|
2324
|
-
summarize?: boolean;
|
|
2325
|
-
defaultExpanded?: boolean;
|
|
2326
|
-
};
|
|
2327
|
-
export const StatementOfCashFlowRow: ({ lineItem, depth, maxDepth, variant, summarize, defaultExpanded, }: Props) => React.JSX.Element | null;
|
|
2328
|
-
export {};
|
|
2329
|
-
|
|
2330
|
-
}
|
|
2331
|
-
declare module '@layerfi/components/components/StatementOfCashFlowRow/index' {
|
|
2332
|
-
export { StatementOfCashFlowRow } from '@layerfi/components/components/StatementOfCashFlowRow/StatementOfCashFlowRow';
|
|
2333
|
-
|
|
2334
2283
|
}
|
|
2335
2284
|
declare module '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable' {
|
|
2336
2285
|
import React from 'react';
|
|
@@ -2352,6 +2301,61 @@ declare module '@layerfi/components/components/StatementOfCashFlowTable/Statemen
|
|
|
2352
2301
|
declare module '@layerfi/components/components/StatementOfCashFlowTable/index' {
|
|
2353
2302
|
export { StatementOfCashFlowTable } from '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable';
|
|
2354
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
|
+
|
|
2355
2359
|
}
|
|
2356
2360
|
declare module '@layerfi/components/components/Tabs/Tab' {
|
|
2357
2361
|
import React, { ChangeEvent, ReactNode } from 'react';
|
|
@@ -2395,8 +2399,12 @@ declare module '@layerfi/components/components/Tabs/index' {
|
|
|
2395
2399
|
}
|
|
2396
2400
|
declare module '@layerfi/components/components/Tasks/Tasks' {
|
|
2397
2401
|
import React from 'react';
|
|
2398
|
-
export const Tasks: (
|
|
2399
|
-
|
|
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;
|
|
2400
2408
|
|
|
2401
2409
|
}
|
|
2402
2410
|
declare module '@layerfi/components/components/Tasks/index' {
|
|
@@ -2405,7 +2413,9 @@ declare module '@layerfi/components/components/Tasks/index' {
|
|
|
2405
2413
|
}
|
|
2406
2414
|
declare module '@layerfi/components/components/TasksHeader/TasksHeader' {
|
|
2407
2415
|
import React from 'react';
|
|
2408
|
-
export const TasksHeader: (
|
|
2416
|
+
export const TasksHeader: ({ tasksHeader, }: {
|
|
2417
|
+
tasksHeader?: string | undefined;
|
|
2418
|
+
}) => React.JSX.Element;
|
|
2409
2419
|
|
|
2410
2420
|
}
|
|
2411
2421
|
declare module '@layerfi/components/components/TasksHeader/index' {
|
|
@@ -2714,8 +2724,12 @@ declare module '@layerfi/components/components/View/View' {
|
|
|
2714
2724
|
children: ReactNode;
|
|
2715
2725
|
title?: string;
|
|
2716
2726
|
headerControls?: ReactNode;
|
|
2727
|
+
type?: 'default' | 'panel';
|
|
2728
|
+
withSidebar?: boolean;
|
|
2729
|
+
sidebar?: ReactNode;
|
|
2730
|
+
viewClassName?: string;
|
|
2717
2731
|
}
|
|
2718
|
-
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;
|
|
2719
2733
|
|
|
2720
2734
|
}
|
|
2721
2735
|
declare module '@layerfi/components/components/View/index' {
|
|
@@ -2737,6 +2751,8 @@ declare module '@layerfi/components/components/ViewHeader/index' {
|
|
|
2737
2751
|
}
|
|
2738
2752
|
declare module '@layerfi/components/config/charts' {
|
|
2739
2753
|
export const INACTIVE_OPACITY_LEVELS: number[];
|
|
2754
|
+
export const DEFAULT_CHART_OPACITY: number[];
|
|
2755
|
+
export const DEFAULT_CHART_COLOR_TYPE: string[];
|
|
2740
2756
|
export const DEFAULT_CHART_COLORS: {
|
|
2741
2757
|
color: string;
|
|
2742
2758
|
opacity: number;
|
|
@@ -3040,22 +3056,19 @@ declare module '@layerfi/components/contexts/StatementOfCashContext/index' {
|
|
|
3040
3056
|
export { StatementOfCashFlowContext } from '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext';
|
|
3041
3057
|
|
|
3042
3058
|
}
|
|
3043
|
-
declare module '@layerfi/components/contexts/
|
|
3059
|
+
declare module '@layerfi/components/contexts/TableContext/TableContext' {
|
|
3044
3060
|
import React, { ReactNode } from 'react';
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
}
|
|
3049
|
-
export const TableExpandContext: React.Context<TableExpandContextType>;
|
|
3050
|
-
interface TableExpandProviderProps {
|
|
3061
|
+
import { TableContextProps } from '@layerfi/components/types/table';
|
|
3062
|
+
export const TableContext: React.Context<TableContextProps>;
|
|
3063
|
+
interface TableProviderProps {
|
|
3051
3064
|
children: ReactNode;
|
|
3052
3065
|
}
|
|
3053
|
-
export const
|
|
3066
|
+
export const TableProvider: React.FC<TableProviderProps>;
|
|
3054
3067
|
export {};
|
|
3055
3068
|
|
|
3056
3069
|
}
|
|
3057
|
-
declare module '@layerfi/components/contexts/
|
|
3058
|
-
export {
|
|
3070
|
+
declare module '@layerfi/components/contexts/TableContext/index' {
|
|
3071
|
+
export { TableContext, TableProvider } from '@layerfi/components/contexts/TableContext/TableContext';
|
|
3059
3072
|
|
|
3060
3073
|
}
|
|
3061
3074
|
declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
|
|
@@ -3205,6 +3218,23 @@ declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts'
|
|
|
3205
3218
|
};
|
|
3206
3219
|
export {};
|
|
3207
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
|
+
|
|
3208
3238
|
}
|
|
3209
3239
|
declare module '@layerfi/components/hooks/useDrawer/index' {
|
|
3210
3240
|
export { useDrawer } from '@layerfi/components/hooks/useDrawer/useDrawer';
|
|
@@ -3478,12 +3508,11 @@ declare module '@layerfi/components/hooks/useTableExpandRow/index' {
|
|
|
3478
3508
|
|
|
3479
3509
|
}
|
|
3480
3510
|
declare module '@layerfi/components/hooks/useTableExpandRow/useTableExpandRow' {
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
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;
|
|
3487
3516
|
};
|
|
3488
3517
|
|
|
3489
3518
|
}
|
|
@@ -3688,13 +3717,6 @@ declare module '@layerfi/components/icons/PlusIcon' {
|
|
|
3688
3717
|
const PlusIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
3689
3718
|
export default PlusIcon;
|
|
3690
3719
|
|
|
3691
|
-
}
|
|
3692
|
-
declare module '@layerfi/components/icons/ProgressIcon' {
|
|
3693
|
-
import * as React from 'react';
|
|
3694
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
3695
|
-
const ProgressIcon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
3696
|
-
export default ProgressIcon;
|
|
3697
|
-
|
|
3698
3720
|
}
|
|
3699
3721
|
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
3700
3722
|
import * as React from 'react';
|
|
@@ -3784,6 +3806,7 @@ declare module '@layerfi/components/index' {
|
|
|
3784
3806
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
3785
3807
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
3786
3808
|
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
3809
|
+
export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/index';
|
|
3787
3810
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
3788
3811
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
3789
3812
|
export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
|
|
@@ -3807,6 +3830,26 @@ declare module '@layerfi/components/models/APIError' {
|
|
|
3807
3830
|
getAllMessages(): (string | undefined)[] | undefined;
|
|
3808
3831
|
}
|
|
3809
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
|
+
|
|
3810
3853
|
}
|
|
3811
3854
|
declare module '@layerfi/components/models/Money' {
|
|
3812
3855
|
export const centsToDollars: (cents?: number) => string;
|
|
@@ -3833,6 +3876,7 @@ declare module '@layerfi/components/providers/BankTransactionsProvider/index' {
|
|
|
3833
3876
|
}
|
|
3834
3877
|
declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
3835
3878
|
import React, { PropsWithChildren } from 'react';
|
|
3879
|
+
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
3836
3880
|
import { LayerThemeConfig } from '@layerfi/components/types/layer_context';
|
|
3837
3881
|
type LayerEnvironmentConfig = {
|
|
3838
3882
|
url: string;
|
|
@@ -3848,8 +3892,9 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
|
3848
3892
|
environment?: keyof typeof LayerEnvironment;
|
|
3849
3893
|
theme?: LayerThemeConfig;
|
|
3850
3894
|
usePlaidSandbox?: boolean;
|
|
3895
|
+
onError?: (error: LayerError) => void;
|
|
3851
3896
|
};
|
|
3852
|
-
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;
|
|
3853
3898
|
export {};
|
|
3854
3899
|
|
|
3855
3900
|
}
|
|
@@ -3898,6 +3943,7 @@ declare module '@layerfi/components/types/balance_sheet' {
|
|
|
3898
3943
|
export interface BalanceSheet {
|
|
3899
3944
|
business_id: string;
|
|
3900
3945
|
type: 'Balance_Sheet';
|
|
3946
|
+
effective_date: string;
|
|
3901
3947
|
start_date: string;
|
|
3902
3948
|
end_date: string;
|
|
3903
3949
|
assets: LineItem;
|
|
@@ -4047,6 +4093,9 @@ declare module '@layerfi/components/types/categories' {
|
|
|
4047
4093
|
} | {
|
|
4048
4094
|
type: 'AccountId';
|
|
4049
4095
|
id: string;
|
|
4096
|
+
} | {
|
|
4097
|
+
type: 'Exclusion';
|
|
4098
|
+
exclusion_type: string;
|
|
4050
4099
|
};
|
|
4051
4100
|
export type SingleCategoryUpdate = {
|
|
4052
4101
|
type: 'Category';
|
|
@@ -4150,6 +4199,18 @@ declare module '@layerfi/components/types/general' {
|
|
|
4150
4199
|
fileType: string;
|
|
4151
4200
|
}
|
|
4152
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
|
+
}
|
|
4153
4214
|
|
|
4154
4215
|
}
|
|
4155
4216
|
declare module '@layerfi/components/types/journal' {
|
|
@@ -4214,8 +4275,10 @@ declare module '@layerfi/components/types/journal' {
|
|
|
4214
4275
|
}
|
|
4215
4276
|
declare module '@layerfi/components/types/layer_context' {
|
|
4216
4277
|
import { ToastProps } from '@layerfi/components/components/Toast/Toast';
|
|
4278
|
+
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
4217
4279
|
import { Business, Category } from '@layerfi/components/types';
|
|
4218
4280
|
import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
|
|
4281
|
+
import { DataModel } from '@layerfi/components/types/general';
|
|
4219
4282
|
export type LayerContextValues = {
|
|
4220
4283
|
auth: ExpiringOAuthResponse;
|
|
4221
4284
|
businessId: string;
|
|
@@ -4240,6 +4303,12 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
4240
4303
|
setOnboardingStep: (value: OnboardingStep) => void;
|
|
4241
4304
|
addToast: (toast: ToastProps) => void;
|
|
4242
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;
|
|
4243
4312
|
};
|
|
4244
4313
|
export interface ColorHSLConfig {
|
|
4245
4314
|
h: string;
|
|
@@ -4535,6 +4604,48 @@ declare module '@layerfi/components/types/statement_of_cash_flow' {
|
|
|
4535
4604
|
cash_at_end_of_period: number;
|
|
4536
4605
|
}
|
|
4537
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
|
+
|
|
4538
4649
|
}
|
|
4539
4650
|
declare module '@layerfi/components/types/tasks' {
|
|
4540
4651
|
export interface TaskTypes {
|
|
@@ -4552,8 +4663,9 @@ declare module '@layerfi/components/types/tasks' {
|
|
|
4552
4663
|
created_at: string;
|
|
4553
4664
|
updated_at: string;
|
|
4554
4665
|
}
|
|
4555
|
-
export type TasksStatusType = 'COMPLETED' | 'TODO';
|
|
4666
|
+
export type TasksStatusType = 'COMPLETED' | 'TODO' | 'USER_MARKED_COMPLETED';
|
|
4556
4667
|
export type TasksResponseType = 'FREE_RESPONSE';
|
|
4668
|
+
export function isComplete(taskType: TasksStatusType): boolean;
|
|
4557
4669
|
|
|
4558
4670
|
}
|
|
4559
4671
|
declare module '@layerfi/components/types' {
|
|
@@ -4596,12 +4708,19 @@ declare module '@layerfi/components/utils/bankTransactions' {
|
|
|
4596
4708
|
dateRange?: DateRange | undefined;
|
|
4597
4709
|
}) => number;
|
|
4598
4710
|
export const getCategorizePayload: (category: CategoryOption) => {
|
|
4711
|
+
type: "Exclusion";
|
|
4712
|
+
exclusion_type: string;
|
|
4713
|
+
id?: undefined;
|
|
4714
|
+
stable_name?: undefined;
|
|
4715
|
+
} | {
|
|
4599
4716
|
type: "AccountId";
|
|
4600
4717
|
id: string;
|
|
4718
|
+
exclusion_type?: undefined;
|
|
4601
4719
|
stable_name?: undefined;
|
|
4602
4720
|
} | {
|
|
4603
4721
|
type: "StableName";
|
|
4604
4722
|
stable_name: string;
|
|
4723
|
+
exclusion_type?: undefined;
|
|
4605
4724
|
id?: undefined;
|
|
4606
4725
|
};
|
|
4607
4726
|
|
|
@@ -4709,6 +4828,18 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
|
|
|
4709
4828
|
declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {
|
|
4710
4829
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts';
|
|
4711
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
|
+
|
|
4712
4843
|
}
|
|
4713
4844
|
declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
|
|
4714
4845
|
import React from 'react';
|