@layerfi/components 0.1.89 → 0.1.91-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 +1567 -442
- package/dist/esm/index.mjs +1557 -433
- package/dist/index.css +324 -45
- package/dist/index.d.ts +407 -27
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -183,11 +183,20 @@ declare module '@layerfi/components/api/layer/bills' {
|
|
|
183
183
|
}
|
|
184
184
|
declare module '@layerfi/components/api/layer/business' {
|
|
185
185
|
import { Business } from '@layerfi/components/types';
|
|
186
|
+
export type UpdateBusinessBody = Partial<Business>;
|
|
186
187
|
export const getBusiness: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
187
188
|
params?: Record<string, string | undefined> | undefined;
|
|
188
189
|
} | undefined) => () => Promise<{
|
|
189
190
|
data: Business;
|
|
190
191
|
}>;
|
|
192
|
+
export const updateBusiness: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
193
|
+
params?: {
|
|
194
|
+
businessId: string;
|
|
195
|
+
} | undefined;
|
|
196
|
+
body?: Partial<Business> | undefined;
|
|
197
|
+
} | undefined) => Promise<{
|
|
198
|
+
data: Business;
|
|
199
|
+
}>;
|
|
191
200
|
|
|
192
201
|
}
|
|
193
202
|
declare module '@layerfi/components/api/layer/businessPersonnel/updateBusinessPersonnel' {
|
|
@@ -1669,6 +1678,43 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
|
|
|
1669
1678
|
declare module '@layerfi/components/components/BankTransactionsTable/index' {
|
|
1670
1679
|
export { BankTransactionsTable } from '@layerfi/components/components/BankTransactionsTable/BankTransactionsTable';
|
|
1671
1680
|
|
|
1681
|
+
}
|
|
1682
|
+
declare module '@layerfi/components/components/BusinessForm/BusinessForm' {
|
|
1683
|
+
export type BusinessFormStringOverrides = {
|
|
1684
|
+
saveButton?: string;
|
|
1685
|
+
};
|
|
1686
|
+
export type BusinessFormProps = {
|
|
1687
|
+
stringOverrides?: BusinessFormStringOverrides;
|
|
1688
|
+
onSuccess?: () => void;
|
|
1689
|
+
};
|
|
1690
|
+
export const BusinessForm: ({ stringOverrides, onSuccess }: BusinessFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
1691
|
+
|
|
1692
|
+
}
|
|
1693
|
+
declare module '@layerfi/components/components/BusinessForm/useBusinessForm' {
|
|
1694
|
+
import { FormValidateOrFn, FormAsyncValidateOrFn } from '@tanstack/react-form';
|
|
1695
|
+
import { USStateCode } from '@layerfi/components/types/location';
|
|
1696
|
+
import { EntityType } from '@layerfi/components/types/business';
|
|
1697
|
+
type BusinessFormData = {
|
|
1698
|
+
full_name?: string;
|
|
1699
|
+
preferred_name?: string;
|
|
1700
|
+
email?: string;
|
|
1701
|
+
phone_number?: string;
|
|
1702
|
+
legal_name?: string;
|
|
1703
|
+
dba?: string;
|
|
1704
|
+
entity_type?: EntityType;
|
|
1705
|
+
us_state?: USStateCode;
|
|
1706
|
+
tin?: string;
|
|
1707
|
+
};
|
|
1708
|
+
type UseBusinessFormProps = {
|
|
1709
|
+
onSuccess?: () => void;
|
|
1710
|
+
};
|
|
1711
|
+
export const useBusinessForm: ({ onSuccess }: UseBusinessFormProps) => {
|
|
1712
|
+
form: import("@tanstack/react-form").ReactFormExtendedApi<BusinessFormData, FormValidateOrFn<BusinessFormData>, FormValidateOrFn<BusinessFormData>, FormAsyncValidateOrFn<BusinessFormData>, FormValidateOrFn<BusinessFormData>, FormAsyncValidateOrFn<BusinessFormData>, FormValidateOrFn<BusinessFormData>, FormAsyncValidateOrFn<BusinessFormData>, FormAsyncValidateOrFn<BusinessFormData>, FormAsyncValidateOrFn<BusinessFormData>>;
|
|
1713
|
+
submitError: string | undefined;
|
|
1714
|
+
isFormValid: boolean;
|
|
1715
|
+
};
|
|
1716
|
+
export {};
|
|
1717
|
+
|
|
1672
1718
|
}
|
|
1673
1719
|
declare module '@layerfi/components/components/Button/BackButton' {
|
|
1674
1720
|
import { ButtonHTMLAttributes } from 'react';
|
|
@@ -1803,12 +1849,13 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
1803
1849
|
action?: SubmitAction;
|
|
1804
1850
|
noIcon?: boolean;
|
|
1805
1851
|
tooltip?: ButtonProps['tooltip'];
|
|
1852
|
+
withRetry?: boolean;
|
|
1806
1853
|
}
|
|
1807
1854
|
export enum SubmitAction {
|
|
1808
1855
|
SAVE = "save",
|
|
1809
1856
|
UPDATE = "update"
|
|
1810
1857
|
}
|
|
1811
|
-
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, variant, ...props }: SubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
1858
|
+
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, variant, withRetry, ...props }: SubmitButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
1812
1859
|
|
|
1813
1860
|
}
|
|
1814
1861
|
declare module '@layerfi/components/components/Button/SwitchButton' {
|
|
@@ -2469,6 +2516,31 @@ declare module '@layerfi/components/components/Input/AmountInput' {
|
|
|
2469
2516
|
}
|
|
2470
2517
|
export const AmountInput: ({ onChange, className, leftText, errorMessage, isInvalid, placeholder, ...props }: AmountInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2471
2518
|
|
|
2519
|
+
}
|
|
2520
|
+
declare module '@layerfi/components/components/Input/BusinessTypeSelect' {
|
|
2521
|
+
import { ENTITY_TYPES, EntityType } from '@layerfi/components/types/business';
|
|
2522
|
+
export const findSelectOption: (options: typeof ENTITY_TYPES, value?: EntityType) => {
|
|
2523
|
+
readonly value: "SOLE_PROP";
|
|
2524
|
+
readonly label: "Sole Proprietorship";
|
|
2525
|
+
} | {
|
|
2526
|
+
readonly value: "C_CORP";
|
|
2527
|
+
readonly label: "C Corporation";
|
|
2528
|
+
} | {
|
|
2529
|
+
readonly value: "LLC";
|
|
2530
|
+
readonly label: "Limited Liability Company";
|
|
2531
|
+
} | {
|
|
2532
|
+
readonly value: "S_CORP";
|
|
2533
|
+
readonly label: "S Corporation";
|
|
2534
|
+
} | {
|
|
2535
|
+
readonly value: "PARTNERSHIP";
|
|
2536
|
+
readonly label: "Partnership";
|
|
2537
|
+
} | undefined;
|
|
2538
|
+
export type BusinessTypeSelectProps = {
|
|
2539
|
+
value?: EntityType;
|
|
2540
|
+
onChange: (value: EntityType) => void;
|
|
2541
|
+
};
|
|
2542
|
+
export const BusinessTypeSelect: ({ value, onChange }: BusinessTypeSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2543
|
+
|
|
2472
2544
|
}
|
|
2473
2545
|
declare module '@layerfi/components/components/Input/FileInput' {
|
|
2474
2546
|
export interface FileInputProps {
|
|
@@ -2482,6 +2554,16 @@ declare module '@layerfi/components/components/Input/FileInput' {
|
|
|
2482
2554
|
}
|
|
2483
2555
|
export const FileInput: ({ text, onUpload, disabled, secondary, iconOnly, icon, allowMultipleUploads, }: FileInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2484
2556
|
|
|
2557
|
+
}
|
|
2558
|
+
declare module '@layerfi/components/components/Input/FormSection' {
|
|
2559
|
+
import { ReactNode } from 'react';
|
|
2560
|
+
type FormSectionProps = {
|
|
2561
|
+
title?: string;
|
|
2562
|
+
children: ReactNode | ReactNode[];
|
|
2563
|
+
};
|
|
2564
|
+
export const FormSection: ({ children, title }: FormSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
2565
|
+
export {};
|
|
2566
|
+
|
|
2485
2567
|
}
|
|
2486
2568
|
declare module '@layerfi/components/components/Input/Input' {
|
|
2487
2569
|
import { HTMLProps } from 'react';
|
|
@@ -2536,6 +2618,16 @@ declare module '@layerfi/components/components/Input/MultiSelect' {
|
|
|
2536
2618
|
}
|
|
2537
2619
|
export const MultiSelect: <T>({ name, options, className, classNamePrefix, value, defaultValue, onChange, disabled, placeholder, isInvalid, errorMessage, styles, }: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2538
2620
|
|
|
2621
|
+
}
|
|
2622
|
+
declare module '@layerfi/components/components/Input/PhoneInput' {
|
|
2623
|
+
import { InputProps } from '@layerfi/components/components/Input/Input';
|
|
2624
|
+
interface PhoneInputProps extends Omit<InputProps, 'onChange' | 'value'> {
|
|
2625
|
+
value?: string;
|
|
2626
|
+
onChange: (value?: string) => void;
|
|
2627
|
+
}
|
|
2628
|
+
export const PhoneInput: ({ value, onChange, placeholder, ...props }: PhoneInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
2629
|
+
export {};
|
|
2630
|
+
|
|
2539
2631
|
}
|
|
2540
2632
|
declare module '@layerfi/components/components/Input/Select' {
|
|
2541
2633
|
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
@@ -2564,6 +2656,17 @@ declare module '@layerfi/components/components/Input/StaticValue' {
|
|
|
2564
2656
|
*/
|
|
2565
2657
|
export const StaticValue: (props: StaticValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
2566
2658
|
|
|
2659
|
+
}
|
|
2660
|
+
declare module '@layerfi/components/components/Input/USStateSelect' {
|
|
2661
|
+
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
2662
|
+
import { USState } from '@layerfi/components/types/location';
|
|
2663
|
+
export const findSelectOption: (options: BaseSelectOption[], selected?: string) => BaseSelectOption | undefined;
|
|
2664
|
+
export type USStateSelecttProps = {
|
|
2665
|
+
value?: string;
|
|
2666
|
+
onChange: (value: USState) => void;
|
|
2667
|
+
};
|
|
2668
|
+
export const USStateSelect: ({ value, onChange }: USStateSelecttProps) => import("react/jsx-runtime").JSX.Element;
|
|
2669
|
+
|
|
2567
2670
|
}
|
|
2568
2671
|
declare module '@layerfi/components/components/Input/index' {
|
|
2569
2672
|
export { Input } from '@layerfi/components/components/Input/Input';
|
|
@@ -3192,6 +3295,23 @@ declare module '@layerfi/components/components/PlatformOnboarding/LinkAccounts'
|
|
|
3192
3295
|
export function LinkAccounts(props: LinkAccountsProps): import("react/jsx-runtime").JSX.Element;
|
|
3193
3296
|
export {};
|
|
3194
3297
|
|
|
3298
|
+
}
|
|
3299
|
+
declare module '@layerfi/components/components/PlatformOnboarding/PlatformOnboarding' {
|
|
3300
|
+
type PlatformOnboardingProps = {
|
|
3301
|
+
onComplete?: () => void;
|
|
3302
|
+
};
|
|
3303
|
+
export const PlatformOnboarding: ({ onComplete }: PlatformOnboardingProps) => import("react/jsx-runtime").JSX.Element;
|
|
3304
|
+
export {};
|
|
3305
|
+
|
|
3306
|
+
}
|
|
3307
|
+
declare module '@layerfi/components/components/PlatformOnboarding/Steps/BusinessInfoStep' {
|
|
3308
|
+
type BusinessInfoStepProps = {
|
|
3309
|
+
title?: string;
|
|
3310
|
+
onNext: () => void;
|
|
3311
|
+
};
|
|
3312
|
+
export const BusinessInfoStep: ({ title, onNext }: BusinessInfoStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
3313
|
+
export {};
|
|
3314
|
+
|
|
3195
3315
|
}
|
|
3196
3316
|
declare module '@layerfi/components/components/PlatformOnboarding/Steps/LinkAccountsConfirmationStep' {
|
|
3197
3317
|
export function LinkAccountsConfirmationStep(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3200,6 +3320,29 @@ declare module '@layerfi/components/components/PlatformOnboarding/Steps/LinkAcco
|
|
|
3200
3320
|
declare module '@layerfi/components/components/PlatformOnboarding/Steps/LinkAccountsLinkStep' {
|
|
3201
3321
|
export function LinkAccountsLinkStep(): import("react/jsx-runtime").JSX.Element;
|
|
3202
3322
|
|
|
3323
|
+
}
|
|
3324
|
+
declare module '@layerfi/components/components/PlatformOnboarding/Steps/SummaryStep' {
|
|
3325
|
+
type SummaryStepProps = {
|
|
3326
|
+
onNext: () => void;
|
|
3327
|
+
title?: string;
|
|
3328
|
+
description?: string;
|
|
3329
|
+
nextBtnText?: string;
|
|
3330
|
+
};
|
|
3331
|
+
export const SummaryStep: ({ onNext, title, description, nextBtnText }: SummaryStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
3332
|
+
export {};
|
|
3333
|
+
|
|
3334
|
+
}
|
|
3335
|
+
declare module '@layerfi/components/components/PlatformOnboarding/Steps/WelcomeStep' {
|
|
3336
|
+
type WelcomeStepProps = {
|
|
3337
|
+
onNext: () => void;
|
|
3338
|
+
title?: string;
|
|
3339
|
+
description?: string;
|
|
3340
|
+
stepsEnabled?: string[];
|
|
3341
|
+
};
|
|
3342
|
+
export const WelcomeStep: ({ onNext, title, description, stepsEnabled }: WelcomeStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
3343
|
+
export const WelcomeStepFooter: () => import("react/jsx-runtime").JSX.Element;
|
|
3344
|
+
export {};
|
|
3345
|
+
|
|
3203
3346
|
}
|
|
3204
3347
|
declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
3205
3348
|
import { PropsWithChildren } from 'react';
|
|
@@ -3683,6 +3826,16 @@ declare module '@layerfi/components/components/RadioButtonGroup/index' {
|
|
|
3683
3826
|
}
|
|
3684
3827
|
declare module '@layerfi/components/components/SelectVendor/SelectVendor' {
|
|
3685
3828
|
|
|
3829
|
+
}
|
|
3830
|
+
declare module '@layerfi/components/components/Separator/Separator' {
|
|
3831
|
+
import { Spacing } from '@layerfi/components/components/ui/sharedUITypes';
|
|
3832
|
+
type SeparatorProps = {
|
|
3833
|
+
mbs?: Spacing;
|
|
3834
|
+
mbe?: Spacing;
|
|
3835
|
+
};
|
|
3836
|
+
export const Separator: ({ mbs, mbe }: SeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3837
|
+
export {};
|
|
3838
|
+
|
|
3686
3839
|
}
|
|
3687
3840
|
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow' {
|
|
3688
3841
|
import { PropsWithChildren } from 'react';
|
|
@@ -4328,8 +4481,9 @@ declare module '@layerfi/components/components/Typography/Heading' {
|
|
|
4328
4481
|
className?: string;
|
|
4329
4482
|
children: ReactNode;
|
|
4330
4483
|
size?: HeadingSize;
|
|
4484
|
+
align?: 'left' | 'center' | 'right';
|
|
4331
4485
|
}
|
|
4332
|
-
export const Heading: ({ as: Component, className, children, size, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
4486
|
+
export const Heading: ({ as: Component, className, children, size, align, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
4333
4487
|
|
|
4334
4488
|
}
|
|
4335
4489
|
declare module '@layerfi/components/components/Typography/Text' {
|
|
@@ -4366,8 +4520,9 @@ declare module '@layerfi/components/components/Typography/Text' {
|
|
|
4366
4520
|
withTooltip?: TextUseTooltip;
|
|
4367
4521
|
tooltipOptions?: TextTooltipOptions;
|
|
4368
4522
|
ellipsis?: boolean;
|
|
4523
|
+
pb?: '4xs' | '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
4369
4524
|
}
|
|
4370
|
-
export const Text: ({ as: Component, className, children, size, weight, withTooltip, ellipsis, status, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4525
|
+
export const Text: ({ as: Component, className, children, size, weight, withTooltip, ellipsis, status, pb, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4371
4526
|
export const TextWithTooltip: ({ as: Component, className, children, size: _size, weight: _weight, withTooltip: _withTooltip, tooltipOptions, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
4372
4527
|
|
|
4373
4528
|
}
|
|
@@ -4504,7 +4659,7 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
|
|
|
4504
4659
|
const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
|
|
4505
4660
|
align?: "center";
|
|
4506
4661
|
pbe?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
|
|
4507
|
-
size?: "sm" | "lg";
|
|
4662
|
+
size?: "xs" | "sm" | "lg";
|
|
4508
4663
|
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
4509
4664
|
const ModalDescription: import("react").ForwardRefExoticComponent<Omit<Omit<{
|
|
4510
4665
|
size?: "xs" | "sm" | "md" | "lg";
|
|
@@ -4530,6 +4685,7 @@ declare module '@layerfi/components/components/ui/Stack/Stack' {
|
|
|
4530
4685
|
pbs?: Spacing;
|
|
4531
4686
|
pbe?: Spacing;
|
|
4532
4687
|
slot?: string;
|
|
4688
|
+
className?: string;
|
|
4533
4689
|
}>;
|
|
4534
4690
|
export function VStack(props: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
4535
4691
|
export function HStack(props: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4540,7 +4696,7 @@ declare module '@layerfi/components/components/ui/Typography/Heading' {
|
|
|
4540
4696
|
type HeadingDataProps = {
|
|
4541
4697
|
align?: 'center';
|
|
4542
4698
|
pbe?: Spacing;
|
|
4543
|
-
size?: 'sm' | 'lg';
|
|
4699
|
+
size?: 'xs' | 'sm' | 'lg';
|
|
4544
4700
|
};
|
|
4545
4701
|
const Heading: import("react").ForwardRefExoticComponent<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & HeadingDataProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
4546
4702
|
export { Heading };
|
|
@@ -5023,16 +5179,50 @@ declare module '@layerfi/components/hooks/balanceSheet/useBalanceSheet' {
|
|
|
5023
5179
|
effectiveDate?: Date;
|
|
5024
5180
|
}): import("swr").SWRResponse<import("../../types").BalanceSheet, any, any>;
|
|
5025
5181
|
|
|
5182
|
+
}
|
|
5183
|
+
declare module '@layerfi/components/hooks/bookkeeping/periods/useBookkeepingPeriods' {
|
|
5184
|
+
import type { Task } from '@layerfi/components/types/tasks';
|
|
5185
|
+
const BOOKKEEPING_PERIOD_STATUSES: readonly ["BOOKKEEPING_NOT_PURCHASED", "NOT_STARTED", "IN_PROGRESS_NO_TASKS", "IN_PROGRESS_OPEN_TASKS", "CLOSED_IN_REVIEW", "CLOSED_OPEN_TASKS", "CLOSED_COMPLETE"];
|
|
5186
|
+
export type BookkeepingPeriodStatus = typeof BOOKKEEPING_PERIOD_STATUSES[number];
|
|
5187
|
+
export function useBookkeepingPeriods(): import("swr").SWRResponse<{
|
|
5188
|
+
status: "BOOKKEEPING_NOT_PURCHASED" | "NOT_STARTED" | "IN_PROGRESS_NO_TASKS" | "IN_PROGRESS_OPEN_TASKS" | "CLOSED_IN_REVIEW" | "CLOSED_OPEN_TASKS" | "CLOSED_COMPLETE";
|
|
5189
|
+
id: string;
|
|
5190
|
+
month: number;
|
|
5191
|
+
year: number;
|
|
5192
|
+
tasks: ReadonlyArray<Task>;
|
|
5193
|
+
}[], any, any>;
|
|
5194
|
+
export {};
|
|
5195
|
+
|
|
5026
5196
|
}
|
|
5027
5197
|
declare module '@layerfi/components/hooks/bookkeeping/useBookkeepingStatus' {
|
|
5028
|
-
const BOOKKEEPING_STATUSES: readonly ["NOT_PURCHASED", "
|
|
5198
|
+
const BOOKKEEPING_STATUSES: readonly ["NOT_PURCHASED", "ACTIVE", "ONBOARDING", "BOOKKEEPING_PAUSED"];
|
|
5029
5199
|
export type BookkeepingStatus = typeof BOOKKEEPING_STATUSES[number];
|
|
5200
|
+
export function isActiveBookkeepingStatus(status: BookkeepingStatus): status is "ACTIVE" | "ONBOARDING";
|
|
5030
5201
|
export function useBookkeepingStatus(): import("swr").SWRResponse<{
|
|
5031
|
-
status: "ACTIVE" | "NOT_PURCHASED" | "BOOKKEEPING_PAUSED";
|
|
5202
|
+
status: "ACTIVE" | "NOT_PURCHASED" | "ONBOARDING" | "BOOKKEEPING_PAUSED";
|
|
5032
5203
|
}, any, any>;
|
|
5033
|
-
export function useEffectiveBookkeepingStatus(): "ACTIVE" | "NOT_PURCHASED" | "BOOKKEEPING_PAUSED";
|
|
5204
|
+
export function useEffectiveBookkeepingStatus(): "ACTIVE" | "NOT_PURCHASED" | "ONBOARDING" | "BOOKKEEPING_PAUSED";
|
|
5034
5205
|
export {};
|
|
5035
5206
|
|
|
5207
|
+
}
|
|
5208
|
+
declare module '@layerfi/components/hooks/business/useUpdateBusiness' {
|
|
5209
|
+
export const BUSINESS_TAG_KEY = "business";
|
|
5210
|
+
export function useUpdateBusiness(): import("swr/mutation").SWRMutationResponse<import("../../types").Business | undefined, any, () => {
|
|
5211
|
+
readonly accessToken: string;
|
|
5212
|
+
readonly apiUrl: string;
|
|
5213
|
+
readonly businessId: string;
|
|
5214
|
+
readonly tags: readonly [`business:${string}`];
|
|
5215
|
+
} | undefined, Partial<import("@layerfi/components/types").Business>> & {
|
|
5216
|
+
trigger: (extraArgument: Partial<import("@layerfi/components/types").Business>, options?: (import("swr/mutation").SWRMutationConfiguration<import("../../types").Business | undefined, any, () => {
|
|
5217
|
+
readonly accessToken: string;
|
|
5218
|
+
readonly apiUrl: string;
|
|
5219
|
+
readonly businessId: string;
|
|
5220
|
+
readonly tags: readonly [`business:${string}`];
|
|
5221
|
+
} | undefined, Partial<import("@layerfi/components/types").Business>, unknown> & {
|
|
5222
|
+
throwOnError: false;
|
|
5223
|
+
}) | undefined) => Promise<import("@layerfi/components/types").Business | undefined>;
|
|
5224
|
+
};
|
|
5225
|
+
|
|
5036
5226
|
}
|
|
5037
5227
|
declare module '@layerfi/components/hooks/businessPersonnel/types' {
|
|
5038
5228
|
import type { EmailAddress, PhoneNumber } from '@layerfi/components/types/utility/branded';
|
|
@@ -5643,24 +5833,15 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/useProfitAn
|
|
|
5643
5833
|
declare module '@layerfi/components/hooks/useProfitAndLossComparison/utils' {
|
|
5644
5834
|
import { DateRange } from '@layerfi/components/types';
|
|
5645
5835
|
import { DateRangePickerMode } from '@layerfi/components/providers/GlobalDateStore/GlobalDateStoreProvider';
|
|
5646
|
-
import { TagComparisonOption } from '@layerfi/components/types/profit_and_loss';
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
key: string;
|
|
5650
|
-
value: string;
|
|
5651
|
-
}[];
|
|
5652
|
-
}[] & import("@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback").ReadonlyArrayWithAtLeastOne<{
|
|
5653
|
-
required_tags: {
|
|
5654
|
-
key: string;
|
|
5655
|
-
value: string;
|
|
5656
|
-
}[];
|
|
5657
|
-
}>) | undefined;
|
|
5836
|
+
import { ProfitAndLossComparisonTags, TagComparisonOption } from '@layerfi/components/types/profit_and_loss';
|
|
5837
|
+
import { ReadonlyArrayWithAtLeastOne } from '@layerfi/components/utils/array/getArrayWithAtLeastOneOrFallback';
|
|
5838
|
+
export function prepareFiltersBody(compareOptions: TagComparisonOption[]): ReadonlyArrayWithAtLeastOne<ProfitAndLossComparisonTags> | undefined;
|
|
5658
5839
|
export function preparePeriodsBody(dateRange: DateRange, comparePeriods: number, rangeDisplayMode: DateRangePickerMode): {
|
|
5659
5840
|
type: "Comparison_Months";
|
|
5660
5841
|
months: {
|
|
5661
5842
|
year: number;
|
|
5662
5843
|
month: number;
|
|
5663
|
-
}[] &
|
|
5844
|
+
}[] & ReadonlyArrayWithAtLeastOne<{
|
|
5664
5845
|
year: number;
|
|
5665
5846
|
month: number;
|
|
5666
5847
|
}>;
|
|
@@ -5668,7 +5849,7 @@ declare module '@layerfi/components/hooks/useProfitAndLossComparison/utils' {
|
|
|
5668
5849
|
type: "Comparison_Years";
|
|
5669
5850
|
years: {
|
|
5670
5851
|
year: number;
|
|
5671
|
-
}[] &
|
|
5852
|
+
}[] & ReadonlyArrayWithAtLeastOne<{
|
|
5672
5853
|
year: number;
|
|
5673
5854
|
}>;
|
|
5674
5855
|
} | {
|
|
@@ -5964,6 +6145,12 @@ declare module '@layerfi/components/icons/Dataflow' {
|
|
|
5964
6145
|
const SvgComponent: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5965
6146
|
export default SvgComponent;
|
|
5966
6147
|
|
|
6148
|
+
}
|
|
6149
|
+
declare module '@layerfi/components/icons/Document' {
|
|
6150
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
6151
|
+
const Document: ({ size, ...props }: IconSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
6152
|
+
export default Document;
|
|
6153
|
+
|
|
5967
6154
|
}
|
|
5968
6155
|
declare module '@layerfi/components/icons/DownloadCloud' {
|
|
5969
6156
|
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
@@ -6155,6 +6342,12 @@ declare module '@layerfi/components/icons/Trash' {
|
|
|
6155
6342
|
const Trash: ({ size, ...props }: IconSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
6156
6343
|
export default Trash;
|
|
6157
6344
|
|
|
6345
|
+
}
|
|
6346
|
+
declare module '@layerfi/components/icons/TrendingUp' {
|
|
6347
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
6348
|
+
const TrendingUp: ({ size, ...props }: IconSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
6349
|
+
export default TrendingUp;
|
|
6350
|
+
|
|
6158
6351
|
}
|
|
6159
6352
|
declare module '@layerfi/components/icons/UploadCloud' {
|
|
6160
6353
|
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
@@ -6194,6 +6387,7 @@ declare module '@layerfi/components/index' {
|
|
|
6194
6387
|
export { Journal } from '@layerfi/components/components/Journal/index';
|
|
6195
6388
|
export { Tasks } from '@layerfi/components/components/Tasks/index';
|
|
6196
6389
|
export { LinkAccounts } from '@layerfi/components/components/PlatformOnboarding/LinkAccounts';
|
|
6390
|
+
export { PlatformOnboarding } from '@layerfi/components/components/PlatformOnboarding/PlatformOnboarding';
|
|
6197
6391
|
export { BookkeepingUpsellBar } from '@layerfi/components/components/UpsellBanner/index';
|
|
6198
6392
|
export { BookkeepingOverview } from '@layerfi/components/views/BookkeepingOverview/index';
|
|
6199
6393
|
export { AccountingOverview } from '@layerfi/components/views/AccountingOverview/index';
|
|
@@ -6717,11 +6911,12 @@ declare module '@layerfi/components/types/bills' {
|
|
|
6717
6911
|
|
|
6718
6912
|
}
|
|
6719
6913
|
declare module '@layerfi/components/types/business' {
|
|
6914
|
+
import { USStateCode } from '@layerfi/components/types/location';
|
|
6720
6915
|
export interface Business {
|
|
6721
6916
|
id: string;
|
|
6722
6917
|
activation_at?: string;
|
|
6723
6918
|
archived_at?: string;
|
|
6724
|
-
entity_type?:
|
|
6919
|
+
entity_type?: EntityType;
|
|
6725
6920
|
external_id?: string;
|
|
6726
6921
|
imported_at?: string;
|
|
6727
6922
|
industry?: string;
|
|
@@ -6732,8 +6927,25 @@ declare module '@layerfi/components/types/business' {
|
|
|
6732
6927
|
tin?: string;
|
|
6733
6928
|
type?: string;
|
|
6734
6929
|
updated_at?: string;
|
|
6735
|
-
us_state?:
|
|
6736
|
-
}
|
|
6930
|
+
us_state?: USStateCode;
|
|
6931
|
+
}
|
|
6932
|
+
export const ENTITY_TYPES: readonly [{
|
|
6933
|
+
readonly value: "SOLE_PROP";
|
|
6934
|
+
readonly label: "Sole Proprietorship";
|
|
6935
|
+
}, {
|
|
6936
|
+
readonly value: "C_CORP";
|
|
6937
|
+
readonly label: "C Corporation";
|
|
6938
|
+
}, {
|
|
6939
|
+
readonly value: "LLC";
|
|
6940
|
+
readonly label: "Limited Liability Company";
|
|
6941
|
+
}, {
|
|
6942
|
+
readonly value: "S_CORP";
|
|
6943
|
+
readonly label: "S Corporation";
|
|
6944
|
+
}, {
|
|
6945
|
+
readonly value: "PARTNERSHIP";
|
|
6946
|
+
readonly label: "Partnership";
|
|
6947
|
+
}];
|
|
6948
|
+
export type EntityType = (typeof ENTITY_TYPES)[number]['value'];
|
|
6737
6949
|
|
|
6738
6950
|
}
|
|
6739
6951
|
declare module '@layerfi/components/types/categories' {
|
|
@@ -7283,6 +7495,168 @@ declare module '@layerfi/components/types/linked_accounts' {
|
|
|
7283
7495
|
};
|
|
7284
7496
|
export {};
|
|
7285
7497
|
|
|
7498
|
+
}
|
|
7499
|
+
declare module '@layerfi/components/types/location' {
|
|
7500
|
+
export const US_STATES: readonly [{
|
|
7501
|
+
readonly value: "AL";
|
|
7502
|
+
readonly label: "Alabama";
|
|
7503
|
+
}, {
|
|
7504
|
+
readonly value: "AK";
|
|
7505
|
+
readonly label: "Alaska";
|
|
7506
|
+
}, {
|
|
7507
|
+
readonly value: "AZ";
|
|
7508
|
+
readonly label: "Arizona";
|
|
7509
|
+
}, {
|
|
7510
|
+
readonly value: "AR";
|
|
7511
|
+
readonly label: "Arkansas";
|
|
7512
|
+
}, {
|
|
7513
|
+
readonly value: "CA";
|
|
7514
|
+
readonly label: "California";
|
|
7515
|
+
}, {
|
|
7516
|
+
readonly value: "CO";
|
|
7517
|
+
readonly label: "Colorado";
|
|
7518
|
+
}, {
|
|
7519
|
+
readonly value: "CT";
|
|
7520
|
+
readonly label: "Connecticut";
|
|
7521
|
+
}, {
|
|
7522
|
+
readonly value: "DE";
|
|
7523
|
+
readonly label: "Delaware";
|
|
7524
|
+
}, {
|
|
7525
|
+
readonly value: "DC";
|
|
7526
|
+
readonly label: "District of Columbia";
|
|
7527
|
+
}, {
|
|
7528
|
+
readonly value: "FL";
|
|
7529
|
+
readonly label: "Florida";
|
|
7530
|
+
}, {
|
|
7531
|
+
readonly value: "GA";
|
|
7532
|
+
readonly label: "Georgia";
|
|
7533
|
+
}, {
|
|
7534
|
+
readonly value: "HI";
|
|
7535
|
+
readonly label: "Hawaii";
|
|
7536
|
+
}, {
|
|
7537
|
+
readonly value: "ID";
|
|
7538
|
+
readonly label: "Idaho";
|
|
7539
|
+
}, {
|
|
7540
|
+
readonly value: "IL";
|
|
7541
|
+
readonly label: "Illinois";
|
|
7542
|
+
}, {
|
|
7543
|
+
readonly value: "IN";
|
|
7544
|
+
readonly label: "Indiana";
|
|
7545
|
+
}, {
|
|
7546
|
+
readonly value: "IA";
|
|
7547
|
+
readonly label: "Iowa";
|
|
7548
|
+
}, {
|
|
7549
|
+
readonly value: "KS";
|
|
7550
|
+
readonly label: "Kansas";
|
|
7551
|
+
}, {
|
|
7552
|
+
readonly value: "KY";
|
|
7553
|
+
readonly label: "Kentucky";
|
|
7554
|
+
}, {
|
|
7555
|
+
readonly value: "LA";
|
|
7556
|
+
readonly label: "Louisiana";
|
|
7557
|
+
}, {
|
|
7558
|
+
readonly value: "ME";
|
|
7559
|
+
readonly label: "Maine";
|
|
7560
|
+
}, {
|
|
7561
|
+
readonly value: "MD";
|
|
7562
|
+
readonly label: "Maryland";
|
|
7563
|
+
}, {
|
|
7564
|
+
readonly value: "MA";
|
|
7565
|
+
readonly label: "Massachusetts";
|
|
7566
|
+
}, {
|
|
7567
|
+
readonly value: "MI";
|
|
7568
|
+
readonly label: "Michigan";
|
|
7569
|
+
}, {
|
|
7570
|
+
readonly value: "MN";
|
|
7571
|
+
readonly label: "Minnesota";
|
|
7572
|
+
}, {
|
|
7573
|
+
readonly value: "MS";
|
|
7574
|
+
readonly label: "Mississippi";
|
|
7575
|
+
}, {
|
|
7576
|
+
readonly value: "MO";
|
|
7577
|
+
readonly label: "Missouri";
|
|
7578
|
+
}, {
|
|
7579
|
+
readonly value: "MT";
|
|
7580
|
+
readonly label: "Montana";
|
|
7581
|
+
}, {
|
|
7582
|
+
readonly value: "NE";
|
|
7583
|
+
readonly label: "Nebraska";
|
|
7584
|
+
}, {
|
|
7585
|
+
readonly value: "NV";
|
|
7586
|
+
readonly label: "Nevada";
|
|
7587
|
+
}, {
|
|
7588
|
+
readonly value: "NH";
|
|
7589
|
+
readonly label: "New Hampshire";
|
|
7590
|
+
}, {
|
|
7591
|
+
readonly value: "NJ";
|
|
7592
|
+
readonly label: "New Jersey";
|
|
7593
|
+
}, {
|
|
7594
|
+
readonly value: "NM";
|
|
7595
|
+
readonly label: "New Mexico";
|
|
7596
|
+
}, {
|
|
7597
|
+
readonly value: "NY";
|
|
7598
|
+
readonly label: "New York";
|
|
7599
|
+
}, {
|
|
7600
|
+
readonly value: "NC";
|
|
7601
|
+
readonly label: "North Carolina";
|
|
7602
|
+
}, {
|
|
7603
|
+
readonly value: "ND";
|
|
7604
|
+
readonly label: "North Dakota";
|
|
7605
|
+
}, {
|
|
7606
|
+
readonly value: "OH";
|
|
7607
|
+
readonly label: "Ohio";
|
|
7608
|
+
}, {
|
|
7609
|
+
readonly value: "OK";
|
|
7610
|
+
readonly label: "Oklahoma";
|
|
7611
|
+
}, {
|
|
7612
|
+
readonly value: "OR";
|
|
7613
|
+
readonly label: "Oregon";
|
|
7614
|
+
}, {
|
|
7615
|
+
readonly value: "PA";
|
|
7616
|
+
readonly label: "Pennsylvania";
|
|
7617
|
+
}, {
|
|
7618
|
+
readonly value: "RI";
|
|
7619
|
+
readonly label: "Rhode Island";
|
|
7620
|
+
}, {
|
|
7621
|
+
readonly value: "SC";
|
|
7622
|
+
readonly label: "South Carolina";
|
|
7623
|
+
}, {
|
|
7624
|
+
readonly value: "SD";
|
|
7625
|
+
readonly label: "South Dakota";
|
|
7626
|
+
}, {
|
|
7627
|
+
readonly value: "TN";
|
|
7628
|
+
readonly label: "Tennessee";
|
|
7629
|
+
}, {
|
|
7630
|
+
readonly value: "TX";
|
|
7631
|
+
readonly label: "Texas";
|
|
7632
|
+
}, {
|
|
7633
|
+
readonly value: "UT";
|
|
7634
|
+
readonly label: "Utah";
|
|
7635
|
+
}, {
|
|
7636
|
+
readonly value: "VT";
|
|
7637
|
+
readonly label: "Vermont";
|
|
7638
|
+
}, {
|
|
7639
|
+
readonly value: "VA";
|
|
7640
|
+
readonly label: "Virginia";
|
|
7641
|
+
}, {
|
|
7642
|
+
readonly value: "WA";
|
|
7643
|
+
readonly label: "Washington";
|
|
7644
|
+
}, {
|
|
7645
|
+
readonly value: "WV";
|
|
7646
|
+
readonly label: "West Virginia";
|
|
7647
|
+
}, {
|
|
7648
|
+
readonly value: "WI";
|
|
7649
|
+
readonly label: "Wisconsin";
|
|
7650
|
+
}, {
|
|
7651
|
+
readonly value: "WY";
|
|
7652
|
+
readonly label: "Wyoming";
|
|
7653
|
+
}, {
|
|
7654
|
+
readonly value: "PR";
|
|
7655
|
+
readonly label: "Puerto Rico";
|
|
7656
|
+
}];
|
|
7657
|
+
export type USState = typeof US_STATES[number];
|
|
7658
|
+
export type USStateCode = USState['value'];
|
|
7659
|
+
|
|
7286
7660
|
}
|
|
7287
7661
|
declare module '@layerfi/components/types/profit_and_loss' {
|
|
7288
7662
|
import type { ReportingBasis } from '@layerfi/components/types';
|
|
@@ -7351,7 +7725,8 @@ declare module '@layerfi/components/types/profit_and_loss' {
|
|
|
7351
7725
|
end_date: string;
|
|
7352
7726
|
}>;
|
|
7353
7727
|
};
|
|
7354
|
-
type ProfitAndLossComparisonTags = {
|
|
7728
|
+
export type ProfitAndLossComparisonTags = {
|
|
7729
|
+
structure: string | undefined;
|
|
7355
7730
|
required_tags?: ReadonlyArray<{
|
|
7356
7731
|
key: string;
|
|
7357
7732
|
value: string;
|
|
@@ -7678,7 +8053,7 @@ declare module '@layerfi/components/utils/bills' {
|
|
|
7678
8053
|
}
|
|
7679
8054
|
declare module '@layerfi/components/utils/bookkeeping/isCategorizationEnabled' {
|
|
7680
8055
|
import type { BookkeepingStatus } from '@layerfi/components/hooks/bookkeeping/useBookkeepingStatus';
|
|
7681
|
-
export function isCategorizationEnabledForStatus(status: BookkeepingStatus): boolean;
|
|
8056
|
+
export function isCategorizationEnabledForStatus(status: BookkeepingStatus): boolean | undefined;
|
|
7682
8057
|
|
|
7683
8058
|
}
|
|
7684
8059
|
declare module '@layerfi/components/utils/business' {
|
|
@@ -7705,6 +8080,11 @@ declare module '@layerfi/components/utils/colors' {
|
|
|
7705
8080
|
declare module '@layerfi/components/utils/delay/runDelayed' {
|
|
7706
8081
|
export function runDelayedSync<T>(block: () => T, delayMs?: number): Promise<T>;
|
|
7707
8082
|
|
|
8083
|
+
}
|
|
8084
|
+
declare module '@layerfi/components/utils/form' {
|
|
8085
|
+
export const notEmpty: (value?: string) => boolean;
|
|
8086
|
+
export const validateEmailFormat: (email?: string, required?: boolean) => boolean;
|
|
8087
|
+
|
|
7708
8088
|
}
|
|
7709
8089
|
declare module '@layerfi/components/utils/format' {
|
|
7710
8090
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerfi/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.91-alpha",
|
|
4
4
|
"description": "Layer React Components",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@types/react": "^18.2.0",
|
|
57
57
|
"@types/react-datepicker": "^6.2.0",
|
|
58
58
|
"@types/react-dom": "^18.2.0",
|
|
59
|
-
"esbuild": "^0.
|
|
60
|
-
"esbuild-sass-plugin": "^
|
|
59
|
+
"esbuild": "^0.25.1",
|
|
60
|
+
"esbuild-sass-plugin": "^3.3.1",
|
|
61
61
|
"eslint": "^9.15.0",
|
|
62
62
|
"eslint-plugin-react": "^7.37.2",
|
|
63
63
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
@@ -73,9 +73,10 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@floating-ui/react": "^0.26.8",
|
|
76
|
-
"@tanstack/react-form": "^1.
|
|
76
|
+
"@tanstack/react-form": "^1.1.2",
|
|
77
77
|
"classnames": "^2.5.1",
|
|
78
78
|
"date-fns": "^2.30.0",
|
|
79
|
+
"libphonenumber-js": "^1.12.4",
|
|
79
80
|
"lucide-react": "^0.454.0",
|
|
80
81
|
"pluralize": "^8.0.0",
|
|
81
82
|
"react-aria-components": "^1.4.1",
|