@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
@@ -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;
@@ -24,6 +24,9 @@ import { request } from "./../../../utils";
24
24
  import { WalletBar, FooterButtons } from "../components";
25
25
  import "./index.less";
26
26
  var Text = Typography.Text;
27
+
28
+ // 为Web PKI API添加TypeScript声明
29
+
27
30
  dayjs.extend(timezone);
28
31
  dayjs.extend(utc);
29
32
  var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
@@ -111,6 +114,14 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
111
114
  setIsScrolling = _useState24[1];
112
115
  var isUserClickRef = useRef(false);
113
116
  var scrollTimeoutRef = useRef(null);
117
+ var _useState25 = useState(false),
118
+ _useState26 = _slicedToArray(_useState25, 2),
119
+ addWalletLoading = _useState26[0],
120
+ setAddWalletLoading = _useState26[1];
121
+ var _useState27 = useState(false),
122
+ _useState28 = _slicedToArray(_useState27, 2),
123
+ isAddingToWallet = _useState28[0],
124
+ setIsAddingToWallet = _useState28[1];
114
125
  var anchorOptions = useMemo(function () {
115
126
  // 始终包含detail选项
116
127
  var options = [{
@@ -308,7 +319,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
308
319
 
309
320
  // 如果是积分卡 移除掉2024-8-10之前的数据
310
321
  if (((_filterList$i3 = filterList[i]) === null || _filterList$i3 === void 0 ? void 0 : _filterList$i3.tag) === 'point_card' && dayjs.tz((_filterList$i4 = filterList[i]) === null || _filterList$i4 === void 0 ? void 0 : _filterList$i4.created_at, timezone).unix() < stateTimeUnix) {
311
- filterList.splice(i, 1); // 移除当前索引的元素
322
+ filterList.splice(i, 1); // 移除当前索引的元素
312
323
  }
313
324
  }
314
325
  setTimeLineData(formatTimeLineDta(filterList));
@@ -337,24 +348,128 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
337
348
  getTimeTreeList();
338
349
  }
339
350
  }, [code]);
340
- var onAppleClick = function onAppleClick() {
341
- if (isWechat()) {
342
- setWechatModalOpen(true);
343
- setCopyUrl(apple_wallet_url);
344
- return;
345
- }
346
- window.open(apple_wallet_url, '_blank');
347
- };
348
- var onGoogleClick = function onGoogleClick() {
349
- if (isWechat()) {
350
- setWechatModalOpen(true);
351
- setCopyUrl(google_wallet_url);
352
- return;
353
- }
354
- if (google_wallet_url) {
355
- window.open(google_wallet_url);
356
- }
357
- };
351
+ /**
352
+ * 添加钱包卡片的公共函数
353
+ * @param url 钱包卡片URL
354
+ * @param type 钱包类型('apple'或'google')
355
+ * @returns Promise<boolean> 是否添加成功
356
+ */
357
+ var addWalletPass = /*#__PURE__*/function () {
358
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, type) {
359
+ var response, passData, blob, downloadUrl, a;
360
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
361
+ while (1) switch (_context3.prev = _context3.next) {
362
+ case 0:
363
+ if (url) {
364
+ _context3.next = 3;
365
+ break;
366
+ }
367
+ PisellToast({
368
+ content: locales.getText('page.wallet.urlEmpty') || '钱包链接为空',
369
+ duration: 2
370
+ });
371
+ return _context3.abrupt("return", false);
372
+ case 3:
373
+ if (!isWechat()) {
374
+ _context3.next = 7;
375
+ break;
376
+ }
377
+ setWechatModalOpen(true);
378
+ setCopyUrl(url);
379
+ return _context3.abrupt("return", false);
380
+ case 7:
381
+ setAddWalletLoading(true);
382
+ _context3.prev = 8;
383
+ if (!(type === 'apple')) {
384
+ _context3.next = 27;
385
+ break;
386
+ }
387
+ _context3.next = 12;
388
+ return fetch(url);
389
+ case 12:
390
+ response = _context3.sent;
391
+ if (response.ok) {
392
+ _context3.next = 15;
393
+ break;
394
+ }
395
+ throw new Error("HTTP error! status: ".concat(response.status));
396
+ case 15:
397
+ _context3.next = 17;
398
+ return response.arrayBuffer();
399
+ case 17:
400
+ passData = _context3.sent;
401
+ blob = new Blob([passData], {
402
+ type: 'application/vnd.apple.pkpass'
403
+ });
404
+ downloadUrl = URL.createObjectURL(blob);
405
+ a = document.createElement('a');
406
+ a.href = downloadUrl;
407
+ a.download = 'pass.pkpass';
408
+ a.click();
409
+ URL.revokeObjectURL(downloadUrl); // 清理创建的URL
410
+ _context3.next = 28;
411
+ break;
412
+ case 27:
413
+ window.open(url);
414
+ case 28:
415
+ _context3.next = 34;
416
+ break;
417
+ case 30:
418
+ _context3.prev = 30;
419
+ _context3.t0 = _context3["catch"](8);
420
+ console.error('Failed to add wallet:', _context3.t0);
421
+ PisellToast({
422
+ content: locales.getText('page.wallet.error.addFailed'),
423
+ duration: 3
424
+ });
425
+ case 34:
426
+ _context3.prev = 34;
427
+ setAddWalletLoading(false);
428
+ return _context3.finish(34);
429
+ case 37:
430
+ case "end":
431
+ return _context3.stop();
432
+ }
433
+ }, _callee3, null, [[8, 30, 34, 37]]);
434
+ }));
435
+ return function addWalletPass(_x, _x2) {
436
+ return _ref4.apply(this, arguments);
437
+ };
438
+ }();
439
+ var onAppleClick = /*#__PURE__*/function () {
440
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
441
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
442
+ while (1) switch (_context4.prev = _context4.next) {
443
+ case 0:
444
+ _context4.next = 2;
445
+ return addWalletPass(apple_wallet_url, 'apple');
446
+ case 2:
447
+ case "end":
448
+ return _context4.stop();
449
+ }
450
+ }, _callee4);
451
+ }));
452
+ return function onAppleClick() {
453
+ return _ref5.apply(this, arguments);
454
+ };
455
+ }();
456
+ var onGoogleClick = /*#__PURE__*/function () {
457
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
458
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
459
+ while (1) switch (_context5.prev = _context5.next) {
460
+ case 0:
461
+ _context5.next = 2;
462
+ return addWalletPass(google_wallet_url, 'google');
463
+ case 2:
464
+ case "end":
465
+ return _context5.stop();
466
+ }
467
+ }, _callee5);
468
+ }));
469
+ return function onGoogleClick() {
470
+ return _ref6.apply(this, arguments);
471
+ };
472
+ }();
358
473
  var isWechat = function isWechat() {
359
474
  return /MicroMessenger/i.test(window.navigator.userAgent);
360
475
  };
@@ -597,10 +712,10 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
597
712
 
598
713
  // 添加ref用于获取容器元素
599
714
  var detailWrapperRef = useRef(null);
600
- var _useState25 = useState(undefined),
601
- _useState26 = _slicedToArray(_useState25, 2),
602
- contentHeight = _useState26[0],
603
- setContentHeight = _useState26[1];
715
+ var _useState29 = useState(undefined),
716
+ _useState30 = _slicedToArray(_useState29, 2),
717
+ contentHeight = _useState30[0],
718
+ setContentHeight = _useState30[1];
604
719
 
605
720
  // 添加锚点导航ref
606
721
  var anchorWrapperRef = useRef(null);
@@ -768,6 +883,7 @@ var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
768
883
  className: "wallet-detail-card-content-section-empty"
769
884
  }, /*#__PURE__*/React.createElement(PisellEmpty, null))))))), platform === 'h5' && /*#__PURE__*/React.createElement(FooterButtons, {
770
885
  step: "detail",
886
+ addWalletLoading: addWalletLoading,
771
887
  onAppleWalletClick: tag === 'gift_card' ? addWalletCard : undefined,
772
888
  onRechargeClick: tag === 'gift_card' && (detail === null || detail === void 0 || (_detail$machinecode_c = detail.machinecode_config) === null || _detail$machinecode_c === void 0 ? void 0 : _detail$machinecode_c.hide_recharge) === 0 ? handleRecharge : undefined,
773
889
  platform: 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;
@@ -23,7 +23,15 @@ export default {
23
23
  'page.wallet.addIos': 'Add to Apple Wallet',
24
24
  'page.wallet.addGoogle': 'Add to Google Wallet',
25
25
  'page.wallet.viewDetails': 'See details',
26
- 'page.wallet.expireDate': 'Long term'
26
+ 'page.wallet.expireDate': 'Long term',
27
+ 'page.wallet.urlEmpty': 'Wallet link is empty',
28
+ 'page.wallet.notIOS': 'Apple Wallet is not supported on non-iOS devices',
29
+ 'page.wallet.addSuccess': 'Successfully added to wallet',
30
+ 'page.wallet.addFailed': 'Failed to add to wallet',
31
+ 'page.wallet.useAppleInstead': 'You are using an iOS device, would you like to use Apple Wallet instead of Google Wallet?',
32
+ 'page.wallet.openedInBrowser': 'Opened in browser',
33
+ 'page.wallet.openFailed': 'Failed to open wallet link',
34
+ 'page.wallet.loading': 'Loading wallet...'
27
35
  },
28
36
  'zh-CN': {
29
37
  // 简体中文翻译
@@ -49,7 +57,15 @@ export default {
49
57
  'page.wallet.addIos': '添加到苹果钱包',
50
58
  'page.wallet.addGoogle': '添加到谷歌钱包',
51
59
  'page.wallet.viewDetails': '查看详情',
52
- 'page.wallet.expireDate': '长期'
60
+ 'page.wallet.expireDate': '长期',
61
+ 'page.wallet.urlEmpty': '钱包链接为空',
62
+ 'page.wallet.notIOS': '非iOS设备不支持Apple Wallet',
63
+ 'page.wallet.addSuccess': '已成功添加到钱包',
64
+ 'page.wallet.addFailed': '添加钱包失败',
65
+ 'page.wallet.useAppleInstead': '您正在使用iOS设备,是否使用Apple Wallet代替Google Wallet?',
66
+ 'page.wallet.openedInBrowser': '已在浏览器中打开',
67
+ 'page.wallet.openFailed': '打开钱包链接失败',
68
+ 'page.wallet.loading': '正在加载钱包...'
53
69
  },
54
70
  'zh-HK': {
55
71
  // 繁体中文翻译
@@ -75,6 +91,14 @@ export default {
75
91
  'page.wallet.addIos': '添加到蘋果錢包',
76
92
  'page.wallet.addGoogle': '添加到谷歌錢包',
77
93
  'page.wallet.viewDetails': '查看詳情',
78
- 'page.wallet.expireDate': '長期'
94
+ 'page.wallet.expireDate': '長期',
95
+ 'page.wallet.urlEmpty': '錢包連結為空',
96
+ 'page.wallet.notIOS': '非iOS設備不支持Apple Wallet',
97
+ 'page.wallet.addSuccess': '已成功添加到錢包',
98
+ 'page.wallet.addFailed': '添加錢包失敗',
99
+ 'page.wallet.useAppleInstead': '您正在使用iOS設備,是否使用Apple Wallet代替Google Wallet?',
100
+ 'page.wallet.openedInBrowser': '已在瀏覽器中打開',
101
+ 'page.wallet.openFailed': '打開錢包連結失敗',
102
+ 'page.wallet.loading': '正在加載錢包...'
79
103
  }
80
104
  };
@@ -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
  * 通用底部按钮组件
@@ -16,7 +16,9 @@ var FooterButtons = function FooterButtons(_ref) {
16
16
  _ref$platform = _ref.platform,
17
17
  platform = _ref$platform === void 0 ? 'h5' : _ref$platform,
18
18
  _ref$isIOS = _ref.isIOS,
19
- isIOS = _ref$isIOS === void 0 ? false : _ref$isIOS;
19
+ isIOS = _ref$isIOS === void 0 ? false : _ref$isIOS,
20
+ _ref$addWalletLoading = _ref.addWalletLoading,
21
+ addWalletLoading = _ref$addWalletLoading === void 0 ? false : _ref$addWalletLoading;
20
22
  // 如果是PC端,部分页面可能不需要底部按钮
21
23
  if (platform === 'pc') {
22
24
  return null; // PC端不显示底部固定按钮
@@ -41,6 +43,7 @@ var FooterButtons = function FooterButtons(_ref) {
41
43
  // 添加到钱包按钮
42
44
  if (onAppleWalletClick) {
43
45
  buttons.push( /*#__PURE__*/React.createElement(Button, {
46
+ loading: addWalletLoading,
44
47
  key: "apple-wallet",
45
48
  onClick: onAppleWalletClick,
46
49
  disabled: 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;
@@ -41,7 +41,8 @@ export default {
41
41
  'page.wallet.button.add': 'Add',
42
42
  'page.wallet.button.addToAppleWallet': 'Add to Apple Wallet',
43
43
  'page.wallet.button.addToGoogleWallet': 'Add to Google Wallet',
44
- 'page.wallet.button.recharge': 'Recharge'
44
+ 'page.wallet.button.recharge': 'Recharge',
45
+ 'page.wallet.error.addFailed': 'Add failed, please try again.'
45
46
  },
46
47
  'zh-CN': {
47
48
  // Simplified Chinese translations
@@ -85,7 +86,8 @@ export default {
85
86
  'page.wallet.button.add': '添加',
86
87
  'page.wallet.button.addToAppleWallet': '添加到苹果钱包',
87
88
  'page.wallet.button.addToGoogleWallet': '添加到Google钱包',
88
- 'page.wallet.button.recharge': '充值'
89
+ 'page.wallet.button.recharge': '充值',
90
+ 'page.wallet.error.addFailed': '添加钱包失败,请重试。'
89
91
  },
90
92
  'zh-HK': {
91
93
  'page.wallet.rechargeableCard': '充值卡',
@@ -128,6 +130,7 @@ export default {
128
130
  'page.wallet.button.add': '添加',
129
131
  'page.wallet.button.addToAppleWallet': '添加到蘋果錢包',
130
132
  'page.wallet.button.addToGoogleWallet': '添加到Google錢包',
131
- 'page.wallet.button.recharge': '充值'
133
+ 'page.wallet.button.recharge': '充值',
134
+ 'page.wallet.error.addFailed': '添加錢包失敗,請重試。'
132
135
  }
133
136
  };