@layerfi/components 0.1.41 → 0.1.43

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
  }
@@ -1763,12 +1773,14 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/APIErr
1763
1773
  declare module '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow' {
1764
1774
  import React from 'react';
1765
1775
  import { BankTransaction } from '@layerfi/components/types';
1776
+ import { BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
1766
1777
  type Props = {
1767
1778
  bankTransaction: BankTransaction;
1768
1779
  isOpen?: boolean;
1769
1780
  close: () => void;
1770
1781
  asListItem?: boolean;
1771
1782
  submitBtnText?: string;
1783
+ mode: BankTransactionsMode;
1772
1784
  containerWidth?: number;
1773
1785
  categorized?: boolean;
1774
1786
  showDescriptions: boolean;
@@ -2243,8 +2255,9 @@ declare module '@layerfi/components/components/MatchForm/MatchForm' {
2243
2255
  selectedMatchId?: string;
2244
2256
  setSelectedMatchId: (val?: string) => void;
2245
2257
  matchFormError?: string;
2258
+ readOnly?: boolean;
2246
2259
  }
2247
- export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, }: MatchFormProps) => React.JSX.Element;
2260
+ export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, readOnly, }: MatchFormProps) => React.JSX.Element;
2248
2261
 
2249
2262
  }
2250
2263
  declare module '@layerfi/components/components/MatchForm/MatchFormMobile' {
@@ -2382,7 +2395,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2382
2395
  revenueLabel?: string | undefined;
2383
2396
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2384
2397
  }) => React.JSX.Element;
2385
- Table: ({ lockExpanded, asContainer, stringOverrides }: {
2398
+ Table: ({ lockExpanded, asContainer, stringOverrides, }: {
2386
2399
  lockExpanded?: boolean | undefined;
2387
2400
  asContainer?: boolean | undefined;
2388
2401
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable").ProfitAndLossTableStringOverrides | undefined;
@@ -2530,9 +2543,10 @@ declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow
2530
2543
  direction?: Direction;
2531
2544
  scope?: SidebarScope;
2532
2545
  setSidebarScope?: (name: SidebarScope) => void;
2546
+ defaultExpanded?: boolean;
2533
2547
  lockExpanded?: boolean;
2534
2548
  };
2535
- export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, scope, setSidebarScope, }: Props) => React.JSX.Element | null;
2549
+ export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, scope, setSidebarScope, defaultExpanded, }: Props) => React.JSX.Element | null;
2536
2550
  export {};
2537
2551
 
2538
2552
  }
@@ -2582,7 +2596,7 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
2582
2596
  asContainer?: boolean;
2583
2597
  stringOverrides?: ProfitAndLossTableStringOverrides;
2584
2598
  };
2585
- export const ProfitAndLossTable: ({ lockExpanded, asContainer, stringOverrides }: Props) => React.JSX.Element;
2599
+ export const ProfitAndLossTable: ({ lockExpanded, asContainer, stringOverrides, }: Props) => React.JSX.Element;
2586
2600
  export {};
2587
2601
 
2588
2602
  }
@@ -5140,7 +5154,7 @@ declare module '@layerfi/components/types/profit_and_loss' {
5140
5154
  totalExpenses: number;
5141
5155
  uncategorizedInflows: number;
5142
5156
  uncategorizedOutflows: number;
5143
- operatingExpensesInverse?: number;
5157
+ totalExpensesInverse?: number;
5144
5158
  uncategorizedOutflowsInverse?: number;
5145
5159
  uncategorized_transactions: number;
5146
5160
  }
@@ -5390,7 +5404,7 @@ declare module '@layerfi/components/views/AccountingOverview/index' {
5390
5404
  }
5391
5405
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts' {
5392
5406
  import React from 'react';
5393
- import { BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
5407
+ import { BankTransactionsMode, BankTransactionsStringOverrides } from '@layerfi/components/components/BankTransactions/BankTransactions';
5394
5408
  import { MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
5395
5409
  interface BankTransactionsWithLinkedAccountsStringOverrides {
5396
5410
  title?: string;
@@ -5405,12 +5419,12 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
5405
5419
  showBreakConnection?: boolean;
5406
5420
  showDescriptions?: boolean;
5407
5421
  showReceiptUploads?: boolean;
5408
- categorizedOnly?: boolean;
5422
+ mode?: BankTransactionsMode;
5409
5423
  hardRefreshPnlOnCategorize?: boolean;
5410
5424
  mobileComponent?: MobileComponentType;
5411
5425
  stringOverrides?: BankTransactionsWithLinkedAccountsStringOverrides;
5412
5426
  }
5413
- export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, categorizedOnly, hardRefreshPnlOnCategorize, showDescriptions, showReceiptUploads, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5427
+ export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, mode, hardRefreshPnlOnCategorize, showDescriptions, showReceiptUploads, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5414
5428
  export {};
5415
5429
 
5416
5430
  }
@@ -5467,9 +5481,9 @@ declare module '@layerfi/components/views/GeneralLedger/index' {
5467
5481
  declare module '@layerfi/components/views/Reports/Reports' {
5468
5482
  import React, { RefObject } from 'react';
5469
5483
  import { BalanceSheetStringOverrides } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
5470
- import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
5471
5484
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
5472
5485
  import { ProfitAndLossTableStringOverrides } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable';
5486
+ import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
5473
5487
  interface ReportsStringOverrides {
5474
5488
  title?: string;
5475
5489
  downloadButton?: DownloadButtonStringOverrides;
@@ -5483,6 +5497,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
5483
5497
  export interface ReportsProps {
5484
5498
  title?: string;
5485
5499
  stringOverrides?: ReportsStringOverrides;
5500
+ enabledReports?: ReportType[];
5486
5501
  }
5487
5502
  type ReportType = 'profitAndLoss' | 'balanceSheet' | 'statementOfCashFlow';
5488
5503
  export interface ReportsPanelProps {
@@ -5494,7 +5509,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
5494
5509
  downloadButtonText?: string;
5495
5510
  retryButtonText?: string;
5496
5511
  }
5497
- export const Reports: ({ title, stringOverrides }: ReportsProps) => React.JSX.Element;
5512
+ export const Reports: ({ title, stringOverrides, enabledReports, }: ReportsProps) => React.JSX.Element;
5498
5513
  export {};
5499
5514
 
5500
5515
  }