@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.
Files changed (40) hide show
  1. package/es/checkout/donate.d.ts +2 -1
  2. package/es/checkout/donate.js +119 -94
  3. package/es/components/pricing-table.d.ts +3 -1
  4. package/es/components/pricing-table.js +39 -16
  5. package/es/history/invoice/list.d.ts +1 -0
  6. package/es/history/invoice/list.js +15 -1
  7. package/es/hooks/scroll.d.ts +1 -0
  8. package/es/hooks/scroll.js +14 -0
  9. package/es/index.d.ts +1 -0
  10. package/es/index.js +1 -0
  11. package/es/libs/util.d.ts +7 -1
  12. package/es/libs/util.js +47 -0
  13. package/es/locales/en.js +11 -2
  14. package/es/locales/zh.js +12 -3
  15. package/es/payment/product-donation.js +2 -0
  16. package/lib/checkout/donate.d.ts +2 -1
  17. package/lib/checkout/donate.js +127 -108
  18. package/lib/components/pricing-table.d.ts +3 -1
  19. package/lib/components/pricing-table.js +33 -18
  20. package/lib/history/invoice/list.d.ts +1 -0
  21. package/lib/history/invoice/list.js +20 -1
  22. package/lib/hooks/scroll.d.ts +1 -0
  23. package/lib/hooks/scroll.js +22 -0
  24. package/lib/index.d.ts +1 -0
  25. package/lib/index.js +12 -0
  26. package/lib/libs/util.d.ts +7 -1
  27. package/lib/libs/util.js +57 -0
  28. package/lib/locales/en.js +11 -2
  29. package/lib/locales/zh.js +12 -3
  30. package/lib/payment/product-donation.js +2 -0
  31. package/package.json +3 -3
  32. package/src/checkout/donate.tsx +127 -95
  33. package/src/components/pricing-table.tsx +34 -14
  34. package/src/history/invoice/list.tsx +20 -1
  35. package/src/hooks/scroll.ts +16 -0
  36. package/src/index.ts +1 -0
  37. package/src/libs/util.ts +56 -0
  38. package/src/locales/en.tsx +9 -0
  39. package/src/locales/zh.tsx +10 -1
  40. 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,