@layerfi/components 0.1.71 → 0.1.73

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
@@ -222,6 +222,10 @@ declare module '@layerfi/components/api/layer/journal' {
222
222
  } | undefined) => Promise<{
223
223
  data: JournalEntry[];
224
224
  }>;
225
+ export const reverseJournalEntry: (baseUrl: string, accessToken: string | undefined, options?: {
226
+ params?: Record<string, string | undefined> | undefined;
227
+ body?: Record<string, unknown> | undefined;
228
+ } | undefined) => Promise<{}>;
225
229
 
226
230
  }
227
231
  declare module '@layerfi/components/api/layer/linked_accounts' {
@@ -605,6 +609,10 @@ declare module '@layerfi/components/api/layer' {
605
609
  } | undefined) => () => Promise<{
606
610
  data: import("@layerfi/components/types").JournalEntry[];
607
611
  }>;
612
+ reverseJournalEntry: (baseUrl: string, accessToken: string | undefined, options?: {
613
+ params?: Record<string, string | undefined> | undefined;
614
+ body?: Record<string, unknown> | undefined;
615
+ } | undefined) => Promise<{}>;
608
616
  compareProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
609
617
  params?: Record<string, string | undefined> | undefined;
610
618
  body?: Record<string, unknown> | undefined;
@@ -1604,6 +1612,7 @@ declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts'
1604
1612
  withExpandAllButton?: boolean;
1605
1613
  stringOverrides?: ChartOfAccountsStringOverrides;
1606
1614
  templateAccountsEditable?: boolean;
1615
+ showReversalEntries?: boolean;
1607
1616
  }
1608
1617
  export const ChartOfAccounts: (props: ChartOfAccountsProps) => React.JSX.Element;
1609
1618
 
@@ -1796,18 +1805,19 @@ declare module '@layerfi/components/components/DataState/index' {
1796
1805
 
1797
1806
  }
1798
1807
  declare module '@layerfi/components/components/DatePicker/DatePicker' {
1799
- import React from 'react';
1800
- export type DatePickerMode = 'dayPicker' | 'monthRangePicker' | 'timePicker' | DateRangeDatePickerModes;
1801
- export type DateRangeDatePickerModes = 'dayRangePicker' | 'monthPicker';
1808
+ import React, { type FC } from 'react';
1809
+ import { CustomDateRange } from '@layerfi/components/components/DatePicker/DatePickerOptions';
1810
+ import type { DatePickerMode, DatePickerModeSelectorProps } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
1802
1811
  interface DatePickerProps {
1803
1812
  mode: DatePickerMode;
1804
1813
  selected: Date | [Date | null, Date | null];
1805
1814
  onChange: (date: Date | [Date, Date | null]) => void;
1815
+ allowedModes?: ReadonlyArray<DatePickerMode>;
1806
1816
  dateFormat?: string;
1807
1817
  timeIntervals?: number;
1808
1818
  timeCaption?: string;
1809
1819
  placeholderText?: string;
1810
- options?: string[];
1820
+ customDateRanges?: CustomDateRange[];
1811
1821
  wrapperClassName?: string;
1812
1822
  calendarClassName?: string;
1813
1823
  popperClassName?: string;
@@ -1815,18 +1825,41 @@ declare module '@layerfi/components/components/DatePicker/DatePicker' {
1815
1825
  minDate?: Date;
1816
1826
  maxDate?: Date;
1817
1827
  navigateArrows?: boolean;
1828
+ onChangeMode?: (mode: DatePickerMode) => void;
1829
+ slots?: {
1830
+ ModeSelector: FC<DatePickerModeSelectorProps>;
1831
+ };
1818
1832
  }
1819
- export const DatePicker: ({ selected, onChange, mode, dateFormat, timeIntervals, timeCaption, placeholderText, options, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, ...props }: DatePickerProps) => React.JSX.Element;
1833
+ export const DatePicker: ({ selected, onChange, mode, allowedModes, dateFormat, timeIntervals, timeCaption, placeholderText, customDateRanges, wrapperClassName, calendarClassName, popperClassName, minDate, maxDate, currentDateOption, navigateArrows, onChangeMode, slots, ...props }: DatePickerProps) => React.JSX.Element;
1820
1834
  export {};
1821
1835
 
1822
1836
  }
1823
1837
  declare module '@layerfi/components/components/DatePicker/DatePickerOptions' {
1824
1838
  import React from 'react';
1825
- export const DatePickerOptions: ({ options, setSelectedDate, }: {
1826
- options: string[];
1839
+ export type CustomDateRange = {
1840
+ label: string;
1841
+ startDate: Date;
1842
+ endDate: Date;
1843
+ };
1844
+ export const DatePickerOptions: ({ customDateRanges, setSelectedDate, }: {
1845
+ customDateRanges?: CustomDateRange[] | undefined;
1827
1846
  setSelectedDate: (dates: [Date | null, Date | null]) => void;
1828
1847
  }) => React.JSX.Element;
1829
1848
 
1849
+ }
1850
+ declare module '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector' {
1851
+ import React from 'react';
1852
+ export type SingularPickerMode = 'dayPicker' | 'timePicker';
1853
+ export type RangePickerMode = 'dayRangePicker' | 'monthRangePicker' | 'monthPicker';
1854
+ export type DatePickerMode = SingularPickerMode | RangePickerMode;
1855
+ export const DEFAULT_ALLOWED_PICKER_MODES: readonly ["monthPicker"];
1856
+ export type DatePickerModeSelectorProps = {
1857
+ mode: DatePickerMode;
1858
+ allowedModes: ReadonlyArray<DatePickerMode>;
1859
+ onChangeMode: (mode: DatePickerMode) => void;
1860
+ };
1861
+ export function DatePickerModeSelector({ mode, allowedModes, onChangeMode, }: DatePickerModeSelectorProps): React.JSX.Element | null;
1862
+
1830
1863
  }
1831
1864
  declare module '@layerfi/components/components/DatePicker/index' {
1832
1865
  export { DatePicker } from '@layerfi/components/components/DatePicker/DatePicker';
@@ -2436,6 +2469,19 @@ declare module '@layerfi/components/components/LinkedAccountThumb/LinkedAccountT
2436
2469
  declare module '@layerfi/components/components/LinkedAccountThumb/index' {
2437
2470
  export { LinkedAccountThumb } from '@layerfi/components/components/LinkedAccountThumb/LinkedAccountThumb';
2438
2471
 
2472
+ }
2473
+ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountItemThumb' {
2474
+ import React from 'react';
2475
+ import { LinkedAccount } from '@layerfi/components/types/linked_accounts';
2476
+ export interface LinkedAccountItemThumbProps {
2477
+ account: LinkedAccount;
2478
+ asWidget?: boolean;
2479
+ showLedgerBalance?: boolean;
2480
+ showUnlinkItem?: boolean;
2481
+ showBreakConnection?: boolean;
2482
+ }
2483
+ export const LinkedAccountItemThumb: ({ account, asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, }: LinkedAccountItemThumbProps) => React.JSX.Element;
2484
+
2439
2485
  }
2440
2486
  declare module '@layerfi/components/components/LinkedAccounts/LinkedAccounts' {
2441
2487
  import React from 'react';
@@ -2467,6 +2513,7 @@ declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountsCont
2467
2513
  }
2468
2514
  declare module '@layerfi/components/components/LinkedAccounts/index' {
2469
2515
  export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/LinkedAccounts';
2516
+ export { LinkedAccountItemThumb } from '@layerfi/components/components/LinkedAccounts/LinkedAccountItemThumb';
2470
2517
 
2471
2518
  }
2472
2519
  declare module '@layerfi/components/components/Loader/Loader' {
@@ -2602,6 +2649,32 @@ declare module '@layerfi/components/components/Pill/Pill' {
2602
2649
  export const Pill: ({ children, kind, onHover }: Props) => React.JSX.Element;
2603
2650
  export {};
2604
2651
 
2652
+ }
2653
+ declare module '@layerfi/components/components/PlatformOnboarding/LinkAccounts' {
2654
+ import React from 'react';
2655
+ export interface LinkAccountsStringOverrides {
2656
+ backButtonText?: string;
2657
+ nextButtonText?: string;
2658
+ }
2659
+ export interface LinkAccountsProps {
2660
+ title?: string;
2661
+ asWidget?: boolean;
2662
+ showLedgerBalance?: boolean;
2663
+ showUnlinkItem?: boolean;
2664
+ showBreakConnection?: boolean;
2665
+ hideLoading?: boolean;
2666
+ inBox?: boolean;
2667
+ stringOverrides?: LinkAccountsStringOverrides;
2668
+ onBack?: () => void;
2669
+ onNext?: () => void;
2670
+ }
2671
+ export const LinkAccounts: ({ inBox, ...props }: LinkAccountsProps) => React.JSX.Element;
2672
+ export const LinkAccountsContent: ({ title, asWidget, showLedgerBalance, showUnlinkItem, showBreakConnection, hideLoading, stringOverrides, onBack, onNext, }: LinkAccountsProps) => React.JSX.Element;
2673
+
2674
+ }
2675
+ declare module '@layerfi/components/components/PlatformOnboarding/index' {
2676
+ export { LinkAccounts } from '@layerfi/components/components/PlatformOnboarding/LinkAccounts';
2677
+
2605
2678
  }
2606
2679
  declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2607
2680
  import React, { PropsWithChildren } from 'react';
@@ -2653,13 +2726,14 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2653
2726
  error?: unknown;
2654
2727
  }>;
2655
2728
  }>;
2656
- DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
2729
+ DatePicker: ({ allowedDatePickerModes, datePickerMode: deprecated_datePickerMode, defaultDatePickerMode, customDateRanges, }: import("@layerfi/components/views/Reports/reportTypes").TimeRangePickerConfig) => React.JSX.Element;
2657
2730
  CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
2658
- Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, }: {
2731
+ Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, chartColorsList, }: {
2659
2732
  vertical?: boolean | undefined;
2660
2733
  actionable?: boolean | undefined;
2661
2734
  revenueLabel?: string | undefined;
2662
2735
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
2736
+ chartColorsList?: string[] | undefined;
2663
2737
  }) => React.JSX.Element;
2664
2738
  Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
2665
2739
  DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
@@ -2670,7 +2744,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
2670
2744
  stringOverrides?: import("@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts").ProfitAndLossDetailedChartsStringOverrides | undefined;
2671
2745
  }) => React.JSX.Element;
2672
2746
  Header: ({ text, className, headingClassName, withDatePicker, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => React.JSX.Element;
2673
- Report: ({ stringOverrides, comparisonConfig, datePickerMode, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => React.JSX.Element;
2747
+ Report: ({ stringOverrides, comparisonConfig, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => React.JSX.Element;
2674
2748
  DownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossDownloadButton/ProfitAndLossDownloadButton").ProfitAndLossDownloadButtonProps) => React.JSX.Element;
2675
2749
  };
2676
2750
  export { ProfitAndLoss };
@@ -2745,11 +2819,9 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/index
2745
2819
  }
2746
2820
  declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
2747
2821
  import React from 'react';
2748
- import { DatePickerMode } from '@layerfi/components/components/DatePicker/DatePicker';
2749
- export type ProfitAndLossDatePickerProps = {
2750
- datePickerMode?: DatePickerMode;
2751
- };
2752
- export const ProfitAndLossDatePicker: ({ datePickerMode, }: ProfitAndLossDatePickerProps) => React.JSX.Element;
2822
+ import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
2823
+ export type ProfitAndLossDatePickerProps = TimeRangePickerConfig;
2824
+ export const ProfitAndLossDatePicker: ({ allowedDatePickerModes, datePickerMode: deprecated_datePickerMode, defaultDatePickerMode, customDateRanges, }: ProfitAndLossDatePickerProps) => React.JSX.Element;
2753
2825
 
2754
2826
  }
2755
2827
  declare module '@layerfi/components/components/ProfitAndLossDatePicker/index' {
@@ -2795,10 +2867,11 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Detai
2795
2867
  chartColorsList?: string[];
2796
2868
  stringOverrides?: DetailedTableStringOverrides;
2797
2869
  }
2798
- export const mapTypesToColors: (data: any[], colorList?: string[]) => {
2799
- color: any;
2800
- opacity: any;
2801
- }[];
2870
+ export interface TypeColorMapping {
2871
+ color: string;
2872
+ opacity: number;
2873
+ }
2874
+ export const mapTypesToColors: (data: LineBaseItem[], colorList?: string[]) => TypeColorMapping[];
2802
2875
  export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, chartColorsList, stringOverrides, }: DetailedTableProps) => React.JSX.Element;
2803
2876
 
2804
2877
  }
@@ -2875,21 +2948,18 @@ declare module '@layerfi/components/components/ProfitAndLossHeader/index' {
2875
2948
  }
2876
2949
  declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport' {
2877
2950
  import React, { RefObject } from 'react';
2878
- import { MoneyFormat } from '@layerfi/components/types';
2879
2951
  import { View as ViewType } from '@layerfi/components/types/general';
2880
2952
  import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
2881
- import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
2953
+ import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
2882
2954
  import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/index';
2883
2955
  type ViewBreakpoint = ViewType | undefined;
2884
- export interface ProfitAndLossReportProps {
2956
+ export type ProfitAndLossReportProps = {
2885
2957
  stringOverrides?: ReportsStringOverrides;
2886
2958
  comparisonConfig?: ProfitAndLossCompareOptionsProps;
2887
- datePickerMode?: DateRangeDatePickerModes;
2888
- csvMoneyFormat?: MoneyFormat;
2889
2959
  parentRef?: RefObject<HTMLDivElement>;
2890
2960
  view?: ViewBreakpoint;
2891
- }
2892
- export const ProfitAndLossReport: ({ stringOverrides, comparisonConfig, datePickerMode, csvMoneyFormat, parentRef, view, }: ProfitAndLossReportProps) => React.JSX.Element;
2961
+ } & TimeRangePickerConfig;
2962
+ export const ProfitAndLossReport: ({ stringOverrides, comparisonConfig, allowedDatePickerModes, datePickerMode, defaultDatePickerMode, customDateRanges, csvMoneyFormat, parentRef, view, }: ProfitAndLossReportProps) => React.JSX.Element;
2893
2963
  export {};
2894
2964
 
2895
2965
  }
@@ -2902,8 +2972,9 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/MiniChart'
2902
2972
  import { LineBaseItem } from '@layerfi/components/types/line_item';
2903
2973
  export interface MiniChartProps {
2904
2974
  data: LineBaseItem[];
2975
+ chartColorsList?: string[];
2905
2976
  }
2906
- export const MiniChart: ({ data }: MiniChartProps) => React.JSX.Element;
2977
+ export const MiniChart: ({ data, chartColorsList }: MiniChartProps) => React.JSX.Element;
2907
2978
 
2908
2979
  }
2909
2980
  declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
@@ -2913,13 +2984,17 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndL
2913
2984
  expensesLabel?: string;
2914
2985
  netProfitLabel?: string;
2915
2986
  }
2916
- type Props = {
2987
+ type ProfitAndLossSummariesProps = {
2917
2988
  vertical?: boolean;
2918
2989
  actionable?: boolean;
2990
+ /**
2991
+ * @deprecated Use `stringOverrides.revenueLabel` instead
2992
+ */
2919
2993
  revenueLabel?: string;
2920
2994
  stringOverrides?: ProfitAndLossSummariesStringOverrides;
2995
+ chartColorsList?: string[];
2921
2996
  };
2922
- export const ProfitAndLossSummaries: ({ vertical, actionable, revenueLabel, stringOverrides, }: Props) => React.JSX.Element;
2997
+ export const ProfitAndLossSummaries: ({ vertical, actionable, revenueLabel, stringOverrides, chartColorsList, }: ProfitAndLossSummariesProps) => React.JSX.Element;
2923
2998
  export {};
2924
2999
 
2925
3000
  }
@@ -3042,17 +3117,15 @@ declare module '@layerfi/components/components/SkeletonTableLoader/index' {
3042
3117
  }
3043
3118
  declare module '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow' {
3044
3119
  import React from 'react';
3045
- import { DatePickerMode, DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
3120
+ import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
3046
3121
  import { StatementOfCashFlowTableStringOverrides } from '@layerfi/components/components/StatementOfCashFlowTable/StatementOfCashFlowTable';
3047
3122
  export interface StatementOfCashFlowStringOverrides {
3048
3123
  statementOfCashFlowTable?: StatementOfCashFlowTableStringOverrides;
3049
- datePickerMode?: DatePickerMode;
3050
3124
  }
3051
- export interface StatementOfCashFlowProps {
3125
+ export type StatementOfCashFlowProps = {
3052
3126
  stringOverrides?: StatementOfCashFlowStringOverrides;
3053
- datePickerMode?: DateRangeDatePickerModes;
3054
- }
3055
- export const StatementOfCashFlow: ({ stringOverrides, datePickerMode, }: StatementOfCashFlowProps) => React.JSX.Element;
3127
+ } & TimeRangePickerConfig;
3128
+ export const StatementOfCashFlow: (props: StatementOfCashFlowProps) => React.JSX.Element;
3056
3129
 
3057
3130
  }
3058
3131
  declare module '@layerfi/components/components/StatementOfCashFlow/constants' {
@@ -3835,6 +3908,7 @@ declare module '@layerfi/components/contexts/JournalContext/JournalContext' {
3835
3908
  setForm: (form?: import("@layerfi/components/hooks/useJournal/useJournal").JournalFormTypes | undefined) => void;
3836
3909
  addEntryLine: (direction: import("@layerfi/components/index").Direction) => void;
3837
3910
  removeEntryLine: (index: number) => void;
3911
+ reverseEntry: (entryId: string) => Promise<{}>;
3838
3912
  }>;
3839
3913
 
3840
3914
  }
@@ -4188,6 +4262,7 @@ declare module '@layerfi/components/hooks/useJournal/index' {
4188
4262
 
4189
4263
  }
4190
4264
  declare module '@layerfi/components/hooks/useJournal/useJournal' {
4265
+ import { Layer } from '@layerfi/components/api/layer';
4191
4266
  import { Direction, FormError, FormErrorWithId } from '@layerfi/components/types';
4192
4267
  import { LedgerAccountBalance } from '@layerfi/components/types/chart_of_accounts';
4193
4268
  import { BaseSelectOption } from '@layerfi/components/types/general';
@@ -4215,6 +4290,7 @@ declare module '@layerfi/components/hooks/useJournal/useJournal' {
4215
4290
  setForm: (form?: JournalFormTypes) => void;
4216
4291
  addEntryLine: (direction: Direction) => void;
4217
4292
  removeEntryLine: (index: number) => void;
4293
+ reverseEntry: (entryId: string) => ReturnType<typeof Layer.reverseJournalEntry>;
4218
4294
  };
4219
4295
  export interface JournalFormTypes {
4220
4296
  action: string;
@@ -4234,7 +4310,7 @@ declare module '@layerfi/components/hooks/useLedgerAccounts/index' {
4234
4310
  }
4235
4311
  declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
4236
4312
  import { LedgerAccounts, LedgerAccountsEntry } from '@layerfi/components/types';
4237
- type UseLedgerAccounts = () => {
4313
+ type UseLedgerAccounts = (showReversalEntries: Boolean) => {
4238
4314
  data?: LedgerAccounts;
4239
4315
  entryData?: LedgerAccountsEntry;
4240
4316
  isLoading?: boolean;
@@ -4848,6 +4924,7 @@ declare module '@layerfi/components/index' {
4848
4924
  export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
4849
4925
  export { Journal } from '@layerfi/components/components/Journal/index';
4850
4926
  export { Tasks } from '@layerfi/components/components/Tasks/index';
4927
+ export { LinkAccounts } from '@layerfi/components/components/PlatformOnboarding/index';
4851
4928
  export { BookkeepingUpsellBar } from '@layerfi/components/components/UpsellBanner/index';
4852
4929
  export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/index';
4853
4930
  export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
@@ -6054,6 +6131,7 @@ declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
6054
6131
  }
6055
6132
  export interface ChartOfAccountsOptions {
6056
6133
  templateAccountsEditable?: boolean;
6134
+ showReversalEntries?: boolean;
6057
6135
  }
6058
6136
  export interface GeneralLedgerProps {
6059
6137
  title?: string;
@@ -6070,7 +6148,7 @@ declare module '@layerfi/components/views/GeneralLedger/index' {
6070
6148
  }
6071
6149
  declare module '@layerfi/components/views/ProjectProfitability/ProjectProfitability' {
6072
6150
  import React from 'react';
6073
- import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
6151
+ import { RangePickerMode } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
6074
6152
  import { MoneyFormat } from '@layerfi/components/types';
6075
6153
  export type TagOption = {
6076
6154
  label: string;
@@ -6084,7 +6162,7 @@ declare module '@layerfi/components/views/ProjectProfitability/ProjectProfitabil
6084
6162
  valueOptions: TagOption[];
6085
6163
  showTitle?: boolean;
6086
6164
  stringOverrides?: ProjectsStringOverrides;
6087
- datePickerMode?: DateRangeDatePickerModes;
6165
+ datePickerMode?: RangePickerMode;
6088
6166
  csvMoneyFormat?: MoneyFormat;
6089
6167
  }
6090
6168
  export const ProjectProfitabilityView: ({ valueOptions, showTitle, stringOverrides, datePickerMode, csvMoneyFormat, }: ProjectProfitabilityProps) => React.JSX.Element;
@@ -6097,14 +6175,13 @@ declare module '@layerfi/components/views/ProjectProfitability/index' {
6097
6175
  declare module '@layerfi/components/views/Reports/Reports' {
6098
6176
  import React, { RefObject } from 'react';
6099
6177
  import { BalanceSheetStringOverrides } from '@layerfi/components/components/BalanceSheet/BalanceSheet';
6100
- import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
6101
6178
  import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
6102
6179
  import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
6103
6180
  import { PnLDownloadButtonStringOverrides } from '@layerfi/components/components/ProfitAndLossDownloadButton/index';
6104
6181
  import { ProfitAndLossTableStringOverrides } from '@layerfi/components/components/ProfitAndLossTable/index';
6105
6182
  import { StatementOfCashFlowStringOverrides } from '@layerfi/components/components/StatementOfCashFlow/StatementOfCashFlow';
6106
- import { MoneyFormat } from '@layerfi/components/types';
6107
6183
  import { View as ViewType } from '@layerfi/components/types/general';
6184
+ import type { TimeRangePickerConfig } from '@layerfi/components/views/Reports/reportTypes';
6108
6185
  type ViewBreakpoint = ViewType | undefined;
6109
6186
  export interface ReportsStringOverrides {
6110
6187
  title?: string;
@@ -6122,13 +6199,8 @@ declare module '@layerfi/components/views/Reports/Reports' {
6122
6199
  stringOverrides?: ReportsStringOverrides;
6123
6200
  enabledReports?: ReportType[];
6124
6201
  comparisonConfig?: ProfitAndLossCompareOptionsProps;
6125
- profitAndLossConfig?: {
6126
- datePickerMode?: DateRangeDatePickerModes;
6127
- csvMoneyFormat?: MoneyFormat;
6128
- };
6129
- statementOfCashFlowConfig?: {
6130
- datePickerMode?: DateRangeDatePickerModes;
6131
- };
6202
+ profitAndLossConfig?: TimeRangePickerConfig;
6203
+ statementOfCashFlowConfig?: TimeRangePickerConfig;
6132
6204
  }
6133
6205
  type ReportType = 'profitAndLoss' | 'balanceSheet' | 'statementOfCashFlow';
6134
6206
  export interface ReportsPanelProps {
@@ -6136,13 +6208,8 @@ declare module '@layerfi/components/views/Reports/Reports' {
6136
6208
  openReport: ReportType;
6137
6209
  stringOverrides?: ReportsStringOverrides;
6138
6210
  comparisonConfig?: ProfitAndLossCompareOptionsProps;
6139
- profitAndLossConfig?: {
6140
- datePickerMode?: DateRangeDatePickerModes;
6141
- csvMoneyFormat?: MoneyFormat;
6142
- };
6143
- statementOfCashFlowConfig?: {
6144
- datePickerMode?: DateRangeDatePickerModes;
6145
- };
6211
+ profitAndLossConfig?: TimeRangePickerConfig;
6212
+ statementOfCashFlowConfig?: TimeRangePickerConfig;
6146
6213
  view: ViewBreakpoint;
6147
6214
  }
6148
6215
  export const Reports: ({ title, showTitle, stringOverrides, enabledReports, comparisonConfig, profitAndLossConfig, statementOfCashFlowConfig, }: ReportsProps) => React.JSX.Element;
@@ -6152,6 +6219,22 @@ declare module '@layerfi/components/views/Reports/Reports' {
6152
6219
  declare module '@layerfi/components/views/Reports/index' {
6153
6220
  export { Reports } from '@layerfi/components/views/Reports/Reports';
6154
6221
 
6222
+ }
6223
+ declare module '@layerfi/components/views/Reports/reportTypes' {
6224
+ import type { CustomDateRange } from '@layerfi/components/components/DatePicker/DatePickerOptions';
6225
+ import type { RangePickerMode } from '@layerfi/components/components/DatePicker/ModeSelector/DatePickerModeSelector';
6226
+ import type { MoneyFormat } from '@layerfi/components/types';
6227
+ export type TimeRangePickerConfig = {
6228
+ /**
6229
+ * @deprecated Use `defaultDatePickerMode` instead
6230
+ */
6231
+ datePickerMode?: RangePickerMode;
6232
+ defaultDatePickerMode?: RangePickerMode;
6233
+ allowedDatePickerModes?: ReadonlyArray<RangePickerMode>;
6234
+ csvMoneyFormat?: MoneyFormat;
6235
+ customDateRanges?: CustomDateRange[];
6236
+ };
6237
+
6155
6238
  }
6156
6239
  declare module '@layerfi/components' {
6157
6240
  import main = require('@layerfi/components/index');