@layerfi/components 0.1.3 → 0.1.5
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/.nvmrc +1 -0
- package/dist/esm/index.js +2073 -892
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +426 -51
- package/dist/index.js +2139 -968
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +908 -120
- package/dist/styles/index.css.map +3 -3
- package/index.d.ts +1309 -0
- package/package.json +1 -1
- package/dist/index.css +0 -106
- package/dist/index.css.map +0 -7
- package/dist/index.esm.css +0 -106
- package/dist/index.esm.css.map +0 -7
- package/dist/index.esm.js +0 -252
- package/dist/index.esm.js.map +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ declare module '@layerfi/components/api/layer/balance_sheet' {
|
|
|
42
42
|
}
|
|
43
43
|
declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
44
44
|
import { CategoryUpdate, BankTransaction, Metadata } from '@layerfi/components/types';
|
|
45
|
+
import { BankTransactionMatch, BankTransactionMatchType } from '@layerfi/components/types/bank_transactions';
|
|
45
46
|
export type GetBankTransactionsReturn = {
|
|
46
47
|
data?: BankTransaction[];
|
|
47
48
|
meta?: Metadata;
|
|
@@ -62,6 +63,16 @@ declare module '@layerfi/components/api/layer/bankTransactions' {
|
|
|
62
63
|
data: BankTransaction;
|
|
63
64
|
errors: unknown;
|
|
64
65
|
}>;
|
|
66
|
+
export const matchBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
67
|
+
params?: Record<string, string | undefined> | undefined;
|
|
68
|
+
body?: {
|
|
69
|
+
match_id: string;
|
|
70
|
+
type: BankTransactionMatchType;
|
|
71
|
+
} | undefined;
|
|
72
|
+
} | undefined) => Promise<{
|
|
73
|
+
data: BankTransactionMatch;
|
|
74
|
+
errors: unknown;
|
|
75
|
+
}>;
|
|
65
76
|
|
|
66
77
|
}
|
|
67
78
|
declare module '@layerfi/components/api/layer/categories' {
|
|
@@ -116,6 +127,16 @@ declare module '@layerfi/components/api/layer' {
|
|
|
116
127
|
data: import("@layerfi/components/types").BankTransaction;
|
|
117
128
|
errors: unknown;
|
|
118
129
|
}>;
|
|
130
|
+
matchBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
131
|
+
params?: Record<string, string | undefined> | undefined;
|
|
132
|
+
body?: {
|
|
133
|
+
match_id: string;
|
|
134
|
+
type: import("@layerfi/components/types/bank_transactions").BankTransactionMatchType;
|
|
135
|
+
} | undefined;
|
|
136
|
+
} | undefined) => Promise<{
|
|
137
|
+
data: import("@layerfi/components/types/bank_transactions").BankTransactionMatch;
|
|
138
|
+
errors: unknown;
|
|
139
|
+
}>;
|
|
119
140
|
createAccount: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
120
141
|
params?: Record<string, string | undefined> | undefined;
|
|
121
142
|
body?: import("@layerfi/components/types").NewAccount | undefined;
|
|
@@ -153,6 +174,27 @@ declare module '@layerfi/components/api/layer' {
|
|
|
153
174
|
declare module '@layerfi/components/api/util' {
|
|
154
175
|
export const formStringFromObject: (object: Record<string, string | number | boolean>) => string;
|
|
155
176
|
|
|
177
|
+
}
|
|
178
|
+
declare module '@layerfi/components/components/Badge/Badge' {
|
|
179
|
+
import React, { ReactNode } from 'react';
|
|
180
|
+
import { ButtonProps } from '@layerfi/components/components/Button/Button';
|
|
181
|
+
export enum BadgeSize {
|
|
182
|
+
SMALL = "small",
|
|
183
|
+
MEDIUM = "medium"
|
|
184
|
+
}
|
|
185
|
+
export interface BadgeProps {
|
|
186
|
+
children: ReactNode;
|
|
187
|
+
icon?: ReactNode;
|
|
188
|
+
onClick?: ButtonProps['onClick'];
|
|
189
|
+
tooltip?: ReactNode;
|
|
190
|
+
size?: BadgeSize;
|
|
191
|
+
}
|
|
192
|
+
export const Badge: ({ icon, onClick, children, tooltip, size, }: BadgeProps) => React.JSX.Element;
|
|
193
|
+
|
|
194
|
+
}
|
|
195
|
+
declare module '@layerfi/components/components/Badge/index' {
|
|
196
|
+
export { Badge } from '@layerfi/components/components/Badge/Badge';
|
|
197
|
+
|
|
156
198
|
}
|
|
157
199
|
declare module '@layerfi/components/components/BalanceSheet/BalanceSheet' {
|
|
158
200
|
import React from 'react';
|
|
@@ -194,6 +236,15 @@ declare module '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow'
|
|
|
194
236
|
declare module '@layerfi/components/components/BalanceSheetRow/index' {
|
|
195
237
|
export { BalanceSheetRow } from '@layerfi/components/components/BalanceSheetRow/BalanceSheetRow';
|
|
196
238
|
|
|
239
|
+
}
|
|
240
|
+
declare module '@layerfi/components/components/BankTransactionListItem/Assignment' {
|
|
241
|
+
import React from 'react';
|
|
242
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
243
|
+
export interface AssignmentProps {
|
|
244
|
+
bankTransaction: BankTransaction;
|
|
245
|
+
}
|
|
246
|
+
export const Assignment: ({ bankTransaction }: AssignmentProps) => React.JSX.Element;
|
|
247
|
+
|
|
197
248
|
}
|
|
198
249
|
declare module '@layerfi/components/components/BankTransactionListItem/BankTransactionListItem' {
|
|
199
250
|
import React from 'react';
|
|
@@ -201,11 +252,9 @@ declare module '@layerfi/components/components/BankTransactionListItem/BankTrans
|
|
|
201
252
|
type Props = {
|
|
202
253
|
dateFormat: string;
|
|
203
254
|
bankTransaction: BankTransaction;
|
|
204
|
-
isOpen: boolean;
|
|
205
|
-
toggleOpen: (id: string) => void;
|
|
206
255
|
editable: boolean;
|
|
207
256
|
};
|
|
208
|
-
export const BankTransactionListItem: ({ dateFormat, bankTransaction,
|
|
257
|
+
export const BankTransactionListItem: ({ dateFormat, bankTransaction, editable, }: Props) => React.JSX.Element | null;
|
|
209
258
|
export {};
|
|
210
259
|
|
|
211
260
|
}
|
|
@@ -215,17 +264,38 @@ declare module '@layerfi/components/components/BankTransactionListItem/index' {
|
|
|
215
264
|
}
|
|
216
265
|
declare module '@layerfi/components/components/BankTransactionRow/BankTransactionRow' {
|
|
217
266
|
import React from 'react';
|
|
218
|
-
import { BankTransaction } from '@layerfi/components/types';
|
|
267
|
+
import { BankTransaction, Category } from '@layerfi/components/types';
|
|
219
268
|
type Props = {
|
|
220
269
|
dateFormat: string;
|
|
221
270
|
bankTransaction: BankTransaction;
|
|
222
|
-
isOpen: boolean;
|
|
223
|
-
toggleOpen: (id: string) => void;
|
|
224
271
|
editable: boolean;
|
|
225
272
|
};
|
|
226
|
-
export const
|
|
273
|
+
export const extractDescriptionForSplit: (category: Category) => string;
|
|
274
|
+
export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
|
|
275
|
+
export const BankTransactionRow: ({ dateFormat, bankTransaction, editable, }: Props) => React.JSX.Element | null;
|
|
227
276
|
export {};
|
|
228
277
|
|
|
278
|
+
}
|
|
279
|
+
declare module '@layerfi/components/components/BankTransactionRow/MatchBadge' {
|
|
280
|
+
import React from 'react';
|
|
281
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
282
|
+
export interface MatchBadgeProps {
|
|
283
|
+
bankTransaction: BankTransaction;
|
|
284
|
+
classNamePrefix: string;
|
|
285
|
+
dateFormat: string;
|
|
286
|
+
text?: string;
|
|
287
|
+
}
|
|
288
|
+
export const MatchBadge: ({ bankTransaction, classNamePrefix, dateFormat, text, }: MatchBadgeProps) => React.JSX.Element | undefined;
|
|
289
|
+
|
|
290
|
+
}
|
|
291
|
+
declare module '@layerfi/components/components/BankTransactionRow/SplitTooltipDetails' {
|
|
292
|
+
import React from 'react';
|
|
293
|
+
import { Category } from '@layerfi/components/types';
|
|
294
|
+
export const SplitTooltipDetails: ({ classNamePrefix, category, }: {
|
|
295
|
+
classNamePrefix: string;
|
|
296
|
+
category: Category;
|
|
297
|
+
}) => React.JSX.Element | undefined;
|
|
298
|
+
|
|
229
299
|
}
|
|
230
300
|
declare module '@layerfi/components/components/BankTransactionRow/index' {
|
|
231
301
|
export { BankTransactionRow } from '@layerfi/components/components/BankTransactionRow/BankTransactionRow';
|
|
@@ -235,8 +305,9 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
|
|
|
235
305
|
import React from 'react';
|
|
236
306
|
export interface BankTransactionsProps {
|
|
237
307
|
asWidget?: boolean;
|
|
308
|
+
pageSize?: number;
|
|
238
309
|
}
|
|
239
|
-
export const BankTransactions: ({ asWidget, }: BankTransactionsProps) => React.JSX.Element;
|
|
310
|
+
export const BankTransactions: ({ asWidget, pageSize, }: BankTransactionsProps) => React.JSX.Element;
|
|
240
311
|
|
|
241
312
|
}
|
|
242
313
|
declare module '@layerfi/components/components/BankTransactions/index' {
|
|
@@ -254,8 +325,18 @@ declare module '@layerfi/components/components/Button/Button' {
|
|
|
254
325
|
leftIcon?: ReactNode;
|
|
255
326
|
rightIcon?: ReactNode;
|
|
256
327
|
iconOnly?: ReactNode;
|
|
328
|
+
iconAsPrimary?: boolean;
|
|
257
329
|
}
|
|
258
|
-
export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, ...props }: ButtonProps) => React.JSX.Element;
|
|
330
|
+
export const Button: ({ className, children, variant, leftIcon, rightIcon, iconOnly, iconAsPrimary, ...props }: ButtonProps) => React.JSX.Element;
|
|
331
|
+
|
|
332
|
+
}
|
|
333
|
+
declare module '@layerfi/components/components/Button/IconButton' {
|
|
334
|
+
import React, { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
335
|
+
export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
336
|
+
icon: ReactNode;
|
|
337
|
+
active?: boolean;
|
|
338
|
+
}
|
|
339
|
+
export const IconButton: ({ className, children, icon, active, ...props }: IconButtonProps) => React.JSX.Element;
|
|
259
340
|
|
|
260
341
|
}
|
|
261
342
|
declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
@@ -266,13 +347,26 @@ declare module '@layerfi/components/components/Button/SubmitButton' {
|
|
|
266
347
|
error?: boolean | string;
|
|
267
348
|
active?: boolean;
|
|
268
349
|
iconOnly?: boolean;
|
|
350
|
+
action?: SubmitAction;
|
|
351
|
+
}
|
|
352
|
+
export enum SubmitAction {
|
|
353
|
+
SAVE = "save",
|
|
354
|
+
UPDATE = "update"
|
|
269
355
|
}
|
|
270
|
-
export const SubmitButton: ({ active, className, processing, disabled, error, children, ...props }: SubmitButtonProps) => React.JSX.Element;
|
|
356
|
+
export const SubmitButton: ({ active, className, processing, disabled, error, children, action, ...props }: SubmitButtonProps) => React.JSX.Element;
|
|
357
|
+
|
|
358
|
+
}
|
|
359
|
+
declare module '@layerfi/components/components/Button/TextButton' {
|
|
360
|
+
import React, { ButtonHTMLAttributes } from 'react';
|
|
361
|
+
export type TextButtonProps = ButtonHTMLAttributes<HTMLButtonElement>;
|
|
362
|
+
export const TextButton: ({ className, children, ...props }: TextButtonProps) => React.JSX.Element;
|
|
271
363
|
|
|
272
364
|
}
|
|
273
365
|
declare module '@layerfi/components/components/Button/index' {
|
|
274
366
|
export { Button, ButtonVariant } from '@layerfi/components/components/Button/Button';
|
|
275
367
|
export { SubmitButton } from '@layerfi/components/components/Button/SubmitButton';
|
|
368
|
+
export { IconButton } from '@layerfi/components/components/Button/IconButton';
|
|
369
|
+
export { TextButton } from '@layerfi/components/components/Button/TextButton';
|
|
276
370
|
|
|
277
371
|
}
|
|
278
372
|
declare module '@layerfi/components/components/CategoryMenu/CategoryMenu' {
|
|
@@ -293,6 +387,50 @@ declare module '@layerfi/components/components/CategoryMenu/CategoryMenu' {
|
|
|
293
387
|
declare module '@layerfi/components/components/CategoryMenu/index' {
|
|
294
388
|
export { CategoryMenu } from '@layerfi/components/components/CategoryMenu/CategoryMenu';
|
|
295
389
|
|
|
390
|
+
}
|
|
391
|
+
declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
|
|
392
|
+
import React from 'react';
|
|
393
|
+
import { BankTransaction, Category } from '@layerfi/components/types';
|
|
394
|
+
import { SuggestedMatch } from '@layerfi/components/types/bank_transactions';
|
|
395
|
+
import { CategoryEntry } from '@layerfi/components/types/categories';
|
|
396
|
+
type Props = {
|
|
397
|
+
name?: string;
|
|
398
|
+
bankTransaction: BankTransaction;
|
|
399
|
+
value: CategoryOption | undefined;
|
|
400
|
+
onChange: (newValue: CategoryOption) => void;
|
|
401
|
+
disabled?: boolean;
|
|
402
|
+
className?: string;
|
|
403
|
+
};
|
|
404
|
+
export enum OptionActionType {
|
|
405
|
+
CATEGORY = "category",
|
|
406
|
+
MATCH = "match",
|
|
407
|
+
HIDDEN = "hidden"
|
|
408
|
+
}
|
|
409
|
+
export interface CategoryOptionPayload {
|
|
410
|
+
id: string;
|
|
411
|
+
option_type: OptionActionType;
|
|
412
|
+
display_name: string;
|
|
413
|
+
date?: string;
|
|
414
|
+
amount?: number;
|
|
415
|
+
type?: string;
|
|
416
|
+
stable_name?: string;
|
|
417
|
+
entries?: CategoryEntry[];
|
|
418
|
+
subCategories?: Category[];
|
|
419
|
+
}
|
|
420
|
+
export interface CategoryOption {
|
|
421
|
+
type: string;
|
|
422
|
+
disabled?: boolean;
|
|
423
|
+
payload: CategoryOptionPayload;
|
|
424
|
+
}
|
|
425
|
+
export const mapCategoryToOption: (category: Category) => CategoryOption;
|
|
426
|
+
export const mapSuggestedMatchToOption: (record: SuggestedMatch) => CategoryOption;
|
|
427
|
+
export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, }: Props) => React.JSX.Element;
|
|
428
|
+
export {};
|
|
429
|
+
|
|
430
|
+
}
|
|
431
|
+
declare module '@layerfi/components/components/CategorySelect/index' {
|
|
432
|
+
export { CategorySelect } from '@layerfi/components/components/CategorySelect/CategorySelect';
|
|
433
|
+
|
|
296
434
|
}
|
|
297
435
|
declare module '@layerfi/components/components/ChartOfAccounts/ChartOfAccounts' {
|
|
298
436
|
import React from 'react';
|
|
@@ -335,7 +473,7 @@ declare module '@layerfi/components/components/Container/Container' {
|
|
|
335
473
|
asWidget?: boolean;
|
|
336
474
|
children: ReactNode;
|
|
337
475
|
}
|
|
338
|
-
export const Container:
|
|
476
|
+
export const Container: React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
339
477
|
|
|
340
478
|
}
|
|
341
479
|
declare module '@layerfi/components/components/Container/Header' {
|
|
@@ -378,10 +516,10 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
|
|
|
378
516
|
import { BankTransaction } from '@layerfi/components/types';
|
|
379
517
|
type Props = {
|
|
380
518
|
bankTransaction: BankTransaction;
|
|
381
|
-
close?: () => void;
|
|
382
519
|
isOpen?: boolean;
|
|
383
520
|
asListItem?: boolean;
|
|
384
521
|
submitBtnText?: string;
|
|
522
|
+
close?: () => void;
|
|
385
523
|
};
|
|
386
524
|
export type SaveHandle = {
|
|
387
525
|
save: () => void;
|
|
@@ -418,7 +556,11 @@ declare module '@layerfi/components/components/Input/FileInput' {
|
|
|
418
556
|
}
|
|
419
557
|
declare module '@layerfi/components/components/Input/Input' {
|
|
420
558
|
import React, { HTMLProps } from 'react';
|
|
421
|
-
export
|
|
559
|
+
export interface InputProps extends HTMLProps<HTMLInputElement> {
|
|
560
|
+
isInvalid?: boolean;
|
|
561
|
+
errorMessage?: string;
|
|
562
|
+
}
|
|
563
|
+
export const Input: ({ className, isInvalid, errorMessage, ...props }: InputProps) => React.JSX.Element;
|
|
422
564
|
|
|
423
565
|
}
|
|
424
566
|
declare module '@layerfi/components/components/Input/InputGroup' {
|
|
@@ -450,30 +592,68 @@ declare module '@layerfi/components/components/Loader/index' {
|
|
|
450
592
|
export { Loader } from '@layerfi/components/components/Loader/Loader';
|
|
451
593
|
|
|
452
594
|
}
|
|
453
|
-
declare module '@layerfi/components/components/
|
|
454
|
-
import React
|
|
455
|
-
|
|
595
|
+
declare module '@layerfi/components/components/MatchForm/MatchForm' {
|
|
596
|
+
import React from 'react';
|
|
597
|
+
import { BankTransaction } from '@layerfi/components/types';
|
|
598
|
+
export interface MatchFormProps {
|
|
599
|
+
classNamePrefix: string;
|
|
600
|
+
bankTransaction: BankTransaction;
|
|
601
|
+
selectedMatchId?: string;
|
|
602
|
+
setSelectedMatchId: (val?: string) => void;
|
|
603
|
+
}
|
|
604
|
+
export const MatchForm: ({ classNamePrefix, bankTransaction, selectedMatchId, setSelectedMatchId, }: MatchFormProps) => React.JSX.Element;
|
|
605
|
+
|
|
606
|
+
}
|
|
607
|
+
declare module '@layerfi/components/components/MatchForm/index' {
|
|
608
|
+
export { MatchForm } from '@layerfi/components/components/MatchForm/MatchForm';
|
|
609
|
+
|
|
610
|
+
}
|
|
611
|
+
declare module '@layerfi/components/components/Pagination/Pagination' {
|
|
612
|
+
import React from 'react';
|
|
613
|
+
export interface PaginationProps {
|
|
614
|
+
currentPage: number;
|
|
615
|
+
pageSize: number;
|
|
616
|
+
onPageChange: (page: number) => void;
|
|
617
|
+
totalCount: number;
|
|
618
|
+
siblingCount?: number;
|
|
619
|
+
}
|
|
620
|
+
export const Pagination: ({ onPageChange, totalCount, siblingCount, currentPage, pageSize, }: PaginationProps) => React.JSX.Element | undefined;
|
|
456
621
|
|
|
457
622
|
}
|
|
458
|
-
declare module '@layerfi/components/components/
|
|
459
|
-
export {
|
|
623
|
+
declare module '@layerfi/components/components/Pagination/index' {
|
|
624
|
+
export { Pagination } from '@layerfi/components/components/Pagination/Pagination';
|
|
460
625
|
|
|
461
626
|
}
|
|
462
627
|
declare module '@layerfi/components/components/ProfitAndLoss/ProfitAndLoss' {
|
|
463
628
|
import React, { PropsWithChildren } from 'react';
|
|
629
|
+
import { ReportingBasis } from '@layerfi/components/types';
|
|
630
|
+
type Props = PropsWithChildren & {
|
|
631
|
+
tagFilter?: {
|
|
632
|
+
key: string;
|
|
633
|
+
values: string[];
|
|
634
|
+
};
|
|
635
|
+
reportingBasis?: ReportingBasis;
|
|
636
|
+
};
|
|
464
637
|
const ProfitAndLoss: {
|
|
465
|
-
({ children }:
|
|
638
|
+
({ children, tagFilter, reportingBasis }: Props): React.JSX.Element;
|
|
466
639
|
Chart: () => React.JSX.Element;
|
|
467
640
|
Context: React.Context<{
|
|
468
641
|
data: import("@layerfi/components/types").ProfitAndLoss | undefined;
|
|
469
642
|
isLoading: boolean;
|
|
643
|
+
isValidating: boolean;
|
|
470
644
|
error: unknown;
|
|
471
645
|
dateRange: import("@layerfi/components/types").DateRange;
|
|
472
646
|
changeDateRange: (dateRange: Partial<import("@layerfi/components/types").DateRange>) => void;
|
|
647
|
+
refetch: () => void;
|
|
473
648
|
}>;
|
|
474
649
|
DatePicker: () => React.JSX.Element;
|
|
475
|
-
Summaries: (
|
|
476
|
-
|
|
650
|
+
Summaries: ({ vertical, revenueLabel, }: {
|
|
651
|
+
revenueLabel?: string | undefined;
|
|
652
|
+
vertical?: boolean | undefined;
|
|
653
|
+
}) => React.JSX.Element;
|
|
654
|
+
Table: ({ lockExpanded }: {
|
|
655
|
+
lockExpanded?: boolean | undefined;
|
|
656
|
+
}) => React.JSX.Element;
|
|
477
657
|
};
|
|
478
658
|
export { ProfitAndLoss };
|
|
479
659
|
|
|
@@ -520,9 +700,9 @@ declare module '@layerfi/components/components/ProfitAndLossRow/ProfitAndLossRow
|
|
|
520
700
|
maxDepth?: number;
|
|
521
701
|
lineItem?: LineItem | null;
|
|
522
702
|
direction?: Direction;
|
|
523
|
-
|
|
703
|
+
lockExpanded?: boolean;
|
|
524
704
|
};
|
|
525
|
-
export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction,
|
|
705
|
+
export const ProfitAndLossRow: ({ variant, lineItem, depth, maxDepth, direction, lockExpanded, }: Props) => React.JSX.Element | null;
|
|
526
706
|
export {};
|
|
527
707
|
|
|
528
708
|
}
|
|
@@ -532,7 +712,12 @@ declare module '@layerfi/components/components/ProfitAndLossRow/index' {
|
|
|
532
712
|
}
|
|
533
713
|
declare module '@layerfi/components/components/ProfitAndLossSummaries/ProfitAndLossSummaries' {
|
|
534
714
|
import React from 'react';
|
|
535
|
-
|
|
715
|
+
type Props = {
|
|
716
|
+
revenueLabel?: string;
|
|
717
|
+
vertical?: boolean;
|
|
718
|
+
};
|
|
719
|
+
export const ProfitAndLossSummaries: ({ vertical, revenueLabel, }: Props) => React.JSX.Element;
|
|
720
|
+
export {};
|
|
536
721
|
|
|
537
722
|
}
|
|
538
723
|
declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
|
|
@@ -541,7 +726,11 @@ declare module '@layerfi/components/components/ProfitAndLossSummaries/index' {
|
|
|
541
726
|
}
|
|
542
727
|
declare module '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable' {
|
|
543
728
|
import React from 'react';
|
|
544
|
-
|
|
729
|
+
type Props = {
|
|
730
|
+
lockExpanded?: boolean;
|
|
731
|
+
};
|
|
732
|
+
export const ProfitAndLossTable: ({ lockExpanded }: Props) => React.JSX.Element;
|
|
733
|
+
export {};
|
|
545
734
|
|
|
546
735
|
}
|
|
547
736
|
declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_and_loss_report' {
|
|
@@ -553,6 +742,15 @@ declare module '@layerfi/components/components/ProfitAndLossTable/empty_profit_a
|
|
|
553
742
|
declare module '@layerfi/components/components/ProfitAndLossTable/index' {
|
|
554
743
|
export { ProfitAndLossTable } from '@layerfi/components/components/ProfitAndLossTable/ProfitAndLossTable';
|
|
555
744
|
|
|
745
|
+
}
|
|
746
|
+
declare module '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView' {
|
|
747
|
+
import React from 'react';
|
|
748
|
+
export const ProfitAndLossView: () => React.JSX.Element;
|
|
749
|
+
|
|
750
|
+
}
|
|
751
|
+
declare module '@layerfi/components/components/ProfitAndLossView/index' {
|
|
752
|
+
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/ProfitAndLossView';
|
|
753
|
+
|
|
556
754
|
}
|
|
557
755
|
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow' {
|
|
558
756
|
import React, { PropsWithChildren } from 'react';
|
|
@@ -564,6 +762,20 @@ declare module '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonB
|
|
|
564
762
|
declare module '@layerfi/components/components/SkeletonBalanceSheetRow/index' {
|
|
565
763
|
export { SkeletonBalanceSheetRow } from '@layerfi/components/components/SkeletonBalanceSheetRow/SkeletonBalanceSheetRow';
|
|
566
764
|
|
|
765
|
+
}
|
|
766
|
+
declare module '@layerfi/components/components/SkeletonLoader/SkeletonLoader' {
|
|
767
|
+
import React from 'react';
|
|
768
|
+
export interface SkeletonLoaderProps {
|
|
769
|
+
width?: string;
|
|
770
|
+
height?: string;
|
|
771
|
+
className?: string;
|
|
772
|
+
}
|
|
773
|
+
export const SkeletonLoader: ({ height, width, className, }: SkeletonLoaderProps) => React.JSX.Element;
|
|
774
|
+
|
|
775
|
+
}
|
|
776
|
+
declare module '@layerfi/components/components/SkeletonLoader/index' {
|
|
777
|
+
export { SkeletonLoader } from '@layerfi/components/components/SkeletonLoader/SkeletonLoader';
|
|
778
|
+
|
|
567
779
|
}
|
|
568
780
|
declare module '@layerfi/components/components/Textarea/Textarea' {
|
|
569
781
|
import React, { HTMLProps } from 'react';
|
|
@@ -788,12 +1000,69 @@ declare module '@layerfi/components/components/Typography/index' {
|
|
|
788
1000
|
export { Text, TextSize, TextWeight } from '@layerfi/components/components/Typography/Text';
|
|
789
1001
|
export { Heading, HeadingSize } from '@layerfi/components/components/Typography/Heading';
|
|
790
1002
|
|
|
1003
|
+
}
|
|
1004
|
+
declare module '@layerfi/components/config/general' {
|
|
1005
|
+
export const DATE_FORMAT = "LLL d, yyyy";
|
|
1006
|
+
|
|
1007
|
+
}
|
|
1008
|
+
declare module '@layerfi/components/config/theme' {
|
|
1009
|
+
export const SHADES: {
|
|
1010
|
+
50: {
|
|
1011
|
+
s: number;
|
|
1012
|
+
l: number;
|
|
1013
|
+
};
|
|
1014
|
+
100: {
|
|
1015
|
+
s: number;
|
|
1016
|
+
l: number;
|
|
1017
|
+
};
|
|
1018
|
+
200: {
|
|
1019
|
+
s: number;
|
|
1020
|
+
l: number;
|
|
1021
|
+
};
|
|
1022
|
+
300: {
|
|
1023
|
+
s: number;
|
|
1024
|
+
l: number;
|
|
1025
|
+
};
|
|
1026
|
+
500: {
|
|
1027
|
+
s: number;
|
|
1028
|
+
l: number;
|
|
1029
|
+
};
|
|
1030
|
+
600: {
|
|
1031
|
+
s: number;
|
|
1032
|
+
l: number;
|
|
1033
|
+
};
|
|
1034
|
+
700: {
|
|
1035
|
+
s: number;
|
|
1036
|
+
l: number;
|
|
1037
|
+
};
|
|
1038
|
+
800: {
|
|
1039
|
+
s: number;
|
|
1040
|
+
l: number;
|
|
1041
|
+
};
|
|
1042
|
+
1000: {
|
|
1043
|
+
s: number;
|
|
1044
|
+
l: number;
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
export const COLORS: {
|
|
1048
|
+
dark: {
|
|
1049
|
+
h: number;
|
|
1050
|
+
s: number;
|
|
1051
|
+
l: number;
|
|
1052
|
+
};
|
|
1053
|
+
light: {
|
|
1054
|
+
h: number;
|
|
1055
|
+
s: number;
|
|
1056
|
+
l: number;
|
|
1057
|
+
};
|
|
1058
|
+
};
|
|
1059
|
+
|
|
791
1060
|
}
|
|
792
1061
|
declare module '@layerfi/components/contexts/LayerContext/LayerContext' {
|
|
793
1062
|
/// <reference types="react" />
|
|
794
1063
|
import { LayerContextValues } from '@layerfi/components/types';
|
|
795
|
-
import { LayerThemeConfig } from '@layerfi/components/types/layer_context';
|
|
796
|
-
export const LayerContext: import("react").Context<LayerContextValues & {
|
|
1064
|
+
import { LayerContextHelpers, LayerThemeConfig } from '@layerfi/components/types/layer_context';
|
|
1065
|
+
export const LayerContext: import("react").Context<LayerContextValues & LayerContextHelpers & {
|
|
797
1066
|
setTheme: (theme: LayerThemeConfig) => void;
|
|
798
1067
|
}>;
|
|
799
1068
|
|
|
@@ -830,6 +1099,7 @@ declare module '@layerfi/components/hooks/useBankTransactions/useBankTransaction
|
|
|
830
1099
|
isValidating: boolean;
|
|
831
1100
|
error: unknown;
|
|
832
1101
|
categorize: (id: BankTransaction['id'], newCategory: CategoryUpdate) => Promise<void>;
|
|
1102
|
+
match: (id: BankTransaction['id'], matchId: BankTransaction['id']) => Promise<void>;
|
|
833
1103
|
updateOneLocal: (bankTransaction: BankTransaction) => void;
|
|
834
1104
|
refetch: () => void;
|
|
835
1105
|
};
|
|
@@ -870,24 +1140,50 @@ declare module '@layerfi/components/hooks/useLayerContext/index' {
|
|
|
870
1140
|
|
|
871
1141
|
}
|
|
872
1142
|
declare module '@layerfi/components/hooks/useLayerContext/useLayerContext' {
|
|
873
|
-
export const useLayerContext: () => import("@layerfi/components/types").LayerContextValues & {
|
|
1143
|
+
export const useLayerContext: () => import("@layerfi/components/types").LayerContextValues & import("../../types").LayerContextHelpers & {
|
|
874
1144
|
setTheme: (theme: import("@layerfi/components/types/layer_context").LayerThemeConfig) => void;
|
|
875
1145
|
};
|
|
876
1146
|
|
|
1147
|
+
}
|
|
1148
|
+
declare module '@layerfi/components/hooks/usePagination/index' {
|
|
1149
|
+
export { usePagination, DOTS } from '@layerfi/components/hooks/usePagination/usePagination';
|
|
1150
|
+
|
|
1151
|
+
}
|
|
1152
|
+
declare module '@layerfi/components/hooks/usePagination/usePagination' {
|
|
1153
|
+
export const DOTS = "...";
|
|
1154
|
+
export interface UsePaginationProps {
|
|
1155
|
+
totalCount: number;
|
|
1156
|
+
pageSize: number;
|
|
1157
|
+
siblingCount?: number;
|
|
1158
|
+
currentPage: number;
|
|
1159
|
+
}
|
|
1160
|
+
export type UsePaginationReturn = (string | number)[] | undefined;
|
|
1161
|
+
export const usePagination: ({ totalCount, pageSize, siblingCount, currentPage, }: UsePaginationProps) => UsePaginationReturn;
|
|
1162
|
+
|
|
877
1163
|
}
|
|
878
1164
|
declare module '@layerfi/components/hooks/useProfitAndLoss/index' {
|
|
879
1165
|
export { useProfitAndLoss } from '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss';
|
|
880
1166
|
|
|
881
1167
|
}
|
|
882
1168
|
declare module '@layerfi/components/hooks/useProfitAndLoss/useProfitAndLoss' {
|
|
883
|
-
import { ProfitAndLoss, DateRange } from '@layerfi/components/types';
|
|
884
|
-
type Props =
|
|
1169
|
+
import { ProfitAndLoss, DateRange, ReportingBasis } from '@layerfi/components/types';
|
|
1170
|
+
type Props = {
|
|
1171
|
+
startDate?: Date;
|
|
1172
|
+
endDate?: Date;
|
|
1173
|
+
tagFilter?: {
|
|
1174
|
+
key: string;
|
|
1175
|
+
values: string[];
|
|
1176
|
+
};
|
|
1177
|
+
reportingBasis?: ReportingBasis;
|
|
1178
|
+
};
|
|
885
1179
|
type UseProfitAndLoss = (props?: Props) => {
|
|
886
1180
|
data: ProfitAndLoss | undefined;
|
|
887
1181
|
isLoading: boolean;
|
|
1182
|
+
isValidating: boolean;
|
|
888
1183
|
error: unknown;
|
|
889
1184
|
dateRange: DateRange;
|
|
890
1185
|
changeDateRange: (dateRange: Partial<DateRange>) => void;
|
|
1186
|
+
refetch: () => void;
|
|
891
1187
|
};
|
|
892
1188
|
export const useProfitAndLoss: UseProfitAndLoss;
|
|
893
1189
|
export {};
|
|
@@ -937,22 +1233,15 @@ declare module '@layerfi/components/icons/ChevronDown' {
|
|
|
937
1233
|
}
|
|
938
1234
|
declare module '@layerfi/components/icons/ChevronLeft' {
|
|
939
1235
|
import * as React from 'react';
|
|
940
|
-
import {
|
|
941
|
-
|
|
942
|
-
strokeColor?: string;
|
|
943
|
-
size?: number;
|
|
944
|
-
};
|
|
945
|
-
const ChevronLeft: ({ strokeColor, size, ...props }: Props & SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
1236
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1237
|
+
const ChevronLeft: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
946
1238
|
export default ChevronLeft;
|
|
947
1239
|
|
|
948
1240
|
}
|
|
949
1241
|
declare module '@layerfi/components/icons/ChevronRight' {
|
|
950
1242
|
import * as React from 'react';
|
|
951
|
-
import {
|
|
952
|
-
|
|
953
|
-
size: SVGProps<SVGSVGElement>['width'];
|
|
954
|
-
};
|
|
955
|
-
const ChavronRight: ({ size, ...props }: Props) => React.JSX.Element;
|
|
1243
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1244
|
+
const ChavronRight: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
956
1245
|
export default ChavronRight;
|
|
957
1246
|
|
|
958
1247
|
}
|
|
@@ -962,13 +1251,6 @@ declare module '@layerfi/components/icons/DownloadCloud' {
|
|
|
962
1251
|
const DownloadCloud: (props: SVGProps<SVGSVGElement>) => React.JSX.Element;
|
|
963
1252
|
export default DownloadCloud;
|
|
964
1253
|
|
|
965
|
-
}
|
|
966
|
-
declare module '@layerfi/components/icons/FolderPlus' {
|
|
967
|
-
import * as React from 'react';
|
|
968
|
-
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
969
|
-
const FolderPlus: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
970
|
-
export default FolderPlus;
|
|
971
|
-
|
|
972
1254
|
}
|
|
973
1255
|
declare module '@layerfi/components/icons/Link' {
|
|
974
1256
|
import * as React from 'react';
|
|
@@ -983,6 +1265,13 @@ declare module '@layerfi/components/icons/Loader' {
|
|
|
983
1265
|
const Loader: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
984
1266
|
export default Loader;
|
|
985
1267
|
|
|
1268
|
+
}
|
|
1269
|
+
declare module '@layerfi/components/icons/MinimizeTwo' {
|
|
1270
|
+
import * as React from 'react';
|
|
1271
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1272
|
+
const MinimizeTwo: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1273
|
+
export default MinimizeTwo;
|
|
1274
|
+
|
|
986
1275
|
}
|
|
987
1276
|
declare module '@layerfi/components/icons/RefreshCcw' {
|
|
988
1277
|
import * as React from 'react';
|
|
@@ -990,6 +1279,13 @@ declare module '@layerfi/components/icons/RefreshCcw' {
|
|
|
990
1279
|
const RefreshCcw: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
991
1280
|
export default RefreshCcw;
|
|
992
1281
|
|
|
1282
|
+
}
|
|
1283
|
+
declare module '@layerfi/components/icons/Save' {
|
|
1284
|
+
import * as React from 'react';
|
|
1285
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1286
|
+
const Save: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1287
|
+
export default Save;
|
|
1288
|
+
|
|
993
1289
|
}
|
|
994
1290
|
declare module '@layerfi/components/icons/Scissors' {
|
|
995
1291
|
import * as React from 'react';
|
|
@@ -1004,6 +1300,13 @@ declare module '@layerfi/components/icons/UploadCloud' {
|
|
|
1004
1300
|
const UploadCloud: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1005
1301
|
export default UploadCloud;
|
|
1006
1302
|
|
|
1303
|
+
}
|
|
1304
|
+
declare module '@layerfi/components/icons/X' {
|
|
1305
|
+
import * as React from 'react';
|
|
1306
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
1307
|
+
const X: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
1308
|
+
export default X;
|
|
1309
|
+
|
|
1007
1310
|
}
|
|
1008
1311
|
declare module '@layerfi/components/icons/types' {
|
|
1009
1312
|
import { SVGProps } from 'react';
|
|
@@ -1017,6 +1320,7 @@ declare module '@layerfi/components/index' {
|
|
|
1017
1320
|
export { BankTransactions } from '@layerfi/components/components/BankTransactions/index';
|
|
1018
1321
|
export { Hello } from '@layerfi/components/components/Hello/index';
|
|
1019
1322
|
export { ProfitAndLoss } from '@layerfi/components/components/ProfitAndLoss/index';
|
|
1323
|
+
export { ProfitAndLossView } from '@layerfi/components/components/ProfitAndLossView/index';
|
|
1020
1324
|
export { LayerProvider } from '@layerfi/components/providers/LayerProvider/index';
|
|
1021
1325
|
export { ChartOfAccounts } from '@layerfi/components/components/ChartOfAccounts/index';
|
|
1022
1326
|
|
|
@@ -1113,6 +1417,9 @@ declare module '@layerfi/components/types/bank_transactions' {
|
|
|
1113
1417
|
CREDIT = "CREDIT",
|
|
1114
1418
|
DEBIT = "DEBIT"
|
|
1115
1419
|
}
|
|
1420
|
+
export enum BankTransactionMatchType {
|
|
1421
|
+
CONFIRM_MATCH = "Confirm_Match"
|
|
1422
|
+
}
|
|
1116
1423
|
export interface BankTransaction extends Record<string, unknown> {
|
|
1117
1424
|
type: 'Bank_Transaction';
|
|
1118
1425
|
account_name?: string;
|
|
@@ -1134,6 +1441,31 @@ declare module '@layerfi/components/types/bank_transactions' {
|
|
|
1134
1441
|
categorization_method: string;
|
|
1135
1442
|
error?: string;
|
|
1136
1443
|
processing?: boolean;
|
|
1444
|
+
suggested_matches?: SuggestedMatch[];
|
|
1445
|
+
match?: BankTransactionMatch;
|
|
1446
|
+
}
|
|
1447
|
+
export interface SuggestedMatch {
|
|
1448
|
+
id: string;
|
|
1449
|
+
matchType: string;
|
|
1450
|
+
details: {
|
|
1451
|
+
amount: number;
|
|
1452
|
+
date: string;
|
|
1453
|
+
description: string;
|
|
1454
|
+
id: string;
|
|
1455
|
+
type: string;
|
|
1456
|
+
};
|
|
1457
|
+
}
|
|
1458
|
+
export interface BankTransactionMatch {
|
|
1459
|
+
bank_transaction: BankTransaction;
|
|
1460
|
+
id: string;
|
|
1461
|
+
match_type?: string;
|
|
1462
|
+
details: {
|
|
1463
|
+
amount: number;
|
|
1464
|
+
date: string;
|
|
1465
|
+
description: string;
|
|
1466
|
+
id: string;
|
|
1467
|
+
type: string;
|
|
1468
|
+
};
|
|
1137
1469
|
}
|
|
1138
1470
|
|
|
1139
1471
|
}
|
|
@@ -1144,7 +1476,12 @@ declare module '@layerfi/components/types/categories' {
|
|
|
1144
1476
|
LAYER_REVIEW = "LAYER_REVIEW",
|
|
1145
1477
|
CATEGORIZED = "CATEGORIZED",
|
|
1146
1478
|
SPLIT = "SPLIT",
|
|
1147
|
-
JOURNALING = "JOURNALING"
|
|
1479
|
+
JOURNALING = "JOURNALING",
|
|
1480
|
+
MATCHED = "MATCHED"
|
|
1481
|
+
}
|
|
1482
|
+
export interface CategoryEntry {
|
|
1483
|
+
amount?: number;
|
|
1484
|
+
category: Category;
|
|
1148
1485
|
}
|
|
1149
1486
|
export interface Category {
|
|
1150
1487
|
id: string;
|
|
@@ -1153,6 +1490,7 @@ declare module '@layerfi/components/types/categories' {
|
|
|
1153
1490
|
category: string;
|
|
1154
1491
|
stable_name?: string;
|
|
1155
1492
|
subCategories?: Category[];
|
|
1493
|
+
entries?: CategoryEntry[];
|
|
1156
1494
|
}
|
|
1157
1495
|
export enum CategorizationType {
|
|
1158
1496
|
AUTO = "AUTO",
|
|
@@ -1184,6 +1522,7 @@ declare module '@layerfi/components/types/categories' {
|
|
|
1184
1522
|
}[];
|
|
1185
1523
|
};
|
|
1186
1524
|
export type CategoryUpdate = SingleCategoryUpdate | SplitCategoryUpdate;
|
|
1525
|
+
export function hasSuggestions(categorization: Categorization): categorization is SuggestedCategorization;
|
|
1187
1526
|
|
|
1188
1527
|
}
|
|
1189
1528
|
declare module '@layerfi/components/types/chart_of_accounts' {
|
|
@@ -1238,21 +1577,41 @@ declare module '@layerfi/components/types/layer_context' {
|
|
|
1238
1577
|
categories: Category[];
|
|
1239
1578
|
apiUrl: string;
|
|
1240
1579
|
theme?: LayerThemeConfig;
|
|
1580
|
+
colors: ColorsPalette;
|
|
1581
|
+
};
|
|
1582
|
+
export type LayerContextHelpers = {
|
|
1583
|
+
getColor: (shade: number) => ColorsPaletteOption | undefined;
|
|
1241
1584
|
};
|
|
1242
1585
|
export interface ColorHSLConfig {
|
|
1243
1586
|
h: string;
|
|
1244
1587
|
s: string;
|
|
1245
1588
|
l: string;
|
|
1246
1589
|
}
|
|
1590
|
+
export interface ColorHSLNumberConfig {
|
|
1591
|
+
h: number;
|
|
1592
|
+
s: number;
|
|
1593
|
+
l: number;
|
|
1594
|
+
}
|
|
1247
1595
|
export interface ColorRGBConfig {
|
|
1248
1596
|
r: string;
|
|
1249
1597
|
g: string;
|
|
1250
1598
|
b: string;
|
|
1251
1599
|
}
|
|
1600
|
+
export interface ColorRGBNumberConfig {
|
|
1601
|
+
r: number;
|
|
1602
|
+
g: number;
|
|
1603
|
+
b: number;
|
|
1604
|
+
}
|
|
1252
1605
|
export interface ColorHexConfig {
|
|
1253
1606
|
hex: string;
|
|
1254
1607
|
}
|
|
1255
1608
|
export type ColorConfig = ColorHSLConfig | ColorRGBConfig | ColorHexConfig;
|
|
1609
|
+
export interface ColorsPaletteOption {
|
|
1610
|
+
hsl: ColorHSLNumberConfig;
|
|
1611
|
+
rgb: ColorRGBNumberConfig;
|
|
1612
|
+
hex: string;
|
|
1613
|
+
}
|
|
1614
|
+
export type ColorsPalette = Record<number, ColorsPaletteOption>;
|
|
1256
1615
|
export interface LayerThemeConfig {
|
|
1257
1616
|
colors?: {
|
|
1258
1617
|
dark?: ColorConfig;
|
|
@@ -1313,7 +1672,7 @@ declare module '@layerfi/components/types/profit_and_loss' {
|
|
|
1313
1672
|
}
|
|
1314
1673
|
declare module '@layerfi/components/types' {
|
|
1315
1674
|
export { OAuthResponse } from '@layerfi/components/types/authentication';
|
|
1316
|
-
export { LayerContextValues, LayerContextActionName, LayerContextAction, } from '@layerfi/components/types/layer_context';
|
|
1675
|
+
export { LayerContextValues, LayerContextActionName, LayerContextAction, LayerContextHelpers, } from '@layerfi/components/types/layer_context';
|
|
1317
1676
|
export { Metadata } from '@layerfi/components/types/api';
|
|
1318
1677
|
export { ProfitAndLoss } from '@layerfi/components/types/profit_and_loss';
|
|
1319
1678
|
export { LineItem } from '@layerfi/components/types/line_item';
|
|
@@ -1325,16 +1684,32 @@ declare module '@layerfi/components/types' {
|
|
|
1325
1684
|
startDate: T;
|
|
1326
1685
|
endDate: T;
|
|
1327
1686
|
};
|
|
1687
|
+
export type ReportingBasis = 'CASH' | 'ACCRUAL';
|
|
1328
1688
|
|
|
1329
1689
|
}
|
|
1330
1690
|
declare module '@layerfi/components/utils/colors' {
|
|
1331
|
-
import { LayerThemeConfig } from '@layerfi/components/types/layer_context';
|
|
1691
|
+
import { LayerThemeConfig, ColorsPalette } from '@layerfi/components/types/layer_context';
|
|
1332
1692
|
/**
|
|
1333
1693
|
* Convert `theme` config set in Provider into component styles.
|
|
1334
1694
|
*
|
|
1335
1695
|
* @param {LayerThemeConfig} theme - the theme set with provider
|
|
1336
1696
|
*/
|
|
1337
1697
|
export const parseStylesFromThemeConfig: (theme?: LayerThemeConfig) => {};
|
|
1698
|
+
/**
|
|
1699
|
+
* Build same color palette in RGB, HSL and HEX as CSS variables.
|
|
1700
|
+
*/
|
|
1701
|
+
export const buildColorsPalette: (theme?: LayerThemeConfig) => ColorsPalette;
|
|
1702
|
+
|
|
1703
|
+
}
|
|
1704
|
+
declare module '@layerfi/components/utils/format' {
|
|
1705
|
+
/**
|
|
1706
|
+
* Capitalize first letter of the given text.
|
|
1707
|
+
*/
|
|
1708
|
+
export const capitalizeFirstLetter: (text: string) => string;
|
|
1709
|
+
|
|
1710
|
+
}
|
|
1711
|
+
declare module '@layerfi/components/utils/helpers' {
|
|
1712
|
+
export const range: (start: number, end: number) => number[];
|
|
1338
1713
|
|
|
1339
1714
|
}
|
|
1340
1715
|
declare module '@layerfi/components' {
|