@layerfi/components 0.1.38 → 0.1.39

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
@@ -860,8 +860,9 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
860
860
  removeTransaction: (bt: BankTransaction) => void;
861
861
  showDescriptions?: boolean;
862
862
  showReceiptUploads?: boolean;
863
+ hardRefreshPnlOnCategorize?: boolean;
863
864
  }
864
- export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, containerWidth, showDescriptions, showReceiptUploads, }: BankTransactionListProps) => React.JSX.Element;
865
+ export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, containerWidth, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, }: BankTransactionListProps) => React.JSX.Element;
865
866
  export {};
866
867
 
867
868
  }
@@ -875,10 +876,11 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
875
876
  editable: boolean;
876
877
  showDescriptions: boolean;
877
878
  showReceiptUploads: boolean;
879
+ hardRefreshPnlOnCategorize: boolean;
878
880
  removeTransaction: (bt: BankTransaction) => void;
879
881
  containerWidth?: number;
880
882
  };
881
- export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, showDescriptions, showReceiptUploads, containerWidth, removeTransaction, }: Props) => React.JSX.Element;
883
+ export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, containerWidth, removeTransaction, }: Props) => React.JSX.Element;
882
884
  export {};
883
885
 
884
886
  }
@@ -893,8 +895,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
893
895
  interface BankTransactionMobileFormsProps {
894
896
  purpose: Purpose;
895
897
  bankTransaction: BankTransaction;
898
+ hardRefreshPnlOnCategorize?: boolean;
896
899
  }
897
- export const BankTransactionMobileForms: ({ purpose, bankTransaction, }: BankTransactionMobileFormsProps) => React.JSX.Element;
900
+ export const BankTransactionMobileForms: ({ purpose, bankTransaction, hardRefreshPnlOnCategorize }: BankTransactionMobileFormsProps) => React.JSX.Element;
898
901
  export {};
899
902
 
900
903
  }
@@ -906,8 +909,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
906
909
  editable: boolean;
907
910
  removeTransaction: (bt: BankTransaction) => void;
908
911
  initialLoad?: boolean;
912
+ hardRefreshPnlOnCategorize?: boolean;
909
913
  }
910
- export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, }: BankTransactionMobileListProps) => React.JSX.Element;
914
+ export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, hardRefreshPnlOnCategorize }: BankTransactionMobileListProps) => React.JSX.Element;
911
915
 
912
916
  }
913
917
  declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem' {
@@ -919,13 +923,14 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
919
923
  editable: boolean;
920
924
  removeTransaction: (bt: BankTransaction) => void;
921
925
  initialLoad?: boolean;
926
+ hardRefreshPnlOnCategorize?: boolean;
922
927
  }
923
928
  export enum Purpose {
924
929
  business = "business",
925
930
  personal = "personal",
926
931
  more = "more"
927
932
  }
928
- export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, initialLoad, }: BankTransactionMobileListItemProps) => React.JSX.Element;
933
+ export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, initialLoad, hardRefreshPnlOnCategorize }: BankTransactionMobileListItemProps) => React.JSX.Element;
929
934
 
930
935
  }
931
936
  declare module '@layerfi/components/components/BankTransactionMobileList/BusinessCategories' {
@@ -942,16 +947,18 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Busines
942
947
  import { BankTransaction } from '@layerfi/components/types';
943
948
  interface BusinessFormProps {
944
949
  bankTransaction: BankTransaction;
950
+ hardRefreshPnlOnCategorize?: boolean;
945
951
  }
946
- export const BusinessForm: ({ bankTransaction }: BusinessFormProps) => React.JSX.Element;
952
+ export const BusinessForm: ({ bankTransaction, hardRefreshPnlOnCategorize }: BusinessFormProps) => React.JSX.Element;
947
953
  export {};
948
954
 
949
955
  }
950
956
  declare module '@layerfi/components/components/BankTransactionMobileList/MatchForm' {
951
957
  import React from 'react';
952
958
  import { BankTransaction } from '@layerfi/components/types';
953
- export const MatchForm: ({ bankTransaction, }: {
959
+ export const MatchForm: ({ bankTransaction, hardRefreshPnlOnCategorize }: {
954
960
  bankTransaction: BankTransaction;
961
+ hardRefreshPnlOnCategorize?: boolean | undefined;
955
962
  }) => React.JSX.Element;
956
963
 
957
964
  }
@@ -960,8 +967,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Persona
960
967
  import { BankTransaction } from '@layerfi/components/types';
961
968
  interface PersonalFormProps {
962
969
  bankTransaction: BankTransaction;
970
+ hardRefreshPnlOnCategorize?: boolean;
963
971
  }
964
- export const PersonalForm: ({ bankTransaction }: PersonalFormProps) => React.JSX.Element;
972
+ export const PersonalForm: ({ bankTransaction, hardRefreshPnlOnCategorize }: PersonalFormProps) => React.JSX.Element;
965
973
  export {};
966
974
 
967
975
  }
@@ -970,16 +978,18 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
970
978
  import { BankTransaction } from '@layerfi/components/types';
971
979
  interface SplitAndMatchFormProps {
972
980
  bankTransaction: BankTransaction;
981
+ hardRefreshPnlOnCategorize?: boolean;
973
982
  }
974
- export const SplitAndMatchForm: ({ bankTransaction, }: SplitAndMatchFormProps) => React.JSX.Element;
983
+ export const SplitAndMatchForm: ({ bankTransaction, hardRefreshPnlOnCategorize }: SplitAndMatchFormProps) => React.JSX.Element;
975
984
  export {};
976
985
 
977
986
  }
978
987
  declare module '@layerfi/components/components/BankTransactionMobileList/SplitForm' {
979
988
  import React from 'react';
980
989
  import { BankTransaction } from '@layerfi/components/types';
981
- export const SplitForm: ({ bankTransaction, }: {
990
+ export const SplitForm: ({ bankTransaction, hardRefreshPnlOnCategorize }: {
982
991
  bankTransaction: BankTransaction;
992
+ hardRefreshPnlOnCategorize?: boolean | undefined;
983
993
  }) => React.JSX.Element;
984
994
 
985
995
  }
@@ -1040,11 +1050,12 @@ declare module '@layerfi/components/components/BankTransactionRow/BankTransactio
1040
1050
  initialLoad?: boolean;
1041
1051
  showDescriptions: boolean;
1042
1052
  showReceiptUploads: boolean;
1053
+ hardRefreshPnlOnCategorize: boolean;
1043
1054
  };
1044
1055
  export type LastSubmittedForm = 'simple' | 'match' | 'split' | undefined;
1045
1056
  export const extractDescriptionForSplit: (category: Category) => string;
1046
1057
  export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
1047
- export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, }: Props) => React.JSX.Element;
1058
+ export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, }: Props) => React.JSX.Element;
1048
1059
  export {};
1049
1060
 
1050
1061
  }
@@ -1083,6 +1094,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1083
1094
  categorizedOnly?: boolean;
1084
1095
  showDescriptions?: boolean;
1085
1096
  showReceiptUploads?: boolean;
1097
+ hardRefreshPnlOnCategorize?: boolean;
1086
1098
  monthlyView?: boolean;
1087
1099
  categorizeView?: boolean;
1088
1100
  mobileComponent?: MobileComponentType;
@@ -1110,9 +1122,11 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1110
1122
  withDatePicker?: boolean;
1111
1123
  listView?: boolean;
1112
1124
  dateRange?: DateRange;
1125
+ isDataLoading?: boolean;
1126
+ isSyncing?: boolean;
1113
1127
  setDateRange?: (value: DateRange) => void;
1114
1128
  }
1115
- export const BankTransactionsHeader: ({ shiftStickyHeader, asWidget, categorizedOnly, categorizeView, display, onCategorizationDisplayChange, mobileComponent, withDatePicker, listView, dateRange, setDateRange, }: BankTransactionsHeaderProps) => React.JSX.Element;
1129
+ export const BankTransactionsHeader: ({ shiftStickyHeader, asWidget, categorizedOnly, categorizeView, display, onCategorizationDisplayChange, mobileComponent, withDatePicker, listView, dateRange, setDateRange, isSyncing, }: BankTransactionsHeaderProps) => React.JSX.Element;
1116
1130
 
1117
1131
  }
1118
1132
  declare module '@layerfi/components/components/BankTransactions/DataStates' {
@@ -1120,14 +1134,13 @@ declare module '@layerfi/components/components/BankTransactions/DataStates' {
1120
1134
  import { BankTransaction } from '@layerfi/components/types';
1121
1135
  interface DataStatesProps {
1122
1136
  bankTransactions?: BankTransaction[];
1123
- transactionsLoading: boolean;
1124
1137
  isLoading?: boolean;
1125
1138
  isValidating?: boolean;
1126
1139
  error?: unknown;
1127
1140
  refetch: () => void;
1128
1141
  editable: boolean;
1129
1142
  }
1130
- export const DataStates: ({ bankTransactions, transactionsLoading, isLoading, isValidating, error, refetch, editable, }: DataStatesProps) => React.JSX.Element;
1143
+ export const DataStates: ({ bankTransactions, isLoading, isValidating, error, refetch, editable, }: DataStatesProps) => React.JSX.Element;
1131
1144
  export {};
1132
1145
 
1133
1146
  }
@@ -1147,6 +1160,17 @@ declare module '@layerfi/components/components/BankTransactions/utils' {
1147
1160
  export const filterVisibility: (scope: DisplayState, bankTransaction: BankTransaction) => boolean;
1148
1161
  export const isCategorized: (bankTransaction: BankTransaction) => boolean;
1149
1162
 
1163
+ }
1164
+ declare module '@layerfi/components/components/BankTransactionsLoader/BankTransactionsLoader' {
1165
+ import React from 'react';
1166
+ export const BankTransactionsLoader: ({ isLoading, }: {
1167
+ isLoading: boolean;
1168
+ }) => React.JSX.Element;
1169
+
1170
+ }
1171
+ declare module '@layerfi/components/components/BankTransactionsLoader/index' {
1172
+ export { BankTransactionsLoader } from '@layerfi/components/components/BankTransactionsLoader/BankTransactionsLoader';
1173
+
1150
1174
  }
1151
1175
  declare module '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable' {
1152
1176
  import React from 'react';
@@ -1161,8 +1185,13 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
1161
1185
  removeTransaction: (bt: BankTransaction) => void;
1162
1186
  showDescriptions?: boolean;
1163
1187
  showReceiptUploads?: boolean;
1188
+ hardRefreshPnlOnCategorize?: boolean;
1189
+ isSyncing?: boolean;
1190
+ page?: number;
1191
+ lastPage?: boolean;
1192
+ onRefresh?: () => void;
1164
1193
  }
1165
- export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, }: BankTransactionsTableProps) => React.JSX.Element;
1194
+ export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, hardRefreshPnlOnCategorize, isSyncing, page, lastPage, onRefresh, }: BankTransactionsTableProps) => React.JSX.Element;
1166
1195
  export {};
1167
1196
 
1168
1197
  }
@@ -1666,6 +1695,7 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
1666
1695
  categorized?: boolean;
1667
1696
  showDescriptions: boolean;
1668
1697
  showReceiptUploads: boolean;
1698
+ hardRefreshPnlOnCategorize: boolean;
1669
1699
  };
1670
1700
  export type SaveHandle = {
1671
1701
  save: () => void;
@@ -2026,9 +2056,18 @@ declare module '@layerfi/components/components/Loader/Loader' {
2026
2056
  }
2027
2057
  export const Loader: ({ children, size }: LoaderProps) => React.JSX.Element;
2028
2058
 
2059
+ }
2060
+ declare module '@layerfi/components/components/Loader/SmallLoader' {
2061
+ import React from 'react';
2062
+ export interface SmallLoaderProps {
2063
+ size?: number;
2064
+ }
2065
+ export const SmallLoader: ({ size }: SmallLoaderProps) => React.JSX.Element;
2066
+
2029
2067
  }
2030
2068
  declare module '@layerfi/components/components/Loader/index' {
2031
2069
  export { Loader } from '@layerfi/components/components/Loader/Loader';
2070
+ export { SmallLoader } from '@layerfi/components/components/Loader/SmallLoader';
2032
2071
 
2033
2072
  }
2034
2073
  declare module '@layerfi/components/components/MatchForm/MatchForm' {
@@ -2153,7 +2192,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2153
2192
  };
2154
2193
  const ProfitAndLoss: {
2155
2194
  ({ children, tagFilter, reportingBasis, asContainer, }: Props): React.JSX.Element;
2156
- Chart: () => React.JSX.Element;
2195
+ Chart: ({ forceRerenderOnDataChange, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
2157
2196
  Context: React.Context<{
2158
2197
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
2159
2198
  filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
@@ -2213,7 +2252,10 @@ declare module '@layerfi/components/components/ProfitAndLossChart/Indicator' {
2213
2252
  }
2214
2253
  declare module '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart' {
2215
2254
  import React from 'react';
2216
- export const ProfitAndLossChart: () => React.JSX.Element;
2255
+ export interface Props {
2256
+ forceRerenderOnDataChange?: boolean;
2257
+ }
2258
+ export const ProfitAndLossChart: ({ forceRerenderOnDataChange, }: Props) => React.JSX.Element;
2217
2259
 
2218
2260
  }
2219
2261
  declare module '@layerfi/components/components/ProfitAndLossChart/index' {
@@ -2400,6 +2442,25 @@ declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
2400
2442
  declare module '@layerfi/components/components/SkeletonLoader/index' {
2401
2443
  export { SkeletonLoader } from '@layerfi/components/components/SkeletonLoader/SkeletonLoader';
2402
2444
 
2445
+ }
2446
+ declare module '@layerfi/components/components/SkeletonTableLoader/SkeletonTableLoader' {
2447
+ import React from 'react';
2448
+ interface SkeletonTableLoaderProps {
2449
+ rows: number;
2450
+ cols: Array<{
2451
+ colSpan: number;
2452
+ colComponent?: React.ReactNode;
2453
+ }>;
2454
+ height?: number;
2455
+ width?: number;
2456
+ }
2457
+ export const SkeletonTableLoader: ({ rows, cols, height, width, }: SkeletonTableLoaderProps) => React.JSX.Element;
2458
+ export {};
2459
+
2460
+ }
2461
+ declare module '@layerfi/components/components/SkeletonTableLoader/index' {
2462
+ export { SkeletonTableLoader } from '@layerfi/components/components/SkeletonTableLoader/SkeletonTableLoader';
2463
+
2403
2464
  }
2404
2465
  declare module '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow' {
2405
2466
  import React from 'react';
@@ -2441,6 +2502,43 @@ declare module '@layerfi/components/components/StatementOfCashFlowTable/Statemen
2441
2502
  declare module '@layerfi/components/components/StatementOfCashFlowTable/index' {
2442
2503
  export { StatementOfCashFlowTable } from '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable';
2443
2504
 
2505
+ }
2506
+ declare module '@layerfi/components/components/SyncingComponent/SyncingComponent' {
2507
+ import React from 'react';
2508
+ interface SyncingComponentProps {
2509
+ title?: string;
2510
+ message?: string;
2511
+ onRefresh?: () => void;
2512
+ timeSync?: number;
2513
+ inProgress?: boolean;
2514
+ hideContent?: boolean;
2515
+ }
2516
+ /**
2517
+ * SyncingComponent
2518
+ * @param title - Title of the component
2519
+ * @param message - Message of the component
2520
+ * @param onRefresh - Function to refresh the component
2521
+ * @param timeSync - Time to sync in minutes
2522
+ * @param inProgress - Show progress icon besides button
2523
+ * @param hideContent - Hide content of the component
2524
+ *
2525
+ * @example
2526
+ * <SyncingComponent
2527
+ * title='Syncing account data'
2528
+ * message='This may take up to'
2529
+ * onRefresh={() => console.log('refresh')}
2530
+ * timeSync={1440}
2531
+ * inProgress={false}
2532
+ * hideContent={false}
2533
+ * />
2534
+ */
2535
+ export const SyncingComponent: ({ title, message, onRefresh, inProgress, timeSync, hideContent, }: SyncingComponentProps) => React.JSX.Element;
2536
+ export {};
2537
+
2538
+ }
2539
+ declare module '@layerfi/components/components/SyncingComponent/index' {
2540
+ export { SyncingComponent } from '@layerfi/components/components/SyncingComponent/SyncingComponent';
2541
+
2444
2542
  }
2445
2543
  declare module '@layerfi/components/components/Table/Table' {
2446
2544
  import React from 'react';
@@ -2608,9 +2706,10 @@ declare module '@layerfi/components/components/TasksList/index' {
2608
2706
  declare module '@layerfi/components/components/TasksListItem/TasksListItem' {
2609
2707
  import React from 'react';
2610
2708
  import { TaskTypes } from '@layerfi/components/types/tasks';
2611
- export const TasksListItem: ({ task, index, }: {
2709
+ export const TasksListItem: ({ task, goToNextPageIfAllComplete, defaultOpen, }: {
2612
2710
  task: TaskTypes;
2613
- index: number;
2711
+ goToNextPageIfAllComplete: (task: TaskTypes) => void;
2712
+ defaultOpen: boolean;
2614
2713
  }) => React.JSX.Element;
2615
2714
 
2616
2715
  }
@@ -4116,6 +4215,9 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
4116
4215
  apiUrl: string;
4117
4216
  };
4118
4217
  export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
4218
+ export type EventCallbacks = {
4219
+ onTransactionCategorized?: (bankTransactionId: string) => void;
4220
+ };
4119
4221
  export type Props = {
4120
4222
  businessId: string;
4121
4223
  appId?: string;
@@ -4125,8 +4227,9 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
4125
4227
  theme?: LayerThemeConfig;
4126
4228
  usePlaidSandbox?: boolean;
4127
4229
  onError?: (error: LayerError) => void;
4230
+ eventCallbacks?: EventCallbacks;
4128
4231
  };
4129
- export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, onError, }: PropsWithChildren<Props>) => React.JSX.Element;
4232
+ export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, onError, eventCallbacks, }: PropsWithChildren<Props>) => React.JSX.Element;
4130
4233
  export {};
4131
4234
 
4132
4235
  }
@@ -4508,6 +4611,7 @@ declare module '@layerfi/components/types/journal' {
4508
4611
  declare module '@layerfi/components/types/layer_context' {
4509
4612
  import { ToastProps } from '@layerfi/components/components/Toast/Toast';
4510
4613
  import { LayerError } from '@layerfi/components/models/ErrorHandler';
4614
+ import { EventCallbacks } from '@layerfi/components/providers/LayerProvider/LayerProvider';
4511
4615
  import { Business, Category } from '@layerfi/components/types';
4512
4616
  import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
4513
4617
  import { DataModel } from '@layerfi/components/types/general';
@@ -4525,6 +4629,7 @@ declare module '@layerfi/components/types/layer_context' {
4525
4629
  toasts: (ToastProps & {
4526
4630
  isExiting: boolean;
4527
4631
  })[];
4632
+ eventCallbacks?: EventCallbacks;
4528
4633
  };
4529
4634
  export type LayerContextHelpers = {
4530
4635
  getColor: (shade: number) => ColorsPaletteOption | undefined;
@@ -5063,9 +5168,11 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
5063
5168
  showBreakConnection?: boolean;
5064
5169
  showDescriptions?: boolean;
5065
5170
  showReceiptUploads?: boolean;
5171
+ categorizedOnly?: boolean;
5172
+ hardRefreshPnlOnCategorize?: boolean;
5066
5173
  mobileComponent?: MobileComponentType;
5067
5174
  }
5068
- export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5175
+ export const BankTransactionsWithLinkedAccounts: ({ title, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, categorizedOnly, hardRefreshPnlOnCategorize, showDescriptions, showReceiptUploads, mobileComponent, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5069
5176
 
5070
5177
  }
5071
5178
  declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index' {