@layerfi/components 0.1.65 → 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 +250 -204
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +43 -7
- package/dist/index.js +235 -189
- 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;
|
|
@@ -985,8 +999,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Busines
|
|
|
985
999
|
export interface BusinessCategoriesProps {
|
|
986
1000
|
select: (category: Option) => void;
|
|
987
1001
|
selectedId?: string;
|
|
1002
|
+
showTooltips: boolean;
|
|
988
1003
|
}
|
|
989
|
-
export const BusinessCategories: ({ select, selectedId, }: BusinessCategoriesProps) => React.JSX.Element;
|
|
1004
|
+
export const BusinessCategories: ({ select, selectedId, showTooltips }: BusinessCategoriesProps) => React.JSX.Element;
|
|
990
1005
|
|
|
991
1006
|
}
|
|
992
1007
|
declare module '@layerfi/components/components/BankTransactionMobileList/BusinessForm' {
|
|
@@ -1307,8 +1322,9 @@ declare module '@layerfi/components/components/Button/Button' {
|
|
|
1307
1322
|
justify?: ButtonJustify;
|
|
1308
1323
|
fullWidth?: boolean;
|
|
1309
1324
|
isProcessing?: boolean;
|
|
1325
|
+
tooltip?: ReactNode | string;
|
|
1310
1326
|
}
|
|
1311
|
-
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;
|
|
1312
1328
|
|
|
1313
1329
|
}
|
|
1314
1330
|
declare module '@layerfi/components/components/Button/CloseButton' {
|
|
@@ -1321,6 +1337,7 @@ declare module '@layerfi/components/components/Button/CloseButton' {
|
|
|
1321
1337
|
}
|
|
1322
1338
|
declare module '@layerfi/components/components/Button/DownloadButton' {
|
|
1323
1339
|
import React from 'react';
|
|
1340
|
+
import { ButtonProps } from '@layerfi/components/components/Button/Button';
|
|
1324
1341
|
interface DownloadButtonProps {
|
|
1325
1342
|
onClick?: () => void | Promise<void>;
|
|
1326
1343
|
iconOnly?: boolean;
|
|
@@ -1329,8 +1346,9 @@ declare module '@layerfi/components/components/Button/DownloadButton' {
|
|
|
1329
1346
|
text?: string;
|
|
1330
1347
|
retryText?: string;
|
|
1331
1348
|
errorText?: string;
|
|
1349
|
+
tooltip?: ButtonProps['tooltip'];
|
|
1332
1350
|
}
|
|
1333
|
-
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;
|
|
1334
1352
|
export {};
|
|
1335
1353
|
|
|
1336
1354
|
}
|
|
@@ -1395,6 +1413,7 @@ declare module '@layerfi/components/components/Button/RetryButton' {
|
|
|
1395
1413
|
}
|
|
1396
1414
|
declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
1397
1415
|
import React, { ButtonHTMLAttributes } from 'react';
|
|
1416
|
+
import { ButtonProps } from '@layerfi/components/components/Button/Button';
|
|
1398
1417
|
export interface SubmitButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
1399
1418
|
processing?: boolean;
|
|
1400
1419
|
disabled?: boolean;
|
|
@@ -1403,6 +1422,7 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
1403
1422
|
iconOnly?: boolean;
|
|
1404
1423
|
action?: SubmitAction;
|
|
1405
1424
|
noIcon?: boolean;
|
|
1425
|
+
tooltip?: ButtonProps['tooltip'];
|
|
1406
1426
|
}
|
|
1407
1427
|
export enum SubmitAction {
|
|
1408
1428
|
SAVE = "save",
|
|
@@ -1510,8 +1530,9 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelectDraw
|
|
|
1510
1530
|
interface CategorySelectDrawerProps {
|
|
1511
1531
|
onSelect: (value: CategoryOption) => void;
|
|
1512
1532
|
selected?: CategoryOption;
|
|
1533
|
+
showTooltips: boolean;
|
|
1513
1534
|
}
|
|
1514
|
-
export const CategorySelectDrawer: ({ onSelect, selected, }: CategorySelectDrawerProps) => React.JSX.Element;
|
|
1535
|
+
export const CategorySelectDrawer: ({ onSelect, selected, showTooltips, }: CategorySelectDrawerProps) => React.JSX.Element;
|
|
1515
1536
|
export {};
|
|
1516
1537
|
|
|
1517
1538
|
}
|
|
@@ -2543,6 +2564,10 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2543
2564
|
compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
|
|
2544
2565
|
setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
|
|
2545
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
|
+
}>;
|
|
2546
2571
|
}>;
|
|
2547
2572
|
DatePicker: ({ datePickerMode, }: import("@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker").ProfitAndLossDatePickerProps) => React.JSX.Element;
|
|
2548
2573
|
CompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").ProfitAndLossCompareOptionsProps) => React.JSX.Element;
|
|
@@ -2562,7 +2587,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
2562
2587
|
}) => React.JSX.Element;
|
|
2563
2588
|
Header: ({ text, className, headingClassName, withDatePicker, }: import("@layerfi/components/components/ProfitAndLossHeader/ProfitAndLossHeader").ProfitAndLossHeaderProps) => React.JSX.Element;
|
|
2564
2589
|
Report: ({ stringOverrides, comparisonConfig, datePickerMode, csvMoneyFormat, parentRef, view, }: import("@layerfi/components/components/ProfitAndLossReport/ProfitAndLossReport").ProfitAndLossReportProps) => React.JSX.Element;
|
|
2565
|
-
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;
|
|
2566
2591
|
};
|
|
2567
2592
|
export { ProfitAndLoss };
|
|
2568
2593
|
|
|
@@ -2732,10 +2757,11 @@ declare module '@layerfi/components/components/ProfitAndLossDownloadButton/Profi
|
|
|
2732
2757
|
}
|
|
2733
2758
|
export interface ProfitAndLossDownloadButtonProps {
|
|
2734
2759
|
stringOverrides?: PnLDownloadButtonStringOverrides;
|
|
2760
|
+
useComparisonPnl?: boolean;
|
|
2735
2761
|
moneyFormat?: MoneyFormat;
|
|
2736
2762
|
view: ViewBreakpoint;
|
|
2737
2763
|
}
|
|
2738
|
-
export const ProfitAndLossDownloadButton: ({ stringOverrides, moneyFormat, view, }: ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2764
|
+
export const ProfitAndLossDownloadButton: ({ stringOverrides, useComparisonPnl, moneyFormat, view, }: ProfitAndLossDownloadButtonProps) => React.JSX.Element;
|
|
2739
2765
|
export {};
|
|
2740
2766
|
|
|
2741
2767
|
}
|
|
@@ -3792,6 +3818,7 @@ declare module '@layerfi/components/contexts/LinkedAccountsContext/index' {
|
|
|
3792
3818
|
}
|
|
3793
3819
|
declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/ProfitAndLossComparisonContext' {
|
|
3794
3820
|
/// <reference types="react" />
|
|
3821
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
3795
3822
|
export const PNLComparisonContext: import("react").Context<{
|
|
3796
3823
|
data: import("@layerfi/components/types/profit_and_loss").ProfitAndLossComparisonItem[] | undefined;
|
|
3797
3824
|
isLoading: boolean;
|
|
@@ -3804,6 +3831,10 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/Prof
|
|
|
3804
3831
|
compareOptions: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[];
|
|
3805
3832
|
setCompareOptions: (options: import("@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions").TagComparisonOption[]) => void;
|
|
3806
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
|
+
}>;
|
|
3807
3838
|
}>;
|
|
3808
3839
|
|
|
3809
3840
|
}
|
|
@@ -4281,7 +4312,8 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/index' {
|
|
|
4281
4312
|
}
|
|
4282
4313
|
declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAndLossComparison' {
|
|
4283
4314
|
import { TagComparisonOption } from '@layerfi/components/components/ProfitAndLossCompareOptions/ProfitAndLossCompareOptions';
|
|
4284
|
-
import { DateRange, ReportingBasis } from '@layerfi/components/types';
|
|
4315
|
+
import { DateRange, MoneyFormat, ReportingBasis } from '@layerfi/components/types';
|
|
4316
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
4285
4317
|
import { ProfitAndLossComparisonItem } from '@layerfi/components/types/profit_and_loss';
|
|
4286
4318
|
export type Scope = 'expenses' | 'revenue';
|
|
4287
4319
|
export type SidebarScope = Scope | undefined;
|
|
@@ -4300,6 +4332,10 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAn
|
|
|
4300
4332
|
compareOptions: TagComparisonOption[];
|
|
4301
4333
|
setCompareOptions: (options: TagComparisonOption[]) => void;
|
|
4302
4334
|
refetch: (dateRange: DateRange, actAsInitial?: boolean) => void;
|
|
4335
|
+
getProfitAndLossComparisonCsv: (dateRange: DateRange, moneyFormat?: MoneyFormat) => Promise<{
|
|
4336
|
+
data?: S3PresignedUrl;
|
|
4337
|
+
error?: unknown;
|
|
4338
|
+
}>;
|
|
4303
4339
|
};
|
|
4304
4340
|
export const useProfitAndLossComparison: UseProfitAndLossComparison;
|
|
4305
4341
|
export {};
|