@layerfi/components 0.1.87 → 0.1.88-alpha.1

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
@@ -153,7 +153,10 @@ declare module '@layerfi/components/api/layer/business' {
153
153
  declare module '@layerfi/components/api/layer/categories' {
154
154
  import { Category } from '@layerfi/components/types';
155
155
  export const getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
156
- params?: Record<string, string | undefined> | undefined;
156
+ params?: {
157
+ businessId: string;
158
+ mode?: "ALL";
159
+ } | undefined;
157
160
  } | undefined) => () => Promise<{
158
161
  data: {
159
162
  type: "Category_List";
@@ -607,7 +610,10 @@ declare module '@layerfi/components/api/layer' {
607
610
  errors: unknown;
608
611
  }>;
609
612
  getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
610
- params?: Record<string, string | undefined> | undefined;
613
+ params?: {
614
+ businessId: string;
615
+ mode?: "ALL";
616
+ } | undefined;
611
617
  } | undefined) => () => Promise<{
612
618
  data: {
613
619
  type: "Category_List";
@@ -1268,7 +1274,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/index'
1268
1274
 
1269
1275
  }
1270
1276
  declare module '@layerfi/components/components/BankTransactionMobileList/useMemoText' {
1271
- import React, { ReactNode } from 'react';
1277
+ import { ReactNode } from 'react';
1272
1278
  import { BankTransaction } from '@layerfi/components/types';
1273
1279
  interface MemoTextProps {
1274
1280
  bankTransaction: BankTransaction;
@@ -1278,19 +1284,19 @@ declare module '@layerfi/components/components/BankTransactionMobileList/useMemo
1278
1284
  children: ReactNode;
1279
1285
  }
1280
1286
  export type MemoTextContextType = ReturnType<typeof useMemoText>;
1281
- export const MemoTextContext: React.Context<{
1287
+ export const MemoTextContext: import("react").Context<{
1282
1288
  memoText: string | undefined;
1283
- setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
1289
+ setMemoText: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
1284
1290
  saveMemoText: () => Promise<void>;
1285
1291
  }>;
1286
1292
  export const useMemoTextContext: () => {
1287
1293
  memoText: string | undefined;
1288
- setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
1294
+ setMemoText: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
1289
1295
  saveMemoText: () => Promise<void>;
1290
1296
  };
1291
1297
  const useMemoText: ({ bankTransaction, isActive }: MemoTextProps) => {
1292
1298
  memoText: string | undefined;
1293
- setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
1299
+ setMemoText: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
1294
1300
  saveMemoText: () => Promise<void>;
1295
1301
  };
1296
1302
  export const MemoTextProvider: ({ children, bankTransaction, isActive, }: MemoTextProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1298,7 +1304,8 @@ declare module '@layerfi/components/components/BankTransactionMobileList/useMemo
1298
1304
 
1299
1305
  }
1300
1306
  declare module '@layerfi/components/components/BankTransactionMobileList/utils' {
1301
- import { BankTransaction, Category } from '@layerfi/components/types';
1307
+ import { BankTransaction } from '@layerfi/components/types';
1308
+ import type { CategoryWithEntries } from '@layerfi/components/types/bank_transactions';
1302
1309
  import { CategoryOptionPayload } from '@layerfi/components/components/CategorySelect/CategorySelect';
1303
1310
  export interface Option {
1304
1311
  label: string;
@@ -1312,13 +1319,12 @@ declare module '@layerfi/components/components/BankTransactionMobileList/utils'
1312
1319
  asLink?: boolean;
1313
1320
  secondary?: boolean;
1314
1321
  }
1315
- export const mapCategoryToOption: (category: Category) => Option;
1316
- export const flattenCategories: (categories: Category[]) => Option[];
1322
+ export const mapCategoryToOption: (category: CategoryWithEntries) => Option;
1323
+ export const flattenCategories: (categories: Array<CategoryWithEntries>) => Option[];
1317
1324
  export const getAssignedValue: (bankTransaction: BankTransaction) => Option | undefined;
1318
1325
 
1319
1326
  }
1320
1327
  declare module '@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts' {
1321
- import React from 'react';
1322
1328
  import { BankTransaction } from '@layerfi/components/types';
1323
1329
  export interface DocumentWithStatus {
1324
1330
  id?: string;
@@ -1342,9 +1348,9 @@ declare module '@layerfi/components/components/BankTransactionReceipts/BankTrans
1342
1348
  export interface BankTransactionReceiptsHandle {
1343
1349
  uploadReceipt: (file: File) => void;
1344
1350
  }
1345
- const BankTransactionReceiptsWithProvider: React.ForwardRefExoticComponent<BankTransactionReceiptsWithProviderProps & React.RefAttributes<BankTransactionReceiptsHandle>>;
1351
+ const BankTransactionReceiptsWithProvider: import("react").ForwardRefExoticComponent<BankTransactionReceiptsWithProviderProps & import("react").RefAttributes<BankTransactionReceiptsHandle>>;
1346
1352
  export { BankTransactionReceiptsWithProvider };
1347
- const BankTransactionReceipts: React.ForwardRefExoticComponent<BankTransactionReceiptsProps & React.RefAttributes<BankTransactionReceiptsHandle>>;
1353
+ const BankTransactionReceipts: import("react").ForwardRefExoticComponent<BankTransactionReceiptsProps & import("react").RefAttributes<BankTransactionReceiptsHandle>>;
1348
1354
  export { BankTransactionReceipts };
1349
1355
 
1350
1356
  }
@@ -1353,8 +1359,9 @@ declare module '@layerfi/components/components/BankTransactionReceipts/index' {
1353
1359
 
1354
1360
  }
1355
1361
  declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
1356
- import { BankTransaction, Category } from '@layerfi/components/types';
1362
+ import { BankTransaction } from '@layerfi/components/types';
1357
1363
  import { BankTransactionCTAStringOverrides, BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
1364
+ import type { CategoryWithEntries } from '@layerfi/components/types/bank_transactions';
1358
1365
  type Props = {
1359
1366
  index: number;
1360
1367
  editable: boolean;
@@ -1371,7 +1378,7 @@ declare module '@layerfi/components/components/BankTransactionRow/BankTransactio
1371
1378
  stringOverrides?: BankTransactionCTAStringOverrides;
1372
1379
  };
1373
1380
  export type LastSubmittedForm = 'simple' | 'match' | 'split' | undefined;
1374
- export const extractDescriptionForSplit: (category: Category) => string;
1381
+ export const extractDescriptionForSplit: (category: CategoryWithEntries) => string;
1375
1382
  export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
1376
1383
  export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, mode, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, showReceiptUploadColumn, showTooltips, stringOverrides, }: Props) => import("react/jsx-runtime").JSX.Element;
1377
1384
  export {};
@@ -1389,10 +1396,10 @@ declare module '@layerfi/components/components/BankTransactionRow/MatchBadge' {
1389
1396
 
1390
1397
  }
1391
1398
  declare module '@layerfi/components/components/BankTransactionRow/SplitTooltipDetails' {
1392
- import { Category } from '@layerfi/components/types';
1399
+ import type { CategoryWithEntries } from '@layerfi/components/types/bank_transactions';
1393
1400
  export const SplitTooltipDetails: ({ classNamePrefix, category, }: {
1394
1401
  classNamePrefix: string;
1395
- category: Category;
1402
+ category: CategoryWithEntries;
1396
1403
  }) => import("react/jsx-runtime").JSX.Element | undefined;
1397
1404
 
1398
1405
  }
@@ -1621,7 +1628,7 @@ declare module '@layerfi/components/components/Button/ExpandCollapseButton' {
1621
1628
 
1622
1629
  }
1623
1630
  declare module '@layerfi/components/components/Button/IconButton' {
1624
- import React, { ButtonHTMLAttributes, ReactNode } from 'react';
1631
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
1625
1632
  export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1626
1633
  icon: ReactNode;
1627
1634
  active?: boolean;
@@ -1684,7 +1691,6 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
1684
1691
 
1685
1692
  }
1686
1693
  declare module '@layerfi/components/components/Button/SwitchButton' {
1687
- import React from 'react';
1688
1694
  interface SwitchButtonProps {
1689
1695
  children: string;
1690
1696
  labelPosition?: 'left' | 'right';
@@ -1733,8 +1739,7 @@ declare module '@layerfi/components/components/Card/index' {
1733
1739
  }
1734
1740
  declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1735
1741
  import { BankTransaction, Category } from '@layerfi/components/types';
1736
- import { SuggestedMatch } from '@layerfi/components/types/bank_transactions';
1737
- import { CategoryEntry } from '@layerfi/components/types/categories';
1742
+ import { SuggestedMatch, type CategoryWithEntries } from '@layerfi/components/types/bank_transactions';
1738
1743
  type Props = {
1739
1744
  name?: string;
1740
1745
  bankTransaction: BankTransaction;
@@ -1760,16 +1765,18 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1760
1765
  amount?: number;
1761
1766
  type?: string;
1762
1767
  stable_name?: string;
1763
- entries?: CategoryEntry[];
1764
- subCategories?: Category[];
1768
+ entries?: CategoryWithEntries['entries'];
1769
+ subCategories: Category[] | null;
1765
1770
  }
1766
1771
  export interface CategoryOption {
1767
1772
  type: string;
1768
1773
  disabled?: boolean;
1769
1774
  payload: CategoryOptionPayload;
1770
1775
  }
1771
- export const mapCategoryToOption: (category: Category) => CategoryOption;
1772
- export const mapCategoryToExclusionOption: (category: Category) => CategoryOption;
1776
+ export const mapCategoryToOption: (category: CategoryWithEntries) => CategoryOption;
1777
+ export const mapCategoryToExclusionOption: (category: CategoryWithEntries & {
1778
+ type: "ExclusionNested";
1779
+ }) => CategoryOption;
1773
1780
  export const mapSuggestedMatchToOption: (record: SuggestedMatch) => CategoryOption;
1774
1781
  export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, showTooltips, excludeMatches, asDrawer, }: Props) => import("react/jsx-runtime").JSX.Element;
1775
1782
  export {};
@@ -1964,7 +1971,7 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/index' {
1964
1971
 
1965
1972
  }
1966
1973
  declare module '@layerfi/components/components/Container/Container' {
1967
- import React, { CSSProperties, ReactNode } from 'react';
1974
+ import { CSSProperties, ReactNode } from 'react';
1968
1975
  export interface ContainerProps {
1969
1976
  name: string;
1970
1977
  className?: string;
@@ -1974,7 +1981,7 @@ declare module '@layerfi/components/components/Container/Container' {
1974
1981
  children: ReactNode;
1975
1982
  style?: CSSProperties;
1976
1983
  }
1977
- const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
1984
+ const Container: import("react").ForwardRefExoticComponent<ContainerProps & import("react").RefAttributes<HTMLDivElement>>;
1978
1985
  export { Container };
1979
1986
 
1980
1987
  }
@@ -1983,7 +1990,7 @@ declare module '@layerfi/components/components/Container/Header' {
1983
1990
  * @deprecated- use components/Header instead.
1984
1991
  * This has been kept to not introduce breaking changes.
1985
1992
  */
1986
- import React, { CSSProperties, ReactNode } from 'react';
1993
+ import { CSSProperties, ReactNode } from 'react';
1987
1994
  export enum HeaderLayout {
1988
1995
  DEFAULT = "default",
1989
1996
  NEXT_LINE_ACTIONS = "next-line-actions"
@@ -1994,7 +2001,7 @@ declare module '@layerfi/components/components/Container/Header' {
1994
2001
  children: ReactNode;
1995
2002
  layout?: HeaderLayout;
1996
2003
  }
1997
- const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLElement>>;
2004
+ const Header: import("react").ForwardRefExoticComponent<HeaderProps & import("react").RefAttributes<HTMLElement>>;
1998
2005
  export { Header };
1999
2006
 
2000
2007
  }
@@ -2131,7 +2138,6 @@ declare module '@layerfi/components/components/DetailsList/index' {
2131
2138
 
2132
2139
  }
2133
2140
  declare module '@layerfi/components/components/Drawer/Drawer' {
2134
- import React from 'react';
2135
2141
  export const Drawer: ({ isOpen, onClose, children, }: {
2136
2142
  isOpen: boolean;
2137
2143
  onClose: () => void;
@@ -2144,7 +2150,7 @@ declare module '@layerfi/components/components/Drawer/index' {
2144
2150
 
2145
2151
  }
2146
2152
  declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundary' {
2147
- import React, { ErrorInfo, Component, type PropsWithChildren } from 'react';
2153
+ import { ErrorInfo, Component, type PropsWithChildren } from 'react';
2148
2154
  import { LayerError } from '@layerfi/components/models/ErrorHandler';
2149
2155
  interface ErrorBoundaryProps {
2150
2156
  onError?: (error: LayerError) => void;
@@ -2159,7 +2165,7 @@ declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundary' {
2159
2165
  hasError: boolean;
2160
2166
  };
2161
2167
  componentDidCatch(error: Error, _info: ErrorInfo): void;
2162
- render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
2168
+ render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
2163
2169
  }
2164
2170
  export {};
2165
2171
 
@@ -2183,7 +2189,6 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/APIErr
2183
2189
 
2184
2190
  }
2185
2191
  declare module '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow' {
2186
- import React from 'react';
2187
2192
  import { BankTransaction } from '@layerfi/components/types';
2188
2193
  import { BankTransactionsMode } from '@layerfi/components/components/BankTransactions/BankTransactions';
2189
2194
  type Props = {
@@ -2211,7 +2216,7 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
2211
2216
  date?: string;
2212
2217
  error?: string;
2213
2218
  }
2214
- const ExpandedBankTransactionRow: React.ForwardRefExoticComponent<Props & React.RefAttributes<SaveHandle>>;
2219
+ const ExpandedBankTransactionRow: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<SaveHandle>>;
2215
2220
  export { ExpandedBankTransactionRow };
2216
2221
 
2217
2222
  }
@@ -2220,7 +2225,6 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/index'
2220
2225
 
2221
2226
  }
2222
2227
  declare module '@layerfi/components/components/FileThumb/FileThumb' {
2223
- import React from 'react';
2224
2228
  type FileThumbProps = {
2225
2229
  url?: string;
2226
2230
  type?: string;
@@ -2252,7 +2256,7 @@ declare module '@layerfi/components/components/GlobalWidgets/index' {
2252
2256
 
2253
2257
  }
2254
2258
  declare module '@layerfi/components/components/Header/Header' {
2255
- import React, { CSSProperties, ReactNode } from 'react';
2259
+ import { CSSProperties, ReactNode } from 'react';
2256
2260
  export interface HeaderProps {
2257
2261
  className?: string;
2258
2262
  style?: CSSProperties;
@@ -2261,7 +2265,7 @@ declare module '@layerfi/components/components/Header/Header' {
2261
2265
  rounded?: boolean;
2262
2266
  children: ReactNode;
2263
2267
  }
2264
- const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HTMLDivElement | HTMLElement>>;
2268
+ const Header: import("react").ForwardRefExoticComponent<HeaderProps & import("react").RefAttributes<HTMLDivElement | HTMLElement>>;
2265
2269
  export { Header };
2266
2270
 
2267
2271
  }
@@ -2335,7 +2339,6 @@ declare module '@layerfi/components/components/Input/AmountInput' {
2335
2339
 
2336
2340
  }
2337
2341
  declare module '@layerfi/components/components/Input/FileInput' {
2338
- import React from 'react';
2339
2342
  export interface FileInputProps {
2340
2343
  text?: string;
2341
2344
  onUpload?: (files: File[]) => void;
@@ -2371,7 +2374,7 @@ declare module '@layerfi/components/components/Input/InputGroup' {
2371
2374
 
2372
2375
  }
2373
2376
  declare module '@layerfi/components/components/Input/InputWithBadge' {
2374
- import React, { HTMLProps } from 'react';
2377
+ import { HTMLProps } from 'react';
2375
2378
  import { BadgeVariant } from '@layerfi/components/components/Badge/index';
2376
2379
  export interface InputWithBadgeProps extends HTMLProps<HTMLInputElement> {
2377
2380
  isInvalid?: boolean;
@@ -2511,7 +2514,7 @@ declare module '@layerfi/components/components/JournalForm/JournalFormEntryLines
2511
2514
  entrylineItems: JournalEntryLineItem[];
2512
2515
  addEntryLine: (direction: Direction) => void;
2513
2516
  removeEntryLine: (index: number) => void;
2514
- changeFormData: (name: string, value: string | BaseSelectOption | number | undefined, lineItemIndex: number, accounts?: LedgerAccountBalance[] | undefined) => void;
2517
+ changeFormData: (name: string, value: string | BaseSelectOption | number | undefined, lineItemIndex: number, accounts?: LedgerAccountBalance[]) => void;
2515
2518
  sendingForm: boolean;
2516
2519
  config: JournalConfig;
2517
2520
  }) => import("react/jsx-runtime").JSX.Element;
@@ -3494,12 +3497,12 @@ declare module '@layerfi/components/components/Quickbooks/index' {
3494
3497
 
3495
3498
  }
3496
3499
  declare module '@layerfi/components/components/RadioButtonGroup/RadioButton' {
3497
- import React from 'react';
3500
+ import type { ChangeEvent } from 'react';
3498
3501
  type Props = {
3499
3502
  checked: boolean;
3500
3503
  label: string;
3501
3504
  name: string;
3502
- onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
3505
+ onChange: (event: ChangeEvent<HTMLInputElement>) => void;
3503
3506
  value: string;
3504
3507
  disabled?: boolean;
3505
3508
  size: 'small' | 'large';
@@ -3509,7 +3512,6 @@ declare module '@layerfi/components/components/RadioButtonGroup/RadioButton' {
3509
3512
 
3510
3513
  }
3511
3514
  declare module '@layerfi/components/components/RadioButtonGroup/RadioButtonGroup' {
3512
- import React from 'react';
3513
3515
  export type RadioButtonLabel = {
3514
3516
  label: string;
3515
3517
  value: string;
@@ -3555,7 +3557,6 @@ declare module '@layerfi/components/components/SkeletonLoader/index' {
3555
3557
 
3556
3558
  }
3557
3559
  declare module '@layerfi/components/components/SkeletonTableLoader/SkeletonTableLoader' {
3558
- import React from 'react';
3559
3560
  interface SkeletonTableLoaderProps {
3560
3561
  rows: number;
3561
3562
  cols: Array<{
@@ -3749,7 +3750,6 @@ declare module '@layerfi/components/components/TableHead/index' {
3749
3750
 
3750
3751
  }
3751
3752
  declare module '@layerfi/components/components/TableRow/TableRow' {
3752
- import React from 'react';
3753
3753
  import { TableRowProps } from '@layerfi/components/types/table';
3754
3754
  export const TableRow: React.FC<TableRowProps>;
3755
3755
 
@@ -3799,10 +3799,10 @@ declare module '@layerfi/components/components/Tabs/index' {
3799
3799
 
3800
3800
  }
3801
3801
  declare module '@layerfi/components/components/Tasks/Tasks' {
3802
- import React, { ReactNode } from 'react';
3802
+ import { ReactNode } from 'react';
3803
3803
  import { useTasks } from '@layerfi/components/hooks/useTasks/index';
3804
3804
  export type UseTasksContextType = ReturnType<typeof useTasks>;
3805
- export const UseTasksContext: React.Context<{
3805
+ export const UseTasksContext: import("react").Context<{
3806
3806
  data?: import("@layerfi/components/types/tasks").Task[];
3807
3807
  monthlyData?: import("@layerfi/components/types/tasks").TasksMonthly[];
3808
3808
  isLoading?: boolean;
@@ -4014,7 +4014,7 @@ declare module '@layerfi/components/components/Toggle/index' {
4014
4014
 
4015
4015
  }
4016
4016
  declare module '@layerfi/components/components/Tooltip/Tooltip' {
4017
- import React, { ReactNode, HTMLProps } from 'react';
4017
+ import { ReactNode, HTMLProps } from 'react';
4018
4018
  import type { Placement } from '@floating-ui/react';
4019
4019
  export interface TooltipOptions {
4020
4020
  initialOpen?: boolean;
@@ -4030,11 +4030,11 @@ declare module '@layerfi/components/components/Tooltip/Tooltip' {
4030
4030
  export const Tooltip: ({ children, ...options }: {
4031
4031
  children: ReactNode;
4032
4032
  } & TooltipOptions) => import("react/jsx-runtime").JSX.Element;
4033
- export const TooltipTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
4033
+ export const TooltipTrigger: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLElement> & {
4034
4034
  asChild?: boolean;
4035
- }, "ref"> & React.RefAttributes<HTMLElement>>;
4035
+ }, "ref"> & import("react").RefAttributes<HTMLElement>>;
4036
4036
  type TooltipContentProps = Omit<HTMLProps<HTMLDivElement>, 'style'>;
4037
- export const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
4037
+ export const TooltipContent: import("react").ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
4038
4038
  export {};
4039
4039
 
4040
4040
  }
@@ -4044,10 +4044,9 @@ declare module '@layerfi/components/components/Tooltip/index' {
4044
4044
 
4045
4045
  }
4046
4046
  declare module '@layerfi/components/components/Tooltip/useTooltip' {
4047
- import React from 'react';
4048
4047
  import { TooltipOptions } from '@layerfi/components/components/Tooltip/Tooltip';
4049
4048
  export type ContextType = ReturnType<typeof useTooltip> | null;
4050
- export const TooltipContext: React.Context<ContextType>;
4049
+ export const TooltipContext: import("react").Context<ContextType>;
4051
4050
  export const useTooltipContext: () => {
4052
4051
  placement: import("@floating-ui/utils").Placement;
4053
4052
  strategy: import("@floating-ui/utils").Strategy;
@@ -4058,7 +4057,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4058
4057
  update: () => void;
4059
4058
  floatingStyles: React.CSSProperties;
4060
4059
  refs: {
4061
- reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
4060
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
4062
4061
  floating: React.MutableRefObject<HTMLElement | null>;
4063
4062
  setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
4064
4063
  setFloating: (node: HTMLElement | null) => void;
@@ -4094,7 +4093,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4094
4093
  open: boolean;
4095
4094
  setOpen: (open: boolean) => void;
4096
4095
  isMounted: boolean;
4097
- styles: React.CSSProperties;
4096
+ styles: import("react").CSSProperties;
4098
4097
  disabled: boolean | undefined;
4099
4098
  };
4100
4099
  export const useTooltip: ({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen, disabled, offset: offsetProp, shift: shiftProp, }?: TooltipOptions) => {
@@ -4107,7 +4106,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4107
4106
  update: () => void;
4108
4107
  floatingStyles: React.CSSProperties;
4109
4108
  refs: {
4110
- reference: React.MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
4109
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
4111
4110
  floating: React.MutableRefObject<HTMLElement | null>;
4112
4111
  setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
4113
4112
  setFloating: (node: HTMLElement | null) => void;
@@ -4143,7 +4142,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4143
4142
  open: boolean;
4144
4143
  setOpen: (open: boolean) => void;
4145
4144
  isMounted: boolean;
4146
- styles: React.CSSProperties;
4145
+ styles: import("react").CSSProperties;
4147
4146
  disabled: boolean | undefined;
4148
4147
  };
4149
4148
 
@@ -4155,7 +4154,7 @@ declare module '@layerfi/components/components/Typography/ErrorText' {
4155
4154
 
4156
4155
  }
4157
4156
  declare module '@layerfi/components/components/Typography/Heading' {
4158
- import React, { ReactNode } from 'react';
4157
+ import { ReactNode } from 'react';
4159
4158
  export enum HeadingSize {
4160
4159
  primary = "primary",
4161
4160
  secondary = "secondary",
@@ -4172,7 +4171,7 @@ declare module '@layerfi/components/components/Typography/Heading' {
4172
4171
 
4173
4172
  }
4174
4173
  declare module '@layerfi/components/components/Typography/Text' {
4175
- import React, { ReactNode } from 'react';
4174
+ import { ReactNode } from 'react';
4176
4175
  export enum TextSize {
4177
4176
  lg = "lg",
4178
4177
  md = "md",
@@ -4227,7 +4226,7 @@ declare module '@layerfi/components/components/UpsellBanner/index' {
4227
4226
 
4228
4227
  }
4229
4228
  declare module '@layerfi/components/components/View/View' {
4230
- import React, { ReactNode } from 'react';
4229
+ import { ReactNode } from 'react';
4231
4230
  export interface ViewProps {
4232
4231
  children: ReactNode;
4233
4232
  title?: string;
@@ -4239,7 +4238,7 @@ declare module '@layerfi/components/components/View/View' {
4239
4238
  sidebar?: ReactNode;
4240
4239
  viewClassName?: string;
4241
4240
  }
4242
- const View: React.ForwardRefExoticComponent<ViewProps & React.RefAttributes<HTMLDivElement>>;
4241
+ const View: import("react").ForwardRefExoticComponent<ViewProps & import("react").RefAttributes<HTMLDivElement>>;
4243
4242
  export { View };
4244
4243
 
4245
4244
  }
@@ -4262,15 +4261,14 @@ declare module '@layerfi/components/components/ViewHeader/index' {
4262
4261
 
4263
4262
  }
4264
4263
  declare module '@layerfi/components/components/ui/Button/Button' {
4265
- import React from 'react';
4266
4264
  import { type ButtonProps } from 'react-aria-components';
4267
4265
  type ButtonVariant = 'solid' | 'ghost';
4268
4266
  type ButtonSize = 'md' | 'lg';
4269
- const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "className"> & {
4267
+ const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "className"> & {
4270
4268
  icon?: true;
4271
4269
  size?: ButtonSize;
4272
4270
  variant?: ButtonVariant;
4273
- } & React.RefAttributes<HTMLButtonElement>>;
4271
+ } & import("react").RefAttributes<HTMLButtonElement>>;
4274
4272
  export { Button };
4275
4273
 
4276
4274
  }
@@ -4287,16 +4285,16 @@ declare module '@layerfi/components/components/ui/Loading/LoadingSpinner' {
4287
4285
 
4288
4286
  }
4289
4287
  declare module '@layerfi/components/components/ui/Modal/Modal' {
4290
- import React, { type ComponentProps } from 'react';
4288
+ import { type ComponentProps } from 'react';
4291
4289
  import { type DialogProps, type ModalOverlayProps } from 'react-aria-components';
4292
4290
  type ModalSize = 'md' | 'lg';
4293
- const ModalOverlay: React.ForwardRefExoticComponent<Omit<ModalOverlayProps, "className"> & React.RefAttributes<HTMLDivElement>>;
4294
- const InternalModal: React.ForwardRefExoticComponent<{
4291
+ const ModalOverlay: import("react").ForwardRefExoticComponent<Omit<ModalOverlayProps, "className"> & import("react").RefAttributes<HTMLDivElement>>;
4292
+ const InternalModal: import("react").ForwardRefExoticComponent<{
4295
4293
  size?: ModalSize;
4296
4294
  } & {
4297
- children?: React.ReactNode | undefined;
4298
- } & React.RefAttributes<HTMLDivElement>>;
4299
- const Dialog: React.ForwardRefExoticComponent<Omit<DialogProps, "className"> & React.RefAttributes<HTMLElement>>;
4295
+ children?: import("react").ReactNode | undefined;
4296
+ } & import("react").RefAttributes<HTMLDivElement>>;
4297
+ const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogProps, "className"> & import("react").RefAttributes<HTMLElement>>;
4300
4298
  type AllowedModalOverlayProps = Pick<ComponentProps<typeof ModalOverlay>, 'isOpen' | 'onOpenChange'>;
4301
4299
  type AllowedInternalModalProps = Pick<ComponentProps<typeof InternalModal>, 'size'>;
4302
4300
  type AllowedDialogProps = Pick<ComponentProps<typeof Dialog>, 'children'>;
@@ -4306,23 +4304,23 @@ declare module '@layerfi/components/components/ui/Modal/Modal' {
4306
4304
 
4307
4305
  }
4308
4306
  declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
4309
- import React, { type PropsWithChildren } from 'react';
4307
+ import { type PropsWithChildren } from 'react';
4310
4308
  type ModalContextBarProps = {
4311
4309
  onClose?: () => void;
4312
4310
  };
4313
4311
  function ModalContextBar({ onClose }: ModalContextBarProps): import("react/jsx-runtime").JSX.Element;
4314
- const ModalHeading: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & React.RefAttributes<HTMLHeadingElement>, "className"> & {
4312
+ const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
4315
4313
  size?: "sm";
4316
4314
  pbe?: "2xs" | "xs" | "sm" | "md" | "lg";
4317
- }, "ref"> & React.RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
4318
- const ModalDescription: React.ForwardRefExoticComponent<Omit<Omit<{
4315
+ }, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
4316
+ const ModalDescription: import("react").ForwardRefExoticComponent<Omit<Omit<{
4319
4317
  slot?: string;
4320
4318
  size?: "xs" | "sm" | "md" | "lg";
4321
4319
  pbe?: "xs" | "sm" | "md" | "lg";
4322
4320
  align?: "center";
4323
4321
  } & {
4324
- children?: React.ReactNode | undefined;
4325
- } & React.RefAttributes<HTMLParagraphElement>, "slot">, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
4322
+ children?: import("react").ReactNode | undefined;
4323
+ } & import("react").RefAttributes<HTMLParagraphElement>, "slot">, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
4326
4324
  function ModalContent({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
4327
4325
  function ModalActions({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
4328
4326
  export { ModalContextBar, ModalHeading, ModalDescription, ModalContent, ModalActions, };
@@ -4341,31 +4339,29 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
4341
4339
 
4342
4340
  }
4343
4341
  declare module '@layerfi/components/components/ui/Typography/Heading' {
4344
- import React from 'react';
4345
4342
  type HeadingDataProps = {
4346
4343
  size?: 'sm';
4347
4344
  pbe?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
4348
4345
  };
4349
- const Heading: React.ForwardRefExoticComponent<Omit<Omit<import("react-aria-components").HeadingProps & React.RefAttributes<HTMLHeadingElement>, "className"> & HeadingDataProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
4346
+ const Heading: import("react").ForwardRefExoticComponent<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & HeadingDataProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
4350
4347
  export { Heading };
4351
4348
 
4352
4349
  }
4353
4350
  declare module '@layerfi/components/components/ui/Typography/Text' {
4354
- import React from 'react';
4355
4351
  type TextProps = {
4356
4352
  slot?: string;
4357
4353
  size?: 'xs' | 'sm' | 'md' | 'lg';
4358
4354
  pbe?: 'xs' | 'sm' | 'md' | 'lg';
4359
4355
  align?: 'center';
4360
4356
  };
4361
- const P: React.ForwardRefExoticComponent<TextProps & {
4362
- children?: React.ReactNode | undefined;
4363
- } & React.RefAttributes<HTMLParagraphElement>>;
4357
+ const P: import("react").ForwardRefExoticComponent<TextProps & {
4358
+ children?: import("react").ReactNode | undefined;
4359
+ } & import("react").RefAttributes<HTMLParagraphElement>>;
4364
4360
  export { P };
4365
4361
 
4366
4362
  }
4367
4363
  declare module '@layerfi/components/components/utility/ConditionalList' {
4368
- import React, { type PropsWithChildren } from 'react';
4364
+ import type { PropsWithChildren } from 'react';
4369
4365
  type ConditionalListProps<T> = {
4370
4366
  list: ReadonlyArray<T>;
4371
4367
  Empty: React.ReactNode;
@@ -4380,24 +4376,23 @@ declare module '@layerfi/components/components/utility/ConditionalList' {
4380
4376
  isLoading?: never;
4381
4377
  Loading?: never;
4382
4378
  });
4383
- export function ConditionalList<T>({ list, isLoading, Empty, Container, Loading, children, }: ConditionalListProps<T>): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
4379
+ export function ConditionalList<T>({ list, isLoading, Empty, Container, Loading, children, }: ConditionalListProps<T>): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
4384
4380
  export {};
4385
4381
 
4386
4382
  }
4387
4383
  declare module '@layerfi/components/components/utility/InvisibleDownload' {
4388
- import React from 'react';
4389
4384
  type InvisibleDownloadHandle = {
4390
4385
  trigger: (options: {
4391
4386
  url: string;
4392
4387
  }) => Promise<void>;
4393
4388
  };
4394
4389
  export function useInvisibleDownload(): {
4395
- invisibleDownloadRef: React.RefObject<InvisibleDownloadHandle>;
4390
+ invisibleDownloadRef: import("react").RefObject<InvisibleDownloadHandle>;
4396
4391
  triggerInvisibleDownload: (options: {
4397
4392
  url: string;
4398
4393
  }) => void;
4399
4394
  };
4400
- const InvisibleDownload: React.ForwardRefExoticComponent<React.RefAttributes<InvisibleDownloadHandle>>;
4395
+ const InvisibleDownload: import("react").ForwardRefExoticComponent<import("react").RefAttributes<InvisibleDownloadHandle>>;
4401
4396
  export default InvisibleDownload;
4402
4397
 
4403
4398
  }
@@ -4613,7 +4608,7 @@ declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
4613
4608
  setSelectedEntryId: (id?: string) => void;
4614
4609
  closeSelectedEntry: () => void;
4615
4610
  create: (newJournalEntry: import("@layerfi/components/types/journal").NewApiJournalEntry) => void;
4616
- changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: import("../../types/chart_of_accounts").LedgerAccountBalance[] | undefined) => void;
4611
+ changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: import("../../types/chart_of_accounts").LedgerAccountBalance[]) => void;
4617
4612
  submitForm: () => void;
4618
4613
  cancelForm: () => void;
4619
4614
  addEntry: () => void;
@@ -4762,9 +4757,9 @@ declare module '@layerfi/components/contexts/StatementOfCashContext/index' {
4762
4757
 
4763
4758
  }
4764
4759
  declare module '@layerfi/components/contexts/TableContext/TableContext' {
4765
- import React, { ReactNode } from 'react';
4760
+ import { ReactNode } from 'react';
4766
4761
  import { TableContextProps } from '@layerfi/components/types/table';
4767
- export const TableContext: React.Context<TableContextProps>;
4762
+ export const TableContext: import("react").Context<TableContextProps>;
4768
4763
  interface TableProviderProps {
4769
4764
  children: ReactNode;
4770
4765
  }
@@ -4807,6 +4802,10 @@ declare module '@layerfi/components/contexts/TasksContext/TasksContext' {
4807
4802
  declare module '@layerfi/components/contexts/TasksContext/index' {
4808
4803
  export { TasksContext } from '@layerfi/components/contexts/TasksContext/TasksContext';
4809
4804
 
4805
+ }
4806
+ declare module '@layerfi/components/hooks/categories/useAllCategories' {
4807
+ export function useAllCategories(): import("swr").SWRResponse<import("../../types").Category[], any, any>;
4808
+
4810
4809
  }
4811
4810
  declare module '@layerfi/components/hooks/useAuth' {
4812
4811
  export function useAuth(): import("swr").SWRResponse<{
@@ -5060,7 +5059,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
5060
5059
  setSelectedEntryId: (id?: string) => void;
5061
5060
  closeSelectedEntry: () => void;
5062
5061
  create: (newJournalEntry: NewApiJournalEntry) => void;
5063
- changeFormData: (name: string, value: string | BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: LedgerAccountBalance[] | undefined) => void;
5062
+ changeFormData: (name: string, value: string | BaseSelectOption | undefined | number, lineItemIndex?: number, accounts?: LedgerAccountBalance[]) => void;
5064
5063
  submitForm: () => void;
5065
5064
  cancelForm: () => void;
5066
5065
  addEntry: () => void;
@@ -6147,6 +6146,14 @@ declare module '@layerfi/components/types/bank_transactions' {
6147
6146
  review = "review",
6148
6147
  categorized = "categorized"
6149
6148
  }
6149
+ export type CategoryWithEntries = Category & {
6150
+ entries?: Array<CategoryEntry>;
6151
+ };
6152
+ type CategoryEntry = {
6153
+ type?: string;
6154
+ amount?: number;
6155
+ category: CategoryWithEntries;
6156
+ };
6150
6157
  export interface BankTransaction extends Record<string, unknown> {
6151
6158
  type: 'Bank_Transaction';
6152
6159
  account_name?: string;
@@ -6162,7 +6169,7 @@ declare module '@layerfi/components/types/bank_transactions' {
6162
6169
  amount: number;
6163
6170
  direction: Direction;
6164
6171
  counterparty_name: string;
6165
- category: Category;
6172
+ category: CategoryWithEntries;
6166
6173
  categorization_status: CategorizationStatus;
6167
6174
  categorization_flow: Categorization | null;
6168
6175
  categorization_method: string;
@@ -6202,6 +6209,7 @@ declare module '@layerfi/components/types/bank_transactions' {
6202
6209
  type: 'Document_S3_Urls';
6203
6210
  documentUrls: S3PresignedUrl[];
6204
6211
  }
6212
+ export {};
6205
6213
 
6206
6214
  }
6207
6215
  declare module '@layerfi/components/types/business' {
@@ -6234,21 +6242,26 @@ declare module '@layerfi/components/types/categories' {
6234
6242
  JOURNALING = "JOURNALING",
6235
6243
  MATCHED = "MATCHED"
6236
6244
  }
6237
- export interface CategoryEntry {
6238
- type?: string;
6239
- amount?: number;
6240
- category: Category;
6241
- }
6242
- export interface Category {
6243
- id: string;
6244
- type: string;
6245
+ type BaseCategory = {
6245
6246
  display_name: string;
6246
6247
  category: string;
6247
- description?: string;
6248
- stable_name?: string;
6249
- subCategories?: Category[];
6250
- entries?: CategoryEntry[];
6251
- }
6248
+ subCategories: Array<Category> | null;
6249
+ description: string | null;
6250
+ };
6251
+ type AccountNestedCategory = {
6252
+ type: 'AccountNested';
6253
+ id: string;
6254
+ stable_name: string | null;
6255
+ } & BaseCategory;
6256
+ type OptionalAccountNestedCategory = {
6257
+ type: 'OptionalAccountNested';
6258
+ stable_name: string;
6259
+ } & BaseCategory;
6260
+ type ExclusionNestedCategory = {
6261
+ type: 'ExclusionNested';
6262
+ id: string;
6263
+ } & BaseCategory;
6264
+ export type Category = AccountNestedCategory | OptionalAccountNestedCategory | ExclusionNestedCategory;
6252
6265
  export enum CategorizationType {
6253
6266
  AUTO = "AUTO",
6254
6267
  ASK_FROM_SUGGESTIONS = "ASK_FROM_SUGGESTIONS",
@@ -6287,6 +6300,7 @@ declare module '@layerfi/components/types/categories' {
6287
6300
  };
6288
6301
  export type CategoryUpdate = SingleCategoryUpdate | SplitCategoryUpdate;
6289
6302
  export function hasSuggestions(categorization: Categorization | null): categorization is SuggestedCategorization;
6303
+ export {};
6290
6304
 
6291
6305
  }
6292
6306
  declare module '@layerfi/components/types/chart_of_accounts' {