@opexa/portal-components 0.0.65 → 0.0.66
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/components/Account/Account.d.ts +23 -0
- package/dist/components/Account/Account.js +107 -0
- package/dist/components/Account/AccountTrigger.d.ts +6 -0
- package/dist/components/Account/AccountTrigger.js +13 -0
- package/dist/components/Account/account.recipe.d.ts +61 -0
- package/dist/components/Account/account.recipe.js +32 -0
- package/dist/components/Account/index.d.ts +2 -0
- package/dist/components/Account/index.js +2 -0
- package/dist/components/AccountInfo/AccountInfo.d.ts +4 -0
- package/dist/components/AccountInfo/AccountInfo.js +143 -0
- package/dist/components/AccountInfo/index.d.ts +1 -0
- package/dist/components/AccountInfo/index.js +1 -0
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +4 -0
- package/dist/components/AccountSecurity/AccountSecurity.js +171 -0
- package/dist/components/AccountSecurity/index.d.ts +1 -0
- package/dist/components/AccountSecurity/index.js +1 -0
- package/dist/components/AccountVerification/AccountVerification.d.ts +4 -0
- package/dist/components/AccountVerification/AccountVerification.js +37 -0
- package/dist/components/AccountVerification/index.d.ts +1 -0
- package/dist/components/AccountVerification/index.js +1 -0
- package/dist/components/Banner/Banner.d.ts +11 -0
- package/dist/components/Banner/Banner.js +38 -0
- package/dist/components/Banner/index.d.ts +1 -0
- package/dist/components/Banner/index.js +1 -0
- package/dist/components/BetRecords/BetRecords.d.ts +7 -0
- package/dist/components/BetRecords/BetRecords.js +181 -0
- package/dist/components/BetRecords/index.d.ts +1 -0
- package/dist/components/BetRecords/index.js +1 -0
- package/dist/components/Bonus/Bonus.client.d.ts +2 -0
- package/dist/components/Bonus/Bonus.client.js +9 -0
- package/dist/components/Bonus/Bonus.d.ts +10 -0
- package/dist/components/Bonus/Bonus.js +5 -0
- package/dist/components/Bonus/index.d.ts +1 -0
- package/dist/components/Bonus/index.js +1 -0
- package/dist/components/Bonuses/Bonuses.client.js +1 -1
- package/dist/components/Bonuses/Bonuses.d.ts +15 -0
- package/dist/components/Bonuses/Bonuses.js +7 -0
- package/dist/components/Bonuses/index.js +1 -1
- package/dist/components/Cashback/Cashback.client.d.ts +2 -0
- package/dist/components/Cashback/Cashback.client.js +27 -0
- package/dist/components/Cashback/Cashback.d.ts +7 -0
- package/dist/components/Cashback/Cashback.js +15 -0
- package/dist/components/Cashback/index.d.ts +1 -0
- package/dist/components/Cashback/index.js +1 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
- package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
- package/dist/components/CashbackBonus/index.d.ts +1 -0
- package/dist/components/CashbackBonus/index.js +1 -0
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +11 -0
- package/dist/components/DepositWithdrawal/AmountChoices.js +25 -0
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +8 -0
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +31 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +75 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +129 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +126 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +129 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +96 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +21 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +16 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +102 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +60 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +96 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +21 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +16 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +101 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +60 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +6 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +39 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +5 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +21 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +10 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.js +60 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +109 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +131 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +101 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +109 -0
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +91 -0
- package/dist/components/DepositWithdrawal/index.d.ts +1 -0
- package/dist/components/DepositWithdrawal/index.js +1 -0
- package/dist/components/DepositWithdrawal/utils.d.ts +3 -0
- package/dist/components/DepositWithdrawal/utils.js +9 -0
- package/dist/components/Disclaimer/Disclaimer.d.ts +5 -0
- package/dist/components/Disclaimer/Disclaimer.js +14 -0
- package/dist/components/Disclaimer/index.d.ts +1 -0
- package/dist/components/Disclaimer/index.js +1 -0
- package/dist/components/Disclaimer/useDisclaimer.d.ts +4 -0
- package/dist/components/Disclaimer/useDisclaimer.js +37 -0
- package/dist/components/Empty.d.ts +10 -0
- package/dist/components/Empty.js +7 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +2 -0
- package/dist/components/FavoriteGames/FavoriteGames.client.js +31 -0
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +6 -0
- package/dist/components/FavoriteGames/FavoriteGames.js +7 -0
- package/dist/components/FavoriteGames/index.d.ts +1 -0
- package/dist/components/FavoriteGames/index.js +1 -0
- package/dist/components/GameLaunch/GameLaunch.d.ts +1 -0
- package/dist/components/GameLaunch/GameLaunch.js +75 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +7 -0
- package/dist/components/GameLaunch/GameLaunchTrigger.js +57 -0
- package/dist/components/GameLaunch/index.d.ts +2 -0
- package/dist/components/GameLaunch/index.js +2 -0
- package/dist/components/GameProviders/GameProviders.d.ts +11 -0
- package/dist/components/GameProviders/GameProviders.js +32 -0
- package/dist/components/GameProviders/index.d.ts +1 -0
- package/dist/components/GameProviders/index.js +1 -0
- package/dist/components/Games/BadgeNew.d.ts +2 -0
- package/dist/components/Games/BadgeNew.js +4 -0
- package/dist/components/Games/BadgePopular.d.ts +2 -0
- package/dist/components/Games/BadgePopular.js +4 -0
- package/dist/components/Games/BadgeTop.d.ts +2 -0
- package/dist/components/Games/BadgeTop.js +4 -0
- package/dist/components/Games/Game.d.ts +4 -0
- package/dist/components/Games/Game.js +37 -0
- package/dist/components/Games/GameContext.d.ts +2 -0
- package/dist/components/Games/GameContext.js +2 -0
- package/dist/components/Games/Games.d.ts +8 -0
- package/dist/components/Games/Games.js +6 -0
- package/dist/components/Games/GamesCarousel.client.d.ts +2 -0
- package/dist/components/Games/GamesCarousel.client.js +58 -0
- package/dist/components/Games/GamesCarousel.d.ts +16 -0
- package/dist/components/Games/GamesCarousel.js +11 -0
- package/dist/components/Games/GamesList.client.d.ts +2 -0
- package/dist/components/Games/GamesList.client.js +14 -0
- package/dist/components/Games/GamesList.d.ts +11 -0
- package/dist/components/Games/GamesList.js +10 -0
- package/dist/components/Games/index.d.ts +1 -0
- package/dist/components/Games/index.js +1 -0
- package/dist/components/GamesSearch/GamesSearch.d.ts +8 -0
- package/dist/components/GamesSearch/GamesSearch.js +45 -0
- package/dist/components/GamesSearch/index.d.ts +1 -0
- package/dist/components/GamesSearch/index.js +1 -0
- package/dist/components/InfiniteScroll.d.ts +10 -0
- package/dist/components/InfiniteScroll.js +25 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
- package/dist/components/JackpotCounter/JackpotCounter.client.js +57 -0
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +8 -0
- package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +8 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.js +103 -0
- package/dist/components/JackpotCounter/index.d.ts +1 -0
- package/dist/components/JackpotCounter/index.js +1 -0
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
- package/dist/components/Jackpots/JackpotGameProviders.js +38 -0
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
- package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
- package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
- package/dist/components/Jackpots/JackpotRules.d.ts +6 -0
- package/dist/components/Jackpots/JackpotRules.js +9 -0
- package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
- package/dist/components/Jackpots/Jackpots.client.js +28 -0
- package/dist/components/Jackpots/Jackpots.d.ts +10 -0
- package/dist/components/Jackpots/Jackpots.js +21 -0
- package/dist/components/Jackpots/index.d.ts +1 -0
- package/dist/components/Jackpots/index.js +1 -0
- package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
- package/dist/components/Jackpots/useJackpotItemData.js +87 -0
- package/dist/components/KYC/Header.d.ts +1 -0
- package/dist/components/KYC/Header.js +6 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +9 -0
- package/dist/components/KYC/KYC.d.ts +1 -0
- package/dist/components/KYC/KYC.js +26 -0
- package/dist/components/KYC/KYCContext.d.ts +2 -0
- package/dist/components/KYC/KYCContext.js +2 -0
- package/dist/components/KYC/KYCTrigger.d.ts +5 -0
- package/dist/components/KYC/KYCTrigger.js +14 -0
- package/dist/components/KYC/Step1.d.ts +1 -0
- package/dist/components/KYC/Step1.js +12 -0
- package/dist/components/KYC/Step2.d.ts +1 -0
- package/dist/components/KYC/Step2.js +12 -0
- package/dist/components/KYC/Step3.d.ts +1 -0
- package/dist/components/KYC/Step3.js +11 -0
- package/dist/components/KYC/Step4.d.ts +1 -0
- package/dist/components/KYC/Step4.js +6 -0
- package/dist/components/KYC/index.d.ts +2 -0
- package/dist/components/KYC/index.js +2 -0
- package/dist/components/KYC/useKYC.d.ts +10 -0
- package/dist/components/KYC/useKYC.js +8 -0
- package/dist/components/Marquee/Marquee.d.ts +5 -0
- package/dist/components/Marquee/Marquee.js +5 -0
- package/dist/components/Marquee/index.d.ts +1 -0
- package/dist/components/Marquee/index.js +1 -0
- package/dist/components/Messages/MessageItem.d.ts +4 -0
- package/dist/components/Messages/MessageItem.js +34 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +20 -0
- package/dist/components/Messages/MessageTrigger.d.ts +8 -0
- package/dist/components/Messages/MessageTrigger.js +18 -0
- package/dist/components/Messages/Messages.d.ts +14 -0
- package/dist/components/Messages/Messages.js +38 -0
- package/dist/components/Messages/MessagesTrigger.d.ts +6 -0
- package/dist/components/Messages/MessagesTrigger.js +14 -0
- package/dist/components/Messages/index.d.ts +4 -0
- package/dist/components/Messages/index.js +4 -0
- package/dist/components/Messages/utils.d.ts +3 -0
- package/dist/components/Messages/utils.js +27 -0
- package/dist/components/PortalProvider/PortalProvider.d.ts +9 -0
- package/dist/components/PortalProvider/PortalProvider.js +18 -0
- package/dist/components/PortalProvider/Providers.d.ts +4 -0
- package/dist/components/PortalProvider/Providers.js +12 -0
- package/dist/components/PortalProvider/Snackbar.d.ts +1 -0
- package/dist/components/PortalProvider/Snackbar.js +21 -0
- package/dist/components/PortalProvider/WebVitals.d.ts +1 -0
- package/dist/components/PortalProvider/WebVitals.js +8 -0
- package/dist/components/PortalProvider/index.d.ts +1 -0
- package/dist/components/PortalProvider/index.js +1 -0
- package/dist/components/Promo/Promo.client.d.ts +2 -0
- package/dist/components/Promo/Promo.client.js +27 -0
- package/dist/components/Promo/Promo.d.ts +7 -0
- package/dist/components/Promo/Promo.js +15 -0
- package/dist/components/Promo/index.d.ts +1 -0
- package/dist/components/Promo/index.js +1 -0
- package/dist/components/Promos/Cashback.d.ts +7 -0
- package/dist/components/Promos/Cashback.js +17 -0
- package/dist/components/Promos/Promo.d.ts +7 -0
- package/dist/components/Promos/Promo.js +17 -0
- package/dist/components/Promos/Promos.d.ts +15 -0
- package/dist/components/Promos/Promos.js +13 -0
- package/dist/components/Promos/PromosCarousel.d.ts +2 -0
- package/dist/components/Promos/PromosCarousel.js +45 -0
- package/dist/components/Promos/PromosGrid.d.ts +2 -0
- package/dist/components/Promos/PromosGrid.js +16 -0
- package/dist/components/Promos/index.d.ts +1 -0
- package/dist/components/Promos/index.js +1 -0
- package/dist/components/Protected/Protected.d.ts +6 -0
- package/dist/components/Protected/Protected.js +8 -0
- package/dist/components/Protected/index.d.ts +1 -0
- package/dist/components/Protected/index.js +1 -0
- package/dist/components/Quests/CountdownTimer.d.ts +15 -0
- package/dist/components/Quests/CountdownTimer.js +33 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +73 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +8 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
- package/dist/components/Quests/Quests.client.d.ts +2 -0
- package/dist/components/Quests/Quests.client.js +27 -0
- package/dist/components/Quests/Quests.d.ts +6 -0
- package/dist/components/Quests/Quests.js +7 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.js +19 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +8 -0
- package/dist/components/Quests/index.d.ts +1 -0
- package/dist/components/Quests/index.js +1 -0
- package/dist/components/Search/Search.d.ts +6 -0
- package/dist/components/Search/Search.js +38 -0
- package/dist/components/Search/SearchTrigger.d.ts +5 -0
- package/dist/components/Search/SearchTrigger.js +14 -0
- package/dist/components/Search/index.d.ts +2 -0
- package/dist/components/Search/index.js +2 -0
- package/dist/components/SignIn/MobileNumberSignIn.d.ts +1 -0
- package/dist/components/SignIn/MobileNumberSignIn.js +121 -0
- package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +1 -0
- package/dist/components/SignIn/NameAndPasswordSignIn.js +116 -0
- package/dist/components/SignIn/SignIn.d.ts +7 -0
- package/dist/components/SignIn/SignIn.js +18 -0
- package/dist/components/SignIn/SignInContext.d.ts +2 -0
- package/dist/components/SignIn/SignInContext.js +2 -0
- package/dist/components/SignIn/SignInForm.d.ts +1 -0
- package/dist/components/SignIn/SignInForm.js +10 -0
- package/dist/components/SignIn/SignInMethod.d.ts +1 -0
- package/dist/components/SignIn/SignInMethod.js +19 -0
- package/dist/components/SignIn/SignInTrigger.d.ts +6 -0
- package/dist/components/SignIn/SignInTrigger.js +14 -0
- package/dist/components/SignIn/index.d.ts +2 -0
- package/dist/components/SignIn/index.js +2 -0
- package/dist/components/SignIn/useSignIn.d.ts +10 -0
- package/dist/components/SignIn/useSignIn.js +11 -0
- package/dist/components/SignUp/SignUp.d.ts +7 -0
- package/dist/components/SignUp/SignUp.js +16 -0
- package/dist/components/SignUp/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpForm.js +133 -0
- package/dist/components/SignUp/SignUpTrigger.d.ts +6 -0
- package/dist/components/SignUp/SignUpTrigger.js +14 -0
- package/dist/components/SignUp/index.d.ts +2 -0
- package/dist/components/SignUp/index.js +2 -0
- package/dist/components/TopWins/TopWins.client.d.ts +2 -0
- package/dist/components/TopWins/TopWins.client.js +23 -0
- package/dist/components/TopWins/TopWins.d.ts +6 -0
- package/dist/components/TopWins/TopWins.js +7 -0
- package/dist/components/TopWins/index.d.ts +1 -0
- package/dist/components/TopWins/index.js +1 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
- package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
- package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
- package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
- package/dist/components/TournamentCounter/index.d.ts +1 -0
- package/dist/components/TournamentCounter/index.js +1 -0
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
- package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
- package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
- package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
- package/dist/components/Tournaments/TournamentRules.d.ts +6 -0
- package/dist/components/Tournaments/TournamentRules.js +9 -0
- package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
- package/dist/components/Tournaments/Tournaments.client.js +19 -0
- package/dist/components/Tournaments/Tournaments.d.ts +10 -0
- package/dist/components/Tournaments/Tournaments.js +14 -0
- package/dist/components/Tournaments/index.d.ts +1 -0
- package/dist/components/Tournaments/index.js +1 -0
- package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
- package/dist/components/Tournaments/useTournamentItemData.js +64 -0
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/DepositRecordsTable.js +76 -0
- package/dist/components/TransactionRecords/TableFilters.d.ts +28 -0
- package/dist/components/TransactionRecords/TableFilters.js +212 -0
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +7 -0
- package/dist/components/TransactionRecords/TransactionRecords.js +9 -0
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +51 -0
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +1 -0
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +70 -0
- package/dist/components/TransactionRecords/index.d.ts +1 -0
- package/dist/components/TransactionRecords/index.js +1 -0
- package/dist/components/index.js +34 -0
- package/package.json +1 -1
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const OnlineBankDepositContext: import("react").Context<{
|
|
2
|
+
view: "form" | "vca";
|
|
3
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
4
|
+
verify: () => void;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
deposit: import("@opexa/portal-sdk-core").Deposit | null;
|
|
7
|
+
generateVCA: (input: {
|
|
8
|
+
amount: string;
|
|
9
|
+
promo?: string | null;
|
|
10
|
+
}) => void;
|
|
11
|
+
}>, useOnlineBankDepositContext: () => {
|
|
12
|
+
view: "form" | "vca";
|
|
13
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
14
|
+
verify: () => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
deposit: import("@opexa/portal-sdk-core").Deposit | null;
|
|
17
|
+
generateVCA: (input: {
|
|
18
|
+
amount: string;
|
|
19
|
+
promo?: string | null;
|
|
20
|
+
}) => void;
|
|
21
|
+
};
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function OnlineBankDepositDetails(): import("react/jsx-runtime").JSX.Element | null;
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Portal } from '@ark-ui/react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { BankIcon, XIcon } from '../../../../icons/index.js';
|
|
5
|
+
import bankIcon from '../../../../images/bank-icon.png';
|
|
6
|
+
import { Button, Clipboard, Dialog } from '../../../../ui/index.js';
|
|
7
|
+
import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
|
|
8
|
+
export function OnlineBankDepositDetails() {
|
|
9
|
+
const context = useOnlineBankDepositContext();
|
|
10
|
+
if (context.view !== 'vca')
|
|
11
|
+
return null;
|
|
12
|
+
return (_jsxs("div", { className: "bg-bg-primary-alt rounded-lg p-2xl", children: [_jsx(Image, { src: bankIcon, alt: "", width: 52, height: 44.2, className: "mx-auto h-auto w-[3.25rem]" }), _jsx("p", { className: "mt-8 text-center font-semibold", children: "Your unique Virtual Collection Account (VCA) is:" }), _jsx(Clipboard.Root, { value: context.deposit?.vca ?? '', className: "mx-auto mt-6 max-w-[22.5rem]", children: _jsxs(Clipboard.Control, { className: "flex flex-col gap-4 lg:flex-row", children: [_jsx(Clipboard.Input, { className: "lg:grow" }), _jsx(Clipboard.Context, { children: (ctx) => (_jsx(Clipboard.Trigger, { asChild: true, children: _jsx(Button, { fullWidth: false, className: "w-full shrink-0 lg:w-28", children: ctx.copied ? 'Copied' : 'Copy VCA' }) })) })] }) }), _jsx(Instruction, {})] }));
|
|
13
|
+
}
|
|
14
|
+
function Instruction() {
|
|
15
|
+
return (_jsxs("p", { className: "text-text-tertiary-600 mt-6 text-center text-xs", children: ["Need help using the online bank for payment?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] rounded-lg p-4xl lg:w-[33.625rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-11 items-center justify-center rounded-lg border", children: _jsx(BankIcon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "How to Use Online Bank for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Click the 'Copy VCA' button to save your unique account number." }), _jsx("li", { children: "Log in to your Online Banking: Open your bank's app or website." }), _jsx("li", { children: "Initiate a Deposit: Choose the option to make a deposit." }), _jsx("li", { children: "Enter VCA: Paste your VCA in the designated field." }), _jsx("li", { children: "Complete Transaction: Follow your bank's prompts to finalize the deposit." })] }), _jsx("p", { className: "mt-3", children: "Note: Please ensure that the deposit amount you enter matches exactly." })] })] }) })] })] })] }));
|
|
16
|
+
}
|
package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function OnlineBankDepositForm(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
|
+
import { noop } from 'lodash-es';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { Controller, useForm } from 'react-hook-form';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
import { useAvailablePromosQuery, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
+
import { ChevronDownIcon, ChevronUpIcon } from '../../../../icons/index.js';
|
|
9
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
10
|
+
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
|
+
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
|
+
import { AvailablePromos } from '../AvailablePromos.js';
|
|
13
|
+
import { useOnlineBankDepositContext } from './OnlineBankDepositContext.js';
|
|
14
|
+
export function OnlineBankDepositForm() {
|
|
15
|
+
const context = useOnlineBankDepositContext();
|
|
16
|
+
const depositsCountQuery = useDepositsCountQuery();
|
|
17
|
+
const depositsCount = depositsCountQuery.data ?? 0;
|
|
18
|
+
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
19
|
+
const paymentSettings = paymentSettingsQuery.data;
|
|
20
|
+
const gatewaySettings = paymentSettings?.onlineBankDepositGatewaySettings;
|
|
21
|
+
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
22
|
+
const minimumAmount = depositsCount <= 0
|
|
23
|
+
? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
|
|
24
|
+
: parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
25
|
+
const promosQuery = useAvailablePromosQuery();
|
|
26
|
+
const promos = promosQuery.data ?? [];
|
|
27
|
+
const definition = z
|
|
28
|
+
.object({
|
|
29
|
+
amount: z.string().superRefine((val, ctx) => {
|
|
30
|
+
const n = parseDecimal(val, 0);
|
|
31
|
+
if (n < minimumAmount) {
|
|
32
|
+
ctx.addIssue({
|
|
33
|
+
type: 'number',
|
|
34
|
+
code: z.ZodIssueCode.too_small,
|
|
35
|
+
inclusive: true,
|
|
36
|
+
minimum: minimumAmount,
|
|
37
|
+
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
if (n > maximumAmount) {
|
|
41
|
+
ctx.addIssue({
|
|
42
|
+
type: 'number',
|
|
43
|
+
code: z.ZodIssueCode.too_big,
|
|
44
|
+
inclusive: true,
|
|
45
|
+
maximum: maximumAmount,
|
|
46
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
promo: z.string().optional().nullable(),
|
|
51
|
+
})
|
|
52
|
+
.superRefine((value, ctx) => {
|
|
53
|
+
const promo = promos.find((o) => o.id === value.promo);
|
|
54
|
+
const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
|
|
55
|
+
const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
|
|
56
|
+
const amount = parseDecimal(value.amount, 0);
|
|
57
|
+
if (promo && amount < promoMinAmount) {
|
|
58
|
+
ctx.addIssue({
|
|
59
|
+
path: ['amount'],
|
|
60
|
+
code: z.ZodIssueCode.custom,
|
|
61
|
+
message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
if (promo && amount > promoMaxAmount) {
|
|
65
|
+
ctx.addIssue({
|
|
66
|
+
path: ['amount'],
|
|
67
|
+
code: z.ZodIssueCode.custom,
|
|
68
|
+
message: `Maximum amount for this promo is ${promoMaxAmount}`,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const form = useForm({
|
|
73
|
+
mode: 'all',
|
|
74
|
+
resolver: zodResolver(definition),
|
|
75
|
+
defaultValues: {
|
|
76
|
+
amount: '0',
|
|
77
|
+
promo: null,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
if (minimumAmount) {
|
|
82
|
+
form.reset({
|
|
83
|
+
amount: minimumAmount.toString(),
|
|
84
|
+
promo: null,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}, [form, minimumAmount]);
|
|
88
|
+
if (context.view !== 'form')
|
|
89
|
+
return null;
|
|
90
|
+
return (_jsxs("form", { onSubmit: form.handleSubmit(context.generateVCA), noValidate: true, children: [_jsxs(Field.Root, { children: [_jsx(Field.Label, { children: "Bank" }), _jsx(Field.Input, { value: "BANKNET", onChange: noop, readOnly: true })] }), _jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
91
|
+
o.field.onChange(details.value);
|
|
92
|
+
}, formatOptions: {
|
|
93
|
+
maximumFractionDigits: 2,
|
|
94
|
+
minimumFractionDigits: 0,
|
|
95
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
96
|
+
form.setValue('amount', value.toString(), {
|
|
97
|
+
shouldTouch: true,
|
|
98
|
+
shouldDirty: true,
|
|
99
|
+
shouldValidate: true,
|
|
100
|
+
});
|
|
101
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { className: "mt-3xl", value: o.field.value, onChange: o.field.onChange })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
102
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Deposit } from '@opexa/portal-sdk-core';
|
|
2
|
+
export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
|
|
3
|
+
export declare function useOnlineBankDeposit(): {
|
|
4
|
+
view: "form" | "vca";
|
|
5
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
|
+
verify: () => void;
|
|
7
|
+
reset: () => void;
|
|
8
|
+
deposit: Deposit | null;
|
|
9
|
+
generateVCA: (input: {
|
|
10
|
+
amount: string;
|
|
11
|
+
promo?: string | null;
|
|
12
|
+
}) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
import { useCreateOnlineBankDepositMutation, useDepositQuery, } from '../../../../client/hooks/index.js';
|
|
4
|
+
export function useOnlineBankDeposit() {
|
|
5
|
+
const [deposit, setDeposit] = useState(null);
|
|
6
|
+
const [status, setStatus] = useState('waiting');
|
|
7
|
+
const view = status === 'verification-failed' ||
|
|
8
|
+
status === 'verification-waiting' ||
|
|
9
|
+
status === 'verification-success' ||
|
|
10
|
+
status === 'verification-processing'
|
|
11
|
+
? 'vca'
|
|
12
|
+
: 'form';
|
|
13
|
+
const mutation = useCreateOnlineBankDepositMutation({
|
|
14
|
+
onMutate() {
|
|
15
|
+
setStatus('processing');
|
|
16
|
+
},
|
|
17
|
+
onSuccess(data) {
|
|
18
|
+
invariant(data.vca);
|
|
19
|
+
setStatus('verification-waiting');
|
|
20
|
+
setDeposit(data);
|
|
21
|
+
},
|
|
22
|
+
onError() {
|
|
23
|
+
setStatus('failed');
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const generateVCA = (input) => mutation.mutate({
|
|
27
|
+
amount: input.amount,
|
|
28
|
+
promo: input.promo ?? undefined,
|
|
29
|
+
});
|
|
30
|
+
const query = useDepositQuery(deposit?.id, {
|
|
31
|
+
enabled: !!deposit,
|
|
32
|
+
refetchInterval: 5000,
|
|
33
|
+
});
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (query.data?.status === 'APPROVED' ||
|
|
36
|
+
query.data?.status === 'CONFIRMED') {
|
|
37
|
+
setStatus('verification-success');
|
|
38
|
+
}
|
|
39
|
+
if (query.data?.status === 'CANCELLED' ||
|
|
40
|
+
query.data?.status === 'REJECTED' ||
|
|
41
|
+
query.data?.status === 'FAILED') {
|
|
42
|
+
setStatus('verification-failed');
|
|
43
|
+
}
|
|
44
|
+
}, [query.data?.status]);
|
|
45
|
+
const reset = () => {
|
|
46
|
+
setDeposit(null);
|
|
47
|
+
setStatus('waiting');
|
|
48
|
+
};
|
|
49
|
+
const verify = () => {
|
|
50
|
+
setStatus('verification-processing');
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
view,
|
|
54
|
+
status,
|
|
55
|
+
verify,
|
|
56
|
+
reset,
|
|
57
|
+
deposit,
|
|
58
|
+
generateVCA,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QRPHDeposit(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { QRPHDepositAlert } from './QRPHDepositAlert.js';
|
|
3
|
+
import { QRPHDepositContext } from './QRPHDepositContext.js';
|
|
4
|
+
import { QRPHDepositDetails } from './QRPHDepositDetails.js';
|
|
5
|
+
import { QRPHDepositForm } from './QRPHDepositForm.js';
|
|
6
|
+
import { useQRPHDeposit } from './useQRPHDeposit.js';
|
|
7
|
+
export function QRPHDeposit() {
|
|
8
|
+
const context = useQRPHDeposit();
|
|
9
|
+
return (_jsxs(QRPHDepositContext, { value: context, children: [_jsx(QRPHDepositForm, {}), _jsx(QRPHDepositDetails, {}), _jsx(QRPHDepositAlert, {})] }));
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QRPHDepositAlert(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Portal } from '@ark-ui/react';
|
|
3
|
+
import { AlertCircleIcon, SpinnerIcon, XIcon } from '../../../../icons/index.js';
|
|
4
|
+
import { AlertDialog, Button } from '../../../../ui/index.js';
|
|
5
|
+
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
6
|
+
export function QRPHDepositAlert() {
|
|
7
|
+
const context = useQRPHDepositContext();
|
|
8
|
+
const details = useDetails();
|
|
9
|
+
return (_jsx(AlertDialog.Root, { open: context.status !== 'waiting' &&
|
|
10
|
+
context.status !== 'verification-waiting', onOpenChange: (details) => {
|
|
11
|
+
if (!details.open) {
|
|
12
|
+
context.reset();
|
|
13
|
+
}
|
|
14
|
+
}, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: details.type === 'loading', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [details.type === 'loading' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), details.type === 'success' && (_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) })), details.type === 'erorr' && (_jsx("div", { className: "bg-bg-error-secondary text-text-featured-icon-light-error flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: details.title }), _jsx(AlertDialog.Description, { children: details.description })] }), (details.type === 'erorr' || details.type === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
15
|
+
api.setOpen(false);
|
|
16
|
+
}, children: details.type === 'success' ? 'Ok' : 'Try Again' })) }) }))] }) })] }) }));
|
|
17
|
+
}
|
|
18
|
+
function useDetails() {
|
|
19
|
+
const context = useQRPHDepositContext();
|
|
20
|
+
const title = (() => {
|
|
21
|
+
let s = '';
|
|
22
|
+
if (context.status === 'processing') {
|
|
23
|
+
s = 'Processing Deposit';
|
|
24
|
+
}
|
|
25
|
+
else if (context.status === 'failed') {
|
|
26
|
+
s = 'Deposit Failed';
|
|
27
|
+
}
|
|
28
|
+
else if (context.status === 'verification-success') {
|
|
29
|
+
s = 'Deposit Successful';
|
|
30
|
+
}
|
|
31
|
+
else if (context.status === 'verification-processing') {
|
|
32
|
+
s = 'Verifying Deposit';
|
|
33
|
+
}
|
|
34
|
+
else if (context.status === 'verification-failed') {
|
|
35
|
+
if (context.deposit?.status === 'CANCELLED') {
|
|
36
|
+
s = 'Deposit Cancelled';
|
|
37
|
+
}
|
|
38
|
+
else if (context.deposit?.status === 'REJECTED') {
|
|
39
|
+
s = 'Deposit Rejected';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
s = 'Deposit Failed';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return s;
|
|
46
|
+
})();
|
|
47
|
+
const description = (() => {
|
|
48
|
+
let d = '';
|
|
49
|
+
if (context.status === 'processing') {
|
|
50
|
+
d = "We're verifying your account and amount. Please hold a moment.";
|
|
51
|
+
}
|
|
52
|
+
else if (context.status === 'failed') {
|
|
53
|
+
d =
|
|
54
|
+
'Something went wrong while processing your deposit. ' +
|
|
55
|
+
'Please try again or contact support.';
|
|
56
|
+
}
|
|
57
|
+
else if (context.status === 'verification-success') {
|
|
58
|
+
d = 'Your deposit has been successfully processed.';
|
|
59
|
+
}
|
|
60
|
+
else if (context.status === 'verification-processing') {
|
|
61
|
+
d = 'Your deposit is being processed.';
|
|
62
|
+
}
|
|
63
|
+
else if (context.status === 'verification-failed') {
|
|
64
|
+
if (context.deposit?.status === 'CANCELLED') {
|
|
65
|
+
d = 'Your deposit has been cancelled.';
|
|
66
|
+
}
|
|
67
|
+
else if (context.deposit?.status === 'REJECTED') {
|
|
68
|
+
d = 'Your deposit has been rejected.';
|
|
69
|
+
}
|
|
70
|
+
else if (context.deposit?.status === 'FAILED') {
|
|
71
|
+
d = context.deposit.error ?? 'Your deposit has failed.';
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
d =
|
|
75
|
+
'Something went wrong while processing your deposit. ' +
|
|
76
|
+
'Please try again or contact support.';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return d;
|
|
80
|
+
})();
|
|
81
|
+
const type = (() => {
|
|
82
|
+
if (context.status === 'failed' ||
|
|
83
|
+
context.status === 'verification-failed') {
|
|
84
|
+
return 'erorr';
|
|
85
|
+
}
|
|
86
|
+
if (context.status === 'verification-success') {
|
|
87
|
+
return 'success';
|
|
88
|
+
}
|
|
89
|
+
return 'loading';
|
|
90
|
+
})();
|
|
91
|
+
return {
|
|
92
|
+
type,
|
|
93
|
+
title,
|
|
94
|
+
description,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const QRPHDepositContext: import("react").Context<{
|
|
2
|
+
view: "form" | "qrCode";
|
|
3
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
4
|
+
verify: () => void;
|
|
5
|
+
reset: () => void;
|
|
6
|
+
deposit: import("@opexa/portal-sdk-core").Deposit | null;
|
|
7
|
+
generateQRCode: (input: {
|
|
8
|
+
amount: string;
|
|
9
|
+
promo?: string | null;
|
|
10
|
+
}) => void;
|
|
11
|
+
}>, useQRPHDepositContext: () => {
|
|
12
|
+
view: "form" | "qrCode";
|
|
13
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
14
|
+
verify: () => void;
|
|
15
|
+
reset: () => void;
|
|
16
|
+
deposit: import("@opexa/portal-sdk-core").Deposit | null;
|
|
17
|
+
generateQRCode: (input: {
|
|
18
|
+
amount: string;
|
|
19
|
+
promo?: string | null;
|
|
20
|
+
}) => void;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QRPHDepositDetails(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Portal, QrCode } from '@ark-ui/react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { QrCode02Icon, XIcon } from '../../../../icons/index.js';
|
|
5
|
+
import qrphIcon from '../../../../images/qrph-icon.png';
|
|
6
|
+
import { Button, Dialog } from '../../../../ui/index.js';
|
|
7
|
+
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
8
|
+
export function QRPHDepositDetails() {
|
|
9
|
+
const context = useQRPHDepositContext();
|
|
10
|
+
if (context.view !== 'qrCode')
|
|
11
|
+
return null;
|
|
12
|
+
return (_jsxs("div", { className: "bg-bg-primary-alt rounded-lg p-2xl", children: [_jsx("p", { className: "text-center text-lg font-semibold lg:text-xl", children: "QR Code" }), _jsx("p", { className: "text-text-secondary-700 mt-3 text-center text-sm lg:text-base", children: "Scan the QR code below with your banking app, or upload it to complete your deposit." }), _jsxs(QrCode.Root, { value: context.deposit?.qrCode ?? '', className: "border-border-primary bg-bg-brand-secondary-alt mx-auto mt-6 w-[12.5rem] rounded-lg border p-5 lg:w-[13rem] lg:p-6", children: [_jsxs("div", { className: "relative", children: [_jsx(QrCode.Frame, { className: "border-border-primary mx-auto size-[10rem] rounded-[0.25rem] border bg-white", children: _jsx(QrCode.Pattern, {}) }), _jsx(QrCode.Overlay, { className: "bg-white p-0.5", children: _jsx(Image, { src: qrphIcon, alt: "", className: "size-8", width: 40, height: 40 }) })] }), _jsx(QrCode.DownloadTrigger, { fileName: `qrcode-${new Date().getTime()}`, mimeType: "image/png", className: "text-text-secondary-700 mt-5 block w-full text-center text-sm font-semibold", children: "Download QR Code" })] }), _jsxs("div", { className: "mt-6 flex flex-col gap-4 lg:flex-row", children: [_jsx(Button, { size: "sm", variant: "outline", colorScheme: "gray", onClick: context.reset, children: "Generate New QR Code" }), _jsx(Button, { size: "sm", onClick: context.verify, children: "Confirm Deposit" })] }), _jsx(Instruction, {})] }));
|
|
13
|
+
}
|
|
14
|
+
function Instruction() {
|
|
15
|
+
return (_jsxs("p", { className: "text-text-tertiary-600 mt-6 text-center text-xs", children: ["Need help using the QR Code?", ' ', _jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, children: [_jsx(Dialog.Trigger, { className: "text-text-warning-primary-600", children: "See instructions" }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto w-[calc(100%-2rem)] rounded-lg p-4xl lg:w-[33.625rem]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(Dialog.Body, { children: [_jsxs("div", { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-11 items-center justify-center rounded-lg border", children: _jsx(QrCode02Icon, { className: "size-6" }) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "How to Use the QR Code for Payment" })] }), _jsx(Dialog.Description, { className: "mt-5", children: "Follow these simple steps to complete your transaction:" }), _jsxs("ol", { className: "mt-3 list-inside list-decimal space-y-3", children: [_jsx("li", { children: "Open your preferred banking or EMI mobile app and select 'Transfer Money' or 'Pay via QR'" }), _jsx("li", { children: "Scan or upload the generated QR Ph code. If prompted by the app, enter the amount to be sent." }), _jsx("li", { children: "Proceed with the transfer or payment." })] })] })] }) })] })] })] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function QRPHDepositForm(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { Controller, useForm } from 'react-hook-form';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { useAvailablePromosQuery, useDepositsCountQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
7
|
+
import { ChevronDownIcon, ChevronUpIcon } from '../../../../icons/index.js';
|
|
8
|
+
import { Button, Field, NumberInput } from '../../../../ui/index.js';
|
|
9
|
+
import { parseDecimal } from '../../../../utils/index.js';
|
|
10
|
+
import { AmountChoices } from '../../AmountChoices.js';
|
|
11
|
+
import { AvailablePromos } from '../AvailablePromos.js';
|
|
12
|
+
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
13
|
+
export function QRPHDepositForm() {
|
|
14
|
+
const context = useQRPHDepositContext();
|
|
15
|
+
const depositsCountQuery = useDepositsCountQuery();
|
|
16
|
+
const depositsCount = depositsCountQuery.data ?? 0;
|
|
17
|
+
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
18
|
+
const paymentSettings = paymentSettingsQuery.data;
|
|
19
|
+
const gatewaySettings = paymentSettings?.qrphDepositGatewaySettings;
|
|
20
|
+
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
21
|
+
const minimumAmount = depositsCount <= 0
|
|
22
|
+
? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
|
|
23
|
+
: parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
24
|
+
const promosQuery = useAvailablePromosQuery();
|
|
25
|
+
const promos = promosQuery.data ?? [];
|
|
26
|
+
const definition = z
|
|
27
|
+
.object({
|
|
28
|
+
amount: z.string().superRefine((val, ctx) => {
|
|
29
|
+
const n = parseDecimal(val, 0);
|
|
30
|
+
if (n < minimumAmount) {
|
|
31
|
+
ctx.addIssue({
|
|
32
|
+
type: 'number',
|
|
33
|
+
code: z.ZodIssueCode.too_small,
|
|
34
|
+
inclusive: true,
|
|
35
|
+
minimum: minimumAmount,
|
|
36
|
+
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
if (n > maximumAmount) {
|
|
40
|
+
ctx.addIssue({
|
|
41
|
+
type: 'number',
|
|
42
|
+
code: z.ZodIssueCode.too_big,
|
|
43
|
+
inclusive: true,
|
|
44
|
+
maximum: maximumAmount,
|
|
45
|
+
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
promo: z.string().optional().nullable(),
|
|
50
|
+
})
|
|
51
|
+
.superRefine((value, ctx) => {
|
|
52
|
+
const promo = promos.find((o) => o.id === value.promo);
|
|
53
|
+
const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
|
|
54
|
+
const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
|
|
55
|
+
const amount = parseDecimal(value.amount, 0);
|
|
56
|
+
if (promo && amount < promoMinAmount) {
|
|
57
|
+
ctx.addIssue({
|
|
58
|
+
path: ['amount'],
|
|
59
|
+
code: z.ZodIssueCode.custom,
|
|
60
|
+
message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (promo && amount > promoMaxAmount) {
|
|
64
|
+
ctx.addIssue({
|
|
65
|
+
path: ['amount'],
|
|
66
|
+
code: z.ZodIssueCode.custom,
|
|
67
|
+
message: `Maximum amount for this promo is ${promoMaxAmount}`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const form = useForm({
|
|
72
|
+
mode: 'all',
|
|
73
|
+
resolver: zodResolver(definition),
|
|
74
|
+
defaultValues: {
|
|
75
|
+
amount: '0',
|
|
76
|
+
promo: null,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (minimumAmount) {
|
|
81
|
+
form.reset({
|
|
82
|
+
amount: minimumAmount.toString(),
|
|
83
|
+
promo: null,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}, [form, minimumAmount]);
|
|
87
|
+
if (context.view !== 'form')
|
|
88
|
+
return null;
|
|
89
|
+
return (_jsxs("form", { onSubmit: form.handleSubmit(context.generateQRCode), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
90
|
+
o.field.onChange(details.value);
|
|
91
|
+
}, formatOptions: {
|
|
92
|
+
maximumFractionDigits: 2,
|
|
93
|
+
minimumFractionDigits: 0,
|
|
94
|
+
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
95
|
+
form.setValue('amount', value.toString(), {
|
|
96
|
+
shouldTouch: true,
|
|
97
|
+
shouldDirty: true,
|
|
98
|
+
shouldValidate: true,
|
|
99
|
+
});
|
|
100
|
+
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: o.field.onChange, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx("button", { type: "button", className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] })] }));
|
|
101
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Deposit } from '@opexa/portal-sdk-core';
|
|
2
|
+
export type UseQRPHDepositReturn = ReturnType<typeof useQRPHDeposit>;
|
|
3
|
+
export declare function useQRPHDeposit(): {
|
|
4
|
+
view: "form" | "qrCode";
|
|
5
|
+
status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
|
|
6
|
+
verify: () => void;
|
|
7
|
+
reset: () => void;
|
|
8
|
+
deposit: Deposit | null;
|
|
9
|
+
generateQRCode: (input: {
|
|
10
|
+
amount: string;
|
|
11
|
+
promo?: string | null;
|
|
12
|
+
}) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import invariant from 'tiny-invariant';
|
|
3
|
+
import { useCreateQRPHDepositMutation, useDepositQuery, } from '../../../../client/hooks/index.js';
|
|
4
|
+
export function useQRPHDeposit() {
|
|
5
|
+
const [deposit, setDeposit] = useState(null);
|
|
6
|
+
const [status, setStatus] = useState('waiting');
|
|
7
|
+
const view = status === 'verification-failed' ||
|
|
8
|
+
status === 'verification-waiting' ||
|
|
9
|
+
status === 'verification-success' ||
|
|
10
|
+
status === 'verification-processing'
|
|
11
|
+
? 'qrCode'
|
|
12
|
+
: 'form';
|
|
13
|
+
const mutation = useCreateQRPHDepositMutation({
|
|
14
|
+
onMutate() {
|
|
15
|
+
setStatus('processing');
|
|
16
|
+
},
|
|
17
|
+
onSuccess(data) {
|
|
18
|
+
invariant(data.qrCode);
|
|
19
|
+
setStatus('verification-waiting');
|
|
20
|
+
setDeposit(data);
|
|
21
|
+
},
|
|
22
|
+
onError() {
|
|
23
|
+
setStatus('failed');
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
const generateQRCode = (input) => mutation.mutate({
|
|
27
|
+
amount: input.amount,
|
|
28
|
+
promo: input.promo ?? undefined,
|
|
29
|
+
});
|
|
30
|
+
const query = useDepositQuery(deposit?.id, {
|
|
31
|
+
enabled: !!deposit,
|
|
32
|
+
refetchInterval: 5000,
|
|
33
|
+
});
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (query.data?.status === 'APPROVED' ||
|
|
36
|
+
query.data?.status === 'CONFIRMED') {
|
|
37
|
+
setStatus('verification-success');
|
|
38
|
+
}
|
|
39
|
+
if (query.data?.status === 'CANCELLED' ||
|
|
40
|
+
query.data?.status === 'REJECTED' ||
|
|
41
|
+
query.data?.status === 'FAILED') {
|
|
42
|
+
setStatus('verification-failed');
|
|
43
|
+
}
|
|
44
|
+
}, [query.data?.status]);
|
|
45
|
+
const reset = () => {
|
|
46
|
+
setDeposit(null);
|
|
47
|
+
setStatus('waiting');
|
|
48
|
+
};
|
|
49
|
+
const verify = () => {
|
|
50
|
+
setStatus('verification-processing');
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
view,
|
|
54
|
+
status,
|
|
55
|
+
verify,
|
|
56
|
+
reset,
|
|
57
|
+
deposit,
|
|
58
|
+
generateQRCode,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Portal } from '@ark-ui/react';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import { useShallow } from 'zustand/shallow';
|
|
7
|
+
import { useGlobalStore, useLocaleInfo, useWalletQuery, } from '../../client/hooks/index.js';
|
|
8
|
+
import { Wallet02Icon, XIcon } from '../../icons/index.js';
|
|
9
|
+
import { Dialog, IconButton, Tabs } from '../../ui/index.js';
|
|
10
|
+
import { formatNumber } from '../../utils/index.js';
|
|
11
|
+
import { Deposit } from './Deposit/Deposit.js';
|
|
12
|
+
import { Withdrawal } from './Withdrawal/Withdrawal.js';
|
|
13
|
+
export function DepositWithdrawal(props) {
|
|
14
|
+
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
15
|
+
depositWithdrawal: ctx.depositWithdrawal,
|
|
16
|
+
})));
|
|
17
|
+
const localeInfo = useLocaleInfo();
|
|
18
|
+
const walletQuery = useWalletQuery({
|
|
19
|
+
refetchInterval: 5000,
|
|
20
|
+
});
|
|
21
|
+
return (_jsxs(Dialog.Root, { lazyMount: true, unmountOnExit: true, open: globalStore.depositWithdrawal.open, onOpenChange: (details) => {
|
|
22
|
+
globalStore.depositWithdrawal.setOpen(details.open);
|
|
23
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsx(Dialog.Trigger, { asChild: true, children: props.children ?? _jsx(DefaulTrigger, {}) }), _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+1)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+2)]", children: _jsxs(Dialog.Content, { className: "lg:min-h-auto mx-auto min-h-full w-full px-4 py-3xl lg:w-[480px] lg:rounded-xl", children: [_jsxs(Dialog.Header, { className: "flex items-center gap-xl", children: [_jsx("div", { className: "border-border-primary shadow-xs text-gray-700 text-text-secondary-700 flex size-10 items-center justify-center rounded-md border", children: _jsx(Wallet02Icon, { className: "size-5" }) }), _jsx(Dialog.Title, { className: "grow text-lg font-semibold", children: "Wallet" }), _jsx(Dialog.Context, { children: (api) => (_jsx(IconButton, { size: "sm", variant: "outline", colorScheme: "gray", onClick: () => api.setOpen(false), children: _jsx(XIcon, {}) })) })] }), _jsxs(Dialog.Body, { className: "mt-3xl", children: [_jsx("p", { className: "text-text-secondary-700 text-center text-sm", children: "Deposit Balance" }), _jsx("p", { className: "text-center text-3xl font-bold leading-tight tracking-tight", children: formatNumber(walletQuery.data?.balance, {
|
|
24
|
+
currency: localeInfo.currency.code,
|
|
25
|
+
minDecimalPlaces: 2,
|
|
26
|
+
}) }), _jsxs(Tabs.Root, { value: globalStore.depositWithdrawal.tab, onValueChange: (details) => {
|
|
27
|
+
globalStore.depositWithdrawal.setTab(z.enum(['DEPOSIT', 'WITHDRAWAL']).parse(details.value));
|
|
28
|
+
}, lazyMount: true, unmountOnExit: true, className: "mt-3xl space-y-4xl", children: [_jsxs(Tabs.List, { className: "w-full", children: [_jsx(Tabs.Trigger, { value: "DEPOSIT", className: "grow", children: "Deposit" }), _jsx(Tabs.Trigger, { value: "WITHDRAWAL", className: "grow", children: "Withdrawal" }), _jsx(Tabs.Indicator, {})] }), _jsx(Tabs.Content, { value: "DEPOSIT", className: "space-y-3xl", children: _jsx(Deposit, {}) }), _jsx(Tabs.Content, { value: "WITHDRAWAL", className: "space-y-3xl", children: _jsx(Withdrawal, {}) })] })] })] }) })] })] }));
|
|
29
|
+
}
|
|
30
|
+
function DefaulTrigger(props) {
|
|
31
|
+
const localeInfo = useLocaleInfo();
|
|
32
|
+
const walletQuery = useWalletQuery({
|
|
33
|
+
refetchInterval: 5000,
|
|
34
|
+
});
|
|
35
|
+
return (_jsxs("button", { type: "button", ...props, className: twMerge('flex', props.className), children: [_jsx("div", { className: "border-border-primary flex h-10 items-center rounded-l-md border border-r-0 px-3.5", children: formatNumber(walletQuery.data?.balance, {
|
|
36
|
+
currency: localeInfo.currency.code,
|
|
37
|
+
minDecimalPlaces: 2,
|
|
38
|
+
}) }), _jsx("div", { className: "bg-button-primary-bg text-button-primary-fg flex h-10 items-center gap-1.5 rounded-r-md px-3.5 text-sm font-semibold", children: "Deposit" })] }));
|
|
39
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export interface DepositWithdrawalTriggerProps extends ComponentPropsWithRef<'button'> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function DepositWithdrawalTrigger(props: DepositWithdrawalTriggerProps): import("react/jsx-runtime").JSX.Element;
|