@layerfi/components 0.1.73 → 0.1.75
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/.idea/codeStyles/Project.xml +61 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/layer-react.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/dist/esm/index.js +12360 -11908
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +159 -11
- package/dist/index.js +12287 -11840
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +80 -12
- package/dist/styles/index.css.map +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1004,8 +1004,11 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
|
|
|
1004
1004
|
purpose: Purpose;
|
|
1005
1005
|
bankTransaction: BankTransaction;
|
|
1006
1006
|
showTooltips: boolean;
|
|
1007
|
+
showReceiptUploads?: boolean;
|
|
1008
|
+
showDescriptions?: boolean;
|
|
1009
|
+
isOpen?: boolean;
|
|
1007
1010
|
}
|
|
1008
|
-
export const BankTransactionMobileForms: ({ purpose, bankTransaction, showTooltips, }: BankTransactionMobileFormsProps) => React.JSX.Element;
|
|
1011
|
+
export const BankTransactionMobileForms: ({ purpose, bankTransaction, showTooltips, showReceiptUploads, showDescriptions, isOpen, }: BankTransactionMobileFormsProps) => React.JSX.Element;
|
|
1009
1012
|
export {};
|
|
1010
1013
|
|
|
1011
1014
|
}
|
|
@@ -1020,8 +1023,10 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
|
|
|
1020
1023
|
initialLoad?: boolean;
|
|
1021
1024
|
showTooltips: boolean;
|
|
1022
1025
|
mode: BankTransactionsMode;
|
|
1026
|
+
showReceiptUploads?: boolean;
|
|
1027
|
+
showDescriptions?: boolean;
|
|
1023
1028
|
}
|
|
1024
|
-
export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, showTooltips, mode, }: BankTransactionMobileListProps) => React.JSX.Element;
|
|
1029
|
+
export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, showTooltips, mode, showReceiptUploads, showDescriptions, }: BankTransactionMobileListProps) => React.JSX.Element;
|
|
1025
1030
|
|
|
1026
1031
|
}
|
|
1027
1032
|
declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem' {
|
|
@@ -1036,6 +1041,8 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
|
|
|
1036
1041
|
initialLoad?: boolean;
|
|
1037
1042
|
showTooltips: boolean;
|
|
1038
1043
|
mode: BankTransactionsMode;
|
|
1044
|
+
showDescriptions?: boolean;
|
|
1045
|
+
showReceiptUploads?: boolean;
|
|
1039
1046
|
isFirstItem?: boolean;
|
|
1040
1047
|
}
|
|
1041
1048
|
export enum Purpose {
|
|
@@ -1043,7 +1050,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
|
|
|
1043
1050
|
personal = "personal",
|
|
1044
1051
|
more = "more"
|
|
1045
1052
|
}
|
|
1046
|
-
export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, mode, initialLoad, showTooltips, isFirstItem, }: BankTransactionMobileListItemProps) => React.JSX.Element;
|
|
1053
|
+
export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, mode, initialLoad, showTooltips, isFirstItem, showDescriptions, showReceiptUploads, }: BankTransactionMobileListItemProps) => React.JSX.Element;
|
|
1047
1054
|
|
|
1048
1055
|
}
|
|
1049
1056
|
declare module '@layerfi/components/components/BankTransactionMobileList/BusinessCategories' {
|
|
@@ -1063,16 +1070,20 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Busines
|
|
|
1063
1070
|
interface BusinessFormProps {
|
|
1064
1071
|
bankTransaction: BankTransaction;
|
|
1065
1072
|
showTooltips: boolean;
|
|
1073
|
+
showReceiptUploads?: boolean;
|
|
1074
|
+
showDescriptions?: boolean;
|
|
1066
1075
|
}
|
|
1067
|
-
export const BusinessForm: ({ bankTransaction, showTooltips, }: BusinessFormProps) => React.JSX.Element;
|
|
1076
|
+
export const BusinessForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: BusinessFormProps) => React.JSX.Element;
|
|
1068
1077
|
export {};
|
|
1069
1078
|
|
|
1070
1079
|
}
|
|
1071
1080
|
declare module '@layerfi/components/components/BankTransactionMobileList/MatchForm' {
|
|
1072
1081
|
import React from 'react';
|
|
1073
1082
|
import { BankTransaction } from '@layerfi/components/types';
|
|
1074
|
-
export const MatchForm: ({ bankTransaction, }: {
|
|
1083
|
+
export const MatchForm: ({ bankTransaction, showReceiptUploads, showDescriptions, }: {
|
|
1075
1084
|
bankTransaction: BankTransaction;
|
|
1085
|
+
showReceiptUploads?: boolean | undefined;
|
|
1086
|
+
showDescriptions?: boolean | undefined;
|
|
1076
1087
|
}) => React.JSX.Element;
|
|
1077
1088
|
|
|
1078
1089
|
}
|
|
@@ -1081,8 +1092,11 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Persona
|
|
|
1081
1092
|
import { BankTransaction } from '@layerfi/components/types';
|
|
1082
1093
|
interface PersonalFormProps {
|
|
1083
1094
|
bankTransaction: BankTransaction;
|
|
1095
|
+
showReceiptUploads?: boolean;
|
|
1096
|
+
showDescriptions?: boolean;
|
|
1097
|
+
isOpen?: boolean;
|
|
1084
1098
|
}
|
|
1085
|
-
export const PersonalForm: ({ bankTransaction }: PersonalFormProps) => React.JSX.Element;
|
|
1099
|
+
export const PersonalForm: ({ bankTransaction, showReceiptUploads, isOpen, showDescriptions, }: PersonalFormProps) => React.JSX.Element;
|
|
1086
1100
|
export {};
|
|
1087
1101
|
|
|
1088
1102
|
}
|
|
@@ -1092,17 +1106,22 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
|
|
|
1092
1106
|
interface SplitAndMatchFormProps {
|
|
1093
1107
|
bankTransaction: BankTransaction;
|
|
1094
1108
|
showTooltips: boolean;
|
|
1109
|
+
showReceiptUploads?: boolean;
|
|
1110
|
+
showDescriptions?: boolean;
|
|
1111
|
+
isOpen?: boolean;
|
|
1095
1112
|
}
|
|
1096
|
-
export const SplitAndMatchForm: ({ bankTransaction, showTooltips, }: SplitAndMatchFormProps) => React.JSX.Element;
|
|
1113
|
+
export const SplitAndMatchForm: ({ bankTransaction, showTooltips, showReceiptUploads, isOpen, showDescriptions, }: SplitAndMatchFormProps) => React.JSX.Element;
|
|
1097
1114
|
export {};
|
|
1098
1115
|
|
|
1099
1116
|
}
|
|
1100
1117
|
declare module '@layerfi/components/components/BankTransactionMobileList/SplitForm' {
|
|
1101
1118
|
import React from 'react';
|
|
1102
1119
|
import { BankTransaction } from '@layerfi/components/types';
|
|
1103
|
-
export const SplitForm: ({ bankTransaction, showTooltips, }: {
|
|
1120
|
+
export const SplitForm: ({ bankTransaction, showTooltips, showReceiptUploads, showDescriptions, }: {
|
|
1104
1121
|
bankTransaction: BankTransaction;
|
|
1105
1122
|
showTooltips: boolean;
|
|
1123
|
+
showReceiptUploads?: boolean | undefined;
|
|
1124
|
+
showDescriptions?: boolean | undefined;
|
|
1106
1125
|
}) => React.JSX.Element;
|
|
1107
1126
|
|
|
1108
1127
|
}
|
|
@@ -1133,6 +1152,36 @@ declare module '@layerfi/components/components/BankTransactionMobileList/constan
|
|
|
1133
1152
|
declare module '@layerfi/components/components/BankTransactionMobileList/index' {
|
|
1134
1153
|
export { BankTransactionMobileList } from '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileList';
|
|
1135
1154
|
|
|
1155
|
+
}
|
|
1156
|
+
declare module '@layerfi/components/components/BankTransactionMobileList/useMemoText' {
|
|
1157
|
+
import React, { ReactNode } from 'react';
|
|
1158
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
1159
|
+
interface MemoTextProps {
|
|
1160
|
+
bankTransaction: BankTransaction;
|
|
1161
|
+
isActive?: boolean;
|
|
1162
|
+
}
|
|
1163
|
+
interface MemoTextProviderProps extends MemoTextProps {
|
|
1164
|
+
children: ReactNode;
|
|
1165
|
+
}
|
|
1166
|
+
export type MemoTextContextType = ReturnType<typeof useMemoText>;
|
|
1167
|
+
export const MemoTextContext: React.Context<{
|
|
1168
|
+
memoText: string | undefined;
|
|
1169
|
+
setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
1170
|
+
saveMemoText: () => Promise<void>;
|
|
1171
|
+
}>;
|
|
1172
|
+
export const useMemoTextContext: () => {
|
|
1173
|
+
memoText: string | undefined;
|
|
1174
|
+
setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
1175
|
+
saveMemoText: () => Promise<void>;
|
|
1176
|
+
};
|
|
1177
|
+
const useMemoText: ({ bankTransaction, isActive }: MemoTextProps) => {
|
|
1178
|
+
memoText: string | undefined;
|
|
1179
|
+
setMemoText: React.Dispatch<React.SetStateAction<string | undefined>>;
|
|
1180
|
+
saveMemoText: () => Promise<void>;
|
|
1181
|
+
};
|
|
1182
|
+
export const MemoTextProvider: ({ children, bankTransaction, isActive, }: MemoTextProviderProps) => React.JSX.Element;
|
|
1183
|
+
export {};
|
|
1184
|
+
|
|
1136
1185
|
}
|
|
1137
1186
|
declare module '@layerfi/components/components/BankTransactionMobileList/utils' {
|
|
1138
1187
|
import { BankTransaction, Category } from '@layerfi/components/types';
|
|
@@ -1153,6 +1202,39 @@ declare module '@layerfi/components/components/BankTransactionMobileList/utils'
|
|
|
1153
1202
|
export const flattenCategories: (categories: Category[]) => Option[];
|
|
1154
1203
|
export const getAssignedValue: (bankTransaction: BankTransaction) => Option | undefined;
|
|
1155
1204
|
|
|
1205
|
+
}
|
|
1206
|
+
declare module '@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts' {
|
|
1207
|
+
import React from 'react';
|
|
1208
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
1209
|
+
export interface DocumentWithStatus {
|
|
1210
|
+
id?: string;
|
|
1211
|
+
url?: string;
|
|
1212
|
+
status: 'pending' | 'uploaded' | 'failed' | 'deleting';
|
|
1213
|
+
type?: string;
|
|
1214
|
+
name?: string;
|
|
1215
|
+
date?: string;
|
|
1216
|
+
error?: string;
|
|
1217
|
+
}
|
|
1218
|
+
export interface BankTransactionReceiptsProps {
|
|
1219
|
+
classNamePrefix?: string;
|
|
1220
|
+
floatingActions?: boolean;
|
|
1221
|
+
hideUploadButtons?: boolean;
|
|
1222
|
+
label?: string;
|
|
1223
|
+
}
|
|
1224
|
+
export interface BankTransactionReceiptsWithProviderProps extends BankTransactionReceiptsProps {
|
|
1225
|
+
bankTransaction: BankTransaction;
|
|
1226
|
+
isActive?: boolean;
|
|
1227
|
+
}
|
|
1228
|
+
export interface BankTransactionReceiptsHandle {
|
|
1229
|
+
uploadReceipt: (file: File) => void;
|
|
1230
|
+
}
|
|
1231
|
+
export const BankTransactionReceiptsWithProvider: React.ForwardRefExoticComponent<BankTransactionReceiptsWithProviderProps & React.RefAttributes<BankTransactionReceiptsHandle>>;
|
|
1232
|
+
export const BankTransactionReceipts: React.ForwardRefExoticComponent<BankTransactionReceiptsProps & React.RefAttributes<BankTransactionReceiptsHandle>>;
|
|
1233
|
+
|
|
1234
|
+
}
|
|
1235
|
+
declare module '@layerfi/components/components/BankTransactionReceipts/index' {
|
|
1236
|
+
export { BankTransactionReceipts, BankTransactionReceiptsWithProvider, } from '@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts';
|
|
1237
|
+
|
|
1156
1238
|
}
|
|
1157
1239
|
declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
|
|
1158
1240
|
import React from 'react';
|
|
@@ -2006,6 +2088,7 @@ declare module '@layerfi/components/components/FileThumb/FileThumb' {
|
|
|
2006
2088
|
export interface FileThumbProps {
|
|
2007
2089
|
url?: string;
|
|
2008
2090
|
type?: string;
|
|
2091
|
+
floatingActions?: boolean;
|
|
2009
2092
|
uploadPending?: boolean;
|
|
2010
2093
|
deletePending?: boolean;
|
|
2011
2094
|
name?: string;
|
|
@@ -2016,7 +2099,7 @@ declare module '@layerfi/components/components/FileThumb/FileThumb' {
|
|
|
2016
2099
|
enableDownload?: boolean;
|
|
2017
2100
|
error?: string;
|
|
2018
2101
|
}
|
|
2019
|
-
export const FileThumb: ({ url, type, uploadPending, deletePending, name, date, onDelete, enableOpen, onOpen, enableDownload, error, }: FileThumbProps) => React.JSX.Element;
|
|
2102
|
+
export const FileThumb: ({ url, type, floatingActions, uploadPending, deletePending, name, date, onDelete, enableOpen, onOpen, enableDownload, error, }: FileThumbProps) => React.JSX.Element;
|
|
2020
2103
|
|
|
2021
2104
|
}
|
|
2022
2105
|
declare module '@layerfi/components/components/FileThumb/index' {
|
|
@@ -2109,8 +2192,10 @@ declare module '@layerfi/components/components/Input/FileInput' {
|
|
|
2109
2192
|
onUpload?: (file: File) => void;
|
|
2110
2193
|
disabled?: boolean;
|
|
2111
2194
|
secondary?: boolean;
|
|
2195
|
+
iconOnly?: boolean;
|
|
2196
|
+
icon?: React.ReactNode;
|
|
2112
2197
|
}
|
|
2113
|
-
export const FileInput: ({ text, onUpload, disabled, secondary, }: FileInputProps) => React.JSX.Element;
|
|
2198
|
+
export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, }: FileInputProps) => React.JSX.Element;
|
|
2114
2199
|
|
|
2115
2200
|
}
|
|
2116
2201
|
declare module '@layerfi/components/components/Input/Input' {
|
|
@@ -2809,7 +2894,6 @@ declare module '@layerfi/components/components/ProfitAndLossCompareOptions/Profi
|
|
|
2809
2894
|
tagKey: string;
|
|
2810
2895
|
tagValues: string[];
|
|
2811
2896
|
} | 'None';
|
|
2812
|
-
export const tagFilterToQueryString: (tagFilter: TagFilterInput) => string;
|
|
2813
2897
|
export const ProfitAndLossCompareOptions: ({ tagComparisonOptions, defaultTagFilter: defaultOption, }: ProfitAndLossCompareOptionsProps) => React.JSX.Element;
|
|
2814
2898
|
|
|
2815
2899
|
}
|
|
@@ -4010,6 +4094,26 @@ declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/Prof
|
|
|
4010
4094
|
declare module '@layerfi/components/contexts/ProfitAndLossComparisonContext/index' {
|
|
4011
4095
|
export { PNLComparisonContext } from '@layerfi/components/contexts/ProfitAndLossComparisonContext/ProfitAndLossComparisonContext';
|
|
4012
4096
|
|
|
4097
|
+
}
|
|
4098
|
+
declare module '@layerfi/components/contexts/ReceiptsContext/ReceiptsContext' {
|
|
4099
|
+
/// <reference types="react" />
|
|
4100
|
+
import { useReceipts } from '@layerfi/components/hooks/useReceipts/index';
|
|
4101
|
+
export type ReceiptsContextType = ReturnType<typeof useReceipts>;
|
|
4102
|
+
export const ReceiptsContext: import("react").Context<{
|
|
4103
|
+
receiptUrls: import("@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts").DocumentWithStatus[];
|
|
4104
|
+
uploadReceipt: (file: File) => void;
|
|
4105
|
+
archiveDocument: (document: import("@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts").DocumentWithStatus) => void;
|
|
4106
|
+
}>;
|
|
4107
|
+
export const useReceiptsContext: () => {
|
|
4108
|
+
receiptUrls: import("@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts").DocumentWithStatus[];
|
|
4109
|
+
uploadReceipt: (file: File) => void;
|
|
4110
|
+
archiveDocument: (document: import("@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts").DocumentWithStatus) => void;
|
|
4111
|
+
};
|
|
4112
|
+
|
|
4113
|
+
}
|
|
4114
|
+
declare module '@layerfi/components/contexts/ReceiptsContext/index' {
|
|
4115
|
+
export { ReceiptsContext } from '@layerfi/components/contexts/ReceiptsContext/ReceiptsContext';
|
|
4116
|
+
|
|
4013
4117
|
}
|
|
4014
4118
|
declare module '@layerfi/components/contexts/StatementOfCashContext/StatementOfCashFlowContext' {
|
|
4015
4119
|
/// <reference types="react" />
|
|
@@ -4532,6 +4636,26 @@ declare module '@layerfi/components/hooks/useQuickbooks/useQuickbooks' {
|
|
|
4532
4636
|
export const useQuickbooks: UseQuickbooks;
|
|
4533
4637
|
export {};
|
|
4534
4638
|
|
|
4639
|
+
}
|
|
4640
|
+
declare module '@layerfi/components/hooks/useReceipts/index' {
|
|
4641
|
+
export { useReceipts } from '@layerfi/components/hooks/useReceipts/useReceipts';
|
|
4642
|
+
|
|
4643
|
+
}
|
|
4644
|
+
declare module '@layerfi/components/hooks/useReceipts/useReceipts' {
|
|
4645
|
+
import { DocumentWithStatus } from '@layerfi/components/components/BankTransactionReceipts/BankTransactionReceipts';
|
|
4646
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
4647
|
+
export interface UseReceiptsProps {
|
|
4648
|
+
bankTransaction: BankTransaction;
|
|
4649
|
+
isActive?: boolean;
|
|
4650
|
+
}
|
|
4651
|
+
type UseReceipts = (props: UseReceiptsProps) => {
|
|
4652
|
+
receiptUrls: DocumentWithStatus[];
|
|
4653
|
+
uploadReceipt: (file: File) => void;
|
|
4654
|
+
archiveDocument: (document: DocumentWithStatus) => void;
|
|
4655
|
+
};
|
|
4656
|
+
export const useReceipts: UseReceipts;
|
|
4657
|
+
export {};
|
|
4658
|
+
|
|
4535
4659
|
}
|
|
4536
4660
|
declare module '@layerfi/components/hooks/useStatementOfCashFlow/index' {
|
|
4537
4661
|
export { useStatementOfCashFlow } from '@layerfi/components/hooks/useStatementOfCashFlow/useStatementOfCashFlow';
|
|
@@ -4800,6 +4924,13 @@ declare module '@layerfi/components/icons/MoreVertical' {
|
|
|
4800
4924
|
const MoreVertical: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
4801
4925
|
export default MoreVertical;
|
|
4802
4926
|
|
|
4927
|
+
}
|
|
4928
|
+
declare module '@layerfi/components/icons/Paperclip' {
|
|
4929
|
+
import React from 'react';
|
|
4930
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
4931
|
+
const Paperclip: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
4932
|
+
export default Paperclip;
|
|
4933
|
+
|
|
4803
4934
|
}
|
|
4804
4935
|
declare module '@layerfi/components/icons/PieChart' {
|
|
4805
4936
|
import * as React from 'react';
|
|
@@ -5049,6 +5180,22 @@ declare module '@layerfi/components/providers/LinkedAccountsProvider/LinkedAccou
|
|
|
5049
5180
|
declare module '@layerfi/components/providers/LinkedAccountsProvider/index' {
|
|
5050
5181
|
export { LinkedAccountsProvider } from '@layerfi/components/providers/LinkedAccountsProvider/LinkedAccountsProvider';
|
|
5051
5182
|
|
|
5183
|
+
}
|
|
5184
|
+
declare module '@layerfi/components/providers/ReceiptsProvider/ReceiptsProvider' {
|
|
5185
|
+
import React, { ReactNode } from 'react';
|
|
5186
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
5187
|
+
interface ReceiptsProviderProps {
|
|
5188
|
+
children: ReactNode;
|
|
5189
|
+
bankTransaction: BankTransaction;
|
|
5190
|
+
isActive?: boolean;
|
|
5191
|
+
}
|
|
5192
|
+
export const ReceiptsProvider: ({ children, bankTransaction, isActive, }: ReceiptsProviderProps) => React.JSX.Element;
|
|
5193
|
+
export {};
|
|
5194
|
+
|
|
5195
|
+
}
|
|
5196
|
+
declare module '@layerfi/components/providers/ReceiptsProvider/index' {
|
|
5197
|
+
export { ReceiptsProvider } from '@layerfi/components/providers/ReceiptsProvider/ReceiptsProvider';
|
|
5198
|
+
|
|
5052
5199
|
}
|
|
5053
5200
|
declare module '@layerfi/components/types/api' {
|
|
5054
5201
|
export interface PaginationMetadata {
|
|
@@ -5949,6 +6096,7 @@ declare module '@layerfi/components/utils/bankTransactions' {
|
|
|
5949
6096
|
exclusion_type?: undefined;
|
|
5950
6097
|
id?: undefined;
|
|
5951
6098
|
};
|
|
6099
|
+
export const hasReceipts: (bankTransaction?: BankTransaction) => boolean | undefined;
|
|
5952
6100
|
|
|
5953
6101
|
}
|
|
5954
6102
|
declare module '@layerfi/components/utils/business' {
|