@opexa/portal-components 0.0.650 → 0.0.652

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 (65) hide show
  1. package/dist/components/Account/Wallet.js +23 -9
  2. package/dist/components/DepositWithdrawal/Withdrawal/ActiveTurnoverRequirement.d.ts +1 -0
  3. package/dist/components/DepositWithdrawal/Withdrawal/ActiveTurnoverRequirement.js +27 -0
  4. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +2 -1
  5. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +2 -1
  6. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +2 -1
  7. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +2 -1
  8. package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +2 -1
  9. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +2 -1
  10. package/dist/handlers/index.d.ts +2 -2
  11. package/dist/handlers/postToken.d.ts +6 -6
  12. package/dist/icons/BankNote01Icon.d.ts +2 -0
  13. package/dist/icons/BankNote01Icon.js +4 -0
  14. package/dist/services/queries.d.ts +1 -1
  15. package/dist/services/queries.js +1 -0
  16. package/dist/services/wallet.d.ts +1 -0
  17. package/dist/services/wallet.js +3 -0
  18. package/dist/types/index.d.ts +1 -0
  19. package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
  20. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +8 -8
  21. package/dist/ui/Badge/Badge.d.ts +12 -12
  22. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  23. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  24. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  25. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  26. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  27. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  28. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  29. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  30. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  31. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  32. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  33. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  34. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  35. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  36. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  37. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  38. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  39. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  40. package/dist/ui/Field/Field.d.ts +21 -21
  41. package/dist/ui/Field/field.recipe.d.ts +3 -3
  42. package/dist/ui/Menu/Menu.d.ts +252 -252
  43. package/dist/ui/Menu/menu.recipe.d.ts +14 -14
  44. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  45. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  46. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  47. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  48. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  49. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  50. package/dist/ui/Popover/Popover.d.ts +55 -55
  51. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  52. package/dist/ui/Progress/Progress.d.ts +27 -27
  53. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  54. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  55. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  56. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  57. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  58. package/dist/ui/Select/Select.d.ts +45 -45
  59. package/dist/ui/Select/select.recipe.d.ts +3 -3
  60. package/dist/ui/Table/Table.d.ts +21 -21
  61. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  62. package/dist/ui/Table/table.recipe.d.ts +3 -3
  63. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  64. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  65. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { isNil } from 'lodash-es';
3
4
  import { twMerge } from 'tailwind-merge';
4
5
  import { useShallow } from 'zustand/shallow';
6
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
5
7
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
6
8
  import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
7
9
  import { useWalletQuery } from '../../client/hooks/useWalletQuery.js';
@@ -9,6 +11,7 @@ import { Button } from '../../ui/Button/index.js';
9
11
  import { formatNumber } from '../../utils/formatNumber.js';
10
12
  import { parseDecimal } from '../../utils/parseDecimal.js';
11
13
  export function Wallet({ classNames = {} }) {
14
+ const featureFlag = useFeatureFlag();
12
15
  const localeInfo = useLocaleInfo();
13
16
  const walletQuery = useWalletQuery({
14
17
  refetchInterval: 1000,
@@ -21,16 +24,27 @@ export function Wallet({ classNames = {} }) {
21
24
  const depositBalance = parseDecimal(walletQuery.data?.balance, 0);
22
25
  const bonusBalance = parseDecimal(walletQuery.data?.bonus, 0);
23
26
  const totalBalance = depositBalance + bonusBalance;
24
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('mt-3 rounded-xl border border-border-primary bg-bg-tertiary p-xl', classNames.walletBalanceContainer), children: [_jsx("div", { className: twMerge('text-sm text-text-secondary-700', classNames.totalBalanceLabel), children: "Total Balance" }), _jsx("div", { className: twMerge('font-bold text-3xl', classNames.totalBalanceAmount), children: formatNumber(totalBalance, {
25
- currency: localeInfo?.currency.code,
26
- minDecimalPlaces: 2,
27
- }) }), _jsxs("div", { className: twMerge('mt-1.5 flex gap-7xl', classNames.balanceDetailsContainer), children: [_jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.depositBalanceLabel), children: "Deposit Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.depositBalanceAmount), children: formatNumber(depositBalance, {
27
+ const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement);
28
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: twMerge('mt-3 overflow-hidden rounded-xl border border-border-primary', classNames.walletBalanceContainer), children: [_jsxs("div", { className: "bg-bg-tertiary p-xl", children: [_jsx("div", { className: twMerge('text-sm text-text-secondary-700', classNames.totalBalanceLabel), children: "Total Balance" }), _jsx("div", { className: twMerge('font-bold text-3xl', classNames.totalBalanceAmount), children: formatNumber(totalBalance, {
29
+ currency: localeInfo?.currency.code,
30
+ minDecimalPlaces: 2,
31
+ }) }), _jsxs("div", { className: twMerge('mt-1.5 flex gap-7xl', classNames.balanceDetailsContainer), children: [_jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.depositBalanceLabel), children: "Deposit Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.depositBalanceAmount), children: formatNumber(depositBalance, {
32
+ currency: localeInfo?.currency.code,
33
+ minDecimalPlaces: 2,
34
+ }) })] }), _jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.bonusBalanceLabel), children: "Bonus Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.bonusBalanceAmount), children: formatNumber(bonusBalance, {
35
+ currency: localeInfo?.currency.code,
36
+ minDecimalPlaces: 2,
37
+ }) })] })] })] }), featureFlag.enabled &&
38
+ !isNil(turnoverRequirement) &&
39
+ turnoverRequirement > 0 && (_jsxs("div", { className: "border-border-primary border-t bg-bg-quaternary px-xl py-2", children: [_jsx("p", { className: "text-2xs leading-tight", children: "Deposit Turnover Requirement" }), _jsx("p", { className: "mt-1 font-medium text-xs leading-tight", children: formatNumber(turnoverRequirement, {
40
+ currency: localeInfo?.currency.code,
41
+ minDecimalPlaces: 1,
42
+ maxDecimalPlaces: 2,
43
+ }) }), _jsxs("p", { className: "mt-0.5 text-2xs text-text-tertiary-600 leading-tight", children: ["You need to wager", ' ', _jsx("span", { className: "font-medium text-text-warning-primary-600 leading-tight", children: formatNumber(turnoverRequirement, {
28
44
  currency: localeInfo?.currency.code,
29
- minDecimalPlaces: 2,
30
- }) })] }), _jsxs("div", { children: [_jsx("p", { className: twMerge('text-2xs text-text-secondary-700', classNames.bonusBalanceLabel), children: "Bonus Balance" }), _jsx("p", { className: twMerge('text-medium text-text-primary-brand', classNames.bonusBalanceAmount), children: formatNumber(bonusBalance, {
31
- currency: localeInfo?.currency.code,
32
- minDecimalPlaces: 2,
33
- }) })] })] })] }), _jsxs("div", { className: twMerge('mt-3 flex gap-lg', classNames.walletActions), children: [_jsx(Button, { size: "xs", variant: "outline", className: classNames.withdrawButton, onClick: () => {
45
+ minDecimalPlaces: 1,
46
+ maxDecimalPlaces: 2,
47
+ }) }), ' ', "to meet this requirement before you can withdraw."] })] }))] }), _jsxs("div", { className: twMerge('mt-3 flex gap-lg', classNames.walletActions), children: [_jsx(Button, { size: "xs", variant: "outline", className: classNames.withdrawButton, onClick: () => {
34
48
  globalStore.depositWithdrawal.setOpen(true);
35
49
  globalStore.depositWithdrawal.setTab('WITHDRAWAL');
36
50
  globalStore.profile.setOpen(false);
@@ -0,0 +1 @@
1
+ export declare function ActiveTurnoverRequirement(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isNil } from 'lodash-es';
3
+ import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
4
+ import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
5
+ import { useWalletQuery } from '../../../client/hooks/useWalletQuery.js';
6
+ import { BankNote01Icon } from '../../../icons/BankNote01Icon.js';
7
+ import { formatNumber } from '../../../utils/formatNumber.js';
8
+ import { parseDecimal } from '../../../utils/parseDecimal.js';
9
+ export function ActiveTurnoverRequirement() {
10
+ const featureFlag = useFeatureFlag();
11
+ const walletQuery = useWalletQuery();
12
+ const localeInfo = useLocaleInfo();
13
+ const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement);
14
+ if (!featureFlag.enabled ||
15
+ isNil(turnoverRequirement) ||
16
+ turnoverRequirement <= 0)
17
+ return null;
18
+ return (_jsxs("div", { className: "mt-lg overflow-hidden rounded-xl border border-border-primary", children: [_jsxs("div", { className: "bg-bg-primary-alt p-xl", children: [_jsx("div", { className: "flex size-8.5 items-center justify-center rounded-full border-[1.667px] border-text-warning-primary/10", children: _jsx("div", { className: "flex size-6.5 items-center justify-center rounded-full border-[1.667px] border-text-warning-primary/30", children: _jsx(BankNote01Icon, { className: "size-5 text-text-warning-primary" }) }) }), _jsx("p", { className: "mt-lg text-sm text-text-tertiary-600", children: "It looks like you still need to complete your turnover requirement before you can withdraw funds." })] }), _jsxs("div", { className: "border-border-primary border-t bg-bg-quaternary px-xl py-2", children: [_jsx("p", { className: "text-2xs leading-tight", children: "Deposit Turnover Requirement" }), _jsx("p", { className: "mt-1 font-medium text-xs leading-tight", children: formatNumber(turnoverRequirement, {
19
+ currency: localeInfo?.currency.code,
20
+ minDecimalPlaces: 1,
21
+ maxDecimalPlaces: 2,
22
+ }) }), _jsxs("p", { className: "mt-0.5 text-2xs text-text-tertiary-600 leading-tight", children: ["You need to wager", ' ', _jsx("span", { className: "font-medium text-text-warning-primary-600 leading-tight", children: formatNumber(turnoverRequirement, {
23
+ currency: localeInfo?.currency.code,
24
+ minDecimalPlaces: 1,
25
+ maxDecimalPlaces: 2,
26
+ }) }), ' ', "to meet this requirement before you can withdraw."] })] })] }));
27
+ }
@@ -29,6 +29,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
31
  import { explainError } from '../../utils.js';
32
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function GCashWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -148,7 +149,7 @@ export function GCashWithdrawal() {
148
149
  shouldDirty: true,
149
150
  shouldValidate: true,
150
151
  });
151
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
152
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
152
153
  if (!details.open) {
153
154
  setStatus('waiting');
154
155
  }
@@ -28,6 +28,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
28
  import { AmountChoices } from '../../AmountChoices.js';
29
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
30
  import { explainError } from '../../utils.js';
31
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
31
32
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
32
33
  export function InstapayWithdrawal() {
33
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -154,7 +155,7 @@ export function InstapayWithdrawal() {
154
155
  shouldDirty: true,
155
156
  shouldValidate: true,
156
157
  });
157
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
158
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
158
159
  if (!details.open) {
159
160
  setStatus('waiting');
160
161
  }
@@ -25,6 +25,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
25
25
  import { AmountChoices } from '../../AmountChoices.js';
26
26
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
27
27
  import { explainError } from '../../utils.js';
28
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
28
29
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
29
30
  export function MayaAppWithdrawal() {
30
31
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -114,7 +115,7 @@ export function MayaAppWithdrawal() {
114
115
  shouldDirty: true,
115
116
  shouldValidate: true,
116
117
  });
117
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
118
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
118
119
  if (!details.open) {
119
120
  setStatus('waiting');
120
121
  }
@@ -27,6 +27,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
27
  import { AmountChoices } from '../../AmountChoices.js';
28
28
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
29
29
  import { explainError } from '../../utils.js';
30
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
30
31
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
31
32
  export function MayaWithdrawal() {
32
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -124,7 +125,7 @@ export function MayaWithdrawal() {
124
125
  shouldDirty: true,
125
126
  shouldValidate: true,
126
127
  });
127
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
128
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
128
129
  if (!details.open) {
129
130
  setStatus('waiting');
130
131
  }
@@ -29,6 +29,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
31
  import { explainError } from '../../utils.js';
32
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function PisoPayWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -148,7 +149,7 @@ export function PisoPayWithdrawal() {
148
149
  shouldDirty: true,
149
150
  shouldValidate: true,
150
151
  });
151
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
152
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
152
153
  if (!details.open) {
153
154
  setStatus('waiting');
154
155
  }
@@ -29,6 +29,7 @@ import { parseDecimal } from '../../../../utils/parseDecimal.js';
29
29
  import { AmountChoices } from '../../AmountChoices.js';
30
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
31
  import { explainError } from '../../utils.js';
32
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function VentajaWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -150,7 +151,7 @@ export function VentajaWithdrawal() {
150
151
  shouldDirty: true,
151
152
  shouldValidate: true,
152
153
  });
153
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
154
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending, children: "Withdraw" }), _jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] }), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
154
155
  if (!details.open) {
155
156
  setStatus('waiting');
156
157
  }
@@ -18,14 +18,14 @@ export declare const GET: (req: NextRequest, { params }: Context) => Promise<Nex
18
18
  __error?: unknown;
19
19
  } | {
20
20
  ok: true;
21
- data: import("../types").Session;
21
+ data: Record<string, unknown>;
22
22
  }> | NextResponse<{
23
23
  ok: false;
24
24
  message: string;
25
25
  __error?: unknown;
26
26
  } | {
27
27
  ok: true;
28
- data: Record<string, unknown>;
28
+ data: import("../types").Session;
29
29
  }>>;
30
30
  export declare const DELETE: (req: NextRequest, { params }: Context) => Promise<NextResponse<{
31
31
  ok: true;
@@ -1,16 +1,16 @@
1
1
  import { type NextRequest, NextResponse } from 'next/server';
2
2
  export declare function postToken(request: NextRequest): Promise<NextResponse<{
3
+ ok: true;
4
+ data?: never;
5
+ } | {
3
6
  ok: false;
4
7
  message: string;
5
8
  __error?: unknown;
6
- } | {
7
- ok: true;
8
- data: string;
9
9
  }> | NextResponse<{
10
- ok: true;
11
- data?: never;
12
- } | {
13
10
  ok: false;
14
11
  message: string;
15
12
  __error?: unknown;
13
+ } | {
14
+ ok: true;
15
+ data: string;
16
16
  }>>;
@@ -0,0 +1,2 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export declare function BankNote01Icon(props: ComponentPropsWithRef<'svg'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function BankNote01Icon(props) {
3
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: _jsx("path", { d: "M6 11v4m12-6v4m-1-9c2.449 0 3.773.375 4.432.665a.7.7 0 0 1 .258.18c.076.072.215.284.25.383.06.165.06.255.06.435V16.41c0 .909 0 1.363-.136 1.597a.87.87 0 0 1-.532.44c-.255.089-.77-.01-1.8-.208-.72-.138-1.576-.24-2.532-.24-3 0-6 2-10 2-2.449 0-3.773-.375-4.432-.665-.088-.04-.132-.059-.258-.18a1.5 1.5 0 0 1-.25-.383C2 18.607 2 18.517 2 18.337V7.59c0-.909 0-1.363.136-1.597a.87.87 0 0 1 .532-.44c.255-.089.77.01 1.8.208C5.188 5.898 6.043 6 7 6c3 0 6-2 10-2m-2.5 8a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0" }) }));
4
+ }
@@ -3,7 +3,7 @@ export declare const FILE = "\n \n fragment FileFragment on File {\n id\n
3
3
  export declare const UPLOAD_FILE = "\n mutation UploadFile($input: UploadFileInput!) {\n uploadFile(input: $input) {\n ... on FileFormatNotSupportedError {\n name: __typename\n message\n }\n ... on FileNameTooLongError {\n name: __typename\n message\n }\n ... on FileSizeTooBigError {\n name: __typename\n message\n }\n }\n }\n";
4
4
  export declare const UPLOAD_IMAGE_FILE = "\n mutation UploadImageFile($input: UploadFileInput!) {\n uploadImageFile(input: $input) {\n ... on FileFormatNotSupportedError {\n name: __typename\n message\n }\n ... on FileNameTooLongError {\n name: __typename\n message\n }\n ... on FileSizeTooBigError {\n name: __typename\n message\n }\n }\n }\n";
5
5
  export declare const UPLOAD_PRIVATE_IMAGE_FILE = "\n mutation UploadPrivateImageFile($input: UploadFileInput!) {\n uploadPrivateImageFile(input: $input) {\n ... on FileFormatNotSupportedError {\n name: __typename\n message\n }\n ... on FileNameTooLongError {\n name: __typename\n message\n }\n ... on FileSizeTooBigError {\n name: __typename\n message\n }\n }\n }\n";
6
- export declare const WALLET = "\n query Wallet {\n wallet {\n balance\n }\n }\n";
6
+ export declare const WALLET = "\n query Wallet {\n wallet {\n balance\n turnoverRequirement\n }\n }\n";
7
7
  export declare const POINTS_WALLET = "\n query PointsWallet {\n pointsWallet {\n id\n points\n account\n dateTimeCreated\n }\n }\n";
8
8
  export declare const REDEEM_POINTS_TO_CASH = "\n mutation RedeemPointsToCash($input: RedeemPointsToCashInput!) {\n redeemPointsToCash(input: $input) {\n ... on InsufficientPointsError {\n name: __typename\n message\n }\n ... on PointsNotDivisibleBy100Error {\n name: __typename\n message\n }\n }\n }\n";
9
9
  export declare const POINTS_WALLET_TRANSACTIONS = "\n query PointsWalletTransactions(\n $first: Int\n $after: Cursor\n $filter: MemberPointsWalletTransactionFilterInput\n ) {\n member {\n pointsWalletTransactions(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n ... on PointsWalletTransaction {\n id\n type\n amount\n balance\n dateTimeCreated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
@@ -74,6 +74,7 @@ export const WALLET = /* GraphQL */ `
74
74
  query Wallet {
75
75
  wallet {
76
76
  balance
77
+ turnoverRequirement
77
78
  }
78
79
  }
79
80
  `;
@@ -73,6 +73,7 @@ export declare const getCashbackBonus: (id: string, options?: GraphQLRequestOpti
73
73
  export interface WalletQuery {
74
74
  wallet?: {
75
75
  balance: string;
76
+ turnoverRequirement?: string | null;
76
77
  bonus?: {
77
78
  balance: string;
78
79
  } | null;
@@ -89,6 +89,9 @@ export const getWallet = cache(async (options) => {
89
89
  ]);
90
90
  return {
91
91
  balance: res0.status === 'fulfilled' ? (res0.value.wallet?.balance ?? '0') : '0',
92
+ turnoverRequirement: res0.status === 'fulfilled'
93
+ ? res0.value.wallet?.turnoverRequirement
94
+ : null,
92
95
  bonus: res1.status === 'fulfilled'
93
96
  ? (res1.value.bonuses
94
97
  ?.reduce((total, n) => total + parseDecimal(n.balance, 0), 0)
@@ -429,6 +429,7 @@ export type Timezone = 'Asia/Manila' | 'Asia/Kolkata' | 'Asia/Jakarta' | 'Asia/M
429
429
  export type Country = 'IDN' | 'IND' | 'MYS' | 'PHL' | 'VNM';
430
430
  export interface Wallet {
431
431
  balance: string;
432
+ turnoverRequirement?: string | null;
432
433
  bonus: string | null;
433
434
  }
434
435
  export interface PointsWallet {