@layerfi/components 0.1.106-alpha.1 → 0.1.107-alpha
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/cjs/index.cjs +1293 -508
- package/dist/esm/index.mjs +1375 -583
- package/dist/index.css +160 -59
- package/dist/index.d.ts +344 -1393
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1838,7 +1838,7 @@ declare module '@layerfi/components/components/Bills/useBillForm' {
|
|
|
1838
1838
|
form: import("@tanstack/react-form").ReactFormExtendedApi<BillForm, FormValidateOrFn<BillForm>, FormValidateOrFn<BillForm>, FormAsyncValidateOrFn<BillForm>, FormValidateOrFn<BillForm>, FormAsyncValidateOrFn<BillForm>, FormValidateOrFn<BillForm>, FormAsyncValidateOrFn<BillForm>, FormAsyncValidateOrFn<BillForm>, FormAsyncValidateOrFn<BillForm>>;
|
|
1839
1839
|
isDirty: boolean;
|
|
1840
1840
|
submitError: string | undefined;
|
|
1841
|
-
formErrorMap: import("@tanstack/react-form").
|
|
1841
|
+
formErrorMap: import("@tanstack/react-form").ValidationErrorMap<undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined>;
|
|
1842
1842
|
};
|
|
1843
1843
|
|
|
1844
1844
|
}
|
|
@@ -2542,14 +2542,14 @@ declare module '@layerfi/components/components/CsvUpload/DownloadCsvTemplateButt
|
|
|
2542
2542
|
fileName?: string;
|
|
2543
2543
|
className?: string;
|
|
2544
2544
|
}
|
|
2545
|
-
export const DownloadCsvTemplateButton: <T extends { [K in keyof T]: string | number; }>({ children, className, csvProps, fileName }: PropsWithChildren<DownloadCsvTemplateButtonProps<T>>) => import("react/jsx-runtime").JSX.Element;
|
|
2545
|
+
export const DownloadCsvTemplateButton: <T extends { [K in keyof T]: string | number | null | undefined; }>({ children, className, csvProps, fileName }: PropsWithChildren<DownloadCsvTemplateButtonProps<T>>) => import("react/jsx-runtime").JSX.Element;
|
|
2546
2546
|
export {};
|
|
2547
2547
|
|
|
2548
2548
|
}
|
|
2549
2549
|
declare module '@layerfi/components/components/CsvUpload/ValidateCsvTable' {
|
|
2550
2550
|
import { PreviewCsv } from '@layerfi/components/components/CsvUpload/types';
|
|
2551
2551
|
interface ValidateCsvTableProps<T extends {
|
|
2552
|
-
[K in keyof T]: string | number;
|
|
2552
|
+
[K in keyof T]: string | number | null | undefined;
|
|
2553
2553
|
}> {
|
|
2554
2554
|
data: PreviewCsv<T>;
|
|
2555
2555
|
headers: {
|
|
@@ -2561,8 +2561,8 @@ declare module '@layerfi/components/components/CsvUpload/ValidateCsvTable' {
|
|
|
2561
2561
|
className?: string;
|
|
2562
2562
|
}
|
|
2563
2563
|
export function ValidateCsvTable<T extends {
|
|
2564
|
-
[K in keyof T]: string | number;
|
|
2565
|
-
}>({ data, headers, formatters, className }: ValidateCsvTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
2564
|
+
[K in keyof T]: string | number | null | undefined;
|
|
2565
|
+
}>({ data, headers, formatters, className, }: ValidateCsvTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
2566
2566
|
export {};
|
|
2567
2567
|
|
|
2568
2568
|
}
|
|
@@ -2573,7 +2573,7 @@ declare module '@layerfi/components/components/CsvUpload/types' {
|
|
|
2573
2573
|
is_valid: boolean;
|
|
2574
2574
|
};
|
|
2575
2575
|
export type PreviewRow<T extends {
|
|
2576
|
-
[K in keyof T]: string | number;
|
|
2576
|
+
[K in keyof T]: string | number | null | undefined;
|
|
2577
2577
|
}> = {
|
|
2578
2578
|
[K in keyof T]: PreviewCell<T[K]>;
|
|
2579
2579
|
} & {
|
|
@@ -2581,7 +2581,7 @@ declare module '@layerfi/components/components/CsvUpload/types' {
|
|
|
2581
2581
|
is_valid: boolean;
|
|
2582
2582
|
};
|
|
2583
2583
|
export type PreviewCsv<T extends {
|
|
2584
|
-
[K in keyof T]: string | number;
|
|
2584
|
+
[K in keyof T]: string | number | null | undefined;
|
|
2585
2585
|
}> = PreviewRow<T>[];
|
|
2586
2586
|
|
|
2587
2587
|
}
|
|
@@ -2625,6 +2625,7 @@ declare module '@layerfi/components/components/DataPoint/DataPoint' {
|
|
|
2625
2625
|
}
|
|
2626
2626
|
declare module '@layerfi/components/components/DataState/DataState' {
|
|
2627
2627
|
import { ReactNode } from 'react';
|
|
2628
|
+
import { TextSize } from '@layerfi/components/components/Typography/index';
|
|
2628
2629
|
export enum DataStateStatus {
|
|
2629
2630
|
allDone = "allDone",
|
|
2630
2631
|
success = "success",
|
|
@@ -2640,9 +2641,10 @@ declare module '@layerfi/components/components/DataState/DataState' {
|
|
|
2640
2641
|
isLoading?: boolean;
|
|
2641
2642
|
spacing?: boolean;
|
|
2642
2643
|
inline?: boolean;
|
|
2644
|
+
titleSize?: TextSize;
|
|
2643
2645
|
className?: string;
|
|
2644
2646
|
}
|
|
2645
|
-
export const DataState: ({ status, title, description, onRefresh, isLoading, icon, spacing, inline, className, }: DataStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
2647
|
+
export const DataState: ({ status, title, description, onRefresh, isLoading, icon, spacing, inline, titleSize, className, }: DataStateProps) => import("react/jsx-runtime").JSX.Element;
|
|
2646
2648
|
|
|
2647
2649
|
}
|
|
2648
2650
|
declare module '@layerfi/components/components/DataState/index' {
|
|
@@ -3268,1302 +3270,140 @@ declare module '@layerfi/components/components/Integrations/IntegrationsQuickboo
|
|
|
3268
3270
|
|
|
3269
3271
|
}
|
|
3270
3272
|
declare module '@layerfi/components/components/Invoices/InvoiceDetail/InvoiceDetail' {
|
|
3271
|
-
import { type
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
}
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
};
|
|
3304
|
-
type UseInvoiceFormProps = {
|
|
3305
|
-
onSuccess?: (invoice: Invoice) => void;
|
|
3306
|
-
mode: UpsertInvoiceMode.Create;
|
|
3307
|
-
} | {
|
|
3308
|
-
onSuccess?: (invoice: Invoice) => void;
|
|
3309
|
-
mode: UpsertInvoiceMode.Update;
|
|
3310
|
-
invoice: Invoice;
|
|
3311
|
-
};
|
|
3312
|
-
export const useInvoiceForm: (props: UseInvoiceFormProps) => {
|
|
3313
|
-
form: import("@tanstack/react-form").FormApi<{
|
|
3314
|
-
invoiceNumber: string;
|
|
3315
|
-
customer: null;
|
|
3316
|
-
email: string;
|
|
3317
|
-
address: string;
|
|
3318
|
-
lineItems: {
|
|
3319
|
-
product: string;
|
|
3320
|
-
description: string;
|
|
3321
|
-
unitPrice: number;
|
|
3322
|
-
quantity: BD.BigDecimal;
|
|
3323
|
-
amount: number;
|
|
3324
|
-
}[];
|
|
3325
|
-
} | {
|
|
3326
|
-
invoiceNumber: string | null;
|
|
3327
|
-
customer: {
|
|
3328
|
-
readonly id: string;
|
|
3329
|
-
readonly externalId: string | null;
|
|
3330
|
-
readonly individualName: string | null;
|
|
3331
|
-
readonly companyName: string | null;
|
|
3332
|
-
readonly email: string | null;
|
|
3333
|
-
readonly mobilePhone: string | null;
|
|
3334
|
-
readonly officePhone: string | null;
|
|
3335
|
-
readonly addressString: string | null;
|
|
3336
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3337
|
-
readonly memo: string | null;
|
|
3338
|
-
readonly _local?: {
|
|
3339
|
-
readonly isOptimistic: boolean;
|
|
3340
|
-
} | undefined;
|
|
3341
|
-
} | null;
|
|
3342
|
-
email: string | null | undefined;
|
|
3343
|
-
address: string | null | undefined;
|
|
3344
|
-
lineItems: {
|
|
3345
|
-
amount: number;
|
|
3346
|
-
id: string;
|
|
3347
|
-
externalId: string | null;
|
|
3348
|
-
memo: string | null;
|
|
3349
|
-
description: string | null;
|
|
3350
|
-
product: string | null;
|
|
3351
|
-
subtotal: number;
|
|
3352
|
-
quantity: BD.BigDecimal;
|
|
3353
|
-
invoiceId: string;
|
|
3354
|
-
unitPrice: number;
|
|
3355
|
-
discountAmount: number;
|
|
3356
|
-
salesTaxTotal: number;
|
|
3357
|
-
totalAmount: number;
|
|
3358
|
-
}[];
|
|
3359
|
-
}, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3360
|
-
invoiceNumber: string;
|
|
3361
|
-
customer: null;
|
|
3362
|
-
email: string;
|
|
3363
|
-
address: string;
|
|
3364
|
-
lineItems: {
|
|
3365
|
-
product: string;
|
|
3366
|
-
description: string;
|
|
3367
|
-
unitPrice: number;
|
|
3368
|
-
quantity: BD.BigDecimal;
|
|
3369
|
-
amount: number;
|
|
3370
|
-
}[];
|
|
3371
|
-
} | {
|
|
3372
|
-
invoiceNumber: string | null;
|
|
3373
|
-
customer: {
|
|
3374
|
-
readonly id: string;
|
|
3375
|
-
readonly externalId: string | null;
|
|
3376
|
-
readonly individualName: string | null;
|
|
3377
|
-
readonly companyName: string | null;
|
|
3378
|
-
readonly email: string | null;
|
|
3379
|
-
readonly mobilePhone: string | null;
|
|
3380
|
-
readonly officePhone: string | null;
|
|
3381
|
-
readonly addressString: string | null;
|
|
3382
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3383
|
-
readonly memo: string | null;
|
|
3384
|
-
readonly _local?: {
|
|
3385
|
-
readonly isOptimistic: boolean;
|
|
3386
|
-
} | undefined;
|
|
3387
|
-
} | null;
|
|
3388
|
-
email: string | null | undefined;
|
|
3389
|
-
address: string | null | undefined;
|
|
3390
|
-
lineItems: {
|
|
3391
|
-
amount: number;
|
|
3392
|
-
id: string;
|
|
3393
|
-
externalId: string | null;
|
|
3394
|
-
memo: string | null;
|
|
3395
|
-
description: string | null;
|
|
3396
|
-
product: string | null;
|
|
3397
|
-
subtotal: number;
|
|
3398
|
-
quantity: BD.BigDecimal;
|
|
3399
|
-
invoiceId: string;
|
|
3400
|
-
unitPrice: number;
|
|
3401
|
-
discountAmount: number;
|
|
3402
|
-
salesTaxTotal: number;
|
|
3403
|
-
totalAmount: number;
|
|
3404
|
-
}[];
|
|
3405
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3406
|
-
invoiceNumber: string;
|
|
3407
|
-
customer: null;
|
|
3408
|
-
email: string;
|
|
3409
|
-
address: string;
|
|
3410
|
-
lineItems: {
|
|
3411
|
-
product: string;
|
|
3412
|
-
description: string;
|
|
3413
|
-
unitPrice: number;
|
|
3414
|
-
quantity: BD.BigDecimal;
|
|
3415
|
-
amount: number;
|
|
3416
|
-
}[];
|
|
3417
|
-
} | {
|
|
3418
|
-
invoiceNumber: string | null;
|
|
3419
|
-
customer: {
|
|
3420
|
-
readonly id: string;
|
|
3421
|
-
readonly externalId: string | null;
|
|
3422
|
-
readonly individualName: string | null;
|
|
3423
|
-
readonly companyName: string | null;
|
|
3424
|
-
readonly email: string | null;
|
|
3425
|
-
readonly mobilePhone: string | null;
|
|
3426
|
-
readonly officePhone: string | null;
|
|
3427
|
-
readonly addressString: string | null;
|
|
3428
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3429
|
-
readonly memo: string | null;
|
|
3430
|
-
readonly _local?: {
|
|
3431
|
-
readonly isOptimistic: boolean;
|
|
3432
|
-
} | undefined;
|
|
3433
|
-
} | null;
|
|
3434
|
-
email: string | null | undefined;
|
|
3435
|
-
address: string | null | undefined;
|
|
3436
|
-
lineItems: {
|
|
3437
|
-
amount: number;
|
|
3438
|
-
id: string;
|
|
3439
|
-
externalId: string | null;
|
|
3440
|
-
memo: string | null;
|
|
3441
|
-
description: string | null;
|
|
3442
|
-
product: string | null;
|
|
3443
|
-
subtotal: number;
|
|
3444
|
-
quantity: BD.BigDecimal;
|
|
3445
|
-
invoiceId: string;
|
|
3446
|
-
unitPrice: number;
|
|
3447
|
-
discountAmount: number;
|
|
3448
|
-
salesTaxTotal: number;
|
|
3449
|
-
totalAmount: number;
|
|
3450
|
-
}[];
|
|
3451
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3452
|
-
invoiceNumber: string;
|
|
3453
|
-
customer: null;
|
|
3454
|
-
email: string;
|
|
3455
|
-
address: string;
|
|
3456
|
-
lineItems: {
|
|
3457
|
-
product: string;
|
|
3458
|
-
description: string;
|
|
3459
|
-
unitPrice: number;
|
|
3460
|
-
quantity: BD.BigDecimal;
|
|
3461
|
-
amount: number;
|
|
3462
|
-
}[];
|
|
3463
|
-
} | {
|
|
3464
|
-
invoiceNumber: string | null;
|
|
3465
|
-
customer: {
|
|
3466
|
-
readonly id: string;
|
|
3467
|
-
readonly externalId: string | null;
|
|
3468
|
-
readonly individualName: string | null;
|
|
3469
|
-
readonly companyName: string | null;
|
|
3470
|
-
readonly email: string | null;
|
|
3471
|
-
readonly mobilePhone: string | null;
|
|
3472
|
-
readonly officePhone: string | null;
|
|
3473
|
-
readonly addressString: string | null;
|
|
3474
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3475
|
-
readonly memo: string | null;
|
|
3476
|
-
readonly _local?: {
|
|
3477
|
-
readonly isOptimistic: boolean;
|
|
3478
|
-
} | undefined;
|
|
3479
|
-
} | null;
|
|
3480
|
-
email: string | null | undefined;
|
|
3481
|
-
address: string | null | undefined;
|
|
3482
|
-
lineItems: {
|
|
3483
|
-
amount: number;
|
|
3484
|
-
id: string;
|
|
3485
|
-
externalId: string | null;
|
|
3486
|
-
memo: string | null;
|
|
3487
|
-
description: string | null;
|
|
3488
|
-
product: string | null;
|
|
3489
|
-
subtotal: number;
|
|
3490
|
-
quantity: BD.BigDecimal;
|
|
3491
|
-
invoiceId: string;
|
|
3492
|
-
unitPrice: number;
|
|
3493
|
-
discountAmount: number;
|
|
3494
|
-
salesTaxTotal: number;
|
|
3495
|
-
totalAmount: number;
|
|
3496
|
-
}[];
|
|
3497
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3498
|
-
invoiceNumber: string;
|
|
3499
|
-
customer: null;
|
|
3500
|
-
email: string;
|
|
3501
|
-
address: string;
|
|
3502
|
-
lineItems: {
|
|
3503
|
-
product: string;
|
|
3504
|
-
description: string;
|
|
3505
|
-
unitPrice: number;
|
|
3506
|
-
quantity: BD.BigDecimal;
|
|
3507
|
-
amount: number;
|
|
3508
|
-
}[];
|
|
3509
|
-
} | {
|
|
3510
|
-
invoiceNumber: string | null;
|
|
3511
|
-
customer: {
|
|
3512
|
-
readonly id: string;
|
|
3513
|
-
readonly externalId: string | null;
|
|
3514
|
-
readonly individualName: string | null;
|
|
3515
|
-
readonly companyName: string | null;
|
|
3516
|
-
readonly email: string | null;
|
|
3517
|
-
readonly mobilePhone: string | null;
|
|
3518
|
-
readonly officePhone: string | null;
|
|
3519
|
-
readonly addressString: string | null;
|
|
3520
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3521
|
-
readonly memo: string | null;
|
|
3522
|
-
readonly _local?: {
|
|
3523
|
-
readonly isOptimistic: boolean;
|
|
3524
|
-
} | undefined;
|
|
3525
|
-
} | null;
|
|
3526
|
-
email: string | null | undefined;
|
|
3527
|
-
address: string | null | undefined;
|
|
3528
|
-
lineItems: {
|
|
3529
|
-
amount: number;
|
|
3530
|
-
id: string;
|
|
3531
|
-
externalId: string | null;
|
|
3532
|
-
memo: string | null;
|
|
3533
|
-
description: string | null;
|
|
3534
|
-
product: string | null;
|
|
3535
|
-
subtotal: number;
|
|
3536
|
-
quantity: BD.BigDecimal;
|
|
3537
|
-
invoiceId: string;
|
|
3538
|
-
unitPrice: number;
|
|
3539
|
-
discountAmount: number;
|
|
3540
|
-
salesTaxTotal: number;
|
|
3541
|
-
totalAmount: number;
|
|
3542
|
-
}[];
|
|
3543
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3544
|
-
invoiceNumber: string;
|
|
3545
|
-
customer: null;
|
|
3546
|
-
email: string;
|
|
3547
|
-
address: string;
|
|
3548
|
-
lineItems: {
|
|
3549
|
-
product: string;
|
|
3550
|
-
description: string;
|
|
3551
|
-
unitPrice: number;
|
|
3552
|
-
quantity: BD.BigDecimal;
|
|
3553
|
-
amount: number;
|
|
3554
|
-
}[];
|
|
3555
|
-
} | {
|
|
3556
|
-
invoiceNumber: string | null;
|
|
3557
|
-
customer: {
|
|
3558
|
-
readonly id: string;
|
|
3559
|
-
readonly externalId: string | null;
|
|
3560
|
-
readonly individualName: string | null;
|
|
3561
|
-
readonly companyName: string | null;
|
|
3562
|
-
readonly email: string | null;
|
|
3563
|
-
readonly mobilePhone: string | null;
|
|
3564
|
-
readonly officePhone: string | null;
|
|
3565
|
-
readonly addressString: string | null;
|
|
3566
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3567
|
-
readonly memo: string | null;
|
|
3568
|
-
readonly _local?: {
|
|
3569
|
-
readonly isOptimistic: boolean;
|
|
3570
|
-
} | undefined;
|
|
3571
|
-
} | null;
|
|
3572
|
-
email: string | null | undefined;
|
|
3573
|
-
address: string | null | undefined;
|
|
3574
|
-
lineItems: {
|
|
3575
|
-
amount: number;
|
|
3576
|
-
id: string;
|
|
3577
|
-
externalId: string | null;
|
|
3578
|
-
memo: string | null;
|
|
3579
|
-
description: string | null;
|
|
3580
|
-
product: string | null;
|
|
3581
|
-
subtotal: number;
|
|
3582
|
-
quantity: BD.BigDecimal;
|
|
3583
|
-
invoiceId: string;
|
|
3584
|
-
unitPrice: number;
|
|
3585
|
-
discountAmount: number;
|
|
3586
|
-
salesTaxTotal: number;
|
|
3587
|
-
totalAmount: number;
|
|
3588
|
-
}[];
|
|
3589
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3590
|
-
invoiceNumber: string;
|
|
3591
|
-
customer: null;
|
|
3592
|
-
email: string;
|
|
3593
|
-
address: string;
|
|
3594
|
-
lineItems: {
|
|
3595
|
-
product: string;
|
|
3596
|
-
description: string;
|
|
3597
|
-
unitPrice: number;
|
|
3598
|
-
quantity: BD.BigDecimal;
|
|
3599
|
-
amount: number;
|
|
3600
|
-
}[];
|
|
3601
|
-
} | {
|
|
3602
|
-
invoiceNumber: string | null;
|
|
3603
|
-
customer: {
|
|
3604
|
-
readonly id: string;
|
|
3605
|
-
readonly externalId: string | null;
|
|
3606
|
-
readonly individualName: string | null;
|
|
3607
|
-
readonly companyName: string | null;
|
|
3608
|
-
readonly email: string | null;
|
|
3609
|
-
readonly mobilePhone: string | null;
|
|
3610
|
-
readonly officePhone: string | null;
|
|
3611
|
-
readonly addressString: string | null;
|
|
3612
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3613
|
-
readonly memo: string | null;
|
|
3614
|
-
readonly _local?: {
|
|
3615
|
-
readonly isOptimistic: boolean;
|
|
3616
|
-
} | undefined;
|
|
3617
|
-
} | null;
|
|
3618
|
-
email: string | null | undefined;
|
|
3619
|
-
address: string | null | undefined;
|
|
3620
|
-
lineItems: {
|
|
3621
|
-
amount: number;
|
|
3622
|
-
id: string;
|
|
3623
|
-
externalId: string | null;
|
|
3624
|
-
memo: string | null;
|
|
3625
|
-
description: string | null;
|
|
3626
|
-
product: string | null;
|
|
3627
|
-
subtotal: number;
|
|
3628
|
-
quantity: BD.BigDecimal;
|
|
3629
|
-
invoiceId: string;
|
|
3630
|
-
unitPrice: number;
|
|
3631
|
-
discountAmount: number;
|
|
3632
|
-
salesTaxTotal: number;
|
|
3633
|
-
totalAmount: number;
|
|
3634
|
-
}[];
|
|
3635
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3636
|
-
invoiceNumber: string;
|
|
3637
|
-
customer: null;
|
|
3638
|
-
email: string;
|
|
3639
|
-
address: string;
|
|
3640
|
-
lineItems: {
|
|
3641
|
-
product: string;
|
|
3642
|
-
description: string;
|
|
3643
|
-
unitPrice: number;
|
|
3644
|
-
quantity: BD.BigDecimal;
|
|
3645
|
-
amount: number;
|
|
3646
|
-
}[];
|
|
3647
|
-
} | {
|
|
3648
|
-
invoiceNumber: string | null;
|
|
3649
|
-
customer: {
|
|
3650
|
-
readonly id: string;
|
|
3651
|
-
readonly externalId: string | null;
|
|
3652
|
-
readonly individualName: string | null;
|
|
3653
|
-
readonly companyName: string | null;
|
|
3654
|
-
readonly email: string | null;
|
|
3655
|
-
readonly mobilePhone: string | null;
|
|
3656
|
-
readonly officePhone: string | null;
|
|
3657
|
-
readonly addressString: string | null;
|
|
3658
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3659
|
-
readonly memo: string | null;
|
|
3660
|
-
readonly _local?: {
|
|
3661
|
-
readonly isOptimistic: boolean;
|
|
3662
|
-
} | undefined;
|
|
3663
|
-
} | null;
|
|
3664
|
-
email: string | null | undefined;
|
|
3665
|
-
address: string | null | undefined;
|
|
3666
|
-
lineItems: {
|
|
3667
|
-
amount: number;
|
|
3668
|
-
id: string;
|
|
3669
|
-
externalId: string | null;
|
|
3670
|
-
memo: string | null;
|
|
3671
|
-
description: string | null;
|
|
3672
|
-
product: string | null;
|
|
3673
|
-
subtotal: number;
|
|
3674
|
-
quantity: BD.BigDecimal;
|
|
3675
|
-
invoiceId: string;
|
|
3676
|
-
unitPrice: number;
|
|
3677
|
-
discountAmount: number;
|
|
3678
|
-
salesTaxTotal: number;
|
|
3679
|
-
totalAmount: number;
|
|
3680
|
-
}[];
|
|
3681
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3682
|
-
invoiceNumber: string;
|
|
3683
|
-
customer: null;
|
|
3684
|
-
email: string;
|
|
3685
|
-
address: string;
|
|
3686
|
-
lineItems: {
|
|
3687
|
-
product: string;
|
|
3688
|
-
description: string;
|
|
3689
|
-
unitPrice: number;
|
|
3690
|
-
quantity: BD.BigDecimal;
|
|
3691
|
-
amount: number;
|
|
3692
|
-
}[];
|
|
3693
|
-
} | {
|
|
3694
|
-
invoiceNumber: string | null;
|
|
3695
|
-
customer: {
|
|
3696
|
-
readonly id: string;
|
|
3697
|
-
readonly externalId: string | null;
|
|
3698
|
-
readonly individualName: string | null;
|
|
3699
|
-
readonly companyName: string | null;
|
|
3700
|
-
readonly email: string | null;
|
|
3701
|
-
readonly mobilePhone: string | null;
|
|
3702
|
-
readonly officePhone: string | null;
|
|
3703
|
-
readonly addressString: string | null;
|
|
3704
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3705
|
-
readonly memo: string | null;
|
|
3706
|
-
readonly _local?: {
|
|
3707
|
-
readonly isOptimistic: boolean;
|
|
3708
|
-
} | undefined;
|
|
3709
|
-
} | null;
|
|
3710
|
-
email: string | null | undefined;
|
|
3711
|
-
address: string | null | undefined;
|
|
3712
|
-
lineItems: {
|
|
3713
|
-
amount: number;
|
|
3714
|
-
id: string;
|
|
3715
|
-
externalId: string | null;
|
|
3716
|
-
memo: string | null;
|
|
3717
|
-
description: string | null;
|
|
3718
|
-
product: string | null;
|
|
3719
|
-
subtotal: number;
|
|
3720
|
-
quantity: BD.BigDecimal;
|
|
3721
|
-
invoiceId: string;
|
|
3722
|
-
unitPrice: number;
|
|
3723
|
-
discountAmount: number;
|
|
3724
|
-
salesTaxTotal: number;
|
|
3725
|
-
totalAmount: number;
|
|
3726
|
-
}[];
|
|
3727
|
-
}> | undefined, unknown> & import("@tanstack/react-form").ReactFormApi<{
|
|
3728
|
-
invoiceNumber: string;
|
|
3729
|
-
customer: null;
|
|
3730
|
-
email: string;
|
|
3731
|
-
address: string;
|
|
3732
|
-
lineItems: {
|
|
3733
|
-
product: string;
|
|
3734
|
-
description: string;
|
|
3735
|
-
unitPrice: number;
|
|
3736
|
-
quantity: BD.BigDecimal;
|
|
3737
|
-
amount: number;
|
|
3738
|
-
}[];
|
|
3739
|
-
} | {
|
|
3740
|
-
invoiceNumber: string | null;
|
|
3741
|
-
customer: {
|
|
3742
|
-
readonly id: string;
|
|
3743
|
-
readonly externalId: string | null;
|
|
3744
|
-
readonly individualName: string | null;
|
|
3745
|
-
readonly companyName: string | null;
|
|
3746
|
-
readonly email: string | null;
|
|
3747
|
-
readonly mobilePhone: string | null;
|
|
3748
|
-
readonly officePhone: string | null;
|
|
3749
|
-
readonly addressString: string | null;
|
|
3750
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3751
|
-
readonly memo: string | null;
|
|
3752
|
-
readonly _local?: {
|
|
3753
|
-
readonly isOptimistic: boolean;
|
|
3754
|
-
} | undefined;
|
|
3755
|
-
} | null;
|
|
3756
|
-
email: string | null | undefined;
|
|
3757
|
-
address: string | null | undefined;
|
|
3758
|
-
lineItems: {
|
|
3759
|
-
amount: number;
|
|
3760
|
-
id: string;
|
|
3761
|
-
externalId: string | null;
|
|
3762
|
-
memo: string | null;
|
|
3763
|
-
description: string | null;
|
|
3764
|
-
product: string | null;
|
|
3765
|
-
subtotal: number;
|
|
3766
|
-
quantity: BD.BigDecimal;
|
|
3767
|
-
invoiceId: string;
|
|
3768
|
-
unitPrice: number;
|
|
3769
|
-
discountAmount: number;
|
|
3770
|
-
salesTaxTotal: number;
|
|
3771
|
-
totalAmount: number;
|
|
3772
|
-
}[];
|
|
3773
|
-
}, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3774
|
-
invoiceNumber: string;
|
|
3775
|
-
customer: null;
|
|
3776
|
-
email: string;
|
|
3777
|
-
address: string;
|
|
3778
|
-
lineItems: {
|
|
3779
|
-
product: string;
|
|
3780
|
-
description: string;
|
|
3781
|
-
unitPrice: number;
|
|
3782
|
-
quantity: BD.BigDecimal;
|
|
3783
|
-
amount: number;
|
|
3784
|
-
}[];
|
|
3785
|
-
} | {
|
|
3786
|
-
invoiceNumber: string | null;
|
|
3787
|
-
customer: {
|
|
3788
|
-
readonly id: string;
|
|
3789
|
-
readonly externalId: string | null;
|
|
3790
|
-
readonly individualName: string | null;
|
|
3791
|
-
readonly companyName: string | null;
|
|
3792
|
-
readonly email: string | null;
|
|
3793
|
-
readonly mobilePhone: string | null;
|
|
3794
|
-
readonly officePhone: string | null;
|
|
3795
|
-
readonly addressString: string | null;
|
|
3796
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3797
|
-
readonly memo: string | null;
|
|
3798
|
-
readonly _local?: {
|
|
3799
|
-
readonly isOptimistic: boolean;
|
|
3800
|
-
} | undefined;
|
|
3801
|
-
} | null;
|
|
3802
|
-
email: string | null | undefined;
|
|
3803
|
-
address: string | null | undefined;
|
|
3804
|
-
lineItems: {
|
|
3805
|
-
amount: number;
|
|
3806
|
-
id: string;
|
|
3807
|
-
externalId: string | null;
|
|
3808
|
-
memo: string | null;
|
|
3809
|
-
description: string | null;
|
|
3810
|
-
product: string | null;
|
|
3811
|
-
subtotal: number;
|
|
3812
|
-
quantity: BD.BigDecimal;
|
|
3813
|
-
invoiceId: string;
|
|
3814
|
-
unitPrice: number;
|
|
3815
|
-
discountAmount: number;
|
|
3816
|
-
salesTaxTotal: number;
|
|
3817
|
-
totalAmount: number;
|
|
3818
|
-
}[];
|
|
3819
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3820
|
-
invoiceNumber: string;
|
|
3821
|
-
customer: null;
|
|
3822
|
-
email: string;
|
|
3823
|
-
address: string;
|
|
3824
|
-
lineItems: {
|
|
3825
|
-
product: string;
|
|
3826
|
-
description: string;
|
|
3827
|
-
unitPrice: number;
|
|
3828
|
-
quantity: BD.BigDecimal;
|
|
3829
|
-
amount: number;
|
|
3830
|
-
}[];
|
|
3831
|
-
} | {
|
|
3832
|
-
invoiceNumber: string | null;
|
|
3833
|
-
customer: {
|
|
3834
|
-
readonly id: string;
|
|
3835
|
-
readonly externalId: string | null;
|
|
3836
|
-
readonly individualName: string | null;
|
|
3837
|
-
readonly companyName: string | null;
|
|
3838
|
-
readonly email: string | null;
|
|
3839
|
-
readonly mobilePhone: string | null;
|
|
3840
|
-
readonly officePhone: string | null;
|
|
3841
|
-
readonly addressString: string | null;
|
|
3842
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3843
|
-
readonly memo: string | null;
|
|
3844
|
-
readonly _local?: {
|
|
3845
|
-
readonly isOptimistic: boolean;
|
|
3846
|
-
} | undefined;
|
|
3847
|
-
} | null;
|
|
3848
|
-
email: string | null | undefined;
|
|
3849
|
-
address: string | null | undefined;
|
|
3850
|
-
lineItems: {
|
|
3851
|
-
amount: number;
|
|
3852
|
-
id: string;
|
|
3853
|
-
externalId: string | null;
|
|
3854
|
-
memo: string | null;
|
|
3855
|
-
description: string | null;
|
|
3856
|
-
product: string | null;
|
|
3857
|
-
subtotal: number;
|
|
3858
|
-
quantity: BD.BigDecimal;
|
|
3859
|
-
invoiceId: string;
|
|
3860
|
-
unitPrice: number;
|
|
3861
|
-
discountAmount: number;
|
|
3862
|
-
salesTaxTotal: number;
|
|
3863
|
-
totalAmount: number;
|
|
3864
|
-
}[];
|
|
3865
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3866
|
-
invoiceNumber: string;
|
|
3867
|
-
customer: null;
|
|
3868
|
-
email: string;
|
|
3869
|
-
address: string;
|
|
3870
|
-
lineItems: {
|
|
3871
|
-
product: string;
|
|
3872
|
-
description: string;
|
|
3873
|
-
unitPrice: number;
|
|
3874
|
-
quantity: BD.BigDecimal;
|
|
3875
|
-
amount: number;
|
|
3876
|
-
}[];
|
|
3877
|
-
} | {
|
|
3878
|
-
invoiceNumber: string | null;
|
|
3879
|
-
customer: {
|
|
3880
|
-
readonly id: string;
|
|
3881
|
-
readonly externalId: string | null;
|
|
3882
|
-
readonly individualName: string | null;
|
|
3883
|
-
readonly companyName: string | null;
|
|
3884
|
-
readonly email: string | null;
|
|
3885
|
-
readonly mobilePhone: string | null;
|
|
3886
|
-
readonly officePhone: string | null;
|
|
3887
|
-
readonly addressString: string | null;
|
|
3888
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3889
|
-
readonly memo: string | null;
|
|
3890
|
-
readonly _local?: {
|
|
3891
|
-
readonly isOptimistic: boolean;
|
|
3892
|
-
} | undefined;
|
|
3893
|
-
} | null;
|
|
3894
|
-
email: string | null | undefined;
|
|
3895
|
-
address: string | null | undefined;
|
|
3896
|
-
lineItems: {
|
|
3897
|
-
amount: number;
|
|
3898
|
-
id: string;
|
|
3899
|
-
externalId: string | null;
|
|
3900
|
-
memo: string | null;
|
|
3901
|
-
description: string | null;
|
|
3902
|
-
product: string | null;
|
|
3903
|
-
subtotal: number;
|
|
3904
|
-
quantity: BD.BigDecimal;
|
|
3905
|
-
invoiceId: string;
|
|
3906
|
-
unitPrice: number;
|
|
3907
|
-
discountAmount: number;
|
|
3908
|
-
salesTaxTotal: number;
|
|
3909
|
-
totalAmount: number;
|
|
3910
|
-
}[];
|
|
3911
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
3912
|
-
invoiceNumber: string;
|
|
3913
|
-
customer: null;
|
|
3914
|
-
email: string;
|
|
3915
|
-
address: string;
|
|
3916
|
-
lineItems: {
|
|
3917
|
-
product: string;
|
|
3918
|
-
description: string;
|
|
3919
|
-
unitPrice: number;
|
|
3920
|
-
quantity: BD.BigDecimal;
|
|
3921
|
-
amount: number;
|
|
3922
|
-
}[];
|
|
3923
|
-
} | {
|
|
3924
|
-
invoiceNumber: string | null;
|
|
3925
|
-
customer: {
|
|
3926
|
-
readonly id: string;
|
|
3927
|
-
readonly externalId: string | null;
|
|
3928
|
-
readonly individualName: string | null;
|
|
3929
|
-
readonly companyName: string | null;
|
|
3930
|
-
readonly email: string | null;
|
|
3931
|
-
readonly mobilePhone: string | null;
|
|
3932
|
-
readonly officePhone: string | null;
|
|
3933
|
-
readonly addressString: string | null;
|
|
3934
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3935
|
-
readonly memo: string | null;
|
|
3936
|
-
readonly _local?: {
|
|
3937
|
-
readonly isOptimistic: boolean;
|
|
3938
|
-
} | undefined;
|
|
3939
|
-
} | null;
|
|
3940
|
-
email: string | null | undefined;
|
|
3941
|
-
address: string | null | undefined;
|
|
3942
|
-
lineItems: {
|
|
3943
|
-
amount: number;
|
|
3944
|
-
id: string;
|
|
3945
|
-
externalId: string | null;
|
|
3946
|
-
memo: string | null;
|
|
3947
|
-
description: string | null;
|
|
3948
|
-
product: string | null;
|
|
3949
|
-
subtotal: number;
|
|
3950
|
-
quantity: BD.BigDecimal;
|
|
3951
|
-
invoiceId: string;
|
|
3952
|
-
unitPrice: number;
|
|
3953
|
-
discountAmount: number;
|
|
3954
|
-
salesTaxTotal: number;
|
|
3955
|
-
totalAmount: number;
|
|
3956
|
-
}[];
|
|
3957
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
3958
|
-
invoiceNumber: string;
|
|
3959
|
-
customer: null;
|
|
3960
|
-
email: string;
|
|
3961
|
-
address: string;
|
|
3962
|
-
lineItems: {
|
|
3963
|
-
product: string;
|
|
3964
|
-
description: string;
|
|
3965
|
-
unitPrice: number;
|
|
3966
|
-
quantity: BD.BigDecimal;
|
|
3967
|
-
amount: number;
|
|
3968
|
-
}[];
|
|
3969
|
-
} | {
|
|
3970
|
-
invoiceNumber: string | null;
|
|
3971
|
-
customer: {
|
|
3972
|
-
readonly id: string;
|
|
3973
|
-
readonly externalId: string | null;
|
|
3974
|
-
readonly individualName: string | null;
|
|
3975
|
-
readonly companyName: string | null;
|
|
3976
|
-
readonly email: string | null;
|
|
3977
|
-
readonly mobilePhone: string | null;
|
|
3978
|
-
readonly officePhone: string | null;
|
|
3979
|
-
readonly addressString: string | null;
|
|
3980
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
3981
|
-
readonly memo: string | null;
|
|
3982
|
-
readonly _local?: {
|
|
3983
|
-
readonly isOptimistic: boolean;
|
|
3984
|
-
} | undefined;
|
|
3985
|
-
} | null;
|
|
3986
|
-
email: string | null | undefined;
|
|
3987
|
-
address: string | null | undefined;
|
|
3988
|
-
lineItems: {
|
|
3989
|
-
amount: number;
|
|
3990
|
-
id: string;
|
|
3991
|
-
externalId: string | null;
|
|
3992
|
-
memo: string | null;
|
|
3993
|
-
description: string | null;
|
|
3994
|
-
product: string | null;
|
|
3995
|
-
subtotal: number;
|
|
3996
|
-
quantity: BD.BigDecimal;
|
|
3997
|
-
invoiceId: string;
|
|
3998
|
-
unitPrice: number;
|
|
3999
|
-
discountAmount: number;
|
|
4000
|
-
salesTaxTotal: number;
|
|
4001
|
-
totalAmount: number;
|
|
4002
|
-
}[];
|
|
4003
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
4004
|
-
invoiceNumber: string;
|
|
4005
|
-
customer: null;
|
|
4006
|
-
email: string;
|
|
4007
|
-
address: string;
|
|
4008
|
-
lineItems: {
|
|
4009
|
-
product: string;
|
|
4010
|
-
description: string;
|
|
4011
|
-
unitPrice: number;
|
|
4012
|
-
quantity: BD.BigDecimal;
|
|
4013
|
-
amount: number;
|
|
4014
|
-
}[];
|
|
4015
|
-
} | {
|
|
4016
|
-
invoiceNumber: string | null;
|
|
4017
|
-
customer: {
|
|
4018
|
-
readonly id: string;
|
|
4019
|
-
readonly externalId: string | null;
|
|
4020
|
-
readonly individualName: string | null;
|
|
4021
|
-
readonly companyName: string | null;
|
|
4022
|
-
readonly email: string | null;
|
|
4023
|
-
readonly mobilePhone: string | null;
|
|
4024
|
-
readonly officePhone: string | null;
|
|
4025
|
-
readonly addressString: string | null;
|
|
4026
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4027
|
-
readonly memo: string | null;
|
|
4028
|
-
readonly _local?: {
|
|
4029
|
-
readonly isOptimistic: boolean;
|
|
4030
|
-
} | undefined;
|
|
4031
|
-
} | null;
|
|
4032
|
-
email: string | null | undefined;
|
|
4033
|
-
address: string | null | undefined;
|
|
4034
|
-
lineItems: {
|
|
4035
|
-
amount: number;
|
|
4036
|
-
id: string;
|
|
4037
|
-
externalId: string | null;
|
|
4038
|
-
memo: string | null;
|
|
4039
|
-
description: string | null;
|
|
4040
|
-
product: string | null;
|
|
4041
|
-
subtotal: number;
|
|
4042
|
-
quantity: BD.BigDecimal;
|
|
4043
|
-
invoiceId: string;
|
|
4044
|
-
unitPrice: number;
|
|
4045
|
-
discountAmount: number;
|
|
4046
|
-
salesTaxTotal: number;
|
|
4047
|
-
totalAmount: number;
|
|
4048
|
-
}[];
|
|
4049
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4050
|
-
invoiceNumber: string;
|
|
4051
|
-
customer: null;
|
|
4052
|
-
email: string;
|
|
4053
|
-
address: string;
|
|
4054
|
-
lineItems: {
|
|
4055
|
-
product: string;
|
|
4056
|
-
description: string;
|
|
4057
|
-
unitPrice: number;
|
|
4058
|
-
quantity: BD.BigDecimal;
|
|
4059
|
-
amount: number;
|
|
4060
|
-
}[];
|
|
4061
|
-
} | {
|
|
4062
|
-
invoiceNumber: string | null;
|
|
4063
|
-
customer: {
|
|
4064
|
-
readonly id: string;
|
|
4065
|
-
readonly externalId: string | null;
|
|
4066
|
-
readonly individualName: string | null;
|
|
4067
|
-
readonly companyName: string | null;
|
|
4068
|
-
readonly email: string | null;
|
|
4069
|
-
readonly mobilePhone: string | null;
|
|
4070
|
-
readonly officePhone: string | null;
|
|
4071
|
-
readonly addressString: string | null;
|
|
4072
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4073
|
-
readonly memo: string | null;
|
|
4074
|
-
readonly _local?: {
|
|
4075
|
-
readonly isOptimistic: boolean;
|
|
4076
|
-
} | undefined;
|
|
4077
|
-
} | null;
|
|
4078
|
-
email: string | null | undefined;
|
|
4079
|
-
address: string | null | undefined;
|
|
4080
|
-
lineItems: {
|
|
4081
|
-
amount: number;
|
|
4082
|
-
id: string;
|
|
4083
|
-
externalId: string | null;
|
|
4084
|
-
memo: string | null;
|
|
4085
|
-
description: string | null;
|
|
4086
|
-
product: string | null;
|
|
4087
|
-
subtotal: number;
|
|
4088
|
-
quantity: BD.BigDecimal;
|
|
4089
|
-
invoiceId: string;
|
|
4090
|
-
unitPrice: number;
|
|
4091
|
-
discountAmount: number;
|
|
4092
|
-
salesTaxTotal: number;
|
|
4093
|
-
totalAmount: number;
|
|
4094
|
-
}[];
|
|
4095
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4096
|
-
invoiceNumber: string;
|
|
4097
|
-
customer: null;
|
|
4098
|
-
email: string;
|
|
4099
|
-
address: string;
|
|
4100
|
-
lineItems: {
|
|
4101
|
-
product: string;
|
|
4102
|
-
description: string;
|
|
4103
|
-
unitPrice: number;
|
|
4104
|
-
quantity: BD.BigDecimal;
|
|
4105
|
-
amount: number;
|
|
4106
|
-
}[];
|
|
4107
|
-
} | {
|
|
4108
|
-
invoiceNumber: string | null;
|
|
4109
|
-
customer: {
|
|
4110
|
-
readonly id: string;
|
|
4111
|
-
readonly externalId: string | null;
|
|
4112
|
-
readonly individualName: string | null;
|
|
4113
|
-
readonly companyName: string | null;
|
|
4114
|
-
readonly email: string | null;
|
|
4115
|
-
readonly mobilePhone: string | null;
|
|
4116
|
-
readonly officePhone: string | null;
|
|
4117
|
-
readonly addressString: string | null;
|
|
4118
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4119
|
-
readonly memo: string | null;
|
|
4120
|
-
readonly _local?: {
|
|
4121
|
-
readonly isOptimistic: boolean;
|
|
4122
|
-
} | undefined;
|
|
4123
|
-
} | null;
|
|
4124
|
-
email: string | null | undefined;
|
|
4125
|
-
address: string | null | undefined;
|
|
4126
|
-
lineItems: {
|
|
4127
|
-
amount: number;
|
|
4128
|
-
id: string;
|
|
4129
|
-
externalId: string | null;
|
|
4130
|
-
memo: string | null;
|
|
4131
|
-
description: string | null;
|
|
4132
|
-
product: string | null;
|
|
4133
|
-
subtotal: number;
|
|
4134
|
-
quantity: BD.BigDecimal;
|
|
4135
|
-
invoiceId: string;
|
|
4136
|
-
unitPrice: number;
|
|
4137
|
-
discountAmount: number;
|
|
4138
|
-
salesTaxTotal: number;
|
|
4139
|
-
totalAmount: number;
|
|
4140
|
-
}[];
|
|
4141
|
-
}> | undefined, unknown> & {
|
|
4142
|
-
AppField: import("@tanstack/react-form").FieldComponent<{
|
|
4143
|
-
invoiceNumber: string;
|
|
4144
|
-
customer: null;
|
|
4145
|
-
email: string;
|
|
4146
|
-
address: string;
|
|
4147
|
-
lineItems: {
|
|
4148
|
-
product: string;
|
|
4149
|
-
description: string;
|
|
4150
|
-
unitPrice: number;
|
|
4151
|
-
quantity: BD.BigDecimal;
|
|
4152
|
-
amount: number;
|
|
4153
|
-
}[];
|
|
4154
|
-
} | {
|
|
4155
|
-
invoiceNumber: string | null;
|
|
4156
|
-
customer: {
|
|
4157
|
-
readonly id: string;
|
|
4158
|
-
readonly externalId: string | null;
|
|
4159
|
-
readonly individualName: string | null;
|
|
4160
|
-
readonly companyName: string | null;
|
|
4161
|
-
readonly email: string | null;
|
|
4162
|
-
readonly mobilePhone: string | null;
|
|
4163
|
-
readonly officePhone: string | null;
|
|
4164
|
-
readonly addressString: string | null;
|
|
4165
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4166
|
-
readonly memo: string | null;
|
|
4167
|
-
readonly _local?: {
|
|
4168
|
-
readonly isOptimistic: boolean;
|
|
4169
|
-
} | undefined;
|
|
4170
|
-
} | null;
|
|
4171
|
-
email: string | null | undefined;
|
|
4172
|
-
address: string | null | undefined;
|
|
4173
|
-
lineItems: {
|
|
4174
|
-
amount: number;
|
|
4175
|
-
id: string;
|
|
4176
|
-
externalId: string | null;
|
|
4177
|
-
memo: string | null;
|
|
4178
|
-
description: string | null;
|
|
4179
|
-
product: string | null;
|
|
4180
|
-
subtotal: number;
|
|
4181
|
-
quantity: BD.BigDecimal;
|
|
4182
|
-
invoiceId: string;
|
|
4183
|
-
unitPrice: number;
|
|
4184
|
-
discountAmount: number;
|
|
4185
|
-
salesTaxTotal: number;
|
|
4186
|
-
totalAmount: number;
|
|
4187
|
-
}[];
|
|
4188
|
-
}, import("@tanstack/react-form").FormValidateOrFn<{
|
|
4189
|
-
invoiceNumber: string;
|
|
4190
|
-
customer: null;
|
|
4191
|
-
email: string;
|
|
4192
|
-
address: string;
|
|
4193
|
-
lineItems: {
|
|
4194
|
-
product: string;
|
|
4195
|
-
description: string;
|
|
4196
|
-
unitPrice: number;
|
|
4197
|
-
quantity: BD.BigDecimal;
|
|
4198
|
-
amount: number;
|
|
4199
|
-
}[];
|
|
4200
|
-
} | {
|
|
4201
|
-
invoiceNumber: string | null;
|
|
4202
|
-
customer: {
|
|
4203
|
-
readonly id: string;
|
|
4204
|
-
readonly externalId: string | null;
|
|
4205
|
-
readonly individualName: string | null;
|
|
4206
|
-
readonly companyName: string | null;
|
|
4207
|
-
readonly email: string | null;
|
|
4208
|
-
readonly mobilePhone: string | null;
|
|
4209
|
-
readonly officePhone: string | null;
|
|
4210
|
-
readonly addressString: string | null;
|
|
4211
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4212
|
-
readonly memo: string | null;
|
|
4213
|
-
readonly _local?: {
|
|
4214
|
-
readonly isOptimistic: boolean;
|
|
4215
|
-
} | undefined;
|
|
4216
|
-
} | null;
|
|
4217
|
-
email: string | null | undefined;
|
|
4218
|
-
address: string | null | undefined;
|
|
4219
|
-
lineItems: {
|
|
4220
|
-
amount: number;
|
|
4221
|
-
id: string;
|
|
4222
|
-
externalId: string | null;
|
|
4223
|
-
memo: string | null;
|
|
4224
|
-
description: string | null;
|
|
4225
|
-
product: string | null;
|
|
4226
|
-
subtotal: number;
|
|
4227
|
-
quantity: BD.BigDecimal;
|
|
4228
|
-
invoiceId: string;
|
|
4229
|
-
unitPrice: number;
|
|
4230
|
-
discountAmount: number;
|
|
4231
|
-
salesTaxTotal: number;
|
|
4232
|
-
totalAmount: number;
|
|
4233
|
-
}[];
|
|
4234
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
4235
|
-
invoiceNumber: string;
|
|
4236
|
-
customer: null;
|
|
4237
|
-
email: string;
|
|
4238
|
-
address: string;
|
|
4239
|
-
lineItems: {
|
|
4240
|
-
product: string;
|
|
4241
|
-
description: string;
|
|
4242
|
-
unitPrice: number;
|
|
4243
|
-
quantity: BD.BigDecimal;
|
|
4244
|
-
amount: number;
|
|
4245
|
-
}[];
|
|
4246
|
-
} | {
|
|
4247
|
-
invoiceNumber: string | null;
|
|
4248
|
-
customer: {
|
|
4249
|
-
readonly id: string;
|
|
4250
|
-
readonly externalId: string | null;
|
|
4251
|
-
readonly individualName: string | null;
|
|
4252
|
-
readonly companyName: string | null;
|
|
4253
|
-
readonly email: string | null;
|
|
4254
|
-
readonly mobilePhone: string | null;
|
|
4255
|
-
readonly officePhone: string | null;
|
|
4256
|
-
readonly addressString: string | null;
|
|
4257
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4258
|
-
readonly memo: string | null;
|
|
4259
|
-
readonly _local?: {
|
|
4260
|
-
readonly isOptimistic: boolean;
|
|
4261
|
-
} | undefined;
|
|
4262
|
-
} | null;
|
|
4263
|
-
email: string | null | undefined;
|
|
4264
|
-
address: string | null | undefined;
|
|
4265
|
-
lineItems: {
|
|
4266
|
-
amount: number;
|
|
4267
|
-
id: string;
|
|
4268
|
-
externalId: string | null;
|
|
4269
|
-
memo: string | null;
|
|
4270
|
-
description: string | null;
|
|
4271
|
-
product: string | null;
|
|
4272
|
-
subtotal: number;
|
|
4273
|
-
quantity: BD.BigDecimal;
|
|
4274
|
-
invoiceId: string;
|
|
4275
|
-
unitPrice: number;
|
|
4276
|
-
discountAmount: number;
|
|
4277
|
-
salesTaxTotal: number;
|
|
4278
|
-
totalAmount: number;
|
|
4279
|
-
}[];
|
|
4280
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4281
|
-
invoiceNumber: string;
|
|
4282
|
-
customer: null;
|
|
4283
|
-
email: string;
|
|
4284
|
-
address: string;
|
|
4285
|
-
lineItems: {
|
|
4286
|
-
product: string;
|
|
4287
|
-
description: string;
|
|
4288
|
-
unitPrice: number;
|
|
4289
|
-
quantity: BD.BigDecimal;
|
|
4290
|
-
amount: number;
|
|
4291
|
-
}[];
|
|
4292
|
-
} | {
|
|
4293
|
-
invoiceNumber: string | null;
|
|
4294
|
-
customer: {
|
|
4295
|
-
readonly id: string;
|
|
4296
|
-
readonly externalId: string | null;
|
|
4297
|
-
readonly individualName: string | null;
|
|
4298
|
-
readonly companyName: string | null;
|
|
4299
|
-
readonly email: string | null;
|
|
4300
|
-
readonly mobilePhone: string | null;
|
|
4301
|
-
readonly officePhone: string | null;
|
|
4302
|
-
readonly addressString: string | null;
|
|
4303
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4304
|
-
readonly memo: string | null;
|
|
4305
|
-
readonly _local?: {
|
|
4306
|
-
readonly isOptimistic: boolean;
|
|
4307
|
-
} | undefined;
|
|
4308
|
-
} | null;
|
|
4309
|
-
email: string | null | undefined;
|
|
4310
|
-
address: string | null | undefined;
|
|
4311
|
-
lineItems: {
|
|
4312
|
-
amount: number;
|
|
4313
|
-
id: string;
|
|
4314
|
-
externalId: string | null;
|
|
4315
|
-
memo: string | null;
|
|
4316
|
-
description: string | null;
|
|
4317
|
-
product: string | null;
|
|
4318
|
-
subtotal: number;
|
|
4319
|
-
quantity: BD.BigDecimal;
|
|
4320
|
-
invoiceId: string;
|
|
4321
|
-
unitPrice: number;
|
|
4322
|
-
discountAmount: number;
|
|
4323
|
-
salesTaxTotal: number;
|
|
4324
|
-
totalAmount: number;
|
|
4325
|
-
}[];
|
|
4326
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
4327
|
-
invoiceNumber: string;
|
|
4328
|
-
customer: null;
|
|
4329
|
-
email: string;
|
|
4330
|
-
address: string;
|
|
4331
|
-
lineItems: {
|
|
4332
|
-
product: string;
|
|
4333
|
-
description: string;
|
|
4334
|
-
unitPrice: number;
|
|
4335
|
-
quantity: BD.BigDecimal;
|
|
4336
|
-
amount: number;
|
|
4337
|
-
}[];
|
|
4338
|
-
} | {
|
|
4339
|
-
invoiceNumber: string | null;
|
|
4340
|
-
customer: {
|
|
4341
|
-
readonly id: string;
|
|
4342
|
-
readonly externalId: string | null;
|
|
4343
|
-
readonly individualName: string | null;
|
|
4344
|
-
readonly companyName: string | null;
|
|
4345
|
-
readonly email: string | null;
|
|
4346
|
-
readonly mobilePhone: string | null;
|
|
4347
|
-
readonly officePhone: string | null;
|
|
4348
|
-
readonly addressString: string | null;
|
|
4349
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4350
|
-
readonly memo: string | null;
|
|
4351
|
-
readonly _local?: {
|
|
4352
|
-
readonly isOptimistic: boolean;
|
|
4353
|
-
} | undefined;
|
|
4354
|
-
} | null;
|
|
4355
|
-
email: string | null | undefined;
|
|
4356
|
-
address: string | null | undefined;
|
|
4357
|
-
lineItems: {
|
|
4358
|
-
amount: number;
|
|
4359
|
-
id: string;
|
|
4360
|
-
externalId: string | null;
|
|
4361
|
-
memo: string | null;
|
|
4362
|
-
description: string | null;
|
|
4363
|
-
product: string | null;
|
|
4364
|
-
subtotal: number;
|
|
4365
|
-
quantity: BD.BigDecimal;
|
|
4366
|
-
invoiceId: string;
|
|
4367
|
-
unitPrice: number;
|
|
4368
|
-
discountAmount: number;
|
|
4369
|
-
salesTaxTotal: number;
|
|
4370
|
-
totalAmount: number;
|
|
4371
|
-
}[];
|
|
4372
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4373
|
-
invoiceNumber: string;
|
|
4374
|
-
customer: null;
|
|
4375
|
-
email: string;
|
|
4376
|
-
address: string;
|
|
4377
|
-
lineItems: {
|
|
4378
|
-
product: string;
|
|
4379
|
-
description: string;
|
|
4380
|
-
unitPrice: number;
|
|
4381
|
-
quantity: BD.BigDecimal;
|
|
4382
|
-
amount: number;
|
|
4383
|
-
}[];
|
|
4384
|
-
} | {
|
|
4385
|
-
invoiceNumber: string | null;
|
|
4386
|
-
customer: {
|
|
4387
|
-
readonly id: string;
|
|
4388
|
-
readonly externalId: string | null;
|
|
4389
|
-
readonly individualName: string | null;
|
|
4390
|
-
readonly companyName: string | null;
|
|
4391
|
-
readonly email: string | null;
|
|
4392
|
-
readonly mobilePhone: string | null;
|
|
4393
|
-
readonly officePhone: string | null;
|
|
4394
|
-
readonly addressString: string | null;
|
|
4395
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4396
|
-
readonly memo: string | null;
|
|
4397
|
-
readonly _local?: {
|
|
4398
|
-
readonly isOptimistic: boolean;
|
|
4399
|
-
} | undefined;
|
|
4400
|
-
} | null;
|
|
4401
|
-
email: string | null | undefined;
|
|
4402
|
-
address: string | null | undefined;
|
|
4403
|
-
lineItems: {
|
|
4404
|
-
amount: number;
|
|
4405
|
-
id: string;
|
|
4406
|
-
externalId: string | null;
|
|
4407
|
-
memo: string | null;
|
|
4408
|
-
description: string | null;
|
|
4409
|
-
product: string | null;
|
|
4410
|
-
subtotal: number;
|
|
4411
|
-
quantity: BD.BigDecimal;
|
|
4412
|
-
invoiceId: string;
|
|
4413
|
-
unitPrice: number;
|
|
4414
|
-
discountAmount: number;
|
|
4415
|
-
salesTaxTotal: number;
|
|
4416
|
-
totalAmount: number;
|
|
4417
|
-
}[];
|
|
4418
|
-
}> | undefined, import("@tanstack/react-form").FormValidateOrFn<{
|
|
4419
|
-
invoiceNumber: string;
|
|
4420
|
-
customer: null;
|
|
4421
|
-
email: string;
|
|
4422
|
-
address: string;
|
|
4423
|
-
lineItems: {
|
|
4424
|
-
product: string;
|
|
4425
|
-
description: string;
|
|
4426
|
-
unitPrice: number;
|
|
4427
|
-
quantity: BD.BigDecimal;
|
|
4428
|
-
amount: number;
|
|
4429
|
-
}[];
|
|
4430
|
-
} | {
|
|
4431
|
-
invoiceNumber: string | null;
|
|
4432
|
-
customer: {
|
|
4433
|
-
readonly id: string;
|
|
4434
|
-
readonly externalId: string | null;
|
|
4435
|
-
readonly individualName: string | null;
|
|
4436
|
-
readonly companyName: string | null;
|
|
4437
|
-
readonly email: string | null;
|
|
4438
|
-
readonly mobilePhone: string | null;
|
|
4439
|
-
readonly officePhone: string | null;
|
|
4440
|
-
readonly addressString: string | null;
|
|
4441
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4442
|
-
readonly memo: string | null;
|
|
4443
|
-
readonly _local?: {
|
|
4444
|
-
readonly isOptimistic: boolean;
|
|
4445
|
-
} | undefined;
|
|
4446
|
-
} | null;
|
|
4447
|
-
email: string | null | undefined;
|
|
4448
|
-
address: string | null | undefined;
|
|
4449
|
-
lineItems: {
|
|
4450
|
-
amount: number;
|
|
4451
|
-
id: string;
|
|
4452
|
-
externalId: string | null;
|
|
4453
|
-
memo: string | null;
|
|
4454
|
-
description: string | null;
|
|
4455
|
-
product: string | null;
|
|
4456
|
-
subtotal: number;
|
|
4457
|
-
quantity: BD.BigDecimal;
|
|
4458
|
-
invoiceId: string;
|
|
4459
|
-
unitPrice: number;
|
|
4460
|
-
discountAmount: number;
|
|
4461
|
-
salesTaxTotal: number;
|
|
4462
|
-
totalAmount: number;
|
|
4463
|
-
}[];
|
|
4464
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4465
|
-
invoiceNumber: string;
|
|
4466
|
-
customer: null;
|
|
4467
|
-
email: string;
|
|
4468
|
-
address: string;
|
|
4469
|
-
lineItems: {
|
|
4470
|
-
product: string;
|
|
4471
|
-
description: string;
|
|
4472
|
-
unitPrice: number;
|
|
4473
|
-
quantity: BD.BigDecimal;
|
|
4474
|
-
amount: number;
|
|
4475
|
-
}[];
|
|
4476
|
-
} | {
|
|
4477
|
-
invoiceNumber: string | null;
|
|
4478
|
-
customer: {
|
|
4479
|
-
readonly id: string;
|
|
4480
|
-
readonly externalId: string | null;
|
|
4481
|
-
readonly individualName: string | null;
|
|
4482
|
-
readonly companyName: string | null;
|
|
4483
|
-
readonly email: string | null;
|
|
4484
|
-
readonly mobilePhone: string | null;
|
|
4485
|
-
readonly officePhone: string | null;
|
|
4486
|
-
readonly addressString: string | null;
|
|
4487
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4488
|
-
readonly memo: string | null;
|
|
4489
|
-
readonly _local?: {
|
|
4490
|
-
readonly isOptimistic: boolean;
|
|
4491
|
-
} | undefined;
|
|
4492
|
-
} | null;
|
|
4493
|
-
email: string | null | undefined;
|
|
4494
|
-
address: string | null | undefined;
|
|
4495
|
-
lineItems: {
|
|
4496
|
-
amount: number;
|
|
4497
|
-
id: string;
|
|
4498
|
-
externalId: string | null;
|
|
4499
|
-
memo: string | null;
|
|
4500
|
-
description: string | null;
|
|
4501
|
-
product: string | null;
|
|
4502
|
-
subtotal: number;
|
|
4503
|
-
quantity: BD.BigDecimal;
|
|
4504
|
-
invoiceId: string;
|
|
4505
|
-
unitPrice: number;
|
|
4506
|
-
discountAmount: number;
|
|
4507
|
-
salesTaxTotal: number;
|
|
4508
|
-
totalAmount: number;
|
|
4509
|
-
}[];
|
|
4510
|
-
}> | undefined, import("@tanstack/react-form").FormAsyncValidateOrFn<{
|
|
4511
|
-
invoiceNumber: string;
|
|
4512
|
-
customer: null;
|
|
4513
|
-
email: string;
|
|
4514
|
-
address: string;
|
|
4515
|
-
lineItems: {
|
|
4516
|
-
product: string;
|
|
4517
|
-
description: string;
|
|
4518
|
-
unitPrice: number;
|
|
4519
|
-
quantity: BD.BigDecimal;
|
|
4520
|
-
amount: number;
|
|
4521
|
-
}[];
|
|
4522
|
-
} | {
|
|
4523
|
-
invoiceNumber: string | null;
|
|
4524
|
-
customer: {
|
|
4525
|
-
readonly id: string;
|
|
4526
|
-
readonly externalId: string | null;
|
|
4527
|
-
readonly individualName: string | null;
|
|
4528
|
-
readonly companyName: string | null;
|
|
4529
|
-
readonly email: string | null;
|
|
4530
|
-
readonly mobilePhone: string | null;
|
|
4531
|
-
readonly officePhone: string | null;
|
|
4532
|
-
readonly addressString: string | null;
|
|
4533
|
-
readonly status: "ACTIVE" | "ARCHIVED";
|
|
4534
|
-
readonly memo: string | null;
|
|
4535
|
-
readonly _local?: {
|
|
4536
|
-
readonly isOptimistic: boolean;
|
|
4537
|
-
} | undefined;
|
|
4538
|
-
} | null;
|
|
4539
|
-
email: string | null | undefined;
|
|
4540
|
-
address: string | null | undefined;
|
|
4541
|
-
lineItems: {
|
|
4542
|
-
amount: number;
|
|
4543
|
-
id: string;
|
|
4544
|
-
externalId: string | null;
|
|
4545
|
-
memo: string | null;
|
|
4546
|
-
description: string | null;
|
|
4547
|
-
product: string | null;
|
|
4548
|
-
subtotal: number;
|
|
4549
|
-
quantity: BD.BigDecimal;
|
|
4550
|
-
invoiceId: string;
|
|
4551
|
-
unitPrice: number;
|
|
4552
|
-
discountAmount: number;
|
|
4553
|
-
salesTaxTotal: number;
|
|
4554
|
-
totalAmount: number;
|
|
4555
|
-
}[];
|
|
4556
|
-
}> | undefined, unknown, NoInfer<{
|
|
4557
|
-
readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
|
|
4558
|
-
readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
|
|
4559
|
-
readonly FormCurrencyField: typeof import("@layerfi/components/features/forms/components/FormCurrencyField").FormCurrencyField;
|
|
4560
|
-
readonly FormTextAreaField: typeof import("@layerfi/components/features/forms/components/FormTextAreaField").FormTextAreaField;
|
|
4561
|
-
readonly FormTextField: typeof import("@layerfi/components/features/forms/components/FormTextField").FormTextField;
|
|
4562
|
-
}>>;
|
|
4563
|
-
AppForm: import("react").ComponentType<import("react").PropsWithChildren>;
|
|
4564
|
-
};
|
|
4565
|
-
submitError: string | undefined;
|
|
3273
|
+
import { type InvoiceFormMode } from '@layerfi/components/components/Invoices/InvoiceForm/InvoiceForm';
|
|
3274
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3275
|
+
export type InvoiceDetailProps = InvoiceFormMode & {
|
|
3276
|
+
onSuccess?: (invoice: Invoice) => void;
|
|
3277
|
+
onGoBack: () => void;
|
|
3278
|
+
};
|
|
3279
|
+
export const InvoiceDetail: (props: InvoiceDetailProps) => import("react/jsx-runtime").JSX.Element;
|
|
3280
|
+
|
|
3281
|
+
}
|
|
3282
|
+
declare module '@layerfi/components/components/Invoices/InvoiceForm/InvoiceForm' {
|
|
3283
|
+
import React from 'react';
|
|
3284
|
+
import type { Invoice } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3285
|
+
import { UpsertInvoiceMode } from '@layerfi/components/features/invoices/api/useUpsertInvoice';
|
|
3286
|
+
import { type InvoiceFormState } from '@layerfi/components/components/Invoices/InvoiceForm/formUtils';
|
|
3287
|
+
export type InvoiceFormMode = {
|
|
3288
|
+
mode: UpsertInvoiceMode.Update;
|
|
3289
|
+
invoice: Invoice;
|
|
3290
|
+
} | {
|
|
3291
|
+
mode: UpsertInvoiceMode.Create;
|
|
3292
|
+
};
|
|
3293
|
+
export type InvoiceFormProps = InvoiceFormMode & {
|
|
3294
|
+
isReadOnly: boolean;
|
|
3295
|
+
onSuccess?: (invoice: Invoice) => void;
|
|
3296
|
+
onChangeFormState?: (formState: InvoiceFormState) => void;
|
|
3297
|
+
};
|
|
3298
|
+
export const InvoiceForm: React.ForwardRefExoticComponent<InvoiceFormProps & React.RefAttributes<unknown>>;
|
|
3299
|
+
|
|
3300
|
+
}
|
|
3301
|
+
declare module '@layerfi/components/components/Invoices/InvoiceForm/formUtils' {
|
|
3302
|
+
import { type Invoice, type InvoiceForm, type InvoiceFormLineItem } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3303
|
+
import { ValidationErrorMap } from '@tanstack/react-form';
|
|
3304
|
+
export type InvoiceFormState = {
|
|
4566
3305
|
isFormValid: boolean;
|
|
3306
|
+
isSubmitting: boolean;
|
|
3307
|
+
submitError: string | undefined;
|
|
3308
|
+
};
|
|
3309
|
+
export const getEmptyLineItem: () => InvoiceFormLineItem;
|
|
3310
|
+
export const getInvoiceFormDefaultValues: () => InvoiceForm;
|
|
3311
|
+
export const getInvoiceFormInitialValues: (invoice: Invoice) => InvoiceForm;
|
|
3312
|
+
export const validateOnSubmit: ({ value: invoice }: {
|
|
3313
|
+
value: InvoiceForm;
|
|
3314
|
+
}) => ({
|
|
3315
|
+
customer: string;
|
|
3316
|
+
invoiceNumber?: undefined;
|
|
3317
|
+
sentAt?: undefined;
|
|
3318
|
+
dueAt?: undefined;
|
|
3319
|
+
lineItems?: undefined;
|
|
3320
|
+
} | {
|
|
3321
|
+
invoiceNumber: string;
|
|
3322
|
+
customer?: undefined;
|
|
3323
|
+
sentAt?: undefined;
|
|
3324
|
+
dueAt?: undefined;
|
|
3325
|
+
lineItems?: undefined;
|
|
3326
|
+
} | {
|
|
3327
|
+
sentAt: string;
|
|
3328
|
+
customer?: undefined;
|
|
3329
|
+
invoiceNumber?: undefined;
|
|
3330
|
+
dueAt?: undefined;
|
|
3331
|
+
lineItems?: undefined;
|
|
3332
|
+
} | {
|
|
3333
|
+
dueAt: string;
|
|
3334
|
+
customer?: undefined;
|
|
3335
|
+
invoiceNumber?: undefined;
|
|
3336
|
+
sentAt?: undefined;
|
|
3337
|
+
lineItems?: undefined;
|
|
3338
|
+
} | {
|
|
3339
|
+
lineItems: string;
|
|
3340
|
+
customer?: undefined;
|
|
3341
|
+
invoiceNumber?: undefined;
|
|
3342
|
+
sentAt?: undefined;
|
|
3343
|
+
dueAt?: undefined;
|
|
3344
|
+
})[] | null;
|
|
3345
|
+
export function flattenValidationErrors(errors: ValidationErrorMap): string[];
|
|
3346
|
+
export const convertInvoiceFormToParams: (form: InvoiceForm) => unknown;
|
|
3347
|
+
|
|
3348
|
+
}
|
|
3349
|
+
declare module '@layerfi/components/components/Invoices/InvoiceForm/totalsUtils' {
|
|
3350
|
+
import { BigDecimal as BD } from 'effect';
|
|
3351
|
+
import type { InvoiceForm, InvoiceFormLineItem } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3352
|
+
export function computeSubtotal(lineItems: InvoiceFormLineItem[]): BD.BigDecimal;
|
|
3353
|
+
export function computeSubtotal(lineItems: readonly InvoiceFormLineItem[]): BD.BigDecimal;
|
|
3354
|
+
export const computeRawTaxableSubtotal: (lineItems: InvoiceFormLineItem[]) => BD.BigDecimal;
|
|
3355
|
+
export function computeAdditionalDiscount({ subtotal, discountRate, }: {
|
|
3356
|
+
subtotal: BD.BigDecimal;
|
|
3357
|
+
discountRate: BD.BigDecimal;
|
|
3358
|
+
}): BD.BigDecimal;
|
|
3359
|
+
export function computeTaxableSubtotal({ rawTaxableSubtotal, discountRate, }: {
|
|
3360
|
+
rawTaxableSubtotal: BD.BigDecimal;
|
|
3361
|
+
discountRate: BD.BigDecimal;
|
|
3362
|
+
}): BD.BigDecimal;
|
|
3363
|
+
export function computeTaxes({ taxableSubtotal, taxRate, }: {
|
|
3364
|
+
taxableSubtotal: BD.BigDecimal;
|
|
3365
|
+
taxRate: BD.BigDecimal;
|
|
3366
|
+
}): BD.BigDecimal;
|
|
3367
|
+
export function computeGrandTotal({ subtotal, additionalDiscount, taxes, }: {
|
|
3368
|
+
subtotal: BD.BigDecimal;
|
|
3369
|
+
additionalDiscount: BD.BigDecimal;
|
|
3370
|
+
taxes: BD.BigDecimal;
|
|
3371
|
+
}): BD.BigDecimal;
|
|
3372
|
+
export const getGrandTotalFromInvoice: (invoice: InvoiceForm) => BD.BigDecimal;
|
|
3373
|
+
|
|
3374
|
+
}
|
|
3375
|
+
declare module '@layerfi/components/components/Invoices/InvoiceForm/useInvoiceForm' {
|
|
3376
|
+
import { type Invoice, type InvoiceForm } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
3377
|
+
import { UpsertInvoiceMode } from '@layerfi/components/features/invoices/api/useUpsertInvoice';
|
|
3378
|
+
type UseInvoiceFormProps = {
|
|
3379
|
+
onSuccess?: (invoice: Invoice) => void;
|
|
3380
|
+
mode: UpsertInvoiceMode.Create;
|
|
3381
|
+
} | {
|
|
3382
|
+
onSuccess?: (invoice: Invoice) => void;
|
|
3383
|
+
mode: UpsertInvoiceMode.Update;
|
|
3384
|
+
invoice: Invoice;
|
|
3385
|
+
};
|
|
3386
|
+
export const useInvoiceForm: (props: UseInvoiceFormProps) => {
|
|
3387
|
+
form: import("@tanstack/react-form/dist/esm/createFormHook").AppFieldExtendedReactFormApi<InvoiceForm, import("@tanstack/react-form").FormValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormAsyncValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormAsyncValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormAsyncValidateOrFn<InvoiceForm>, import("@tanstack/react-form").FormAsyncValidateOrFn<InvoiceForm>, unknown, {
|
|
3388
|
+
readonly BaseFormTextField: typeof import("@layerfi/components/features/forms/components/BaseFormTextField").BaseFormTextField;
|
|
3389
|
+
readonly FormBigDecimalField: typeof import("@layerfi/components/features/forms/components/FormBigDecimalField").FormBigDecimalField;
|
|
3390
|
+
readonly FormCheckboxField: typeof import("@layerfi/components/features/forms/components/FormCheckboxField").FormCheckboxField;
|
|
3391
|
+
readonly FormDateField: typeof import("@layerfi/components/features/forms/components/FormDateField").FormDateField;
|
|
3392
|
+
readonly FormTextAreaField: typeof import("@layerfi/components/features/forms/components/FormTextAreaField").FormTextAreaField;
|
|
3393
|
+
readonly FormTextField: typeof import("@layerfi/components/features/forms/components/FormTextField").FormTextField;
|
|
3394
|
+
}, {}>;
|
|
3395
|
+
formState: {
|
|
3396
|
+
isFormValid: boolean;
|
|
3397
|
+
isSubmitting: boolean;
|
|
3398
|
+
submitError: string | undefined;
|
|
3399
|
+
};
|
|
3400
|
+
totals: {
|
|
3401
|
+
subtotal: import("effect/BigDecimal").BigDecimal;
|
|
3402
|
+
additionalDiscount: import("effect/BigDecimal").BigDecimal;
|
|
3403
|
+
taxableSubtotal: import("effect/BigDecimal").BigDecimal;
|
|
3404
|
+
taxes: import("effect/BigDecimal").BigDecimal;
|
|
3405
|
+
grandTotal: import("effect/BigDecimal").BigDecimal;
|
|
3406
|
+
};
|
|
4567
3407
|
};
|
|
4568
3408
|
export {};
|
|
4569
3409
|
|
|
@@ -4575,6 +3415,27 @@ declare module '@layerfi/components/components/Invoices/InvoiceStatusCell/Invoic
|
|
|
4575
3415
|
inline?: boolean;
|
|
4576
3416
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
4577
3417
|
|
|
3418
|
+
}
|
|
3419
|
+
declare module '@layerfi/components/components/Invoices/InvoiceTermsComboBox/InvoiceTermsComboBox' {
|
|
3420
|
+
import { ZonedDateTime } from '@internationalized/date';
|
|
3421
|
+
export enum InvoiceTermsValues {
|
|
3422
|
+
Net10 = "Net10",
|
|
3423
|
+
Net15 = "Net15",
|
|
3424
|
+
Net30 = "Net30",
|
|
3425
|
+
Net60 = "Net60",
|
|
3426
|
+
Net90 = "Net90",
|
|
3427
|
+
Custom = "Custom"
|
|
3428
|
+
}
|
|
3429
|
+
export const getDurationInDaysFromTerms: (terms: InvoiceTermsValues) => 15 | 60 | 30 | 10 | 90 | undefined;
|
|
3430
|
+
export const getInvoiceTermsFromDates: (sentAt: ZonedDateTime | null, dueAt: ZonedDateTime | null) => InvoiceTermsValues;
|
|
3431
|
+
type InvoiceTermsComboBoxProps = {
|
|
3432
|
+
value: InvoiceTermsValues;
|
|
3433
|
+
onValueChange: (value: InvoiceTermsValues | null) => void;
|
|
3434
|
+
isReadOnly?: boolean;
|
|
3435
|
+
};
|
|
3436
|
+
export const InvoiceTermsComboBox: ({ value, onValueChange, isReadOnly }: InvoiceTermsComboBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
3437
|
+
export {};
|
|
3438
|
+
|
|
4578
3439
|
}
|
|
4579
3440
|
declare module '@layerfi/components/components/Invoices/Invoices' {
|
|
4580
3441
|
interface InvoicesStringOverrides {
|
|
@@ -6502,7 +5363,7 @@ declare module '@layerfi/components/components/ui/Button/Button' {
|
|
|
6502
5363
|
}
|
|
6503
5364
|
declare module '@layerfi/components/components/ui/Checkbox/Checkbox' {
|
|
6504
5365
|
import { type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';
|
|
6505
|
-
type CheckboxVariant = 'default' | 'success';
|
|
5366
|
+
type CheckboxVariant = 'default' | 'success' | 'error';
|
|
6506
5367
|
type CheckboxSize = 'md' | 'lg';
|
|
6507
5368
|
type CheckboxProps = Omit<AriaCheckboxProps, 'className'> & {
|
|
6508
5369
|
className?: string;
|
|
@@ -6555,11 +5416,26 @@ declare module '@layerfi/components/components/ui/ComboBox/ComboBox' {
|
|
|
6555
5416
|
isMutating?: boolean;
|
|
6556
5417
|
isSearchable?: boolean;
|
|
6557
5418
|
isClearable?: boolean;
|
|
5419
|
+
isReadOnly?: boolean;
|
|
6558
5420
|
displayDisabledAsSelected?: boolean;
|
|
6559
5421
|
} & OptionsOrGroups<T> & AriaLabelProps;
|
|
6560
|
-
export function ComboBox<T extends ComboBoxOption>({ className, selectedValue, onSelectedValueChange, options, groups, onInputValueChange, placeholder, slots, inputId, isDisabled, isError, isLoading, isMutating, isSearchable, isClearable, displayDisabledAsSelected, ...ariaProps }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
5422
|
+
export function ComboBox<T extends ComboBoxOption>({ className, selectedValue, onSelectedValueChange, options, groups, onInputValueChange, placeholder, slots, inputId, isDisabled, isError, isLoading, isMutating, isSearchable, isClearable, isReadOnly, displayDisabledAsSelected, ...ariaProps }: ComboBoxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
6561
5423
|
export {};
|
|
6562
5424
|
|
|
5425
|
+
}
|
|
5426
|
+
declare module '@layerfi/components/components/ui/Date/Date' {
|
|
5427
|
+
import type { ZonedDateTime } from '@internationalized/date';
|
|
5428
|
+
import { type DateFieldProps as ReactAriaDateFieldProps, type DateSegmentProps as ReactAriaDateSegmentProps, type DateInputProps as ReactAriaDateInputProps } from 'react-aria-components';
|
|
5429
|
+
export const DateField: import("react").ForwardRefExoticComponent<ReactAriaDateFieldProps<ZonedDateTime> & {
|
|
5430
|
+
inline?: boolean;
|
|
5431
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5432
|
+
export const DateInput: import("react").ForwardRefExoticComponent<Omit<ReactAriaDateInputProps, "className"> & {
|
|
5433
|
+
inset?: true;
|
|
5434
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
5435
|
+
export const DateSegment: import("react").ForwardRefExoticComponent<Omit<ReactAriaDateSegmentProps, "className"> & {
|
|
5436
|
+
isReadOnly?: boolean;
|
|
5437
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
5438
|
+
|
|
6563
5439
|
}
|
|
6564
5440
|
declare module '@layerfi/components/components/ui/DropdownMenu/DropdownMenu' {
|
|
6565
5441
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -6606,14 +5482,11 @@ declare module '@layerfi/components/components/ui/Form/Form' {
|
|
|
6606
5482
|
|
|
6607
5483
|
}
|
|
6608
5484
|
declare module '@layerfi/components/components/ui/Input/Input' {
|
|
6609
|
-
import {
|
|
6610
|
-
|
|
6611
|
-
type InputProps = Omit<ComponentProps<typeof ReactAriaInput>, 'className'> & {
|
|
5485
|
+
import { InputProps as ReactAriaInputProps } from 'react-aria-components';
|
|
5486
|
+
export const Input: import("react").ForwardRefExoticComponent<Omit<ReactAriaInputProps, "className"> & {
|
|
6612
5487
|
inset?: true;
|
|
6613
|
-
placement?:
|
|
6614
|
-
}
|
|
6615
|
-
export const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
6616
|
-
export {};
|
|
5488
|
+
placement?: "first";
|
|
5489
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
6617
5490
|
|
|
6618
5491
|
}
|
|
6619
5492
|
declare module '@layerfi/components/components/ui/Input/InputGroup' {
|
|
@@ -7807,7 +6680,7 @@ declare module '@layerfi/components/features/customers/components/CustomerSelect
|
|
|
7807
6680
|
inline?: boolean;
|
|
7808
6681
|
className?: string;
|
|
7809
6682
|
};
|
|
7810
|
-
export function CustomerSelector({ selectedCustomer, onSelectedCustomerChange, placeholder, isReadOnly, inline, className, }: CustomerSelectorProps): import("react/jsx-runtime").JSX.Element
|
|
6683
|
+
export function CustomerSelector({ selectedCustomer, onSelectedCustomerChange, placeholder, isReadOnly, inline, className, }: CustomerSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
7811
6684
|
export {};
|
|
7812
6685
|
|
|
7813
6686
|
}
|
|
@@ -7863,98 +6736,97 @@ declare module '@layerfi/components/features/customers/customersSchemas' {
|
|
|
7863
6736
|
declare module '@layerfi/components/features/forms/components/BaseFormTextField' {
|
|
7864
6737
|
import type { PropsWithChildren } from 'react';
|
|
7865
6738
|
import { type TextFieldProps } from '@layerfi/components/components/ui/Form/Form';
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
className?: string;
|
|
7869
|
-
inline?: boolean;
|
|
7870
|
-
showLabel?: boolean;
|
|
7871
|
-
showFieldError?: boolean;
|
|
6739
|
+
import type { CommonFormFieldProps } from '@layerfi/components/features/forms/types';
|
|
6740
|
+
export type BaseFormTextFieldProps = CommonFormFieldProps & {
|
|
7872
6741
|
inputMode?: TextFieldProps['inputMode'];
|
|
7873
6742
|
isTextArea?: boolean;
|
|
7874
|
-
}
|
|
7875
|
-
export function BaseFormTextField
|
|
6743
|
+
};
|
|
6744
|
+
export function BaseFormTextField({ label, inline, showLabel, showFieldError, isTextArea, isReadOnly, className, children, }: PropsWithChildren<BaseFormTextFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
7876
6745
|
|
|
7877
6746
|
}
|
|
7878
6747
|
declare module '@layerfi/components/features/forms/components/FormBigDecimalField' {
|
|
6748
|
+
import { BigDecimal as BD } from 'effect';
|
|
7879
6749
|
import { type BaseFormTextFieldProps } from '@layerfi/components/features/forms/components/BaseFormTextField';
|
|
7880
|
-
type FormBigDecimalFieldProps = {
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
maxInputLength?: number;
|
|
6750
|
+
type FormBigDecimalFieldProps = Omit<BaseFormTextFieldProps, 'inputMode' | 'isTextArea'> & {
|
|
6751
|
+
maxValue?: number;
|
|
6752
|
+
minDecimalPlaces?: number;
|
|
6753
|
+
maxDecimalPlaces?: number;
|
|
7885
6754
|
allowNegative?: boolean;
|
|
6755
|
+
mode?: 'percent' | 'currency' | 'decimal';
|
|
7886
6756
|
};
|
|
7887
|
-
|
|
6757
|
+
/**
|
|
6758
|
+
* This is some crazy nonsense to make BigDecimal play nicely with TanStack form. TanStack form checks deep equality for
|
|
6759
|
+
* object form fields all the way down to determine if they've changed. BigDecimal has a `normalized` param, which is a
|
|
6760
|
+
* BigDecimal that is the "normalized" form of itself (i.e., lowest absolute scale). Therefore, when determining if two
|
|
6761
|
+
* BigDecimals values are equal, we do an infinite recursion comparing their normalized forms.
|
|
6762
|
+
*
|
|
6763
|
+
* To remediate this, before updating a BigDecimal field, we check the new value is equal (per BigDecimal.equal) outside,
|
|
6764
|
+
* and if not, only then call the onChange handler with the value wrapped with withForceUpdate, which adds a unique symbol
|
|
6765
|
+
* to the BigDecimal and short-circuits any potential infinite recursion on comparing normalized values all the way down.
|
|
6766
|
+
*
|
|
6767
|
+
* Doing either the equality check or forced update to cause inequality is sufficient, but we do both to cover our bases.
|
|
6768
|
+
*/
|
|
6769
|
+
export const withForceUpdate: (value: BD.BigDecimal) => BD.BigDecimal;
|
|
6770
|
+
export function FormBigDecimalField({ mode, allowNegative, maxValue, minDecimalPlaces, maxDecimalPlaces, ...restProps }: FormBigDecimalFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
7888
6771
|
export {};
|
|
7889
6772
|
|
|
7890
6773
|
}
|
|
7891
|
-
declare module '@layerfi/components/features/forms/components/
|
|
7892
|
-
import { type
|
|
7893
|
-
type
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
6774
|
+
declare module '@layerfi/components/features/forms/components/FormCheckboxField' {
|
|
6775
|
+
import { type PropsWithChildren } from 'react';
|
|
6776
|
+
import type { CommonFormFieldProps } from '@layerfi/components/features/forms/types';
|
|
6777
|
+
export type FormCheckboxFieldProps = CommonFormFieldProps;
|
|
6778
|
+
export function FormCheckboxField({ label, className, inline, showLabel, showFieldError, isReadOnly, }: PropsWithChildren<FormCheckboxFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
6779
|
+
|
|
6780
|
+
}
|
|
6781
|
+
declare module '@layerfi/components/features/forms/components/FormDateField' {
|
|
6782
|
+
import { type PropsWithChildren } from 'react';
|
|
6783
|
+
import type { CommonFormFieldProps } from '@layerfi/components/features/forms/types';
|
|
6784
|
+
export type FormDateFieldProps = CommonFormFieldProps;
|
|
6785
|
+
export function FormDateField({ label, className, inline, showLabel, showFieldError, isReadOnly, }: PropsWithChildren<FormDateFieldProps>): import("react/jsx-runtime").JSX.Element;
|
|
7900
6786
|
|
|
7901
6787
|
}
|
|
7902
6788
|
declare module '@layerfi/components/features/forms/components/FormTextAreaField' {
|
|
7903
6789
|
import { type BaseFormTextFieldProps } from '@layerfi/components/features/forms/components/BaseFormTextField';
|
|
7904
|
-
type FormTextAreaFieldProps =
|
|
7905
|
-
|
|
7906
|
-
BaseFormTextField: BaseFormTextFieldProps;
|
|
7907
|
-
};
|
|
7908
|
-
};
|
|
7909
|
-
export function FormTextAreaField({ slotProps }: FormTextAreaFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
6790
|
+
type FormTextAreaFieldProps = Omit<BaseFormTextFieldProps, 'isTextArea'>;
|
|
6791
|
+
export function FormTextAreaField(props: FormTextAreaFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
7910
6792
|
export {};
|
|
7911
6793
|
|
|
7912
6794
|
}
|
|
7913
6795
|
declare module '@layerfi/components/features/forms/components/FormTextField' {
|
|
7914
6796
|
import { type BaseFormTextFieldProps } from '@layerfi/components/features/forms/components/BaseFormTextField';
|
|
7915
|
-
type FormTextFieldProps =
|
|
7916
|
-
|
|
7917
|
-
BaseFormTextField: BaseFormTextFieldProps;
|
|
7918
|
-
};
|
|
7919
|
-
};
|
|
7920
|
-
export function FormTextField({ slotProps }: FormTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
6797
|
+
type FormTextFieldProps = Omit<BaseFormTextFieldProps, 'isTextArea'>;
|
|
6798
|
+
export function FormTextField(props: FormTextFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
7921
6799
|
export {};
|
|
7922
6800
|
|
|
7923
6801
|
}
|
|
7924
6802
|
declare module '@layerfi/components/features/forms/hooks/useForm' {
|
|
6803
|
+
import { type FormOptions, type FormValidateOrFn, type FormAsyncValidateOrFn } from '@tanstack/react-form';
|
|
7925
6804
|
import { BaseFormTextField } from '@layerfi/components/features/forms/components/BaseFormTextField';
|
|
7926
6805
|
import { FormBigDecimalField } from '@layerfi/components/features/forms/components/FormBigDecimalField';
|
|
7927
|
-
import {
|
|
6806
|
+
import { FormCheckboxField } from '@layerfi/components/features/forms/components/FormCheckboxField';
|
|
6807
|
+
import { FormDateField } from '@layerfi/components/features/forms/components/FormDateField';
|
|
7928
6808
|
import { FormTextAreaField } from '@layerfi/components/features/forms/components/FormTextAreaField';
|
|
7929
6809
|
import { FormTextField } from '@layerfi/components/features/forms/components/FormTextField';
|
|
7930
6810
|
export const fieldContext: import("react").Context<import("@tanstack/react-form").AnyFieldApi>, useFieldContext: <TData>() => import("@tanstack/react-form").FieldApi<any, string, TData, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any, any>, formContext: import("react").Context<import("@tanstack/react-form").AnyFormApi>, useFormContext: () => import("@tanstack/react-form").ReactFormExtendedApi<Record<string, never>, any, any, any, any, any, any, any, any, any>;
|
|
7931
|
-
export
|
|
7932
|
-
AppField: import("@tanstack/react-form").FieldComponent<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta, NoInfer<{
|
|
7933
|
-
readonly BaseFormTextField: typeof BaseFormTextField;
|
|
7934
|
-
readonly FormBigDecimalField: typeof FormBigDecimalField;
|
|
7935
|
-
readonly FormCurrencyField: typeof FormCurrencyField;
|
|
7936
|
-
readonly FormTextAreaField: typeof FormTextAreaField;
|
|
7937
|
-
readonly FormTextField: typeof FormTextField;
|
|
7938
|
-
}>>;
|
|
7939
|
-
AppForm: import("react").ComponentType<import("react").PropsWithChildren>;
|
|
7940
|
-
}, withForm: <TFormData, TOnMount extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChange extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnChangeAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnBlur extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnBlurAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnSubmit extends import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined, TOnSubmitAsync extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TOnServer extends import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData> | undefined, TSubmitMeta, TRenderProps extends Record<string, unknown> = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnServer, TSubmitMeta, {
|
|
6811
|
+
export function useAppForm<T>(props: FormOptions<T, FormValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormAsyncValidateOrFn<T>, unknown>): import("@tanstack/react-form/dist/esm/createFormHook").AppFieldExtendedReactFormApi<T, FormValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormValidateOrFn<T>, FormAsyncValidateOrFn<T>, FormAsyncValidateOrFn<T>, unknown, {
|
|
7941
6812
|
readonly BaseFormTextField: typeof BaseFormTextField;
|
|
7942
6813
|
readonly FormBigDecimalField: typeof FormBigDecimalField;
|
|
7943
|
-
readonly
|
|
6814
|
+
readonly FormCheckboxField: typeof FormCheckboxField;
|
|
6815
|
+
readonly FormDateField: typeof FormDateField;
|
|
7944
6816
|
readonly FormTextAreaField: typeof FormTextAreaField;
|
|
7945
6817
|
readonly FormTextField: typeof FormTextField;
|
|
7946
|
-
}, {}
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
}
|
|
6818
|
+
}, {}>;
|
|
6819
|
+
|
|
6820
|
+
}
|
|
6821
|
+
declare module '@layerfi/components/features/forms/types' {
|
|
6822
|
+
export interface CommonFormFieldProps {
|
|
6823
|
+
label: string;
|
|
6824
|
+
className?: string;
|
|
6825
|
+
inline?: boolean;
|
|
6826
|
+
showLabel?: boolean;
|
|
6827
|
+
showFieldError?: boolean;
|
|
6828
|
+
isReadOnly?: boolean;
|
|
6829
|
+
}
|
|
7958
6830
|
|
|
7959
6831
|
}
|
|
7960
6832
|
declare module '@layerfi/components/features/invoices/api/useListInvoices' {
|
|
@@ -8304,12 +7176,13 @@ declare module '@layerfi/components/features/invoices/api/useListInvoices' {
|
|
|
8304
7176
|
declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
8305
7177
|
import type { Key } from 'swr';
|
|
8306
7178
|
import { type SWRMutationResponse } from 'swr/mutation';
|
|
8307
|
-
import { type
|
|
7179
|
+
import { type UpsertInvoiceSchema } from '@layerfi/components/features/invoices/invoiceSchemas';
|
|
8308
7180
|
import { Schema } from 'effect';
|
|
8309
7181
|
export enum UpsertInvoiceMode {
|
|
8310
7182
|
Create = "Create",
|
|
8311
7183
|
Update = "Update"
|
|
8312
7184
|
}
|
|
7185
|
+
type UpsertInvoiceBody = typeof UpsertInvoiceSchema.Encoded;
|
|
8313
7186
|
const UpsertInvoiceReturnSchema: Schema.Struct<{
|
|
8314
7187
|
data: Schema.Struct<{
|
|
8315
7188
|
id: typeof Schema.UUID;
|
|
@@ -8375,7 +7248,7 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
|
8375
7248
|
}>;
|
|
8376
7249
|
}>;
|
|
8377
7250
|
type UpsertInvoiceReturn = typeof UpsertInvoiceReturnSchema.Type;
|
|
8378
|
-
type UpsertInvoiceSWRMutationResponse = SWRMutationResponse<UpsertInvoiceReturn, unknown, Key,
|
|
7251
|
+
type UpsertInvoiceSWRMutationResponse = SWRMutationResponse<UpsertInvoiceReturn, unknown, Key, UpsertInvoiceBody>;
|
|
8379
7252
|
class UpsertInvoiceSWRResponse {
|
|
8380
7253
|
private swrResponse;
|
|
8381
7254
|
constructor(swrResponse: UpsertInvoiceSWRMutationResponse);
|
|
@@ -8482,20 +7355,20 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
|
8482
7355
|
};
|
|
8483
7356
|
}, unknown, Key, {
|
|
8484
7357
|
readonly memo: string | null;
|
|
8485
|
-
readonly
|
|
8486
|
-
readonly
|
|
8487
|
-
readonly
|
|
8488
|
-
readonly
|
|
7358
|
+
readonly sent_at: string;
|
|
7359
|
+
readonly due_at: string;
|
|
7360
|
+
readonly invoice_number: string | undefined;
|
|
7361
|
+
readonly line_items: readonly {
|
|
8489
7362
|
readonly description: string;
|
|
8490
7363
|
readonly product: string;
|
|
8491
|
-
readonly quantity:
|
|
8492
|
-
readonly
|
|
7364
|
+
readonly quantity: string;
|
|
7365
|
+
readonly unit_price: number;
|
|
7366
|
+
readonly sales_taxes: readonly {
|
|
7367
|
+
readonly amount: number;
|
|
7368
|
+
}[] | undefined;
|
|
8493
7369
|
}[];
|
|
8494
|
-
readonly
|
|
8495
|
-
readonly
|
|
8496
|
-
readonly additionalSalesTaxes: readonly {
|
|
8497
|
-
readonly amount: number;
|
|
8498
|
-
}[] | undefined;
|
|
7370
|
+
readonly additional_discount: number | undefined;
|
|
7371
|
+
readonly customer_id: string;
|
|
8499
7372
|
}>;
|
|
8500
7373
|
get isMutating(): boolean;
|
|
8501
7374
|
get isError(): boolean;
|
|
@@ -8522,6 +7395,7 @@ declare module '@layerfi/components/features/invoices/api/useUpsertInvoice' {
|
|
|
8522
7395
|
}
|
|
8523
7396
|
declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
8524
7397
|
import { Schema } from 'effect';
|
|
7398
|
+
import { InvoiceTermsValues } from '@layerfi/components/components/Invoices/InvoiceTermsComboBox/InvoiceTermsComboBox';
|
|
8525
7399
|
export enum InvoiceStatus {
|
|
8526
7400
|
Voided = "VOIDED",
|
|
8527
7401
|
Paid = "PAID",
|
|
@@ -8617,6 +7491,11 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8617
7491
|
product: typeof Schema.String;
|
|
8618
7492
|
unitPrice: Schema.PropertySignature<":", number, "unit_price", ":", number, false, never>;
|
|
8619
7493
|
quantity: typeof Schema.BigDecimal;
|
|
7494
|
+
salesTaxes: Schema.PropertySignature<":", readonly {
|
|
7495
|
+
readonly amount: number;
|
|
7496
|
+
}[] | undefined, "sales_taxes", ":", readonly {
|
|
7497
|
+
readonly amount: number;
|
|
7498
|
+
}[] | undefined, false, never>;
|
|
8620
7499
|
}>;
|
|
8621
7500
|
export type UpsertInvoiceLineItem = typeof UpsertInvoiceLineItemSchema.Type;
|
|
8622
7501
|
export const UpsertInvoiceSchema: Schema.Struct<{
|
|
@@ -8630,20 +7509,67 @@ declare module '@layerfi/components/features/invoices/invoiceSchemas' {
|
|
|
8630
7509
|
readonly product: string;
|
|
8631
7510
|
readonly quantity: import("effect/BigDecimal").BigDecimal;
|
|
8632
7511
|
readonly unitPrice: number;
|
|
7512
|
+
readonly salesTaxes: readonly {
|
|
7513
|
+
readonly amount: number;
|
|
7514
|
+
}[] | undefined;
|
|
8633
7515
|
}[], "line_items", ":", readonly {
|
|
8634
7516
|
readonly description: string;
|
|
8635
7517
|
readonly product: string;
|
|
8636
7518
|
readonly quantity: string;
|
|
8637
7519
|
readonly unit_price: number;
|
|
7520
|
+
readonly sales_taxes: readonly {
|
|
7521
|
+
readonly amount: number;
|
|
7522
|
+
}[] | undefined;
|
|
8638
7523
|
}[], false, never>;
|
|
8639
7524
|
additionalDiscount: Schema.PropertySignature<":", number | undefined, "additional_discount", ":", number | undefined, false, never>;
|
|
8640
|
-
additionalSalesTaxes: Schema.PropertySignature<":", readonly {
|
|
8641
|
-
readonly amount: number;
|
|
8642
|
-
}[] | undefined, "additional_sales_taxes", ":", readonly {
|
|
8643
|
-
readonly amount: number;
|
|
8644
|
-
}[] | undefined, false, never>;
|
|
8645
7525
|
}>;
|
|
8646
7526
|
export type UpsertInvoice = typeof UpsertInvoiceSchema.Type;
|
|
7527
|
+
export const InvoiceFormLineItemSchema: Schema.Struct<{
|
|
7528
|
+
description: typeof Schema.String;
|
|
7529
|
+
product: typeof Schema.String;
|
|
7530
|
+
unitPrice: typeof Schema.BigDecimal;
|
|
7531
|
+
quantity: typeof Schema.BigDecimal;
|
|
7532
|
+
amount: typeof Schema.BigDecimal;
|
|
7533
|
+
isTaxable: typeof Schema.Boolean;
|
|
7534
|
+
}>;
|
|
7535
|
+
export type InvoiceFormLineItem = typeof InvoiceFormLineItemSchema.Type;
|
|
7536
|
+
export const InvoiceFormSchema: Schema.Struct<{
|
|
7537
|
+
terms: Schema.Enums<typeof InvoiceTermsValues>;
|
|
7538
|
+
sentAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
|
|
7539
|
+
dueAt: Schema.NullOr<Schema.declare<import("@internationalized/date").ZonedDateTime, import("@internationalized/date").ZonedDateTime, readonly [], never>>;
|
|
7540
|
+
invoiceNumber: typeof Schema.String;
|
|
7541
|
+
customer: Schema.NullOr<Schema.Struct<{
|
|
7542
|
+
id: typeof Schema.UUID;
|
|
7543
|
+
externalId: Schema.PropertySignature<":", string | null, "external_id", ":", string | null, false, never>;
|
|
7544
|
+
individualName: Schema.PropertySignature<":", string | null, "individual_name", ":", string | null, false, never>;
|
|
7545
|
+
companyName: Schema.PropertySignature<":", string | null, "company_name", ":", string | null, false, never>;
|
|
7546
|
+
email: Schema.NullOr<typeof Schema.String>;
|
|
7547
|
+
mobilePhone: Schema.PropertySignature<":", string | null, "mobile_phone", ":", string | null, false, never>;
|
|
7548
|
+
officePhone: Schema.PropertySignature<":", string | null, "office_phone", ":", string | null, false, never>;
|
|
7549
|
+
addressString: Schema.PropertySignature<":", string | null, "address_string", ":", string | null, false, never>;
|
|
7550
|
+
status: Schema.transform<typeof Schema.NonEmptyTrimmedString, Schema.SchemaClass<"ACTIVE" | "ARCHIVED", "ACTIVE" | "ARCHIVED", never>>;
|
|
7551
|
+
memo: Schema.NullOr<typeof Schema.String>;
|
|
7552
|
+
_local: Schema.optional<Schema.Struct<{
|
|
7553
|
+
isOptimistic: typeof Schema.Boolean;
|
|
7554
|
+
}>>;
|
|
7555
|
+
}>>;
|
|
7556
|
+
email: typeof Schema.String;
|
|
7557
|
+
address: typeof Schema.String;
|
|
7558
|
+
lineItems: Schema.Array$<Schema.Struct<{
|
|
7559
|
+
description: typeof Schema.String;
|
|
7560
|
+
product: typeof Schema.String;
|
|
7561
|
+
unitPrice: typeof Schema.BigDecimal;
|
|
7562
|
+
quantity: typeof Schema.BigDecimal;
|
|
7563
|
+
amount: typeof Schema.BigDecimal;
|
|
7564
|
+
isTaxable: typeof Schema.Boolean;
|
|
7565
|
+
}>>;
|
|
7566
|
+
discountRate: typeof Schema.BigDecimal;
|
|
7567
|
+
taxRate: typeof Schema.BigDecimal;
|
|
7568
|
+
memo: typeof Schema.String;
|
|
7569
|
+
}>;
|
|
7570
|
+
export type InvoiceForm = Omit<typeof InvoiceFormSchema.Type, 'lineItems'> & {
|
|
7571
|
+
lineItems: InvoiceFormLineItem[];
|
|
7572
|
+
};
|
|
8647
7573
|
|
|
8648
7574
|
}
|
|
8649
7575
|
declare module '@layerfi/components/features/ledger/accounts/[ledgerAccountId]/api/useListLedgerAccountLines' {
|
|
@@ -9405,11 +8331,14 @@ declare module '@layerfi/components/hooks/customAccounts/types' {
|
|
|
9405
8331
|
direction: Direction;
|
|
9406
8332
|
date: string;
|
|
9407
8333
|
description: string;
|
|
8334
|
+
reference_number?: string | null;
|
|
9408
8335
|
};
|
|
9409
8336
|
export interface CustomAccountTransactionRow {
|
|
9410
8337
|
date: string;
|
|
9411
8338
|
description: string;
|
|
9412
8339
|
amount: number;
|
|
8340
|
+
external_id?: string | null;
|
|
8341
|
+
reference_number?: string | null;
|
|
9413
8342
|
}
|
|
9414
8343
|
|
|
9415
8344
|
}
|
|
@@ -11872,6 +10801,7 @@ declare module '@layerfi/components/types/linked_accounts' {
|
|
|
11872
10801
|
connection_needs_repair_as_of: string | null;
|
|
11873
10802
|
is_syncing: boolean;
|
|
11874
10803
|
user_created: boolean;
|
|
10804
|
+
reconnect_with_new_credentials: boolean;
|
|
11875
10805
|
};
|
|
11876
10806
|
export type LinkedAccounts = {
|
|
11877
10807
|
type: string;
|
|
@@ -12082,6 +11012,7 @@ declare module '@layerfi/components/types/profit_and_loss' {
|
|
|
12082
11012
|
other_outflows?: LineItem | null;
|
|
12083
11013
|
personal_expenses?: LineItem | null;
|
|
12084
11014
|
fully_categorized: boolean;
|
|
11015
|
+
custom_line_items?: LineItem | null;
|
|
12085
11016
|
}
|
|
12086
11017
|
export interface TagComparisonOption {
|
|
12087
11018
|
displayName: string;
|
|
@@ -12477,16 +11408,28 @@ declare module '@layerfi/components/utils/bigDecimalUtils' {
|
|
|
12477
11408
|
import { BigDecimal as BD } from 'effect';
|
|
12478
11409
|
export const BIG_DECIMAL_ZERO: BD.BigDecimal;
|
|
12479
11410
|
export const BIG_DECIMAL_ONE: BD.BigDecimal;
|
|
11411
|
+
export const BIG_DECIMAL_NEG_ONE: BD.BigDecimal;
|
|
12480
11412
|
export const BIG_DECIMAL_ONE_HUNDRED: BD.BigDecimal;
|
|
12481
|
-
export const
|
|
12482
|
-
|
|
11413
|
+
export const buildDecimalCharRegex: ({ allowNegative, allowPercent, allowDollar, }?: {
|
|
11414
|
+
allowNegative?: boolean | undefined;
|
|
11415
|
+
allowPercent?: boolean | undefined;
|
|
11416
|
+
allowDollar?: boolean | undefined;
|
|
11417
|
+
}) => RegExp;
|
|
12483
11418
|
/**
|
|
12484
11419
|
* Converts a BigDecimal dollar amount to its equivalent in cents as a number.
|
|
12485
11420
|
* Example: 123.45 → 12345
|
|
12486
11421
|
*/
|
|
12487
11422
|
export const convertBigDecimalToCents: (amount: BD.BigDecimal) => number;
|
|
12488
11423
|
export const convertCentsToBigDecimal: (cents: number) => BD.BigDecimal;
|
|
12489
|
-
export
|
|
11424
|
+
export const convertPercentToDecimal: (percent: BD.BigDecimal) => BD.BigDecimal;
|
|
11425
|
+
export const roundDecimalToCents: (decimal: BD.BigDecimal) => BD.BigDecimal;
|
|
11426
|
+
export const safeDivide: (dividend: BD.BigDecimal, divisor: BD.BigDecimal) => BD.BigDecimal;
|
|
11427
|
+
export const negate: (value: BD.BigDecimal) => BD.BigDecimal;
|
|
11428
|
+
export function formatBigDecimalToString(value: BD.BigDecimal, options?: {
|
|
11429
|
+
mode: 'percent' | 'currency' | 'decimal';
|
|
11430
|
+
minDecimalPlaces: number;
|
|
11431
|
+
maxDecimalPlaces: number;
|
|
11432
|
+
}): string;
|
|
12490
11433
|
|
|
12491
11434
|
}
|
|
12492
11435
|
declare module '@layerfi/components/utils/bills' {
|
|
@@ -12670,6 +11613,12 @@ declare module '@layerfi/components/utils/request/toDefinedSearchParameters' {
|
|
|
12670
11613
|
export type ParameterValues = Date | string | ReadonlyArray<string> | number | boolean;
|
|
12671
11614
|
export function toDefinedSearchParameters(input: Record<string, ParameterValues | null | undefined>): URLSearchParams;
|
|
12672
11615
|
|
|
11616
|
+
}
|
|
11617
|
+
declare module '@layerfi/components/utils/schema/utils' {
|
|
11618
|
+
import { Schema } from 'effect';
|
|
11619
|
+
import { ZonedDateTime } from '@internationalized/date';
|
|
11620
|
+
export const ZonedDateTimeFromSelf: Schema.declare<ZonedDateTime, ZonedDateTime, readonly [], never>;
|
|
11621
|
+
|
|
12673
11622
|
}
|
|
12674
11623
|
declare module '@layerfi/components/utils/styleUtils/sizeVariants' {
|
|
12675
11624
|
const _SIZE_VARIANTS: readonly ["sm", "lg"];
|
|
@@ -12729,8 +11678,10 @@ declare module '@layerfi/components/utils/swr/withSWRKeyTags' {
|
|
|
12729
11678
|
|
|
12730
11679
|
}
|
|
12731
11680
|
declare module '@layerfi/components/utils/time/timeUtils' {
|
|
11681
|
+
import { ZonedDateTime } from '@internationalized/date';
|
|
12732
11682
|
export const toLocalDateString: (date: Date) => string;
|
|
12733
11683
|
export function getDueDifference(dueDate: Date): number;
|
|
11684
|
+
export function isZonedDateTime(val: unknown): val is ZonedDateTime;
|
|
12734
11685
|
|
|
12735
11686
|
}
|
|
12736
11687
|
declare module '@layerfi/components/utils/vendors' {
|