@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.
- package/es/components/livemode.js +1 -1
- package/es/components/table.js +1 -1
- package/es/history/invoice/list.js +12 -10
- package/es/locales/en.js +3 -2
- package/es/locales/zh.js +3 -2
- package/es/payment/product-card.js +2 -2
- package/lib/components/livemode.js +1 -1
- package/lib/components/table.js +1 -1
- package/lib/history/invoice/list.js +10 -8
- package/lib/locales/en.js +3 -2
- package/lib/locales/zh.js +3 -2
- package/lib/payment/product-card.js +2 -2
- package/package.json +3 -3
- package/src/components/livemode.tsx +1 -1
- package/src/components/table.tsx +1 -1
- package/src/history/invoice/list.tsx +11 -10
- package/src/locales/en.tsx +3 -1
- package/src/locales/zh.tsx +2 -1
- package/src/payment/product-card.tsx +2 -2
package/es/components/table.js
CHANGED
|
@@ -83,7 +83,7 @@ const Wrapped = styled(Datatable)`
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
|
|
86
|
-
background: #
|
|
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("
|
|
98
|
-
name: "
|
|
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:
|
|
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("
|
|
109
|
-
name: "
|
|
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:
|
|
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
|
|
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\
|
|
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
|
}
|
package/lib/components/table.js
CHANGED
|
@@ -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: #
|
|
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("
|
|
101
|
-
name: "
|
|
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:
|
|
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("
|
|
116
|
-
name: "
|
|
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:
|
|
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
|
|
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\
|
|
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.
|
|
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.
|
|
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": "
|
|
126
|
+
"gitHead": "104f4189d9ef96c1e332ffa90824ebd3063c989d"
|
|
127
127
|
}
|
package/src/components/table.tsx
CHANGED
|
@@ -93,7 +93,7 @@ const Wrapped = styled(Datatable)`
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
|
|
96
|
-
background: #
|
|
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('
|
|
128
|
-
name: '
|
|
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
|
-
|
|
137
|
+
<Typography>
|
|
138
|
+
{formatBNStr(invoice.total, invoice.paymentCurrency.decimal)}
|
|
139
|
+
{invoice.paymentCurrency.symbol}
|
|
140
|
+
</Typography>
|
|
136
141
|
</a>
|
|
137
142
|
);
|
|
138
143
|
},
|
|
139
144
|
},
|
|
140
145
|
},
|
|
141
146
|
{
|
|
142
|
-
label: t('
|
|
143
|
-
name: '
|
|
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
|
-
|
|
151
|
-
{formatBNStr(invoice.total, invoice.paymentCurrency.decimal)}
|
|
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',
|
package/src/locales/en.tsx
CHANGED
|
@@ -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:
|
|
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',
|
package/src/locales/zh.tsx
CHANGED
|
@@ -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: '
|
|
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>
|