@opexa/portal-components 0.0.1041 → 0.0.1042
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/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +10 -12
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +10 -12
- package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +9 -10
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { useForm } from 'react-hook-form';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { useShallow } from 'zustand/shallow';
|
|
8
8
|
import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
|
|
@@ -11,8 +11,6 @@ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
|
11
11
|
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
12
12
|
import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
13
13
|
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
14
|
-
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
15
|
-
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
|
|
16
14
|
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
17
15
|
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
18
16
|
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
@@ -20,7 +18,6 @@ import { XIcon } from '../../../../icons/XIcon.js';
|
|
|
20
18
|
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
21
19
|
import { Button } from '../../../../ui/Button/index.js';
|
|
22
20
|
import { Field } from '../../../../ui/Field/index.js';
|
|
23
|
-
import { NumberInput } from '../../../../ui/NumberInput/index.js';
|
|
24
21
|
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
25
22
|
import { Portal } from '../../../../ui/Portal/index.js';
|
|
26
23
|
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
@@ -87,7 +84,10 @@ export function InstapayGCashWithdrawal() {
|
|
|
87
84
|
.string()
|
|
88
85
|
.min(8, 'Password must be 8 or more characters')
|
|
89
86
|
.max(64, 'Password must be not be more than 64 characters'),
|
|
90
|
-
accountNumber: z
|
|
87
|
+
accountNumber: z
|
|
88
|
+
.string()
|
|
89
|
+
.min(8, { message: 'Phone number must be 8 or more digits' })
|
|
90
|
+
.trim(),
|
|
91
91
|
accountName: z
|
|
92
92
|
.string({ required_error: 'Account name is required' })
|
|
93
93
|
.min(4, 'Account name must be at least 4 characters'),
|
|
@@ -124,13 +124,11 @@ export function InstapayGCashWithdrawal() {
|
|
|
124
124
|
bankCode: 'BNKGCH',
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
} }), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
127
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { type: "number", ...form.register('accountNumber'), onKeyDown: (e) => {
|
|
128
|
+
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
129
|
+
e.preventDefault();
|
|
130
|
+
}
|
|
131
|
+
} }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
134
132
|
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
135
133
|
e.preventDefault();
|
|
136
134
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { useForm } from 'react-hook-form';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { useShallow } from 'zustand/shallow';
|
|
8
8
|
import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
|
|
@@ -11,8 +11,6 @@ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
|
|
|
11
11
|
import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
|
|
12
12
|
import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
13
13
|
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
14
|
-
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
15
|
-
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
|
|
16
14
|
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
17
15
|
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
18
16
|
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
@@ -20,7 +18,6 @@ import { XIcon } from '../../../../icons/XIcon.js';
|
|
|
20
18
|
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
21
19
|
import { Button } from '../../../../ui/Button/index.js';
|
|
22
20
|
import { Field } from '../../../../ui/Field/index.js';
|
|
23
|
-
import { NumberInput } from '../../../../ui/NumberInput/index.js';
|
|
24
21
|
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
25
22
|
import { Portal } from '../../../../ui/Portal/index.js';
|
|
26
23
|
import { parseDecimal } from '../../../../utils/parseDecimal.js';
|
|
@@ -86,7 +83,10 @@ export function InstapayPaymayaWithdrawal() {
|
|
|
86
83
|
.string()
|
|
87
84
|
.min(8, 'Password must be 8 or more characters')
|
|
88
85
|
.max(64, 'Password must be not be more than 64 characters'),
|
|
89
|
-
accountNumber: z
|
|
86
|
+
accountNumber: z
|
|
87
|
+
.string()
|
|
88
|
+
.min(8, { message: 'Phone number must be 8 or more digits' })
|
|
89
|
+
.trim(),
|
|
90
90
|
accountName: z
|
|
91
91
|
.string({ required_error: 'Account name is required' })
|
|
92
92
|
.min(4, 'Account name must be at least 4 characters'),
|
|
@@ -123,13 +123,11 @@ export function InstapayPaymayaWithdrawal() {
|
|
|
123
123
|
bankCode: 'BNKMYA',
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
|
-
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
} }), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
126
|
+
return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { type: "number", ...form.register('accountNumber'), onKeyDown: (e) => {
|
|
127
|
+
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
128
|
+
e.preventDefault();
|
|
129
|
+
}
|
|
130
|
+
} }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
133
131
|
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
134
132
|
e.preventDefault();
|
|
135
133
|
}
|
package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js
CHANGED
|
@@ -15,7 +15,6 @@ import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
|
|
|
15
15
|
import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
|
|
16
16
|
import { CheckIcon } from '../../../../icons/CheckIcon.js';
|
|
17
17
|
import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
|
|
18
|
-
import { ChevronUpIcon } from '../../../../icons/ChevronUpIcon.js';
|
|
19
18
|
import { EyeIcon } from '../../../../icons/EyeIcon.js';
|
|
20
19
|
import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
|
|
21
20
|
import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
|
|
@@ -23,7 +22,6 @@ import { XIcon } from '../../../../icons/XIcon.js';
|
|
|
23
22
|
import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
|
|
24
23
|
import { Button } from '../../../../ui/Button/index.js';
|
|
25
24
|
import { Field } from '../../../../ui/Field/index.js';
|
|
26
|
-
import { NumberInput } from '../../../../ui/NumberInput/index.js';
|
|
27
25
|
import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
|
|
28
26
|
import { Portal } from '../../../../ui/Portal/index.js';
|
|
29
27
|
import { Select } from '../../../../ui/Select/index.js';
|
|
@@ -104,7 +102,10 @@ export function InstapayWithdrawal() {
|
|
|
104
102
|
.string()
|
|
105
103
|
.min(8, 'Password must be 8 or more characters')
|
|
106
104
|
.max(64, 'Password must be not be more than 64 characters'),
|
|
107
|
-
accountNumber: z
|
|
105
|
+
accountNumber: z
|
|
106
|
+
.string()
|
|
107
|
+
.min(6, { message: 'Account number must be at least 6 or more digits' })
|
|
108
|
+
.trim(),
|
|
108
109
|
accountName: z
|
|
109
110
|
.string({ required_error: 'Account name is required' })
|
|
110
111
|
.min(4, 'Account name must be at least 4 characters'),
|
|
@@ -176,13 +177,11 @@ export function InstapayWithdrawal() {
|
|
|
176
177
|
sameWidth: true,
|
|
177
178
|
}, value: o.field.value ? [o.field.value] : [], onValueChange: (details) => {
|
|
178
179
|
o.field.onChange(details.value.at(0) ?? '');
|
|
179
|
-
}, 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.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
} }), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
180
|
+
}, 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.id))) }) }) })] }), _jsx(Field.ErrorText, { children: form.formState.errors.bankCode?.message })] })) }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { type: "number", ...form.register('accountNumber'), onKeyDown: (e) => {
|
|
181
|
+
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
}
|
|
184
|
+
} }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.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.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount'), onKeyDown: (e) => {
|
|
186
185
|
if (['e', 'E', '.', '-', '+', ','].includes(e.key)) {
|
|
187
186
|
e.preventDefault();
|
|
188
187
|
}
|