@opexa/portal-components 0.0.944 → 0.0.946
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/Banner/Banner.client.d.ts +12 -0
- package/dist/components/Banner/Banner.client.js +49 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DigitainLauncher/Loading.js +1 -1
- package/dist/components/Disclaimer/DisclaimerV2.js +1 -2
- package/dist/components/Disclaimer/DisclaimerV3.js +1 -2
- package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
- package/dist/components/Jackpots/Jackpots.module.css +288 -288
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/BasicInformation.js +1 -1
- package/dist/components/KYC/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYC.lazy.js +1 -1
- package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCNonPagCor/IdentityVerification.js +4 -5
- package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +5 -8
- package/dist/components/KYC/PersonalInformation.js +1 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +5 -5
- package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +5 -5
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/images/phone-icon.svg +10 -10
- package/dist/services/queries.js +3369 -3369
- package/dist/styles/theme.css +776 -776
- package/package.json +179 -179
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +0 -11
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +0 -126
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +0 -10
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +0 -12
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +0 -17
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +0 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +0 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +0 -41
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +0 -13
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +0 -91
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
- package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
- package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
- package/dist/components/Disclaimer/TermsOfUse.js +0 -13
- package/dist/components/FeatureFlag/FeatureFlag.d.ts +0 -1
- package/dist/components/FeatureFlag/FeatureFlag.js +0 -29
- package/dist/components/FeatureFlag/index.d.ts +0 -1
- package/dist/components/FeatureFlag/index.js +0 -1
- package/dist/components/KYC/AutoOpen.d.ts +0 -1
- package/dist/components/KYC/AutoOpen.js +0 -40
- package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/KYC/CaptureIdDocument.js +0 -219
- package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/KYC/CaptureSelfie.js +0 -285
- package/dist/components/KYC/DisplayImage.d.ts +0 -5
- package/dist/components/KYC/DisplayImage.js +0 -8
- package/dist/components/KYC/FileUpload.d.ts +0 -10
- package/dist/components/KYC/FileUpload.js +0 -72
- package/dist/components/KYC/NoCameraError.d.ts +0 -7
- package/dist/components/KYC/NoCameraError.js +0 -6
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/KYC/backup/Header.d.ts +0 -1
- package/dist/components/KYC/backup/Header.js +0 -8
- package/dist/components/KYC/backup/Indicator.d.ts +0 -1
- package/dist/components/KYC/backup/Indicator.js +0 -9
- package/dist/components/KYC/backup/KYC.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.js +0 -14
- package/dist/components/KYC/backup/KYC.lazy.d.ts +0 -1
- package/dist/components/KYC/backup/KYC.lazy.js +0 -26
- package/dist/components/KYC/backup/KYCContext.d.ts +0 -6
- package/dist/components/KYC/backup/KYCContext.js +0 -2
- package/dist/components/KYC/backup/Step1.d.ts +0 -1
- package/dist/components/KYC/backup/Step1.js +0 -13
- package/dist/components/KYC/backup/Step2.d.ts +0 -1
- package/dist/components/KYC/backup/Step2.js +0 -13
- package/dist/components/KYC/backup/Step3.d.ts +0 -1
- package/dist/components/KYC/backup/Step3.js +0 -13
- package/dist/components/KYC/backup/Step4.d.ts +0 -1
- package/dist/components/KYC/backup/Step4.js +0 -7
- package/dist/components/KYC/backup/useKYC.d.ts +0 -10
- package/dist/components/KYC/backup/useKYC.js +0 -8
- package/dist/components/KYC/loadModels.d.ts +0 -1
- package/dist/components/KYC/loadModels.js +0 -9
- package/dist/components/KYC/utils.d.ts +0 -9
- package/dist/components/KYC/utils.js +0 -79
- package/dist/components/Messages/Message.d.ts +0 -1
- package/dist/components/Messages/Message.js +0 -35
- package/dist/components/Messages/MessageContext.d.ts +0 -6
- package/dist/components/Messages/MessageContext.js +0 -2
- 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 -19
- 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 -78
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +0 -8
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +0 -9
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +0 -4
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +0 -4
- package/dist/components/Quests/WageringQuest/WageringQuest.js +0 -20
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +0 -9
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +0 -9
- package/dist/components/SignUp/SignUp.lazy.d.ts +0 -12
- package/dist/components/SignUp/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
- package/dist/components/SignUp/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -284
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
- package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +0 -41
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +0 -1
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +0 -429
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +0 -13
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +0 -26
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +0 -7
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +0 -2
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +0 -20
- package/dist/components/shared/IdDocumentField.client.d.ts +0 -25
- package/dist/components/shared/IdDocumentField.client.js +0 -204
- package/dist/components/shared/IdDocumentField.d.ts +0 -2
- package/dist/components/shared/IdDocumentField.js +0 -11
- package/dist/components/shared/SelfieField.client.d.ts +0 -20
- package/dist/components/shared/SelfieField.client.js +0 -327
- package/dist/components/shared/SelfieField.d.ts +0 -2
- package/dist/components/shared/SelfieField.js +0 -11
- package/dist/constants/BranchCode.d.ts +0 -4
- package/dist/constants/BranchCode.js +0 -42
- package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
- package/dist/handlers/postTransformIdFrontImage.js +0 -67
- package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
- package/dist/handlers/postTransformSelfieImage.js +0 -71
- package/dist/handlers.d.ts +0 -43
- package/dist/handlers.js +0 -297
- package/dist/icons/BellRingIcon.d.ts +0 -2
- package/dist/icons/BellRingIcon.js +0 -4
- package/dist/utils/dataUrlToBlob.d.ts +0 -1
- package/dist/utils/dataUrlToBlob.js +0 -11
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
- package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
- package/dist/utils/getGameName.d.ts +0 -1
- package/dist/utils/getGameName.js +0 -6
- package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
- package/dist/utils/isBetween3amAnd3pm.js +0 -5
- package/dist/utils/resizeImageSize.d.ts +0 -2
- package/dist/utils/resizeImageSize.js +0 -11
package/package.json
CHANGED
|
@@ -1,179 +1,179 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opexa/portal-components",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"exports": {
|
|
5
|
-
"./ui/*": {
|
|
6
|
-
"types": "./dist/ui/*/index.d.ts",
|
|
7
|
-
"default": "./dist/ui/*/index.js"
|
|
8
|
-
},
|
|
9
|
-
"./utils/*": {
|
|
10
|
-
"types": "./dist/utils/*.d.ts",
|
|
11
|
-
"import": "./dist/utils/*.js"
|
|
12
|
-
},
|
|
13
|
-
"./types": {
|
|
14
|
-
"types": "./dist/types/index.d.ts",
|
|
15
|
-
"import": "./dist/types/index.js"
|
|
16
|
-
},
|
|
17
|
-
"./handlers": {
|
|
18
|
-
"types": "./dist/handlers/index.d.ts",
|
|
19
|
-
"default": "./dist/handlers/index.js"
|
|
20
|
-
},
|
|
21
|
-
"./middleware": {
|
|
22
|
-
"types": "./dist/middleware.d.ts",
|
|
23
|
-
"default": "./dist/middleware.js"
|
|
24
|
-
},
|
|
25
|
-
"./constants": {
|
|
26
|
-
"types": "./dist/constants/index.d.ts",
|
|
27
|
-
"default": "./dist/constants/index.js"
|
|
28
|
-
},
|
|
29
|
-
"./services/*": {
|
|
30
|
-
"types": "./dist/services/*.d.ts",
|
|
31
|
-
"default": "./dist/services/*.js"
|
|
32
|
-
},
|
|
33
|
-
"./client-utils/*": {
|
|
34
|
-
"types": "./dist/client/utils/*.d.ts",
|
|
35
|
-
"default": "./dist/client/utils/*.js"
|
|
36
|
-
},
|
|
37
|
-
"./client-hooks/*": {
|
|
38
|
-
"types": "./dist/client/hooks/*.d.ts",
|
|
39
|
-
"default": "./dist/client/hooks/*.js"
|
|
40
|
-
},
|
|
41
|
-
"./client-services/*": {
|
|
42
|
-
"types": "./dist/client/services/*.d.ts",
|
|
43
|
-
"default": "./dist/client/services/*.js"
|
|
44
|
-
},
|
|
45
|
-
"./server-utils/*": {
|
|
46
|
-
"types": "./dist/server/utils/*.d.ts",
|
|
47
|
-
"default": "./dist/server/utils/*.js"
|
|
48
|
-
},
|
|
49
|
-
"./server-services/*": {
|
|
50
|
-
"types": "./dist/server/services/*.d.ts",
|
|
51
|
-
"default": "./dist/server/services/*.js"
|
|
52
|
-
},
|
|
53
|
-
"./next.config": {
|
|
54
|
-
"types": "./dist/next.config.d.ts",
|
|
55
|
-
"default": "./dist/next.config.js"
|
|
56
|
-
},
|
|
57
|
-
"./theme.css": "./dist/styles/theme.css",
|
|
58
|
-
"./*": {
|
|
59
|
-
"types": "./dist/components/*/index.d.ts",
|
|
60
|
-
"default": "./dist/components/*/index.js"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"files": [
|
|
64
|
-
"dist",
|
|
65
|
-
"!dist/tsconfig.tsbuildinfo",
|
|
66
|
-
"!dist/tsconfig.build.tsbuildinfo"
|
|
67
|
-
],
|
|
68
|
-
"publishConfig": {
|
|
69
|
-
"access": "public"
|
|
70
|
-
},
|
|
71
|
-
"scripts": {
|
|
72
|
-
"dev": "next dev --port 4000",
|
|
73
|
-
"build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
|
|
74
|
-
"build:app": "next build",
|
|
75
|
-
"start": "next start",
|
|
76
|
-
"release": "release-it"
|
|
77
|
-
},
|
|
78
|
-
"dependencies": {
|
|
79
|
-
"@ark-ui/react": "^5.16.0",
|
|
80
|
-
"@capacitor/android": "^7.4.3",
|
|
81
|
-
"@capacitor/app": "^7.0.2",
|
|
82
|
-
"@capacitor/camera": "^7.0.2",
|
|
83
|
-
"@capacitor/cli": "^7.4.3",
|
|
84
|
-
"@capacitor/core": "^7.4.3",
|
|
85
|
-
"@capacitor/file-transfer": "^1.0.5",
|
|
86
|
-
"@capacitor/filesystem": "^7.1.4",
|
|
87
|
-
"@capacitor/push-notifications": "^7.0.2",
|
|
88
|
-
"@capacitor/splash-screen": "^7.0.2",
|
|
89
|
-
"@date-fns/tz": "^1.2.0",
|
|
90
|
-
"@greatsumini/react-facebook-login": "^3.4.0",
|
|
91
|
-
"@mediapipe/tasks-vision": "0.10.22-rc.20250304",
|
|
92
|
-
"@next/bundle-analyzer": "^16.0.10",
|
|
93
|
-
"@next/third-parties": "^15.4.1",
|
|
94
|
-
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
95
|
-
"@react-oauth/google": "^0.12.2",
|
|
96
|
-
"@sumsub/websdk": "^2.3.18",
|
|
97
|
-
"@sumsub/websdk-react": "^2.3.18",
|
|
98
|
-
"@tailwindcss/typography": "^0.5.16",
|
|
99
|
-
"capacitor-native-biometric": "^4.2.2",
|
|
100
|
-
"capacitor-plugin-safe-area": "^4.0.0",
|
|
101
|
-
"date-fns": "^4.1.0",
|
|
102
|
-
"debug": "^4.4.3",
|
|
103
|
-
"embla-carousel-autoplay": "^8.6.0",
|
|
104
|
-
"embla-carousel-react": "^8.6.0",
|
|
105
|
-
"is-mobile": "^5.0.0",
|
|
106
|
-
"latest": "^0.2.0",
|
|
107
|
-
"lodash-es": "^4.17.21",
|
|
108
|
-
"mixpanel-browser": "^2.71.0",
|
|
109
|
-
"next-recaptcha-v3": "^1.5.2",
|
|
110
|
-
"qrcode": "^1.5.4",
|
|
111
|
-
"tailwind-merge": "^3.3.1",
|
|
112
|
-
"tailwind-variants": "^1.0.0",
|
|
113
|
-
"tailwind-zag": "^1.0.2",
|
|
114
|
-
"tiny-invariant": "^1.3.3",
|
|
115
|
-
"type-fest": "^4.41.0",
|
|
116
|
-
"usehooks-ts": "^3.1.1",
|
|
117
|
-
"zustand": "^5.0.6"
|
|
118
|
-
},
|
|
119
|
-
"devDependencies": {
|
|
120
|
-
"@hookform/resolvers": "5.1.1",
|
|
121
|
-
"@opexa/object-id": "0.1.6",
|
|
122
|
-
"@tailwindcss/postcss": "4",
|
|
123
|
-
"@tanstack/react-query": "5.83.0",
|
|
124
|
-
"@tanstack/react-query-devtools": "5.83.0",
|
|
125
|
-
"@total-typescript/ts-reset": "0.6.1",
|
|
126
|
-
"@types/lodash-es": "4.17.12",
|
|
127
|
-
"@types/node": "24",
|
|
128
|
-
"@types/qrcode": "^1.5.5",
|
|
129
|
-
"@types/react": "19.1.8",
|
|
130
|
-
"@types/react-dom": "19.1.6",
|
|
131
|
-
"copy-files-from-to": "3.12.1",
|
|
132
|
-
"next": "15.4.2-canary.0",
|
|
133
|
-
"react": "19.1.0",
|
|
134
|
-
"react-dom": "19.1.0",
|
|
135
|
-
"react-hook-form": "7.60.0",
|
|
136
|
-
"release-it": "19.1.0",
|
|
137
|
-
"tailwindcss": "4.1.11",
|
|
138
|
-
"tsc-alias": "1.8.16",
|
|
139
|
-
"typescript": "5",
|
|
140
|
-
"zod": "4.0.5"
|
|
141
|
-
},
|
|
142
|
-
"peerDependencies": {
|
|
143
|
-
"@hookform/resolvers": "^4.0.0 || ^5.0.0",
|
|
144
|
-
"@opexa/object-id": "^0.1.0",
|
|
145
|
-
"@tanstack/react-query": "^5.0.0",
|
|
146
|
-
"next": "^15.4.0-canary.1",
|
|
147
|
-
"react": "^19.0.0",
|
|
148
|
-
"react-dom": "^19.0.0",
|
|
149
|
-
"react-hook-form": "^7.0.0",
|
|
150
|
-
"tailwindcss": "^4.0.0",
|
|
151
|
-
"zod": "^3.0.0"
|
|
152
|
-
},
|
|
153
|
-
"release-it": {
|
|
154
|
-
"git": {
|
|
155
|
-
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
156
|
-
"tagName": "${npm.name}@${version}"
|
|
157
|
-
},
|
|
158
|
-
"github": {
|
|
159
|
-
"release": false
|
|
160
|
-
},
|
|
161
|
-
"hooks": {
|
|
162
|
-
"after:bump": [
|
|
163
|
-
"pnpm build"
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
"copyFiles": [
|
|
168
|
-
{
|
|
169
|
-
"from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json,webp}",
|
|
170
|
-
"to": "dist/",
|
|
171
|
-
"toFlat": false
|
|
172
|
-
}
|
|
173
|
-
],
|
|
174
|
-
"copyFilesSettings": {
|
|
175
|
-
"whenFileExists": "overwrite",
|
|
176
|
-
"removeSourceMappingURL": true,
|
|
177
|
-
"ignoreDotFilesAndFolders": false
|
|
178
|
-
}
|
|
179
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opexa/portal-components",
|
|
3
|
+
"version": "0.0.946",
|
|
4
|
+
"exports": {
|
|
5
|
+
"./ui/*": {
|
|
6
|
+
"types": "./dist/ui/*/index.d.ts",
|
|
7
|
+
"default": "./dist/ui/*/index.js"
|
|
8
|
+
},
|
|
9
|
+
"./utils/*": {
|
|
10
|
+
"types": "./dist/utils/*.d.ts",
|
|
11
|
+
"import": "./dist/utils/*.js"
|
|
12
|
+
},
|
|
13
|
+
"./types": {
|
|
14
|
+
"types": "./dist/types/index.d.ts",
|
|
15
|
+
"import": "./dist/types/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./handlers": {
|
|
18
|
+
"types": "./dist/handlers/index.d.ts",
|
|
19
|
+
"default": "./dist/handlers/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./middleware": {
|
|
22
|
+
"types": "./dist/middleware.d.ts",
|
|
23
|
+
"default": "./dist/middleware.js"
|
|
24
|
+
},
|
|
25
|
+
"./constants": {
|
|
26
|
+
"types": "./dist/constants/index.d.ts",
|
|
27
|
+
"default": "./dist/constants/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./services/*": {
|
|
30
|
+
"types": "./dist/services/*.d.ts",
|
|
31
|
+
"default": "./dist/services/*.js"
|
|
32
|
+
},
|
|
33
|
+
"./client-utils/*": {
|
|
34
|
+
"types": "./dist/client/utils/*.d.ts",
|
|
35
|
+
"default": "./dist/client/utils/*.js"
|
|
36
|
+
},
|
|
37
|
+
"./client-hooks/*": {
|
|
38
|
+
"types": "./dist/client/hooks/*.d.ts",
|
|
39
|
+
"default": "./dist/client/hooks/*.js"
|
|
40
|
+
},
|
|
41
|
+
"./client-services/*": {
|
|
42
|
+
"types": "./dist/client/services/*.d.ts",
|
|
43
|
+
"default": "./dist/client/services/*.js"
|
|
44
|
+
},
|
|
45
|
+
"./server-utils/*": {
|
|
46
|
+
"types": "./dist/server/utils/*.d.ts",
|
|
47
|
+
"default": "./dist/server/utils/*.js"
|
|
48
|
+
},
|
|
49
|
+
"./server-services/*": {
|
|
50
|
+
"types": "./dist/server/services/*.d.ts",
|
|
51
|
+
"default": "./dist/server/services/*.js"
|
|
52
|
+
},
|
|
53
|
+
"./next.config": {
|
|
54
|
+
"types": "./dist/next.config.d.ts",
|
|
55
|
+
"default": "./dist/next.config.js"
|
|
56
|
+
},
|
|
57
|
+
"./theme.css": "./dist/styles/theme.css",
|
|
58
|
+
"./*": {
|
|
59
|
+
"types": "./dist/components/*/index.d.ts",
|
|
60
|
+
"default": "./dist/components/*/index.js"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
"dist",
|
|
65
|
+
"!dist/tsconfig.tsbuildinfo",
|
|
66
|
+
"!dist/tsconfig.build.tsbuildinfo"
|
|
67
|
+
],
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"dev": "next dev --port 4000",
|
|
73
|
+
"build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json && copy-files-from-to",
|
|
74
|
+
"build:app": "next build",
|
|
75
|
+
"start": "next start",
|
|
76
|
+
"release": "release-it"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"@ark-ui/react": "^5.16.0",
|
|
80
|
+
"@capacitor/android": "^7.4.3",
|
|
81
|
+
"@capacitor/app": "^7.0.2",
|
|
82
|
+
"@capacitor/camera": "^7.0.2",
|
|
83
|
+
"@capacitor/cli": "^7.4.3",
|
|
84
|
+
"@capacitor/core": "^7.4.3",
|
|
85
|
+
"@capacitor/file-transfer": "^1.0.5",
|
|
86
|
+
"@capacitor/filesystem": "^7.1.4",
|
|
87
|
+
"@capacitor/push-notifications": "^7.0.2",
|
|
88
|
+
"@capacitor/splash-screen": "^7.0.2",
|
|
89
|
+
"@date-fns/tz": "^1.2.0",
|
|
90
|
+
"@greatsumini/react-facebook-login": "^3.4.0",
|
|
91
|
+
"@mediapipe/tasks-vision": "0.10.22-rc.20250304",
|
|
92
|
+
"@next/bundle-analyzer": "^16.0.10",
|
|
93
|
+
"@next/third-parties": "^15.4.1",
|
|
94
|
+
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
95
|
+
"@react-oauth/google": "^0.12.2",
|
|
96
|
+
"@sumsub/websdk": "^2.3.18",
|
|
97
|
+
"@sumsub/websdk-react": "^2.3.18",
|
|
98
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
99
|
+
"capacitor-native-biometric": "^4.2.2",
|
|
100
|
+
"capacitor-plugin-safe-area": "^4.0.0",
|
|
101
|
+
"date-fns": "^4.1.0",
|
|
102
|
+
"debug": "^4.4.3",
|
|
103
|
+
"embla-carousel-autoplay": "^8.6.0",
|
|
104
|
+
"embla-carousel-react": "^8.6.0",
|
|
105
|
+
"is-mobile": "^5.0.0",
|
|
106
|
+
"latest": "^0.2.0",
|
|
107
|
+
"lodash-es": "^4.17.21",
|
|
108
|
+
"mixpanel-browser": "^2.71.0",
|
|
109
|
+
"next-recaptcha-v3": "^1.5.2",
|
|
110
|
+
"qrcode": "^1.5.4",
|
|
111
|
+
"tailwind-merge": "^3.3.1",
|
|
112
|
+
"tailwind-variants": "^1.0.0",
|
|
113
|
+
"tailwind-zag": "^1.0.2",
|
|
114
|
+
"tiny-invariant": "^1.3.3",
|
|
115
|
+
"type-fest": "^4.41.0",
|
|
116
|
+
"usehooks-ts": "^3.1.1",
|
|
117
|
+
"zustand": "^5.0.6"
|
|
118
|
+
},
|
|
119
|
+
"devDependencies": {
|
|
120
|
+
"@hookform/resolvers": "5.1.1",
|
|
121
|
+
"@opexa/object-id": "0.1.6",
|
|
122
|
+
"@tailwindcss/postcss": "4",
|
|
123
|
+
"@tanstack/react-query": "5.83.0",
|
|
124
|
+
"@tanstack/react-query-devtools": "5.83.0",
|
|
125
|
+
"@total-typescript/ts-reset": "0.6.1",
|
|
126
|
+
"@types/lodash-es": "4.17.12",
|
|
127
|
+
"@types/node": "24",
|
|
128
|
+
"@types/qrcode": "^1.5.5",
|
|
129
|
+
"@types/react": "19.1.8",
|
|
130
|
+
"@types/react-dom": "19.1.6",
|
|
131
|
+
"copy-files-from-to": "3.12.1",
|
|
132
|
+
"next": "15.4.2-canary.0",
|
|
133
|
+
"react": "19.1.0",
|
|
134
|
+
"react-dom": "19.1.0",
|
|
135
|
+
"react-hook-form": "7.60.0",
|
|
136
|
+
"release-it": "19.1.0",
|
|
137
|
+
"tailwindcss": "4.1.11",
|
|
138
|
+
"tsc-alias": "1.8.16",
|
|
139
|
+
"typescript": "5",
|
|
140
|
+
"zod": "4.0.5"
|
|
141
|
+
},
|
|
142
|
+
"peerDependencies": {
|
|
143
|
+
"@hookform/resolvers": "^4.0.0 || ^5.0.0",
|
|
144
|
+
"@opexa/object-id": "^0.1.0",
|
|
145
|
+
"@tanstack/react-query": "^5.0.0",
|
|
146
|
+
"next": "^15.4.0-canary.1",
|
|
147
|
+
"react": "^19.0.0",
|
|
148
|
+
"react-dom": "^19.0.0",
|
|
149
|
+
"react-hook-form": "^7.0.0",
|
|
150
|
+
"tailwindcss": "^4.0.0",
|
|
151
|
+
"zod": "^3.0.0"
|
|
152
|
+
},
|
|
153
|
+
"release-it": {
|
|
154
|
+
"git": {
|
|
155
|
+
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
156
|
+
"tagName": "${npm.name}@${version}"
|
|
157
|
+
},
|
|
158
|
+
"github": {
|
|
159
|
+
"release": false
|
|
160
|
+
},
|
|
161
|
+
"hooks": {
|
|
162
|
+
"after:bump": [
|
|
163
|
+
"pnpm build"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"copyFiles": [
|
|
168
|
+
{
|
|
169
|
+
"from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json,webp}",
|
|
170
|
+
"to": "dist/",
|
|
171
|
+
"toFlat": false
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"copyFilesSettings": {
|
|
175
|
+
"whenFileExists": "overwrite",
|
|
176
|
+
"removeSourceMappingURL": true,
|
|
177
|
+
"ignoreDotFilesAndFolders": false
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Confirmed(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CheckCircleIcon } from '../../../../icons/CheckCircleIcon.js';
|
|
3
|
-
import { XIcon } from '../../../../icons/XIcon.js';
|
|
4
|
-
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
5
|
-
import { Button } from '../../../../ui/Button/index.js';
|
|
6
|
-
import { Portal } from '../../../../ui/Portal/index.js';
|
|
7
|
-
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
8
|
-
export function Confirmed() {
|
|
9
|
-
const context = useQRPHDepositContext();
|
|
10
|
-
return (_jsx(AlertDialog.Root, { open: context.status === 'confirmed', lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)]", children: _jsxs(AlertDialog.Content, { children: [_jsx("button", { type: "button", className: "absolute top-4 right-4 icon:size-6 p-md text-text-quinary disabled:cursor-not-allowed disabled:opacity-50", onClick: context.reset, children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-success-secondary", children: _jsx(CheckCircleIcon, { className: "size-6 text-text-featured-icon-light-success" }) }), _jsx(AlertDialog.Title, { className: "mt-xl", children: "Your deposit was successful!" }), _jsx(AlertDialog.Description, { className: "mt-xl px-3", children: "The funds have been added to your account." }), _jsx(Button, { className: "mt-4xl w-full", onClick: context.reset, children: "Ok" })] }) })] }) }));
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Failed(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
3
|
-
import { XIcon } from '../../../../icons/XIcon.js';
|
|
4
|
-
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
5
|
-
import { Button } from '../../../../ui/Button/index.js';
|
|
6
|
-
import { Portal } from '../../../../ui/Portal/index.js';
|
|
7
|
-
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
8
|
-
export function Failed() {
|
|
9
|
-
const context = useQRPHDepositContext();
|
|
10
|
-
return (_jsx(AlertDialog.Root, { open: context.status === 'failed', lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)]", children: _jsxs(AlertDialog.Content, { children: [_jsx("button", { type: "button", className: "absolute top-4 right-4 icon:size-6 p-md text-text-quinary disabled:cursor-not-allowed disabled:opacity-50", onClick: context.reset, children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-error-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-error" }) }), _jsx(AlertDialog.Title, { className: "mt-xl", children: "Your deposit failed or was cancelled." }), _jsx(AlertDialog.Description, { className: "mt-xl px-3", children: "Your deposit was not completed or has been cancelled. You can try again by generating a\u00A0new\u00A0QR code." }), _jsx(Button, { className: "mt-4xl w-full", variant: "outline", onClick: context.regenerateQRCode, children: "Generate New QR Code" })] }) })] }) }));
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function Form(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,126 +0,0 @@
|
|
|
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 } from 'react';
|
|
5
|
-
import { Controller, useForm } from 'react-hook-form';
|
|
6
|
-
import { useBoolean } from 'usehooks-ts';
|
|
7
|
-
import { z } from 'zod';
|
|
8
|
-
import { useShallow } from 'zustand/shallow';
|
|
9
|
-
import { useAvailablePromosQuery } from '../../../../client/hooks/useAvailablePromosQuery.js';
|
|
10
|
-
import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
|
|
11
|
-
import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
12
|
-
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
13
|
-
import { QrCode02Icon } from '../../../../icons/QrCode02Icon.js';
|
|
14
|
-
import { XIcon } from '../../../../icons/XIcon.js';
|
|
15
|
-
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
16
|
-
import { Button } from '../../../../ui/Button/index.js';
|
|
17
|
-
import { Field } from '../../../../ui/Field/index.js';
|
|
18
|
-
import { Portal } from '../../../../ui/Portal/index.js';
|
|
19
|
-
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
20
|
-
import { AmountChoices } from '../../AmountChoices.js';
|
|
21
|
-
import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
|
|
22
|
-
import { AvailablePromos } from '../AvailablePromos.js';
|
|
23
|
-
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
24
|
-
export function Form() {
|
|
25
|
-
const depositWithdrawalProps = useDepositWithdrawalPropsContext();
|
|
26
|
-
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
27
|
-
depositWithdrawal: ctx.depositWithdrawal,
|
|
28
|
-
})));
|
|
29
|
-
const context = useQRPHDepositContext();
|
|
30
|
-
const depositsCountQuery = useDepositsCountQuery();
|
|
31
|
-
const depositsCount = depositsCountQuery.data ?? 0;
|
|
32
|
-
const paymentSettingsQuery = usePaymentSettingsQuery();
|
|
33
|
-
const paymentSettings = paymentSettingsQuery.data;
|
|
34
|
-
const gatewaySettings = paymentSettings?.qrphDepositGatewaySettings;
|
|
35
|
-
const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
|
|
36
|
-
const minimumAmount = depositsCount <= 0
|
|
37
|
-
? parseDecimal(paymentSettingsQuery.data?.minimumFirstDepositAmount, 0)
|
|
38
|
-
: parseDecimal(gatewaySettings?.minimumAmount, 0);
|
|
39
|
-
const promosQuery = useAvailablePromosQuery();
|
|
40
|
-
const promos = promosQuery.data ?? [];
|
|
41
|
-
const definition = z
|
|
42
|
-
.object({
|
|
43
|
-
amount: z.string().superRefine((val, ctx) => {
|
|
44
|
-
const n = parseDecimal(val, 0);
|
|
45
|
-
if (val.includes('.')) {
|
|
46
|
-
ctx.addIssue({
|
|
47
|
-
code: z.ZodIssueCode.custom,
|
|
48
|
-
message: 'Amount must be a whole number',
|
|
49
|
-
});
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
if (n < minimumAmount) {
|
|
53
|
-
ctx.addIssue({
|
|
54
|
-
type: 'number',
|
|
55
|
-
code: z.ZodIssueCode.too_small,
|
|
56
|
-
inclusive: true,
|
|
57
|
-
minimum: minimumAmount,
|
|
58
|
-
message: `Minimum amount is ${minimumAmount.toLocaleString()}`,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
if (n > maximumAmount) {
|
|
62
|
-
ctx.addIssue({
|
|
63
|
-
type: 'number',
|
|
64
|
-
code: z.ZodIssueCode.too_big,
|
|
65
|
-
inclusive: true,
|
|
66
|
-
maximum: maximumAmount,
|
|
67
|
-
message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}),
|
|
71
|
-
promo: z.string().optional().nullable(),
|
|
72
|
-
})
|
|
73
|
-
.superRefine((value, ctx) => {
|
|
74
|
-
const promo = promos.find((o) => o.id === value.promo);
|
|
75
|
-
const promoMinAmount = parseDecimal(promo?.minimumDepositAmount, 0);
|
|
76
|
-
const promoMaxAmount = parseDecimal(promo?.maximumDepositAmount, 0);
|
|
77
|
-
const amount = parseDecimal(value.amount, 0);
|
|
78
|
-
if (promo && amount < promoMinAmount) {
|
|
79
|
-
ctx.addIssue({
|
|
80
|
-
path: ['amount'],
|
|
81
|
-
code: z.ZodIssueCode.custom,
|
|
82
|
-
message: `Minimum amount for this promo is ${promoMinAmount.toLocaleString()}`,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
if (promo && amount > promoMaxAmount) {
|
|
86
|
-
ctx.addIssue({
|
|
87
|
-
path: ['amount'],
|
|
88
|
-
code: z.ZodIssueCode.custom,
|
|
89
|
-
message: `Maximum amount for this promo is ${promoMaxAmount}`,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
const form = useForm({
|
|
94
|
-
mode: 'all',
|
|
95
|
-
resolver: zodResolver(definition),
|
|
96
|
-
defaultValues: {
|
|
97
|
-
amount: '0',
|
|
98
|
-
promo: globalStore.depositWithdrawal.promo ?? null,
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
useEffect(() => {
|
|
102
|
-
if (minimumAmount) {
|
|
103
|
-
form.reset({
|
|
104
|
-
amount: minimumAmount.toString(),
|
|
105
|
-
promo: form.getValues('promo') ?? null,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}, [form, minimumAmount]);
|
|
109
|
-
const confirm = useBoolean();
|
|
110
|
-
return (_jsxs("form", { onSubmit: (e) => {
|
|
111
|
-
e.preventDefault();
|
|
112
|
-
confirm.setTrue();
|
|
113
|
-
}, noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter the amount you want to deposit" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
|
|
114
|
-
form.setValue('amount', value.toString(), {
|
|
115
|
-
shouldTouch: true,
|
|
116
|
-
shouldDirty: true,
|
|
117
|
-
shouldValidate: true,
|
|
118
|
-
});
|
|
119
|
-
}, min: minimumAmount, max: maximumAmount, className: "mt-lg" }), _jsx(Controller, { control: form.control, name: "promo", render: (o) => (_jsx(AvailablePromos, { value: o.field.value, onChange: (value) => {
|
|
120
|
-
o.field.onChange(value);
|
|
121
|
-
globalStore.depositWithdrawal.setPromo(null);
|
|
122
|
-
}, className: "mt-3xl" })) }), _jsx(Button, { type: "submit", className: "mt-3xl", children: "Deposit" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 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: confirm.value, lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, 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, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary", children: _jsx(QrCode02Icon, { className: "size-6 text-text-featured-icon-light-brand" }) }), _jsx(AlertDialog.Title, { className: "mt-xl", children: "Generate Single Use QR Code" }), _jsx(AlertDialog.Description, { className: "mt-xs px-2", children: "To proceed with your QRPH deposit, please generate a QR code first." }), _jsx(Button, { className: "mt-4xl", variant: "outline", colorScheme: "gray", onClick: form.handleSubmit(async (data) => {
|
|
123
|
-
confirm.setFalse();
|
|
124
|
-
await context.generateQRCode(data);
|
|
125
|
-
}), children: "Generate QR code" })] }) })] }) })] }));
|
|
126
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function GeneratingQrCode(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Spinner02Icon } from '../../../../icons/Spinner02Icon.js';
|
|
3
|
-
import { XIcon } from '../../../../icons/XIcon.js';
|
|
4
|
-
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
5
|
-
import { Portal } from '../../../../ui/Portal/index.js';
|
|
6
|
-
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
7
|
-
export function GeneratingQrCode() {
|
|
8
|
-
const context = useQRPHDepositContext();
|
|
9
|
-
return (_jsx(AlertDialog.Root, { open: context.status === 'generating-qr-code', lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, 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: true, children: _jsx(XIcon, {}) }), _jsx(Spinner02Icon, { className: "mx-auto size-12 text-text-featured-icon-light-brand" }), _jsx(AlertDialog.Title, { className: "mt-xl", children: "Generating Single Use QR Code" }), _jsxs(AlertDialog.Description, { className: "mt-xs px-3", children: [_jsx("span", { className: "block", children: "Please hold tight as we verify the account details and amount. Once verified, a QRPH code will be displayed for you to scan and complete the transaction." }), _jsxs("span", { className: "mt-3 block", children: ["Please wait ", _jsx("span", { className: "font-bold", children: "60" }), " seconds..."] })] })] }) })] }) }));
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function QRPHDeposit(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Confirmed } from './Confirmed.js';
|
|
3
|
-
import { Failed } from './Failed.js';
|
|
4
|
-
import { Form } from './Form.js';
|
|
5
|
-
import { GeneratingQrCode } from './GeneratingQrCode.js';
|
|
6
|
-
import { QRPHDepositContext } from './QRPHDepositContext.js';
|
|
7
|
-
import { QrCodeGenerated } from './QrCodeGenerated.js';
|
|
8
|
-
import { useQRPHDeposit } from './useQRPHDeposit.js';
|
|
9
|
-
export function QRPHDeposit() {
|
|
10
|
-
const context = useQRPHDeposit();
|
|
11
|
-
return (_jsxs(QRPHDepositContext, { value: context, children: [_jsx(Form, {}), _jsx(GeneratingQrCode, {}), _jsx(QrCodeGenerated, {}), _jsx(Failed, {}), _jsx(Confirmed, {})] }));
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const QRPHDepositContext: (props: {
|
|
2
|
-
value: {
|
|
3
|
-
status: "idle" | "confirmed" | "failed" | "generating-qr-code" | "qr-code-generated";
|
|
4
|
-
deposit: import("../../../../types").Deposit | null;
|
|
5
|
-
generateQRCode: (input: import("./useQRPHDeposit").GenerateQRCodeInput) => Promise<void>;
|
|
6
|
-
regenerateQRCode: () => Promise<void>;
|
|
7
|
-
reset: () => void;
|
|
8
|
-
};
|
|
9
|
-
} & {
|
|
10
|
-
children?: import("react").ReactNode | undefined;
|
|
11
|
-
}) => React.ReactNode, useQRPHDepositContext: () => {
|
|
12
|
-
status: "idle" | "confirmed" | "failed" | "generating-qr-code" | "qr-code-generated";
|
|
13
|
-
deposit: import("../../../../types").Deposit | null;
|
|
14
|
-
generateQRCode: (input: import("./useQRPHDeposit").GenerateQRCodeInput) => Promise<void>;
|
|
15
|
-
regenerateQRCode: () => Promise<void>;
|
|
16
|
-
reset: () => void;
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function QrCodeGenerated(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Image from 'next/image';
|
|
3
|
-
import { useBoolean } from 'usehooks-ts';
|
|
4
|
-
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
5
|
-
import { ArrowCircleDownIcon } from '../../../../icons/ArrowCircleDownIcon.js';
|
|
6
|
-
import { QrCode02Icon } from '../../../../icons/QrCode02Icon.js';
|
|
7
|
-
import { XIcon } from '../../../../icons/XIcon.js';
|
|
8
|
-
import qrphIcon from '../../../../images/qrph-icon.png';
|
|
9
|
-
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
10
|
-
import { Button } from '../../../../ui/Button/index.js';
|
|
11
|
-
import { Portal } from '../../../../ui/Portal/index.js';
|
|
12
|
-
import { QrCode } from '../../../../ui/QrCode/index.js';
|
|
13
|
-
import { useQRPHDepositContext } from './QRPHDepositContext.js';
|
|
14
|
-
export function QrCodeGenerated() {
|
|
15
|
-
const context = useQRPHDepositContext();
|
|
16
|
-
const confirm = useBoolean(false);
|
|
17
|
-
return (_jsx(AlertDialog.Root, { open: context.status === 'qr-code-generated', lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, 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("button", { type: "button", className: "absolute top-4 right-4 icon:size-6 p-md text-text-quinary disabled:cursor-not-allowed disabled:opacity-50", onClick: () => {
|
|
18
|
-
if (!confirm.value) {
|
|
19
|
-
confirm.setTrue();
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
confirm.setFalse();
|
|
23
|
-
}, children: _jsx(XIcon, {}) }), !confirm.value ? (_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary", children: _jsx(QrCode02Icon, { className: "size-6 text-text-featured-icon-light-brand" }) })) : (_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-error-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-error" }) })), _jsx(AlertDialog.Title, { className: "mt-xl", dangerouslySetInnerHTML: {
|
|
24
|
-
__html: confirm.value
|
|
25
|
-
? 'Are you sure you want to close this window?'
|
|
26
|
-
: 'Single Use QR Code',
|
|
27
|
-
} }), _jsx(AlertDialog.Description, { className: "mt-xs px-3", children: confirm.value
|
|
28
|
-
? 'Closing this window will cancel your current deposit. Do you want to continue?'
|
|
29
|
-
: 'Scan the QR code below with your banking app, or upload it to complete your deposit.' }), !confirm.value && (_jsx("div", { className: "mx-auto mt-xl w-[14.125rem] rounded-xl bg-bg-primary-alt p-6", children: _jsxs(QrCode.Root, { value: context.deposit?.qrCode ?? '', encoding: {
|
|
30
|
-
ecc: 'H',
|
|
31
|
-
boostEcc: true,
|
|
32
|
-
}, children: [_jsxs("div", { className: "relative", children: [_jsx(QrCode.Frame, { className: "mx-auto size-[10rem] rounded-[0.25rem] border border-border-primary 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 }) })] }), _jsxs(QrCode.DownloadTrigger, { type: "button", fileName: `QRPH-${Date.now()}.jpg`, mimeType: "image/jpeg", className: "mx-auto mt-5 flex w-fit items-center gap-1 font-semibold text-button-tertiary-fg", children: [_jsx(ArrowCircleDownIcon, { className: "size-5" }), "Download QR Code"] })] }) })), confirm.value && (_jsxs("div", { className: "mt-4xl flex gap-lg", children: [_jsx(Button, { variant: "outline", onClick: confirm.setFalse, children: "Go back" }), _jsx(Button, { onClick: () => {
|
|
33
|
-
context.reset();
|
|
34
|
-
setTimeout(() => {
|
|
35
|
-
confirm.setFalse();
|
|
36
|
-
}, 2);
|
|
37
|
-
}, children: "Continue" })] })), !confirm.value && _jsx(Instruction, {})] }) })] }) }));
|
|
38
|
-
}
|
|
39
|
-
function Instruction() {
|
|
40
|
-
return (_jsxs(AlertDialog.Root, { lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: [_jsxs("p", { className: "mt-lg text-center text-text-tertiary-600 text-xs", children: ["Need help using the QR Code?", ' ', _jsx(AlertDialog.Trigger, { className: "text-text-brand", children: "See instructions" })] }), _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary", children: _jsx(QrCode02Icon, { className: "size-6 text-text-featured-icon-light-brand" }) }), _jsx(AlertDialog.Title, { className: "mt-xl", children: "How to Use the QR Code for Payment" }), _jsx(AlertDialog.Description, { className: "mt-xl px-3", children: "Follow these simple steps to complete your\u00A0transaction:" }), _jsx("div", { className: "mt-4 text-sm text-text-tertiary-600", children: _jsxs("ol", { className: "list-decimal pl-4", children: [_jsx("li", { className: "marker:font-mono marker:text-sm", children: "Open your preferred banking or EMI mobile app and select 'Transfer Money' or 'Pay via QR.'" }), _jsx("li", { className: "marker:font-mono marker:text-sm", children: "Scan or upload the generated QR Ph code. If prompted by the app, enter the amount to be sent." }), _jsx("li", { className: "marker:font-mono marker:text-sm", children: "Proceed with the transfer or payment." })] }) })] }) })] })] }));
|
|
41
|
-
}
|