best-unit 2.0.17 → 2.1.4

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/src/demo/App.tsx CHANGED
@@ -46,7 +46,8 @@ export default function DemoApp() {
46
46
  env: env ?? currentEnv,
47
47
  size: Size.SMALL,
48
48
  biz_type: "fulfill",
49
- // themeConfig: {
49
+ merchant_id: "1128",
50
+ // theme_config: {
50
51
  // white: {
51
52
  // color: "red",
52
53
  // },
@@ -152,8 +153,8 @@ export default function DemoApp() {
152
153
  currentLocale === "zh"
153
154
  ? "#1890ff"
154
155
  : isDark
155
- ? "#23262F"
156
- : "#fff",
156
+ ? "#23262F"
157
+ : "#fff",
157
158
  color:
158
159
  currentLocale === "zh" ? "#fff" : isDark ? "#F5F6FA" : "#333",
159
160
  border: "1px solid #1890ff",
@@ -172,8 +173,8 @@ export default function DemoApp() {
172
173
  currentLocale === "en"
173
174
  ? "#1890ff"
174
175
  : isDark
175
- ? "#23262F"
176
- : "#fff",
176
+ ? "#23262F"
177
+ : "#fff",
177
178
  color:
178
179
  currentLocale === "en" ? "#fff" : isDark ? "#F5F6FA" : "#333",
179
180
  border: "1px solid #1890ff",
@@ -210,14 +211,14 @@ export default function DemoApp() {
210
211
  currentTheme === Theme.WHITE
211
212
  ? "#1890ff"
212
213
  : isDark
213
- ? "#23262F"
214
- : "#fff",
214
+ ? "#23262F"
215
+ : "#fff",
215
216
  color:
216
217
  currentTheme === Theme.WHITE
217
218
  ? "#fff"
218
219
  : isDark
219
- ? "#F5F6FA"
220
- : "#333",
220
+ ? "#F5F6FA"
221
+ : "#333",
221
222
  border: "1px solid #1890ff",
222
223
  borderRadius: 6,
223
224
  cursor: "pointer",
@@ -235,14 +236,14 @@ export default function DemoApp() {
235
236
  currentTheme === Theme.DARK
236
237
  ? "#1890ff"
237
238
  : isDark
238
- ? "#23262F"
239
- : "#fff",
239
+ ? "#23262F"
240
+ : "#fff",
240
241
  color:
241
242
  currentTheme === Theme.DARK
242
243
  ? "#fff"
243
244
  : isDark
244
- ? "#F5F6FA"
245
- : "#333",
245
+ ? "#F5F6FA"
246
+ : "#333",
246
247
  border: "1px solid #1890ff",
247
248
  borderRadius: 6,
248
249
  cursor: "pointer",
@@ -315,8 +316,8 @@ export default function DemoApp() {
315
316
  {currentEnv === "dev"
316
317
  ? "开发环境"
317
318
  : currentEnv === "test"
318
- ? "测试环境"
319
- : "生产环境"}
319
+ ? "测试环境"
320
+ : "生产环境"}
320
321
  </div>
321
322
  </div>
322
323
 
package/src/local/en.ts CHANGED
@@ -103,6 +103,10 @@ export const en: Record<string, string> = {
103
103
  转账后提交银行回单提示:
104
104
  "Please make sure to submit the bank transaction slip after the transfer, otherwise the payment may not be verified in time",
105
105
  温馨提示: "Friendly Reminder",
106
+ "我们强烈建议,转账时在备注中输入您的ID:":
107
+ "We strongly recommend that you enter your ID: ",
108
+ "。这可以": " in the payment memo when transferring. This will ",
109
+ 加速资金审核: "speed up the fund verification process",
106
110
  "创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码":
107
111
  "Do not include sensitive notes when creating a payment (e.g., “topup ads”, “order”). We recommend using a numeric code instead.",
108
112
  "请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。":
@@ -127,6 +131,13 @@ export const en: Record<string, string> = {
127
131
  提交审核: "Submit for Review",
128
132
  请选择转账时间: "Please select transfer time",
129
133
  请输入转账金额: "Please enter transfer amount",
134
+ 是否使用资金分配: "Use fund allocation",
135
+ 是: "Yes",
136
+ 否: "No",
137
+ 请输入子业务占比: "Please enter the sub-business percentage",
138
+ "子业务占比总和必须为100%":
139
+ "The total sub-business percentage must equal 100%",
140
+ "must total 100%": "must total 100%",
130
141
 
131
142
  // Date picker related
132
143
  请选择日期: "Please select date",
package/src/local/zh.ts CHANGED
@@ -73,6 +73,9 @@ export const zh: Record<string, string> = {
73
73
  确认转账详情: "确认转账详情",
74
74
  转账后提交银行回单提示: "请在转账后提交银行回单,否则可能无法及时核验",
75
75
  温馨提示: "温馨提示",
76
+ "我们强烈建议,转账时在备注中输入您的ID:": "我们强烈建议,转账时在备注中输入您的ID:",
77
+ "。这可以": "。这可以",
78
+ 加速资金审核: "加速资金审核",
76
79
  "创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码": "创建付款时请勿填写敏感备注,例如:topup ads、order等、建议填写数字代码",
77
80
  "请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。": "请填写正确的支付金额、币种、支付时间,相同的交易请勿重复提交。",
78
81
  "请上传交易凭证,否则无法核验并及时添加余额。": "请上传交易凭证,否则无法核验并及时添加余额。",
@@ -91,6 +94,12 @@ export const zh: Record<string, string> = {
91
94
  提交审核: "提交审核",
92
95
  请选择转账时间: "请选择转账时间",
93
96
  请输入转账金额: "请输入转账金额",
97
+ 是否使用资金分配: "是否使用资金分配",
98
+ 是: "是",
99
+ 否: "否",
100
+ 请输入子业务占比: "请输入子业务占比",
101
+ "子业务占比总和必须为100%": "子业务占比总和必须为100%",
102
+ "must total 100%": "总和必须为100%",
94
103
 
95
104
  // 日期选择器相关
96
105
  请选择日期: "请选择日期",
@@ -49,7 +49,7 @@ export interface InitParams {
49
49
  locale?: Locale;
50
50
  env: Env;
51
51
  size?: Size;
52
- themeConfig?: ThemeConfig;
52
+ theme_config?: ThemeConfig;
53
53
  }
54
54
 
55
55
  export interface ThemeConfig {
@@ -81,7 +81,7 @@ export declare function initFundUnit(params: {
81
81
  locale?: Locale;
82
82
  env: Env;
83
83
  size?: Size;
84
- themeConfig?: ThemeConfig;
84
+ theme_config?: ThemeConfig;
85
85
  }): {
86
86
  token: string;
87
87
  merchantId?: string;
@@ -91,7 +91,7 @@ export declare function initFundUnit(params: {
91
91
  locale: Locale;
92
92
  env: Env;
93
93
  size?: Size;
94
- themeConfig?: ThemeConfig;
94
+ theme_config?: ThemeConfig;
95
95
  };
96
96
 
97
97
  export declare function getBalanceData(): Promise<BalanceData>;
@@ -120,7 +120,7 @@ declare global {
120
120
  locale?: "zh" | "en";
121
121
  theme?: Theme;
122
122
  size?: Size;
123
- themeConfig?: ThemeConfig;
123
+ theme_config?: ThemeConfig;
124
124
  env: Env;
125
125
  }) => void;
126
126
  getBalanceData: () => any;
@@ -38,7 +38,7 @@ export interface InitParams {
38
38
  locale?: Locale;
39
39
  env: Env;
40
40
  size?: Size;
41
- themeConfig?: ThemeConfig;
41
+ theme_config?: ThemeConfig;
42
42
  }
43
43
 
44
44
  // 获取余额数据并暴露给外部系统
@@ -61,7 +61,7 @@ export function initFundUnit(params: InitParams) {
61
61
  locale = Locale.ZH,
62
62
  env,
63
63
  size,
64
- themeConfig,
64
+ theme_config,
65
65
  } = params;
66
66
  console.log(params, "InitParams1111");
67
67
  const token = "Bearer " + params.token;
@@ -77,7 +77,7 @@ export function initFundUnit(params: InitParams) {
77
77
  locale,
78
78
  env,
79
79
  size,
80
- themeConfig,
80
+ themeConfig: theme_config,
81
81
  })
82
82
  );
83
83
  // 重置 axios 实例,确保使用新的配置