@opexa/portal-components 0.0.288 → 0.0.290

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 (77) hide show
  1. package/dist/components/Disclaimer/DisclaimerV2.js +11 -2
  2. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  3. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  4. package/dist/components/Quests/JourneyQuest.d.ts +1 -0
  5. package/dist/components/Quests/JourneyQuest.js +61 -0
  6. package/dist/components/Quests/Quests.client.js +2 -0
  7. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  8. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  9. package/dist/constants/GameProvider.d.ts +1 -1
  10. package/dist/constants/GameProvider.js +1 -0
  11. package/dist/services/queries.js +2574 -2574
  12. package/dist/styles/theme.css +701 -701
  13. package/package.json +163 -163
  14. package/dist/components/Banner/Banner.client.d.ts +0 -12
  15. package/dist/components/Banner/Banner.client.js +0 -49
  16. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  17. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  18. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  19. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  20. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  21. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  22. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  23. package/dist/components/KYC/CaptureSelfie.js +0 -285
  24. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  25. package/dist/components/KYC/DisplayImage.js +0 -8
  26. package/dist/components/KYC/FileUpload.d.ts +0 -10
  27. package/dist/components/KYC/FileUpload.js +0 -72
  28. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  29. package/dist/components/KYC/NoCameraError.js +0 -6
  30. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  31. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  32. package/dist/components/KYC/utils.d.ts +0 -9
  33. package/dist/components/KYC/utils.js +0 -79
  34. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  35. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  36. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  37. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  38. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  39. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  40. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  41. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  42. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  43. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  44. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  45. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  46. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  47. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  48. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  49. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  50. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  51. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  52. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  53. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  54. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  55. package/dist/handlers/postTransformIdFrontImage.js +0 -82
  56. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  57. package/dist/handlers/postTransformSelfieImage.js +0 -82
  58. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  59. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  60. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  61. package/dist/third-parties/FacebookPixel/api.js +0 -1
  62. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  63. package/dist/third-parties/FacebookPixel/index.js +0 -1
  64. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  65. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  66. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  67. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  68. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  69. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  70. package/dist/third-parties/index.d.ts +0 -2
  71. package/dist/third-parties/index.js +0 -2
  72. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  73. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  74. package/dist/utils/getGameName.d.ts +0 -1
  75. package/dist/utils/getGameName.js +0 -6
  76. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  77. package/dist/utils/isBetween3amAnd3pm.js +0 -5
@@ -1,82 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import sharp from 'sharp';
3
- import { z } from 'zod';
4
- import { validateFile } from '../utils/validateFile.js';
5
- const TransformIdFrontImageDefinition = z.object({
6
- image: z.instanceof(File).superRefine((file, context) => {
7
- const error = validateFile(file);
8
- if (error) {
9
- context.addIssue({
10
- code: z.ZodIssueCode.custom,
11
- message: error.message,
12
- });
13
- }
14
- }),
15
- cropTop: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
16
- cropLeft: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
17
- cropWidth: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
18
- cropHeight: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
19
- });
20
- export async function postTransformIdFrontImage(request) {
21
- const form = await request.formData();
22
- const parsed = TransformIdFrontImageDefinition.safeParse({
23
- image: form.get('image'),
24
- cropTop: form.get('cropTop'),
25
- cropLeft: form.get('cropLeft'),
26
- cropWidth: form.get('cropWidth'),
27
- cropHeight: form.get('cropHeight'),
28
- });
29
- if (!parsed.success) {
30
- return NextResponse.json({
31
- ok: false,
32
- message: parsed.error.issues[0].message,
33
- __error: parsed.error,
34
- }, { status: 400 });
35
- }
36
- const file = parsed.data.image;
37
- const arrayBuffer = await file.arrayBuffer();
38
- const buffer = Buffer.from(arrayBuffer);
39
- const cropped = await sharp(buffer)
40
- .extract({
41
- top: parsed.data.cropTop,
42
- left: parsed.data.cropLeft,
43
- width: parsed.data.cropWidth,
44
- height: parsed.data.cropHeight,
45
- })
46
- .resize({
47
- fit: 'contain',
48
- width: 1200,
49
- height: 757,
50
- kernel: sharp.kernel.lanczos3,
51
- withoutEnlargement: true,
52
- })
53
- .modulate({
54
- brightness: 1.03,
55
- saturation: 1.05,
56
- })
57
- .median(1)
58
- .blur(0.3)
59
- .sharpen({
60
- sigma: 1,
61
- m1: 0.5,
62
- m2: 1.0,
63
- x1: 2,
64
- y2: 10,
65
- y3: 20,
66
- })
67
- .webp({
68
- effort: 6,
69
- quality: 100,
70
- alphaQuality: 100,
71
- lossless: false,
72
- nearLossless: false,
73
- smartSubsample: true,
74
- })
75
- .toBuffer();
76
- return new NextResponse(cropped, {
77
- headers: {
78
- 'Content-Type': 'image/webp',
79
- 'Content-Disposition': `inline; filename="id-front-${Date.now()}.webp"`,
80
- },
81
- });
82
- }
@@ -1,3 +0,0 @@
1
- import type { NextRequest } from 'next/server';
2
- import { NextResponse } from 'next/server';
3
- export declare function postTransformSelfieImage(request: NextRequest): Promise<NextResponse<unknown>>;
@@ -1,82 +0,0 @@
1
- import { NextResponse } from 'next/server';
2
- import sharp from 'sharp';
3
- import { z } from 'zod';
4
- import { validateFile } from '../utils/validateFile.js';
5
- const TransformSelfieImageDefinition = z.object({
6
- image: z.instanceof(File).superRefine((file, context) => {
7
- const error = validateFile(file);
8
- if (error) {
9
- context.addIssue({
10
- code: z.ZodIssueCode.custom,
11
- message: error.message,
12
- });
13
- }
14
- }),
15
- cropTop: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
16
- cropLeft: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
17
- cropWidth: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
18
- cropHeight: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
19
- });
20
- export async function postTransformSelfieImage(request) {
21
- const form = await request.formData();
22
- const parsed = TransformSelfieImageDefinition.safeParse({
23
- image: form.get('image'),
24
- cropTop: form.get('cropTop'),
25
- cropLeft: form.get('cropLeft'),
26
- cropWidth: form.get('cropWidth'),
27
- cropHeight: form.get('cropHeight'),
28
- });
29
- if (!parsed.success) {
30
- return NextResponse.json({
31
- ok: false,
32
- message: parsed.error.issues[0].message,
33
- __error: parsed.error,
34
- }, { status: 400 });
35
- }
36
- const file = parsed.data.image;
37
- const arrayBuffer = await file.arrayBuffer();
38
- const buffer = Buffer.from(arrayBuffer);
39
- const cropped = await sharp(buffer)
40
- .extract({
41
- top: parsed.data.cropTop,
42
- left: parsed.data.cropLeft,
43
- width: parsed.data.cropWidth,
44
- height: parsed.data.cropHeight,
45
- })
46
- .resize({
47
- fit: 'contain',
48
- width: 1200,
49
- height: 1200,
50
- kernel: sharp.kernel.lanczos3,
51
- withoutEnlargement: true,
52
- })
53
- .modulate({
54
- brightness: 1.03,
55
- saturation: 1.05,
56
- })
57
- .median(1)
58
- .blur(0.3)
59
- .sharpen({
60
- sigma: 1,
61
- m1: 0.5,
62
- m2: 1.0,
63
- x1: 2,
64
- y2: 10,
65
- y3: 20,
66
- })
67
- .webp({
68
- effort: 6,
69
- quality: 100,
70
- alphaQuality: 100,
71
- lossless: false,
72
- nearLossless: false,
73
- smartSubsample: true,
74
- })
75
- .toBuffer();
76
- return new NextResponse(cropped, {
77
- headers: {
78
- 'Content-Type': 'image/webp',
79
- 'Content-Disposition': `inline; filename="selfie-${Date.now()}.webp"`,
80
- },
81
- });
82
- }
@@ -1,4 +0,0 @@
1
- export interface FacebookPixelProps {
2
- fbId: string;
3
- }
4
- export declare function FacebookPixel(props: FacebookPixelProps): null;
@@ -1,4 +0,0 @@
1
- export function FacebookPixel(props) {
2
- console.log(props);
3
- return null;
4
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- export * from './FacebookPixel';
@@ -1 +0,0 @@
1
- export * from './FacebookPixel.js';
@@ -1,4 +0,0 @@
1
- export interface GoogleRecaptchaProps {
2
- siteKey: string;
3
- }
4
- export declare function GoogleRecaptcha(props: GoogleRecaptchaProps): null;
@@ -1,4 +0,0 @@
1
- export function GoogleRecaptcha(props) {
2
- console.log(props);
3
- return null;
4
- }
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
- export * from './GoogleRecaptcha';
@@ -1 +0,0 @@
1
- export * from './GoogleRecaptcha.js';
@@ -1,2 +0,0 @@
1
- export * from './FacebookPixel';
2
- export * from './GoogleRecaptcha';
@@ -1,2 +0,0 @@
1
- export * from './FacebookPixel/index.js';
2
- export * from './GoogleRecaptcha/index.js';
@@ -1 +0,0 @@
1
- export declare const GAMES_AVAILABLE_3PM_TO_3AM: string[];
@@ -1 +0,0 @@
1
- export const GAMES_AVAILABLE_3PM_TO_3AM = ['Marble Race', 'Rainbow Ball'];
@@ -1 +0,0 @@
1
- export declare function getGameName(reference: string, defaultName: string): string;
@@ -1,6 +0,0 @@
1
- export function getGameName(reference, defaultName) {
2
- if (reference === 'Hwd1wEWHU6Gvfwecuh') {
3
- return 'Marble Speedway';
4
- }
5
- return defaultName;
6
- }
@@ -1 +0,0 @@
1
- export declare const isBetween3amAnd3pm: () => boolean;
@@ -1,5 +0,0 @@
1
- export const isBetween3amAnd3pm = () => {
2
- const now = new Date();
3
- const hour = now.getHours();
4
- return hour >= 15 || hour < 3;
5
- };