@huma-finance/widgets 0.0.36 → 0.0.38-beta.0

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/API.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## Members
2
+
3
+ <dl>
4
+ <dt><a href="#ChainEnum">ChainEnum</a></dt>
5
+ <dd><p>Updates cy.visit() to include an injected window.ethereum provider.</p></dd>
6
+ </dl>
7
+
1
8
  ## Functions
2
9
 
3
10
  <dl>
@@ -9,17 +16,25 @@
9
16
  <dd><p>Credit line borrow widget</p></dd>
10
17
  <dt><a href="#CreditLinePaymentWidget">CreditLinePaymentWidget(props)</a> ⇒</dt>
11
18
  <dd><p>Credit line payment widget</p></dd>
19
+ <dt><a href="#CreditLineApproveWidget">CreditLineApproveWidget(props)</a> ⇒</dt>
20
+ <dd><p>Credit line allowance approve widget to top up a pool's ERC20 token allowance.
21
+ To be used when re-enabling autopay and other pool actions that require allowance.</p></dd>
12
22
  <dt><a href="#LendSupplyWidget">LendSupplyWidget(props)</a> ⇒</dt>
13
23
  <dd><p>Lend supply widget</p></dd>
14
24
  <dt><a href="#LendWithdrawWidget">LendWithdrawWidget(props)</a> ⇒</dt>
15
25
  <dd><p>Lend withdraw widget</p></dd>
16
26
  <dt><a href="#SuperfluidFactoringWidget">SuperfluidFactoringWidget(props)</a> ⇒</dt>
17
27
  <dd><p>Superfluid factoring widget</p></dd>
28
+ <dt><a href="#components">components()</a></dt>
29
+ <dd><p>This file can be used to override default props and styles on the various Material components
30
+ see: https://mui.com/customization/theme-components/</p></dd>
18
31
  </dl>
19
32
 
20
33
  ## Typedefs
21
34
 
22
35
  <dl>
36
+ <dt><a href="#CreditLineApproveProps">CreditLineApproveProps</a> : <code>Object</code></dt>
37
+ <dd><p>Credit line pool approve allowance props</p></dd>
23
38
  <dt><a href="#CreditLineBorrowProps">CreditLineBorrowProps</a> : <code>Object</code></dt>
24
39
  <dd><p>Credit line pool borrow props</p></dd>
25
40
  <dt><a href="#CreditLinePaymentProps">CreditLinePaymentProps</a> : <code>Object</code></dt>
@@ -44,12 +59,20 @@
44
59
  <dd><p>Credit line pool borrow widget props</p></dd>
45
60
  <dt><a href="#CreditLinePaymentWidgetProps">CreditLinePaymentWidgetProps</a> : <code>Object</code></dt>
46
61
  <dd><p>Credit line pool payment widget props</p></dd>
62
+ <dt><a href="#CreditLinePaymentWidgetProps">CreditLinePaymentWidgetProps</a> : <code>Object</code></dt>
63
+ <dd><p>Credit line allowance approval widget props</p></dd>
47
64
  <dt><a href="#LendSupplyWidgetProps">LendSupplyWidgetProps</a> : <code>Object</code></dt>
48
65
  <dd><p>Lend pool supply widget props</p></dd>
49
66
  <dt><a href="#LendWithdrawWidgetProps">LendWithdrawWidgetProps</a> : <code>Object</code></dt>
50
67
  <dd><p>Lend pool withdraw widget props</p></dd>
51
68
  </dl>
52
69
 
70
+ <a name="ChainEnum"></a>
71
+
72
+ ## ChainEnum
73
+ <p>Updates cy.visit() to include an injected window.ethereum provider.</p>
74
+
75
+ **Kind**: global variable
53
76
  <a name="InvoiceFactoringBorrowWidget"></a>
54
77
 
55
78
  ## InvoiceFactoringBorrowWidget(props) ⇒
@@ -60,7 +83,7 @@
60
83
 
61
84
  | Param | Type | Description |
62
85
  | --- | --- | --- |
63
- | props | [<code>InvoiceFactoringBorrowProps</code>](#InvoiceFactoringBorrowProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The invoice factoring pool borrow widget props.</p> |
86
+ | props | [<code>InvoiceFactoringBorrowWidgetProps</code>](#InvoiceFactoringBorrowWidgetProps) | <p>The invoice factoring pool borrow widget props.</p> |
64
87
 
65
88
  <a name="InvoiceFactoringPaymentWidget"></a>
66
89
 
@@ -72,7 +95,7 @@
72
95
 
73
96
  | Param | Type | Description |
74
97
  | --- | --- | --- |
75
- | props | [<code>InvoiceFactoringPaymentProps</code>](#InvoiceFactoringPaymentProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The invoice factoring pool payment widget props.</p> |
98
+ | props | [<code>InvoiceFactoringPaymentWidgetProps</code>](#InvoiceFactoringPaymentWidgetProps) | <p>The invoice factoring pool payment widget props.</p> |
76
99
 
77
100
  <a name="CreditLineBorrowWidget"></a>
78
101
 
@@ -84,7 +107,7 @@
84
107
 
85
108
  | Param | Type | Description |
86
109
  | --- | --- | --- |
87
- | props | [<code>CreditLineBorrowProps</code>](#CreditLineBorrowProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The credit line pool borrow widget props.</p> |
110
+ | props | [<code>CreditLineBorrowWidgetProps</code>](#CreditLineBorrowWidgetProps) | <p>The credit line pool borrow widget props.</p> |
88
111
 
89
112
  <a name="CreditLinePaymentWidget"></a>
90
113
 
@@ -96,7 +119,20 @@
96
119
 
97
120
  | Param | Type | Description |
98
121
  | --- | --- | --- |
99
- | props | [<code>CreditLinePaymentProps</code>](#CreditLinePaymentProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The credit line pool payment widget props.</p> |
122
+ | props | [<code>CreditLinePaymentWidgetProps</code>](#CreditLinePaymentWidgetProps) | <p>The credit line pool payment widget props.</p> |
123
+
124
+ <a name="CreditLineApproveWidget"></a>
125
+
126
+ ## CreditLineApproveWidget(props) ⇒
127
+ <p>Credit line allowance approve widget to top up a pool's ERC20 token allowance.
128
+ To be used when re-enabling autopay and other pool actions that require allowance.</p>
129
+
130
+ **Kind**: global function
131
+ **Returns**: <p>Credit line pool approve widget component</p>
132
+
133
+ | Param | Type | Description |
134
+ | --- | --- | --- |
135
+ | props | <code>CreditLineApproveWidgetProps</code> | <p>The credit line pool approve widget props.</p> |
100
136
 
101
137
  <a name="LendSupplyWidget"></a>
102
138
 
@@ -108,7 +144,7 @@
108
144
 
109
145
  | Param | Type | Description |
110
146
  | --- | --- | --- |
111
- | props | [<code>LendSupplyProps</code>](#LendSupplyProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The lend pool supply widget props.</p> |
147
+ | props | [<code>LendSupplyWidgetProps</code>](#LendSupplyWidgetProps) | <p>The lend pool supply widget props.</p> |
112
148
 
113
149
  <a name="LendWithdrawWidget"></a>
114
150
 
@@ -120,7 +156,7 @@
120
156
 
121
157
  | Param | Type | Description |
122
158
  | --- | --- | --- |
123
- | props | [<code>LendWithdrawProps</code>](#LendWithdrawProps) \| [<code>WidgetProps</code>](#WidgetProps) | <p>The lend pool withdraw widget props</p> |
159
+ | props | [<code>LendWithdrawWidgetProps</code>](#LendWithdrawWidgetProps) | <p>The lend pool withdraw widget props</p> |
124
160
 
125
161
  <a name="SuperfluidFactoringWidget"></a>
126
162
 
@@ -134,6 +170,29 @@
134
170
  | --- | --- | --- |
135
171
  | props | [<code>WidgetProps</code>](#WidgetProps) | <p>The superfluid factoring widget props.</p> |
136
172
 
173
+ <a name="components"></a>
174
+
175
+ ## components()
176
+ <p>This file can be used to override default props and styles on the various Material components
177
+ see: https://mui.com/customization/theme-components/</p>
178
+
179
+ **Kind**: global function
180
+ <a name="CreditLineApproveProps"></a>
181
+
182
+ ## CreditLineApproveProps : <code>Object</code>
183
+ <p>Credit line pool approve allowance props</p>
184
+
185
+ **Kind**: global typedef
186
+ **Properties**
187
+
188
+ | Name | Type | Description |
189
+ | --- | --- | --- |
190
+ | poolName | <code>POOL\_NAME</code> | <p>The name of the pool.</p> |
191
+ | poolType | <code>POOL\_TYPE</code> | <p>The type of the pool.</p> |
192
+ | amount | <code>BigNumberish</code> \| <code>undefined</code> | <p>The amount to approve.</p> |
193
+ | handleClose | <code>function</code> | <p>Function to notify to close the widget modal when user clicks the 'x' close button.</p> |
194
+ | handleSuccess | <code>function</code> | <p>Optional function to notify that the credit line pool approve allowance action is successful.</p> |
195
+
137
196
  <a name="CreditLineBorrowProps"></a>
138
197
 
139
198
  ## CreditLineBorrowProps : <code>Object</code>
@@ -250,7 +309,7 @@
250
309
  | --- | --- | --- |
251
310
  | desiredChainId | <code>desiredChainId</code> \| <code>undefined</code> | <p>Optional desired chain id, will trigger the switch network action if different from the current chain id</p> |
252
311
  | jsonRpcUrlMap | [<code>JsonRpcConnectionMap</code>](#JsonRpcConnectionMap) \| <code>undefined</code> | <p>Optional mapping of your JSON-RPC connections indexed by chainId</p> |
253
- | provider | <code>Eip1193Provider</code> \| <code>JsonRpcProvider</code> \| <code>null</code> \| <code>undefined</code> | <p>Optional EIP-1193 provider or JsonRpc Provider</p> |
312
+ | provider | <code>Eip1193Provider</code> \| <code>JsonRpcProviderl</code> | <p>EIP-1193 provider or JsonRpc Provider</p> |
254
313
 
255
314
  <a name="InvoiceFactoringBorrowWidgetProps"></a>
256
315
 
@@ -304,6 +363,19 @@
304
363
  | CreditLinePaymentProps | [<code>CreditLinePaymentProps</code>](#CreditLinePaymentProps) | <p>Credit line pool payment props.</p> |
305
364
  | WidgetProps | [<code>WidgetProps</code>](#WidgetProps) | <p>Widget general props.</p> |
306
365
 
366
+ <a name="CreditLinePaymentWidgetProps"></a>
367
+
368
+ ## CreditLinePaymentWidgetProps : <code>Object</code>
369
+ <p>Credit line allowance approval widget props</p>
370
+
371
+ **Kind**: global typedef
372
+ **Properties**
373
+
374
+ | Name | Type | Description |
375
+ | --- | --- | --- |
376
+ | CreditLineApproveProps | [<code>CreditLineApproveProps</code>](#CreditLineApproveProps) | <p>Credit line allowance approve props.</p> |
377
+ | WidgetProps | [<code>WidgetProps</code>](#WidgetProps) | <p>Widget general props.</p> |
378
+
307
379
  <a name="LendSupplyWidgetProps"></a>
308
380
 
309
381
  ## LendSupplyWidgetProps : <code>Object</code>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@huma-finance/widgets",
3
- "version": "0.0.36",
3
+ "version": "0.0.38-beta.0+6ab0460",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,8 +30,8 @@
30
30
  "@ethersproject/experimental": "^5.7.0",
31
31
  "@ethersproject/providers": "^5.6.0",
32
32
  "@ethersproject/units": "^5.6.0",
33
- "@huma-finance/sdk": "^0.0.36",
34
- "@huma-finance/shared": "^0.0.36",
33
+ "@huma-finance/sdk": "^0.0.38-beta.0+6ab0460",
34
+ "@huma-finance/shared": "^0.0.38-beta.0+6ab0460",
35
35
  "@mui/icons-material": "^5.3.0",
36
36
  "@mui/material": "^5.0.6",
37
37
  "@mui/styles": "^5.0.2",
@@ -86,7 +86,7 @@
86
86
  "lint": "eslint --max-warnings=0 \"src/**/*.{js,ts,tsx,graphql}\"",
87
87
  "lint-staged": "lint-staged",
88
88
  "e2e": "cypress run --config baseUrl=http://localhost:8000 --headed --browser chrome --e2e",
89
- "generateDocs": "jsdoc2md --files 'src/**/*.tsx' --configure ./jsdoc2md.json > API.md",
89
+ "generateDocs": "jsdoc2md --files src/**/* --configure ./jsdoc2md.json > API.md",
90
90
  "contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"",
91
91
  "prettier": "prettier --write \"src/**/*.{js,ts,tsx,graphql}\""
92
92
  },
@@ -193,5 +193,5 @@
193
193
  "optionalDependencies": {
194
194
  "encoding": "^0.1.13"
195
195
  },
196
- "gitHead": "caf50f604219c37f37e17d519aae730144798a11"
196
+ "gitHead": "6ab046042364e2516f1054e7e82c2811708b771d"
197
197
  }
@@ -1,44 +0,0 @@
1
- @font-face {
2
- font-family: 'Recoleta-Medium';
3
- src: local("Recoleta-Medium"), url(./fonts/Recoleta/Recoleta-Medium.otf) format("truetype");
4
- font-weight: 500; }
5
-
6
- @font-face {
7
- font-family: 'Roboto-Medium';
8
- src: local("Roboto-Medium"), url(./fonts/Roboto/Roboto-Medium.ttf) format("truetype");
9
- font-weight: 500; }
10
-
11
- @font-face {
12
- font-family: 'Roboto-Regular';
13
- src: local("Roboto-Regular"), url(./fonts/Roboto/Roboto-Regular.ttf) format("truetype");
14
- font-weight: 400; }
15
-
16
- @font-face {
17
- font-family: 'Inter-Bold';
18
- src: local("Inter-Bold"), url(./fonts/Inter/Inter-Bold.ttf) format("truetype");
19
- font-weight: 700; }
20
-
21
- @font-face {
22
- font-family: 'Inter-Medium';
23
- src: local("Inter-Medium"), url(./fonts/Inter/Inter-Medium.ttf) format("truetype");
24
- font-weight: 500; }
25
-
26
- @font-face {
27
- font-family: 'Inter-Regular';
28
- src: local("Inter-Regular"), url(./fonts/Inter/Inter-Regular.ttf) format("truetype");
29
- font-weight: 400; }
30
-
31
- @font-face {
32
- font-family: 'Uni-Neue-Black';
33
- src: local("Uni-Neue-Black"), url(./fonts/UniNeue/UniNeue-Black.ttf) format("truetype");
34
- font-weight: 800; }
35
-
36
- @font-face {
37
- font-family: 'Uni-Neue-Bold';
38
- src: local("Uni-Neue-Bold"), url(./fonts/UniNeue/UniNeue-Bold.ttf) format("truetype");
39
- font-weight: 700; }
40
-
41
- @font-face {
42
- font-family: 'Uni-Neue-Regular';
43
- src: local("Uni-Neue-Regular"), url(./fonts/UniNeue/UniNeue-Regular.ttf) format("truetype");
44
- font-weight: 400; }
@@ -1,44 +0,0 @@
1
- @font-face {
2
- font-family: 'Recoleta-Medium';
3
- src: local("Recoleta-Medium"), url(./fonts/Recoleta/Recoleta-Medium.otf) format("truetype");
4
- font-weight: 500; }
5
-
6
- @font-face {
7
- font-family: 'Roboto-Medium';
8
- src: local("Roboto-Medium"), url(./fonts/Roboto/Roboto-Medium.ttf) format("truetype");
9
- font-weight: 500; }
10
-
11
- @font-face {
12
- font-family: 'Roboto-Regular';
13
- src: local("Roboto-Regular"), url(./fonts/Roboto/Roboto-Regular.ttf) format("truetype");
14
- font-weight: 400; }
15
-
16
- @font-face {
17
- font-family: 'Inter-Bold';
18
- src: local("Inter-Bold"), url(./fonts/Inter/Inter-Bold.ttf) format("truetype");
19
- font-weight: 700; }
20
-
21
- @font-face {
22
- font-family: 'Inter-Medium';
23
- src: local("Inter-Medium"), url(./fonts/Inter/Inter-Medium.ttf) format("truetype");
24
- font-weight: 500; }
25
-
26
- @font-face {
27
- font-family: 'Inter-Regular';
28
- src: local("Inter-Regular"), url(./fonts/Inter/Inter-Regular.ttf) format("truetype");
29
- font-weight: 400; }
30
-
31
- @font-face {
32
- font-family: 'Uni-Neue-Black';
33
- src: local("Uni-Neue-Black"), url(./fonts/UniNeue/UniNeue-Black.ttf) format("truetype");
34
- font-weight: 800; }
35
-
36
- @font-face {
37
- font-family: 'Uni-Neue-Bold';
38
- src: local("Uni-Neue-Bold"), url(./fonts/UniNeue/UniNeue-Bold.ttf) format("truetype");
39
- font-weight: 700; }
40
-
41
- @font-face {
42
- font-family: 'Uni-Neue-Regular';
43
- src: local("Uni-Neue-Regular"), url(./fonts/UniNeue/UniNeue-Regular.ttf) format("truetype");
44
- font-weight: 400; }