@pisell/private-materials 3.2.6 → 3.2.8

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 (67) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +3 -3
  9. package/es/components/booking/components/footer/index.d.ts +0 -1
  10. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  11. package/es/components/booking/info/index.d.ts +0 -1
  12. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  13. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  14. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  15. package/es/components/eftpos/index.d.ts +0 -1
  16. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  17. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  18. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  19. package/es/components/eftposPay/hooks.d.ts +1 -1
  20. package/es/components/eftposPay/index.d.ts +0 -1
  21. package/es/components/eftposPay/pay.d.ts +0 -1
  22. package/es/components/eftposPay/store/index.d.ts +2 -2
  23. package/es/components/login/index.d.ts +0 -1
  24. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  25. package/es/components/productExtension/index.d.ts +0 -1
  26. package/es/components/ruleSetting/index.d.ts +0 -1
  27. package/es/components/taxSelect/index.d.ts +0 -1
  28. package/es/components/wallet/Detail/index.d.ts +14 -0
  29. package/es/components/wallet/Detail/index.js +139 -23
  30. package/es/components/wallet/Detail/locales.d.ts +24 -0
  31. package/es/components/wallet/Detail/locales.js +27 -3
  32. package/es/components/wallet/components/FooterButtons/index.d.ts +1 -0
  33. package/es/components/wallet/components/FooterButtons/index.js +4 -1
  34. package/es/components/wallet/components/FooterButtons/index.less +17 -1
  35. package/es/components/wallet/locales.d.ts +3 -0
  36. package/es/components/wallet/locales.js +6 -3
  37. package/es/components/walletList/index.js +69 -32
  38. package/lib/components/booking/components/footer/index.d.ts +0 -1
  39. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  40. package/lib/components/booking/info/index.d.ts +0 -1
  41. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  42. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  43. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  44. package/lib/components/eftpos/index.d.ts +0 -1
  45. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  46. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  47. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  48. package/lib/components/eftposPay/hooks.d.ts +1 -1
  49. package/lib/components/eftposPay/index.d.ts +0 -1
  50. package/lib/components/eftposPay/pay.d.ts +0 -1
  51. package/lib/components/eftposPay/store/index.d.ts +2 -2
  52. package/lib/components/login/index.d.ts +0 -1
  53. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  54. package/lib/components/productExtension/index.d.ts +0 -1
  55. package/lib/components/ruleSetting/index.d.ts +0 -1
  56. package/lib/components/taxSelect/index.d.ts +0 -1
  57. package/lib/components/wallet/Detail/index.d.ts +14 -0
  58. package/lib/components/wallet/Detail/index.js +44 -12
  59. package/lib/components/wallet/Detail/locales.d.ts +24 -0
  60. package/lib/components/wallet/Detail/locales.js +27 -3
  61. package/lib/components/wallet/components/FooterButtons/index.d.ts +1 -0
  62. package/lib/components/wallet/components/FooterButtons/index.js +3 -1
  63. package/lib/components/wallet/components/FooterButtons/index.less +17 -1
  64. package/lib/components/wallet/locales.d.ts +3 -0
  65. package/lib/components/wallet/locales.js +6 -3
  66. package/lib/components/walletList/index.js +49 -16
  67. package/package.json +3 -3
@@ -32,16 +32,37 @@ import { WalletCardItem, DEFAULT_CARD_CONFIG } from "./types";
32
32
  // 添加 localStorage 相关的操作函数
33
33
  var STORAGE_KEY = 'pisell_wallet_list_data';
34
34
  var STORAGE_KEY_BALANCE = 'pisell_wallet_balance_data';
35
+
36
+ // 确保localStorage函数在所有环境下都能正确使用
37
+ var safeLocalStorage = {
38
+ getItem: function getItem(key) {
39
+ try {
40
+ return typeof localStorage !== 'undefined' ? localStorage.getItem(key) : null;
41
+ } catch (error) {
42
+ console.error('Error accessing localStorage:', error);
43
+ return null;
44
+ }
45
+ },
46
+ setItem: function setItem(key, value) {
47
+ try {
48
+ if (typeof localStorage !== 'undefined') {
49
+ localStorage.setItem(key, value);
50
+ }
51
+ } catch (error) {
52
+ console.error('Error writing to localStorage:', error);
53
+ }
54
+ }
55
+ };
35
56
  var saveToLocalStorage = function saveToLocalStorage(key, data) {
36
57
  try {
37
- localStorage.setItem(key, JSON.stringify(data));
58
+ safeLocalStorage.setItem(key, JSON.stringify(data));
38
59
  } catch (error) {
39
60
  console.error('Error saving to localStorage:', error);
40
61
  }
41
62
  };
42
63
  var getFromLocalStorage = function getFromLocalStorage(key) {
43
64
  try {
44
- var data = localStorage.getItem(key);
65
+ var data = safeLocalStorage.getItem(key);
45
66
  return data ? JSON.parse(data) : null;
46
67
  } catch (error) {
47
68
  console.error('Error reading from localStorage:', error);
@@ -156,7 +177,6 @@ var WalletList = Provider(function (props) {
156
177
  // 先获取list
157
178
  var _state$list = state.list,
158
179
  list = _state$list === void 0 ? [] : _state$list,
159
- loading = state.loading,
160
180
  error = state.error,
161
181
  authError = state.authError,
162
182
  hasAttempted = state.hasAttempted,
@@ -191,7 +211,6 @@ var WalletList = Provider(function (props) {
191
211
  setState({
192
212
  list: [DEFAULT_WALLET_CARD],
193
213
  balance: DEFAULT_BALANCE,
194
- loading: false,
195
214
  hasAttempted: true,
196
215
  isLoggedIn: false
197
216
  });
@@ -364,7 +383,6 @@ var WalletList = Provider(function (props) {
364
383
  setState({
365
384
  list: [DEFAULT_WALLET_CARD],
366
385
  balance: DEFAULT_BALANCE,
367
- loading: false,
368
386
  hasAttempted: true,
369
387
  isLoggedIn: false
370
388
  });
@@ -376,43 +394,58 @@ var WalletList = Provider(function (props) {
376
394
  }
377
395
  return _context3.abrupt("return");
378
396
  case 9:
379
- // 从 localStorage 获取缓存数据
380
- cachedList = getFromLocalStorage(STORAGE_KEY);
381
- cachedBalance = getFromLocalStorage(STORAGE_KEY_BALANCE); // 如果有缓存数据,先使用缓存数据
397
+ // 从本地缓存获取数据,使用try-catch包裹防止错误
398
+ cachedList = null;
399
+ cachedBalance = null;
400
+ try {
401
+ cachedList = getFromLocalStorage(STORAGE_KEY);
402
+ cachedBalance = getFromLocalStorage(STORAGE_KEY_BALANCE);
403
+ } catch (e) {
404
+ console.error('Error fetching from localStorage:', e);
405
+ }
406
+
407
+ // 如果有缓存数据,先使用缓存数据
382
408
  if (cachedList && cachedBalance) {
383
409
  setState({
384
410
  list: cachedList,
385
411
  balance: cachedBalance,
386
- loading: false,
387
412
  hasAttempted: false
388
413
  });
389
414
  }
390
- _context3.prev = 12;
415
+ _context3.prev = 13;
391
416
  if (isMountedRef.current) {
392
- _context3.next = 15;
417
+ _context3.next = 16;
393
418
  break;
394
419
  }
395
420
  return _context3.abrupt("return");
396
- case 15:
397
- _context3.next = 17;
421
+ case 16:
422
+ _context3.next = 18;
398
423
  return Promise.all([getWalletList(), getWalletBalance()]);
399
- case 17:
424
+ case 18:
400
425
  _yield$Promise$all = _context3.sent;
401
426
  _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2);
402
427
  walletListData = _yield$Promise$all2[0];
403
428
  walletBalanceData = _yield$Promise$all2[1];
404
429
  if (!(!isMountedRef.current || requestIdRef.current !== requestId)) {
405
- _context3.next = 23;
430
+ _context3.next = 24;
406
431
  break;
407
432
  }
408
433
  return _context3.abrupt("return");
409
- case 23:
434
+ case 24:
410
435
  // 如果获取到有效数据,保存到 localStorage
411
436
  if (walletListData && walletListData.length > 0) {
412
- saveToLocalStorage(STORAGE_KEY, walletListData);
437
+ try {
438
+ saveToLocalStorage(STORAGE_KEY, walletListData);
439
+ } catch (e) {
440
+ console.error('Error saving wallet list to localStorage:', e);
441
+ }
413
442
  }
414
443
  if (walletBalanceData) {
415
- saveToLocalStorage(STORAGE_KEY_BALANCE, walletBalanceData);
444
+ try {
445
+ saveToLocalStorage(STORAGE_KEY_BALANCE, walletBalanceData);
446
+ } catch (e) {
447
+ console.error('Error saving wallet balance to localStorage:', e);
448
+ }
416
449
  }
417
450
 
418
451
  // 添加判断逻辑:如果walletBalanceData为空或walletListData为空,2秒后重试
@@ -442,7 +475,11 @@ var WalletList = Provider(function (props) {
442
475
  case 8:
443
476
  retryBalanceData = _context2.sent;
444
477
  if (retryBalanceData) {
445
- saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
478
+ try {
479
+ saveToLocalStorage(STORAGE_KEY_BALANCE, retryBalanceData);
480
+ } catch (e) {
481
+ console.error('Error saving retry balance to localStorage:', e);
482
+ }
446
483
  }
447
484
  case 10:
448
485
  if (!(Array.isArray(walletListData) && walletListData.length === 0)) {
@@ -454,14 +491,17 @@ var WalletList = Provider(function (props) {
454
491
  case 13:
455
492
  retryListData = _context2.sent;
456
493
  if (retryListData && retryListData.length > 0) {
457
- saveToLocalStorage(STORAGE_KEY, retryListData);
494
+ try {
495
+ saveToLocalStorage(STORAGE_KEY, retryListData);
496
+ } catch (e) {
497
+ console.error('Error saving retry list to localStorage:', e);
498
+ }
458
499
  }
459
500
  case 15:
460
501
  // 更新状态
461
502
  setState({
462
503
  list: retryListData || [],
463
504
  balance: retryBalanceData,
464
- loading: false,
465
505
  hasAttempted: true
466
506
  });
467
507
  _context2.next = 21;
@@ -473,7 +513,6 @@ var WalletList = Provider(function (props) {
473
513
  setState({
474
514
  list: walletListData || [],
475
515
  balance: walletBalanceData,
476
- loading: false,
477
516
  hasAttempted: true
478
517
  });
479
518
  case 21:
@@ -487,34 +526,32 @@ var WalletList = Provider(function (props) {
487
526
  setState({
488
527
  list: walletListData || [],
489
528
  balance: walletBalanceData,
490
- loading: false,
491
529
  hasAttempted: true
492
530
  });
493
531
  }
494
- _context3.next = 34;
532
+ _context3.next = 35;
495
533
  break;
496
- case 28:
497
- _context3.prev = 28;
498
- _context3.t0 = _context3["catch"](12);
534
+ case 29:
535
+ _context3.prev = 29;
536
+ _context3.t0 = _context3["catch"](13);
499
537
  if (!(!isMountedRef.current || requestIdRef.current !== requestId)) {
500
- _context3.next = 32;
538
+ _context3.next = 33;
501
539
  break;
502
540
  }
503
541
  return _context3.abrupt("return");
504
- case 32:
542
+ case 33:
505
543
  // 判断是否是登录超时错误
506
544
  isAuthError = (_context3.t0 === null || _context3.t0 === void 0 ? void 0 : _context3.t0.code) === 4001 || (_context3.t0 === null || _context3.t0 === void 0 || (_message = _context3.t0.message) === null || _message === void 0 ? void 0 : _message.includes('login time out')) || (_context3.t0 === null || _context3.t0 === void 0 || (_data = _context3.t0.data) === null || _data === void 0 ? void 0 : _data.code) === 4001;
507
545
  setState({
508
- loading: false,
509
546
  error: _context3.t0 instanceof Error ? _context3.t0 : new Error('加载失败'),
510
547
  authError: isAuthError,
511
548
  hasAttempted: true
512
549
  });
513
- case 34:
550
+ case 35:
514
551
  case "end":
515
552
  return _context3.stop();
516
553
  }
517
- }, _callee3, null, [[12, 28]]);
554
+ }, _callee3, null, [[13, 29]]);
518
555
  }));
519
556
  return function initData(_x) {
520
557
  return _ref3.apply(this, arguments);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type ContactType = {
4
3
  country_calling_code: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos, DeviceStatus } from './const';
3
2
  import './index.less';
4
3
  interface PosProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
4
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ActionProps } from '../../const';
3
2
  /**
4
3
  * @title: 支付状态未知页面
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "payo" | "windcave" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps } from './const';
3
2
  import './index.less';
4
3
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps } from './const';
3
2
  import './index.less';
4
3
  /**
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "tyro" | "payo" | "windcave" | "stripe" | undefined;
301
+ action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export interface LoginProps {
4
3
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PopoverProps } from 'antd';
3
2
  import { CustomerCardProps } from './CustomerCard';
4
3
  import './index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface ProductExtensionProps {
4
3
  onDataChange: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface RuleSettingProps {
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  import "./index.less";
4
3
  interface TaxSelectProps {
@@ -1,5 +1,19 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
+ declare global {
4
+ interface Window {
5
+ PKPass?: any;
6
+ GoogleWalletPass?: any;
7
+ }
8
+ interface Navigator {
9
+ pkpass?: {
10
+ addPass(pass: any): Promise<string>;
11
+ };
12
+ googlewallet?: {
13
+ addPass(pass: any): Promise<string>;
14
+ };
15
+ }
16
+ }
3
17
  interface DetailProps {
4
18
  detail: {
5
19
  id?: string;
@@ -88,6 +88,8 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
88
88
  const [isScrolling, setIsScrolling] = (0, import_react.useState)(false);
89
89
  const isUserClickRef = (0, import_react.useRef)(false);
90
90
  const scrollTimeoutRef = (0, import_react.useRef)(null);
91
+ const [addWalletLoading, setAddWalletLoading] = (0, import_react.useState)(false);
92
+ const [isAddingToWallet, setIsAddingToWallet] = (0, import_react.useState)(false);
91
93
  const anchorOptions = (0, import_react.useMemo)(
92
94
  () => {
93
95
  const options = [
@@ -246,24 +248,53 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
246
248
  getTimeTreeList();
247
249
  }
248
250
  }, [code]);
249
- const onAppleClick = () => {
250
- if (isWechat()) {
251
- setWechatModalOpen(true);
252
- setCopyUrl(apple_wallet_url);
253
- return;
251
+ const addWalletPass = async (url, type) => {
252
+ if (!url) {
253
+ (0, import_materials2.PisellToast)({
254
+ content: import_utils.locales.getText("page.wallet.urlEmpty") || "钱包链接为空",
255
+ duration: 2
256
+ });
257
+ return false;
254
258
  }
255
- window.open(apple_wallet_url, "_blank");
256
- };
257
- const onGoogleClick = () => {
258
259
  if (isWechat()) {
259
260
  setWechatModalOpen(true);
260
- setCopyUrl(google_wallet_url);
261
- return;
261
+ setCopyUrl(url);
262
+ return false;
262
263
  }
263
- if (google_wallet_url) {
264
- window.open(google_wallet_url);
264
+ setAddWalletLoading(true);
265
+ try {
266
+ if (type === "apple") {
267
+ const response = await fetch(url);
268
+ if (!response.ok) {
269
+ throw new Error(`HTTP error! status: ${response.status}`);
270
+ }
271
+ const passData = await response.arrayBuffer();
272
+ const blob = new Blob([passData], { type: "application/vnd.apple.pkpass" });
273
+ const downloadUrl = URL.createObjectURL(blob);
274
+ const a = document.createElement("a");
275
+ a.href = downloadUrl;
276
+ a.download = "pass.pkpass";
277
+ a.click();
278
+ URL.revokeObjectURL(downloadUrl);
279
+ } else {
280
+ window.open(url);
281
+ }
282
+ } catch (error) {
283
+ console.error("Failed to add wallet:", error);
284
+ (0, import_materials2.PisellToast)({
285
+ content: import_utils.locales.getText("page.wallet.error.addFailed"),
286
+ duration: 3
287
+ });
288
+ } finally {
289
+ setAddWalletLoading(false);
265
290
  }
266
291
  };
292
+ const onAppleClick = async () => {
293
+ await addWalletPass(apple_wallet_url, "apple");
294
+ };
295
+ const onGoogleClick = async () => {
296
+ await addWalletPass(google_wallet_url, "google");
297
+ };
267
298
  const isWechat = () => {
268
299
  return /MicroMessenger/i.test(window.navigator.userAgent);
269
300
  };
@@ -594,6 +625,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
594
625
  import_components.FooterButtons,
595
626
  {
596
627
  step: "detail",
628
+ addWalletLoading,
597
629
  onAppleWalletClick: tag === "gift_card" ? addWalletCard : void 0,
598
630
  onRechargeClick: tag === "gift_card" && ((_j = detail == null ? void 0 : detail.machinecode_config) == null ? void 0 : _j.hide_recharge) === 0 ? handleRecharge : void 0,
599
631
  platform,
@@ -21,6 +21,14 @@ declare const _default: {
21
21
  'page.wallet.addGoogle': string;
22
22
  'page.wallet.viewDetails': string;
23
23
  'page.wallet.expireDate': string;
24
+ 'page.wallet.urlEmpty': string;
25
+ 'page.wallet.notIOS': string;
26
+ 'page.wallet.addSuccess': string;
27
+ 'page.wallet.addFailed': string;
28
+ 'page.wallet.useAppleInstead': string;
29
+ 'page.wallet.openedInBrowser': string;
30
+ 'page.wallet.openFailed': string;
31
+ 'page.wallet.loading': string;
24
32
  };
25
33
  'zh-CN': {
26
34
  'page.wallet.copyTitle': string;
@@ -44,6 +52,14 @@ declare const _default: {
44
52
  'page.wallet.addGoogle': string;
45
53
  'page.wallet.viewDetails': string;
46
54
  'page.wallet.expireDate': string;
55
+ 'page.wallet.urlEmpty': string;
56
+ 'page.wallet.notIOS': string;
57
+ 'page.wallet.addSuccess': string;
58
+ 'page.wallet.addFailed': string;
59
+ 'page.wallet.useAppleInstead': string;
60
+ 'page.wallet.openedInBrowser': string;
61
+ 'page.wallet.openFailed': string;
62
+ 'page.wallet.loading': string;
47
63
  };
48
64
  'zh-HK': {
49
65
  'page.wallet.copyTitle': string;
@@ -67,6 +83,14 @@ declare const _default: {
67
83
  'page.wallet.addGoogle': string;
68
84
  'page.wallet.viewDetails': string;
69
85
  'page.wallet.expireDate': string;
86
+ 'page.wallet.urlEmpty': string;
87
+ 'page.wallet.notIOS': string;
88
+ 'page.wallet.addSuccess': string;
89
+ 'page.wallet.addFailed': string;
90
+ 'page.wallet.useAppleInstead': string;
91
+ 'page.wallet.openedInBrowser': string;
92
+ 'page.wallet.openFailed': string;
93
+ 'page.wallet.loading': string;
70
94
  };
71
95
  };
72
96
  export default _default;
@@ -47,7 +47,15 @@ var locales_default = {
47
47
  "page.wallet.addIos": "Add to Apple Wallet",
48
48
  "page.wallet.addGoogle": "Add to Google Wallet",
49
49
  "page.wallet.viewDetails": "See details",
50
- "page.wallet.expireDate": "Long term"
50
+ "page.wallet.expireDate": "Long term",
51
+ "page.wallet.urlEmpty": "Wallet link is empty",
52
+ "page.wallet.notIOS": "Apple Wallet is not supported on non-iOS devices",
53
+ "page.wallet.addSuccess": "Successfully added to wallet",
54
+ "page.wallet.addFailed": "Failed to add to wallet",
55
+ "page.wallet.useAppleInstead": "You are using an iOS device, would you like to use Apple Wallet instead of Google Wallet?",
56
+ "page.wallet.openedInBrowser": "Opened in browser",
57
+ "page.wallet.openFailed": "Failed to open wallet link",
58
+ "page.wallet.loading": "Loading wallet..."
51
59
  },
52
60
  "zh-CN": {
53
61
  // 简体中文翻译
@@ -73,7 +81,15 @@ var locales_default = {
73
81
  "page.wallet.addIos": "添加到苹果钱包",
74
82
  "page.wallet.addGoogle": "添加到谷歌钱包",
75
83
  "page.wallet.viewDetails": "查看详情",
76
- "page.wallet.expireDate": "长期"
84
+ "page.wallet.expireDate": "长期",
85
+ "page.wallet.urlEmpty": "钱包链接为空",
86
+ "page.wallet.notIOS": "非iOS设备不支持Apple Wallet",
87
+ "page.wallet.addSuccess": "已成功添加到钱包",
88
+ "page.wallet.addFailed": "添加钱包失败",
89
+ "page.wallet.useAppleInstead": "您正在使用iOS设备,是否使用Apple Wallet代替Google Wallet?",
90
+ "page.wallet.openedInBrowser": "已在浏览器中打开",
91
+ "page.wallet.openFailed": "打开钱包链接失败",
92
+ "page.wallet.loading": "正在加载钱包..."
77
93
  },
78
94
  "zh-HK": {
79
95
  // 繁体中文翻译
@@ -99,6 +115,14 @@ var locales_default = {
99
115
  "page.wallet.addIos": "添加到蘋果錢包",
100
116
  "page.wallet.addGoogle": "添加到谷歌錢包",
101
117
  "page.wallet.viewDetails": "查看詳情",
102
- "page.wallet.expireDate": "長期"
118
+ "page.wallet.expireDate": "長期",
119
+ "page.wallet.urlEmpty": "錢包連結為空",
120
+ "page.wallet.notIOS": "非iOS設備不支持Apple Wallet",
121
+ "page.wallet.addSuccess": "已成功添加到錢包",
122
+ "page.wallet.addFailed": "添加錢包失敗",
123
+ "page.wallet.useAppleInstead": "您正在使用iOS設備,是否使用Apple Wallet代替Google Wallet?",
124
+ "page.wallet.openedInBrowser": "已在瀏覽器中打開",
125
+ "page.wallet.openFailed": "打開錢包連結失敗",
126
+ "page.wallet.loading": "正在加載錢包..."
103
127
  }
104
128
  };
@@ -8,6 +8,7 @@ export interface FooterButtonsProps {
8
8
  disabled?: boolean;
9
9
  platform?: 'pc' | 'h5';
10
10
  isIOS?: boolean;
11
+ addWalletLoading?: boolean;
11
12
  }
12
13
  /**
13
14
  * 通用底部按钮组件
@@ -43,7 +43,8 @@ var FooterButtons = ({
43
43
  onAddClick,
44
44
  disabled = false,
45
45
  platform = "h5",
46
- isIOS = false
46
+ isIOS = false,
47
+ addWalletLoading = false
47
48
  }) => {
48
49
  if (platform === "pc") {
49
50
  return null;
@@ -69,6 +70,7 @@ var FooterButtons = ({
69
70
  /* @__PURE__ */ import_react.default.createElement(
70
71
  import_antd.Button,
71
72
  {
73
+ loading: addWalletLoading,
72
74
  key: "apple-wallet",
73
75
  onClick: onAppleWalletClick,
74
76
  disabled,
@@ -11,7 +11,23 @@
11
11
  display: flex;
12
12
  gap: 12px;
13
13
  width: 100%;
14
-
14
+
15
+
16
+ .wallet-footer-buttons-item-secondary{
17
+ overflow: hidden;
18
+ display: flex;
19
+ >span{
20
+ display: block;
21
+ // width: 100%;
22
+ flex:1;
23
+ white-space: nowrap;
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ text-wrap: nowrap;
27
+ }
28
+ }
29
+
30
+
15
31
  // 按钮数量样式
16
32
  // 单个按钮占满宽度
17
33
  &-count-1 {
@@ -39,6 +39,7 @@ declare const _default: {
39
39
  'page.wallet.button.addToAppleWallet': string;
40
40
  'page.wallet.button.addToGoogleWallet': string;
41
41
  'page.wallet.button.recharge': string;
42
+ 'page.wallet.error.addFailed': string;
42
43
  };
43
44
  'zh-CN': {
44
45
  'page.wallet.rechargeableCard': string;
@@ -80,6 +81,7 @@ declare const _default: {
80
81
  'page.wallet.button.addToAppleWallet': string;
81
82
  'page.wallet.button.addToGoogleWallet': string;
82
83
  'page.wallet.button.recharge': string;
84
+ 'page.wallet.error.addFailed': string;
83
85
  };
84
86
  'zh-HK': {
85
87
  'page.wallet.rechargeableCard': string;
@@ -121,6 +123,7 @@ declare const _default: {
121
123
  'page.wallet.button.addToAppleWallet': string;
122
124
  'page.wallet.button.addToGoogleWallet': string;
123
125
  'page.wallet.button.recharge': string;
126
+ 'page.wallet.error.addFailed': string;
124
127
  };
125
128
  };
126
129
  export default _default;
@@ -65,7 +65,8 @@ var locales_default = {
65
65
  "page.wallet.button.add": "Add",
66
66
  "page.wallet.button.addToAppleWallet": "Add to Apple Wallet",
67
67
  "page.wallet.button.addToGoogleWallet": "Add to Google Wallet",
68
- "page.wallet.button.recharge": "Recharge"
68
+ "page.wallet.button.recharge": "Recharge",
69
+ "page.wallet.error.addFailed": "Add failed, please try again."
69
70
  },
70
71
  "zh-CN": {
71
72
  // Simplified Chinese translations
@@ -109,7 +110,8 @@ var locales_default = {
109
110
  "page.wallet.button.add": "添加",
110
111
  "page.wallet.button.addToAppleWallet": "添加到苹果钱包",
111
112
  "page.wallet.button.addToGoogleWallet": "添加到Google钱包",
112
- "page.wallet.button.recharge": "充值"
113
+ "page.wallet.button.recharge": "充值",
114
+ "page.wallet.error.addFailed": "添加钱包失败,请重试。"
113
115
  },
114
116
  "zh-HK": {
115
117
  "page.wallet.rechargeableCard": "充值卡",
@@ -152,6 +154,7 @@ var locales_default = {
152
154
  "page.wallet.button.add": "添加",
153
155
  "page.wallet.button.addToAppleWallet": "添加到蘋果錢包",
154
156
  "page.wallet.button.addToGoogleWallet": "添加到Google錢包",
155
- "page.wallet.button.recharge": "充值"
157
+ "page.wallet.button.recharge": "充值",
158
+ "page.wallet.error.addFailed": "添加錢包失敗,請重試。"
156
159
  }
157
160
  };