@sazito/checkout 0.4.20 → 0.4.21

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 (34) hide show
  1. package/README.md +3 -0
  2. package/dist/chunks/{labels-FNi3eq4p.cjs → labels-BYJQjaT_.cjs} +2 -2
  3. package/dist/chunks/labels-BYJQjaT_.cjs.map +1 -0
  4. package/dist/chunks/{labels-CwHBYso8.js → labels-Cqrb2MwA.js} +2 -2
  5. package/dist/chunks/labels-Cqrb2MwA.js.map +1 -0
  6. package/dist/chunks/{use-checkout-OyHfWeAh.js → use-checkout-BRDfZp4Z.js} +5 -7
  7. package/dist/chunks/use-checkout-BRDfZp4Z.js.map +1 -0
  8. package/dist/chunks/{use-checkout-DsTtOAMs.cjs → use-checkout-MM-Ld0Ew.cjs} +5 -7
  9. package/dist/chunks/use-checkout-MM-Ld0Ew.cjs.map +1 -0
  10. package/dist/core/index.cjs +1 -1
  11. package/dist/core/index.d.cts +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.js +1 -1
  14. package/dist/next/index.cjs +3 -3
  15. package/dist/next/index.cjs.map +1 -1
  16. package/dist/next/index.js +4 -4
  17. package/dist/next/index.js.map +1 -1
  18. package/dist/next/payment-return.cjs +6 -4
  19. package/dist/next/payment-return.cjs.map +1 -1
  20. package/dist/next/payment-return.d.cts +1 -1
  21. package/dist/next/payment-return.d.ts +1 -1
  22. package/dist/next/payment-return.js +6 -4
  23. package/dist/next/payment-return.js.map +1 -1
  24. package/dist/react/index.cjs +2 -2
  25. package/dist/react/index.js +2 -2
  26. package/dist/server/index.cjs +34 -11
  27. package/dist/server/index.cjs.map +1 -1
  28. package/dist/server/index.js +34 -11
  29. package/dist/server/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunks/labels-CwHBYso8.js.map +0 -1
  32. package/dist/chunks/labels-FNi3eq4p.cjs.map +0 -1
  33. package/dist/chunks/use-checkout-DsTtOAMs.cjs.map +0 -1
  34. package/dist/chunks/use-checkout-OyHfWeAh.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  'use client';
2
2
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
3
  import { isValidElement, cloneElement, useMemo, useState, useRef, useEffect, useCallback } from 'react';
4
- import { u as useCheckout, b as useSazitoClient, C as CheckoutProvider } from '../chunks/use-checkout-OyHfWeAh.js';
5
- export { S as SazitoProvider } from '../chunks/use-checkout-OyHfWeAh.js';
6
- import { m as formatPercent, E as sortCartItemsNewestFirst, H as toPersianDigits, r as isDigitalServiceGroup, t as isValidIranianMobile, z as normalizeIranianPhone, A as paymentMethodInfo, l as formatNumber } from '../chunks/labels-CwHBYso8.js';
4
+ import { u as useCheckout, b as useSazitoClient, C as CheckoutProvider } from '../chunks/use-checkout-BRDfZp4Z.js';
5
+ export { S as SazitoProvider } from '../chunks/use-checkout-BRDfZp4Z.js';
6
+ import { m as formatPercent, E as sortCartItemsNewestFirst, H as toPersianDigits, r as isDigitalServiceGroup, t as isValidIranianMobile, z as normalizeIranianPhone, A as paymentMethodInfo, l as formatNumber } from '../chunks/labels-Cqrb2MwA.js';
7
7
  import { parsePaymentReturnUrl, stripPaymentStatusReturn } from './payment-return.js';
8
8
  import '@sazito/client-sdk';
9
9
 
@@ -951,7 +951,7 @@ function ResolveReturn({ params, resolution }) {
951
951
  return;
952
952
  resolvedKey.current = paramsKey;
953
953
  void actions.resolvePaymentReturn(params, resolution);
954
- if (resolution === 'status' && typeof window !== 'undefined') {
954
+ if (typeof window !== 'undefined') {
955
955
  const cleanUrl = stripPaymentStatusReturn(window.location.href);
956
956
  if (cleanUrl)
957
957
  window.history.replaceState(window.history.state, '', cleanUrl);