@opexa/portal-components 0.0.313 → 0.0.315

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 (83) hide show
  1. package/dist/components/DigitainLauncher/DigitainLauncher.d.ts +2 -0
  2. package/dist/components/DigitainLauncher/DigitainLauncher.js +1 -1
  3. package/dist/components/DigitainLauncher/DigitianContainter.d.ts +2 -0
  4. package/dist/components/DigitainLauncher/DigitianContainter.js +2 -2
  5. package/dist/components/DigitainLauncher/Fallback.d.ts +4 -1
  6. package/dist/components/DigitainLauncher/Fallback.js +11 -11
  7. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  8. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  9. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  10. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  11. package/dist/services/queries.js +2644 -2644
  12. package/dist/styles/theme.css +706 -706
  13. package/package.json +160 -160
  14. package/dist/client/utils/recaptcha.d.ts +0 -14
  15. package/dist/client/utils/recaptcha.js +0 -18
  16. package/dist/components/Banner/Banner.client.d.ts +0 -12
  17. package/dist/components/Banner/Banner.client.js +0 -49
  18. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
  19. package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
  20. package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
  21. package/dist/components/Disclaimer/TermsOfUse.js +0 -13
  22. package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
  23. package/dist/components/KYC/CaptureIdDocument.js +0 -219
  24. package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
  25. package/dist/components/KYC/CaptureSelfie.js +0 -285
  26. package/dist/components/KYC/DisplayImage.d.ts +0 -5
  27. package/dist/components/KYC/DisplayImage.js +0 -8
  28. package/dist/components/KYC/FileUpload.d.ts +0 -10
  29. package/dist/components/KYC/FileUpload.js +0 -72
  30. package/dist/components/KYC/NoCameraError.d.ts +0 -7
  31. package/dist/components/KYC/NoCameraError.js +0 -6
  32. package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
  33. package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
  34. package/dist/components/KYC/utils.d.ts +0 -9
  35. package/dist/components/KYC/utils.js +0 -79
  36. package/dist/components/SignIn/utils.d.ts +0 -8
  37. package/dist/components/SignIn/utils.js +0 -26
  38. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
  39. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
  40. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
  41. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
  42. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
  43. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
  44. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
  45. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
  46. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
  47. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
  48. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
  49. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
  50. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
  51. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
  52. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
  53. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
  54. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
  55. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
  56. package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
  57. package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
  58. package/dist/constants/Branches.d.ts +0 -2
  59. package/dist/constants/Branches.js +0 -42
  60. package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
  61. package/dist/handlers/postTransformIdFrontImage.js +0 -82
  62. package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
  63. package/dist/handlers/postTransformSelfieImage.js +0 -82
  64. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  65. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  66. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  67. package/dist/third-parties/FacebookPixel/api.js +0 -1
  68. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  69. package/dist/third-parties/FacebookPixel/index.js +0 -1
  70. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  71. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  72. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  73. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  74. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  75. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  76. package/dist/third-parties/index.d.ts +0 -2
  77. package/dist/third-parties/index.js +0 -2
  78. package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
  79. package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
  80. package/dist/utils/getGameName.d.ts +0 -1
  81. package/dist/utils/getGameName.js +0 -6
  82. package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
  83. package/dist/utils/isBetween3amAnd3pm.js +0 -5
@@ -1,3 +0,0 @@
1
- import type { NextRequest } from 'next/server';
2
- import { NextResponse } from 'next/server';
3
- export declare function postTransformIdFrontImage(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 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
- };