@huma-finance/widgets 0.0.62-beta.624 → 0.0.62-beta.630

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.
Files changed (36) hide show
  1. package/API.md +34 -26
  2. package/dist/cjs/index.cjs +742 -1110
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/index.d.ts +33 -9
  5. package/dist/index.js +997 -1343
  6. package/dist/index.js.map +1 -1
  7. package/package.json +12 -5
  8. package/src/components/CreditLine/paymentV2/1-ChooseAmount.tsx +1 -0
  9. package/src/components/CreditLine/solanaBorrow/1-ChooseAmount.tsx +2 -21
  10. package/src/components/CreditLine/solanaBorrow/2-Transfer.tsx +159 -0
  11. package/src/components/CreditLine/solanaBorrow/3-Done.tsx +38 -0
  12. package/src/components/CreditLine/solanaBorrow/index.tsx +19 -25
  13. package/src/components/CreditLine/solanaPayment/1-ChooseAmount.tsx +75 -0
  14. package/src/components/CreditLine/solanaPayment/2-Transfer.tsx +92 -0
  15. package/src/components/CreditLine/solanaPayment/3-Done.tsx +59 -0
  16. package/src/components/CreditLine/solanaPayment/index.tsx +83 -0
  17. package/src/components/InputAmountModal.tsx +1 -0
  18. package/src/components/Lend/addRedemptionV2/2-ChooseAmount.tsx +6 -1
  19. package/src/components/Lend/solanaCancelRedemption/index.tsx +11 -1
  20. package/src/components/Lend/solanaSupply/5-Success.tsx +10 -8
  21. package/src/components/Lend/supplyV2/6-Success.tsx +10 -8
  22. package/src/components/Lend/supplyV2/7-Notifications.tsx +6 -1
  23. package/src/components/Notifi/NotifiContextWrapper.tsx +57 -0
  24. package/src/components/Notifi/NotifiSubscriptionModal.tsx +118 -113
  25. package/src/components/SuperfluidFactoring/index.tsx +12 -46
  26. package/src/hooks/useNotifi.ts +28 -17
  27. package/src/index.tsx +31 -9
  28. package/src/theme/coreThemeConstants.ts +1 -1
  29. package/src/components/Activity.tsx +0 -128
  30. package/src/components/CreditLine/solanaBorrow/2-ApproveAllowance.tsx +0 -89
  31. package/src/components/Factoring/FactoredList.tsx +0 -143
  32. package/src/components/Factoring/UpcomingList.tsx +0 -90
  33. package/src/components/Factoring/index.ts +0 -2
  34. package/src/components/HumaTable.tsx +0 -203
  35. package/src/components/SuperfluidFactoring/SuperfluidFactoredList.tsx +0 -69
  36. package/src/components/SuperfluidFactoring/SuperfluidUpcomingList.tsx +0 -169
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { Provider } from '@web3-react/types';
4
4
  import { POOL_NAME, POOL_TYPE, TrancheType, IdentityVerificationStatusV2, SolanaPoolInfo } from '@huma-finance/shared';
5
5
  import { BigNumberish, BigNumber } from 'ethers';
6
6
  import { SolanaPoolState } from '@huma-finance/web-shared';
7
+ import React from 'react';
7
8
 
8
9
  /**
9
10
  * Credit line pool approve allowance props
@@ -304,6 +305,7 @@ interface SolanaLendAddRedemptionProps {
304
305
  */
305
306
  interface SolanaLendCancelRedemptionProps {
306
307
  poolInfo: SolanaPoolInfo;
308
+ tranche?: TrancheType;
307
309
  handleClose: () => void;
308
310
  handleSuccess?: () => void;
309
311
  }
@@ -317,10 +319,29 @@ interface SolanaLendCancelRedemptionProps {
317
319
  */
318
320
  interface SolanaBorrowProps {
319
321
  poolInfo: SolanaPoolInfo;
322
+ poolState: SolanaPoolState;
320
323
  handleClose: () => void;
321
324
  handleSuccess?: () => void;
322
325
  }
323
326
 
327
+ /**
328
+ * Lend pool supply props
329
+ * @typedef {Object} SolanaPaymentProps
330
+ * @property {SolanaPoolInfo} poolInfo The metadata of the pool.
331
+ * @property {function():void|undefined} handleSuccess Optional function to notify that the lending pool supply action is successful.
332
+ */
333
+ interface SolanaPaymentProps {
334
+ poolInfo: SolanaPoolInfo;
335
+ handleClose: () => void;
336
+ handleSuccess?: () => void;
337
+ }
338
+
339
+ type Props = {
340
+ chainId: number | undefined;
341
+ children?: any;
342
+ };
343
+ declare function NotifiContextWrapper({ chainId, children, }: Props): React.ReactElement | null;
344
+
324
345
  /**
325
346
  * Mapping of your JSON-RPC connections indexed by chainId
326
347
  * @typedef {Object} JsonRpcConnectionMap
@@ -598,8 +619,6 @@ type SolanaWidgetProps = {
598
619
  /**
599
620
  * Lend pool supply widget props for Solana pools
600
621
  * @typedef {Object} SolanaLendSupplyWidgetProps
601
- * @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
602
- * @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
603
622
  */
604
623
  type SolanaLendSupplyWidgetProps = SolanaLendSupplyProps & SolanaWidgetProps;
605
624
  /**
@@ -611,8 +630,6 @@ declare function SolanaLendSupplyWidget(props: SolanaLendSupplyWidgetProps): _em
611
630
  /**
612
631
  * Lend pool supply widget props for Solana pools
613
632
  * @typedef {Object} SolanaLendAddRedemptionWidgetProps
614
- * @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
615
- * @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
616
633
  */
617
634
  type SolanaLendAddRedemptionWidgetProps = SolanaLendAddRedemptionProps & SolanaWidgetProps;
618
635
  /**
@@ -624,8 +641,6 @@ declare function SolanaLendAddRedemptionWidget(props: SolanaLendAddRedemptionWid
624
641
  /**
625
642
  * Lend pool supply widget props for Solana pools
626
643
  * @typedef {Object} SolanaLendCancelRedemptionWidgetProps
627
- * @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
628
- * @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
629
644
  */
630
645
  type SolanaLendCancelRedemptionWidgetProps = SolanaLendCancelRedemptionProps & SolanaWidgetProps;
631
646
  /**
@@ -637,8 +652,6 @@ declare function SolanaLendCancelRedemptionWidget(props: SolanaLendCancelRedempt
637
652
  /**
638
653
  * Lend pool supply widget props for Solana pools
639
654
  * @typedef {Object} SolanaBorrowWidgetProps
640
- * @property {SolanaLendSupplyProps} SolanaLendSupplyProps - Specific widget props
641
- * @property {SolanaWidgetProps} SolanaWidgetProps - Widget general props.
642
655
  */
643
656
  type SolanaBorrowWidgetProps = SolanaBorrowProps & SolanaWidgetProps;
644
657
  /**
@@ -647,5 +660,16 @@ type SolanaBorrowWidgetProps = SolanaBorrowProps & SolanaWidgetProps;
647
660
  * @param {SolanaBorrowWidgetProps} props - Widget props
648
661
  */
649
662
  declare function SolanaBorrowWidget(props: SolanaBorrowWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
663
+ /**
664
+ * Lend pool supply widget props for Solana pools
665
+ * @typedef {Object} SolanaPaymentWidgetProps
666
+ */
667
+ type SolanaPaymentWidgetProps = SolanaPaymentProps & SolanaWidgetProps;
668
+ /**
669
+ * Lend pool supply widget for Solana pools
670
+ *
671
+ * @param {SolanaPaymentWidgetProps} props - Widget props
672
+ */
673
+ declare function SolanaPaymentWidget(props: SolanaPaymentWidgetProps): _emotion_react_jsx_runtime.JSX.Element;
650
674
 
651
- export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SolanaBorrowWidget, SolanaLendAddRedemptionWidget, SolanaLendCancelRedemptionWidget, SolanaLendSupplyWidget, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };
675
+ export { AddRedemptionWidgetV2, AutoPaybackWidgetV2, CancelRedemptionWidgetV2, CreditLineApproveWidget, CreditLineBorrowWidget, CreditLineBorrowWidgetV2, CreditLinePaymentWidget, CreditLinePaymentWidgetV2, InvoiceFactoringBorrowWidget, InvoiceFactoringPaymentWidget, LendSupplyWidget, LendSupplyWidgetV2, LendWithdrawWidget, LendWithdrawWidgetV2, NotifiContextWrapper, ReceivableBackedCreditLineBorrowWidgetV2, ReceivableBackedCreditLinePaymentWidgetV2, SolanaBorrowWidget, SolanaLendAddRedemptionWidget, SolanaLendCancelRedemptionWidget, SolanaLendSupplyWidget, SolanaPaymentWidget, SuperfluidFactoringWidget, SupplyFirstLossCoverWidget };