@layerfi/components 0.1.102 → 0.1.103-alpha

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
@@ -2332,14 +2332,12 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccou
2332
2332
  import { ChartWithBalances } from '@layerfi/components/types/chart_of_accounts';
2333
2333
  import { View } from '@layerfi/components/types/general';
2334
2334
  import { ChartOfAccountsTableStringOverrides, ExpandActionState } from '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccountsTableWithPanel';
2335
- export const ChartOfAccountsTable: ({ view, stringOverrides, data, error, expandAll, cumulativeIndex, accountsLength, templateAccountsEditable, }: {
2335
+ export const ChartOfAccountsTable: ({ view, stringOverrides, data, error, expandAll, templateAccountsEditable, }: {
2336
2336
  view: View;
2337
2337
  data: ChartWithBalances;
2338
2338
  stringOverrides?: ChartOfAccountsTableStringOverrides;
2339
2339
  error?: unknown;
2340
2340
  expandAll?: ExpandActionState;
2341
- cumulativeIndex: number;
2342
- accountsLength: number;
2343
2341
  templateAccountsEditable?: boolean;
2344
2342
  }) => import("react/jsx-runtime").JSX.Element;
2345
2343
  export const ChartOfAccountsTableContent: ({ stringOverrides, data, error, expandAll, templateAccountsEditable, }: {
@@ -2348,8 +2346,6 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccou
2348
2346
  stringOverrides?: ChartOfAccountsTableStringOverrides;
2349
2347
  error?: unknown;
2350
2348
  expandAll?: ExpandActionState;
2351
- cumulativeIndex: number;
2352
- accountsLength: number;
2353
2349
  templateAccountsEditable: boolean;
2354
2350
  }) => import("react/jsx-runtime").JSX.Element;
2355
2351
 
@@ -3229,7 +3225,6 @@ declare module '@layerfi/components/components/JournalTable/JournalTableWithPane
3229
3225
  import { RefObject } from 'react';
3230
3226
  import { View } from '@layerfi/components/types/general';
3231
3227
  import { JournalConfig } from '@layerfi/components/components/Journal/Journal';
3232
- import { JournalFormStringOverrides } from '@layerfi/components/components/JournalForm/JournalForm';
3233
3228
  export interface JournalTableStringOverrides {
3234
3229
  componentTitle?: string;
3235
3230
  componentSubtitle?: string;
@@ -3240,7 +3235,6 @@ declare module '@layerfi/components/components/JournalTable/JournalTableWithPane
3240
3235
  accountColumnHeader?: string;
3241
3236
  debitColumnHeader?: string;
3242
3237
  creditColumnHeader?: string;
3243
- journalForm?: JournalFormStringOverrides;
3244
3238
  }
3245
3239
  export const JournalTableWithPanel: ({ containerRef, pageSize, config, stringOverrides, view, }: {
3246
3240
  view: View;
@@ -3287,10 +3281,9 @@ declare module '@layerfi/components/components/LedgerAccount/LedgerAccountRow' {
3287
3281
  export interface LedgerAccountRowProps {
3288
3282
  row: LedgerAccountLineItem;
3289
3283
  index: number;
3290
- initialLoad?: boolean;
3291
3284
  view: View;
3292
3285
  }
3293
- export const LedgerAccountRow: ({ row, index, initialLoad, view, }: LedgerAccountRowProps) => import("react/jsx-runtime").JSX.Element;
3286
+ export const LedgerAccountRow: ({ row, index, view, }: LedgerAccountRowProps) => import("react/jsx-runtime").JSX.Element;
3294
3287
 
3295
3288
  }
3296
3289
  declare module '@layerfi/components/components/LedgerAccount/index' {
@@ -3834,7 +3827,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3834
3827
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts").ProfitAndLossDetailedChartsStringOverrides;
3835
3828
  }) => import("react/jsx-runtime").JSX.Element;
3836
3829
  Header: ({ text, className, headingClassName, withDatePicker, withStatus, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => import("react/jsx-runtime").JSX.Element;
3837
- Report: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3830
+ Report: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3838
3831
  DownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossDownloadButton/ProfitAndLossDownloadButton").ProfitAndLossDownloadButtonProps) => import("react/jsx-runtime").JSX.Element;
3839
3832
  };
3840
3833
  export { ProfitAndLoss };
@@ -4004,23 +3997,17 @@ declare module '@layerfi/components/components/ProfitAndLossHeader/index' {
4004
3997
 
4005
3998
  }
4006
3999
  declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport' {
4007
- import { RefObject } from 'react';
4008
4000
  import { View as ViewType } from '@layerfi/components/types/general';
4009
4001
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
4010
4002
  import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
4011
4003
  type ViewBreakpoint = ViewType | undefined;
4012
4004
  export type ProfitAndLossReportProps = {
4013
4005
  stringOverrides?: ReportsStringOverrides;
4014
- parentRef?: RefObject<HTMLDivElement>;
4015
4006
  view?: ViewBreakpoint;
4016
4007
  } & TimeRangePickerConfig;
4017
- export const ProfitAndLossReport: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
4008
+ export const ProfitAndLossReport: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, view, }: ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
4018
4009
  export {};
4019
4010
 
4020
- }
4021
- declare module '@layerfi/components/components/ProfitAndLossReport/index' {
4022
- export { ProfitAndLossReport } from '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport';
4023
-
4024
4011
  }
4025
4012
  declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
4026
4013
  import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
@@ -5009,6 +4996,7 @@ declare module '@layerfi/components/components/ui/Button/Button' {
5009
4996
  type ButtonVariant = 'solid' | 'ghost' | 'outlined' | 'text';
5010
4997
  type ButtonSize = 'md';
5011
4998
  const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "className"> & {
4999
+ ellipsis?: true;
5012
5000
  icon?: true;
5013
5001
  inset?: true;
5014
5002
  size?: ButtonSize;
@@ -5235,6 +5223,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5235
5223
  align?: 'start' | 'center';
5236
5224
  gap?: Spacing;
5237
5225
  justify?: 'start' | 'center' | 'end' | 'space-between';
5226
+ overflow?: 'scroll' | 'hidden' | 'auto' | 'clip' | 'visible';
5238
5227
  pb?: Spacing;
5239
5228
  pbs?: Spacing;
5240
5229
  pbe?: Spacing;
@@ -5249,6 +5238,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5249
5238
  align?: "start" | "center";
5250
5239
  gap?: Spacing;
5251
5240
  justify?: "start" | "center" | "end" | "space-between";
5241
+ overflow?: "scroll" | "hidden" | "auto" | "clip" | "visible";
5252
5242
  pb?: Spacing;
5253
5243
  pbs?: Spacing;
5254
5244
  pbe?: Spacing;
@@ -5265,6 +5255,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
5265
5255
  align?: "start" | "center";
5266
5256
  gap?: Spacing;
5267
5257
  justify?: "start" | "center" | "end" | "space-between";
5258
+ overflow?: "scroll" | "hidden" | "auto" | "clip" | "visible";
5268
5259
  pb?: Spacing;
5269
5260
  pbs?: Spacing;
5270
5261
  pbe?: Spacing;
@@ -5760,6 +5751,8 @@ declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
5760
5751
  params?: Record<string, string | undefined> | undefined;
5761
5752
  body?: Record<string, unknown> | undefined;
5762
5753
  } | undefined) => Promise<Record<never, never>>>;
5754
+ hasMore: boolean;
5755
+ fetchMore: () => void;
5763
5756
  }>;
5764
5757
 
5765
5758
  }
@@ -6284,15 +6277,34 @@ declare module '@layerfi/components/features/ledger/entries/[ledgerEntryId]/tags
6284
6277
  declare module '@layerfi/components/features/ledger/entries/api/useListLedgerEntries' {
6285
6278
  import type { JournalEntry } from '@layerfi/components/types';
6286
6279
  export const LIST_LEDGER_ENTRIES_TAG_KEY = "#list-ledger-entries";
6280
+ type GetLedgerEntriesParams = {
6281
+ businessId: string;
6282
+ sort_by?: 'entry_at' | 'entry_number' | 'created_at';
6283
+ sort_order?: 'ASC' | 'ASCENDING' | 'DESC' | 'DESCENDING' | 'DES';
6284
+ cursor?: string;
6285
+ limit?: number;
6286
+ show_total_count?: boolean;
6287
+ };
6287
6288
  type ListLedgerEntriesReturn = {
6288
6289
  data: ReadonlyArray<JournalEntry>;
6290
+ meta?: {
6291
+ pagination: {
6292
+ cursor?: string;
6293
+ has_more: boolean;
6294
+ total_count?: number;
6295
+ };
6296
+ };
6289
6297
  };
6290
6298
  export const listLedgerEntries: (baseUrl: string, accessToken: string | undefined, options?: {
6291
- params?: {
6292
- businessId: string;
6293
- } | undefined;
6299
+ params?: GetLedgerEntriesParams | undefined;
6294
6300
  } | undefined) => () => Promise<ListLedgerEntriesReturn>;
6295
- export function useListLedgerEntries(): import("swr").SWRResponse<readonly JournalEntry[], any, any>;
6301
+ export type UseListLedgerEntriesOptions = {
6302
+ sort_by?: 'entry_at' | 'entry_number' | 'created_at';
6303
+ sort_order?: 'ASC' | 'ASCENDING' | 'DESC' | 'DESCENDING' | 'DES';
6304
+ limit?: number;
6305
+ show_total_count?: boolean;
6306
+ };
6307
+ export function useListLedgerEntries({ sort_by, sort_order, limit, show_total_count, }?: UseListLedgerEntriesOptions): import("swr/infinite").SWRInfiniteResponse<ListLedgerEntriesReturn, any>;
6296
6308
  export function useLedgerEntriesInvalidator(): {
6297
6309
  invalidateLedgerEntries: () => Promise<undefined[]>;
6298
6310
  debouncedInvalidateLedgerEntries: import("lodash").DebouncedFunc<() => Promise<undefined[]>>;
@@ -7432,6 +7444,8 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
7432
7444
  addEntryLine: (direction: Direction) => void;
7433
7445
  removeEntryLine: (index: number) => void;
7434
7446
  reverseEntry: (entryId: string) => ReturnType<typeof Layer.reverseJournalEntry>;
7447
+ hasMore: boolean;
7448
+ fetchMore: () => void;
7435
7449
  };
7436
7450
  export interface JournalFormTypes {
7437
7451
  action: string;
@@ -10361,7 +10375,6 @@ declare module '@layerfi/components/views/ProjectProfitability/index' {
10361
10375
 
10362
10376
  }
10363
10377
  declare module '@layerfi/components/views/Reports/Reports' {
10364
- import { RefObject } from 'react';
10365
10378
  import { BalanceSheetStringOverrides } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
10366
10379
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
10367
10380
  import { PnLDownloadButtonStringOverrides } from '@layerfi/components/components/ProfitAndLossDownloadButton/index';
@@ -10392,7 +10405,6 @@ declare module '@layerfi/components/views/Reports/Reports' {
10392
10405
  }
10393
10406
  type ReportType = 'profitAndLoss' | 'balanceSheet' | 'statementOfCashFlow';
10394
10407
  export interface ReportsPanelProps {
10395
- containerRef: RefObject<HTMLDivElement>;
10396
10408
  openReport: ReportType;
10397
10409
  stringOverrides?: ReportsStringOverrides;
10398
10410
  profitAndLossConfig?: TimeRangePickerConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.102",
3
+ "version": "0.1.103-alpha",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",