@layerfi/components 0.1.97 → 0.1.98-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 +369 -393
- package/dist/esm/index.mjs +227 -251
- package/dist/index.css +25 -8
- package/dist/index.d.ts +71 -40
- package/package.json +24 -26
package/dist/index.css
CHANGED
|
@@ -4482,7 +4482,6 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4482
4482
|
}
|
|
4483
4483
|
.Layer__UI__Button[data-icon] {
|
|
4484
4484
|
padding-inline: 0;
|
|
4485
|
-
inline-size: 2rem;
|
|
4486
4485
|
}
|
|
4487
4486
|
.Layer__UI__Button[data-variant=solid] {
|
|
4488
4487
|
background-color: var(--button-bg-default);
|
|
@@ -4511,20 +4510,38 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4511
4510
|
outline-color: var(--button-outline-ghost-active);
|
|
4512
4511
|
}
|
|
4513
4512
|
.Layer__UI__Button[data-size=sm] {
|
|
4514
|
-
min-
|
|
4515
|
-
|
|
4513
|
+
--min-size: 1.5rem;
|
|
4514
|
+
min-block-size: var(--min-size);
|
|
4516
4515
|
font-size: var(--text-sm);
|
|
4517
4516
|
}
|
|
4517
|
+
.Layer__UI__Button[data-size=sm][data-icon] {
|
|
4518
|
+
min-inline-size: var(--min-size);
|
|
4519
|
+
}
|
|
4520
|
+
.Layer__UI__Button[data-size=sm]:not([data-icon]) {
|
|
4521
|
+
padding-inline: var(--spacing-xs);
|
|
4522
|
+
}
|
|
4518
4523
|
.Layer__UI__Button[data-size=md] {
|
|
4519
|
-
min-
|
|
4520
|
-
|
|
4524
|
+
--min-size: 2rem;
|
|
4525
|
+
min-block-size: var(--min-size);
|
|
4521
4526
|
font-size: var(--text-md);
|
|
4522
4527
|
}
|
|
4528
|
+
.Layer__UI__Button[data-size=md][data-icon] {
|
|
4529
|
+
min-inline-size: var(--min-size);
|
|
4530
|
+
}
|
|
4531
|
+
.Layer__UI__Button[data-size=md]:not([data-icon]) {
|
|
4532
|
+
padding-inline: var(--spacing-md);
|
|
4533
|
+
}
|
|
4523
4534
|
.Layer__UI__Button[data-size=lg] {
|
|
4524
|
-
min-
|
|
4525
|
-
|
|
4535
|
+
--min-size: 2.25rem;
|
|
4536
|
+
min-block-size: var(--min-size);
|
|
4526
4537
|
font-size: var(--text-lg);
|
|
4527
4538
|
}
|
|
4539
|
+
.Layer__UI__Button[data-size=lg][data-icon] {
|
|
4540
|
+
min-inline-size: var(--min-size);
|
|
4541
|
+
}
|
|
4542
|
+
.Layer__UI__Button[data-size=lg]:not([data-icon]) {
|
|
4543
|
+
padding-inline: var(--spacing-lg);
|
|
4544
|
+
}
|
|
4528
4545
|
.Layer__UI__Button[data-disabled] {
|
|
4529
4546
|
cursor: not-allowed;
|
|
4530
4547
|
color: var(--button-fg-disabled);
|
|
@@ -4691,7 +4708,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4691
4708
|
}
|
|
4692
4709
|
.Layer__ModalContextBar {
|
|
4693
4710
|
display: grid;
|
|
4694
|
-
grid-template-columns:
|
|
4711
|
+
grid-template-columns: auto 1fr auto;
|
|
4695
4712
|
column-gap: var(--spacing-md);
|
|
4696
4713
|
grid-template-areas: "back logo close";
|
|
4697
4714
|
align-items: center;
|
package/dist/index.d.ts
CHANGED
|
@@ -231,10 +231,11 @@ declare module '@layerfi/components/api/layer/businessPersonnel/updateBusinessPe
|
|
|
231
231
|
}
|
|
232
232
|
declare module '@layerfi/components/api/layer/categories' {
|
|
233
233
|
import { Category } from '@layerfi/components/types';
|
|
234
|
+
export type CategoriesListMode = 'ALL' | 'EXPENSES' | 'DEFAULT';
|
|
234
235
|
export const getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
235
236
|
params?: {
|
|
236
237
|
businessId: string;
|
|
237
|
-
mode?:
|
|
238
|
+
mode?: CategoriesListMode;
|
|
238
239
|
} | undefined;
|
|
239
240
|
} | undefined) => () => Promise<{
|
|
240
241
|
data: {
|
|
@@ -245,7 +246,7 @@ declare module '@layerfi/components/api/layer/categories' {
|
|
|
245
246
|
|
|
246
247
|
}
|
|
247
248
|
declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
248
|
-
import { Account, ChartOfAccounts, NewAccount, EditAccount, LedgerAccountsEntry } from '@layerfi/components/types';
|
|
249
|
+
import { Account, ChartOfAccounts, NewAccount, EditAccount, NewChildAccount, LedgerAccountsEntry } from '@layerfi/components/types';
|
|
249
250
|
import { ChartWithBalances } from '@layerfi/components/types/chart_of_accounts';
|
|
250
251
|
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
251
252
|
import { LedgerAccountLineItems } from '@layerfi/components/types/ledger_accounts';
|
|
@@ -271,6 +272,12 @@ declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
|
271
272
|
} | undefined) => Promise<{
|
|
272
273
|
data: Account;
|
|
273
274
|
}>;
|
|
275
|
+
export const createChildAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
276
|
+
params?: Record<string, string | undefined> | undefined;
|
|
277
|
+
body?: NewChildAccount | undefined;
|
|
278
|
+
} | undefined) => Promise<{
|
|
279
|
+
data: Account;
|
|
280
|
+
}>;
|
|
274
281
|
export const getLedgerAccountsLines: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
275
282
|
params?: Record<string, string | undefined> | undefined;
|
|
276
283
|
} | undefined) => () => Promise<{
|
|
@@ -655,6 +662,12 @@ declare module '@layerfi/components/api/layer' {
|
|
|
655
662
|
} | undefined) => Promise<{
|
|
656
663
|
data: import("@layerfi/components/types").Account;
|
|
657
664
|
}>;
|
|
665
|
+
createChildAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
666
|
+
params?: Record<string, string | undefined> | undefined;
|
|
667
|
+
body?: import("@layerfi/components/types").NewChildAccount | undefined;
|
|
668
|
+
} | undefined) => Promise<{
|
|
669
|
+
data: import("@layerfi/components/types").Account;
|
|
670
|
+
}>;
|
|
658
671
|
getBalanceSheet: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
659
672
|
params?: {
|
|
660
673
|
businessId: string;
|
|
@@ -748,7 +761,7 @@ declare module '@layerfi/components/api/layer' {
|
|
|
748
761
|
getCategories: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
749
762
|
params?: {
|
|
750
763
|
businessId: string;
|
|
751
|
-
mode?: "
|
|
764
|
+
mode?: import("@layerfi/components/api/layer/categories").CategoriesListMode;
|
|
752
765
|
} | undefined;
|
|
753
766
|
} | undefined) => () => Promise<{
|
|
754
767
|
data: {
|
|
@@ -2758,19 +2771,20 @@ declare module '@layerfi/components/components/Journal/download/JournalEntriesDo
|
|
|
2758
2771
|
declare module '@layerfi/components/components/Journal/download/useJournalEntriesDownload' {
|
|
2759
2772
|
import type { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
2760
2773
|
import type { Awaitable } from '@layerfi/components/types/utility/promises';
|
|
2774
|
+
import { APIError } from '@layerfi/components/models/APIError';
|
|
2761
2775
|
type UseJournalEntriesDownloadOptions = {
|
|
2762
2776
|
startCutoff?: Date;
|
|
2763
2777
|
endCutoff?: Date;
|
|
2764
2778
|
onSuccess?: (url: S3PresignedUrl) => Awaitable<unknown>;
|
|
2765
2779
|
};
|
|
2766
|
-
|
|
2780
|
+
type MutationParams = () => {
|
|
2767
2781
|
accessToken: string;
|
|
2768
2782
|
apiUrl: string;
|
|
2769
2783
|
businessId: string;
|
|
2770
2784
|
startCutoff: Date | undefined;
|
|
2771
2785
|
endCutoff: Date | undefined;
|
|
2772
|
-
|
|
2773
|
-
} |
|
|
2786
|
+
} | undefined;
|
|
2787
|
+
export function useJournalEntriesDownload({ startCutoff, endCutoff, onSuccess, }: UseJournalEntriesDownloadOptions): import("swr/mutation").SWRMutationResponse<unknown, APIError | Error, MutationParams, never>;
|
|
2774
2788
|
export {};
|
|
2775
2789
|
|
|
2776
2790
|
}
|
|
@@ -3063,7 +3077,7 @@ declare module '@layerfi/components/components/LinkedAccounts/ConfirmationModal/
|
|
|
3063
3077
|
export type AccountConfirmExcludeFormState = Record<string, boolean>;
|
|
3064
3078
|
export function useConfirmAndExcludeMultiple({ onSuccess }: {
|
|
3065
3079
|
onSuccess?: () => Awaitable<unknown>;
|
|
3066
|
-
}): import("swr/mutation").SWRMutationResponse<true
|
|
3080
|
+
}): import("swr/mutation").SWRMutationResponse<true, any, () => {
|
|
3067
3081
|
accessToken: string;
|
|
3068
3082
|
apiUrl: string;
|
|
3069
3083
|
businessId: string;
|
|
@@ -3160,7 +3174,7 @@ declare module '@layerfi/components/components/LinkedAccounts/OpeningBalanceModa
|
|
|
3160
3174
|
} | OpeningBalanceAPIResponseValidationError | OpeningBalanceAPIResponseError;
|
|
3161
3175
|
export function useBulkSetOpeningBalanceAndDate(data: OpeningBalanceData[], { onSuccess }: {
|
|
3162
3176
|
onSuccess: (results: OpeningBalanceAPIResponseResult[]) => Awaitable<void>;
|
|
3163
|
-
}): import("swr/mutation").SWRMutationResponse<true
|
|
3177
|
+
}): import("swr/mutation").SWRMutationResponse<true, any, () => {
|
|
3164
3178
|
readonly accessToken: string;
|
|
3165
3179
|
readonly apiUrl: string;
|
|
3166
3180
|
readonly businessId: string;
|
|
@@ -3310,10 +3324,6 @@ declare module '@layerfi/components/components/PeriodPicker/PeriodPicker' {
|
|
|
3310
3324
|
export const PeriodPicker: ({ onSelect, defaultValue }: PeriodPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
3311
3325
|
export {};
|
|
3312
3326
|
|
|
3313
|
-
}
|
|
3314
|
-
declare module '@layerfi/components/components/PeriodPicker/index' {
|
|
3315
|
-
export { PeriodPicker } from '@layerfi/components/components/PeriodPicker/PeriodPicker';
|
|
3316
|
-
|
|
3317
3327
|
}
|
|
3318
3328
|
declare module '@layerfi/components/components/PlatformOnboarding/Container/LinkAccountsListContainer' {
|
|
3319
3329
|
import type { PropsWithChildren } from 'react';
|
|
@@ -4363,7 +4373,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
4363
4373
|
events: import("@floating-ui/react").FloatingEvents;
|
|
4364
4374
|
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
4365
4375
|
nodeId: string | undefined;
|
|
4366
|
-
floatingId: string;
|
|
4376
|
+
floatingId: string | undefined;
|
|
4367
4377
|
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
4368
4378
|
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
4369
4379
|
};
|
|
@@ -4412,7 +4422,7 @@ declare module '@layerfi/components/components/Tooltip/useTooltip' {
|
|
|
4412
4422
|
events: import("@floating-ui/react").FloatingEvents;
|
|
4413
4423
|
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
4414
4424
|
nodeId: string | undefined;
|
|
4415
|
-
floatingId: string;
|
|
4425
|
+
floatingId: string | undefined;
|
|
4416
4426
|
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
4417
4427
|
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
4418
4428
|
};
|
|
@@ -4650,13 +4660,13 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
|
|
|
4650
4660
|
type ModalContextBarProps = {
|
|
4651
4661
|
onClose?: () => void;
|
|
4652
4662
|
};
|
|
4653
|
-
function ModalContextBar({ onClose }: ModalContextBarProps): import("react/jsx-runtime").JSX.Element;
|
|
4654
|
-
const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
|
|
4663
|
+
export function ModalContextBar({ onClose }: ModalContextBarProps): import("react/jsx-runtime").JSX.Element;
|
|
4664
|
+
export const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
|
|
4655
4665
|
align?: "center";
|
|
4656
4666
|
pbe?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
|
|
4657
4667
|
size?: "2xs" | "xs" | "sm" | "lg";
|
|
4658
4668
|
}, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "slot" | "level">, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
4659
|
-
const ModalDescription: import("react").ForwardRefExoticComponent<Omit<Omit<{
|
|
4669
|
+
export const ModalDescription: import("react").ForwardRefExoticComponent<Omit<Omit<{
|
|
4660
4670
|
slot?: string | undefined | undefined;
|
|
4661
4671
|
} & {
|
|
4662
4672
|
align?: "center";
|
|
@@ -4667,9 +4677,9 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
|
|
|
4667
4677
|
} & {
|
|
4668
4678
|
children?: import("react").ReactNode | undefined;
|
|
4669
4679
|
} & import("react").RefAttributes<HTMLParagraphElement>, "slot">, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
4670
|
-
function ModalContent({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
4671
|
-
function ModalActions({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
4672
|
-
export {
|
|
4680
|
+
export function ModalContent({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
4681
|
+
export function ModalActions({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
4682
|
+
export {};
|
|
4673
4683
|
|
|
4674
4684
|
}
|
|
4675
4685
|
declare module '@layerfi/components/components/ui/Pill/Pill' {
|
|
@@ -5225,7 +5235,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useDeleteUpl
|
|
|
5225
5235
|
};
|
|
5226
5236
|
export function useDeleteUploadsOnTask(): import("swr/mutation").SWRMutationResponse<{
|
|
5227
5237
|
data: import("@layerfi/components/types/tasks").RawTask;
|
|
5228
|
-
}
|
|
5238
|
+
}, any, () => {
|
|
5229
5239
|
readonly accessToken: string;
|
|
5230
5240
|
readonly apiUrl: string;
|
|
5231
5241
|
readonly businessId: string;
|
|
@@ -5241,7 +5251,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useSubmitRes
|
|
|
5241
5251
|
};
|
|
5242
5252
|
export function useSubmitUserResponseForTask(): import("swr/mutation").SWRMutationResponse<{
|
|
5243
5253
|
data: import("@layerfi/components/types/tasks").RawTask;
|
|
5244
|
-
}
|
|
5254
|
+
}, any, () => {
|
|
5245
5255
|
readonly accessToken: string;
|
|
5246
5256
|
readonly apiUrl: string;
|
|
5247
5257
|
readonly businessId: string;
|
|
@@ -5257,7 +5267,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useUpdateTas
|
|
|
5257
5267
|
};
|
|
5258
5268
|
export function useUpdateTaskUploadDescription(): import("swr/mutation").SWRMutationResponse<{
|
|
5259
5269
|
data: import("@layerfi/components/types/tasks").RawTask;
|
|
5260
|
-
}
|
|
5270
|
+
}, any, () => {
|
|
5261
5271
|
readonly accessToken: string;
|
|
5262
5272
|
readonly apiUrl: string;
|
|
5263
5273
|
readonly businessId: string;
|
|
@@ -5274,7 +5284,7 @@ declare module '@layerfi/components/hooks/bookkeeping/periods/tasks/useUploadDoc
|
|
|
5274
5284
|
};
|
|
5275
5285
|
export function useUploadDocumentsForTask(): import("swr/mutation").SWRMutationResponse<{
|
|
5276
5286
|
data: import("@layerfi/components/types/file_upload").FileMetadata;
|
|
5277
|
-
}
|
|
5287
|
+
}, any, () => {
|
|
5278
5288
|
readonly accessToken: string;
|
|
5279
5289
|
readonly apiUrl: string;
|
|
5280
5290
|
readonly businessId: string;
|
|
@@ -5385,7 +5395,7 @@ declare module '@layerfi/components/hooks/bookkeeping/useBookkeepingStatus' {
|
|
|
5385
5395
|
}
|
|
5386
5396
|
declare module '@layerfi/components/hooks/business/useUpdateBusiness' {
|
|
5387
5397
|
export const BUSINESS_TAG_KEY = "business";
|
|
5388
|
-
export function useUpdateBusiness(): import("swr/mutation").SWRMutationResponse<import("../../types").Business
|
|
5398
|
+
export function useUpdateBusiness(): import("swr/mutation").SWRMutationResponse<import("../../types").Business, any, () => {
|
|
5389
5399
|
readonly accessToken: string;
|
|
5390
5400
|
readonly apiUrl: string;
|
|
5391
5401
|
readonly businessId: string;
|
|
@@ -5478,7 +5488,7 @@ declare module '@layerfi/components/hooks/businessPersonnel/useCreateBusinessPer
|
|
|
5478
5488
|
role: PersonnelRole;
|
|
5479
5489
|
}>;
|
|
5480
5490
|
};
|
|
5481
|
-
export function useCreateBusinessPersonnel(): import("swr/mutation").SWRMutationResponse<BusinessPersonnel
|
|
5491
|
+
export function useCreateBusinessPersonnel(): import("swr/mutation").SWRMutationResponse<BusinessPersonnel, any, () => {
|
|
5482
5492
|
readonly accessToken: string;
|
|
5483
5493
|
readonly apiUrl: string;
|
|
5484
5494
|
readonly businessId: string;
|
|
@@ -5491,7 +5501,7 @@ declare module '@layerfi/components/hooks/businessPersonnel/useUpdateBusinessPer
|
|
|
5491
5501
|
import { type UpdateBusinessPersonnelBody } from '@layerfi/components/api/layer/businessPersonnel/updateBusinessPersonnel';
|
|
5492
5502
|
export function useUpdateBusinessPersonnel({ businessPersonnelId }: {
|
|
5493
5503
|
businessPersonnelId?: string;
|
|
5494
|
-
}): import("swr/mutation").SWRMutationResponse<import("./types").BusinessPersonnel
|
|
5504
|
+
}): import("swr/mutation").SWRMutationResponse<import("./types").BusinessPersonnel, any, () => {
|
|
5495
5505
|
readonly accessToken: string;
|
|
5496
5506
|
readonly apiUrl: string;
|
|
5497
5507
|
readonly businessId: string;
|
|
@@ -5500,8 +5510,14 @@ declare module '@layerfi/components/hooks/businessPersonnel/useUpdateBusinessPer
|
|
|
5500
5510
|
} | undefined, UpdateBusinessPersonnelBody>;
|
|
5501
5511
|
|
|
5502
5512
|
}
|
|
5503
|
-
declare module '@layerfi/components/hooks/categories/
|
|
5504
|
-
|
|
5513
|
+
declare module '@layerfi/components/hooks/categories/useCategories' {
|
|
5514
|
+
import { type CategoriesListMode } from '@layerfi/components/api/layer/categories';
|
|
5515
|
+
export const CATEGORIES_TAG_KEY = "#categories";
|
|
5516
|
+
type UseCategoriesOptions = {
|
|
5517
|
+
mode?: CategoriesListMode;
|
|
5518
|
+
};
|
|
5519
|
+
export function useCategories({ mode }?: UseCategoriesOptions): import("swr").SWRResponse<import("../../types").Category[], any, any>;
|
|
5520
|
+
export {};
|
|
5505
5521
|
|
|
5506
5522
|
}
|
|
5507
5523
|
declare module '@layerfi/components/hooks/useAuth' {
|
|
@@ -5597,7 +5613,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
|
|
|
5597
5613
|
}
|
|
5598
5614
|
declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactionsDownload' {
|
|
5599
5615
|
import type { UseBankTransactionsOptions } from '@layerfi/components/hooks/useBankTransactions/useBankTransactions';
|
|
5600
|
-
export function useBankTransactionsDownload(): import("swr/mutation").SWRMutationResponse<import("../../types/general").S3PresignedUrl
|
|
5616
|
+
export function useBankTransactionsDownload(): import("swr/mutation").SWRMutationResponse<import("../../types/general").S3PresignedUrl, any, () => {
|
|
5601
5617
|
readonly accessToken: string;
|
|
5602
5618
|
readonly apiUrl: string;
|
|
5603
5619
|
readonly businessId: string;
|
|
@@ -5621,7 +5637,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useUpdateBankTrans
|
|
|
5621
5637
|
export function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }: {
|
|
5622
5638
|
bankTransactionId: string;
|
|
5623
5639
|
onSuccess?: () => Awaitable<unknown>;
|
|
5624
|
-
}): import("swr/mutation").SWRMutationResponse<import("../../types/bank_transactions").BankTransactionMetadata
|
|
5640
|
+
}): import("swr/mutation").SWRMutationResponse<import("../../types/bank_transactions").BankTransactionMetadata, any, () => {
|
|
5625
5641
|
accessToken: string;
|
|
5626
5642
|
apiUrl: string;
|
|
5627
5643
|
businessId: string;
|
|
@@ -5642,6 +5658,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/utils' {
|
|
|
5642
5658
|
}
|
|
5643
5659
|
declare module '@layerfi/components/hooks/useChartOfAccounts/index' {
|
|
5644
5660
|
export { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts';
|
|
5661
|
+
export { useCreateChildAccount } from '@layerfi/components/hooks/useChartOfAccounts/useCreateChildAccount';
|
|
5645
5662
|
|
|
5646
5663
|
}
|
|
5647
5664
|
declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts' {
|
|
@@ -5692,6 +5709,20 @@ declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts'
|
|
|
5692
5709
|
};
|
|
5693
5710
|
export {};
|
|
5694
5711
|
|
|
5712
|
+
}
|
|
5713
|
+
declare module '@layerfi/components/hooks/useChartOfAccounts/useCreateChildAccount' {
|
|
5714
|
+
import { NewChildAccount } from '@layerfi/components/types/chart_of_accounts';
|
|
5715
|
+
type NewChildAccountWithParentAccountId = NewChildAccount & {
|
|
5716
|
+
accountId: string;
|
|
5717
|
+
};
|
|
5718
|
+
export function useCreateChildAccount(): import("swr/mutation").SWRMutationResponse<import("../../types/chart_of_accounts").Account, any, () => {
|
|
5719
|
+
readonly accessToken: string;
|
|
5720
|
+
readonly apiUrl: string;
|
|
5721
|
+
readonly businessId: string;
|
|
5722
|
+
readonly tags: readonly ["#create-child-account"];
|
|
5723
|
+
} | undefined, NewChildAccountWithParentAccountId>;
|
|
5724
|
+
export {};
|
|
5725
|
+
|
|
5695
5726
|
}
|
|
5696
5727
|
declare module '@layerfi/components/hooks/useDataSync/index' {
|
|
5697
5728
|
export { useDataSync } from '@layerfi/components/hooks/useDataSync/useDataSync';
|
|
@@ -7270,6 +7301,13 @@ declare module '@layerfi/components/types/chart_of_accounts' {
|
|
|
7270
7301
|
account_type: string;
|
|
7271
7302
|
account_subtype?: string;
|
|
7272
7303
|
};
|
|
7304
|
+
export type NewChildAccount = {
|
|
7305
|
+
name: string;
|
|
7306
|
+
stable_name?: {
|
|
7307
|
+
type: 'StableName';
|
|
7308
|
+
stable_name: string;
|
|
7309
|
+
};
|
|
7310
|
+
};
|
|
7273
7311
|
|
|
7274
7312
|
}
|
|
7275
7313
|
declare module '@layerfi/components/types/file_upload' {
|
|
@@ -7377,12 +7415,11 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
7377
7415
|
import { ToastProps } from '@layerfi/components/components/Toast/Toast';
|
|
7378
7416
|
import { LayerError } from '@layerfi/components/models/ErrorHandler';
|
|
7379
7417
|
import { EventCallbacks } from '@layerfi/components/providers/LayerProvider/LayerProvider';
|
|
7380
|
-
import { Business
|
|
7418
|
+
import { Business } from '@layerfi/components/types';
|
|
7381
7419
|
import { DataModel } from '@layerfi/components/types/general';
|
|
7382
7420
|
export type LayerContextValues = {
|
|
7383
7421
|
businessId: string;
|
|
7384
7422
|
business?: Business;
|
|
7385
|
-
categories: Category[];
|
|
7386
7423
|
theme?: LayerThemeConfig;
|
|
7387
7424
|
colors: ColorsPalette;
|
|
7388
7425
|
onboardingStep?: OnboardingStep;
|
|
@@ -7452,7 +7489,6 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
7452
7489
|
export type OnboardingStep = undefined | 'connectAccount' | 'complete';
|
|
7453
7490
|
export enum LayerContextActionName {
|
|
7454
7491
|
setBusiness = "LayerContext.setBusiness",
|
|
7455
|
-
setCategories = "LayerContext.setCategories",
|
|
7456
7492
|
setTheme = "LayerContext.setTheme",
|
|
7457
7493
|
setOnboardingStep = "LayerContext.setOnboardingStep",
|
|
7458
7494
|
setColors = "LayerContext.setColors",
|
|
@@ -7465,11 +7501,6 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
7465
7501
|
payload: {
|
|
7466
7502
|
business: LayerContextValues['business'];
|
|
7467
7503
|
};
|
|
7468
|
-
} | {
|
|
7469
|
-
type: LayerContextActionName.setCategories;
|
|
7470
|
-
payload: {
|
|
7471
|
-
categories: LayerContextValues['categories'];
|
|
7472
|
-
};
|
|
7473
7504
|
} | {
|
|
7474
7505
|
type: LayerContextActionName.setTheme;
|
|
7475
7506
|
payload: {
|
|
@@ -8157,7 +8188,7 @@ declare module '@layerfi/components/types' {
|
|
|
8157
8188
|
export { StatementOfCashFlow } from '@layerfi/components/types/statement_of_cash_flow';
|
|
8158
8189
|
export { Direction, BankTransaction, DisplayState, } from '@layerfi/components/types/bank_transactions';
|
|
8159
8190
|
export { CategorizationStatus, Category, CategorizationType, AutoCategorization, SuggestedCategorization, SingleCategoryUpdate, SplitCategoryUpdate, CategoryUpdate, } from '@layerfi/components/types/categories';
|
|
8160
|
-
export { ChartOfAccounts, Account, NewAccount, EditAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
8191
|
+
export { ChartOfAccounts, Account, NewAccount, EditAccount, NewChildAccount, } from '@layerfi/components/types/chart_of_accounts';
|
|
8161
8192
|
export { LedgerAccountLineItems as LedgerAccounts, LedgerAccountLineItem, LedgerAccountsAccount, LedgerAccountsEntry, } from '@layerfi/components/types/ledger_accounts';
|
|
8162
8193
|
export { SortDirection } from '@layerfi/components/types/general';
|
|
8163
8194
|
export { Business } from '@layerfi/components/types/business';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerfi/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.98-alpha",
|
|
4
4
|
"description": "Layer React Components",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"/dist"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
|
-
"test": "jest",
|
|
23
22
|
"typecheck": "tsc --noEmit",
|
|
24
23
|
"build": "node bin/build.js",
|
|
25
24
|
"build:clean": "rm -rf ./dist && npm run build",
|
|
@@ -49,46 +48,45 @@
|
|
|
49
48
|
"react-dom": "^18.2.0"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
|
-
"@stylistic/eslint-plugin": "^2.
|
|
51
|
+
"@stylistic/eslint-plugin": "^4.2.0",
|
|
53
52
|
"@stylistic/stylelint-config": "^2.0.0",
|
|
54
|
-
"@stylistic/stylelint-plugin": "^3.1.
|
|
55
|
-
"@types/jest": "^29.5.7",
|
|
53
|
+
"@stylistic/stylelint-plugin": "^3.1.2",
|
|
56
54
|
"@types/lodash": "^4.17.16",
|
|
57
55
|
"@types/pluralize": "^0.0.33",
|
|
58
56
|
"@types/react": "^18.2.0",
|
|
59
57
|
"@types/react-datepicker": "^6.2.0",
|
|
60
58
|
"@types/react-dom": "^18.2.0",
|
|
61
|
-
"esbuild": "^0.25.
|
|
59
|
+
"esbuild": "^0.25.3",
|
|
62
60
|
"esbuild-sass-plugin": "^3.3.1",
|
|
63
|
-
"eslint": "^9.
|
|
64
|
-
"eslint-plugin-react": "^7.37.
|
|
65
|
-
"eslint-plugin-react-hooks": "^5.
|
|
61
|
+
"eslint": "^9.26.0",
|
|
62
|
+
"eslint-plugin-react": "^7.37.5",
|
|
63
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
66
64
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
67
65
|
"lodash": "^4.17.21",
|
|
68
|
-
"npm-dts": "^1.3.
|
|
66
|
+
"npm-dts": "^1.3.13",
|
|
69
67
|
"react": "^18.2.0",
|
|
70
68
|
"react-dom": "^18.2.0",
|
|
71
|
-
"stylelint": "^16.
|
|
72
|
-
"stylelint-config-standard": "^
|
|
69
|
+
"stylelint": "^16.19.1",
|
|
70
|
+
"stylelint-config-standard": "^38.0.0",
|
|
73
71
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
74
|
-
"typescript": "^5.
|
|
75
|
-
"typescript-eslint": "^8.
|
|
72
|
+
"typescript": "^5.8.3",
|
|
73
|
+
"typescript-eslint": "^8.32.0"
|
|
76
74
|
},
|
|
77
75
|
"dependencies": {
|
|
78
|
-
"@floating-ui/react": "^0.
|
|
79
|
-
"@tanstack/react-form": "^1.1
|
|
76
|
+
"@floating-ui/react": "^0.27.8",
|
|
77
|
+
"@tanstack/react-form": "^1.9.1",
|
|
80
78
|
"classnames": "^2.5.1",
|
|
81
|
-
"date-fns": "^
|
|
82
|
-
"libphonenumber-js": "^1.12.
|
|
83
|
-
"lucide-react": "^0.
|
|
79
|
+
"date-fns": "^4.1.0",
|
|
80
|
+
"libphonenumber-js": "^1.12.7",
|
|
81
|
+
"lucide-react": "^0.507.0",
|
|
84
82
|
"pluralize": "^8.0.0",
|
|
85
|
-
"react-aria-components": "^1.
|
|
86
|
-
"react-currency-input-field": "^3.
|
|
83
|
+
"react-aria-components": "^1.8.0",
|
|
84
|
+
"react-currency-input-field": "^3.10.0",
|
|
87
85
|
"react-datepicker": "^6.9.0",
|
|
88
|
-
"react-plaid-link": "^
|
|
89
|
-
"react-select": "^5.
|
|
90
|
-
"recharts": "^2.15.
|
|
91
|
-
"swr": "^2.
|
|
92
|
-
"zustand": "^5.0.
|
|
86
|
+
"react-plaid-link": "^4.0.1",
|
|
87
|
+
"react-select": "^5.10.1",
|
|
88
|
+
"recharts": "^2.15.3",
|
|
89
|
+
"swr": "^2.3.3",
|
|
90
|
+
"zustand": "^5.0.4"
|
|
93
91
|
}
|
|
94
92
|
}
|