@layerfi/components 0.1.101 → 0.1.102-alpha.1
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/README.md +0 -24
- package/dist/cjs/index.cjs +3662 -2579
- package/dist/esm/index.mjs +3660 -2571
- package/dist/index.css +157 -6
- package/dist/index.d.ts +287 -5
- package/package.json +4 -1
package/dist/index.css
CHANGED
|
@@ -547,10 +547,12 @@
|
|
|
547
547
|
.Layer__btn:disabled {
|
|
548
548
|
box-shadow: none;
|
|
549
549
|
background-color: var(--color-base-200);
|
|
550
|
-
color: var(--color-base-500);
|
|
551
550
|
cursor: not-allowed;
|
|
552
551
|
}
|
|
553
|
-
.Layer__btn:disabled .Layer__btn-
|
|
552
|
+
.Layer__btn:disabled > .Layer__btn-content > .Layer__btn-text {
|
|
553
|
+
color: var(--color-base-500);
|
|
554
|
+
}
|
|
555
|
+
.Layer__btn:disabled > .Layer__btn-content > .Layer__btn-icon {
|
|
554
556
|
background-color: transparent;
|
|
555
557
|
color: var(--color-base-500);
|
|
556
558
|
}
|
|
@@ -580,10 +582,6 @@
|
|
|
580
582
|
color: var(--btn-color-primary);
|
|
581
583
|
background: transparent;
|
|
582
584
|
}
|
|
583
|
-
.Layer__btn--primary:visited,
|
|
584
|
-
.Layer__btn--primary:active {
|
|
585
|
-
box-shadow: 0 0 0 1px var(--color-base-800);
|
|
586
|
-
}
|
|
587
585
|
.Layer__btn--primary:hover:not([disabled]) .Layer__btn-icon,
|
|
588
586
|
.Layer__btn--primary.Layer__btn--active:not([disabled]) .Layer__btn-icon {
|
|
589
587
|
color: var(--btn-color-icon-hover);
|
|
@@ -5322,6 +5320,111 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
5322
5320
|
.Layer__TransactionsSearchField > [slot=search] {
|
|
5323
5321
|
grid-area: search;
|
|
5324
5322
|
}
|
|
5323
|
+
.Layer__csv-upload {
|
|
5324
|
+
height: 6rem;
|
|
5325
|
+
border-radius: var(--spacing-3xs);
|
|
5326
|
+
padding: var(--spacing-xs);
|
|
5327
|
+
background: var(--color-base-100);
|
|
5328
|
+
border: 1px dashed var(--color-base-400);
|
|
5329
|
+
transition: border-color 0.5s, background-color 0.5s;
|
|
5330
|
+
position: relative;
|
|
5331
|
+
}
|
|
5332
|
+
.Layer__csv-upload--drag-active {
|
|
5333
|
+
background: var(--color-base-200);
|
|
5334
|
+
border-color: var(--color-base-500);
|
|
5335
|
+
}
|
|
5336
|
+
.Layer__csv-upload__browse-link {
|
|
5337
|
+
all: unset;
|
|
5338
|
+
cursor: pointer;
|
|
5339
|
+
text-decoration: underline;
|
|
5340
|
+
}
|
|
5341
|
+
.Layer__csv-upload__browse-link:focus,
|
|
5342
|
+
.Layer__csv-upload__browse-link:active,
|
|
5343
|
+
.Layer__csv-upload__browse-link:focus-visible {
|
|
5344
|
+
border-radius: 2px;
|
|
5345
|
+
box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08), 0 0 0 1px var(--color-base-700);
|
|
5346
|
+
outline: none;
|
|
5347
|
+
}
|
|
5348
|
+
.Layer__csv-upload__error-message {
|
|
5349
|
+
position: absolute;
|
|
5350
|
+
bottom: var(--spacing-sm);
|
|
5351
|
+
left: var(--spacing-sm);
|
|
5352
|
+
}
|
|
5353
|
+
.Layer__csv-upload__error-message .Layer__data-state__icon {
|
|
5354
|
+
background: var(--color-base-0);
|
|
5355
|
+
}
|
|
5356
|
+
.Layer__csv-upload__file-row {
|
|
5357
|
+
height: 2rem;
|
|
5358
|
+
border-radius: var(--border-radius-3xs);
|
|
5359
|
+
padding: var(--spacing-xs) var(--spacing-sm);
|
|
5360
|
+
background: var(--color-base-100);
|
|
5361
|
+
border: 1px solid var(--color-base-400);
|
|
5362
|
+
}
|
|
5363
|
+
.Layer__csv-upload__file-row--drop-target {
|
|
5364
|
+
height: 6rem;
|
|
5365
|
+
}
|
|
5366
|
+
.Layer__csv-upload__copy-template-headers-button-group {
|
|
5367
|
+
padding: var(--spacing-3xs);
|
|
5368
|
+
border-radius: var(--border-radius-3xs);
|
|
5369
|
+
background-color: var(--color-base-200);
|
|
5370
|
+
}
|
|
5371
|
+
.Layer__csv-upload__validate-csv-table__container {
|
|
5372
|
+
max-height: 561px;
|
|
5373
|
+
border-radius: var(--border-radius-3xs);
|
|
5374
|
+
border: 1px solid var(--color-base-400);
|
|
5375
|
+
}
|
|
5376
|
+
.Layer__csv-upload__validate-csv-table__scroll_container {
|
|
5377
|
+
overflow: auto;
|
|
5378
|
+
position: relative;
|
|
5379
|
+
}
|
|
5380
|
+
.Layer__csv-upload__validate-csv-table__thead {
|
|
5381
|
+
z-index: 1;
|
|
5382
|
+
background-color: var(--bg-subtle);
|
|
5383
|
+
}
|
|
5384
|
+
.Layer__csv-upload__validate-csv-table__header-row {
|
|
5385
|
+
display: flex;
|
|
5386
|
+
width: 100%;
|
|
5387
|
+
}
|
|
5388
|
+
.Layer__table-header.Layer__csv-upload__validate-csv-table__header-cell {
|
|
5389
|
+
padding: 0;
|
|
5390
|
+
display: flex;
|
|
5391
|
+
flex: 1 1 0;
|
|
5392
|
+
}
|
|
5393
|
+
.Layer__table-header.Layer__csv-upload__validate-csv-table__header-cell--row {
|
|
5394
|
+
flex: 0 0 60px;
|
|
5395
|
+
}
|
|
5396
|
+
.Layer__csv-upload__validate-csv-table__header-cell-content {
|
|
5397
|
+
padding: var(--spacing-sm) var(--spacing-md);
|
|
5398
|
+
}
|
|
5399
|
+
.Layer__table-row.Layer__csv-upload__validate-csv-table__row {
|
|
5400
|
+
display: flex;
|
|
5401
|
+
position: absolute;
|
|
5402
|
+
width: 100%;
|
|
5403
|
+
}
|
|
5404
|
+
.Layer__table-row.Layer__csv-upload__validate-csv-table__row--error {
|
|
5405
|
+
background-color: var(--color-info-error-bg);
|
|
5406
|
+
}
|
|
5407
|
+
.Layer__table-cell.Layer__csv-upload__validate-csv-table__cell {
|
|
5408
|
+
flex: 1 1 0%;
|
|
5409
|
+
min-width: 0px;
|
|
5410
|
+
}
|
|
5411
|
+
.Layer__table-cell.Layer__csv-upload__validate-csv-table__cell--row {
|
|
5412
|
+
flex: 0 0 60px;
|
|
5413
|
+
}
|
|
5414
|
+
.Layer__table .Layer__table-cell .Layer__table-cell-content.Layer__csv-upload__validate-csv-table__cell-content {
|
|
5415
|
+
display: inline-block;
|
|
5416
|
+
white-space: nowrap;
|
|
5417
|
+
overflow: hidden;
|
|
5418
|
+
text-overflow: ellipsis;
|
|
5419
|
+
align-content: center;
|
|
5420
|
+
width: 100%;
|
|
5421
|
+
}
|
|
5422
|
+
.Layer__table .Layer__table-cell .Layer__table-cell-content.Layer__csv-upload__validate-csv-table__cell-content--error {
|
|
5423
|
+
color: var(--color-danger);
|
|
5424
|
+
}
|
|
5425
|
+
.Layer__table .Layer__table-cell .Layer__table-cell-content.Layer__csv-upload__validate-csv-table__cell-content--row {
|
|
5426
|
+
text-align: end;
|
|
5427
|
+
}
|
|
5325
5428
|
.Layer__due-status {
|
|
5326
5429
|
display: flex;
|
|
5327
5430
|
flex-direction: column;
|
|
@@ -6406,6 +6509,42 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
6406
6509
|
flex: 1;
|
|
6407
6510
|
padding: var(--spacing-lg);
|
|
6408
6511
|
}
|
|
6512
|
+
.Layer__upload-transactions__select-account-name-field > .Layer__input-tooltip {
|
|
6513
|
+
flex: auto;
|
|
6514
|
+
}
|
|
6515
|
+
.Layer__upload-transactions__select-account-name-input--error .Layer__select__control {
|
|
6516
|
+
box-shadow: 0 0 0 1px var(--color-base-300), 0 0 0 2px var(--color-danger);
|
|
6517
|
+
}
|
|
6518
|
+
.Layer__upload-transactions__select-account-name-input--error .Layer__select__placeholder {
|
|
6519
|
+
color: var(--color-danger);
|
|
6520
|
+
}
|
|
6521
|
+
.Layer__upload-transactions__create-account-form {
|
|
6522
|
+
border-radius: var(--border-radius-3xs);
|
|
6523
|
+
padding: var(--spacing-xs);
|
|
6524
|
+
background: var(--color-base-100);
|
|
6525
|
+
}
|
|
6526
|
+
.Layer__upload-transactions__template-section {
|
|
6527
|
+
border-radius: var(--border-radius-3xs);
|
|
6528
|
+
border: 1px solid var(--color-base-400);
|
|
6529
|
+
padding: var(--spacing-md);
|
|
6530
|
+
}
|
|
6531
|
+
.Layer__upload-transactions__template-section__download-template-button {
|
|
6532
|
+
max-height: 36px;
|
|
6533
|
+
}
|
|
6534
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--date,
|
|
6535
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--date {
|
|
6536
|
+
flex: 3 1 0;
|
|
6537
|
+
min-width: 120px;
|
|
6538
|
+
}
|
|
6539
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--amount,
|
|
6540
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--amount {
|
|
6541
|
+
flex: 2 1 0;
|
|
6542
|
+
min-width: 120px;
|
|
6543
|
+
}
|
|
6544
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--description,
|
|
6545
|
+
.Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--description {
|
|
6546
|
+
flex: 6 1 0;
|
|
6547
|
+
}
|
|
6409
6548
|
.Layer__ledger-account__index {
|
|
6410
6549
|
background-color: var(--color-base-0);
|
|
6411
6550
|
width: 100%;
|
|
@@ -8731,6 +8870,18 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
8731
8870
|
margin-bottom: var(--spacing-xl);
|
|
8732
8871
|
color: var(--color-base-500);
|
|
8733
8872
|
}
|
|
8873
|
+
.Layer__data-state--inline {
|
|
8874
|
+
flex-direction: row;
|
|
8875
|
+
gap: var(--spacing-xs);
|
|
8876
|
+
}
|
|
8877
|
+
.Layer__data-state--inline .Layer__data-state__title,
|
|
8878
|
+
.Layer__data-state--inline .Layer__data-state__description {
|
|
8879
|
+
text-align: left;
|
|
8880
|
+
margin-bottom: 0;
|
|
8881
|
+
}
|
|
8882
|
+
.Layer__data-state--inline .Layer__data-state__icon {
|
|
8883
|
+
margin-bottom: 0;
|
|
8884
|
+
}
|
|
8734
8885
|
.Layer__drawer-background {
|
|
8735
8886
|
position: fixed;
|
|
8736
8887
|
display: none;
|
package/dist/index.d.ts
CHANGED
|
@@ -1879,7 +1879,8 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
export enum SubmitAction {
|
|
1881
1881
|
SAVE = "save",
|
|
1882
|
-
UPDATE = "update"
|
|
1882
|
+
UPDATE = "update",
|
|
1883
|
+
UPLOAD = "upload"
|
|
1883
1884
|
}
|
|
1884
1885
|
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, variant, withRetry, ...props }: SubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
1885
1886
|
|
|
@@ -2203,6 +2204,109 @@ declare module '@layerfi/components/components/Container/index' {
|
|
|
2203
2204
|
export { Container } from '@layerfi/components/components/Container/Container';
|
|
2204
2205
|
export { Header } from '@layerfi/components/components/Container/Header';
|
|
2205
2206
|
|
|
2207
|
+
}
|
|
2208
|
+
declare module '@layerfi/components/components/CsvUpload/CopyTemplateHeadersButtonGroup' {
|
|
2209
|
+
interface CopyTemplateHeadersButtonGroupProps {
|
|
2210
|
+
headers: Record<string, string>;
|
|
2211
|
+
}
|
|
2212
|
+
export const CopyTemplateHeadersButtonGroup: ({ headers }: CopyTemplateHeadersButtonGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
2213
|
+
export {};
|
|
2214
|
+
|
|
2215
|
+
}
|
|
2216
|
+
declare module '@layerfi/components/components/CsvUpload/CsvUpload' {
|
|
2217
|
+
type CsvUploadProps = {
|
|
2218
|
+
file: File | null;
|
|
2219
|
+
onFileSelected: (file: File | null) => void;
|
|
2220
|
+
replaceDropTarget?: boolean;
|
|
2221
|
+
};
|
|
2222
|
+
export const CsvUpload: ({ file, onFileSelected, replaceDropTarget }: CsvUploadProps) => import("react/jsx-runtime").JSX.Element;
|
|
2223
|
+
export {};
|
|
2224
|
+
|
|
2225
|
+
}
|
|
2226
|
+
declare module '@layerfi/components/components/CsvUpload/DownloadCsvTemplateButton' {
|
|
2227
|
+
import { type PropsWithChildren } from 'react';
|
|
2228
|
+
interface DownloadCsvTemplateButtonProps<T> {
|
|
2229
|
+
csvProps: {
|
|
2230
|
+
headers: {
|
|
2231
|
+
[K in keyof T]: string;
|
|
2232
|
+
};
|
|
2233
|
+
rows?: T[];
|
|
2234
|
+
};
|
|
2235
|
+
fileName?: string;
|
|
2236
|
+
className?: string;
|
|
2237
|
+
}
|
|
2238
|
+
export const DownloadCsvTemplateButton: <T extends { [K in keyof T]: string | number; }>({ children, className, csvProps, fileName }: PropsWithChildren<DownloadCsvTemplateButtonProps<T>>) => import("react/jsx-runtime").JSX.Element;
|
|
2239
|
+
export {};
|
|
2240
|
+
|
|
2241
|
+
}
|
|
2242
|
+
declare module '@layerfi/components/components/CsvUpload/ValidateCsvTable' {
|
|
2243
|
+
import { PreviewCsv } from '@layerfi/components/components/CsvUpload/types';
|
|
2244
|
+
interface ValidateCsvTableProps<T extends {
|
|
2245
|
+
[K in keyof T]: string | number;
|
|
2246
|
+
}> {
|
|
2247
|
+
data: PreviewCsv<T>;
|
|
2248
|
+
headers: {
|
|
2249
|
+
[K in keyof T]: string;
|
|
2250
|
+
};
|
|
2251
|
+
formatters?: Partial<{
|
|
2252
|
+
[K in keyof T]: (parsed: T[K]) => string;
|
|
2253
|
+
}>;
|
|
2254
|
+
className?: string;
|
|
2255
|
+
}
|
|
2256
|
+
export function ValidateCsvTable<T extends {
|
|
2257
|
+
[K in keyof T]: string | number;
|
|
2258
|
+
}>({ data, headers, formatters, className }: ValidateCsvTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
2259
|
+
export {};
|
|
2260
|
+
|
|
2261
|
+
}
|
|
2262
|
+
declare module '@layerfi/components/components/CsvUpload/types' {
|
|
2263
|
+
export type PreviewCell<T> = {
|
|
2264
|
+
raw: string;
|
|
2265
|
+
parsed: T;
|
|
2266
|
+
is_valid: boolean;
|
|
2267
|
+
};
|
|
2268
|
+
export type PreviewRow<T extends {
|
|
2269
|
+
[K in keyof T]: string | number;
|
|
2270
|
+
}> = {
|
|
2271
|
+
[K in keyof T]: PreviewCell<T[K]>;
|
|
2272
|
+
} & {
|
|
2273
|
+
index: number;
|
|
2274
|
+
is_valid: boolean;
|
|
2275
|
+
};
|
|
2276
|
+
export type PreviewCsv<T extends {
|
|
2277
|
+
[K in keyof T]: string | number;
|
|
2278
|
+
}> = PreviewRow<T>[];
|
|
2279
|
+
|
|
2280
|
+
}
|
|
2281
|
+
declare module '@layerfi/components/components/CustomAccountForm/CustomAccountForm' {
|
|
2282
|
+
import { type CustomAccount } from '@layerfi/components/hooks/customAccounts/types';
|
|
2283
|
+
export type CustomAccountsFormProps = {
|
|
2284
|
+
initialAccountName: string;
|
|
2285
|
+
onCancel?: () => void;
|
|
2286
|
+
onSuccess?: (account: CustomAccount) => void;
|
|
2287
|
+
};
|
|
2288
|
+
export const CustomAccountForm: ({ initialAccountName, onCancel, onSuccess }: CustomAccountsFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
2289
|
+
|
|
2290
|
+
}
|
|
2291
|
+
declare module '@layerfi/components/components/CustomAccountForm/useCustomAccountForm' {
|
|
2292
|
+
import { FormValidateOrFn, FormAsyncValidateOrFn } from '@tanstack/react-form';
|
|
2293
|
+
import { CustomAccount, CustomAccountSubtype, CustomAccountType } from '@layerfi/components/hooks/customAccounts/types';
|
|
2294
|
+
export const getCustomAccountTypeFromSubtype: (subtype: CustomAccountSubtype) => CustomAccountType;
|
|
2295
|
+
type CustomAccountFormData = {
|
|
2296
|
+
account_name?: string;
|
|
2297
|
+
institution_name?: string;
|
|
2298
|
+
account_type?: CustomAccountSubtype;
|
|
2299
|
+
};
|
|
2300
|
+
type UseCustomAccountFormProps = {
|
|
2301
|
+
onSuccess?: (account: CustomAccount) => void;
|
|
2302
|
+
};
|
|
2303
|
+
export const useCustomAccountForm: ({ onSuccess }: UseCustomAccountFormProps) => {
|
|
2304
|
+
form: import("@tanstack/react-form").ReactFormExtendedApi<CustomAccountFormData, FormValidateOrFn<CustomAccountFormData>, FormValidateOrFn<CustomAccountFormData>, FormValidateOrFn<CustomAccountFormData>, FormValidateOrFn<CustomAccountFormData>, FormAsyncValidateOrFn<CustomAccountFormData>, FormValidateOrFn<CustomAccountFormData>, FormAsyncValidateOrFn<CustomAccountFormData>, FormAsyncValidateOrFn<CustomAccountFormData>, FormAsyncValidateOrFn<CustomAccountFormData>>;
|
|
2305
|
+
submitError: string | undefined;
|
|
2306
|
+
isFormValid: boolean;
|
|
2307
|
+
};
|
|
2308
|
+
export {};
|
|
2309
|
+
|
|
2206
2310
|
}
|
|
2207
2311
|
declare module '@layerfi/components/components/DataState/DataState' {
|
|
2208
2312
|
import { ReactNode } from 'react';
|
|
@@ -2220,8 +2324,10 @@ declare module '@layerfi/components/components/DataState/DataState' {
|
|
|
2220
2324
|
onRefresh?: () => void;
|
|
2221
2325
|
isLoading?: boolean;
|
|
2222
2326
|
spacing?: boolean;
|
|
2327
|
+
inline?: boolean;
|
|
2328
|
+
className?: string;
|
|
2223
2329
|
}
|
|
2224
|
-
export const DataState: ({ status, title, description, onRefresh, isLoading, icon, spacing, }: DataStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
2330
|
+
export const DataState: ({ status, title, description, onRefresh, isLoading, icon, spacing, inline, className, }: DataStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
2225
2331
|
|
|
2226
2332
|
}
|
|
2227
2333
|
declare module '@layerfi/components/components/DataState/index' {
|
|
@@ -2567,6 +2673,22 @@ declare module '@layerfi/components/components/Input/BusinessTypeSelect' {
|
|
|
2567
2673
|
};
|
|
2568
2674
|
export const BusinessTypeSelect: ({ value, onChange }: BusinessTypeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2569
2675
|
|
|
2676
|
+
}
|
|
2677
|
+
declare module '@layerfi/components/components/Input/CreatableSelect' {
|
|
2678
|
+
import { ReactNode } from 'react';
|
|
2679
|
+
import { GroupBase } from 'react-select';
|
|
2680
|
+
import { type CreatableProps } from 'react-select/creatable';
|
|
2681
|
+
import { type SelectProps } from '@layerfi/components/components/Input/Select';
|
|
2682
|
+
export interface CreatableSelectProps<T> extends Omit<SelectProps<T>, 'value' | 'onChange'> {
|
|
2683
|
+
value?: T | null;
|
|
2684
|
+
onChange: (selected: T | null) => void;
|
|
2685
|
+
isClearable?: boolean;
|
|
2686
|
+
onCreateOption?: (inputValue: string) => void;
|
|
2687
|
+
isValidNewOption?: CreatableProps<T, false, GroupBase<T>>['isValidNewOption'];
|
|
2688
|
+
formatCreateLabel?: (inputValue: string) => ReactNode;
|
|
2689
|
+
}
|
|
2690
|
+
export const CreatableSelect: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, placeholder, isInvalid, errorMessage, onCreateOption, isValidNewOption, formatCreateLabel, inputId, isLoading, isClearable, }: CreatableSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2691
|
+
|
|
2570
2692
|
}
|
|
2571
2693
|
declare module '@layerfi/components/components/Input/FileInput' {
|
|
2572
2694
|
export interface FileInputProps {
|
|
@@ -2641,8 +2763,10 @@ declare module '@layerfi/components/components/Input/MultiSelect' {
|
|
|
2641
2763
|
isInvalid?: boolean;
|
|
2642
2764
|
errorMessage?: string;
|
|
2643
2765
|
styles?: StylesConfig<T, true, GroupBase<T>>;
|
|
2766
|
+
inputId?: string;
|
|
2767
|
+
isLoading?: boolean;
|
|
2644
2768
|
}
|
|
2645
|
-
export const MultiSelect: <T>({ name, options, className, classNamePrefix, value, defaultValue, onChange, disabled, placeholder, isInvalid, errorMessage, styles, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2769
|
+
export const MultiSelect: <T>({ name, options, className, classNamePrefix, value, defaultValue, onChange, disabled, placeholder, isInvalid, errorMessage, styles, inputId, isLoading, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2646
2770
|
|
|
2647
2771
|
}
|
|
2648
2772
|
declare module '@layerfi/components/components/Input/PhoneInput' {
|
|
@@ -2668,8 +2792,10 @@ declare module '@layerfi/components/components/Input/Select' {
|
|
|
2668
2792
|
placeholder?: string;
|
|
2669
2793
|
isInvalid?: boolean;
|
|
2670
2794
|
errorMessage?: string;
|
|
2795
|
+
inputId?: string;
|
|
2796
|
+
isLoading?: boolean;
|
|
2671
2797
|
}
|
|
2672
|
-
export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, placeholder, isInvalid, errorMessage, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2798
|
+
export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, placeholder, isInvalid, errorMessage, inputId, isLoading, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2673
2799
|
|
|
2674
2800
|
}
|
|
2675
2801
|
declare module '@layerfi/components/components/Input/StaticValue' {
|
|
@@ -4513,6 +4639,53 @@ declare module '@layerfi/components/components/Typography/index' {
|
|
|
4513
4639
|
export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
|
|
4514
4640
|
export { ErrorText } from '@layerfi/components/components/Typography/ErrorText';
|
|
4515
4641
|
|
|
4642
|
+
}
|
|
4643
|
+
declare module '@layerfi/components/components/UploadTransactions/UploadTransactions' {
|
|
4644
|
+
import type { Awaitable } from '@layerfi/components/types/utility/promises';
|
|
4645
|
+
type UploadTransactionsProps = {
|
|
4646
|
+
onComplete?: () => Awaitable<void>;
|
|
4647
|
+
};
|
|
4648
|
+
export function UploadTransactions({ onComplete }: UploadTransactionsProps): import("react/jsx-runtime").JSX.Element;
|
|
4649
|
+
export {};
|
|
4650
|
+
|
|
4651
|
+
}
|
|
4652
|
+
declare module '@layerfi/components/components/UploadTransactions/UploadTransactionsUploadCsvStep' {
|
|
4653
|
+
import { type CustomAccountParseCsvResponse } from '@layerfi/components/hooks/customAccounts/useCustomAccountParseCsv';
|
|
4654
|
+
type AccountOption = {
|
|
4655
|
+
value: string;
|
|
4656
|
+
label: string;
|
|
4657
|
+
createdAccountName?: string;
|
|
4658
|
+
};
|
|
4659
|
+
interface UploadTransactionsUploadCsvStepProps {
|
|
4660
|
+
selectedAccount: AccountOption | null;
|
|
4661
|
+
onSelectAccount: (account: AccountOption | null) => void;
|
|
4662
|
+
selectedFile: File | null;
|
|
4663
|
+
onSelectFile: (file: File | null) => void;
|
|
4664
|
+
onParseCsv: (parseCsvResponse: CustomAccountParseCsvResponse) => void;
|
|
4665
|
+
}
|
|
4666
|
+
export function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, selectedFile, onSelectFile, onParseCsv }: UploadTransactionsUploadCsvStepProps): import("react/jsx-runtime").JSX.Element;
|
|
4667
|
+
export {};
|
|
4668
|
+
|
|
4669
|
+
}
|
|
4670
|
+
declare module '@layerfi/components/components/UploadTransactions/UploadTransactionsValidateCsvStep' {
|
|
4671
|
+
import type { CustomAccountParseCsvResponse } from '@layerfi/components/hooks/customAccounts/useCustomAccountParseCsv';
|
|
4672
|
+
interface UploadTransactionsValidateCsvStepProps {
|
|
4673
|
+
parseCsvResponse: CustomAccountParseCsvResponse;
|
|
4674
|
+
selectedAccountId: string;
|
|
4675
|
+
onGoBack: () => void;
|
|
4676
|
+
onReupload: () => void;
|
|
4677
|
+
}
|
|
4678
|
+
export function UploadTransactionsValidateCsvStep({ parseCsvResponse, selectedAccountId, onGoBack, onReupload }: UploadTransactionsValidateCsvStepProps): import("react/jsx-runtime").JSX.Element;
|
|
4679
|
+
export {};
|
|
4680
|
+
|
|
4681
|
+
}
|
|
4682
|
+
declare module '@layerfi/components/components/UploadTransactions/template' {
|
|
4683
|
+
import { CustomAccountTransactionRow } from '@layerfi/components/hooks/customAccounts/types';
|
|
4684
|
+
export const templateHeaders: {
|
|
4685
|
+
[K in keyof CustomAccountTransactionRow]: string;
|
|
4686
|
+
};
|
|
4687
|
+
export const templateExampleTransactions: CustomAccountTransactionRow[];
|
|
4688
|
+
|
|
4516
4689
|
}
|
|
4517
4690
|
declare module '@layerfi/components/components/UpsellBanner/BookkeepingUpsellBar' {
|
|
4518
4691
|
interface BookkeepingUpsellBarProps {
|
|
@@ -4791,7 +4964,7 @@ declare module '@layerfi/components/components/ui/Typography/Text' {
|
|
|
4791
4964
|
} & {
|
|
4792
4965
|
children?: import("react").ReactNode | undefined;
|
|
4793
4966
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4794
|
-
type LabelProps = Pick<ComponentPropsWithoutRef<'label'>, 'slot'>;
|
|
4967
|
+
type LabelProps = Pick<ComponentPropsWithoutRef<'label'>, 'slot' | 'htmlFor'>;
|
|
4795
4968
|
export const Label: import("react").ForwardRefExoticComponent<LabelProps & TextStyleProps & {
|
|
4796
4969
|
children?: import("react").ReactNode | undefined;
|
|
4797
4970
|
} & import("react").RefAttributes<HTMLLabelElement>>;
|
|
@@ -5573,6 +5746,114 @@ declare module '@layerfi/components/hooks/categories/useCategories' {
|
|
|
5573
5746
|
export function useCategories({ mode }?: UseCategoriesOptions): import("swr").SWRResponse<import("../../types").Category[], any, any>;
|
|
5574
5747
|
export {};
|
|
5575
5748
|
|
|
5749
|
+
}
|
|
5750
|
+
declare module '@layerfi/components/hooks/customAccounts/types' {
|
|
5751
|
+
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
5752
|
+
export enum CustomAccountSubtype {
|
|
5753
|
+
CHECKING = "CHECKING",
|
|
5754
|
+
SAVINGS = "SAVINGS",
|
|
5755
|
+
CREDIT_CARD = "CREDIT_CARD"
|
|
5756
|
+
}
|
|
5757
|
+
export enum CustomAccountType {
|
|
5758
|
+
DEPOSITORY = "DEPOSITORY",
|
|
5759
|
+
CREDIT = "CREDIT"
|
|
5760
|
+
}
|
|
5761
|
+
export type RawCustomAccount = {
|
|
5762
|
+
id: string;
|
|
5763
|
+
external_id: string | null;
|
|
5764
|
+
mask: string | null;
|
|
5765
|
+
account_name: string;
|
|
5766
|
+
institution_name: string | null;
|
|
5767
|
+
account_type: string;
|
|
5768
|
+
account_subtype: string;
|
|
5769
|
+
created_at: string | null;
|
|
5770
|
+
updated_at: string | null;
|
|
5771
|
+
archived_at: string | null;
|
|
5772
|
+
ledger_account_id: string;
|
|
5773
|
+
};
|
|
5774
|
+
export type CustomAccount = Pick<RawCustomAccount, 'id'> & {
|
|
5775
|
+
externalId: RawCustomAccount['external_id'];
|
|
5776
|
+
mask: RawCustomAccount['mask'];
|
|
5777
|
+
accountName: RawCustomAccount['account_name'];
|
|
5778
|
+
institutionName: RawCustomAccount['institution_name'];
|
|
5779
|
+
accountType: RawCustomAccount['account_type'];
|
|
5780
|
+
accountSubtype: RawCustomAccount['account_subtype'];
|
|
5781
|
+
createdAt: RawCustomAccount['created_at'];
|
|
5782
|
+
updatedAt: RawCustomAccount['updated_at'];
|
|
5783
|
+
archivedAt: RawCustomAccount['archived_at'];
|
|
5784
|
+
ledgerAccountId: RawCustomAccount['ledger_account_id'];
|
|
5785
|
+
};
|
|
5786
|
+
export const mapRawCustomAccountToCustomAccount: (raw: RawCustomAccount) => CustomAccount;
|
|
5787
|
+
export type RawCustomTransaction = {
|
|
5788
|
+
external_id?: string | null;
|
|
5789
|
+
amount: number;
|
|
5790
|
+
direction: Direction;
|
|
5791
|
+
date: string;
|
|
5792
|
+
description: string;
|
|
5793
|
+
};
|
|
5794
|
+
export interface CustomAccountTransactionRow {
|
|
5795
|
+
date: string;
|
|
5796
|
+
description: string;
|
|
5797
|
+
amount: number;
|
|
5798
|
+
}
|
|
5799
|
+
|
|
5800
|
+
}
|
|
5801
|
+
declare module '@layerfi/components/hooks/customAccounts/useCreateCustomAccount' {
|
|
5802
|
+
import { type RawCustomAccount } from '@layerfi/components/hooks/customAccounts/types';
|
|
5803
|
+
type CreateCustomAccountBody = Pick<RawCustomAccount, 'account_name' | 'account_type' | 'account_subtype' | 'institution_name' | 'external_id' | 'mask'>;
|
|
5804
|
+
export function useCreateCustomAccount(): import("swr/mutation").SWRMutationResponse<import("./types").CustomAccount, any, () => {
|
|
5805
|
+
readonly accessToken: string;
|
|
5806
|
+
readonly apiUrl: string;
|
|
5807
|
+
readonly businessId: string;
|
|
5808
|
+
readonly tags: readonly ["#custom-accounts:create"];
|
|
5809
|
+
} | undefined, CreateCustomAccountBody>;
|
|
5810
|
+
export {};
|
|
5811
|
+
|
|
5812
|
+
}
|
|
5813
|
+
declare module '@layerfi/components/hooks/customAccounts/useCreateCustomAccountTransactions' {
|
|
5814
|
+
import type { RawCustomTransaction } from '@layerfi/components/hooks/customAccounts/types';
|
|
5815
|
+
type CreateCustomAccountTransactionsBody = {
|
|
5816
|
+
transactions: RawCustomTransaction[];
|
|
5817
|
+
};
|
|
5818
|
+
type CreateCustomAccountTransactionsArgs = CreateCustomAccountTransactionsBody & {
|
|
5819
|
+
customAccountId: string;
|
|
5820
|
+
};
|
|
5821
|
+
export function useCreateCustomAccountTransactions(): import("swr/mutation").SWRMutationResponse<unknown, any, () => {
|
|
5822
|
+
readonly accessToken: string;
|
|
5823
|
+
readonly apiUrl: string;
|
|
5824
|
+
readonly businessId: string;
|
|
5825
|
+
readonly tags: readonly ["#custom-accounts:create-transactions"];
|
|
5826
|
+
} | undefined, CreateCustomAccountTransactionsArgs>;
|
|
5827
|
+
export {};
|
|
5828
|
+
|
|
5829
|
+
}
|
|
5830
|
+
declare module '@layerfi/components/hooks/customAccounts/useCustomAccountParseCsv' {
|
|
5831
|
+
import type { CustomAccountTransactionRow, RawCustomTransaction } from '@layerfi/components/hooks/customAccounts/types';
|
|
5832
|
+
import type { PreviewCsv } from '@layerfi/components/components/CsvUpload/types';
|
|
5833
|
+
type CustomAccountParseCsvArgs = {
|
|
5834
|
+
file: File;
|
|
5835
|
+
customAccountId: string;
|
|
5836
|
+
};
|
|
5837
|
+
export type CustomAccountParseCsvResponse = {
|
|
5838
|
+
is_valid: boolean;
|
|
5839
|
+
new_transactions_request: {
|
|
5840
|
+
transactions: RawCustomTransaction[];
|
|
5841
|
+
};
|
|
5842
|
+
new_transactions_preview: PreviewCsv<CustomAccountTransactionRow>;
|
|
5843
|
+
};
|
|
5844
|
+
export function useCustomAccountParseCsv(): import("swr/mutation").SWRMutationResponse<CustomAccountParseCsvResponse, any, () => {
|
|
5845
|
+
readonly accessToken: string;
|
|
5846
|
+
readonly apiUrl: string;
|
|
5847
|
+
readonly businessId: string;
|
|
5848
|
+
readonly tags: readonly ["#custom-accounts:parse-csv"];
|
|
5849
|
+
} | undefined, CustomAccountParseCsvArgs>;
|
|
5850
|
+
export {};
|
|
5851
|
+
|
|
5852
|
+
}
|
|
5853
|
+
declare module '@layerfi/components/hooks/customAccounts/useCustomAccounts' {
|
|
5854
|
+
export const CUSTOM_ACCOUNTS_TAG_KEY = "#custom-accounts";
|
|
5855
|
+
export function useCustomAccounts(): import("swr").SWRResponse<import("./types").CustomAccount[], any, any>;
|
|
5856
|
+
|
|
5576
5857
|
}
|
|
5577
5858
|
declare module '@layerfi/components/hooks/useAuth' {
|
|
5578
5859
|
export function useAuth(): import("swr").SWRResponse<{
|
|
@@ -6687,6 +6968,7 @@ declare module '@layerfi/components/index' {
|
|
|
6687
6968
|
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
6688
6969
|
export { Onboarding } from '@layerfi/components/components/Onboarding/index';
|
|
6689
6970
|
export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
|
|
6971
|
+
export { UploadTransactions as unstable_UploadTransactions } from '@layerfi/components/components/UploadTransactions/UploadTransactions';
|
|
6690
6972
|
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
6691
6973
|
export { Integrations } from '@layerfi/components/components/Integrations/Integrations';
|
|
6692
6974
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerfi/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.102-alpha.1",
|
|
4
4
|
"description": "Layer React Components",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -76,6 +76,8 @@
|
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@floating-ui/react": "^0.27.8",
|
|
78
78
|
"@tanstack/react-form": "^1.9.1",
|
|
79
|
+
"@tanstack/react-table": "^8.21.3",
|
|
80
|
+
"@tanstack/react-virtual": "^3.13.9",
|
|
79
81
|
"classnames": "^2.5.1",
|
|
80
82
|
"date-fns": "^4.1.0",
|
|
81
83
|
"libphonenumber-js": "^1.12.7",
|
|
@@ -84,6 +86,7 @@
|
|
|
84
86
|
"react-aria-components": "^1.8.0",
|
|
85
87
|
"react-currency-input-field": "^3.10.0",
|
|
86
88
|
"react-datepicker": "^6.9.0",
|
|
89
|
+
"react-dropzone": "^14.3.8",
|
|
87
90
|
"react-plaid-link": "^4.0.1",
|
|
88
91
|
"react-select": "^5.10.1",
|
|
89
92
|
"recharts": "^2.15.3",
|