@layerfi/components 0.1.52 → 0.1.54

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
@@ -62,6 +62,9 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
62
62
  businessId: string;
63
63
  cursor?: string;
64
64
  categorized?: string;
65
+ direction?: 'INFLOW' | 'OUTFLOW';
66
+ startDate?: string;
67
+ endDate?: string;
65
68
  sortOrder?: 'ASC' | 'DESC';
66
69
  sortBy?: string;
67
70
  }
@@ -2307,7 +2310,7 @@ declare module '@layerfi/components/components/Pagination/Pagination' {
2307
2310
  hasMore?: boolean;
2308
2311
  fetchMore?: () => void;
2309
2312
  }
2310
- export const Pagination: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore }: PaginationProps) => React.JSX.Element | undefined;
2313
+ export const Pagination: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore, }: PaginationProps) => React.JSX.Element | undefined;
2311
2314
 
2312
2315
  }
2313
2316
  declare module '@layerfi/components/components/Pagination/index' {
@@ -3347,6 +3350,7 @@ declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransac
3347
3350
  categorize: (id: string, newCategory: import("@layerfi/components/types").CategoryUpdate, notify?: boolean | undefined) => Promise<void>;
3348
3351
  match: (id: string, matchId: string, notify?: boolean | undefined) => Promise<void>;
3349
3352
  updateOneLocal: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3353
+ shouldHideAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => boolean;
3350
3354
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3351
3355
  refetch: () => void;
3352
3356
  setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters> | undefined) => void;
@@ -3367,6 +3371,7 @@ declare module '@layerfi/components/contexts/BankTransactionsContext/BankTransac
3367
3371
  categorize: (id: string, newCategory: import("@layerfi/components/types").CategoryUpdate, notify?: boolean | undefined) => Promise<void>;
3368
3372
  match: (id: string, matchId: string, notify?: boolean | undefined) => Promise<void>;
3369
3373
  updateOneLocal: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3374
+ shouldHideAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => boolean;
3370
3375
  removeAfterCategorize: (bankTransaction: import("@layerfi/components/types").BankTransaction) => void;
3371
3376
  refetch: () => void;
3372
3377
  setFilters: (filters?: Partial<import("@layerfi/components/hooks/useBankTransactions/types").BankTransactionFilters> | undefined) => void;
@@ -3636,6 +3641,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
3636
3641
  categorize: (id: BankTransaction['id'], newCategory: CategoryUpdate, notify?: boolean) => Promise<void>;
3637
3642
  match: (id: BankTransaction['id'], matchId: BankTransaction['id'], notify?: boolean) => Promise<void>;
3638
3643
  updateOneLocal: (bankTransaction: BankTransaction) => void;
3644
+ shouldHideAfterCategorize: (bankTransaction: BankTransaction) => boolean;
3639
3645
  removeAfterCategorize: (bankTransaction: BankTransaction) => void;
3640
3646
  refetch: () => void;
3641
3647
  setFilters: (filters?: Partial<BankTransactionFilters>) => void;
@@ -3650,15 +3656,12 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
3650
3656
 
3651
3657
  }
3652
3658
  declare module '@layerfi/components/hooks/useBankTransactions/utils' {
3653
- import { BankTransaction, DateRange, Direction, DisplayState } from '@layerfi/components/types';
3659
+ import { BankTransaction } from '@layerfi/components/types';
3654
3660
  import { AccountItem, NumericRangeFilter } from '@layerfi/components/hooks/useBankTransactions/types';
3655
3661
  export const collectAccounts: (transactions?: BankTransaction[]) => AccountItem[];
3656
3662
  export const uniqAccountsList: (arr: AccountItem[], track?: Set<unknown>) => AccountItem[];
3657
3663
  export const applyAmountFilter: (data?: BankTransaction[], filter?: NumericRangeFilter) => BankTransaction[] | undefined;
3658
3664
  export const applyAccountFilter: (data?: BankTransaction[], filter?: string[]) => BankTransaction[] | undefined;
3659
- export const applyDirectionFilter: (data?: BankTransaction[], filter?: Direction[]) => BankTransaction[] | undefined;
3660
- export const applyCategorizationStatusFilter: (data?: BankTransaction[], filter?: DisplayState) => BankTransaction[] | undefined;
3661
- export const appplyDateRangeFilter: (data?: BankTransaction[], filter?: Partial<DateRange>) => BankTransaction[] | undefined;
3662
3665
 
3663
3666
  }
3664
3667
  declare module '@layerfi/components/hooks/useChartOfAccounts/index' {
@@ -3729,6 +3732,7 @@ declare module '@layerfi/components/hooks/useDataSync/useDataSync' {
3729
3732
  m: DataModel;
3730
3733
  }>>;
3731
3734
  hasBeenTouched: (cacheKey: string) => boolean;
3735
+ resetCaches: () => void;
3732
3736
  };
3733
3737
  export const useDataSync: UseDataSync;
3734
3738
  export {};
@@ -4348,6 +4352,7 @@ declare module '@layerfi/components/index' {
4348
4352
  export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
4349
4353
  export { useBankTransactionsContext } from '@layerfi/components/contexts/BankTransactionsContext/index';
4350
4354
  export { BankTransactionsProvider } from '@layerfi/components/providers/BankTransactionsProvider/index';
4355
+ export { useDataSync } from '@layerfi/components/hooks/useDataSync/index';
4351
4356
  export { DisplayState, Direction } from '@layerfi/components/types/bank_transactions';
4352
4357
 
4353
4358
  }
@@ -4715,7 +4720,10 @@ declare module '@layerfi/components/types/chart_of_accounts' {
4715
4720
  account_subtype?: string;
4716
4721
  };
4717
4722
  export type EditAccount = {
4718
- stable_name?: string;
4723
+ stable_name?: {
4724
+ type: 'StableName';
4725
+ stable_name: string;
4726
+ };
4719
4727
  name: string;
4720
4728
  normality: Direction;
4721
4729
  parent_id?: {
@@ -4850,6 +4858,7 @@ declare module '@layerfi/components/types/layer_context' {
4850
4858
  read: (model: DataModel, cacheKey: string) => void;
4851
4859
  syncTimestamps: Partial<Record<DataModel, number>>;
4852
4860
  readTimestamps: Partial<Record<DataModel, number>>;
4861
+ expireDataCaches: () => void;
4853
4862
  hasBeenTouched: (cacheKey: string) => boolean;
4854
4863
  };
4855
4864
  export interface ColorHSLConfig {