@layerfi/components 0.1.30 → 0.1.31
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/.idea/codeStyles/Project.xml +61 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/layer-react.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +21 -116
- package/dist/esm/index.js +6827 -6893
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +56 -163
- package/dist/index.js +9497 -9562
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +173 -146
- package/dist/styles/index.css.map +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
+
<code_scheme name="Project" version="173">
|
|
3
|
+
<HTMLCodeStyleSettings>
|
|
4
|
+
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
|
5
|
+
</HTMLCodeStyleSettings>
|
|
6
|
+
<JSCodeStyleSettings version="0">
|
|
7
|
+
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
|
8
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
9
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
10
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
11
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
12
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
13
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
14
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
15
|
+
</JSCodeStyleSettings>
|
|
16
|
+
<TypeScriptCodeStyleSettings version="0">
|
|
17
|
+
<option name="USE_SEMICOLON_AFTER_STATEMENT" value="false" />
|
|
18
|
+
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
|
19
|
+
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
|
20
|
+
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
21
|
+
<option name="FORCE_QUOTE_STYlE" value="true" />
|
|
22
|
+
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
|
23
|
+
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
|
24
|
+
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
25
|
+
</TypeScriptCodeStyleSettings>
|
|
26
|
+
<VueCodeStyleSettings>
|
|
27
|
+
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
|
28
|
+
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
|
29
|
+
</VueCodeStyleSettings>
|
|
30
|
+
<codeStyleSettings language="HTML">
|
|
31
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
32
|
+
<indentOptions>
|
|
33
|
+
<option name="INDENT_SIZE" value="2" />
|
|
34
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
35
|
+
<option name="TAB_SIZE" value="2" />
|
|
36
|
+
</indentOptions>
|
|
37
|
+
</codeStyleSettings>
|
|
38
|
+
<codeStyleSettings language="JavaScript">
|
|
39
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
40
|
+
<indentOptions>
|
|
41
|
+
<option name="INDENT_SIZE" value="2" />
|
|
42
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
43
|
+
<option name="TAB_SIZE" value="2" />
|
|
44
|
+
</indentOptions>
|
|
45
|
+
</codeStyleSettings>
|
|
46
|
+
<codeStyleSettings language="TypeScript">
|
|
47
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
48
|
+
<indentOptions>
|
|
49
|
+
<option name="INDENT_SIZE" value="2" />
|
|
50
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
51
|
+
<option name="TAB_SIZE" value="2" />
|
|
52
|
+
</indentOptions>
|
|
53
|
+
</codeStyleSettings>
|
|
54
|
+
<codeStyleSettings language="Vue">
|
|
55
|
+
<option name="SOFT_MARGINS" value="80" />
|
|
56
|
+
<indentOptions>
|
|
57
|
+
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
58
|
+
</indentOptions>
|
|
59
|
+
</codeStyleSettings>
|
|
60
|
+
</code_scheme>
|
|
61
|
+
</component>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="corretto-19" project-jdk-type="JavaSDK">
|
|
4
|
+
<output url="file://$PROJECT_DIR$/out" />
|
|
5
|
+
</component>
|
|
6
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/layer-react.iml" filepath="$PROJECT_DIR$/.idea/layer-react.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/README.md
CHANGED
|
@@ -69,33 +69,22 @@ import { LayerProvider } from "@layerfi/components";
|
|
|
69
69
|
|
|
70
70
|
## Components
|
|
71
71
|
|
|
72
|
-
###
|
|
72
|
+
### Profit And Loss
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-

|
|
76
|
-
|
|
77
|
-
After connecting accounts, the component will change into a prompt to categorize transactions.
|
|
78
|
-

|
|
79
|
-
|
|
80
|
-
For a business that has already onboarded, this component will render nothing, so it's safe to leave on the default page for all businesses.
|
|
81
|
-
|
|
82
|
-
```tsx
|
|
83
|
-
<Onboarding onTransactionsToReviewClick={onTransactionsToReviewClick} />
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This component has one primary prop: `onTransactionsToReviewClick` should be a function which navigates to the bank transactions to review page. For example, if the bank transaction categorizaiton page lives on `/account/bank-transactions` within your app:
|
|
74
|
+

|
|
87
75
|
|
|
88
76
|
```tsx
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
import { ProfitAndLoss } from "@layerfi/components";
|
|
78
|
+
…
|
|
79
|
+
<ProfitAndLoss>
|
|
80
|
+
<ProfitAndLoss.Chart />
|
|
81
|
+
<ProfitAndLoss.Summaries />
|
|
82
|
+
<ProfitAndLoss.DatePicker />
|
|
83
|
+
<ProfitAndLoss.Table />
|
|
84
|
+
</ProfitAndLoss>
|
|
92
85
|
```
|
|
93
86
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Bank Accounts & Transactions
|
|
97
|
-
|
|
98
|
-
#### Linked Accounts
|
|
87
|
+
### Linked Accounts
|
|
99
88
|
|
|
100
89
|
Displays all accounts connected to Layer including embedded banking, Plaid, and custom accounts.
|
|
101
90
|
|
|
@@ -108,13 +97,7 @@ Displays all accounts connected to Layer including embedded banking, Plaid, and
|
|
|
108
97
|
/>
|
|
109
98
|
```
|
|
110
99
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- `asWidget`: Minimized version of the component
|
|
114
|
-
- `elevated`: Stylistic option to highlight component
|
|
115
|
-
- `showLedgerBalance`: Flag to enable or hide the current ledger balance corresponding to this external account. Useful for reconciliation.
|
|
116
|
-
|
|
117
|
-
#### Transaction categorization
|
|
100
|
+
### Transaction categorization
|
|
118
101
|
|
|
119
102
|
The transaction categorization component handles displaying both categorized transactions and the workflow for categorizing new transactions as they are imported into Layer.
|
|
120
103
|
|
|
@@ -142,110 +125,32 @@ setFilters({ amount: { min: 0, max: 10000 } })
|
|
|
142
125
|
<BankTransactions />
|
|
143
126
|
```
|
|
144
127
|
|
|
145
|
-
###
|
|
146
|
-
|
|
147
|
-
#### Profit And Loss Chart
|
|
148
|
-
|
|
149
|
-

|
|
150
|
-
|
|
151
|
-
```tsx
|
|
152
|
-
import { ProfitAndLoss } from "@layerfi/components";
|
|
153
|
-
…
|
|
154
|
-
<ProfitAndLoss>
|
|
155
|
-
<ProfitAndLoss.Chart />
|
|
156
|
-
<ProfitAndLoss.Summaries />
|
|
157
|
-
<ProfitAndLoss.DatePicker />
|
|
158
|
-
<ProfitAndLoss.Table />
|
|
159
|
-
</ProfitAndLoss>
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
#### Profit and Loss Summary Cards
|
|
163
|
-
|
|
164
|
-

|
|
165
|
-
|
|
166
|
-
```tsx
|
|
167
|
-
import { ProfitAndLoss } from "@layerfi/components";
|
|
168
|
-
…
|
|
169
|
-
<ProfitAndLoss>
|
|
170
|
-
<div className='Layer__accounting-overview__summaries-row'>
|
|
171
|
-
<ProfitAndLoss.Summaries actionable={false} />
|
|
172
|
-
<TransactionToReviewCard onClick={onTransactionsToReviewClick} />
|
|
173
|
-
</div>
|
|
174
|
-
</ProfitAndLoss>
|
|
175
|
-
```
|
|
128
|
+
### Reports
|
|
176
129
|
|
|
177
|
-
|
|
130
|
+
The reports component contains multiple accounting reports and tables, including the profit and loss table.
|
|
178
131
|
|
|
179
|
-
|
|
180
|
-
- `vertical`: changes the card layout to be vertically stacked instead of horizontal
|
|
181
|
-
- `revenueLabel`: specifiable label for revenue for uses where you prefer 'income' or other another term.
|
|
132
|
+

|
|
182
133
|
|
|
183
|
-
|
|
134
|
+
These can be embedded individually
|
|
184
135
|
|
|
185
136
|
```tsx
|
|
186
|
-
<
|
|
187
|
-
onTransactionsToReviewClick={() => navigate('/accounting/bank-transactions')}
|
|
188
|
-
/>
|
|
137
|
+
<ProfitAndLoss.DetailedCharts />
|
|
189
138
|
```
|
|
190
139
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-

|
|
140
|
+
Or as a prebuilt panel
|
|
194
141
|
|
|
195
142
|
```tsx
|
|
196
|
-
|
|
197
|
-
…
|
|
198
|
-
<ProfitAndLoss>
|
|
199
|
-
<ProfitAndLoss.Table>
|
|
200
|
-
</ProfitAndLoss>
|
|
143
|
+
<Reports />
|
|
201
144
|
```
|
|
202
145
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- `lockExpanded` forces the table to be fully expanded showing all rows
|
|
206
|
-
|
|
207
|
-
#### Balance Sheet
|
|
146
|
+
### Chart of Accounts
|
|
208
147
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
The Balance Sheet component displays an interactive table. A default date can be passed in via the `effectiveDate` prop.
|
|
212
|
-
|
|
213
|
-
### Ledger
|
|
214
|
-
|
|
215
|
-
#### Chart of Accounts
|
|
216
|
-
|
|
217
|
-

|
|
218
|
-
|
|
219
|
-
The chart of accounts gives direct read and write access into the double entry general ledger underlying Layer's data. It exposes the list of accounts and enables users to create new accounts.
|
|
148
|
+
The chart of accounts gives direct read and write access into the double entry general ledger underlying Layer's data.
|
|
220
149
|
|
|
221
150
|
```tsx
|
|
222
151
|
<ChartOfAccounts asWidget withDateControl withExpandAllButton />
|
|
223
152
|
```
|
|
224
153
|
|
|
225
|
-
The following props are supported
|
|
226
|
-
|
|
227
|
-
- `asWidget`: Displays a more compact version.
|
|
228
|
-
- `withDateControl`: Includes a date picker which determines the effective date of account balances displayed.
|
|
229
|
-
- `withExpandAllButton`: Optionally displays a button to expand and collapse all sub account lists.
|
|
230
|
-
|
|
231
|
-
#### Journal
|
|
232
|
-
|
|
233
|
-

|
|
234
|
-
|
|
235
|
-
The Journal component displays the full history of journal entries and allows users to create journal entries by hand as well.
|
|
236
|
-
|
|
237
|
-
A sidebar expands to display details about the invoice.
|
|
238
|
-
|
|
239
|
-

|
|
240
|
-
|
|
241
|
-
```tsx
|
|
242
|
-
<Journal />
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
The follow props are supported:
|
|
246
|
-
|
|
247
|
-
- `asWidget`: Compact version
|
|
248
|
-
|
|
249
154
|
## Styling
|
|
250
155
|
|
|
251
156
|
You have a range of options for custom styling. In order of most simple to most control:
|