@layerfi/components 0.1.82 → 0.1.84-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 +624 -423
- package/dist/esm/index.mjs +539 -338
- package/dist/index.css +1 -1
- package/dist/index.d.ts +86 -1
- package/package.json +7 -2
- package/dist/esm/index.mjs.map +0 -7
- package/dist/index.css.map +0 -7
- package/eslint.config.mjs +0 -100
package/dist/index.css
CHANGED
|
@@ -7704,7 +7704,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
7704
7704
|
display: flex;
|
|
7705
7705
|
flex-direction: column;
|
|
7706
7706
|
height: 100%;
|
|
7707
|
-
overflow:
|
|
7707
|
+
overflow-y: auto;
|
|
7708
7708
|
border-radius: 8px;
|
|
7709
7709
|
box-shadow: 0px 0px 0px 1px var(--color-base-300);
|
|
7710
7710
|
background-color: var(--color-base-0);
|
package/dist/index.d.ts
CHANGED
|
@@ -165,6 +165,7 @@ declare module '@layerfi/components/api/layer/categories' {
|
|
|
165
165
|
declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
166
166
|
import { Account, ChartOfAccounts, NewAccount, EditAccount, LedgerAccountsEntry } from '@layerfi/components/types';
|
|
167
167
|
import { ChartWithBalances } from '@layerfi/components/types/chart_of_accounts';
|
|
168
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
168
169
|
import { LedgerAccountLineItems } from '@layerfi/components/types/ledger_accounts';
|
|
169
170
|
export const getChartOfAccounts: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
170
171
|
params?: Record<string, string | undefined> | undefined;
|
|
@@ -198,9 +199,15 @@ declare module '@layerfi/components/api/layer/chart_of_accounts' {
|
|
|
198
199
|
} | undefined) => () => Promise<{
|
|
199
200
|
data: LedgerAccountsEntry;
|
|
200
201
|
}>;
|
|
202
|
+
export const getLedgerAccountBalancesCSV: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
203
|
+
params?: Record<string, string | undefined> | undefined;
|
|
204
|
+
} | undefined) => () => Promise<{
|
|
205
|
+
data: S3PresignedUrl;
|
|
206
|
+
}>;
|
|
201
207
|
|
|
202
208
|
}
|
|
203
209
|
declare module '@layerfi/components/api/layer/journal' {
|
|
210
|
+
import { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
204
211
|
import { JournalEntry } from '@layerfi/components/types/journal';
|
|
205
212
|
export const getJournal: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
206
213
|
params?: Record<string, string | undefined> | undefined;
|
|
@@ -217,6 +224,11 @@ declare module '@layerfi/components/api/layer/journal' {
|
|
|
217
224
|
params?: Record<string, string | undefined> | undefined;
|
|
218
225
|
body?: Record<string, unknown> | undefined;
|
|
219
226
|
} | undefined) => Promise<Record<never, never>>;
|
|
227
|
+
export const getJournalEntriesCSV: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
228
|
+
params?: Record<string, string | undefined> | undefined;
|
|
229
|
+
} | undefined) => () => Promise<{
|
|
230
|
+
data: S3PresignedUrl;
|
|
231
|
+
}>;
|
|
220
232
|
|
|
221
233
|
}
|
|
222
234
|
declare module '@layerfi/components/api/layer/linked_accounts' {
|
|
@@ -600,6 +612,11 @@ declare module '@layerfi/components/api/layer' {
|
|
|
600
612
|
} | undefined) => () => Promise<{
|
|
601
613
|
data: import("@layerfi/components/types/chart_of_accounts").ChartWithBalances;
|
|
602
614
|
}>;
|
|
615
|
+
getLedgerAccountBalancesCSV: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
616
|
+
params?: Record<string, string | undefined> | undefined;
|
|
617
|
+
} | undefined) => () => Promise<{
|
|
618
|
+
data: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
619
|
+
}>;
|
|
603
620
|
getLedgerAccountsLines: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
604
621
|
params?: Record<string, string | undefined> | undefined;
|
|
605
622
|
} | undefined) => () => Promise<{
|
|
@@ -640,6 +657,11 @@ declare module '@layerfi/components/api/layer' {
|
|
|
640
657
|
} | undefined) => () => Promise<{
|
|
641
658
|
data: import("@layerfi/components/types").JournalEntry[];
|
|
642
659
|
}>;
|
|
660
|
+
getJournalEntriesCSV: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
661
|
+
params?: Record<string, string | undefined> | undefined;
|
|
662
|
+
} | undefined) => () => Promise<{
|
|
663
|
+
data: import("@layerfi/components/types/general").S3PresignedUrl;
|
|
664
|
+
}>;
|
|
643
665
|
reverseJournalEntry: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
644
666
|
params?: Record<string, string | undefined> | undefined;
|
|
645
667
|
body?: Record<string, unknown> | undefined;
|
|
@@ -1795,11 +1817,42 @@ declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts'
|
|
|
1795
1817
|
withDateControl?: boolean;
|
|
1796
1818
|
withExpandAllButton?: boolean;
|
|
1797
1819
|
stringOverrides?: ChartOfAccountsStringOverrides;
|
|
1820
|
+
showAddAccountButton?: boolean;
|
|
1798
1821
|
templateAccountsEditable?: boolean;
|
|
1799
1822
|
showReversalEntries?: boolean;
|
|
1800
1823
|
}
|
|
1801
1824
|
export const ChartOfAccounts: (props: ChartOfAccountsProps) => React.JSX.Element;
|
|
1802
1825
|
|
|
1826
|
+
}
|
|
1827
|
+
declare module '@layerfi/components/components/ChartOfAccounts/download/AccountBalancesDownloadButton' {
|
|
1828
|
+
import React from 'react';
|
|
1829
|
+
type AccountBalancesDownloadButtonProps = {
|
|
1830
|
+
startCutoff?: Date;
|
|
1831
|
+
endCutoff?: Date;
|
|
1832
|
+
iconOnly?: boolean;
|
|
1833
|
+
};
|
|
1834
|
+
export function AccountBalancesDownloadButton({ startCutoff, endCutoff, iconOnly, }: AccountBalancesDownloadButtonProps): React.JSX.Element;
|
|
1835
|
+
export {};
|
|
1836
|
+
|
|
1837
|
+
}
|
|
1838
|
+
declare module '@layerfi/components/components/ChartOfAccounts/download/useAccountBalancesDownload' {
|
|
1839
|
+
import type { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
1840
|
+
import type { Awaitable } from '@layerfi/components/types/utility/promises';
|
|
1841
|
+
type UseAccountBalancesDownloadOptions = {
|
|
1842
|
+
startCutoff?: Date;
|
|
1843
|
+
endCutoff?: Date;
|
|
1844
|
+
onSuccess?: (url: S3PresignedUrl) => Awaitable<unknown>;
|
|
1845
|
+
};
|
|
1846
|
+
export function useAccountBalancesDownload({ startCutoff, endCutoff, onSuccess, }: UseAccountBalancesDownloadOptions): import("swr/mutation").SWRMutationResponse<unknown, any, () => {
|
|
1847
|
+
accessToken: string;
|
|
1848
|
+
apiUrl: string;
|
|
1849
|
+
businessId: string;
|
|
1850
|
+
startCutoff: Date | undefined;
|
|
1851
|
+
endCutoff: Date | undefined;
|
|
1852
|
+
tags: string[];
|
|
1853
|
+
} | undefined, never>;
|
|
1854
|
+
export {};
|
|
1855
|
+
|
|
1803
1856
|
}
|
|
1804
1857
|
declare module '@layerfi/components/components/ChartOfAccounts/index' {
|
|
1805
1858
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts';
|
|
@@ -1906,18 +1959,20 @@ declare module '@layerfi/components/components/ChartOfAccountsTable/ChartOfAccou
|
|
|
1906
1959
|
export interface ChartOfAccountsTableStringOverrides {
|
|
1907
1960
|
headerText?: string;
|
|
1908
1961
|
addAccountButtonText?: string;
|
|
1962
|
+
csvDownloadButtonText?: string;
|
|
1909
1963
|
nameColumnHeader?: string;
|
|
1910
1964
|
typeColumnHeader?: string;
|
|
1911
1965
|
balanceColumnHeader?: string;
|
|
1912
1966
|
subtypeColumnHeader?: string;
|
|
1913
1967
|
chartOfAccountsForm?: ChartOfAccountsFormStringOverrides;
|
|
1914
1968
|
}
|
|
1915
|
-
export const ChartOfAccountsTableWithPanel: ({ view, containerRef, asWidget, withDateControl, withExpandAllButton, stringOverrides, templateAccountsEditable, }: {
|
|
1969
|
+
export const ChartOfAccountsTableWithPanel: ({ view, containerRef, asWidget, withDateControl, withExpandAllButton, showAddAccountButton, stringOverrides, templateAccountsEditable, }: {
|
|
1916
1970
|
view: View;
|
|
1917
1971
|
containerRef: RefObject<HTMLDivElement>;
|
|
1918
1972
|
asWidget?: boolean;
|
|
1919
1973
|
withDateControl?: boolean;
|
|
1920
1974
|
withExpandAllButton?: boolean;
|
|
1975
|
+
showAddAccountButton?: boolean;
|
|
1921
1976
|
stringOverrides?: ChartOfAccountsTableStringOverrides;
|
|
1922
1977
|
templateAccountsEditable?: boolean;
|
|
1923
1978
|
}) => React.JSX.Element;
|
|
@@ -2408,6 +2463,36 @@ declare module '@layerfi/components/components/Journal/Journal' {
|
|
|
2408
2463
|
export const JOURNAL_CONFIG: JournalConfig;
|
|
2409
2464
|
export const Journal: (props: JournalProps) => React.JSX.Element;
|
|
2410
2465
|
|
|
2466
|
+
}
|
|
2467
|
+
declare module '@layerfi/components/components/Journal/download/JournalEntriesDownloadButton' {
|
|
2468
|
+
import React from 'react';
|
|
2469
|
+
type JournalEntriesDownloadButtonProps = {
|
|
2470
|
+
startCutoff?: Date;
|
|
2471
|
+
endCutoff?: Date;
|
|
2472
|
+
iconOnly?: boolean;
|
|
2473
|
+
};
|
|
2474
|
+
export function JournalEntriesDownloadButton({ startCutoff, endCutoff, iconOnly, }: JournalEntriesDownloadButtonProps): React.JSX.Element;
|
|
2475
|
+
export {};
|
|
2476
|
+
|
|
2477
|
+
}
|
|
2478
|
+
declare module '@layerfi/components/components/Journal/download/useJournalEntriesDownload' {
|
|
2479
|
+
import type { S3PresignedUrl } from '@layerfi/components/types/general';
|
|
2480
|
+
import type { Awaitable } from '@layerfi/components/types/utility/promises';
|
|
2481
|
+
type UseJournalEntriesDownloadOptions = {
|
|
2482
|
+
startCutoff?: Date;
|
|
2483
|
+
endCutoff?: Date;
|
|
2484
|
+
onSuccess?: (url: S3PresignedUrl) => Awaitable<unknown>;
|
|
2485
|
+
};
|
|
2486
|
+
export function useJournalEntriesDownload({ startCutoff, endCutoff, onSuccess, }: UseJournalEntriesDownloadOptions): import("swr/mutation").SWRMutationResponse<unknown, any, () => {
|
|
2487
|
+
accessToken: string;
|
|
2488
|
+
apiUrl: string;
|
|
2489
|
+
businessId: string;
|
|
2490
|
+
startCutoff: Date | undefined;
|
|
2491
|
+
endCutoff: Date | undefined;
|
|
2492
|
+
tags: string[];
|
|
2493
|
+
} | undefined, never>;
|
|
2494
|
+
export {};
|
|
2495
|
+
|
|
2411
2496
|
}
|
|
2412
2497
|
declare module '@layerfi/components/components/Journal/index' {
|
|
2413
2498
|
export { Journal } from '@layerfi/components/components/Journal/Journal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerfi/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.84-alpha",
|
|
4
4
|
"description": "Layer React Components",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -15,12 +15,17 @@
|
|
|
15
15
|
"./index.css": "./dist/index.css",
|
|
16
16
|
"./dist/styles/index.css": "./dist/index.css"
|
|
17
17
|
},
|
|
18
|
+
"files": [
|
|
19
|
+
"/dist"
|
|
20
|
+
],
|
|
18
21
|
"scripts": {
|
|
19
22
|
"test": "jest",
|
|
20
23
|
"typecheck": "tsc --noEmit",
|
|
21
24
|
"build": "node bin/build.js",
|
|
25
|
+
"build:clean": "rm -rf ./dist && npm run build",
|
|
22
26
|
"dev": "node bin/build.js -- --watch",
|
|
23
|
-
"prepack": "npm run typecheck && npm run build",
|
|
27
|
+
"prepack": "npm run typecheck && npm run build:clean",
|
|
28
|
+
"postinstall": "node bin/removeDeps.js",
|
|
24
29
|
"lint": "eslint .",
|
|
25
30
|
"lint:fix": "eslint . --fix"
|
|
26
31
|
},
|