@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.
- package/dist/components/DigitainLauncher/utils.js +2 -2
- package/dist/components/Quests/MultiWageringQuest.js +16 -13
- package/dist/ui/AlertDialog/AlertDialog.d.ts +121 -121
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- 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 +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- 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 +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- 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 +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +8 -8
- package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
- package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
- package/dist/ui/PinInput/PinInput.d.ts +12 -12
- package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/QrCode.d.ts +25 -25
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- 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 +1 -1
- package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
- package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
- package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
- package/dist/components/DigitainLauncher/Loading.js +0 -5
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +0 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +0 -184
- package/dist/components/KYC/BasicInformation.d.ts +0 -1
- package/dist/components/KYC/BasicInformation.js +0 -101
- package/dist/components/KYC/IdentityVerification.d.ts +0 -1
- package/dist/components/KYC/IdentityVerification.js +0 -120
- package/dist/components/KYC/Indicator.d.ts +0 -1
- package/dist/components/KYC/Indicator.js +0 -8
- package/dist/components/KYC/KYC.lazy.d.ts +0 -6
- package/dist/components/KYC/KYC.lazy.js +0 -45
- package/dist/components/KYC/KYCContext.d.ts +0 -6
- package/dist/components/KYC/KYCContext.js +0 -2
- package/dist/components/KYC/PersonalInformation.d.ts +0 -1
- package/dist/components/KYC/PersonalInformation.js +0 -122
- package/dist/components/KYC/useKYC.d.ts +0 -25
- package/dist/components/KYC/useKYC.js +0 -38
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +0 -1
- package/dist/components/PortalProvider/CXDTokenObserver.js +0 -30
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.d.ts +0 -1
- package/dist/components/PortalProvider/LinkGoogleAccountObserver.js +0 -29
- package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
- package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
- package/dist/components/SessionWatcher/index.d.ts +0 -1
- package/dist/components/SessionWatcher/index.js +0 -1
- package/dist/icons/LinkBrokenIcon.d.ts +0 -2
- package/dist/icons/LinkBrokenIcon.js +0 -4
- 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
|
|
11
|
-
: 'sport.
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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 (
|
|
30
|
-
|
|
28
|
+
else if (remaining >= stageTarget) {
|
|
29
|
+
progress = 100;
|
|
31
30
|
}
|
|
32
|
-
|
|
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
|
|
45
|
+
const transformedStages = quest.stages.map((stage) => ({
|
|
43
46
|
...stage,
|
|
44
|
-
progressValue:
|
|
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:
|
|
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 })] }));
|