@opexa/portal-components 0.0.63 → 0.0.65
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/Bonuses/Bonuses.client.js +4 -4
- package/dist/components/Bonuses/BonusesTrigger.d.ts +5 -0
- package/dist/components/Bonuses/BonusesTrigger.js +19 -0
- package/dist/components/Bonuses/index.d.ts +1 -0
- package/dist/components/Bonuses/index.js +2 -1
- package/package.json +1 -1
- package/dist/components/Account/Account.d.ts +0 -23
- package/dist/components/Account/Account.js +0 -107
- package/dist/components/Account/AccountTrigger.d.ts +0 -6
- package/dist/components/Account/AccountTrigger.js +0 -13
- package/dist/components/Account/account.recipe.d.ts +0 -61
- package/dist/components/Account/account.recipe.js +0 -32
- package/dist/components/Account/index.d.ts +0 -2
- package/dist/components/Account/index.js +0 -2
- package/dist/components/AccountInfo/AccountInfo.d.ts +0 -4
- package/dist/components/AccountInfo/AccountInfo.js +0 -143
- package/dist/components/AccountInfo/index.d.ts +0 -1
- package/dist/components/AccountInfo/index.js +0 -1
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +0 -4
- package/dist/components/AccountSecurity/AccountSecurity.js +0 -171
- package/dist/components/AccountSecurity/index.d.ts +0 -1
- package/dist/components/AccountSecurity/index.js +0 -1
- package/dist/components/AccountVerification/AccountVerification.d.ts +0 -4
- package/dist/components/AccountVerification/AccountVerification.js +0 -37
- package/dist/components/AccountVerification/index.d.ts +0 -1
- package/dist/components/AccountVerification/index.js +0 -1
- package/dist/components/Banner/Banner.d.ts +0 -11
- package/dist/components/Banner/Banner.js +0 -38
- package/dist/components/Banner/index.d.ts +0 -1
- package/dist/components/Banner/index.js +0 -1
- package/dist/components/BetRecords/BetRecords.d.ts +0 -7
- package/dist/components/BetRecords/BetRecords.js +0 -181
- package/dist/components/BetRecords/index.d.ts +0 -1
- package/dist/components/BetRecords/index.js +0 -1
- package/dist/components/Bonus/Bonus.client.d.ts +0 -2
- package/dist/components/Bonus/Bonus.client.js +0 -9
- package/dist/components/Bonus/Bonus.d.ts +0 -10
- package/dist/components/Bonus/Bonus.js +0 -5
- package/dist/components/Bonus/index.d.ts +0 -1
- package/dist/components/Bonus/index.js +0 -1
- package/dist/components/Bonuses/Bonuses.d.ts +0 -15
- package/dist/components/Bonuses/Bonuses.js +0 -7
- package/dist/components/Cashback/Cashback.client.d.ts +0 -2
- package/dist/components/Cashback/Cashback.client.js +0 -27
- package/dist/components/Cashback/Cashback.d.ts +0 -7
- package/dist/components/Cashback/Cashback.js +0 -15
- package/dist/components/Cashback/index.d.ts +0 -1
- package/dist/components/Cashback/index.js +0 -1
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +0 -2
- package/dist/components/CashbackBonus/CashbackBonus.client.js +0 -9
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +0 -10
- package/dist/components/CashbackBonus/CashbackBonus.js +0 -5
- package/dist/components/CashbackBonus/index.d.ts +0 -1
- package/dist/components/CashbackBonus/index.js +0 -1
- package/dist/components/DepositWithdrawal/AmountChoices.d.ts +0 -11
- package/dist/components/DepositWithdrawal/AmountChoices.js +0 -25
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.d.ts +0 -8
- package/dist/components/DepositWithdrawal/Deposit/AvailablePromos.js +0 -31
- package/dist/components/DepositWithdrawal/Deposit/Deposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +0 -75
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +0 -129
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositForm.js +0 -102
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDeposit.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositAlert.js +0 -96
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +0 -21
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositDetails.js +0 -16
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositForm.js +0 -101
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +0 -60
- package/dist/components/DepositWithdrawal/DepositWithdrawal.d.ts +0 -6
- package/dist/components/DepositWithdrawal/DepositWithdrawal.js +0 -39
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.d.ts +0 -5
- package/dist/components/DepositWithdrawal/DepositWithdrawalTrigger.js +0 -21
- package/dist/components/DepositWithdrawal/PaymentMethods.d.ts +0 -10
- package/dist/components/DepositWithdrawal/PaymentMethods.js +0 -60
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +0 -131
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +0 -101
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +0 -109
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +0 -91
- package/dist/components/DepositWithdrawal/index.d.ts +0 -1
- package/dist/components/DepositWithdrawal/index.js +0 -1
- package/dist/components/DepositWithdrawal/utils.d.ts +0 -3
- package/dist/components/DepositWithdrawal/utils.js +0 -9
- package/dist/components/Disclaimer/Disclaimer.d.ts +0 -5
- package/dist/components/Disclaimer/Disclaimer.js +0 -14
- package/dist/components/Disclaimer/index.d.ts +0 -1
- package/dist/components/Disclaimer/index.js +0 -1
- package/dist/components/Disclaimer/useDisclaimer.d.ts +0 -4
- package/dist/components/Disclaimer/useDisclaimer.js +0 -37
- package/dist/components/Empty.d.ts +0 -10
- package/dist/components/Empty.js +0 -7
- package/dist/components/FavoriteGames/FavoriteGames.client.d.ts +0 -2
- package/dist/components/FavoriteGames/FavoriteGames.client.js +0 -31
- package/dist/components/FavoriteGames/FavoriteGames.d.ts +0 -6
- package/dist/components/FavoriteGames/FavoriteGames.js +0 -7
- package/dist/components/FavoriteGames/index.d.ts +0 -1
- package/dist/components/FavoriteGames/index.js +0 -1
- package/dist/components/GameLaunch/GameLaunch.d.ts +0 -1
- package/dist/components/GameLaunch/GameLaunch.js +0 -75
- package/dist/components/GameLaunch/GameLaunchTrigger.d.ts +0 -7
- package/dist/components/GameLaunch/GameLaunchTrigger.js +0 -57
- package/dist/components/GameLaunch/index.d.ts +0 -2
- package/dist/components/GameLaunch/index.js +0 -2
- package/dist/components/GameProviders/GameProviders.d.ts +0 -11
- package/dist/components/GameProviders/GameProviders.js +0 -32
- package/dist/components/GameProviders/index.d.ts +0 -1
- package/dist/components/GameProviders/index.js +0 -1
- package/dist/components/Games/BadgeNew.d.ts +0 -2
- package/dist/components/Games/BadgeNew.js +0 -4
- package/dist/components/Games/BadgePopular.d.ts +0 -2
- package/dist/components/Games/BadgePopular.js +0 -4
- package/dist/components/Games/BadgeTop.d.ts +0 -2
- package/dist/components/Games/BadgeTop.js +0 -4
- package/dist/components/Games/Game.d.ts +0 -4
- package/dist/components/Games/Game.js +0 -37
- package/dist/components/Games/GameContext.d.ts +0 -2
- package/dist/components/Games/GameContext.js +0 -2
- package/dist/components/Games/Games.d.ts +0 -8
- package/dist/components/Games/Games.js +0 -6
- package/dist/components/Games/GamesCarousel.client.d.ts +0 -2
- package/dist/components/Games/GamesCarousel.client.js +0 -58
- package/dist/components/Games/GamesCarousel.d.ts +0 -16
- package/dist/components/Games/GamesCarousel.js +0 -11
- package/dist/components/Games/GamesList.client.d.ts +0 -2
- package/dist/components/Games/GamesList.client.js +0 -14
- package/dist/components/Games/GamesList.d.ts +0 -11
- package/dist/components/Games/GamesList.js +0 -10
- package/dist/components/Games/index.d.ts +0 -1
- package/dist/components/Games/index.js +0 -1
- package/dist/components/GamesSearch/GamesSearch.d.ts +0 -8
- package/dist/components/GamesSearch/GamesSearch.js +0 -45
- package/dist/components/GamesSearch/index.d.ts +0 -1
- package/dist/components/GamesSearch/index.js +0 -1
- package/dist/components/InfiniteScroll.d.ts +0 -10
- package/dist/components/InfiniteScroll.js +0 -25
- package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +0 -2
- package/dist/components/JackpotCounter/JackpotCounter.client.js +0 -57
- package/dist/components/JackpotCounter/JackpotCounter.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounter.js +0 -21
- package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +0 -8
- package/dist/components/JackpotCounter/JackpotCounterItem.js +0 -103
- package/dist/components/JackpotCounter/index.d.ts +0 -1
- package/dist/components/JackpotCounter/index.js +0 -1
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +0 -5
- package/dist/components/Jackpots/JackpotGameProviders.js +0 -38
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemDesktop.js +0 -43
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +0 -9
- package/dist/components/Jackpots/JackpotItemMobile.js +0 -44
- package/dist/components/Jackpots/JackpotRules.d.ts +0 -6
- package/dist/components/Jackpots/JackpotRules.js +0 -9
- package/dist/components/Jackpots/Jackpots.client.d.ts +0 -2
- package/dist/components/Jackpots/Jackpots.client.js +0 -28
- package/dist/components/Jackpots/Jackpots.d.ts +0 -10
- package/dist/components/Jackpots/Jackpots.js +0 -21
- package/dist/components/Jackpots/index.d.ts +0 -1
- package/dist/components/Jackpots/index.js +0 -1
- package/dist/components/Jackpots/useJackpotItemData.d.ts +0 -20
- package/dist/components/Jackpots/useJackpotItemData.js +0 -87
- package/dist/components/KYC/Header.d.ts +0 -1
- package/dist/components/KYC/Header.js +0 -6
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -9
- package/dist/components/KYC/KYC.d.ts +0 -1
- package/dist/components/KYC/KYC.js +0 -26
- package/dist/components/KYC/KYCContext.d.ts +0 -2
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/KYCTrigger.d.ts +0 -5
- package/dist/components/KYC/KYCTrigger.js +0 -14
- package/dist/components/KYC/Step1.d.ts +0 -1
- package/dist/components/KYC/Step1.js +0 -12
- package/dist/components/KYC/Step2.d.ts +0 -1
- package/dist/components/KYC/Step2.js +0 -12
- package/dist/components/KYC/Step3.d.ts +0 -1
- package/dist/components/KYC/Step3.js +0 -11
- package/dist/components/KYC/Step4.d.ts +0 -1
- package/dist/components/KYC/Step4.js +0 -6
- package/dist/components/KYC/index.d.ts +0 -2
- package/dist/components/KYC/index.js +0 -2
- package/dist/components/KYC/useKYC.d.ts +0 -10
- package/dist/components/KYC/useKYC.js +0 -8
- package/dist/components/Marquee/Marquee.d.ts +0 -5
- package/dist/components/Marquee/Marquee.js +0 -5
- package/dist/components/Marquee/index.d.ts +0 -1
- package/dist/components/Marquee/index.js +0 -1
- package/dist/components/Messages/MessageItem.d.ts +0 -4
- package/dist/components/Messages/MessageItem.js +0 -34
- package/dist/components/Messages/MessagePopup.d.ts +0 -1
- package/dist/components/Messages/MessagePopup.js +0 -20
- package/dist/components/Messages/MessageTrigger.d.ts +0 -8
- package/dist/components/Messages/MessageTrigger.js +0 -18
- package/dist/components/Messages/Messages.d.ts +0 -14
- package/dist/components/Messages/Messages.js +0 -38
- package/dist/components/Messages/MessagesTrigger.d.ts +0 -6
- package/dist/components/Messages/MessagesTrigger.js +0 -14
- package/dist/components/Messages/index.d.ts +0 -4
- package/dist/components/Messages/index.js +0 -4
- package/dist/components/Messages/utils.d.ts +0 -3
- package/dist/components/Messages/utils.js +0 -27
- package/dist/components/PortalProvider/PortalProvider.d.ts +0 -9
- package/dist/components/PortalProvider/PortalProvider.js +0 -18
- package/dist/components/PortalProvider/Providers.d.ts +0 -4
- package/dist/components/PortalProvider/Providers.js +0 -12
- package/dist/components/PortalProvider/Snackbar.d.ts +0 -1
- package/dist/components/PortalProvider/Snackbar.js +0 -21
- package/dist/components/PortalProvider/WebVitals.d.ts +0 -1
- package/dist/components/PortalProvider/WebVitals.js +0 -8
- package/dist/components/PortalProvider/index.d.ts +0 -1
- package/dist/components/PortalProvider/index.js +0 -1
- package/dist/components/Promo/Promo.client.d.ts +0 -2
- package/dist/components/Promo/Promo.client.js +0 -27
- package/dist/components/Promo/Promo.d.ts +0 -7
- package/dist/components/Promo/Promo.js +0 -15
- package/dist/components/Promo/index.d.ts +0 -1
- package/dist/components/Promo/index.js +0 -1
- package/dist/components/Promos/Cashback.d.ts +0 -7
- package/dist/components/Promos/Cashback.js +0 -17
- package/dist/components/Promos/Promo.d.ts +0 -7
- package/dist/components/Promos/Promo.js +0 -17
- package/dist/components/Promos/Promos.d.ts +0 -15
- package/dist/components/Promos/Promos.js +0 -13
- package/dist/components/Promos/PromosCarousel.d.ts +0 -2
- package/dist/components/Promos/PromosCarousel.js +0 -45
- package/dist/components/Promos/PromosGrid.d.ts +0 -2
- package/dist/components/Promos/PromosGrid.js +0 -16
- package/dist/components/Promos/index.d.ts +0 -1
- package/dist/components/Promos/index.js +0 -1
- package/dist/components/Protected/Protected.d.ts +0 -6
- package/dist/components/Protected/Protected.js +0 -8
- package/dist/components/Protected/index.d.ts +0 -1
- package/dist/components/Protected/index.js +0 -1
- package/dist/components/Quests/CountdownTimer.d.ts +0 -15
- package/dist/components/Quests/CountdownTimer.js +0 -33
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +0 -4
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +0 -73
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -8
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/Quests.client.d.ts +0 -2
- package/dist/components/Quests/Quests.client.js +0 -27
- package/dist/components/Quests/Quests.d.ts +0 -6
- package/dist/components/Quests/Quests.js +0 -7
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -19
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -8
- package/dist/components/Quests/index.d.ts +0 -1
- package/dist/components/Quests/index.js +0 -1
- package/dist/components/Search/Search.d.ts +0 -6
- package/dist/components/Search/Search.js +0 -38
- package/dist/components/Search/SearchTrigger.d.ts +0 -5
- package/dist/components/Search/SearchTrigger.js +0 -14
- package/dist/components/Search/index.d.ts +0 -2
- package/dist/components/Search/index.js +0 -2
- package/dist/components/SignIn/MobileNumberSignIn.d.ts +0 -1
- package/dist/components/SignIn/MobileNumberSignIn.js +0 -121
- package/dist/components/SignIn/NameAndPasswordSignIn.d.ts +0 -1
- package/dist/components/SignIn/NameAndPasswordSignIn.js +0 -116
- package/dist/components/SignIn/SignIn.d.ts +0 -7
- package/dist/components/SignIn/SignIn.js +0 -18
- package/dist/components/SignIn/SignInContext.d.ts +0 -2
- package/dist/components/SignIn/SignInContext.js +0 -2
- package/dist/components/SignIn/SignInForm.d.ts +0 -1
- package/dist/components/SignIn/SignInForm.js +0 -10
- package/dist/components/SignIn/SignInMethod.d.ts +0 -1
- package/dist/components/SignIn/SignInMethod.js +0 -19
- package/dist/components/SignIn/SignInTrigger.d.ts +0 -6
- package/dist/components/SignIn/SignInTrigger.js +0 -14
- package/dist/components/SignIn/index.d.ts +0 -2
- package/dist/components/SignIn/index.js +0 -2
- package/dist/components/SignIn/useSignIn.d.ts +0 -10
- package/dist/components/SignIn/useSignIn.js +0 -11
- package/dist/components/SignUp/SignUp.d.ts +0 -7
- package/dist/components/SignUp/SignUp.js +0 -16
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -133
- package/dist/components/SignUp/SignUpTrigger.d.ts +0 -6
- package/dist/components/SignUp/SignUpTrigger.js +0 -14
- package/dist/components/SignUp/index.d.ts +0 -2
- package/dist/components/SignUp/index.js +0 -2
- package/dist/components/TopWins/TopWins.client.d.ts +0 -2
- package/dist/components/TopWins/TopWins.client.js +0 -23
- package/dist/components/TopWins/TopWins.d.ts +0 -6
- package/dist/components/TopWins/TopWins.js +0 -7
- package/dist/components/TopWins/index.d.ts +0 -1
- package/dist/components/TopWins/index.js +0 -1
- package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +0 -2
- package/dist/components/TournamentCounter/TournamentCounter.client.js +0 -50
- package/dist/components/TournamentCounter/TournamentCounter.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounter.js +0 -21
- package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +0 -8
- package/dist/components/TournamentCounter/TournamentCounterItem.js +0 -106
- package/dist/components/TournamentCounter/index.d.ts +0 -1
- package/dist/components/TournamentCounter/index.js +0 -1
- package/dist/components/Tournaments/TournamentGameProviders.d.ts +0 -5
- package/dist/components/Tournaments/TournamentGameProviders.js +0 -38
- package/dist/components/Tournaments/TournamentItemDesktop.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemDesktop.js +0 -56
- package/dist/components/Tournaments/TournamentItemMobile.d.ts +0 -7
- package/dist/components/Tournaments/TournamentItemMobile.js +0 -54
- package/dist/components/Tournaments/TournamentRules.d.ts +0 -6
- package/dist/components/Tournaments/TournamentRules.js +0 -9
- package/dist/components/Tournaments/Tournaments.client.d.ts +0 -2
- package/dist/components/Tournaments/Tournaments.client.js +0 -19
- package/dist/components/Tournaments/Tournaments.d.ts +0 -10
- package/dist/components/Tournaments/Tournaments.js +0 -14
- package/dist/components/Tournaments/index.d.ts +0 -1
- package/dist/components/Tournaments/index.js +0 -1
- package/dist/components/Tournaments/useTournamentItemData.d.ts +0 -16
- package/dist/components/Tournaments/useTournamentItemData.js +0 -64
- package/dist/components/TransactionRecords/DepositRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +0 -76
- package/dist/components/TransactionRecords/TableFilters.d.ts +0 -28
- package/dist/components/TransactionRecords/TableFilters.js +0 -212
- package/dist/components/TransactionRecords/TransactionRecords.d.ts +0 -7
- package/dist/components/TransactionRecords/TransactionRecords.js +0 -9
- package/dist/components/TransactionRecords/TransactionRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/TransactionRecordsTable.js +0 -51
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.d.ts +0 -1
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +0 -70
- package/dist/components/TransactionRecords/index.d.ts +0 -1
- package/dist/components/TransactionRecords/index.js +0 -1
- package/dist/components/index.js +0 -34
- /package/dist/{components/Bonuses → images}/money-on-hand.png +0 -0
- /package/dist/{components/Bonuses → images}/piggy-bank.png +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function QRPHDepositForm(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,101 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ark } from '@ark-ui/react';
|
|
4
|
-
import { useShallow } from 'zustand/shallow';
|
|
5
|
-
import { useGlobalStore, useSessionQuery } from '../../client/hooks/index.js';
|
|
6
|
-
export function DepositWithdrawalTrigger(props) {
|
|
7
|
-
const sessionQuery = useSessionQuery();
|
|
8
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
9
|
-
depositWithdrawal: ctx.depositWithdrawal,
|
|
10
|
-
})));
|
|
11
|
-
const disabled = sessionQuery.data?.status === 'unauthenticated'
|
|
12
|
-
? true
|
|
13
|
-
: globalStore.depositWithdrawal.open
|
|
14
|
-
? true
|
|
15
|
-
: props.disabled;
|
|
16
|
-
return (_jsx(ark.button, { type: "button", "aria-label": "Deposit or Withdraw", "data-state": globalStore.depositWithdrawal.open ? 'open' : 'closed', ...props, disabled: disabled, onClick: async (e) => {
|
|
17
|
-
props.onClick?.(e);
|
|
18
|
-
globalStore.depositWithdrawal.setTab('DEPOSIT');
|
|
19
|
-
globalStore.depositWithdrawal.setOpen(true);
|
|
20
|
-
} }));
|
|
21
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PaymentMethod } from './utils';
|
|
2
|
-
interface PaymentMethodsProps {
|
|
3
|
-
value?: PaymentMethod;
|
|
4
|
-
onChange?: (value: PaymentMethod) => void;
|
|
5
|
-
defaultValue?: PaymentMethod;
|
|
6
|
-
options?: PaymentMethod[];
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function PaymentMethods(props: PaymentMethodsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Image from 'next/image';
|
|
3
|
-
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import { useControllableState } from '../../client/hooks/index.js';
|
|
5
|
-
import { CheckIcon } from '../../icons/index.js';
|
|
6
|
-
import qrph from '../../images/QRPH.png';
|
|
7
|
-
import gcash from '../../images/gcash.png';
|
|
8
|
-
import instapay from '../../images/instapay.png';
|
|
9
|
-
import maya from '../../images/maya.png';
|
|
10
|
-
import onlineBank from '../../images/online-bank.png';
|
|
11
|
-
import { Checkbox, Field } from '../../ui/index.js';
|
|
12
|
-
import { PaymentMethodDefinition } from './utils.js';
|
|
13
|
-
const OPTIONS = [
|
|
14
|
-
{
|
|
15
|
-
value: 'GCASH',
|
|
16
|
-
label: 'GCash',
|
|
17
|
-
image: gcash,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
value: 'MAYA_APP',
|
|
21
|
-
label: 'Maya App',
|
|
22
|
-
image: maya,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
value: 'MAYA',
|
|
26
|
-
label: 'Maya',
|
|
27
|
-
image: maya,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
value: 'QRPH',
|
|
31
|
-
label: 'QRPH',
|
|
32
|
-
image: qrph,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
value: 'ONLINE_BANK',
|
|
36
|
-
label: 'Online Bank',
|
|
37
|
-
image: onlineBank,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
value: 'INSTAPAY',
|
|
41
|
-
label: 'Instapay',
|
|
42
|
-
image: instapay,
|
|
43
|
-
},
|
|
44
|
-
];
|
|
45
|
-
export function PaymentMethods(props) {
|
|
46
|
-
const options = props.options?.length
|
|
47
|
-
? OPTIONS.filter((option) => props.options?.includes(option.value))
|
|
48
|
-
: OPTIONS;
|
|
49
|
-
const [value, setValue] = useControllableState({
|
|
50
|
-
value: props.value,
|
|
51
|
-
defaultValue: props.defaultValue ?? options[0].value,
|
|
52
|
-
onChange: props.onChange,
|
|
53
|
-
});
|
|
54
|
-
return (_jsxs("div", { className: props.className, children: [_jsx(Field.Label, { asChild: true, children: _jsx("div", { children: "Available payment methods" }) }), _jsx(Checkbox.Group, { value: [value], onValueChange: (newValue) => {
|
|
55
|
-
const lastValue = newValue.at(-1);
|
|
56
|
-
if (!lastValue)
|
|
57
|
-
return;
|
|
58
|
-
setValue(PaymentMethodDefinition.parse(lastValue));
|
|
59
|
-
}, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "border-border-secondary ui-checked:border-border-brand-solid flex cursor-pointer items-center justify-between rounded-xl border p-lg", children: [_jsx("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: "h-[1.063rem] w-auto", draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
|
|
60
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function GCashWithdrawal(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from '@ark-ui/react';
|
|
3
|
-
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
|
-
import { useEffect, useState } from 'react';
|
|
5
|
-
import { Controller, useForm } from 'react-hook-form';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
import { useCreateGCashWithdrawalMutation, useLocaleInfo, useMobileNumberParser, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
-
import { AlertCircleIcon, ChevronDownIcon, ChevronUpIcon, EyeIcon, EyeOffIcon, SpinnerIcon, XIcon, } from '../../../../icons/index.js';
|
|
9
|
-
import { AlertDialog, Button, Field, NumberInput, PasswordInput, } from '../../../../ui/index.js';
|
|
10
|
-
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
|
-
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
|
-
export function GCashWithdrawal() {
|
|
13
|
-
const [status, setStatus] = useState('waiting');
|
|
14
|
-
const localeInfo = useLocaleInfo();
|
|
15
|
-
const mobileNumberParser = useMobileNumberParser();
|
|
16
|
-
const createWithdrawalMutation = useCreateGCashWithdrawalMutation({
|
|
17
|
-
onMutate() {
|
|
18
|
-
setStatus('processing');
|
|
19
|
-
},
|
|
20
|
-
onSuccess() {
|
|
21
|
-
setStatus('success');
|
|
22
|
-
form.reset();
|
|
23
|
-
},
|
|
24
|
-
onError() {
|
|
25
|
-
setStatus('failed');
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
29
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
30
|
-
const gatewaySettings = paymentSettings?.gcashWithdrawalGatewaySettings;
|
|
31
|
-
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
32
|
-
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
33
|
-
const definition = z.object({
|
|
34
|
-
amount: z.string().superRefine((val, ctx) => {
|
|
35
|
-
const n = parseDecimal(val, 0);
|
|
36
|
-
if (n < minimumAmount) {
|
|
37
|
-
ctx.addIssue({
|
|
38
|
-
type: 'number',
|
|
39
|
-
code: z.ZodIssueCode.too_small,
|
|
40
|
-
inclusive: true,
|
|
41
|
-
minimum: minimumAmount,
|
|
42
|
-
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (n > maximumAmount) {
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
type: 'number',
|
|
48
|
-
code: z.ZodIssueCode.too_big,
|
|
49
|
-
inclusive: true,
|
|
50
|
-
maximum: maximumAmount,
|
|
51
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
password: z
|
|
56
|
-
.string()
|
|
57
|
-
.min(8, 'Password must be 8 or more characters')
|
|
58
|
-
.max(64, 'Password must be not be more than 64 characters'),
|
|
59
|
-
mobileNumber: z
|
|
60
|
-
.string()
|
|
61
|
-
.regex(localeInfo.mobileNumber.pattern, 'Invalid mobile number'),
|
|
62
|
-
});
|
|
63
|
-
const form = useForm({
|
|
64
|
-
mode: 'all',
|
|
65
|
-
resolver: zodResolver(definition),
|
|
66
|
-
defaultValues: {
|
|
67
|
-
amount: '0',
|
|
68
|
-
password: '',
|
|
69
|
-
mobileNumber: '',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
if (minimumAmount) {
|
|
74
|
-
form.reset({
|
|
75
|
-
amount: minimumAmount.toString(),
|
|
76
|
-
password: '',
|
|
77
|
-
mobileNumber: '',
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}, [form, minimumAmount]);
|
|
81
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
82
|
-
createWithdrawalMutation.mutate({
|
|
83
|
-
amount: data.amount,
|
|
84
|
-
recipientMobileNumber: mobileNumberParser.format(data.mobileNumber),
|
|
85
|
-
transactionPassword: data.password,
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsx(localeInfo.country.flag, { className: "pointer-events-none absolute left-3.5 top-1/2 size-5 -translate-y-1/2" }), _jsx(Field.Input, { className: "pl-10.5", ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _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) => {
|
|
89
|
-
o.field.onChange(details.value);
|
|
90
|
-
}, formatOptions: {
|
|
91
|
-
maximumFractionDigits: 2,
|
|
92
|
-
minimumFractionDigits: 0,
|
|
93
|
-
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _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) => {
|
|
94
|
-
form.setValue('amount', value.toString(), {
|
|
95
|
-
shouldTouch: true,
|
|
96
|
-
shouldDirty: true,
|
|
97
|
-
shouldValidate: true,
|
|
98
|
-
});
|
|
99
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
100
|
-
if (!details.open) {
|
|
101
|
-
setStatus('waiting');
|
|
102
|
-
}
|
|
103
|
-
}, 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: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), status === '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, {}) })), status === 'failed' && (_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: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
104
|
-
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
105
|
-
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
106
|
-
'Something went wrong while processing your withdrawal. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
107
|
-
api.setOpen(false);
|
|
108
|
-
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
109
|
-
}
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function InstapayWithdrawal(): import("react/jsx-runtime").JSX.Element;
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createListCollection, Portal } from '@ark-ui/react';
|
|
3
|
-
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
|
-
import { useEffect, useMemo, useState } from 'react';
|
|
5
|
-
import { Controller, useForm } from 'react-hook-form';
|
|
6
|
-
import { z } from 'zod';
|
|
7
|
-
import { useCreateInstapayWithdrawalMutation, useInstapayBankListQuery, usePaymentSettingsQuery, } from '../../../../client/hooks/index.js';
|
|
8
|
-
import { AlertCircleIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon, EyeIcon, EyeOffIcon, SpinnerIcon, XIcon, } from '../../../../icons/index.js';
|
|
9
|
-
import { AlertDialog, Button, Field, NumberInput, PasswordInput, Select, } from '../../../../ui/index.js';
|
|
10
|
-
import { parseDecimal } from '../../../../utils/index.js';
|
|
11
|
-
import { AmountChoices } from '../../AmountChoices.js';
|
|
12
|
-
export function InstapayWithdrawal() {
|
|
13
|
-
const [status, setStatus] = useState('waiting');
|
|
14
|
-
const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
|
|
15
|
-
onMutate() {
|
|
16
|
-
setStatus('processing');
|
|
17
|
-
},
|
|
18
|
-
onSuccess() {
|
|
19
|
-
form.reset();
|
|
20
|
-
setStatus('success');
|
|
21
|
-
},
|
|
22
|
-
onError() {
|
|
23
|
-
setStatus('failed');
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
const instapayBankListQuery = useInstapayBankListQuery();
|
|
27
|
-
const instapayBankList = instapayBankListQuery.data;
|
|
28
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
29
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
30
|
-
const gatewaySettings = paymentSettings?.instapayWithdrawalGatewaySettings;
|
|
31
|
-
const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
32
|
-
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
33
|
-
const definition = z.object({
|
|
34
|
-
amount: z.string().superRefine((val, ctx) => {
|
|
35
|
-
const n = parseDecimal(val, 0);
|
|
36
|
-
if (n < minimumAmount) {
|
|
37
|
-
ctx.addIssue({
|
|
38
|
-
type: 'number',
|
|
39
|
-
code: z.ZodIssueCode.too_small,
|
|
40
|
-
inclusive: true,
|
|
41
|
-
minimum: minimumAmount,
|
|
42
|
-
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (n > maximumAmount) {
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
type: 'number',
|
|
48
|
-
code: z.ZodIssueCode.too_big,
|
|
49
|
-
inclusive: true,
|
|
50
|
-
maximum: maximumAmount,
|
|
51
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
password: z
|
|
56
|
-
.string()
|
|
57
|
-
.min(8, 'Password must be 8 or more characters')
|
|
58
|
-
.max(64, 'Password must be not be more than 64 characters'),
|
|
59
|
-
accountNumber: z.string().min(1).trim(),
|
|
60
|
-
bankCode: z.string().min(1, 'Bank is required').trim(),
|
|
61
|
-
});
|
|
62
|
-
const form = useForm({
|
|
63
|
-
mode: 'all',
|
|
64
|
-
resolver: zodResolver(definition),
|
|
65
|
-
defaultValues: {
|
|
66
|
-
amount: '0',
|
|
67
|
-
password: '',
|
|
68
|
-
accountNumber: '',
|
|
69
|
-
bankCode: '',
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
if (minimumAmount) {
|
|
74
|
-
form.reset({
|
|
75
|
-
amount: minimumAmount.toString(),
|
|
76
|
-
bankCode: form.getValues('bankCode'),
|
|
77
|
-
password: '',
|
|
78
|
-
accountNumber: '',
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
}, [form, minimumAmount]);
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
if (instapayBankList?.length) {
|
|
84
|
-
form.reset({
|
|
85
|
-
amount: form.getValues('amount'),
|
|
86
|
-
bankCode: instapayBankList[0].code,
|
|
87
|
-
password: '',
|
|
88
|
-
accountNumber: '',
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}, [form, instapayBankList]);
|
|
92
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
93
|
-
createWithdrawalMutation.mutate({
|
|
94
|
-
amount: data.amount,
|
|
95
|
-
transactionPassword: data.password,
|
|
96
|
-
accountNumber: data.accountNumber,
|
|
97
|
-
bankCode: data.bankCode,
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
const bankCollection = useMemo(() => createListCollection({
|
|
101
|
-
items: instapayBankList ?? [],
|
|
102
|
-
itemToValue: (item) => item.code,
|
|
103
|
-
itemToString: (item) => item.name,
|
|
104
|
-
}), [instapayBankList]);
|
|
105
|
-
console.log(bankCollection.items);
|
|
106
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", children: [_jsx(Controller, { control: form.control, name: "bankCode", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.bankCode, children: [_jsxs(Select.Root, { collection: bankCollection, positioning: {
|
|
107
|
-
sameWidth: true,
|
|
108
|
-
}, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
|
|
109
|
-
o.field.onChange(details.value.at(0) ?? '');
|
|
110
|
-
}, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Bank account number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _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) => {
|
|
111
|
-
o.field.onChange(details.value);
|
|
112
|
-
}, formatOptions: {
|
|
113
|
-
maximumFractionDigits: 2,
|
|
114
|
-
minimumFractionDigits: 0,
|
|
115
|
-
}, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to withdraw" }), _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) => {
|
|
116
|
-
form.setValue('amount', value.toString(), {
|
|
117
|
-
shouldTouch: true,
|
|
118
|
-
shouldDirty: true,
|
|
119
|
-
shouldValidate: true,
|
|
120
|
-
});
|
|
121
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsxs("p", { className: "mt-4xl text-xs", children: ["Upon clicking the deposit button, you agree to the", ' ', _jsx("button", { type: "button", className: "underline underline-offset-2", children: "Terms of Use and Privacy Policy" }), "."] }), _jsx(Button, { type: "submit", className: "mt-4.5", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
|
|
122
|
-
if (!details.open) {
|
|
123
|
-
setStatus('waiting');
|
|
124
|
-
}
|
|
125
|
-
}, 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: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "text-text-brand-primary-600 size-12" })), status === '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, {}) })), status === 'failed' && (_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: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
|
|
126
|
-
"We're verifying your account and amount. Please hold a moment.", status === 'success' &&
|
|
127
|
-
'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
|
|
128
|
-
'Something went wrong while processing your withdrawal. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
|
|
129
|
-
api.setOpen(false);
|
|
130
|
-
}, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
|
|
131
|
-
}
|
package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function MayaAppWithdrawal(): import("react/jsx-runtime").JSX.Element;
|