@layerfi/components 0.1.7 → 0.1.9
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/esm/index.js +1440 -821
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +286 -119
- package/dist/index.js +1468 -851
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +456 -171
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
- package/index.d.ts +0 -1309
package/dist/index.d.ts
CHANGED
|
@@ -87,12 +87,12 @@ declare module '@layerfi/components/api/layer/categories' {
|
|
|
87
87
|
}>;
|
|
88
88
|
|
|
89
89
|
}
|
|
90
|
-
declare module '@layerfi/components/api/layer/
|
|
91
|
-
import { AccountAlternate,
|
|
92
|
-
export const
|
|
90
|
+
declare module '@layerfi/components/api/layer/ledger_accounts' {
|
|
91
|
+
import { AccountAlternate, LedgerAccounts, NewAccount } from '@layerfi/components/types';
|
|
92
|
+
export const getLedgerAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
93
93
|
params?: Record<string, string | undefined> | undefined;
|
|
94
94
|
} | undefined) => () => Promise<{
|
|
95
|
-
data:
|
|
95
|
+
data: LedgerAccounts;
|
|
96
96
|
}>;
|
|
97
97
|
export const createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
98
98
|
params?: Record<string, string | undefined> | undefined;
|
|
@@ -157,10 +157,10 @@ declare module '@layerfi/components/api/layer' {
|
|
|
157
157
|
categories: import("@layerfi/components/types").Category[];
|
|
158
158
|
};
|
|
159
159
|
}>;
|
|
160
|
-
|
|
160
|
+
getLedgerAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
161
161
|
params?: Record<string, string | undefined> | undefined;
|
|
162
162
|
} | undefined) => () => Promise<{
|
|
163
|
-
data: import("@layerfi/components/types").
|
|
163
|
+
data: import("@layerfi/components/types").LedgerAccounts;
|
|
164
164
|
}>;
|
|
165
165
|
getProfitAndLoss: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
166
166
|
params?: Record<string, string | undefined> | undefined;
|
|
@@ -174,6 +174,15 @@ declare module '@layerfi/components/api/layer' {
|
|
|
174
174
|
declare module '@layerfi/components/api/util' {
|
|
175
175
|
export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
|
|
176
176
|
|
|
177
|
+
}
|
|
178
|
+
declare module '@layerfi/components/components/AccountsReceivable/AccountsReceivableIndex' {
|
|
179
|
+
import React from 'react';
|
|
180
|
+
export const AccountsReceivable: () => React.JSX.Element;
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
declare module '@layerfi/components/components/AccountsReceivable/index' {
|
|
184
|
+
export { AccountsReceivable } from '@layerfi/components/components/AccountsReceivable/AccountsReceivableIndex';
|
|
185
|
+
|
|
177
186
|
}
|
|
178
187
|
declare module '@layerfi/components/components/Badge/Badge' {
|
|
179
188
|
import React, { ReactNode } from 'react';
|
|
@@ -367,12 +376,13 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
367
376
|
active?: boolean;
|
|
368
377
|
iconOnly?: boolean;
|
|
369
378
|
action?: SubmitAction;
|
|
379
|
+
noIcon?: boolean;
|
|
370
380
|
}
|
|
371
381
|
export enum SubmitAction {
|
|
372
382
|
SAVE = "save",
|
|
373
383
|
UPDATE = "update"
|
|
374
384
|
}
|
|
375
|
-
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, ...props }: SubmitButtonProps) => React.JSX.Element;
|
|
385
|
+
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, noIcon, ...props }: SubmitButtonProps) => React.JSX.Element;
|
|
376
386
|
|
|
377
387
|
}
|
|
378
388
|
declare module '@layerfi/components/components/Button/TextButton' {
|
|
@@ -451,39 +461,6 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
|
|
|
451
461
|
declare module '@layerfi/components/components/CategorySelect/index' {
|
|
452
462
|
export { CategorySelect } from '@layerfi/components/components/CategorySelect/CategorySelect';
|
|
453
463
|
|
|
454
|
-
}
|
|
455
|
-
declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts' {
|
|
456
|
-
import React from 'react';
|
|
457
|
-
export const ChartOfAccounts: () => React.JSX.Element;
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
declare module '@layerfi/components/components/ChartOfAccounts/index' {
|
|
461
|
-
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
declare module '@layerfi/components/components/ChartOfAccountsNewForm/ChartOfAccountsNewForm' {
|
|
465
|
-
import React from 'react';
|
|
466
|
-
export const ChartOfAccountsNewForm: () => React.JSX.Element;
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
declare module '@layerfi/components/components/ChartOfAccountsNewForm/index' {
|
|
470
|
-
export { ChartOfAccountsNewForm } from '@layerfi/components/components/ChartOfAccountsNewForm/ChartOfAccountsNewForm';
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
declare module '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow' {
|
|
474
|
-
import React from 'react';
|
|
475
|
-
import { Account } from '@layerfi/components/types';
|
|
476
|
-
type Props = {
|
|
477
|
-
account: Account;
|
|
478
|
-
depth?: number;
|
|
479
|
-
};
|
|
480
|
-
export const ChartOfAccountsRow: ({ account, depth }: Props) => React.JSX.Element;
|
|
481
|
-
export {};
|
|
482
|
-
|
|
483
|
-
}
|
|
484
|
-
declare module '@layerfi/components/components/ChartOfAccountsRow/index' {
|
|
485
|
-
export { ChartOfAccountsRow } from '@layerfi/components/components/ChartOfAccountsRow/ChartOfAccountsRow';
|
|
486
|
-
|
|
487
464
|
}
|
|
488
465
|
declare module '@layerfi/components/components/Container/Container' {
|
|
489
466
|
import React, { ReactNode } from 'react';
|
|
@@ -515,7 +492,8 @@ declare module '@layerfi/components/components/DataState/DataState' {
|
|
|
515
492
|
import React from 'react';
|
|
516
493
|
export enum DataStateStatus {
|
|
517
494
|
allDone = "allDone",
|
|
518
|
-
failed = "failed"
|
|
495
|
+
failed = "failed",
|
|
496
|
+
info = "info"
|
|
519
497
|
}
|
|
520
498
|
export interface DataStateProps {
|
|
521
499
|
status: DataStateStatus;
|
|
@@ -603,14 +581,91 @@ declare module '@layerfi/components/components/Input/InputGroup' {
|
|
|
603
581
|
name?: string;
|
|
604
582
|
className?: string;
|
|
605
583
|
children?: ReactNode;
|
|
584
|
+
inline?: boolean;
|
|
585
|
+
}
|
|
586
|
+
export const InputGroup: ({ label, name, className, inline, children, }: InputGroupProps) => React.JSX.Element;
|
|
587
|
+
|
|
588
|
+
}
|
|
589
|
+
declare module '@layerfi/components/components/Input/Select' {
|
|
590
|
+
import React from 'react';
|
|
591
|
+
import { GroupBase, OptionsOrGroups } from 'react-select';
|
|
592
|
+
export interface SelectProps<T> {
|
|
593
|
+
name?: string;
|
|
594
|
+
options?: OptionsOrGroups<T, GroupBase<T>>;
|
|
595
|
+
className?: string;
|
|
596
|
+
classNamePrefix?: string;
|
|
597
|
+
value?: T;
|
|
598
|
+
onChange: (selected: T) => void;
|
|
599
|
+
disabled?: boolean;
|
|
606
600
|
}
|
|
607
|
-
export const
|
|
601
|
+
export const Select: <T>({ name, options, className, classNamePrefix, value, onChange, disabled, }: SelectProps<T>) => React.JSX.Element;
|
|
608
602
|
|
|
609
603
|
}
|
|
610
604
|
declare module '@layerfi/components/components/Input/index' {
|
|
611
605
|
export { Input } from '@layerfi/components/components/Input/Input';
|
|
612
606
|
export { InputGroup } from '@layerfi/components/components/Input/InputGroup';
|
|
613
607
|
export { FileInput } from '@layerfi/components/components/Input/FileInput';
|
|
608
|
+
export { Select } from '@layerfi/components/components/Input/Select';
|
|
609
|
+
|
|
610
|
+
}
|
|
611
|
+
declare module '@layerfi/components/components/LedgerAccounts/LedgerAccounts' {
|
|
612
|
+
import React from 'react';
|
|
613
|
+
import { useLedgerAccounts } from '@layerfi/components/hooks/useLedgerAccounts/index';
|
|
614
|
+
export type LedgerAccountsContextType = ReturnType<typeof useLedgerAccounts>;
|
|
615
|
+
export const LedgerAccountsContext: React.Context<{
|
|
616
|
+
data: import("@layerfi/components/types").LedgerAccounts | undefined;
|
|
617
|
+
isLoading?: boolean | undefined;
|
|
618
|
+
isValidating?: boolean | undefined;
|
|
619
|
+
error?: unknown;
|
|
620
|
+
refetch: () => void;
|
|
621
|
+
create: (newAccount: import("@layerfi/components/types").NewAccount) => void;
|
|
622
|
+
form?: import("@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts").LedgerAccountsForm | undefined;
|
|
623
|
+
addAccount: () => void;
|
|
624
|
+
editAccount: (id: string) => void;
|
|
625
|
+
cancelForm: () => void;
|
|
626
|
+
changeFormData: (name: string, value: string | import("@layerfi/components/types/general").BaseSelectOption | undefined) => void;
|
|
627
|
+
submitForm: () => void;
|
|
628
|
+
showARForAccountId?: string | undefined;
|
|
629
|
+
setShowARForAccountId: (id?: string | undefined) => void;
|
|
630
|
+
}>;
|
|
631
|
+
export const LedgerAccounts: () => React.JSX.Element;
|
|
632
|
+
|
|
633
|
+
}
|
|
634
|
+
declare module '@layerfi/components/components/LedgerAccounts/index' {
|
|
635
|
+
export { LedgerAccounts } from '@layerfi/components/components/LedgerAccounts/LedgerAccounts';
|
|
636
|
+
|
|
637
|
+
}
|
|
638
|
+
declare module '@layerfi/components/components/LedgerAccountsForm/LedgerAccountsForm' {
|
|
639
|
+
import React from 'react';
|
|
640
|
+
export const LedgerAccountsForm: () => React.JSX.Element | undefined;
|
|
641
|
+
|
|
642
|
+
}
|
|
643
|
+
declare module '@layerfi/components/components/LedgerAccountsForm/index' {
|
|
644
|
+
export { LedgerAccountsForm } from '@layerfi/components/components/LedgerAccountsForm/LedgerAccountsForm';
|
|
645
|
+
|
|
646
|
+
}
|
|
647
|
+
declare module '@layerfi/components/components/LedgerAccountsRow/LedgerAccountsRow' {
|
|
648
|
+
import React from 'react';
|
|
649
|
+
import { Account } from '@layerfi/components/types';
|
|
650
|
+
type LedgerAccountsRowProps = {
|
|
651
|
+
account: Account;
|
|
652
|
+
depth?: number;
|
|
653
|
+
};
|
|
654
|
+
export const LedgerAccountsRow: ({ account, depth, }: LedgerAccountsRowProps) => React.JSX.Element;
|
|
655
|
+
export {};
|
|
656
|
+
|
|
657
|
+
}
|
|
658
|
+
declare module '@layerfi/components/components/LedgerAccountsRow/index' {
|
|
659
|
+
export { LedgerAccountsRow } from '@layerfi/components/components/LedgerAccountsRow/LedgerAccountsRow';
|
|
660
|
+
|
|
661
|
+
}
|
|
662
|
+
declare module '@layerfi/components/components/LedgerAccountsSidebar/LedgerAccountsSidebar' {
|
|
663
|
+
import React from 'react';
|
|
664
|
+
export const LedgerAccountsSidebar: () => React.JSX.Element;
|
|
665
|
+
|
|
666
|
+
}
|
|
667
|
+
declare module '@layerfi/components/components/LedgerAccountsSidebar/index' {
|
|
668
|
+
export { LedgerAccountsSidebar } from '@layerfi/components/components/LedgerAccountsSidebar/LedgerAccountsSidebar';
|
|
614
669
|
|
|
615
670
|
}
|
|
616
671
|
declare module '@layerfi/components/components/LinkedAccounts/LinkedAccountThumb' {
|
|
@@ -701,18 +756,7 @@ declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
|
701
756
|
refetch: () => void;
|
|
702
757
|
sidebarScope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope;
|
|
703
758
|
setSidebarScope: (view: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").SidebarScope) => void;
|
|
704
|
-
filters:
|
|
705
|
-
expenses: {
|
|
706
|
-
sortBy?: string | undefined;
|
|
707
|
-
sortDirection?: import("@layerfi/components/types").SortDirection | undefined;
|
|
708
|
-
types?: string[] | undefined;
|
|
709
|
-
} | undefined;
|
|
710
|
-
revenue: {
|
|
711
|
-
sortBy?: string | undefined;
|
|
712
|
-
sortDirection?: import("@layerfi/components/types").SortDirection | undefined;
|
|
713
|
-
types?: string[] | undefined;
|
|
714
|
-
} | undefined;
|
|
715
|
-
};
|
|
759
|
+
filters: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").ProfitAndLossFilters;
|
|
716
760
|
sortBy: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, field: string, direction?: import("../../types").SortDirection | undefined) => void;
|
|
717
761
|
setFilterTypes: (scope: import("@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss").Scope, types: string[]) => void;
|
|
718
762
|
}>;
|
|
@@ -760,6 +804,51 @@ declare module '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAnd
|
|
|
760
804
|
declare module '@layerfi/components/components/ProfitAndLossDatePicker/index' {
|
|
761
805
|
export { ProfitAndLossDatePicker } from '@layerfi/components/components/ProfitAndLossDatePicker/ProfitAndLossDatePicker';
|
|
762
806
|
|
|
807
|
+
}
|
|
808
|
+
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/DetailedChart' {
|
|
809
|
+
import React from 'react';
|
|
810
|
+
import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
811
|
+
import { LineBaseItem } from '@layerfi/components/types/line_item';
|
|
812
|
+
interface DetailedChartProps {
|
|
813
|
+
filteredData: LineBaseItem[];
|
|
814
|
+
filteredTotal?: number;
|
|
815
|
+
hoveredItem?: string;
|
|
816
|
+
setHoveredItem: (name?: string) => void;
|
|
817
|
+
sidebarScope?: SidebarScope;
|
|
818
|
+
date: number | Date;
|
|
819
|
+
}
|
|
820
|
+
export const DetailedChart: ({ filteredData, filteredTotal, hoveredItem, setHoveredItem, sidebarScope, date, }: DetailedChartProps) => React.JSX.Element;
|
|
821
|
+
export {};
|
|
822
|
+
|
|
823
|
+
}
|
|
824
|
+
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/DetailedTable' {
|
|
825
|
+
import React from 'react';
|
|
826
|
+
import { Scope, SidebarScope, ProfitAndLossFilters } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
827
|
+
import { SortDirection } from '@layerfi/components/types';
|
|
828
|
+
import { LineBaseItem } from '@layerfi/components/types/line_item';
|
|
829
|
+
export interface DetailedTableProps {
|
|
830
|
+
filteredData: LineBaseItem[];
|
|
831
|
+
hoveredItem?: string;
|
|
832
|
+
setHoveredItem: (name?: string) => void;
|
|
833
|
+
sidebarScope: SidebarScope;
|
|
834
|
+
filters: ProfitAndLossFilters;
|
|
835
|
+
sortBy: (scope: Scope, field: string, direction?: SortDirection) => void;
|
|
836
|
+
}
|
|
837
|
+
export const DetailedTable: ({ filteredData, sidebarScope, filters, sortBy, hoveredItem, setHoveredItem, }: DetailedTableProps) => React.JSX.Element;
|
|
838
|
+
|
|
839
|
+
}
|
|
840
|
+
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/Filters' {
|
|
841
|
+
import React from 'react';
|
|
842
|
+
import { Scope, SidebarScope, ProfitAndLossFilters } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
843
|
+
import { LineBaseItem } from '@layerfi/components/types/line_item';
|
|
844
|
+
export interface FiltersProps {
|
|
845
|
+
filteredData: LineBaseItem[];
|
|
846
|
+
sidebarScope: SidebarScope;
|
|
847
|
+
filters: ProfitAndLossFilters;
|
|
848
|
+
setFilterTypes: (scope: Scope, types: string[]) => void;
|
|
849
|
+
}
|
|
850
|
+
export const Filters: ({ filteredData, sidebarScope, filters, setFilterTypes, }: FiltersProps) => React.JSX.Element;
|
|
851
|
+
|
|
763
852
|
}
|
|
764
853
|
declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/ProfitAndLossDetailedCharts' {
|
|
765
854
|
import React from 'react';
|
|
@@ -772,6 +861,7 @@ declare module '@layerfi/components/components/ProfitAndLossDetailedCharts/index
|
|
|
772
861
|
}
|
|
773
862
|
declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow' {
|
|
774
863
|
import React from 'react';
|
|
864
|
+
import { SidebarScope } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
775
865
|
import { Direction, LineItem } from '@layerfi/components/types';
|
|
776
866
|
type Props = {
|
|
777
867
|
variant?: string;
|
|
@@ -779,15 +869,26 @@ declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow
|
|
|
779
869
|
maxDepth?: number;
|
|
780
870
|
lineItem?: LineItem | null;
|
|
781
871
|
direction?: Direction;
|
|
872
|
+
scope?: SidebarScope;
|
|
873
|
+
setSidebarScope?: (name: SidebarScope) => void;
|
|
782
874
|
lockExpanded?: boolean;
|
|
783
875
|
};
|
|
784
|
-
export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, }: Props) => React.JSX.Element | null;
|
|
876
|
+
export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, scope, setSidebarScope, }: Props) => React.JSX.Element | null;
|
|
785
877
|
export {};
|
|
786
878
|
|
|
787
879
|
}
|
|
788
880
|
declare module '@layerfi/components/components/ProfitAndLossRow/index' {
|
|
789
881
|
export { ProfitAndLossRow } from '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow';
|
|
790
882
|
|
|
883
|
+
}
|
|
884
|
+
declare module '@layerfi/components/components/ProfitAndLossSummaries/MiniChart' {
|
|
885
|
+
import React from 'react';
|
|
886
|
+
import { LineBaseItem } from '@layerfi/components/types/line_item';
|
|
887
|
+
export interface MiniChartProps {
|
|
888
|
+
data: LineBaseItem[];
|
|
889
|
+
}
|
|
890
|
+
export const MiniChart: ({ data }: MiniChartProps) => React.JSX.Element;
|
|
891
|
+
|
|
791
892
|
}
|
|
792
893
|
declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
|
|
793
894
|
import React from 'react';
|
|
@@ -1092,6 +1193,14 @@ declare module '@layerfi/components/components/Typography/index' {
|
|
|
1092
1193
|
export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
|
|
1093
1194
|
export { ErrorText } from '@layerfi/components/components/Typography/ErrorText';
|
|
1094
1195
|
|
|
1196
|
+
}
|
|
1197
|
+
declare module '@layerfi/components/config/charts' {
|
|
1198
|
+
export const INACTIVE_OPACITY_LEVELS: number[];
|
|
1199
|
+
export const DEFAULT_CHART_COLORS: {
|
|
1200
|
+
color: string;
|
|
1201
|
+
opacity: number;
|
|
1202
|
+
}[];
|
|
1203
|
+
|
|
1095
1204
|
}
|
|
1096
1205
|
declare module '@layerfi/components/config/general' {
|
|
1097
1206
|
export const DATE_FORMAT = "LLL d, yyyy";
|
|
@@ -1198,22 +1307,6 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
|
|
|
1198
1307
|
export const useBankTransactions: UseBankTransactions;
|
|
1199
1308
|
export {};
|
|
1200
1309
|
|
|
1201
|
-
}
|
|
1202
|
-
declare module '@layerfi/components/hooks/useChartOfAccounts/index' {
|
|
1203
|
-
export { useChartOfAccounts } from '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts';
|
|
1204
|
-
|
|
1205
|
-
}
|
|
1206
|
-
declare module '@layerfi/components/hooks/useChartOfAccounts/useChartOfAccounts' {
|
|
1207
|
-
import { AccountAlternate, ChartOfAccounts, NewAccount } from '@layerfi/components/types';
|
|
1208
|
-
type UseChartOfAccounts = () => {
|
|
1209
|
-
data: ChartOfAccounts | undefined;
|
|
1210
|
-
isLoading: boolean;
|
|
1211
|
-
error: unknown;
|
|
1212
|
-
create: (newAccount: NewAccount) => Promise<AccountAlternate>;
|
|
1213
|
-
};
|
|
1214
|
-
export const useChartOfAccounts: UseChartOfAccounts;
|
|
1215
|
-
export {};
|
|
1216
|
-
|
|
1217
1310
|
}
|
|
1218
1311
|
declare module '@layerfi/components/hooks/useElementSize/index' {
|
|
1219
1312
|
export { useElementSize } from '@layerfi/components/hooks/useElementSize/useElementSize';
|
|
@@ -1236,6 +1329,45 @@ declare module '@layerfi/components/hooks/useLayerContext/useLayerContext' {
|
|
|
1236
1329
|
setTheme: (theme: import("@layerfi/components/types/layer_context").LayerThemeConfig) => void;
|
|
1237
1330
|
};
|
|
1238
1331
|
|
|
1332
|
+
}
|
|
1333
|
+
declare module '@layerfi/components/hooks/useLedgerAccounts/index' {
|
|
1334
|
+
export { useLedgerAccounts } from '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts';
|
|
1335
|
+
|
|
1336
|
+
}
|
|
1337
|
+
declare module '@layerfi/components/hooks/useLedgerAccounts/useLedgerAccounts' {
|
|
1338
|
+
import { Account, LedgerAccounts, NewAccount } from '@layerfi/components/types';
|
|
1339
|
+
import { BaseSelectOption } from '@layerfi/components/types/general';
|
|
1340
|
+
export interface LedgerAccountsForm {
|
|
1341
|
+
action: 'new' | 'edit';
|
|
1342
|
+
accountId?: string;
|
|
1343
|
+
data: {
|
|
1344
|
+
parent?: BaseSelectOption;
|
|
1345
|
+
name?: string;
|
|
1346
|
+
type?: BaseSelectOption;
|
|
1347
|
+
subType?: BaseSelectOption;
|
|
1348
|
+
category?: BaseSelectOption;
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
type UseLedgerAccounts = () => {
|
|
1352
|
+
data: LedgerAccounts | undefined;
|
|
1353
|
+
isLoading?: boolean;
|
|
1354
|
+
isValidating?: boolean;
|
|
1355
|
+
error?: unknown;
|
|
1356
|
+
refetch: () => void;
|
|
1357
|
+
create: (newAccount: NewAccount) => void;
|
|
1358
|
+
form?: LedgerAccountsForm;
|
|
1359
|
+
addAccount: () => void;
|
|
1360
|
+
editAccount: (id: string) => void;
|
|
1361
|
+
cancelForm: () => void;
|
|
1362
|
+
changeFormData: (name: string, value: string | BaseSelectOption | undefined) => void;
|
|
1363
|
+
submitForm: () => void;
|
|
1364
|
+
showARForAccountId?: string;
|
|
1365
|
+
setShowARForAccountId: (id?: string) => void;
|
|
1366
|
+
};
|
|
1367
|
+
export const flattenAccounts: (accounts: Account[]) => Account[];
|
|
1368
|
+
export const useLedgerAccounts: UseLedgerAccounts;
|
|
1369
|
+
export {};
|
|
1370
|
+
|
|
1239
1371
|
}
|
|
1240
1372
|
declare module '@layerfi/components/hooks/useLinkedAccounts/index' {
|
|
1241
1373
|
export { useLinkedAccounts } from '@layerfi/components/hooks/useLinkedAccounts/useLinkedAccounts';
|
|
@@ -1295,7 +1427,7 @@ declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
|
1295
1427
|
sortDirection?: SortDirection;
|
|
1296
1428
|
types?: string[];
|
|
1297
1429
|
};
|
|
1298
|
-
type ProfitAndLossFilters = Record<Scope, ProfitAndLossFilter | undefined>;
|
|
1430
|
+
export type ProfitAndLossFilters = Record<Scope, ProfitAndLossFilter | undefined>;
|
|
1299
1431
|
type UseProfitAndLoss = (props?: Props) => {
|
|
1300
1432
|
data: ProfitAndLoss | undefined;
|
|
1301
1433
|
filteredData: LineBaseItem[];
|
|
@@ -1329,6 +1461,13 @@ declare module '@layerfi/components/icons/AlertOctagon' {
|
|
|
1329
1461
|
const AlertOctagon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1330
1462
|
export default AlertOctagon;
|
|
1331
1463
|
|
|
1464
|
+
}
|
|
1465
|
+
declare module '@layerfi/components/icons/ArrowRightCircle' {
|
|
1466
|
+
import * as React from 'react';
|
|
1467
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1468
|
+
const ArrowRightCircle: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1469
|
+
export default ArrowRightCircle;
|
|
1470
|
+
|
|
1332
1471
|
}
|
|
1333
1472
|
declare module '@layerfi/components/icons/Calendar' {
|
|
1334
1473
|
import * as React from 'react';
|
|
@@ -1381,10 +1520,17 @@ declare module '@layerfi/components/icons/ChevronRight' {
|
|
|
1381
1520
|
}
|
|
1382
1521
|
declare module '@layerfi/components/icons/DownloadCloud' {
|
|
1383
1522
|
import * as React from 'react';
|
|
1384
|
-
import {
|
|
1385
|
-
const DownloadCloud: (props:
|
|
1523
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1524
|
+
const DownloadCloud: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1386
1525
|
export default DownloadCloud;
|
|
1387
1526
|
|
|
1527
|
+
}
|
|
1528
|
+
declare module '@layerfi/components/icons/Edit2' {
|
|
1529
|
+
import * as React from 'react';
|
|
1530
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1531
|
+
const Edit2: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1532
|
+
export default Edit2;
|
|
1533
|
+
|
|
1388
1534
|
}
|
|
1389
1535
|
declare module '@layerfi/components/icons/Loader' {
|
|
1390
1536
|
import * as React from 'react';
|
|
@@ -1399,6 +1545,13 @@ declare module '@layerfi/components/icons/MinimizeTwo' {
|
|
|
1399
1545
|
const MinimizeTwo: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1400
1546
|
export default MinimizeTwo;
|
|
1401
1547
|
|
|
1548
|
+
}
|
|
1549
|
+
declare module '@layerfi/components/icons/PieChart' {
|
|
1550
|
+
import * as React from 'react';
|
|
1551
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1552
|
+
const PieChart: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1553
|
+
export default PieChart;
|
|
1554
|
+
|
|
1402
1555
|
}
|
|
1403
1556
|
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
1404
1557
|
import * as React from 'react';
|
|
@@ -1470,8 +1623,8 @@ declare module '@layerfi/components/index' {
|
|
|
1470
1623
|
export { LinkedAccounts } from '@layerfi/components/components/LinkedAccounts/index';
|
|
1471
1624
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
1472
1625
|
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
|
|
1626
|
+
export { LedgerAccounts } from '@layerfi/components/components/LedgerAccounts/index';
|
|
1473
1627
|
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
1474
|
-
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
1475
1628
|
|
|
1476
1629
|
}
|
|
1477
1630
|
declare module '@layerfi/components/models/APIError' {
|
|
@@ -1673,52 +1826,13 @@ declare module '@layerfi/components/types/categories' {
|
|
|
1673
1826
|
export type CategoryUpdate = SingleCategoryUpdate | SplitCategoryUpdate;
|
|
1674
1827
|
export function hasSuggestions(categorization: Categorization): categorization is SuggestedCategorization;
|
|
1675
1828
|
|
|
1676
|
-
}
|
|
1677
|
-
declare module '@layerfi/components/types/chart_of_accounts' {
|
|
1678
|
-
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
1679
|
-
import { Category } from '@layerfi/components/types/categories';
|
|
1680
|
-
export interface ChartOfAccounts {
|
|
1681
|
-
name: string;
|
|
1682
|
-
accounts: Account[];
|
|
1683
|
-
}
|
|
1684
|
-
export interface Account {
|
|
1685
|
-
id: string;
|
|
1686
|
-
number: number;
|
|
1687
|
-
pnlCategory?: Category;
|
|
1688
|
-
headerForPnlCategory?: Category;
|
|
1689
|
-
name: string;
|
|
1690
|
-
accountStableName?: string;
|
|
1691
|
-
description?: string;
|
|
1692
|
-
scheduleCLine?: string;
|
|
1693
|
-
scheduleCLineDescription?: string;
|
|
1694
|
-
subAccounts?: Account[];
|
|
1695
|
-
hidePnl: boolean;
|
|
1696
|
-
showInPnlIfEmpty: boolean;
|
|
1697
|
-
normality: Direction;
|
|
1698
|
-
balance: number;
|
|
1699
|
-
selfOnlyBalance: number;
|
|
1700
|
-
}
|
|
1701
|
-
export interface AccountAlternate {
|
|
1702
|
-
type: 'Ledger_Account';
|
|
1703
|
-
id: string;
|
|
1704
|
-
name: string;
|
|
1705
|
-
stable_name: string | null;
|
|
1706
|
-
normality: Direction;
|
|
1707
|
-
pnl_category: string | null;
|
|
1708
|
-
}
|
|
1709
|
-
export type NewAccount = {
|
|
1710
|
-
name: string;
|
|
1711
|
-
normality: Direction;
|
|
1712
|
-
parent_id: {
|
|
1713
|
-
type: 'AccountId';
|
|
1714
|
-
id: string;
|
|
1715
|
-
};
|
|
1716
|
-
description: string;
|
|
1717
|
-
};
|
|
1718
|
-
|
|
1719
1829
|
}
|
|
1720
1830
|
declare module '@layerfi/components/types/general' {
|
|
1721
1831
|
export type SortDirection = 'asc' | 'desc';
|
|
1832
|
+
export interface BaseSelectOption {
|
|
1833
|
+
label: string;
|
|
1834
|
+
value: string | number;
|
|
1835
|
+
}
|
|
1722
1836
|
|
|
1723
1837
|
}
|
|
1724
1838
|
declare module '@layerfi/components/types/layer_context' {
|
|
@@ -1793,6 +1907,59 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
1793
1907
|
};
|
|
1794
1908
|
};
|
|
1795
1909
|
|
|
1910
|
+
}
|
|
1911
|
+
declare module '@layerfi/components/types/ledger_accounts' {
|
|
1912
|
+
import { Direction } from '@layerfi/components/types/bank_transactions';
|
|
1913
|
+
import { Category } from '@layerfi/components/types/categories';
|
|
1914
|
+
export interface LedgerAccounts {
|
|
1915
|
+
name: string;
|
|
1916
|
+
accounts: Account[];
|
|
1917
|
+
}
|
|
1918
|
+
export interface AccountEntry {
|
|
1919
|
+
account: Account;
|
|
1920
|
+
amount?: number;
|
|
1921
|
+
createdAt?: string;
|
|
1922
|
+
direction: Direction;
|
|
1923
|
+
entry_at?: string;
|
|
1924
|
+
entry_id?: string;
|
|
1925
|
+
id?: string;
|
|
1926
|
+
}
|
|
1927
|
+
export interface Account {
|
|
1928
|
+
id: string;
|
|
1929
|
+
number: number;
|
|
1930
|
+
pnlCategory?: Category;
|
|
1931
|
+
headerForPnlCategory?: Category;
|
|
1932
|
+
name: string;
|
|
1933
|
+
accountStableName?: string;
|
|
1934
|
+
description?: string;
|
|
1935
|
+
scheduleCLine?: string;
|
|
1936
|
+
scheduleCLineDescription?: string;
|
|
1937
|
+
sub_accounts?: Account[];
|
|
1938
|
+
hidePnl: boolean;
|
|
1939
|
+
showInPnlIfEmpty: boolean;
|
|
1940
|
+
normality: Direction;
|
|
1941
|
+
balance: number;
|
|
1942
|
+
selfOnlyBalance: number;
|
|
1943
|
+
entries?: AccountEntry[];
|
|
1944
|
+
}
|
|
1945
|
+
export interface AccountAlternate {
|
|
1946
|
+
type: 'Ledger_Account';
|
|
1947
|
+
id: string;
|
|
1948
|
+
name: string;
|
|
1949
|
+
stable_name: string | null;
|
|
1950
|
+
normality: Direction;
|
|
1951
|
+
pnl_category: string | null;
|
|
1952
|
+
}
|
|
1953
|
+
export type NewAccount = {
|
|
1954
|
+
name: string;
|
|
1955
|
+
normality: Direction;
|
|
1956
|
+
parent_id?: {
|
|
1957
|
+
type: 'AccountId';
|
|
1958
|
+
id: string;
|
|
1959
|
+
};
|
|
1960
|
+
description: string;
|
|
1961
|
+
};
|
|
1962
|
+
|
|
1796
1963
|
}
|
|
1797
1964
|
declare module '@layerfi/components/types/line_item' {
|
|
1798
1965
|
export interface LineItem {
|
|
@@ -1849,7 +2016,7 @@ declare module '@layerfi/components/types' {
|
|
|
1849
2016
|
export { BalanceSheet } from '@layerfi/components/types/balance_sheet';
|
|
1850
2017
|
export { Direction, BankTransaction } from '@layerfi/components/types/bank_transactions';
|
|
1851
2018
|
export { CategorizationStatus, Category, CategorizationType, AutoCategorization, SuggestedCategorization, SingleCategoryUpdate, SplitCategoryUpdate, CategoryUpdate, } from '@layerfi/components/types/categories';
|
|
1852
|
-
export { AccountAlternate,
|
|
2019
|
+
export { AccountAlternate, LedgerAccounts, Account, NewAccount, } from '@layerfi/components/types/ledger_accounts';
|
|
1853
2020
|
export { SortDirection } from '@layerfi/components/types/general';
|
|
1854
2021
|
export type DateRange<T = Date> = {
|
|
1855
2022
|
startDate: T;
|