@opexa/portal-components 0.0.702 → 0.0.703

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/Banner/Banner.client.d.ts +12 -0
  2. package/dist/components/Banner/Banner.client.js +49 -0
  3. package/dist/components/DigitainLauncher/Loading.d.ts +1 -0
  4. package/dist/components/DigitainLauncher/Loading.js +5 -0
  5. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  6. package/dist/components/KYC/BasicInformation.js +101 -0
  7. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  8. package/dist/components/KYC/IdentityVerification.js +120 -0
  9. package/dist/components/KYC/Indicator.d.ts +1 -0
  10. package/dist/components/KYC/Indicator.js +8 -0
  11. package/dist/components/KYC/KYC.lazy.d.ts +6 -0
  12. package/dist/components/KYC/KYC.lazy.js +45 -0
  13. package/dist/components/KYC/KYCContext.d.ts +6 -0
  14. package/dist/components/KYC/KYCContext.js +2 -0
  15. package/dist/components/KYC/KYCVerificationStatus.lazy.js +7 -4
  16. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  17. package/dist/components/KYC/PersonalInformation.js +122 -0
  18. package/dist/components/KYC/useKYC.d.ts +25 -0
  19. package/dist/components/KYC/useKYC.js +38 -0
  20. package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +1 -0
  21. package/dist/components/PortalProvider/AndroidOnlyComponents.js +12 -0
  22. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
  23. package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
  24. package/dist/components/SignIn/utils.d.ts +8 -0
  25. package/dist/components/SignIn/utils.js +26 -0
  26. package/dist/constants/Branches.d.ts +2 -0
  27. package/dist/constants/Branches.js +42 -0
  28. package/dist/constants/GameProvider.d.ts +1 -1
  29. package/dist/constants/GameProvider.js +3 -1
  30. package/dist/constants/GameType.d.ts +1 -1
  31. package/dist/constants/GameType.js +6 -0
  32. package/dist/images/game-providers/ALPHACHINKO.png +0 -0
  33. package/dist/images/responsible-gaming-yellow.png +0 -0
  34. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  35. package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
  36. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  37. package/dist/third-parties/FacebookPixel/api.js +1 -0
  38. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  39. package/dist/third-parties/FacebookPixel/index.js +1 -0
  40. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  41. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
  42. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  43. package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
  44. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  45. package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
  46. package/dist/third-parties/index.d.ts +2 -0
  47. package/dist/third-parties/index.js +2 -0
  48. package/dist/types/index.d.ts +1 -1
  49. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  50. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  51. package/dist/ui/Badge/Badge.d.ts +12 -12
  52. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  53. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  54. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  55. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  56. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  57. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  58. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  59. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  60. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  61. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  62. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  63. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  64. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  65. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  66. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  67. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  68. package/dist/ui/Menu/Menu.d.ts +144 -144
  69. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  70. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  71. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  72. package/dist/ui/Popover/Popover.d.ts +55 -55
  73. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  74. package/dist/ui/Progress/Progress.d.ts +27 -27
  75. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  76. package/dist/ui/QrCode/QrCode.d.ts +40 -40
  77. package/dist/ui/QrCode/qrCode.recipe.d.ts +8 -8
  78. package/dist/ui/Select/Select.d.ts +45 -45
  79. package/dist/ui/Select/select.recipe.d.ts +3 -3
  80. package/dist/ui/Table/Table.d.ts +21 -21
  81. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  82. package/dist/ui/Table/table.recipe.d.ts +3 -3
  83. package/package.json +1 -1
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { addHours } from 'date-fns';
3
+ import { clamp } from 'lodash-es';
4
+ import { useLocalStorage, useTimeout } from 'usehooks-ts';
5
+ import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
6
+ export function CXDTokenObserver() {
7
+ const { data: account } = useAccountQuery();
8
+ const accountCxd = {
9
+ cxd: account?.cellxpertDetails?.cxd,
10
+ };
11
+ const [cxd, setCxd, removeCxd] = useLocalStorage('cxd', null);
12
+ const now = new Date();
13
+ const removeCxdUntilInMs = cxd?.timestamp
14
+ ? clamp(cxd.timestamp - now.getTime(), 0, Infinity)
15
+ : 0;
16
+ useTimeout(() => {
17
+ const isSame = cxd?.cxd === accountCxd.cxd;
18
+ if (!isSame) {
19
+ const extendedTimestamp = addHours(new Date(), 6).getTime();
20
+ setCxd({
21
+ cxd: accountCxd.cxd,
22
+ timestamp: extendedTimestamp,
23
+ });
24
+ }
25
+ }, account ? 100 : null);
26
+ useTimeout(() => {
27
+ removeCxd();
28
+ }, account ? removeCxdUntilInMs : null);
29
+ return null;
30
+ }
@@ -0,0 +1,8 @@
1
+ type Options = {
2
+ accountName?: string;
3
+ siteName?: string;
4
+ signInOptions?: 'MOBILE_NUMBER' | 'NAME_AND_PASSWORD';
5
+ };
6
+ export type ErrorCode = 'MEMBER_ACCOUNT_BLACKLISTED' | 'MEMBER_ACCOUNT_SUSPENDED' | 'INVALID_RECAPTCHA_RESPONSE' | 'MEMBER_NOT_FOUND' | 'RATE_LIMIT_REACH' | 'NOT_READY_TO_SEND_VERIFICATION_ERROR' | 'Forbidden';
7
+ export declare function getFriendlyErrorMessage(code: ErrorCode, options?: Options): string;
8
+ export {};
@@ -0,0 +1,26 @@
1
+ export function getFriendlyErrorMessage(code, options) {
2
+ const accountName = options?.accountName ?? '';
3
+ const siteName = options?.siteName ?? '';
4
+ const signInOptions = options?.signInOptions ?? 'NAME_AND_PASSWORD';
5
+ switch (code) {
6
+ case 'MEMBER_ACCOUNT_BLACKLISTED':
7
+ return `Your account ${accountName} has been blacklisted due to a serious violation of our policies. For more information or to appeal, please contact the ${siteName} Chat Support team.`;
8
+ case 'MEMBER_ACCOUNT_SUSPENDED':
9
+ return `Your account ${accountName} has been temporarily suspended. Please reach out to the ${siteName} Chat Support team to learn more and get help with resolving the issue.`;
10
+ case 'INVALID_RECAPTCHA_RESPONSE':
11
+ return 'Invalid reCAPTCHA response';
12
+ case 'MEMBER_NOT_FOUND':
13
+ return 'Account not found. Please check your username and try again.';
14
+ case 'RATE_LIMIT_REACH':
15
+ return 'Rate limit exceeded';
16
+ case 'NOT_READY_TO_SEND_VERIFICATION_ERROR':
17
+ return 'Your account is not ready to send verification requests. Please try again later.';
18
+ case 'Forbidden':
19
+ if (signInOptions === 'MOBILE_NUMBER') {
20
+ return 'Invalid verification code. Please check the code and try again.';
21
+ }
22
+ return 'Invalid username or password, please try again.';
23
+ default:
24
+ return 'Something went wrong. Please try again later.';
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ import type { Branch } from '../types';
2
+ export declare const BRANCHES: Branch[];
@@ -0,0 +1,42 @@
1
+ export const BRANCHES = [
2
+ {
3
+ code: 'BRCAL',
4
+ name: 'Bingo Republic 2nd floor Primark Center Deparo St., Caloocan City',
5
+ },
6
+ {
7
+ code: 'BRNAG',
8
+ name: 'Bingo Republic 3rd floor Robinsons Mall, Naga City, Camarines Sur',
9
+ },
10
+ {
11
+ code: 'BRANT',
12
+ name: 'Bingo Republic 2nd floor Robinsons Mall, San Vicente,Antique',
13
+ },
14
+ {
15
+ code: 'BRCLA',
16
+ name: 'Clark',
17
+ },
18
+ {
19
+ code: 'BRLAG',
20
+ name: 'Laguna',
21
+ },
22
+ {
23
+ code: 'BREAS',
24
+ name: 'Eastwood City, Quezon City',
25
+ },
26
+ {
27
+ code: 'BRMAR',
28
+ name: 'Bingo ng Bayan 4th floor Marikina Public Market, Marikina City',
29
+ },
30
+ {
31
+ code: 'BRILO',
32
+ name: 'Iloilo',
33
+ },
34
+ {
35
+ code: 'BRFIM',
36
+ name: 'Fisher Mall,Quezon City',
37
+ },
38
+ {
39
+ code: 'BRCAC',
40
+ name: 'Villa Caceres Hotel, Naga City,Camsur',
41
+ },
42
+ ];
@@ -1,4 +1,4 @@
1
1
  import type { GameProvider, GameProviderData } from '../types';
2
2
  export declare const GAME_PROVIDER_DATA: Record<GameProvider, GameProviderData>;
3
3
  export declare const GAME_PROVIDERS: GameProvider[];
4
- export declare const LEGACY_GAME_PROVIDERS: ["JILI", "PGSOFT", "FACHAI", "BTI", "DG", "PLAYTECH", "E2E", "ONEAPI_EVOLUTION", "CQ9", "JDB", "HABANERO", "SPINIX", "JOKER", "HACKSAW", "JDBGTF", "JDBSPRIBE", "MICROGAMING", "RELAXGAMING", "EVOPLAY", "BOOONGO", "BGAMING", "KINGMAKER", "KINGMIDAS", "YELLOWBAT", "ETENGJUE", "SABA", "PRAGMATICPLAY", "SPRIBE", "EZUGI", "ALIZE", "BNG", "JILI_BINGO"];
4
+ export declare const LEGACY_GAME_PROVIDERS: ["JILI", "PGSOFT", "FACHAI", "BTI", "DG", "PLAYTECH", "E2E", "ONEAPI_EVOLUTION", "CQ9", "JDB", "HABANERO", "SPINIX", "JOKER", "HACKSAW", "JDBGTF", "JDBSPRIBE", "MICROGAMING", "RELAXGAMING", "EVOPLAY", "BOOONGO", "BGAMING", "KINGMAKER", "KINGMIDAS", "YELLOWBAT", "ETENGJUE", "SABA", "PRAGMATICPLAY", "SPRIBE", "EZUGI", "ALIZE", "BNG", "JILI_BINGO", "ONEAPI_SPADEGAMING"];
@@ -1,4 +1,5 @@
1
1
  import alize from '../images/game-providers/ALIZE.png';
2
+ import alphaChinko from '../images/game-providers/ALPHACHINKO.png';
2
3
  import bgaming from '../images/game-providers/BGAMING.png';
3
4
  import btg from '../images/game-providers/BIG_TIME_GAMING.png';
4
5
  import bng from '../images/game-providers/BNG.png';
@@ -316,7 +317,7 @@ export const GAME_PROVIDER_DATA = {
316
317
  id: 'ALPHACHINKO',
317
318
  name: 'Alpha Chinko',
318
319
  slug: 'alphachinko',
319
- logo: '',
320
+ logo: alphaChinko,
320
321
  },
321
322
  ONEAPI_SPADEGAMING: {
322
323
  id: 'ONEAPI_SPADEGAMING',
@@ -359,4 +360,5 @@ export const LEGACY_GAME_PROVIDERS = [
359
360
  'ALIZE',
360
361
  'BNG',
361
362
  'JILI_BINGO',
363
+ 'ONEAPI_SPADEGAMING',
362
364
  ];
@@ -1,3 +1,3 @@
1
1
  import type { GameType, GameTypeData } from '../types';
2
2
  export declare const GAME_TYPE_DATA: Record<GameType, GameTypeData>;
3
- export declare const GAME_TYPES: ["ARCADE", "BINGO", "FISHING", "GAMES", "LIVE", "NUMERICAL", "SLOTS", "SPECIALTY", "SPORTS", "TABLE"];
3
+ export declare const GAME_TYPES: ["ARCADE", "BINGO", "FISHING", "GAMES", "LIVE", "NUMERICAL", "NUMERIC", "SLOTS", "SPECIALTY", "SPORTS", "TABLE"];
@@ -29,6 +29,11 @@ export const GAME_TYPE_DATA = {
29
29
  name: 'Numerical',
30
30
  slug: 'numerical',
31
31
  },
32
+ NUMERIC: {
33
+ id: 'NUMERIC',
34
+ name: 'Numeric',
35
+ slug: 'numeric',
36
+ },
32
37
  SLOTS: {
33
38
  id: 'SLOTS',
34
39
  name: 'Slots',
@@ -57,6 +62,7 @@ export const GAME_TYPES = [
57
62
  'GAMES',
58
63
  'LIVE',
59
64
  'NUMERICAL',
65
+ 'NUMERIC',
60
66
  'SLOTS',
61
67
  'SPECIALTY',
62
68
  'SPORTS',
@@ -0,0 +1,4 @@
1
+ export interface FacebookPixelProps {
2
+ fbId: string;
3
+ }
4
+ export declare function FacebookPixel(props: FacebookPixelProps): null;
@@ -0,0 +1,4 @@
1
+ export function FacebookPixel(props) {
2
+ console.log(props);
3
+ return null;
4
+ }
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export * from './FacebookPixel';
@@ -0,0 +1 @@
1
+ export * from './FacebookPixel.js';
@@ -0,0 +1,4 @@
1
+ export interface GoogleRecaptchaProps {
2
+ siteKey: string;
3
+ }
4
+ export declare function GoogleRecaptcha(props: GoogleRecaptchaProps): null;
@@ -0,0 +1,4 @@
1
+ export function GoogleRecaptcha(props) {
2
+ console.log(props);
3
+ return null;
4
+ }
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export * from './GoogleRecaptcha';
@@ -0,0 +1 @@
1
+ export * from './GoogleRecaptcha.js';
@@ -0,0 +1,2 @@
1
+ export * from './FacebookPixel';
2
+ export * from './GoogleRecaptcha';
@@ -0,0 +1,2 @@
1
+ export * from './FacebookPixel/index.js';
2
+ export * from './GoogleRecaptcha/index.js';
@@ -156,7 +156,7 @@ export interface Announcement {
156
156
  dateTimeCreated: string;
157
157
  dateTimeLastUpdated: string;
158
158
  }
159
- export type GameType = 'SLOTS' | 'SPORTS' | 'FISHING' | 'BINGO' | 'LIVE' | 'GAMES' | 'TABLE' | 'SPECIALTY' | 'NUMERICAL' | 'ARCADE';
159
+ export type GameType = 'SLOTS' | 'SPORTS' | 'FISHING' | 'BINGO' | 'LIVE' | 'GAMES' | 'TABLE' | 'SPECIALTY' | 'NUMERICAL' | 'NUMERIC' | 'ARCADE';
160
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' | 'ALPHACHINKO';
161
161
  export type GameStatus = 'ACTIVE' | 'INACTIVE';
162
162
  export type GameTag = 'HOT' | 'hot' | 'NEW' | 'new' | 'TOP' | 'top' | 'POPULAR' | 'popular' | (string & {});