@layerfi/components 0.1.23 → 0.1.25

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
@@ -47,6 +47,7 @@ declare module '@layerfi/components/api/layer/balance_sheet' {
47
47
  declare module '@layerfi/components/api/layer/bankTransactions' {
48
48
  import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
49
49
  import { BankTransactionMatch, BankTransactionMatchType } from '@layerfi/components/types/bank_transactions';
50
+ import { S3PresignedUrl } from '@layerfi/components/types/general';
50
51
  export type GetBankTransactionsReturn = {
51
52
  data?: BankTransaction[];
52
53
  meta?: Metadata;
@@ -77,6 +78,21 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
77
78
  data: BankTransactionMatch;
78
79
  errors: unknown;
79
80
  }>;
81
+ export interface GetBankTransactionsCsvParams extends Record<string, string | undefined> {
82
+ businessId: string;
83
+ startDate?: string;
84
+ endDate?: string;
85
+ categorized?: 'true' | 'false';
86
+ category?: string;
87
+ month?: string;
88
+ year?: string;
89
+ }
90
+ export const getBankTransactionsCsv: (baseUrl: string, accessToken: string | undefined, options?: {
91
+ params?: Record<string, string | undefined> | undefined;
92
+ } | undefined) => () => Promise<{
93
+ data?: S3PresignedUrl | undefined;
94
+ error?: unknown;
95
+ }>;
80
96
 
81
97
  }
82
98
  declare module '@layerfi/components/api/layer/business' {
@@ -251,6 +267,7 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
251
267
  }
252
268
  declare module '@layerfi/components/api/layer/profit_and_loss' {
253
269
  import { ProfitAndLoss } from '@layerfi/components/types';
270
+ import { S3PresignedUrl } from '@layerfi/components/types/general';
254
271
  import { ProfitAndLossSummaries } from '@layerfi/components/types/profit_and_loss';
255
272
  export const getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
256
273
  params?: Record<string, string | undefined> | undefined;
@@ -264,6 +281,12 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
264
281
  data?: ProfitAndLossSummaries | undefined;
265
282
  error?: unknown;
266
283
  }>;
284
+ export const getProfitAndLossCsv: (baseUrl: string, accessToken: string | undefined, options?: {
285
+ params?: Record<string, string | undefined> | undefined;
286
+ } | undefined) => () => Promise<{
287
+ data?: S3PresignedUrl | undefined;
288
+ error?: unknown;
289
+ }>;
267
290
 
268
291
  }
269
292
  declare module '@layerfi/components/api/layer/tasks' {
@@ -335,6 +358,12 @@ declare module '@layerfi/components/api/layer' {
335
358
  getBankTransactions: (baseUrl: string, accessToken: string | undefined, options?: {
336
359
  params?: import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsParams | undefined;
337
360
  } | undefined) => () => Promise<import("@layerfi/components/api/layer/bankTransactions").GetBankTransactionsReturn>;
361
+ getBankTransactionsCsv: (baseUrl: string, accessToken: string | undefined, options?: {
362
+ params?: Record<string, string | undefined> | undefined;
363
+ } | undefined) => () => Promise<{
364
+ data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
365
+ error?: unknown;
366
+ }>;
338
367
  getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
339
368
  params?: Record<string, string | undefined> | undefined;
340
369
  } | undefined) => () => Promise<{
@@ -375,6 +404,12 @@ declare module '@layerfi/components/api/layer' {
375
404
  data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossSummaries | undefined;
376
405
  error?: unknown;
377
406
  }>;
407
+ getProfitAndLossCsv: (baseUrl: string, accessToken: string | undefined, options?: {
408
+ params?: Record<string, string | undefined> | undefined;
409
+ } | undefined) => () => Promise<{
410
+ data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
411
+ error?: unknown;
412
+ }>;
378
413
  getLinkedAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
379
414
  params?: {
380
415
  businessId: string;
@@ -485,6 +520,28 @@ declare module '@layerfi/components/api/layer' {
485
520
  declare module '@layerfi/components/api/util' {
486
521
  export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
487
522
 
523
+ }
524
+ declare module '@layerfi/components/components/ActionableList/ActionableList' {
525
+ import React from 'react';
526
+ export interface ActionableListOption<T> {
527
+ label: string;
528
+ id: string;
529
+ value: T;
530
+ asLink?: boolean;
531
+ secondary?: boolean;
532
+ }
533
+ interface ActionableListProps<T> {
534
+ options: ActionableListOption<T>[];
535
+ onClick: (item: ActionableListOption<T>) => void;
536
+ selected?: ActionableListOption<T>;
537
+ }
538
+ export const ActionableList: <T>({ options, onClick, selected, }: ActionableListProps<T>) => React.JSX.Element;
539
+ export {};
540
+
541
+ }
542
+ declare module '@layerfi/components/components/ActionableList/index' {
543
+ export { ActionableList, ActionableListOption } from '@layerfi/components/components/ActionableList/ActionableList';
544
+
488
545
  }
489
546
  declare module '@layerfi/components/components/ActionableRow/ActionableRow' {
490
547
  import React, { ReactNode } from 'react';
@@ -588,7 +645,7 @@ declare module '@layerfi/components/components/BalanceSheetRow/index' {
588
645
  export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
589
646
 
590
647
  }
591
- declare module '@layerfi/components/components/BankTransactionListItem/Assignment' {
648
+ declare module '@layerfi/components/components/BankTransactionList/Assignment' {
592
649
  import React from 'react';
593
650
  import { BankTransaction } from '@layerfi/components/types';
594
651
  export interface AssignmentProps {
@@ -597,7 +654,22 @@ declare module '@layerfi/components/components/BankTransactionListItem/Assignmen
597
654
  export const Assignment: ({ bankTransaction }: AssignmentProps) => React.JSX.Element;
598
655
 
599
656
  }
600
- declare module '@layerfi/components/components/BankTransactionListItem/BankTransactionListItem' {
657
+ declare module '@layerfi/components/components/BankTransactionList/BankTransactionList' {
658
+ import React from 'react';
659
+ import { BankTransaction } from '@layerfi/components/types';
660
+ interface BankTransactionListProps {
661
+ bankTransactions?: BankTransaction[];
662
+ editable: boolean;
663
+ containerWidth: number;
664
+ removeTransaction: (id: string) => void;
665
+ showDescriptions?: boolean;
666
+ showReceiptUploads?: boolean;
667
+ }
668
+ export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, containerWidth, showDescriptions, showReceiptUploads, }: BankTransactionListProps) => React.JSX.Element;
669
+ export {};
670
+
671
+ }
672
+ declare module '@layerfi/components/components/BankTransactionList/BankTransactionListItem' {
601
673
  import React from 'react';
602
674
  import { BankTransaction } from '@layerfi/components/types';
603
675
  type Props = {
@@ -614,8 +686,123 @@ declare module '@layerfi/components/components/BankTransactionListItem/BankTrans
614
686
  export {};
615
687
 
616
688
  }
617
- declare module '@layerfi/components/components/BankTransactionListItem/index' {
618
- export { BankTransactionListItem } from '@layerfi/components/components/BankTransactionListItem/BankTransactionListItem';
689
+ declare module '@layerfi/components/components/BankTransactionList/index' {
690
+ export { BankTransactionList } from '@layerfi/components/components/BankTransactionList/BankTransactionList';
691
+
692
+ }
693
+ declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileForms' {
694
+ import React from 'react';
695
+ import { BankTransaction } from '@layerfi/components/types';
696
+ import { Purpose } from '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem';
697
+ interface BankTransactionMobileFormsProps {
698
+ purpose: Purpose;
699
+ bankTransaction: BankTransaction;
700
+ }
701
+ export const BankTransactionMobileForms: ({ purpose, bankTransaction, }: BankTransactionMobileFormsProps) => React.JSX.Element;
702
+ export {};
703
+
704
+ }
705
+ declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileList' {
706
+ import React from 'react';
707
+ import { BankTransaction } from '@layerfi/components/types';
708
+ export interface BankTransactionMobileListProps {
709
+ bankTransactions?: BankTransaction[];
710
+ editable: boolean;
711
+ removeTransaction: (id: string) => void;
712
+ initialLoad?: boolean;
713
+ }
714
+ export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, }: BankTransactionMobileListProps) => React.JSX.Element;
715
+
716
+ }
717
+ declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem' {
718
+ import React from 'react';
719
+ import { BankTransaction } from '@layerfi/components/types';
720
+ export interface BankTransactionMobileListItemProps {
721
+ index: number;
722
+ bankTransaction: BankTransaction;
723
+ editable: boolean;
724
+ removeTransaction: (id: string) => void;
725
+ initialLoad?: boolean;
726
+ }
727
+ export enum Purpose {
728
+ business = "business",
729
+ personal = "personal",
730
+ more = "more"
731
+ }
732
+ export const BankTransactionMobileListItem: ({ index, bankTransaction, editable, initialLoad, }: BankTransactionMobileListItemProps) => React.JSX.Element;
733
+
734
+ }
735
+ declare module '@layerfi/components/components/BankTransactionMobileList/BusinessForm' {
736
+ import React from 'react';
737
+ import { BankTransaction } from '@layerfi/components/types';
738
+ interface BusinessFormProps {
739
+ bankTransaction: BankTransaction;
740
+ }
741
+ export const BusinessForm: ({ bankTransaction }: BusinessFormProps) => React.JSX.Element;
742
+ export {};
743
+
744
+ }
745
+ declare module '@layerfi/components/components/BankTransactionMobileList/MatchForm' {
746
+ import React from 'react';
747
+ import { BankTransaction } from '@layerfi/components/types';
748
+ export const MatchForm: ({ bankTransaction, }: {
749
+ bankTransaction: BankTransaction;
750
+ }) => React.JSX.Element;
751
+
752
+ }
753
+ declare module '@layerfi/components/components/BankTransactionMobileList/PersonalForm' {
754
+ import React from 'react';
755
+ import { BankTransaction } from '@layerfi/components/types';
756
+ interface PersonalFormProps {
757
+ bankTransaction: BankTransaction;
758
+ }
759
+ export const PersonalForm: ({ bankTransaction }: PersonalFormProps) => React.JSX.Element;
760
+ export {};
761
+
762
+ }
763
+ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAndMatchForm' {
764
+ import React from 'react';
765
+ import { BankTransaction } from '@layerfi/components/types';
766
+ interface SplitAndMatchFormProps {
767
+ bankTransaction: BankTransaction;
768
+ }
769
+ export const SplitAndMatchForm: ({ bankTransaction, }: SplitAndMatchFormProps) => React.JSX.Element;
770
+ export {};
771
+
772
+ }
773
+ declare module '@layerfi/components/components/BankTransactionMobileList/SplitForm' {
774
+ import React from 'react';
775
+ import { BankTransaction } from '@layerfi/components/types';
776
+ export const SplitForm: ({ bankTransaction, }: {
777
+ bankTransaction: BankTransaction;
778
+ }) => React.JSX.Element;
779
+
780
+ }
781
+ declare module '@layerfi/components/components/BankTransactionMobileList/constants' {
782
+ export const PersonalCategories: string[];
783
+
784
+ }
785
+ declare module '@layerfi/components/components/BankTransactionMobileList/index' {
786
+ export { BankTransactionMobileList } from '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileList';
787
+
788
+ }
789
+ declare module '@layerfi/components/components/BankTransactionMobileList/utils' {
790
+ import { BankTransaction, Category } from '@layerfi/components/types';
791
+ import { CategoryOptionPayload } from '@layerfi/components/components/CategorySelect/CategorySelect';
792
+ export interface Option {
793
+ label: string;
794
+ id: string;
795
+ value: {
796
+ type: 'CATEGORY' | 'SELECT_CATEGORY' | 'GROUP';
797
+ payload?: CategoryOptionPayload;
798
+ items?: Option[];
799
+ };
800
+ asLink?: boolean;
801
+ secondary?: boolean;
802
+ }
803
+ export const mapCategoryToOption: (category: Category) => Option;
804
+ export const flattenCategories: (categories: Category[]) => Option[];
805
+ export const getAssignedValue: (bankTransaction: BankTransaction) => Option | undefined;
619
806
 
620
807
  }
621
808
  declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
@@ -635,7 +822,7 @@ declare module '@layerfi/components/components/BankTransactionRow/BankTransactio
635
822
  export type LastSubmittedForm = 'simple' | 'match' | 'split' | undefined;
636
823
  export const extractDescriptionForSplit: (category: Category) => string;
637
824
  export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
638
- export const BankTransactionRow: ({ index, dateFormat, bankTransaction, editable, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, }: Props) => React.JSX.Element | null;
825
+ export const BankTransactionRow: ({ index, dateFormat, bankTransaction, editable, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads }: Props) => React.JSX.Element | null;
639
826
  export {};
640
827
 
641
828
  }
@@ -666,25 +853,94 @@ declare module '@layerfi/components/components/BankTransactionRow/index' {
666
853
  }
667
854
  declare module '@layerfi/components/components/BankTransactions/BankTransactions' {
668
855
  import React from 'react';
669
- import { BankTransaction } from '@layerfi/components/types';
670
- export enum DisplayState {
671
- review = "review",
672
- categorized = "categorized"
673
- }
856
+ import { MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
674
857
  export interface BankTransactionsProps {
675
858
  asWidget?: boolean;
676
859
  pageSize?: number;
677
860
  categorizedOnly?: boolean;
678
861
  showDescriptions?: boolean;
679
862
  showReceiptUploads?: boolean;
863
+ monthlyView?: boolean;
864
+ mobileComponent?: MobileComponentType;
680
865
  }
681
- export const filterVisibility: (display: DisplayState, bankTransaction: BankTransaction) => boolean;
682
- export const BankTransactions: ({ asWidget, pageSize, categorizedOnly, showDescriptions, showReceiptUploads, }: BankTransactionsProps) => React.JSX.Element;
866
+ export const BankTransactions: ({ asWidget, pageSize, categorizedOnly, showDescriptions, showReceiptUploads, monthlyView, mobileComponent, }: BankTransactionsProps) => React.JSX.Element;
867
+
868
+ }
869
+ declare module '@layerfi/components/components/BankTransactions/BankTransactionsHeader' {
870
+ import React, { ChangeEvent } from 'react';
871
+ import { DateRange } from '@layerfi/components/types';
872
+ import { DisplayState, MobileComponentType } from '@layerfi/components/components/BankTransactions/constants';
873
+ export interface BankTransactionsHeaderProps {
874
+ shiftStickyHeader: number;
875
+ asWidget?: boolean;
876
+ categorizedOnly?: boolean;
877
+ display: DisplayState;
878
+ onCategorizationDisplayChange: (event: ChangeEvent<HTMLInputElement>) => void;
879
+ mobileComponent?: MobileComponentType;
880
+ withDatePicker?: boolean;
881
+ listView?: boolean;
882
+ dateRange?: DateRange;
883
+ setDateRange?: (value: DateRange) => void;
884
+ }
885
+ export const BankTransactionsHeader: ({ shiftStickyHeader, asWidget, categorizedOnly, display, onCategorizationDisplayChange, mobileComponent, withDatePicker, listView, dateRange, setDateRange, }: BankTransactionsHeaderProps) => React.JSX.Element;
886
+
887
+ }
888
+ declare module '@layerfi/components/components/BankTransactions/DataStates' {
889
+ import React from 'react';
890
+ import { BankTransaction } from '@layerfi/components/types';
891
+ interface DataStatesProps {
892
+ bankTransactions?: BankTransaction[];
893
+ isLoading?: boolean;
894
+ isValidating?: boolean;
895
+ error?: unknown;
896
+ refetch: () => void;
897
+ editable: boolean;
898
+ }
899
+ export const DataStates: ({ bankTransactions, isLoading, isValidating, error, refetch, editable, }: DataStatesProps) => React.JSX.Element;
900
+ export {};
901
+
902
+ }
903
+ declare module '@layerfi/components/components/BankTransactions/constants' {
904
+ import { CategorizationStatus } from '@layerfi/components/types';
905
+ export type MobileComponentType = 'regularList' | 'mobileList';
906
+ export enum DisplayState {
907
+ review = "review",
908
+ categorized = "categorized"
909
+ }
910
+ export const CategorizedCategories: CategorizationStatus[];
911
+ export const ReviewCategories: CategorizationStatus[];
683
912
 
684
913
  }
685
914
  declare module '@layerfi/components/components/BankTransactions/index' {
686
915
  export { BankTransactions } from '@layerfi/components/components/BankTransactions/BankTransactions';
687
916
 
917
+ }
918
+ declare module '@layerfi/components/components/BankTransactions/utils' {
919
+ import { BankTransaction } from '@layerfi/components/types';
920
+ import { DisplayState } from '@layerfi/components/components/BankTransactions/constants';
921
+ export const filterVisibility: (display: DisplayState, bankTransaction: BankTransaction) => boolean;
922
+
923
+ }
924
+ declare module '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable' {
925
+ import React from 'react';
926
+ import { BankTransaction } from '@layerfi/components/types';
927
+ interface BankTransactionsTableProps {
928
+ bankTransactions?: BankTransaction[];
929
+ editable: boolean;
930
+ isLoading?: boolean;
931
+ initialLoad?: boolean;
932
+ containerWidth: number;
933
+ removeTransaction: (id: string) => void;
934
+ showDescriptions?: boolean;
935
+ showReceiptUploads?: boolean;
936
+ }
937
+ export const BankTransactionsTable: ({ editable, isLoading, bankTransactions, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, }: BankTransactionsTableProps) => React.JSX.Element;
938
+ export {};
939
+
940
+ }
941
+ declare module '@layerfi/components/components/BankTransactionsTable/index' {
942
+ export { BankTransactionsTable } from '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable';
943
+
688
944
  }
689
945
  declare module '@layerfi/components/components/Button/BackButton' {
690
946
  import React, { ButtonHTMLAttributes } from 'react';
@@ -708,8 +964,9 @@ declare module '@layerfi/components/components/Button/Button' {
708
964
  iconOnly?: ReactNode;
709
965
  iconAsPrimary?: boolean;
710
966
  justify?: ButtonJustify;
967
+ fullWidth?: boolean;
711
968
  }
712
- export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, justify, ...props }: ButtonProps) => React.JSX.Element;
969
+ export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, justify, fullWidth, ...props }: ButtonProps) => React.JSX.Element;
713
970
 
714
971
  }
715
972
  declare module '@layerfi/components/components/Button/CloseButton' {
@@ -736,6 +993,7 @@ declare module '@layerfi/components/components/Button/RetryButton' {
736
993
  processing?: boolean;
737
994
  disabled?: boolean;
738
995
  error: string;
996
+ fullWidth?: boolean;
739
997
  }
740
998
  export const RetryButton: ({ className, processing, disabled, error, children, ...props }: RetryButtonProps) => React.JSX.Element;
741
999
 
@@ -799,6 +1057,7 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
799
1057
  onChange: (newValue: CategoryOption) => void;
800
1058
  disabled?: boolean;
801
1059
  className?: string;
1060
+ excludeMatches?: boolean;
802
1061
  };
803
1062
  export enum OptionActionType {
804
1063
  CATEGORY = "category",
@@ -823,7 +1082,7 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
823
1082
  }
824
1083
  export const mapCategoryToOption: (category: Category) => CategoryOption;
825
1084
  export const mapSuggestedMatchToOption: (record: SuggestedMatch) => CategoryOption;
826
- export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, }: Props) => React.JSX.Element;
1085
+ export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, excludeMatches, }: Props) => React.JSX.Element;
827
1086
  export {};
828
1087
 
829
1088
  }
@@ -944,6 +1203,7 @@ declare module '@layerfi/components/components/Container/Container' {
944
1203
  className?: string;
945
1204
  asWidget?: boolean;
946
1205
  elevated?: boolean;
1206
+ transparentBg?: boolean;
947
1207
  children: ReactNode;
948
1208
  style?: CSSProperties;
949
1209
  }
@@ -998,11 +1258,12 @@ declare module '@layerfi/components/components/DateMonthPicker/DateMonthPicker'
998
1258
  import { DateRange } from '@layerfi/components/types';
999
1259
  interface DateMonthPickerProps {
1000
1260
  dateRange: DateRange;
1001
- changeDateRange: (dateRange: Partial<DateRange>) => void;
1261
+ changeDateRange: (dateRange: DateRange) => void;
1002
1262
  enableFutureDates?: boolean;
1003
1263
  minDate?: Date;
1264
+ currentDateOption?: boolean;
1004
1265
  }
1005
- export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, }: DateMonthPickerProps) => React.JSX.Element;
1266
+ export const DateMonthPicker: ({ dateRange, changeDateRange, enableFutureDates, minDate, currentDateOption, }: DateMonthPickerProps) => React.JSX.Element;
1006
1267
  export {};
1007
1268
 
1008
1269
  }
@@ -1264,10 +1525,10 @@ declare module '@layerfi/components/components/JournalForm/index' {
1264
1525
  }
1265
1526
  declare module '@layerfi/components/components/JournalRow/JournalRow' {
1266
1527
  import React from 'react';
1267
- import { JournalEntry, JournalEntryLine } from '@layerfi/components/types';
1528
+ import { JournalEntry, JournalEntryLine, JournalEntryLineItem } from '@layerfi/components/types';
1268
1529
  import { View } from '@layerfi/components/components/Journal/index';
1269
1530
  export interface JournalRowProps {
1270
- row: JournalEntry | JournalEntryLine;
1531
+ row: JournalEntry | JournalEntryLine | JournalEntryLineItem;
1271
1532
  index: number;
1272
1533
  initialLoad?: boolean;
1273
1534
  view: View;
@@ -1344,6 +1605,10 @@ declare module '@layerfi/components/components/LedgerAccount/index' {
1344
1605
  }
1345
1606
  declare module '@layerfi/components/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails' {
1346
1607
  import React from 'react';
1608
+ import { LedgerEntrySource } from '@layerfi/components/types/ledger_accounts';
1609
+ export const SourceDetailView: ({ source }: {
1610
+ source: LedgerEntrySource;
1611
+ }) => React.JSX.Element | null;
1347
1612
  export const LedgerAccountEntryDetails: () => React.JSX.Element;
1348
1613
 
1349
1614
  }
@@ -1454,9 +1719,16 @@ declare module '@layerfi/components/components/MatchForm/MatchForm' {
1454
1719
  }
1455
1720
  export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, }: MatchFormProps) => React.JSX.Element;
1456
1721
 
1722
+ }
1723
+ declare module '@layerfi/components/components/MatchForm/MatchFormMobile' {
1724
+ import React from 'react';
1725
+ import { MatchFormProps } from '@layerfi/components/components/MatchForm/MatchForm';
1726
+ export const MatchFormMobile: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, matchFormError, }: MatchFormProps) => React.JSX.Element;
1727
+
1457
1728
  }
1458
1729
  declare module '@layerfi/components/components/MatchForm/index' {
1459
1730
  export { MatchForm } from '@layerfi/components/components/MatchForm/MatchForm';
1731
+ export { MatchFormMobile } from '@layerfi/components/components/MatchForm/MatchFormMobile';
1460
1732
 
1461
1733
  }
1462
1734
  declare module '@layerfi/components/components/NotificationCard/NotificationCard' {
@@ -1796,6 +2068,46 @@ declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
1796
2068
  declare module '@layerfi/components/components/SkeletonLoader/index' {
1797
2069
  export { SkeletonLoader } from '@layerfi/components/components/SkeletonLoader/SkeletonLoader';
1798
2070
 
2071
+ }
2072
+ declare module '@layerfi/components/components/Tabs/Tab' {
2073
+ import React, { ChangeEvent, ReactNode } from 'react';
2074
+ interface TabProps {
2075
+ checked: boolean;
2076
+ label: string;
2077
+ name: string;
2078
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
2079
+ value: string;
2080
+ disabled?: boolean;
2081
+ disabledMessage?: string;
2082
+ leftIcon?: ReactNode;
2083
+ index: number;
2084
+ }
2085
+ export const Tab: ({ checked, label, name, onChange, value, leftIcon, disabled, disabledMessage, index, }: TabProps) => React.JSX.Element;
2086
+ export {};
2087
+
2088
+ }
2089
+ declare module '@layerfi/components/components/Tabs/Tabs' {
2090
+ import React, { ChangeEvent, ReactNode } from 'react';
2091
+ interface Option {
2092
+ label: string;
2093
+ value: string;
2094
+ disabled?: boolean;
2095
+ disabledMessage?: string;
2096
+ leftIcon?: ReactNode;
2097
+ }
2098
+ interface TabsProps {
2099
+ name: string;
2100
+ options: Option[];
2101
+ selected?: Option['value'];
2102
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
2103
+ }
2104
+ export const Tabs: ({ name, options, selected, onChange }: TabsProps) => React.JSX.Element;
2105
+ export {};
2106
+
2107
+ }
2108
+ declare module '@layerfi/components/components/Tabs/index' {
2109
+ export { Tabs } from '@layerfi/components/components/Tabs/Tabs';
2110
+
1799
2111
  }
1800
2112
  declare module '@layerfi/components/components/Tasks/Tasks' {
1801
2113
  import React from 'react';
@@ -1861,19 +2173,32 @@ declare module '@layerfi/components/components/Textarea/Textarea' {
1861
2173
  declare module '@layerfi/components/components/Textarea/index' {
1862
2174
  export { Textarea } from '@layerfi/components/components/Textarea/Textarea';
1863
2175
 
2176
+ }
2177
+ declare module '@layerfi/components/components/Toast/Toast' {
2178
+ import React from 'react';
2179
+ export interface ToastProps {
2180
+ id?: string;
2181
+ content: string;
2182
+ duration?: number;
2183
+ isExiting?: boolean;
2184
+ }
2185
+ export const ToastsContainer: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
2186
+
1864
2187
  }
1865
2188
  declare module '@layerfi/components/components/Toggle/Toggle' {
1866
- import React, { ChangeEvent, ReactNode } from 'react';
2189
+ import React, { CSSProperties, ChangeEvent, ReactNode } from 'react';
1867
2190
  export interface Option {
1868
2191
  label: string;
1869
2192
  value: string;
1870
2193
  disabled?: boolean;
1871
2194
  disabledMessage?: string;
1872
2195
  leftIcon?: ReactNode;
2196
+ style?: CSSProperties;
1873
2197
  }
1874
2198
  export enum ToggleSize {
1875
2199
  medium = "medium",
1876
- small = "small"
2200
+ small = "small",
2201
+ xsmall = "xsmall"
1877
2202
  }
1878
2203
  export interface ToggleProps {
1879
2204
  name: string;
@@ -2139,6 +2464,7 @@ declare module '@layerfi/components/config/charts' {
2139
2464
  }
2140
2465
  declare module '@layerfi/components/config/general' {
2141
2466
  export const DATE_FORMAT = "LLL d, yyyy";
2467
+ export const MONTH_DAY_FORMAT = "LLL d";
2142
2468
  export const TIME_FORMAT = "p";
2143
2469
  export const BREAKPOINTS: {
2144
2470
  TABLET: number;
@@ -2495,7 +2821,6 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
2495
2821
  } | undefined;
2496
2822
  }
2497
2823
  export const useJournal: UseJournal;
2498
- export const flattenEntries: (entries: JournalEntry[]) => JournalEntry[];
2499
2824
  export {};
2500
2825
 
2501
2826
  }
@@ -2701,6 +3026,23 @@ declare module '@layerfi/components/hooks/useTasks/useTasks' {
2701
3026
  export const useTasks: UseTasks;
2702
3027
  export {};
2703
3028
 
3029
+ }
3030
+ declare module '@layerfi/components/hooks/useWindowSize/index' {
3031
+ export { useWindowSize, useSizeClass } from '@layerfi/components/hooks/useWindowSize/useWindowSize';
3032
+
3033
+ }
3034
+ declare module '@layerfi/components/hooks/useWindowSize/useWindowSize' {
3035
+ export const useWindowSize: () => number[];
3036
+ export type SizeClass = 'mobile' | 'tablet' | 'desktop';
3037
+ interface UseSizeClass {
3038
+ value: SizeClass;
3039
+ isMobile: boolean;
3040
+ isTablet: boolean;
3041
+ isDesktop: boolean;
3042
+ }
3043
+ export function useSizeClass(): UseSizeClass;
3044
+ export {};
3045
+
2704
3046
  }
2705
3047
  declare module '@layerfi/components/icons/AlertCircle' {
2706
3048
  import * as React from 'react';
@@ -2775,8 +3117,8 @@ declare module '@layerfi/components/icons/ChevronLeft' {
2775
3117
  declare module '@layerfi/components/icons/ChevronRight' {
2776
3118
  import * as React from 'react';
2777
3119
  import { IconSvgProps } from '@layerfi/components/icons/types';
2778
- const ChavronRight: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
2779
- export default ChavronRight;
3120
+ const ChevronRight: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3121
+ export default ChevronRight;
2780
3122
 
2781
3123
  }
2782
3124
  declare module '@layerfi/components/icons/CloseIcon' {
@@ -2813,6 +3155,13 @@ declare module '@layerfi/components/icons/Folder' {
2813
3155
  const Folder: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
2814
3156
  export default Folder;
2815
3157
 
3158
+ }
3159
+ declare module '@layerfi/components/icons/Inbox' {
3160
+ import * as React from 'react';
3161
+ import { IconSvgProps } from '@layerfi/components/icons/types';
3162
+ const Inbox: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
3163
+ export default Inbox;
3164
+
2816
3165
  }
2817
3166
  declare module '@layerfi/components/icons/InstitutionIcon' {
2818
3167
  import * as React from 'react';
@@ -3287,12 +3636,18 @@ declare module '@layerfi/components/types/general' {
3287
3636
  label: string;
3288
3637
  value: string | number;
3289
3638
  }
3639
+ export interface S3PresignedUrl {
3640
+ type: 'S3_Presigned_Url';
3641
+ presignedUrl: string;
3642
+ fileType: string;
3643
+ }
3290
3644
  export type LoadedStatus = 'initial' | 'loading' | 'complete';
3291
3645
 
3292
3646
  }
3293
3647
  declare module '@layerfi/components/types/journal' {
3294
3648
  import { Account } from '@layerfi/components/types';
3295
3649
  import { Direction } from '@layerfi/components/types/bank_transactions';
3650
+ import { LedgerEntrySource } from '@layerfi/components/types/ledger_accounts';
3296
3651
  export interface JournalEntry {
3297
3652
  id: string;
3298
3653
  business_id: string;
@@ -3303,7 +3658,8 @@ declare module '@layerfi/components/types/journal' {
3303
3658
  entry_at: string;
3304
3659
  reversal_of_id: string | null;
3305
3660
  reversal_id: string | null;
3306
- line_items: any[];
3661
+ line_items: JournalEntryLineItem[];
3662
+ source?: LedgerEntrySource;
3307
3663
  }
3308
3664
  export interface JournalEntryLine {
3309
3665
  id: string;
@@ -3337,6 +3693,7 @@ declare module '@layerfi/components/types/journal' {
3337
3693
 
3338
3694
  }
3339
3695
  declare module '@layerfi/components/types/layer_context' {
3696
+ import { ToastProps } from '@layerfi/components/components/Toast/Toast';
3340
3697
  import { Business, Category } from '@layerfi/components/types';
3341
3698
  import { ExpiringOAuthResponse } from '@layerfi/components/types/authentication';
3342
3699
  export type LayerContextValues = {
@@ -3350,6 +3707,9 @@ declare module '@layerfi/components/types/layer_context' {
3350
3707
  usePlaidSandbox?: boolean;
3351
3708
  onboardingStep?: OnboardingStep;
3352
3709
  environment: string;
3710
+ toasts: (ToastProps & {
3711
+ isExiting: boolean;
3712
+ })[];
3353
3713
  };
3354
3714
  export type LayerContextHelpers = {
3355
3715
  getColor: (shade: number) => ColorsPaletteOption | undefined;
@@ -3357,6 +3717,8 @@ declare module '@layerfi/components/types/layer_context' {
3357
3717
  setDarkColor: (color?: ColorConfig) => void;
3358
3718
  setColors: (colors?: LayerThemeConfigColors) => void;
3359
3719
  setOnboardingStep: (value: OnboardingStep) => void;
3720
+ addToast: (toast: ToastProps) => void;
3721
+ removeToast: (toast: ToastProps) => void;
3360
3722
  };
3361
3723
  export interface ColorHSLConfig {
3362
3724
  h: string;
@@ -3402,7 +3764,10 @@ declare module '@layerfi/components/types/layer_context' {
3402
3764
  setCategories = "LayerContext.setCategories",
3403
3765
  setTheme = "LayerContext.setTheme",
3404
3766
  setOnboardingStep = "LayerContext.setOnboardingStep",
3405
- setColors = "LayerContext.setColors"
3767
+ setColors = "LayerContext.setColors",
3768
+ setToast = "LayerContext.setToast",
3769
+ removeToast = "LayerContext.removeToast",
3770
+ setToastExit = "LayerContext.setToastExit"
3406
3771
  }
3407
3772
  export type LayerContextAction = {
3408
3773
  type: LayerContextActionName.setAuth;
@@ -3434,6 +3799,21 @@ declare module '@layerfi/components/types/layer_context' {
3434
3799
  payload: {
3435
3800
  colors: LayerContextValues['colors'];
3436
3801
  };
3802
+ } | {
3803
+ type: LayerContextActionName.setToast;
3804
+ payload: {
3805
+ toast: ToastProps;
3806
+ };
3807
+ } | {
3808
+ type: LayerContextActionName.removeToast;
3809
+ payload: {
3810
+ toast: ToastProps;
3811
+ };
3812
+ } | {
3813
+ type: LayerContextActionName.setToastExit;
3814
+ payload: {
3815
+ toast: ToastProps;
3816
+ };
3437
3817
  };
3438
3818
 
3439
3819
  }
@@ -3666,6 +4046,13 @@ declare module '@layerfi/components/types' {
3666
4046
  };
3667
4047
  export type ReportingBasis = 'CASH' | 'ACCRUAL';
3668
4048
 
4049
+ }
4050
+ declare module '@layerfi/components/utils/bankTransactions' {
4051
+ import { BankTransaction } from '@layerfi/components/types';
4052
+ export const hasMatch: (bankTransaction?: BankTransaction) => boolean;
4053
+ export const isCredit: ({ direction }: Pick<BankTransaction, 'direction'>) => boolean;
4054
+ export const isAlreadyMatched: (bankTransaction?: BankTransaction) => string | undefined;
4055
+
3669
4056
  }
3670
4057
  declare module '@layerfi/components/utils/business' {
3671
4058
  import { Business } from '@layerfi/components/types';