@opexa/portal-components 0.0.473 → 0.0.475

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 (80) hide show
  1. package/dist/components/DigitainLauncher/utils.js +2 -2
  2. package/dist/components/Quests/MultiWageringQuest.js +16 -13
  3. package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
  4. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
  5. package/dist/ui/Badge/Badge.d.ts +12 -12
  6. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  7. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  8. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  9. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  10. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  11. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  12. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  13. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  14. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  15. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  16. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  17. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  18. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  19. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  20. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  21. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  22. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  23. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  24. package/dist/ui/Field/Field.d.ts +21 -21
  25. package/dist/ui/Field/field.recipe.d.ts +3 -3
  26. package/dist/ui/Menu/Menu.d.ts +144 -144
  27. package/dist/ui/Menu/menu.recipe.d.ts +8 -8
  28. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  29. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  30. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  31. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  32. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  33. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  34. package/dist/ui/Popover/Popover.d.ts +55 -55
  35. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  36. package/dist/ui/Progress/Progress.d.ts +27 -27
  37. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  38. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  39. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  40. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  41. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  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/package.json +1 -1
  50. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
  51. package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
  52. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  53. package/dist/components/DigitainLauncher/Loading.js +0 -5
  54. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
  55. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
  56. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  57. package/dist/components/KYC/BasicInformation.js +0 -101
  58. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  59. package/dist/components/KYC/IdentityVerification.js +0 -120
  60. package/dist/components/KYC/Indicator.d.ts +0 -1
  61. package/dist/components/KYC/Indicator.js +0 -8
  62. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  63. package/dist/components/KYC/KYC.lazy.js +0 -45
  64. package/dist/components/KYC/KYCContext.d.ts +0 -6
  65. package/dist/components/KYC/KYCContext.js +0 -2
  66. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  67. package/dist/components/KYC/PersonalInformation.js +0 -122
  68. package/dist/components/KYC/useKYC.d.ts +0 -25
  69. package/dist/components/KYC/useKYC.js +0 -38
  70. package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
  71. package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
  72. package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
  73. package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
  74. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  75. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  76. package/dist/components/SessionWatcher/index.d.ts +0 -1
  77. package/dist/components/SessionWatcher/index.js +0 -1
  78. package/dist/icons/LinkBrokenIcon.d.ts +0 -2
  79. package/dist/icons/LinkBrokenIcon.js +0 -4
  80. package/dist/images/responsible-gaming-yellow.png +0 -0
@@ -7,8 +7,8 @@ import { createGameSession, getGameSession } from '../../services/wallet.js';
7
7
  import { createPoll } from '../../utils/createPoll.js';
8
8
  export const defaultDigitainParams = {
9
9
  server: process.env.NEXT_PUBLIC_ENVIRONMENT === 'development'
10
- ? 'sport-uat.ofwin.fun'
11
- : 'sport.ofwin.fun',
10
+ ? 'sport.uat.blucky.com.ph'
11
+ : 'sport.blucky.com.ph',
12
12
  containerId: 'digitain-container',
13
13
  token: '',
14
14
  defaultLanguage: 'en',
@@ -19,18 +19,21 @@ export function MultiWageringQuest() {
19
19
  const quest = useQuestContext();
20
20
  const { stages, totalStage, currentStage, progressPercentage } = useMemo(() => {
21
21
  const currentStage = quest.stages.filter((m) => m.cleared).length;
22
- const getStageItemProgress = (overallProgress, stageNumber) => {
23
- const stageSize = 100 / quest.stages.length;
24
- const stageStart = (stageNumber - 1) * stageSize;
25
- const stageEnd = stageStart + stageSize;
26
- if (overallProgress >= stageEnd) {
27
- return 100;
22
+ function calculateStageProgress(stageTarget) {
23
+ let progress = 0;
24
+ let remaining = +quest.turnover;
25
+ if (remaining <= 0) {
26
+ progress = 0;
28
27
  }
29
- else if (overallProgress > stageStart) {
30
- return ((overallProgress - stageStart) / stageSize) * 100;
28
+ else if (remaining >= stageTarget) {
29
+ progress = 100;
31
30
  }
32
- return 0;
33
- };
31
+ else {
32
+ progress = (remaining / stageTarget) * 100;
33
+ }
34
+ remaining -= stageTarget;
35
+ return progress;
36
+ }
34
37
  if (!quest?.stages) {
35
38
  return {
36
39
  stages: [],
@@ -39,9 +42,9 @@ export function MultiWageringQuest() {
39
42
  progressPercentage: 0,
40
43
  };
41
44
  }
42
- const transformedStages = quest.stages.map((stage, idx) => ({
45
+ const transformedStages = quest.stages.map((stage) => ({
43
46
  ...stage,
44
- progressValue: getStageItemProgress(parseFloat(quest.progressPercentage), idx + 1),
47
+ progressValue: calculateStageProgress(parseFloat(stage.targetTurnover)),
45
48
  }));
46
49
  return {
47
50
  stages: transformedStages,
@@ -69,7 +72,7 @@ export function MultiWageringQuest() {
69
72
  currency: localeInfo.currency.code,
70
73
  maxDecimalPlaces: 0,
71
74
  minDecimalPlaces: 0,
72
- }), ' ', "Bonus"] }) })] })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: false, className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Stages, { open: disclosure.open || isOpen, onOpenChange: (open) => {
75
+ }), ' ', "Bonus"] }) })] })] }), _jsx("div", { className: "flex h-full items-end", children: _jsx(Button, { size: "sm", onClick: handleViewDetails, "aria-label": "View Details", disabled: quest.status === 'FAILED' || quest.status === 'COMPLETED', className: "disabled:bg-bg-primary disabled:text-text-disabled", children: "View Details" }) })] }), _jsx(Stages, { open: disclosure.open || isOpen, onOpenChange: (open) => {
73
76
  disclosure.setOpen(open);
74
77
  router.push('/quests');
75
78
  }, quest: quest, stages: stages })] }));