@opexa/portal-components 0.0.244 → 0.0.245
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/client/hooks/useInfiniteQueryHelper.js +1 -1
- package/dist/components/Account/Account.lazy.js +6 -3
- package/dist/components/AccountInfo/AccountInfo.js +1 -1
- package/dist/components/AccountVerification/AccountVerification.js +5 -2
- package/dist/components/Banner/Banner.js +2 -1
- package/dist/components/BetRecords/BetRecords.client.d.ts +4 -0
- package/dist/components/BetRecords/BetRecords.client.js +2 -2
- package/dist/components/Bonuses/Bonuses.client.js +13 -8
- package/dist/components/GameLaunch/GameLaunchTrigger.js +7 -0
- package/dist/components/GameProviders/GameProvidersCarousel.js +2 -2
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/utils.js +18 -18
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
- package/dist/components/shared/IdDocumentField.client.js +204 -0
- package/dist/components/shared/IdDocumentField.d.ts +1 -24
- package/dist/components/shared/IdDocumentField.js +7 -201
- package/dist/components/shared/SelfieField.client.d.ts +20 -0
- package/dist/components/shared/SelfieField.client.js +327 -0
- package/dist/components/shared/SelfieField.d.ts +1 -20
- package/dist/components/shared/SelfieField.js +7 -314
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/queries.js +2528 -2527
- package/dist/styles/theme.css +694 -694
- package/dist/types/index.d.ts +6 -0
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
- package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
- package/dist/utils/getGameImageUrl.js +4 -6
- package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
- package/dist/utils/isBetween3amAnd3pm.js +5 -0
- package/package.json +165 -165
- 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 -45
- 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/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpForm.js +0 -283
- 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
|
@@ -13,7 +13,7 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
13
13
|
trigger: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
}, Record<"content" | "
|
|
16
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "trigger" | "positioner" | "control" | "clearTrigger" | "nextTrigger" | "prevTrigger" | "tableHeader" | "tableBody" | "tableRow" | "viewTrigger" | "monthSelect" | "yearSelect" | "presetTrigger" | "rangeText" | "tableCell" | "tableCellTrigger" | "tableHead" | "viewControl", string | string[]>, undefined, {
|
|
17
17
|
size: {
|
|
18
18
|
md: {
|
|
19
19
|
control: string;
|
|
@@ -28,7 +28,7 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
28
28
|
trigger: string;
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
|
-
}, Record<"content" | "
|
|
31
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "trigger" | "positioner" | "control" | "clearTrigger" | "nextTrigger" | "prevTrigger" | "tableHeader" | "tableBody" | "tableRow" | "viewTrigger" | "monthSelect" | "yearSelect" | "presetTrigger" | "rangeText" | "tableCell" | "tableCellTrigger" | "tableHead" | "viewControl", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
32
32
|
size: {
|
|
33
33
|
md: {
|
|
34
34
|
control: string;
|
|
@@ -43,4 +43,4 @@ export declare const datePickerRecipe: import("tailwind-variants").TVReturnType<
|
|
|
43
43
|
trigger: string;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
-
}, Record<"content" | "
|
|
46
|
+
}, Record<"content" | "table" | "input" | "label" | "view" | "root" | "trigger" | "positioner" | "control" | "clearTrigger" | "nextTrigger" | "prevTrigger" | "tableHeader" | "tableBody" | "tableRow" | "viewTrigger" | "monthSelect" | "yearSelect" | "presetTrigger" | "rangeText" | "tableCell" | "tableCellTrigger" | "tableHead" | "viewControl", string | string[]>, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GAMES_AVAILABLE_3PM_TO_3AM: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const GAMES_AVAILABLE_3PM_TO_3AM = ['Marble Race', 'Rainbow Ball'];
|
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import { cache } from 'react';
|
|
2
2
|
import { STATIC_ENDPOINT } from '../constants/index.js';
|
|
3
|
+
import { isBetween3amAnd3pm } from './isBetween3amAnd3pm.js';
|
|
3
4
|
const MARBLE_GAME_REFERENCE = 'Hwd1wEWHU6Gvfwecuh';
|
|
4
|
-
const RAINBOW_BALL_REFERENCE = '
|
|
5
|
+
const RAINBOW_BALL_REFERENCE = 'HwdJguEzp9dr6zJMrj';
|
|
5
6
|
const VERSION = '1';
|
|
6
7
|
export const getGameImageUrl = cache((args) => {
|
|
7
8
|
const id = args.id ?? args.reference;
|
|
8
9
|
const provider = args.provider.toLocaleLowerCase();
|
|
9
10
|
const version = args.version ?? VERSION;
|
|
10
|
-
const now = new Date();
|
|
11
|
-
const hour = now.getHours();
|
|
12
|
-
const isBetween3amAnd3pm = hour >= 15 || hour < 3;
|
|
13
11
|
const marbleGameOffline = `${STATIC_ENDPOINT}/images/${provider}/marble-game-offline.webp?_v=${version}`;
|
|
14
12
|
const marbleGameOnline = `${STATIC_ENDPOINT}/images/${provider}/marble-game.webp?_v=${version}`;
|
|
15
13
|
const rainbowBallOffline = `${STATIC_ENDPOINT}/images/${provider}/rainbow-ball-offline.webp?_v=${version}`;
|
|
16
14
|
const rainbowBallOnline = `${STATIC_ENDPOINT}/images/${provider}/rainbow-ball-online.webp?_v=${version}`;
|
|
17
15
|
switch (id) {
|
|
18
16
|
case MARBLE_GAME_REFERENCE:
|
|
19
|
-
return isBetween3amAnd3pm ? marbleGameOnline : marbleGameOffline;
|
|
17
|
+
return isBetween3amAnd3pm() ? marbleGameOnline : marbleGameOffline;
|
|
20
18
|
case RAINBOW_BALL_REFERENCE:
|
|
21
|
-
return isBetween3amAnd3pm ? rainbowBallOnline : rainbowBallOffline;
|
|
19
|
+
return isBetween3amAnd3pm() ? rainbowBallOnline : rainbowBallOffline;
|
|
22
20
|
default:
|
|
23
21
|
return `${STATIC_ENDPOINT}/images/${provider}/thumbnail-${id}.webp?_v=${version}`;
|
|
24
22
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBetween3amAnd3pm: () => boolean;
|
package/package.json
CHANGED
|
@@ -1,165 +1,165 @@
|
|
|
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.d.ts",
|
|
19
|
-
"default": "./dist/handlers.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
|
-
"lint": "next lint",
|
|
77
|
-
"release": "release-it"
|
|
78
|
-
},
|
|
79
|
-
"dependencies": {
|
|
80
|
-
"@ark-ui/react": "^5.16.0",
|
|
81
|
-
"@date-fns/tz": "^1.2.0",
|
|
82
|
-
"@
|
|
83
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"date-fns": "^4.1.0",
|
|
86
|
-
"embla-carousel-autoplay": "^8.6.0",
|
|
87
|
-
"embla-carousel-react": "^8.6.0",
|
|
88
|
-
"face-api.js": "^0.22.2",
|
|
89
|
-
"is-mobile": "^5.0.0",
|
|
90
|
-
"lodash-es": "^4.17.21",
|
|
91
|
-
"react-image-file-resizer": "^0.4.8",
|
|
92
|
-
"tailwind-merge": "^3.3.1",
|
|
93
|
-
"tailwind-variants": "^1.0.0",
|
|
94
|
-
"tailwind-zag": "^1.0.2",
|
|
95
|
-
"tiny-invariant": "^1.3.3",
|
|
96
|
-
"type-fest": "^4.41.0",
|
|
97
|
-
"usehooks-ts": "^3.1.1",
|
|
98
|
-
"zustand": "^5.0.6"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"@eslint/eslintrc": "3",
|
|
102
|
-
"@hookform/resolvers": "5.1.1",
|
|
103
|
-
"@opexa/object-id": "0.1.6",
|
|
104
|
-
"@tailwindcss/postcss": "4",
|
|
105
|
-
"@tanstack/react-query": "5.81.5",
|
|
106
|
-
"@tanstack/react-query-devtools": "5.81.5",
|
|
107
|
-
"@total-typescript/ts-reset": "0.6.1",
|
|
108
|
-
"@types/lodash-es": "4.17.12",
|
|
109
|
-
"@types/node": "24",
|
|
110
|
-
"@types/react": "19",
|
|
111
|
-
"@types/react-dom": "19",
|
|
112
|
-
"copy-files-from-to": "3.12.1",
|
|
113
|
-
"eslint": "9",
|
|
114
|
-
"eslint-config-next": "15.3.4",
|
|
115
|
-
"next": "15.4.0-canary.61",
|
|
116
|
-
"react": "19.1.0",
|
|
117
|
-
"react-dom": "19.1.0",
|
|
118
|
-
"react-hook-form": "7.59.0",
|
|
119
|
-
"release-it": "19.0.3",
|
|
120
|
-
"tailwindcss": "4.1.11",
|
|
121
|
-
"tsc-alias": "1.8.16",
|
|
122
|
-
"typescript": "5",
|
|
123
|
-
"zod": "3.25.71"
|
|
124
|
-
},
|
|
125
|
-
"peerDependencies": {
|
|
126
|
-
"@hookform/resolvers": "^4.0.0 || ^5.0.0",
|
|
127
|
-
"@opexa/object-id": "^0.1.0",
|
|
128
|
-
"@tanstack/react-query": "^5.0.0",
|
|
129
|
-
"next": "^15.4.0-canary.1",
|
|
130
|
-
"react": "^19.0.0",
|
|
131
|
-
"react-dom": "^19.0.0",
|
|
132
|
-
"react-hook-form": "^7.0.0",
|
|
133
|
-
"tailwindcss": "^4.0.0",
|
|
134
|
-
"zod": "^3.0.0"
|
|
135
|
-
},
|
|
136
|
-
"release-it": {
|
|
137
|
-
"git": {
|
|
138
|
-
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
139
|
-
"tagName": "${npm.name}@${version}"
|
|
140
|
-
},
|
|
141
|
-
"github": {
|
|
142
|
-
"release": false
|
|
143
|
-
},
|
|
144
|
-
"hooks": {
|
|
145
|
-
"before:bump": [
|
|
146
|
-
"pnpm lint"
|
|
147
|
-
],
|
|
148
|
-
"after:bump": [
|
|
149
|
-
"pnpm build"
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"copyFiles": [
|
|
154
|
-
{
|
|
155
|
-
"from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
|
|
156
|
-
"to": "dist/",
|
|
157
|
-
"toFlat": false
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"copyFilesSettings": {
|
|
161
|
-
"whenFileExists": "overwrite",
|
|
162
|
-
"removeSourceMappingURL": true,
|
|
163
|
-
"ignoreDotFilesAndFolders": false
|
|
164
|
-
}
|
|
165
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opexa/portal-components",
|
|
3
|
+
"version": "0.0.245",
|
|
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.d.ts",
|
|
19
|
+
"default": "./dist/handlers.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
|
+
"lint": "next lint",
|
|
77
|
+
"release": "release-it"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@ark-ui/react": "^5.16.0",
|
|
81
|
+
"@date-fns/tz": "^1.2.0",
|
|
82
|
+
"@mediapipe/tasks-vision": "0.10.22-rc.20250304",
|
|
83
|
+
"@next/third-parties": "^15.3.4",
|
|
84
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
85
|
+
"date-fns": "^4.1.0",
|
|
86
|
+
"embla-carousel-autoplay": "^8.6.0",
|
|
87
|
+
"embla-carousel-react": "^8.6.0",
|
|
88
|
+
"face-api.js": "^0.22.2",
|
|
89
|
+
"is-mobile": "^5.0.0",
|
|
90
|
+
"lodash-es": "^4.17.21",
|
|
91
|
+
"react-image-file-resizer": "^0.4.8",
|
|
92
|
+
"tailwind-merge": "^3.3.1",
|
|
93
|
+
"tailwind-variants": "^1.0.0",
|
|
94
|
+
"tailwind-zag": "^1.0.2",
|
|
95
|
+
"tiny-invariant": "^1.3.3",
|
|
96
|
+
"type-fest": "^4.41.0",
|
|
97
|
+
"usehooks-ts": "^3.1.1",
|
|
98
|
+
"zustand": "^5.0.6"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@eslint/eslintrc": "3",
|
|
102
|
+
"@hookform/resolvers": "5.1.1",
|
|
103
|
+
"@opexa/object-id": "0.1.6",
|
|
104
|
+
"@tailwindcss/postcss": "4",
|
|
105
|
+
"@tanstack/react-query": "5.81.5",
|
|
106
|
+
"@tanstack/react-query-devtools": "5.81.5",
|
|
107
|
+
"@total-typescript/ts-reset": "0.6.1",
|
|
108
|
+
"@types/lodash-es": "4.17.12",
|
|
109
|
+
"@types/node": "24",
|
|
110
|
+
"@types/react": "19",
|
|
111
|
+
"@types/react-dom": "19",
|
|
112
|
+
"copy-files-from-to": "3.12.1",
|
|
113
|
+
"eslint": "9",
|
|
114
|
+
"eslint-config-next": "15.3.4",
|
|
115
|
+
"next": "15.4.0-canary.61",
|
|
116
|
+
"react": "19.1.0",
|
|
117
|
+
"react-dom": "19.1.0",
|
|
118
|
+
"react-hook-form": "7.59.0",
|
|
119
|
+
"release-it": "19.0.3",
|
|
120
|
+
"tailwindcss": "4.1.11",
|
|
121
|
+
"tsc-alias": "1.8.16",
|
|
122
|
+
"typescript": "5",
|
|
123
|
+
"zod": "3.25.71"
|
|
124
|
+
},
|
|
125
|
+
"peerDependencies": {
|
|
126
|
+
"@hookform/resolvers": "^4.0.0 || ^5.0.0",
|
|
127
|
+
"@opexa/object-id": "^0.1.0",
|
|
128
|
+
"@tanstack/react-query": "^5.0.0",
|
|
129
|
+
"next": "^15.4.0-canary.1",
|
|
130
|
+
"react": "^19.0.0",
|
|
131
|
+
"react-dom": "^19.0.0",
|
|
132
|
+
"react-hook-form": "^7.0.0",
|
|
133
|
+
"tailwindcss": "^4.0.0",
|
|
134
|
+
"zod": "^3.0.0"
|
|
135
|
+
},
|
|
136
|
+
"release-it": {
|
|
137
|
+
"git": {
|
|
138
|
+
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
139
|
+
"tagName": "${npm.name}@${version}"
|
|
140
|
+
},
|
|
141
|
+
"github": {
|
|
142
|
+
"release": false
|
|
143
|
+
},
|
|
144
|
+
"hooks": {
|
|
145
|
+
"before:bump": [
|
|
146
|
+
"pnpm lint"
|
|
147
|
+
],
|
|
148
|
+
"after:bump": [
|
|
149
|
+
"pnpm build"
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"copyFiles": [
|
|
154
|
+
{
|
|
155
|
+
"from": "src/lib/**/*.{png,jpg,jpeg,gif,svg,css,json}",
|
|
156
|
+
"to": "dist/",
|
|
157
|
+
"toFlat": false
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"copyFilesSettings": {
|
|
161
|
+
"whenFileExists": "overwrite",
|
|
162
|
+
"removeSourceMappingURL": true,
|
|
163
|
+
"ignoreDotFilesAndFolders": false
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function FeatureFlag(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useRouter, useSearchParams } from 'next/navigation';
|
|
4
|
-
import { useEffect } from 'react';
|
|
5
|
-
import { FEATURE_FLAG_KEY, useFeatureFlag, } from '../../client/hooks/useFeatureFlag.js';
|
|
6
|
-
export function FeatureFlag() {
|
|
7
|
-
const { featureFlagEnabled, setFeatureFlagEnabled } = useFeatureFlag();
|
|
8
|
-
const searchParams = useSearchParams();
|
|
9
|
-
const router = useRouter();
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const futureFlagParam = searchParams.get('future');
|
|
12
|
-
if (futureFlagParam !== null) {
|
|
13
|
-
const isEnabled = futureFlagParam === 'true';
|
|
14
|
-
setFeatureFlagEnabled(isEnabled);
|
|
15
|
-
localStorage.setItem(FEATURE_FLAG_KEY, isEnabled.toString());
|
|
16
|
-
}
|
|
17
|
-
}, [searchParams, setFeatureFlagEnabled]);
|
|
18
|
-
function disableFeatureFlag() {
|
|
19
|
-
setFeatureFlagEnabled(false);
|
|
20
|
-
localStorage.removeItem(FEATURE_FLAG_KEY);
|
|
21
|
-
const params = new URLSearchParams(searchParams.toString());
|
|
22
|
-
params.delete('future');
|
|
23
|
-
router.replace(`?${params.toString()}`, { scroll: false });
|
|
24
|
-
}
|
|
25
|
-
if (!featureFlagEnabled) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return (_jsx("div", { className: "fixed bottom-3 flex w-full flex-col items-center justify-center", children: _jsxs("div", { className: "bg-black/70 p-1", children: ["Experimental features are enabled.", ' ', _jsxs("button", { onClick: () => disableFeatureFlag(), className: "cursor-pointer underline", children: [' ', "Disable"] })] }) }));
|
|
29
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FeatureFlag';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FeatureFlag.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function AutoOpen(): null;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react';
|
|
2
|
-
import { useShallow } from 'zustand/shallow';
|
|
3
|
-
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
4
|
-
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
|
-
import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
|
|
6
|
-
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
7
|
-
import { KYC_PROMPT_LOCALSTORAGE_KEY } from '../../constants/index.js';
|
|
8
|
-
export function AutoOpen() {
|
|
9
|
-
const kycStore = useGlobalStore(useShallow((ctx) => ctx.kyc));
|
|
10
|
-
const { data: session } = useSessionQuery();
|
|
11
|
-
const { data: account } = useAccountQuery();
|
|
12
|
-
const { data: verification } = useMemberVerificationQuery();
|
|
13
|
-
const isBasicInfoCompleted = account?.realName !== null && account?.birthDay !== null;
|
|
14
|
-
const isUploadCompleted = verification &&
|
|
15
|
-
verification.idFrontImage !== null &&
|
|
16
|
-
verification.selfieImage !== null;
|
|
17
|
-
const isRejected = Boolean(verification?.status === 'REJECTED');
|
|
18
|
-
const step = !isBasicInfoCompleted
|
|
19
|
-
? 1
|
|
20
|
-
: isRejected
|
|
21
|
-
? 2
|
|
22
|
-
: isUploadCompleted
|
|
23
|
-
? 3
|
|
24
|
-
: 2;
|
|
25
|
-
const shouldOpen = !account?.realName ||
|
|
26
|
-
!account?.birthDay ||
|
|
27
|
-
!verification ||
|
|
28
|
-
verification.status === 'REJECTED' ||
|
|
29
|
-
verification.status === 'UNVERIFIED';
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
if (session?.status == 'authenticated' &&
|
|
32
|
-
!kycStore['~touched'] &&
|
|
33
|
-
shouldOpen &&
|
|
34
|
-
localStorage.getItem(KYC_PROMPT_LOCALSTORAGE_KEY) == null) {
|
|
35
|
-
kycStore.setOpen(true);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
}, [kycStore, session?.status, shouldOpen]);
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
if (step) {
|
|
41
|
-
kycStore.setStep(step);
|
|
42
|
-
}
|
|
43
|
-
}, [kycStore, step]);
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ImageProps } from 'next/image';
|
|
2
|
-
import { type ReactNode } from 'react';
|
|
3
|
-
import type { Branch } from '../../types';
|
|
4
|
-
export interface SignUpProps {
|
|
5
|
-
logo: ImageProps['src'];
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
/** @default "/terms-and-conditions" */
|
|
8
|
-
termsAndConditionsUrl?: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
branches?: Branch[];
|
|
11
|
-
}
|
|
12
|
-
export declare function SignUp(props: SignUpProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Image, {} from 'next/image';
|
|
4
|
-
import { Suspense } from 'react';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { useShallow } from 'zustand/shallow';
|
|
7
|
-
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
8
|
-
import { XIcon } from '../../icons/XIcon.js';
|
|
9
|
-
import { Dialog } from '../../ui/Dialog/index.js';
|
|
10
|
-
import { Portal } from '../../ui/Portal/index.js';
|
|
11
|
-
import { SignUpPropsProvider } from './SignUpContext.js';
|
|
12
|
-
import { SignUpForm } from './SignUpForm.js';
|
|
13
|
-
export function SignUp(props) {
|
|
14
|
-
const signUpStore = useGlobalStore(useShallow((ctx) => ctx.signUp));
|
|
15
|
-
return (_jsx(SignUpPropsProvider, { value: props, children: _jsx(Dialog.Root, { open: signUpStore.open, onOpenChange: (details) => {
|
|
16
|
-
signUpStore.setOpen(details.open);
|
|
17
|
-
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: twMerge('bg-bg-primary-alt mx-auto h-full w-full items-start p-3xl pb-4xl lg:h-auto lg:w-[400px] lg:rounded-xl', props.className), children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(Image, { src: props.logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsx(Suspense, { children: _jsx(SignUpForm, {}) })] }) })] }) }) }));
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function SignUpForm(): import("react/jsx-runtime").JSX.Element;
|