@pisell/private-materials 6.3.109 → 6.3.111

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 (85) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  12. package/es/components/eftposPay/hooks.d.ts +1 -1
  13. package/es/components/eftposPay/store/index.d.ts +3 -3
  14. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  15. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  16. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  17. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  18. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
  19. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +65 -21
  20. package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
  21. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
  22. package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +28 -16
  23. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
  24. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +14 -1
  25. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
  26. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
  27. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +167 -56
  28. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
  29. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
  30. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +83 -0
  31. package/es/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
  32. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
  33. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +260 -33
  34. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
  35. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +292 -115
  36. package/es/components/pay/toC/PaymentMethods/index.js +12 -2
  37. package/es/components/pay/toC/index.js +53 -18
  38. package/es/components/pay/toC/locales.d.ts +115 -0
  39. package/es/components/pay/toC/locales.js +143 -18
  40. package/es/components/pay/toC/serve.d.ts +10 -0
  41. package/es/components/pay/toC/serve.js +40 -1
  42. package/es/components/pay/toC/utils.d.ts +5 -0
  43. package/es/components/pay/toC/utils.js +10 -0
  44. package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  45. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  46. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  47. package/es/pro/Selector/Selector.d.ts +1 -1
  48. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  49. package/lib/components/eftposPay/hooks.d.ts +1 -1
  50. package/lib/components/eftposPay/store/index.d.ts +3 -3
  51. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  52. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  53. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  54. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  55. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.d.ts +6 -0
  56. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +40 -17
  57. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.less +110 -9
  58. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.d.ts +2 -0
  59. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +17 -5
  60. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +20 -1
  61. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.js +8 -2
  62. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.less +20 -0
  63. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +7 -1
  64. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +98 -24
  65. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.less +47 -0
  66. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.d.ts +34 -0
  67. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.js +107 -0
  68. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/components/TDSErrorModal/index.less +52 -0
  69. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +9 -1
  70. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +149 -5
  71. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +23 -3
  72. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +99 -16
  73. package/lib/components/pay/toC/PaymentMethods/index.js +17 -12
  74. package/lib/components/pay/toC/index.js +34 -3
  75. package/lib/components/pay/toC/locales.d.ts +115 -0
  76. package/lib/components/pay/toC/locales.js +133 -18
  77. package/lib/components/pay/toC/serve.d.ts +10 -0
  78. package/lib/components/pay/toC/serve.js +10 -0
  79. package/lib/components/pay/toC/utils.d.ts +5 -0
  80. package/lib/components/pay/toC/utils.js +17 -0
  81. package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  82. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  83. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  84. package/lib/pro/Selector/Selector.d.ts +1 -1
  85. package/package.json +4 -4
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: boolean;
@@ -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<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -197,7 +197,7 @@ export declare const updateComponent: (component: string, render?: boolean) => {
197
197
  } | {
198
198
  readonly type: "step";
199
199
  readonly render: boolean;
200
- component?: undefined;
200
+ readonly component?: undefined;
201
201
  };
202
202
  };
203
203
  /**
@@ -299,8 +299,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
299
299
  amount?: string | number | undefined;
300
300
  mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
301
301
  order_id?: string | number | undefined;
302
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
303
- action?: "amount" | "pay" | "deviceList" | undefined;
302
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
303
+ action?: "pay" | "amount" | "deviceList" | undefined;
304
304
  key?: number | undefined;
305
305
  step?: number | undefined;
306
306
  title?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
3
4
  export default ErrorTip;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type CallToBookProps = {
2
3
  show: boolean;
3
4
  type: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const WeekItem: (props: any) => import("react").JSX.Element;
3
4
  export default WeekItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CalenDateWeekProps = {
3
4
  currentDate: string;
@@ -4,9 +4,15 @@ export interface AddMWCreditCardRef {
4
4
  init: () => void;
5
5
  onReset: () => void;
6
6
  onSubmit: () => void;
7
+ close: () => void;
7
8
  }
8
9
  export interface AddMWCreditCardProps {
10
+ /** 创建卡片回调 */
9
11
  onCreate?: (values: any) => void;
12
+ /** 店铺名称,用于授权说明文案 */
13
+ shopName?: string;
14
+ /** 按钮 loading */
15
+ btnLoading?: boolean;
10
16
  }
11
17
  declare const _default: React.ForwardRefExoticComponent<AddMWCreditCardProps & React.RefAttributes<any>>;
12
18
  export default _default;
@@ -10,7 +10,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useState, useMemo, useContext, useImperativeHandle, forwardRef } from 'react';
12
12
  import { locales } from '@pisell/utils';
13
- import { Form, Row, Col, Checkbox } from 'antd';
13
+ import { Form, Row, Col, Checkbox, Divider } from 'antd';
14
14
  import { PisellModal, PisellInput, PisellDatePicker, PisellAlert, Iconfont, PisellToast, PisellText } from '@pisell/materials';
15
15
  import { Context } from "../../../model";
16
16
  import "./index.less";
@@ -77,7 +77,11 @@ var formatName = function formatName(card_name) {
77
77
  * @Date: 2024-08-16 11:13
78
78
  */
79
79
  var AddMWCreditCard = function AddMWCreditCard(props, ref) {
80
- var onCreate = props.onCreate;
80
+ var onCreate = props.onCreate,
81
+ _props$shopName = props.shopName,
82
+ shopName = _props$shopName === void 0 ? '' : _props$shopName,
83
+ _props$btnLoading = props.btnLoading,
84
+ btnLoading = _props$btnLoading === void 0 ? false : _props$btnLoading;
81
85
  var _useState = useState(false),
82
86
  _useState2 = _slicedToArray(_useState, 2),
83
87
  open = _useState2[0],
@@ -233,11 +237,20 @@ var AddMWCreditCard = function AddMWCreditCard(props, ref) {
233
237
  var onSubmit = function onSubmit() {
234
238
  form.submit();
235
239
  };
240
+
241
+ /**
242
+ * @title: 关闭弹窗
243
+ * @description: 供外部调用,直接关闭添加卡片弹窗
244
+ */
245
+ var close = function close() {
246
+ setOpen(false);
247
+ };
236
248
  useImperativeHandle(ref, function () {
237
249
  return {
238
250
  init: init,
239
251
  onReset: onReset,
240
- onSubmit: onSubmit
252
+ onSubmit: onSubmit,
253
+ close: close
241
254
  };
242
255
  });
243
256
 
@@ -264,18 +277,40 @@ var AddMWCreditCard = function AddMWCreditCard(props, ref) {
264
277
  }
265
278
  }, [state.payGroup]);
266
279
  return /*#__PURE__*/React.createElement(PisellModal, {
267
- title: /*#__PURE__*/React.createElement("div", null, locales.getText('tocPay.text.addCard')),
280
+ title: /*#__PURE__*/React.createElement("div", {
281
+ className: "secure-card-payment-title"
282
+ }, locales.getText('tocPay.text.secureCardPayment'), /*#__PURE__*/React.createElement(Iconfont, {
283
+ type: "pisell2-shield-tick",
284
+ className: "secure-card-payment-title-icon"
285
+ })),
268
286
  open: open,
269
287
  onCancel: onCancel,
270
288
  cancelVisible: false,
271
289
  onOk: onSubmit,
272
290
  okText: okText,
273
291
  bodyStyle: {
274
- padding: 24
292
+ padding: 24,
293
+ display: 'flex',
294
+ flexDirection: 'column'
295
+ },
296
+ okButtonProps: {
297
+ loading: btnLoading,
298
+ style: {
299
+ display: 'flex',
300
+ justifyContent: 'center',
301
+ alignItems: 'center'
302
+ }
275
303
  }
276
304
  }, /*#__PURE__*/React.createElement("div", {
277
- className: ""
278
- }, /*#__PURE__*/React.createElement(Form, {
305
+ className: "add-mw-credit-card-wrap"
306
+ }, /*#__PURE__*/React.createElement(PisellAlert, {
307
+ className: "secure-card-tip-alert",
308
+ icon: /*#__PURE__*/React.createElement(Iconfont, {
309
+ type: "pisell2-shield-tick"
310
+ }),
311
+ showIcon: true,
312
+ message: locales.getText('tocPay.text.secureBankInfo')
313
+ }), /*#__PURE__*/React.createElement(Form, {
279
314
  layout: "vertical",
280
315
  form: form,
281
316
  onFinish: onFinish,
@@ -329,23 +364,32 @@ var AddMWCreditCard = function AddMWCreditCard(props, ref) {
329
364
  }]
330
365
  }, /*#__PURE__*/React.createElement(PisellInput, {
331
366
  placeholder: locales.getText('tocPay.text.incorrectName')
332
- }))), /*#__PURE__*/React.createElement(Col, {
333
- span: 24
334
- }, /*#__PURE__*/React.createElement(Form.Item, {
367
+ })))), /*#__PURE__*/React.createElement("div", {
368
+ className: "merchant-authorization-text"
369
+ }, locales.getText('tocPay.text.merchantAuthorizationBefore'), /*#__PURE__*/React.createElement("span", {
370
+ className: "merchant-shop-name"
371
+ }, shopName), locales.getText('tocPay.text.merchantAuthorizationAfter')), /*#__PURE__*/React.createElement(Divider, {
372
+ className: "secure-card-divider"
373
+ }), /*#__PURE__*/React.createElement(Form.Item, {
335
374
  name: "is_save",
336
375
  valuePropName: "checked",
337
- initialValue: true
376
+ initialValue: true,
377
+ className: "save-card-form-item"
338
378
  }, /*#__PURE__*/React.createElement(Checkbox, null, /*#__PURE__*/React.createElement("span", {
339
379
  className: "save-card-checkbox-text"
340
- }, locales.getText('tocPay.text.saveCardForNextTime'))))), /*#__PURE__*/React.createElement(Col, {
341
- span: 24
342
- }, /*#__PURE__*/React.createElement(PisellAlert, {
343
- className: "save-card-alert",
344
- icon: /*#__PURE__*/React.createElement(Iconfont, {
345
- type: "pisell2-shield-tick"
346
- }),
347
- showIcon: true,
348
- message: locales.getText('tocPay.text.secureBankInfo')
349
- }))))));
380
+ }, locales.getText('tocPay.text.saveCardForNextTime')))), /*#__PURE__*/React.createElement("div", {
381
+ className: "save-card-encryption-text"
382
+ }, locales.getText('tocPay.text.saveCardEncryption'))), /*#__PURE__*/React.createElement("div", {
383
+ className: "three-d-secure-section"
384
+ }, /*#__PURE__*/React.createElement("div", {
385
+ className: "three-d-secure-badge"
386
+ }, /*#__PURE__*/React.createElement(Iconfont, {
387
+ type: "pisell2-shield-01",
388
+ className: "three-d-secure-icon"
389
+ }), /*#__PURE__*/React.createElement("span", {
390
+ className: "three-d-secure-badge-text"
391
+ }, "3D")), /*#__PURE__*/React.createElement("span", {
392
+ className: "three-d-secure-text"
393
+ }, locales.getText('tocPay.text.threeDSecureProtection')))));
350
394
  };
351
395
  export default /*#__PURE__*/forwardRef(AddMWCreditCard);
@@ -1,3 +1,4 @@
1
+ /* 表单 label 样式 */
1
2
  .pisell-lowcode-form-item-label {
2
3
  color: var(--Gray-900, #101828);
3
4
  font-size: 14px;
@@ -6,20 +7,120 @@
6
7
  line-height: 20px;
7
8
  }
8
9
 
10
+ /* 标题区域 */
11
+ .secure-card-payment-title {
12
+ display: flex;
13
+ align-items: center;
14
+ gap: 6px;
15
+ font-weight: 600;
16
+ }
17
+
18
+ .secure-card-payment-title-icon {
19
+ color: #12b76a;
20
+ font-size: 20px;
21
+ }
22
+
23
+ /* 外层容器 - flex 列布局,使 3D Secure 内容少时贴底 */
24
+ .add-mw-credit-card-wrap {
25
+ display: flex;
26
+ flex-direction: column;
27
+ flex: 1;
28
+ }
29
+
30
+ /* 安全提示 Alert - 顶部 */
31
+ .secure-card-tip-alert {
32
+ margin-bottom: 12px;
33
+ .pisell-lowcode-alert-message {
34
+ font-size: 13px;
35
+ font-style: normal;
36
+ font-weight: 500;
37
+ line-height: 18px;
38
+ color: #027a48;
39
+ }
40
+ }
41
+
42
+ /* 授权说明文案 */
43
+ .merchant-authorization-text {
44
+ color: var(--Gray-600, #475467);
45
+ font-size: 13px;
46
+ font-style: normal;
47
+ font-weight: 400;
48
+ line-height: 18px;
49
+ margin-top: 4px;
50
+ }
51
+
52
+ /* shopName 蓝色高亮 */
53
+ .merchant-shop-name {
54
+ color: #1570EF;
55
+ }
56
+
57
+ /* 分割线 */
58
+ .secure-card-divider {
59
+ margin: 16px 0;
60
+ }
61
+
62
+ /* 保存卡片 Checkbox */
63
+ .save-card-form-item {
64
+ margin-bottom: 4px !important;
65
+ }
66
+
9
67
  .save-card-checkbox-text {
10
68
  color: var(--Gray-900, #101828);
11
- font-size: 16px;
69
+ font-size: 14px;
12
70
  font-style: normal;
13
71
  font-weight: 500;
14
72
  }
15
73
 
16
- .save-card-alert {
74
+ /* 保存卡片加密提示 */
75
+ .save-card-encryption-text {
76
+ color: var(--Gray-500, #667085);
77
+ font-size: 13px;
78
+ font-style: normal;
79
+ font-weight: 400;
80
+ line-height: 18px;
81
+ padding-left: 24px;
82
+ margin-bottom: 24px;
83
+ }
17
84
 
18
- .pisell-lowcode-alert-message {
19
- font-size: 14px;
20
- font-style: normal;
21
- font-weight: 400;
22
- line-height: 20px;
23
- }
85
+ /* 3D Secure 安全说明 - margin-top: auto 使其内容少时贴底,多时跟随流 */
86
+ .three-d-secure-section {
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ gap: 8px;
91
+ padding: 16px 0;
92
+ margin-top: auto;
93
+ }
94
+
95
+ .three-d-secure-badge {
96
+ position: relative;
97
+ display: flex;
98
+ align-items: center;
99
+ justify-content: center;
100
+ width: 32px;
101
+ height: 32px;
102
+ }
103
+
104
+ .three-d-secure-icon {
105
+ color: #2e90fa;
106
+ font-size: 32px;
107
+ }
24
108
 
25
- }
109
+ .three-d-secure-badge-text {
110
+ position: absolute;
111
+ top: 50%;
112
+ left: 50%;
113
+ transform: translate(-50%, -50%);
114
+ font-size: 10px;
115
+ font-weight: 700;
116
+ color: #2e90fa;
117
+ line-height: 1;
118
+ }
119
+
120
+ .three-d-secure-text {
121
+ color: var(--Gray-600, #475467);
122
+ font-size: 13px;
123
+ font-style: normal;
124
+ font-weight: 400;
125
+ line-height: 18px;
126
+ }
@@ -2,10 +2,12 @@ import React from 'react';
2
2
  import './index.less';
3
3
  export interface MWCreditCardListRef {
4
4
  init: (order: any) => void;
5
+ close: () => void;
5
6
  }
6
7
  interface MWCreditCardListProps {
7
8
  onAdd?: () => void;
8
9
  onChange?: (cardId: number) => void;
10
+ btnLoading?: boolean;
9
11
  }
10
12
  declare const _default: React.ForwardRefExoticComponent<MWCreditCardListProps & React.RefAttributes<any>>;
11
13
  export default _default;
@@ -71,7 +71,7 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
71
71
  */
72
72
  var _getCreditCardList = /*#__PURE__*/function () {
73
73
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
74
- var cardList;
74
+ var cardList, _props$onAdd;
75
75
  return _regeneratorRuntime().wrap(function _callee$(_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
@@ -79,6 +79,15 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
79
79
  return getCreditCardList();
80
80
  case 2:
81
81
  cardList = _context.sent;
82
+ if (cardList.length) {
83
+ _context.next = 7;
84
+ break;
85
+ }
86
+ (_props$onAdd = props.onAdd) === null || _props$onAdd === void 0 || _props$onAdd.call(props);
87
+ // 解除loading
88
+ setLoading(false);
89
+ return _context.abrupt("return");
90
+ case 7:
82
91
  // 设置数据
83
92
  setCreditCardList(cardList);
84
93
 
@@ -89,7 +98,7 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
89
98
 
90
99
  // 解除loading
91
100
  setLoading(false);
92
- case 6:
101
+ case 10:
93
102
  case "end":
94
103
  return _context.stop();
95
104
  }
@@ -127,15 +136,12 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
127
136
  // 关闭管理卡模式
128
137
  setManage(false);
129
138
 
130
- // 重置确认按钮loading状态
131
- setOkLoading(false);
132
-
133
139
  // 选中第一个卡
134
140
  setCurrentCard(0);
135
141
 
136
142
  // 异步 获取信用卡列表
137
143
  _getCreditCardList();
138
- case 7:
144
+ case 6:
139
145
  case "end":
140
146
  return _context2.stop();
141
147
  }
@@ -157,9 +163,18 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
157
163
  var cardChange = function cardChange(id) {
158
164
  setCurrentCard(id);
159
165
  };
166
+
167
+ /**
168
+ * @title: 关闭弹窗
169
+ * @description: 供外部调用,直接关闭卡列表弹窗
170
+ */
171
+ var close = function close() {
172
+ setOpen(false);
173
+ };
160
174
  useImperativeHandle(ref, function () {
161
175
  return {
162
- init: init
176
+ init: init,
177
+ close: close
163
178
  };
164
179
  });
165
180
 
@@ -270,11 +285,6 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
270
285
  * @Author: zhiwei.Wang
271
286
  * @Date: 2024-08-16 11:11
272
287
  */
273
- // 确认按钮loading状态
274
- var _useState13 = useState(false),
275
- _useState14 = _slicedToArray(_useState13, 2),
276
- okLoading = _useState14[0],
277
- setOkLoading = _useState14[1];
278
288
  var _useDebounceFn = useDebounceFn(function () {
279
289
  var _props$onChange;
280
290
  // 管理卡模式下, 则执行删除卡操作
@@ -284,9 +294,6 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
284
294
  return;
285
295
  }
286
296
 
287
- // 展示loading, 防止重复点击
288
- setOkLoading(true);
289
-
290
297
  // 否则回调到外部
291
298
  var cur = creditCardList.find(function (d) {
292
299
  return d.id === currentCard;
@@ -346,7 +353,12 @@ var MWCreditCardList = function MWCreditCardList(props, ref) {
346
353
  onOk: onOk,
347
354
  okButtonProps: {
348
355
  disabled: !currentCard,
349
- loading: okLoading
356
+ loading: props.btnLoading,
357
+ style: {
358
+ display: 'flex',
359
+ justifyContent: 'center',
360
+ alignItems: 'center'
361
+ }
350
362
  },
351
363
  bodyStyle: {
352
364
  padding: 24
@@ -1,4 +1,23 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- declare const ThreedsLoading: ({ title, showSuccessBackButton, onSuccessBack }: any) => React.JSX.Element;
3
+ interface ThreedsLoadingProps {
4
+ /** 主标题(单行模式使用,覆盖默认文案) */
5
+ title?: string;
6
+ /** 副标题(多行模式第二行,可选) */
7
+ subtitle?: string;
8
+ /** 描述说明(多行模式第三行,可选) */
9
+ description?: string;
10
+ /** 是否展示"支付完成返回"按钮 */
11
+ showSuccessBackButton?: boolean;
12
+ /** "支付完成返回"按钮点击回调 */
13
+ onSuccessBack?: () => void;
14
+ }
15
+ /**
16
+ * @title: 等待加载页
17
+ * @description: 通用的支付等待 loading 页面。
18
+ * - 默认单行文案模式(传 title 或使用默认文案)
19
+ * - 传入 subtitle / description 后进入多行文案模式
20
+ * 向后兼容:不传新 props 时行为与原来完全一致。
21
+ */
22
+ declare const ThreedsLoading: React.FC<ThreedsLoadingProps>;
4
23
  export default ThreedsLoading;
@@ -2,9 +2,18 @@ import React from 'react';
2
2
  import useEngineContext from "../../../../../../../hooks/useEngineContext";
3
3
  import "./index.less";
4
4
  import { locales } from '@pisell/utils';
5
+ /**
6
+ * @title: 等待加载页
7
+ * @description: 通用的支付等待 loading 页面。
8
+ * - 默认单行文案模式(传 title 或使用默认文案)
9
+ * - 传入 subtitle / description 后进入多行文案模式
10
+ * 向后兼容:不传新 props 时行为与原来完全一致。
11
+ */
5
12
  var ThreedsLoading = function ThreedsLoading(_ref) {
6
13
  var _context$appHelper;
7
14
  var title = _ref.title,
15
+ subtitle = _ref.subtitle,
16
+ description = _ref.description,
8
17
  showSuccessBackButton = _ref.showSuccessBackButton,
9
18
  onSuccessBack = _ref.onSuccessBack;
10
19
  var context = useEngineContext();
@@ -18,7 +27,11 @@ var ThreedsLoading = function ThreedsLoading(_ref) {
18
27
  alt: ""
19
28
  }), /*#__PURE__*/React.createElement("div", {
20
29
  className: 'threeds-loading-title'
21
- }, title || locales.getText('tocPay.text.waitingForBankVerification')), showSuccessBackButton && /*#__PURE__*/React.createElement("div", {
30
+ }, title || locales.getText('tocPay.text.waitingForBankVerification')), subtitle && /*#__PURE__*/React.createElement("div", {
31
+ className: 'threeds-loading-subtitle'
32
+ }, subtitle), description && /*#__PURE__*/React.createElement("div", {
33
+ className: 'threeds-loading-description'
34
+ }, description), showSuccessBackButton && /*#__PURE__*/React.createElement("div", {
22
35
  onClick: onSuccessBack,
23
36
  className: "threeds-loading-success-back-button"
24
37
  }, locales.getText('tocPay.text.successBack')));
@@ -22,6 +22,26 @@
22
22
  color: #353535;
23
23
  }
24
24
 
25
+ .threeds-loading-subtitle {
26
+ margin-top: 8px;
27
+ padding: 0 40px;
28
+ text-align: center;
29
+ font-size: 14px;
30
+ font-weight: 400;
31
+ line-height: 20px;
32
+ color: #475467;
33
+ }
34
+
35
+ .threeds-loading-description {
36
+ margin-top: 4px;
37
+ padding: 0 40px;
38
+ text-align: center;
39
+ font-size: 13px;
40
+ font-weight: 400;
41
+ line-height: 18px;
42
+ color: #667085;
43
+ }
44
+
25
45
  .threeds-loading-success-back-button {
26
46
  margin-top: 20px;
27
47
  color: #4b6b99;
@@ -1,10 +1,16 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
3
  export interface TDSPayRef {
4
- init: (res: any, order: any) => void;
4
+ /** 初始化 3DS 支付流程
5
+ * @param res 卡信息(已保存卡含 id,新卡含表单字段)
6
+ * @param order 订单信息
7
+ * @param preCheckData 可选,外部预检查已获取的数据(跳过内部 fastPayNew / checkEnrollment)
8
+ */
9
+ init: (res: any, order: any, preCheckData?: any) => void;
5
10
  }
6
11
  export interface TDSPayProps {
7
12
  onChange?: (values: any) => void;
13
+ closeAll: () => void;
8
14
  }
9
15
  declare const _default: React.ForwardRefExoticComponent<TDSPayProps & React.RefAttributes<any>>;
10
16
  export default _default;