@blocklet/payment-react 1.14.28 → 1.14.29

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.
@@ -12,7 +12,7 @@ export default function Livemode({ color, backgroundColor, sx }) {
12
12
  sx: {
13
13
  ml: 2,
14
14
  height: 18,
15
- lineHeight: 1,
15
+ lineHeight: 1.2,
16
16
  textTransform: "uppercase",
17
17
  fontSize: "0.8rem",
18
18
  fontWeight: "bold",
@@ -83,7 +83,7 @@ const Wrapped = styled(Datatable)`
83
83
  }
84
84
 
85
85
  tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
86
- background: #f5f5f5;
86
+ background: var(--backgrounds-bg-highlight, #eff6ff);
87
87
  }
88
88
  tr.MuiTableRow-root:last-of-type td:first-of-type {
89
89
  border-bottom-left-radius: 8px;
@@ -94,28 +94,30 @@ const InvoiceTable = React.memo((props) => {
94
94
  );
95
95
  const columns = [
96
96
  {
97
- label: t("payment.customer.invoice.invoiceNumber"),
98
- name: "number",
97
+ label: t("common.amount"),
98
+ name: "total",
99
+ width: 60,
100
+ align: "right",
99
101
  options: {
100
102
  customBodyRenderLite: (_, index) => {
101
103
  const invoice = data?.list[index];
102
104
  const link = getInvoiceLink(invoice, action);
103
- return /* @__PURE__ */ jsx("a", { href: link.url, target: link.external ? "_blank" : target, rel: "noreferrer", children: invoice?.number });
105
+ return /* @__PURE__ */ jsx("a", { href: link.url, target: link.external ? "_blank" : target, rel: "noreferrer", children: /* @__PURE__ */ jsxs(Typography, { children: [
106
+ formatBNStr(invoice.total, invoice.paymentCurrency.decimal),
107
+ "\xA0",
108
+ invoice.paymentCurrency.symbol
109
+ ] }) });
104
110
  }
105
111
  }
106
112
  },
107
113
  {
108
- label: t("common.amount"),
109
- name: "total",
114
+ label: t("payment.customer.invoice.invoiceNumber"),
115
+ name: "number",
110
116
  options: {
111
117
  customBodyRenderLite: (_, index) => {
112
118
  const invoice = data?.list[index];
113
119
  const link = getInvoiceLink(invoice, action);
114
- return /* @__PURE__ */ jsx("a", { href: link.url, target: link.external ? "_blank" : target, rel: "noreferrer", children: /* @__PURE__ */ jsxs(Typography, { children: [
115
- formatBNStr(invoice.total, invoice.paymentCurrency.decimal),
116
- "\xA0",
117
- invoice.paymentCurrency.symbol
118
- ] }) });
120
+ return /* @__PURE__ */ jsx("a", { href: link.url, target: link.external ? "_blank" : target, rel: "noreferrer", children: invoice?.number });
119
121
  }
120
122
  }
121
123
  },
package/es/locales/en.js CHANGED
@@ -87,7 +87,8 @@ export default flat({
87
87
  recoverFrom: "Recovered From",
88
88
  quantityLimitPerCheckout: "Exceed purchase limit",
89
89
  quantityNotEnough: "Exceed inventory",
90
- amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}"
90
+ amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}",
91
+ saveAsDefaultPriceSuccess: "Set default price successfully"
91
92
  },
92
93
  payment: {
93
94
  checkout: {
@@ -226,7 +227,7 @@ export default flat({
226
227
  recover: {
227
228
  button: "Renew",
228
229
  title: "Renew your subscription",
229
- description: "Your subscription will no longer be canceled, it will renew on {date}"
230
+ description: "Your subscription will not be canceled and will be automatically renewed on {date}, please confirm to continue"
230
231
  },
231
232
  changePlan: {
232
233
  button: "Update",
package/es/locales/zh.js CHANGED
@@ -87,7 +87,8 @@ export default flat({
87
87
  recoverFrom: "\u6062\u590D\u81EA",
88
88
  quantityLimitPerCheckout: "\u8D85\u51FA\u8D2D\u4E70\u9650\u5236",
89
89
  quantityNotEnough: "\u5E93\u5B58\u4E0D\u8DB3",
90
- amountPrecisionLimit: "\u91D1\u989D\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u5728 {precision} \u4F4D\u4EE5\u5185"
90
+ amountPrecisionLimit: "\u91D1\u989D\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u5728 {precision} \u4F4D\u4EE5\u5185",
91
+ saveAsDefaultPriceSuccess: "\u8BBE\u7F6E\u9ED8\u8BA4\u4EF7\u683C\u6210\u529F"
91
92
  },
92
93
  payment: {
93
94
  checkout: {
@@ -226,7 +227,7 @@ export default flat({
226
227
  recover: {
227
228
  button: "\u7EED\u8BA2",
228
229
  title: "\u7EED\u8BA2\u60A8\u7684\u8BA2\u9605",
229
- description: "\u60A8\u7684\u8BA2\u9605\u5C06\u4E0D\u518D\u88AB\u53D6\u6D88\uFF0C\u5C06\u5728{date}\u7EED\u8BA2"
230
+ description: "\u60A8\u7684\u8BA2\u9605\u5C06\u4E0D\u4F1A\u88AB\u53D6\u6D88\uFF0C\u5E76\u5C06\u5728{date}\u81EA\u52A8\u7EED\u8BA2\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED"
230
231
  },
231
232
  changePlan: {
232
233
  button: "\u66F4\u65B0",
@@ -24,7 +24,7 @@ export default function ProductCard({ size, variant, name, logo, description, ex
24
24
  className: "cko-ellipsis",
25
25
  variant: "body1",
26
26
  title: name,
27
- sx: { fontWeight: 500, mb: 0.5, lineHeight: 1, fontSize: 16 },
27
+ sx: { fontWeight: 500, mb: 0.5, lineHeight: 1.2, fontSize: 16 },
28
28
  color: "text.primary",
29
29
  children: name
30
30
  }
@@ -34,7 +34,7 @@ export default function ProductCard({ size, variant, name, logo, description, ex
34
34
  {
35
35
  variant: "body1",
36
36
  title: description,
37
- sx: { fontSize: "0.85rem", mb: 0.5, lineHeight: 1, textAlign: "left" },
37
+ sx: { fontSize: "0.85rem", mb: 0.5, lineHeight: 1.2, textAlign: "left" },
38
38
  color: "text.lighter",
39
39
  children: description
40
40
  }
@@ -22,7 +22,7 @@ function Livemode({
22
22
  sx: {
23
23
  ml: 2,
24
24
  height: 18,
25
- lineHeight: 1,
25
+ lineHeight: 1.2,
26
26
  textTransform: "uppercase",
27
27
  fontSize: "0.8rem",
28
28
  fontWeight: "bold",
@@ -103,7 +103,7 @@ const Wrapped = (0, _system.styled)(_Datatable.default)`
103
103
  }
104
104
 
105
105
  tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
106
- background: #f5f5f5;
106
+ background: var(--backgrounds-bg-highlight, #eff6ff);
107
107
  }
108
108
  tr.MuiTableRow-root:last-of-type td:first-of-type {
109
109
  border-bottom-left-radius: 8px;
@@ -97,8 +97,10 @@ const InvoiceTable = _react.default.memo(props => {
97
97
  refreshDeps: [search]
98
98
  });
99
99
  const columns = [{
100
- label: t("payment.customer.invoice.invoiceNumber"),
101
- name: "number",
100
+ label: t("common.amount"),
101
+ name: "total",
102
+ width: 60,
103
+ align: "right",
102
104
  options: {
103
105
  customBodyRenderLite: (_, index) => {
104
106
  const invoice = data?.list[index];
@@ -107,13 +109,15 @@ const InvoiceTable = _react.default.memo(props => {
107
109
  href: link.url,
108
110
  target: link.external ? "_blank" : target,
109
111
  rel: "noreferrer",
110
- children: invoice?.number
112
+ children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
113
+ children: [(0, _util.formatBNStr)(invoice.total, invoice.paymentCurrency.decimal), "\xA0", invoice.paymentCurrency.symbol]
114
+ })
111
115
  });
112
116
  }
113
117
  }
114
118
  }, {
115
- label: t("common.amount"),
116
- name: "total",
119
+ label: t("payment.customer.invoice.invoiceNumber"),
120
+ name: "number",
117
121
  options: {
118
122
  customBodyRenderLite: (_, index) => {
119
123
  const invoice = data?.list[index];
@@ -122,9 +126,7 @@ const InvoiceTable = _react.default.memo(props => {
122
126
  href: link.url,
123
127
  target: link.external ? "_blank" : target,
124
128
  rel: "noreferrer",
125
- children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
126
- children: [(0, _util.formatBNStr)(invoice.total, invoice.paymentCurrency.decimal), "\xA0", invoice.paymentCurrency.symbol]
127
- })
129
+ children: invoice?.number
128
130
  });
129
131
  }
130
132
  }
package/lib/locales/en.js CHANGED
@@ -94,7 +94,8 @@ module.exports = (0, _flat.default)({
94
94
  recoverFrom: "Recovered From",
95
95
  quantityLimitPerCheckout: "Exceed purchase limit",
96
96
  quantityNotEnough: "Exceed inventory",
97
- amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}"
97
+ amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}",
98
+ saveAsDefaultPriceSuccess: "Set default price successfully"
98
99
  },
99
100
  payment: {
100
101
  checkout: {
@@ -233,7 +234,7 @@ module.exports = (0, _flat.default)({
233
234
  recover: {
234
235
  button: "Renew",
235
236
  title: "Renew your subscription",
236
- description: "Your subscription will no longer be canceled, it will renew on {date}"
237
+ description: "Your subscription will not be canceled and will be automatically renewed on {date}, please confirm to continue"
237
238
  },
238
239
  changePlan: {
239
240
  button: "Update",
package/lib/locales/zh.js CHANGED
@@ -94,7 +94,8 @@ module.exports = (0, _flat.default)({
94
94
  recoverFrom: "\u6062\u590D\u81EA",
95
95
  quantityLimitPerCheckout: "\u8D85\u51FA\u8D2D\u4E70\u9650\u5236",
96
96
  quantityNotEnough: "\u5E93\u5B58\u4E0D\u8DB3",
97
- amountPrecisionLimit: "\u91D1\u989D\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u5728 {precision} \u4F4D\u4EE5\u5185"
97
+ amountPrecisionLimit: "\u91D1\u989D\u5C0F\u6570\u4F4D\u6570\u5FC5\u987B\u5728 {precision} \u4F4D\u4EE5\u5185",
98
+ saveAsDefaultPriceSuccess: "\u8BBE\u7F6E\u9ED8\u8BA4\u4EF7\u683C\u6210\u529F"
98
99
  },
99
100
  payment: {
100
101
  checkout: {
@@ -233,7 +234,7 @@ module.exports = (0, _flat.default)({
233
234
  recover: {
234
235
  button: "\u7EED\u8BA2",
235
236
  title: "\u7EED\u8BA2\u60A8\u7684\u8BA2\u9605",
236
- description: "\u60A8\u7684\u8BA2\u9605\u5C06\u4E0D\u518D\u88AB\u53D6\u6D88\uFF0C\u5C06\u5728{date}\u7EED\u8BA2"
237
+ description: "\u60A8\u7684\u8BA2\u9605\u5C06\u4E0D\u4F1A\u88AB\u53D6\u6D88\uFF0C\u5E76\u5C06\u5728{date}\u81EA\u52A8\u7EED\u8BA2\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED"
237
238
  },
238
239
  changePlan: {
239
240
  button: "\u66F4\u65B0",
@@ -56,7 +56,7 @@ function ProductCard({
56
56
  sx: {
57
57
  fontWeight: 500,
58
58
  mb: 0.5,
59
- lineHeight: 1,
59
+ lineHeight: 1.2,
60
60
  fontSize: 16
61
61
  },
62
62
  color: "text.primary",
@@ -67,7 +67,7 @@ function ProductCard({
67
67
  sx: {
68
68
  fontSize: "0.85rem",
69
69
  mb: 0.5,
70
- lineHeight: 1,
70
+ lineHeight: 1.2,
71
71
  textAlign: "left"
72
72
  },
73
73
  color: "text.lighter",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-react",
3
- "version": "1.14.28",
3
+ "version": "1.14.29",
4
4
  "description": "Reusable react components for payment kit v2",
5
5
  "keywords": [
6
6
  "react",
@@ -93,7 +93,7 @@
93
93
  "@babel/core": "^7.25.2",
94
94
  "@babel/preset-env": "^7.25.2",
95
95
  "@babel/preset-react": "^7.24.7",
96
- "@blocklet/payment-types": "1.14.28",
96
+ "@blocklet/payment-types": "1.14.29",
97
97
  "@storybook/addon-essentials": "^7.6.20",
98
98
  "@storybook/addon-interactions": "^7.6.20",
99
99
  "@storybook/addon-links": "^7.6.20",
@@ -123,5 +123,5 @@
123
123
  "vite-plugin-babel": "^1.2.0",
124
124
  "vite-plugin-node-polyfills": "^0.21.0"
125
125
  },
126
- "gitHead": "79178aa9251fb54006f6e0fe32a14619d1e8f06e"
126
+ "gitHead": "104f4189d9ef96c1e332ffa90824ebd3063c989d"
127
127
  }
@@ -16,7 +16,7 @@ export default function Livemode({ color, backgroundColor, sx }: Props) {
16
16
  sx={{
17
17
  ml: 2,
18
18
  height: 18,
19
- lineHeight: 1,
19
+ lineHeight: 1.2,
20
20
  textTransform: 'uppercase',
21
21
  fontSize: '0.8rem',
22
22
  fontWeight: 'bold',
@@ -93,7 +93,7 @@ const Wrapped = styled(Datatable)`
93
93
  }
94
94
 
95
95
  tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
96
- background: #f5f5f5;
96
+ background: var(--backgrounds-bg-highlight, #eff6ff);
97
97
  }
98
98
  tr.MuiTableRow-root:last-of-type td:first-of-type {
99
99
  border-bottom-left-radius: 8px;
@@ -124,39 +124,40 @@ const InvoiceTable = React.memo((props: Props & { onPay: (invoiceId: string) =>
124
124
 
125
125
  const columns = [
126
126
  {
127
- label: t('payment.customer.invoice.invoiceNumber'),
128
- name: 'number',
127
+ label: t('common.amount'),
128
+ name: 'total',
129
+ width: 60,
130
+ align: 'right',
129
131
  options: {
130
132
  customBodyRenderLite: (_: string, index: number) => {
131
133
  const invoice = data?.list[index] as TInvoiceExpanded;
132
134
  const link = getInvoiceLink(invoice, action);
133
135
  return (
134
136
  <a href={link.url} target={link.external ? '_blank' : target} rel="noreferrer">
135
- {invoice?.number}
137
+ <Typography>
138
+ {formatBNStr(invoice.total, invoice.paymentCurrency.decimal)}&nbsp;
139
+ {invoice.paymentCurrency.symbol}
140
+ </Typography>
136
141
  </a>
137
142
  );
138
143
  },
139
144
  },
140
145
  },
141
146
  {
142
- label: t('common.amount'),
143
- name: 'total',
147
+ label: t('payment.customer.invoice.invoiceNumber'),
148
+ name: 'number',
144
149
  options: {
145
150
  customBodyRenderLite: (_: string, index: number) => {
146
151
  const invoice = data?.list[index] as TInvoiceExpanded;
147
152
  const link = getInvoiceLink(invoice, action);
148
153
  return (
149
154
  <a href={link.url} target={link.external ? '_blank' : target} rel="noreferrer">
150
- <Typography>
151
- {formatBNStr(invoice.total, invoice.paymentCurrency.decimal)}&nbsp;
152
- {invoice.paymentCurrency.symbol}
153
- </Typography>
155
+ {invoice?.number}
154
156
  </a>
155
157
  );
156
158
  },
157
159
  },
158
160
  },
159
-
160
161
  {
161
162
  label: t('common.updatedAt'),
162
163
  name: 'name',
@@ -90,6 +90,7 @@ export default flat({
90
90
  quantityLimitPerCheckout: 'Exceed purchase limit',
91
91
  quantityNotEnough: 'Exceed inventory',
92
92
  amountPrecisionLimit: 'Amount decimal places must be less than or equal to {precision}',
93
+ saveAsDefaultPriceSuccess: 'Set default price successfully',
93
94
  },
94
95
  payment: {
95
96
  checkout: {
@@ -234,7 +235,8 @@ export default flat({
234
235
  recover: {
235
236
  button: 'Renew',
236
237
  title: 'Renew your subscription',
237
- description: 'Your subscription will no longer be canceled, it will renew on {date}',
238
+ description:
239
+ 'Your subscription will not be canceled and will be automatically renewed on {date}, please confirm to continue',
238
240
  },
239
241
  changePlan: {
240
242
  button: 'Update',
@@ -90,6 +90,7 @@ export default flat({
90
90
  quantityLimitPerCheckout: '超出购买限制',
91
91
  quantityNotEnough: '库存不足',
92
92
  amountPrecisionLimit: '金额小数位数必须在 {precision} 位以内',
93
+ saveAsDefaultPriceSuccess: '设置默认价格成功',
93
94
  },
94
95
  payment: {
95
96
  checkout: {
@@ -228,7 +229,7 @@ export default flat({
228
229
  recover: {
229
230
  button: '续订',
230
231
  title: '续订您的订阅',
231
- description: '您的订阅将不再被取消,将在{date}续订',
232
+ description: '您的订阅将不会被取消,并将在{date}自动续订,请确认是否继续',
232
233
  },
233
234
  changePlan: {
234
235
  button: '更新',
@@ -33,7 +33,7 @@ export default function ProductCard({ size, variant, name, logo, description, ex
33
33
  className="cko-ellipsis"
34
34
  variant="body1"
35
35
  title={name}
36
- sx={{ fontWeight: 500, mb: 0.5, lineHeight: 1, fontSize: 16 }}
36
+ sx={{ fontWeight: 500, mb: 0.5, lineHeight: 1.2, fontSize: 16 }}
37
37
  color="text.primary">
38
38
  {name}
39
39
  </Typography>
@@ -41,7 +41,7 @@ export default function ProductCard({ size, variant, name, logo, description, ex
41
41
  <Typography
42
42
  variant="body1"
43
43
  title={description}
44
- sx={{ fontSize: '0.85rem', mb: 0.5, lineHeight: 1, textAlign: 'left' }}
44
+ sx={{ fontSize: '0.85rem', mb: 0.5, lineHeight: 1.2, textAlign: 'left' }}
45
45
  color="text.lighter">
46
46
  {description}
47
47
  </Typography>