@layerfi/components 0.1.66 → 0.1.67
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 +228 -196
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +39 -5
- package/dist/index.js +213 -181
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +8 -0
- package/dist/styles/index.css.map +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -334,6 +334,13 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
|
334
334
|
data?: S3PresignedUrl | undefined;
|
|
335
335
|
error?: unknown;
|
|
336
336
|
}>;
|
|
337
|
+
export const profitAndLossComparisonCsv: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
338
|
+
params?: Record<string, string | undefined> | undefined;
|
|
339
|
+
body?: Record<string, unknown> | undefined;
|
|
340
|
+
} | undefined) => Promise<{
|
|
341
|
+
data?: S3PresignedUrl | undefined;
|
|
342
|
+
error?: unknown;
|
|
343
|
+
}>;
|
|
337
344
|
|
|
338
345
|
}
|
|
339
346
|
declare module '@layerfi/components/api/layer/quickbooks' {
|
|
@@ -568,6 +575,13 @@ declare module '@layerfi/components/api/layer' {
|
|
|
568
575
|
data?: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparison | undefined;
|
|
569
576
|
error?: unknown;
|
|
570
577
|
}>;
|
|
578
|
+
profitAndLossComparisonCsv: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
579
|
+
params?: Record<string, string | undefined> | undefined;
|
|
580
|
+
body?: Record<string, unknown> | undefined;
|
|
581
|
+
} | undefined) => Promise<{
|
|
582
|
+
data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
|
|
583
|
+
error?: unknown;
|
|
584
|
+
}>;
|
|
571
585
|
createJournalEntries: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
572
586
|
params?: Record<string, string | undefined> | undefined;
|
|
573
587
|
body?: Record<string, unknown> | undefined;
|
|
@@ -1308,8 +1322,9 @@ declare module '@layerfi/components/components/Button/Button' {
|
|
|
1308
1322
|
justify?: ButtonJustify;
|
|
1309
1323
|
fullWidth?: boolean;
|
|
1310
1324
|
isProcessing?: boolean;
|
|
1325
|
+
tooltip?: ReactNode | string;
|
|
1311
1326
|
}
|
|
1312
|
-
export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, justify, fullWidth, isProcessing, ...props }: ButtonProps) => React.JSX.Element;
|
|
1327
|
+
export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, justify, fullWidth, isProcessing, tooltip, ...props }: ButtonProps) => React.JSX.Element;
|
|
1313
1328
|
|
|
1314
1329
|
}
|
|
1315
1330
|
declare module '@layerfi/components/components/Button/CloseButton' {
|
|
@@ -1322,6 +1337,7 @@ declare module '@layerfi/components/components/Button/CloseButton' {
|
|
|
1322
1337
|
}
|
|
1323
1338
|
declare module '@layerfi/components/components/Button/DownloadButton' {
|
|
1324
1339
|
import React from 'react';
|
|
1340
|
+
import { ButtonProps } from '@layerfi/components/components/Button/Button';
|
|
1325
1341
|
interface DownloadButtonProps {
|
|
1326
1342
|
onClick?: () => void | Promise<void>;
|
|
1327
1343
|
iconOnly?: boolean;
|
|
@@ -1330,8 +1346,9 @@ declare module '@layerfi/components/components/Button/DownloadButton' {
|
|
|
1330
1346
|
text?: string;
|
|
1331
1347
|
retryText?: string;
|
|
1332
1348
|
errorText?: string;
|
|
1349
|
+
tooltip?: ButtonProps['tooltip'];
|
|
1333
1350
|
}
|
|
1334
|
-
export const DownloadButton: ({ iconOnly, onClick, isDownloading, requestFailed, text, retryText, errorText, }: DownloadButtonProps) => React.JSX.Element;
|
|
1351
|
+
export const DownloadButton: ({ iconOnly, onClick, isDownloading, requestFailed, tooltip, text, retryText, errorText, }: DownloadButtonProps) => React.JSX.Element;
|
|
1335
1352
|
export {};
|
|
1336
1353
|
|
|
1337
1354
|
}
|
|
@@ -1396,6 +1413,7 @@ declare module '@layerfi/components/components/Button/RetryButton' {
|
|
|
1396
1413
|
}
|
|
1397
1414
|
declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
1398
1415
|
import React, { ButtonHTMLAttributes } from 'react';
|
|
1416
|
+
import { ButtonProps } from '@layerfi/components/components/Button/Button';
|
|
1399
1417
|
export interface SubmitButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1400
1418
|
processing?: boolean;
|
|
1401
1419
|
disabled?: boolean;
|
|
@@ -1404,6 +1422,7 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
1404
1422
|
iconOnly?: boolean;
|
|
1405
1423
|
action?: SubmitAction;
|
|
1406
1424
|
noIcon?: boolean;
|
|
1425
|
+
tooltip?: ButtonProps['tooltip'];
|
|
1407
1426
|
}
|
|
1408
1427
|
export enum SubmitAction {
|
|
1409
1428
|
SAVE = "save",
|
|
@@ -2545,6 +2564,10 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2545
2564
|
compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
|
|
2546
2565
|
setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
|
|
2547
2566
|
refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean | undefined) => void;
|
|
2567
|
+
getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat | undefined) => Promise<{
|
|
2568
|
+
data?: import("@layerfi/components/types/general").S3PresignedUrl | undefined;
|
|
2569
|
+
error?: unknown;
|
|
2570
|
+
}>;
|
|
2548
2571
|
}>;
|
|
2549
2572
|
DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
|
|
2550
2573
|
CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
|
|
@@ -2564,7 +2587,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2564
2587
|
}) => React.JSX.Element;
|
|
2565
2588
|
Header: ({ text, className, headingClassName, withDatePicker, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => React.JSX.Element;
|
|
2566
2589
|
Report: ({ stringOverrides, comparisonConfig, datePickerMode, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => React.JSX.Element;
|
|
2567
|
-
DownloadButton: ({ stringOverrides, moneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossDownloadButton/ProfitAndLossDownloadButton").ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2590
|
+
DownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: import("@layerfi/components/components/ProfitAndLossDownloadButton/ProfitAndLossDownloadButton").ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2568
2591
|
};
|
|
2569
2592
|
export { ProfitAndLoss };
|
|
2570
2593
|
|
|
@@ -2734,10 +2757,11 @@ declare module '@layerfi/components/components/ProfitAndLossDownloadButton/Profi
|
|
|
2734
2757
|
}
|
|
2735
2758
|
export interface ProfitAndLossDownloadButtonProps {
|
|
2736
2759
|
stringOverrides?: PnLDownloadButtonStringOverrides;
|
|
2760
|
+
useComparisonPnl?: boolean;
|
|
2737
2761
|
moneyFormat?: MoneyFormat;
|
|
2738
2762
|
view: ViewBreakpoint;
|
|
2739
2763
|
}
|
|
2740
|
-
export const ProfitAndLossDownloadButton: ({ stringOverrides, moneyFormat, view, }: ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2764
|
+
export const ProfitAndLossDownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2741
2765
|
export {};
|
|
2742
2766
|
|
|
2743
2767
|
}
|
|
@@ -3794,6 +3818,7 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
|
|
|
3794
3818
|
}
|
|
3795
3819
|
declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/ProfitAndLossComparisonContext' {
|
|
3796
3820
|
/// <reference types="react" />
|
|
3821
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
3797
3822
|
export const PNLComparisonContext: import("react").Context<{
|
|
3798
3823
|
data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
|
|
3799
3824
|
isLoading: boolean;
|
|
@@ -3806,6 +3831,10 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/Prof
|
|
|
3806
3831
|
compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
|
|
3807
3832
|
setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
|
|
3808
3833
|
refetch: (dateRange: import("@layerfi/components/types").DateRange, actAsInitial?: boolean | undefined) => void;
|
|
3834
|
+
getProfitAndLossComparisonCsv: (dateRange: import("@layerfi/components/types").DateRange, moneyFormat?: import("../../types").MoneyFormat | undefined) => Promise<{
|
|
3835
|
+
data?: S3PresignedUrl | undefined;
|
|
3836
|
+
error?: unknown;
|
|
3837
|
+
}>;
|
|
3809
3838
|
}>;
|
|
3810
3839
|
|
|
3811
3840
|
}
|
|
@@ -4283,7 +4312,8 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/index' {
|
|
|
4283
4312
|
}
|
|
4284
4313
|
declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAndLossComparison' {
|
|
4285
4314
|
import { TagComparisonOption } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
|
|
4286
|
-
import { DateRange, ReportingBasis } from '@layerfi/components/types';
|
|
4315
|
+
import { DateRange, MoneyFormat, ReportingBasis } from '@layerfi/components/types';
|
|
4316
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
4287
4317
|
import { ProfitAndLossComparisonItem } from '@layerfi/components/types/profit_and_loss';
|
|
4288
4318
|
export type Scope = 'expenses' | 'revenue';
|
|
4289
4319
|
export type SidebarScope = Scope | undefined;
|
|
@@ -4302,6 +4332,10 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAn
|
|
|
4302
4332
|
compareOptions: TagComparisonOption[];
|
|
4303
4333
|
setCompareOptions: (options: TagComparisonOption[]) => void;
|
|
4304
4334
|
refetch: (dateRange: DateRange, actAsInitial?: boolean) => void;
|
|
4335
|
+
getProfitAndLossComparisonCsv: (dateRange: DateRange, moneyFormat?: MoneyFormat) => Promise<{
|
|
4336
|
+
data?: S3PresignedUrl;
|
|
4337
|
+
error?: unknown;
|
|
4338
|
+
}>;
|
|
4305
4339
|
};
|
|
4306
4340
|
export const useProfitAndLossComparison: UseProfitAndLossComparison;
|
|
4307
4341
|
export {};
|