@blocklet/payment-react 1.13.113
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/LICENSE +13 -0
- package/README.md +29 -0
- package/babel.config.es.js +8 -0
- package/build.config.ts +29 -0
- package/es/api.d.ts +2 -0
- package/es/api.js +18 -0
- package/es/checkout/index.d.ts +15 -0
- package/es/checkout/index.js +61 -0
- package/es/components/input.d.ts +23 -0
- package/es/components/input.js +44 -0
- package/es/components/livemode.d.ts +2 -0
- package/es/components/livemode.js +24 -0
- package/es/components/pricing-table.d.ts +18 -0
- package/es/components/pricing-table.js +175 -0
- package/es/components/status.d.ts +3 -0
- package/es/components/status.js +20 -0
- package/es/components/switch.d.ts +6 -0
- package/es/components/switch.js +42 -0
- package/es/contexts/payment.d.ts +29 -0
- package/es/contexts/payment.js +45 -0
- package/es/dayjs.d.ts +2 -0
- package/es/dayjs.js +14 -0
- package/es/index.d.ts +16 -0
- package/es/index.js +29 -0
- package/es/locales/en.d.ts +2 -0
- package/es/locales/en.js +213 -0
- package/es/locales/index.d.ts +10 -0
- package/es/locales/index.js +20 -0
- package/es/locales/zh.d.ts +2 -0
- package/es/locales/zh.js +213 -0
- package/es/payment/amount.d.ts +12 -0
- package/es/payment/amount.js +22 -0
- package/es/payment/error.d.ts +13 -0
- package/es/payment/error.js +12 -0
- package/es/payment/footer.d.ts +4 -0
- package/es/payment/footer.js +9 -0
- package/es/payment/form/addon.d.ts +2 -0
- package/es/payment/form/addon.js +14 -0
- package/es/payment/form/address.d.ts +7 -0
- package/es/payment/form/address.js +119 -0
- package/es/payment/form/index.d.ts +9 -0
- package/es/payment/form/index.js +337 -0
- package/es/payment/form/phone.d.ts +4 -0
- package/es/payment/form/phone.js +97 -0
- package/es/payment/form/stripe.d.ts +13 -0
- package/es/payment/form/stripe.js +158 -0
- package/es/payment/header.d.ts +7 -0
- package/es/payment/header.js +29 -0
- package/es/payment/index.d.ts +28 -0
- package/es/payment/index.js +327 -0
- package/es/payment/product-card.d.ts +21 -0
- package/es/payment/product-card.js +34 -0
- package/es/payment/product-item.d.ts +19 -0
- package/es/payment/product-item.js +107 -0
- package/es/payment/product-skeleton.d.ts +4 -0
- package/es/payment/product-skeleton.js +34 -0
- package/es/payment/skeleton/overview.d.ts +2 -0
- package/es/payment/skeleton/overview.js +13 -0
- package/es/payment/skeleton/payment.d.ts +2 -0
- package/es/payment/skeleton/payment.js +19 -0
- package/es/payment/success.d.ts +8 -0
- package/es/payment/success.js +164 -0
- package/es/payment/summary.d.ts +12 -0
- package/es/payment/summary.js +178 -0
- package/es/theme.d.ts +1 -0
- package/es/theme.js +17 -0
- package/es/types/index.d.ts +19 -0
- package/es/types/index.js +0 -0
- package/es/types/shims.d.ts +18 -0
- package/es/util.d.ts +52 -0
- package/es/util.js +390 -0
- package/lib/api.d.ts +2 -0
- package/lib/api.js +26 -0
- package/lib/checkout/index.d.ts +15 -0
- package/lib/checkout/index.js +83 -0
- package/lib/components/input.d.ts +23 -0
- package/lib/components/input.js +72 -0
- package/lib/components/livemode.d.ts +2 -0
- package/lib/components/livemode.js +29 -0
- package/lib/components/pricing-table.d.ts +18 -0
- package/lib/components/pricing-table.js +232 -0
- package/lib/components/status.d.ts +3 -0
- package/lib/components/status.js +23 -0
- package/lib/components/switch.d.ts +6 -0
- package/lib/components/switch.js +51 -0
- package/lib/contexts/payment.d.ts +29 -0
- package/lib/contexts/payment.js +73 -0
- package/lib/dayjs.d.ts +2 -0
- package/lib/dayjs.js +21 -0
- package/lib/index.d.ts +16 -0
- package/lib/index.js +143 -0
- package/lib/locales/en.d.ts +2 -0
- package/lib/locales/en.js +220 -0
- package/lib/locales/index.d.ts +10 -0
- package/lib/locales/index.js +33 -0
- package/lib/locales/zh.d.ts +2 -0
- package/lib/locales/zh.js +220 -0
- package/lib/payment/amount.d.ts +12 -0
- package/lib/payment/amount.js +28 -0
- package/lib/payment/error.d.ts +13 -0
- package/lib/payment/error.js +52 -0
- package/lib/payment/footer.d.ts +4 -0
- package/lib/payment/footer.js +25 -0
- package/lib/payment/form/addon.d.ts +2 -0
- package/lib/payment/form/addon.js +37 -0
- package/lib/payment/form/address.d.ts +7 -0
- package/lib/payment/form/address.js +152 -0
- package/lib/payment/form/index.d.ts +9 -0
- package/lib/payment/form/index.js +464 -0
- package/lib/payment/form/phone.d.ts +4 -0
- package/lib/payment/form/phone.js +133 -0
- package/lib/payment/form/stripe.d.ts +13 -0
- package/lib/payment/form/stripe.js +213 -0
- package/lib/payment/header.d.ts +7 -0
- package/lib/payment/header.js +58 -0
- package/lib/payment/index.d.ts +28 -0
- package/lib/payment/index.js +382 -0
- package/lib/payment/product-card.d.ts +21 -0
- package/lib/payment/product-card.js +81 -0
- package/lib/payment/product-item.d.ts +19 -0
- package/lib/payment/product-item.js +160 -0
- package/lib/payment/product-skeleton.d.ts +4 -0
- package/lib/payment/product-skeleton.js +71 -0
- package/lib/payment/skeleton/overview.d.ts +2 -0
- package/lib/payment/skeleton/overview.js +48 -0
- package/lib/payment/skeleton/payment.d.ts +2 -0
- package/lib/payment/skeleton/payment.js +54 -0
- package/lib/payment/success.d.ts +8 -0
- package/lib/payment/success.js +215 -0
- package/lib/payment/summary.d.ts +12 -0
- package/lib/payment/summary.js +225 -0
- package/lib/theme.d.ts +1 -0
- package/lib/theme.js +19 -0
- package/lib/types/index.d.ts +19 -0
- package/lib/types/index.js +1 -0
- package/lib/types/shims.d.ts +18 -0
- package/lib/util.d.ts +52 -0
- package/lib/util.js +487 -0
- package/package.json +104 -0
- package/src/api.ts +24 -0
- package/src/checkout/index.tsx +74 -0
- package/src/components/input.tsx +58 -0
- package/src/components/livemode.tsx +23 -0
- package/src/components/pricing-table.tsx +207 -0
- package/src/components/status.tsx +19 -0
- package/src/components/switch.tsx +48 -0
- package/src/contexts/payment.tsx +74 -0
- package/src/dayjs.ts +17 -0
- package/src/index.ts +32 -0
- package/src/locales/en.tsx +218 -0
- package/src/locales/index.tsx +30 -0
- package/src/locales/zh.tsx +214 -0
- package/src/payment/amount.tsx +24 -0
- package/src/payment/error.tsx +29 -0
- package/src/payment/footer.tsx +12 -0
- package/src/payment/form/addon.tsx +24 -0
- package/src/payment/form/address.tsx +119 -0
- package/src/payment/form/index.tsx +401 -0
- package/src/payment/form/phone.tsx +103 -0
- package/src/payment/form/stripe.tsx +195 -0
- package/src/payment/header.tsx +40 -0
- package/src/payment/index.tsx +367 -0
- package/src/payment/product-card.tsx +55 -0
- package/src/payment/product-item.tsx +121 -0
- package/src/payment/product-skeleton.tsx +39 -0
- package/src/payment/skeleton/overview.tsx +21 -0
- package/src/payment/skeleton/payment.tsx +35 -0
- package/src/payment/success.tsx +186 -0
- package/src/payment/summary.tsx +198 -0
- package/src/theme.ts +18 -0
- package/src/types/index.ts +29 -0
- package/src/types/shims.d.ts +18 -0
- package/src/util.ts +543 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _flat = _interopRequireDefault(require("flat"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
module.exports = (0, _flat.default)({
|
|
10
|
+
common: {
|
|
11
|
+
id: "ID",
|
|
12
|
+
url: "URL",
|
|
13
|
+
createdAt: "Created At",
|
|
14
|
+
updatedAt: "Updated At",
|
|
15
|
+
resumesAt: "Resume At",
|
|
16
|
+
actions: "Actions",
|
|
17
|
+
options: "Options",
|
|
18
|
+
advanced: "Advanced options",
|
|
19
|
+
login: "Login to access this page",
|
|
20
|
+
settings: "Settings",
|
|
21
|
+
preview: "Preview",
|
|
22
|
+
required: "Required",
|
|
23
|
+
setup: "Setup",
|
|
24
|
+
name: "Name",
|
|
25
|
+
amount: "Amount",
|
|
26
|
+
total: "Total",
|
|
27
|
+
subtotal: "Subtotal",
|
|
28
|
+
status: "Status",
|
|
29
|
+
livemode: "Test mode",
|
|
30
|
+
afterTime: "After {time}",
|
|
31
|
+
timeAgo: "{time} ago",
|
|
32
|
+
save: "Save",
|
|
33
|
+
saved: "Changes saved",
|
|
34
|
+
remove: "Remove",
|
|
35
|
+
removed: "Resource removed",
|
|
36
|
+
confirm: "Confirm",
|
|
37
|
+
cancel: "Cancel",
|
|
38
|
+
every: "every",
|
|
39
|
+
per: "per {interval}",
|
|
40
|
+
slash: "/ {interval}",
|
|
41
|
+
unit: "units",
|
|
42
|
+
edit: "Edit",
|
|
43
|
+
quantity: "Quantity",
|
|
44
|
+
yes: "Yes",
|
|
45
|
+
no: "No",
|
|
46
|
+
email: "Email",
|
|
47
|
+
did: "DID",
|
|
48
|
+
txHash: "Transaction",
|
|
49
|
+
customer: "Customer",
|
|
50
|
+
custom: "Custom",
|
|
51
|
+
description: "Description",
|
|
52
|
+
statementDescriptor: "Statement descriptor",
|
|
53
|
+
loadMore: "View more {resource}",
|
|
54
|
+
loadingMore: "Loading more {resource}...",
|
|
55
|
+
noMore: "No more {resource}",
|
|
56
|
+
copied: "Copied",
|
|
57
|
+
previous: "Back",
|
|
58
|
+
continue: "Continue",
|
|
59
|
+
qty: "Qty {count}",
|
|
60
|
+
each: "{unit} each",
|
|
61
|
+
trial: "Free for {count} days",
|
|
62
|
+
billed: "billed {rule}",
|
|
63
|
+
metered: "based on usage",
|
|
64
|
+
hour: "hour",
|
|
65
|
+
day: "day",
|
|
66
|
+
week: "week",
|
|
67
|
+
month: "month",
|
|
68
|
+
year: "year",
|
|
69
|
+
hourly: "hourly",
|
|
70
|
+
daily: "daily",
|
|
71
|
+
weekly: "weekly",
|
|
72
|
+
monthly: "monthly",
|
|
73
|
+
yearly: "yearly",
|
|
74
|
+
month3: "every 3 months",
|
|
75
|
+
month6: "every 6 months",
|
|
76
|
+
recurring: "every {count} {interval}",
|
|
77
|
+
hours: "hours",
|
|
78
|
+
days: "days",
|
|
79
|
+
weeks: "weeks",
|
|
80
|
+
months: "months",
|
|
81
|
+
years: "years"
|
|
82
|
+
},
|
|
83
|
+
payment: {
|
|
84
|
+
checkout: {
|
|
85
|
+
contact: "Contact information",
|
|
86
|
+
method: "Payment method",
|
|
87
|
+
processing: "Processing",
|
|
88
|
+
payment: "Pay",
|
|
89
|
+
try: "Try for free",
|
|
90
|
+
include: "This includes:",
|
|
91
|
+
subscription: "Subscribe",
|
|
92
|
+
select: "Select",
|
|
93
|
+
selected: "Selected",
|
|
94
|
+
noPricing: "No items to purchase",
|
|
95
|
+
setup: "Subscribe",
|
|
96
|
+
continue: "Confirm {action}",
|
|
97
|
+
connect: "Connect and {action}",
|
|
98
|
+
login: "Login to load and save contact information",
|
|
99
|
+
portal: "Manage subscriptions",
|
|
100
|
+
cardPay: "{action} with card",
|
|
101
|
+
empty: "No thing to pay",
|
|
102
|
+
per: "per",
|
|
103
|
+
pay: "Pay {payee}",
|
|
104
|
+
try1: "Try {name}",
|
|
105
|
+
try2: "Try {name} and {count} more",
|
|
106
|
+
sub1: "Subscribe to {name}",
|
|
107
|
+
sub2: "Subscribe to {name} and {count} more",
|
|
108
|
+
then: "Then {subscription} {recurring}",
|
|
109
|
+
free: "{count} days free",
|
|
110
|
+
least: "continue with at least",
|
|
111
|
+
completed: {
|
|
112
|
+
payment: "Thanks for your purchase",
|
|
113
|
+
subscription: "Thanks for your subscribing",
|
|
114
|
+
setup: "Thanks for your subscribing",
|
|
115
|
+
tip: "A payment to {payee} has been completed. You can view the details of this payment in your account."
|
|
116
|
+
},
|
|
117
|
+
confirm: "By confirming your subscription, you allow {payee} to charge your account for this and future payments in accordance with their terms. You can always cancel your subscription.",
|
|
118
|
+
required: "Required",
|
|
119
|
+
invalid: "Invalid",
|
|
120
|
+
billing: {
|
|
121
|
+
auto: "Country",
|
|
122
|
+
required: "Billing address",
|
|
123
|
+
country: "Country",
|
|
124
|
+
state: "State or province",
|
|
125
|
+
city: "City or town",
|
|
126
|
+
line1: "Address",
|
|
127
|
+
line2: "Line2",
|
|
128
|
+
postal_code: "Postal code"
|
|
129
|
+
},
|
|
130
|
+
customer: {
|
|
131
|
+
name: "Name",
|
|
132
|
+
email: "Email",
|
|
133
|
+
phone: "Phone",
|
|
134
|
+
phonePlaceholder: "Phone number",
|
|
135
|
+
phoneTip: "In case we need to contact you about your order"
|
|
136
|
+
},
|
|
137
|
+
upsell: {
|
|
138
|
+
save: "Save with {recurring} billing",
|
|
139
|
+
revert: "Switch to {recurring} billing",
|
|
140
|
+
off: "{saving}% off"
|
|
141
|
+
},
|
|
142
|
+
cross_sell: {
|
|
143
|
+
add: "Add to order",
|
|
144
|
+
remove: "Remove from order"
|
|
145
|
+
},
|
|
146
|
+
expired: {
|
|
147
|
+
title: "Expired Link",
|
|
148
|
+
description: "This link has expired. This means that your payment has already been processed or your session has expired."
|
|
149
|
+
},
|
|
150
|
+
complete: {
|
|
151
|
+
title: "Checkout Completed",
|
|
152
|
+
description: "This checkout session has completed. This means that your payment has already been successfully processed."
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
customer: {
|
|
156
|
+
invoices: "Invoice History",
|
|
157
|
+
details: "Billing Details",
|
|
158
|
+
update: "Update Information",
|
|
159
|
+
empty: "Seems you do not have any subscriptions or payments here",
|
|
160
|
+
cancel: {
|
|
161
|
+
button: "Cancel",
|
|
162
|
+
title: "Cancel your subscription",
|
|
163
|
+
description: "Your subscription will be canceled, but it is still available until the end of your current billing period on {date}",
|
|
164
|
+
feedback: {
|
|
165
|
+
tip: "We would love your feedback, it will help us improve our service",
|
|
166
|
+
too_expensive: "The service is too expensive",
|
|
167
|
+
missing_features: "Features are missing for this service",
|
|
168
|
+
switched_service: "I have switched to alternative service",
|
|
169
|
+
unused: "I no longer use this service",
|
|
170
|
+
customer_service: "The customer service is poor",
|
|
171
|
+
too_complex: "The service is too complex to use",
|
|
172
|
+
low_quality: "The service does not work well",
|
|
173
|
+
other: "Other reasons"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
pastDue: {
|
|
177
|
+
button: "Pay"
|
|
178
|
+
},
|
|
179
|
+
recover: {
|
|
180
|
+
button: "Renew",
|
|
181
|
+
title: "Renew your subscription",
|
|
182
|
+
description: "Your subscription will no longer be canceled, it will renew on {date}"
|
|
183
|
+
},
|
|
184
|
+
upgrade: {
|
|
185
|
+
button: "Update",
|
|
186
|
+
current: "Current",
|
|
187
|
+
pay: "Payment Required",
|
|
188
|
+
scan: "Complete the payment to upgrade your subscription",
|
|
189
|
+
success: "Your subscription is successfully upgraded",
|
|
190
|
+
error: "Failed to upgrade your subscription",
|
|
191
|
+
config: "Switch to another plan or billing cycle",
|
|
192
|
+
confirm: "Confirm changes to your subscription",
|
|
193
|
+
summary: "What you will pay for starting {date}",
|
|
194
|
+
total: "Total (metered items excluded)",
|
|
195
|
+
appliedCredit: "Credit applied",
|
|
196
|
+
newCredit: "Credit issued",
|
|
197
|
+
remaining: "Amount due today"
|
|
198
|
+
},
|
|
199
|
+
invoice: {
|
|
200
|
+
summary: "Summary",
|
|
201
|
+
details: "Details",
|
|
202
|
+
download: "Download PDF",
|
|
203
|
+
unitPrice: "Unit Price",
|
|
204
|
+
amountPaid: "Amount Paid",
|
|
205
|
+
rawQuantity: "Raw Quantity: {quantity}",
|
|
206
|
+
amountDue: "Amount Due",
|
|
207
|
+
amountApplied: "Applied Credit",
|
|
208
|
+
pay: "Pay this invoice",
|
|
209
|
+
paySuccess: "You have successfully paid the invoice",
|
|
210
|
+
payError: "Failed to paid the invoice",
|
|
211
|
+
empty: "Seems you do not have any payments here"
|
|
212
|
+
},
|
|
213
|
+
subscriptions: {
|
|
214
|
+
title: "Manage subscriptions",
|
|
215
|
+
current: "Current subscriptions",
|
|
216
|
+
empty: "Seems you do not have any subscriptions here"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
zh: any;
|
|
3
|
+
en: any;
|
|
4
|
+
};
|
|
5
|
+
export declare const replace: (template: string, data?: Record<string, any>) => string;
|
|
6
|
+
export declare const createTranslator: ({ fallbackLocale }: {
|
|
7
|
+
fallbackLocale?: string | undefined;
|
|
8
|
+
}, langs?: any) => (key: string, locale?: string, data?: Record<string, any>) => string;
|
|
9
|
+
export declare const translate: (key: string, locale?: string, data?: Record<string, any>) => string;
|
|
10
|
+
export declare const t: (key: string, locale?: string, data?: Record<string, any>) => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.translations = exports.translate = exports.t = exports.replace = exports.createTranslator = void 0;
|
|
7
|
+
var _en = _interopRequireDefault(require("./en"));
|
|
8
|
+
var _zh = _interopRequireDefault(require("./zh"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const translations = exports.translations = {
|
|
11
|
+
zh: _zh.default,
|
|
12
|
+
en: _en.default
|
|
13
|
+
};
|
|
14
|
+
const replace = (template, data = {}) => template.replace(/{(\w*)}/g, (_, key) => data.hasOwnProperty(key) ? data[key] : "");
|
|
15
|
+
exports.replace = replace;
|
|
16
|
+
const createTranslator = ({
|
|
17
|
+
fallbackLocale = "en"
|
|
18
|
+
}, langs = translations) => {
|
|
19
|
+
return (key, locale = fallbackLocale, data = {}) => {
|
|
20
|
+
if (!langs[locale] || !langs[locale][key]) {
|
|
21
|
+
if (fallbackLocale && langs[fallbackLocale]?.[key]) {
|
|
22
|
+
return replace(langs[fallbackLocale]?.[key], data);
|
|
23
|
+
}
|
|
24
|
+
return key;
|
|
25
|
+
}
|
|
26
|
+
return replace(langs[locale][key], data);
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.createTranslator = createTranslator;
|
|
30
|
+
const translate = exports.translate = createTranslator({
|
|
31
|
+
fallbackLocale: "en"
|
|
32
|
+
});
|
|
33
|
+
const t = exports.t = translate;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _flat = _interopRequireDefault(require("flat"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
module.exports = (0, _flat.default)({
|
|
10
|
+
common: {
|
|
11
|
+
id: "ID",
|
|
12
|
+
url: "URL",
|
|
13
|
+
createdAt: "\u521B\u5EFA\u65F6\u95F4",
|
|
14
|
+
updatedAt: "\u66F4\u65B0\u65F6\u95F4",
|
|
15
|
+
resumesAt: "\u6062\u590D\u65F6\u95F4",
|
|
16
|
+
actions: "\u64CD\u4F5C",
|
|
17
|
+
options: "\u9009\u9879",
|
|
18
|
+
advanced: "\u9AD8\u7EA7\u9009\u9879",
|
|
19
|
+
settings: "\u8BBE\u7F6E",
|
|
20
|
+
preview: "\u9884\u89C8",
|
|
21
|
+
required: "\u5FC5\u586B",
|
|
22
|
+
setup: "\u8BBE\u7F6E",
|
|
23
|
+
name: "\u59D3\u540D",
|
|
24
|
+
login: "\u767B\u5F55\u4EE5\u8BBF\u95EE\u6B64\u9875\u9762",
|
|
25
|
+
amount: "\u91D1\u989D",
|
|
26
|
+
total: "\u603B\u8BA1",
|
|
27
|
+
subtotal: "\u5C0F\u8BA1",
|
|
28
|
+
status: "\u72B6\u6001",
|
|
29
|
+
livemode: "\u6D4B\u8BD5\u6A21\u5F0F",
|
|
30
|
+
afterTime: "\u5728{time}\u540E",
|
|
31
|
+
timeAgo: "{time}\u524D",
|
|
32
|
+
save: "\u4FDD\u5B58",
|
|
33
|
+
saved: "\u66F4\u6539\u5DF2\u4FDD\u5B58",
|
|
34
|
+
remove: "\u5220\u9664",
|
|
35
|
+
removed: "\u8D44\u6E90\u5DF2\u5220\u9664",
|
|
36
|
+
confirm: "\u786E\u8BA4",
|
|
37
|
+
cancel: "\u53D6\u6D88",
|
|
38
|
+
every: "\u6BCF",
|
|
39
|
+
per: "\u6BCF{interval}",
|
|
40
|
+
slash: "\u6BCF{interval}",
|
|
41
|
+
unit: "\u4EF6",
|
|
42
|
+
edit: "\u7F16\u8F91",
|
|
43
|
+
quantity: "\u6570\u91CF",
|
|
44
|
+
yes: "\u662F",
|
|
45
|
+
no: "\u5426",
|
|
46
|
+
email: "\u90AE\u7BB1",
|
|
47
|
+
did: "DID",
|
|
48
|
+
txHash: "\u4EA4\u6613\u54C8\u5E0C",
|
|
49
|
+
customer: "\u5BA2\u6237",
|
|
50
|
+
custom: "\u81EA\u5B9A\u4E49",
|
|
51
|
+
description: "\u63CF\u8FF0",
|
|
52
|
+
statementDescriptor: "\u58F0\u660E\u63CF\u8FF0",
|
|
53
|
+
loadMore: "\u67E5\u770B\u66F4\u591A{resource}",
|
|
54
|
+
loadingMore: "\u6B63\u5728\u52A0\u8F7D\u66F4\u591A{resource}...",
|
|
55
|
+
noMore: "\u6CA1\u6709\u66F4\u591A{resource}",
|
|
56
|
+
copied: "\u5DF2\u590D\u5236",
|
|
57
|
+
previous: "\u8FD4\u56DE",
|
|
58
|
+
continue: "\u7EE7\u7EED",
|
|
59
|
+
qty: "{count} \u4EF6",
|
|
60
|
+
each: "\u6BCF\u4EF6 {unit}",
|
|
61
|
+
trial: "\u514D\u8D39\u8BD5\u7528 {count} \u5929",
|
|
62
|
+
billed: "{rule}\u6536\u8D39",
|
|
63
|
+
metered: "\u6309\u7528\u91CF",
|
|
64
|
+
hour: "\u5C0F\u65F6",
|
|
65
|
+
day: "\u5929",
|
|
66
|
+
week: "\u5468",
|
|
67
|
+
month: "\u6708",
|
|
68
|
+
year: "\u5E74",
|
|
69
|
+
hourly: "\u6309\u5C0F\u65F6",
|
|
70
|
+
daily: "\u6309\u5929",
|
|
71
|
+
weekly: "\u6309\u5468",
|
|
72
|
+
monthly: "\u6309\u6708",
|
|
73
|
+
yearly: "\u6309\u5E74",
|
|
74
|
+
month3: "\u6309\u5B63\u5EA6",
|
|
75
|
+
month6: "\u6309\u534A\u5E74",
|
|
76
|
+
recurring: "\u6BCF{count}{interval}",
|
|
77
|
+
hours: "\u5C0F\u65F6",
|
|
78
|
+
days: "\u5929",
|
|
79
|
+
weeks: "\u5468",
|
|
80
|
+
months: "\u6708",
|
|
81
|
+
years: "\u5E74"
|
|
82
|
+
},
|
|
83
|
+
payment: {
|
|
84
|
+
checkout: {
|
|
85
|
+
contact: "\u8054\u7CFB\u4FE1\u606F",
|
|
86
|
+
method: "\u652F\u4ED8\u65B9\u5F0F",
|
|
87
|
+
processing: "\u5904\u7406\u4E2D",
|
|
88
|
+
payment: "\u652F\u4ED8",
|
|
89
|
+
try: "\u514D\u8D39\u8BD5\u7528",
|
|
90
|
+
include: "\u5305\u62EC\uFF1A",
|
|
91
|
+
subscription: "\u8BA2\u9605",
|
|
92
|
+
select: "\u9009\u62E9",
|
|
93
|
+
selected: "\u5DF2\u9009",
|
|
94
|
+
noPricing: "\u6CA1\u6709\u53EF\u8D2D\u4E70\u7684\u7269\u54C1",
|
|
95
|
+
setup: "\u8BA2\u9605",
|
|
96
|
+
continue: "\u786E\u8BA4{action}",
|
|
97
|
+
connect: "\u8FDE\u63A5\u5E76{action}",
|
|
98
|
+
login: "\u767B\u5F55\u4EE5\u52A0\u8F7D\u5E76\u4FDD\u5B58\u8054\u7CFB\u4FE1\u606F",
|
|
99
|
+
portal: "\u7BA1\u7406\u8BA2\u9605",
|
|
100
|
+
cardPay: "\u4F7F\u7528\u5361\u7247{action}",
|
|
101
|
+
empty: "\u6CA1\u6709\u53EF\u652F\u4ED8\u7684\u9879\u76EE",
|
|
102
|
+
per: "\u6BCF",
|
|
103
|
+
pay: "\u4ED8\u6B3E\u7ED9 {payee}",
|
|
104
|
+
try1: "\u514D\u8D39\u8BD5\u7528 {name}",
|
|
105
|
+
try2: "\u514D\u8D39\u8BD5\u7528 {name} \u7B49{count}\u4E2A\u4EA7\u54C1",
|
|
106
|
+
sub1: "\u8BA2\u9605 {name}",
|
|
107
|
+
sub2: "\u8BA2\u9605 {name} \u7B49{count}\u4E2A\u4EA7\u54C1",
|
|
108
|
+
then: "\u7136\u540E {subscription} {recurring}",
|
|
109
|
+
free: "{count} \u5929",
|
|
110
|
+
least: "\u81F3\u5C11",
|
|
111
|
+
completed: {
|
|
112
|
+
payment: "\u611F\u8C22\u60A8\u7684\u8D2D\u4E70",
|
|
113
|
+
subscription: "\u611F\u8C22\u60A8\u7684\u8BA2\u9605",
|
|
114
|
+
setup: "\u611F\u8C22\u60A8\u7684\u8BA2\u9605",
|
|
115
|
+
tip: "\u5411{payee}\u7684\u4ED8\u6B3E\u5DF2\u5B8C\u6210\u3002\u60A8\u53EF\u4EE5\u5728\u60A8\u7684\u8D26\u6237\u4E2D\u67E5\u770B\u6B64\u4ED8\u6B3E\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002"
|
|
116
|
+
},
|
|
117
|
+
confirm: "\u901A\u8FC7\u786E\u8BA4\u60A8\u7684\u8BA2\u9605\uFF0C\u60A8\u5141\u8BB8{payee}\u6309\u7167\u5176\u6761\u6B3E\u5BF9\u60A8\u7684\u8D26\u6237\u8FDB\u884C\u4ED8\u6B3E\u3002\u60A8\u968F\u65F6\u53EF\u4EE5\u53D6\u6D88\u60A8\u7684\u8BA2\u9605\u3002",
|
|
118
|
+
required: "\u5FC5\u586B\u9879",
|
|
119
|
+
invalid: "\u65E0\u6548",
|
|
120
|
+
billing: {
|
|
121
|
+
auto: "\u56FD\u5BB6/\u5730\u533A",
|
|
122
|
+
required: "\u8D26\u5355\u5730\u5740",
|
|
123
|
+
country: "\u56FD\u5BB6/\u5730\u533A",
|
|
124
|
+
state: "\u5DDE\u6216\u7701",
|
|
125
|
+
city: "\u57CE\u5E02\u6216\u9547",
|
|
126
|
+
line1: "\u5730\u5740",
|
|
127
|
+
line2: "\u5730\u57402",
|
|
128
|
+
postal_code: "\u90AE\u653F\u7F16\u7801"
|
|
129
|
+
},
|
|
130
|
+
customer: {
|
|
131
|
+
name: "\u59D3\u540D",
|
|
132
|
+
email: "\u90AE\u4EF6",
|
|
133
|
+
phone: "\u7535\u8BDD",
|
|
134
|
+
phonePlaceholder: "\u7535\u8BDD\u53F7\u7801",
|
|
135
|
+
phoneTip: "\u4EE5\u9632\u9700\u8981\u4E0E\u60A8\u8054\u7CFB\u6709\u5173\u60A8\u7684\u8BA2\u5355"
|
|
136
|
+
},
|
|
137
|
+
upsell: {
|
|
138
|
+
save: "\u4F7F\u7528{recurring}\u8BA1\u8D39\u65B9\u5F0F",
|
|
139
|
+
revert: "\u5207\u6362\u5230{recurring}\u8BA1\u8D39\u65B9\u5F0F",
|
|
140
|
+
off: "\u7701 {saving}%"
|
|
141
|
+
},
|
|
142
|
+
expired: {
|
|
143
|
+
title: "\u94FE\u63A5\u5DF2\u8FC7\u671F",
|
|
144
|
+
description: "\u6B64\u94FE\u63A5\u5DF2\u8FC7\u671F\u3002\u8FD9\u610F\u5473\u7740\u60A8\u7684\u4ED8\u6B3E\u5DF2\u7ECF\u5904\u7406\u5B8C\u6210\u6216\u4F1A\u8BDD\u5DF2\u8FC7\u671F\u3002"
|
|
145
|
+
},
|
|
146
|
+
complete: {
|
|
147
|
+
title: "\u7ED3\u8D26\u5DF2\u5B8C\u6210",
|
|
148
|
+
description: "\u6B64\u7ED3\u8D26\u4F1A\u8BDD\u5DF2\u5B8C\u6210\u3002\u8FD9\u610F\u5473\u7740\u60A8\u7684\u4ED8\u6B3E\u5DF2\u6210\u529F\u5904\u7406\u5B8C\u6210\u3002"
|
|
149
|
+
},
|
|
150
|
+
cross_sell: {
|
|
151
|
+
add: "\u6DFB\u52A0\u5230\u8BA2\u5355",
|
|
152
|
+
remove: "\u4ECE\u8BA2\u5355\u79FB\u9664"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
customer: {
|
|
156
|
+
invoices: "\u53D1\u7968\u5386\u53F2",
|
|
157
|
+
details: "\u8BA1\u8D39\u8BE6\u60C5",
|
|
158
|
+
update: "\u66F4\u65B0\u5BA2\u6237\u4FE1\u606F",
|
|
159
|
+
empty: "\u770B\u8D77\u6765\u60A8\u5728\u8FD9\u91CC\u6CA1\u6709\u4EFB\u4F55\u8BA2\u9605\u6216\u652F\u4ED8",
|
|
160
|
+
cancel: {
|
|
161
|
+
button: "\u53D6\u6D88",
|
|
162
|
+
title: "\u53D6\u6D88\u60A8\u7684\u8BA2\u9605",
|
|
163
|
+
description: "\u60A8\u7684\u8BA2\u9605\u5C06\u88AB\u53D6\u6D88\uFF0C\u4F46\u4ECD\u7136\u53EF\u7528\u76F4\u5230\u60A8\u5F53\u524D\u8BA1\u8D39\u5468\u671F\u7ED3\u675F\u4E8E{date}",
|
|
164
|
+
feedback: {
|
|
165
|
+
tip: "\u6211\u4EEC\u5E0C\u671B\u542C\u5230\u60A8\u7684\u53CD\u9988\uFF0C\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u6539\u8FDB\u6211\u4EEC\u7684\u670D\u52A1",
|
|
166
|
+
too_expensive: "\u670D\u52A1\u8D39\u7528\u592A\u9AD8",
|
|
167
|
+
missing_features: "\u670D\u52A1\u7F3A\u5C11\u529F\u80FD",
|
|
168
|
+
switched_service: "\u6211\u5DF2\u5207\u6362\u5230\u5176\u4ED6\u670D\u52A1",
|
|
169
|
+
unused: "\u6211\u4E0D\u518D\u4F7F\u7528\u6B64\u670D\u52A1",
|
|
170
|
+
customer_service: "\u5BA2\u6237\u670D\u52A1\u4E0D\u4F73",
|
|
171
|
+
too_complex: "\u670D\u52A1\u4F7F\u7528\u8FC7\u4E8E\u590D\u6742",
|
|
172
|
+
low_quality: "\u670D\u52A1\u8D28\u91CF\u4E0D\u4F73",
|
|
173
|
+
other: "\u5176\u4ED6\u539F\u56E0"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
pastDue: {
|
|
177
|
+
button: "\u7EED\u8D39"
|
|
178
|
+
},
|
|
179
|
+
recover: {
|
|
180
|
+
button: "\u7EED\u8BA2",
|
|
181
|
+
title: "\u7EED\u8BA2\u60A8\u7684\u8BA2\u9605",
|
|
182
|
+
description: "\u60A8\u7684\u8BA2\u9605\u5C06\u4E0D\u518D\u88AB\u53D6\u6D88\uFF0C\u5C06\u5728{date}\u7EED\u8BA2"
|
|
183
|
+
},
|
|
184
|
+
upgrade: {
|
|
185
|
+
button: "\u66F4\u65B0",
|
|
186
|
+
current: "\u5F53\u524D\u8BA2\u9605",
|
|
187
|
+
pay: "\u9700\u8981\u652F\u4ED8",
|
|
188
|
+
scan: "\u5B8C\u6210\u652F\u4ED8\u4EE5\u66F4\u65B0\u4F60\u7684\u8BA2\u9605",
|
|
189
|
+
success: "\u4F60\u7684\u8BA2\u9605\u5DF2\u7ECF\u66F4\u65B0\u6210\u529F",
|
|
190
|
+
error: "\u8BA2\u9605\u66F4\u65B0\u5931\u8D25",
|
|
191
|
+
config: "\u5207\u6362\u5957\u9910\u6216\u5468\u671F",
|
|
192
|
+
confirm: "\u786E\u8BA4\u53D8\u66F4\u7EC6\u8282",
|
|
193
|
+
summary: "\u65B0\u7684\u4ED8\u6B3E\u8BA1\u5212\uFF08{date} \u5F00\u59CB)",
|
|
194
|
+
total: "\u5957\u9910\u5B9A\u4EF7\uFF08\u4E0D\u542B\u6309\u91CF\u90E8\u5206\uFF09",
|
|
195
|
+
appliedCredit: "\u4FE1\u7528\u6263\u9664",
|
|
196
|
+
newCredit: "\u4FE1\u7528\u589E\u52A0",
|
|
197
|
+
remaining: "\u8FD8\u9700\u652F\u4ED8"
|
|
198
|
+
},
|
|
199
|
+
invoice: {
|
|
200
|
+
summary: "\u6458\u8981",
|
|
201
|
+
details: "\u8BE6\u60C5",
|
|
202
|
+
download: "\u4E0B\u8F7DPDF",
|
|
203
|
+
unitPrice: "\u5355\u4EF7",
|
|
204
|
+
rawQuantity: "\u6C47\u603B\u524D\u6570\u91CF: {quantity}",
|
|
205
|
+
amountPaid: "\u5DF2\u652F\u4ED8",
|
|
206
|
+
amountDue: "\u5F85\u652F\u4ED8",
|
|
207
|
+
amountApplied: "\u4F59\u989D\u53D8\u66F4",
|
|
208
|
+
pay: "\u652F\u4ED8\u6B64\u53D1\u7968",
|
|
209
|
+
paySuccess: "\u652F\u4ED8\u6210\u529F",
|
|
210
|
+
payError: "\u652F\u4ED8\u5931\u8D25",
|
|
211
|
+
empty: "\u4F60\u6CA1\u6709\u4EFB\u4F55\u652F\u4ED8"
|
|
212
|
+
},
|
|
213
|
+
subscriptions: {
|
|
214
|
+
title: "\u8BA2\u9605\u7BA1\u7406",
|
|
215
|
+
current: "\u5F53\u524D\u8BA2\u9605",
|
|
216
|
+
empty: "\u4F60\u8FD8\u6CA1\u6709\u4EFB\u4F55\u8BA2\u9605"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
amount: string;
|
|
4
|
+
sx?: any;
|
|
5
|
+
};
|
|
6
|
+
declare function PaymentAmount({ amount, sx }: Props): import("react").JSX.Element;
|
|
7
|
+
declare namespace PaymentAmount {
|
|
8
|
+
var defaultProps: {
|
|
9
|
+
sx: {};
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export default PaymentAmount;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
module.exports = PaymentAmount;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
function PaymentAmount({
|
|
10
|
+
amount,
|
|
11
|
+
sx
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
14
|
+
sx: {
|
|
15
|
+
my: 0.5,
|
|
16
|
+
fontWeight: 600,
|
|
17
|
+
fontSize: "2.5rem",
|
|
18
|
+
lineHeight: "1.3",
|
|
19
|
+
letterSpacing: "-0.03rem",
|
|
20
|
+
fontVariantNumeric: "tabular-nums",
|
|
21
|
+
...sx
|
|
22
|
+
},
|
|
23
|
+
children: amount
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
PaymentAmount.defaultProps = {
|
|
27
|
+
sx: {}
|
|
28
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
button?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function PaymentError({ title, description, button }: Props): import("react").JSX.Element;
|
|
8
|
+
declare namespace PaymentError {
|
|
9
|
+
var defaultProps: {
|
|
10
|
+
button: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export default PaymentError;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
module.exports = PaymentError;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
function PaymentError({
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
button
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
15
|
+
sx: {
|
|
16
|
+
height: "100vh"
|
|
17
|
+
},
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
justifyContent: "center",
|
|
20
|
+
children: /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
21
|
+
sx: {
|
|
22
|
+
width: "280px"
|
|
23
|
+
},
|
|
24
|
+
direction: "column",
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
justifyContent: "center",
|
|
27
|
+
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
28
|
+
variant: "h5",
|
|
29
|
+
sx: {
|
|
30
|
+
mb: 2
|
|
31
|
+
},
|
|
32
|
+
children: title
|
|
33
|
+
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
34
|
+
variant: "body1",
|
|
35
|
+
sx: {
|
|
36
|
+
mb: 2,
|
|
37
|
+
textAlign: "center"
|
|
38
|
+
},
|
|
39
|
+
children: description
|
|
40
|
+
}), /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Button, {
|
|
41
|
+
variant: "text",
|
|
42
|
+
size: "small",
|
|
43
|
+
component: _material.Link,
|
|
44
|
+
href: window.blocklet.appUrl,
|
|
45
|
+
children: button
|
|
46
|
+
})]
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
PaymentError.defaultProps = {
|
|
51
|
+
button: "Back"
|
|
52
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
module.exports = CheckoutFooter;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _material = require("@mui/material");
|
|
9
|
+
function CheckoutFooter({
|
|
10
|
+
...props
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
13
|
+
color: "text.secondary",
|
|
14
|
+
fontSize: 12,
|
|
15
|
+
...props,
|
|
16
|
+
children: ["Powered by", " ", /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
17
|
+
component: "span",
|
|
18
|
+
sx: {
|
|
19
|
+
fontWeight: "bold",
|
|
20
|
+
fontSize: 12
|
|
21
|
+
},
|
|
22
|
+
children: "ArcBlock"
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
module.exports = UserButtons;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _SessionManager = _interopRequireDefault(require("@arcblock/did-connect/lib/SessionManager"));
|
|
9
|
+
var _context = require("@arcblock/ux/lib/Locale/context");
|
|
10
|
+
var _selector = _interopRequireDefault(require("@arcblock/ux/lib/Locale/selector"));
|
|
11
|
+
var _material = require("@mui/material");
|
|
12
|
+
var _payment = require("../../contexts/payment");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function UserButtons() {
|
|
15
|
+
const {
|
|
16
|
+
t
|
|
17
|
+
} = (0, _context.useLocaleContext)();
|
|
18
|
+
const {
|
|
19
|
+
session
|
|
20
|
+
} = (0, _payment.usePaymentContext)();
|
|
21
|
+
return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
22
|
+
direction: "row",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "space-between",
|
|
25
|
+
children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_selector.default, {
|
|
26
|
+
showText: false
|
|
27
|
+
}), session.user ? /* @__PURE__ */(0, _jsxRuntime.jsx)(_SessionManager.default, {
|
|
28
|
+
session
|
|
29
|
+
}) : /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Tooltip, {
|
|
30
|
+
title: t("payment.checkout.login"),
|
|
31
|
+
arrow: true,
|
|
32
|
+
children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_SessionManager.default, {
|
|
33
|
+
session
|
|
34
|
+
})
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|