@opexa/portal-components 0.0.190 → 0.0.192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/dist/client/hooks/index.d.ts +65 -0
  2. package/dist/client/hooks/index.js +65 -0
  3. package/dist/client/hooks/useCreateLibanganDepositMutation.d.ts +4 -0
  4. package/dist/client/hooks/useCreateLibanganDepositMutation.js +73 -0
  5. package/dist/client/hooks/useCreateVentajaWithdrawalMutation.d.ts +4 -0
  6. package/dist/client/hooks/useCreateVentajaWithdrawalMutation.js +28 -0
  7. package/dist/client/services/index.d.ts +4 -0
  8. package/dist/client/services/index.js +4 -0
  9. package/dist/client/utils/index.d.ts +3 -0
  10. package/dist/client/utils/index.js +3 -0
  11. package/dist/components/Bonus/Bonus.client.js +1 -1
  12. package/dist/components/Cashback/Cashback.client.js +1 -1
  13. package/dist/components/CustomPromo/CustomPromo.js +1 -1
  14. package/dist/components/DepositWithdrawal/Deposit/Deposit.js +8 -1
  15. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.d.ts +1 -0
  16. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +175 -0
  17. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  18. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  19. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  20. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  21. package/dist/components/DepositWithdrawal/PaymentMethods.js +7 -1
  22. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.d.ts +1 -0
  23. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +154 -0
  24. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +8 -1
  25. package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
  26. package/dist/components/DepositWithdrawal/utils.js +2 -0
  27. package/dist/components/Empty.d.ts +10 -0
  28. package/dist/components/Empty.js +7 -0
  29. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  30. package/dist/components/GameProviders/GameProvidersList.js +1 -1
  31. package/dist/components/Games/GameContext.d.ts +2 -0
  32. package/dist/components/Games/GameContext.js +2 -0
  33. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  34. package/dist/components/InfiniteScroll.d.ts +10 -0
  35. package/dist/components/InfiniteScroll.js +25 -0
  36. package/dist/components/JackpotCounter/JackpotCounter.client.d.ts +2 -0
  37. package/dist/components/JackpotCounter/JackpotCounter.client.js +66 -0
  38. package/dist/components/JackpotCounter/JackpotCounter.d.ts +17 -0
  39. package/dist/components/JackpotCounter/JackpotCounter.js +21 -0
  40. package/dist/components/JackpotCounter/JackpotCounterItem.d.ts +18 -0
  41. package/dist/components/JackpotCounter/JackpotCounterItem.js +109 -0
  42. package/dist/components/JackpotCounter/JackpotCounterItem.module.css +184 -0
  43. package/dist/components/JackpotCounter/index.d.ts +1 -0
  44. package/dist/components/JackpotCounter/index.js +1 -0
  45. package/dist/components/Jackpots/JackpotDesktop.d.ts +1 -0
  46. package/dist/components/Jackpots/JackpotDesktop.js +45 -0
  47. package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -0
  48. package/dist/components/Jackpots/JackpotGameProviders.js +41 -0
  49. package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
  50. package/dist/components/Jackpots/JackpotItemDesktop.js +43 -0
  51. package/dist/components/Jackpots/JackpotItemMobile.d.ts +9 -0
  52. package/dist/components/Jackpots/JackpotItemMobile.js +44 -0
  53. package/dist/components/Jackpots/JackpotMobile.d.ts +1 -0
  54. package/dist/components/Jackpots/JackpotMobile.js +46 -0
  55. package/dist/components/Jackpots/JackpotRules.d.ts +5 -0
  56. package/dist/components/Jackpots/JackpotRules.js +11 -0
  57. package/dist/components/Jackpots/Jackpots.client.d.ts +2 -0
  58. package/dist/components/Jackpots/Jackpots.client.js +29 -0
  59. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  60. package/dist/components/Jackpots/JackpotsContext.d.ts +4 -0
  61. package/dist/components/Jackpots/JackpotsContext.js +3 -0
  62. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  63. package/dist/components/Jackpots/JackpotsList/JackpotsListItemGameProviders.js +1 -1
  64. package/dist/components/Jackpots/useJackpotData.d.ts +14 -0
  65. package/dist/components/Jackpots/useJackpotData.js +93 -0
  66. package/dist/components/Jackpots/useJackpotItemData.d.ts +20 -0
  67. package/dist/components/Jackpots/useJackpotItemData.js +87 -0
  68. package/dist/components/KYC/Header.d.ts +1 -0
  69. package/dist/components/KYC/Header.js +6 -0
  70. package/dist/components/KYC/Step1.d.ts +1 -0
  71. package/dist/components/KYC/Step1.js +12 -0
  72. package/dist/components/KYC/Step2.d.ts +1 -0
  73. package/dist/components/KYC/Step2.js +12 -0
  74. package/dist/components/KYC/Step3.d.ts +1 -0
  75. package/dist/components/KYC/Step3.js +11 -0
  76. package/dist/components/KYC/Step4.d.ts +1 -0
  77. package/dist/components/KYC/Step4.js +6 -0
  78. package/dist/components/KYC/backup/KYCContext.d.ts +1 -5
  79. package/dist/components/KYC/utils.js +18 -18
  80. package/dist/components/Messages/MessageContext.d.ts +1 -5
  81. package/dist/components/Messages/MessageItem.d.ts +4 -0
  82. package/dist/components/Messages/MessageItem.js +34 -0
  83. package/dist/components/News/News.js +1 -1
  84. package/dist/components/Promo/Promo.client.js +1 -1
  85. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -1
  86. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +5 -10
  87. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +3 -4
  88. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +1 -1
  89. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -1
  90. package/dist/components/Quests/WageringQuest/WageringQuest.js +2 -3
  91. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +3 -4
  92. package/dist/components/Search/Search.lazy.js +2 -2
  93. package/dist/components/SignUp/SignUpForm.js +1 -2
  94. package/dist/components/TournamentCounter/TournamentCounter.client.d.ts +2 -0
  95. package/dist/components/TournamentCounter/TournamentCounter.client.js +50 -0
  96. package/dist/components/TournamentCounter/TournamentCounter.d.ts +8 -0
  97. package/dist/components/TournamentCounter/TournamentCounter.js +21 -0
  98. package/dist/components/TournamentCounter/TournamentCounterItem.d.ts +8 -0
  99. package/dist/components/TournamentCounter/TournamentCounterItem.js +106 -0
  100. package/dist/components/TournamentCounter/index.d.ts +1 -0
  101. package/dist/components/TournamentCounter/index.js +1 -0
  102. package/dist/components/Tournaments/TournamentDesktop.d.ts +1 -0
  103. package/dist/components/Tournaments/TournamentDesktop.js +57 -0
  104. package/dist/components/Tournaments/TournamentGameProviders.d.ts +5 -0
  105. package/dist/components/Tournaments/TournamentGameProviders.js +38 -0
  106. package/dist/components/Tournaments/TournamentItemDesktop.d.ts +7 -0
  107. package/dist/components/Tournaments/TournamentItemDesktop.js +56 -0
  108. package/dist/components/Tournaments/TournamentItemMobile.d.ts +7 -0
  109. package/dist/components/Tournaments/TournamentItemMobile.js +54 -0
  110. package/dist/components/Tournaments/TournamentMobile.d.ts +1 -0
  111. package/dist/components/Tournaments/TournamentMobile.js +55 -0
  112. package/dist/components/Tournaments/TournamentRules.d.ts +5 -0
  113. package/dist/components/Tournaments/TournamentRules.js +11 -0
  114. package/dist/components/Tournaments/Tournaments.client.d.ts +2 -0
  115. package/dist/components/Tournaments/Tournaments.client.js +20 -0
  116. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  117. package/dist/components/Tournaments/TournamentsContext.d.ts +4 -0
  118. package/dist/components/Tournaments/TournamentsContext.js +3 -0
  119. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  120. package/dist/components/Tournaments/TournamentsList/TournamentsListItemGameProviders.js +1 -1
  121. package/dist/components/Tournaments/useTournamentData.d.ts +10 -0
  122. package/dist/components/Tournaments/useTournamentData.js +72 -0
  123. package/dist/components/Tournaments/useTournamentItemData.d.ts +16 -0
  124. package/dist/components/Tournaments/useTournamentItemData.js +64 -0
  125. package/dist/components/index.d.ts +33 -0
  126. package/dist/components/index.js +33 -0
  127. package/dist/constants/envVars.d.ts +5 -0
  128. package/dist/constants/envVars.js +28 -0
  129. package/dist/constants/gameProviders.d.ts +5 -0
  130. package/dist/constants/gameProviders.js +362 -0
  131. package/dist/constants/gameTypes.d.ts +4 -0
  132. package/dist/constants/gameTypes.js +64 -0
  133. package/dist/constants/headerKeys.d.ts +1 -0
  134. package/dist/constants/headerKeys.js +1 -0
  135. package/dist/constants/secretQuestions.d.ts +3 -0
  136. package/dist/constants/secretQuestions.js +24 -0
  137. package/dist/constants/storageKeys.d.ts +2 -0
  138. package/dist/constants/storageKeys.js +2 -0
  139. package/dist/icons/index.d.ts +65 -0
  140. package/dist/icons/index.js +65 -0
  141. package/dist/images/hacksaw-gaming.png +0 -0
  142. package/dist/images/libangan.png +0 -0
  143. package/dist/server/services/index.d.ts +4 -0
  144. package/dist/server/services/index.js +4 -0
  145. package/dist/server/utils/index.d.ts +29 -0
  146. package/dist/server/utils/index.js +29 -0
  147. package/dist/services/queries.d.ts +4 -2
  148. package/dist/services/queries.js +2436 -2361
  149. package/dist/services/wallet.d.ts +33 -0
  150. package/dist/services/wallet.js +21 -1
  151. package/dist/styles/theme.css +693 -693
  152. package/dist/types/index.d.ts +2 -0
  153. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  154. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  155. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  156. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  157. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  158. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  159. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  160. package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
  161. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  162. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  163. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  164. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  165. package/dist/ui/Menu/Menu.d.ts +90 -90
  166. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  167. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  168. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  169. package/dist/ui/Presence.d.ts +2 -0
  170. package/dist/ui/Presence.js +7 -0
  171. package/dist/ui/Progress/Progress.d.ts +27 -27
  172. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  173. package/dist/ui/Prose.d.ts +2 -0
  174. package/dist/ui/Prose.js +5 -0
  175. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  176. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  177. package/dist/ui/Select/Select.d.ts +45 -45
  178. package/dist/ui/Select/select.recipe.d.ts +3 -3
  179. package/dist/ui/Table/Table.d.ts +21 -21
  180. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  181. package/dist/ui/Table/table.recipe.d.ts +3 -3
  182. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  183. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  184. package/dist/ui/index.d.ts +26 -0
  185. package/dist/ui/index.js +26 -0
  186. package/dist/utils/index.d.ts +17 -0
  187. package/dist/utils/index.js +17 -0
  188. package/dist/utils/isMobile.d.ts +5 -0
  189. package/dist/utils/isMobile.js +9 -0
  190. package/dist/utils/mutationKeys.d.ts +2 -0
  191. package/dist/utils/mutationKeys.js +8 -0
  192. package/dist/utils/resizeImageSize.d.ts +0 -1
  193. package/dist/utils/resizeImageSize.js +0 -5
  194. package/package.json +164 -164
  195. package/dist/components/KYC/loadModels.d.ts +0 -1
  196. package/dist/components/KYC/loadModels.js +0 -9
  197. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
  198. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
  199. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
  200. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
  201. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
  202. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
  203. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
  204. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
  205. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
  206. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
  207. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
  208. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
  209. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
  210. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
  211. package/dist/constants/BranchCode.d.ts +0 -4
  212. package/dist/constants/BranchCode.js +0 -42
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery';
2
+ export * from './useAuthenticateMutation';
3
+ export * from './useAvailablePromosQuery';
4
+ export * from './useAvailableQuestsQuery';
5
+ export * from './useBetRecordsQuery';
6
+ export * from './useBonusesQuery';
7
+ export * from './useBonusQuery';
8
+ export * from './useCashbackBonusesQuery';
9
+ export * from './useCashbackBonusQuery';
10
+ export * from './useCashbackQuery';
11
+ export * from './useCashbacksQuery';
12
+ export * from './useCheckInDailyCheckInQuestMutation';
13
+ export * from './useChunk';
14
+ export * from './useClaimCashbackBonusMutation';
15
+ export * from './useClaimSpotBonusMutation';
16
+ export * from './useControllableState';
17
+ export * from './useCooldown';
18
+ export * from './useCreateGameSessionMutation';
19
+ export * from './useCreateGCashDepositMutation';
20
+ export * from './useCreateGCashWithdrawalMutation';
21
+ export * from './useCreateInstapayWithdrawalMutation';
22
+ export * from './useCreateMayaAppDepositMutation';
23
+ export * from './useCreateMayaAppWithdrawalMutation';
24
+ export * from './useCreateMayaDepositMutation';
25
+ export * from './useCreateMayaWithdrawalMutation';
26
+ export * from './useCreateOnlineBankDepositMutation';
27
+ export * from './useCreateQRPHDepositMutation';
28
+ export * from './useDepositQuery';
29
+ export * from './useDepositRecordsQuery';
30
+ export * from './useDepositsCountQuery';
31
+ export * from './useDisclosure';
32
+ export * from './useEndGameSessionMutation';
33
+ export * from './useFavoriteGamesQuery';
34
+ export * from './useGamesQuery';
35
+ export * from './useGlobalStore';
36
+ export * from './useInfiniteQueryHelper';
37
+ export * from './useInstapayBankListQuery';
38
+ export * from './useIsMayaSessionValidQuery';
39
+ export * from './useJackpotsQuery';
40
+ export * from './useLocaleInfo';
41
+ export * from './useMarkGameAsFavoriteMutation';
42
+ export * from './useMarkMessageAsReadMutation';
43
+ export * from './useMemberVerificationQuery';
44
+ export * from './useMessagesQuery';
45
+ export * from './useMobileNumberParser';
46
+ export * from './useOnMMA';
47
+ export * from './usePaymentSettingsQuery';
48
+ export * from './usePlatformQuery';
49
+ export * from './useProfileCompletionQuery';
50
+ export * from './usePromoQuery';
51
+ export * from './usePromosQuery';
52
+ export * from './useRemainingTime';
53
+ export * from './useSendVerificationCodeMutation';
54
+ export * from './useSessionQuery';
55
+ export * from './useSignInMutation';
56
+ export * from './useSignOutMutation';
57
+ export * from './useSignUpMutation';
58
+ export * from './useTopWinsQuery';
59
+ export * from './useTournamentsQuery';
60
+ export * from './useTransactionRecordsQuery';
61
+ export * from './useUnmarkGameAsFavoriteMutation';
62
+ export * from './useUnreadMessagesCountQuery';
63
+ export * from './useUpdateAccountMutation';
64
+ export * from './useWalletQuery';
65
+ export * from './useWithdrawalRecordsQuery';
@@ -0,0 +1,65 @@
1
+ export * from './useAccountQuery.js';
2
+ export * from './useAuthenticateMutation.js';
3
+ export * from './useAvailablePromosQuery.js';
4
+ export * from './useAvailableQuestsQuery.js';
5
+ export * from './useBetRecordsQuery.js';
6
+ export * from './useBonusesQuery.js';
7
+ export * from './useBonusQuery.js';
8
+ export * from './useCashbackBonusesQuery.js';
9
+ export * from './useCashbackBonusQuery.js';
10
+ export * from './useCashbackQuery.js';
11
+ export * from './useCashbacksQuery.js';
12
+ export * from './useCheckInDailyCheckInQuestMutation.js';
13
+ export * from './useChunk.js';
14
+ export * from './useClaimCashbackBonusMutation.js';
15
+ export * from './useClaimSpotBonusMutation.js';
16
+ export * from './useControllableState.js';
17
+ export * from './useCooldown.js';
18
+ export * from './useCreateGameSessionMutation.js';
19
+ export * from './useCreateGCashDepositMutation.js';
20
+ export * from './useCreateGCashWithdrawalMutation.js';
21
+ export * from './useCreateInstapayWithdrawalMutation.js';
22
+ export * from './useCreateMayaAppDepositMutation.js';
23
+ export * from './useCreateMayaAppWithdrawalMutation.js';
24
+ export * from './useCreateMayaDepositMutation.js';
25
+ export * from './useCreateMayaWithdrawalMutation.js';
26
+ export * from './useCreateOnlineBankDepositMutation.js';
27
+ export * from './useCreateQRPHDepositMutation.js';
28
+ export * from './useDepositQuery.js';
29
+ export * from './useDepositRecordsQuery.js';
30
+ export * from './useDepositsCountQuery.js';
31
+ export * from './useDisclosure.js';
32
+ export * from './useEndGameSessionMutation.js';
33
+ export * from './useFavoriteGamesQuery.js';
34
+ export * from './useGamesQuery.js';
35
+ export * from './useGlobalStore.js';
36
+ export * from './useInfiniteQueryHelper.js';
37
+ export * from './useInstapayBankListQuery.js';
38
+ export * from './useIsMayaSessionValidQuery.js';
39
+ export * from './useJackpotsQuery.js';
40
+ export * from './useLocaleInfo.js';
41
+ export * from './useMarkGameAsFavoriteMutation.js';
42
+ export * from './useMarkMessageAsReadMutation.js';
43
+ export * from './useMemberVerificationQuery.js';
44
+ export * from './useMessagesQuery.js';
45
+ export * from './useMobileNumberParser.js';
46
+ export * from './useOnMMA.js';
47
+ export * from './usePaymentSettingsQuery.js';
48
+ export * from './usePlatformQuery.js';
49
+ export * from './useProfileCompletionQuery.js';
50
+ export * from './usePromoQuery.js';
51
+ export * from './usePromosQuery.js';
52
+ export * from './useRemainingTime.js';
53
+ export * from './useSendVerificationCodeMutation.js';
54
+ export * from './useSessionQuery.js';
55
+ export * from './useSignInMutation.js';
56
+ export * from './useSignOutMutation.js';
57
+ export * from './useSignUpMutation.js';
58
+ export * from './useTopWinsQuery.js';
59
+ export * from './useTournamentsQuery.js';
60
+ export * from './useTransactionRecordsQuery.js';
61
+ export * from './useUnmarkGameAsFavoriteMutation.js';
62
+ export * from './useUnreadMessagesCountQuery.js';
63
+ export * from './useUpdateAccountMutation.js';
64
+ export * from './useWalletQuery.js';
65
+ export * from './useWithdrawalRecordsQuery.js';
@@ -0,0 +1,4 @@
1
+ import type { SetOptional } from 'type-fest';
2
+ import { type CreateLibanganDepositInput } from '../../services/wallet';
3
+ import type { Deposit, Mutation } from '../../types';
4
+ export declare const useCreateLibanganDepositMutation: Mutation<Deposit, SetOptional<CreateLibanganDepositInput, 'id'>>;
@@ -0,0 +1,73 @@
1
+ import { ObjectId } from '@opexa/object-id';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ import { clamp } from 'lodash-es';
4
+ import invariant from 'tiny-invariant';
5
+ import { ObjectType } from '../../services/ObjectType.js';
6
+ import { createLibanganDeposit, getDeposit, } from '../../services/wallet.js';
7
+ import { createPoll } from '../../utils/createPoll.js';
8
+ import { getQueryClient } from '../../utils/getQueryClient.js';
9
+ import { getCreateLibanganDepositMutationKey } from '../../utils/mutationKeys.js';
10
+ import { parseDecimal } from '../../utils/parseDecimal.js';
11
+ import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
12
+ import { getSession } from '../services/getSession.js';
13
+ export const useCreateLibanganDepositMutation = (config) => {
14
+ const queryClient = getQueryClient();
15
+ const mutation = useMutation({
16
+ ...config,
17
+ mutationKey: getCreateLibanganDepositMutationKey(),
18
+ mutationFn: async (input) => {
19
+ const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
20
+ const session = await getSession();
21
+ invariant(session.status === 'authenticated');
22
+ await createLibanganDeposit({ ...input, id }, {
23
+ headers: {
24
+ Authorization: `Bearer ${session.token}`,
25
+ ...(session.domain && {
26
+ Domain: session.domain,
27
+ }),
28
+ },
29
+ });
30
+ const poll = createPoll(async () => {
31
+ const session = await getSession();
32
+ invariant(session.status === 'authenticated');
33
+ return await getDeposit(id, {
34
+ headers: {
35
+ Authorization: `Bearer ${session.token}`,
36
+ },
37
+ });
38
+ }, {
39
+ until(res) {
40
+ return !!res?.checkoutUrl;
41
+ },
42
+ interval: 1000,
43
+ maxAttempt: 5,
44
+ });
45
+ const res = await poll();
46
+ if (!res?.checkoutUrl) {
47
+ const error = new Error();
48
+ error.name = 'LibanganDepositError';
49
+ error.message = 'Failed to process Libangan deposit';
50
+ throw error;
51
+ }
52
+ const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
53
+ if (depositsCount <= 0) {
54
+ queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
55
+ return prev?.map((quest) => {
56
+ const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
57
+ if (quest.type === 'ONBOARDING') {
58
+ return {
59
+ ...quest,
60
+ status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
61
+ progressPercentage: progressPercentage.toFixed(2),
62
+ };
63
+ }
64
+ return quest;
65
+ });
66
+ });
67
+ }
68
+ queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
69
+ return res;
70
+ },
71
+ });
72
+ return mutation;
73
+ };
@@ -0,0 +1,4 @@
1
+ import type { SetOptional } from 'type-fest';
2
+ import { type CreateVentajaWithdrawalInput } from '../../services/wallet';
3
+ import type { Mutation } from '../../types';
4
+ export declare const useCreateVentajaWithdrawalMutation: Mutation<string, SetOptional<CreateVentajaWithdrawalInput, 'id'>>;
@@ -0,0 +1,28 @@
1
+ import { ObjectId } from '@opexa/object-id';
2
+ import { useMutation } from '@tanstack/react-query';
3
+ import invariant from 'tiny-invariant';
4
+ import { ObjectType } from '../../services/ObjectType.js';
5
+ import { createVentajaWithdrawal, } from '../../services/wallet.js';
6
+ import { getCreateVentajaWithdrawalMutationKey } from '../../utils/mutationKeys.js';
7
+ import { getSession } from '../services/getSession.js';
8
+ export const useCreateVentajaWithdrawalMutation = (config) => {
9
+ const mutation = useMutation({
10
+ ...config,
11
+ mutationKey: getCreateVentajaWithdrawalMutationKey(),
12
+ mutationFn: async (input) => {
13
+ const id = input.id ?? ObjectId.generate(ObjectType.Withdrawal).toString();
14
+ const session = await getSession();
15
+ invariant(session.status === 'authenticated');
16
+ await createVentajaWithdrawal({ ...input, id }, {
17
+ headers: {
18
+ Authorization: `Bearer ${session.token}`,
19
+ ...(session.domain && {
20
+ Domain: session.domain,
21
+ }),
22
+ },
23
+ });
24
+ return id;
25
+ },
26
+ });
27
+ return mutation;
28
+ };
@@ -0,0 +1,4 @@
1
+ export * from './authenticate';
2
+ export * from './getSession';
3
+ export * from './signIn';
4
+ export * from './signOut';
@@ -0,0 +1,4 @@
1
+ export * from './authenticate.js';
2
+ export * from './getSession.js';
3
+ export * from './signIn.js';
4
+ export * from './signOut.js';
@@ -0,0 +1,3 @@
1
+ export * from './createContext';
2
+ export * from './createRecipeContext';
3
+ export * from './toaster';
@@ -0,0 +1,3 @@
1
+ export * from './createContext.js';
2
+ export * from './createRecipeContext.js';
3
+ export * from './toaster.js';
@@ -13,7 +13,7 @@ import piggyBank from '../../images/piggy-bank.png';
13
13
  import { Badge } from '../../ui/Badge/index.js';
14
14
  import { Collapsible } from '../../ui/Collapsible/index.js';
15
15
  import { Progress } from '../../ui/Progress/index.js';
16
- import { Prose } from '../../ui/Prose/index.js';
16
+ import { Prose } from '../../ui/Prose.js';
17
17
  import { capitalize } from '../../utils/capitalize.js';
18
18
  import { formatNumber } from '../../utils/formatNumber.js';
19
19
  import { parseDecimal } from '../../utils/parseDecimal.js';
@@ -11,7 +11,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
11
11
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
12
12
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
13
13
  import { Button } from '../../ui/Button/index.js';
14
- import { Prose } from '../../ui/Prose/index.js';
14
+ import { Prose } from '../../ui/Prose.js';
15
15
  export function Cashback__client(props) {
16
16
  const availablePromosQuery = useAvailablePromosQuery();
17
17
  const cashbackQuery = useCashbackQuery(props.id);
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import Image from 'next/image';
4
4
  import Link from 'next/link';
5
5
  import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
6
- import { Prose } from '../../ui/Prose/index.js';
6
+ import { Prose } from '../../ui/Prose.js';
7
7
  import { stripTags } from '../../utils/stripTags.js';
8
8
  export function CustomPromo(props) {
9
9
  return (_jsxs(_Fragment, { children: [_jsx("meta", { name: "description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:title", content: props.promo.name }), _jsx("meta", { name: "og:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "og:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:title", content: props.promo.name }), _jsx("meta", { name: "twitter:description", content: stripTags(props.promo.description) }), _jsx("meta", { name: "twitter:image", content: props.promo.banner }), _jsx("meta", { name: "twitter:card", content: "summary_large_image" }), _jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllPromosUrl ?? '/promos', className: "text-button-tertiary-fg flex w-fit items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to all Promotions"] }), _jsx(Image, { src: props.promo.banner, alt: "", width: 1024, height: 600, priority: true, unoptimized: true, className: "mt-xl h-auto w-full rounded-xl lg:mt-6" }), _jsx("h1", { className: "mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: props.promo.name }), _jsx(Prose, { className: "mt-2xl lg:mt-6", dangerouslySetInnerHTML: {
@@ -8,6 +8,7 @@ import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
8
8
  import { onMobileDevice } from '../../../utils/onMobileDevice.js';
9
9
  import { PaymentMethods } from '../PaymentMethods.js';
10
10
  import { GCashDeposit } from './GCashDeposit/GCashDeposit.js';
11
+ import { LibanganDeposit } from './LibanganDeposit/LibanganDeposit.js';
11
12
  import { MayaAppDeposit } from './MayaAppDeposit/MayaAppDeposit.js';
12
13
  import { MayaDeposit } from './MayaDeposit/MayaDeposit.js';
13
14
  import { OnlineBankDeposit } from './OnlineBankDeposit/OnlineBankDeposit.js';
@@ -34,6 +35,9 @@ export function Deposit() {
34
35
  if (paymentSettings?.onlineBankDepositGatewaySettings?.mobileWebEnabled) {
35
36
  l.push('ONLINE_BANK');
36
37
  }
38
+ if (paymentSettings?.libanganDepositGatewaySettings?.mobileWebEnabled) {
39
+ l.push('LIBANGAN');
40
+ }
37
41
  }
38
42
  else {
39
43
  if (paymentSettings?.gcashDepositGatewaySettings?.webEnabled) {
@@ -48,6 +52,9 @@ export function Deposit() {
48
52
  if (paymentSettings?.onlineBankDepositGatewaySettings?.webEnabled) {
49
53
  l.push('ONLINE_BANK');
50
54
  }
55
+ if (paymentSettings?.libanganDepositGatewaySettings?.webEnabled) {
56
+ l.push('LIBANGAN');
57
+ }
51
58
  }
52
59
  return l;
53
60
  })();
@@ -68,7 +75,7 @@ export function Deposit() {
68
75
  if (enabledPaymentMethods.length <= 0) {
69
76
  return _jsx(NoAvailablePaymentMethods, {});
70
77
  }
71
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {})] }));
78
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'QRPH' && _jsx(QRPHDeposit, {}), paymentMethod === 'GCASH' && _jsx(GCashDeposit, {}), paymentMethod === 'MAYA' && _jsx(MayaDeposit, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppDeposit, {}), paymentMethod === 'ONLINE_BANK' && _jsx(OnlineBankDeposit, {}), paymentMethod === 'LIBANGAN' && _jsx(LibanganDeposit, {})] }));
72
79
  }
73
80
  function MayaSessionSessionExpired() {
74
81
  return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(AlertCircleIcon, { className: "text-text-featured-icon-light-warning size-6" }) }), _jsx("h2", { className: "mt-lg text-center text-lg font-semibold", children: "Session Expired" }), _jsx("p", { className: "text-text-tertiary-600 mx-auto mt-xs max-w-[25rem] text-center text-sm", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
@@ -0,0 +1 @@
1
+ export declare function LibanganDeposit(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,175 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import Link from 'next/link';
4
+ import { useEffect, useState } from 'react';
5
+ import { Controller, useForm } from 'react-hook-form';
6
+ import invariant from 'tiny-invariant';
7
+ import { z } from 'zod';
8
+ import { useShallow } from 'zustand/shallow';
9
+ import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
10
+ import { useCreateLibanganDepositMutation } from '../../../../client/hooks/useCreateLibanganDepositMutation.js';
11
+ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
12
+ import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
13
+ import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
14
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
15
+ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
16
+ import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
17
+ import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
18
+ import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
19
+ import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
20
+ import { XIcon } from '../../../../icons/XIcon.js';
21
+ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
+ import { Button } from '../../../../ui/Button/index.js';
23
+ import { Field } from '../../../../ui/Field/index.js';
24
+ import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
+ import { Portal } from '../../../../ui/Portal/index.js';
26
+ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
+ import { AmountChoices } from '../../AmountChoices.js';
28
+ import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
+ import { AvailablePromos } from '../AvailablePromos.js';
30
+ export function LibanganDeposit() {
31
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
32
+ const disclosure = useDisclosure();
33
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
34
+ depositWithdrawal: ctx.depositWithdrawal,
35
+ })));
36
+ const [status, setStatus] = useState('waiting');
37
+ const createDepositMutation = useCreateLibanganDepositMutation({
38
+ onMutate() {
39
+ disclosure.setOpen(true);
40
+ setStatus('processing');
41
+ },
42
+ onSuccess(data) {
43
+ invariant(data.checkoutUrl);
44
+ window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
45
+ form.reset();
46
+ disclosure.setOpen(false);
47
+ },
48
+ onError() {
49
+ disclosure.setOpen(true);
50
+ setStatus('failed');
51
+ },
52
+ });
53
+ const depositQuery = useDepositQuery(createDepositMutation.data?.id, {
54
+ enabled: createDepositMutation.data != null,
55
+ refetchInterval(ctx) {
56
+ if (ctx.state.data?.status === 'CANCELLED' ||
57
+ ctx.state.data?.status === 'CONFIRMED') {
58
+ return false;
59
+ }
60
+ else {
61
+ return 2500;
62
+ }
63
+ },
64
+ });
65
+ useEffect(() => {
66
+ if (depositQuery.data?.status === 'CANCELLED') {
67
+ disclosure.setOpen(true);
68
+ setStatus('failed');
69
+ }
70
+ else if (depositQuery.data?.status === 'CONFIRMED') {
71
+ disclosure.setOpen(true);
72
+ setStatus('success');
73
+ }
74
+ }, [depositQuery.data?.status, disclosure]);
75
+ const depositsCountQuery = useDepositsCountQuery();
76
+ const depositsCount = depositsCountQuery.data ?? 0;
77
+ const paymentSettingsQuery = usePaymentSettingsQuery();
78
+ const paymentSettings = paymentSettingsQuery.data;
79
+ const gatewaySettings = paymentSettings?.libanganDepositGatewaySettings;
80
+ const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
81
+ const minimumAmount = depositsCount <= 0
82
+ ? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
83
+ : parseDecimal(gatewaySettings?.minimumAmount, 0);
84
+ const promosQuery = useAvailablePromosQuery();
85
+ const promos = promosQuery.data ?? [];
86
+ const definition = z
87
+ .object({
88
+ amount: z.string().superRefine((val, ctx) => {
89
+ const n = parseDecimal(val, 0);
90
+ if (n < minimumAmount) {
91
+ ctx.addIssue({
92
+ type: 'number',
93
+ code: z.ZodIssueCode.too_small,
94
+ inclusive: true,
95
+ minimum: minimumAmount,
96
+ message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
97
+ });
98
+ }
99
+ if (n > maximumAmount) {
100
+ ctx.addIssue({
101
+ type: 'number',
102
+ code: z.ZodIssueCode.too_big,
103
+ inclusive: true,
104
+ maximum: maximumAmount,
105
+ message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
106
+ });
107
+ }
108
+ }),
109
+ promo: z.string().optional().nullable(),
110
+ })
111
+ .superRefine((value, ctx) => {
112
+ const promo = promos.find((o) => o.id === value.promo);
113
+ const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
114
+ const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
115
+ const amount = parseDecimal(value.amount, 0);
116
+ if (promo && amount < promoMinAmount) {
117
+ ctx.addIssue({
118
+ path: ['amount'],
119
+ code: z.ZodIssueCode.custom,
120
+ message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
121
+ });
122
+ }
123
+ if (promo && amount > promoMaxAmount) {
124
+ ctx.addIssue({
125
+ path: ['amount'],
126
+ code: z.ZodIssueCode.custom,
127
+ message: `Maximum amount for this promo is ${promoMaxAmount}`,
128
+ });
129
+ }
130
+ });
131
+ const form = useForm({
132
+ mode: 'all',
133
+ resolver: zodResolver(definition),
134
+ defaultValues: {
135
+ amount: '0',
136
+ promo: globalStore.depositWithdrawal.promo ?? null,
137
+ },
138
+ });
139
+ useEffect(() => {
140
+ if (minimumAmount) {
141
+ form.reset({
142
+ amount: minimumAmount.toString(),
143
+ promo: form.getValues('promo') ?? null,
144
+ });
145
+ }
146
+ }, [form, minimumAmount]);
147
+ return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
148
+ createDepositMutation.reset();
149
+ createDepositMutation.mutate({
150
+ amount: data.amount.toString(),
151
+ promo: data.promo ?? undefined,
152
+ });
153
+ }), 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) => {
154
+ o.field.onChange(details.value);
155
+ }, formatOptions: {
156
+ maximumFractionDigits: 2,
157
+ minimumFractionDigits: 0,
158
+ }, 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) => {
159
+ form.setValue('amount', value.toString(), {
160
+ shouldTouch: true,
161
+ shouldDirty: true,
162
+ shouldValidate: true,
163
+ });
164
+ }, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
165
+ o.field.onChange(value);
166
+ globalStore.depositWithdrawal.setPromo(null);
167
+ }, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", disabled: createDepositMutation.isPending, children: "Deposit" }), _jsxs("p", { className: "text-text-tertiary-600 mt-lg text-xs", children: ["By depositing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: disclosure.open, onOpenChange: (details) => {
168
+ disclosure.setOpen(details.open);
169
+ }, 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, { 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 Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
170
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
171
+ 'Your deposit has been successfully processed.', status === 'failed' &&
172
+ 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
173
+ api.setOpen(false);
174
+ }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
175
+ }
@@ -1,6 +1,6 @@
1
1
  export declare const OnlineBankDepositContext: (props: {
2
2
  value: {
3
- view: "form" | "vca";
3
+ view: "vca" | "form";
4
4
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
@@ -13,7 +13,7 @@ export declare const OnlineBankDepositContext: (props: {
13
13
  } & {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useOnlineBankDepositContext: () => {
16
- view: "form" | "vca";
16
+ view: "vca" | "form";
17
17
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Deposit } from '../../../../types';
2
2
  export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
3
3
  export declare function useOnlineBankDeposit(): {
4
- view: "form" | "vca";
4
+ view: "vca" | "form";
5
5
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
@@ -1,6 +1,6 @@
1
1
  export declare const QRPHDepositContext: (props: {
2
2
  value: {
3
- view: "form" | "qrCode";
3
+ view: "qrCode" | "form";
4
4
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
@@ -13,7 +13,7 @@ export declare const QRPHDepositContext: (props: {
13
13
  } & {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useQRPHDepositContext: () => {
16
- view: "form" | "qrCode";
16
+ view: "qrCode" | "form";
17
17
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Deposit } from '../../../../types';
2
2
  export type UseQRPHDepositReturn = ReturnType<typeof useQRPHDeposit>;
3
3
  export declare function useQRPHDeposit(): {
4
- view: "form" | "qrCode";
4
+ view: "qrCode" | "form";
5
5
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
@@ -6,6 +6,7 @@ import { CheckIcon } from '../../icons/CheckIcon.js';
6
6
  import qrph from '../../images/QRPH.png';
7
7
  import gcash from '../../images/gcash.png';
8
8
  import instapay from '../../images/instapay.png';
9
+ import libangan from '../../images/libangan.png';
9
10
  import maya from '../../images/maya.png';
10
11
  import onlineBank from '../../images/online-bank.png';
11
12
  import { Checkbox } from '../../ui/Checkbox/index.js';
@@ -42,6 +43,11 @@ const OPTIONS = [
42
43
  label: 'Instapay',
43
44
  image: instapay,
44
45
  },
46
+ {
47
+ value: 'LIBANGAN',
48
+ label: 'Libangan',
49
+ image: libangan,
50
+ },
45
51
  ];
46
52
  export function PaymentMethods(props) {
47
53
  const options = props.options?.length
@@ -57,5 +63,5 @@ export function PaymentMethods(props) {
57
63
  if (!lastValue)
58
64
  return;
59
65
  setValue(PaymentMethodDefinition.parse(lastValue));
60
- }, 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))) })] }));
66
+ }, 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: twMerge('w-auto', option.value === 'LIBANGAN' ? 'h-[2.5rem]' : 'h-[1.063rem]'), draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
61
67
  }
@@ -0,0 +1 @@
1
+ export declare function VentajaWithdrawal(): import("react/jsx-runtime").JSX.Element;