@layerfi/components 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -864,10 +864,11 @@ declare module '@layerfi/components/components/BankTransactionList/Assignment' {
864
864
  declare module '@layerfi/components/components/BankTransactionList/BankTransactionList' {
865
865
  import React from 'react';
866
866
  import { BankTransaction } from '@layerfi/components/types';
867
- import { BankTransactionCTAStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
867
+ import { BankTransactionCTAStringOverrides, BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
868
868
  interface BankTransactionListProps {
869
869
  bankTransactions?: BankTransaction[];
870
870
  editable: boolean;
871
+ mode: BankTransactionsMode;
871
872
  containerWidth: number;
872
873
  removeTransaction: (bt: BankTransaction) => void;
873
874
  showDescriptions?: boolean;
@@ -875,19 +876,20 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
875
876
  hardRefreshPnlOnCategorize?: boolean;
876
877
  stringOverrides?: BankTransactionCTAStringOverrides;
877
878
  }
878
- export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, containerWidth, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, }: BankTransactionListProps) => React.JSX.Element;
879
+ export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, mode, containerWidth, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, }: BankTransactionListProps) => React.JSX.Element;
879
880
  export {};
880
881
 
881
882
  }
882
883
  declare module '@layerfi/components/components/BankTransactionList/BankTransactionListItem' {
883
884
  import React from 'react';
884
885
  import { BankTransaction } from '@layerfi/components/types';
885
- import { BankTransactionCTAStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
886
+ import { BankTransactionCTAStringOverrides, BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
886
887
  type Props = {
887
888
  index: number;
888
889
  dateFormat: string;
889
890
  bankTransaction: BankTransaction;
890
891
  editable: boolean;
892
+ mode: BankTransactionsMode;
891
893
  showDescriptions: boolean;
892
894
  showReceiptUploads: boolean;
893
895
  hardRefreshPnlOnCategorize: boolean;
@@ -895,7 +897,7 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
895
897
  containerWidth?: number;
896
898
  stringOverrides?: BankTransactionCTAStringOverrides;
897
899
  };
898
- export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, containerWidth, removeTransaction, stringOverrides, }: Props) => React.JSX.Element;
900
+ export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, mode, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, containerWidth, removeTransaction, stringOverrides, }: Props) => React.JSX.Element;
899
901
  export {};
900
902
 
901
903
  }
@@ -919,19 +921,22 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
919
921
  declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileList' {
920
922
  import React from 'react';
921
923
  import { BankTransaction } from '@layerfi/components/types';
924
+ import { BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
922
925
  export interface BankTransactionMobileListProps {
923
926
  bankTransactions?: BankTransaction[];
924
927
  editable: boolean;
925
928
  removeTransaction: (bt: BankTransaction) => void;
926
929
  initialLoad?: boolean;
927
930
  hardRefreshPnlOnCategorize?: boolean;
931
+ mode: BankTransactionsMode;
928
932
  }
929
- export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, hardRefreshPnlOnCategorize }: BankTransactionMobileListProps) => React.JSX.Element;
933
+ export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, mode, hardRefreshPnlOnCategorize, }: BankTransactionMobileListProps) => React.JSX.Element;
930
934
 
931
935
  }
932
936
  declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem' {
933
937
  import React from 'react';
934
938
  import { BankTransaction } from '@layerfi/components/types';
939
+ import { BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
935
940
  export interface BankTransactionMobileListItemProps {
936
941
  index: number;
937
942
  bankTransaction: BankTransaction;
@@ -939,13 +944,14 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
939
944
  removeTransaction: (bt: BankTransaction) => void;
940
945
  initialLoad?: boolean;
941
946
  hardRefreshPnlOnCategorize?: boolean;
947
+ mode: BankTransactionsMode;
942
948
  }
943
949
  export enum Purpose {
944
950
  business = "business",
945
951
  personal = "personal",
946
952
  more = "more"
947
953
  }
948
- export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, initialLoad, hardRefreshPnlOnCategorize }: BankTransactionMobileListItemProps) => React.JSX.Element;
954
+ export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, mode, initialLoad, hardRefreshPnlOnCategorize, }: BankTransactionMobileListItemProps) => React.JSX.Element;
949
955
 
950
956
  }
951
957
  declare module '@layerfi/components/components/BankTransactionMobileList/BusinessCategories' {
@@ -1055,7 +1061,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/utils'
1055
1061
  declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
1056
1062
  import React from 'react';
1057
1063
  import { BankTransaction, Category } from '@layerfi/components/types';
1058
- import { BankTransactionCTAStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
1064
+ import { BankTransactionCTAStringOverrides, BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
1059
1065
  type Props = {
1060
1066
  index: number;
1061
1067
  editable: boolean;
@@ -1067,12 +1073,13 @@ declare module '@layerfi/components/components/BankTransactionRow/BankTransactio
1067
1073
  showDescriptions: boolean;
1068
1074
  showReceiptUploads: boolean;
1069
1075
  hardRefreshPnlOnCategorize: boolean;
1076
+ mode: BankTransactionsMode;
1070
1077
  stringOverrides?: BankTransactionCTAStringOverrides;
1071
1078
  };
1072
1079
  export type LastSubmittedForm = 'simple' | 'match' | 'split' | undefined;
1073
1080
  export const extractDescriptionForSplit: (category: Category) => string;
1074
1081
  export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
1075
- export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, }: Props) => React.JSX.Element;
1082
+ export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, mode, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, }: Props) => React.JSX.Element;
1076
1083
  export {};
1077
1084
 
1078
1085
  }
@@ -1107,6 +1114,8 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1107
1114
  import { BankTransactionsTableStringOverrides } from '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable';
1108
1115
  import { BankTransactionsHeaderStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactionsHeader';
1109
1116
  import { MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
1117
+ export type BankTransactionsMode = 'bookkeeping-client' | 'self-serve';
1118
+ export const categorizationEnabled: (mode: BankTransactionsMode) => boolean;
1110
1119
  export interface BankTransactionsStringOverrides {
1111
1120
  bankTransactionCTAs?: BankTransactionCTAStringOverrides;
1112
1121
  transactionsTable?: BankTransactionsTableStringOverrides;
@@ -1119,7 +1128,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1119
1128
  export interface BankTransactionsProps {
1120
1129
  asWidget?: boolean;
1121
1130
  pageSize?: number;
1122
- categorizedOnly?: boolean;
1131
+ mode?: BankTransactionsMode;
1123
1132
  showDescriptions?: boolean;
1124
1133
  showReceiptUploads?: boolean;
1125
1134
  hardRefreshPnlOnCategorize?: boolean;
@@ -1209,7 +1218,7 @@ declare module '@layerfi/components/components/BankTransactionsLoader/index' {
1209
1218
  declare module '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable' {
1210
1219
  import React from 'react';
1211
1220
  import { BankTransaction } from '@layerfi/components/types';
1212
- import { BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
1221
+ import { BankTransactionsMode, BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
1213
1222
  export interface BankTransactionsTableStringOverrides {
1214
1223
  dateColumnHeaderText?: string;
1215
1224
  transactionColumnHeaderText?: string;
@@ -1222,6 +1231,7 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
1222
1231
  bankTransactions?: BankTransaction[];
1223
1232
  editable: boolean;
1224
1233
  categorizeView?: boolean;
1234
+ mode: BankTransactionsMode;
1225
1235
  isLoading?: boolean;
1226
1236
  initialLoad?: boolean;
1227
1237
  containerWidth: number;
@@ -1235,7 +1245,7 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
1235
1245
  lastPage?: boolean;
1236
1246
  onRefresh?: () => void;
1237
1247
  }
1238
- export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, isSyncing, page, lastPage, onRefresh, }: BankTransactionsTableProps) => React.JSX.Element;
1248
+ export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, mode, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, stringOverrides, isSyncing, page, lastPage, onRefresh, }: BankTransactionsTableProps) => React.JSX.Element;
1239
1249
  export {};
1240
1250
 
1241
1251
  }
@@ -1628,7 +1638,6 @@ declare module '@layerfi/components/components/DataState/index' {
1628
1638
  }
1629
1639
  declare module '@layerfi/components/components/DatePicker/DatePicker' {
1630
1640
  import React from 'react';
1631
- import 'react-datepicker/dist/react-datepicker.css';
1632
1641
  interface DatePickerProps {
1633
1642
  mode: 'dayPicker' | 'dayRangePicker' | 'monthPicker' | 'monthRangePicker' | 'timePicker';
1634
1643
  selected: Date | [Date | null, Date | null];
@@ -1763,12 +1772,14 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/APIErr
1763
1772
  declare module '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow' {
1764
1773
  import React from 'react';
1765
1774
  import { BankTransaction } from '@layerfi/components/types';
1775
+ import { BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
1766
1776
  type Props = {
1767
1777
  bankTransaction: BankTransaction;
1768
1778
  isOpen?: boolean;
1769
1779
  close: () => void;
1770
1780
  asListItem?: boolean;
1771
1781
  submitBtnText?: string;
1782
+ mode: BankTransactionsMode;
1772
1783
  containerWidth?: number;
1773
1784
  categorized?: boolean;
1774
1785
  showDescriptions: boolean;
@@ -2243,8 +2254,9 @@ declare module '@layerfi/components/components/MatchForm/MatchForm' {
2243
2254
  selectedMatchId?: string;
2244
2255
  setSelectedMatchId: (val?: string) => void;
2245
2256
  matchFormError?: string;
2257
+ readOnly?: boolean;
2246
2258
  }
2247
- export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, }: MatchFormProps) => React.JSX.Element;
2259
+ export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, readOnly, }: MatchFormProps) => React.JSX.Element;
2248
2260
 
2249
2261
  }
2250
2262
  declare module '@layerfi/components/components/MatchForm/MatchFormMobile' {
@@ -2382,7 +2394,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2382
2394
  revenueLabel?: string | undefined;
2383
2395
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2384
2396
  }) => React.JSX.Element;
2385
- Table: ({ lockExpanded, asContainer, stringOverrides }: {
2397
+ Table: ({ lockExpanded, asContainer, stringOverrides, }: {
2386
2398
  lockExpanded?: boolean | undefined;
2387
2399
  asContainer?: boolean | undefined;
2388
2400
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable").ProfitAndLossTableStringOverrides | undefined;
@@ -2530,9 +2542,10 @@ declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow
2530
2542
  direction?: Direction;
2531
2543
  scope?: SidebarScope;
2532
2544
  setSidebarScope?: (name: SidebarScope) => void;
2545
+ defaultExpanded?: boolean;
2533
2546
  lockExpanded?: boolean;
2534
2547
  };
2535
- export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, scope, setSidebarScope, }: Props) => React.JSX.Element | null;
2548
+ export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, scope, setSidebarScope, defaultExpanded, }: Props) => React.JSX.Element | null;
2536
2549
  export {};
2537
2550
 
2538
2551
  }
@@ -2582,7 +2595,7 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
2582
2595
  asContainer?: boolean;
2583
2596
  stringOverrides?: ProfitAndLossTableStringOverrides;
2584
2597
  };
2585
- export const ProfitAndLossTable: ({ lockExpanded, asContainer, stringOverrides }: Props) => React.JSX.Element;
2598
+ export const ProfitAndLossTable: ({ lockExpanded, asContainer, stringOverrides, }: Props) => React.JSX.Element;
2586
2599
  export {};
2587
2600
 
2588
2601
  }
@@ -5140,7 +5153,7 @@ declare module '@layerfi/components/types/profit_and_loss' {
5140
5153
  totalExpenses: number;
5141
5154
  uncategorizedInflows: number;
5142
5155
  uncategorizedOutflows: number;
5143
- operatingExpensesInverse?: number;
5156
+ totalExpensesInverse?: number;
5144
5157
  uncategorizedOutflowsInverse?: number;
5145
5158
  uncategorized_transactions: number;
5146
5159
  }
@@ -5390,7 +5403,7 @@ declare module '@layerfi/components/views/AccountingOverview/index' {
5390
5403
  }
5391
5404
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts' {
5392
5405
  import React from 'react';
5393
- import { BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
5406
+ import { BankTransactionsMode, BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
5394
5407
  import { MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
5395
5408
  interface BankTransactionsWithLinkedAccountsStringOverrides {
5396
5409
  title?: string;
@@ -5405,12 +5418,12 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
5405
5418
  showBreakConnection?: boolean;
5406
5419
  showDescriptions?: boolean;
5407
5420
  showReceiptUploads?: boolean;
5408
- categorizedOnly?: boolean;
5421
+ mode?: BankTransactionsMode;
5409
5422
  hardRefreshPnlOnCategorize?: boolean;
5410
5423
  mobileComponent?: MobileComponentType;
5411
5424
  stringOverrides?: BankTransactionsWithLinkedAccountsStringOverrides;
5412
5425
  }
5413
- export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, categorizedOnly, hardRefreshPnlOnCategorize, showDescriptions, showReceiptUploads, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5426
+ export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, mode, hardRefreshPnlOnCategorize, showDescriptions, showReceiptUploads, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5414
5427
  export {};
5415
5428
 
5416
5429
  }
@@ -5467,9 +5480,9 @@ declare module '@layerfi/components/views/GeneralLedger/index' {
5467
5480
  declare module '@layerfi/components/views/Reports/Reports' {
5468
5481
  import React, { RefObject } from 'react';
5469
5482
  import { BalanceSheetStringOverrides } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
5470
- import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
5471
5483
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
5472
5484
  import { ProfitAndLossTableStringOverrides } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable';
5485
+ import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
5473
5486
  interface ReportsStringOverrides {
5474
5487
  title?: string;
5475
5488
  downloadButton?: DownloadButtonStringOverrides;
@@ -5483,6 +5496,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
5483
5496
  export interface ReportsProps {
5484
5497
  title?: string;
5485
5498
  stringOverrides?: ReportsStringOverrides;
5499
+ enabledReports?: ReportType[];
5486
5500
  }
5487
5501
  type ReportType = 'profitAndLoss' | 'balanceSheet' | 'statementOfCashFlow';
5488
5502
  export interface ReportsPanelProps {
@@ -5494,7 +5508,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
5494
5508
  downloadButtonText?: string;
5495
5509
  retryButtonText?: string;
5496
5510
  }
5497
- export const Reports: ({ title, stringOverrides }: ReportsProps) => React.JSX.Element;
5511
+ export const Reports: ({ title, stringOverrides, enabledReports, }: ReportsProps) => React.JSX.Element;
5498
5512
  export {};
5499
5513
 
5500
5514
  }