@blocklet/payment-react 1.13.187 → 1.13.189

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.
@@ -1,4 +1,5 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
2
3
  import { OpenInNewOutlined } from "@mui/icons-material";
3
4
  import { Link, Stack, Typography } from "@mui/material";
4
5
  import { joinURL } from "ufo";
@@ -38,8 +39,9 @@ TxLink.defaultProps = {
38
39
  mode: "dashboard"
39
40
  };
40
41
  export default function TxLink(props) {
42
+ const { t } = useLocaleContext();
41
43
  if (!props.details || props.mode === "customer" && props.method.type === "stripe") {
42
- return /* @__PURE__ */ jsx(Typography, { component: "small", color: "text.secondary", children: "None" });
44
+ return /* @__PURE__ */ jsx(Typography, { component: "small", color: "text.secondary", children: t("common.none") });
43
45
  }
44
46
  const { text, link } = getTxLink(props.method, props.details);
45
47
  if (link) {
@@ -48,5 +50,5 @@ export default function TxLink(props) {
48
50
  /* @__PURE__ */ jsx(OpenInNewOutlined, { fontSize: "small" })
49
51
  ] }) });
50
52
  }
51
- return /* @__PURE__ */ jsx(Typography, { component: "small", color: "text.secondary", children: "None" });
53
+ return /* @__PURE__ */ jsx(Typography, { component: "small", color: "text.secondary", children: t("common.none") });
52
54
  }
package/es/locales/en.js CHANGED
@@ -3,6 +3,7 @@ export default flat({
3
3
  common: {
4
4
  id: "ID",
5
5
  url: "URL",
6
+ none: "None",
6
7
  createdAt: "Created At",
7
8
  updatedAt: "Updated At",
8
9
  resumesAt: "Resume At",
@@ -247,6 +248,18 @@ export default flat({
247
248
  empty: "There are no subscriptions here",
248
249
  changePayment: "Change payment method"
249
250
  }
251
+ },
252
+ invoice: {
253
+ reason: {
254
+ creation: "Subscription create",
255
+ cycle: "Subscription cycle",
256
+ update: "Subscription update",
257
+ recover: "Subscription recover",
258
+ threshold: "Metered usage billing",
259
+ cancel: "Subscription cancel",
260
+ manual: "Manual invoice",
261
+ upcoming: "Upcoming invoice"
262
+ }
250
263
  }
251
264
  }
252
265
  });
package/es/locales/zh.js CHANGED
@@ -3,6 +3,7 @@ export default flat({
3
3
  common: {
4
4
  id: "ID",
5
5
  url: "URL",
6
+ none: "\u65E0",
6
7
  createdAt: "\u521B\u5EFA\u65F6\u95F4",
7
8
  updatedAt: "\u66F4\u65B0\u65F6\u95F4",
8
9
  resumesAt: "\u6062\u590D\u65F6\u95F4",
@@ -247,6 +248,18 @@ export default flat({
247
248
  empty: "\u6CA1\u6709\u4EFB\u4F55\u8BA2\u9605",
248
249
  changePayment: "\u5207\u6362\u652F\u4ED8\u65B9\u5F0F"
249
250
  }
251
+ },
252
+ invoice: {
253
+ reason: {
254
+ creation: "\u8BA2\u9605\u521B\u5EFA",
255
+ cycle: "\u81EA\u52A8\u6263\u8D39",
256
+ update: "\u8BA2\u9605\u66F4\u65B0",
257
+ recover: "\u8BA2\u9605\u6062\u590D",
258
+ threshold: "\u7528\u91CF\u8D26\u5355",
259
+ cancel: "\u8BA2\u9605\u53D6\u6D88",
260
+ manual: "\u4EBA\u5DE5\u8D26\u5355",
261
+ upcoming: "\u672A\u6765\u8D26\u5355"
262
+ }
250
263
  }
251
264
  }
252
265
  });
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  module.exports = TxLink;
7
7
  var _jsxRuntime = require("react/jsx-runtime");
8
+ var _context = require("@arcblock/ux/lib/Locale/context");
8
9
  var _iconsMaterial = require("@mui/icons-material");
9
10
  var _material = require("@mui/material");
10
11
  var _ufo = require("ufo");
@@ -43,11 +44,14 @@ TxLink.defaultProps = {
43
44
  mode: "dashboard"
44
45
  };
45
46
  function TxLink(props) {
47
+ const {
48
+ t
49
+ } = (0, _context.useLocaleContext)();
46
50
  if (!props.details || props.mode === "customer" && props.method.type === "stripe") {
47
51
  return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
48
52
  component: "small",
49
53
  color: "text.secondary",
50
- children: "None"
54
+ children: t("common.none")
51
55
  });
52
56
  }
53
57
  const {
@@ -77,6 +81,6 @@ function TxLink(props) {
77
81
  return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
78
82
  component: "small",
79
83
  color: "text.secondary",
80
- children: "None"
84
+ children: t("common.none")
81
85
  });
82
86
  }
package/lib/locales/en.js CHANGED
@@ -10,6 +10,7 @@ module.exports = (0, _flat.default)({
10
10
  common: {
11
11
  id: "ID",
12
12
  url: "URL",
13
+ none: "None",
13
14
  createdAt: "Created At",
14
15
  updatedAt: "Updated At",
15
16
  resumesAt: "Resume At",
@@ -254,6 +255,18 @@ module.exports = (0, _flat.default)({
254
255
  empty: "There are no subscriptions here",
255
256
  changePayment: "Change payment method"
256
257
  }
258
+ },
259
+ invoice: {
260
+ reason: {
261
+ creation: "Subscription create",
262
+ cycle: "Subscription cycle",
263
+ update: "Subscription update",
264
+ recover: "Subscription recover",
265
+ threshold: "Metered usage billing",
266
+ cancel: "Subscription cancel",
267
+ manual: "Manual invoice",
268
+ upcoming: "Upcoming invoice"
269
+ }
257
270
  }
258
271
  }
259
272
  });
package/lib/locales/zh.js CHANGED
@@ -10,6 +10,7 @@ module.exports = (0, _flat.default)({
10
10
  common: {
11
11
  id: "ID",
12
12
  url: "URL",
13
+ none: "\u65E0",
13
14
  createdAt: "\u521B\u5EFA\u65F6\u95F4",
14
15
  updatedAt: "\u66F4\u65B0\u65F6\u95F4",
15
16
  resumesAt: "\u6062\u590D\u65F6\u95F4",
@@ -254,6 +255,18 @@ module.exports = (0, _flat.default)({
254
255
  empty: "\u6CA1\u6709\u4EFB\u4F55\u8BA2\u9605",
255
256
  changePayment: "\u5207\u6362\u652F\u4ED8\u65B9\u5F0F"
256
257
  }
258
+ },
259
+ invoice: {
260
+ reason: {
261
+ creation: "\u8BA2\u9605\u521B\u5EFA",
262
+ cycle: "\u81EA\u52A8\u6263\u8D39",
263
+ update: "\u8BA2\u9605\u66F4\u65B0",
264
+ recover: "\u8BA2\u9605\u6062\u590D",
265
+ threshold: "\u7528\u91CF\u8D26\u5355",
266
+ cancel: "\u8BA2\u9605\u53D6\u6D88",
267
+ manual: "\u4EBA\u5DE5\u8D26\u5355",
268
+ upcoming: "\u672A\u6765\u8D26\u5355"
269
+ }
257
270
  }
258
271
  }
259
272
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-react",
3
- "version": "1.13.187",
3
+ "version": "1.13.189",
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.187",
93
+ "@blocklet/payment-types": "1.13.189",
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": "1eba252975f6a974397c878738badaca8388bb7a"
122
+ "gitHead": "74acb8bab72fdcd83ef007b661fe9017d0c2840d"
123
123
  }
@@ -1,3 +1,4 @@
1
+ import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
1
2
  import type { PaymentDetails, TPaymentMethod } from '@blocklet/payment-types';
2
3
  import { OpenInNewOutlined } from '@mui/icons-material';
3
4
  import { Link, Stack, Typography } from '@mui/material';
@@ -46,10 +47,12 @@ export default function TxLink(props: {
46
47
  method: TPaymentMethod;
47
48
  mode?: 'customer' | 'dashboard';
48
49
  }) {
50
+ const { t } = useLocaleContext();
51
+
49
52
  if (!props.details || (props.mode === 'customer' && props.method.type === 'stripe')) {
50
53
  return (
51
54
  <Typography component="small" color="text.secondary">
52
- None
55
+ {t('common.none')}
53
56
  </Typography>
54
57
  );
55
58
  }
@@ -71,7 +74,7 @@ export default function TxLink(props: {
71
74
 
72
75
  return (
73
76
  <Typography component="small" color="text.secondary">
74
- None
77
+ {t('common.none')}
75
78
  </Typography>
76
79
  );
77
80
  }
@@ -4,6 +4,7 @@ export default flat({
4
4
  common: {
5
5
  id: 'ID',
6
6
  url: 'URL',
7
+ none: 'None',
7
8
  createdAt: 'Created At',
8
9
  updatedAt: 'Updated At',
9
10
  resumesAt: 'Resume At',
@@ -257,5 +258,17 @@ export default flat({
257
258
  changePayment: 'Change payment method',
258
259
  },
259
260
  },
261
+ invoice: {
262
+ reason: {
263
+ creation: 'Subscription create',
264
+ cycle: 'Subscription cycle',
265
+ update: 'Subscription update',
266
+ recover: 'Subscription recover',
267
+ threshold: 'Metered usage billing',
268
+ cancel: 'Subscription cancel',
269
+ manual: 'Manual invoice',
270
+ upcoming: 'Upcoming invoice',
271
+ },
272
+ },
260
273
  },
261
274
  });
@@ -4,6 +4,7 @@ export default flat({
4
4
  common: {
5
5
  id: 'ID',
6
6
  url: 'URL',
7
+ none: '无',
7
8
  createdAt: '创建时间',
8
9
  updatedAt: '更新时间',
9
10
  resumesAt: '恢复时间',
@@ -250,5 +251,17 @@ export default flat({
250
251
  changePayment: '切换支付方式',
251
252
  },
252
253
  },
254
+ invoice: {
255
+ reason: {
256
+ creation: '订阅创建',
257
+ cycle: '自动扣费',
258
+ update: '订阅更新',
259
+ recover: '订阅恢复',
260
+ threshold: '用量账单',
261
+ cancel: '订阅取消',
262
+ manual: '人工账单',
263
+ upcoming: '未来账单',
264
+ },
265
+ },
253
266
  },
254
267
  });