@layerfi/components 0.1.68 → 0.1.70
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/esm/index.js +11396 -11248
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +65 -20
- package/dist/index.js +11273 -11124
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +8 -0
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
66
66
|
direction?: 'INFLOW' | 'OUTFLOW';
|
|
67
67
|
startDate?: string;
|
|
68
68
|
endDate?: string;
|
|
69
|
+
tagFilterString?: string;
|
|
69
70
|
sortOrder?: 'ASC' | 'DESC';
|
|
70
71
|
sortBy?: string;
|
|
71
72
|
}
|
|
@@ -2615,7 +2616,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2615
2616
|
};
|
|
2616
2617
|
const ProfitAndLoss: {
|
|
2617
2618
|
({ children, tagFilter, reportingBasis, asContainer, }: Props): React.JSX.Element;
|
|
2618
|
-
Chart: ({ forceRerenderOnDataChange, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
|
|
2619
|
+
Chart: ({ forceRerenderOnDataChange, tagFilter, }: import("@layerfi/components/components/ProfitAndLossChart/ProfitAndLossChart").Props) => React.JSX.Element;
|
|
2619
2620
|
Context: React.Context<{
|
|
2620
2621
|
data: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
2621
2622
|
filteredDataRevenue: import("@layerfi/components/types/line_item").LineBaseItem[];
|
|
@@ -2633,6 +2634,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2633
2634
|
filters: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").ProfitAndLossFilters;
|
|
2634
2635
|
sortBy: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, field: string, direction?: import("../../types").SortDirection | undefined) => void;
|
|
2635
2636
|
setFilterTypes: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, types: string[]) => void;
|
|
2637
|
+
tagFilter?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").PnlTagFilter | undefined;
|
|
2636
2638
|
}>;
|
|
2637
2639
|
ComparisonContext: React.Context<{
|
|
2638
2640
|
data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
|
|
@@ -2652,14 +2654,14 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2652
2654
|
}>;
|
|
2653
2655
|
}>;
|
|
2654
2656
|
DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
|
|
2655
|
-
CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/
|
|
2657
|
+
CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/index").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
|
|
2656
2658
|
Summaries: ({ vertical, actionable, revenueLabel, stringOverrides, }: {
|
|
2657
2659
|
vertical?: boolean | undefined;
|
|
2658
2660
|
actionable?: boolean | undefined;
|
|
2659
2661
|
revenueLabel?: string | undefined;
|
|
2660
2662
|
stringOverrides?: import("@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries").ProfitAndLossSummariesStringOverrides | undefined;
|
|
2661
2663
|
}) => React.JSX.Element;
|
|
2662
|
-
Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").
|
|
2664
|
+
Table: (props: import("@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent").ProfitAndLossTableProps) => React.JSX.Element;
|
|
2663
2665
|
DetailedCharts: ({ scope, hideClose, showDatePicker, chartColorsList, stringOverrides, }: {
|
|
2664
2666
|
scope?: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
|
|
2665
2667
|
hideClose?: boolean | undefined;
|
|
@@ -2703,8 +2705,12 @@ declare module '@layerfi/components/components/ProfitAndLossChart/ProfitAndLossC
|
|
|
2703
2705
|
import React from 'react';
|
|
2704
2706
|
export interface Props {
|
|
2705
2707
|
forceRerenderOnDataChange?: boolean;
|
|
2708
|
+
tagFilter?: {
|
|
2709
|
+
key: string;
|
|
2710
|
+
values: string[];
|
|
2711
|
+
};
|
|
2706
2712
|
}
|
|
2707
|
-
export const ProfitAndLossChart: ({ forceRerenderOnDataChange, }: Props) => React.JSX.Element;
|
|
2713
|
+
export const ProfitAndLossChart: ({ forceRerenderOnDataChange, tagFilter, }: Props) => React.JSX.Element;
|
|
2708
2714
|
|
|
2709
2715
|
}
|
|
2710
2716
|
declare module '@layerfi/components/components/ProfitAndLossChart/index' {
|
|
@@ -2729,11 +2735,12 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/Profi
|
|
|
2729
2735
|
tagKey: string;
|
|
2730
2736
|
tagValues: string[];
|
|
2731
2737
|
} | 'None';
|
|
2738
|
+
export const tagFilterToQueryString: (tagFilter: TagFilterInput) => string;
|
|
2732
2739
|
export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => React.JSX.Element;
|
|
2733
2740
|
|
|
2734
2741
|
}
|
|
2735
2742
|
declare module '@layerfi/components/components/ProfitAndLossCompareOptions/index' {
|
|
2736
|
-
export { ProfitAndLossCompareOptions } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
|
|
2743
|
+
export { ProfitAndLossCompareOptions, ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
|
|
2737
2744
|
|
|
2738
2745
|
}
|
|
2739
2746
|
declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker' {
|
|
@@ -2872,7 +2879,7 @@ declare module '@layerfi/components/components/ProfitAndLossReport/ProfitAndLoss
|
|
|
2872
2879
|
import { View as ViewType } from '@layerfi/components/types/general';
|
|
2873
2880
|
import { ReportsStringOverrides } from '@layerfi/components/views/Reports/Reports';
|
|
2874
2881
|
import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
|
|
2875
|
-
import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/
|
|
2882
|
+
import { ProfitAndLossCompareOptionsProps } from '@layerfi/components/components/ProfitAndLossCompareOptions/index';
|
|
2876
2883
|
type ViewBreakpoint = ViewType | undefined;
|
|
2877
2884
|
export interface ProfitAndLossReportProps {
|
|
2878
2885
|
stringOverrides?: ReportsStringOverrides;
|
|
@@ -2937,18 +2944,18 @@ declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossT
|
|
|
2937
2944
|
profitBeforeTaxesLabel?: string;
|
|
2938
2945
|
netProfitLabel?: string;
|
|
2939
2946
|
}
|
|
2940
|
-
export type
|
|
2947
|
+
export type ProfitAndLossTableProps = {
|
|
2941
2948
|
lockExpanded?: boolean;
|
|
2942
2949
|
asContainer?: boolean;
|
|
2943
2950
|
stringOverrides?: ProfitAndLossTableStringOverrides;
|
|
2944
2951
|
};
|
|
2945
|
-
export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }:
|
|
2952
|
+
export const ProfitAndLossTableComponent: ({ asContainer, stringOverrides, }: ProfitAndLossTableProps) => React.JSX.Element;
|
|
2946
2953
|
|
|
2947
2954
|
}
|
|
2948
2955
|
declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableWithProvider' {
|
|
2949
2956
|
import React from 'react';
|
|
2950
|
-
import {
|
|
2951
|
-
export const ProfitAndLossTableWithProvider: (props:
|
|
2957
|
+
import { ProfitAndLossTableProps } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTableComponent';
|
|
2958
|
+
export const ProfitAndLossTableWithProvider: (props: ProfitAndLossTableProps) => React.JSX.Element;
|
|
2952
2959
|
|
|
2953
2960
|
}
|
|
2954
2961
|
declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_and_loss_report' {
|
|
@@ -3394,13 +3401,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
3394
3401
|
floating: HTMLElement | null;
|
|
3395
3402
|
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
3396
3403
|
context: {
|
|
3397
|
-
|
|
3404
|
+
placement: import("@floating-ui/utils").Placement;
|
|
3398
3405
|
x: number;
|
|
3399
3406
|
y: number;
|
|
3400
|
-
placement: import("@floating-ui/utils").Placement;
|
|
3401
3407
|
strategy: import("@floating-ui/utils").Strategy;
|
|
3402
3408
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
3403
3409
|
isPositioned: boolean;
|
|
3410
|
+
update: () => void;
|
|
3404
3411
|
floatingStyles: React.CSSProperties;
|
|
3405
3412
|
open: boolean;
|
|
3406
3413
|
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
@@ -3443,13 +3450,13 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
3443
3450
|
floating: HTMLElement | null;
|
|
3444
3451
|
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
3445
3452
|
context: {
|
|
3446
|
-
|
|
3453
|
+
placement: import("@floating-ui/utils").Placement;
|
|
3447
3454
|
x: number;
|
|
3448
3455
|
y: number;
|
|
3449
|
-
placement: import("@floating-ui/utils").Placement;
|
|
3450
3456
|
strategy: import("@floating-ui/utils").Strategy;
|
|
3451
3457
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
3452
3458
|
isPositioned: boolean;
|
|
3459
|
+
update: () => void;
|
|
3453
3460
|
floatingStyles: React.CSSProperties;
|
|
3454
3461
|
open: boolean;
|
|
3455
3462
|
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
@@ -3479,8 +3486,12 @@ declare module '@layerfi/components/components/TransactionToReviewCard/Transacti
|
|
|
3479
3486
|
export interface TransactionToReviewCardProps {
|
|
3480
3487
|
onClick?: () => void;
|
|
3481
3488
|
usePnlDateRange?: boolean;
|
|
3489
|
+
tagFilter?: {
|
|
3490
|
+
key: string;
|
|
3491
|
+
values: string[];
|
|
3492
|
+
};
|
|
3482
3493
|
}
|
|
3483
|
-
export const TransactionToReviewCard: ({ onClick, usePnlDateRange, }: TransactionToReviewCardProps) => React.JSX.Element;
|
|
3494
|
+
export const TransactionToReviewCard: ({ onClick, usePnlDateRange, tagFilter, }: TransactionToReviewCardProps) => React.JSX.Element;
|
|
3484
3495
|
|
|
3485
3496
|
}
|
|
3486
3497
|
declare module '@layerfi/components/components/TransactionToReviewCard/index' {
|
|
@@ -3998,6 +4009,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/index' {
|
|
|
3998
4009
|
|
|
3999
4010
|
}
|
|
4000
4011
|
declare module '@layerfi/components/hooks/useBankTransactions/types' {
|
|
4012
|
+
import { TagFilterInput } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
|
|
4001
4013
|
import { BankTransaction, CategoryUpdate, DateRange, Direction, DisplayState, Metadata } from '@layerfi/components/types';
|
|
4002
4014
|
import { LoadedStatus } from '@layerfi/components/types/general';
|
|
4003
4015
|
export interface NumericRangeFilter {
|
|
@@ -4014,6 +4026,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/types' {
|
|
|
4014
4026
|
direction?: Direction[];
|
|
4015
4027
|
categorizationStatus?: DisplayState;
|
|
4016
4028
|
dateRange?: Partial<DateRange>;
|
|
4029
|
+
tagFilter?: TagFilterInput;
|
|
4017
4030
|
}
|
|
4018
4031
|
export type UseBankTransactions = (params?: {
|
|
4019
4032
|
scope?: DisplayState;
|
|
@@ -4299,13 +4312,14 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
|
4299
4312
|
import { LineBaseItem } from '@layerfi/components/types/line_item';
|
|
4300
4313
|
export type Scope = 'expenses' | 'revenue';
|
|
4301
4314
|
export type SidebarScope = Scope | undefined;
|
|
4315
|
+
export type PnlTagFilter = {
|
|
4316
|
+
key: string;
|
|
4317
|
+
values: string[];
|
|
4318
|
+
};
|
|
4302
4319
|
type Props = {
|
|
4303
4320
|
startDate?: Date;
|
|
4304
4321
|
endDate?: Date;
|
|
4305
|
-
tagFilter?:
|
|
4306
|
-
key: string;
|
|
4307
|
-
values: string[];
|
|
4308
|
-
};
|
|
4322
|
+
tagFilter?: PnlTagFilter;
|
|
4309
4323
|
reportingBasis?: ReportingBasis;
|
|
4310
4324
|
};
|
|
4311
4325
|
type ProfitAndLossFilter = {
|
|
@@ -4331,6 +4345,7 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
|
4331
4345
|
filters: ProfitAndLossFilters;
|
|
4332
4346
|
sortBy: (scope: Scope, field: string, direction?: SortDirection) => void;
|
|
4333
4347
|
setFilterTypes: (scope: Scope, types: string[]) => void;
|
|
4348
|
+
tagFilter?: PnlTagFilter;
|
|
4334
4349
|
};
|
|
4335
4350
|
export const useProfitAndLoss: UseProfitAndLoss;
|
|
4336
4351
|
export {};
|
|
@@ -4838,6 +4853,7 @@ declare module '@layerfi/components/index' {
|
|
|
4838
4853
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
4839
4854
|
export { BankTransactionsWithLinkedAccounts } from '@layerfi/components/views/BankTransactionsWithLinkedAccounts/index';
|
|
4840
4855
|
export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/index';
|
|
4856
|
+
export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/index';
|
|
4841
4857
|
export { Reports } from '@layerfi/components/views/Reports/index';
|
|
4842
4858
|
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
|
|
4843
4859
|
export { useLayerContext } from '@layerfi/components/contexts/LayerContext/index';
|
|
@@ -5942,6 +5958,7 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
|
|
|
5942
5958
|
import { ProfitAndLossDetailedChartsStringOverrides } from '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts';
|
|
5943
5959
|
import { ProfitAndLossSummariesStringOverrides } from '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries';
|
|
5944
5960
|
import { OnboardingStep } from '@layerfi/components/types/layer_context';
|
|
5961
|
+
import { TagOption } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
|
|
5945
5962
|
interface AccountingOverviewStringOverrides {
|
|
5946
5963
|
header?: string;
|
|
5947
5964
|
profitAndLoss?: {
|
|
@@ -5958,8 +5975,10 @@ declare module '@layerfi/components/views/AccountingOverview/AccountingOverview'
|
|
|
5958
5975
|
middleBanner?: ReactNode;
|
|
5959
5976
|
chartColorsList?: string[];
|
|
5960
5977
|
stringOverrides?: AccountingOverviewStringOverrides;
|
|
5978
|
+
tagFilter?: TagOption;
|
|
5979
|
+
showTransactionsToReview?: boolean;
|
|
5961
5980
|
}
|
|
5962
|
-
export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, }: AccountingOverviewProps) => React.JSX.Element;
|
|
5981
|
+
export const AccountingOverview: ({ title, showTitle, enableOnboarding, onboardingStepOverride, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter, showTransactionsToReview, }: AccountingOverviewProps) => React.JSX.Element;
|
|
5963
5982
|
export {};
|
|
5964
5983
|
|
|
5965
5984
|
}
|
|
@@ -6049,6 +6068,32 @@ declare module '@layerfi/components/views/GeneralLedger/GeneralLedger' {
|
|
|
6049
6068
|
declare module '@layerfi/components/views/GeneralLedger/index' {
|
|
6050
6069
|
export { GeneralLedgerView } from '@layerfi/components/views/GeneralLedger/GeneralLedger';
|
|
6051
6070
|
|
|
6071
|
+
}
|
|
6072
|
+
declare module '@layerfi/components/views/ProjectProfitability/ProjectProfitability' {
|
|
6073
|
+
import React from 'react';
|
|
6074
|
+
import { DateRangeDatePickerModes } from '@layerfi/components/components/DatePicker/DatePicker';
|
|
6075
|
+
import { MoneyFormat } from '@layerfi/components/types';
|
|
6076
|
+
export type TagOption = {
|
|
6077
|
+
label: string;
|
|
6078
|
+
tagKey: string;
|
|
6079
|
+
tagValues: string[];
|
|
6080
|
+
};
|
|
6081
|
+
export interface ProjectsStringOverrides {
|
|
6082
|
+
title?: string;
|
|
6083
|
+
}
|
|
6084
|
+
export interface ProjectProfitabilityProps {
|
|
6085
|
+
valueOptions: TagOption[];
|
|
6086
|
+
showTitle?: boolean;
|
|
6087
|
+
stringOverrides?: ProjectsStringOverrides;
|
|
6088
|
+
datePickerMode?: DateRangeDatePickerModes;
|
|
6089
|
+
csvMoneyFormat?: MoneyFormat;
|
|
6090
|
+
}
|
|
6091
|
+
export const ProjectProfitabilityView: ({ valueOptions, showTitle, stringOverrides, datePickerMode, csvMoneyFormat, }: ProjectProfitabilityProps) => React.JSX.Element;
|
|
6092
|
+
|
|
6093
|
+
}
|
|
6094
|
+
declare module '@layerfi/components/views/ProjectProfitability/index' {
|
|
6095
|
+
export { ProjectProfitabilityView } from '@layerfi/components/views/ProjectProfitability/ProjectProfitability';
|
|
6096
|
+
|
|
6052
6097
|
}
|
|
6053
6098
|
declare module '@layerfi/components/views/Reports/Reports' {
|
|
6054
6099
|
import React, { RefObject } from 'react';
|