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