@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.
- package/README.md +3 -0
- package/dist/chunks/{labels-FNi3eq4p.cjs → labels-BYJQjaT_.cjs} +2 -2
- package/dist/chunks/labels-BYJQjaT_.cjs.map +1 -0
- package/dist/chunks/{labels-CwHBYso8.js → labels-Cqrb2MwA.js} +2 -2
- package/dist/chunks/labels-Cqrb2MwA.js.map +1 -0
- package/dist/chunks/{use-checkout-OyHfWeAh.js → use-checkout-BRDfZp4Z.js} +5 -7
- package/dist/chunks/use-checkout-BRDfZp4Z.js.map +1 -0
- package/dist/chunks/{use-checkout-DsTtOAMs.cjs → use-checkout-MM-Ld0Ew.cjs} +5 -7
- package/dist/chunks/use-checkout-MM-Ld0Ew.cjs.map +1 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/next/index.cjs +3 -3
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.js +4 -4
- package/dist/next/index.js.map +1 -1
- package/dist/next/payment-return.cjs +6 -4
- package/dist/next/payment-return.cjs.map +1 -1
- package/dist/next/payment-return.d.cts +1 -1
- package/dist/next/payment-return.d.ts +1 -1
- package/dist/next/payment-return.js +6 -4
- package/dist/next/payment-return.js.map +1 -1
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.js +2 -2
- package/dist/server/index.cjs +34 -11
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +34 -11
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/labels-CwHBYso8.js.map +0 -1
- package/dist/chunks/labels-FNi3eq4p.cjs.map +0 -1
- package/dist/chunks/use-checkout-DsTtOAMs.cjs.map +0 -1
- package/dist/chunks/use-checkout-OyHfWeAh.js.map +0 -1
package/dist/next/index.js
CHANGED
|
@@ -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-
|
|
5
|
-
export { S as SazitoProvider } from '../chunks/use-checkout-
|
|
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-
|
|
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 (
|
|
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);
|