@layerfi/components 0.1.1 → 0.1.3
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 +359 -155
- package/dist/esm/index.js.map +4 -4
- package/dist/index.css +106 -0
- package/dist/index.css.map +7 -0
- package/dist/index.d.ts +47 -15
- package/dist/index.esm.css +106 -0
- package/dist/index.esm.css.map +7 -0
- package/dist/index.esm.js +252 -0
- package/dist/index.esm.js.map +7 -0
- package/dist/index.js +374 -170
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +64 -1
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
- package/.vim_backups/%Users%danieloneel%repos%components%package.json +0 -0
- package/.vim_backups/%Users%danieloneel%repos%components%src%providers%LayerProvider%LayerProvider.tsx +0 -0
- package/index.d.ts +0 -1088
package/dist/index.css
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* src/components/Hello/Hello.css */
|
|
2
|
+
.hello {
|
|
3
|
+
color: red;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* src/components/Transactions/Transactions.css */
|
|
7
|
+
.transactions {
|
|
8
|
+
--transaction-buttons-border-color: #D0D5DD;
|
|
9
|
+
--transaction-buttons-selected-background-color: #E0E9FF;
|
|
10
|
+
--transaction-table-background-color: white;
|
|
11
|
+
--transaction-table-border-color: #EAECF0;
|
|
12
|
+
--transaction-table-text-color: #101828;
|
|
13
|
+
}
|
|
14
|
+
.transactions {
|
|
15
|
+
margin: 3rem;
|
|
16
|
+
border-radius: 0.6rem;
|
|
17
|
+
border: 1px solid var(--transaction-table-border-color);
|
|
18
|
+
background-color: var(--transaction-table-background-color);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
.transactions header {
|
|
22
|
+
display: flex;
|
|
23
|
+
padding: 1rem;
|
|
24
|
+
}
|
|
25
|
+
.transactions header h1 {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
flex: 1;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
font-size: 1.5rem;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 2rem;
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
.transactions header div {
|
|
37
|
+
display: flex;
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
align-items: center;
|
|
40
|
+
flex: 1;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
.transactions .transaction-table {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: auto repeat(4, 1fr) repeat(3, auto);
|
|
46
|
+
gap: 1px 0px;
|
|
47
|
+
background-color: var(--transaction-table-border-color);
|
|
48
|
+
border-top: 1px solid var(--transaction-table-border-color);
|
|
49
|
+
border-radius: 0.6rem;
|
|
50
|
+
}
|
|
51
|
+
.transactions .transaction-table div {
|
|
52
|
+
padding: 1rem;
|
|
53
|
+
background-color: white;
|
|
54
|
+
overflow: clip;
|
|
55
|
+
color: var(--transaction-table-text-color);
|
|
56
|
+
font-family: sans-serif;
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
font-style: normal;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: row;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
.transactions .transaction-table div select {
|
|
66
|
+
border: 2px solid var(--transaction-table-border-color);
|
|
67
|
+
border-radius: 0.6rem;
|
|
68
|
+
background-color: var(--transaction-table-background-color);
|
|
69
|
+
padding: 0.6rem 0.8rem;
|
|
70
|
+
}
|
|
71
|
+
.transactions .transaction-table div.header {
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
}
|
|
74
|
+
.transactions .transaction-table div.expand-area {
|
|
75
|
+
grid-column: 1 / -1;
|
|
76
|
+
margin-top: -1px;
|
|
77
|
+
}
|
|
78
|
+
.transactions .transaction-table div.expand-content {
|
|
79
|
+
padding: 1rem;
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
.transactions .radio-group {
|
|
83
|
+
}
|
|
84
|
+
.transactions .radio-group input {
|
|
85
|
+
position: absolute;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
.transactions .radio-group div {
|
|
89
|
+
padding: 0.6rem 1rem;
|
|
90
|
+
border: 1px solid var(--transaction-buttons-border-color);
|
|
91
|
+
border-right: 0;
|
|
92
|
+
border-radius: 0;
|
|
93
|
+
}
|
|
94
|
+
.transactions .radio-group label:first-of-type div {
|
|
95
|
+
border-start-start-radius: 0.6rem;
|
|
96
|
+
border-end-start-radius: 0.6rem;
|
|
97
|
+
}
|
|
98
|
+
.transactions .radio-group label:last-of-type div {
|
|
99
|
+
border-right: 1px solid var(--transaction-buttons-border-color);
|
|
100
|
+
border-start-end-radius: 0.6rem;
|
|
101
|
+
border-end-end-radius: 0.6rem;
|
|
102
|
+
}
|
|
103
|
+
.transactions .radio-group input:checked + div {
|
|
104
|
+
background: var(--transaction-buttons-selected-background-color);
|
|
105
|
+
}
|
|
106
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/Hello/Hello.css", "../src/components/Transactions/Transactions.css"],
|
|
4
|
+
"sourcesContent": [".hello {\n color: red;\n}\n", ".transactions {\n --transaction-buttons-border-color: #D0D5DD;\n --transaction-buttons-selected-background-color: #E0E9FF;\n --transaction-table-background-color: white;\n --transaction-table-border-color: #EAECF0;\n --transaction-table-text-color: #101828;\n}\n\n.transactions {\n margin: 3rem;\n border-radius: 0.6rem;\n border: 1px solid var(--transaction-table-border-color);\n background-color: var(--transaction-table-background-color);\n overflow: hidden;\n}\n\n.transactions header {\n display: flex;\n padding: 1rem;\n}\n\n.transactions header h1 {\n display: flex;\n align-items: center;\n flex: 1;\n justify-content: flex-start;\n font-size: 1.5rem;\n font-style: normal;\n font-weight: 600;\n line-height: 2rem;\n margin: 0;\n}\n\n.transactions header div {\n display: flex;\n font-size: 1rem;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n}\n\n.transactions .transaction-table {\n display: grid;\n grid-template-columns: auto repeat(4, 1fr) repeat(3, auto);\n gap: 1px 0px;\n background-color: var(--transaction-table-border-color);\n border-top: 1px solid var(--transaction-table-border-color);\n border-radius: 0.6rem;\n}\n\n.transactions .transaction-table div {\n padding: 1rem;\n background-color: white;\n overflow: clip;\n color: var(--transaction-table-text-color);\n font-family: sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.transactions .transaction-table div select {\n border: 2px solid var(--transaction-table-border-color);\n border-radius: 0.6rem;\n background-color: var(--transaction-table-background-color);\n padding: 0.6rem 0.8rem;\n}\n\n.transactions .transaction-table div.header {\n font-weight: bold;\n}\n\n.transactions .transaction-table div.expand-area {\n grid-column: 1 / -1;\n margin-top: -1px;\n}\n\n.transactions .transaction-table div.expand-content {\n padding: 1rem;\n text-align: center;\n}\n\n.transactions .radio-group {\n}\n\n.transactions .radio-group input {\n position: absolute;\n opacity: 0;\n}\n\n.transactions .radio-group div {\n padding: 0.6rem 1rem;\n border: 1px solid var(--transaction-buttons-border-color);\n border-right: 0;\n border-radius: 0;\n}\n\n.transactions .radio-group label:first-of-type div {\n border-start-start-radius: 0.6rem;\n border-end-start-radius: 0.6rem;\n}\n\n.transactions .radio-group label:last-of-type div {\n border-right: 1px solid var(--transaction-buttons-border-color);\n border-start-end-radius: 0.6rem;\n border-end-end-radius: 0.6rem;\n}\n\n.transactions .radio-group input:checked + div {\n background: var(--transaction-buttons-selected-background-color);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,CAAC;AACC,SAAO;AACT;;;ACFA,CAAC;AACC,sCAAoC;AACpC,mDAAiD;AACjD,wCAAsC;AACtC,oCAAkC;AAClC,kCAAgC;AAClC;AAEA,CARC;AASC,UAAQ;AACR,iBAAe;AACf,UAAQ,IAAI,MAAM,IAAI;AACtB,oBAAkB,IAAI;AACtB,YAAU;AACZ;AAEA,CAhBC,aAgBa;AACZ,WAAS;AACT,WAAS;AACX;AAEA,CArBC,aAqBa,OAAO;AACnB,WAAS;AACT,eAAa;AACb,QAAM;AACN,mBAAiB;AACjB,aAAW;AACX,cAAY;AACZ,eAAa;AACb,eAAa;AACb,UAAQ;AACV;AAEA,CAjCC,aAiCa,OAAO;AACnB,WAAS;AACT,aAAW;AACX,eAAa;AACb,QAAM;AACN,mBAAiB;AACnB;AAEA,CAzCC,aAyCa,CAAC;AACb,WAAS;AACT,yBAAuB,KAAK,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE;AACrD,OAAK,IAAI;AACT,oBAAkB,IAAI;AACtB,cAAY,IAAI,MAAM,IAAI;AAC1B,iBAAe;AACjB;AAEA,CAlDC,aAkDa,CATC,kBASkB;AAC/B,WAAS;AACT,oBAAkB;AAClB,YAAU;AACV,SAAO,IAAI;AACX,eAAa;AACb,aAAW;AACX,cAAY;AACZ,eAAa;AACb,eAAa;AACb,WAAS;AACT,kBAAgB;AAChB,eAAa;AACf;AAEA,CAjEC,aAiEa,CAxBC,kBAwBkB,IAAI;AACnC,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe;AACf,oBAAkB,IAAI;AACtB,WAAS,OAAO;AAClB;AAEA,CAxEC,aAwEa,CA/BC,kBA+BkB,GAAG,CAAC;AACnC,eAAa;AACf;AAEA,CA5EC,aA4Ea,CAnCC,kBAmCkB,GAAG,CAAC;AACnC,eAAa,EAAE,EAAE;AACjB,cAAY;AACd;AAEA,CAjFC,aAiFa,CAxCC,kBAwCkB,GAAG,CAAC;AACnC,WAAS;AACT,cAAY;AACd;AAEA,CAtFC,aAsFa,CAAC;AACf;AAEA,CAzFC,aAyFa,CAHC,YAGY;AACzB,YAAU;AACV,WAAS;AACX;AAEA,CA9FC,aA8Fa,CARC,YAQY;AACzB,WAAS,OAAO;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,gBAAc;AACd,iBAAe;AACjB;AAEA,CArGC,aAqGa,CAfC,YAeY,KAAK,eAAe;AAC7C,6BAA2B;AAC3B,2BAAyB;AAC3B;AAEA,CA1GC,aA0Ga,CApBC,YAoBY,KAAK,cAAc;AAC5C,gBAAc,IAAI,MAAM,IAAI;AAC5B,2BAAyB;AACzB,yBAAuB;AACzB;AAEA,CAhHC,aAgHa,CA1BC,YA0BY,KAAK,SAAS,EAAE;AACzC,cAAY,IAAI;AAClB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,9 @@ declare module '@layerfi/components/api/layer/authenticate' {
|
|
|
4
4
|
appId: string;
|
|
5
5
|
appSecret: string;
|
|
6
6
|
authenticationUrl?: string;
|
|
7
|
-
clientId: string;
|
|
8
7
|
scope: string;
|
|
9
8
|
};
|
|
10
|
-
export const authenticate: ({ appId, appSecret, authenticationUrl,
|
|
9
|
+
export const authenticate: ({ appId, appSecret, authenticationUrl, scope, }: AuthenticationArguments) => () => Promise<OAuthResponse>;
|
|
11
10
|
export {};
|
|
12
11
|
|
|
13
12
|
}
|
|
@@ -104,11 +103,10 @@ declare module '@layerfi/components/api/layer/profit_and_loss' {
|
|
|
104
103
|
}
|
|
105
104
|
declare module '@layerfi/components/api/layer' {
|
|
106
105
|
export const Layer: {
|
|
107
|
-
authenticate: ({ appId, appSecret, authenticationUrl,
|
|
106
|
+
authenticate: ({ appId, appSecret, authenticationUrl, scope, }: {
|
|
108
107
|
appId: string;
|
|
109
108
|
appSecret: string;
|
|
110
109
|
authenticationUrl?: string | undefined;
|
|
111
|
-
clientId: string;
|
|
112
110
|
scope: string;
|
|
113
111
|
}) => () => Promise<import("@layerfi/components/types").OAuthResponse>;
|
|
114
112
|
categorizeBankTransaction: (baseUrl: string, accessToken: string | undefined, options?: {
|
|
@@ -235,7 +233,10 @@ declare module '@layerfi/components/components/BankTransactionRow/index' {
|
|
|
235
233
|
}
|
|
236
234
|
declare module '@layerfi/components/components/BankTransactions/BankTransactions' {
|
|
237
235
|
import React from 'react';
|
|
238
|
-
export
|
|
236
|
+
export interface BankTransactionsProps {
|
|
237
|
+
asWidget?: boolean;
|
|
238
|
+
}
|
|
239
|
+
export const BankTransactions: ({ asWidget, }: BankTransactionsProps) => React.JSX.Element;
|
|
239
240
|
|
|
240
241
|
}
|
|
241
242
|
declare module '@layerfi/components/components/BankTransactions/index' {
|
|
@@ -331,9 +332,10 @@ declare module '@layerfi/components/components/Container/Container' {
|
|
|
331
332
|
export interface ContainerProps {
|
|
332
333
|
name: string;
|
|
333
334
|
className?: string;
|
|
335
|
+
asWidget?: boolean;
|
|
334
336
|
children: ReactNode;
|
|
335
337
|
}
|
|
336
|
-
export const Container: ({ name, className, children }: ContainerProps) => React.JSX.Element;
|
|
338
|
+
export const Container: ({ name, className, children, asWidget, }: ContainerProps) => React.JSX.Element;
|
|
337
339
|
|
|
338
340
|
}
|
|
339
341
|
declare module '@layerfi/components/components/Container/Header' {
|
|
@@ -350,6 +352,26 @@ declare module '@layerfi/components/components/Container/index' {
|
|
|
350
352
|
export { Container } from '@layerfi/components/components/Container/Container';
|
|
351
353
|
export { Header } from '@layerfi/components/components/Container/Header';
|
|
352
354
|
|
|
355
|
+
}
|
|
356
|
+
declare module '@layerfi/components/components/DataState/DataState' {
|
|
357
|
+
import React from 'react';
|
|
358
|
+
export enum DataStateStatus {
|
|
359
|
+
allDone = "allDone",
|
|
360
|
+
failed = "failed"
|
|
361
|
+
}
|
|
362
|
+
export interface DataStateProps {
|
|
363
|
+
status: DataStateStatus;
|
|
364
|
+
title?: string;
|
|
365
|
+
description?: string;
|
|
366
|
+
onRefresh?: () => void;
|
|
367
|
+
isLoading?: boolean;
|
|
368
|
+
}
|
|
369
|
+
export const DataState: ({ status, title, description, onRefresh, isLoading, }: DataStateProps) => React.JSX.Element;
|
|
370
|
+
|
|
371
|
+
}
|
|
372
|
+
declare module '@layerfi/components/components/DataState/index' {
|
|
373
|
+
export { DataState, DataStateStatus } from '@layerfi/components/components/DataState/DataState';
|
|
374
|
+
|
|
353
375
|
}
|
|
354
376
|
declare module '@layerfi/components/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow' {
|
|
355
377
|
import React from 'react';
|
|
@@ -359,7 +381,7 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
|
|
|
359
381
|
close?: () => void;
|
|
360
382
|
isOpen?: boolean;
|
|
361
383
|
asListItem?: boolean;
|
|
362
|
-
|
|
384
|
+
submitBtnText?: string;
|
|
363
385
|
};
|
|
364
386
|
export type SaveHandle = {
|
|
365
387
|
save: () => void;
|
|
@@ -729,6 +751,7 @@ declare module '@layerfi/components/components/Typography/Heading' {
|
|
|
729
751
|
declare module '@layerfi/components/components/Typography/Text' {
|
|
730
752
|
import React, { ReactNode } from 'react';
|
|
731
753
|
export enum TextSize {
|
|
754
|
+
lg = "lg",
|
|
732
755
|
md = "md",
|
|
733
756
|
sm = "sm"
|
|
734
757
|
}
|
|
@@ -801,12 +824,14 @@ declare module '@layerfi/components/hooks/useBankTransactions/index' {
|
|
|
801
824
|
declare module '@layerfi/components/hooks/useBankTransactions/useBankTransactions' {
|
|
802
825
|
import { BankTransaction, CategoryUpdate, Metadata } from '@layerfi/components/types';
|
|
803
826
|
type UseBankTransactions = () => {
|
|
804
|
-
data
|
|
827
|
+
data?: BankTransaction[];
|
|
805
828
|
metadata: Metadata;
|
|
806
829
|
isLoading: boolean;
|
|
830
|
+
isValidating: boolean;
|
|
807
831
|
error: unknown;
|
|
808
832
|
categorize: (id: BankTransaction['id'], newCategory: CategoryUpdate) => Promise<void>;
|
|
809
833
|
updateOneLocal: (bankTransaction: BankTransaction) => void;
|
|
834
|
+
refetch: () => void;
|
|
810
835
|
};
|
|
811
836
|
export const useBankTransactions: UseBankTransactions;
|
|
812
837
|
export {};
|
|
@@ -874,6 +899,13 @@ declare module '@layerfi/components/icons/AlertCircle' {
|
|
|
874
899
|
const AlertCircle: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
875
900
|
export default AlertCircle;
|
|
876
901
|
|
|
902
|
+
}
|
|
903
|
+
declare module '@layerfi/components/icons/AlertOctagon' {
|
|
904
|
+
import * as React from 'react';
|
|
905
|
+
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
906
|
+
const AlertOctagon: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
907
|
+
export default AlertOctagon;
|
|
908
|
+
|
|
877
909
|
}
|
|
878
910
|
declare module '@layerfi/components/icons/Calendar' {
|
|
879
911
|
import * as React from 'react';
|
|
@@ -959,11 +991,11 @@ declare module '@layerfi/components/icons/RefreshCcw' {
|
|
|
959
991
|
export default RefreshCcw;
|
|
960
992
|
|
|
961
993
|
}
|
|
962
|
-
declare module '@layerfi/components/icons/
|
|
994
|
+
declare module '@layerfi/components/icons/Scissors' {
|
|
963
995
|
import * as React from 'react';
|
|
964
996
|
import { IconSvgProps } from '@layerfi/components/icons/types';
|
|
965
|
-
const
|
|
966
|
-
export default
|
|
997
|
+
const Scissors: ({ size, ...props }: IconSvgProps) => React.JSX.Element;
|
|
998
|
+
export default Scissors;
|
|
967
999
|
|
|
968
1000
|
}
|
|
969
1001
|
declare module '@layerfi/components/icons/UploadCloud' {
|
|
@@ -1025,13 +1057,13 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
|
|
|
1025
1057
|
export const LayerEnvironment: Record<string, LayerEnvironmentConfig>;
|
|
1026
1058
|
export type Props = {
|
|
1027
1059
|
businessId: string;
|
|
1028
|
-
appId
|
|
1029
|
-
appSecret
|
|
1030
|
-
|
|
1060
|
+
appId?: string;
|
|
1061
|
+
appSecret?: string;
|
|
1062
|
+
businessAccessToken?: string;
|
|
1031
1063
|
environment?: keyof typeof LayerEnvironment;
|
|
1032
1064
|
theme?: LayerThemeConfig;
|
|
1033
1065
|
};
|
|
1034
|
-
export const LayerProvider: ({ appId, appSecret, businessId, children,
|
|
1066
|
+
export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, }: PropsWithChildren<Props>) => React.JSX.Element;
|
|
1035
1067
|
export {};
|
|
1036
1068
|
|
|
1037
1069
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* src/components/Hello/Hello.css */
|
|
2
|
+
.hello {
|
|
3
|
+
color: red;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/* src/components/Transactions/Transactions.css */
|
|
7
|
+
.transactions {
|
|
8
|
+
--transaction-buttons-border-color: #D0D5DD;
|
|
9
|
+
--transaction-buttons-selected-background-color: #E0E9FF;
|
|
10
|
+
--transaction-table-background-color: white;
|
|
11
|
+
--transaction-table-border-color: #EAECF0;
|
|
12
|
+
--transaction-table-text-color: #101828;
|
|
13
|
+
}
|
|
14
|
+
.transactions {
|
|
15
|
+
margin: 3rem;
|
|
16
|
+
border-radius: 0.6rem;
|
|
17
|
+
border: 1px solid var(--transaction-table-border-color);
|
|
18
|
+
background-color: var(--transaction-table-background-color);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
21
|
+
.transactions header {
|
|
22
|
+
display: flex;
|
|
23
|
+
padding: 1rem;
|
|
24
|
+
}
|
|
25
|
+
.transactions header h1 {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
flex: 1;
|
|
29
|
+
justify-content: flex-start;
|
|
30
|
+
font-size: 1.5rem;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 2rem;
|
|
34
|
+
margin: 0;
|
|
35
|
+
}
|
|
36
|
+
.transactions header div {
|
|
37
|
+
display: flex;
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
align-items: center;
|
|
40
|
+
flex: 1;
|
|
41
|
+
justify-content: flex-end;
|
|
42
|
+
}
|
|
43
|
+
.transactions .transaction-table {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-columns: auto repeat(4, 1fr) repeat(3, auto);
|
|
46
|
+
gap: 1px 0px;
|
|
47
|
+
background-color: var(--transaction-table-border-color);
|
|
48
|
+
border-top: 1px solid var(--transaction-table-border-color);
|
|
49
|
+
border-radius: 0.6rem;
|
|
50
|
+
}
|
|
51
|
+
.transactions .transaction-table div {
|
|
52
|
+
padding: 1rem;
|
|
53
|
+
background-color: white;
|
|
54
|
+
overflow: clip;
|
|
55
|
+
color: var(--transaction-table-text-color);
|
|
56
|
+
font-family: sans-serif;
|
|
57
|
+
font-size: 16px;
|
|
58
|
+
font-style: normal;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
line-height: 20px;
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: row;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
.transactions .transaction-table div select {
|
|
66
|
+
border: 2px solid var(--transaction-table-border-color);
|
|
67
|
+
border-radius: 0.6rem;
|
|
68
|
+
background-color: var(--transaction-table-background-color);
|
|
69
|
+
padding: 0.6rem 0.8rem;
|
|
70
|
+
}
|
|
71
|
+
.transactions .transaction-table div.header {
|
|
72
|
+
font-weight: bold;
|
|
73
|
+
}
|
|
74
|
+
.transactions .transaction-table div.expand-area {
|
|
75
|
+
grid-column: 1 / -1;
|
|
76
|
+
margin-top: -1px;
|
|
77
|
+
}
|
|
78
|
+
.transactions .transaction-table div.expand-content {
|
|
79
|
+
padding: 1rem;
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
.transactions .radio-group {
|
|
83
|
+
}
|
|
84
|
+
.transactions .radio-group input {
|
|
85
|
+
position: absolute;
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
.transactions .radio-group div {
|
|
89
|
+
padding: 0.6rem 1rem;
|
|
90
|
+
border: 1px solid var(--transaction-buttons-border-color);
|
|
91
|
+
border-right: 0;
|
|
92
|
+
border-radius: 0;
|
|
93
|
+
}
|
|
94
|
+
.transactions .radio-group label:first-of-type div {
|
|
95
|
+
border-start-start-radius: 0.6rem;
|
|
96
|
+
border-end-start-radius: 0.6rem;
|
|
97
|
+
}
|
|
98
|
+
.transactions .radio-group label:last-of-type div {
|
|
99
|
+
border-right: 1px solid var(--transaction-buttons-border-color);
|
|
100
|
+
border-start-end-radius: 0.6rem;
|
|
101
|
+
border-end-end-radius: 0.6rem;
|
|
102
|
+
}
|
|
103
|
+
.transactions .radio-group input:checked + div {
|
|
104
|
+
background: var(--transaction-buttons-selected-background-color);
|
|
105
|
+
}
|
|
106
|
+
/*# sourceMappingURL=index.esm.css.map */
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/Hello/Hello.css", "../src/components/Transactions/Transactions.css"],
|
|
4
|
+
"sourcesContent": [".hello {\n color: red;\n}\n", ".transactions {\n --transaction-buttons-border-color: #D0D5DD;\n --transaction-buttons-selected-background-color: #E0E9FF;\n --transaction-table-background-color: white;\n --transaction-table-border-color: #EAECF0;\n --transaction-table-text-color: #101828;\n}\n\n.transactions {\n margin: 3rem;\n border-radius: 0.6rem;\n border: 1px solid var(--transaction-table-border-color);\n background-color: var(--transaction-table-background-color);\n overflow: hidden;\n}\n\n.transactions header {\n display: flex;\n padding: 1rem;\n}\n\n.transactions header h1 {\n display: flex;\n align-items: center;\n flex: 1;\n justify-content: flex-start;\n font-size: 1.5rem;\n font-style: normal;\n font-weight: 600;\n line-height: 2rem;\n margin: 0;\n}\n\n.transactions header div {\n display: flex;\n font-size: 1rem;\n align-items: center;\n flex: 1;\n justify-content: flex-end;\n}\n\n.transactions .transaction-table {\n display: grid;\n grid-template-columns: auto repeat(4, 1fr) repeat(3, auto);\n gap: 1px 0px;\n background-color: var(--transaction-table-border-color);\n border-top: 1px solid var(--transaction-table-border-color);\n border-radius: 0.6rem;\n}\n\n.transactions .transaction-table div {\n padding: 1rem;\n background-color: white;\n overflow: clip;\n color: var(--transaction-table-text-color);\n font-family: sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.transactions .transaction-table div select {\n border: 2px solid var(--transaction-table-border-color);\n border-radius: 0.6rem;\n background-color: var(--transaction-table-background-color);\n padding: 0.6rem 0.8rem;\n}\n\n.transactions .transaction-table div.header {\n font-weight: bold;\n}\n\n.transactions .transaction-table div.expand-area {\n grid-column: 1 / -1;\n margin-top: -1px;\n}\n\n.transactions .transaction-table div.expand-content {\n padding: 1rem;\n text-align: center;\n}\n\n.transactions .radio-group {\n}\n\n.transactions .radio-group input {\n position: absolute;\n opacity: 0;\n}\n\n.transactions .radio-group div {\n padding: 0.6rem 1rem;\n border: 1px solid var(--transaction-buttons-border-color);\n border-right: 0;\n border-radius: 0;\n}\n\n.transactions .radio-group label:first-of-type div {\n border-start-start-radius: 0.6rem;\n border-end-start-radius: 0.6rem;\n}\n\n.transactions .radio-group label:last-of-type div {\n border-right: 1px solid var(--transaction-buttons-border-color);\n border-start-end-radius: 0.6rem;\n border-end-end-radius: 0.6rem;\n}\n\n.transactions .radio-group input:checked + div {\n background: var(--transaction-buttons-selected-background-color);\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,CAAC;AACC,SAAO;AACT;;;ACFA,CAAC;AACC,sCAAoC;AACpC,mDAAiD;AACjD,wCAAsC;AACtC,oCAAkC;AAClC,kCAAgC;AAClC;AAEA,CARC;AASC,UAAQ;AACR,iBAAe;AACf,UAAQ,IAAI,MAAM,IAAI;AACtB,oBAAkB,IAAI;AACtB,YAAU;AACZ;AAEA,CAhBC,aAgBa;AACZ,WAAS;AACT,WAAS;AACX;AAEA,CArBC,aAqBa,OAAO;AACnB,WAAS;AACT,eAAa;AACb,QAAM;AACN,mBAAiB;AACjB,aAAW;AACX,cAAY;AACZ,eAAa;AACb,eAAa;AACb,UAAQ;AACV;AAEA,CAjCC,aAiCa,OAAO;AACnB,WAAS;AACT,aAAW;AACX,eAAa;AACb,QAAM;AACN,mBAAiB;AACnB;AAEA,CAzCC,aAyCa,CAAC;AACb,WAAS;AACT,yBAAuB,KAAK,OAAO,CAAC,EAAE,KAAK,OAAO,CAAC,EAAE;AACrD,OAAK,IAAI;AACT,oBAAkB,IAAI;AACtB,cAAY,IAAI,MAAM,IAAI;AAC1B,iBAAe;AACjB;AAEA,CAlDC,aAkDa,CATC,kBASkB;AAC/B,WAAS;AACT,oBAAkB;AAClB,YAAU;AACV,SAAO,IAAI;AACX,eAAa;AACb,aAAW;AACX,cAAY;AACZ,eAAa;AACb,eAAa;AACb,WAAS;AACT,kBAAgB;AAChB,eAAa;AACf;AAEA,CAjEC,aAiEa,CAxBC,kBAwBkB,IAAI;AACnC,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe;AACf,oBAAkB,IAAI;AACtB,WAAS,OAAO;AAClB;AAEA,CAxEC,aAwEa,CA/BC,kBA+BkB,GAAG,CAAC;AACnC,eAAa;AACf;AAEA,CA5EC,aA4Ea,CAnCC,kBAmCkB,GAAG,CAAC;AACnC,eAAa,EAAE,EAAE;AACjB,cAAY;AACd;AAEA,CAjFC,aAiFa,CAxCC,kBAwCkB,GAAG,CAAC;AACnC,WAAS;AACT,cAAY;AACd;AAEA,CAtFC,aAsFa,CAAC;AACf;AAEA,CAzFC,aAyFa,CAHC,YAGY;AACzB,YAAU;AACV,WAAS;AACX;AAEA,CA9FC,aA8Fa,CARC,YAQY;AACzB,WAAS,OAAO;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,gBAAc;AACd,iBAAe;AACjB;AAEA,CArGC,aAqGa,CAfC,YAeY,KAAK,eAAe;AAC7C,6BAA2B;AAC3B,2BAAyB;AAC3B;AAEA,CA1GC,aA0Ga,CApBC,YAoBY,KAAK,cAAc;AAC5C,gBAAc,IAAI,MAAM,IAAI;AAC5B,2BAAyB;AACzB,yBAAuB;AACzB;AAEA,CAhHC,aAgHa,CA1BC,YA0BY,KAAK,SAAS,EAAE;AACzC,cAAY,IAAI;AAClB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// src/components/Hello/Hello.tsx
|
|
2
|
+
import React from "react";
|
|
3
|
+
import useSWR from "swr";
|
|
4
|
+
var fetcher = (url) => fetch(url).then((res) => res.json());
|
|
5
|
+
var Hello = ({ user }) => {
|
|
6
|
+
const { data, isLoading } = useSWR(
|
|
7
|
+
`https://api.github.com/users/${user || "jyurek"}`,
|
|
8
|
+
fetcher
|
|
9
|
+
);
|
|
10
|
+
const name = (isLoading ? "..." : data?.name) || "User";
|
|
11
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: "hello" }, "Hello, ", name, "!"));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// src/components/Transactions/Transactions.tsx
|
|
15
|
+
import React7, { useState as useState2, useContext as useContext3 } from "react";
|
|
16
|
+
|
|
17
|
+
// src/contexts/LayerContext/LayerContext.tsx
|
|
18
|
+
import { createContext } from "react";
|
|
19
|
+
var LayerContext = createContext({
|
|
20
|
+
auth: void 0,
|
|
21
|
+
businessId: "",
|
|
22
|
+
categories: []
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// src/components/RadioButtonGroup/RadioButtonGroup.tsx
|
|
26
|
+
import React3 from "react";
|
|
27
|
+
|
|
28
|
+
// src/components/RadioButtonGroup/RadioButton.tsx
|
|
29
|
+
import React2 from "react";
|
|
30
|
+
var RadioButton = ({
|
|
31
|
+
checked,
|
|
32
|
+
label,
|
|
33
|
+
name,
|
|
34
|
+
onChange,
|
|
35
|
+
value
|
|
36
|
+
}) => {
|
|
37
|
+
return /* @__PURE__ */ React2.createElement("label", null, /* @__PURE__ */ React2.createElement(
|
|
38
|
+
"input",
|
|
39
|
+
{
|
|
40
|
+
type: "radio",
|
|
41
|
+
checked,
|
|
42
|
+
name,
|
|
43
|
+
onChange,
|
|
44
|
+
value
|
|
45
|
+
}
|
|
46
|
+
), /* @__PURE__ */ React2.createElement("div", null, label));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// src/components/RadioButtonGroup/RadioButtonGroup.tsx
|
|
50
|
+
var RadioButtonGroup = ({
|
|
51
|
+
name,
|
|
52
|
+
buttons,
|
|
53
|
+
onChange,
|
|
54
|
+
selected
|
|
55
|
+
}) => {
|
|
56
|
+
const selectedValue = selected || buttons[0].value;
|
|
57
|
+
return /* @__PURE__ */ React3.createElement("div", { className: "radio-group" }, buttons.map((button) => /* @__PURE__ */ React3.createElement(
|
|
58
|
+
RadioButton,
|
|
59
|
+
{
|
|
60
|
+
...button,
|
|
61
|
+
key: button.value,
|
|
62
|
+
name,
|
|
63
|
+
checked: selectedValue === button.value,
|
|
64
|
+
onChange
|
|
65
|
+
}
|
|
66
|
+
)));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// src/components/Transactions/TransactionRow.tsx
|
|
70
|
+
import React6 from "react";
|
|
71
|
+
|
|
72
|
+
// src/models/Money.ts
|
|
73
|
+
var format = ({ amount, direction }) => (direction === "CREDIT" ? "+" : "-") + Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(
|
|
74
|
+
amount / 100
|
|
75
|
+
);
|
|
76
|
+
var Money = {
|
|
77
|
+
format
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// src/components/CategoryMenu/CategoryMenu.tsx
|
|
81
|
+
import React5, { useContext as useContext2 } from "react";
|
|
82
|
+
|
|
83
|
+
// src/components/CategoryMenu/CategoryMenuItem.tsx
|
|
84
|
+
import React4 from "react";
|
|
85
|
+
var CategoryMenuItem = ({
|
|
86
|
+
selectedCategory,
|
|
87
|
+
category,
|
|
88
|
+
maxDepth = 1
|
|
89
|
+
}) => {
|
|
90
|
+
if (category.hasOwnProperty("subCategories") && maxDepth > 0) {
|
|
91
|
+
return /* @__PURE__ */ React4.createElement("optgroup", { label: category.display_name }, category.subCategories.map((category2) => /* @__PURE__ */ React4.createElement(
|
|
92
|
+
CategoryMenuItem,
|
|
93
|
+
{
|
|
94
|
+
category: category2,
|
|
95
|
+
selectedCategory,
|
|
96
|
+
maxDepth: maxDepth - 1
|
|
97
|
+
}
|
|
98
|
+
)));
|
|
99
|
+
} else {
|
|
100
|
+
return /* @__PURE__ */ React4.createElement(
|
|
101
|
+
"option",
|
|
102
|
+
{
|
|
103
|
+
key: category.category,
|
|
104
|
+
value: category.category,
|
|
105
|
+
selected: selectedCategory === category.category
|
|
106
|
+
},
|
|
107
|
+
category.display_name
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// src/components/CategoryMenu/CategoryMenu.tsx
|
|
113
|
+
var CategoryMenu = ({ selectedCategory }) => {
|
|
114
|
+
const { categories } = useContext2(LayerContext);
|
|
115
|
+
return /* @__PURE__ */ React5.createElement("select", null, categories.map((category) => /* @__PURE__ */ React5.createElement(
|
|
116
|
+
CategoryMenuItem,
|
|
117
|
+
{
|
|
118
|
+
category,
|
|
119
|
+
selectedCategory
|
|
120
|
+
}
|
|
121
|
+
)));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// src/components/Transactions/TransactionRow.tsx
|
|
125
|
+
import { parseISO, format as formatTime } from "date-fns";
|
|
126
|
+
var TransactionRow = ({
|
|
127
|
+
dateFormat: dateFormat2,
|
|
128
|
+
transaction,
|
|
129
|
+
isOpen,
|
|
130
|
+
toggleOpen
|
|
131
|
+
}) => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("div", null, /* @__PURE__ */ React6.createElement("input", { type: "checkbox" })), /* @__PURE__ */ React6.createElement("div", null, formatTime(parseISO(transaction.date), dateFormat2)), /* @__PURE__ */ React6.createElement("div", null, Money.format(transaction)), /* @__PURE__ */ React6.createElement("div", null, "Business Checking"), /* @__PURE__ */ React6.createElement("div", null, transaction.counterparty_name), /* @__PURE__ */ React6.createElement("div", { "data-selected": transaction?.category?.category }, /* @__PURE__ */ React6.createElement(CategoryMenu, { selectedCategory: transaction?.category?.category })), /* @__PURE__ */ React6.createElement("div", null), /* @__PURE__ */ React6.createElement(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
onClick: () => toggleOpen(transaction.id),
|
|
135
|
+
style: { cursor: "pointer" }
|
|
136
|
+
},
|
|
137
|
+
"\u{1F3AF}"
|
|
138
|
+
), isOpen && /* @__PURE__ */ React6.createElement("div", { className: "expand-area" }, /* @__PURE__ */ React6.createElement("div", { className: "expand-content" }, "Hello!")));
|
|
139
|
+
|
|
140
|
+
// src/components/Transactions/Transactions.tsx
|
|
141
|
+
import useSWR2 from "swr";
|
|
142
|
+
var dateFormat = "MM/dd/yyyy";
|
|
143
|
+
var fetchTransactions = (accessToken) => (url) => fetch(url, {
|
|
144
|
+
headers: {
|
|
145
|
+
Authorization: "Bearer " + accessToken,
|
|
146
|
+
"Content-Type": "application/json"
|
|
147
|
+
},
|
|
148
|
+
method: "GET"
|
|
149
|
+
}).then((res) => res.json());
|
|
150
|
+
var filterVisibility = (display) => (transaction) => {
|
|
151
|
+
const categorized = [
|
|
152
|
+
"CATEGORIZED" /* CATEGORIZED */,
|
|
153
|
+
"JOURNALING" /* JOURNALING */,
|
|
154
|
+
"SPLIT" /* SPLIT */
|
|
155
|
+
].includes(transaction.categorization_status);
|
|
156
|
+
const inReview = [
|
|
157
|
+
"READY_FOR_INPUT" /* READY_FOR_INPUT */,
|
|
158
|
+
"LAYER_REVIEW" /* LAYER_REVIEW */
|
|
159
|
+
].includes(transaction.categorization_status);
|
|
160
|
+
return display === "review" && inReview || display === "categorized" && categorized;
|
|
161
|
+
};
|
|
162
|
+
var Transactions = (props) => {
|
|
163
|
+
const { auth, businessId } = useContext3(LayerContext);
|
|
164
|
+
const [display, setDisplay] = useState2("review");
|
|
165
|
+
const { data, isLoading } = useSWR2(
|
|
166
|
+
auth?.access_token && `https://sandbox.layerfi.com/v1/businesses/${businessId}/bank-transactions`,
|
|
167
|
+
fetchTransactions(auth?.access_token)
|
|
168
|
+
);
|
|
169
|
+
const transactions = (!isLoading && data?.data || []).filter(
|
|
170
|
+
filterVisibility(display)
|
|
171
|
+
);
|
|
172
|
+
const onCategorizationDisplayChange = (event) => setDisplay(event.target.value);
|
|
173
|
+
const [openRows, setOpenRows] = useState2({});
|
|
174
|
+
const toggleOpen = (id) => setOpenRows({ ...openRows, [id]: !openRows[id] });
|
|
175
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "transactions", "data-display": display }, /* @__PURE__ */ React7.createElement("header", null, /* @__PURE__ */ React7.createElement("h1", null, "Transactions"), /* @__PURE__ */ React7.createElement(
|
|
176
|
+
RadioButtonGroup,
|
|
177
|
+
{
|
|
178
|
+
name: "transaction-display",
|
|
179
|
+
buttons: [
|
|
180
|
+
{ label: "To Review", value: "review" },
|
|
181
|
+
{ label: "Categorized", value: "categorized" }
|
|
182
|
+
],
|
|
183
|
+
selected: display,
|
|
184
|
+
onChange: onCategorizationDisplayChange
|
|
185
|
+
}
|
|
186
|
+
)), /* @__PURE__ */ React7.createElement("div", { className: "transaction-table" }, /* @__PURE__ */ React7.createElement("div", { className: "header" }, /* @__PURE__ */ React7.createElement("input", { type: "checkbox" })), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Date"), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Transaction"), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Account"), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Amount"), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Category"), /* @__PURE__ */ React7.createElement("div", { className: "header" }, "Action"), /* @__PURE__ */ React7.createElement("div", { className: "header" }), transactions.map((transaction) => /* @__PURE__ */ React7.createElement(
|
|
187
|
+
TransactionRow,
|
|
188
|
+
{
|
|
189
|
+
key: transaction.id,
|
|
190
|
+
dateFormat,
|
|
191
|
+
transaction,
|
|
192
|
+
isOpen: openRows[transaction.id],
|
|
193
|
+
toggleOpen
|
|
194
|
+
}
|
|
195
|
+
))));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// src/providers/LayerProvider/LayerProvider.tsx
|
|
199
|
+
import React8 from "react";
|
|
200
|
+
import useSWR3 from "swr";
|
|
201
|
+
var appId = "1pskub33qd9qt19406hi4d1j6f";
|
|
202
|
+
var appSecret = "1k7up1ia2m0ino8el6md2l1isq3t7fdj1eq6firmkui8757lk6r6";
|
|
203
|
+
async function getAccessToken() {
|
|
204
|
+
var details = {
|
|
205
|
+
grant_type: "client_credentials",
|
|
206
|
+
scope: "https://sandbox.layerfi.com/sandbox",
|
|
207
|
+
client_id: "canaryAppId"
|
|
208
|
+
};
|
|
209
|
+
const formBody = Object.entries(details).map((key) => encodeURIComponent(key[0]) + "=" + encodeURIComponent(key[1])).join("&");
|
|
210
|
+
const authRequest = fetch("https://auth.layerfi.com/oauth2/token", {
|
|
211
|
+
method: "POST",
|
|
212
|
+
headers: {
|
|
213
|
+
Authorization: "Basic " + btoa(appId + ":" + appSecret),
|
|
214
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
215
|
+
},
|
|
216
|
+
body: formBody
|
|
217
|
+
});
|
|
218
|
+
return await (await authRequest).json();
|
|
219
|
+
}
|
|
220
|
+
var getCategories = (accessToken) => (url) => fetch(url, {
|
|
221
|
+
headers: {
|
|
222
|
+
Authorization: "Bearer " + accessToken,
|
|
223
|
+
"Content-Type": "application/json"
|
|
224
|
+
},
|
|
225
|
+
method: "GET"
|
|
226
|
+
}).then((res) => res.json());
|
|
227
|
+
var LayerProvider = ({
|
|
228
|
+
businessId,
|
|
229
|
+
children
|
|
230
|
+
}) => {
|
|
231
|
+
const { data: auth } = useSWR3(
|
|
232
|
+
"https://auth.layerfi.com/oauth2/token",
|
|
233
|
+
getAccessToken
|
|
234
|
+
);
|
|
235
|
+
const { data: categories } = useSWR3(
|
|
236
|
+
businessId && auth?.access_token && `https://sandbox.layerfi.com/v1/businesses/${businessId}/categories`,
|
|
237
|
+
getCategories(auth?.access_token)
|
|
238
|
+
);
|
|
239
|
+
const value = {
|
|
240
|
+
auth,
|
|
241
|
+
businessId,
|
|
242
|
+
categories: categories?.data?.categories || []
|
|
243
|
+
};
|
|
244
|
+
return /* @__PURE__ */ React8.createElement(LayerContext.Provider, { value }, children);
|
|
245
|
+
};
|
|
246
|
+
export {
|
|
247
|
+
Hello,
|
|
248
|
+
LayerContext,
|
|
249
|
+
LayerProvider,
|
|
250
|
+
Transactions
|
|
251
|
+
};
|
|
252
|
+
//# sourceMappingURL=index.esm.js.map
|