@blocklet/payment-react 1.13.207 → 1.13.209
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.
|
@@ -151,6 +151,7 @@ export default function MiniInvoiceList() {
|
|
|
151
151
|
{
|
|
152
152
|
variant: "contained",
|
|
153
153
|
sx: { color: "#fff!important", width: subscription.service_actions?.length ? "auto" : "100%" },
|
|
154
|
+
target: "_blank",
|
|
154
155
|
href: joinURL(
|
|
155
156
|
window.location.origin,
|
|
156
157
|
getPrefix(),
|
package/es/payment/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Center from "@arcblock/ux/lib/Center";
|
|
2
3
|
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
3
4
|
import Toast from "@arcblock/ux/lib/Toast";
|
|
4
5
|
import { ArrowBackOutlined } from "@mui/icons-material";
|
|
@@ -65,13 +66,13 @@ export default function Payment({
|
|
|
65
66
|
] }) });
|
|
66
67
|
}
|
|
67
68
|
if (checkoutSession.expires_at <= Math.round(Date.now() / 1e3)) {
|
|
68
|
-
return /* @__PURE__ */ jsx(
|
|
69
|
+
return /* @__PURE__ */ jsx(Center, { children: /* @__PURE__ */ jsx(
|
|
69
70
|
PaymentError,
|
|
70
71
|
{
|
|
71
72
|
title: t("payment.checkout.expired.title"),
|
|
72
73
|
description: t("payment.checkout.expired.description")
|
|
73
74
|
}
|
|
74
|
-
);
|
|
75
|
+
) });
|
|
75
76
|
}
|
|
76
77
|
if (checkoutSession.status === "complete") {
|
|
77
78
|
return /* @__PURE__ */ jsx(
|
|
@@ -232,6 +232,7 @@ function MiniInvoiceList() {
|
|
|
232
232
|
color: "#fff!important",
|
|
233
233
|
width: subscription.service_actions?.length ? "auto" : "100%"
|
|
234
234
|
},
|
|
235
|
+
target: "_blank",
|
|
235
236
|
href: (0, _ufo.joinURL)(window.location.origin, (0, _util.getPrefix)(), `/customer/subscription/${subscription.id}?source=embed`),
|
|
236
237
|
children: t("payment.customer.subscriptions.view")
|
|
237
238
|
})]
|
package/lib/payment/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.PaymentInner = PaymentInner;
|
|
|
7
7
|
exports.Root = void 0;
|
|
8
8
|
module.exports = Payment;
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var _Center = _interopRequireDefault(require("@arcblock/ux/lib/Center"));
|
|
10
11
|
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
11
12
|
var _Toast = _interopRequireDefault(require("@arcblock/ux/lib/Toast"));
|
|
12
13
|
var _iconsMaterial = require("@mui/icons-material");
|
|
@@ -98,9 +99,11 @@ function Payment({
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
if (checkoutSession.expires_at <= Math.round(Date.now() / 1e3)) {
|
|
101
|
-
return /* @__PURE__ */(0, _jsxRuntime.jsx)(
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_Center.default, {
|
|
103
|
+
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_error.default, {
|
|
104
|
+
title: t("payment.checkout.expired.title"),
|
|
105
|
+
description: t("payment.checkout.expired.description")
|
|
106
|
+
})
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
109
|
if (checkoutSession.status === "complete") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.209",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@ocap/util": "^1.18.113",
|
|
63
63
|
"@stripe/react-stripe-js": "^2.4.0",
|
|
64
64
|
"@stripe/stripe-js": "^2.4.0",
|
|
65
|
-
"@vitejs/plugin-legacy": "^5.3.
|
|
65
|
+
"@vitejs/plugin-legacy": "^5.3.2",
|
|
66
66
|
"ahooks": "^3.7.10",
|
|
67
67
|
"axios": "^0.27.2",
|
|
68
68
|
"dayjs": "^1.11.10",
|
|
@@ -90,18 +90,18 @@
|
|
|
90
90
|
"@babel/core": "^7.23.9",
|
|
91
91
|
"@babel/preset-env": "^7.23.9",
|
|
92
92
|
"@babel/preset-react": "^7.23.3",
|
|
93
|
-
"@blocklet/payment-types": "1.13.
|
|
93
|
+
"@blocklet/payment-types": "1.13.209",
|
|
94
94
|
"@storybook/addon-essentials": "^7.6.13",
|
|
95
95
|
"@storybook/addon-interactions": "^7.6.13",
|
|
96
96
|
"@storybook/addon-links": "^7.6.13",
|
|
97
97
|
"@storybook/addon-onboarding": "^1.0.11",
|
|
98
98
|
"@storybook/blocks": "^7.6.13",
|
|
99
99
|
"@storybook/react": "^7.6.13",
|
|
100
|
-
"@storybook/react-vite": "^7
|
|
100
|
+
"@storybook/react-vite": "^7",
|
|
101
101
|
"@storybook/test": "^7.6.13",
|
|
102
102
|
"@types/react": "^18.2.55",
|
|
103
103
|
"@types/react-dom": "^18.2.18",
|
|
104
|
-
"@vitejs/plugin-legacy": "^5.3.
|
|
104
|
+
"@vitejs/plugin-legacy": "^5.3.2",
|
|
105
105
|
"eslint": "^8.56.0",
|
|
106
106
|
"glob": "^10.3.10",
|
|
107
107
|
"import-sort-style-module": "^6.0.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"typescript": "^4.9.5",
|
|
118
118
|
"unbuild": "^2.0.0",
|
|
119
119
|
"vite-plugin-babel": "^1.2.0",
|
|
120
|
-
"vite-plugin-node-polyfills": "^0.
|
|
120
|
+
"vite-plugin-node-polyfills": "^0.21.0"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "24391eee3017ca20e40a595334e1adccbadc85cd"
|
|
123
123
|
}
|
|
@@ -193,6 +193,7 @@ export default function MiniInvoiceList() {
|
|
|
193
193
|
<Button
|
|
194
194
|
variant="contained"
|
|
195
195
|
sx={{ color: '#fff!important', width: subscription.service_actions?.length ? 'auto' : '100%' }}
|
|
196
|
+
target="_blank"
|
|
196
197
|
href={joinURL(
|
|
197
198
|
window.location.origin,
|
|
198
199
|
getPrefix(),
|
package/src/payment/index.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import Center from '@arcblock/ux/lib/Center';
|
|
1
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
3
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
3
4
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
@@ -95,10 +96,12 @@ export default function Payment({
|
|
|
95
96
|
// expired session
|
|
96
97
|
if (checkoutSession.expires_at <= Math.round(Date.now() / 1000)) {
|
|
97
98
|
return (
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
<Center>
|
|
100
|
+
<PaymentError
|
|
101
|
+
title={t('payment.checkout.expired.title')}
|
|
102
|
+
description={t('payment.checkout.expired.description')}
|
|
103
|
+
/>
|
|
104
|
+
</Center>
|
|
102
105
|
);
|
|
103
106
|
}
|
|
104
107
|
|