@opexa/portal-components 0.0.1118 → 0.0.1120

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 (61) hide show
  1. package/dist/__tests__/utils/mocks.d.ts +1 -1
  2. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
  3. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
  4. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +5 -1
  5. package/dist/components/KYC/KYCReview.js +4 -30
  6. package/dist/constants/GameProvider.js +6 -0
  7. package/dist/lib/components/UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.d.ts +1 -0
  8. package/dist/lib/components/{UpdateMobileNumber/UpdateMobileNumber.js → UpdateMobilePhoneNumber/UpdateMobilePhoneNumber.js} +3 -5
  9. package/dist/lib/components/UpdateMobilePhoneNumber/index.d.ts +1 -0
  10. package/dist/lib/components/UpdateMobilePhoneNumber/index.js +1 -0
  11. package/dist/schemas/forgotPasswordSchema.d.ts +4 -4
  12. package/dist/types/index.d.ts +1 -1
  13. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  14. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  15. package/dist/ui/Badge/Badge.d.ts +12 -12
  16. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  17. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  18. package/dist/ui/Carousel/Carousel.d.ts +99 -99
  19. package/dist/ui/Carousel/carousel.recipe.d.ts +11 -11
  20. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  21. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  22. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  23. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  24. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  25. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  26. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  27. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  28. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  29. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  30. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  31. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  32. package/dist/ui/Field/Field.d.ts +21 -21
  33. package/dist/ui/Field/field.recipe.d.ts +3 -3
  34. package/dist/ui/Menu/Menu.d.ts +198 -198
  35. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  36. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  37. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  38. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  39. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  40. package/dist/ui/Popover/Popover.d.ts +121 -121
  41. package/dist/ui/Popover/popover.recipe.d.ts +11 -11
  42. package/dist/ui/Select/Select.d.ts +45 -45
  43. package/dist/ui/Select/select.recipe.d.ts +3 -3
  44. package/dist/ui/Table/Table.d.ts +21 -21
  45. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  46. package/dist/ui/Table/table.recipe.d.ts +3 -3
  47. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  48. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  49. package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
  50. package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
  51. package/dist/utils/getProviderData.js +5 -0
  52. package/package.json +1 -1
  53. package/dist/components/DigitainLauncher/DigitainAuthWall.d.ts +0 -7
  54. package/dist/components/DigitainLauncher/DigitainAuthWall.js +0 -20
  55. package/dist/components/UpdateMobileNumber/UpdateMobileNumber.d.ts +0 -3
  56. package/dist/components/UpdateMobileNumber/UpdateMobileNumber.js +0 -141
  57. package/dist/components/UpdateMobileNumber/index.d.ts +0 -1
  58. package/dist/components/UpdateMobileNumber/index.js +0 -1
  59. package/dist/lib/components/UpdateMobileNumber/UpdateMobileNumber.d.ts +0 -1
  60. package/dist/lib/components/UpdateMobileNumber/index.d.ts +0 -1
  61. package/dist/lib/components/UpdateMobileNumber/index.js +0 -1
@@ -165,7 +165,7 @@ export declare function createMockSignOutMutation(): {
165
165
  */
166
166
  export declare function createMockMemberVerificationQuery(status?: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'MISSING' | 'APPROVED', isLoading?: boolean): {
167
167
  data: {
168
- status: "VERIFIED" | "PENDING" | "REJECTED" | "MISSING" | "APPROVED";
168
+ status: "PENDING" | "APPROVED" | "REJECTED" | "VERIFIED" | "MISSING";
169
169
  };
170
170
  isLoading: boolean;
171
171
  isError: boolean;
@@ -1,7 +1,7 @@
1
1
  export declare const OnlineBankDepositContext: (props: {
2
2
  value: {
3
3
  view: "form" | "vca";
4
- status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
4
+ status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
7
7
  deposit: import("../../../../types").Deposit | null;
@@ -14,7 +14,7 @@ export declare const OnlineBankDepositContext: (props: {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useOnlineBankDepositContext: () => {
16
16
  view: "form" | "vca";
17
- status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
17
+ status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
20
20
  deposit: import("../../../../types").Deposit | null;
@@ -2,7 +2,7 @@ import type { Deposit } from '../../../../types';
2
2
  export type UseOnlineBankDepositReturn = ReturnType<typeof useOnlineBankDeposit>;
3
3
  export declare function useOnlineBankDeposit(): {
4
4
  view: "form" | "vca";
5
- status: "waiting" | "failed" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
+ status: "failed" | "waiting" | "processing" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
8
8
  deposit: Deposit | null;
@@ -231,7 +231,11 @@ export function VentajaWithdrawal() {
231
231
  o.field.onChange(details.value.at(0) ?? '');
232
232
  }, children: [_jsx(Select.Label, { children: "Bank" }), _jsx(Select.Control, { children: _jsxs(Select.Trigger, { children: [_jsx(Select.ValueText, {}), _jsx(Select.Indicator, { asChild: true, children: _jsx(ChevronDownIcon, {}) })] }) }), _jsx(Select.Positioner, { children: _jsx(Select.Content, { children: _jsx(Select.ItemGroup, { children: bankCollection.items.map((item) => (_jsxs(Select.Item, { item: item, children: [_jsx(Select.ItemText, { children: item.name }), _jsx(Select.ItemIndicator, { asChild: true, children: _jsx(CheckIcon, {}) })] }, item.code))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account Name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] })] })), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: paymentMethod === 'INSTAPAY'
233
233
  ? 'Bank account number'
234
- : 'Phone Number' }), _jsx(Field.Input, { type: "number", ...form.register('accountNumber'), onKeyDown: (e) => {
234
+ : 'Phone Number' }), _jsx(Field.Input, { type: "text", inputMode: "numeric", pattern: "[0-9]*", ...form.register('accountNumber', {
235
+ onChange: (e) => {
236
+ e.target.value = e.target.value.replace(/\D/g, '');
237
+ },
238
+ }), onKeyDown: (e) => {
235
239
  if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
236
240
  e.preventDefault();
237
241
  }
@@ -1,11 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import Image from 'next/image';
4
- import { useState } from 'react';
5
4
  import { useShallow } from 'zustand/shallow';
6
5
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
7
- import { getSession } from '../../client/services/getSession.js';
8
- import { toaster } from '../../client/utils/toaster.js';
9
6
  import cinePopLogo from '../../images/cinepop-logo.png';
10
7
  import dearUtolLogo from '../../images/dear-utol-logo.png';
11
8
  import mariasDiary from '../../images/marias-diary-logo.png';
@@ -14,33 +11,10 @@ import { Dialog } from '../../ui/Dialog/index.js';
14
11
  import { Portal } from '../../ui/Portal/index.js';
15
12
  export function KYCReview() {
16
13
  const { kycReview } = useGlobalStore(useShallow((s) => ({ kycReview: s.kycReview })));
17
- const [isLoading, setIsLoading] = useState(false);
18
- return (_jsx(Dialog.Root, { open: kycReview.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex w-[375px] flex-col items-center justify-between space-y-4 rounded-lg bg-[#232443] p-6 text-center", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "font-semibold text-[#F5F5F6] text-lg", children: "Thanks for your submission." }), _jsxs("div", { className: "mt-1 text-[#CECFD2] text-sm", children: ["We\u2019re now ", '', _jsxs("span", { className: "text-[#F96B47]", children: ["reviewing your KYC information ", ''] }), "and will notify you once the verification is complete."] }), _jsx("div", { className: "mt-6 text-[#CECFD2] text-sm", children: "In the meantime, you can watch your favorite series on CinePop!" })] }), _jsxs("div", { className: "pt-3", children: [_jsx(Image, { src: cinePopLogo, alt: "cine poplogo", width: 151, height: 24, className: "mx-auto mb-2 h-auto w-[151px]" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { src: secretConfessionsLogo, alt: "secret confessions logo", width: 104, height: 53, className: "h-auto w-[104px]" }), _jsx(Image, { src: dearUtolLogo, alt: "dear utol logo", width: 105, height: 53, className: "h-auto w-[105px]" }), _jsx(Image, { src: mariasDiary, alt: "maria's diary logo", width: 104, height: 53, className: "h-auto w-[104px]" })] })] }), _jsx("button", { disabled: isLoading, type: "button", className: "h-[44px] w-full rounded-md font-semibold", style: {
14
+ return (_jsx(Dialog.Root, { open: kycReview.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { className: "flex items-center", children: _jsxs(Dialog.Content, { className: "flex w-[375px] flex-col items-center justify-between space-y-4 border bg-[#232443] p-6 text-center", children: [_jsxs("div", { className: "flex flex-col items-center", children: [_jsx("div", { className: "mb-4 h-7 w-7 animate-spin rounded-full border-4 border-[#101730] border-t-[#F05027]" }), _jsx("div", { className: "font-semibold text-[#F5F5F6] text-lg", children: "Thanks for your submission." }), _jsxs("div", { className: "mt-1 text-[#CECFD2] text-sm", children: ["We\u2019re now ", '', _jsxs("span", { className: "text-[#F96B47]", children: ["reviewing your KYC information ", ''] }), "and will notify you once the verification is complete."] }), _jsx("div", { className: "mt-6 text-[#CECFD2] text-sm", children: "In the meantime, you can watch your favorite series on CinePop!" })] }), _jsxs("div", { className: "pt-3", children: [_jsx(Image, { src: cinePopLogo, alt: "cine poplogo", width: 151, height: 24, className: "mx-auto mb-2 h-auto w-[151px]" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Image, { src: secretConfessionsLogo, alt: "secret confessions logo", width: 104, height: 53, className: "h-auto w-[104px]" }), _jsx(Image, { src: dearUtolLogo, alt: "dear utol logo", width: 105, height: 53, className: "h-auto w-[105px]" }), _jsx(Image, { src: mariasDiary, alt: "maria's diary logo", width: 104, height: 53, className: "h-auto w-[104px]" })] })] }), _jsx("button", { type: "button", className: "h-[44px] w-full rounded-md font-semibold", style: {
19
15
  background: 'linear-gradient(90deg, #9333E8 0%, #D92778 100%)',
20
- }, onClick: async () => {
21
- const session = await getSession();
22
- setIsLoading(true);
23
- try {
24
- const response = await fetch('https://auth.development.opexa.io/v1/sso/cinepop', {
25
- method: 'POST',
26
- headers: {
27
- AUTHORIZATION: `Bearer ${session.token}`,
28
- 'PLATFORM-ID': 'Z892',
29
- 'Content-Type': 'application/json',
30
- },
31
- });
32
- const data = await response.json();
33
- window.open(data.data.redirectionUrl, '_blank');
34
- }
35
- catch {
36
- toaster.error({
37
- title: 'Failed to redirect',
38
- description: 'Unable to open CinePop. Please try again.',
39
- });
40
- }
41
- finally {
42
- setIsLoading(false);
43
- kycReview.setOpen(false);
44
- }
16
+ }, onClick: () => {
17
+ window.open('https://cinepop.film/', '_blank');
18
+ kycReview.setOpen(false);
45
19
  }, children: "Watch Cinepop" })] }) })] }) }));
46
20
  }
@@ -344,6 +344,12 @@ export const GAME_PROVIDER_DATA = {
344
344
  slug: 'test',
345
345
  logo: '',
346
346
  },
347
+ EVOLUTION_TAP_A_ROO: {
348
+ id: 'EVOLUTION_TAP_A_ROO',
349
+ name: 'Evolution Tap A Roo',
350
+ slug: 'evolution-tap-a-roo',
351
+ logo: '',
352
+ },
347
353
  };
348
354
  export const GAME_PROVIDERS = Object.values(GAME_PROVIDER_DATA).map(({ id }) => id);
349
355
  export const LEGACY_GAME_PROVIDERS = [
@@ -0,0 +1 @@
1
+ export declare function UpdateMobilePhoneNumber(): import("react/jsx-runtime").JSX.Element;
@@ -20,13 +20,12 @@ import { Dialog } from '../../ui/Dialog/index.js';
20
20
  import { Field } from '../../ui/Field/index.js';
21
21
  import { PinInput } from '../../ui/PinInput/index.js';
22
22
  import { Portal } from '../../ui/Portal/index.js';
23
- export function UpdateMobileNumber() {
23
+ export function UpdateMobilePhoneNumber() {
24
24
  const accountQuery = useAccountQuery();
25
25
  const account = accountQuery.data;
26
26
  const isAccountLoading = accountQuery.isLoading;
27
27
  const hasMobileNumber = !!account?.mobileNumber;
28
28
  const [isDialogOpen, setIsDialogOpen] = useState(false);
29
- console.log('isDialogOpen', isDialogOpen);
30
29
  // biome-ignore lint/correctness/useExhaustiveDependencies: We only want to open the dialog when the account data loads, not on every hasMobileNumber change
31
30
  useEffect(() => {
32
31
  if (!isAccountLoading && !!account && !hasMobileNumber) {
@@ -59,11 +58,9 @@ export function UpdateMobileNumber() {
59
58
  description: 'Your mobile number has been verified.',
60
59
  });
61
60
  setIsDialogOpen(false);
62
- console.log('close dialog');
61
+ console.log('mobile number updated successfully');
63
62
  },
64
63
  onError: (err) => {
65
- console.log('err', err);
66
- console.log('error updating mobile number');
67
64
  const errorMessage = err.message === 'Internal Server Error'
68
65
  ? `mobile number ${mobileNumberParser.format(step1Form.getValues('mobileNumber'))} is not available`
69
66
  : err.message;
@@ -71,6 +68,7 @@ export function UpdateMobileNumber() {
71
68
  title: 'Sign In Failed',
72
69
  description: errorMessage,
73
70
  });
71
+ console.log('error updating mobile number');
74
72
  },
75
73
  });
76
74
  const localeInfo = useLocaleInfo();
@@ -0,0 +1 @@
1
+ export * from './UpdateMobilePhoneNumber';
@@ -0,0 +1 @@
1
+ export * from './UpdateMobilePhoneNumber.js';
@@ -8,23 +8,23 @@ export declare const createForgotPasswordSchema: (mobileNumberParser: MobileNumb
8
8
  mobileNumber: z.ZodEffects<z.ZodString, string, string>;
9
9
  verificationCode: z.ZodEffects<z.ZodString, string, string>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- password: string;
12
11
  verificationCode: string;
12
+ password: string;
13
13
  mobileNumber: string;
14
14
  confirmPassword: string;
15
15
  }, {
16
- password: string;
17
16
  verificationCode: string;
17
+ password: string;
18
18
  mobileNumber: string;
19
19
  confirmPassword: string;
20
20
  }>, {
21
- password: string;
22
21
  verificationCode: string;
22
+ password: string;
23
23
  mobileNumber: string;
24
24
  confirmPassword: string;
25
25
  }, {
26
- password: string;
27
26
  verificationCode: string;
27
+ password: string;
28
28
  mobileNumber: string;
29
29
  confirmPassword: string;
30
30
  }>;
@@ -157,7 +157,7 @@ export interface Announcement {
157
157
  dateTimeLastUpdated: string;
158
158
  }
159
159
  export type GameType = 'SLOTS' | 'SPORTS' | 'FISHING' | 'BINGO' | 'LIVE' | 'GAMES' | 'TABLE' | 'SPECIALTY' | 'NUMERICAL' | 'NUMERIC' | 'ARCADE';
160
- export type GameProvider = 'JILI' | 'JILI_BINGO' | 'PGSOFT' | 'FACHAI' | 'BTI' | 'DG' | 'PLAYTECH' | 'E2E' | 'ONEAPI_EVOLUTION' | 'EVOLUTION' | 'EVOLUTION_NETENT' | 'EVOLUTION_REDTIGER' | 'MEGABALL' | 'MEGA2SPIN' | 'DARWIN' | 'RTG' | 'DRBINGO' | 'HOLLYWOODTV' | 'CQ9' | 'JDB' | 'HABANERO' | 'SPINIX' | 'JOKER' | 'HACKSAW' | 'JDBGTF' | 'JDBSPRIBE' | 'MICROGAMING' | 'RELAXGAMING' | 'EVOPLAY' | 'BOOONGO' | 'BGAMING' | 'KINGMAKER' | 'KINGMIDAS' | 'YELLOWBAT' | 'ETENGJUE' | 'SABA' | 'PRAGMATICPLAY' | 'SPRIBE' | 'EZUGI' | 'ALIZE' | 'DIGITAIN' | 'BNG' | 'NO_LIMIT_CITY' | 'BIG_TIME_GAMING' | 'SAGAMING' | 'ONEAPI_SPADEGAMING' | 'JK8' | 'RUBYPLAY' | 'EVOLUTIONNETENT' | 'TEST';
160
+ export type GameProvider = 'JILI' | 'JILI_BINGO' | 'PGSOFT' | 'FACHAI' | 'BTI' | 'DG' | 'PLAYTECH' | 'E2E' | 'ONEAPI_EVOLUTION' | 'EVOLUTION' | 'EVOLUTION_NETENT' | 'EVOLUTION_REDTIGER' | 'EVOLUTION_TAP_A_ROO' | 'MEGABALL' | 'MEGA2SPIN' | 'DARWIN' | 'RTG' | 'DRBINGO' | 'HOLLYWOODTV' | 'CQ9' | 'JDB' | 'HABANERO' | 'SPINIX' | 'JOKER' | 'HACKSAW' | 'JDBGTF' | 'JDBSPRIBE' | 'MICROGAMING' | 'RELAXGAMING' | 'EVOPLAY' | 'BOOONGO' | 'BGAMING' | 'KINGMAKER' | 'KINGMIDAS' | 'YELLOWBAT' | 'ETENGJUE' | 'SABA' | 'PRAGMATICPLAY' | 'SPRIBE' | 'EZUGI' | 'ALIZE' | 'DIGITAIN' | 'BNG' | 'NO_LIMIT_CITY' | 'BIG_TIME_GAMING' | 'SAGAMING' | 'ONEAPI_SPADEGAMING' | 'JK8' | 'RUBYPLAY' | 'EVOLUTIONNETENT' | 'TEST';
161
161
  export type GameStatus = 'ACTIVE' | 'INACTIVE';
162
162
  export type GameTag = 'HOT' | 'hot' | 'NEW' | 'new' | 'TOP' | 'top' | 'POPULAR' | 'popular' | (string & {});
163
163
  export interface Game {