@blocklet/payment-react 1.15.33 → 1.15.35
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/es/checkout/donate.d.ts +2 -1
- package/es/checkout/donate.js +119 -94
- package/es/components/pricing-table.d.ts +3 -1
- package/es/components/pricing-table.js +39 -16
- package/es/history/invoice/list.d.ts +1 -0
- package/es/history/invoice/list.js +15 -1
- package/es/hooks/scroll.d.ts +1 -0
- package/es/hooks/scroll.js +14 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/libs/util.d.ts +7 -1
- package/es/libs/util.js +47 -0
- package/es/locales/en.js +11 -2
- package/es/locales/zh.js +12 -3
- package/es/payment/product-donation.js +2 -0
- package/lib/checkout/donate.d.ts +2 -1
- package/lib/checkout/donate.js +127 -108
- package/lib/components/pricing-table.d.ts +3 -1
- package/lib/components/pricing-table.js +33 -18
- package/lib/history/invoice/list.d.ts +1 -0
- package/lib/history/invoice/list.js +20 -1
- package/lib/hooks/scroll.d.ts +1 -0
- package/lib/hooks/scroll.js +22 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/libs/util.d.ts +7 -1
- package/lib/libs/util.js +57 -0
- package/lib/locales/en.js +11 -2
- package/lib/locales/zh.js +12 -3
- package/lib/payment/product-donation.js +2 -0
- package/package.json +3 -3
- package/src/checkout/donate.tsx +127 -95
- package/src/components/pricing-table.tsx +34 -14
- package/src/history/invoice/list.tsx +20 -1
- package/src/hooks/scroll.ts +16 -0
- package/src/index.ts +1 -0
- package/src/libs/util.ts +56 -0
- package/src/locales/en.tsx +9 -0
- package/src/locales/zh.tsx +10 -1
- package/src/payment/product-donation.tsx +2 -0
|
@@ -7,6 +7,7 @@ import { useEffect } from 'react';
|
|
|
7
7
|
import Switch from '../components/switch-button';
|
|
8
8
|
import { formatAmountPrecisionLimit } from '../libs/util';
|
|
9
9
|
import { usePaymentContext } from '../contexts/payment';
|
|
10
|
+
import { usePreventWheel } from '../hooks/scroll';
|
|
10
11
|
|
|
11
12
|
export default function ProductDonation({
|
|
12
13
|
item,
|
|
@@ -21,6 +22,7 @@ export default function ProductDonation({
|
|
|
21
22
|
}) {
|
|
22
23
|
const { t, locale } = useLocaleContext();
|
|
23
24
|
const { setPayable } = usePaymentContext();
|
|
25
|
+
usePreventWheel();
|
|
24
26
|
const preset = settings.amount.preset || settings.amount.presets?.[0] || '0';
|
|
25
27
|
const [state, setState] = useSetState({
|
|
26
28
|
selected: preset,
|