@layerfi/components 0.1.88-alpha.1 → 0.1.88-alpha.3

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
@@ -365,7 +365,7 @@ declare module '@layerfi/components/api/layer/linked_accounts' {
365
365
  declare module '@layerfi/components/api/layer/profit_and_loss' {
366
366
  import { ProfitAndLoss } from '@layerfi/components/types';
367
367
  import { S3PresignedUrl } from '@layerfi/components/types/general';
368
- import { ProfitAndLossComparison, ProfitAndLossSummaries } from '@layerfi/components/types/profit_and_loss';
368
+ import type { ProfitAndLossComparison, ProfitAndLossComparisonRequestBody, ProfitAndLossSummaries } from '@layerfi/components/types/profit_and_loss';
369
369
  export const getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
370
370
  params?: Record<string, string | undefined> | undefined;
371
371
  } | undefined) => () => Promise<{
@@ -374,7 +374,7 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
374
374
  }>;
375
375
  export const compareProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
376
376
  params?: Record<string, string | undefined> | undefined;
377
- body?: Record<string, unknown> | undefined;
377
+ body?: ProfitAndLossComparisonRequestBody | undefined;
378
378
  } | undefined) => Promise<{
379
379
  data?: ProfitAndLossComparison;
380
380
  error?: unknown;
@@ -686,7 +686,7 @@ declare module '@layerfi/components/api/layer' {
686
686
  } | undefined) => Promise<Record<never, never>>;
687
687
  compareProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
688
688
  params?: Record<string, string | undefined> | undefined;
689
- body?: Record<string, unknown> | undefined;
689
+ body?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonRequestBody | undefined;
690
690
  } | undefined) => Promise<{
691
691
  data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparison;
692
692
  error?: unknown;
@@ -1231,7 +1231,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
1231
1231
  showReceiptUploads?: boolean;
1232
1232
  showDescriptions?: boolean;
1233
1233
  }
1234
- export const SplitAndMatchForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: SplitAndMatchFormProps) => import("react/jsx-runtime").JSX.Element;
1234
+ export const SplitAndMatchForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, showCategorization, }: SplitAndMatchFormProps) => import("react/jsx-runtime").JSX.Element;
1235
1235
  export {};
1236
1236
 
1237
1237
  }
@@ -1679,6 +1679,7 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
1679
1679
  error?: boolean | string;
1680
1680
  active?: boolean;
1681
1681
  iconOnly?: boolean;
1682
+ variant?: ButtonProps['variant'];
1682
1683
  action?: SubmitAction;
1683
1684
  noIcon?: boolean;
1684
1685
  tooltip?: ButtonProps['tooltip'];
@@ -1687,7 +1688,7 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
1687
1688
  SAVE = "save",
1688
1689
  UPDATE = "update"
1689
1690
  }
1690
- export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, ...props }: SubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
1691
+ export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, variant, ...props }: SubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
1691
1692
 
1692
1693
  }
1693
1694
  declare module '@layerfi/components/components/Button/SwitchButton' {
@@ -2054,7 +2055,7 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
2054
2055
  popperClassName?: string;
2055
2056
  currentDateOption?: boolean;
2056
2057
  minDate?: Date;
2057
- maxDate?: Date;
2058
+ maxDate?: Date | null;
2058
2059
  navigateArrows?: NavigationArrows[];
2059
2060
  onChangeMode?: (mode: UnifiedPickerMode) => void;
2060
2061
  slots?: {
@@ -2148,6 +2149,14 @@ declare module '@layerfi/components/components/Drawer/Drawer' {
2148
2149
  declare module '@layerfi/components/components/Drawer/index' {
2149
2150
  export { Drawer } from '@layerfi/components/components/Drawer/Drawer';
2150
2151
 
2152
+ }
2153
+ declare module '@layerfi/components/components/DueStatus/DueStatus' {
2154
+ export interface DueStatusProps {
2155
+ dueDate: Date | string;
2156
+ paidAt?: Date | string;
2157
+ }
2158
+ export const DueStatus: ({ dueDate, paidAt }: DueStatusProps) => import("react/jsx-runtime").JSX.Element | null;
2159
+
2151
2160
  }
2152
2161
  declare module '@layerfi/components/components/ErrorBoundary/ErrorBoundary' {
2153
2162
  import { ErrorInfo, Component, type PropsWithChildren } from 'react';
@@ -2274,9 +2283,10 @@ declare module '@layerfi/components/components/Header/HeaderCol' {
2274
2283
  interface HeaderColProps {
2275
2284
  className?: string;
2276
2285
  style?: CSSProperties;
2286
+ noPadding?: boolean;
2277
2287
  children: ReactNode;
2278
2288
  }
2279
- export const HeaderCol: ({ className, children, style }: HeaderColProps) => import("react/jsx-runtime").JSX.Element;
2289
+ export const HeaderCol: ({ className, children, style, noPadding }: HeaderColProps) => import("react/jsx-runtime").JSX.Element;
2280
2290
  export {};
2281
2291
 
2282
2292
  }
@@ -2421,6 +2431,17 @@ declare module '@layerfi/components/components/Input/Select' {
2421
2431
  }
2422
2432
  export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, placeholder, isInvalid, errorMessage, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
2423
2433
 
2434
+ }
2435
+ declare module '@layerfi/components/components/Input/StaticValue' {
2436
+ import { TextProps } from '@layerfi/components/components/Typography/Text';
2437
+ export type StaticValueProps = TextProps;
2438
+ /**
2439
+ * Use in places where you want to show a static value instead of (disabled) input.
2440
+ * Usually it can be used on a summary view after submitting the form,
2441
+ * where showing disable input doesn't look right.
2442
+ */
2443
+ export const StaticValue: (props: StaticValueProps) => import("react/jsx-runtime").JSX.Element;
2444
+
2424
2445
  }
2425
2446
  declare module '@layerfi/components/components/Input/index' {
2426
2447
  export { Input } from '@layerfi/components/components/Input/Input';
@@ -2957,7 +2978,13 @@ declare module '@layerfi/components/components/Pagination/Pagination' {
2957
2978
  hasMore?: boolean;
2958
2979
  fetchMore?: () => void;
2959
2980
  }
2960
- export const Pagination: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
2981
+ /**
2982
+ * Pagination wrapped into container with spacing and positioning.
2983
+ * Use PaginationContent component, if you want to render plain pagination element
2984
+ * without spacings and positioning.
2985
+ */
2986
+ export const Pagination: (props: PaginationProps) => import("react/jsx-runtime").JSX.Element;
2987
+ export const PaginationContent: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, hasMore, fetchMore, }: PaginationProps) => import("react/jsx-runtime").JSX.Element | null;
2961
2988
 
2962
2989
  }
2963
2990
  declare module '@layerfi/components/components/Pagination/index' {
@@ -3044,16 +3071,18 @@ declare module '@layerfi/components/components/PlatformOnboarding/index' {
3044
3071
  declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3045
3072
  import { PropsWithChildren } from 'react';
3046
3073
  import { ReportingBasis } from '@layerfi/components/types';
3074
+ import { ProfitAndLossCompareConfig } from '@layerfi/components/types/profit_and_loss';
3047
3075
  type Props = PropsWithChildren & {
3048
3076
  tagFilter?: {
3049
3077
  key: string;
3050
3078
  values: string[];
3051
3079
  };
3080
+ comparisonConfig?: ProfitAndLossCompareConfig;
3052
3081
  reportingBasis?: ReportingBasis;
3053
3082
  asContainer?: boolean;
3054
3083
  };
3055
3084
  const ProfitAndLoss: {
3056
- ({ children, tagFilter, reportingBasis, asContainer, }: Props): import("react/jsx-runtime").JSX.Element;
3085
+ ({ children, tagFilter, comparisonConfig, reportingBasis, asContainer, }: Props): import("react/jsx-runtime").JSX.Element;
3057
3086
  Chart: ({ forceRerenderOnDataChange, tagFilter, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => import("react/jsx-runtime").JSX.Element;
3058
3087
  Context: import("react").Context<{
3059
3088
  data: import("@layerfi/components/types").ProfitAndLoss | undefined;
@@ -3081,21 +3110,24 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3081
3110
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
3082
3111
  isLoading: boolean;
3083
3112
  isValidating: boolean;
3084
- error: unknown;
3085
- compareMode: boolean;
3086
- setCompareMode: import("react").Dispatch<import("react").SetStateAction<boolean>>;
3087
- compareMonths: number;
3088
- setCompareMonths: import("react").Dispatch<import("react").SetStateAction<number>>;
3089
- compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
3090
- setCompareOptions: import("react").Dispatch<import("react").SetStateAction<import("../ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]>>;
3091
- refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean) => void;
3113
+ isPeriodsSelectEnabled: boolean;
3114
+ compareModeActive: boolean;
3115
+ comparePeriods: number;
3116
+ setComparePeriods: import("react").Dispatch<import("react").SetStateAction<number>>;
3117
+ compareOptions: import("@layerfi/components/types/profit_and_loss").TagComparisonOption[];
3118
+ selectedCompareOptions: import("@layerfi/components/types/profit_and_loss").TagComparisonOption[];
3119
+ setSelectedCompareOptions: (values: import("react-select").MultiValue<{
3120
+ value: string;
3121
+ label: string;
3122
+ }>) => void;
3092
3123
  getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat) => Promise<{
3093
3124
  data?: import("@layerfi/components/types/general").S3PresignedUrl;
3094
3125
  error?: unknown;
3095
3126
  }>;
3127
+ comparisonConfig: ProfitAndLossCompareConfig | undefined;
3096
3128
  }>;
3097
3129
  DatePicker: ({ allowedDatePickerModes, customDateRanges, defaultDatePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => import("react/jsx-runtime").JSX.Element;
3098
- CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => import("react/jsx-runtime").JSX.Element;
3130
+ CompareOptions: () => import("react/jsx-runtime").JSX.Element | null;
3099
3131
  Summaries: (props: {
3100
3132
  actionable?: boolean;
3101
3133
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides;
@@ -3113,7 +3145,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
3113
3145
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts").ProfitAndLossDetailedChartsStringOverrides;
3114
3146
  }) => import("react/jsx-runtime").JSX.Element;
3115
3147
  Header: ({ text, className, headingClassName, withDatePicker, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => import("react/jsx-runtime").JSX.Element;
3116
- Report: ({ stringOverrides, comparisonConfig, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3148
+ Report: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3117
3149
  DownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossDownloadButton/ProfitAndLossDownloadButton").ProfitAndLossDownloadButtonProps) => import("react/jsx-runtime").JSX.Element;
3118
3150
  };
3119
3151
  export { ProfitAndLoss };
@@ -3158,27 +3190,7 @@ declare module '@layerfi/components/components/ProfitAndLossChart/index' {
3158
3190
 
3159
3191
  }
3160
3192
  declare module '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions' {
3161
- export interface ProfitAndLossCompareOptionsProps {
3162
- tagComparisonOptions: TagComparisonOption[];
3163
- defaultTagFilter: TagComparisonOption;
3164
- }
3165
- export interface TagComparisonOption {
3166
- displayName: string;
3167
- tagFilterConfig: TagViewConfig;
3168
- }
3169
- export type TagViewConfig = {
3170
- structure?: string;
3171
- tagFilters: TagFilterInput;
3172
- };
3173
- export type TagFilterInput = {
3174
- tagKey: string;
3175
- tagValues: string[];
3176
- } | 'None';
3177
- export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => import("react/jsx-runtime").JSX.Element;
3178
-
3179
- }
3180
- declare module '@layerfi/components/components/ProfitAndLossCompareOptions/index' {
3181
- export { ProfitAndLossCompareOptions, ProfitAndLossCompareOptionsProps, } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
3193
+ export const ProfitAndLossCompareOptions: () => import("react/jsx-runtime").JSX.Element | null;
3182
3194
 
3183
3195
  }
3184
3196
  declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
@@ -3308,15 +3320,13 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
3308
3320
  import { View as ViewType } from '@layerfi/components/types/general';
3309
3321
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
3310
3322
  import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
3311
- import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/index';
3312
3323
  type ViewBreakpoint = ViewType | undefined;
3313
3324
  export type ProfitAndLossReportProps = {
3314
3325
  stringOverrides?: ReportsStringOverrides;
3315
- comparisonConfig?: ProfitAndLossCompareOptionsProps;
3316
3326
  parentRef?: RefObject<HTMLDivElement>;
3317
3327
  view?: ViewBreakpoint;
3318
3328
  } & TimeRangePickerConfig;
3319
- export const ProfitAndLossReport: ({ stringOverrides, comparisonConfig, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3329
+ export const ProfitAndLossReport: ({ stringOverrides, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: ProfitAndLossReportProps) => import("react/jsx-runtime").JSX.Element;
3320
3330
  export {};
3321
3331
 
3322
3332
  }
@@ -3361,13 +3371,11 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
3361
3371
 
3362
3372
  }
3363
3373
  declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesHeading' {
3364
- import { PropsWithChildren } from 'react';
3374
+ import type { PropsWithChildren } from 'react';
3365
3375
  import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3366
- type ProfitAndLossSummariesHeadingProps = {
3367
- variants?: Variants;
3368
- } & PropsWithChildren;
3369
- export function ProfitAndLossSummariesHeading({ variants, children, }: ProfitAndLossSummariesHeadingProps): import("react/jsx-runtime").JSX.Element;
3370
- export {};
3376
+ export function ProfitAndLossSummariesHeading({ variants, children, }: PropsWithChildren<{
3377
+ variants?: Pick<Variants, 'size'>;
3378
+ }>): import("react/jsx-runtime").JSX.Element;
3371
3379
 
3372
3380
  }
3373
3381
  declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesList' {
@@ -3403,7 +3411,7 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/P
3403
3411
 
3404
3412
  }
3405
3413
  declare module '@layerfi/components/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesSummary' {
3406
- import { type ReactNode } from 'react';
3414
+ import type { ReactNode } from 'react';
3407
3415
  import type { Variants } from '@layerfi/components/utils/styleUtils/sizeVariants';
3408
3416
  type ProfitAndLossSummariesSummaryProps = {
3409
3417
  label: string;
@@ -3733,7 +3741,7 @@ declare module '@layerfi/components/components/TableBody/index' {
3733
3741
  }
3734
3742
  declare module '@layerfi/components/components/TableCell/TableCell' {
3735
3743
  import { TableCellProps } from '@layerfi/components/types/table';
3736
- export const TableCell: ({ children, className, isHeaderCell, isCurrency, align, primary, withExpandIcon, fullWidth, colSpan, onClick, style, width, }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
3744
+ export const TableCell: ({ children, className, isHeaderCell, isCurrency, align, primary, withExpandIcon, fullWidth, colSpan, onClick, style, width, nowrap, }: TableCellProps) => import("react/jsx-runtime").JSX.Element;
3737
3745
 
3738
3746
  }
3739
3747
  declare module '@layerfi/components/components/TableCell/index' {
@@ -4067,13 +4075,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4067
4075
  floating: HTMLElement | null;
4068
4076
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
4069
4077
  context: {
4070
- placement: import("@floating-ui/utils").Placement;
4078
+ update: () => void;
4071
4079
  x: number;
4072
4080
  y: number;
4081
+ placement: import("@floating-ui/utils").Placement;
4073
4082
  strategy: import("@floating-ui/utils").Strategy;
4074
4083
  middlewareData: import("@floating-ui/core").MiddlewareData;
4075
4084
  isPositioned: boolean;
4076
- update: () => void;
4077
4085
  floatingStyles: React.CSSProperties;
4078
4086
  open: boolean;
4079
4087
  onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
@@ -4116,13 +4124,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
4116
4124
  floating: HTMLElement | null;
4117
4125
  } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
4118
4126
  context: {
4119
- placement: import("@floating-ui/utils").Placement;
4127
+ update: () => void;
4120
4128
  x: number;
4121
4129
  y: number;
4130
+ placement: import("@floating-ui/utils").Placement;
4122
4131
  strategy: import("@floating-ui/utils").Strategy;
4123
4132
  middlewareData: import("@floating-ui/core").MiddlewareData;
4124
4133
  isPositioned: boolean;
4125
- update: () => void;
4126
4134
  floatingStyles: React.CSSProperties;
4127
4135
  open: boolean;
4128
4136
  onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
@@ -4185,6 +4193,7 @@ declare module '@layerfi/components/components/Typography/Text' {
4185
4193
  whenTruncated = "whenTruncated",
4186
4194
  always = "always"
4187
4195
  }
4196
+ export type TextStatus = 'success' | 'error' | 'warning';
4188
4197
  export interface TextTooltipOptions {
4189
4198
  contentClassName?: string;
4190
4199
  offset?: number;
@@ -4198,11 +4207,13 @@ declare module '@layerfi/components/components/Typography/Text' {
4198
4207
  children: ReactNode;
4199
4208
  size?: TextSize;
4200
4209
  weight?: TextWeight;
4210
+ status?: TextStatus;
4201
4211
  htmlFor?: string;
4202
4212
  withTooltip?: TextUseTooltip;
4203
4213
  tooltipOptions?: TextTooltipOptions;
4214
+ ellipsis?: boolean;
4204
4215
  }
4205
- export const Text: ({ as: Component, className, children, size, weight, withTooltip, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
4216
+ export const Text: ({ as: Component, className, children, size, weight, withTooltip, ellipsis, status, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
4206
4217
  export const TextWithTooltip: ({ as: Component, className, children, size: _size, weight: _weight, withTooltip: _withTooltip, tooltipOptions, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
4207
4218
 
4208
4219
  }
@@ -4310,15 +4321,14 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
4310
4321
  };
4311
4322
  function ModalContextBar({ onClose }: ModalContextBarProps): import("react/jsx-runtime").JSX.Element;
4312
4323
  const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
4313
- size?: "sm";
4324
+ size?: "sm" | "lg";
4314
4325
  pbe?: "2xs" | "xs" | "sm" | "md" | "lg";
4315
4326
  }, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
4316
4327
  const ModalDescription: import("react").ForwardRefExoticComponent<Omit<Omit<{
4317
- slot?: string;
4318
4328
  size?: "xs" | "sm" | "md" | "lg";
4319
4329
  pbe?: "xs" | "sm" | "md" | "lg";
4320
4330
  align?: "center";
4321
- } & {
4331
+ } & Pick<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "slot"> & {
4322
4332
  children?: import("react").ReactNode | undefined;
4323
4333
  } & import("react").RefAttributes<HTMLParagraphElement>, "slot">, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
4324
4334
  function ModalContent({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
@@ -4340,21 +4350,28 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
4340
4350
  }
4341
4351
  declare module '@layerfi/components/components/ui/Typography/Heading' {
4342
4352
  type HeadingDataProps = {
4343
- size?: 'sm';
4353
+ size?: 'sm' | 'lg';
4344
4354
  pbe?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
4345
4355
  };
4346
4356
  const Heading: import("react").ForwardRefExoticComponent<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & HeadingDataProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
4347
4357
  export { Heading };
4348
4358
 
4359
+ }
4360
+ declare module '@layerfi/components/components/ui/Typography/MoneyText' {
4361
+ const MoneySpan: import("react").ForwardRefExoticComponent<{
4362
+ amount: number;
4363
+ bold?: boolean;
4364
+ size?: "xs" | "sm" | "md" | "lg";
4365
+ } & Pick<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "slot"> & import("react").RefAttributes<HTMLSpanElement>>;
4366
+ export { MoneySpan };
4367
+
4349
4368
  }
4350
4369
  declare module '@layerfi/components/components/ui/Typography/Text' {
4351
- type TextProps = {
4352
- slot?: string;
4353
- size?: 'xs' | 'sm' | 'md' | 'lg';
4354
- pbe?: 'xs' | 'sm' | 'md' | 'lg';
4355
- align?: 'center';
4356
- };
4357
- const P: import("react").ForwardRefExoticComponent<TextProps & {
4370
+ const P: import("react").ForwardRefExoticComponent<{
4371
+ size?: "xs" | "sm" | "md" | "lg";
4372
+ pbe?: "xs" | "sm" | "md" | "lg";
4373
+ align?: "center";
4374
+ } & Pick<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "slot"> & {
4358
4375
  children?: import("react").ReactNode | undefined;
4359
4376
  } & import("react").RefAttributes<HTMLParagraphElement>>;
4360
4377
  export { P };
@@ -4703,18 +4720,21 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/Prof
4703
4720
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
4704
4721
  isLoading: boolean;
4705
4722
  isValidating: boolean;
4706
- error: unknown;
4707
- compareMode: boolean;
4708
- setCompareMode: import("react").Dispatch<import("react").SetStateAction<boolean>>;
4709
- compareMonths: number;
4710
- setCompareMonths: import("react").Dispatch<import("react").SetStateAction<number>>;
4711
- compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
4712
- setCompareOptions: import("react").Dispatch<import("react").SetStateAction<import("../../components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]>>;
4713
- refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean) => void;
4723
+ isPeriodsSelectEnabled: boolean;
4724
+ compareModeActive: boolean;
4725
+ comparePeriods: number;
4726
+ setComparePeriods: import("react").Dispatch<import("react").SetStateAction<number>>;
4727
+ compareOptions: import("@layerfi/components/types/profit_and_loss").TagComparisonOption[];
4728
+ selectedCompareOptions: import("@layerfi/components/types/profit_and_loss").TagComparisonOption[];
4729
+ setSelectedCompareOptions: (values: import("react-select").MultiValue<{
4730
+ value: string;
4731
+ label: string;
4732
+ }>) => void;
4714
4733
  getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat) => Promise<{
4715
4734
  data?: S3PresignedUrl;
4716
4735
  error?: unknown;
4717
4736
  }>;
4737
+ comparisonConfig: import("@layerfi/components/types/profit_and_loss").ProfitAndLossCompareConfig | undefined;
4718
4738
  }>;
4719
4739
 
4720
4740
  }
@@ -4814,6 +4834,7 @@ declare module '@layerfi/components/hooks/useAuth' {
4814
4834
  expires_in: number;
4815
4835
  apiUrl: "https://api.layerfi.com" | "https://sandbox.layerfi.com" | "https://staging.layerfi.com";
4816
4836
  }, any, {
4837
+ keepPreviousData: true;
4817
4838
  revalidateOnFocus: true;
4818
4839
  revalidateOnReconnect: true;
4819
4840
  refreshInterval: (latestData: {
@@ -4846,9 +4867,9 @@ declare module '@layerfi/components/hooks/useBankTransactions/index' {
4846
4867
 
4847
4868
  }
4848
4869
  declare module '@layerfi/components/hooks/useBankTransactions/types' {
4849
- import { TagFilterInput } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
4850
4870
  import { BankTransaction, CategoryUpdate, DateRange, Direction, DisplayState, Metadata } from '@layerfi/components/types';
4851
4871
  import { LoadedStatus } from '@layerfi/components/types/general';
4872
+ import { TagFilterInput } from '@layerfi/components/types/tags';
4852
4873
  export interface NumericRangeFilter {
4853
4874
  min?: number;
4854
4875
  max?: number;
@@ -5269,32 +5290,77 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/index' {
5269
5290
 
5270
5291
  }
5271
5292
  declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAndLossComparison' {
5272
- import { TagComparisonOption } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
5273
5293
  import { DateRange, MoneyFormat, ReportingBasis } from '@layerfi/components/types';
5294
+ import { MultiValue } from 'react-select';
5295
+ import { ProfitAndLossCompareConfig, TagComparisonOption } from '@layerfi/components/types/profit_and_loss';
5274
5296
  export type Scope = 'expenses' | 'revenue';
5275
5297
  export type SidebarScope = Scope | undefined;
5276
5298
  type Props = {
5277
5299
  reportingBasis?: ReportingBasis;
5300
+ comparisonConfig?: ProfitAndLossCompareConfig;
5278
5301
  };
5279
- export function useProfitAndLossComparison({ reportingBasis, }: Props): {
5302
+ export function useProfitAndLossComparison({ reportingBasis, comparisonConfig, }: Props): {
5280
5303
  data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
5281
5304
  isLoading: boolean;
5282
5305
  isValidating: boolean;
5283
- error: unknown;
5284
- compareMode: boolean;
5285
- setCompareMode: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5286
- compareMonths: number;
5287
- setCompareMonths: import("react").Dispatch<import("react").SetStateAction<number>>;
5306
+ isPeriodsSelectEnabled: boolean;
5307
+ compareModeActive: boolean;
5308
+ comparePeriods: number;
5309
+ setComparePeriods: import("react").Dispatch<import("react").SetStateAction<number>>;
5288
5310
  compareOptions: TagComparisonOption[];
5289
- setCompareOptions: import("react").Dispatch<import("react").SetStateAction<TagComparisonOption[]>>;
5290
- refetch: (dateRange: DateRange, actAsInitial?: boolean) => void;
5311
+ selectedCompareOptions: TagComparisonOption[];
5312
+ setSelectedCompareOptions: (values: MultiValue<{
5313
+ value: string;
5314
+ label: string;
5315
+ }>) => void;
5291
5316
  getProfitAndLossComparisonCsv: (dateRange: DateRange, moneyFormat?: MoneyFormat) => Promise<{
5292
5317
  data?: import("@layerfi/components/types/general").S3PresignedUrl;
5293
5318
  error?: unknown;
5294
5319
  }>;
5320
+ comparisonConfig: ProfitAndLossCompareConfig | undefined;
5295
5321
  };
5296
5322
  export {};
5297
5323
 
5324
+ }
5325
+ declare module '@layerfi/components/hooks/useProfitAndLossComparison/utils' {
5326
+ import { DateRange } from '@layerfi/components/types';
5327
+ import { DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
5328
+ import { TagComparisonOption } from '@layerfi/components/types/profit_and_loss';
5329
+ export function prepareFiltersBody(compareOptions: TagComparisonOption[]): ({
5330
+ required_tags: {
5331
+ key: string;
5332
+ value: string;
5333
+ }[];
5334
+ }[] & import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<{
5335
+ required_tags: {
5336
+ key: string;
5337
+ value: string;
5338
+ }[];
5339
+ }>) | undefined;
5340
+ export function preparePeriodsBody(dateRange: DateRange, comparePeriods: number, rangeDisplayMode: DateRangePickerMode): {
5341
+ type: "Comparison_Months";
5342
+ months: {
5343
+ year: number;
5344
+ month: number;
5345
+ }[] & import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<{
5346
+ year: number;
5347
+ month: number;
5348
+ }>;
5349
+ } | {
5350
+ type: "Comparison_Years";
5351
+ years: {
5352
+ year: number;
5353
+ }[] & import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<{
5354
+ year: number;
5355
+ }>;
5356
+ } | {
5357
+ readonly type: "Comparison_Date_Ranges";
5358
+ readonly date_ranges: readonly [{
5359
+ readonly start_date: string;
5360
+ readonly end_date: string;
5361
+ }];
5362
+ } | undefined;
5363
+
5298
5364
  }
5299
5365
  declare module '@layerfi/components/hooks/useProjects' {
5300
5366
  type TagKey = string;
@@ -6028,7 +6094,7 @@ declare module '@layerfi/components/providers/GlobalDateStore/useGlobalDateRange
6028
6094
  defaultDatePickerMode?: DateRangePickerMode;
6029
6095
  onSetMonth?: (startOfMonth: Date) => void;
6030
6096
  }): {
6031
- allowedDateRangePickerModes: readonly ["dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker", ...("dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker")[]];
6097
+ allowedDateRangePickerModes: import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<"dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker">;
6032
6098
  dateFormat: "MMM d" | undefined;
6033
6099
  rangeDisplayMode: "dayRangePicker" | "monthPicker" | "monthRangePicker" | "yearPicker";
6034
6100
  selected: Date | [Date, Date];
@@ -6211,6 +6277,86 @@ declare module '@layerfi/components/types/bank_transactions' {
6211
6277
  }
6212
6278
  export {};
6213
6279
 
6280
+ }
6281
+ declare module '@layerfi/components/types/bills' {
6282
+ import { TransactionTag } from '@layerfi/components/types/tags';
6283
+ import { Vendor } from '@layerfi/components/types/vendors';
6284
+ const UNPAID_STATUS_MAP: {
6285
+ readonly SENT: "SENT";
6286
+ readonly PARTIALLY_PAID: "PARTIALLY_PAID";
6287
+ };
6288
+ export type UnpaidStatuses = typeof UNPAID_STATUS_MAP[keyof typeof UNPAID_STATUS_MAP];
6289
+ export const UNPAID_STATUSES: ("SENT" | "PARTIALLY_PAID")[];
6290
+ const PAID_STATUS_MAP: {
6291
+ readonly PAID: "PAID";
6292
+ };
6293
+ export type PaidStatuses = typeof PAID_STATUS_MAP[keyof typeof PAID_STATUS_MAP];
6294
+ export const PAID_STATUS: "PAID";
6295
+ const VOIDED_STATUS_MAP: {
6296
+ readonly VOIDED: "VOIDED";
6297
+ };
6298
+ export type VoidedStatuses = typeof VOIDED_STATUS_MAP[keyof typeof VOIDED_STATUS_MAP];
6299
+ export const VOIDED_STATUS: "VOIDED";
6300
+ export type BillStatus = UnpaidStatuses | PaidStatuses | VoidedStatuses;
6301
+ type BillTerm = 'DUE_ON_RECEIPT' | 'NET_10' | 'NET_15' | 'NET_30' | 'NET_60';
6302
+ export const BillTerms: {
6303
+ id: BillTerm;
6304
+ label: string;
6305
+ }[];
6306
+ export type Bill = {
6307
+ additional_sales_taxes: SalesTax[];
6308
+ additional_sales_taxes_total: number;
6309
+ bill_number: string;
6310
+ business_id: string;
6311
+ due_at: string;
6312
+ external_id: string;
6313
+ id: string;
6314
+ imported_at: string;
6315
+ line_items: BillLineItem[];
6316
+ outstanding_balance: number;
6317
+ paid_at?: string;
6318
+ payment_allocations: BillPaymentAllocation[];
6319
+ received_at: string;
6320
+ status: BillStatus;
6321
+ subtotal: number;
6322
+ terms: BillTerm;
6323
+ total_amount: number;
6324
+ transaction_tags: TransactionTag[];
6325
+ type: 'Bill';
6326
+ updated_at: string;
6327
+ voided_at: string;
6328
+ vendor: Vendor;
6329
+ };
6330
+ type BillLineItem = {
6331
+ account_identifier: string;
6332
+ bill_id: string;
6333
+ description: string;
6334
+ external_id: string;
6335
+ id: string;
6336
+ product: string;
6337
+ quantity: number;
6338
+ sales_taxes: SalesTax[] | null;
6339
+ subtotal: number;
6340
+ total_amount: number;
6341
+ unit_price: number;
6342
+ };
6343
+ type BillPaymentAllocation = {
6344
+ bill_id: string;
6345
+ payment_id: string;
6346
+ amount: number;
6347
+ transaction_tags: TransactionTag[];
6348
+ };
6349
+ type SalesTax = {
6350
+ amount: number;
6351
+ tax_account: TaxAccount;
6352
+ };
6353
+ type TaxAccount = {
6354
+ id?: string;
6355
+ name?: string;
6356
+ type?: string;
6357
+ };
6358
+ export {};
6359
+
6214
6360
  }
6215
6361
  declare module '@layerfi/components/types/business' {
6216
6362
  export interface Business {
@@ -6781,7 +6927,10 @@ declare module '@layerfi/components/types/linked_accounts' {
6781
6927
 
6782
6928
  }
6783
6929
  declare module '@layerfi/components/types/profit_and_loss' {
6930
+ import type { ReportingBasis } from '@layerfi/components/types';
6931
+ import { ReadonlyArrayWithAtLeastOne } from '@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback';
6784
6932
  import { LineItem } from '@layerfi/components/types/line_item';
6933
+ import { TagViewConfig } from '@layerfi/components/types/tags';
6785
6934
  export interface ProfitAndLoss {
6786
6935
  type: 'Profit_And_Loss';
6787
6936
  business_id: string;
@@ -6798,6 +6947,15 @@ declare module '@layerfi/components/types/profit_and_loss' {
6798
6947
  personal_expenses?: LineItem | null;
6799
6948
  fully_categorized: boolean;
6800
6949
  }
6950
+ export interface TagComparisonOption {
6951
+ displayName: string;
6952
+ tagFilterConfig: TagViewConfig;
6953
+ }
6954
+ export interface ProfitAndLossCompareConfig {
6955
+ tagComparisonOptions: TagComparisonOption[];
6956
+ defaultTagFilter: TagComparisonOption;
6957
+ defaultPeriods?: number;
6958
+ }
6801
6959
  export interface ProfitAndLossComparison {
6802
6960
  type: string;
6803
6961
  pnls: ProfitAndLossComparisonItem[];
@@ -6817,6 +6975,35 @@ declare module '@layerfi/components/types/profit_and_loss' {
6817
6975
  personal_expenses?: LineItem | null;
6818
6976
  fully_categorized: boolean;
6819
6977
  }
6978
+ type ProfitAndLossComparisonPeriods = {
6979
+ type: 'Comparison_Months';
6980
+ months: ReadonlyArrayWithAtLeastOne<{
6981
+ year: number;
6982
+ month: number;
6983
+ }>;
6984
+ } | {
6985
+ type: 'Comparison_Years';
6986
+ years: ReadonlyArrayWithAtLeastOne<{
6987
+ year: number;
6988
+ }>;
6989
+ } | {
6990
+ type: 'Comparison_Date_Ranges';
6991
+ date_ranges: ReadonlyArrayWithAtLeastOne<{
6992
+ start_date: string;
6993
+ end_date: string;
6994
+ }>;
6995
+ };
6996
+ type ProfitAndLossComparisonTags = {
6997
+ required_tags?: ReadonlyArray<{
6998
+ key: string;
6999
+ value: string;
7000
+ }>;
7001
+ };
7002
+ export type ProfitAndLossComparisonRequestBody = {
7003
+ periods: ProfitAndLossComparisonPeriods;
7004
+ tag_filters?: ReadonlyArrayWithAtLeastOne<ProfitAndLossComparisonTags>;
7005
+ reporting_basis?: ReportingBasis;
7006
+ };
6820
7007
  export interface ProfitAndLossComparisonItem {
6821
7008
  period: {
6822
7009
  type: string;
@@ -6853,6 +7040,7 @@ declare module '@layerfi/components/types/profit_and_loss' {
6853
7040
  type: 'Profit_And_Loss_Summaries';
6854
7041
  months: ProfitAndLossSummary[];
6855
7042
  }
7043
+ export {};
6856
7044
 
6857
7045
  }
6858
7046
  declare module '@layerfi/components/types/quickbooks' {
@@ -6922,6 +7110,7 @@ declare module '@layerfi/components/types/table' {
6922
7110
  isHeaderCell?: boolean;
6923
7111
  align?: TableCellAlign;
6924
7112
  primary?: boolean;
7113
+ nowrap?: boolean;
6925
7114
  withExpandIcon?: boolean;
6926
7115
  fullWidth?: boolean;
6927
7116
  width?: string;
@@ -6930,6 +7119,25 @@ declare module '@layerfi/components/types/table' {
6930
7119
  onClick?: (e: React.MouseEvent<HTMLTableCellElement, MouseEvent>) => void;
6931
7120
  }
6932
7121
 
7122
+ }
7123
+ declare module '@layerfi/components/types/tags' {
7124
+ export type TransactionTag = {
7125
+ id: string;
7126
+ key: string;
7127
+ value: string;
7128
+ created_at: string;
7129
+ updated_at: string;
7130
+ deleted_at?: string;
7131
+ };
7132
+ export type TagFilterInput = {
7133
+ tagKey: string;
7134
+ tagValues: string[];
7135
+ } | 'None';
7136
+ export type TagViewConfig = {
7137
+ structure?: string;
7138
+ tagFilters: TagFilterInput;
7139
+ };
7140
+
6933
7141
  }
6934
7142
  declare module '@layerfi/components/types/tasks' {
6935
7143
  import { DocumentType } from '@layerfi/components/types/file_upload';
@@ -6988,8 +7196,25 @@ declare module '@layerfi/components/types/utility/oneOf' {
6988
7196
  declare module '@layerfi/components/types/utility/promises' {
6989
7197
  export type Awaitable<T> = T | Promise<T>;
6990
7198
 
7199
+ }
7200
+ declare module '@layerfi/components/types/vendors' {
7201
+ export type VendorStatus = 'ACTIVE' | 'ARCHIVED';
7202
+ export type Vendor = {
7203
+ id: string;
7204
+ external_id: string;
7205
+ individual_name?: string;
7206
+ company_name?: string;
7207
+ email?: string;
7208
+ mobile_phone?: string;
7209
+ office_phone?: string;
7210
+ address_string?: string;
7211
+ notes?: string;
7212
+ status: VendorStatus;
7213
+ };
7214
+
6991
7215
  }
6992
7216
  declare module '@layerfi/components/types' {
7217
+ import type { EnumWithUnknownValues } from '@layerfi/components/types/utility/enumWithUnknownValues';
6993
7218
  export { OAuthResponse } from '@layerfi/components/types/authentication';
6994
7219
  export { LayerContextValues, LayerContextActionName, LayerContextAction, LayerContextHelpers, } from '@layerfi/components/types/layer_context';
6995
7220
  export { Metadata } from '@layerfi/components/types/api';
@@ -7015,14 +7240,19 @@ declare module '@layerfi/components/types' {
7015
7240
  startDate: T;
7016
7241
  endDate: T;
7017
7242
  };
7018
- export type ReportingBasis = 'CASH' | 'ACCRUAL';
7243
+ type StrictReportingBasis = 'CASH' | 'CASH_COLLECTED' | 'ACCRUAL';
7244
+ export type ReportingBasis = EnumWithUnknownValues<StrictReportingBasis>;
7019
7245
  export type MoneyFormat = 'CENTS' | 'DOLLAR_STRING';
7020
7246
 
7021
7247
  }
7022
7248
  declare module '@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback' {
7023
- type ArrayWithAtLeastOne<T> = readonly [T, ...T[]];
7024
- export function getArrayWithAtLeastOneOrFallback<T>(list: ReadonlyArray<T>, fallback: ArrayWithAtLeastOne<T>): ArrayWithAtLeastOne<T>;
7025
- export {};
7249
+ export type ReadonlyArrayWithAtLeastOne<T> = readonly [T, ...T[]];
7250
+ export function isArrayWithAtLeastOne<T>(list: ReadonlyArray<T>): list is ReadonlyArrayWithAtLeastOne<T>;
7251
+ export function getArrayWithAtLeastOneOrFallback<T>(list: ReadonlyArray<T>, fallback: ReadonlyArrayWithAtLeastOne<T>): ReadonlyArrayWithAtLeastOne<T>;
7252
+
7253
+ }
7254
+ declare module '@layerfi/components/utils/array/range' {
7255
+ export function range(start: number, end: number): ReadonlyArray<number>;
7026
7256
 
7027
7257
  }
7028
7258
  declare module '@layerfi/components/utils/bankTransactions' {
@@ -7053,6 +7283,12 @@ declare module '@layerfi/components/utils/bankTransactions' {
7053
7283
  };
7054
7284
  export const hasReceipts: (bankTransaction?: BankTransaction) => boolean | undefined;
7055
7285
 
7286
+ }
7287
+ declare module '@layerfi/components/utils/bills' {
7288
+ import { Bill } from '@layerfi/components/types/bills';
7289
+ export const isBillPaid: (status?: Bill["status"]) => status is "PAID";
7290
+ export const isBillUnpaid: (status?: Bill["status"]) => boolean;
7291
+
7056
7292
  }
7057
7293
  declare module '@layerfi/components/utils/business' {
7058
7294
  import { Business } from '@layerfi/components/types';
@@ -7107,6 +7343,21 @@ declare module '@layerfi/components/utils/format' {
7107
7343
  * 100.001 -> 10000
7108
7344
  */
7109
7345
  export const convertToCents: (amount?: number | string) => number | undefined;
7346
+ /**
7347
+ * Convert amount from cents to dollars.
7348
+ * For example:
7349
+ * 10000 -> 100
7350
+ * 10001 -> 100.01
7351
+ */
7352
+ export const convertFromCents: (amount?: number | string) => number | undefined;
7353
+ /**
7354
+ * Convert cents amount to currency in dollars.
7355
+ */
7356
+ export const convertCentsToCurrency: (amount?: number | string) => string | undefined;
7357
+ /**
7358
+ * Format date to a given format. By default, it uses the DATE_FORMAT.
7359
+ */
7360
+ export const formatDate: (date?: string | Date, dateFormat?: string) => string;
7110
7361
 
7111
7362
  }
7112
7363
  declare module '@layerfi/components/utils/helpers' {
@@ -7128,8 +7379,9 @@ declare module '@layerfi/components/utils/journal' {
7128
7379
 
7129
7380
  }
7130
7381
  declare module '@layerfi/components/utils/profitAndLossComparisonUtils' {
7382
+ import { DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
7131
7383
  import { LineItem } from '@layerfi/components/types';
7132
- export const generatComparisonMonths: (startDate: number | Date, numberOfMonths: number) => string[];
7384
+ export const generateComparisonPeriods: (startDate: Date, numberOfPeriods: number, rangeDisplayMode: DateRangePickerMode) => string[];
7133
7385
  export const getComparisonValue: (name: string, depth: number, cellData: string | number | LineItem) => string | number;
7134
7386
  export const mergeComparisonLineItemsAtDepth: (lineItems: LineItem[]) => LineItem[];
7135
7387
 
@@ -7181,6 +7433,11 @@ declare module '@layerfi/components/utils/swr/defaultSWRConfig' {
7181
7433
  readonly revalidateIfStale: false;
7182
7434
  };
7183
7435
 
7436
+ }
7437
+ declare module '@layerfi/components/utils/vendors' {
7438
+ import { Vendor } from '@layerfi/components/types/vendors';
7439
+ export const getVendorName: (vendor?: Vendor) => string;
7440
+
7184
7441
  }
7185
7442
  declare module '@layerfi/components/utils/zustand/useStoreWithDateSelected' {
7186
7443
  import type { StoreApi } from 'zustand';
@@ -7374,13 +7631,13 @@ declare module '@layerfi/components/views/ProjectProfitability/index' {
7374
7631
  declare module '@layerfi/components/views/Reports/Reports' {
7375
7632
  import { RefObject } from 'react';
7376
7633
  import { BalanceSheetStringOverrides } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
7377
- import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
7378
7634
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
7379
7635
  import { PnLDownloadButtonStringOverrides } from '@layerfi/components/components/ProfitAndLossDownloadButton/index';
7380
7636
  import { ProfitAndLossTableStringOverrides } from '@layerfi/components/components/ProfitAndLossTable/index';
7381
7637
  import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
7382
7638
  import { View as ViewType } from '@layerfi/components/types/general';
7383
7639
  import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
7640
+ import { ProfitAndLossCompareConfig } from '@layerfi/components/types/profit_and_loss';
7384
7641
  type ViewBreakpoint = ViewType | undefined;
7385
7642
  export interface ReportsStringOverrides {
7386
7643
  title?: string;
@@ -7397,7 +7654,7 @@ declare module '@layerfi/components/views/Reports/Reports' {
7397
7654
  showTitle?: boolean;
7398
7655
  stringOverrides?: ReportsStringOverrides;
7399
7656
  enabledReports?: ReportType[];
7400
- comparisonConfig?: ProfitAndLossCompareOptionsProps;
7657
+ comparisonConfig?: ProfitAndLossCompareConfig;
7401
7658
  profitAndLossConfig?: TimeRangePickerConfig;
7402
7659
  statementOfCashFlowConfig?: TimeRangePickerConfig;
7403
7660
  }
@@ -7406,7 +7663,6 @@ declare module '@layerfi/components/views/Reports/Reports' {
7406
7663
  containerRef: RefObject<HTMLDivElement>;
7407
7664
  openReport: ReportType;
7408
7665
  stringOverrides?: ReportsStringOverrides;
7409
- comparisonConfig?: ProfitAndLossCompareOptionsProps;
7410
7666
  profitAndLossConfig?: TimeRangePickerConfig;
7411
7667
  statementOfCashFlowConfig?: TimeRangePickerConfig;
7412
7668
  view: ViewBreakpoint;