@opexa/portal-components 0.0.692 → 0.0.693

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 (47) hide show
  1. package/dist/components/GameProviders/GameProvidersList.js +10 -4
  2. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -0
  3. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -0
  4. package/dist/components/KYC/KYCDefault/BasicInformation.d.ts +1 -0
  5. package/dist/components/KYC/KYCDefault/BasicInformation.js +101 -0
  6. package/dist/components/KYC/KYCVerificationStatus.d.ts +1 -0
  7. package/dist/components/KYC/KYCVerificationStatus.js +10 -0
  8. package/dist/components/KYC/KYCVerificationStatus.lazy.d.ts +1 -0
  9. package/dist/components/KYC/KYCVerificationStatus.lazy.js +33 -0
  10. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +1 -0
  11. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +29 -0
  12. package/dist/components/SessionWatcher/SessionWatcher.d.ts +1 -0
  13. package/dist/components/SessionWatcher/SessionWatcher.js +20 -0
  14. package/dist/components/SessionWatcher/index.d.ts +1 -0
  15. package/dist/components/SessionWatcher/index.js +1 -0
  16. package/dist/constants/GameProvider.js +2 -1
  17. package/dist/images/game-providers/SPADEGAMING.png +0 -0
  18. package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
  19. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
  20. package/dist/ui/Badge/Badge.d.ts +12 -12
  21. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  22. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  23. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  24. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  25. package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
  26. package/dist/ui/Collapsible/collapsible.recipe.d.ts +8 -8
  27. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  28. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  29. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  30. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  31. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  32. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  33. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  34. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  35. package/dist/ui/Menu/Menu.d.ts +198 -198
  36. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  37. package/dist/ui/Popover/Popover.d.ts +154 -154
  38. package/dist/ui/Popover/popover.recipe.d.ts +14 -14
  39. package/dist/ui/Select/Select.d.ts +45 -45
  40. package/dist/ui/Select/select.recipe.d.ts +3 -3
  41. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  42. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  43. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  44. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  45. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  46. package/package.json +1 -1
  47. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -18,14 +18,20 @@ export function GameProvidersList(props) {
18
18
  .replace(':slug', data.slug)
19
19
  : `/providers/${data.slug}`;
20
20
  };
21
- const { enabled } = useFeatureFlag();
22
- const combinedProviders = enabled
21
+ const featureFlag = useFeatureFlag();
22
+ const enabledProviders = featureFlag.enabled
23
23
  ? [...props.gameProviders, ...(props.futureGameProviders ?? [])]
24
24
  : props.gameProviders;
25
- const gameProviders = combinedProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
25
+ const gameProviders = enabledProviders.map((provider) => GAME_PROVIDER_DATA[provider]);
26
26
  const classNames = isString(props.className)
27
27
  ? { root: props.className }
28
28
  : (props.className ?? {});
29
29
  const chunked = useChunk(gameProviders, 24);
30
- return (_jsxs("div", { className: classNames.root, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsxs("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: [props.showAllProviders && (_jsx(Link, { href: props.viewAllUrl ?? '/providers', className: twMerge('flex h-full w-full items-center justify-center overflow-hidden rounded-md bg-brand-800 font-extrabold lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View all games`, children: _jsx("p", { className: "text-center text-4xl", children: " ALL" }) })), chunked.loadedItems.map((provider) => (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id)))] }), !props.showAllProviders && (_jsxs("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: [_jsx(Progress.Root, { min: 0, max: chunked.totalItems, value: chunked.totalLoadedItems, onValueChange: noop, className: twMerge('w-[12.5rem]', classNames.progressRoot), children: _jsx(Progress.Track, { className: twMerge('bg-bg-tertiary', classNames.progressTrack), children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "mt-md text-button-tertiary-fg text-sm", children: `Displaying ${chunked.totalLoadedItems} of ${chunked.totalItems}` }), chunked.hasNext && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: chunked.next, className: twMerge('mt-lg', classNames.loadMoreButton), children: "Load More" }))] }))] }));
30
+ const items = props.showAllProviders
31
+ ? gameProviders.slice(0, 23)
32
+ : chunked.loadedItems;
33
+ return (_jsxs("div", { className: classNames.root, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsxs("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: [props.showAllProviders && (_jsx(Link, { href: props.viewAllUrl ?? '/providers', className: twMerge('flex h-full w-full items-center justify-center overflow-hidden rounded-md bg-brand-800 font-extrabold lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View all games`, children: _jsx("p", { className: "text-center text-4xl", children: " ALL" }) })), items.map((provider) => {
34
+ const customLogo = props.gameProviderImages?.[provider.id];
35
+ return (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', !customLogo && 'px-2 py-1.5', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: customLogo ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id));
36
+ })] }), !props.showAllProviders && (_jsxs("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: [_jsx(Progress.Root, { min: 0, max: chunked.totalItems, value: chunked.totalLoadedItems, onValueChange: noop, className: twMerge('w-[12.5rem]', classNames.progressRoot), children: _jsx(Progress.Track, { className: twMerge('bg-bg-tertiary', classNames.progressTrack), children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "mt-md text-button-tertiary-fg text-sm", children: `Displaying ${chunked.totalLoadedItems} of ${chunked.totalItems}` }), chunked.hasNext && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: chunked.next, className: twMerge('mt-lg', classNames.loadMoreButton), children: "Load More" }))] }))] }));
31
37
  }
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1,184 @@
1
+ @keyframes arrow-green-flash {
2
+ 0% {
3
+ color: #abefc6;
4
+ }
5
+ 100% {
6
+ color: #079455;
7
+ }
8
+ }
9
+
10
+ .animate-arrow-green-flash-1 {
11
+ animation: arrow-green-flash 0.4s infinite;
12
+ animation-delay: -0.2s;
13
+ }
14
+
15
+ .animate-arrow-green-flash-2 {
16
+ animation: arrow-green-flash 0.4s infinite;
17
+ animation-delay: -0.1s;
18
+ }
19
+
20
+ .animate-arrow-green-flash-3 {
21
+ animation: arrow-green-flash 0.4s infinite;
22
+ }
23
+
24
+ @keyframes arrow-red-flash {
25
+ 0%,
26
+ 100% {
27
+ color: #f97066;
28
+ }
29
+ 50% {
30
+ color: #fecdca;
31
+ }
32
+ }
33
+
34
+ .animate-arrow-red-flash-1 {
35
+ animation: arrow-red-flash 0.4s infinite;
36
+ }
37
+
38
+ .animate-arrow-red-flash-2 {
39
+ animation: arrow-red-flash 0.4s infinite;
40
+ animation-delay: -0.1s;
41
+ }
42
+
43
+ .animate-arrow-red-flash-3 {
44
+ animation: arrow-red-flash 0.4s infinite;
45
+ animation-delay: -0.2s;
46
+ }
47
+
48
+ /* Animated BG */
49
+ @keyframes rotate {
50
+ to {
51
+ transform: rotate(1turn);
52
+ }
53
+ }
54
+
55
+ .light-rays {
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ overflow: hidden;
62
+
63
+ --first: var(--color-bg-tertiary);
64
+ --second: var(--color-bg-quaternary);
65
+ }
66
+
67
+ .light-rays::before,
68
+ .light-rays::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: var(--light-rays-top, 150px);
72
+ left: calc(50% - 90px);
73
+ margin: -100vmax;
74
+ width: 200vmax;
75
+ height: 200vmax;
76
+ opacity: 0.6;
77
+ transform-origin: center;
78
+ }
79
+
80
+ .light-rays::before {
81
+ background: conic-gradient(
82
+ var(--first) 0deg 7.2deg,
83
+ var(--second) 7.2deg 14.4deg,
84
+ var(--first) 14.4deg 21.6deg,
85
+ var(--second) 21.6deg 28.8deg,
86
+ var(--first) 28.8deg 36deg,
87
+ var(--second) 36deg 43.2deg,
88
+ var(--first) 43.2deg 50.4deg,
89
+ var(--second) 50.4deg 57.6deg,
90
+ var(--first) 57.6deg 64.8deg,
91
+ var(--second) 64.8deg 72deg,
92
+ var(--first) 72deg 79.2deg,
93
+ var(--second) 79.2deg 86.4deg,
94
+ var(--first) 86.4deg 93.6deg,
95
+ var(--second) 93.6deg 100.8deg,
96
+ var(--first) 100.8deg 108deg,
97
+ var(--second) 108deg 115.2deg,
98
+ var(--first) 115.2deg 122.4deg,
99
+ var(--second) 122.4deg 129.6deg,
100
+ var(--first) 129.6deg 136.8deg,
101
+ var(--second) 136.8deg 144deg,
102
+ var(--first) 144deg 151.2deg,
103
+ var(--second) 151.2deg 158.4deg,
104
+ var(--first) 158.4deg 165.6deg,
105
+ var(--second) 165.6deg 172.8deg,
106
+ var(--first) 172.8deg 180deg,
107
+ var(--second) 180deg 187.2deg,
108
+ var(--first) 187.2deg 194.4deg,
109
+ var(--second) 194.4deg 201.6deg,
110
+ var(--first) 201.6deg 208.8deg,
111
+ var(--second) 208.8deg 216deg,
112
+ var(--first) 216deg 223.2deg,
113
+ var(--second) 223.2deg 230.4deg,
114
+ var(--first) 230.4deg 237.6deg,
115
+ var(--second) 237.6deg 244.8deg,
116
+ var(--first) 244.8deg 252deg,
117
+ var(--second) 252deg 259.2deg,
118
+ var(--first) 259.2deg 266.4deg,
119
+ var(--second) 266.4deg 273.6deg,
120
+ var(--first) 273.6deg 280.8deg,
121
+ var(--second) 280.8deg 288deg,
122
+ var(--first) 288deg 295.2deg,
123
+ var(--second) 295.2deg 302.4deg,
124
+ var(--first) 302.4deg 309.6deg,
125
+ var(--second) 309.6deg 316.8deg,
126
+ var(--first) 316.8deg 324deg,
127
+ var(--second) 324deg 331.2deg,
128
+ var(--first) 331.2deg 338.4deg,
129
+ var(--second) 338.4deg 345.6deg,
130
+ var(--first) 345.6deg 352.8deg,
131
+ var(--second) 352.8deg 360deg
132
+ );
133
+ animation: rotate 20s linear infinite;
134
+ }
135
+
136
+ @media (max-width: 1024px) {
137
+ .light-rays::before,
138
+ .light-rays::after {
139
+ left: auto;
140
+ right: 11%;
141
+ }
142
+ }
143
+
144
+ /* ScrollArea.module.css */
145
+ .scrollArea {
146
+ overflow-y: scroll;
147
+ padding-right: 4px;
148
+ }
149
+
150
+ /* WebKit-based browsers */
151
+ .scrollArea::-webkit-scrollbar {
152
+ width: 8px;
153
+ }
154
+
155
+ .scrollArea::-webkit-scrollbar-track {
156
+ background: var(--color-bg-primary-alt);
157
+ border-radius: 9999px;
158
+ }
159
+
160
+ .scrollArea::-webkit-scrollbar-thumb {
161
+ background-color: var(--color-bg-quaternary);
162
+ border-radius: 9999px;
163
+ }
164
+
165
+ @keyframes waveColor {
166
+ 0%,
167
+ 2.5% {
168
+ color: var(--wave-highlight-color);
169
+ }
170
+ 2.51%,
171
+ 100% {
172
+ color: var(--color-brand-300);
173
+ }
174
+ }
175
+
176
+ .animate-wave-color-success {
177
+ --wave-highlight-color: var(--color-success-800);
178
+ animation: waveColor 4s ease-in-out infinite;
179
+ }
180
+
181
+ .animate-wave-color-error {
182
+ --wave-highlight-color: var(--color-error-600);
183
+ animation: waveColor 4s ease-in-out infinite;
184
+ }
@@ -0,0 +1 @@
1
+ export declare function BasicInformation(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,101 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import { differenceInYears, format, isSameDay, isValid, parse } from 'date-fns';
4
+ import { isNil, omitBy, size } from 'lodash-es';
5
+ import { useEffect } from 'react';
6
+ import { useForm } from 'react-hook-form';
7
+ import invariant from 'tiny-invariant';
8
+ import { z } from 'zod';
9
+ import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
10
+ import { useUpdateAccountMutation } from '../../../client/hooks/useUpdateAccountMutation.js';
11
+ import { toaster } from '../../../client/utils/toaster.js';
12
+ import { Button } from '../../../ui/Button/index.js';
13
+ import { Dialog } from '../../../ui/Dialog/index.js';
14
+ import { Field } from '../../../ui/Field/index.js';
15
+ import { useKYCDefaultContext } from './KYCDefaultContext.js';
16
+ const definition = z.object({
17
+ realName: z
18
+ .string()
19
+ .min(3, 'Name must be 3 or more characters')
20
+ .max(50, 'Name must not be more than 50 characters')
21
+ .regex(/^[a-z0-9 ]+$/gi, 'Name must not contain special characters')
22
+ .trim(),
23
+ birthDay: z
24
+ .string()
25
+ .min(1, 'Date of birth is required')
26
+ .superRefine((value, ctx) => {
27
+ const dob = parse(value, 'yyyy-MM-dd', new Date());
28
+ if (!isValid(dob)) {
29
+ return ctx.addIssue({
30
+ code: z.ZodIssueCode.invalid_date,
31
+ });
32
+ }
33
+ const now = new Date();
34
+ const age = differenceInYears(now, dob);
35
+ if (age < 21) {
36
+ return ctx.addIssue({
37
+ code: z.ZodIssueCode.custom,
38
+ message: 'You must be at least 21 years old',
39
+ });
40
+ }
41
+ }),
42
+ branchCode: z.string().min(4).max(10).optional().or(z.literal('')),
43
+ });
44
+ export function BasicInformation() {
45
+ const kyc = useKYCDefaultContext();
46
+ const form = useForm({
47
+ resolver: zodResolver(definition),
48
+ mode: 'all',
49
+ defaultValues: {
50
+ birthDay: '',
51
+ branchCode: '',
52
+ realName: '',
53
+ },
54
+ });
55
+ const accountQuery = useAccountQuery();
56
+ const account = accountQuery.data;
57
+ const stepCompleted = account != null && account.realName != null && account.birthDay != null;
58
+ useEffect(() => {
59
+ if (stepCompleted)
60
+ kyc.setStep(2);
61
+ }, [stepCompleted, kyc]);
62
+ useEffect(() => {
63
+ if (account) {
64
+ form.reset({
65
+ realName: account.realName ?? '',
66
+ birthDay: account.birthDay
67
+ ? format(account.birthDay, 'yyyy-MM-dd')
68
+ : '',
69
+ });
70
+ }
71
+ }, [account, form]);
72
+ const updateAccountMutation = useUpdateAccountMutation({
73
+ onError(error) {
74
+ toaster.error({
75
+ title: 'Error',
76
+ description: error.message,
77
+ });
78
+ },
79
+ onSuccess() {
80
+ kyc.setStep(2);
81
+ toaster.success({
82
+ title: 'Success',
83
+ description: 'Basic information has been set successfully.',
84
+ });
85
+ },
86
+ });
87
+ return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold text-lg", children: "Basic Information" }), _jsx(Dialog.Description, { className: "mt-xs text-center text-sm text-text-secondary-700", children: "Enter your basic details for identification and communication." }), _jsxs("form", { className: "mt-3", onSubmit: form.handleSubmit((data) => {
88
+ invariant(account);
89
+ const input = omitBy({
90
+ realName: account.realName === data.realName ? undefined : data.realName,
91
+ birthDay: account.birthDay && isSameDay(data.birthDay, account.birthDay)
92
+ ? undefined
93
+ : format(data.birthDay, 'yyyy-MM-dd'),
94
+ }, isNil);
95
+ if (size(input) === 0)
96
+ return kyc.setStep(2);
97
+ updateAccountMutation.mutate(input);
98
+ }), children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.realName, readOnly: !!accountQuery.data?.realName, children: [_jsx(Field.Label, { children: "Real Name" }), _jsx(Field.Input, { placeholder: "Enter your real name", ...form.register('realName') }), _jsx(Field.ErrorText, { children: form.formState.errors.realName?.message })] }), _jsxs(Field.Root, { className: "mt-3", invalid: !!form.formState.errors.branchCode, readOnly: !!accountQuery.data?.birthDay, children: [_jsx(Field.Label, { children: "Date of Birth" }), _jsx(Field.Input, { type: "date", ...form.register('birthDay') }), _jsx(Field.ErrorText, { children: form.formState.errors.birthDay?.message })] }), _jsx(Button, { type: "submit", className: "mt-8", disabled: accountQuery.isLoading ||
99
+ updateAccountMutation.isPending ||
100
+ stepCompleted, children: "Continue" })] })] }));
101
+ }
@@ -0,0 +1 @@
1
+ export declare function KYCVerificationStatus(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import dynamic from 'next/dynamic';
4
+ const Component = dynamic(() => import('./KYCVerificationStatus.lazy.js').then((m) => m.KYCVerificationStatus), {
5
+ ssr: false,
6
+ loading: () => null,
7
+ });
8
+ export function KYCVerificationStatus() {
9
+ return _jsx(Component, {});
10
+ }
@@ -0,0 +1 @@
1
+ export declare function KYCVerificationStatus(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Image from 'next/image';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { useShallow } from 'zustand/shallow';
5
+ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
6
+ import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
7
+ import alertIcon from '../../images/kyc-verification-status/alert-icon.png';
8
+ import bellIcon from '../../images/kyc-verification-status/bell-icon.png';
9
+ import { Button } from '../../ui/Button/index.js';
10
+ import { Dialog } from '../../ui/Dialog/index.js';
11
+ import { Portal } from '../../ui/Portal/index.js';
12
+ export function KYCVerificationStatus() {
13
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
14
+ kycVerificationStatus: ctx.kycVerificationStatus,
15
+ kyc: ctx.kyc,
16
+ })));
17
+ const verificationQuery = useMemberVerificationQuery();
18
+ const status = verificationQuery.data?.status ?? 'UNVERIFIED';
19
+ const icons = status === 'PENDING' ? bellIcon : alertIcon;
20
+ return (_jsx(Dialog.Root, { open: globalStore.kycVerificationStatus.open, onOpenChange: (details) => {
21
+ globalStore.kycVerificationStatus.setOpen(details.open);
22
+ }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsx(Dialog.Content, { className: "mx-auto h-fit w-[450px] overflow-y-auto rounded-lg bg-bg-primary", children: _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mb-3xl grid h-[200px] w-full place-items-center rounded-xl bg-radial from-40% from-button-primary-bg to-bg-brand-solid", children: _jsx(Image, { src: icons, alt: "icon", className: "w-60 object-contain", draggable: false, width: 120, height: 120 }) }), _jsxs("h1", { className: "font-semibold text-lg text-white", children: [status === 'PENDING' && 'Verification in Progress', status === 'REJECTED' && 'Verification Rejected', status === 'UNVERIFIED' && 'Verification Required'] }), _jsxs("p", { className: "mb-4xl text-[#94969C] text-base", children: [status === 'PENDING' &&
23
+ `Your account verification is still under review. Please wait
24
+ until it's approved before you can continue playing or
25
+ depositing.`, status === 'REJECTED' &&
26
+ 'Your account verification was not approved. Please resubmit your verification to regain full access.', status === 'UNVERIFIED' &&
27
+ 'Your account is not yet verified. Please complete the verification process to continue playing or depositing.'] }), _jsxs(Button, { variant: "solid", className: twMerge('mb-2 w-full', status === 'PENDING' && 'hidden'), onClick: () => {
28
+ globalStore.kycVerificationStatus.setOpen(false);
29
+ globalStore.kyc.setOpen(true);
30
+ }, children: [status === 'REJECTED' && 'Resubmit Verification', status === 'UNVERIFIED' && 'Verify Now'] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
31
+ globalStore.kycVerificationStatus.setOpen(false);
32
+ }, children: "Close" })] }) }) })] }) }));
33
+ }
@@ -0,0 +1 @@
1
+ export declare function LinkGoogleAccountObserver(): null;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { useSearchParams } from 'next/navigation';
3
+ import { useTimeout } from 'usehooks-ts';
4
+ import { toaster } from '../../client/utils/toaster.js';
5
+ import { getQueryClient } from '../../utils/getQueryClient.js';
6
+ import { getSessionQueryKey } from '../../utils/queryKeys.js';
7
+ export function LinkGoogleAccountObserver() {
8
+ const searchParams = useSearchParams();
9
+ const code = searchParams.get('message') ?? searchParams.get('status');
10
+ const queryClient = getQueryClient();
11
+ useTimeout(() => {
12
+ if (code === 'duplicate') {
13
+ return toaster.error({
14
+ title: 'Duplicate Account',
15
+ description: 'An account with this email already exists. Please try signing in instead.',
16
+ });
17
+ }
18
+ if (code === 'linked') {
19
+ queryClient.invalidateQueries({
20
+ queryKey: getSessionQueryKey(),
21
+ });
22
+ return toaster.success({
23
+ title: 'Google Account Linked Successfully',
24
+ description: 'Your Google account has been successfully connected.',
25
+ });
26
+ }
27
+ }, code ? 100 : null);
28
+ return null;
29
+ }
@@ -0,0 +1 @@
1
+ export declare function SessionWatcher(): null;
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ import { useRouter } from 'next/navigation';
3
+ import { useCallback, useEffect } from 'react';
4
+ import { useSessionHealthQuery } from '../../client/hooks/useSessionHealthQuery.js';
5
+ import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
6
+ export function SessionWatcher() {
7
+ const router = useRouter();
8
+ const query = useSessionHealthQuery({ refetchInterval: 1000 * 5 });
9
+ const healthy = query.data ?? true;
10
+ const mutation = useSignOutMutation();
11
+ const signOut = useCallback(async () => {
12
+ await mutation.mutateAsync();
13
+ router.refresh();
14
+ }, [mutation, router]);
15
+ useEffect(() => {
16
+ if (!healthy)
17
+ signOut();
18
+ }, [healthy, signOut]);
19
+ return null;
20
+ }
@@ -0,0 +1 @@
1
+ export * from './SessionWatcher';
@@ -0,0 +1 @@
1
+ export * from './SessionWatcher.js';
@@ -37,6 +37,7 @@ import relaxgaming from '../images/game-providers/RELAX_GAMING.png';
37
37
  import rtg from '../images/game-providers/RTG.png';
38
38
  import saba from '../images/game-providers/SABA.png';
39
39
  import sagaming from '../images/game-providers/SAGAMING.png';
40
+ import spadegaming from '../images/game-providers/SPADEGAMING.png';
40
41
  import spinix from '../images/game-providers/SPINIX.png';
41
42
  import spribe from '../images/game-providers/SPRIBE.png';
42
43
  import yellowbat from '../images/game-providers/YELLOWBAT.png';
@@ -321,7 +322,7 @@ export const GAME_PROVIDER_DATA = {
321
322
  id: 'ONEAPI_SPADEGAMING',
322
323
  name: 'OneAPI Spadegaming',
323
324
  slug: 'oneapi-spadegaming',
324
- logo: '',
325
+ logo: spadegaming,
325
326
  },
326
327
  };
327
328
  export const GAME_PROVIDERS = Object.values(GAME_PROVIDER_DATA).map(({ id }) => id);