@blocklet/payment-react 1.13.207 → 1.13.208

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(),
@@ -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
  })]
@@ -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)(_error.default, {
102
- title: t("payment.checkout.expired.title"),
103
- description: t("payment.checkout.expired.description")
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.207",
3
+ "version": "1.13.208",
4
4
  "description": "Reusable react components for payment kit v2",
5
5
  "keywords": [
6
6
  "react",
@@ -90,7 +90,7 @@
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.207",
93
+ "@blocklet/payment-types": "1.13.208",
94
94
  "@storybook/addon-essentials": "^7.6.13",
95
95
  "@storybook/addon-interactions": "^7.6.13",
96
96
  "@storybook/addon-links": "^7.6.13",
@@ -119,5 +119,5 @@
119
119
  "vite-plugin-babel": "^1.2.0",
120
120
  "vite-plugin-node-polyfills": "^0.19.0"
121
121
  },
122
- "gitHead": "7b4918ac7bb09317df0b2a78e337312cc4b50b67"
122
+ "gitHead": "ddc3c15e9f87f77904ae872b4724182327548e39"
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(),
@@ -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
- <PaymentError
99
- title={t('payment.checkout.expired.title')}
100
- description={t('payment.checkout.expired.description')}
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