@layerfi/components 0.1.33 → 0.1.35
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 +22 -0
- package/dist/esm/index.js +2995 -2250
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +490 -137
- package/dist/index.js +3115 -2375
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +864 -657
- 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
|
@@ -35,6 +35,7 @@ Nest the components you want to use under the `LayerProvider` component. You sho
|
|
|
35
35
|
- `businessAccessToken` Temporary authentication token scoped to this specific business. See the [getting started guide](https://docs.layerfi.com/guides/embedded-components#backend-setup) for how to fetch these tokens on your backend.
|
|
36
36
|
- `envronment` (Optional, defaults to "production") the Layer environment you're attempting to access [`staging` or `production`]
|
|
37
37
|
- `theme` (Optional) to customize the look of components
|
|
38
|
+
- `onError` (Optional) to get notified about exceptions
|
|
38
39
|
|
|
39
40
|
```tsx
|
|
40
41
|
import { LayerProvider } from "@layerfi/components";
|
|
@@ -518,3 +519,24 @@ body .Layer__bank-transaction-row .Layer__table-cell-content {
|
|
|
518
519
|
background: gray;
|
|
519
520
|
}
|
|
520
521
|
```
|
|
522
|
+
|
|
523
|
+
## Error callback
|
|
524
|
+
|
|
525
|
+
Use `onError` property on `<LayerProvider />` to get notified about all exceptions:
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
<LayerProvider
|
|
529
|
+
businessId="..."
|
|
530
|
+
environment="..."
|
|
531
|
+
appId="..."
|
|
532
|
+
onError={err => console.log('My error callback', err)}
|
|
533
|
+
>
|
|
534
|
+
{...}
|
|
535
|
+
</LayerProvider>
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
...or on specific component:
|
|
539
|
+
|
|
540
|
+
```ts
|
|
541
|
+
<BankTransactions onError={e => console.log('My callback:', e)} />
|
|
542
|
+
```
|