@opexa/portal-components 0.0.304 → 0.0.306
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/DepositWithdrawal/DepositWithdrawal.lazy.js +1 -1
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +13 -40
- package/dist/components/Disclaimer/DisclaimerV2.js +1 -1
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/Messages/Messages.lazy.js +1 -1
- package/dist/components/Messages/MessagesPopup.js +3 -3
- package/dist/components/ResponsibleGaming/ResponsibleGaming.lazy.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.d.ts +1 -2
- package/dist/components/SignUp/SignUpDefault/SignUpDefault.lazy.js +1 -1
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultForm.js +6 -4
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.d.ts +1 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYC.lazy.js +1 -1
- package/dist/components/SignUp/SignUpKYC/SignUpKYCForm.js +7 -5
- package/dist/components/TermsAndConditions/TermsAndConditions.lazy.js +1 -1
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +1 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/index.js +0 -1
- package/dist/services/queries.js +2639 -2639
- package/dist/styles/theme.css +706 -706
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +8 -8
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/package.json +164 -164
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- 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/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/utils.d.ts +0 -9
- package/dist/components/KYC/utils.js +0 -79
- 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/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/handlers/postTransformIdFrontImage.d.ts +0 -3
- package/dist/handlers/postTransformIdFrontImage.js +0 -82
- package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
- package/dist/handlers/postTransformSelfieImage.js +0 -82
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
- 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
|
@@ -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,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
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel.js';
|
|
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 +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 +0,0 @@
|
|
|
1
|
-
export declare const isBetween3amAnd3pm: () => boolean;
|